@cimulate/copilot-widget 1.57.0 → 1.58.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,35 +1,35 @@
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 BU=Object.defineProperty,UU=Object.defineProperties;var HU=Object.getOwnPropertyDescriptors;var Nd=Object.getOwnPropertySymbols;var uS=Object.prototype.hasOwnProperty,lS=Object.prototype.propertyIsEnumerable;var ta=(Fe,Ve)=>(Ve=Symbol[Fe])?Ve:Symbol.for("Symbol."+Fe),zU=Fe=>{throw TypeError(Fe)},$u=Math.pow,y0=(Fe,Ve,Qe)=>Ve in Fe?BU(Fe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Fe[Ve]=Qe,B=(Fe,Ve)=>{for(var Qe in Ve||(Ve={}))uS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);if(Nd)for(var Qe of Nd(Ve))lS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);return Fe},me=(Fe,Ve)=>UU(Fe,HU(Ve));var mn=(Fe,Ve)=>{var Qe={};for(var ft in Fe)uS.call(Fe,ft)&&Ve.indexOf(ft)<0&&(Qe[ft]=Fe[ft]);if(Fe!=null&&Nd)for(var ft of Nd(Fe))Ve.indexOf(ft)<0&&lS.call(Fe,ft)&&(Qe[ft]=Fe[ft]);return Qe};var we=(Fe,Ve,Qe)=>y0(Fe,typeof Ve!="symbol"?Ve+"":Ve,Qe);var et=(Fe,Ve,Qe)=>new Promise((ft,Rt)=>{var wt=_t=>{try{ln(Qe.next(_t))}catch(Cn){Rt(Cn)}},He=_t=>{try{ln(Qe.throw(_t))}catch(Cn){Rt(Cn)}},ln=_t=>_t.done?ft(_t.value):Promise.resolve(_t.value).then(wt,He);ln((Qe=Qe.apply(Fe,Ve)).next())}),Jr=function(Fe,Ve){this[0]=Fe,this[1]=Ve},Pd=(Fe,Ve,Qe)=>{var ft=(ln,_t,Cn,mr)=>{try{var Zi=Qe[ln](_t),Vo=(_t=Zi.value)instanceof Jr,qo=Zi.done;Promise.resolve(Vo?_t[0]:_t).then(Rn=>Vo?ft(ln==="return"?ln:"next",_t[1]?{done:Rn.done,value:Rn.value}:Rn,Cn,mr):Cn({value:Rn,done:qo})).catch(Rn=>ft("throw",Rn,Cn,mr))}catch(Rn){mr(Rn)}},Rt=(ln,_t,Cn,mr)=>He[ln]=Zi=>(_t=new Promise((Vo,qo,Rn)=>(Rn=()=>ft(ln,Zi,Vo,qo),wt?wt.then(Rn):Rn())),mr=()=>wt===Cn&&(wt=0),wt=Cn=_t.then(mr,mr),_t),wt,He={};return Qe=Qe.apply(Fe,Ve),He[ta("asyncIterator")]=()=>He,Rt("next"),Rt("throw"),Rt("return"),He},b0=Fe=>{var Ve=Fe[ta("asyncIterator")],Qe=!1,ft,Rt={};return Ve==null?(Ve=Fe[ta("iterator")](),ft=wt=>Rt[wt]=He=>Ve[wt](He)):(Ve=Ve.call(Fe),ft=wt=>Rt[wt]=He=>{if(Qe){if(Qe=!1,wt==="throw")throw He;return He}return Qe=!0,{done:!1,value:new Jr(new Promise(ln=>{var _t=Ve[wt](He);_t instanceof Object||zU("Object expected"),ln(_t)}),1)}}),Rt[ta("iterator")]=()=>Rt,ft("next"),"throw"in Ve?ft("throw"):Rt.throw=wt=>{throw wt},"return"in Ve&&ft("return"),Rt},cS=(Fe,Ve,Qe)=>(Ve=Fe[ta("asyncIterator")])?Ve.call(Fe):(Fe=Fe[ta("iterator")](),Ve={},Qe=(ft,Rt)=>(Rt=Fe[ft])&&(Ve[ft]=wt=>new Promise((He,ln,_t)=>(wt=Rt.call(Fe,wt),_t=wt.done,Promise.resolve(wt.value).then(Cn=>He({value:Cn,done:_t}),ln)))),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-skip-link{position:fixed;top:1rem;left:1rem;z-index:2147483647;padding:.75rem 1rem;border:2px solid currentColor;border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #1a202c);font-family:var(--cim-widget-font-family, inherit);font-size:1rem;transform:translateY(calc(-100% - 2rem))}.cim-widget-skip-link:focus{transform:none;outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:50%;padding:.25rem;border:none;color:#fff;box-shadow:var(--cim-widget-launcher-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-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:var(--cim-widget-launcher-animation);transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-transcript-unified-card{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:none;transition:none}}.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:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}}.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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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}.cim-widget-search-input:is(input,textarea){width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;color:var(--cim-widget-font-color, #1a202c);border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius)}.cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-font-color, #1a202c);opacity:1}.cim-widget-search-input:is(input,textarea):focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}@media(max-width:576px){.cim-widget-search-input:is(input,textarea){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-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}&:has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-search-input:focus-visible{outline:none}.cim-widget-search-input:is(input,textarea){flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-input-group .cim-widget-messaging-input-group:has(.cim-widget-search-input:focus-visible){outline: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}}.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:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.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:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-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)}.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-embedded-chat.cim-widget-transcript-unified-card>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-transcript-unified-card .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.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{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;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}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent}.cim-widget-dialog-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-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)}.cim-widget-dialog.cim-widget-transcript-unified-card{border:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;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[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{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)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.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-header{border-top-left-radius:0;border-top-right-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);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent}.cim-widget-modal-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-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.cim-widget-transcript-unified-card .cim-widget-modal-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.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}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-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-canvas, var(--cim-widget-background-color));font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-container :focus-visible:not(.cim-widget-search-input),.cim-widget-minimized-container :focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-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:var(--cim-widget-transcript-padding, 1rem);&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-transcript-unified-card{background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-container{gap:var(--cim-widget-transcript-gap);padding:var(--cim-widget-transcript-padding);background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-message-group-child{width:100%}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-markdown,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text,.cim-widget-transcript-unified-card .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cim-widget-transcript-gap);width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-cart-box,.cim-widget-transcript-unified-card .cim-widget-cart-summary,.cim-widget-transcript-unified-card .cim-widget-cart-expanded,.cim-widget-transcript-unified-card .cim-widget-cart-coupon,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-field,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-input{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-cart-expanded{border-top:none}.cim-widget-transcript-unified-card .cim-widget-cart-totals{border-top:1px solid var(--cim-widget-border-color);padding-top:16px;gap:12px}.cim-widget-transcript-unified-card .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-transcript-unified-card .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-foreground)}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card{border-color:var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title-link{color:var(--cim-widget-foreground);font-size:.875rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description{color:var(--cim-widget-muted);font-size:.75rem;opacity:1}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip{border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip:hover{background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-variant-selection);border-color:var(--cim-widget-variant-selection-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-variant-selection-hover);border-color:var(--cim-widget-variant-selection-hover-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-variant-selection-border);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-muted);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-placeholder,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title-link,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__price,.cim-widget-transcript-unified-card .cim-widget-product-tile-name,.cim-widget-transcript-unified-card .cim-widget-product-tile-price{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:600}.cim-widget-transcript-unified-card .cim-widget-carousel__control{padding:0}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid var(--cim-widget-border-color);border-radius:50%;background-color:var(--cim-widget-background-color);color:var(--cim-widget-muted);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:hover,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:hover{background-color:var(--cim-widget-background-color);border-color:var(--cim-widget-outline);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid var(--cim-widget-foreground);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-markdown>:first-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-transcript-unified-card .cim-widget-markdown>:last-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-ask-cim-suggestions-container,.cim-widget-transcript-unified-card .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-outline);border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:hover,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-user-message.embedded,.cim-widget-transcript-unified-card .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-user-message-text{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:400}.cim-widget-transcript-unified-card .cim-widget-message.embedded{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-transcript-unified-card .cim-widget-search-bar{gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-composer-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .625rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-connection-status-icon{display:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea){min-height:var(--cim-widget-control-size);padding:0 .625rem;border:0;border-radius:var(--cim-widget-composer-radius);background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-muted);opacity:1}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:var(--cim-widget-composer-radius)}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea):focus-visible{outline:none}.cim-widget-transcript-unified-card .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:var(--cim-widget-control-size);border:0;border-radius:50%;background-color:var(--cim-widget-send-background);color:var(--cim-widget-on-primary)}.cim-widget-transcript-unified-card .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:hover{background-color:var(--cim-widget-send-hover-background);border-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-muted)}@media(max-width:576px){.cim-widget-transcript-unified-card .cim-widget-message-container{padding:var(--cim-widget-mobile-transcript-padding)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{padding-right:var(--cim-widget-mobile-transcript-padding);padding-left:var(--cim-widget-mobile-transcript-padding)}}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-cart-box{box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery{border-radius:var(--cim-widget-media-radius)}.cim-widget-transcript-unified-card .cim-widget-cart-qty-selector{border-radius:var(--cim-widget-control-radius)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper:not(.with-attachments) .cim-widget-messaging-composer-group:has(.cim-widget-search-input:is(input,textarea):placeholder-shown) .cim-widget-search-button-icon{background-color:var(--cim-widget-send-idle-background);color:var(--cim-widget-send-idle-foreground)}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
- /*$vite$:1*/`,document.head.appendChild(Ve);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Rt={},wt={exports:{}},He={};var ln;function _t(){if(ln)return He;ln=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"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function N(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}N.prototype.isReactComponent={},N.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,K,"setState")},N.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=N.prototype;function A(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}var C=A.prototype=new x;C.constructor=A,w(C,N.prototype),C.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},V={key:!0,ref:!0,__self:!0,__source:!0};function ne(F,K,I){var xe,Me={},ke=null,be=null;if(K!=null)for(xe in K.ref!==void 0&&(be=K.ref),K.key!==void 0&&(ke=""+K.key),K)Y.call(K,xe)&&!V.hasOwnProperty(xe)&&(Me[xe]=K[xe]);var Ie=arguments.length-2;if(Ie===1)Me.children=I;else if(1<Ie){for(var Ue=Array(Ie),lt=0;lt<Ie;lt++)Ue[lt]=arguments[lt+2];Me.children=Ue}if(F&&F.defaultProps)for(xe in Ie=F.defaultProps,Ie)Me[xe]===void 0&&(Me[xe]=Ie[xe]);return{$$typeof:e,type:F,key:ke,ref:be,props:Me,_owner:R.current}}function fe(F,K){return{$$typeof:e,type:F.type,key:K,ref:F.ref,props:F.props,_owner:F._owner}}function $(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function ie(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(I){return K[I]})}var ue=/\/+/g;function ve(F,K){return typeof F=="object"&&F!==null&&F.key!=null?ie(""+F.key):K.toString(36)}function re(F,K,I,xe,Me){var ke=typeof F;(ke==="undefined"||ke==="boolean")&&(F=null);var be=!1;if(F===null)be=!0;else switch(ke){case"string":case"number":be=!0;break;case"object":switch(F.$$typeof){case e:case t:be=!0}}if(be)return be=F,Me=Me(be),F=xe===""?"."+ve(be,0):xe,U(Me)?(I="",F!=null&&(I=F.replace(ue,"$&/")+"/"),re(Me,K,I,"",function(lt){return lt})):Me!=null&&($(Me)&&(Me=fe(Me,I+(!Me.key||be&&be.key===Me.key?"":(""+Me.key).replace(ue,"$&/")+"/")+F)),K.push(Me)),1;if(be=0,xe=xe===""?".":xe+":",U(F))for(var Ie=0;Ie<F.length;Ie++){ke=F[Ie];var Ue=xe+ve(ke,Ie);be+=re(ke,K,I,Ue,Me)}else if(Ue=T(F),typeof Ue=="function")for(F=Ue.call(F),Ie=0;!(ke=F.next()).done;)ke=ke.value,Ue=xe+ve(ke,Ie++),be+=re(ke,K,I,Ue,Me);else if(ke==="object")throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return be}function ae(F,K,I){if(F==null)return F;var xe=[],Me=0;return re(F,xe,"","",function(ke){return K.call(I,ke,Me++)}),xe}function Ae(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(I){(F._status===0||F._status===-1)&&(F._status=1,F._result=I)},function(I){(F._status===0||F._status===-1)&&(F._status=2,F._result=I)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._result}var oe={current:null},J={transition:null},se={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:J,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return He.Children={map:ae,forEach:function(F,K,I){ae(F,function(){K.apply(this,arguments)},I)},count:function(F){var K=0;return ae(F,function(){K++}),K},toArray:function(F){return ae(F,function(K){return K})||[]},only:function(F){if(!$(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},He.Component=N,He.Fragment=n,He.Profiler=o,He.PureComponent=A,He.StrictMode=r,He.Suspense=d,He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,He.act=k,He.cloneElement=function(F,K,I){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var xe=w({},F.props),Me=F.key,ke=F.ref,be=F._owner;if(K!=null){if(K.ref!==void 0&&(ke=K.ref,be=R.current),K.key!==void 0&&(Me=""+K.key),F.type&&F.type.defaultProps)var Ie=F.type.defaultProps;for(Ue in K)Y.call(K,Ue)&&!V.hasOwnProperty(Ue)&&(xe[Ue]=K[Ue]===void 0&&Ie!==void 0?Ie[Ue]:K[Ue])}var Ue=arguments.length-2;if(Ue===1)xe.children=I;else if(1<Ue){Ie=Array(Ue);for(var lt=0;lt<Ue;lt++)Ie[lt]=arguments[lt+2];xe.children=Ie}return{$$typeof:e,type:F.type,key:Me,ref:ke,props:xe,_owner:be}},He.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},He.createElement=ne,He.createFactory=function(F){var K=ne.bind(null,F);return K.type=F,K},He.createRef=function(){return{current:null}},He.forwardRef=function(F){return{$$typeof:l,render:F}},He.isValidElement=$,He.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:Ae}},He.memo=function(F,K){return{$$typeof:f,type:F,compare:K===void 0?null:K}},He.startTransition=function(F){var K=J.transition;J.transition={};try{F()}finally{J.transition=K}},He.unstable_act=k,He.useCallback=function(F,K){return oe.current.useCallback(F,K)},He.useContext=function(F){return oe.current.useContext(F)},He.useDebugValue=function(){},He.useDeferredValue=function(F){return oe.current.useDeferredValue(F)},He.useEffect=function(F,K){return oe.current.useEffect(F,K)},He.useId=function(){return oe.current.useId()},He.useImperativeHandle=function(F,K,I){return oe.current.useImperativeHandle(F,K,I)},He.useInsertionEffect=function(F,K){return oe.current.useInsertionEffect(F,K)},He.useLayoutEffect=function(F,K){return oe.current.useLayoutEffect(F,K)},He.useMemo=function(F,K){return oe.current.useMemo(F,K)},He.useReducer=function(F,K,I){return oe.current.useReducer(F,K,I)},He.useRef=function(F){return oe.current.useRef(F)},He.useState=function(F){return oe.current.useState(F)},He.useSyncExternalStore=function(F,K,I){return oe.current.useSyncExternalStore(F,K,I)},He.useTransition=function(){return oe.current.useTransition()},He.version="18.3.1",He}var Cn;function mr(){return Cn||(Cn=1,wt.exports=_t()),wt.exports}var Zi;function Vo(){if(Zi)return Rt;Zi=1;var e=mr(),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(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:o.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var qo;function Rn(){return qo||(qo=1,ft.exports=Vo()),ft.exports}var _=Rn();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 Vu=Object.create(null);Object.keys(Pr).forEach(e=>{Vu[Pr[e]]=e});const Od={type:"error",data:"parser error"},T0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",w0=typeof ArrayBuffer=="function",_0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Id=({type:e,data:t},n,r)=>T0&&t instanceof Blob?n?r(t):x0(t,r):w0&&(t instanceof ArrayBuffer||_0(t))?n?r(t):x0(new Blob([t]),r):r(Pr[e]+(t||"")),x0=(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 Rd;function pS(e,t){if(T0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(w0&&(e.data instanceof ArrayBuffer||_0(e.data)))return t(S0(e.data));Id(e,!1,n=>{Rd||(Rd=new TextEncoder),t(Rd.encode(n))})}const v0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<v0.length;e++)na[v0.charCodeAt(e)]=e;const mS=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],l=na[e.charCodeAt(r+2)],d=na[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|l>>2,p[o++]=(l&3)<<6|d&63;return f},gS=typeof ArrayBuffer=="function",Ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:A0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ES(e.substring(1),t)}:Vu[n]?e.length>1?{type:Vu[n],data:e.substring(1)}:{type:Vu[n]}:Od},ES=(e,t)=>{if(gS){const n=mS(e);return A0(n,t)}else return{base64:!0,data:e}},A0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",yS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Id(a,!1,l=>{r[u]=l,++o===n&&t(r.join(C0))})})},bS=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Ld(n[o],t);if(r.push(a),a.type==="error")break}return r};function TS(){return new TransformStream({transform(e,t){pS(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 Dd;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Yu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let 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 wS(e,t){Dd||(Dd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(qu(n)<1)break;const d=Yu(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(qu(n)<2)break;const d=Yu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const d=Yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(qu(n)<o)break;const d=Yu(n,o);l.enqueue(Ld(a?d:Dd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Od);break}}}})}const k0=4;function Ht(e){if(e)return _S(e)}function _S(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.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},Ht.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},Ht.prototype.emitReserved=Ht.prototype.emit,Ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),xS="arraybuffer";function jU(){}function N0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const SS=rr.setTimeout,vS=rr.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=SS.bind(rr),e.clearTimeoutFn=vS.bind(rr)):(e.setTimeoutFn=rr.setTimeout.bind(rr),e.clearTimeoutFn=rr.clearTimeout.bind(rr))}const AS=1.33;function CS(e){return typeof e=="string"?kS(e):Math.ceil((e.byteLength||e.size)*AS)}function kS(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 P0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function NS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function PS(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 OS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Md extends Ht{constructor(t){super(),this.writable=!1,Gu(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 OS(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=Ld(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=NS(t);return n.length?"?"+n:""}}class IS extends Md{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};bS(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,yS(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]=P0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let O0=!1;try{O0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const RS=O0;function LS(){}class DS extends IS{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 Or extends Ht{constructor(t,n,r){super(),this.createRequest=t,Gu(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=N0(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=Or.requestsCount++,Or.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=LS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Or.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(Or.requestsCount=0,Or.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",I0);else if(typeof addEventListener=="function"){const e="onpagehide"in rr?"pagehide":"unload";addEventListener(e,I0,!1)}}function I0(){for(let e in Or.requests)Or.requests.hasOwnProperty(e)&&Or.requests[e].abort()}const MS=(function(){const e=R0({xdomain:!1});return e&&e.responseType!==null})();class FS extends DS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=MS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Or(R0,this.uri(),t)}}function R0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RS))return new XMLHttpRequest}catch(n){}if(!t)try{return new rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const L0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BS extends Md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=L0?{}:N0(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;Id(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Wu(()=>{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]=P0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=rr.WebSocket||rr.MozWebSocket;class US extends BS{createSocket(t,n,r){return L0?new Fd(t,n,r):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class HS extends Md{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=wS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=TS();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zS={websocket:US,webtransport:HS,polling:FS},jS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$S=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(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=jS.exec(e||""),a={},u=14;for(;u--;)a[$S[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=VS(a,a.path),a.queryKey=qS(a,a.query),a}function VS(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 qS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xu=[];Ud&&addEventListener("offline",()=>{Xu.forEach(e=>e())},!1);class Ti extends Ht{constructor(t,n){if(super(),this.binaryType=xS,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=Bd(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=Bd(n.host).host);Gu(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=PS(this.opts.query)),Ud&&(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"})},Xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=k0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ti.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ti.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=CS(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,Wu(()=>{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(Ti.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Xu.indexOf(this._offlineEventListener);r!==-1&&Xu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ti.protocol=k0;class YS extends Ti{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ti.priorWebsocketSuccess=!1;const 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;Ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",o),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let WS=class extends YS{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>zS[a]).filter(a=>!!a)),super(r?o:t,o)}};function GS(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=Bd(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 XS=typeof ArrayBuffer=="function",KS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D0=Object.prototype.toString,QS=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",JS=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Hd(e){return XS&&(e instanceof ArrayBuffer||KS(e))||QS&&e instanceof Blob||JS&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Hd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function ZS(e){const t=[],n=e.data,r=e;return r.data=Qu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qu(e,t,n){if(!e)return e;if(Hd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=Qu(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Qu(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Qu(e[o],t));return r}return e}function ev(e,t){return e.data=zd(e.data,t),delete e.attachments,e}function zd(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]=zd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zd(e[n],t));return e}const tv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class nv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Ku(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=ZS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class jd extends Ht{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new rv(n)):super.emitReserved("decoded",n)}else if(Hd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!iv(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(jd.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 nt.CONNECT:return M0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||M0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&tv.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rv{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=ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const iv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const ov=Object.freeze(Object.defineProperty({__proto__:null,Decoder:jd,Encoder:nv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function gr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class F0 extends Ht{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=[gr(t,"open",this.onopen.bind(this)),gr(t,"packet",this.onpacket.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(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(sv.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:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(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&&!l||(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 l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},o),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,l)=>u?o(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((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:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.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:nt.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:nt.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 Yo(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}Yo.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},Yo.prototype.reset=function(){this.attempts=0},Yo.prototype.setMin=function(e){this.ms=e},Yo.prototype.setMax=function(e){this.max=e},Yo.prototype.setJitter=function(e){this.jitter=e};class $d extends Ht{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,Gu(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 Yo({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||ov;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 WS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=gr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=gr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);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(gr(t,"ping",this.onping.bind(this)),gr(t,"data",this.ondata.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(t,"close",this.onclose.bind(this)),gr(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){Wu(()=>{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 F0(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 ra={};function Ju(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=GS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new $d(r,t):(ra[o]||(ra[o]=new $d(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ju,{Manager:$d,Socket:F0,io:Ju,connect:Ju});var av=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===uv})(t)})(e)},uv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function lv(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function B0(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 U0(e,t){try{return t in e}catch(n){return!1}}function cv(e,t,n){var r={};return n.isMergeableObject(e)&&B0(e).forEach((function(o){r[o]=ia(e[o],n)})),B0(t).forEach((function(o){(function(a,u){return U0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(U0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Wo;var l=u.customMerge(a);return typeof l=="function"?l:Wo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Wo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||lv,n.isMergeableObject=n.isMergeableObject||av,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):cv(e,t,n):ia(t,n)}Wo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Wo(n,r,t)}),{})};var dv=Wo;let fv=class{constructor(t){Object.assign(this,t)}};function kn(e){if(e)return(function(t){for(var n in kn.prototype)t[n]=kn.prototype[n];return t})(e)}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.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},kn.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},kn.prototype.emitReserved=kn.prototype.emit,kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const hv=typeof ArrayBuffer=="function",H0=Object.prototype.toString,pv=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",mv=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function Vd(e){return hv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||pv&&e instanceof Blob||mv&&e instanceof File}function Zu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Zu(e[n]))return!0;return!1}if(Vd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Zu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Zu(e[n]))return!0;return!1}function gv(e){const t=[],n=e.data,r=e;return r.data=qd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function qd(e,t){if(!e)return e;if(Vd(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]=qd(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]=qd(e[r],t));return n}return e}function Ev(e,t){return e.data=Yd(e.data,t),delete e.attachments,e}function Yd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Yd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Yd(e[n],t));return e}const yv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Nt;(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"})(Nt||(Nt={}));class bv{constructor(t){this.replacer=t}encode(t){return t.type!==Nt.EVENT&&t.type!==Nt.ACK||!Zu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Nt.EVENT?Nt.BINARY_EVENT:Nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Nt.BINARY_EVENT&&t.type!==Nt.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=gv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Wd extends kn{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===Nt.BINARY_EVENT;r||n.type===Nt.BINARY_ACK?(n.type=r?Nt.EVENT:Nt.ACK,this.reconstructor=new Tv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Vd(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(Nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Nt.BINARY_EVENT||r.type===Nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!wv(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(!Wd.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 Nt.CONNECT:return z0(n);case Nt.DISCONNECT:return n===void 0;case Nt.CONNECT_ERROR:return typeof n=="string"||z0(n);case Nt.EVENT:case Nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yv.indexOf(n[0])===-1);case Nt.ACK:case Nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Tv{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=Ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const j0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],$0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([l,d])=>{const f=[...a,t(l)];return[e(l),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((l=>l[1])):Object.fromEntries(u)},V0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),_v=$0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),j0),q0=$0(V0,V0,j0),xv={Encoder:class extends bv{encode(e){var t,n;return super.encode(me(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_v(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 Wd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?q0(r):r)):n instanceof Object?q0(n):n)):t))}}},Sv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class vv{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:l={}}){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=[Sv,l,{parser:xv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Ju(d,dv.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*$u(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 Pd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new Jr(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new Jr(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new Jr(p==null?void 0:p())}})})((({emit:u,cancel:l})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&l(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,l)=>this.socket.emit(t,n,(d=>{d.name==="error"?l(new fv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const Y0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),W0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var D=mr();const eo=Qe(D);var G0=Symbol.for("immer-nothing"),X0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function ir(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Go=Object.getPrototypeOf;function Xo(e){return!!e&&!!e[at]}function Zr(e){var t;return e?K0(e)||Array.isArray(e)||!!e[X0]||!!((t=e.constructor)!=null&&t[X0])||sa(e)||tl(e):!1}var Av=Object.prototype.constructor.toString();function K0(e){if(!e||typeof e!="object")return!1;const t=Go(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)===Av}function oa(e,t){el(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function el(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:sa(e)?2:tl(e)?3:0}function Gd(e,t){return el(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Q0(e,t,n){const r=el(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Cv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sa(e){return e instanceof Map}function tl(e){return e instanceof Set}function Jt(e){return e.copy_||e.base_}function Xd(e,t){if(sa(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=K0(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],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Go(e),r)}else{const r=Go(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function Kd(e,t=!1){return rl(e)||Xo(e)||!Zr(e)||(el(e)>1&&Object.defineProperties(e,{set:{value:nl},add:{value:nl},clear:{value:nl},delete:{value:nl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Kd(n,!0))),e}function nl(){ir(2)}function rl(e){return Object.isFrozen(e)}var Qd={};function to(e){const t=Qd[e];return t||ir(0,e),t}function kv(e,t){Qd[e]||(Qd[e]=t)}var aa;function il(){return aa}function Nv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function J0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jd(e){Zd(e),e.drafts_.forEach(Pv),e.drafts_=null}function Zd(e){e===aa&&(aa=e.parent_)}function Z0(e){return aa=Nv(aa,e)}function Pv(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function eg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Jd(t),ir(4)),Zr(e)&&(e=ol(t,e),t.parent_||sl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=ol(t,n,[]),Jd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==G0?e:void 0}function ol(e,t,n){if(rl(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>tg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return sl(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),oa(a,(l,d)=>tg(e,r,o,l,d,n,u)),sl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tg(e,t,n,r,o,a,u){if(Xo(o)){const l=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=ol(e,o,l);if(Q0(n,r,d),Xo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!rl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ol(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(sa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sl(e,o)}}function sl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Kd(t,n)}function Ov(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:il(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=ef;n&&(o=[r],a=ua);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var ef={get(e,t){if(t===at)return e;const n=Jt(e);if(!Gd(n,t))return Iv(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===tf(e.base_,t)?(nf(e),e.copy_[t]=la(r,e)):r},has(e,t){return t in Jt(e)},ownKeys(e){return Reflect.ownKeys(Jt(e))},set(e,t,n){const r=ng(Jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=tf(Jt(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(Cv(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;nf(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 tf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ir(11)},getPrototypeOf(e){return Go(e.base_)},setPrototypeOf(){ir(12)}},ua={};oa(ef,(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 ef.set.call(this,e[0],t,n,e[0])};function tf(e,t){const n=e[at];return(n?Jt(n):e)[t]}function Iv(e,t,n){var o;const r=ng(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ng(e,t){if(!(t in e))return;let n=Go(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Go(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function nf(e){e.copy_||(e.copy_=Xd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rv=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"&&ir(6),r!==void 0&&typeof r!="function"&&ir(7);let o;if(Zr(t)){const a=Z0(this),u=la(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?Jd(a):Zd(a)}return J0(a,r),eg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===G0&&(o=void 0),this.autoFreeze_&&Kd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else ir(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,o;return[this.produce(t,n,(u,l)=>{r=u,o=l}),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)||ir(8),Xo(e)&&(e=Lv(e));const t=Z0(this),n=la(e,void 0);return n[at].isManual_=!0,Zd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&ir(9);const{scope_:r}=n;return J0(r,t),eg(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 Xo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function la(e,t){const n=sa(e)?to("MapSet").proxyMap_(e,t):tl(e)?to("MapSet").proxySet_(e,t):Ov(e,t);return(t?t.scope_:il()).drafts_.push(n),n}function Lv(e){return Xo(e)||ir(10,e),rg(e)}function rg(e){if(!Zr(e)||rl(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Xd(e,!0);return oa(n,(r,o)=>{Q0(n,r,rg(o))}),t&&(t.finalized_=!1),n}function Dv(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Jt(this[at]).size}has(d){return Jt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Jt(p).has(d)||Jt(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[at];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[at];u(d),Jt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Jt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Jt(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 Jt(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(l,d){return new e(l,d)}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Jt(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),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];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[at];u(d),Jt(d).size&&(a(d),ei(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(l,d){return new r(l,d)}function a(l){l.copy_||(l.copy_=new Set,l.base_.forEach(d=>{if(Zr(d)){const f=la(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&ir(3,JSON.stringify(Jt(l)))}kv("MapSet",{proxyMap_:t,proxySet_:o})}var Mv=new Rv,Fv=Mv.produce;function ig(e,t,n){var r=D.useMemo(function(){return Fv(e)},[e]);return D.useReducer(r,t,n)}const og={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"},Et={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}},sg=["ask_cim","search","browse","pdp"],Bv=e=>sg.includes(e),ag={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(ag));const Uv=new Map(Object.entries(ag).map(([e,t])=>[t,e])),Hv=e=>{var t;return(t=Uv.get(e))!=null?t:null},Ko="cimulate",rf=`${Ko}:pdp-update`,of=`${Ko}:browse-update`,sf=`${Ko}:search-update`,af=`${Ko}:ui-state-update`,uf=`${Ko}:prompts-state-update`,lf=`${Ko}:session-state`,Ir=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},og),zv={"browse-context":Ir.CONTEXT_UPDATED,categoryId:Ir.CATEGORY_ID_CHANGED,categoryName:Ir.CATEGORY_NAME_CHANGED,page:Ir.PAGE_CHANGED,pageSize:Ir.PAGE_SIZE_CHANGED,includeFacets:Ir.FACET_FILTERS_CHANGED,facetFilters:Ir.FACET_FILTERS_CHANGED,rangeFilters:Ir.RANGE_FILTERS_CHANGED,catalogSegment:Ir.CATALOG_SEGMENT_CHANGED,pricebooks:Ir.PRICEBOOKS_CHANGED},ti=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},og),jv={"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},z="cim-widget",rt=`--${z}`,wi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},$v=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||wi.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||wi.secondaryColor,[`${rt}-font-color`]:e.fontColor||wi.fontColor,[`${rt}-font-family`]:e.fontFamily||wi.fontFamily,[`${rt}-background-color`]:e.backgroundColor||wi.backgroundColor,[`${rt}-border-color`]:e.borderColor||wi.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||wi.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||wi.borderRadius)}),ug={primary:"#3182ce",secondary:"#2c5282",text:"#1a202c",fontFamily:"inherit",surface:"#ffffff",border:"#dddddd",inputBorder:"#767676",canvas:`var(${rt}-background-color)`,muted:"#5c5c5c",subtle:"#f7f7f7",outline:"#a3a3a3",foreground:"#181818",onPrimary:"#ffffff",focus:`var(${rt}-primary-color)`,variantSelection:"#e5e5e5",variantSelectionHover:"#d9d9d9",variantSelectionText:"#141415",variantSelectionBorder:"#c5c5c5",variantSelectionHoverBorder:"#b8b8b8",loaderStart:"#4f7fce",loaderEnd:"#c85d94",sendIdleBackground:`var(${rt}-send-background)`,sendIdleForeground:`var(${rt}-on-primary)`,sendBackground:`var(${rt}-primary-color)`,sendHoverBackground:`var(${rt}-secondary-color)`,productFontFamily:`var(${rt}-font-family, inherit)`,cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem",transcriptPadding:"1rem",mobileTranscriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem",cardShadow:"none",headerShadow:"none",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050",launcherAnimation:"none",headerBackground:"transparent",headerText:"inherit",headerFontSize:"1.25rem",headerFontWeight:"bold",headerFontFamily:"inherit"},al={legacy:{traits:{density:"compact",shape:"sharp",elevation:"flat"},tokens:{},variants:{transcript:"grouped",connecting:"pulse",quantity:"input",carousel:"chevron",logoFallback:"none",userMessageIcon:"visible"}},commerce:{traits:{density:"comfortable",shape:"round",elevation:"raised"},tokens:{launcherAnimation:"cim-widget-fab-pulse 2s infinite ease-in-out",primary:"#3a3a3a",secondary:"#2d2d2d",text:"#3e3e3c",border:"#e8e8e8",subtle:"#f5f5f5",variantSelection:"#e87524",variantSelectionHover:"#d96616",variantSelectionText:"#181818",variantSelectionBorder:"#e87524",variantSelectionHoverBorder:"#d96616",loaderStart:`var(${rt}-primary-color)`,loaderEnd:`var(${rt}-primary-color)`,sendIdleBackground:"#e8e8e8",sendIdleForeground:"#767676",canvas:"#fcfcfc",sendBackground:"#111111",sendHoverBackground:"#333333",productFontFamily:`"Source Sans Pro", var(${rt}-font-family, sans-serif)`,headerBackground:`var(${rt}-background-color)`,headerText:`var(${rt}-font-color)`,headerFontSize:"1rem",headerFontWeight:"400"},variants:{transcript:"unified-card",connecting:"sparkles",quantity:"stepper",carousel:"circle-arrow",logoFallback:"sparkle",userMessageIcon:"hidden"}}},Vv=Object.freeze({legacy:Object.freeze(B({preset:"legacy"},al.legacy.traits)),commerce:Object.freeze(B({preset:"commerce"},al.commerce.traits))}),lg={compact:{transcriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem"},comfortable:{transcriptPadding:"1.25rem",cardPadding:"1.25rem",transcriptGap:"1rem",carouselGap:"12px",headerHeight:"3.875rem",controlSize:"2.75rem"}},cg={sharp:{cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem"},soft:{cardRadius:"0.5rem",controlRadius:"0.375rem",composerRadius:"0.5rem",chipRadius:"0.5rem",mediaRadius:"0.375rem"},round:{cardRadius:"0.75rem",controlRadius:"0.75rem",composerRadius:"999px",chipRadius:"999px",mediaRadius:"0.75rem"}},dg={flat:{cardShadow:"none",headerShadow:"none",launcherShadow:"none",launcherAnimation:"none"},raised:{cardShadow:"0 1px 2px #0000000d",headerShadow:"0 1px 1px -1px #17171b08, 0 14px 30px -20px #17171b1a",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050"}},fg={primaryColor:"primary",secondaryColor:"secondary",fontColor:"text",fontFamily:"fontFamily",backgroundColor:"surface",borderColor:"border",inputBorderColor:"inputBorder",borderRadius:"cardRadius"},hg={primary:"primary-color",secondary:"secondary-color",text:"font-color",surface:"background-color",border:"border-color",inputBorder:"input-border-color",cardRadius:"border-radius",headerBackground:"header-background-color",headerText:"header-text-color",headerFontSize:"header-text-font-size",headerFontWeight:"header-text-font-weight",headerFontFamily:"header-text-font-family"},_i=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ln=e=>e===0||typeof e=="string"&&e.trim().length>0,ro=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pg=e=>{var T,y;const t=_i(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(ro(t,"tokens")||["density","shape","elevation"].some(w=>ro(t,w)&&t[w]!==al[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?$v(t):void 0,l=al[r],d=B({},l.traits);typeof t.density=="string"&&ro(lg,t.density)&&(d.density=t.density),typeof t.shape=="string"&&ro(cg,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&ro(dg,t.elevation)&&(d.elevation=t.elevation);const f=B(B(B(B(B({},ug),l.tokens),lg[d.density]),cg[d.shape]),dg[d.elevation]);if(_i(t.tokens))for(const w of Object.keys(ug)){const v=t.tokens[w];ro(t.tokens,w)&&Ln(v)&&(f[w]=String(v))}_i(t.tokens)&&Ln(t.tokens.fontFamily)&&!Ln(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),_i(t.tokens)&&Ln(t.tokens.launcherShadow)&&!Ln(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),_i(t.tokens)&&Ln(t.tokens.transcriptPadding)&&!Ln(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),_i(t.tokens)&&Ln(t.tokens.text)&&!Ln(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=_i(t.tokens)?t.tokens.inputBorder:void 0;!Ln(p)&&_i(t.tokens)&&Ln(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,v]of Object.entries(fg)){const N=t[w];ro(t,w)&&Ln(N)&&(f[v]=String(N),w==="borderColor"&&!Ln(t.inputBorderColor)&&!Ln(p)&&(f.inputBorder=String(N)),w==="fontFamily"&&(f.productFontFamily=String(N)),w==="fontColor"&&(f.foreground=String(N)),w==="borderRadius"&&(f.controlRadius=f.composerRadius=f.chipRadius=f.mediaRadius=String(N)))}if(u)for(const w of Object.values(fg)){const v=(T=hg[w])!=null?T:w.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);f[w]=u[`${rt}-${v}`]}const m={};for(const[w,v]of Object.entries(f)){const N=(y=hg[w])!=null?y:w.replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`);m[`${rt}-${N}`]=v}return{preset:r,compatibility:a,traits:d,tokens:f,cssVariables:u!=null?u:m,variants:B({},l.variants),transcriptClassName:a==="legacy"?"":`${z}-transcript-${l.variants.transcript}`}},ni={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},mg=D.createContext(null),gg=D.createContext(null),yt={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"},Eg={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};function yg(e,t){return function(){return e.apply(t,arguments)}}const{toString:qv}=Object.prototype,{getPrototypeOf:xi}=Object,{iterator:ca,toStringTag:bg}=Symbol,da=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tg=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),wg=(e,t,n)=>e===Object.prototype||!n&&t===null,Yv=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Tg(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},fa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=xi(n);if(wg(n,o,n===e))return!1;if(da(n,t))return!0;n=o}return!1},Wv=(e,t)=>e!=null&&fa(e,t)?e[t]:void 0,Gv=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=xi(e);if(t===null&&Yv(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let a=e;for(;a!=null&&o.indexOf(a)===-1;){o.push(a);const u=a===e?t:xi(a);if(wg(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)Tg(d)||da(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},cf=(e=>t=>{const n=qv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>cf(t)===e),ul=e=>t=>typeof t===e,{isArray:io}=Array,oo=ul("undefined");function Qo(e){return e!==null&&!oo(e)&&e.constructor!==null&&!oo(e.constructor)&&Dn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _g=or("ArrayBuffer");function Xv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_g(e.buffer),t}const Kv=ul("string"),Dn=ul("function"),xg=ul("number"),Jo=e=>e!==null&&typeof e=="object",Qv=e=>e===!0||e===!1,ll=e=>{if(!Jo(e))return!1;const t=xi(e);return(t===null||t===Object.prototype||xi(t)===null)&&!fa(e,bg)&&!fa(e,ca)},Jv=e=>{if(!Jo(e)||Qo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},Zv=or("Date"),eA=or("File"),tA=e=>!!(e&&typeof e.uri!="undefined"),nA=e=>e&&typeof e.getParts!="undefined",rA=or("Blob"),iA=or("FileList"),oA=or("Set"),sA=e=>Jo(e)&&Dn(e.pipe);function aA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Sg=aA(),vg=typeof Sg.FormData!="undefined"?Sg.FormData:void 0,uA=e=>{if(!e)return!1;if(vg&&e instanceof vg)return!0;const t=xi(e);if(!t||t===Object.prototype||!Dn(e.append))return!1;const n=cf(e);return n==="formdata"||n==="object"&&Dn(e.toString)&&e.toString()==="[object FormData]"},lA=or("URLSearchParams"),[cA,dA,fA,hA]=["ReadableStream","Request","Response","Headers"].map(or),pA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ha(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Qo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function Ag(e,t){if(Qo(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 so=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Cg=e=>!oo(e)&&e!==so;function df(...e){const{caseless:t,skipUndefined:n}=Cg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&Ag(r,u)||u,d=da(r,l)?r[l]:void 0;ll(d)&&ll(a)?r[l]=df(d,a):ll(a)?r[l]=df({},a):io(a)?r[l]=a.slice():(!n||!oo(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Qo(l)||(ha(l,o),typeof l!="object"||io(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];AA.call(l,p)&&o(l[p],p)}}return r}const mA=(e,t,n,{allOwnKeys:r}={})=>(ha(t,(o,a)=>{n&&Dn(o)?Object.defineProperty(e,a,{__proto__:null,value:yg(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),gA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EA=(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)},yA=(e,t,n,r)=>{let o,a,u;const l={};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))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&xi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bA=(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},TA=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!xg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&xi(Uint8Array)),_A=(e,t)=>{const r=(e&&e[ca]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SA=or("HTMLFormElement"),vA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:AA}=Object.prototype,CA=or("RegExp"),kg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ha(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},kA=e=>{kg(e,(t,n)=>{if(Dn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Dn(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+"'")})}})},NA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return io(e)?r(e):r(String(e).split(t)),n},PA=()=>{},OA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function IA(e){return!!(e&&Dn(e.append)&&e[bg]==="FormData"&&e[ca])}const RA=e=>{const t=new WeakSet,n=r=>{if(Jo(r)){if(t.has(r))return;if(Qo(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(oA(r)){o=[];for(const a of r){const u=n(a);!oo(u)&&o.push(u)}}else o=io(r)?[]:{},ha(r,(a,u)=>{const l=n(a);!oo(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},LA=or("AsyncFunction"),DA=e=>e&&(Jo(e)||Dn(e))&&Dn(e.then)&&Dn(e.catch),Ng=((e,t)=>e?setImmediate:t?((n,r)=>(so.addEventListener("message",({source:o,data:a})=>{o===so&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),so.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Dn(so.postMessage)),MA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(so):typeof process!="undefined"&&process.nextTick||Ng,Pg=e=>e!=null&&Dn(e[ca]),j={isArray:io,isArrayBuffer:_g,isBuffer:Qo,isFormData:uA,isArrayBufferView:Xv,isString:Kv,isNumber:xg,isBoolean:Qv,isObject:Jo,isPlainObject:ll,isEmptyObject:Jv,isReadableStream:cA,isRequest:dA,isResponse:fA,isHeaders:hA,isUndefined:oo,isDate:Zv,isFile:eA,isReactNativeBlob:tA,isReactNative:nA,isBlob:rA,isRegExp:CA,isFunction:Dn,isStream:sA,isURLSearchParams:lA,isTypedArray:wA,isFileList:iA,forEach:ha,merge:df,extend:mA,trim:pA,stripBOM:gA,inherits:EA,toFlatObject:yA,kindOf:cf,kindOfTest:or,endsWith:bA,toArray:TA,forEachEntry:_A,matchAll:xA,isHTMLForm:SA,hasOwnProperty:da,hasOwnProp:da,hasOwnInPrototypeChain:fa,getSafeProp:Wv,toSafeFlatObject:Gv,reduceDescriptors:kg,freezeMethods:kA,toObjectSet:NA,toCamelCase:vA,noop:PA,toFiniteNumber:OA,findKey:Ag,global:so,isContextDefined:Cg,isSpecCompliantForm:IA,toJSONObject:RA,isAsyncFn:LA,isThenable:DA,setImmediate:Ng,asap:MA,isIterable:Pg,isSafeIterable:e=>e!=null&&fa(e,ca)&&Pg(e)},FA=j.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"]),BA=e=>{const t={};let n,r,o;return e&&e.split(`
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 BU=Object.defineProperty,UU=Object.defineProperties;var HU=Object.getOwnPropertyDescriptors;var Nd=Object.getOwnPropertySymbols;var uS=Object.prototype.hasOwnProperty,lS=Object.prototype.propertyIsEnumerable;var ta=(Fe,Ve)=>(Ve=Symbol[Fe])?Ve:Symbol.for("Symbol."+Fe),zU=Fe=>{throw TypeError(Fe)},$u=Math.pow,y0=(Fe,Ve,Qe)=>Ve in Fe?BU(Fe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Fe[Ve]=Qe,B=(Fe,Ve)=>{for(var Qe in Ve||(Ve={}))uS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);if(Nd)for(var Qe of Nd(Ve))lS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);return Fe},me=(Fe,Ve)=>UU(Fe,HU(Ve));var mn=(Fe,Ve)=>{var Qe={};for(var ft in Fe)uS.call(Fe,ft)&&Ve.indexOf(ft)<0&&(Qe[ft]=Fe[ft]);if(Fe!=null&&Nd)for(var ft of Nd(Fe))Ve.indexOf(ft)<0&&lS.call(Fe,ft)&&(Qe[ft]=Fe[ft]);return Qe};var _e=(Fe,Ve,Qe)=>y0(Fe,typeof Ve!="symbol"?Ve+"":Ve,Qe);var et=(Fe,Ve,Qe)=>new Promise((ft,Rt)=>{var wt=_t=>{try{ln(Qe.next(_t))}catch(Cn){Rt(Cn)}},He=_t=>{try{ln(Qe.throw(_t))}catch(Cn){Rt(Cn)}},ln=_t=>_t.done?ft(_t.value):Promise.resolve(_t.value).then(wt,He);ln((Qe=Qe.apply(Fe,Ve)).next())}),Jr=function(Fe,Ve){this[0]=Fe,this[1]=Ve},Pd=(Fe,Ve,Qe)=>{var ft=(ln,_t,Cn,mr)=>{try{var Zi=Qe[ln](_t),Vo=(_t=Zi.value)instanceof Jr,qo=Zi.done;Promise.resolve(Vo?_t[0]:_t).then(Rn=>Vo?ft(ln==="return"?ln:"next",_t[1]?{done:Rn.done,value:Rn.value}:Rn,Cn,mr):Cn({value:Rn,done:qo})).catch(Rn=>ft("throw",Rn,Cn,mr))}catch(Rn){mr(Rn)}},Rt=(ln,_t,Cn,mr)=>He[ln]=Zi=>(_t=new Promise((Vo,qo,Rn)=>(Rn=()=>ft(ln,Zi,Vo,qo),wt?wt.then(Rn):Rn())),mr=()=>wt===Cn&&(wt=0),wt=Cn=_t.then(mr,mr),_t),wt,He={};return Qe=Qe.apply(Fe,Ve),He[ta("asyncIterator")]=()=>He,Rt("next"),Rt("throw"),Rt("return"),He},b0=Fe=>{var Ve=Fe[ta("asyncIterator")],Qe=!1,ft,Rt={};return Ve==null?(Ve=Fe[ta("iterator")](),ft=wt=>Rt[wt]=He=>Ve[wt](He)):(Ve=Ve.call(Fe),ft=wt=>Rt[wt]=He=>{if(Qe){if(Qe=!1,wt==="throw")throw He;return He}return Qe=!0,{done:!1,value:new Jr(new Promise(ln=>{var _t=Ve[wt](He);_t instanceof Object||zU("Object expected"),ln(_t)}),1)}}),Rt[ta("iterator")]=()=>Rt,ft("next"),"throw"in Ve?ft("throw"):Rt.throw=wt=>{throw wt},"return"in Ve&&ft("return"),Rt},cS=(Fe,Ve,Qe)=>(Ve=Fe[ta("asyncIterator")])?Ve.call(Fe):(Fe=Fe[ta("iterator")](),Ve={},Qe=(ft,Rt)=>(Rt=Fe[ft])&&(Ve[ft]=wt=>new Promise((He,ln,_t)=>(wt=Rt.call(Fe,wt),_t=wt.done,Promise.resolve(wt.value).then(Cn=>He({value:Cn,done:_t}),ln)))),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-skip-link{position:fixed;top:1rem;left:1rem;z-index:2147483647;padding:.75rem 1rem;border:2px solid currentColor;border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #1a202c);font-family:var(--cim-widget-font-family, inherit);font-size:1rem;transform:translateY(calc(-100% - 2rem))}.cim-widget-skip-link:focus{transform:none;outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:50%;padding:.25rem;border:none;color:#fff;box-shadow:var(--cim-widget-launcher-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-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:var(--cim-widget-launcher-animation);transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-transcript-unified-card{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:none;transition:none}}.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:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}}.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);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.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}.cim-widget-search-input:is(input,textarea){width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;color:var(--cim-widget-font-color, #1a202c);border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius)}.cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-font-color, #1a202c);opacity:1}.cim-widget-search-input:is(input,textarea):focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}@media(max-width:576px){.cim-widget-search-input:is(input,textarea){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-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;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-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}&:has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-search-input:focus-visible{outline:none}.cim-widget-search-input:is(input,textarea){flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-input-group .cim-widget-messaging-input-group:has(.cim-widget-search-input:focus-visible){outline: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}}.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:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.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:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-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)}.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-embedded-chat.cim-widget-transcript-unified-card>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-transcript-unified-card .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.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{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;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}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent}.cim-widget-dialog-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-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)}.cim-widget-dialog.cim-widget-transcript-unified-card{border:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;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[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{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)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.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-header{border-top-left-radius:0;border-top-right-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);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent}.cim-widget-modal-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-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.cim-widget-transcript-unified-card .cim-widget-modal-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.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}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-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-canvas, var(--cim-widget-background-color));font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-container :focus-visible:not(.cim-widget-search-input),.cim-widget-minimized-container :focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-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:var(--cim-widget-transcript-padding, 1rem);&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-transcript-unified-card{background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-container{gap:var(--cim-widget-transcript-gap);padding:var(--cim-widget-transcript-padding);background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-message-group-child{width:100%}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-markdown,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text,.cim-widget-transcript-unified-card .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cim-widget-transcript-gap);width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-cart-box,.cim-widget-transcript-unified-card .cim-widget-cart-summary,.cim-widget-transcript-unified-card .cim-widget-cart-expanded,.cim-widget-transcript-unified-card .cim-widget-cart-coupon,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-field,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-input{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-cart-expanded{border-top:none}.cim-widget-transcript-unified-card .cim-widget-cart-totals{border-top:1px solid var(--cim-widget-border-color);padding-top:16px;gap:12px}.cim-widget-transcript-unified-card .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-transcript-unified-card .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-foreground)}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card{border-color:var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title-link{color:var(--cim-widget-foreground);font-size:.875rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description{color:var(--cim-widget-muted);font-size:.75rem;opacity:1}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip{border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip:hover{background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-variant-selection);border-color:var(--cim-widget-variant-selection-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-variant-selection-hover);border-color:var(--cim-widget-variant-selection-hover-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-variant-selection-border);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-muted);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-placeholder,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title-link,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__price,.cim-widget-transcript-unified-card .cim-widget-product-tile-name,.cim-widget-transcript-unified-card .cim-widget-product-tile-price{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:600}.cim-widget-transcript-unified-card .cim-widget-carousel__control{padding:0}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid var(--cim-widget-border-color);border-radius:50%;background-color:var(--cim-widget-background-color);color:var(--cim-widget-muted);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:hover,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:hover{background-color:var(--cim-widget-background-color);border-color:var(--cim-widget-outline);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid var(--cim-widget-foreground);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-markdown>:first-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-transcript-unified-card .cim-widget-markdown>:last-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-ask-cim-suggestions-container,.cim-widget-transcript-unified-card .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-outline);border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:hover,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-user-message.embedded,.cim-widget-transcript-unified-card .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-user-message-text{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:400}.cim-widget-transcript-unified-card .cim-widget-message.embedded{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-transcript-unified-card .cim-widget-search-bar{gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-composer-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .625rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-connection-status-icon{display:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea){min-height:var(--cim-widget-control-size);padding:0 .625rem;border:0;border-radius:var(--cim-widget-composer-radius);background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-muted);opacity:1}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:var(--cim-widget-composer-radius)}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea):focus-visible{outline:none}.cim-widget-transcript-unified-card .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:var(--cim-widget-control-size);border:0;border-radius:50%;background-color:var(--cim-widget-send-background);color:var(--cim-widget-on-primary)}.cim-widget-transcript-unified-card .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:hover{background-color:var(--cim-widget-send-hover-background);border-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-muted)}@media(max-width:576px){.cim-widget-transcript-unified-card .cim-widget-message-container{padding:var(--cim-widget-mobile-transcript-padding)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{padding-right:var(--cim-widget-mobile-transcript-padding);padding-left:var(--cim-widget-mobile-transcript-padding)}}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-cart-box{box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery{border-radius:var(--cim-widget-media-radius)}.cim-widget-transcript-unified-card .cim-widget-cart-qty-selector{border-radius:var(--cim-widget-control-radius)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper:not(.with-attachments) .cim-widget-messaging-composer-group:has(.cim-widget-search-input:is(input,textarea):placeholder-shown) .cim-widget-search-button-icon{background-color:var(--cim-widget-send-idle-background);color:var(--cim-widget-send-idle-foreground)}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
2
+ /*$vite$:1*/`,document.head.appendChild(Ve);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Rt={},wt={exports:{}},He={};var ln;function _t(){if(ln)return He;ln=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"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function N(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}N.prototype.isReactComponent={},N.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,K,"setState")},N.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=N.prototype;function C(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}var A=C.prototype=new x;A.constructor=C,w(A,N.prototype),A.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function ne(F,K,I){var Se,Me={},ke=null,be=null;if(K!=null)for(Se in K.ref!==void 0&&(be=K.ref),K.key!==void 0&&(ke=""+K.key),K)Y.call(K,Se)&&!$.hasOwnProperty(Se)&&(Me[Se]=K[Se]);var Ie=arguments.length-2;if(Ie===1)Me.children=I;else if(1<Ie){for(var Ue=Array(Ie),lt=0;lt<Ie;lt++)Ue[lt]=arguments[lt+2];Me.children=Ue}if(F&&F.defaultProps)for(Se in Ie=F.defaultProps,Ie)Me[Se]===void 0&&(Me[Se]=Ie[Se]);return{$$typeof:e,type:F,key:ke,ref:be,props:Me,_owner:R.current}}function de(F,K){return{$$typeof:e,type:F.type,key:K,ref:F.ref,props:F.props,_owner:F._owner}}function V(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function ie(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(I){return K[I]})}var fe=/\/+/g;function we(F,K){return typeof F=="object"&&F!==null&&F.key!=null?ie(""+F.key):K.toString(36)}function re(F,K,I,Se,Me){var ke=typeof F;(ke==="undefined"||ke==="boolean")&&(F=null);var be=!1;if(F===null)be=!0;else switch(ke){case"string":case"number":be=!0;break;case"object":switch(F.$$typeof){case e:case t:be=!0}}if(be)return be=F,Me=Me(be),F=Se===""?"."+we(be,0):Se,U(Me)?(I="",F!=null&&(I=F.replace(fe,"$&/")+"/"),re(Me,K,I,"",function(lt){return lt})):Me!=null&&(V(Me)&&(Me=de(Me,I+(!Me.key||be&&be.key===Me.key?"":(""+Me.key).replace(fe,"$&/")+"/")+F)),K.push(Me)),1;if(be=0,Se=Se===""?".":Se+":",U(F))for(var Ie=0;Ie<F.length;Ie++){ke=F[Ie];var Ue=Se+we(ke,Ie);be+=re(ke,K,I,Ue,Me)}else if(Ue=T(F),typeof Ue=="function")for(F=Ue.call(F),Ie=0;!(ke=F.next()).done;)ke=ke.value,Ue=Se+we(ke,Ie++),be+=re(ke,K,I,Ue,Me);else if(ke==="object")throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return be}function oe(F,K,I){if(F==null)return F;var Se=[],Me=0;return re(F,Se,"","",function(ke){return K.call(I,ke,Me++)}),Se}function Ae(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(I){(F._status===0||F._status===-1)&&(F._status=1,F._result=I)},function(I){(F._status===0||F._status===-1)&&(F._status=2,F._result=I)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._result}var se={current:null},J={transition:null},ae={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:J,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return He.Children={map:oe,forEach:function(F,K,I){oe(F,function(){K.apply(this,arguments)},I)},count:function(F){var K=0;return oe(F,function(){K++}),K},toArray:function(F){return oe(F,function(K){return K})||[]},only:function(F){if(!V(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},He.Component=N,He.Fragment=n,He.Profiler=o,He.PureComponent=C,He.StrictMode=r,He.Suspense=d,He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,He.act=k,He.cloneElement=function(F,K,I){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var Se=w({},F.props),Me=F.key,ke=F.ref,be=F._owner;if(K!=null){if(K.ref!==void 0&&(ke=K.ref,be=R.current),K.key!==void 0&&(Me=""+K.key),F.type&&F.type.defaultProps)var Ie=F.type.defaultProps;for(Ue in K)Y.call(K,Ue)&&!$.hasOwnProperty(Ue)&&(Se[Ue]=K[Ue]===void 0&&Ie!==void 0?Ie[Ue]:K[Ue])}var Ue=arguments.length-2;if(Ue===1)Se.children=I;else if(1<Ue){Ie=Array(Ue);for(var lt=0;lt<Ue;lt++)Ie[lt]=arguments[lt+2];Se.children=Ie}return{$$typeof:e,type:F.type,key:Me,ref:ke,props:Se,_owner:be}},He.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},He.createElement=ne,He.createFactory=function(F){var K=ne.bind(null,F);return K.type=F,K},He.createRef=function(){return{current:null}},He.forwardRef=function(F){return{$$typeof:l,render:F}},He.isValidElement=V,He.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:Ae}},He.memo=function(F,K){return{$$typeof:f,type:F,compare:K===void 0?null:K}},He.startTransition=function(F){var K=J.transition;J.transition={};try{F()}finally{J.transition=K}},He.unstable_act=k,He.useCallback=function(F,K){return se.current.useCallback(F,K)},He.useContext=function(F){return se.current.useContext(F)},He.useDebugValue=function(){},He.useDeferredValue=function(F){return se.current.useDeferredValue(F)},He.useEffect=function(F,K){return se.current.useEffect(F,K)},He.useId=function(){return se.current.useId()},He.useImperativeHandle=function(F,K,I){return se.current.useImperativeHandle(F,K,I)},He.useInsertionEffect=function(F,K){return se.current.useInsertionEffect(F,K)},He.useLayoutEffect=function(F,K){return se.current.useLayoutEffect(F,K)},He.useMemo=function(F,K){return se.current.useMemo(F,K)},He.useReducer=function(F,K,I){return se.current.useReducer(F,K,I)},He.useRef=function(F){return se.current.useRef(F)},He.useState=function(F){return se.current.useState(F)},He.useSyncExternalStore=function(F,K,I){return se.current.useSyncExternalStore(F,K,I)},He.useTransition=function(){return se.current.useTransition()},He.version="18.3.1",He}var Cn;function mr(){return Cn||(Cn=1,wt.exports=_t()),wt.exports}var Zi;function Vo(){if(Zi)return Rt;Zi=1;var e=mr(),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(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:o.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var qo;function Rn(){return qo||(qo=1,ft.exports=Vo()),ft.exports}var _=Rn();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 Vu=Object.create(null);Object.keys(Pr).forEach(e=>{Vu[Pr[e]]=e});const Od={type:"error",data:"parser error"},T0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",w0=typeof ArrayBuffer=="function",_0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Id=({type:e,data:t},n,r)=>T0&&t instanceof Blob?n?r(t):x0(t,r):w0&&(t instanceof ArrayBuffer||_0(t))?n?r(t):x0(new Blob([t]),r):r(Pr[e]+(t||"")),x0=(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 Rd;function pS(e,t){if(T0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(w0&&(e.data instanceof ArrayBuffer||_0(e.data)))return t(S0(e.data));Id(e,!1,n=>{Rd||(Rd=new TextEncoder),t(Rd.encode(n))})}const v0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<v0.length;e++)na[v0.charCodeAt(e)]=e;const mS=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],l=na[e.charCodeAt(r+2)],d=na[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|l>>2,p[o++]=(l&3)<<6|d&63;return f},gS=typeof ArrayBuffer=="function",Ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:A0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ES(e.substring(1),t)}:Vu[n]?e.length>1?{type:Vu[n],data:e.substring(1)}:{type:Vu[n]}:Od},ES=(e,t)=>{if(gS){const n=mS(e);return A0(n,t)}else return{base64:!0,data:e}},A0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",yS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Id(a,!1,l=>{r[u]=l,++o===n&&t(r.join(C0))})})},bS=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Ld(n[o],t);if(r.push(a),a.type==="error")break}return r};function TS(){return new TransformStream({transform(e,t){pS(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 Dd;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Yu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let 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 wS(e,t){Dd||(Dd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(qu(n)<1)break;const d=Yu(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(qu(n)<2)break;const d=Yu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const d=Yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(qu(n)<o)break;const d=Yu(n,o);l.enqueue(Ld(a?d:Dd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Od);break}}}})}const k0=4;function Ht(e){if(e)return _S(e)}function _S(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.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},Ht.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},Ht.prototype.emitReserved=Ht.prototype.emit,Ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),xS="arraybuffer";function jU(){}function N0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const SS=rr.setTimeout,vS=rr.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=SS.bind(rr),e.clearTimeoutFn=vS.bind(rr)):(e.setTimeoutFn=rr.setTimeout.bind(rr),e.clearTimeoutFn=rr.clearTimeout.bind(rr))}const AS=1.33;function CS(e){return typeof e=="string"?kS(e):Math.ceil((e.byteLength||e.size)*AS)}function kS(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 P0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function NS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function PS(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 OS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Md extends Ht{constructor(t){super(),this.writable=!1,Gu(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 OS(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=Ld(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=NS(t);return n.length?"?"+n:""}}class IS extends Md{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};bS(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,yS(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]=P0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let O0=!1;try{O0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const RS=O0;function LS(){}class DS extends IS{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 Or extends Ht{constructor(t,n,r){super(),this.createRequest=t,Gu(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=N0(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=Or.requestsCount++,Or.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=LS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Or.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(Or.requestsCount=0,Or.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",I0);else if(typeof addEventListener=="function"){const e="onpagehide"in rr?"pagehide":"unload";addEventListener(e,I0,!1)}}function I0(){for(let e in Or.requests)Or.requests.hasOwnProperty(e)&&Or.requests[e].abort()}const MS=(function(){const e=R0({xdomain:!1});return e&&e.responseType!==null})();class FS extends DS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=MS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Or(R0,this.uri(),t)}}function R0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RS))return new XMLHttpRequest}catch(n){}if(!t)try{return new rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const L0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BS extends Md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=L0?{}:N0(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;Id(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Wu(()=>{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]=P0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=rr.WebSocket||rr.MozWebSocket;class US extends BS{createSocket(t,n,r){return L0?new Fd(t,n,r):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class HS extends Md{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=wS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=TS();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zS={websocket:US,webtransport:HS,polling:FS},jS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$S=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(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=jS.exec(e||""),a={},u=14;for(;u--;)a[$S[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=VS(a,a.path),a.queryKey=qS(a,a.query),a}function VS(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 qS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xu=[];Ud&&addEventListener("offline",()=>{Xu.forEach(e=>e())},!1);class Ti extends Ht{constructor(t,n){if(super(),this.binaryType=xS,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=Bd(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=Bd(n.host).host);Gu(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=PS(this.opts.query)),Ud&&(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"})},Xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=k0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ti.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ti.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=CS(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,Wu(()=>{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(Ti.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Xu.indexOf(this._offlineEventListener);r!==-1&&Xu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ti.protocol=k0;class YS extends Ti{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ti.priorWebsocketSuccess=!1;const 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;Ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",o),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let WS=class extends YS{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>zS[a]).filter(a=>!!a)),super(r?o:t,o)}};function GS(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=Bd(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 XS=typeof ArrayBuffer=="function",KS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D0=Object.prototype.toString,QS=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",JS=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Hd(e){return XS&&(e instanceof ArrayBuffer||KS(e))||QS&&e instanceof Blob||JS&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Hd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function ZS(e){const t=[],n=e.data,r=e;return r.data=Qu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qu(e,t,n){if(!e)return e;if(Hd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=Qu(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Qu(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Qu(e[o],t));return r}return e}function ev(e,t){return e.data=zd(e.data,t),delete e.attachments,e}function zd(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]=zd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zd(e[n],t));return e}const tv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(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"})(nt||(nt={}));class nv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Ku(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.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=ZS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class jd extends Ht{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===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new rv(n)):super.emitReserved("decoded",n)}else if(Hd(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(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!iv(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(jd.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 nt.CONNECT:return M0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||M0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&tv.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rv{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=ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const iv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const ov=Object.freeze(Object.defineProperty({__proto__:null,Decoder:jd,Encoder:nv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function gr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class F0 extends Ht{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=[gr(t,"open",this.onopen.bind(this)),gr(t,"packet",this.onpacket.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(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(sv.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:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(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&&!l||(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 l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},o),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,l)=>u?o(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((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:nt.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 nt.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 nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.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:nt.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:nt.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 Yo(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}Yo.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},Yo.prototype.reset=function(){this.attempts=0},Yo.prototype.setMin=function(e){this.ms=e},Yo.prototype.setMax=function(e){this.max=e},Yo.prototype.setJitter=function(e){this.jitter=e};class $d extends Ht{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,Gu(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 Yo({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||ov;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 WS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=gr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=gr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);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(gr(t,"ping",this.onping.bind(this)),gr(t,"data",this.ondata.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(t,"close",this.onclose.bind(this)),gr(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){Wu(()=>{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 F0(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 ra={};function Ju(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=GS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new $d(r,t):(ra[o]||(ra[o]=new $d(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ju,{Manager:$d,Socket:F0,io:Ju,connect:Ju});var av=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===uv})(t)})(e)},uv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function lv(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function B0(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 U0(e,t){try{return t in e}catch(n){return!1}}function cv(e,t,n){var r={};return n.isMergeableObject(e)&&B0(e).forEach((function(o){r[o]=ia(e[o],n)})),B0(t).forEach((function(o){(function(a,u){return U0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(U0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Wo;var l=u.customMerge(a);return typeof l=="function"?l:Wo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Wo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||lv,n.isMergeableObject=n.isMergeableObject||av,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):cv(e,t,n):ia(t,n)}Wo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Wo(n,r,t)}),{})};var dv=Wo;let fv=class{constructor(t){Object.assign(this,t)}};function kn(e){if(e)return(function(t){for(var n in kn.prototype)t[n]=kn.prototype[n];return t})(e)}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.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},kn.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},kn.prototype.emitReserved=kn.prototype.emit,kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const hv=typeof ArrayBuffer=="function",H0=Object.prototype.toString,pv=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",mv=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function Vd(e){return hv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||pv&&e instanceof Blob||mv&&e instanceof File}function Zu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Zu(e[n]))return!0;return!1}if(Vd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Zu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Zu(e[n]))return!0;return!1}function gv(e){const t=[],n=e.data,r=e;return r.data=qd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function qd(e,t){if(!e)return e;if(Vd(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]=qd(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]=qd(e[r],t));return n}return e}function Ev(e,t){return e.data=Yd(e.data,t),delete e.attachments,e}function Yd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Yd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Yd(e[n],t));return e}const yv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Nt;(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"})(Nt||(Nt={}));class bv{constructor(t){this.replacer=t}encode(t){return t.type!==Nt.EVENT&&t.type!==Nt.ACK||!Zu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Nt.EVENT?Nt.BINARY_EVENT:Nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Nt.BINARY_EVENT&&t.type!==Nt.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=gv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Wd extends kn{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===Nt.BINARY_EVENT;r||n.type===Nt.BINARY_ACK?(n.type=r?Nt.EVENT:Nt.ACK,this.reconstructor=new Tv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Vd(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(Nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Nt.BINARY_EVENT||r.type===Nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!wv(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const 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(!Wd.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 Nt.CONNECT:return z0(n);case Nt.DISCONNECT:return n===void 0;case Nt.CONNECT_ERROR:return typeof n=="string"||z0(n);case Nt.EVENT:case Nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yv.indexOf(n[0])===-1);case Nt.ACK:case Nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Tv{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=Ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const j0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],$0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([l,d])=>{const f=[...a,t(l)];return[e(l),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((l=>l[1])):Object.fromEntries(u)},V0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),_v=$0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),j0),q0=$0(V0,V0,j0),xv={Encoder:class extends bv{encode(e){var t,n;return super.encode(me(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_v(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 Wd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?q0(r):r)):n instanceof Object?q0(n):n)):t))}}},Sv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class vv{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:l={}}){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=[Sv,l,{parser:xv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Ju(d,dv.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*$u(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 Pd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new Jr(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new Jr(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new Jr(p==null?void 0:p())}})})((({emit:u,cancel:l})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&l(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,l)=>this.socket.emit(t,n,(d=>{d.name==="error"?l(new fv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const Y0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),W0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var D=mr();const eo=Qe(D);var G0=Symbol.for("immer-nothing"),X0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function ir(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Go=Object.getPrototypeOf;function Xo(e){return!!e&&!!e[at]}function Zr(e){var t;return e?K0(e)||Array.isArray(e)||!!e[X0]||!!((t=e.constructor)!=null&&t[X0])||sa(e)||tl(e):!1}var Av=Object.prototype.constructor.toString();function K0(e){if(!e||typeof e!="object")return!1;const t=Go(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)===Av}function oa(e,t){el(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function el(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:sa(e)?2:tl(e)?3:0}function Gd(e,t){return el(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Q0(e,t,n){const r=el(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Cv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sa(e){return e instanceof Map}function tl(e){return e instanceof Set}function Jt(e){return e.copy_||e.base_}function Xd(e,t){if(sa(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=K0(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],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Go(e),r)}else{const r=Go(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function Kd(e,t=!1){return rl(e)||Xo(e)||!Zr(e)||(el(e)>1&&Object.defineProperties(e,{set:{value:nl},add:{value:nl},clear:{value:nl},delete:{value:nl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Kd(n,!0))),e}function nl(){ir(2)}function rl(e){return Object.isFrozen(e)}var Qd={};function to(e){const t=Qd[e];return t||ir(0,e),t}function kv(e,t){Qd[e]||(Qd[e]=t)}var aa;function il(){return aa}function Nv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function J0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jd(e){Zd(e),e.drafts_.forEach(Pv),e.drafts_=null}function Zd(e){e===aa&&(aa=e.parent_)}function Z0(e){return aa=Nv(aa,e)}function Pv(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function eg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Jd(t),ir(4)),Zr(e)&&(e=ol(t,e),t.parent_||sl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=ol(t,n,[]),Jd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==G0?e:void 0}function ol(e,t,n){if(rl(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>tg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return sl(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),oa(a,(l,d)=>tg(e,r,o,l,d,n,u)),sl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tg(e,t,n,r,o,a,u){if(Xo(o)){const l=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=ol(e,o,l);if(Q0(n,r,d),Xo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!rl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ol(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(sa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sl(e,o)}}function sl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Kd(t,n)}function Ov(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:il(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=ef;n&&(o=[r],a=ua);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var ef={get(e,t){if(t===at)return e;const n=Jt(e);if(!Gd(n,t))return Iv(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===tf(e.base_,t)?(nf(e),e.copy_[t]=la(r,e)):r},has(e,t){return t in Jt(e)},ownKeys(e){return Reflect.ownKeys(Jt(e))},set(e,t,n){const r=ng(Jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=tf(Jt(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(Cv(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;nf(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 tf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ir(11)},getPrototypeOf(e){return Go(e.base_)},setPrototypeOf(){ir(12)}},ua={};oa(ef,(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 ef.set.call(this,e[0],t,n,e[0])};function tf(e,t){const n=e[at];return(n?Jt(n):e)[t]}function Iv(e,t,n){var o;const r=ng(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ng(e,t){if(!(t in e))return;let n=Go(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Go(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function nf(e){e.copy_||(e.copy_=Xd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rv=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"&&ir(6),r!==void 0&&typeof r!="function"&&ir(7);let o;if(Zr(t)){const a=Z0(this),u=la(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?Jd(a):Zd(a)}return J0(a,r),eg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===G0&&(o=void 0),this.autoFreeze_&&Kd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else ir(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,o;return[this.produce(t,n,(u,l)=>{r=u,o=l}),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)||ir(8),Xo(e)&&(e=Lv(e));const t=Z0(this),n=la(e,void 0);return n[at].isManual_=!0,Zd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&ir(9);const{scope_:r}=n;return J0(r,t),eg(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 Xo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function la(e,t){const n=sa(e)?to("MapSet").proxyMap_(e,t):tl(e)?to("MapSet").proxySet_(e,t):Ov(e,t);return(t?t.scope_:il()).drafts_.push(n),n}function Lv(e){return Xo(e)||ir(10,e),rg(e)}function rg(e){if(!Zr(e)||rl(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Xd(e,!0);return oa(n,(r,o)=>{Q0(n,r,rg(o))}),t&&(t.finalized_=!1),n}function Dv(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Jt(this[at]).size}has(d){return Jt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Jt(p).has(d)||Jt(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[at];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[at];u(d),Jt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Jt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Jt(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 Jt(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(l,d){return new e(l,d)}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Jt(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),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];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[at];u(d),Jt(d).size&&(a(d),ei(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(l,d){return new r(l,d)}function a(l){l.copy_||(l.copy_=new Set,l.base_.forEach(d=>{if(Zr(d)){const f=la(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&ir(3,JSON.stringify(Jt(l)))}kv("MapSet",{proxyMap_:t,proxySet_:o})}var Mv=new Rv,Fv=Mv.produce;function ig(e,t,n){var r=D.useMemo(function(){return Fv(e)},[e]);return D.useReducer(r,t,n)}const og={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"},Et={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}},sg=["ask_cim","search","browse","pdp"],Bv=e=>sg.includes(e),ag={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(ag));const Uv=new Map(Object.entries(ag).map(([e,t])=>[t,e])),Hv=e=>{var t;return(t=Uv.get(e))!=null?t:null},Ko="cimulate",rf=`${Ko}:pdp-update`,of=`${Ko}:browse-update`,sf=`${Ko}:search-update`,af=`${Ko}:ui-state-update`,uf=`${Ko}:prompts-state-update`,lf=`${Ko}:session-state`,Ir=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},og),zv={"browse-context":Ir.CONTEXT_UPDATED,categoryId:Ir.CATEGORY_ID_CHANGED,categoryName:Ir.CATEGORY_NAME_CHANGED,page:Ir.PAGE_CHANGED,pageSize:Ir.PAGE_SIZE_CHANGED,includeFacets:Ir.FACET_FILTERS_CHANGED,facetFilters:Ir.FACET_FILTERS_CHANGED,rangeFilters:Ir.RANGE_FILTERS_CHANGED,catalogSegment:Ir.CATALOG_SEGMENT_CHANGED,pricebooks:Ir.PRICEBOOKS_CHANGED},ti=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},og),jv={"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},z="cim-widget",rt=`--${z}`,wi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},$v=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||wi.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||wi.secondaryColor,[`${rt}-font-color`]:e.fontColor||wi.fontColor,[`${rt}-font-family`]:e.fontFamily||wi.fontFamily,[`${rt}-background-color`]:e.backgroundColor||wi.backgroundColor,[`${rt}-border-color`]:e.borderColor||wi.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||wi.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||wi.borderRadius)}),ug={primary:"#3182ce",secondary:"#2c5282",text:"#1a202c",fontFamily:"inherit",surface:"#ffffff",border:"#dddddd",inputBorder:"#767676",canvas:`var(${rt}-background-color)`,muted:"#5c5c5c",subtle:"#f7f7f7",outline:"#a3a3a3",foreground:"#181818",onPrimary:"#ffffff",focus:`var(${rt}-primary-color)`,variantSelection:"#e5e5e5",variantSelectionHover:"#d9d9d9",variantSelectionText:"#141415",variantSelectionBorder:"#c5c5c5",variantSelectionHoverBorder:"#b8b8b8",loaderStart:"#4f7fce",loaderEnd:"#c85d94",sendIdleBackground:`var(${rt}-send-background)`,sendIdleForeground:`var(${rt}-on-primary)`,sendBackground:`var(${rt}-primary-color)`,sendHoverBackground:`var(${rt}-secondary-color)`,productFontFamily:`var(${rt}-font-family, inherit)`,cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem",transcriptPadding:"1rem",mobileTranscriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem",cardShadow:"none",headerShadow:"none",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050",launcherAnimation:"none",headerBackground:"transparent",headerText:"inherit",headerFontSize:"1.25rem",headerFontWeight:"bold",headerFontFamily:"inherit"},al={legacy:{traits:{density:"compact",shape:"sharp",elevation:"flat"},tokens:{},variants:{transcript:"grouped",connecting:"pulse",quantity:"input",carousel:"chevron",logoFallback:"none",userMessageIcon:"visible"}},commerce:{traits:{density:"comfortable",shape:"round",elevation:"raised"},tokens:{launcherAnimation:"cim-widget-fab-pulse 2s infinite ease-in-out",primary:"#3a3a3a",secondary:"#2d2d2d",text:"#3e3e3c",border:"#e8e8e8",subtle:"#f5f5f5",variantSelection:"#e87524",variantSelectionHover:"#d96616",variantSelectionText:"#181818",variantSelectionBorder:"#e87524",variantSelectionHoverBorder:"#d96616",loaderStart:`var(${rt}-primary-color)`,loaderEnd:`var(${rt}-primary-color)`,sendIdleBackground:"#e8e8e8",sendIdleForeground:"#767676",canvas:"#fcfcfc",sendBackground:"#111111",sendHoverBackground:"#333333",productFontFamily:`"Source Sans Pro", var(${rt}-font-family, sans-serif)`,headerBackground:`var(${rt}-background-color)`,headerText:`var(${rt}-font-color)`,headerFontSize:"1rem",headerFontWeight:"400"},variants:{transcript:"unified-card",connecting:"sparkles",quantity:"stepper",carousel:"circle-arrow",logoFallback:"sparkle",userMessageIcon:"hidden"}}},Vv=Object.freeze({legacy:Object.freeze(B({preset:"legacy"},al.legacy.traits)),commerce:Object.freeze(B({preset:"commerce"},al.commerce.traits))}),lg={compact:{transcriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem"},comfortable:{transcriptPadding:"1.25rem",cardPadding:"1.25rem",transcriptGap:"1rem",carouselGap:"12px",headerHeight:"3.875rem",controlSize:"2.75rem"}},cg={sharp:{cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem"},soft:{cardRadius:"0.5rem",controlRadius:"0.375rem",composerRadius:"0.5rem",chipRadius:"0.5rem",mediaRadius:"0.375rem"},round:{cardRadius:"0.75rem",controlRadius:"0.75rem",composerRadius:"999px",chipRadius:"999px",mediaRadius:"0.75rem"}},dg={flat:{cardShadow:"none",headerShadow:"none",launcherShadow:"none",launcherAnimation:"none"},raised:{cardShadow:"0 1px 2px #0000000d",headerShadow:"0 1px 1px -1px #17171b08, 0 14px 30px -20px #17171b1a",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050"}},fg={primaryColor:"primary",secondaryColor:"secondary",fontColor:"text",fontFamily:"fontFamily",backgroundColor:"surface",borderColor:"border",inputBorderColor:"inputBorder",borderRadius:"cardRadius"},hg={primary:"primary-color",secondary:"secondary-color",text:"font-color",surface:"background-color",border:"border-color",inputBorder:"input-border-color",cardRadius:"border-radius",headerBackground:"header-background-color",headerText:"header-text-color",headerFontSize:"header-text-font-size",headerFontWeight:"header-text-font-weight",headerFontFamily:"header-text-font-family"},_i=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ln=e=>e===0||typeof e=="string"&&e.trim().length>0,ro=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pg=e=>{var T,y;const t=_i(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(ro(t,"tokens")||["density","shape","elevation"].some(w=>ro(t,w)&&t[w]!==al[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?$v(t):void 0,l=al[r],d=B({},l.traits);typeof t.density=="string"&&ro(lg,t.density)&&(d.density=t.density),typeof t.shape=="string"&&ro(cg,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&ro(dg,t.elevation)&&(d.elevation=t.elevation);const f=B(B(B(B(B({},ug),l.tokens),lg[d.density]),cg[d.shape]),dg[d.elevation]);if(_i(t.tokens))for(const w of Object.keys(ug)){const v=t.tokens[w];ro(t.tokens,w)&&Ln(v)&&(f[w]=String(v))}_i(t.tokens)&&Ln(t.tokens.fontFamily)&&!Ln(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),_i(t.tokens)&&Ln(t.tokens.launcherShadow)&&!Ln(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),_i(t.tokens)&&Ln(t.tokens.transcriptPadding)&&!Ln(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),_i(t.tokens)&&Ln(t.tokens.text)&&!Ln(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=_i(t.tokens)?t.tokens.inputBorder:void 0;!Ln(p)&&_i(t.tokens)&&Ln(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,v]of Object.entries(fg)){const N=t[w];ro(t,w)&&Ln(N)&&(f[v]=String(N),w==="borderColor"&&!Ln(t.inputBorderColor)&&!Ln(p)&&(f.inputBorder=String(N)),w==="fontFamily"&&(f.productFontFamily=String(N)),w==="fontColor"&&(f.foreground=String(N)),w==="borderRadius"&&(f.controlRadius=f.composerRadius=f.chipRadius=f.mediaRadius=String(N)))}if(u)for(const w of Object.values(fg)){const v=(T=hg[w])!=null?T:w.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);f[w]=u[`${rt}-${v}`]}const m={};for(const[w,v]of Object.entries(f)){const N=(y=hg[w])!=null?y:w.replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`);m[`${rt}-${N}`]=v}return{preset:r,compatibility:a,traits:d,tokens:f,cssVariables:u!=null?u:m,variants:B({},l.variants),transcriptClassName:a==="legacy"?"":`${z}-transcript-${l.variants.transcript}`}},ni={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},mg=D.createContext(null),gg=D.createContext(null),yt={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"},Eg={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};function yg(e,t){return function(){return e.apply(t,arguments)}}const{toString:qv}=Object.prototype,{getPrototypeOf:xi}=Object,{iterator:ca,toStringTag:bg}=Symbol,da=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tg=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),wg=(e,t,n)=>e===Object.prototype||!n&&t===null,Yv=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Tg(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},fa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=xi(n);if(wg(n,o,n===e))return!1;if(da(n,t))return!0;n=o}return!1},Wv=(e,t)=>e!=null&&fa(e,t)?e[t]:void 0,Gv=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=xi(e);if(t===null&&Yv(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let a=e;for(;a!=null&&o.indexOf(a)===-1;){o.push(a);const u=a===e?t:xi(a);if(wg(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)Tg(d)||da(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},cf=(e=>t=>{const n=qv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>cf(t)===e),ul=e=>t=>typeof t===e,{isArray:io}=Array,oo=ul("undefined");function Qo(e){return e!==null&&!oo(e)&&e.constructor!==null&&!oo(e.constructor)&&Dn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _g=or("ArrayBuffer");function Xv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_g(e.buffer),t}const Kv=ul("string"),Dn=ul("function"),xg=ul("number"),Jo=e=>e!==null&&typeof e=="object",Qv=e=>e===!0||e===!1,ll=e=>{if(!Jo(e))return!1;const t=xi(e);return(t===null||t===Object.prototype||xi(t)===null)&&!fa(e,bg)&&!fa(e,ca)},Jv=e=>{if(!Jo(e)||Qo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},Zv=or("Date"),eA=or("File"),tA=e=>!!(e&&typeof e.uri!="undefined"),nA=e=>e&&typeof e.getParts!="undefined",rA=or("Blob"),iA=or("FileList"),oA=or("Set"),sA=e=>Jo(e)&&Dn(e.pipe);function aA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Sg=aA(),vg=typeof Sg.FormData!="undefined"?Sg.FormData:void 0,uA=e=>{if(!e)return!1;if(vg&&e instanceof vg)return!0;const t=xi(e);if(!t||t===Object.prototype||!Dn(e.append))return!1;const n=cf(e);return n==="formdata"||n==="object"&&Dn(e.toString)&&e.toString()==="[object FormData]"},lA=or("URLSearchParams"),[cA,dA,fA,hA]=["ReadableStream","Request","Response","Headers"].map(or),pA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ha(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Qo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function Ag(e,t){if(Qo(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 so=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Cg=e=>!oo(e)&&e!==so;function df(...e){const{caseless:t,skipUndefined:n}=Cg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&Ag(r,u)||u,d=da(r,l)?r[l]:void 0;ll(d)&&ll(a)?r[l]=df(d,a):ll(a)?r[l]=df({},a):io(a)?r[l]=a.slice():(!n||!oo(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Qo(l)||(ha(l,o),typeof l!="object"||io(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];AA.call(l,p)&&o(l[p],p)}}return r}const mA=(e,t,n,{allOwnKeys:r}={})=>(ha(t,(o,a)=>{n&&Dn(o)?Object.defineProperty(e,a,{__proto__:null,value:yg(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),gA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EA=(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)},yA=(e,t,n,r)=>{let o,a,u;const l={};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))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&xi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bA=(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},TA=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!xg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&xi(Uint8Array)),_A=(e,t)=>{const r=(e&&e[ca]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SA=or("HTMLFormElement"),vA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:AA}=Object.prototype,CA=or("RegExp"),kg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ha(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},kA=e=>{kg(e,(t,n)=>{if(Dn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Dn(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+"'")})}})},NA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return io(e)?r(e):r(String(e).split(t)),n},PA=()=>{},OA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function IA(e){return!!(e&&Dn(e.append)&&e[bg]==="FormData"&&e[ca])}const RA=e=>{const t=new WeakSet,n=r=>{if(Jo(r)){if(t.has(r))return;if(Qo(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(oA(r)){o=[];for(const a of r){const u=n(a);!oo(u)&&o.push(u)}}else o=io(r)?[]:{},ha(r,(a,u)=>{const l=n(a);!oo(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},LA=or("AsyncFunction"),DA=e=>e&&(Jo(e)||Dn(e))&&Dn(e.then)&&Dn(e.catch),Ng=((e,t)=>e?setImmediate:t?((n,r)=>(so.addEventListener("message",({source:o,data:a})=>{o===so&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),so.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Dn(so.postMessage)),MA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(so):typeof process!="undefined"&&process.nextTick||Ng,Pg=e=>e!=null&&Dn(e[ca]),j={isArray:io,isArrayBuffer:_g,isBuffer:Qo,isFormData:uA,isArrayBufferView:Xv,isString:Kv,isNumber:xg,isBoolean:Qv,isObject:Jo,isPlainObject:ll,isEmptyObject:Jv,isReadableStream:cA,isRequest:dA,isResponse:fA,isHeaders:hA,isUndefined:oo,isDate:Zv,isFile:eA,isReactNativeBlob:tA,isReactNative:nA,isBlob:rA,isRegExp:CA,isFunction:Dn,isStream:sA,isURLSearchParams:lA,isTypedArray:wA,isFileList:iA,forEach:ha,merge:df,extend:mA,trim:pA,stripBOM:gA,inherits:EA,toFlatObject:yA,kindOf:cf,kindOfTest:or,endsWith:bA,toArray:TA,forEachEntry:_A,matchAll:xA,isHTMLForm:SA,hasOwnProperty:da,hasOwnProp:da,hasOwnInPrototypeChain:fa,getSafeProp:Wv,toSafeFlatObject:Gv,reduceDescriptors:kg,freezeMethods:kA,toObjectSet:NA,toCamelCase:vA,noop:PA,toFiniteNumber:OA,findKey:Ag,global:so,isContextDefined:Cg,isSpecCompliantForm:IA,toJSONObject:RA,isAsyncFn:LA,isThenable:DA,setImmediate:Ng,asap:MA,isIterable:Pg,isSafeIterable:e=>e!=null&&fa(e,ca)&&Pg(e)},FA=j.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"]),BA=e=>{const t={};let n,r,o;return e&&e.split(`
3
3
  `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=j.hasOwnProp(t,n);!n||l&&j.hasOwnProp(FA,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function UA(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 HA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),zA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function ff(e,t){return j.isArray(e)?e.map(n=>ff(n,t)):UA(String(e).replace(t,""))}const jA=e=>ff(e,HA),$A=e=>ff(e,zA);function Og(e){const t=Object.create(null);return j.forEach(e.toJSON(),(n,r)=>{t[r]=$A(n)}),t}const Ig=Symbol("internals");function pa(e){return e&&String(e).trim().toLowerCase()}function cl(e){return e===!1||e==null?e:j.isArray(e)?e.map(cl):jA(String(e))}function VA(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 qA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function hf(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)}function YA(e){const t=e.length-1;if(t<1||e.charCodeAt(0)!==34||e.charCodeAt(t)!==34)return e;let n="";for(let r=1;r<t;r++){const o=e.charCodeAt(r);if(o===34||o===92&&(r+=1,r>=t))return e;n+=e[r]}return n}function WA(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=hf(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=hf(d.slice(0,f));if(!qA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=hf(d.slice(f+1));t[m]=YA(T)}for(let l=0;l<n.length;l++){const d=n.charCodeAt(l);o?a?a=!1:d===92?a=!0:d===34&&(o=!1):d===34?o=!0:(d===44||d===59)&&(u(l),r=l+1)}return u(n.length),t}const GA=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function pf(e,t,n,r,o){if(j.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!j.isString(t)){if(j.isString(r))return t.indexOf(r)!==-1;if(j.isRegExp(r))return r.test(t)}}function XA(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function KA(e,t){const n=j.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 gn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,d,f){const p=pa(d);if(!p)return;const m=j.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=cl(l))}const u=(l,d)=>j.forEach(l,(f,p)=>a(f,p,d));if(j.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(j.isString(t)&&(t=t.trim())&&!GA(t))u(BA(t),n);else if(j.isObject(t)&&j.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!j.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],j.hasOwnProp(l,f)?(d=l[f],l[f]=j.isArray(d)?[...d,p[1]]:[d,p[1]]):l[f]=p[1]}u(l,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=pa(t),t){const r=j.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return VA(o);if(j.isFunction(n))return n.call(this,o,r);if(j.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=pa(t),t){const r=j.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||pf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=pa(u),u){const l=j.findKey(r,u);l&&(!n||pf(r,r[l],l,n))&&(delete r[l],o=!0)}}return j.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||pf(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return j.forEach(this,(o,a)=>{const u=j.findKey(r,a);if(u){n[u]=cl(o),delete n[a];return}const l=t?XA(a):String(a).trim();l!==a&&delete n[a],n[l]=cl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return j.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&j.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(){const t=this.get("set-cookie");return j.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return WA(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ig]=this[Ig]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=pa(u);r[l]||(KA(o,u),r[l]=!0)}return j.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(gn);const dl="[REDACTED ****]";function QA(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function JA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||j.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(j.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);j.isUndefined(f)||(u[d]=f)});else{if(!j.isPlainObject(a)&&QA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?dl:o(d);j.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function Rg(e){try{return String(e)}catch(t){return""}}function ZA(e){return e.errors.map(n=>{try{return n&&n.message?Rg(n.message):Rg(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Te=class dS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&j.isArray(t.errors)&&t.errors.length&&(l=ZA(t));const d=new dS(l,n||t.code,r,o,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}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&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?JA(t,n):j.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}}};Te.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Te.ERR_BAD_OPTION="ERR_BAD_OPTION",Te.ECONNABORTED="ECONNABORTED",Te.ETIMEDOUT="ETIMEDOUT",Te.ECONNREFUSED="ECONNREFUSED",Te.ERR_NETWORK="ERR_NETWORK",Te.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Te.ERR_DEPRECATED="ERR_DEPRECATED",Te.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Te.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Te.ERR_CANCELED="ERR_CANCELED",Te.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Te.ERR_INVALID_URL="ERR_INVALID_URL",Te.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const eC=null,Lg=100;function mf(e){return j.isPlainObject(e)||j.isArray(e)}function Dg(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Dg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function tC(e){return j.isArray(e)&&!e.some(mf)}const nC=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function fl(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(A,C)=>{const U=j.getSafeProp(n,A);return j.isUndefined(U)?C:U},o=r("metaTokens",!0),a=r("visitor")||v,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",Lg),p=d&&j.isSpecCompliantForm(t),m=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function T(A){if(A===null)return"";if(j.isDate(A))return A.toISOString();if(j.isBoolean(A))return A.toString();if(!p&&j.isBlob(A))throw new Te("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(A)||j.isTypedArray(A)){if(p&&typeof d=="function")return new d([A]);throw new Te("Blob is not supported. Use a Buffer instead.",Te.ERR_NOT_SUPPORT)}return A}function y(A){if(A>f)throw new Te("Object is too deeply nested ("+A+" levels). Max depth: "+f,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(A,C){if(f===1/0)return JSON.stringify(A);const U=[];return JSON.stringify(A,function(R,V){if(!j.isObject(V))return V;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push(V),y(C+U.length-1),V})}function v(A,C,U){let Y=A;if(j.isReactNative(t)&&j.isReactNativeBlob(A))return t.append(gf(U,C,u),T(A)),!1;if(A&&!U&&typeof A=="object"){if(j.endsWith(C,"{}"))C=o?C:C.slice(0,-2),A=w(A,1);else if(j.isArray(A)&&tC(A)||(j.isFileList(A)||j.endsWith(C,"[]"))&&(Y=j.toArray(A)))return C=Dg(C),Y.forEach(function(V,ne){!(j.isUndefined(V)||V===null)&&t.append(l===!0?gf([C],ne,u):l===null?C:C+"[]",T(V))}),!1}return mf(A)?!0:(t.append(gf(U,C,u),T(A)),!1)}const N=Object.assign(nC,{defaultVisitor:v,convertValue:T,isVisitable:mf});function x(A,C,U=0){if(!j.isUndefined(A)){if(y(U),m.indexOf(A)!==-1)throw new Error("Circular reference detected in "+C.join("."));m.push(A),j.forEach(A,function(R,V){(!(j.isUndefined(R)||R===null)&&a.call(t,R,j.isString(V)?V.trim():V,C,N))===!0&&x(R,C?C.concat(V):[V],U+1)}),m.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return x(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 Ef(e,t){this._pairs=[],e&&fl(e,this,t)}const Fg=Ef.prototype;Fg.append=function(t,n){this._pairs.push([t,n])},Fg.toString=function(t){const n=t?r=>t.call(this,r,Mg):Mg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rC(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;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,o=j.getSafeProp(r,"encode")||rC,a=j.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=j.isURLSearchParams(t)?t.toString():new Ef(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const ma=Symbol("internals");function Ug(e){return e?e.length:0}function Hg(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ga(e,t){const n=e.handlers,r=Ug(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class zg{constructor(){this.handlers=[],this[ma]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const o={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[ma];this.handlers==null&&(this.handlers=[]),ga(this,a);const u=a.nextId++;return this.handlers.push(o),a.handlerEntries.set(u,{handler:o,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[ma];ga(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(Hg(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ga(this,this[ma]))}forEach(t){const n=this[ma];ga(this,n),n.iterationDepth++;try{j.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(ga(this,n),Hg(this.handlers),n.handlersLength=Ug(this.handlers))}}}const yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},iC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ef,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",Tf=typeof navigator=="object"&&navigator||void 0,oC=bf&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),sC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aC=bf&&window.location.href||"http://localhost",Zt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:oC,hasStandardBrowserWebWorkerEnv:sC,navigator:Tf,origin:aC},Symbol.toStringTag,{value:"Module"}))),iC);function uC(e,t){return fl(e,new Zt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Zt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const jg=Lg;function $g(e){if(e>jg)throw new Te("FormData field is too deeply nested ("+e+" levels). Max depth: "+jg,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function lC(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)$g(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function cC(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 Vg(e){function t(n,r,o,a){$g(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&j.isArray(o)?o.length:u,d?(j.hasOwnProp(o,u)?o[u]=j.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!j.hasOwnProp(o,u)||!j.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&j.isArray(o[u])&&(o[u]=cC(o[u])),!l)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(lC(r),o,n,0)}),n}return null}const qg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Zo=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function dC(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ea={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=j.isObject(t);if(a&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Vg(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Zo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return uC(t,d).toString();if((l=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Zo(this,"env"),p=f&&f.FormData;return fl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),dC(t)):t}],transformResponse:[function(t){const n=Zo(this,"transitional")||Ea.transitional,r=n&&n.forcedJSONParsing,o=Zo(this,"responseType"),a=o==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Zo(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Te.from(d,Te.ERR_BAD_RESPONSE,this,null,Zo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(qg,e=>{Ea.headers[e]={}});function wf(e,t){const n=this||Ea,r=t||n,o=gn.from(r.headers);let a=r.data;return j.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Yg(e){return!!(e&&e.__CANCEL__)}let ya=class extends Te{constructor(t,n,r){super(t==null?"canceled":t,Te.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Wg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Te("Request failed with status code "+n.status,n.status>=400&&n.status<500?Te.ERR_BAD_REQUEST:Te.ERR_BAD_RESPONSE,n.config,n.request,n))}const fC=/[\t\n\r]/g;function Gg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(fC,"")}function _f(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function hC(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 pC(e,t){let n=0,r=1e3/t,o,a;const u=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},r-T)))},()=>o&&u(o),(...p)=>u(p)]}const hl=(e,t,n=3)=>{let r=0;const o=hC(50,250);return pC(a=>{if(!a||!j.isNumber(a.loaded))return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=Math.max(0,l!=null?Math.min(u,l):u),f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Xg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kg=(e,t=j.asap)=>(...n)=>t(()=>e(...n)),mC=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,gC=Zt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&l.push(`path=${r}`),j.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),j.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function EC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const bC=/^https?:(?!\/\/)/i;function TC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${dl}`)}function wC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${dl}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${dl}`);return n===-1?o:`${o}#${TC(t.slice(n+1))}`}function Qg(e,t){if(typeof e=="string"){const n=Gg(e);if(bC.test(n))throw new Te(`Invalid URL ${JSON.stringify(wC(n))}: missing "//" after protocol`,Te.ERR_INVALID_URL,t)}}function Jg(e,t,n,r){Qg(t,r);let o=!EC(t);return e&&(o||n===!1)?(Qg(e,r),yC(e,t)):t}const Zg=e=>e instanceof gn?B({},e):e,_C=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ao(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return j.isPlainObject(p)&&j.isPlainObject(m)?j.merge.call({caseless:y},p,m):j.isPlainObject(m)?j.merge({},m):j.isArray(m)?m.slice():m}function o(p,m,T,y){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!j.isUndefined(m))return r(void 0,m)}function u(p,m){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(m))if(j.isPlainObject(m)){if(j.hasOwnProp(m,p))return m[p]}else return;const T=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(T)&&j.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(j.hasOwnProp(t,T))return r(p,m);if(j.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutErrorMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>o(Zg(p),Zg(m),T,!0)};return j.forEach(_C(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=j.hasOwnProp(f,m)?f[m]:o,y=j.hasOwnProp(e,m)?e[m]:void 0,w=j.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);j.isUndefined(v)&&T!==d||(n[m]=v)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const xC=["content-type","content-length"];function SC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{xC.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)));function e1(e){const t=ao({},e),n=T=>j.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=gn.from(l),t.url=Bg(Jg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=j.getSafeProp(d,"username")||"",y=j.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?vC(y):"")))}catch(w){throw Te.from(w,Te.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)){const T=j.getSafeProp(r,"getHeaders");Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?l.setContentType(void 0):j.isFunction(T)&&SC(l,T.call(r),n("formDataHeaderPolicy"))}if(Zt.hasStandardBrowserEnv&&(j.isFunction(o)&&(o=o(t)),o===!0||o==null&&mC(t.url))){const y=a&&u&&gC.read(u);y&&l.set(a,y)}return t}const AC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=e1(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function N(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function A(U){if(!x)return;if(x.status===0&&(_f(Gg(o.url))||_f(Zt.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null;return}try{U?v&&v(U):w&&w()}catch(ne){setTimeout(()=>{throw ne})}if(!x)return;const Y=gn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),V={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:Y,config:e,request:x};Wg(function(fe){n(fe),N()},function(fe){r(fe),N()},V),x=null}"onloadend"in x?x.onloadend=A:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(A)},x.onabort=function(){x&&(r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null)},x.onerror=function(Y){const R=Y&&Y.message?Y.message:"Network Error",V=new Te(R,Te.ERR_NETWORK,e,x);V.event=Y||null,r(V),N(),x=null},x.ontimeout=function(){let Y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||yf;o.timeoutErrorMessage&&(Y=o.timeoutErrorMessage),r(new Te(Y,R.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,x)),N(),x=null},a===void 0&&u.setContentType(null),"setRequestHeader"in x&&j.forEach(Og(u),function(Y,R){x.setRequestHeader(R,Y)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),f&&([T,w,v]=hl(f,!0),x.addEventListener("progress",T)),d&&x.upload&&([m,y]=hl(d),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=U=>{x&&(r(!U||U.type?new ya(null,e,x):U),x.abort(),N(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const C=_f(o.url);if(C&&!Zt.protocols.includes(C)){r(new Te("Unsupported protocol "+C+":",Te.ERR_BAD_REQUEST,e)),N();return}x.send(a||null)})},CC=(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 Te?f:new ya(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Te(`timeout of ${t}ms exceeded`,Te.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=>{if(!r){if(d.aborted){o.call(d);return}d.addEventListener("abort",o,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>j.asap(u),l},kC=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},NC=function(e,t){return Pd(this,null,function*(){try{for(var n=cS(PC(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*b0(kC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},PC=function(e){return Pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*b0(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())}})},t1=(e,t,n,r)=>{const o=NC(e,t);let a=0,u,l=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){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),o.return()}},{highWaterMark:2})},n1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,r1=(e,t,n)=>t+2<n&&n1(e.charCodeAt(t+1))&&n1(e.charCodeAt(t+2)),i1=e=>e<=57?e-48:(e&223)-55,OC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,IC=e=>e===9||e===10||e===12||e===13||e===32,RC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},LC=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},DC=e=>{const t=e.length;let n=0,r=0,o=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&r1(e,a,t)&&(u=i1(e.charCodeAt(a+1))*16+i1(e.charCodeAt(a+2)),a+=2),!IC(u)){if(u===61){r++;continue}if(!OC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?LC(e):RC(n)},MC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let u=0;for(let l=0,d=o.length;l<d;l++){const f=o.charCodeAt(l);if(f===37&&r1(o,l,d))u+=1,l+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&l+1<d){const p=o.charCodeAt(l+1);p>=56320&&p<=57343?(u+=4,l++):u+=3}else u+=3}return u};function FC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return MC(t===-1?e:e.slice(0,t),DC)}const xf="1.20.0",o1=64*1024,BC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:pl}=j,UC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),s1=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},a1=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},HC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},zC=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?pl(o):typeof fetch=="function",d=pl(a),f=pl(u);if(!l)return!1;const p=l&&pl(n),m=l&&(typeof r=="function"?(x=>A=>x.encode(A))(new r):x=>et(null,null,function*(){return new Uint8Array(yield new a(x).arrayBuffer())})),T=d&&p&&a1(()=>{let x=!1;const A=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return x=!0,"half"}}),C=A.headers.has("Content-Type");return A.body!=null&&A.body.cancel(),x&&!C}),y=f&&p&&a1(()=>j.isReadableStream(new u("").body)),w={stream:y&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!w[x]&&(w[x]=(A,C)=>{let U=A&&A[x];if(U)return U.call(A);throw new Te(`Response type '${x}' is not supported`,Te.ERR_NOT_SUPPORT,C)})});const v=x=>et(null,null,function*(){if(x==null)return 0;if(j.isBlob(x))return x.size;if(j.isSpecCompliantForm(x))return(yield new a(Zt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(j.isArrayBufferView(x)||j.isArrayBuffer(x))return x.byteLength;if(j.isURLSearchParams(x)&&(x=x+""),j.isString(x))return(yield m(x)).byteLength}),N=(x,A)=>et(null,null,function*(){const C=j.toFiniteNumber(x.getContentLength());return C==null?v(A):C});return x=>et(null,null,function*(){let{url:A,method:C,data:U,signal:Y,cancelToken:R,timeout:V,onDownloadProgress:ne,onUploadProgress:fe,responseType:$,headers:ie,withCredentials:ue="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:ae,maxRedirects:Ae}=e1(x);const oe=j.isNumber(re)&&re>-1,J=j.isNumber(ae)&&ae>-1,se=be=>j.hasOwnProp(x,be)?x[be]:void 0;let k=o||fetch;$=$?($+"").toLowerCase():"text";let F=CC([Y,R&&R.toAbortSignal()],V),K=null;const I=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let xe,Me=null;const ke=()=>new Te("Request body larger than maxBodyLength limit",Te.ERR_BAD_REQUEST,x,K);try{let be;const Ie=se("auth");if(Ie){const qe=j.getSafeProp(Ie,"username")||"",bt=j.getSafeProp(Ie,"password")||"";be={username:qe,password:bt}}if(HC(A)){const qe=new URL(A,Zt.origin);if(!be&&(qe.username||qe.password)){const bt=s1(qe.username),Vt=s1(qe.password);be={username:bt,password:Vt}}(qe.username||qe.password)&&(qe.username="",qe.password="",A=qe.href)}if(be&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(UC((be.username||"")+":"+(be.password||""))))),oe&&typeof A=="string"&&A.startsWith("data:")&&FC(A)>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);if(J&&C!=="get"&&C!=="head"){const qe=yield v(U);if(typeof qe=="number"&&isFinite(qe)&&(xe=qe,qe>ae))throw ke()}const Ue=J&&(j.isReadableStream(U)||j.isStream(U)),lt=(qe,bt,Vt)=>t1(qe,o1,_e=>{if(J&&_e>ae)throw Me=ke();bt&&bt(_e)},Vt);if(T&&C!=="get"&&C!=="head"&&(fe||Ue)){if(xe=xe==null?yield N(ie,U):xe,xe!==0||Ue){let qe=new a(A,{method:"POST",body:U,duplex:"half"}),bt;if(j.isFormData(U)&&(bt=qe.headers.get("content-type"))&&ie.setContentType(bt),qe.body){const[Vt,_e]=fe&&Xg(xe,hl(Kg(fe)))||[];U=lt(qe.body,Vt,_e)}}}else if(Ue&&!d&&p&&C!=="get"&&C!=="head")U=lt(U);else if(Ue&&d&&!T&&C!=="get"&&C!=="head")throw new Te("Stream request bodies are not supported by the current fetch implementation",Te.ERR_NOT_SUPPORT,x,K);j.isString(ue)||(ue=ue?"include":"omit");const cn=d&&"credentials"in a.prototype;if(j.isFormData(U)){const qe=ie.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+xf,!1);const Lt=ve==null?ve:Object.assign(Object.create(null),ve);Lt&&(delete Lt.body,delete Lt.headers,delete Lt.method,delete Lt.signal,delete Lt.duplex,delete Lt.credentials);const $t=Object.assign(Object.create(null),Lt,{signal:F,method:C.toUpperCase(),headers:Og(ie.normalize()),body:U,duplex:"half",credentials:cn?ue:void 0});d&&(j.forEach(BC,(qe,bt)=>{$t[bt]===void 0&&($t[bt]=qe)}),$t.signal===void 0&&($t.signal=null),$t.body===void 0&&($t.body=null)),Ae===0&&($t.redirect="manual",Lt&&(Lt.redirect="manual")),K=d&&new a(A,$t);let Pt=yield d?k(K,Lt):k(A,$t);const Qn=gn.from(Pt.headers);if(oe){const qe=j.toFiniteNumber(Qn.getContentLength());if(qe!=null&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}const _n=y&&($==="stream"||$==="response");if(y&&Pt.body&&(ne||oe||_n&&I)){const qe={};["status","statusText","headers"].forEach(Xe=>{qe[Xe]=Pt[Xe]});const bt=j.toFiniteNumber(Qn.getContentLength()),[Vt,_e]=ne&&Xg(bt,hl(Kg(ne),!0))||[];let Le=0;const Be=Xe=>{if(oe&&(Le=Xe,Le>re))throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);Vt&&Vt(Xe)};Pt=new u(t1(Pt.body,o1,Be,()=>{_e&&_e(),I&&I()}),qe)}$=$||"text";let Gt=yield w[j.findKey(w,$)||"text"](Pt,x);if(oe&&!y&&!_n){let qe;if(Gt!=null&&(typeof Gt.byteLength=="number"?qe=Gt.byteLength:typeof Gt.size=="number"?qe=Gt.size:typeof Gt=="string"&&(qe=typeof r=="function"?new r().encode(Gt).byteLength:Gt.length)),typeof qe=="number"&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}return!_n&&I&&I(),yield new Promise((qe,bt)=>{Wg(qe,bt,{data:Gt,headers:gn.from(Pt.headers),status:Pt.status,statusText:Pt.statusText,config:x,request:K})})}catch(be){if(I&&I(),F&&F.aborted&&F.reason instanceof Te){const Ie=F.reason;throw Ie.config=x,K&&(Ie.request=K),be!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:be,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Me)throw K&&!Me.request&&(Me.request=K),Me;if(be instanceof Te)throw K&&!be.request&&(be.request=K),be;if(be&&be.name==="TypeError"&&/Load failed|fetch/i.test(be.message)){const Ie=new Te("Network Error",Te.ERR_NETWORK,x,K,be&&be.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:be.cause||be,writable:!0,enumerable:!1,configurable:!0}),Ie}throw Te.from(be,be&&be.code,x,K,be&&be.response)}})},jC=new Map,u1=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,l=u,d,f,p=jC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:zC(t)),p=f;return f};u1();const Sf={http:eC,xhr:AC,fetch:{get:u1}};j.forEach(Sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const l1=e=>`- ${e}`,$C=e=>j.isFunction(e)||e===null||e===!1;function VC(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!$C(r)&&(o=Sf[(l=String(r)).toLowerCase()],o===void 0))throw new Te(`Unknown adapter '${l}'`);if(o&&(j.isFunction(o)||(o=o.get(t))))break;a[l||"#"+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 l=n?u.length>1?`since :
4
+ `)}getSetCookie(){const t=this.get("set-cookie");return j.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return WA(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ig]=this[Ig]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=pa(u);r[l]||(KA(o,u),r[l]=!0)}return j.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(gn);const dl="[REDACTED ****]";function QA(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function JA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||j.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(j.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);j.isUndefined(f)||(u[d]=f)});else{if(!j.isPlainObject(a)&&QA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?dl:o(d);j.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function Rg(e){try{return String(e)}catch(t){return""}}function ZA(e){return e.errors.map(n=>{try{return n&&n.message?Rg(n.message):Rg(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Te=class dS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&j.isArray(t.errors)&&t.errors.length&&(l=ZA(t));const d=new dS(l,n||t.code,r,o,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}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&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?JA(t,n):j.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}}};Te.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Te.ERR_BAD_OPTION="ERR_BAD_OPTION",Te.ECONNABORTED="ECONNABORTED",Te.ETIMEDOUT="ETIMEDOUT",Te.ECONNREFUSED="ECONNREFUSED",Te.ERR_NETWORK="ERR_NETWORK",Te.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Te.ERR_DEPRECATED="ERR_DEPRECATED",Te.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Te.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Te.ERR_CANCELED="ERR_CANCELED",Te.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Te.ERR_INVALID_URL="ERR_INVALID_URL",Te.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const eC=null,Lg=100;function mf(e){return j.isPlainObject(e)||j.isArray(e)}function Dg(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Dg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function tC(e){return j.isArray(e)&&!e.some(mf)}const nC=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function fl(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(C,A)=>{const U=j.getSafeProp(n,C);return j.isUndefined(U)?A:U},o=r("metaTokens",!0),a=r("visitor")||v,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",Lg),p=d&&j.isSpecCompliantForm(t),m=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function T(C){if(C===null)return"";if(j.isDate(C))return C.toISOString();if(j.isBoolean(C))return C.toString();if(!p&&j.isBlob(C))throw new Te("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(C)||j.isTypedArray(C)){if(p&&typeof d=="function")return new d([C]);throw new Te("Blob is not supported. Use a Buffer instead.",Te.ERR_NOT_SUPPORT)}return C}function y(C){if(C>f)throw new Te("Object is too deeply nested ("+C+" levels). Max depth: "+f,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(C,A){if(f===1/0)return JSON.stringify(C);const U=[];return JSON.stringify(C,function(R,$){if(!j.isObject($))return $;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push($),y(A+U.length-1),$})}function v(C,A,U){let Y=C;if(j.isReactNative(t)&&j.isReactNativeBlob(C))return t.append(gf(U,A,u),T(C)),!1;if(C&&!U&&typeof C=="object"){if(j.endsWith(A,"{}"))A=o?A:A.slice(0,-2),C=w(C,1);else if(j.isArray(C)&&tC(C)||(j.isFileList(C)||j.endsWith(A,"[]"))&&(Y=j.toArray(C)))return A=Dg(A),Y.forEach(function($,ne){!(j.isUndefined($)||$===null)&&t.append(l===!0?gf([A],ne,u):l===null?A:A+"[]",T($))}),!1}return mf(C)?!0:(t.append(gf(U,A,u),T(C)),!1)}const N=Object.assign(nC,{defaultVisitor:v,convertValue:T,isVisitable:mf});function x(C,A,U=0){if(!j.isUndefined(C)){if(y(U),m.indexOf(C)!==-1)throw new Error("Circular reference detected in "+A.join("."));m.push(C),j.forEach(C,function(R,$){(!(j.isUndefined(R)||R===null)&&a.call(t,R,j.isString($)?$.trim():$,A,N))===!0&&x(R,A?A.concat($):[$],U+1)}),m.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return x(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 Ef(e,t){this._pairs=[],e&&fl(e,this,t)}const Fg=Ef.prototype;Fg.append=function(t,n){this._pairs.push([t,n])},Fg.toString=function(t){const n=t?r=>t.call(this,r,Mg):Mg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rC(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;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,o=j.getSafeProp(r,"encode")||rC,a=j.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=j.isURLSearchParams(t)?t.toString():new Ef(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const ma=Symbol("internals");function Ug(e){return e?e.length:0}function Hg(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ga(e,t){const n=e.handlers,r=Ug(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class zg{constructor(){this.handlers=[],this[ma]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const o={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[ma];this.handlers==null&&(this.handlers=[]),ga(this,a);const u=a.nextId++;return this.handlers.push(o),a.handlerEntries.set(u,{handler:o,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[ma];ga(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(Hg(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ga(this,this[ma]))}forEach(t){const n=this[ma];ga(this,n),n.iterationDepth++;try{j.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(ga(this,n),Hg(this.handlers),n.handlersLength=Ug(this.handlers))}}}const yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},iC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ef,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",Tf=typeof navigator=="object"&&navigator||void 0,oC=bf&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),sC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aC=bf&&window.location.href||"http://localhost",Zt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:oC,hasStandardBrowserWebWorkerEnv:sC,navigator:Tf,origin:aC},Symbol.toStringTag,{value:"Module"}))),iC);function uC(e,t){return fl(e,new Zt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Zt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const jg=Lg;function $g(e){if(e>jg)throw new Te("FormData field is too deeply nested ("+e+" levels). Max depth: "+jg,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function lC(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)$g(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function cC(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 Vg(e){function t(n,r,o,a){$g(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&j.isArray(o)?o.length:u,d?(j.hasOwnProp(o,u)?o[u]=j.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!j.hasOwnProp(o,u)||!j.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&j.isArray(o[u])&&(o[u]=cC(o[u])),!l)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(lC(r),o,n,0)}),n}return null}const qg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Zo=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function dC(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ea={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=j.isObject(t);if(a&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Vg(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Zo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return uC(t,d).toString();if((l=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Zo(this,"env"),p=f&&f.FormData;return fl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),dC(t)):t}],transformResponse:[function(t){const n=Zo(this,"transitional")||Ea.transitional,r=n&&n.forcedJSONParsing,o=Zo(this,"responseType"),a=o==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Zo(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Te.from(d,Te.ERR_BAD_RESPONSE,this,null,Zo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(qg,e=>{Ea.headers[e]={}});function wf(e,t){const n=this||Ea,r=t||n,o=gn.from(r.headers);let a=r.data;return j.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Yg(e){return!!(e&&e.__CANCEL__)}let ya=class extends Te{constructor(t,n,r){super(t==null?"canceled":t,Te.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Wg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Te("Request failed with status code "+n.status,n.status>=400&&n.status<500?Te.ERR_BAD_REQUEST:Te.ERR_BAD_RESPONSE,n.config,n.request,n))}const fC=/[\t\n\r]/g;function Gg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(fC,"")}function _f(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function hC(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 pC(e,t){let n=0,r=1e3/t,o,a;const u=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},r-T)))},()=>o&&u(o),(...p)=>u(p)]}const hl=(e,t,n=3)=>{let r=0;const o=hC(50,250);return pC(a=>{if(!a||!j.isNumber(a.loaded))return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=Math.max(0,l!=null?Math.min(u,l):u),f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Xg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kg=(e,t=j.asap)=>(...n)=>t(()=>e(...n)),mC=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,gC=Zt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&l.push(`path=${r}`),j.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),j.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function EC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const bC=/^https?:(?!\/\/)/i;function TC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${dl}`)}function wC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${dl}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${dl}`);return n===-1?o:`${o}#${TC(t.slice(n+1))}`}function Qg(e,t){if(typeof e=="string"){const n=Gg(e);if(bC.test(n))throw new Te(`Invalid URL ${JSON.stringify(wC(n))}: missing "//" after protocol`,Te.ERR_INVALID_URL,t)}}function Jg(e,t,n,r){Qg(t,r);let o=!EC(t);return e&&(o||n===!1)?(Qg(e,r),yC(e,t)):t}const Zg=e=>e instanceof gn?B({},e):e,_C=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ao(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return j.isPlainObject(p)&&j.isPlainObject(m)?j.merge.call({caseless:y},p,m):j.isPlainObject(m)?j.merge({},m):j.isArray(m)?m.slice():m}function o(p,m,T,y){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!j.isUndefined(m))return r(void 0,m)}function u(p,m){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(m))if(j.isPlainObject(m)){if(j.hasOwnProp(m,p))return m[p]}else return;const T=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(T)&&j.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(j.hasOwnProp(t,T))return r(p,m);if(j.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutErrorMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>o(Zg(p),Zg(m),T,!0)};return j.forEach(_C(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=j.hasOwnProp(f,m)?f[m]:o,y=j.hasOwnProp(e,m)?e[m]:void 0,w=j.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);j.isUndefined(v)&&T!==d||(n[m]=v)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const xC=["content-type","content-length"];function SC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{xC.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)));function e1(e){const t=ao({},e),n=T=>j.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=gn.from(l),t.url=Bg(Jg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=j.getSafeProp(d,"username")||"",y=j.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?vC(y):"")))}catch(w){throw Te.from(w,Te.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)){const T=j.getSafeProp(r,"getHeaders");Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?l.setContentType(void 0):j.isFunction(T)&&SC(l,T.call(r),n("formDataHeaderPolicy"))}if(Zt.hasStandardBrowserEnv&&(j.isFunction(o)&&(o=o(t)),o===!0||o==null&&mC(t.url))){const y=a&&u&&gC.read(u);y&&l.set(a,y)}return t}const AC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=e1(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function N(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function C(U){if(!x)return;if(x.status===0&&(_f(Gg(o.url))||_f(Zt.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null;return}try{U?v&&v(U):w&&w()}catch(ne){setTimeout(()=>{throw ne})}if(!x)return;const Y=gn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),$={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:Y,config:e,request:x};Wg(function(de){n(de),N()},function(de){r(de),N()},$),x=null}"onloadend"in x?x.onloadend=C:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(C)},x.onabort=function(){x&&(r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null)},x.onerror=function(Y){const R=Y&&Y.message?Y.message:"Network Error",$=new Te(R,Te.ERR_NETWORK,e,x);$.event=Y||null,r($),N(),x=null},x.ontimeout=function(){let Y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||yf;o.timeoutErrorMessage&&(Y=o.timeoutErrorMessage),r(new Te(Y,R.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,x)),N(),x=null},a===void 0&&u.setContentType(null),"setRequestHeader"in x&&j.forEach(Og(u),function(Y,R){x.setRequestHeader(R,Y)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),f&&([T,w,v]=hl(f,!0),x.addEventListener("progress",T)),d&&x.upload&&([m,y]=hl(d),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=U=>{x&&(r(!U||U.type?new ya(null,e,x):U),x.abort(),N(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const A=_f(o.url);if(A&&!Zt.protocols.includes(A)){r(new Te("Unsupported protocol "+A+":",Te.ERR_BAD_REQUEST,e)),N();return}x.send(a||null)})},CC=(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 Te?f:new ya(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Te(`timeout of ${t}ms exceeded`,Te.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=>{if(!r){if(d.aborted){o.call(d);return}d.addEventListener("abort",o,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>j.asap(u),l},kC=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},NC=function(e,t){return Pd(this,null,function*(){try{for(var n=cS(PC(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*b0(kC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},PC=function(e){return Pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*b0(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())}})},t1=(e,t,n,r)=>{const o=NC(e,t);let a=0,u,l=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){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),o.return()}},{highWaterMark:2})},n1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,r1=(e,t,n)=>t+2<n&&n1(e.charCodeAt(t+1))&&n1(e.charCodeAt(t+2)),i1=e=>e<=57?e-48:(e&223)-55,OC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,IC=e=>e===9||e===10||e===12||e===13||e===32,RC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},LC=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},DC=e=>{const t=e.length;let n=0,r=0,o=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&r1(e,a,t)&&(u=i1(e.charCodeAt(a+1))*16+i1(e.charCodeAt(a+2)),a+=2),!IC(u)){if(u===61){r++;continue}if(!OC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?LC(e):RC(n)},MC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let u=0;for(let l=0,d=o.length;l<d;l++){const f=o.charCodeAt(l);if(f===37&&r1(o,l,d))u+=1,l+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&l+1<d){const p=o.charCodeAt(l+1);p>=56320&&p<=57343?(u+=4,l++):u+=3}else u+=3}return u};function FC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return MC(t===-1?e:e.slice(0,t),DC)}const xf="1.20.0",o1=64*1024,BC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:pl}=j,UC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),s1=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},a1=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},HC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},zC=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?pl(o):typeof fetch=="function",d=pl(a),f=pl(u);if(!l)return!1;const p=l&&pl(n),m=l&&(typeof r=="function"?(x=>C=>x.encode(C))(new r):x=>et(null,null,function*(){return new Uint8Array(yield new a(x).arrayBuffer())})),T=d&&p&&a1(()=>{let x=!1;const C=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return x=!0,"half"}}),A=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),x&&!A}),y=f&&p&&a1(()=>j.isReadableStream(new u("").body)),w={stream:y&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!w[x]&&(w[x]=(C,A)=>{let U=C&&C[x];if(U)return U.call(C);throw new Te(`Response type '${x}' is not supported`,Te.ERR_NOT_SUPPORT,A)})});const v=x=>et(null,null,function*(){if(x==null)return 0;if(j.isBlob(x))return x.size;if(j.isSpecCompliantForm(x))return(yield new a(Zt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(j.isArrayBufferView(x)||j.isArrayBuffer(x))return x.byteLength;if(j.isURLSearchParams(x)&&(x=x+""),j.isString(x))return(yield m(x)).byteLength}),N=(x,C)=>et(null,null,function*(){const A=j.toFiniteNumber(x.getContentLength());return A==null?v(C):A});return x=>et(null,null,function*(){let{url:C,method:A,data:U,signal:Y,cancelToken:R,timeout:$,onDownloadProgress:ne,onUploadProgress:de,responseType:V,headers:ie,withCredentials:fe="same-origin",fetchOptions:we,maxContentLength:re,maxBodyLength:oe,maxRedirects:Ae}=e1(x);const se=j.isNumber(re)&&re>-1,J=j.isNumber(oe)&&oe>-1,ae=be=>j.hasOwnProp(x,be)?x[be]:void 0;let k=o||fetch;V=V?(V+"").toLowerCase():"text";let F=CC([Y,R&&R.toAbortSignal()],$),K=null;const I=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let Se,Me=null;const ke=()=>new Te("Request body larger than maxBodyLength limit",Te.ERR_BAD_REQUEST,x,K);try{let be;const Ie=ae("auth");if(Ie){const qe=j.getSafeProp(Ie,"username")||"",bt=j.getSafeProp(Ie,"password")||"";be={username:qe,password:bt}}if(HC(C)){const qe=new URL(C,Zt.origin);if(!be&&(qe.username||qe.password)){const bt=s1(qe.username),Vt=s1(qe.password);be={username:bt,password:Vt}}(qe.username||qe.password)&&(qe.username="",qe.password="",C=qe.href)}if(be&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(UC((be.username||"")+":"+(be.password||""))))),se&&typeof C=="string"&&C.startsWith("data:")&&FC(C)>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);if(J&&A!=="get"&&A!=="head"){const qe=yield v(U);if(typeof qe=="number"&&isFinite(qe)&&(Se=qe,qe>oe))throw ke()}const Ue=J&&(j.isReadableStream(U)||j.isStream(U)),lt=(qe,bt,Vt)=>t1(qe,o1,xe=>{if(J&&xe>oe)throw Me=ke();bt&&bt(xe)},Vt);if(T&&A!=="get"&&A!=="head"&&(de||Ue)){if(Se=Se==null?yield N(ie,U):Se,Se!==0||Ue){let qe=new a(C,{method:"POST",body:U,duplex:"half"}),bt;if(j.isFormData(U)&&(bt=qe.headers.get("content-type"))&&ie.setContentType(bt),qe.body){const[Vt,xe]=de&&Xg(Se,hl(Kg(de)))||[];U=lt(qe.body,Vt,xe)}}}else if(Ue&&!d&&p&&A!=="get"&&A!=="head")U=lt(U);else if(Ue&&d&&!T&&A!=="get"&&A!=="head")throw new Te("Stream request bodies are not supported by the current fetch implementation",Te.ERR_NOT_SUPPORT,x,K);j.isString(fe)||(fe=fe?"include":"omit");const cn=d&&"credentials"in a.prototype;if(j.isFormData(U)){const qe=ie.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+xf,!1);const Lt=we==null?we:Object.assign(Object.create(null),we);Lt&&(delete Lt.body,delete Lt.headers,delete Lt.method,delete Lt.signal,delete Lt.duplex,delete Lt.credentials);const $t=Object.assign(Object.create(null),Lt,{signal:F,method:A.toUpperCase(),headers:Og(ie.normalize()),body:U,duplex:"half",credentials:cn?fe:void 0});d&&(j.forEach(BC,(qe,bt)=>{$t[bt]===void 0&&($t[bt]=qe)}),$t.signal===void 0&&($t.signal=null),$t.body===void 0&&($t.body=null)),Ae===0&&($t.redirect="manual",Lt&&(Lt.redirect="manual")),K=d&&new a(C,$t);let Pt=yield d?k(K,Lt):k(C,$t);const Qn=gn.from(Pt.headers);if(se){const qe=j.toFiniteNumber(Qn.getContentLength());if(qe!=null&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}const _n=y&&(V==="stream"||V==="response");if(y&&Pt.body&&(ne||se||_n&&I)){const qe={};["status","statusText","headers"].forEach(Xe=>{qe[Xe]=Pt[Xe]});const bt=j.toFiniteNumber(Qn.getContentLength()),[Vt,xe]=ne&&Xg(bt,hl(Kg(ne),!0))||[];let Le=0;const Be=Xe=>{if(se&&(Le=Xe,Le>re))throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);Vt&&Vt(Xe)};Pt=new u(t1(Pt.body,o1,Be,()=>{xe&&xe(),I&&I()}),qe)}V=V||"text";let Gt=yield w[j.findKey(w,V)||"text"](Pt,x);if(se&&!y&&!_n){let qe;if(Gt!=null&&(typeof Gt.byteLength=="number"?qe=Gt.byteLength:typeof Gt.size=="number"?qe=Gt.size:typeof Gt=="string"&&(qe=typeof r=="function"?new r().encode(Gt).byteLength:Gt.length)),typeof qe=="number"&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}return!_n&&I&&I(),yield new Promise((qe,bt)=>{Wg(qe,bt,{data:Gt,headers:gn.from(Pt.headers),status:Pt.status,statusText:Pt.statusText,config:x,request:K})})}catch(be){if(I&&I(),F&&F.aborted&&F.reason instanceof Te){const Ie=F.reason;throw Ie.config=x,K&&(Ie.request=K),be!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:be,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Me)throw K&&!Me.request&&(Me.request=K),Me;if(be instanceof Te)throw K&&!be.request&&(be.request=K),be;if(be&&be.name==="TypeError"&&/Load failed|fetch/i.test(be.message)){const Ie=new Te("Network Error",Te.ERR_NETWORK,x,K,be&&be.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:be.cause||be,writable:!0,enumerable:!1,configurable:!0}),Ie}throw Te.from(be,be&&be.code,x,K,be&&be.response)}})},jC=new Map,u1=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,l=u,d,f,p=jC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:zC(t)),p=f;return f};u1();const Sf={http:eC,xhr:AC,fetch:{get:u1}};j.forEach(Sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const l1=e=>`- ${e}`,$C=e=>j.isFunction(e)||e===null||e===!1;function VC(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!$C(r)&&(o=Sf[(l=String(r)).toLowerCase()],o===void 0))throw new Te(`Unknown adapter '${l}'`);if(o&&(j.isFunction(o)||(o=o.get(t))))break;a[l||"#"+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 l=n?u.length>1?`since :
5
5
  `+u.map(l1).join(`
6
6
  `):" "+l1(u[0]):"as no adapter specified";throw new Te("There is no suitable adapter to dispatch the request "+l,Te.ERR_NOT_SUPPORT)}return o}const c1={getAdapter:VC,adapters:Sf};function vf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new ya(null,e)}function Af(e){const t=j.toSafeFlatObject(e);return vf(t),t.headers=gn.from(j.getSafeProp(t,"headers")),t.data=wf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),c1.getAdapter(t.adapter||Ea.adapter,t)(t).then(function(o){vf(t),t.response=o;try{o.data=wf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=gn.from(o.headers),o},function(o){if(!Yg(o)&&(vf(t),o&&o.response)){t.response=o.response;try{o.response.data=wf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=gn.from(o.response.headers)}return Promise.reject(o)})}const ml={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ml[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const d1={};ml.transitional=function(t,n,r){function o(a,u){return"[Axios v"+xf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Te(o(u," has been removed"+(n?" in "+n:"")),Te.ERR_DEPRECATED);return n&&!d1[u]&&(d1[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,l):!0}},ml.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function qC(e,t,n){if(typeof e!="object"||e===null)throw new Te("options must be an object",Te.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 l=e[a],d=l===void 0||u(l,a,e);if(d!==!0)throw new Te("option "+a+" must be "+d,Te.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Te("Unknown option "+a,Te.ERR_BAD_OPTION)}}const gl={assertOptions:qC,validators:ml},En=gl.validators;let uo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new zg,response:new zg}}request(t,n){return et(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack;let u="";if(typeof a=="string"){const l=a.indexOf(`
7
7
  `);u=l===-1?"":a.slice(l+1)}if(!r.stack)r.stack=u;else if(u){const l=u.indexOf(`
8
8
  `),d=l===-1?-1:u.indexOf(`
9
9
  `,l+1),f=d===-1?"":u.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
10
- `+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ao(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&gl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:gl.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(j.getSafeProp(n,"method")||j.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&j.merge(a.common,a[n.method]);a&&j.forEach(qg.concat("common"),w=>{delete a[w]}),n.headers=gn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const N=n.transitional||yf;N&&N.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const w=[Af.bind(this),void 0];for(w.unshift(...l),w.push(...f),T=w.length,p=Promise.resolve(n);m<T;)p=p.then(w[m++],w[m++]);return p}T=l.length;let y=n;for(;m<T;){const w=l[m++],v=l[m++];try{y=w?w(y):y}catch(N){if(!v){p=Promise.reject(N);break}try{const x=v.call(this,N);j.isThenable(x)&&(p=Promise.resolve(x).then(()=>Af.call(this,y)))}catch(x){p=Promise.reject(x)}break}}if(!p)try{p=Af.call(this,y)}catch(w){p=Promise.reject(w)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ao(this.defaults,t);const n=Jg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Bg(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){uo.prototype[t]=function(n,r){return this.request(ao(r||{},{method:t,url:n,data:r&&j.hasOwnProp(r,"data")?r.data:void 0}))}}),j.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(ao(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}uo.prototype[t]=n(),t!=="query"&&(uo.prototype[t+"Form"]=n(!0))});let YC=class fS{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(l=>{r.subscribe(l),a=l}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new ya(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fS(function(o){t=o}),cancel:t}}};function WC(e){return function(n){return e.apply(null,n)}}function GC(e){return j.isObject(e)&&e.isAxiosError===!0}const El={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(El).forEach(([e,t])=>{El[t]===void 0&&(El[t]=e)});function f1(e){const t=new uo(e),n=yg(uo.prototype.request,t);return j.extend(n,uo.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return f1(ao(e,o))},n}const Mt=f1(Ea);Mt.Axios=uo,Mt.CanceledError=ya,Mt.CancelToken=YC,Mt.isCancel=Yg,Mt.VERSION=xf,Mt.toFormData=fl,Mt.AxiosError=Te,Mt.Cancel=Mt.CanceledError,Mt.all=function(t){return Promise.all(t)},Mt.spread=WC,Mt.isAxiosError=GC,Mt.mergeConfig=ao,Mt.AxiosHeaders=gn,Mt.formToJSON=e=>Vg(j.isHTMLForm(e)?new FormData(e):e),Mt.getAdapter=c1.getAdapter,Mt.HttpStatusCode=El,Mt.default=Mt;const{Axios:XU,AxiosError:KU,CanceledError:QU,isCancel:JU,CancelToken:ZU,VERSION:eH,all:tH,Cancel:nH,isAxiosError:rH,spread:iH,toFormData:oH,AxiosHeaders:sH,HttpStatusCode:aH,formToJSON:uH,getAdapter:lH,mergeConfig:cH,create:dH}=Mt;class XC{constructor(t,n,r,o=!1,a,u){we(this,"CIMULATE_API_HEADER","x-cimulate-api-key");we(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");we(this,"CIMULATE_SEARCH_API_PATH","api/v1");we(this,"baseApiUrl");we(this,"headers",{});we(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Mt.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}}));we(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 KC{constructor(t,n,r,o=!1,a,u){we(this,"apiService");we(this,"config",null);we(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}}));we(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));we(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));we(this,"getDescription",t=>this.getProductFieldValue(t,"description"));we(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));we(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));we(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));we(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));we(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));we(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});we(this,"getProductField",t=>this.config?this.config[t]:"");we(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new XC(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 es=(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 QC{constructor(t=!1){we(this,"isDevelopment");we(this,"_log",(t,n,...r)=>{es(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 JC={copilot:"Your Search Assistant",messaging:"Commerce Client"},h1=D.createContext(null),ZC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,searchPlaceholder:T,searchButtonLabel:y,searchConfig:w,suggestionButtonConfig:v,progressStepsLimit:N=3,messageAlignment:x="start",autoScroll:A=!0,showProductDescription:C=!1,componentConfig:U,conversationHistory:Y,resetConversationMessage:R="",apiKey:V,apiToken:ne,baseUrl:fe,customerId:$,tenantId:ie,theme:ue,isDevelopment:ve,__features:re,routingAttributes:ae,enableDownloadTranscript:Ae=!0,enablePageContext:oe=!1,enableEscalationToAgent:J=!1,enableImageUpload:se=!1,showProductCaptions:k=!1,connectingMessages:F,staticQuestions:K,staticQuestionsStrategy:I="append",children:xe})=>{const Me=e==="messaging",ke=D.useMemo(()=>{const Pt=ae==null?void 0:ae.isCartMgmtSupported;return Pt===!0||Pt==="true"},[ae]),be=D.useMemo(()=>Me?{config:null}:new KC(fe,V,ne,ve,$,ie),[Me,fe,V,ne,ve,$,ie]),Ie=D.useMemo(()=>new QC(ve),[ve]);D.useEffect(()=>{Me||!be||be.config||be.getConfig()},[be,Me]);const Ue=D.useMemo(()=>pg(ue),[ue]),lt=Ue.cssVariables,cn=D.useMemo(()=>{const Pt=(w==null?void 0:w.placeholder)||T,Qn=(w==null?void 0:w.buttonLabel)||y;let _n="icon";return w!=null&&w.buttonType?_n=w.buttonType:y&&(_n="text"),me(B({},w||{}),{placeholder:Pt,buttonLabel:Qn,buttonType:_n})},[w,T,y]),Lt=D.useMemo(()=>me(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||JC[e!=null?e:"copilot"]}),[r,t,n,e]),$t=D.useMemo(()=>({configModule:be,mode:e!=null?e:"copilot",themeVariants:Ue.compatibility&&e!=="messaging"?me(B({},Ue.variants),{carousel:"chevron"}):Ue.variants,themeTokens:Ue.compatibility==="legacy"?void 0:Ue.tokens,themeClassName:Ue.transcriptClassName,headerConfig:Lt,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:I,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:lt,logger:Ie,searchConfig:cn,suggestionButtonConfig:v,progressStepsLimit:N,messageAlignment:x,autoScroll:A,showProductDescription:!!C,enableMinimize:!!(U!=null&&U.enableMinimize),launcherAriaLabel:U==null?void 0:U.launcherAriaLabel,enableDownloadTranscript:Ae,enablePageContext:oe,enableEscalationToAgent:J,enableImageUpload:se,showProductCaptions:!!k,connectingMessages:F,resetConversationMessage:R,conversationHistory:{sinceHours:typeof(Y==null?void 0:Y.sinceHours)=="number"?Y.sinceHours:Me?24:1,limit:Y==null?void 0:Y.limit},features:re,isCartMgmtSupported:ke}),[be,e,Lt,a,K,I,o,p,m,d,f,u,l,cn,v,x,A,C,U,Ae,oe,J,se,N,k,F,R,Ie,lt,Ue,Y,re,ke,Me]);return _.jsx(h1.Provider,{value:$t,children:xe})},tt=()=>{const e=D.useContext(h1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class ek{constructor(){we(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}});we(this,"connectedProxy");we(this,"modeProxy");we(this,"entryTypeProxy");we(this,"statusProxy");we(this,"dialogProxy");we(this,"modalProxy",{isFullscreen:!1});we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return ok(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 ek,lo=()=>Je.connected,ba=()=>Je.isOpen,Cf="cimulate.widget.minimizedOnNav";function tk(){try{const e=sessionStorage.getItem(Cf)==="1";return sessionStorage.removeItem(Cf),e}catch(e){return!1}}function nk(){try{sessionStorage.removeItem(Cf)}catch(e){return}}const rk=e=>{window.addEventListener(af,e)},ik=e=>{window.removeEventListener(af,e)},ok=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},sk=e=>{Je.connectedProxy.connected=e},Ta=e=>{if(!Bv(e)){const t=sg.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}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,nk())},wa=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},kf=e=>{Je.modalProxy.isFullscreen=e},yl=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"},Nf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},ak=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},uk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),o=D.useCallback(C=>{n({type:Et.SET_COPILOT,payload:C})},[n]),a=D.useCallback(C=>{sk(C),n({type:Et.SET_CONNECTED,payload:C})},[n]),u=D.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=D.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=D.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:Et.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=D.useCallback(C=>{n({type:Et.ADD_LOADING_MESSAGE,payload:C})},[n]),p=D.useCallback(C=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=D.useCallback(C=>{d(C),f(C.id)},[d,f]),T=D.useCallback(C=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=D.useCallback(C=>{n({type:Et.ADD_CONVERSATION_ID,payload:C})},[n]),w=D.useCallback(C=>{n({type:Et.SET_CONVERSATION_IDS,payload:C})},[n]),v=D.useCallback(C=>{n({type:Et.SET_IMAGE_FILE,payload:C})},[n]),N=D.useCallback(C=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:C})},[n]),x=D.useCallback(C=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),A=D.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:v,setAskCimPrompts:N,setConversationHistoryLoaded:x}),[o,a,u,l,d,f,p,m,T,y,w,v,N,x]);return _.jsx(gg.Provider,{value:A,children:t})};Dv();const lk=(e,t)=>{const{type:n,payload:r}=t;if(n===Et.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 l=u.findIndex(d=>d.id===o.id);if(l!==-1){u[l]=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 Et.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 Et.RESET_COPILOT:e.copilot=null;break;case Et.SET_COPILOT:e.copilot=r;break;case Et.SET_CONNECTED:e.connected=r;break;case Et.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Et.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Et.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Et.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Et.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Et.SET_IMAGE_FILE:e.imageFile=r;break;case Et.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 Et.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},ck=({onCopilotEvent:e,children:t})=>{const[n,r]=ig(lk,no);return _.jsx(mg.Provider,{value:n,children:_.jsx(uk,{onCopilotEvent:e,dispatch:r,children:t})})};function dk(){var e=D.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Pf=typeof window!="undefined",_a=function(e){D.useEffect(e,[])},pk=function(e){var t=D.useRef(e);t.current=e,_a(function(){return function(){return t.current()}})},mk=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],o=n[1],a=D.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pk(function(){cancelAnimationFrame(t.current)}),[r,a]},gk=function(e,t){return e===t};function Ek(e,t){t===void 0&&(t=gk);var n=D.useRef(),r=D.useRef(e),o=dk();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yk=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,l=mk({width:Pf?window.innerWidth:r,height:Pf?window.innerHeight:a}),d=l[0],f=l[1];return D.useEffect(function(){if(Pf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return fk(window,"resize",p),function(){hk(window,"resize",p)}}},[]),d};class bk{constructor(){we(this,"items",[]);we(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});we(this,"remove",()=>this.items.shift());we(this,"first",()=>this.items.length>0?this.items[0]:null);we(this,"clear",()=>{this.items.length=0});we(this,"processQueue",t=>{new Array(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new bk,p1=e=>{window.addEventListener(sf,e)},m1=e=>{window.removeEventListener(sf,e)},Tk=(e,t,n)=>{const r=new CustomEvent(sf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},g1=e=>{window.addEventListener(of,e)},E1=e=>{window.removeEventListener(of,e)},wk=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},y1=e=>{window.addEventListener(rf,e)},b1=e=>{window.removeEventListener(rf,e)},Of=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},_k=e=>{window.addEventListener(lf,e)},xk=e=>{window.removeEventListener(lf,e)},xa=(e,t,n)=>{const r=new CustomEvent(lf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Sk{constructor(){we(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});we(this,"categoryIdProxy");we(this,"facetFiltersProxy");we(this,"rangeFiltersProxy");we(this,"catalogSegmentProxy");we(this,"pricebooksProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{const o=zv[n];return wk(o,n,r),Reflect.set(t,n,r)});we(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));we(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));we(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 Sk,T1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},w1=(e,t,n)=>{var u,l;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((l=r[e])!=null&&l.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},_1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},x1=({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 l=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=l.rangeFilters},S1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},v1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},vk=e=>{if(!lo()||!ba()){lo()&&yn.clear(),yn.add({context:"browse",payload:me(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},A1=e=>{T1(e,ut)},Ak=(e,t)=>{w1(e,t,ut)},C1=e=>{_1(e,ut)},Ck=({field:e,value:t})=>{x1({field:e,value:t},ut)},kk=e=>{S1(e,ut)},k1=e=>{v1(e,ut)},N1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&A1(e.facetFilters||{}),"rangeFilters"in e&&C1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&k1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Nk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:N1,updateBrowseCategoryId:vk,updateCatalogSegment:kk,updateFacetFilter:Ak,updateFacetFilters:A1,updatePricebooks:k1,updateRangeFilter:Ck,updateRangeFilters:C1},Symbol.toStringTag,{value:"Module"}));class Pk{constructor(){we(this,"initialParams",{productId:"",productName:"",pdpLink:""});we(this,"proxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>(Of(n,r),Reflect.set(t,n,r)));we(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});we(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});we(this,"dispatchContextUpdate",()=>{Of("pdp-context",this.state)});we(this,"createProxy",t=>new Proxy(B({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return B({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Er=new Pk,P1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}Er.updateProxy(e),Of("pdp-context",e)},Ok=e=>{Er.proxy.productId=e,lo()||yn.add({context:"pdp",payload:B({},Er.state)})},Ik=e=>{Er.proxy.pdpLink=e};class Rk{constructor(){we(this,"initialState",Eg);we(this,"promptsStateProxy");we(this,"promptsParamsProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Sa(n,r),Reflect.set(t,n,r)});we(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));we(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));we(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 zt=new Rk,Lk=e=>{window.addEventListener(uf,e)},Dk=e=>{window.removeEventListener(uf,e)},Sa=(e,t)=>{const n=new CustomEvent(uf,{detail:{property:e,value:t}});window.dispatchEvent(n)},O1=e=>{const t=zt.isOpen,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isOpen=n},I1=e=>{const t=zt.isInline,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isInline=n},Mk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="ask_cim"},Fk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="search"},Bk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="browse"},Uk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="pdp"},Hk=({elementId:e,entryType:t,params:n,isInline:r})=>{zt.promptsStateProxy.elementId=e,t&&(zt.promptsStateProxy.entryType=t),typeof r=="boolean"&&I1(r),n&&zt.updatePromptsParamsProxy(n),zt.isOpen||O1(!0)},zk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{xa("endConversation",!0,ni.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{xa("getConversationMessages",{payload:e,callback:t},ni.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{xa("getSessionInformation",{callback:e},ni.GET_SESSION_INFORMATION)},loadConversation:e=>{xa("loadConversation",e,ni.LOAD_CONVERSATION)},resetConversation:()=>{xa("resetConversation",!0,ni.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class jk{constructor(){we(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});we(this,"queryProxy");we(this,"facetFiltersProxy");we(this,"rangeFiltersProxy");we(this,"catalogSegmentProxy");we(this,"pricebooksProxy");we(this,"_fullGet",(t,n)=>Reflect.get(t,n));we(this,"_fullSet",(t,n,r)=>{const o=jv[n];return Tk(o,n,r),Reflect.set(t,n,r)});we(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));we(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));we(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 xt=new jk,$k=e=>{const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:me(B({},xt.state),{query:e})});return}xt.queryProxy.query=e},R1=e=>{T1(e,xt)},Vk=(e,t)=>{w1(e,t,xt)},L1=e=>{_1(e,xt)},qk=({field:e,value:t})=>{x1({field:e,value:t},xt)},Yk=e=>{S1(e,xt)},D1=e=>{v1(e,xt)},M1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&R1(e.facetFilters||{}),"rangeFilters"in e&&L1(e.rangeFilters||[]),"catalogSegment"in e&&(xt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&D1(e.pricebooks||[]),xt.queryProxy.query=e.query},Wk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:M1,updateCatalogSegment:Yk,updateFacetFilter:Vk,updateFacetFilters:R1,updatePricebooks:D1,updateRangeFilter:qk,updateRangeFilters:L1,updateSearchQuery:$k},Symbol.toStringTag,{value:"Module"})),Gk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},F1=D.createContext(Gk),Xk=({children:e})=>{const[t,n]=D.useState(ut.categoryId),[r,o]=D.useState(ut.categoryIdProxy.categoryName||""),[a,u]=D.useState(ut.facetFilters||{}),[l,d]=D.useState(ut.rangeFilters||[]),[f,p]=D.useState(ut.catalogSegment||null),[m,T]=D.useState(ut.pricebooks||null);D.useEffect(()=>{const w=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&n(v.value),(v==null?void 0:v.property)==="categoryName"&&o(v.value),(v==null?void 0:v.property)==="facetFilters"&&u(v.value),(v==null?void 0:v.property)==="rangeFilters"&&d(v.value),(v==null?void 0:v.property)==="catalogSegment"&&p(v.value),(v==null?void 0:v.property)==="pricebooks"&&T(v.value)};return g1(w),()=>{E1(w)}},[]);const y=D.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return _.jsx(F1.Provider,{value:y,children:e})},Kk=()=>{const e=D.useContext(F1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Qk={searchQuery:xt.query,facetFilters:xt.facetFilters,rangeFilters:xt.rangeFilters,catalogSegment:xt.catalogSegment,pricebooks:xt.pricebooks},B1=D.createContext(Qk),Jk=({children:e})=>{const[t,n]=D.useState(xt.query),[r,o]=D.useState(xt.facetFilters),[a,u]=D.useState(xt.rangeFilters),[l,d]=D.useState(xt.catalogSegment),[f,p]=D.useState(xt.pricebooks);D.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 p1(T),()=>{m1(T)}},[]);const m=D.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return _.jsx(B1.Provider,{value:m,children:e})},Zk=()=>{const e=D.useContext(B1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},eN={productId:Er.productId,pdpLink:Er.pdpLink},U1=D.createContext(eN),tN=({children:e})=>{const[t,n]=D.useState(Er.productId),[r,o]=D.useState(Er.pdpLink);D.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),o(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&o(l.value)};return y1(u),()=>{b1(u)}},[]);const a=D.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(U1.Provider,{value:a,children:e})},nN=()=>{const e=D.useContext(U1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},H1=D.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}),rN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=D.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=D.useState(Je.modeProxy.mode),[d,f]=D.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=D.useState(Je.dialogProxy.position),[T,y]=D.useState(Je.dialogProxy.isFullHeight),[w,v]=D.useState(Je.dialogProxy.width),[N,x]=D.useState(Je.modalProxy.isFullscreen),A=D.useRef(!1),C=Ek(d.type);D.useEffect(()=>{const Y=R=>{const{property:V,value:ne}=R.detail||{};if(!(!V||ne===void 0)){if(V==="mode"){l(ne);return}if(V==="entryType"){a(ne);return}if(V==="isMinimized"){f(fe=>me(B({},fe),{isMinimized:ne}));return}if(V==="isOpen"){f(fe=>me(B({},fe),{isOpen:ne}));return}if(V==="type"){f(fe=>me(B({},fe),{type:ne}));return}if(V==="position"){m(ne);return}if(V==="isFullHeight"){y(ne);return}if(V==="width"){v(ne);return}if(V==="isFullscreen"){x(ne);return}}};return rk(Y),()=>{ik(Y)}},[]),_a(()=>{e&&Ta(e)}),_a(()=>{if(A.current)return;A.current=!0;const Y=n||(t==null?void 0:t.type);Y&&yl(Y);const R=tk();t&&"isOpen"in t&&ri(!!t.isOpen),t&&"isMinimized"in t&&wa(!!t.isMinimized),R&&wa(!0)}),_a(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Nf(Y),"dialogFullHeight"in t.options&&ak(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&kf(!!t.options.isModalFullscreen)});const U=D.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:N}),[u,o,d,C,p,T,w,N]);return _.jsx(H1.Provider,{value:U,children:r})},Yn=()=>{const e=D.useContext(H1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},z1=D.createContext(null),j1=D.createContext(null),If=()=>{const e=D.useContext(j1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ii=()=>{const e=D.useContext(z1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},ts=()=>{const e=D.useContext(gg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Wn=()=>{const e=D.useContext(mg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},iN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ii(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=ts(),{activeConversationId:u}=Wn(),l=D.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=D.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 D.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(v=>{var x;const N=T.find(A=>A.id===v.eventSourceId);(x=N==null?void 0:N.name)!=null&&x.endsWith("_suggestions")||(v.bypassHandlers=!0,y.unshift(v))}),y.forEach(v=>{o(v)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},$1=D.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),oN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),bt=Zk(),{searchQuery:y}=bt,w=mn(bt,["searchQuery"]),Vt=Kk(),{categoryId:v}=Vt,N=mn(Vt,["categoryId"]),{productId:x,pdpLink:A}=nN(),{setCopilot:C,setConnected:U,resetCopilot:Y,resetCopilotState:R,addCopilotEvent:V,removeLoadingMessage:ne,handleCopilotRequestAck:fe,setActiveConversationId:$,setConversationIds:ie,setAskCimPrompts:ue}=ts(),{connected:ve,copilot:re,messages:ae,groupedMessages:Ae,loadingMessages:oe,askCimPrompts:J}=Wn(),{status:se,entryType:k}=Yn(),{isInline:F}=ii(),{getConversationMessages:K,getSessionInformation:I}=iN({copilot:re}),xe=D.useMemo(()=>oe.size>0,[oe]),Me=D.useCallback(_e=>oe.has(_e),[oe]),ke=D.useCallback(({query:_e,facetFilters:Le,rangeFilters:Be,catalogSegment:Xe,pricebooks:gt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Ce={searchParams:{query:_e}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),Le&&Object.keys(Le).length>0&&(Ce.searchParams.facetFilters=Le),Be&&Be.length>0&&(Ce.searchParams.rangeFilters=Be),Xe&&(Ce.searchParams.catalogSegment=Xe),gt&&(Ce.searchParams.pricebooks=gt),m&&(Ce.clientContext=m),Ta("search"),re.search(Ce,Ye=>{const Re=B({},Ye);fe(Re)})},[p,fe,re,m]),be=D.useCallback(({categoryId:_e,categoryName:Le,facetFilters:Be,rangeFilters:Xe,catalogSegment:gt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ye=Be&&Object.keys(Be).length>0;if(_e===""&&!Ye){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:_e||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ye&&(Re.browseParams.facetFilters=Be),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),gt&&(Re.browseParams.catalogSegment=gt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||Le)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),Le&&(Re.clientContext.cimLabel=Le)),Ta("browse"),re.browse(Re,ct=>{var qr;const Xt=B({},ct),qt=((qr=Xt.request)==null?void 0:qr.clientContext)||{},dn=(qt==null?void 0:qt.cimLabel)||Le;dn&&Xt.request&&(Xt.request.label=dn),fe(Xt)})},[p,fe,re,m]),Ie=D.useCallback(({productId:_e,productName:Le,pdpLink:Be,userPrompt:Xe,imageFile:gt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Z={productId:_e};Xe&&(Z.userPrompt=Xe),Be&&(Z.pdpLink=Be),gt&&(Z.attachments={image:gt}),(m||Le)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),Le&&(Z.clientContext.cimLabel=Le)),T&&(Z.baseCatalogParams=T),Ta("pdp"),re.productView(Z,ge=>{var ct;const Ce=B({},ge),Ye=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ye==null?void 0:Ye.cimLabel)||Le;Re&&Ce.request&&(Ce.request.label=Re),fe(Ce)})},[p,re,fe,m,T]),Ue=D.useCallback(({userPrompt:_e,imageFile:Le})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Be={userPrompt:_e};Le&&(Be.attachments={image:Le}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),re.askCim(Be,Xe=>{const gt=B({},Xe);fe(gt)})},[p,re,fe,m,T]),lt=D.useCallback(_e=>{V(_e),l==null||l(_e)},[V,l]),cn=D.useCallback(_e=>{V(_e),d==null||d(_e)},[V,d]),Lt=D.useCallback(_e=>{u==null||u(_e),U(!0)},[u,U]);D.useEffect(()=>{!re||!ve||!se.isOpen||yn.size>0&&yn.processQueue(_e=>{if(_e.context==="search"){const Le=B({},_e.payload);M1(Le)}if(_e.context==="browse"){const Le=B({},_e.payload);N1(Le)}if(_e.context==="pdp"){const Le=B({},_e.payload);P1(Le)}})},[se.isOpen,re,ve]);const $t=D.useCallback(_e=>{const Le=Be=>{const Xe=me(B({},Be),{id:Be.inquiryLinkId||Be.id});V(Xe)};_e.on("connect_ack",Lt),_e.on("partial_inquiry",Le),_e.on("display_products",V),_e.on("progress",V),_e.on("refined_search",lt),_e.on("refined_browse",cn),_e.on("done",Be=>{ne(Be.eventSourceId)}),_e.on("error",Be=>{V(Be),ne(Be.eventSourceId)}),_e.onDisconnect(Be=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!Xe.includes(Be)){U(!1);return}p==null||p.log("De-registering event listeners");const gt=new Date().toISOString();V({name:"error",message:"Connection was lost. Please try again.",createdAt:gt,id:`error-${gt}`,sessionId:"session"}),_e.off()})},[p,U,ne,lt,cn,V,Lt]);D.useEffect(()=>{if(!re)return;const _e=Le=>{if(!F){if(!Le.message&&Le.eventSourceId&&Le.eventSourceId===J.requestId){ue({requestId:Le.eventSourceId,message:Le});return}V(Le)}};return re.on("follow_up",_e),()=>{re.off("follow_up",_e)}},[re,ae,J.requestId,F,V,ue]),D.useEffect(()=>{if(!re)return;const _e=Le=>{if(F)return;const Be=me(B({},Le),{id:Le.inquiryLinkId||Le.id});V(Be)};return re.on("inquiry",_e),()=>{re.off("inquiry",_e)}},[re,F,V]),_a(()=>{let _e;n?_e=n:_e=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Le={baseUrl:_e};e?Le.apiKey=e:t&&(Le.apiToken=t),r&&(Le.customerId=r),o&&(Le.tenantId=o);const Be=new vv(Le);return C(Be),$t(Be),Be.connect(),Be.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:gt,conversationIds:Z}=Xe.data||{};gt&&$(gt),Z!=null&&Z.length&&ie(Z)}),()=>{Be.disconnect(),Be.off(),Y()}});const Pt=D.useCallback(_e=>{if(!re)return;const Le={eventId:_e,reason:"User cancelled the request"};re.cancelRequest(Le,Be=>{V(Be),ne(_e)})},[V,ne,re]),Qn=D.useCallback(()=>{re&&re.conversationReset({},_e=>{R(),V(_e),re.requestSessionInformation(Le=>{p==null||p.log("Session Information: ",Le);const{activeConversationId:Be,conversationIds:Xe}=Le.data||{};Be&&$(Be),Xe!=null&&Xe.length&&ie(Xe)})})},[re,p,V,R,$,ie]),_n=D.useCallback((_e,Le)=>{if(!_e)return;const Be={userPrompt:_e};switch(Le&&(Be.imageFile=Le),k){case"ask_cim":Ue(Be);return;case"search":y?ke(B(B({query:y},w),Be)):Ue(Be);return;case"browse":be(B(B({categoryId:v},N),Be));return;case"pdp":x?Ie(B({productId:x,pdpLink:A||""},Be)):Ue(Be);return}},[k,y,w,ke,Ue,v,N,be,Ie,x,A]),Gt=D.useCallback((_e,Le)=>{var ge,Ce,Ye;const Xe=_e.params.userPrompt||"";if(!Xe)return;const gt=ae.find(Re=>Re.id===Le);if(!gt)return;const Z=gt.name.replace("_suggestions","");if(Z==="ask_cim"){Ue({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=gt.request)==null?void 0:ge.searchParams)||{},Xt=Re.query===y;ke(me(B({query:Re.query||y},Xt?w:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=gt.request,ct=Re.browseParams||{},qt=ct.categoryId===v,dn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";be(me(B({categoryId:ct.categoryId||v||""},qt?N:{}),{categoryName:dn,userPrompt:Xe}));return}if(Z==="product_view"){const Re=gt.request||{},ct=Re.productId,Xt=ct===x,qt=((Ye=Re.clientContext)==null?void 0:Ye.cimLabel)||"";let dn="";Xt?dn=A||"":dn=Re.pdpLink||"",Ie({productId:ct||x,pdpLink:dn,productName:qt,userPrompt:Xe})}},[ae,y,w,ke,Ue,v,N,be,Ie,x,A]),qe=D.useMemo(()=>({copilot:re,messages:ae,groupedMessages:Ae,isLoading:xe,isResponseLoading:Me,handleAskCim:Ue,handleSearch:ke,handleBrowse:be,handlePdp:Ie,handleUserInput:_n,handleSuggestion:Gt,handleCancel:Pt,resetConversation:Qn,getSessionInformation:I,getConversationMessages:K}),[re,ae,Ae,xe,Me,Ue,ke,be,Ie,_n,Gt,Pt,Qn,I,K]);return _.jsx($1.Provider,{value:qe,children:f})},V1=()=>{const{copilot:e}=Wn(),{addCopilotEvent:t}=ts();return{getCopilotSuggestions:D.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=l=>{t(l),a(l)};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])}},Rr=()=>{const e=D.useContext($1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},sN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Wn(),{entryType:o}=Yn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=ts(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Rr(),{getCopilotSuggestions:w}=V1();D.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&w({},o,A=>{l({requestId:A.id,message:null})})},[e,t,n.requestId,o,r,w,l]);const v=D.useCallback(({query:A})=>{if(!e||!A)return;const{facetFilters:C}=xt.facetFiltersProxy,{rangeFilters:U}=xt.rangeFiltersProxy,{catalogSegment:Y}=xt.catalogSegmentProxy,{pricebooks:R}=xt.pricebooksProxy,V={query:A};V.facetFilters=C||{},V.rangeFilters=U||[],V.catalogSegment=Y||"",V.pricebooks=R||[],d(B({},V))},[e,d]),N=D.useCallback(({categoryId:A})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:V}=ut.pricebooksProxy,ne={categoryId:A};ne.categoryName=C||"",ne.facetFilters=U||{},ne.rangeFilters=Y||[],ne.catalogSegment=R||"",ne.pricebooks=V||[],f(B({},ne))},[e,f]),x=D.useCallback(({productId:A})=>{if(!e||!A)return;const C={productId:A,pdpLink:Er.pdpLink,productName:Er.proxy.productName||""};p(C)},[e,p]);return D.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="query"&&v({query:C.value})};return p1(A),()=>{m1(A)}},[v]),D.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const U=C.value;x({productId:U.productId});return}(C==null?void 0:C.property)==="productId"&&x({productId:C.value})};return y1(A),()=>{b1(A)}},[x]),D.useEffect(()=>{const A=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&N({categoryId:C.value})};return g1(A),()=>{E1(A)}},[N]),D.useEffect(()=>{const A=({detail:C})=>{if((C==null?void 0:C.event)==ni.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==ni.GET_SESSION_INFORMATION){const U=C.value.callback;T(U)}if((C==null?void 0:C.event)==ni.GET_CONVERSATION_MESSAGES){const{payload:U,callback:Y}=C.value;if(!U.conversationId||typeof Y!="function")return;y(U,Y)}if((C==null?void 0:C.event)==ni.LOAD_CONVERSATION){const U=C.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach(V=>{u(V)})})}};return _k(A),()=>{xk(A)}},[m,T,y,a,u]),null},aN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>_.jsxs(oN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[_.jsx(sN,{}),f]}),uN=({children:e,dispatch:t})=>{const n=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=D.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,l,d,f,p,m,T]);return _.jsx(j1.Provider,{value:y,children:e})},lN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case yt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case yt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case yt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case yt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case yt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case yt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case yt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},cN=({promptsConfig:e,children:t})=>{const[n,r]=ig(lN,me(B(B({},Eg),e||{}),{staticQuestions:Y0((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(z1.Provider,{value:n,children:_.jsx(uN,{dispatch:r,children:t})})},q1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,theme:f,openLinksInNewTab:p,onNavigate:m,globalClassName:T,isDevelopment:y=!1,componentType:w,componentConfig:v,entryType:N,initialEntry:x,entryMessage:A,disclaimerText:C,disclaimerMarkdown:U,clientContext:Y,baseCatalogParams:R,searchPlaceholder:V,searchButtonLabel:ne,searchConfig:fe,suggestionButtonConfig:$,messageAlignment:ie,autoScroll:ue,promptsConfig:ve,resetConversationMessage:re,conversationHistory:ae,onConnect:Ae,onCopilotEvent:oe,onRefinedSearch:J,onRefinedBrowse:se,__features:k,children:F})=>{const K=x==null?void 0:x.params;return _.jsx(ZC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:A,staticQuestions:Y0(K==null?void 0:K.staticQuestions),staticQuestionsStrategy:K==null?void 0:K.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:V,searchButtonLabel:ne,searchConfig:fe,suggestionButtonConfig:$,messageAlignment:ie,autoScroll:ue,componentConfig:v,clientContext:Y,baseCatalogParams:R,disclaimerMarkdown:U,disclaimerText:C,resetConversationMessage:re,conversationHistory:ae,isDevelopment:y,__features:k,children:_.jsx(rN,{entryType:N!=null?N:x==null?void 0:x.type,componentConfig:v,componentType:w,children:_.jsx(ck,{onCopilotEvent:oe,children:_.jsx(tN,{children:_.jsx(Xk,{children:_.jsx(Jk,{children:_.jsx(cN,{promptsConfig:ve,children:_.jsx(aN,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:N,onConnect:Ae,onRefinedSearch:J,onRefinedBrowse:se,onCopilotEvent:oe,children:F})})})})})})})})};var Rf={exports:{}},Mn={},Lf={exports:{}},Df={};var Y1;function dN(){return Y1||(Y1=1,(function(e){function t(J,se){var k=J.length;J.push(se);e:for(;0<k;){var F=k-1>>>1,K=J[F];if(0<o(K,se))J[F]=se,J[k]=K,k=F;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var se=J[0],k=J.pop();if(k!==se){J[0]=k;e:for(var F=0,K=J.length,I=K>>>1;F<I;){var xe=2*(F+1)-1,Me=J[xe],ke=xe+1,be=J[ke];if(0>o(Me,k))ke<K&&0>o(be,Me)?(J[F]=be,J[ke]=k,F=ke):(J[F]=Me,J[xe]=k,F=xe);else if(ke<K&&0>o(be,k))J[F]=be,J[ke]=k,F=ke;else break e}}return se}function o(J,se){var k=J.sortIndex-se.sortIndex;return k!==0?k:J.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,w=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(J){for(var se=n(f);se!==null;){if(se.callback===null)r(f);else if(se.startTime<=J)r(f),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(f)}}function U(J){if(v=!1,C(J),!w)if(n(d)!==null)w=!0,Ae(Y);else{var se=n(f);se!==null&&oe(U,se.startTime-J)}}function Y(J,se){w=!1,v&&(v=!1,x(ne),ne=-1),y=!0;var k=T;try{for(C(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!ie());){var F=m.callback;if(typeof F=="function"){m.callback=null,T=m.priorityLevel;var K=F(m.expirationTime<=se);se=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),C(se)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var xe=n(f);xe!==null&&oe(U,xe.startTime-se),I=!1}return I}finally{m=null,T=k,y=!1}}var R=!1,V=null,ne=-1,fe=5,$=-1;function ie(){return!(e.unstable_now()-$<fe)}function ue(){if(V!==null){var J=e.unstable_now();$=J;var se=!0;try{se=V(!0,J)}finally{se?ve():(R=!1,V=null)}}else R=!1}var ve;if(typeof A=="function")ve=function(){A(ue)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,ae=re.port2;re.port1.onmessage=ue,ve=function(){ae.postMessage(null)}}else ve=function(){N(ue,0)};function Ae(J){V=J,R||(R=!0,ve())}function oe(J,se){ne=N(function(){J(e.unstable_now())},se)}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(J){J.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Ae(Y))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):fe=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var se=3;break;default:se=T}var k=T;T=se;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,se){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return se()}finally{T=k}},e.unstable_scheduleCallback=function(J,se,k){var F=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?F+k:F):k=F,J){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=k+K,J={id:p++,callback:se,priorityLevel:J,startTime:k,expirationTime:K,sortIndex:-1},k>F?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(x(ne),ne=-1):v=!0,oe(U,k-F))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ae(Y))),J},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(J){var se=T;return function(){var k=T;T=se;try{return J.apply(this,arguments)}finally{T=k}}}})(Df)),Df}var W1;function fN(){return W1||(W1=1,Lf.exports=dN()),Lf.exports}var G1;function hN(){if(G1)return Mn;G1=1;var e=mr(),t=fN();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);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 l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,c,h){if(s===null||typeof s=="undefined"||y(i,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,c,h,E,b,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=S}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];N[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){N[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function A(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(x,A);N[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(x,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(x,A);N[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,s,c,h){var E=N.hasOwnProperty(s)?N[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,E,h)&&(c=null),h||E===null?T(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(s=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(s):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,s,c):i.setAttribute(s,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),V=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),fe=Symbol.for("react.profiler"),$=Symbol.for("react.provider"),ie=Symbol.for("react.context"),ue=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),ae=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),J=Symbol.iterator;function se(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,F;function K(i){if(F===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
11
- `+F+i}var I=!1;function xe(i,s){if(!i||I)return"";I=!0;var c=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(ee){var h=ee}Reflect.construct(i,[],s)}else{try{s.call()}catch(ee){h=ee}i.call(s.prototype)}else{try{throw Error()}catch(ee){h=ee}i()}}catch(ee){if(ee&&h&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
10
+ `+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ao(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&gl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:gl.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(j.getSafeProp(n,"method")||j.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&j.merge(a.common,a[n.method]);a&&j.forEach(qg.concat("common"),w=>{delete a[w]}),n.headers=gn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const N=n.transitional||yf;N&&N.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const w=[Af.bind(this),void 0];for(w.unshift(...l),w.push(...f),T=w.length,p=Promise.resolve(n);m<T;)p=p.then(w[m++],w[m++]);return p}T=l.length;let y=n;for(;m<T;){const w=l[m++],v=l[m++];try{y=w?w(y):y}catch(N){if(!v){p=Promise.reject(N);break}try{const x=v.call(this,N);j.isThenable(x)&&(p=Promise.resolve(x).then(()=>Af.call(this,y)))}catch(x){p=Promise.reject(x)}break}}if(!p)try{p=Af.call(this,y)}catch(w){p=Promise.reject(w)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ao(this.defaults,t);const n=Jg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Bg(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){uo.prototype[t]=function(n,r){return this.request(ao(r||{},{method:t,url:n,data:r&&j.hasOwnProp(r,"data")?r.data:void 0}))}}),j.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(ao(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}uo.prototype[t]=n(),t!=="query"&&(uo.prototype[t+"Form"]=n(!0))});let YC=class fS{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(l=>{r.subscribe(l),a=l}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new ya(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fS(function(o){t=o}),cancel:t}}};function WC(e){return function(n){return e.apply(null,n)}}function GC(e){return j.isObject(e)&&e.isAxiosError===!0}const El={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,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent: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,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(El).forEach(([e,t])=>{El[t]===void 0&&(El[t]=e)});function f1(e){const t=new uo(e),n=yg(uo.prototype.request,t);return j.extend(n,uo.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return f1(ao(e,o))},n}const Mt=f1(Ea);Mt.Axios=uo,Mt.CanceledError=ya,Mt.CancelToken=YC,Mt.isCancel=Yg,Mt.VERSION=xf,Mt.toFormData=fl,Mt.AxiosError=Te,Mt.Cancel=Mt.CanceledError,Mt.all=function(t){return Promise.all(t)},Mt.spread=WC,Mt.isAxiosError=GC,Mt.mergeConfig=ao,Mt.AxiosHeaders=gn,Mt.formToJSON=e=>Vg(j.isHTMLForm(e)?new FormData(e):e),Mt.getAdapter=c1.getAdapter,Mt.HttpStatusCode=El,Mt.default=Mt;const{Axios:XU,AxiosError:KU,CanceledError:QU,isCancel:JU,CancelToken:ZU,VERSION:eH,all:tH,Cancel:nH,isAxiosError:rH,spread:iH,toFormData:oH,AxiosHeaders:sH,HttpStatusCode:aH,formToJSON:uH,getAdapter:lH,mergeConfig:cH,create:dH}=Mt;class XC{constructor(t,n,r,o=!1,a,u){_e(this,"CIMULATE_API_HEADER","x-cimulate-api-key");_e(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");_e(this,"CIMULATE_SEARCH_API_PATH","api/v1");_e(this,"baseApiUrl");_e(this,"headers",{});_e(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Mt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));_e(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const 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 KC{constructor(t,n,r,o=!1,a,u){_e(this,"apiService");_e(this,"config",null);_e(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}}));_e(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));_e(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));_e(this,"getDescription",t=>this.getProductFieldValue(t,"description"));_e(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));_e(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));_e(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));_e(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));_e(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));_e(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});_e(this,"getProductField",t=>this.config?this.config[t]:"");_e(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new XC(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 es=(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 QC{constructor(t=!1){_e(this,"isDevelopment");_e(this,"_log",(t,n,...r)=>{es(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 JC={copilot:"Your Search Assistant",messaging:"Commerce Client"},h1=D.createContext(null),ZC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,searchPlaceholder:T,searchButtonLabel:y,searchConfig:w,suggestionButtonConfig:v,progressStepsLimit:N=3,messageAlignment:x="start",autoScroll:C=!0,showProductDescription:A=!1,componentConfig:U,conversationHistory:Y,resetConversationMessage:R="",apiKey:$,apiToken:ne,baseUrl:de,customerId:V,tenantId:ie,theme:fe,isDevelopment:we,__features:re,routingAttributes:oe,enableDownloadTranscript:Ae=!0,enablePageContext:se=!1,enableEscalationToAgent:J=!1,enableImageUpload:ae=!1,showProductCaptions:k=!1,connectingMessages:F,staticQuestions:K,staticQuestionsStrategy:I="append",children:Se})=>{const Me=e==="messaging",ke=D.useMemo(()=>{const Pt=oe==null?void 0:oe.isCartMgmtSupported;return Pt===!0||Pt==="true"},[oe]),be=D.useMemo(()=>Me?{config:null}:new KC(de,$,ne,we,V,ie),[Me,de,$,ne,we,V,ie]),Ie=D.useMemo(()=>new QC(we),[we]);D.useEffect(()=>{Me||!be||be.config||be.getConfig()},[be,Me]);const Ue=D.useMemo(()=>pg(fe),[fe]),lt=Ue.cssVariables,cn=D.useMemo(()=>{const Pt=(w==null?void 0:w.placeholder)||T,Qn=(w==null?void 0:w.buttonLabel)||y;let _n="icon";return w!=null&&w.buttonType?_n=w.buttonType:y&&(_n="text"),me(B({},w||{}),{placeholder:Pt,buttonLabel:Qn,buttonType:_n})},[w,T,y]),Lt=D.useMemo(()=>me(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||JC[e!=null?e:"copilot"]}),[r,t,n,e]),$t=D.useMemo(()=>({configModule:be,mode:e!=null?e:"copilot",themeVariants:Ue.compatibility&&e!=="messaging"?me(B({},Ue.variants),{carousel:"chevron"}):Ue.variants,themeTokens:Ue.compatibility==="legacy"?void 0:Ue.tokens,themeClassName:Ue.transcriptClassName,headerConfig:Lt,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:I,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:lt,logger:Ie,searchConfig:cn,suggestionButtonConfig:v,progressStepsLimit:N,messageAlignment:x,autoScroll:C,showProductDescription:!!A,enableMinimize:!!(U!=null&&U.enableMinimize),launcherAriaLabel:U==null?void 0:U.launcherAriaLabel,enableDownloadTranscript:Ae,enablePageContext:se,enableEscalationToAgent:J,enableImageUpload:ae,showProductCaptions:!!k,connectingMessages:F,resetConversationMessage:R,conversationHistory:{sinceHours:typeof(Y==null?void 0:Y.sinceHours)=="number"?Y.sinceHours:Me?24:1,limit:Y==null?void 0:Y.limit},features:re,isCartMgmtSupported:ke}),[be,e,Lt,a,K,I,o,p,m,d,f,u,l,cn,v,x,C,A,U,Ae,se,J,ae,N,k,F,R,Ie,lt,Ue,Y,re,ke,Me]);return _.jsx(h1.Provider,{value:$t,children:Se})},tt=()=>{const e=D.useContext(h1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class ek{constructor(){_e(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});_e(this,"connectedProxy");_e(this,"modeProxy");_e(this,"entryTypeProxy");_e(this,"statusProxy");_e(this,"dialogProxy");_e(this,"modalProxy",{isFullscreen:!1});_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return ok(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 ek,lo=()=>Je.connected,ba=()=>Je.isOpen,Cf="cimulate.widget.minimizedOnNav";function tk(){try{const e=sessionStorage.getItem(Cf)==="1";return sessionStorage.removeItem(Cf),e}catch(e){return!1}}function nk(){try{sessionStorage.removeItem(Cf)}catch(e){return}}const rk=e=>{window.addEventListener(af,e)},ik=e=>{window.removeEventListener(af,e)},ok=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},sk=e=>{Je.connectedProxy.connected=e},Ta=e=>{if(!Bv(e)){const t=sg.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}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,nk())},wa=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},kf=e=>{Je.modalProxy.isFullscreen=e},yl=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"},Nf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},ak=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},uk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),o=D.useCallback(A=>{n({type:Et.SET_COPILOT,payload:A})},[n]),a=D.useCallback(A=>{sk(A),n({type:Et.SET_CONNECTED,payload:A})},[n]),u=D.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=D.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=D.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:Et.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),f=D.useCallback(A=>{n({type:Et.ADD_LOADING_MESSAGE,payload:A})},[n]),p=D.useCallback(A=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:A})},[n]),m=D.useCallback(A=>{d(A),f(A.id)},[d,f]),T=D.useCallback(A=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=D.useCallback(A=>{n({type:Et.ADD_CONVERSATION_ID,payload:A})},[n]),w=D.useCallback(A=>{n({type:Et.SET_CONVERSATION_IDS,payload:A})},[n]),v=D.useCallback(A=>{n({type:Et.SET_IMAGE_FILE,payload:A})},[n]),N=D.useCallback(A=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:A})},[n]),x=D.useCallback(A=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),C=D.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:v,setAskCimPrompts:N,setConversationHistoryLoaded:x}),[o,a,u,l,d,f,p,m,T,y,w,v,N,x]);return _.jsx(gg.Provider,{value:C,children:t})};Dv();const lk=(e,t)=>{const{type:n,payload:r}=t;if(n===Et.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 l=u.findIndex(d=>d.id===o.id);if(l!==-1){u[l]=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 Et.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 Et.RESET_COPILOT:e.copilot=null;break;case Et.SET_COPILOT:e.copilot=r;break;case Et.SET_CONNECTED:e.connected=r;break;case Et.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Et.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Et.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Et.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Et.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Et.SET_IMAGE_FILE:e.imageFile=r;break;case Et.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 Et.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},ck=({onCopilotEvent:e,children:t})=>{const[n,r]=ig(lk,no);return _.jsx(mg.Provider,{value:n,children:_.jsx(uk,{onCopilotEvent:e,dispatch:r,children:t})})};function dk(){var e=D.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Pf=typeof window!="undefined",_a=function(e){D.useEffect(e,[])},pk=function(e){var t=D.useRef(e);t.current=e,_a(function(){return function(){return t.current()}})},mk=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],o=n[1],a=D.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pk(function(){cancelAnimationFrame(t.current)}),[r,a]},gk=function(e,t){return e===t};function Ek(e,t){t===void 0&&(t=gk);var n=D.useRef(),r=D.useRef(e),o=dk();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yk=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,l=mk({width:Pf?window.innerWidth:r,height:Pf?window.innerHeight:a}),d=l[0],f=l[1];return D.useEffect(function(){if(Pf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return fk(window,"resize",p),function(){hk(window,"resize",p)}}},[]),d};class bk{constructor(){_e(this,"items",[]);_e(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});_e(this,"remove",()=>this.items.shift());_e(this,"first",()=>this.items.length>0?this.items[0]:null);_e(this,"clear",()=>{this.items.length=0});_e(this,"processQueue",t=>{new Array(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new bk,p1=e=>{window.addEventListener(sf,e)},m1=e=>{window.removeEventListener(sf,e)},Tk=(e,t,n)=>{const r=new CustomEvent(sf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},g1=e=>{window.addEventListener(of,e)},E1=e=>{window.removeEventListener(of,e)},wk=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},y1=e=>{window.addEventListener(rf,e)},b1=e=>{window.removeEventListener(rf,e)},Of=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},_k=e=>{window.addEventListener(lf,e)},xk=e=>{window.removeEventListener(lf,e)},xa=(e,t,n)=>{const r=new CustomEvent(lf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Sk{constructor(){_e(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"categoryIdProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const o=zv[n];return wk(o,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(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 Sk,T1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},w1=(e,t,n)=>{var u,l;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((l=r[e])!=null&&l.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},_1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},x1=({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 l=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=l.rangeFilters},S1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},v1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},vk=e=>{if(!lo()||!ba()){lo()&&yn.clear(),yn.add({context:"browse",payload:me(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},A1=e=>{T1(e,ut)},Ak=(e,t)=>{w1(e,t,ut)},C1=e=>{_1(e,ut)},Ck=({field:e,value:t})=>{x1({field:e,value:t},ut)},kk=e=>{S1(e,ut)},k1=e=>{v1(e,ut)},N1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&A1(e.facetFilters||{}),"rangeFilters"in e&&C1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&k1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Nk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:N1,updateBrowseCategoryId:vk,updateCatalogSegment:kk,updateFacetFilter:Ak,updateFacetFilters:A1,updatePricebooks:k1,updateRangeFilter:Ck,updateRangeFilters:C1},Symbol.toStringTag,{value:"Module"}));class Pk{constructor(){_e(this,"initialParams",{productId:"",productName:"",pdpLink:""});_e(this,"proxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>(Of(n,r),Reflect.set(t,n,r)));_e(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});_e(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});_e(this,"dispatchContextUpdate",()=>{Of("pdp-context",this.state)});_e(this,"createProxy",t=>new Proxy(B({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return B({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Er=new Pk,P1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}Er.updateProxy(e),Of("pdp-context",e)},Ok=e=>{Er.proxy.productId=e,lo()||yn.add({context:"pdp",payload:B({},Er.state)})},Ik=e=>{Er.proxy.pdpLink=e};class Rk{constructor(){_e(this,"initialState",Eg);_e(this,"promptsStateProxy");_e(this,"promptsParamsProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Sa(n,r),Reflect.set(t,n,r)});_e(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));_e(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));_e(this,"updatePromptsParamsProxy",t=>new Proxy(B({},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 zt=new Rk,Lk=e=>{window.addEventListener(uf,e)},Dk=e=>{window.removeEventListener(uf,e)},Sa=(e,t)=>{const n=new CustomEvent(uf,{detail:{property:e,value:t}});window.dispatchEvent(n)},O1=e=>{const t=zt.isOpen,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isOpen=n},I1=e=>{const t=zt.isInline,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isInline=n},Mk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="ask_cim"},Fk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="search"},Bk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="browse"},Uk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="pdp"},Hk=({elementId:e,entryType:t,params:n,isInline:r})=>{zt.promptsStateProxy.elementId=e,t&&(zt.promptsStateProxy.entryType=t),typeof r=="boolean"&&I1(r),n&&zt.updatePromptsParamsProxy(n),zt.isOpen||O1(!0)},zk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{xa("endConversation",!0,ni.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{xa("getConversationMessages",{payload:e,callback:t},ni.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{xa("getSessionInformation",{callback:e},ni.GET_SESSION_INFORMATION)},loadConversation:e=>{xa("loadConversation",e,ni.LOAD_CONVERSATION)},resetConversation:()=>{xa("resetConversation",!0,ni.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class jk{constructor(){_e(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"queryProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const o=jv[n];return Tk(o,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(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 xt=new jk,$k=e=>{const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:me(B({},xt.state),{query:e})});return}xt.queryProxy.query=e},R1=e=>{T1(e,xt)},Vk=(e,t)=>{w1(e,t,xt)},L1=e=>{_1(e,xt)},qk=({field:e,value:t})=>{x1({field:e,value:t},xt)},Yk=e=>{S1(e,xt)},D1=e=>{v1(e,xt)},M1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&R1(e.facetFilters||{}),"rangeFilters"in e&&L1(e.rangeFilters||[]),"catalogSegment"in e&&(xt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&D1(e.pricebooks||[]),xt.queryProxy.query=e.query},Wk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:M1,updateCatalogSegment:Yk,updateFacetFilter:Vk,updateFacetFilters:R1,updatePricebooks:D1,updateRangeFilter:qk,updateRangeFilters:L1,updateSearchQuery:$k},Symbol.toStringTag,{value:"Module"})),Gk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},F1=D.createContext(Gk),Xk=({children:e})=>{const[t,n]=D.useState(ut.categoryId),[r,o]=D.useState(ut.categoryIdProxy.categoryName||""),[a,u]=D.useState(ut.facetFilters||{}),[l,d]=D.useState(ut.rangeFilters||[]),[f,p]=D.useState(ut.catalogSegment||null),[m,T]=D.useState(ut.pricebooks||null);D.useEffect(()=>{const w=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&n(v.value),(v==null?void 0:v.property)==="categoryName"&&o(v.value),(v==null?void 0:v.property)==="facetFilters"&&u(v.value),(v==null?void 0:v.property)==="rangeFilters"&&d(v.value),(v==null?void 0:v.property)==="catalogSegment"&&p(v.value),(v==null?void 0:v.property)==="pricebooks"&&T(v.value)};return g1(w),()=>{E1(w)}},[]);const y=D.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return _.jsx(F1.Provider,{value:y,children:e})},Kk=()=>{const e=D.useContext(F1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Qk={searchQuery:xt.query,facetFilters:xt.facetFilters,rangeFilters:xt.rangeFilters,catalogSegment:xt.catalogSegment,pricebooks:xt.pricebooks},B1=D.createContext(Qk),Jk=({children:e})=>{const[t,n]=D.useState(xt.query),[r,o]=D.useState(xt.facetFilters),[a,u]=D.useState(xt.rangeFilters),[l,d]=D.useState(xt.catalogSegment),[f,p]=D.useState(xt.pricebooks);D.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 p1(T),()=>{m1(T)}},[]);const m=D.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return _.jsx(B1.Provider,{value:m,children:e})},Zk=()=>{const e=D.useContext(B1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},eN={productId:Er.productId,pdpLink:Er.pdpLink},U1=D.createContext(eN),tN=({children:e})=>{const[t,n]=D.useState(Er.productId),[r,o]=D.useState(Er.pdpLink);D.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),o(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&o(l.value)};return y1(u),()=>{b1(u)}},[]);const a=D.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(U1.Provider,{value:a,children:e})},nN=()=>{const e=D.useContext(U1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},H1=D.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}),rN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=D.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=D.useState(Je.modeProxy.mode),[d,f]=D.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=D.useState(Je.dialogProxy.position),[T,y]=D.useState(Je.dialogProxy.isFullHeight),[w,v]=D.useState(Je.dialogProxy.width),[N,x]=D.useState(Je.modalProxy.isFullscreen),C=D.useRef(!1),A=Ek(d.type);D.useEffect(()=>{const Y=R=>{const{property:$,value:ne}=R.detail||{};if(!(!$||ne===void 0)){if($==="mode"){l(ne);return}if($==="entryType"){a(ne);return}if($==="isMinimized"){f(de=>me(B({},de),{isMinimized:ne}));return}if($==="isOpen"){f(de=>me(B({},de),{isOpen:ne}));return}if($==="type"){f(de=>me(B({},de),{type:ne}));return}if($==="position"){m(ne);return}if($==="isFullHeight"){y(ne);return}if($==="width"){v(ne);return}if($==="isFullscreen"){x(ne);return}}};return rk(Y),()=>{ik(Y)}},[]),_a(()=>{e&&Ta(e)}),_a(()=>{if(C.current)return;C.current=!0;const Y=n||(t==null?void 0:t.type);Y&&yl(Y);const R=tk();t&&"isOpen"in t&&ri(!!t.isOpen),t&&"isMinimized"in t&&wa(!!t.isMinimized),R&&wa(!0)}),_a(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Nf(Y),"dialogFullHeight"in t.options&&ak(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&kf(!!t.options.isModalFullscreen)});const U=D.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:A||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:N}),[u,o,d,A,p,T,w,N]);return _.jsx(H1.Provider,{value:U,children:r})},Yn=()=>{const e=D.useContext(H1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},z1=D.createContext(null),j1=D.createContext(null),If=()=>{const e=D.useContext(j1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ii=()=>{const e=D.useContext(z1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},ts=()=>{const e=D.useContext(gg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Wn=()=>{const e=D.useContext(mg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},iN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ii(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=ts(),{activeConversationId:u}=Wn(),l=D.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=D.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 D.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(v=>{var x;const N=T.find(C=>C.id===v.eventSourceId);(x=N==null?void 0:N.name)!=null&&x.endsWith("_suggestions")||(v.bypassHandlers=!0,y.unshift(v))}),y.forEach(v=>{o(v)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},$1=D.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),oN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),bt=Zk(),{searchQuery:y}=bt,w=mn(bt,["searchQuery"]),Vt=Kk(),{categoryId:v}=Vt,N=mn(Vt,["categoryId"]),{productId:x,pdpLink:C}=nN(),{setCopilot:A,setConnected:U,resetCopilot:Y,resetCopilotState:R,addCopilotEvent:$,removeLoadingMessage:ne,handleCopilotRequestAck:de,setActiveConversationId:V,setConversationIds:ie,setAskCimPrompts:fe}=ts(),{connected:we,copilot:re,messages:oe,groupedMessages:Ae,loadingMessages:se,askCimPrompts:J}=Wn(),{status:ae,entryType:k}=Yn(),{isInline:F}=ii(),{getConversationMessages:K,getSessionInformation:I}=iN({copilot:re}),Se=D.useMemo(()=>se.size>0,[se]),Me=D.useCallback(xe=>se.has(xe),[se]),ke=D.useCallback(({query:xe,facetFilters:Le,rangeFilters:Be,catalogSegment:Xe,pricebooks:gt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Ce={searchParams:{query:xe}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),Le&&Object.keys(Le).length>0&&(Ce.searchParams.facetFilters=Le),Be&&Be.length>0&&(Ce.searchParams.rangeFilters=Be),Xe&&(Ce.searchParams.catalogSegment=Xe),gt&&(Ce.searchParams.pricebooks=gt),m&&(Ce.clientContext=m),Ta("search"),re.search(Ce,Ye=>{const Re=B({},Ye);de(Re)})},[p,de,re,m]),be=D.useCallback(({categoryId:xe,categoryName:Le,facetFilters:Be,rangeFilters:Xe,catalogSegment:gt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ye=Be&&Object.keys(Be).length>0;if(xe===""&&!Ye){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:xe||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ye&&(Re.browseParams.facetFilters=Be),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),gt&&(Re.browseParams.catalogSegment=gt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||Le)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),Le&&(Re.clientContext.cimLabel=Le)),Ta("browse"),re.browse(Re,ct=>{var qr;const Xt=B({},ct),qt=((qr=Xt.request)==null?void 0:qr.clientContext)||{},dn=(qt==null?void 0:qt.cimLabel)||Le;dn&&Xt.request&&(Xt.request.label=dn),de(Xt)})},[p,de,re,m]),Ie=D.useCallback(({productId:xe,productName:Le,pdpLink:Be,userPrompt:Xe,imageFile:gt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Z={productId:xe};Xe&&(Z.userPrompt=Xe),Be&&(Z.pdpLink=Be),gt&&(Z.attachments={image:gt}),(m||Le)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),Le&&(Z.clientContext.cimLabel=Le)),T&&(Z.baseCatalogParams=T),Ta("pdp"),re.productView(Z,ge=>{var ct;const Ce=B({},ge),Ye=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ye==null?void 0:Ye.cimLabel)||Le;Re&&Ce.request&&(Ce.request.label=Re),de(Ce)})},[p,re,de,m,T]),Ue=D.useCallback(({userPrompt:xe,imageFile:Le})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Be={userPrompt:xe};Le&&(Be.attachments={image:Le}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),re.askCim(Be,Xe=>{const gt=B({},Xe);de(gt)})},[p,re,de,m,T]),lt=D.useCallback(xe=>{$(xe),l==null||l(xe)},[$,l]),cn=D.useCallback(xe=>{$(xe),d==null||d(xe)},[$,d]),Lt=D.useCallback(xe=>{u==null||u(xe),U(!0)},[u,U]);D.useEffect(()=>{!re||!we||!ae.isOpen||yn.size>0&&yn.processQueue(xe=>{if(xe.context==="search"){const Le=B({},xe.payload);M1(Le)}if(xe.context==="browse"){const Le=B({},xe.payload);N1(Le)}if(xe.context==="pdp"){const Le=B({},xe.payload);P1(Le)}})},[ae.isOpen,re,we]);const $t=D.useCallback(xe=>{const Le=Be=>{const Xe=me(B({},Be),{id:Be.inquiryLinkId||Be.id});$(Xe)};xe.on("connect_ack",Lt),xe.on("partial_inquiry",Le),xe.on("display_products",$),xe.on("progress",$),xe.on("refined_search",lt),xe.on("refined_browse",cn),xe.on("done",Be=>{ne(Be.eventSourceId)}),xe.on("error",Be=>{$(Be),ne(Be.eventSourceId)}),xe.onDisconnect(Be=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!Xe.includes(Be)){U(!1);return}p==null||p.log("De-registering event listeners");const gt=new Date().toISOString();$({name:"error",message:"Connection was lost. Please try again.",createdAt:gt,id:`error-${gt}`,sessionId:"session"}),xe.off()})},[p,U,ne,lt,cn,$,Lt]);D.useEffect(()=>{if(!re)return;const xe=Le=>{if(!F){if(!Le.message&&Le.eventSourceId&&Le.eventSourceId===J.requestId){fe({requestId:Le.eventSourceId,message:Le});return}$(Le)}};return re.on("follow_up",xe),()=>{re.off("follow_up",xe)}},[re,oe,J.requestId,F,$,fe]),D.useEffect(()=>{if(!re)return;const xe=Le=>{if(F)return;const Be=me(B({},Le),{id:Le.inquiryLinkId||Le.id});$(Be)};return re.on("inquiry",xe),()=>{re.off("inquiry",xe)}},[re,F,$]),_a(()=>{let xe;n?xe=n:xe=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Le={baseUrl:xe};e?Le.apiKey=e:t&&(Le.apiToken=t),r&&(Le.customerId=r),o&&(Le.tenantId=o);const Be=new vv(Le);return A(Be),$t(Be),Be.connect(),Be.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:gt,conversationIds:Z}=Xe.data||{};gt&&V(gt),Z!=null&&Z.length&&ie(Z)}),()=>{Be.disconnect(),Be.off(),Y()}});const Pt=D.useCallback(xe=>{if(!re)return;const Le={eventId:xe,reason:"User cancelled the request"};re.cancelRequest(Le,Be=>{$(Be),ne(xe)})},[$,ne,re]),Qn=D.useCallback(()=>{re&&re.conversationReset({},xe=>{R(),$(xe),re.requestSessionInformation(Le=>{p==null||p.log("Session Information: ",Le);const{activeConversationId:Be,conversationIds:Xe}=Le.data||{};Be&&V(Be),Xe!=null&&Xe.length&&ie(Xe)})})},[re,p,$,R,V,ie]),_n=D.useCallback((xe,Le)=>{if(!xe)return;const Be={userPrompt:xe};switch(Le&&(Be.imageFile=Le),k){case"ask_cim":Ue(Be);return;case"search":y?ke(B(B({query:y},w),Be)):Ue(Be);return;case"browse":be(B(B({categoryId:v},N),Be));return;case"pdp":x?Ie(B({productId:x,pdpLink:C||""},Be)):Ue(Be);return}},[k,y,w,ke,Ue,v,N,be,Ie,x,C]),Gt=D.useCallback((xe,Le)=>{var ge,Ce,Ye;const Xe=xe.params.userPrompt||"";if(!Xe)return;const gt=oe.find(Re=>Re.id===Le);if(!gt)return;const Z=gt.name.replace("_suggestions","");if(Z==="ask_cim"){Ue({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=gt.request)==null?void 0:ge.searchParams)||{},Xt=Re.query===y;ke(me(B({query:Re.query||y},Xt?w:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=gt.request,ct=Re.browseParams||{},qt=ct.categoryId===v,dn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";be(me(B({categoryId:ct.categoryId||v||""},qt?N:{}),{categoryName:dn,userPrompt:Xe}));return}if(Z==="product_view"){const Re=gt.request||{},ct=Re.productId,Xt=ct===x,qt=((Ye=Re.clientContext)==null?void 0:Ye.cimLabel)||"";let dn="";Xt?dn=C||"":dn=Re.pdpLink||"",Ie({productId:ct||x,pdpLink:dn,productName:qt,userPrompt:Xe})}},[oe,y,w,ke,Ue,v,N,be,Ie,x,C]),qe=D.useMemo(()=>({copilot:re,messages:oe,groupedMessages:Ae,isLoading:Se,isResponseLoading:Me,handleAskCim:Ue,handleSearch:ke,handleBrowse:be,handlePdp:Ie,handleUserInput:_n,handleSuggestion:Gt,handleCancel:Pt,resetConversation:Qn,getSessionInformation:I,getConversationMessages:K}),[re,oe,Ae,Se,Me,Ue,ke,be,Ie,_n,Gt,Pt,Qn,I,K]);return _.jsx($1.Provider,{value:qe,children:f})},V1=()=>{const{copilot:e}=Wn(),{addCopilotEvent:t}=ts();return{getCopilotSuggestions:D.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=l=>{t(l),a(l)};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])}},Rr=()=>{const e=D.useContext($1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},sN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Wn(),{entryType:o}=Yn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=ts(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Rr(),{getCopilotSuggestions:w}=V1();D.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&w({},o,C=>{l({requestId:C.id,message:null})})},[e,t,n.requestId,o,r,w,l]);const v=D.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:A}=xt.facetFiltersProxy,{rangeFilters:U}=xt.rangeFiltersProxy,{catalogSegment:Y}=xt.catalogSegmentProxy,{pricebooks:R}=xt.pricebooksProxy,$={query:C};$.facetFilters=A||{},$.rangeFilters=U||[],$.catalogSegment=Y||"",$.pricebooks=R||[],d(B({},$))},[e,d]),N=D.useCallback(({categoryId:C})=>{if(!e)return;const A=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:$}=ut.pricebooksProxy,ne={categoryId:C};ne.categoryName=A||"",ne.facetFilters=U||{},ne.rangeFilters=Y||[],ne.catalogSegment=R||"",ne.pricebooks=$||[],f(B({},ne))},[e,f]),x=D.useCallback(({productId:C})=>{if(!e||!C)return;const A={productId:C,pdpLink:Er.pdpLink,productName:Er.proxy.productName||""};p(A)},[e,p]);return D.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="query"&&v({query:A.value})};return p1(C),()=>{m1(C)}},[v]),D.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.property)==="pdp-context"){const U=A.value;x({productId:U.productId});return}(A==null?void 0:A.property)==="productId"&&x({productId:A.value})};return y1(C),()=>{b1(C)}},[x]),D.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&N({categoryId:A.value})};return g1(C),()=>{E1(C)}},[N]),D.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.event)==ni.RESET_CONVERSATION&&m(),(A==null?void 0:A.event)==ni.GET_SESSION_INFORMATION){const U=A.value.callback;T(U)}if((A==null?void 0:A.event)==ni.GET_CONVERSATION_MESSAGES){const{payload:U,callback:Y}=A.value;if(!U.conversationId||typeof Y!="function")return;y(U,Y)}if((A==null?void 0:A.event)==ni.LOAD_CONVERSATION){const U=A.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach($=>{u($)})})}};return _k(C),()=>{xk(C)}},[m,T,y,a,u]),null},aN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>_.jsxs(oN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[_.jsx(sN,{}),f]}),uN=({children:e,dispatch:t})=>{const n=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=D.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,l,d,f,p,m,T]);return _.jsx(j1.Provider,{value:y,children:e})},lN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case yt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case yt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case yt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case yt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case yt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case yt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case yt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},cN=({promptsConfig:e,children:t})=>{const[n,r]=ig(lN,me(B(B({},Eg),e||{}),{staticQuestions:Y0((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(z1.Provider,{value:n,children:_.jsx(uN,{dispatch:r,children:t})})},q1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,theme:f,openLinksInNewTab:p,onNavigate:m,globalClassName:T,isDevelopment:y=!1,componentType:w,componentConfig:v,entryType:N,initialEntry:x,entryMessage:C,disclaimerText:A,disclaimerMarkdown:U,clientContext:Y,baseCatalogParams:R,searchPlaceholder:$,searchButtonLabel:ne,searchConfig:de,suggestionButtonConfig:V,messageAlignment:ie,autoScroll:fe,promptsConfig:we,resetConversationMessage:re,conversationHistory:oe,onConnect:Ae,onCopilotEvent:se,onRefinedSearch:J,onRefinedBrowse:ae,__features:k,children:F})=>{const K=x==null?void 0:x.params;return _.jsx(ZC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:C,staticQuestions:Y0(K==null?void 0:K.staticQuestions),staticQuestionsStrategy:K==null?void 0:K.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:$,searchButtonLabel:ne,searchConfig:de,suggestionButtonConfig:V,messageAlignment:ie,autoScroll:fe,componentConfig:v,clientContext:Y,baseCatalogParams:R,disclaimerMarkdown:U,disclaimerText:A,resetConversationMessage:re,conversationHistory:oe,isDevelopment:y,__features:k,children:_.jsx(rN,{entryType:N!=null?N:x==null?void 0:x.type,componentConfig:v,componentType:w,children:_.jsx(ck,{onCopilotEvent:se,children:_.jsx(tN,{children:_.jsx(Xk,{children:_.jsx(Jk,{children:_.jsx(cN,{promptsConfig:we,children:_.jsx(aN,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:N,onConnect:Ae,onRefinedSearch:J,onRefinedBrowse:ae,onCopilotEvent:se,children:F})})})})})})})})};var Rf={exports:{}},Mn={},Lf={exports:{}},Df={};var Y1;function dN(){return Y1||(Y1=1,(function(e){function t(J,ae){var k=J.length;J.push(ae);e:for(;0<k;){var F=k-1>>>1,K=J[F];if(0<o(K,ae))J[F]=ae,J[k]=K,k=F;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var ae=J[0],k=J.pop();if(k!==ae){J[0]=k;e:for(var F=0,K=J.length,I=K>>>1;F<I;){var Se=2*(F+1)-1,Me=J[Se],ke=Se+1,be=J[ke];if(0>o(Me,k))ke<K&&0>o(be,Me)?(J[F]=be,J[ke]=k,F=ke):(J[F]=Me,J[Se]=k,F=Se);else if(ke<K&&0>o(be,k))J[F]=be,J[ke]=k,F=ke;else break e}}return ae}function o(J,ae){var k=J.sortIndex-ae.sortIndex;return k!==0?k:J.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,w=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(J){for(var ae=n(f);ae!==null;){if(ae.callback===null)r(f);else if(ae.startTime<=J)r(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(f)}}function U(J){if(v=!1,A(J),!w)if(n(d)!==null)w=!0,Ae(Y);else{var ae=n(f);ae!==null&&se(U,ae.startTime-J)}}function Y(J,ae){w=!1,v&&(v=!1,x(ne),ne=-1),y=!0;var k=T;try{for(A(ae),m=n(d);m!==null&&(!(m.expirationTime>ae)||J&&!ie());){var F=m.callback;if(typeof F=="function"){m.callback=null,T=m.priorityLevel;var K=F(m.expirationTime<=ae);ae=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),A(ae)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var Se=n(f);Se!==null&&se(U,Se.startTime-ae),I=!1}return I}finally{m=null,T=k,y=!1}}var R=!1,$=null,ne=-1,de=5,V=-1;function ie(){return!(e.unstable_now()-V<de)}function fe(){if($!==null){var J=e.unstable_now();V=J;var ae=!0;try{ae=$(!0,J)}finally{ae?we():(R=!1,$=null)}}else R=!1}var we;if(typeof C=="function")we=function(){C(fe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=fe,we=function(){oe.postMessage(null)}}else we=function(){N(fe,0)};function Ae(J){$=J,R||(R=!0,we())}function se(J,ae){ne=N(function(){J(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Ae(Y))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var ae=3;break;default:ae=T}var k=T;T=ae;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,ae){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return ae()}finally{T=k}},e.unstable_scheduleCallback=function(J,ae,k){var F=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?F+k:F):k=F,J){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=k+K,J={id:p++,callback:ae,priorityLevel:J,startTime:k,expirationTime:K,sortIndex:-1},k>F?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(x(ne),ne=-1):v=!0,se(U,k-F))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ae(Y))),J},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(J){var ae=T;return function(){var k=T;T=ae;try{return J.apply(this,arguments)}finally{T=k}}}})(Df)),Df}var W1;function fN(){return W1||(W1=1,Lf.exports=dN()),Lf.exports}var G1;function hN(){if(G1)return Mn;G1=1;var e=mr(),t=fN();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);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 l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,c,h){if(s===null||typeof s=="undefined"||y(i,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,c,h,E,b,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=S}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];N[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){N[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function C(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,c,h){var E=N.hasOwnProperty(s)?N[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,E,h)&&(c=null),h||E===null?T(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(s=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(s):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,s,c):i.setAttribute(s,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),ie=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,F;function K(i){if(F===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
11
+ `+F+i}var I=!1;function Se(i,s){if(!i||I)return"";I=!0;var c=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(ee){var h=ee}Reflect.construct(i,[],s)}else{try{s.call()}catch(ee){h=ee}i.call(s.prototype)}else{try{throw Error()}catch(ee){h=ee}i()}}catch(ee){if(ee&&h&&typeof ee.stack=="string"){for(var E=ee.stack.split(`
12
12
  `),b=h.stack.split(`
13
13
  `),S=E.length-1,L=b.length-1;1<=S&&0<=L&&E[S]!==b[L];)L--;for(;1<=S&&0<=L;S--,L--)if(E[S]!==b[L]){if(S!==1||L!==1)do if(S--,L--,0>L||E[S]!==b[L]){var H=`
14
- `+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=L);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function Me(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=xe(i.type,!1),i;case 11:return i=xe(i.type.render,!1),i;case 1:return i=xe(i.type,!0),i;default:return""}}function 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 V:return"Fragment";case R:return"Portal";case fe:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case $:return(i._context.displayName||"Context")+".Provider";case ue:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case ae:return s=i.displayName||null,s!==null?s:ke(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return ke(i(s))}catch(c){}}return null}function be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(s);case 8:return s===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ue(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function lt(i){var s=Ue(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function cn(i){i._valueTracker||(i._valueTracker=lt(i))}function Lt(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Ue(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function $t(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 Pt(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Qn(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Ie(s.value!=null?s.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function _n(i,s){s=s.checked,s!=null&&C(i,"checked",s,!1)}function Gt(i,s){_n(i,s);var c=Ie(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?bt(i,s.type,c):s.hasOwnProperty("defaultValue")&&bt(i,s.type,Ie(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function qe(i,s,c){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,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||$t(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Vt=Array.isArray;function _e(i,s,c,h){if(i=i.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=s.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ie(c),s=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Le(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Vt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Ie(c)}}function Xe(i,s){var c=Ie(s.value),h=Ie(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function gt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Z(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"?Z(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,c,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 c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={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},Xt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Xt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function qt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function dn(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=qt(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var qr=k({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 fn(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 Jn=null;function Rp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Lp=null,Os=null,Is=null;function v_(i){if(i=ku(i)){if(typeof Lp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Vc(s),Lp(i.stateNode,i.type,s))}}function A_(i){Os?Is?Is.push(i):Is=[i]:Os=i}function C_(){if(Os){var i=Os,s=Is;if(Is=Os=null,v_(i),s)for(i=0;i<s.length;i++)v_(s[i])}}function k_(i,s){return i(s)}function N_(){}var Dp=!1;function P_(i,s,c){if(Dp)return i(s,c);Dp=!0;try{return k_(i,s,c)}finally{Dp=!1,(Os!==null||Is!==null)&&(N_(),C_())}}function au(i,s){var c=i.stateNode;if(c===null)return null;var h=Vc(c);if(h===null)return null;c=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(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Mp=!1;if(l)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch(i){Mp=!1}function V7(i,s,c,h,E,b,S,L,H){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(c,ee)}catch(de){this.onError(de)}}var lu=!1,_c=null,xc=!1,Fp=null,q7={onError:function(i){lu=!0,_c=i}};function Y7(i,s,c,h,E,b,S,L,H){lu=!1,_c=null,V7.apply(q7,arguments)}function W7(i,s,c,h,E,b,S,L,H){if(Y7.apply(this,arguments),lu){if(lu){var ee=_c;lu=!1,_c=null}else throw Error(n(198));xc||(xc=!0,Fp=ee)}}function Oo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function O_(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 I_(i){if(Oo(i)!==i)throw Error(n(188))}function G7(i){var s=i.alternate;if(!s){if(s=Oo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,h=s;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return I_(E),i;if(b===h)return I_(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,L=E.child;L;){if(L===c){S=!0,c=E,h=b;break}if(L===h){S=!0,h=E,c=b;break}L=L.sibling}if(!S){for(L=b.child;L;){if(L===c){S=!0,c=b,h=E;break}if(L===h){S=!0,h=b,c=E;break}L=L.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function R_(i){return i=G7(i),i!==null?L_(i):null}function L_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=L_(i);if(s!==null)return s;i=i.sibling}return null}var D_=t.unstable_scheduleCallback,M_=t.unstable_cancelCallback,X7=t.unstable_shouldYield,K7=t.unstable_requestPaint,Bt=t.unstable_now,Q7=t.unstable_getCurrentPriorityLevel,Bp=t.unstable_ImmediatePriority,F_=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,J7=t.unstable_LowPriority,B_=t.unstable_IdlePriority,vc=null,Wr=null;function Z7(i){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(vc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var xr=Math.clz32?Math.clz32:nB,eB=Math.log,tB=Math.LN2;function nB(i){return i>>>=0,i===0?32:31-(eB(i)/tB|0)|0}var Ac=64,Cc=4194304;function cu(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 kc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=c&268435455;if(S!==0){var L=S&~E;L!==0?h=cu(L):(b&=S,b!==0&&(h=cu(b)))}else S=c&~E,S!==0?h=cu(S):b!==0&&(h=cu(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|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)c=31-xr(s),E=1<<c,h|=i[c],s&=~E;return h}function rB(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 iB(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-xr(b),L=1<<S,H=E[S];H===-1?((L&c)===0||(L&h)!==0)&&(E[S]=rB(L,s)):H<=s&&(i.expiredLanes|=L),b&=~L}}function Up(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function U_(){var i=Ac;return Ac<<=1,(Ac&4194240)===0&&(Ac=64),i}function Hp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function du(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-xr(s),i[s]=c}function oB(i,s){var c=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<c;){var E=31-xr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function zp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-xr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function H_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var z_,jp,j_,$_,V_,$p=!1,Nc=[],Li=null,Di=null,Mi=null,fu=new Map,hu=new Map,Fi=[],sB="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 q_(i,s){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":fu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hu.delete(s.pointerId)}}function pu(i,s,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=ku(s),s!==null&&jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function aB(i,s,c,h,E){switch(s){case"focusin":return Li=pu(Li,i,s,c,h,E),!0;case"dragenter":return Di=pu(Di,i,s,c,h,E),!0;case"mouseover":return Mi=pu(Mi,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return fu.set(b,pu(fu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,hu.set(b,pu(hu.get(b)||null,i,s,c,h,E)),!0}return!1}function Y_(i){var s=Io(i.target);if(s!==null){var c=Oo(s);if(c!==null){if(s=c.tag,s===13){if(s=O_(c),s!==null){i.blockedOn=s,V_(i.priority,function(){j_(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=qp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Jn=h,c.target.dispatchEvent(h),Jn=null}else return s=ku(c),s!==null&&jp(s),i.blockedOn=c,!1;s.shift()}return!0}function W_(i,s,c){Pc(i)&&c.delete(s)}function uB(){$p=!1,Li!==null&&Pc(Li)&&(Li=null),Di!==null&&Pc(Di)&&(Di=null),Mi!==null&&Pc(Mi)&&(Mi=null),fu.forEach(W_),hu.forEach(W_)}function mu(i,s){i.blockedOn===s&&(i.blockedOn=null,$p||($p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uB)))}function gu(i){function s(E){return mu(E,i)}if(0<Nc.length){mu(Nc[0],i);for(var c=1;c<Nc.length;c++){var h=Nc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&mu(Li,i),Di!==null&&mu(Di,i),Mi!==null&&mu(Mi,i),fu.forEach(s),hu.forEach(s),c=0;c<Fi.length;c++)h=Fi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(c=Fi[0],c.blockedOn===null);)Y_(c),c.blockedOn===null&&Fi.shift()}var Rs=U.ReactCurrentBatchConfig,Oc=!0;function lB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=1,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function cB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=4,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function Vp(i,s,c,h){if(Oc){var E=qp(i,s,c,h);if(E===null)um(i,s,h,Ic,c),q_(i,h);else if(aB(E,i,s,c,h))h.stopPropagation();else if(q_(i,h),s&4&&-1<sB.indexOf(i)){for(;E!==null;){var b=ku(E);if(b!==null&&z_(b),b=qp(i,s,c,h),b===null&&um(i,s,h,Ic,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else um(i,s,h,null,c)}}var Ic=null;function qp(i,s,c,h){if(Ic=null,i=Rp(h),i=Io(i),i!==null)if(s=Oo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=O_(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ic=i,null}function G_(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(Q7()){case Bp:return 1;case F_:return 4;case Sc:case J7:return 16;case B_:return 536870912;default:return 16}default:return 16}}var Bi=null,Yp=null,Rc=null;function X_(){if(Rc)return Rc;var i,s=Yp,c=s.length,h,E="value"in Bi?Bi.value:Bi.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&s[c-h]===E[b-h];h++);return Rc=E.slice(i,1<h?1-h:void 0)}function Lc(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 Dc(){return!0}function K_(){return!1}function Zn(i){function s(c,h,E,b,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Dc:K_,this.isPropagationStopped=K_,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),s}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=Zn(Ls),Eu=k({},Ls,{view:0,detail:0}),dB=Zn(Eu),Gp,Xp,yu,Mc=k({},Eu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qp,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!==yu&&(yu&&i.type==="mousemove"?(Gp=i.screenX-yu.screenX,Xp=i.screenY-yu.screenY):Xp=Gp=0,yu=i),Gp)},movementY:function(i){return"movementY"in i?i.movementY:Xp}}),Q_=Zn(Mc),fB=k({},Mc,{dataTransfer:0}),hB=Zn(fB),pB=k({},Eu,{relatedTarget:0}),Kp=Zn(pB),mB=k({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),gB=Zn(mB),EB=k({},Ls,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yB=Zn(EB),bB=k({},Ls,{data:0}),J_=Zn(bB),TB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wB={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"},_B={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=_B[i])?!!s[i]:!1}function Qp(){return xB}var SB=k({},Eu,{key:function(i){if(i.key){var s=TB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qp,charCode:function(i){return i.type==="keypress"?Lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vB=Zn(SB),AB=k({},Mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z_=Zn(AB),CB=k({},Eu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qp}),kB=Zn(CB),NB=k({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Zn(NB),OB=k({},Mc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),IB=Zn(OB),RB=[9,13,27,32],Jp=l&&"CompositionEvent"in window,bu=null;l&&"documentMode"in document&&(bu=document.documentMode);var LB=l&&"TextEvent"in window&&!bu,ex=l&&(!Jp||bu&&8<bu&&11>=bu),tx=" ",nx=!1;function rx(i,s){switch(i){case"keyup":return RB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ix(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ds=!1;function DB(i,s){switch(i){case"compositionend":return ix(s);case"keypress":return s.which!==32?null:(nx=!0,tx);case"textInput":return i=s.data,i===tx&&nx?null:i;default:return null}}function MB(i,s){if(Ds)return i==="compositionend"||!Jp&&rx(i,s)?(i=X_(),Rc=Yp=Bi=null,Ds=!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 ex&&s.locale!=="ko"?null:s.data;default:return null}}var FB={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 ox(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!FB[i.type]:s==="textarea"}function sx(i,s,c,h){A_(h),s=zc(s,"onChange"),0<s.length&&(c=new Wp("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Tu=null,wu=null;function BB(i){Sx(i,0)}function Fc(i){var s=Hs(i);if(Lt(s))return i}function UB(i,s){if(i==="change")return s}var ax=!1;if(l){var Zp;if(l){var em="oninput"in document;if(!em){var ux=document.createElement("div");ux.setAttribute("oninput","return;"),em=typeof ux.oninput=="function"}Zp=em}else Zp=!1;ax=Zp&&(!document.documentMode||9<document.documentMode)}function lx(){Tu&&(Tu.detachEvent("onpropertychange",cx),wu=Tu=null)}function cx(i){if(i.propertyName==="value"&&Fc(wu)){var s=[];sx(s,wu,i,Rp(i)),P_(BB,s)}}function HB(i,s,c){i==="focusin"?(lx(),Tu=s,wu=c,Tu.attachEvent("onpropertychange",cx)):i==="focusout"&&lx()}function zB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Fc(wu)}function jB(i,s){if(i==="click")return Fc(s)}function $B(i,s){if(i==="input"||i==="change")return Fc(s)}function VB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:VB;function _u(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(s,E)||!Sr(i[E],s[E]))return!1}return!0}function dx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function fx(i,s){var c=dx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=dx(c)}}function hx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?hx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function px(){for(var i=window,s=$t();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=$t(i.document)}return s}function tm(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 qB(i){var s=px(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&hx(c.ownerDocument.documentElement,c)){if(h!==null&&tm(c)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=fx(c,b);var S=fx(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var YB=l&&"documentMode"in document&&11>=document.documentMode,Ms=null,nm=null,xu=null,rm=!1;function mx(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;rm||Ms==null||Ms!==$t(h)||(h=Ms,"selectionStart"in h&&tm(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}),xu&&_u(xu,h)||(xu=h,h=zc(nm,"onSelect"),0<h.length&&(s=new Wp("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ms)))}function Bc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Fs={animationend:Bc("Animation","AnimationEnd"),animationiteration:Bc("Animation","AnimationIteration"),animationstart:Bc("Animation","AnimationStart"),transitionend:Bc("Transition","TransitionEnd")},im={},gx={};l&&(gx=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function Uc(i){if(im[i])return im[i];if(!Fs[i])return i;var s=Fs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in gx)return im[i]=s[c];return i}var Ex=Uc("animationend"),yx=Uc("animationiteration"),bx=Uc("animationstart"),Tx=Uc("transitionend"),wx=new Map,_x="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ui(i,s){wx.set(i,s),a(s,[i])}for(var om=0;om<_x.length;om++){var sm=_x[om],WB=sm.toLowerCase(),GB=sm[0].toUpperCase()+sm.slice(1);Ui(WB,"on"+GB)}Ui(Ex,"onAnimationEnd"),Ui(yx,"onAnimationIteration"),Ui(bx,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(Tx,"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(" "),XB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function xx(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,W7(h,s,void 0,i),i.currentTarget=null}function Sx(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var S=h.length-1;0<=S;S--){var L=h[S],H=L.instance,ee=L.currentTarget;if(L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}else for(S=0;S<h.length;S++){if(L=h[S],H=L.instance,ee=L.currentTarget,L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}}}if(xc)throw i=Fp,xc=!1,Fp=null,i}function St(i,s){var c=s[pm];c===void 0&&(c=s[pm]=new Set);var h=i+"__bubble";c.has(h)||(vx(s,i,2,!1),c.add(h))}function am(i,s,c){var h=0;s&&(h|=4),vx(c,i,h,s)}var Hc="_reactListening"+Math.random().toString(36).slice(2);function vu(i){if(!i[Hc]){i[Hc]=!0,r.forEach(function(c){c!=="selectionchange"&&(XB.has(c)||am(c,!1,i),am(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Hc]||(s[Hc]=!0,am("selectionchange",!1,s))}}function vx(i,s,c,h){switch(G_(s)){case 1:var E=lB;break;case 4:E=cB;break;default:E=Vp}c=E.bind(null,s,c,i),E=void 0,!Mp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,c,{capture:!0,passive:E}):i.addEventListener(s,c,!0):E!==void 0?i.addEventListener(s,c,{passive:E}):i.addEventListener(s,c,!1)}function um(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;L!==null;){if(S=Io(L),S===null)return;if(H=S.tag,H===5||H===6){h=b=S;continue e}L=L.parentNode}}h=h.return}P_(function(){var ee=b,de=Rp(c),pe=[];e:{var le=wx.get(i);if(le!==void 0){var Se=Wp,Pe=i;switch(i){case"keypress":if(Lc(c)===0)break e;case"keydown":case"keyup":Se=vB;break;case"focusin":Pe="focus",Se=Kp;break;case"focusout":Pe="blur",Se=Kp;break;case"beforeblur":case"afterblur":Se=Kp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":Se=Q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Se=hB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Se=kB;break;case Ex:case yx:case bx:Se=gB;break;case Tx:Se=PB;break;case"scroll":Se=dB;break;case"wheel":Se=IB;break;case"copy":case"cut":case"paste":Se=yB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Se=Z_}var Oe=(s&4)!==0,Ut=!Oe&&i==="scroll",G=Oe?le!==null?le+"Capture":null:le;Oe=[];for(var q=ee,Q;q!==null;){Q=q;var ye=Q.stateNode;if(Q.tag===5&&ye!==null&&(Q=ye,G!==null&&(ye=au(q,G),ye!=null&&Oe.push(Au(q,ye,Q)))),Ut)break;q=q.return}0<Oe.length&&(le=new Se(le,Pe,null,c,de),pe.push({event:le,listeners:Oe}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",Se=i==="mouseout"||i==="pointerout",le&&c!==Jn&&(Pe=c.relatedTarget||c.fromElement)&&(Io(Pe)||Pe[fi]))break e;if((Se||le)&&(le=de.window===de?de:(le=de.ownerDocument)?le.defaultView||le.parentWindow:window,Se?(Pe=c.relatedTarget||c.toElement,Se=ee,Pe=Pe?Io(Pe):null,Pe!==null&&(Ut=Oo(Pe),Pe!==Ut||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(Se=null,Pe=ee),Se!==Pe)){if(Oe=Q_,ye="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=Z_,ye="onPointerLeave",G="onPointerEnter",q="pointer"),Ut=Se==null?le:Hs(Se),Q=Pe==null?le:Hs(Pe),le=new Oe(ye,q+"leave",Se,c,de),le.target=Ut,le.relatedTarget=Q,ye=null,Io(de)===ee&&(Oe=new Oe(G,q+"enter",Pe,c,de),Oe.target=Q,Oe.relatedTarget=Ut,ye=Oe),Ut=ye,Se&&Pe)t:{for(Oe=Se,G=Pe,q=0,Q=Oe;Q;Q=Bs(Q))q++;for(Q=0,ye=G;ye;ye=Bs(ye))Q++;for(;0<q-Q;)Oe=Bs(Oe),q--;for(;0<Q-q;)G=Bs(G),Q--;for(;q--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Bs(Oe),G=Bs(G)}Oe=null}else Oe=null;Se!==null&&Ax(pe,le,Se,Oe,!1),Pe!==null&&Ut!==null&&Ax(pe,Ut,Pe,Oe,!0)}}e:{if(le=ee?Hs(ee):window,Se=le.nodeName&&le.nodeName.toLowerCase(),Se==="select"||Se==="input"&&le.type==="file")var De=UB;else if(ox(le))if(ax)De=$B;else{De=zB;var je=HB}else(Se=le.nodeName)&&Se.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(De=jB);if(De&&(De=De(i,ee))){sx(pe,De,c,de);break e}je&&je(i,le,ee),i==="focusout"&&(je=le._wrapperState)&&je.controlled&&le.type==="number"&&bt(le,"number",le.value)}switch(je=ee?Hs(ee):window,i){case"focusin":(ox(je)||je.contentEditable==="true")&&(Ms=je,nm=ee,xu=null);break;case"focusout":xu=nm=Ms=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,mx(pe,c,de);break;case"selectionchange":if(YB)break;case"keydown":case"keyup":mx(pe,c,de)}var $e;if(Jp)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 Ds?rx(i,c)&&(We="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&(ex&&c.locale!=="ko"&&(Ds||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ds&&($e=X_()):(Bi=de,Yp="value"in Bi?Bi.value:Bi.textContent,Ds=!0)),je=zc(ee,We),0<je.length&&(We=new J_(We,i,null,c,de),pe.push({event:We,listeners:je}),$e?We.data=$e:($e=ix(c),$e!==null&&(We.data=$e)))),($e=LB?DB(i,c):MB(i,c))&&(ee=zc(ee,"onBeforeInput"),0<ee.length&&(de=new J_("onBeforeInput","beforeinput",null,c,de),pe.push({event:de,listeners:ee}),de.data=$e))}Sx(pe,s)})}function Au(i,s,c){return{instance:i,listener:s,currentTarget:c}}function zc(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=au(i,c),b!=null&&h.unshift(Au(i,b,E)),b=au(i,s),b!=null&&h.push(Au(i,b,E))),i=i.return}return h}function Bs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Ax(i,s,c,h,E){for(var b=s._reactName,S=[];c!==null&&c!==h;){var L=c,H=L.alternate,ee=L.stateNode;if(H!==null&&H===h)break;L.tag===5&&ee!==null&&(L=ee,E?(H=au(c,b),H!=null&&S.unshift(Au(c,H,L))):E||(H=au(c,b),H!=null&&S.push(Au(c,H,L)))),c=c.return}S.length!==0&&i.push({event:s,listeners:S})}var KB=/\r\n?/g,QB=/\u0000|\uFFFD/g;function Cx(i){return(typeof i=="string"?i:""+i).replace(KB,`
15
- `).replace(QB,"")}function jc(i,s,c){if(s=Cx(s),Cx(i)!==s&&c)throw Error(n(425))}function $c(){}var lm=null,cm=null;function dm(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 fm=typeof setTimeout=="function"?setTimeout:void 0,JB=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,ZB=typeof queueMicrotask=="function"?queueMicrotask:typeof kx!="undefined"?function(i){return kx.resolve(null).then(i).catch(eU)}:fm;function eU(i){setTimeout(function(){throw i})}function hm(i,s){var c=s,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),gu(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);gu(s)}function Hi(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 Nx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var Us=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Us,Cu="__reactProps$"+Us,fi="__reactContainer$"+Us,pm="__reactEvents$"+Us,tU="__reactListeners$"+Us,nU="__reactHandles$"+Us;function Io(i){var s=i[Gr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[fi]||c[Gr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Nx(i);i!==null;){if(c=i[Gr])return c;i=Nx(i)}return s}i=c,c=i.parentNode}return null}function ku(i){return i=i[Gr]||i[fi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Hs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Vc(i){return i[Cu]||null}var mm=[],zs=-1;function zi(i){return{current:i}}function vt(i){0>zs||(i.current=mm[zs],mm[zs]=null,zs--)}function Tt(i,s){zs++,mm[zs]=i.current,i.current=s}var ji={},xn=zi(ji),zn=zi(!1),Ro=ji;function js(i,s){var c=i.type.contextTypes;if(!c)return ji;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function qc(){vt(zn),vt(xn)}function Px(i,s,c){if(xn.current!==ji)throw Error(n(168));Tt(xn,s),Tt(zn,c)}function Ox(i,s,c){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,be(i)||"Unknown",E));return k({},c,h)}function Yc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ji,Ro=xn.current,Tt(xn,i),Tt(zn,zn.current),!0}function Ix(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Ox(i,s,Ro),h.__reactInternalMemoizedMergedChildContext=i,vt(zn),vt(xn),Tt(xn,i)):vt(zn),Tt(zn,c)}var hi=null,Wc=!1,gm=!1;function Rx(i){hi===null?hi=[i]:hi.push(i)}function rU(i){Wc=!0,Rx(i)}function $i(){if(!gm&&hi!==null){gm=!0;var i=0,s=dt;try{var c=hi;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}hi=null,Wc=!1}catch(E){throw hi!==null&&(hi=hi.slice(i+1)),D_(Bp,$i),E}finally{dt=s,gm=!1}}return null}var $s=[],Vs=0,Gc=null,Xc=0,lr=[],cr=0,Lo=null,pi=1,mi="";function Do(i,s){$s[Vs++]=Xc,$s[Vs++]=Gc,Gc=i,Xc=s}function Lx(i,s,c){lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,Lo=i;var h=pi;i=mi;var E=32-xr(h)-1;h&=~(1<<E),c+=1;var b=32-xr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,pi=1<<32-xr(s)+E|c<<E|h,mi=b+i}else pi=1<<b|c<<E|h,mi=i}function Em(i){i.return!==null&&(Do(i,1),Lx(i,1,0))}function ym(i){for(;i===Gc;)Gc=$s[--Vs],$s[Vs]=null,Xc=$s[--Vs],$s[Vs]=null;for(;i===Lo;)Lo=lr[--cr],lr[cr]=null,mi=lr[--cr],lr[cr]=null,pi=lr[--cr],lr[cr]=null}var er=null,tr=null,kt=!1,vr=null;function Dx(i,s){var c=pr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function Mx(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,er=i,tr=Hi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,er=i,tr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Lo!==null?{id:pi,overflow:mi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=pr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,er=i,tr=null,!0):!1;default:return!1}}function bm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tm(i){if(kt){var s=tr;if(s){var c=s;if(!Mx(i,s)){if(bm(i))throw Error(n(418));s=Hi(c.nextSibling);var h=er;s&&Mx(i,s)?Dx(h,c):(i.flags=i.flags&-4097|2,kt=!1,er=i)}}else{if(bm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,er=i}}}function Fx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;er=i}function Kc(i){if(i!==er)return!1;if(!kt)return Fx(i),kt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!dm(i.type,i.memoizedProps)),s&&(s=tr)){if(bm(i))throw Bx(),Error(n(418));for(;s;)Dx(i,s),s=Hi(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 c=i.data;if(c==="/$"){if(s===0){tr=Hi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}tr=null}}else tr=er?Hi(i.stateNode.nextSibling):null;return!0}function Bx(){for(var i=tr;i;)i=Hi(i.nextSibling)}function qs(){tr=er=null,kt=!1}function wm(i){vr===null?vr=[i]:vr.push(i)}var iU=U.ReactCurrentBatchConfig;function Nu(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(S){var L=E.refs;S===null?delete L[b]:L[b]=S},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Qc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Ux(i){var s=i._init;return s(i._payload)}function Hx(i){function s(G,q){if(i){var Q=G.deletions;Q===null?(G.deletions=[q],G.flags|=16):Q.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)s(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=Qi(G,q),G.index=0,G.sibling=null,G}function b(G,q,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<q?(G.flags|=2,q):Q):(G.flags|=2,q)):(G.flags|=1048576,q)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,q,Q,ye){return q===null||q.tag!==6?(q=f0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q),q.return=G,q)}function H(G,q,Q,ye){var De=Q.type;return De===V?de(G,q,Q.props.children,ye,Q.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===q.type)?(ye=E(q,Q.props),ye.ref=Nu(G,q,Q),ye.return=G,ye):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,ye)}function ee(G,q,Q,ye){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=h0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q.children||[]),q.return=G,q)}function de(G,q,Q,ye,De){return q===null||q.tag!==7?(q=$o(Q,G.mode,ye,De),q.return=G,q):(q=E(q,Q),q.return=G,q)}function pe(G,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number")return q=f0(""+q,G.mode,Q),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case Y:return Q=wd(q.type,q.key,q.props,null,G.mode,Q),Q.ref=Nu(G,null,q),Q.return=G,Q;case R:return q=h0(q,G.mode,Q),q.return=G,q;case Ae:var ye=q._init;return pe(G,ye(q._payload),Q)}if(Vt(q)||se(q))return q=$o(q,G.mode,Q,null),q.return=G,q;Qc(G,q)}return null}function le(G,q,Q,ye){var De=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return De!==null?null:L(G,q,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===De?H(G,q,Q,ye):null;case R:return Q.key===De?ee(G,q,Q,ye):null;case Ae:return De=Q._init,le(G,q,De(Q._payload),ye)}if(Vt(Q)||se(Q))return De!==null?null:de(G,q,Q,ye,null);Qc(G,Q)}return null}function Se(G,q,Q,ye,De){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(Q)||null,L(q,G,""+ye,De);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Y:return G=G.get(ye.key===null?Q:ye.key)||null,H(q,G,ye,De);case R:return G=G.get(ye.key===null?Q:ye.key)||null,ee(q,G,ye,De);case Ae:var je=ye._init;return Se(G,q,Q,je(ye._payload),De)}if(Vt(ye)||se(ye))return G=G.get(Q)||null,de(q,G,ye,De,null);Qc(q,ye)}return null}function Pe(G,q,Q,ye){for(var De=null,je=null,$e=q,We=q=0,un=null;$e!==null&&We<Q.length;We++){$e.index>We?(un=$e,$e=null):un=$e.sibling;var st=le(G,$e,Q[We],ye);if(st===null){$e===null&&($e=un);break}i&&$e&&st.alternate===null&&s(G,$e),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st,$e=un}if(We===Q.length)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;We<Q.length;We++)$e=pe(G,Q[We],ye),$e!==null&&(q=b($e,q,We),je===null?De=$e:je.sibling=$e,je=$e);return kt&&Do(G,We),De}for($e=h(G,$e);We<Q.length;We++)un=Se($e,G,We,Q[We],ye),un!==null&&(i&&un.alternate!==null&&$e.delete(un.key===null?We:un.key),q=b(un,q,We),je===null?De=un:je.sibling=un,je=un);return i&&$e.forEach(function(Ji){return s(G,Ji)}),kt&&Do(G,We),De}function Oe(G,q,Q,ye){var De=se(Q);if(typeof De!="function")throw Error(n(150));if(Q=De.call(Q),Q==null)throw Error(n(151));for(var je=De=null,$e=q,We=q=0,un=null,st=Q.next();$e!==null&&!st.done;We++,st=Q.next()){$e.index>We?(un=$e,$e=null):un=$e.sibling;var Ji=le(G,$e,st.value,ye);if(Ji===null){$e===null&&($e=un);break}i&&$e&&Ji.alternate===null&&s(G,$e),q=b(Ji,q,We),je===null?De=Ji:je.sibling=Ji,je=Ji,$e=un}if(st.done)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;!st.done;We++,st=Q.next())st=pe(G,st.value,ye),st!==null&&(q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return kt&&Do(G,We),De}for($e=h(G,$e);!st.done;We++,st=Q.next())st=Se($e,G,We,st.value,ye),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?We:st.key),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return i&&$e.forEach(function(FU){return s(G,FU)}),kt&&Do(G,We),De}function Ut(G,q,Q,ye){if(typeof Q=="object"&&Q!==null&&Q.type===V&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var De=Q.key,je=q;je!==null;){if(je.key===De){if(De=Q.type,De===V){if(je.tag===7){c(G,je.sibling),q=E(je,Q.props.children),q.return=G,G=q;break e}}else if(je.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===je.type){c(G,je.sibling),q=E(je,Q.props),q.ref=Nu(G,je,Q),q.return=G,G=q;break e}c(G,je);break}else s(G,je);je=je.sibling}Q.type===V?(q=$o(Q.props.children,G.mode,ye,Q.key),q.return=G,G=q):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,G=ye)}return S(G);case R:e:{for(je=Q.key;q!==null;){if(q.key===je)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){c(G,q.sibling),q=E(q,Q.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else s(G,q);q=q.sibling}q=h0(Q,G.mode,ye),q.return=G,G=q}return S(G);case Ae:return je=Q._init,Ut(G,q,je(Q._payload),ye)}if(Vt(Q))return Pe(G,q,Q,ye);if(se(Q))return Oe(G,q,Q,ye);Qc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,Q),q.return=G,G=q):(c(G,q),q=f0(Q,G.mode,ye),q.return=G,G=q),S(G)):c(G,q)}return Ut}var Ys=Hx(!0),zx=Hx(!1),Jc=zi(null),Zc=null,Ws=null,_m=null;function xm(){_m=Ws=Zc=null}function Sm(i){var s=Jc.current;vt(Jc),i._currentValue=s}function vm(i,s,c){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===c)break;i=i.return}}function Gs(i,s){Zc=i,_m=Ws=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&($n=!0),i.firstContext=null)}function dr(i){var s=i._currentValue;if(_m!==i)if(i={context:i,memoizedValue:s,next:null},Ws===null){if(Zc===null)throw Error(n(308));Ws=i,Zc.dependencies={lanes:0,firstContext:i}}else Ws=Ws.next=i;return s}var Mo=null;function Am(i){Mo===null?Mo=[i]:Mo.push(i)}function jx(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,Am(s)):(c.next=E.next,E.next=c),s.interleaved=c,gi(i,h)}function gi(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Vi=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $x(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 Ei(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function qi(i,s,c){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,gi(i,c)}return E=h.interleaved,E===null?(s.next=s,Am(h)):(s.next=E.next,E.next=s),h.interleaved=s,gi(i,c)}function ed(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}function Vx(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=S:b=b.next=S,c=c.next}while(c!==null);b===null?E=b=s:b=b.next=s}else E=b=s;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function td(i,s,c,h){var E=i.updateQueue;Vi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,ee=H.next;H.next=null,S===null?b=ee:S.next=ee,S=H;var de=i.alternate;de!==null&&(de=de.updateQueue,L=de.lastBaseUpdate,L!==S&&(L===null?de.firstBaseUpdate=ee:L.next=ee,de.lastBaseUpdate=H))}if(b!==null){var pe=E.baseState;S=0,de=ee=H=null,L=b;do{var le=L.lane,Se=L.eventTime;if((h&le)===le){de!==null&&(de=de.next={eventTime:Se,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Pe=i,Oe=L;switch(le=s,Se=c,Oe.tag){case 1:if(Pe=Oe.payload,typeof Pe=="function"){pe=Pe.call(Se,pe,le);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Oe.payload,le=typeof Pe=="function"?Pe.call(Se,pe,le):Pe,le==null)break e;pe=k({},pe,le);break e;case 2:Vi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[L]:le.push(L))}else Se={eventTime:Se,lane:le,tag:L.tag,payload:L.payload,callback:L.callback,next:null},de===null?(ee=de=Se,H=pe):de=de.next=Se,S|=le;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;le=L,L=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(de===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=ee,E.lastBaseUpdate=de,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Uo|=S,i.lanes=S,i.memoizedState=pe}}function qx(i,s,c){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=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Pu={},Xr=zi(Pu),Ou=zi(Pu),Iu=zi(Pu);function Fo(i){if(i===Pu)throw Error(n(174));return i}function km(i,s){switch(Tt(Iu,s),Tt(Ou,i),Tt(Xr,Pu),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)}vt(Xr),Tt(Xr,s)}function Xs(){vt(Xr),vt(Ou),vt(Iu)}function Yx(i){Fo(Iu.current);var s=Fo(Xr.current),c=ge(s,i.type);s!==c&&(Tt(Ou,i),Tt(Xr,c))}function Nm(i){Ou.current===i&&(vt(Xr),vt(Ou))}var Ot=zi(0);function nd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.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 Pm=[];function Om(){for(var i=0;i<Pm.length;i++)Pm[i]._workInProgressVersionPrimary=null;Pm.length=0}var rd=U.ReactCurrentDispatcher,Im=U.ReactCurrentBatchConfig,Bo=0,It=null,Kt=null,sn=null,id=!1,Ru=!1,Lu=0,oU=0;function Sn(){throw Error(n(321))}function Rm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Sr(i[c],s[c]))return!1;return!0}function Lm(i,s,c,h,E,b){if(Bo=b,It=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rd.current=i===null||i.memoizedState===null?lU:cU,i=c(h,E),Ru){b=0;do{if(Ru=!1,Lu=0,25<=b)throw Error(n(301));b+=1,sn=Kt=null,s.updateQueue=null,rd.current=dU,i=c(h,E)}while(Ru)}if(rd.current=ad,s=Kt!==null&&Kt.next!==null,Bo=0,sn=Kt=It=null,id=!1,s)throw Error(n(300));return i}function Dm(){var i=Lu!==0;return Lu=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?It.memoizedState=sn=i:sn=sn.next=i,sn}function fr(){if(Kt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Kt.next;var s=sn===null?It.memoizedState:sn.next;if(s!==null)sn=s,Kt=i;else{if(i===null)throw Error(n(310));Kt=i,i={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},sn===null?It.memoizedState=sn=i:sn=sn.next=i}return sn}function Du(i,s){return typeof s=="function"?s(i):s}function Mm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Kt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=S=null,H=null,ee=b;do{var de=ee.lane;if((Bo&de)===de)H!==null&&(H=H.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var pe={lane:de,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};H===null?(L=H=pe,S=h):H=H.next=pe,It.lanes|=de,Uo|=de}ee=ee.next}while(ee!==null&&ee!==b);H===null?S=h:H.next=L,Sr(h,s.memoizedState)||($n=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=H,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,It.lanes|=b,Uo|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Fm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=s.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Sr(b,s.memoizedState)||($n=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Wx(){}function Gx(i,s){var c=It,h=fr(),E=s(),b=!Sr(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,Bm(Qx.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||sn!==null&&sn.memoizedState.tag&1){if(c.flags|=2048,Mu(9,Kx.bind(null,c,h,E,s),void 0,null),an===null)throw Error(n(349));(Bo&30)!==0||Xx(c,s,E)}return E}function Xx(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Kx(i,s,c,h){s.value=c,s.getSnapshot=h,Jx(s)&&Zx(i)}function Qx(i,s,c){return c(function(){Jx(s)&&Zx(i)})}function Jx(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Sr(i,c)}catch(h){return!0}}function Zx(i){var s=gi(i,1);s!==null&&Nr(s,i,1,-1)}function e2(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:Du,lastRenderedState:i},s.queue=i,i=i.dispatch=uU.bind(null,It,i),[s.memoizedState,i]}function Mu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i)),i}function t2(){return fr().memoizedState}function od(i,s,c,h){var E=Kr();It.flags|=i,E.memoizedState=Mu(1|s,c,void 0,h===void 0?null:h)}function sd(i,s,c,h){var E=fr();h=h===void 0?null:h;var b=void 0;if(Kt!==null){var S=Kt.memoizedState;if(b=S.destroy,h!==null&&Rm(h,S.deps)){E.memoizedState=Mu(s,c,b,h);return}}It.flags|=i,E.memoizedState=Mu(1|s,c,b,h)}function n2(i,s){return od(8390656,8,i,s)}function Bm(i,s){return sd(2048,8,i,s)}function r2(i,s){return sd(4,2,i,s)}function i2(i,s){return sd(4,4,i,s)}function o2(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 s2(i,s,c){return c=c!=null?c.concat([i]):null,sd(4,4,o2.bind(null,s,i),c)}function Um(){}function a2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function u2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function l2(i,s,c){return(Bo&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=c):(Sr(c,s)||(c=U_(),It.lanes|=c,Uo|=c,i.baseState=!0),s)}function sU(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=Im.transition;Im.transition={};try{i(!1),s()}finally{dt=c,Im.transition=h}}function c2(){return fr().memoizedState}function aU(i,s,c){var h=Xi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},d2(i))f2(s,c);else if(c=jx(i,s,c,h),c!==null){var E=In();Nr(c,i,h,E),h2(c,s,h)}}function uU(i,s,c){var h=Xi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(d2(i))f2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var S=s.lastRenderedState,L=b(S,c);if(E.hasEagerState=!0,E.eagerState=L,Sr(L,S)){var H=s.interleaved;H===null?(E.next=E,Am(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(ee){}c=jx(i,s,E,h),c!==null&&(E=In(),Nr(c,i,h,E),h2(c,s,h))}}function d2(i){var s=i.alternate;return i===It||s!==null&&s===It}function f2(i,s){Ru=id=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function h2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}var ad={readContext:dr,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},lU={readContext:dr,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:dr,useEffect:n2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,od(4194308,4,o2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return od(4194308,4,i,s)},useInsertionEffect:function(i,s){return od(4,2,i,s)},useMemo:function(i,s){var c=Kr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=Kr();return s=c!==void 0?c(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=aU.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:e2,useDebugValue:Um,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=e2(!1),s=i[0];return i=sU.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=It,E=Kr();if(kt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),an===null)throw Error(n(349));(Bo&30)!==0||Xx(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,n2(Qx.bind(null,h,b,i),[i]),h.flags|=2048,Mu(9,Kx.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=Kr(),s=an.identifierPrefix;if(kt){var c=mi,h=pi;c=(h&~(1<<32-xr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Lu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=oU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},cU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Mm,useRef:t2,useState:function(){return Mm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Mm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1},dU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Fm,useRef:t2,useState:function(){return Fm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return Kt===null?s.memoizedState=i:l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Fm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1};function Ar(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Hm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ud={isMounted:function(i){return(i=i._reactInternals)?Oo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=In(),h=Xi(i),E=Ei(c,h);E.tag=2,s!=null&&(E.callback=s),s=qi(i,E,h),s!==null&&(Nr(s,i,h,c),ed(s,i,h))}};function p2(i,s,c,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):s.prototype&&s.prototype.isPureReactComponent?!_u(c,h)||!_u(E,b):!0}function m2(i,s,c){var h=!1,E=ji,b=s.contextType;return typeof b=="object"&&b!==null?b=dr(b):(E=jn(s)?Ro:xn.current,h=s.contextTypes,b=(h=h!=null)?js(i,E):ji),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ud,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function g2(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&ud.enqueueReplaceState(s,s.state,null)}function zm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Cm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=dr(b):(b=jn(s)?Ro:xn.current,E.context=js(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hm(i,s,b,c),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&&ud.enqueueReplaceState(E,E.state,null),td(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ks(i,s){try{var c="",h=s;do c+=Me(h),h=h.return;while(h);var E=c}catch(b){E=`
14
+ `+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=L);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function Me(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function 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 $:return"Fragment";case R:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case we:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case fe:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return s=i.displayName||null,s!==null?s:ke(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return ke(i(s))}catch(c){}}return null}function be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(s);case 8:return s===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ue(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function lt(i){var s=Ue(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function cn(i){i._valueTracker||(i._valueTracker=lt(i))}function Lt(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Ue(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function $t(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 Pt(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Qn(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Ie(s.value!=null?s.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function _n(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Gt(i,s){_n(i,s);var c=Ie(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?bt(i,s.type,c):s.hasOwnProperty("defaultValue")&&bt(i,s.type,Ie(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function qe(i,s,c){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,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||$t(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Vt=Array.isArray;function xe(i,s,c,h){if(i=i.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=s.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ie(c),s=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Le(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Vt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Ie(c)}}function Xe(i,s){var c=Ie(s.value),h=Ie(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function gt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Z(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"?Z(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,c,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 c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={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},Xt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Xt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function qt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function dn(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=qt(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var qr=k({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 fn(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 Jn=null;function Rp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Lp=null,Os=null,Is=null;function v_(i){if(i=ku(i)){if(typeof Lp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Vc(s),Lp(i.stateNode,i.type,s))}}function A_(i){Os?Is?Is.push(i):Is=[i]:Os=i}function C_(){if(Os){var i=Os,s=Is;if(Is=Os=null,v_(i),s)for(i=0;i<s.length;i++)v_(s[i])}}function k_(i,s){return i(s)}function N_(){}var Dp=!1;function P_(i,s,c){if(Dp)return i(s,c);Dp=!0;try{return k_(i,s,c)}finally{Dp=!1,(Os!==null||Is!==null)&&(N_(),C_())}}function au(i,s){var c=i.stateNode;if(c===null)return null;var h=Vc(c);if(h===null)return null;c=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(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Mp=!1;if(l)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch(i){Mp=!1}function V7(i,s,c,h,E,b,S,L,H){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(c,ee)}catch(ce){this.onError(ce)}}var lu=!1,_c=null,xc=!1,Fp=null,q7={onError:function(i){lu=!0,_c=i}};function Y7(i,s,c,h,E,b,S,L,H){lu=!1,_c=null,V7.apply(q7,arguments)}function W7(i,s,c,h,E,b,S,L,H){if(Y7.apply(this,arguments),lu){if(lu){var ee=_c;lu=!1,_c=null}else throw Error(n(198));xc||(xc=!0,Fp=ee)}}function Oo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function O_(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 I_(i){if(Oo(i)!==i)throw Error(n(188))}function G7(i){var s=i.alternate;if(!s){if(s=Oo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,h=s;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return I_(E),i;if(b===h)return I_(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,L=E.child;L;){if(L===c){S=!0,c=E,h=b;break}if(L===h){S=!0,h=E,c=b;break}L=L.sibling}if(!S){for(L=b.child;L;){if(L===c){S=!0,c=b,h=E;break}if(L===h){S=!0,h=b,c=E;break}L=L.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function R_(i){return i=G7(i),i!==null?L_(i):null}function L_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=L_(i);if(s!==null)return s;i=i.sibling}return null}var D_=t.unstable_scheduleCallback,M_=t.unstable_cancelCallback,X7=t.unstable_shouldYield,K7=t.unstable_requestPaint,Bt=t.unstable_now,Q7=t.unstable_getCurrentPriorityLevel,Bp=t.unstable_ImmediatePriority,F_=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,J7=t.unstable_LowPriority,B_=t.unstable_IdlePriority,vc=null,Wr=null;function Z7(i){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(vc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var xr=Math.clz32?Math.clz32:nB,eB=Math.log,tB=Math.LN2;function nB(i){return i>>>=0,i===0?32:31-(eB(i)/tB|0)|0}var Ac=64,Cc=4194304;function cu(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 kc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=c&268435455;if(S!==0){var L=S&~E;L!==0?h=cu(L):(b&=S,b!==0&&(h=cu(b)))}else S=c&~E,S!==0?h=cu(S):b!==0&&(h=cu(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|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)c=31-xr(s),E=1<<c,h|=i[c],s&=~E;return h}function rB(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 iB(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-xr(b),L=1<<S,H=E[S];H===-1?((L&c)===0||(L&h)!==0)&&(E[S]=rB(L,s)):H<=s&&(i.expiredLanes|=L),b&=~L}}function Up(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function U_(){var i=Ac;return Ac<<=1,(Ac&4194240)===0&&(Ac=64),i}function Hp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function du(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-xr(s),i[s]=c}function oB(i,s){var c=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<c;){var E=31-xr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function zp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-xr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function H_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var z_,jp,j_,$_,V_,$p=!1,Nc=[],Li=null,Di=null,Mi=null,fu=new Map,hu=new Map,Fi=[],sB="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 q_(i,s){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":fu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hu.delete(s.pointerId)}}function pu(i,s,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=ku(s),s!==null&&jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function aB(i,s,c,h,E){switch(s){case"focusin":return Li=pu(Li,i,s,c,h,E),!0;case"dragenter":return Di=pu(Di,i,s,c,h,E),!0;case"mouseover":return Mi=pu(Mi,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return fu.set(b,pu(fu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,hu.set(b,pu(hu.get(b)||null,i,s,c,h,E)),!0}return!1}function Y_(i){var s=Io(i.target);if(s!==null){var c=Oo(s);if(c!==null){if(s=c.tag,s===13){if(s=O_(c),s!==null){i.blockedOn=s,V_(i.priority,function(){j_(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=qp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Jn=h,c.target.dispatchEvent(h),Jn=null}else return s=ku(c),s!==null&&jp(s),i.blockedOn=c,!1;s.shift()}return!0}function W_(i,s,c){Pc(i)&&c.delete(s)}function uB(){$p=!1,Li!==null&&Pc(Li)&&(Li=null),Di!==null&&Pc(Di)&&(Di=null),Mi!==null&&Pc(Mi)&&(Mi=null),fu.forEach(W_),hu.forEach(W_)}function mu(i,s){i.blockedOn===s&&(i.blockedOn=null,$p||($p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uB)))}function gu(i){function s(E){return mu(E,i)}if(0<Nc.length){mu(Nc[0],i);for(var c=1;c<Nc.length;c++){var h=Nc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&mu(Li,i),Di!==null&&mu(Di,i),Mi!==null&&mu(Mi,i),fu.forEach(s),hu.forEach(s),c=0;c<Fi.length;c++)h=Fi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(c=Fi[0],c.blockedOn===null);)Y_(c),c.blockedOn===null&&Fi.shift()}var Rs=U.ReactCurrentBatchConfig,Oc=!0;function lB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=1,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function cB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=4,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function Vp(i,s,c,h){if(Oc){var E=qp(i,s,c,h);if(E===null)um(i,s,h,Ic,c),q_(i,h);else if(aB(E,i,s,c,h))h.stopPropagation();else if(q_(i,h),s&4&&-1<sB.indexOf(i)){for(;E!==null;){var b=ku(E);if(b!==null&&z_(b),b=qp(i,s,c,h),b===null&&um(i,s,h,Ic,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else um(i,s,h,null,c)}}var Ic=null;function qp(i,s,c,h){if(Ic=null,i=Rp(h),i=Io(i),i!==null)if(s=Oo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=O_(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ic=i,null}function G_(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(Q7()){case Bp:return 1;case F_:return 4;case Sc:case J7:return 16;case B_:return 536870912;default:return 16}default:return 16}}var Bi=null,Yp=null,Rc=null;function X_(){if(Rc)return Rc;var i,s=Yp,c=s.length,h,E="value"in Bi?Bi.value:Bi.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&s[c-h]===E[b-h];h++);return Rc=E.slice(i,1<h?1-h:void 0)}function Lc(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 Dc(){return!0}function K_(){return!1}function Zn(i){function s(c,h,E,b,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Dc:K_,this.isPropagationStopped=K_,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),s}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=Zn(Ls),Eu=k({},Ls,{view:0,detail:0}),dB=Zn(Eu),Gp,Xp,yu,Mc=k({},Eu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qp,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!==yu&&(yu&&i.type==="mousemove"?(Gp=i.screenX-yu.screenX,Xp=i.screenY-yu.screenY):Xp=Gp=0,yu=i),Gp)},movementY:function(i){return"movementY"in i?i.movementY:Xp}}),Q_=Zn(Mc),fB=k({},Mc,{dataTransfer:0}),hB=Zn(fB),pB=k({},Eu,{relatedTarget:0}),Kp=Zn(pB),mB=k({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),gB=Zn(mB),EB=k({},Ls,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yB=Zn(EB),bB=k({},Ls,{data:0}),J_=Zn(bB),TB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wB={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"},_B={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=_B[i])?!!s[i]:!1}function Qp(){return xB}var SB=k({},Eu,{key:function(i){if(i.key){var s=TB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qp,charCode:function(i){return i.type==="keypress"?Lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vB=Zn(SB),AB=k({},Mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z_=Zn(AB),CB=k({},Eu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qp}),kB=Zn(CB),NB=k({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Zn(NB),OB=k({},Mc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),IB=Zn(OB),RB=[9,13,27,32],Jp=l&&"CompositionEvent"in window,bu=null;l&&"documentMode"in document&&(bu=document.documentMode);var LB=l&&"TextEvent"in window&&!bu,ex=l&&(!Jp||bu&&8<bu&&11>=bu),tx=" ",nx=!1;function rx(i,s){switch(i){case"keyup":return RB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ix(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ds=!1;function DB(i,s){switch(i){case"compositionend":return ix(s);case"keypress":return s.which!==32?null:(nx=!0,tx);case"textInput":return i=s.data,i===tx&&nx?null:i;default:return null}}function MB(i,s){if(Ds)return i==="compositionend"||!Jp&&rx(i,s)?(i=X_(),Rc=Yp=Bi=null,Ds=!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 ex&&s.locale!=="ko"?null:s.data;default:return null}}var FB={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 ox(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!FB[i.type]:s==="textarea"}function sx(i,s,c,h){A_(h),s=zc(s,"onChange"),0<s.length&&(c=new Wp("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Tu=null,wu=null;function BB(i){Sx(i,0)}function Fc(i){var s=Hs(i);if(Lt(s))return i}function UB(i,s){if(i==="change")return s}var ax=!1;if(l){var Zp;if(l){var em="oninput"in document;if(!em){var ux=document.createElement("div");ux.setAttribute("oninput","return;"),em=typeof ux.oninput=="function"}Zp=em}else Zp=!1;ax=Zp&&(!document.documentMode||9<document.documentMode)}function lx(){Tu&&(Tu.detachEvent("onpropertychange",cx),wu=Tu=null)}function cx(i){if(i.propertyName==="value"&&Fc(wu)){var s=[];sx(s,wu,i,Rp(i)),P_(BB,s)}}function HB(i,s,c){i==="focusin"?(lx(),Tu=s,wu=c,Tu.attachEvent("onpropertychange",cx)):i==="focusout"&&lx()}function zB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Fc(wu)}function jB(i,s){if(i==="click")return Fc(s)}function $B(i,s){if(i==="input"||i==="change")return Fc(s)}function VB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:VB;function _u(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(s,E)||!Sr(i[E],s[E]))return!1}return!0}function dx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function fx(i,s){var c=dx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=dx(c)}}function hx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?hx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function px(){for(var i=window,s=$t();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=$t(i.document)}return s}function tm(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 qB(i){var s=px(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&hx(c.ownerDocument.documentElement,c)){if(h!==null&&tm(c)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=fx(c,b);var S=fx(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var YB=l&&"documentMode"in document&&11>=document.documentMode,Ms=null,nm=null,xu=null,rm=!1;function mx(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;rm||Ms==null||Ms!==$t(h)||(h=Ms,"selectionStart"in h&&tm(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}),xu&&_u(xu,h)||(xu=h,h=zc(nm,"onSelect"),0<h.length&&(s=new Wp("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ms)))}function Bc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Fs={animationend:Bc("Animation","AnimationEnd"),animationiteration:Bc("Animation","AnimationIteration"),animationstart:Bc("Animation","AnimationStart"),transitionend:Bc("Transition","TransitionEnd")},im={},gx={};l&&(gx=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function Uc(i){if(im[i])return im[i];if(!Fs[i])return i;var s=Fs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in gx)return im[i]=s[c];return i}var Ex=Uc("animationend"),yx=Uc("animationiteration"),bx=Uc("animationstart"),Tx=Uc("transitionend"),wx=new Map,_x="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ui(i,s){wx.set(i,s),a(s,[i])}for(var om=0;om<_x.length;om++){var sm=_x[om],WB=sm.toLowerCase(),GB=sm[0].toUpperCase()+sm.slice(1);Ui(WB,"on"+GB)}Ui(Ex,"onAnimationEnd"),Ui(yx,"onAnimationIteration"),Ui(bx,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(Tx,"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(" "),XB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function xx(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,W7(h,s,void 0,i),i.currentTarget=null}function Sx(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var S=h.length-1;0<=S;S--){var L=h[S],H=L.instance,ee=L.currentTarget;if(L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}else for(S=0;S<h.length;S++){if(L=h[S],H=L.instance,ee=L.currentTarget,L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}}}if(xc)throw i=Fp,xc=!1,Fp=null,i}function St(i,s){var c=s[pm];c===void 0&&(c=s[pm]=new Set);var h=i+"__bubble";c.has(h)||(vx(s,i,2,!1),c.add(h))}function am(i,s,c){var h=0;s&&(h|=4),vx(c,i,h,s)}var Hc="_reactListening"+Math.random().toString(36).slice(2);function vu(i){if(!i[Hc]){i[Hc]=!0,r.forEach(function(c){c!=="selectionchange"&&(XB.has(c)||am(c,!1,i),am(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Hc]||(s[Hc]=!0,am("selectionchange",!1,s))}}function vx(i,s,c,h){switch(G_(s)){case 1:var E=lB;break;case 4:E=cB;break;default:E=Vp}c=E.bind(null,s,c,i),E=void 0,!Mp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,c,{capture:!0,passive:E}):i.addEventListener(s,c,!0):E!==void 0?i.addEventListener(s,c,{passive:E}):i.addEventListener(s,c,!1)}function um(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;L!==null;){if(S=Io(L),S===null)return;if(H=S.tag,H===5||H===6){h=b=S;continue e}L=L.parentNode}}h=h.return}P_(function(){var ee=b,ce=Rp(c),pe=[];e:{var ue=wx.get(i);if(ue!==void 0){var ve=Wp,Pe=i;switch(i){case"keypress":if(Lc(c)===0)break e;case"keydown":case"keyup":ve=vB;break;case"focusin":Pe="focus",ve=Kp;break;case"focusout":Pe="blur",ve=Kp;break;case"beforeblur":case"afterblur":ve=Kp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=Q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=hB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=kB;break;case Ex:case yx:case bx:ve=gB;break;case Tx:ve=PB;break;case"scroll":ve=dB;break;case"wheel":ve=IB;break;case"copy":case"cut":case"paste":ve=yB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Z_}var Oe=(s&4)!==0,Ut=!Oe&&i==="scroll",G=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var q=ee,Q;q!==null;){Q=q;var ye=Q.stateNode;if(Q.tag===5&&ye!==null&&(Q=ye,G!==null&&(ye=au(q,G),ye!=null&&Oe.push(Au(q,ye,Q)))),Ut)break;q=q.return}0<Oe.length&&(ue=new ve(ue,Pe,null,c,ce),pe.push({event:ue,listeners:Oe}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ue&&c!==Jn&&(Pe=c.relatedTarget||c.fromElement)&&(Io(Pe)||Pe[fi]))break e;if((ve||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,ve?(Pe=c.relatedTarget||c.toElement,ve=ee,Pe=Pe?Io(Pe):null,Pe!==null&&(Ut=Oo(Pe),Pe!==Ut||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(ve=null,Pe=ee),ve!==Pe)){if(Oe=Q_,ye="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=Z_,ye="onPointerLeave",G="onPointerEnter",q="pointer"),Ut=ve==null?ue:Hs(ve),Q=Pe==null?ue:Hs(Pe),ue=new Oe(ye,q+"leave",ve,c,ce),ue.target=Ut,ue.relatedTarget=Q,ye=null,Io(ce)===ee&&(Oe=new Oe(G,q+"enter",Pe,c,ce),Oe.target=Q,Oe.relatedTarget=Ut,ye=Oe),Ut=ye,ve&&Pe)t:{for(Oe=ve,G=Pe,q=0,Q=Oe;Q;Q=Bs(Q))q++;for(Q=0,ye=G;ye;ye=Bs(ye))Q++;for(;0<q-Q;)Oe=Bs(Oe),q--;for(;0<Q-q;)G=Bs(G),Q--;for(;q--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Bs(Oe),G=Bs(G)}Oe=null}else Oe=null;ve!==null&&Ax(pe,ue,ve,Oe,!1),Pe!==null&&Ut!==null&&Ax(pe,Ut,Pe,Oe,!0)}}e:{if(ue=ee?Hs(ee):window,ve=ue.nodeName&&ue.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ue.type==="file")var De=UB;else if(ox(ue))if(ax)De=$B;else{De=zB;var je=HB}else(ve=ue.nodeName)&&ve.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=jB);if(De&&(De=De(i,ee))){sx(pe,De,c,ce);break e}je&&je(i,ue,ee),i==="focusout"&&(je=ue._wrapperState)&&je.controlled&&ue.type==="number"&&bt(ue,"number",ue.value)}switch(je=ee?Hs(ee):window,i){case"focusin":(ox(je)||je.contentEditable==="true")&&(Ms=je,nm=ee,xu=null);break;case"focusout":xu=nm=Ms=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,mx(pe,c,ce);break;case"selectionchange":if(YB)break;case"keydown":case"keyup":mx(pe,c,ce)}var $e;if(Jp)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 Ds?rx(i,c)&&(We="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&(ex&&c.locale!=="ko"&&(Ds||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ds&&($e=X_()):(Bi=ce,Yp="value"in Bi?Bi.value:Bi.textContent,Ds=!0)),je=zc(ee,We),0<je.length&&(We=new J_(We,i,null,c,ce),pe.push({event:We,listeners:je}),$e?We.data=$e:($e=ix(c),$e!==null&&(We.data=$e)))),($e=LB?DB(i,c):MB(i,c))&&(ee=zc(ee,"onBeforeInput"),0<ee.length&&(ce=new J_("onBeforeInput","beforeinput",null,c,ce),pe.push({event:ce,listeners:ee}),ce.data=$e))}Sx(pe,s)})}function Au(i,s,c){return{instance:i,listener:s,currentTarget:c}}function zc(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=au(i,c),b!=null&&h.unshift(Au(i,b,E)),b=au(i,s),b!=null&&h.push(Au(i,b,E))),i=i.return}return h}function Bs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Ax(i,s,c,h,E){for(var b=s._reactName,S=[];c!==null&&c!==h;){var L=c,H=L.alternate,ee=L.stateNode;if(H!==null&&H===h)break;L.tag===5&&ee!==null&&(L=ee,E?(H=au(c,b),H!=null&&S.unshift(Au(c,H,L))):E||(H=au(c,b),H!=null&&S.push(Au(c,H,L)))),c=c.return}S.length!==0&&i.push({event:s,listeners:S})}var KB=/\r\n?/g,QB=/\u0000|\uFFFD/g;function Cx(i){return(typeof i=="string"?i:""+i).replace(KB,`
15
+ `).replace(QB,"")}function jc(i,s,c){if(s=Cx(s),Cx(i)!==s&&c)throw Error(n(425))}function $c(){}var lm=null,cm=null;function dm(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 fm=typeof setTimeout=="function"?setTimeout:void 0,JB=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,ZB=typeof queueMicrotask=="function"?queueMicrotask:typeof kx!="undefined"?function(i){return kx.resolve(null).then(i).catch(eU)}:fm;function eU(i){setTimeout(function(){throw i})}function hm(i,s){var c=s,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),gu(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);gu(s)}function Hi(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 Nx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var Us=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Us,Cu="__reactProps$"+Us,fi="__reactContainer$"+Us,pm="__reactEvents$"+Us,tU="__reactListeners$"+Us,nU="__reactHandles$"+Us;function Io(i){var s=i[Gr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[fi]||c[Gr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Nx(i);i!==null;){if(c=i[Gr])return c;i=Nx(i)}return s}i=c,c=i.parentNode}return null}function ku(i){return i=i[Gr]||i[fi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Hs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Vc(i){return i[Cu]||null}var mm=[],zs=-1;function zi(i){return{current:i}}function vt(i){0>zs||(i.current=mm[zs],mm[zs]=null,zs--)}function Tt(i,s){zs++,mm[zs]=i.current,i.current=s}var ji={},xn=zi(ji),zn=zi(!1),Ro=ji;function js(i,s){var c=i.type.contextTypes;if(!c)return ji;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function qc(){vt(zn),vt(xn)}function Px(i,s,c){if(xn.current!==ji)throw Error(n(168));Tt(xn,s),Tt(zn,c)}function Ox(i,s,c){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,be(i)||"Unknown",E));return k({},c,h)}function Yc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ji,Ro=xn.current,Tt(xn,i),Tt(zn,zn.current),!0}function Ix(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Ox(i,s,Ro),h.__reactInternalMemoizedMergedChildContext=i,vt(zn),vt(xn),Tt(xn,i)):vt(zn),Tt(zn,c)}var hi=null,Wc=!1,gm=!1;function Rx(i){hi===null?hi=[i]:hi.push(i)}function rU(i){Wc=!0,Rx(i)}function $i(){if(!gm&&hi!==null){gm=!0;var i=0,s=dt;try{var c=hi;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}hi=null,Wc=!1}catch(E){throw hi!==null&&(hi=hi.slice(i+1)),D_(Bp,$i),E}finally{dt=s,gm=!1}}return null}var $s=[],Vs=0,Gc=null,Xc=0,lr=[],cr=0,Lo=null,pi=1,mi="";function Do(i,s){$s[Vs++]=Xc,$s[Vs++]=Gc,Gc=i,Xc=s}function Lx(i,s,c){lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,Lo=i;var h=pi;i=mi;var E=32-xr(h)-1;h&=~(1<<E),c+=1;var b=32-xr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,pi=1<<32-xr(s)+E|c<<E|h,mi=b+i}else pi=1<<b|c<<E|h,mi=i}function Em(i){i.return!==null&&(Do(i,1),Lx(i,1,0))}function ym(i){for(;i===Gc;)Gc=$s[--Vs],$s[Vs]=null,Xc=$s[--Vs],$s[Vs]=null;for(;i===Lo;)Lo=lr[--cr],lr[cr]=null,mi=lr[--cr],lr[cr]=null,pi=lr[--cr],lr[cr]=null}var er=null,tr=null,kt=!1,vr=null;function Dx(i,s){var c=pr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function Mx(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,er=i,tr=Hi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,er=i,tr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Lo!==null?{id:pi,overflow:mi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=pr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,er=i,tr=null,!0):!1;default:return!1}}function bm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tm(i){if(kt){var s=tr;if(s){var c=s;if(!Mx(i,s)){if(bm(i))throw Error(n(418));s=Hi(c.nextSibling);var h=er;s&&Mx(i,s)?Dx(h,c):(i.flags=i.flags&-4097|2,kt=!1,er=i)}}else{if(bm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,er=i}}}function Fx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;er=i}function Kc(i){if(i!==er)return!1;if(!kt)return Fx(i),kt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!dm(i.type,i.memoizedProps)),s&&(s=tr)){if(bm(i))throw Bx(),Error(n(418));for(;s;)Dx(i,s),s=Hi(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 c=i.data;if(c==="/$"){if(s===0){tr=Hi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}tr=null}}else tr=er?Hi(i.stateNode.nextSibling):null;return!0}function Bx(){for(var i=tr;i;)i=Hi(i.nextSibling)}function qs(){tr=er=null,kt=!1}function wm(i){vr===null?vr=[i]:vr.push(i)}var iU=U.ReactCurrentBatchConfig;function Nu(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(S){var L=E.refs;S===null?delete L[b]:L[b]=S},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Qc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Ux(i){var s=i._init;return s(i._payload)}function Hx(i){function s(G,q){if(i){var Q=G.deletions;Q===null?(G.deletions=[q],G.flags|=16):Q.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)s(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=Qi(G,q),G.index=0,G.sibling=null,G}function b(G,q,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<q?(G.flags|=2,q):Q):(G.flags|=2,q)):(G.flags|=1048576,q)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,q,Q,ye){return q===null||q.tag!==6?(q=f0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q),q.return=G,q)}function H(G,q,Q,ye){var De=Q.type;return De===$?ce(G,q,Q.props.children,ye,Q.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===q.type)?(ye=E(q,Q.props),ye.ref=Nu(G,q,Q),ye.return=G,ye):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,ye)}function ee(G,q,Q,ye){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=h0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q.children||[]),q.return=G,q)}function ce(G,q,Q,ye,De){return q===null||q.tag!==7?(q=$o(Q,G.mode,ye,De),q.return=G,q):(q=E(q,Q),q.return=G,q)}function pe(G,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number")return q=f0(""+q,G.mode,Q),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case Y:return Q=wd(q.type,q.key,q.props,null,G.mode,Q),Q.ref=Nu(G,null,q),Q.return=G,Q;case R:return q=h0(q,G.mode,Q),q.return=G,q;case Ae:var ye=q._init;return pe(G,ye(q._payload),Q)}if(Vt(q)||ae(q))return q=$o(q,G.mode,Q,null),q.return=G,q;Qc(G,q)}return null}function ue(G,q,Q,ye){var De=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return De!==null?null:L(G,q,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===De?H(G,q,Q,ye):null;case R:return Q.key===De?ee(G,q,Q,ye):null;case Ae:return De=Q._init,ue(G,q,De(Q._payload),ye)}if(Vt(Q)||ae(Q))return De!==null?null:ce(G,q,Q,ye,null);Qc(G,Q)}return null}function ve(G,q,Q,ye,De){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(Q)||null,L(q,G,""+ye,De);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Y:return G=G.get(ye.key===null?Q:ye.key)||null,H(q,G,ye,De);case R:return G=G.get(ye.key===null?Q:ye.key)||null,ee(q,G,ye,De);case Ae:var je=ye._init;return ve(G,q,Q,je(ye._payload),De)}if(Vt(ye)||ae(ye))return G=G.get(Q)||null,ce(q,G,ye,De,null);Qc(q,ye)}return null}function Pe(G,q,Q,ye){for(var De=null,je=null,$e=q,We=q=0,un=null;$e!==null&&We<Q.length;We++){$e.index>We?(un=$e,$e=null):un=$e.sibling;var st=ue(G,$e,Q[We],ye);if(st===null){$e===null&&($e=un);break}i&&$e&&st.alternate===null&&s(G,$e),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st,$e=un}if(We===Q.length)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;We<Q.length;We++)$e=pe(G,Q[We],ye),$e!==null&&(q=b($e,q,We),je===null?De=$e:je.sibling=$e,je=$e);return kt&&Do(G,We),De}for($e=h(G,$e);We<Q.length;We++)un=ve($e,G,We,Q[We],ye),un!==null&&(i&&un.alternate!==null&&$e.delete(un.key===null?We:un.key),q=b(un,q,We),je===null?De=un:je.sibling=un,je=un);return i&&$e.forEach(function(Ji){return s(G,Ji)}),kt&&Do(G,We),De}function Oe(G,q,Q,ye){var De=ae(Q);if(typeof De!="function")throw Error(n(150));if(Q=De.call(Q),Q==null)throw Error(n(151));for(var je=De=null,$e=q,We=q=0,un=null,st=Q.next();$e!==null&&!st.done;We++,st=Q.next()){$e.index>We?(un=$e,$e=null):un=$e.sibling;var Ji=ue(G,$e,st.value,ye);if(Ji===null){$e===null&&($e=un);break}i&&$e&&Ji.alternate===null&&s(G,$e),q=b(Ji,q,We),je===null?De=Ji:je.sibling=Ji,je=Ji,$e=un}if(st.done)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;!st.done;We++,st=Q.next())st=pe(G,st.value,ye),st!==null&&(q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return kt&&Do(G,We),De}for($e=h(G,$e);!st.done;We++,st=Q.next())st=ve($e,G,We,st.value,ye),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?We:st.key),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return i&&$e.forEach(function(FU){return s(G,FU)}),kt&&Do(G,We),De}function Ut(G,q,Q,ye){if(typeof Q=="object"&&Q!==null&&Q.type===$&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var De=Q.key,je=q;je!==null;){if(je.key===De){if(De=Q.type,De===$){if(je.tag===7){c(G,je.sibling),q=E(je,Q.props.children),q.return=G,G=q;break e}}else if(je.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===je.type){c(G,je.sibling),q=E(je,Q.props),q.ref=Nu(G,je,Q),q.return=G,G=q;break e}c(G,je);break}else s(G,je);je=je.sibling}Q.type===$?(q=$o(Q.props.children,G.mode,ye,Q.key),q.return=G,G=q):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,G=ye)}return S(G);case R:e:{for(je=Q.key;q!==null;){if(q.key===je)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){c(G,q.sibling),q=E(q,Q.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else s(G,q);q=q.sibling}q=h0(Q,G.mode,ye),q.return=G,G=q}return S(G);case Ae:return je=Q._init,Ut(G,q,je(Q._payload),ye)}if(Vt(Q))return Pe(G,q,Q,ye);if(ae(Q))return Oe(G,q,Q,ye);Qc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,Q),q.return=G,G=q):(c(G,q),q=f0(Q,G.mode,ye),q.return=G,G=q),S(G)):c(G,q)}return Ut}var Ys=Hx(!0),zx=Hx(!1),Jc=zi(null),Zc=null,Ws=null,_m=null;function xm(){_m=Ws=Zc=null}function Sm(i){var s=Jc.current;vt(Jc),i._currentValue=s}function vm(i,s,c){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===c)break;i=i.return}}function Gs(i,s){Zc=i,_m=Ws=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&($n=!0),i.firstContext=null)}function dr(i){var s=i._currentValue;if(_m!==i)if(i={context:i,memoizedValue:s,next:null},Ws===null){if(Zc===null)throw Error(n(308));Ws=i,Zc.dependencies={lanes:0,firstContext:i}}else Ws=Ws.next=i;return s}var Mo=null;function Am(i){Mo===null?Mo=[i]:Mo.push(i)}function jx(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,Am(s)):(c.next=E.next,E.next=c),s.interleaved=c,gi(i,h)}function gi(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Vi=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $x(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 Ei(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function qi(i,s,c){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,gi(i,c)}return E=h.interleaved,E===null?(s.next=s,Am(h)):(s.next=E.next,E.next=s),h.interleaved=s,gi(i,c)}function ed(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}function Vx(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=S:b=b.next=S,c=c.next}while(c!==null);b===null?E=b=s:b=b.next=s}else E=b=s;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function td(i,s,c,h){var E=i.updateQueue;Vi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,ee=H.next;H.next=null,S===null?b=ee:S.next=ee,S=H;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==S&&(L===null?ce.firstBaseUpdate=ee:L.next=ee,ce.lastBaseUpdate=H))}if(b!==null){var pe=E.baseState;S=0,ce=ee=H=null,L=b;do{var ue=L.lane,ve=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:ve,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Pe=i,Oe=L;switch(ue=s,ve=c,Oe.tag){case 1:if(Pe=Oe.payload,typeof Pe=="function"){pe=Pe.call(ve,pe,ue);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Oe.payload,ue=typeof Pe=="function"?Pe.call(ve,pe,ue):Pe,ue==null)break e;pe=k({},pe,ue);break e;case 2:Vi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else ve={eventTime:ve,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(ee=ce=ve,H=pe):ce=ce.next=ve,S|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=ee,E.lastBaseUpdate=ce,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Uo|=S,i.lanes=S,i.memoizedState=pe}}function qx(i,s,c){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=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Pu={},Xr=zi(Pu),Ou=zi(Pu),Iu=zi(Pu);function Fo(i){if(i===Pu)throw Error(n(174));return i}function km(i,s){switch(Tt(Iu,s),Tt(Ou,i),Tt(Xr,Pu),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)}vt(Xr),Tt(Xr,s)}function Xs(){vt(Xr),vt(Ou),vt(Iu)}function Yx(i){Fo(Iu.current);var s=Fo(Xr.current),c=ge(s,i.type);s!==c&&(Tt(Ou,i),Tt(Xr,c))}function Nm(i){Ou.current===i&&(vt(Xr),vt(Ou))}var Ot=zi(0);function nd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.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 Pm=[];function Om(){for(var i=0;i<Pm.length;i++)Pm[i]._workInProgressVersionPrimary=null;Pm.length=0}var rd=U.ReactCurrentDispatcher,Im=U.ReactCurrentBatchConfig,Bo=0,It=null,Kt=null,sn=null,id=!1,Ru=!1,Lu=0,oU=0;function Sn(){throw Error(n(321))}function Rm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Sr(i[c],s[c]))return!1;return!0}function Lm(i,s,c,h,E,b){if(Bo=b,It=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rd.current=i===null||i.memoizedState===null?lU:cU,i=c(h,E),Ru){b=0;do{if(Ru=!1,Lu=0,25<=b)throw Error(n(301));b+=1,sn=Kt=null,s.updateQueue=null,rd.current=dU,i=c(h,E)}while(Ru)}if(rd.current=ad,s=Kt!==null&&Kt.next!==null,Bo=0,sn=Kt=It=null,id=!1,s)throw Error(n(300));return i}function Dm(){var i=Lu!==0;return Lu=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?It.memoizedState=sn=i:sn=sn.next=i,sn}function fr(){if(Kt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Kt.next;var s=sn===null?It.memoizedState:sn.next;if(s!==null)sn=s,Kt=i;else{if(i===null)throw Error(n(310));Kt=i,i={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},sn===null?It.memoizedState=sn=i:sn=sn.next=i}return sn}function Du(i,s){return typeof s=="function"?s(i):s}function Mm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Kt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=S=null,H=null,ee=b;do{var ce=ee.lane;if((Bo&ce)===ce)H!==null&&(H=H.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var pe={lane:ce,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};H===null?(L=H=pe,S=h):H=H.next=pe,It.lanes|=ce,Uo|=ce}ee=ee.next}while(ee!==null&&ee!==b);H===null?S=h:H.next=L,Sr(h,s.memoizedState)||($n=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=H,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,It.lanes|=b,Uo|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Fm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=s.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Sr(b,s.memoizedState)||($n=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Wx(){}function Gx(i,s){var c=It,h=fr(),E=s(),b=!Sr(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,Bm(Qx.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||sn!==null&&sn.memoizedState.tag&1){if(c.flags|=2048,Mu(9,Kx.bind(null,c,h,E,s),void 0,null),an===null)throw Error(n(349));(Bo&30)!==0||Xx(c,s,E)}return E}function Xx(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Kx(i,s,c,h){s.value=c,s.getSnapshot=h,Jx(s)&&Zx(i)}function Qx(i,s,c){return c(function(){Jx(s)&&Zx(i)})}function Jx(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Sr(i,c)}catch(h){return!0}}function Zx(i){var s=gi(i,1);s!==null&&Nr(s,i,1,-1)}function e2(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:Du,lastRenderedState:i},s.queue=i,i=i.dispatch=uU.bind(null,It,i),[s.memoizedState,i]}function Mu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i)),i}function t2(){return fr().memoizedState}function od(i,s,c,h){var E=Kr();It.flags|=i,E.memoizedState=Mu(1|s,c,void 0,h===void 0?null:h)}function sd(i,s,c,h){var E=fr();h=h===void 0?null:h;var b=void 0;if(Kt!==null){var S=Kt.memoizedState;if(b=S.destroy,h!==null&&Rm(h,S.deps)){E.memoizedState=Mu(s,c,b,h);return}}It.flags|=i,E.memoizedState=Mu(1|s,c,b,h)}function n2(i,s){return od(8390656,8,i,s)}function Bm(i,s){return sd(2048,8,i,s)}function r2(i,s){return sd(4,2,i,s)}function i2(i,s){return sd(4,4,i,s)}function o2(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 s2(i,s,c){return c=c!=null?c.concat([i]):null,sd(4,4,o2.bind(null,s,i),c)}function Um(){}function a2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function u2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function l2(i,s,c){return(Bo&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=c):(Sr(c,s)||(c=U_(),It.lanes|=c,Uo|=c,i.baseState=!0),s)}function sU(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=Im.transition;Im.transition={};try{i(!1),s()}finally{dt=c,Im.transition=h}}function c2(){return fr().memoizedState}function aU(i,s,c){var h=Xi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},d2(i))f2(s,c);else if(c=jx(i,s,c,h),c!==null){var E=In();Nr(c,i,h,E),h2(c,s,h)}}function uU(i,s,c){var h=Xi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(d2(i))f2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var S=s.lastRenderedState,L=b(S,c);if(E.hasEagerState=!0,E.eagerState=L,Sr(L,S)){var H=s.interleaved;H===null?(E.next=E,Am(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(ee){}c=jx(i,s,E,h),c!==null&&(E=In(),Nr(c,i,h,E),h2(c,s,h))}}function d2(i){var s=i.alternate;return i===It||s!==null&&s===It}function f2(i,s){Ru=id=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function h2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}var ad={readContext:dr,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},lU={readContext:dr,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:dr,useEffect:n2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,od(4194308,4,o2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return od(4194308,4,i,s)},useInsertionEffect:function(i,s){return od(4,2,i,s)},useMemo:function(i,s){var c=Kr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=Kr();return s=c!==void 0?c(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=aU.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:e2,useDebugValue:Um,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=e2(!1),s=i[0];return i=sU.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=It,E=Kr();if(kt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),an===null)throw Error(n(349));(Bo&30)!==0||Xx(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,n2(Qx.bind(null,h,b,i),[i]),h.flags|=2048,Mu(9,Kx.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=Kr(),s=an.identifierPrefix;if(kt){var c=mi,h=pi;c=(h&~(1<<32-xr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Lu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=oU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},cU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Mm,useRef:t2,useState:function(){return Mm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Mm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1},dU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Fm,useRef:t2,useState:function(){return Fm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return Kt===null?s.memoizedState=i:l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Fm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1};function Ar(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Hm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ud={isMounted:function(i){return(i=i._reactInternals)?Oo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=In(),h=Xi(i),E=Ei(c,h);E.tag=2,s!=null&&(E.callback=s),s=qi(i,E,h),s!==null&&(Nr(s,i,h,c),ed(s,i,h))}};function p2(i,s,c,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):s.prototype&&s.prototype.isPureReactComponent?!_u(c,h)||!_u(E,b):!0}function m2(i,s,c){var h=!1,E=ji,b=s.contextType;return typeof b=="object"&&b!==null?b=dr(b):(E=jn(s)?Ro:xn.current,h=s.contextTypes,b=(h=h!=null)?js(i,E):ji),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ud,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function g2(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&ud.enqueueReplaceState(s,s.state,null)}function zm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Cm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=dr(b):(b=jn(s)?Ro:xn.current,E.context=js(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hm(i,s,b,c),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&&ud.enqueueReplaceState(E,E.state,null),td(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ks(i,s){try{var c="",h=s;do c+=Me(h),h=h.return;while(h);var E=c}catch(b){E=`
16
16
  Error generating stack: `+b.message+`
17
- `+b.stack}return{value:i,source:s,stack:E,digest:null}}function jm(i,s,c){return{value:i,source:null,stack:c!=null?c:null,digest:s!=null?s:null}}function $m(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var fU=typeof WeakMap=="function"?WeakMap:Map;function E2(i,s,c){c=Ei(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){md||(md=!0,i0=h),$m(i,s)},c}function y2(i,s,c){c=Ei(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;c.payload=function(){return h(E)},c.callback=function(){$m(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){$m(i,s),typeof h!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),c}function b2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new fU;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(c)||(E.add(c),i=AU.bind(null,i,s,c),s.then(i,i))}function T2(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 w2(i,s,c,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=Ei(-1,1),s.tag=2,qi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var hU=U.ReactCurrentOwner,$n=!1;function On(i,s,c,h){s.child=i===null?zx(s,null,c,h):Ys(s,i.child,c,h)}function _2(i,s,c,h,E){c=c.render;var b=s.ref;return Gs(s,E),h=Lm(i,s,c,h,b,E),c=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&c&&Em(s),s.flags|=1,On(i,s,h,E),s.child)}function x2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!d0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,S2(i,s,b,h,E)):(i=wd(c.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 S=b.memoizedProps;if(c=c.compare,c=c!==null?c:_u,c(S,h)&&i.ref===s.ref)return yi(i,s,E)}return s.flags|=1,i=Qi(b,h),i.ref=s.ref,i.return=s,s.child=i}function S2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(_u(b,h)&&i.ref===s.ref)if($n=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return s.lanes=i.lanes,yi(i,s,E)}return Vm(i,s,c,h,E)}function v2(i,s,c){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},Tt(Js,nr),nr|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Tt(Js,nr),nr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(Js,nr),nr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(Js,nr),nr|=h;return On(i,s,E,c),s.child}function A2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Vm(i,s,c,h,E){var b=jn(c)?Ro:xn.current;return b=js(s,b),Gs(s,E),c=Lm(i,s,c,h,b,E),h=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&h&&Em(s),s.flags|=1,On(i,s,c,E),s.child)}function C2(i,s,c,h,E){if(jn(c)){var b=!0;Yc(s)}else b=!1;if(Gs(s,E),s.stateNode===null)cd(i,s),m2(s,c,h),zm(s,c,h,E),h=!0;else if(i===null){var S=s.stateNode,L=s.memoizedProps;S.props=L;var H=S.context,ee=c.contextType;typeof ee=="object"&&ee!==null?ee=dr(ee):(ee=jn(c)?Ro:xn.current,ee=js(s,ee));var de=c.getDerivedStateFromProps,pe=typeof de=="function"||typeof S.getSnapshotBeforeUpdate=="function";pe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==h||H!==ee)&&g2(s,S,h,ee),Vi=!1;var le=s.memoizedState;S.state=le,td(s,h,S,E),H=s.memoizedState,L!==h||le!==H||zn.current||Vi?(typeof de=="function"&&(Hm(s,c,de,h),H=s.memoizedState),(L=Vi||p2(s,c,L,h,le,H,ee))?(pe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=H),S.props=h,S.state=H,S.context=ee,h=L):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,$x(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:Ar(s.type,L),S.props=ee,pe=s.pendingProps,le=S.context,H=c.contextType,typeof H=="object"&&H!==null?H=dr(H):(H=jn(c)?Ro:xn.current,H=js(s,H));var Se=c.getDerivedStateFromProps;(de=typeof Se=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==pe||le!==H)&&g2(s,S,h,H),Vi=!1,le=s.memoizedState,S.state=le,td(s,h,S,E);var Pe=s.memoizedState;L!==pe||le!==Pe||zn.current||Vi?(typeof Se=="function"&&(Hm(s,c,Se,h),Pe=s.memoizedState),(ee=Vi||p2(s,c,ee,h,le,Pe,H)||!1)?(de||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,H)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Pe),S.props=h,S.state=Pe,S.context=H,h=ee):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),h=!1)}return qm(i,s,c,h,b,E)}function qm(i,s,c,h,E,b){A2(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&Ix(s,c,!1),yi(i,s,b);h=s.stateNode,hU.current=s;var L=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Ys(s,i.child,null,b),s.child=Ys(s,null,L,b)):On(i,s,L,b),s.memoizedState=h.state,E&&Ix(s,c,!0),s.child}function k2(i){var s=i.stateNode;s.pendingContext?Px(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Px(i,s.context,!1),km(i,s.containerInfo)}function N2(i,s,c,h,E){return qs(),wm(E),s.flags|=256,On(i,s,c,h),s.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Wm(i){return{baseLanes:i,cachePool:null,transitions:null}}function P2(i,s,c){var h=s.pendingProps,E=Ot.current,b=!1,S=(s.flags&128)!==0,L;if((L=S)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Ot,E&1),i===null)return Tm(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):(S=h.children,i=h.fallback,b?(h=s.mode,b=s.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=_d(S,h,0,null),i=$o(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Wm(c),s.memoizedState=Ym,i):Gm(s,S));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return pU(i,s,S,h,L,E,c);if(b){b=h.fallback,S=s.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=H,s.deletions=null):(h=Qi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Qi(L,b):(b=$o(b,S,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,S=i.child.memoizedState,S=S===null?Wm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,s.memoizedState=Ym,h}return b=i.child,i=b.sibling,h=Qi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=c),h.return=s,h.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=h,s.memoizedState=null,h}function Gm(i,s){return s=_d({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ld(i,s,c,h){return h!==null&&wm(h),Ys(s,i.child,null,c),i=Gm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function pU(i,s,c,h,E,b,S){if(c)return s.flags&256?(s.flags&=-257,h=jm(Error(n(422))),ld(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=_d({mode:"visible",children:h.children},E,0,null),b=$o(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&Ys(s,i.child,null,S),s.child.memoizedState=Wm(S),s.memoizedState=Ym,b);if((s.mode&1)===0)return ld(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=jm(b,h,void 0),ld(i,s,S,h)}if(L=(S&i.childLanes)!==0,$n||L){if(h=an,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,gi(i,E),Nr(h,i,E,-1))}return c0(),h=jm(Error(n(421))),ld(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=CU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,tr=Hi(E.nextSibling),er=s,kt=!0,vr=null,i!==null&&(lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,pi=i.id,mi=i.overflow,Lo=s),s=Gm(s,h.children),s.flags|=4096,s)}function O2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),vm(i.return,s,c)}function Xm(i,s,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function I2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(On(i,s,h.children,c),h=Ot.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&&O2(i,c,s);else if(i.tag===19)O2(i,c,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(Tt(Ot,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(c=s.child,E=null;c!==null;)i=c.alternate,i!==null&&nd(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Xm(s,!1,E,c,b);break;case"backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&nd(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Xm(s,!0,c,null,b);break;case"together":Xm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function cd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function yi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Uo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Qi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function mU(i,s,c){switch(s.tag){case 3:k2(s),qs();break;case 5:Yx(s);break;case 1:jn(s.type)&&Yc(s);break;case 4:km(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(Jc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Ot,Ot.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?P2(i,s,c):(Tt(Ot,Ot.current&1),i=yi(i,s,c),i!==null?i.sibling:null);Tt(Ot,Ot.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return I2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Ot,Ot.current),h)break;return null;case 22:case 23:return s.lanes=0,v2(i,s,c)}return yi(i,s,c)}var R2,Km,L2,D2;R2=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Km=function(){},L2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Fo(Xr.current);var b=null;switch(c){case"input":E=Pt(i,E),h=Pt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Le(i,E),h=Le(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=$c)}fn(c,h);var S;c=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var L=E[ee];for(S in L)L.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var H=h[ee];if(L=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&H!==L&&(H!=null||L!=null))if(ee==="style")if(L){for(S in L)!L.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in H)H.hasOwnProperty(S)&&L[S]!==H[S]&&(c||(c={}),c[S]=H[S])}else c||(b||(b=[]),b.push(ee,c)),c=H;else ee==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(b=b||[]).push(ee,H)):ee==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(ee,""+H):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(H!=null&&ee==="onScroll"&&St("scroll",i),b||L===H||(b=[])):(b=b||[]).push(ee,H))}c&&(b=b||[]).push("style",c);var ee=b;(s.updateQueue=ee)&&(s.flags|=4)}},D2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Fu(i,s){if(!kt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function vn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function gU(i,s,c){var h=s.pendingProps;switch(ym(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(s),null;case 1:return jn(s.type)&&qc(),vn(s),null;case 3:return h=s.stateNode,Xs(),vt(zn),vt(xn),Om(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Kc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,vr!==null&&(a0(vr),vr=null))),Km(i,s),vn(s),null;case 5:Nm(s);var E=Fo(Iu.current);if(c=s.type,i!==null&&s.stateNode!=null)L2(i,s,c,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return vn(s),null}if(i=Fo(Xr.current),Kc(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[Gr]=s,h[Cu]=b,i=(s.mode&1)!==0,c){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Qn(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Be(h,b),St("invalid",h)}fn(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var L=b[S];S==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(S)&&L!=null&&S==="onScroll"&&St("scroll",h)}switch(c){case"input":cn(h),qe(h,b,!0);break;case"textarea":cn(h),gt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=$c)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Gr]=s,i[Cu]=h,R2(i,s,!1,!1),s.stateNode=i;e:{switch(S=Yr(c,h),c){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Qn(i,h),E=Pt(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Be(i,h),E=Le(i,h),St("invalid",i);break;default:E=h}fn(c,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var H=L[b];b==="style"?dn(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ye(i,H)):b==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&Re(i,H):typeof H=="number"&&Re(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?H!=null&&b==="onScroll"&&St("scroll",i):H!=null&&C(i,b,H,S))}switch(c){case"input":cn(i),qe(i,h,!1);break;case"textarea":cn(i),gt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?_e(i,!!h.multiple,b,!1):h.defaultValue!=null&&_e(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=$c)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return vn(s),null;case 6:if(i&&s.stateNode!=null)D2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Fo(Iu.current),Fo(Xr.current),Kc(s)){if(h=s.stateNode,c=s.memoizedProps,h[Gr]=s,(b=h.nodeValue!==c)&&(i=er,i!==null))switch(i.tag){case 3:jc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&jc(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Gr]=s,s.stateNode=h}return vn(s),null;case 13:if(vt(Ot),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&tr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Bx(),qs(),s.flags|=98560,b=!1;else if(b=Kc(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 qs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;vn(s),b=!1}else vr!==null&&(a0(vr),vr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Qt===0&&(Qt=3):c0())),s.updateQueue!==null&&(s.flags|=4),vn(s),null);case 4:return Xs(),Km(i,s),i===null&&vu(s.stateNode.containerInfo),vn(s),null;case 10:return Sm(s.type._context),vn(s),null;case 17:return jn(s.type)&&qc(),vn(s),null;case 19:if(vt(Ot),b=s.memoizedState,b===null)return vn(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Fu(b,!1);else{if(Qt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=nd(i),S!==null){for(s.flags|=128,Fu(b,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=c,c=s.child;c!==null;)b=c,i=h,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Ot,Ot.current&1|2),s.child}i=i.sibling}b.tail!==null&&Bt()>Zs&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304)}else{if(!h)if(i=nd(S),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!kt)return vn(s),null}else 2*Bt()-b.renderingStartTime>Zs&&c!==1073741824&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304);b.isBackwards?(S.sibling=s.child,s.child=S):(c=b.last,c!==null?c.sibling=S:s.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Bt(),s.sibling=null,c=Ot.current,Tt(Ot,h?c&1|2:c&1),s):(vn(s),null);case 22:case 23:return l0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(nr&1073741824)!==0&&(vn(s),s.subtreeFlags&6&&(s.flags|=8192)):vn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function EU(i,s){switch(ym(s),s.tag){case 1:return jn(s.type)&&qc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Xs(),vt(zn),vt(xn),Om(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Nm(s),null;case 13:if(vt(Ot),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));qs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(Ot),null;case 4:return Xs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return l0(),null;case 24:return null;default:return null}}var dd=!1,An=!1,yU=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Qs(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Dt(i,s,h)}else c.current=null}function Qm(i,s,c){try{c()}catch(h){Dt(i,s,h)}}var M2=!1;function bU(i,s){if(lm=Oc,i=px(),tm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ye){c=null;break e}var S=0,L=-1,H=-1,ee=0,de=0,pe=i,le=null;t:for(;;){for(var Se;pe!==c||E!==0&&pe.nodeType!==3||(L=S+E),pe!==b||h!==0&&pe.nodeType!==3||(H=S+h),pe.nodeType===3&&(S+=pe.nodeValue.length),(Se=pe.firstChild)!==null;)le=pe,pe=Se;for(;;){if(pe===i)break t;if(le===c&&++ee===E&&(L=S),le===b&&++de===h&&(H=S),(Se=pe.nextSibling)!==null)break;pe=le,le=pe.parentNode}pe=Se}c=L===-1||H===-1?null:{start:L,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(cm={focusedElem:i,selectionRange:c},Oc=!1,Ne=s;Ne!==null;)if(s=Ne,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ne=i;else for(;Ne!==null;){s=Ne;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 Oe=Pe.memoizedProps,Ut=Pe.memoizedState,G=s.stateNode,q=G.getSnapshotBeforeUpdate(s.elementType===s.type?Oe:Ar(s.type,Oe),Ut);G.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Dt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ne=i;break}Ne=s.return}return Pe=M2,M2=!1,Pe}function Bu(i,s,c){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&&Qm(s,c,b)}E=E.next}while(E!==h)}}function fd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Jm(i){var s=i.ref;if(s!==null){var c=i.stateNode;i.tag,i=c,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[pm],delete s[tU],delete s[nU])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function B2(i){return i.tag===5||i.tag===3||i.tag===4}function U2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||B2(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 Zm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=$c));else if(h!==4&&(i=i.child,i!==null))for(Zm(i,s,c),i=i.sibling;i!==null;)Zm(i,s,c),i=i.sibling}function e0(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(e0(i,s,c),i=i.sibling;i!==null;)e0(i,s,c),i=i.sibling}var hn=null,Cr=!1;function Yi(i,s,c){for(c=c.child;c!==null;)H2(i,s,c),c=c.sibling}function H2(i,s,c){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(vc,c)}catch(L){}switch(c.tag){case 5:An||Qs(c,s);case 6:var h=hn,E=Cr;hn=null,Yi(i,s,c),hn=h,Cr=E,hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):hn.removeChild(c.stateNode));break;case 18:hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?hm(i.parentNode,c):i.nodeType===1&&hm(i,c),gu(i)):hm(hn,c.stateNode));break;case 4:h=hn,E=Cr,hn=c.stateNode.containerInfo,Cr=!0,Yi(i,s,c),hn=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!An&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Qm(c,s,S),E=E.next}while(E!==h)}Yi(i,s,c);break;case 1:if(!An&&(Qs(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(L){Dt(c,s,L)}Yi(i,s,c);break;case 21:Yi(i,s,c);break;case 22:c.mode&1?(An=(h=An)||c.memoizedState!==null,Yi(i,s,c),An=h):Yi(i,s,c);break;default:Yi(i,s,c)}}function z2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new yU),s.forEach(function(h){var E=kU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function kr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,S=s,L=S;e:for(;L!==null;){switch(L.tag){case 5:hn=L.stateNode,Cr=!1;break e;case 3:hn=L.stateNode.containerInfo,Cr=!0;break e;case 4:hn=L.stateNode.containerInfo,Cr=!0;break e}L=L.return}if(hn===null)throw Error(n(160));H2(b,S,E),hn=null,Cr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(ee){Dt(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)j2(s,i),s=s.sibling}function j2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(kr(s,i),Qr(i),h&4){try{Bu(3,i,i.return),fd(3,i)}catch(Oe){Dt(i,i.return,Oe)}try{Bu(5,i,i.return)}catch(Oe){Dt(i,i.return,Oe)}}break;case 1:kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return);break;case 5:if(kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Oe){Dt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&_n(E,b),Yr(L,S);var ee=Yr(L,b);for(S=0;S<H.length;S+=2){var de=H[S],pe=H[S+1];de==="style"?dn(E,pe):de==="dangerouslySetInnerHTML"?Ye(E,pe):de==="children"?Re(E,pe):C(E,de,pe,ee)}switch(L){case"input":Gt(E,b);break;case"textarea":Xe(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var Se=b.value;Se!=null?_e(E,!!b.multiple,Se,!1):le!==!!b.multiple&&(b.defaultValue!=null?_e(E,!!b.multiple,b.defaultValue,!0):_e(E,!!b.multiple,b.multiple?[]:"",!1))}E[Cu]=b}catch(Oe){Dt(i,i.return,Oe)}}break;case 6:if(kr(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(Oe){Dt(i,i.return,Oe)}}break;case 3:if(kr(s,i),Qr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{gu(s.containerInfo)}catch(Oe){Dt(i,i.return,Oe)}break;case 4:kr(s,i),Qr(i);break;case 13:kr(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||(r0=Bt())),h&4&&z2(i);break;case 22:if(de=c!==null&&c.memoizedState!==null,i.mode&1?(An=(ee=An)||de,kr(s,i),An=ee):kr(s,i),Qr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!de&&(i.mode&1)!==0)for(Ne=i,de=i.child;de!==null;){for(pe=Ne=de;Ne!==null;){switch(le=Ne,Se=le.child,le.tag){case 0:case 11:case 14:case 15:Bu(4,le,le.return);break;case 1:Qs(le,le.return);var Pe=le.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=le,c=le.return;try{s=h,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Oe){Dt(h,c,Oe)}}break;case 5:Qs(le,le.return);break;case 22:if(le.memoizedState!==null){q2(pe);continue}}Se!==null?(Se.return=le,Ne=Se):q2(pe)}de=de.sibling}e:for(de=null,pe=i;;){if(pe.tag===5){if(de===null){de=pe;try{E=pe.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=pe.stateNode,H=pe.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=qt("display",S))}catch(Oe){Dt(i,i.return,Oe)}}}else if(pe.tag===6){if(de===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Oe){Dt(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;de===pe&&(de=null),pe=pe.return}de===pe&&(de=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:kr(s,i),Qr(i),h&4&&z2(i);break;case 21:break;default:kr(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(B2(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Re(E,""),h.flags&=-33);var b=U2(i);e0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,L=U2(i);Zm(i,L,S);break;default:throw Error(n(161))}}catch(H){Dt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function TU(i,s,c){Ne=i,$2(i)}function $2(i,s,c){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||dd;if(!S){var L=E.alternate,H=L!==null&&L.memoizedState!==null||An;L=dd;var ee=An;if(dd=S,(An=H)&&!ee)for(Ne=E;Ne!==null;)S=Ne,H=S.child,S.tag===22&&S.memoizedState!==null?Y2(E):H!==null?(H.return=S,Ne=H):Y2(E);for(;b!==null;)Ne=b,$2(b),b=b.sibling;Ne=E,dd=L,An=ee}V2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):V2(i)}}function V2(i){for(;Ne!==null;){var s=Ne;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:An||fd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!An)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:Ar(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&qx(s,b,h);break;case 3:var S=s.updateQueue;if(S!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}qx(s,S,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var de=ee.memoizedState;if(de!==null){var pe=de.dehydrated;pe!==null&&gu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}An||s.flags&512&&Jm(s)}catch(le){Dt(s,s.return,le)}}if(s===i){Ne=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function q2(i){for(;Ne!==null;){var s=Ne;if(s===i){Ne=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function Y2(i){for(;Ne!==null;){var s=Ne;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fd(4,s)}catch(H){Dt(s,c,H)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(H){Dt(s,E,H)}}var b=s.return;try{Jm(s)}catch(H){Dt(s,b,H)}break;case 5:var S=s.return;try{Jm(s)}catch(H){Dt(s,S,H)}}}catch(H){Dt(s,s.return,H)}if(s===i){Ne=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Ne=L;break}Ne=s.return}}var wU=Math.ceil,hd=U.ReactCurrentDispatcher,t0=U.ReactCurrentOwner,hr=U.ReactCurrentBatchConfig,ot=0,an=null,Yt=null,pn=0,nr=0,Js=zi(0),Qt=0,Uu=null,Uo=0,pd=0,n0=0,Hu=null,Vn=null,r0=0,Zs=1/0,bi=null,md=!1,i0=null,Wi=null,gd=!1,Gi=null,Ed=0,zu=0,o0=null,yd=-1,bd=0;function In(){return(ot&6)!==0?Bt():yd!==-1?yd:yd=Bt()}function Xi(i){return(i.mode&1)===0?1:(ot&2)!==0&&pn!==0?pn&-pn:iU.transition!==null?(bd===0&&(bd=U_()),bd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:G_(i.type)),i)}function Nr(i,s,c,h){if(50<zu)throw zu=0,o0=null,Error(n(185));du(i,c,h),((ot&2)===0||i!==an)&&(i===an&&((ot&2)===0&&(pd|=c),Qt===4&&Ki(i,pn)),qn(i,h),c===1&&ot===0&&(s.mode&1)===0&&(Zs=Bt()+500,Wc&&$i()))}function qn(i,s){var c=i.callbackNode;iB(i,s);var h=kc(i,i===an?pn:0);if(h===0)c!==null&&M_(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&M_(c),s===1)i.tag===0?rU(G2.bind(null,i)):Rx(G2.bind(null,i)),ZB(function(){(ot&6)===0&&$i()}),c=null;else{switch(H_(h)){case 1:c=Bp;break;case 4:c=F_;break;case 16:c=Sc;break;case 536870912:c=B_;break;default:c=Sc}c=nS(c,W2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function W2(i,s){if(yd=-1,bd=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if(ea()&&i.callbackNode!==c)return null;var h=kc(i,i===an?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Td(i,h);else{s=h;var E=ot;ot|=2;var b=K2();(an!==i||pn!==s)&&(bi=null,Zs=Bt()+500,zo(i,s));do try{SU();break}catch(L){X2(i,L)}while(!0);xm(),hd.current=b,ot=E,Yt!==null?s=0:(an=null,pn=0,s=Qt)}if(s!==0){if(s===2&&(E=Up(i),E!==0&&(h=E,s=s0(i,E))),s===1)throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;if(s===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_U(E)&&(s=Td(i,h),s===2&&(b=Up(i),b!==0&&(h=b,s=s0(i,b))),s===1))throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:jo(i,Vn,bi);break;case 3:if(Ki(i,h),(h&130023424)===h&&(s=r0+500-Bt(),10<s)){if(kc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){In(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),s);break}jo(i,Vn,bi);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-xr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Bt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*wU(h/1960))-h,10<h){i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),h);break}jo(i,Vn,bi);break;case 5:jo(i,Vn,bi);break;default:throw Error(n(329))}}}return qn(i,Bt()),i.callbackNode===c?W2.bind(null,i):null}function s0(i,s){var c=Hu;return i.current.memoizedState.isDehydrated&&(zo(i,s).flags|=256),i=Td(i,s),i!==2&&(s=Vn,Vn=c,s!==null&&a0(s)),i}function a0(i){Vn===null?Vn=i:Vn.push.apply(Vn,i)}function _U(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!Sr(b(),E))return!1}catch(S){return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;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 Ki(i,s){for(s&=~n0,s&=~pd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-xr(s),h=1<<c;i[c]=-1,s&=~h}}function G2(i){if((ot&6)!==0)throw Error(n(327));ea();var s=kc(i,0);if((s&1)===0)return qn(i,Bt()),null;var c=Td(i,s);if(i.tag!==0&&c===2){var h=Up(i);h!==0&&(s=h,c=s0(i,h))}if(c===1)throw c=Uu,zo(i,0),Ki(i,s),qn(i,Bt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,jo(i,Vn,bi),qn(i,Bt()),null}function u0(i,s){var c=ot;ot|=1;try{return i(s)}finally{ot=c,ot===0&&(Zs=Bt()+500,Wc&&$i())}}function Ho(i){Gi!==null&&Gi.tag===0&&(ot&6)===0&&ea();var s=ot;ot|=1;var c=hr.transition,h=dt;try{if(hr.transition=null,dt=1,i)return i()}finally{dt=h,hr.transition=c,ot=s,(ot&6)===0&&$i()}}function l0(){nr=Js.current,vt(Js)}function zo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,JB(c)),Yt!==null)for(c=Yt.return;c!==null;){var h=c;switch(ym(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&qc();break;case 3:Xs(),vt(zn),vt(xn),Om();break;case 5:Nm(h);break;case 4:Xs();break;case 13:vt(Ot);break;case 19:vt(Ot);break;case 10:Sm(h.type._context);break;case 22:case 23:l0()}c=c.return}if(an=i,Yt=i=Qi(i.current,null),pn=nr=s,Qt=0,Uu=null,n0=pd=Uo=0,Vn=Hu=null,Mo!==null){for(s=0;s<Mo.length;s++)if(c=Mo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}c.pending=h}Mo=null}return i}function X2(i,s){do{var c=Yt;try{if(xm(),rd.current=ad,id){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}id=!1}if(Bo=0,sn=Kt=It=null,Ru=!1,Lu=0,t0.current=null,c===null||c.return===null){Qt=1,Uu=s,Yt=null;break}e:{var b=i,S=c.return,L=c,H=s;if(s=pn,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=H,de=L,pe=de.tag;if((de.mode&1)===0&&(pe===0||pe===11||pe===15)){var le=de.alternate;le?(de.updateQueue=le.updateQueue,de.memoizedState=le.memoizedState,de.lanes=le.lanes):(de.updateQueue=null,de.memoizedState=null)}var Se=T2(S);if(Se!==null){Se.flags&=-257,w2(Se,S,L,b,s),Se.mode&1&&b2(b,ee,s),s=Se,H=ee;var Pe=s.updateQueue;if(Pe===null){var Oe=new Set;Oe.add(H),s.updateQueue=Oe}else Pe.add(H);break e}else{if((s&1)===0){b2(b,ee,s),c0();break e}H=Error(n(426))}}else if(kt&&L.mode&1){var Ut=T2(S);if(Ut!==null){(Ut.flags&65536)===0&&(Ut.flags|=256),w2(Ut,S,L,b,s),wm(Ks(H,L));break e}}b=H=Ks(H,L),Qt!==4&&(Qt=2),Hu===null?Hu=[b]:Hu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=E2(b,H,s);Vx(b,G);break e;case 1:L=H;var q=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Wi===null||!Wi.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=y2(b,L,s);Vx(b,ye);break e}}b=b.return}while(b!==null)}J2(c)}catch(De){s=De,Yt===c&&c!==null&&(Yt=c=c.return);continue}break}while(!0)}function K2(){var i=hd.current;return hd.current=ad,i===null?ad:i}function c0(){(Qt===0||Qt===3||Qt===2)&&(Qt=4),an===null||(Uo&268435455)===0&&(pd&268435455)===0||Ki(an,pn)}function Td(i,s){var c=ot;ot|=2;var h=K2();(an!==i||pn!==s)&&(bi=null,zo(i,s));do try{xU();break}catch(E){X2(i,E)}while(!0);if(xm(),ot=c,hd.current=h,Yt!==null)throw Error(n(261));return an=null,pn=0,Qt}function xU(){for(;Yt!==null;)Q2(Yt)}function SU(){for(;Yt!==null&&!X7();)Q2(Yt)}function Q2(i){var s=tS(i.alternate,i,nr);i.memoizedProps=i.pendingProps,s===null?J2(i):Yt=s,t0.current=null}function J2(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=gU(c,s,nr),c!==null){Yt=c;return}}else{if(c=EU(c,s),c!==null){c.flags&=32767,Yt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Qt=6,Yt=null;return}}if(s=s.sibling,s!==null){Yt=s;return}Yt=s=i}while(s!==null);Qt===0&&(Qt=5)}function jo(i,s,c){var h=dt,E=hr.transition;try{hr.transition=null,dt=1,vU(i,s,c,h)}finally{hr.transition=E,dt=h}return null}function vU(i,s,c,h){do ea();while(Gi!==null);if((ot&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(oB(i,b),i===an&&(Yt=an=null,pn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||gd||(gd=!0,nS(Sc,function(){return ea(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=hr.transition,hr.transition=null;var S=dt;dt=1;var L=ot;ot|=4,t0.current=null,bU(i,c),j2(c,i),qB(cm),Oc=!!lm,cm=lm=null,i.current=c,TU(c),K7(),ot=L,dt=S,hr.transition=b}else i.current=c;if(gd&&(gd=!1,Gi=i,Ed=E),b=i.pendingLanes,b===0&&(Wi=null),Z7(c.stateNode),qn(i,Bt()),s!==null)for(h=i.onRecoverableError,c=0;c<s.length;c++)E=s[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(md)throw md=!1,i=i0,i0=null,i;return(Ed&1)!==0&&i.tag!==0&&ea(),b=i.pendingLanes,(b&1)!==0?i===o0?zu++:(zu=0,o0=i):zu=0,$i(),null}function ea(){if(Gi!==null){var i=H_(Ed),s=hr.transition,c=dt;try{if(hr.transition=null,dt=16>i?16:i,Gi===null)var h=!1;else{if(i=Gi,Gi=null,Ed=0,(ot&6)!==0)throw Error(n(331));var E=ot;for(ot|=4,Ne=i.current;Ne!==null;){var b=Ne,S=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var H=0;H<L.length;H++){var ee=L[H];for(Ne=ee;Ne!==null;){var de=Ne;switch(de.tag){case 0:case 11:case 15:Bu(8,de,b)}var pe=de.child;if(pe!==null)pe.return=de,Ne=pe;else for(;Ne!==null;){de=Ne;var le=de.sibling,Se=de.return;if(F2(de),de===ee){Ne=null;break}if(le!==null){le.return=Se,Ne=le;break}Ne=Se}}}var Pe=b.alternate;if(Pe!==null){var Oe=Pe.child;if(Oe!==null){Pe.child=null;do{var Ut=Oe.sibling;Oe.sibling=null,Oe=Ut}while(Oe!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Ne=S;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Bu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var q=i.current;for(Ne=q;Ne!==null;){S=Ne;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,Ne=Q;else e:for(S=q;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:fd(9,L)}}catch(De){Dt(L,L.return,De)}if(L===S){Ne=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Ne=ye;break e}Ne=L.return}}if(ot=E,$i(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(vc,i)}catch(De){}h=!0}return h}finally{dt=c,hr.transition=s}}return!1}function Z2(i,s,c){s=Ks(c,s),s=E2(i,s,1),i=qi(i,s,1),s=In(),i!==null&&(du(i,1,s),qn(i,s))}function Dt(i,s,c){if(i.tag===3)Z2(i,i,c);else for(;s!==null;){if(s.tag===3){Z2(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Wi===null||!Wi.has(h))){i=Ks(c,i),i=y2(s,i,1),s=qi(s,i,1),i=In(),s!==null&&(du(s,1,i),qn(s,i));break}}s=s.return}}function AU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=In(),i.pingedLanes|=i.suspendedLanes&c,an===i&&(pn&c)===c&&(Qt===4||Qt===3&&(pn&130023424)===pn&&500>Bt()-r0?zo(i,0):n0|=c),qn(i,s)}function eS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Cc,Cc<<=1,(Cc&130023424)===0&&(Cc=4194304)));var c=In();i=gi(i,s),i!==null&&(du(i,s,c),qn(i,c))}function CU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),eS(i,c)}function kU(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),eS(i,c)}var tS;tS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||zn.current)$n=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return $n=!1,mU(i,s,c);$n=(i.flags&131072)!==0}else $n=!1,kt&&(s.flags&1048576)!==0&&Lx(s,Xc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;cd(i,s),i=s.pendingProps;var E=js(s,xn.current);Gs(s,c),E=Lm(null,s,h,i,E,c);var b=Dm();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,jn(h)?(b=!0,Yc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=ud,s.stateNode=E,E._reactInternals=s,zm(s,h,i,c),s=qm(null,s,h,!0,b,c)):(s.tag=0,kt&&b&&Em(s),On(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(cd(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=PU(h),i=Ar(h,i),E){case 0:s=Vm(null,s,h,i,c);break e;case 1:s=C2(null,s,h,i,c);break e;case 11:s=_2(null,s,h,i,c);break e;case 14:s=x2(null,s,h,Ar(h.type,i),c);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),Vm(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),C2(i,s,h,E,c);case 3:e:{if(k2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,$x(i,s),td(s,h,null,c);var S=s.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Ks(Error(n(423)),s),s=N2(i,s,h,c,E);break e}else if(h!==E){E=Ks(Error(n(424)),s),s=N2(i,s,h,c,E);break e}else for(tr=Hi(s.stateNode.containerInfo.firstChild),er=s,kt=!0,vr=null,c=zx(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(qs(),h===E){s=yi(i,s,c);break e}On(i,s,h,c)}s=s.child}return s;case 5:return Yx(s),i===null&&Tm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,dm(h,E)?S=null:b!==null&&dm(h,b)&&(s.flags|=32),A2(i,s),On(i,s,S,c),s.child;case 6:return i===null&&Tm(s),null;case 13:return P2(i,s,c);case 4:return km(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ys(s,null,h,c):On(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),_2(i,s,h,E,c);case 7:return On(i,s,s.pendingProps,c),s.child;case 8:return On(i,s,s.pendingProps.children,c),s.child;case 12:return On(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,S=E.value,Tt(Jc,h._currentValue),h._currentValue=S,b!==null)if(Sr(b.value,S)){if(b.children===E.children&&!zn.current){s=yi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){S=b.child;for(var H=L.firstContext;H!==null;){if(H.context===h){if(b.tag===1){H=Ei(-1,c&-c),H.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var de=ee.pending;de===null?H.next=H:(H.next=de.next,de.next=H),ee.pending=H}}b.lanes|=c,H=b.alternate,H!==null&&(H.lanes|=c),vm(b.return,c,s),L.lanes|=c;break}H=H.next}}else if(b.tag===10)S=b.type===s.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=c,L=S.alternate,L!==null&&(L.lanes|=c),vm(S,c,s),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===s){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}On(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Gs(s,c),E=dr(E),h=h(E),s.flags|=1,On(i,s,h,c),s.child;case 14:return h=s.type,E=Ar(h,s.pendingProps),E=Ar(h.type,E),x2(i,s,h,E,c);case 15:return S2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),cd(i,s),s.tag=1,jn(h)?(i=!0,Yc(s)):i=!1,Gs(s,c),m2(s,h,E),zm(s,h,E,c),qm(null,s,h,!0,i,c);case 19:return I2(i,s,c);case 22:return v2(i,s,c)}throw Error(n(156,s.tag))};function nS(i,s){return D_(i,s)}function NU(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=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 pr(i,s,c,h){return new NU(i,s,c,h)}function d0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function PU(i){if(typeof i=="function")return d0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===ue)return 11;if(i===ae)return 14}return 2}function Qi(i,s){var c=i.alternate;return c===null?(c=pr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function wd(i,s,c,h,E,b){var S=2;if(h=i,typeof i=="function")d0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case V:return $o(c.children,E,b,s);case ne:S=8,E|=8;break;case fe:return i=pr(12,c,s,E|2),i.elementType=fe,i.lanes=b,i;case ve:return i=pr(13,c,s,E),i.elementType=ve,i.lanes=b,i;case re:return i=pr(19,c,s,E),i.elementType=re,i.lanes=b,i;case oe:return _d(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case $:S=10;break e;case ie:S=9;break e;case ue:S=11;break e;case ae:S=14;break e;case Ae:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=pr(S,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function $o(i,s,c,h){return i=pr(7,i,h,s),i.lanes=c,i}function _d(i,s,c,h){return i=pr(22,i,h,s),i.elementType=oe,i.lanes=c,i.stateNode={isHidden:!1},i}function f0(i,s,c){return i=pr(6,i,null,s),i.lanes=c,i}function h0(i,s,c){return s=pr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function OU(i,s,c,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=Hp(0),this.expirationTimes=Hp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function p0(i,s,c,h,E,b,S,L,H){return i=new OU(i,s,c,L,H),s===1?(s=1,b===!0&&(s|=8)):s=0,b=pr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(b),i}function IU(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function rS(i){if(!i)return ji;i=i._reactInternals;e:{if(Oo(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(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(jn(c))return Ox(i,c,s)}return s}function iS(i,s,c,h,E,b,S,L,H){return i=p0(c,h,!0,i,E,b,S,L,H),i.context=rS(null),c=i.current,h=In(),E=Xi(c),b=Ei(h,E),b.callback=s!=null?s:null,qi(c,b,E),i.current.lanes=E,du(i,E,h),qn(i,h),i}function xd(i,s,c,h){var E=s.current,b=In(),S=Xi(E);return c=rS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ei(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=qi(E,s,S),i!==null&&(Nr(i,E,S,b),ed(i,E,S)),S}function Sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function oS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function m0(i,s){oS(i,s),(i=i.alternate)&&oS(i,s)}function RU(){return null}var sS=typeof reportError=="function"?reportError:function(i){console.error(i)};function g0(i){this._internalRoot=i}vd.prototype.render=g0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));xd(i,s,null,null)},vd.prototype.unmount=g0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ho(function(){xd(null,i,null,null)}),s[fi]=null}};function vd(i){this._internalRoot=i}vd.prototype.unstable_scheduleHydration=function(i){if(i){var s=$_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Fi.length&&s!==0&&s<Fi[c].priority;c++);Fi.splice(c,0,i),c===0&&Y_(i)}};function E0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function aS(){}function LU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=Sd(S);b.call(ee)}}var S=iS(s,h,i,0,null,!1,!1,"",aS);return i._reactRootContainer=S,i[fi]=S.current,vu(i.nodeType===8?i.parentNode:i),Ho(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var ee=Sd(H);L.call(ee)}}var H=p0(i,0,!1,null,null,!1,!1,"",aS);return i._reactRootContainer=H,i[fi]=H.current,vu(i.nodeType===8?i.parentNode:i),Ho(function(){xd(s,H,c,h)}),H}function Cd(i,s,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var L=E;E=function(){var H=Sd(S);L.call(H)}}xd(s,S,i,E)}else S=LU(c,s,i,E,h);return Sd(S)}z_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=cu(s.pendingLanes);c!==0&&(zp(s,c|1),qn(s,Bt()),(ot&6)===0&&(Zs=Bt()+500,$i()))}break;case 13:Ho(function(){var h=gi(i,1);if(h!==null){var E=In();Nr(h,i,1,E)}}),m0(i,1)}},jp=function(i){if(i.tag===13){var s=gi(i,134217728);if(s!==null){var c=In();Nr(s,i,134217728,c)}m0(i,134217728)}},j_=function(i){if(i.tag===13){var s=Xi(i),c=gi(i,s);if(c!==null){var h=In();Nr(c,i,s,h)}m0(i,s)}},$_=function(){return dt},V_=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Lp=function(i,s,c){switch(s){case"input":if(Gt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var E=Vc(h);if(!E)throw Error(n(90));Lt(h),Gt(h,E)}}}break;case"textarea":Xe(i,c);break;case"select":s=c.value,s!=null&&_e(i,!!c.multiple,s,!1)}},k_=u0,N_=Ho;var DU={usingClientEntryPoint:!1,Events:[ku,Hs,Vc,A_,C_,u0]},ju={findFiberByHostInstance:Io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MU={bundleType:ju.bundleType,version:ju.version,rendererPackageName:ju.rendererPackageName,rendererConfig:ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=R_(i),i===null?null:i.stateNode},findFiberByHostInstance:ju.findFiberByHostInstance||RU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{vc=kd.inject(MU),Wr=kd}catch(i){}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DU,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E0(s))throw Error(n(200));return IU(i,s,null,c)},Mn.createRoot=function(i,s){if(!E0(i))throw Error(n(299));var c=!1,h="",E=sS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=p0(i,1,!1,null,null,c,!1,h,E),i[fi]=s.current,vu(i.nodeType===8?i.parentNode:i),new g0(s)},Mn.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=R_(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return Ho(i)},Mn.hydrate=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!E0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=sS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),s=iS(s,null,i,1,c!=null?c:null,E,!1,b,S),i[fi]=s.current,vu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,E]:s.mutableSourceEagerHydrationData.push(c,E);return new vd(s)},Mn.render=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!Ad(i))throw Error(n(40));return i._reactRootContainer?(Ho(function(){Cd(null,null,i,!1,function(){i._reactRootContainer=null,i[fi]=null})}),!0):!1},Mn.unstable_batchedUpdates=u0,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Ad(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Cd(i,s,c,!1,h)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var X1;function K1(){if(X1)return Rf.exports;X1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rf.exports=hN(),Rf.exports}var co=K1();function Q1(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=Q1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Q1(e))&&(r&&(r+=" "),r+=t);return r}const pN=()=>document.querySelector(`:is(input, textarea)[name="${z}-user-input"]:not(:disabled)`),Mf=()=>{var e;return(e=pN())!=null?e:document.querySelector(`.${z}-dialog-content, .${z}-modal-content`)},mN=()=>{var e;return(e=Mf())==null?void 0:e.focus({preventScroll:!0})},Ff=()=>{const e=()=>{const n=document.querySelector(`.${z}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var J1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Z1=eo.createContext&&eo.createContext(J1),gN=["attr","size","title"];function EN(e,t){if(e==null)return{};var n=yN(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 yN(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 bl(){return bl=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},bl.apply(this,arguments)}function eE(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(n),!0).forEach(function(r){bN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bN(e,t,n){return t=TN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TN(e){var t=wN(e,"string");return typeof t=="symbol"?t:t+""}function wN(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tE(e){return e&&e.map((t,n)=>eo.createElement(t.tag,Tl({key:n},t.attr),tE(t.child)))}function ht(e){return t=>eo.createElement(_N,bl({attr:Tl({},e.attr)},t),tE(e.child))}function _N(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=EN(e,gN),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),eo.createElement("svg",bl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Tl(Tl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&eo.createElement("title",null,a),e.children)};return Z1!==void 0?eo.createElement(Z1.Consumer,null,n=>t(n)):t(J1)}function xN(e){return ht({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 SN=e=>D.isValidElement(e)?D.cloneElement(e,{"aria-hidden":!0}):e,oi=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,ariaHasPopup:a,ariaExpanded:u,title:l,disabled:d=!1,onClick:f})=>!n&&!t?null:_.jsx("button",{className:W(e,`${z}-icon-button`),type:r,"aria-label":o,"aria-haspopup":a,"aria-expanded":u,title:l,onClick:f,disabled:d,children:t?_.jsx("img",{className:W(`${z}-icon-image`),src:t,alt:"","aria-hidden":"true",loading:"lazy"}):SN(n)}),vN="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",AN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=tt(),{status:a}=Yn(),u=o==="messaging",l=a.type==="dialog"||a.type==="modal",f=r||(u?"Open Commerce Client":"Open Copilot"),p=u?_.jsx(xN,{className:W(t,`${z}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||vN,alt:"Copilot",className:W(t,`${z}-minimized-icon-img`)});return _.jsx(oi,{className:W(t,`${z}-minimized-button`),ariaLabel:f,ariaHasPopup:l?"dialog":void 0,ariaExpanded:!1,title:f,icon:p,onClick:e})},CN=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=tt(),r=D.useId(),o=D.useRef(null),[a]=D.useState(()=>document.createElement("div"));D.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{wa(!1),ri(!0),setTimeout(mN)};return _.jsxs(_.Fragment,{children:[co.createPortal(_.jsx("a",{href:`#${r}`,className:W(e,`${z}-skip-link`),style:t,onClick:l=>{var d,f;l.preventDefault(),(f=(d=o.current)==null?void 0:d.querySelector("button"))==null||f.focus({preventScroll:!0})},children:"Skip to chat"}),a),co.createPortal(_.jsx("div",{id:r,ref:o,className:W(e,`${z}-minimized-container`,n),style:t,children:_.jsx(AN,{onClick:u})}),document.body)]})},kN=e=>({[`${rt}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${rt}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${rt}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${rt}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${rt}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${rt}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),Bf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:W(e,`${z}-close-button`),disabled:r,onClick:n,type:"button",children:_.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),NN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const o=e.name||"",[a,u]=D.useState("");return D.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),_.jsxs("div",{className:W(n,`cim-${t}-component`,`${z}-image-file-preview`),children:[_.jsx("img",{className:W(n,`cim-${t}-component`,`${z}-image-preview`),src:a,alt:`${o} preview`,loading:"lazy"}),_.jsx("span",{className:W(n,`cim-${t}-component`,`${z}-image-file-name`),title:o,children:o}),_.jsx(Bf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function nE(e){return ht({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 rE(e){return ht({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 ns(e){return ht({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 PN(e){return ht({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 iE(e){return ht({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 oE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function ON(e){return ht({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 IN(e){return ht({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 RN(e){return ht({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 LN(e){return ht({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 DN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function MN(e){return ht({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 FN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=_.jsx(MN,{}),onFiles:l})=>{const d=D.useRef(null),f=D.useId(),p=r!=null?r:f,m=D.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=D.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return _.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[_.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-label`),"aria-hidden":"true",children:u}),_.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${z}-file-input`),type:"file",id:p,accept:t,name:`${z}-file-input`,disabled:n,onInput:T})]})},wl=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>_.jsx("button",{"aria-label":a,className:W(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),BN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?oE:ns;return n?_.jsx("img",{className:W(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(r,{"aria-hidden":"true",size:"16px"})},UN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?oE:ns;return _.jsx(oi,{className:W(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)||"Send message",icon:t!=null&&t.buttonIconUrl?null:_.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(wl,{className:W(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(BN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function HN(e){return ht({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 zN=()=>{const{messages:e}=Wn(),{handleCancel:t}=Rr();return{cancelRequest:D.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},jN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=zN();return n!=null&&n.enableCancelSearch?_.jsx(oi,{className:W(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:_.jsx(HN,{}),disabled:!e,onClick:r}):null};function EH(){}function yH(){}function sE(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 aE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $N=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN={};function uE(e,t){return(qN.jsx?VN:$N).test(e)}const YN=/[ \t\n\f\r]/g;function WN(e){return typeof e=="object"?e.type==="text"?lE(e.value):!1:lE(e)}function lE(e){return e.replace(YN,"")===""}class va{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}va.prototype.normal={},va.prototype.property={},va.prototype.space=void 0;function cE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new va(n,r,t)}function Aa(e){return e.toLowerCase()}class Fn{constructor(t,n){this.attribute=n,this.property=t}}Fn.prototype.attribute="",Fn.prototype.booleanish=!1,Fn.prototype.boolean=!1,Fn.prototype.commaOrSpaceSeparated=!1,Fn.prototype.commaSeparated=!1,Fn.prototype.defined=!1,Fn.prototype.mustUseProperty=!1,Fn.prototype.number=!1,Fn.prototype.overloadedBoolean=!1,Fn.prototype.property="",Fn.prototype.spaceSeparated=!1,Fn.prototype.space=void 0;let GN=0;const Ge=ho(),jt=ho(),Uf=ho(),Ee=ho(),pt=ho(),fo=ho(),Gn=ho();function ho(){return $u(2,++GN)}const Hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:jt,commaOrSpaceSeparated:Gn,commaSeparated:fo,number:Ee,overloadedBoolean:Uf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Hf);class jf extends Fn{constructor(t,n,r,o){let a=-1;if(super(t,n),dE(this,"space",o),typeof r=="number")for(;++a<zf.length;){const u=zf[a];dE(this,zf[a],(r&Hf[u])===Hf[u])}}}jf.prototype.defined=!0;function dE(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new jf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Aa(r)]=r,n[Aa(a.attribute)]=r}return new va(t,n,e.space)}const fE=rs({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:pt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,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 hE(e,t){return t in e?e[t]:t}function pE(e,t){return hE(e,t.toLowerCase())}const XN=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fo,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:pt,autoFocus:Ge,autoPlay:Ge,blocking:pt,capture:null,charSet:null,checked:Ge,cite:null,className:pt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:jt,controls:Ge,controlsList:pt,coords:Ee|fo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Uf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:pt,height:Ee,hidden:Uf,high:Ee,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ge,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,pattern:null,ping:pt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:pt,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:pt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,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:Ge,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,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:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:fo,part:pt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:pE}),KN=rs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,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:pt,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:Ge,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:fo,g2:fo,glyphName:fo,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:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,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:Gn,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:Gn,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:Gn,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:hE}),mE=rs({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()}}),gE=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pE}),EE=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JN=/[A-Z]/g,yE=/-[a-z]/g,ZN=/^data[-\w.:]+$/i;function _l(e,t){const n=Aa(t);let r=t,o=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yE,tP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yE.test(a)){let u=a.replace(JN,eP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=jf}return new o(r,t)}function eP(e){return"-"+e.toLowerCase()}function tP(e){return e.charAt(1).toUpperCase()}const Ca=cE([fE,XN,mE,gE,EE],"html"),Si=cE([fE,KN,mE,gE,EE],"svg");function bE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function TE(e){return e.join(" ").trim()}var is={},$f,wE;function nP(){if(wE)return $f;wE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
18
- `,f="/",p="*",m="",T="comment",y="declaration";function w(N,x){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];x=x||{};var A=1,C=1;function U(re){var ae=re.match(t);ae&&(A+=ae.length);var Ae=re.lastIndexOf(d);C=~Ae?re.length-Ae:C+re.length}function Y(){var re={line:A,column:C};return function(ae){return ae.position=new R(re),fe(),ae}}function R(re){this.start=re,this.end={line:A,column:C},this.source=x.source}R.prototype.content=N;function V(re){var ae=new Error(x.source+":"+A+":"+C+": "+re);if(ae.reason=re,ae.filename=x.source,ae.line=A,ae.column=C,ae.source=N,!x.silent)throw ae}function ne(re){var ae=re.exec(N);if(ae){var Ae=ae[0];return U(Ae),N=N.slice(Ae.length),ae}}function fe(){ne(n)}function $(re){var ae;for(re=re||[];ae=ie();)ae!==!1&&re.push(ae);return re}function ie(){var re=Y();if(!(f!=N.charAt(0)||p!=N.charAt(1))){for(var ae=2;m!=N.charAt(ae)&&(p!=N.charAt(ae)||f!=N.charAt(ae+1));)++ae;if(ae+=2,m===N.charAt(ae-1))return V("End of comment missing");var Ae=N.slice(2,ae-2);return C+=2,U(Ae),N=N.slice(ae),C+=2,re({type:T,comment:Ae})}}function ue(){var re=Y(),ae=ne(r);if(ae){if(ie(),!ne(o))return V("property missing ':'");var Ae=ne(a),oe=re({type:y,property:v(ae[0].replace(e,m)),value:Ae?v(Ae[0].replace(e,m)):m});return ne(u),oe}}function ve(){var re=[];$(re);for(var ae;ae=ue();)ae!==!1&&(re.push(ae),$(re));return re}return fe(),ve()}function v(N){return N?N.replace(l,m):m}return $f=w,$f}var _E;function rP(){if(_E)return is;_E=1;var e=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0}),is.default=n;const t=e(nP());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?o(f,p,d):p&&(a=a||{},a[f]=p)}),a}return is}var ka={},xE;function iP(){if(xE)return ka;xE=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.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()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,l):f=f.replace(r,l),f.replace(t,u))};return ka.camelCase=d,ka}var Na,SE;function oP(){if(SE)return Na;SE=1;var e=Na&&Na.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(rP()),n=iP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Na=r,Na}var sP=oP();const aP=Qe(sP),xl=vE("end"),Lr=vE("start");function vE(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 AE(e){const t=Lr(e),n=xl(e);if(t&&n)return{start:t,end:n}}function Pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?CE(e.position):"start"in e||"end"in e?CE(e):"line"in e||"column"in e?Vf(e):""}function Vf(e){return kE(e&&e.line)+":"+kE(e&&e.column)}function CE(e){return Vf(e&&e.start)+"-"+Vf(e&&e.end)}function kE(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=Pa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const qf={}.hasOwnProperty,uP=new Map,lP=/[A-Z]/g,cP=new Set(["table","tbody","thead","tfoot","tr"]),dP=new Set(["td","th"]),NE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fP(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=TP(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=bP(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"?Si:Ca,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=PE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function PE(e,t,n){if(t.type==="element")return hP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gP(e,t,n);if(t.type==="mdxjsEsm")return mP(e,t);if(t.type==="root")return EP(e,t,n);if(t.type==="text")return yP(e,t)}function hP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=IE(e,t.tagName,!1),u=wP(e,t);let l=Wf(e,t);return cP.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!WN(d):!0})),OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function pP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Oa(e,t.position)}function mP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oa(e,t.position)}function gP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:IE(e,t.name,!0),u=_P(e,t),l=Wf(e,t);return OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function EP(e,t,n){const r={};return Yf(r,Wf(e,t)),e.create(t,e.Fragment,r,n)}function yP(e,t){return t.value}function OE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bP(e,t,n){return r;function r(o,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function TP(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Lr(r);return t(o,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function wP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&qf.call(t.properties,o)){const a=xP(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&dP.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _P(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Oa(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 l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Oa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Wf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:uP;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 l=PE(e,a,u);l!==void 0&&n.push(l)}return n}function xP(e,t,n){const r=_l(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?aE(n):TE(n)),r.property==="style"){let o=typeof n=="object"?n:SP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=vP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?QN[r.property]||r.property:r.attribute,n]}}function SP(e,t){try{return aP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("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 IE(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 l=uE(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=uE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return qf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Oa(e)}function Oa(e,t){const n=new bn("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)qf.call(e,n)&&(t[AP(n)]=e[n]);return t}function AP(e){let t=e.replace(lP,CP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CP(e){return"-"+e.toLowerCase()}const Gf={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"]},kP={};function Xf(e,t){const n=kP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return RE(e,r,o)}function RE(e,t,n){if(NP(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 LE(e.children,t,n)}return Array.isArray(e)?LE(e,t,n):""}function LE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=RE(e[o],t,n);return r.join("")}function NP(e){return!!(e&&typeof e=="object")}const DE=document.createElement("i");function Kf(e){const t="&"+e+";";DE.innerHTML=t;const n=DE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function sr(e,t){return e.length>0?(Xn(e,e.length,0,t),e):t}const ME={}.hasOwnProperty;function FE(e){const t={};let n=-1;for(;++n<e.length;)PP(t,e[n]);return t}function PP(e,t){let n;for(n in t){const o=(ME.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){ME.call(o,u)||(o[u]=[]);const l=a[u];OP(o[u],Array.isArray(l)?l:l?[l]:[])}}}function OP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xn(e,0,0,r)}function BE(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 yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=vi(/[A-Za-z]/),Tn=vi(/[\dA-Za-z]/),IP=vi(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Qf=vi(/\d/),RP=vi(/[\dA-Fa-f]/),LP=vi(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const vl=vi(new RegExp("\\p{P}|\\p{S}","u")),po=vi(/\s/);function vi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function os(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),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 it(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),l(d)):t(d)}function l(d){return Ze(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const DP={tokenize:MP};function MP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const FP={tokenize:BP},UE={tokenize:UP};function BP(e){const t=this,n=[];let r=0,o,a,u;return l;function l(C){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&A();const U=t.events.length;let Y=U,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}x(r);let V=U;for(;V<t.events.length;)t.events[V][1].end=B({},R),V++;return Xn(t.events,Y+1,0,t.events.slice(U)),t.events.length=V,f(C)}return l(C)}function f(C){if(r===n.length){if(!o)return T(C);if(o.currentConstruct&&o.currentConstruct.concrete)return w(C);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(UE,p,m)(C)}function p(C){return o&&A(),x(r),T(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(C)}function T(C){return t.containerState={},e.attempt(UE,y,w)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),T(C)}function w(C){if(C===null){o&&A(),x(0),e.consume(C);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(C)}function v(C){if(C===null){N(e.exit("chunkFlow"),!0),x(0),e.consume(C);return}return ze(C)?(e.consume(C),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(C),v)}function N(C,U){const Y=t.sliceStream(C);if(U&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,o.defineSkip(C.start),o.write(Y),t.parser.lazy[C.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<u&&(!o.events[R][1].end||o.events[R][1].end.offset>u))return;const V=t.events.length;let ne=V,fe,$;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(fe){$=t.events[ne][1].end;break}fe=!0}for(x(r),R=V;R<t.events.length;)t.events[R][1].end=B({},$),R++;Xn(t.events,ne+1,0,t.events.slice(V)),t.events.length=R}}function x(C){let U=n.length;for(;U-- >C;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function A(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function UP(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ss(e){if(e===null||mt(e)||po(e))return 1;if(vl(e))return 2}function Al(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 Jf={name:"attention",resolveAll:HP,tokenize:zP};function HP(e,t){let n=-1,r,o,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);HE(m,-d),HE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:B({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},l.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=sr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=sr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=sr(f,Al(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=sr(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=sr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(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 zP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ss(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=ss(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 jP={name:"autolink",tokenize:$P};function $P(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Nn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Tn(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):IP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const Ia={partial:!0,tokenize:VP};function VP(e,t,n){return r;function r(a){return Ze(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ze(a)?t(a):n(a)}}const zE={continuation:{tokenize:YP},exit:WP,name:"blockQuote",tokenize:qP};function qP(e,t,n){const r=this;return o;function o(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function YP(e,t,n){const r=this;return o;function o(u){return Ze(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(zE,t,n)(u)}}function WP(e){e.exit("blockQuote")}const jE={name:"characterEscape",tokenize:GP};function GP(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 LP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const $E={name:"characterReference",tokenize:XP};function XP(e,t,n){const r=this;let o=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=RP,p):(e.enter("characterReferenceValue"),a=7,u=Qf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!Kf(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 VE={partial:!0,tokenize:QP},qE={concrete:!0,name:"codeFenced",tokenize:KP};function KP(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const V=r.events[r.events.length-1];return a=V&&V[1].type==="linePrefix"?V[2].sliceSerialize(V[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?it(e,m,"whitespace")(R):m(R))}function m(R){return R===null||ze(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(VE,v,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||ze(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),w)}function v(R){return e.attempt(o,U,N)(R)}function N(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return a>0&&Ze(R)?it(e,A,"linePrefix",a+1)(R):A(R)}function A(R){return R===null||ze(R)?e.check(VE,v,U)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||ze(R)?(e.exit("codeFlowValue"),A(R)):(e.consume(R),C)}function U(R){return e.exit("codeFenced"),t(R)}function Y(R,V,ne){let fe=0;return $;function $(ae){return R.enter("lineEnding"),R.consume(ae),R.exit("lineEnding"),ie}function ie(ae){return R.enter("codeFencedFence"),Ze(ae)?it(R,ue,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ae):ue(ae)}function ue(ae){return ae===l?(R.enter("codeFencedFenceSequence"),ve(ae)):ne(ae)}function ve(ae){return ae===l?(fe++,R.consume(ae),ve):fe>=u?(R.exit("codeFencedFenceSequence"),Ze(ae)?it(R,re,"whitespace")(ae):re(ae)):ne(ae)}function re(ae){return ae===null||ze(ae)?(R.exit("codeFencedFence"),V(ae)):ne(ae)}}}function QP(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 Zf={name:"codeIndented",tokenize:ZP},JP={partial:!0,tokenize:e3};function ZP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),it(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):ze(f)?e.attempt(JP,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||ze(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function e3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):it(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):ze(u)?o(u):n(u)}}const t3={name:"codeText",previous:r3,resolve:n3,tokenize:i3};function n3(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 r3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i3(e,t,n){let r=0,o,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):ze(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||ze(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 o3{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&&Ra(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ra(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ra(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ra(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ra(this.left,n.reverse())}}}function Ra(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function YE(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new o3(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,s3(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=B({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return Xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function s3(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 l=u.events,d=[],f={};let p,m,T=-1,y=n,w=0,v=0;const N=[v];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<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,N.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):N.pop(),T=N.length;T--;){const x=l.slice(N[T],N[T+1]),A=a.pop();d.push([A,A+x.length-1]),e.splice(A,2,x)}for(d.reverse(),T=-1;++T<d.length;)f[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return f}const a3={resolve:l3,tokenize:c3},u3={partial:!0,tokenize:d3};function l3(e){return YE(e),e}function c3(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):ze(l)?e.check(u3,u,a)(l):(e.consume(l),o)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function d3(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(u){if(u===null||ze(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function WE(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(x){return x===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(x),e.exit(a),T):x===null||x===32||x===41||Sl(x)?n(x):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function T(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(l),T(x)):x===null||x===60||ze(x)?n(x):(e.consume(x),x===92?w:y)}function w(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!p&&(x===null||x===41||mt(x))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(x)):p<f&&x===40?(e.consume(x),p++,v):x===41?(e.consume(x),p--,v):x===null||x===32||x===40||Sl(x)?n(x):(e.consume(x),x===92?N:v)}function N(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function GE(e,t,n,r,o,a){const u=this;let l=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 l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):ze(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||ze(y)||l++>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),l++,m):m(y)}}function XE(e,t,n,r,o,a){let u;return l;function l(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):ze(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||ze(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 La(e,t){let n;return r;function r(o){return ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const f3={name:"definition",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return GE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=yr(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 mt(y)?La(e,f)(y):f(y)}function f(y){return WE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(h3,m,m)(y)}function m(y){return Ze(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||ze(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function m3(e,t,n){return r;function r(l){return mt(l)?La(e,o)(l):n(l)}function o(l){return XE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ze(l)?it(e,u,"whitespace")(l):u(l)}function u(l){return l===null||ze(l)?t(l):n(l)}}const g3={name:"hardBreakEscape",tokenize:E3};function E3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const y3={name:"headingAtx",resolve:b3,tokenize:T3};function b3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function T3(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||mt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||ze(p)?(e.exit("atxHeading"),t(p)):Ze(p)?it(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||mt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const w3=["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"],KE=["pre","script","style","textarea"],_3={concrete:!0,name:"htmlFlow",resolveTo:v3,tokenize:A3},x3={partial:!0,tokenize:k3},S3={partial:!0,tokenize:C3};function v3(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 A3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),T):I===47?(e.consume(I),a=!0,v):I===63?(e.consume(I),o=3,r.interrupt?t:k):Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,l=0,w):Nn(I)?(e.consume(I),o=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function w(I){const xe="CDATA[";return I===xe.charCodeAt(l++)?(e.consume(I),l===xe.length?r.interrupt?t:ue:w):n(I)}function v(I){return Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function N(I){if(I===null||I===47||I===62||mt(I)){const xe=I===47,Me=u.toLowerCase();return!xe&&!a&&KE.includes(Me)?(o=1,r.interrupt?t(I):ue(I)):w3.includes(u.toLowerCase())?(o=6,xe?(e.consume(I),x):r.interrupt?t(I):ue(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?A(I):C(I))}return I===45||Tn(I)?(e.consume(I),u+=String.fromCharCode(I),N):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:ue):n(I)}function A(I){return Ze(I)?(e.consume(I),A):$(I)}function C(I){return I===47?(e.consume(I),$):I===58||I===95||Nn(I)?(e.consume(I),U):Ze(I)?(e.consume(I),C):$(I)}function U(I){return I===45||I===46||I===58||I===95||Tn(I)?(e.consume(I),U):Y(I)}function Y(I){return I===61?(e.consume(I),R):Ze(I)?(e.consume(I),Y):C(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,V):Ze(I)?(e.consume(I),R):ne(I)}function V(I){return I===d?(e.consume(I),d=null,fe):I===null||ze(I)?n(I):(e.consume(I),V)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mt(I)?Y(I):(e.consume(I),ne)}function fe(I){return I===47||I===62||Ze(I)?C(I):n(I)}function $(I){return I===62?(e.consume(I),ie):n(I)}function ie(I){return I===null||ze(I)?ue(I):Ze(I)?(e.consume(I),ie):n(I)}function ue(I){return I===45&&o===2?(e.consume(I),Ae):I===60&&o===1?(e.consume(I),oe):I===62&&o===4?(e.consume(I),F):I===63&&o===3?(e.consume(I),k):I===93&&o===5?(e.consume(I),se):ze(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(x3,K,ve)(I)):I===null||ze(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),ue)}function ve(I){return e.check(S3,re,K)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ae}function ae(I){return I===null||ze(I)?ve(I):(e.enter("htmlFlowData"),ue(I))}function Ae(I){return I===45?(e.consume(I),k):ue(I)}function oe(I){return I===47?(e.consume(I),u="",J):ue(I)}function J(I){if(I===62){const xe=u.toLowerCase();return KE.includes(xe)?(e.consume(I),F):ue(I)}return Nn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),J):ue(I)}function se(I){return I===93?(e.consume(I),k):ue(I)}function k(I){return I===62?(e.consume(I),F):I===45&&o===2?(e.consume(I),k):ue(I)}function F(I){return I===null||ze(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),F)}function K(I){return e.exit("htmlFlow"),t(I)}}function C3(e,t,n){const r=this;return o;function o(u){return ze(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 k3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ia,t,n)}}const N3={name:"htmlText",tokenize:P3};function P3(e,t,n){const r=this;let o,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),C):Nn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Nn(k)?(e.consume(k),A):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):ze(k)?(u=m,oe(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ae(k):k===45?T(k):m(k)}function w(k){const F="CDATA[";return k===F.charCodeAt(a++)?(e.consume(k),a===F.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),N):ze(k)?(u=v,oe(k)):(e.consume(k),v)}function N(k){return k===93?(e.consume(k),x):v(k)}function x(k){return k===62?Ae(k):k===93?(e.consume(k),x):v(k)}function A(k){return k===null||k===62?Ae(k):ze(k)?(u=A,oe(k)):(e.consume(k),A)}function C(k){return k===null?n(k):k===63?(e.consume(k),U):ze(k)?(u=C,oe(k)):(e.consume(k),C)}function U(k){return k===62?Ae(k):C(k)}function Y(k){return Nn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||Tn(k)?(e.consume(k),R):V(k)}function V(k){return ze(k)?(u=V,oe(k)):Ze(k)?(e.consume(k),V):Ae(k)}function ne(k){return k===45||Tn(k)?(e.consume(k),ne):k===47||k===62||mt(k)?fe(k):n(k)}function fe(k){return k===47?(e.consume(k),Ae):k===58||k===95||Nn(k)?(e.consume(k),$):ze(k)?(u=fe,oe(k)):Ze(k)?(e.consume(k),fe):Ae(k)}function $(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),$):ie(k)}function ie(k){return k===61?(e.consume(k),ue):ze(k)?(u=ie,oe(k)):Ze(k)?(e.consume(k),ie):fe(k)}function ue(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,ve):ze(k)?(u=ue,oe(k)):Ze(k)?(e.consume(k),ue):(e.consume(k),re)}function ve(k){return k===o?(e.consume(k),o=void 0,ae):k===null?n(k):ze(k)?(u=ve,oe(k)):(e.consume(k),ve)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||mt(k)?fe(k):(e.consume(k),re)}function ae(k){return k===47||k===62||mt(k)?fe(k):n(k)}function Ae(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function oe(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?it(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):se(k)}function se(k){return e.enter("htmlTextData"),u(k)}}const eh={name:"labelEnd",resolveAll:L3,resolveTo:D3,tokenize:M3},O3={tokenize:F3},I3={tokenize:B3},R3={tokenize:U3};function L3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Xn(e,0,e.length,n),e}function D3(e,t){let n=e.length,r=0,o,a,u,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=sr(l,e.slice(a+1,a+r+3)),l=sr(l,[["enter",p,t]]),l=sr(l,Al(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=sr(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=sr(l,e.slice(u+1)),l=sr(l,[["exit",d,t]]),Xn(e,a,e.length,l),e}function M3(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 l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(yr(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(O3,p,u?p:m)(T):T===91?e.attempt(I3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(R3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function F3(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 mt(m)?La(e,a)(m):a(m)}function a(m){return m===41?p(m):WE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?La(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?XE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?La(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function B3(e,t,n){const r=this;return o;function o(l){return GE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function U3(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 H3={name:"labelStartImage",resolveAll:eh.resolveAll,tokenize:z3};function z3(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const j3={name:"labelStartLink",resolveAll:eh.resolveAll,tokenize:$3};function $3(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 th={name:"lineEnding",tokenize:V3};function V3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:q3};function q3(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,l(f)}function l(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ze(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?it(e,l,"whitespace")(f):l(f))}}const Bn={continuation:{tokenize:X3},exit:Q3,name:"list",tokenize:G3},Y3={partial:!0,tokenize:J3},W3={partial:!0,tokenize:K3};function G3(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 l;function l(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Qf(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="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 Qf(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(Ia,r.interrupt?n:p,e.attempt(Y3,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 X3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ia,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ze(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(W3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Bn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function K3(e,t,n){const r=this;return it(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 Q3(e){e.exit(this.containerState.type)}function J3(e,t,n){const r=this;return it(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 QE={name:"setextUnderline",resolveTo:Z3,tokenize:eO};function Z3(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function eO(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"),l(f)}function l(f){return f===o?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ze(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ze(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const tO={tokenize:nO};function nO(e){const t=this,n=e.attempt(Ia,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(a3,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 rO={resolveAll:ZE()},iO=JE("string"),oO=JE("text");function JE(e){return{resolveAll:ZE(e==="text"?sO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=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 ZE(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 sO(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,l=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:B({},r.end)};r.end=B({},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 aO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:f3},disable:{null:[]},document:{42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:zE},flow:{35:y3,42:Cl,45:[QE,Cl],60:_3,61:QE,95:Cl,96:qE,126:qE},flowInitial:{[-2]:Zf,[-1]:Zf,32:Zf},insideSpan:{null:[Jf,rO]},string:{38:$E,92:jE},text:{[-5]:th,[-4]:th,[-3]:th,33:H3,38:$E,42:Jf,60:[jP,N3],91:j3,92:[g3,jE],93:eh,95:Jf,96:t3}},Symbol.toStringTag,{value:"Module"}));function uO(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=[],l=[];const d={attempt:V(Y),check:V(R),consume:A,enter:C,exit:U,interrupt:V(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=sr(u,ie),N(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Al(a,f.events,f),f.events)}function T(ie,ue){return cO(y(ie),ue)}function y(ie){return lO(u,ie)}function w(){const{_bufferIndex:ie,_index:ue,line:ve,column:re,offset:ae}=r;return{_bufferIndex:ie,_index:ue,line:ve,column:re,offset:ae}}function v(ie){o[ie.line]=ie.column,$()}function N(){let ie;for(;r._index<u.length;){const ue=u[r._index];if(typeof ue=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<ue.length;)x(ue.charCodeAt(r._bufferIndex));else x(ue)}}function x(ie){p=p(ie)}function A(ie){ze(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,$()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function C(ie,ue){const ve=ue||{};return ve.type=ie,ve.start=w(),f.events.push(["enter",ve,f]),l.push(ve),ve}function U(ie){const ue=l.pop();return ue.end=w(),f.events.push(["exit",ue,f]),ue}function Y(ie,ue){ne(ie,ue.from)}function R(ie,ue){ue.restore()}function V(ie,ue){return ve;function ve(re,ae,Ae){let oe,J,se,k;return Array.isArray(re)?K(re):"tokenize"in re?K([re]):F(re);function F(ke){return be;function be(Ie){const Ue=Ie!==null&&ke[Ie],lt=Ie!==null&&ke.null,cn=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return K(cn)(Ie)}}function K(ke){return oe=ke,J=0,ke.length===0?Ae:I(ke[J])}function I(ke){return be;function be(Ie){return k=fe(),se=ke,ke.partial||(f.currentConstruct=ke),ke.name&&f.parser.constructs.disable.null.includes(ke.name)?Me():ke.tokenize.call(ue?Object.assign(Object.create(f),ue):f,d,xe,Me)(Ie)}}function xe(ke){return ie(se,k),ae}function Me(ke){return k.restore(),++J<oe.length?I(oe[J]):Ae}}}function ne(ie,ue){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&Xn(f.events,ue,f.events.length-ue,ie.resolve(f.events.slice(ue),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function fe(){const ie=w(),ue=f.previous,ve=f.currentConstruct,re=f.events.length,ae=Array.from(l);return{from:re,restore:Ae};function Ae(){r=ie,f.previous=ue,f.currentConstruct=ve,f.events.length=re,l=ae,$()}}function $(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function lO(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 l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function cO(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 jm(i,s,c){return{value:i,source:null,stack:c!=null?c:null,digest:s!=null?s:null}}function $m(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var fU=typeof WeakMap=="function"?WeakMap:Map;function E2(i,s,c){c=Ei(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){md||(md=!0,i0=h),$m(i,s)},c}function y2(i,s,c){c=Ei(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;c.payload=function(){return h(E)},c.callback=function(){$m(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){$m(i,s),typeof h!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),c}function b2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new fU;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(c)||(E.add(c),i=AU.bind(null,i,s,c),s.then(i,i))}function T2(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 w2(i,s,c,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=Ei(-1,1),s.tag=2,qi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var hU=U.ReactCurrentOwner,$n=!1;function On(i,s,c,h){s.child=i===null?zx(s,null,c,h):Ys(s,i.child,c,h)}function _2(i,s,c,h,E){c=c.render;var b=s.ref;return Gs(s,E),h=Lm(i,s,c,h,b,E),c=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&c&&Em(s),s.flags|=1,On(i,s,h,E),s.child)}function x2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!d0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,S2(i,s,b,h,E)):(i=wd(c.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 S=b.memoizedProps;if(c=c.compare,c=c!==null?c:_u,c(S,h)&&i.ref===s.ref)return yi(i,s,E)}return s.flags|=1,i=Qi(b,h),i.ref=s.ref,i.return=s,s.child=i}function S2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(_u(b,h)&&i.ref===s.ref)if($n=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return s.lanes=i.lanes,yi(i,s,E)}return Vm(i,s,c,h,E)}function v2(i,s,c){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},Tt(Js,nr),nr|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Tt(Js,nr),nr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(Js,nr),nr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(Js,nr),nr|=h;return On(i,s,E,c),s.child}function A2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Vm(i,s,c,h,E){var b=jn(c)?Ro:xn.current;return b=js(s,b),Gs(s,E),c=Lm(i,s,c,h,b,E),h=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&h&&Em(s),s.flags|=1,On(i,s,c,E),s.child)}function C2(i,s,c,h,E){if(jn(c)){var b=!0;Yc(s)}else b=!1;if(Gs(s,E),s.stateNode===null)cd(i,s),m2(s,c,h),zm(s,c,h,E),h=!0;else if(i===null){var S=s.stateNode,L=s.memoizedProps;S.props=L;var H=S.context,ee=c.contextType;typeof ee=="object"&&ee!==null?ee=dr(ee):(ee=jn(c)?Ro:xn.current,ee=js(s,ee));var ce=c.getDerivedStateFromProps,pe=typeof ce=="function"||typeof S.getSnapshotBeforeUpdate=="function";pe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==h||H!==ee)&&g2(s,S,h,ee),Vi=!1;var ue=s.memoizedState;S.state=ue,td(s,h,S,E),H=s.memoizedState,L!==h||ue!==H||zn.current||Vi?(typeof ce=="function"&&(Hm(s,c,ce,h),H=s.memoizedState),(L=Vi||p2(s,c,L,h,ue,H,ee))?(pe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=H),S.props=h,S.state=H,S.context=ee,h=L):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,$x(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:Ar(s.type,L),S.props=ee,pe=s.pendingProps,ue=S.context,H=c.contextType,typeof H=="object"&&H!==null?H=dr(H):(H=jn(c)?Ro:xn.current,H=js(s,H));var ve=c.getDerivedStateFromProps;(ce=typeof ve=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==pe||ue!==H)&&g2(s,S,h,H),Vi=!1,ue=s.memoizedState,S.state=ue,td(s,h,S,E);var Pe=s.memoizedState;L!==pe||ue!==Pe||zn.current||Vi?(typeof ve=="function"&&(Hm(s,c,ve,h),Pe=s.memoizedState),(ee=Vi||p2(s,c,ee,h,ue,Pe,H)||!1)?(ce||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,H)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Pe),S.props=h,S.state=Pe,S.context=H,h=ee):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),h=!1)}return qm(i,s,c,h,b,E)}function qm(i,s,c,h,E,b){A2(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&Ix(s,c,!1),yi(i,s,b);h=s.stateNode,hU.current=s;var L=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Ys(s,i.child,null,b),s.child=Ys(s,null,L,b)):On(i,s,L,b),s.memoizedState=h.state,E&&Ix(s,c,!0),s.child}function k2(i){var s=i.stateNode;s.pendingContext?Px(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Px(i,s.context,!1),km(i,s.containerInfo)}function N2(i,s,c,h,E){return qs(),wm(E),s.flags|=256,On(i,s,c,h),s.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Wm(i){return{baseLanes:i,cachePool:null,transitions:null}}function P2(i,s,c){var h=s.pendingProps,E=Ot.current,b=!1,S=(s.flags&128)!==0,L;if((L=S)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Ot,E&1),i===null)return Tm(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):(S=h.children,i=h.fallback,b?(h=s.mode,b=s.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=_d(S,h,0,null),i=$o(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Wm(c),s.memoizedState=Ym,i):Gm(s,S));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return pU(i,s,S,h,L,E,c);if(b){b=h.fallback,S=s.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=H,s.deletions=null):(h=Qi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Qi(L,b):(b=$o(b,S,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,S=i.child.memoizedState,S=S===null?Wm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,s.memoizedState=Ym,h}return b=i.child,i=b.sibling,h=Qi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=c),h.return=s,h.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=h,s.memoizedState=null,h}function Gm(i,s){return s=_d({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ld(i,s,c,h){return h!==null&&wm(h),Ys(s,i.child,null,c),i=Gm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function pU(i,s,c,h,E,b,S){if(c)return s.flags&256?(s.flags&=-257,h=jm(Error(n(422))),ld(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=_d({mode:"visible",children:h.children},E,0,null),b=$o(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&Ys(s,i.child,null,S),s.child.memoizedState=Wm(S),s.memoizedState=Ym,b);if((s.mode&1)===0)return ld(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=jm(b,h,void 0),ld(i,s,S,h)}if(L=(S&i.childLanes)!==0,$n||L){if(h=an,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,gi(i,E),Nr(h,i,E,-1))}return c0(),h=jm(Error(n(421))),ld(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=CU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,tr=Hi(E.nextSibling),er=s,kt=!0,vr=null,i!==null&&(lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,pi=i.id,mi=i.overflow,Lo=s),s=Gm(s,h.children),s.flags|=4096,s)}function O2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),vm(i.return,s,c)}function Xm(i,s,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function I2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(On(i,s,h.children,c),h=Ot.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&&O2(i,c,s);else if(i.tag===19)O2(i,c,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(Tt(Ot,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(c=s.child,E=null;c!==null;)i=c.alternate,i!==null&&nd(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Xm(s,!1,E,c,b);break;case"backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&nd(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Xm(s,!0,c,null,b);break;case"together":Xm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function cd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function yi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Uo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Qi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function mU(i,s,c){switch(s.tag){case 3:k2(s),qs();break;case 5:Yx(s);break;case 1:jn(s.type)&&Yc(s);break;case 4:km(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(Jc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Ot,Ot.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?P2(i,s,c):(Tt(Ot,Ot.current&1),i=yi(i,s,c),i!==null?i.sibling:null);Tt(Ot,Ot.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return I2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Ot,Ot.current),h)break;return null;case 22:case 23:return s.lanes=0,v2(i,s,c)}return yi(i,s,c)}var R2,Km,L2,D2;R2=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Km=function(){},L2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Fo(Xr.current);var b=null;switch(c){case"input":E=Pt(i,E),h=Pt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Le(i,E),h=Le(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=$c)}fn(c,h);var S;c=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var L=E[ee];for(S in L)L.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var H=h[ee];if(L=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&H!==L&&(H!=null||L!=null))if(ee==="style")if(L){for(S in L)!L.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in H)H.hasOwnProperty(S)&&L[S]!==H[S]&&(c||(c={}),c[S]=H[S])}else c||(b||(b=[]),b.push(ee,c)),c=H;else ee==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(b=b||[]).push(ee,H)):ee==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(ee,""+H):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(H!=null&&ee==="onScroll"&&St("scroll",i),b||L===H||(b=[])):(b=b||[]).push(ee,H))}c&&(b=b||[]).push("style",c);var ee=b;(s.updateQueue=ee)&&(s.flags|=4)}},D2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Fu(i,s){if(!kt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function vn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function gU(i,s,c){var h=s.pendingProps;switch(ym(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(s),null;case 1:return jn(s.type)&&qc(),vn(s),null;case 3:return h=s.stateNode,Xs(),vt(zn),vt(xn),Om(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Kc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,vr!==null&&(a0(vr),vr=null))),Km(i,s),vn(s),null;case 5:Nm(s);var E=Fo(Iu.current);if(c=s.type,i!==null&&s.stateNode!=null)L2(i,s,c,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return vn(s),null}if(i=Fo(Xr.current),Kc(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[Gr]=s,h[Cu]=b,i=(s.mode&1)!==0,c){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Qn(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Be(h,b),St("invalid",h)}fn(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var L=b[S];S==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(S)&&L!=null&&S==="onScroll"&&St("scroll",h)}switch(c){case"input":cn(h),qe(h,b,!0);break;case"textarea":cn(h),gt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=$c)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Gr]=s,i[Cu]=h,R2(i,s,!1,!1),s.stateNode=i;e:{switch(S=Yr(c,h),c){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Qn(i,h),E=Pt(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Be(i,h),E=Le(i,h),St("invalid",i);break;default:E=h}fn(c,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var H=L[b];b==="style"?dn(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ye(i,H)):b==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&Re(i,H):typeof H=="number"&&Re(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?H!=null&&b==="onScroll"&&St("scroll",i):H!=null&&A(i,b,H,S))}switch(c){case"input":cn(i),qe(i,h,!1);break;case"textarea":cn(i),gt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?xe(i,!!h.multiple,b,!1):h.defaultValue!=null&&xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=$c)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return vn(s),null;case 6:if(i&&s.stateNode!=null)D2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Fo(Iu.current),Fo(Xr.current),Kc(s)){if(h=s.stateNode,c=s.memoizedProps,h[Gr]=s,(b=h.nodeValue!==c)&&(i=er,i!==null))switch(i.tag){case 3:jc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&jc(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Gr]=s,s.stateNode=h}return vn(s),null;case 13:if(vt(Ot),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&tr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Bx(),qs(),s.flags|=98560,b=!1;else if(b=Kc(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 qs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;vn(s),b=!1}else vr!==null&&(a0(vr),vr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Qt===0&&(Qt=3):c0())),s.updateQueue!==null&&(s.flags|=4),vn(s),null);case 4:return Xs(),Km(i,s),i===null&&vu(s.stateNode.containerInfo),vn(s),null;case 10:return Sm(s.type._context),vn(s),null;case 17:return jn(s.type)&&qc(),vn(s),null;case 19:if(vt(Ot),b=s.memoizedState,b===null)return vn(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Fu(b,!1);else{if(Qt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=nd(i),S!==null){for(s.flags|=128,Fu(b,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=c,c=s.child;c!==null;)b=c,i=h,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Ot,Ot.current&1|2),s.child}i=i.sibling}b.tail!==null&&Bt()>Zs&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304)}else{if(!h)if(i=nd(S),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!kt)return vn(s),null}else 2*Bt()-b.renderingStartTime>Zs&&c!==1073741824&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304);b.isBackwards?(S.sibling=s.child,s.child=S):(c=b.last,c!==null?c.sibling=S:s.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Bt(),s.sibling=null,c=Ot.current,Tt(Ot,h?c&1|2:c&1),s):(vn(s),null);case 22:case 23:return l0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(nr&1073741824)!==0&&(vn(s),s.subtreeFlags&6&&(s.flags|=8192)):vn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function EU(i,s){switch(ym(s),s.tag){case 1:return jn(s.type)&&qc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Xs(),vt(zn),vt(xn),Om(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Nm(s),null;case 13:if(vt(Ot),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));qs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(Ot),null;case 4:return Xs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return l0(),null;case 24:return null;default:return null}}var dd=!1,An=!1,yU=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Qs(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Dt(i,s,h)}else c.current=null}function Qm(i,s,c){try{c()}catch(h){Dt(i,s,h)}}var M2=!1;function bU(i,s){if(lm=Oc,i=px(),tm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ye){c=null;break e}var S=0,L=-1,H=-1,ee=0,ce=0,pe=i,ue=null;t:for(;;){for(var ve;pe!==c||E!==0&&pe.nodeType!==3||(L=S+E),pe!==b||h!==0&&pe.nodeType!==3||(H=S+h),pe.nodeType===3&&(S+=pe.nodeValue.length),(ve=pe.firstChild)!==null;)ue=pe,pe=ve;for(;;){if(pe===i)break t;if(ue===c&&++ee===E&&(L=S),ue===b&&++ce===h&&(H=S),(ve=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=ve}c=L===-1||H===-1?null:{start:L,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(cm={focusedElem:i,selectionRange:c},Oc=!1,Ne=s;Ne!==null;)if(s=Ne,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ne=i;else for(;Ne!==null;){s=Ne;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 Oe=Pe.memoizedProps,Ut=Pe.memoizedState,G=s.stateNode,q=G.getSnapshotBeforeUpdate(s.elementType===s.type?Oe:Ar(s.type,Oe),Ut);G.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Dt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ne=i;break}Ne=s.return}return Pe=M2,M2=!1,Pe}function Bu(i,s,c){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&&Qm(s,c,b)}E=E.next}while(E!==h)}}function fd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Jm(i){var s=i.ref;if(s!==null){var c=i.stateNode;i.tag,i=c,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[pm],delete s[tU],delete s[nU])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function B2(i){return i.tag===5||i.tag===3||i.tag===4}function U2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||B2(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 Zm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=$c));else if(h!==4&&(i=i.child,i!==null))for(Zm(i,s,c),i=i.sibling;i!==null;)Zm(i,s,c),i=i.sibling}function e0(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(e0(i,s,c),i=i.sibling;i!==null;)e0(i,s,c),i=i.sibling}var hn=null,Cr=!1;function Yi(i,s,c){for(c=c.child;c!==null;)H2(i,s,c),c=c.sibling}function H2(i,s,c){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(vc,c)}catch(L){}switch(c.tag){case 5:An||Qs(c,s);case 6:var h=hn,E=Cr;hn=null,Yi(i,s,c),hn=h,Cr=E,hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):hn.removeChild(c.stateNode));break;case 18:hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?hm(i.parentNode,c):i.nodeType===1&&hm(i,c),gu(i)):hm(hn,c.stateNode));break;case 4:h=hn,E=Cr,hn=c.stateNode.containerInfo,Cr=!0,Yi(i,s,c),hn=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!An&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Qm(c,s,S),E=E.next}while(E!==h)}Yi(i,s,c);break;case 1:if(!An&&(Qs(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(L){Dt(c,s,L)}Yi(i,s,c);break;case 21:Yi(i,s,c);break;case 22:c.mode&1?(An=(h=An)||c.memoizedState!==null,Yi(i,s,c),An=h):Yi(i,s,c);break;default:Yi(i,s,c)}}function z2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new yU),s.forEach(function(h){var E=kU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function kr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,S=s,L=S;e:for(;L!==null;){switch(L.tag){case 5:hn=L.stateNode,Cr=!1;break e;case 3:hn=L.stateNode.containerInfo,Cr=!0;break e;case 4:hn=L.stateNode.containerInfo,Cr=!0;break e}L=L.return}if(hn===null)throw Error(n(160));H2(b,S,E),hn=null,Cr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(ee){Dt(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)j2(s,i),s=s.sibling}function j2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(kr(s,i),Qr(i),h&4){try{Bu(3,i,i.return),fd(3,i)}catch(Oe){Dt(i,i.return,Oe)}try{Bu(5,i,i.return)}catch(Oe){Dt(i,i.return,Oe)}}break;case 1:kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return);break;case 5:if(kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Oe){Dt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&_n(E,b),Yr(L,S);var ee=Yr(L,b);for(S=0;S<H.length;S+=2){var ce=H[S],pe=H[S+1];ce==="style"?dn(E,pe):ce==="dangerouslySetInnerHTML"?Ye(E,pe):ce==="children"?Re(E,pe):A(E,ce,pe,ee)}switch(L){case"input":Gt(E,b);break;case"textarea":Xe(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ve=b.value;ve!=null?xe(E,!!b.multiple,ve,!1):ue!==!!b.multiple&&(b.defaultValue!=null?xe(E,!!b.multiple,b.defaultValue,!0):xe(E,!!b.multiple,b.multiple?[]:"",!1))}E[Cu]=b}catch(Oe){Dt(i,i.return,Oe)}}break;case 6:if(kr(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(Oe){Dt(i,i.return,Oe)}}break;case 3:if(kr(s,i),Qr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{gu(s.containerInfo)}catch(Oe){Dt(i,i.return,Oe)}break;case 4:kr(s,i),Qr(i);break;case 13:kr(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||(r0=Bt())),h&4&&z2(i);break;case 22:if(ce=c!==null&&c.memoizedState!==null,i.mode&1?(An=(ee=An)||ce,kr(s,i),An=ee):kr(s,i),Qr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(pe=Ne=ce;Ne!==null;){switch(ue=Ne,ve=ue.child,ue.tag){case 0:case 11:case 14:case 15:Bu(4,ue,ue.return);break;case 1:Qs(ue,ue.return);var Pe=ue.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=ue,c=ue.return;try{s=h,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Oe){Dt(h,c,Oe)}}break;case 5:Qs(ue,ue.return);break;case 22:if(ue.memoizedState!==null){q2(pe);continue}}ve!==null?(ve.return=ue,Ne=ve):q2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=pe.stateNode,H=pe.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=qt("display",S))}catch(Oe){Dt(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Oe){Dt(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:kr(s,i),Qr(i),h&4&&z2(i);break;case 21:break;default:kr(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(B2(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Re(E,""),h.flags&=-33);var b=U2(i);e0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,L=U2(i);Zm(i,L,S);break;default:throw Error(n(161))}}catch(H){Dt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function TU(i,s,c){Ne=i,$2(i)}function $2(i,s,c){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||dd;if(!S){var L=E.alternate,H=L!==null&&L.memoizedState!==null||An;L=dd;var ee=An;if(dd=S,(An=H)&&!ee)for(Ne=E;Ne!==null;)S=Ne,H=S.child,S.tag===22&&S.memoizedState!==null?Y2(E):H!==null?(H.return=S,Ne=H):Y2(E);for(;b!==null;)Ne=b,$2(b),b=b.sibling;Ne=E,dd=L,An=ee}V2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):V2(i)}}function V2(i){for(;Ne!==null;){var s=Ne;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:An||fd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!An)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:Ar(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&qx(s,b,h);break;case 3:var S=s.updateQueue;if(S!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}qx(s,S,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var ce=ee.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&gu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}An||s.flags&512&&Jm(s)}catch(ue){Dt(s,s.return,ue)}}if(s===i){Ne=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function q2(i){for(;Ne!==null;){var s=Ne;if(s===i){Ne=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function Y2(i){for(;Ne!==null;){var s=Ne;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fd(4,s)}catch(H){Dt(s,c,H)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(H){Dt(s,E,H)}}var b=s.return;try{Jm(s)}catch(H){Dt(s,b,H)}break;case 5:var S=s.return;try{Jm(s)}catch(H){Dt(s,S,H)}}}catch(H){Dt(s,s.return,H)}if(s===i){Ne=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Ne=L;break}Ne=s.return}}var wU=Math.ceil,hd=U.ReactCurrentDispatcher,t0=U.ReactCurrentOwner,hr=U.ReactCurrentBatchConfig,ot=0,an=null,Yt=null,pn=0,nr=0,Js=zi(0),Qt=0,Uu=null,Uo=0,pd=0,n0=0,Hu=null,Vn=null,r0=0,Zs=1/0,bi=null,md=!1,i0=null,Wi=null,gd=!1,Gi=null,Ed=0,zu=0,o0=null,yd=-1,bd=0;function In(){return(ot&6)!==0?Bt():yd!==-1?yd:yd=Bt()}function Xi(i){return(i.mode&1)===0?1:(ot&2)!==0&&pn!==0?pn&-pn:iU.transition!==null?(bd===0&&(bd=U_()),bd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:G_(i.type)),i)}function Nr(i,s,c,h){if(50<zu)throw zu=0,o0=null,Error(n(185));du(i,c,h),((ot&2)===0||i!==an)&&(i===an&&((ot&2)===0&&(pd|=c),Qt===4&&Ki(i,pn)),qn(i,h),c===1&&ot===0&&(s.mode&1)===0&&(Zs=Bt()+500,Wc&&$i()))}function qn(i,s){var c=i.callbackNode;iB(i,s);var h=kc(i,i===an?pn:0);if(h===0)c!==null&&M_(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&M_(c),s===1)i.tag===0?rU(G2.bind(null,i)):Rx(G2.bind(null,i)),ZB(function(){(ot&6)===0&&$i()}),c=null;else{switch(H_(h)){case 1:c=Bp;break;case 4:c=F_;break;case 16:c=Sc;break;case 536870912:c=B_;break;default:c=Sc}c=nS(c,W2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function W2(i,s){if(yd=-1,bd=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if(ea()&&i.callbackNode!==c)return null;var h=kc(i,i===an?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Td(i,h);else{s=h;var E=ot;ot|=2;var b=K2();(an!==i||pn!==s)&&(bi=null,Zs=Bt()+500,zo(i,s));do try{SU();break}catch(L){X2(i,L)}while(!0);xm(),hd.current=b,ot=E,Yt!==null?s=0:(an=null,pn=0,s=Qt)}if(s!==0){if(s===2&&(E=Up(i),E!==0&&(h=E,s=s0(i,E))),s===1)throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;if(s===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_U(E)&&(s=Td(i,h),s===2&&(b=Up(i),b!==0&&(h=b,s=s0(i,b))),s===1))throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:jo(i,Vn,bi);break;case 3:if(Ki(i,h),(h&130023424)===h&&(s=r0+500-Bt(),10<s)){if(kc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){In(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),s);break}jo(i,Vn,bi);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-xr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Bt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*wU(h/1960))-h,10<h){i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),h);break}jo(i,Vn,bi);break;case 5:jo(i,Vn,bi);break;default:throw Error(n(329))}}}return qn(i,Bt()),i.callbackNode===c?W2.bind(null,i):null}function s0(i,s){var c=Hu;return i.current.memoizedState.isDehydrated&&(zo(i,s).flags|=256),i=Td(i,s),i!==2&&(s=Vn,Vn=c,s!==null&&a0(s)),i}function a0(i){Vn===null?Vn=i:Vn.push.apply(Vn,i)}function _U(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!Sr(b(),E))return!1}catch(S){return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;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 Ki(i,s){for(s&=~n0,s&=~pd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-xr(s),h=1<<c;i[c]=-1,s&=~h}}function G2(i){if((ot&6)!==0)throw Error(n(327));ea();var s=kc(i,0);if((s&1)===0)return qn(i,Bt()),null;var c=Td(i,s);if(i.tag!==0&&c===2){var h=Up(i);h!==0&&(s=h,c=s0(i,h))}if(c===1)throw c=Uu,zo(i,0),Ki(i,s),qn(i,Bt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,jo(i,Vn,bi),qn(i,Bt()),null}function u0(i,s){var c=ot;ot|=1;try{return i(s)}finally{ot=c,ot===0&&(Zs=Bt()+500,Wc&&$i())}}function Ho(i){Gi!==null&&Gi.tag===0&&(ot&6)===0&&ea();var s=ot;ot|=1;var c=hr.transition,h=dt;try{if(hr.transition=null,dt=1,i)return i()}finally{dt=h,hr.transition=c,ot=s,(ot&6)===0&&$i()}}function l0(){nr=Js.current,vt(Js)}function zo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,JB(c)),Yt!==null)for(c=Yt.return;c!==null;){var h=c;switch(ym(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&qc();break;case 3:Xs(),vt(zn),vt(xn),Om();break;case 5:Nm(h);break;case 4:Xs();break;case 13:vt(Ot);break;case 19:vt(Ot);break;case 10:Sm(h.type._context);break;case 22:case 23:l0()}c=c.return}if(an=i,Yt=i=Qi(i.current,null),pn=nr=s,Qt=0,Uu=null,n0=pd=Uo=0,Vn=Hu=null,Mo!==null){for(s=0;s<Mo.length;s++)if(c=Mo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}c.pending=h}Mo=null}return i}function X2(i,s){do{var c=Yt;try{if(xm(),rd.current=ad,id){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}id=!1}if(Bo=0,sn=Kt=It=null,Ru=!1,Lu=0,t0.current=null,c===null||c.return===null){Qt=1,Uu=s,Yt=null;break}e:{var b=i,S=c.return,L=c,H=s;if(s=pn,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=H,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var ve=T2(S);if(ve!==null){ve.flags&=-257,w2(ve,S,L,b,s),ve.mode&1&&b2(b,ee,s),s=ve,H=ee;var Pe=s.updateQueue;if(Pe===null){var Oe=new Set;Oe.add(H),s.updateQueue=Oe}else Pe.add(H);break e}else{if((s&1)===0){b2(b,ee,s),c0();break e}H=Error(n(426))}}else if(kt&&L.mode&1){var Ut=T2(S);if(Ut!==null){(Ut.flags&65536)===0&&(Ut.flags|=256),w2(Ut,S,L,b,s),wm(Ks(H,L));break e}}b=H=Ks(H,L),Qt!==4&&(Qt=2),Hu===null?Hu=[b]:Hu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=E2(b,H,s);Vx(b,G);break e;case 1:L=H;var q=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Wi===null||!Wi.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=y2(b,L,s);Vx(b,ye);break e}}b=b.return}while(b!==null)}J2(c)}catch(De){s=De,Yt===c&&c!==null&&(Yt=c=c.return);continue}break}while(!0)}function K2(){var i=hd.current;return hd.current=ad,i===null?ad:i}function c0(){(Qt===0||Qt===3||Qt===2)&&(Qt=4),an===null||(Uo&268435455)===0&&(pd&268435455)===0||Ki(an,pn)}function Td(i,s){var c=ot;ot|=2;var h=K2();(an!==i||pn!==s)&&(bi=null,zo(i,s));do try{xU();break}catch(E){X2(i,E)}while(!0);if(xm(),ot=c,hd.current=h,Yt!==null)throw Error(n(261));return an=null,pn=0,Qt}function xU(){for(;Yt!==null;)Q2(Yt)}function SU(){for(;Yt!==null&&!X7();)Q2(Yt)}function Q2(i){var s=tS(i.alternate,i,nr);i.memoizedProps=i.pendingProps,s===null?J2(i):Yt=s,t0.current=null}function J2(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=gU(c,s,nr),c!==null){Yt=c;return}}else{if(c=EU(c,s),c!==null){c.flags&=32767,Yt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Qt=6,Yt=null;return}}if(s=s.sibling,s!==null){Yt=s;return}Yt=s=i}while(s!==null);Qt===0&&(Qt=5)}function jo(i,s,c){var h=dt,E=hr.transition;try{hr.transition=null,dt=1,vU(i,s,c,h)}finally{hr.transition=E,dt=h}return null}function vU(i,s,c,h){do ea();while(Gi!==null);if((ot&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(oB(i,b),i===an&&(Yt=an=null,pn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||gd||(gd=!0,nS(Sc,function(){return ea(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=hr.transition,hr.transition=null;var S=dt;dt=1;var L=ot;ot|=4,t0.current=null,bU(i,c),j2(c,i),qB(cm),Oc=!!lm,cm=lm=null,i.current=c,TU(c),K7(),ot=L,dt=S,hr.transition=b}else i.current=c;if(gd&&(gd=!1,Gi=i,Ed=E),b=i.pendingLanes,b===0&&(Wi=null),Z7(c.stateNode),qn(i,Bt()),s!==null)for(h=i.onRecoverableError,c=0;c<s.length;c++)E=s[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(md)throw md=!1,i=i0,i0=null,i;return(Ed&1)!==0&&i.tag!==0&&ea(),b=i.pendingLanes,(b&1)!==0?i===o0?zu++:(zu=0,o0=i):zu=0,$i(),null}function ea(){if(Gi!==null){var i=H_(Ed),s=hr.transition,c=dt;try{if(hr.transition=null,dt=16>i?16:i,Gi===null)var h=!1;else{if(i=Gi,Gi=null,Ed=0,(ot&6)!==0)throw Error(n(331));var E=ot;for(ot|=4,Ne=i.current;Ne!==null;){var b=Ne,S=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var H=0;H<L.length;H++){var ee=L[H];for(Ne=ee;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Bu(8,ce,b)}var pe=ce.child;if(pe!==null)pe.return=ce,Ne=pe;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,ve=ce.return;if(F2(ce),ce===ee){Ne=null;break}if(ue!==null){ue.return=ve,Ne=ue;break}Ne=ve}}}var Pe=b.alternate;if(Pe!==null){var Oe=Pe.child;if(Oe!==null){Pe.child=null;do{var Ut=Oe.sibling;Oe.sibling=null,Oe=Ut}while(Oe!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Ne=S;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Bu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var q=i.current;for(Ne=q;Ne!==null;){S=Ne;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,Ne=Q;else e:for(S=q;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:fd(9,L)}}catch(De){Dt(L,L.return,De)}if(L===S){Ne=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Ne=ye;break e}Ne=L.return}}if(ot=E,$i(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(vc,i)}catch(De){}h=!0}return h}finally{dt=c,hr.transition=s}}return!1}function Z2(i,s,c){s=Ks(c,s),s=E2(i,s,1),i=qi(i,s,1),s=In(),i!==null&&(du(i,1,s),qn(i,s))}function Dt(i,s,c){if(i.tag===3)Z2(i,i,c);else for(;s!==null;){if(s.tag===3){Z2(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Wi===null||!Wi.has(h))){i=Ks(c,i),i=y2(s,i,1),s=qi(s,i,1),i=In(),s!==null&&(du(s,1,i),qn(s,i));break}}s=s.return}}function AU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=In(),i.pingedLanes|=i.suspendedLanes&c,an===i&&(pn&c)===c&&(Qt===4||Qt===3&&(pn&130023424)===pn&&500>Bt()-r0?zo(i,0):n0|=c),qn(i,s)}function eS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Cc,Cc<<=1,(Cc&130023424)===0&&(Cc=4194304)));var c=In();i=gi(i,s),i!==null&&(du(i,s,c),qn(i,c))}function CU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),eS(i,c)}function kU(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),eS(i,c)}var tS;tS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||zn.current)$n=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return $n=!1,mU(i,s,c);$n=(i.flags&131072)!==0}else $n=!1,kt&&(s.flags&1048576)!==0&&Lx(s,Xc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;cd(i,s),i=s.pendingProps;var E=js(s,xn.current);Gs(s,c),E=Lm(null,s,h,i,E,c);var b=Dm();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,jn(h)?(b=!0,Yc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=ud,s.stateNode=E,E._reactInternals=s,zm(s,h,i,c),s=qm(null,s,h,!0,b,c)):(s.tag=0,kt&&b&&Em(s),On(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(cd(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=PU(h),i=Ar(h,i),E){case 0:s=Vm(null,s,h,i,c);break e;case 1:s=C2(null,s,h,i,c);break e;case 11:s=_2(null,s,h,i,c);break e;case 14:s=x2(null,s,h,Ar(h.type,i),c);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),Vm(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),C2(i,s,h,E,c);case 3:e:{if(k2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,$x(i,s),td(s,h,null,c);var S=s.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Ks(Error(n(423)),s),s=N2(i,s,h,c,E);break e}else if(h!==E){E=Ks(Error(n(424)),s),s=N2(i,s,h,c,E);break e}else for(tr=Hi(s.stateNode.containerInfo.firstChild),er=s,kt=!0,vr=null,c=zx(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(qs(),h===E){s=yi(i,s,c);break e}On(i,s,h,c)}s=s.child}return s;case 5:return Yx(s),i===null&&Tm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,dm(h,E)?S=null:b!==null&&dm(h,b)&&(s.flags|=32),A2(i,s),On(i,s,S,c),s.child;case 6:return i===null&&Tm(s),null;case 13:return P2(i,s,c);case 4:return km(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ys(s,null,h,c):On(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),_2(i,s,h,E,c);case 7:return On(i,s,s.pendingProps,c),s.child;case 8:return On(i,s,s.pendingProps.children,c),s.child;case 12:return On(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,S=E.value,Tt(Jc,h._currentValue),h._currentValue=S,b!==null)if(Sr(b.value,S)){if(b.children===E.children&&!zn.current){s=yi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){S=b.child;for(var H=L.firstContext;H!==null;){if(H.context===h){if(b.tag===1){H=Ei(-1,c&-c),H.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var ce=ee.pending;ce===null?H.next=H:(H.next=ce.next,ce.next=H),ee.pending=H}}b.lanes|=c,H=b.alternate,H!==null&&(H.lanes|=c),vm(b.return,c,s),L.lanes|=c;break}H=H.next}}else if(b.tag===10)S=b.type===s.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=c,L=S.alternate,L!==null&&(L.lanes|=c),vm(S,c,s),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===s){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}On(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Gs(s,c),E=dr(E),h=h(E),s.flags|=1,On(i,s,h,c),s.child;case 14:return h=s.type,E=Ar(h,s.pendingProps),E=Ar(h.type,E),x2(i,s,h,E,c);case 15:return S2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),cd(i,s),s.tag=1,jn(h)?(i=!0,Yc(s)):i=!1,Gs(s,c),m2(s,h,E),zm(s,h,E,c),qm(null,s,h,!0,i,c);case 19:return I2(i,s,c);case 22:return v2(i,s,c)}throw Error(n(156,s.tag))};function nS(i,s){return D_(i,s)}function NU(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=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 pr(i,s,c,h){return new NU(i,s,c,h)}function d0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function PU(i){if(typeof i=="function")return d0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===oe)return 14}return 2}function Qi(i,s){var c=i.alternate;return c===null?(c=pr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function wd(i,s,c,h,E,b){var S=2;if(h=i,typeof i=="function")d0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case $:return $o(c.children,E,b,s);case ne:S=8,E|=8;break;case de:return i=pr(12,c,s,E|2),i.elementType=de,i.lanes=b,i;case we:return i=pr(13,c,s,E),i.elementType=we,i.lanes=b,i;case re:return i=pr(19,c,s,E),i.elementType=re,i.lanes=b,i;case se:return _d(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case ie:S=9;break e;case fe:S=11;break e;case oe:S=14;break e;case Ae:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=pr(S,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function $o(i,s,c,h){return i=pr(7,i,h,s),i.lanes=c,i}function _d(i,s,c,h){return i=pr(22,i,h,s),i.elementType=se,i.lanes=c,i.stateNode={isHidden:!1},i}function f0(i,s,c){return i=pr(6,i,null,s),i.lanes=c,i}function h0(i,s,c){return s=pr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function OU(i,s,c,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=Hp(0),this.expirationTimes=Hp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function p0(i,s,c,h,E,b,S,L,H){return i=new OU(i,s,c,L,H),s===1?(s=1,b===!0&&(s|=8)):s=0,b=pr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(b),i}function IU(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function rS(i){if(!i)return ji;i=i._reactInternals;e:{if(Oo(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(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(jn(c))return Ox(i,c,s)}return s}function iS(i,s,c,h,E,b,S,L,H){return i=p0(c,h,!0,i,E,b,S,L,H),i.context=rS(null),c=i.current,h=In(),E=Xi(c),b=Ei(h,E),b.callback=s!=null?s:null,qi(c,b,E),i.current.lanes=E,du(i,E,h),qn(i,h),i}function xd(i,s,c,h){var E=s.current,b=In(),S=Xi(E);return c=rS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ei(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=qi(E,s,S),i!==null&&(Nr(i,E,S,b),ed(i,E,S)),S}function Sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function oS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function m0(i,s){oS(i,s),(i=i.alternate)&&oS(i,s)}function RU(){return null}var sS=typeof reportError=="function"?reportError:function(i){console.error(i)};function g0(i){this._internalRoot=i}vd.prototype.render=g0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));xd(i,s,null,null)},vd.prototype.unmount=g0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ho(function(){xd(null,i,null,null)}),s[fi]=null}};function vd(i){this._internalRoot=i}vd.prototype.unstable_scheduleHydration=function(i){if(i){var s=$_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Fi.length&&s!==0&&s<Fi[c].priority;c++);Fi.splice(c,0,i),c===0&&Y_(i)}};function E0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function aS(){}function LU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=Sd(S);b.call(ee)}}var S=iS(s,h,i,0,null,!1,!1,"",aS);return i._reactRootContainer=S,i[fi]=S.current,vu(i.nodeType===8?i.parentNode:i),Ho(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var ee=Sd(H);L.call(ee)}}var H=p0(i,0,!1,null,null,!1,!1,"",aS);return i._reactRootContainer=H,i[fi]=H.current,vu(i.nodeType===8?i.parentNode:i),Ho(function(){xd(s,H,c,h)}),H}function Cd(i,s,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var L=E;E=function(){var H=Sd(S);L.call(H)}}xd(s,S,i,E)}else S=LU(c,s,i,E,h);return Sd(S)}z_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=cu(s.pendingLanes);c!==0&&(zp(s,c|1),qn(s,Bt()),(ot&6)===0&&(Zs=Bt()+500,$i()))}break;case 13:Ho(function(){var h=gi(i,1);if(h!==null){var E=In();Nr(h,i,1,E)}}),m0(i,1)}},jp=function(i){if(i.tag===13){var s=gi(i,134217728);if(s!==null){var c=In();Nr(s,i,134217728,c)}m0(i,134217728)}},j_=function(i){if(i.tag===13){var s=Xi(i),c=gi(i,s);if(c!==null){var h=In();Nr(c,i,s,h)}m0(i,s)}},$_=function(){return dt},V_=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Lp=function(i,s,c){switch(s){case"input":if(Gt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var E=Vc(h);if(!E)throw Error(n(90));Lt(h),Gt(h,E)}}}break;case"textarea":Xe(i,c);break;case"select":s=c.value,s!=null&&xe(i,!!c.multiple,s,!1)}},k_=u0,N_=Ho;var DU={usingClientEntryPoint:!1,Events:[ku,Hs,Vc,A_,C_,u0]},ju={findFiberByHostInstance:Io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MU={bundleType:ju.bundleType,version:ju.version,rendererPackageName:ju.rendererPackageName,rendererConfig:ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=R_(i),i===null?null:i.stateNode},findFiberByHostInstance:ju.findFiberByHostInstance||RU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{vc=kd.inject(MU),Wr=kd}catch(i){}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DU,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E0(s))throw Error(n(200));return IU(i,s,null,c)},Mn.createRoot=function(i,s){if(!E0(i))throw Error(n(299));var c=!1,h="",E=sS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=p0(i,1,!1,null,null,c,!1,h,E),i[fi]=s.current,vu(i.nodeType===8?i.parentNode:i),new g0(s)},Mn.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=R_(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return Ho(i)},Mn.hydrate=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!E0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=sS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),s=iS(s,null,i,1,c!=null?c:null,E,!1,b,S),i[fi]=s.current,vu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,E]:s.mutableSourceEagerHydrationData.push(c,E);return new vd(s)},Mn.render=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!Ad(i))throw Error(n(40));return i._reactRootContainer?(Ho(function(){Cd(null,null,i,!1,function(){i._reactRootContainer=null,i[fi]=null})}),!0):!1},Mn.unstable_batchedUpdates=u0,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Ad(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Cd(i,s,c,!1,h)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var X1;function K1(){if(X1)return Rf.exports;X1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rf.exports=hN(),Rf.exports}var co=K1();function Q1(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=Q1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Q1(e))&&(r&&(r+=" "),r+=t);return r}const pN=()=>document.querySelector(`:is(input, textarea)[name="${z}-user-input"]:not(:disabled)`),Mf=()=>{var e;return(e=pN())!=null?e:document.querySelector(`.${z}-dialog-content, .${z}-modal-content`)},mN=()=>{var e;return(e=Mf())==null?void 0:e.focus({preventScroll:!0})},Ff=()=>{const e=()=>{const n=document.querySelector(`.${z}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var J1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Z1=eo.createContext&&eo.createContext(J1),gN=["attr","size","title"];function EN(e,t){if(e==null)return{};var n=yN(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 yN(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 bl(){return bl=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},bl.apply(this,arguments)}function eE(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 Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(n),!0).forEach(function(r){bN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bN(e,t,n){return t=TN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TN(e){var t=wN(e,"string");return typeof t=="symbol"?t:t+""}function wN(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tE(e){return e&&e.map((t,n)=>eo.createElement(t.tag,Tl({key:n},t.attr),tE(t.child)))}function ht(e){return t=>eo.createElement(_N,bl({attr:Tl({},e.attr)},t),tE(e.child))}function _N(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=EN(e,gN),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),eo.createElement("svg",bl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Tl(Tl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&eo.createElement("title",null,a),e.children)};return Z1!==void 0?eo.createElement(Z1.Consumer,null,n=>t(n)):t(J1)}function xN(e){return ht({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 SN=e=>D.isValidElement(e)?D.cloneElement(e,{"aria-hidden":!0}):e,oi=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,ariaHasPopup:a,ariaExpanded:u,title:l,disabled:d=!1,onClick:f})=>!n&&!t?null:_.jsx("button",{className:W(e,`${z}-icon-button`),type:r,"aria-label":o,"aria-haspopup":a,"aria-expanded":u,title:l,onClick:f,disabled:d,children:t?_.jsx("img",{className:W(`${z}-icon-image`),src:t,alt:"","aria-hidden":"true",loading:"lazy"}):SN(n)}),vN="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",AN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=tt(),{status:a}=Yn(),u=o==="messaging",l=a.type==="dialog"||a.type==="modal",f=r||(u?"Open Commerce Client":"Open Copilot"),p=u?_.jsx(xN,{className:W(t,`${z}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||vN,alt:"Copilot",className:W(t,`${z}-minimized-icon-img`)});return _.jsx(oi,{className:W(t,`${z}-minimized-button`),ariaLabel:f,ariaHasPopup:l?"dialog":void 0,ariaExpanded:!1,title:f,icon:p,onClick:e})},CN=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=tt(),r=D.useId(),o=D.useRef(null),[a]=D.useState(()=>document.createElement("div"));D.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{wa(!1),ri(!0),setTimeout(mN)};return _.jsxs(_.Fragment,{children:[co.createPortal(_.jsx("a",{href:`#${r}`,className:W(e,`${z}-skip-link`),style:t,onClick:l=>{var d,f;l.preventDefault(),(f=(d=o.current)==null?void 0:d.querySelector("button"))==null||f.focus({preventScroll:!0})},children:"Skip to chat"}),a),co.createPortal(_.jsx("div",{id:r,ref:o,className:W(e,`${z}-minimized-container`,n),style:t,children:_.jsx(AN,{onClick:u})}),document.body)]})},kN=e=>({[`${rt}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${rt}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${rt}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${rt}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${rt}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${rt}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),Bf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:W(e,`${z}-close-button`),disabled:r,onClick:n,type:"button",children:_.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),NN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const o=e.name||"",[a,u]=D.useState("");return D.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),_.jsxs("div",{className:W(n,`cim-${t}-component`,`${z}-image-file-preview`),children:[_.jsx("img",{className:W(n,`cim-${t}-component`,`${z}-image-preview`),src:a,alt:`${o} preview`,loading:"lazy"}),_.jsx("span",{className:W(n,`cim-${t}-component`,`${z}-image-file-name`),title:o,children:o}),_.jsx(Bf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function nE(e){return ht({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 rE(e){return ht({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 ns(e){return ht({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 PN(e){return ht({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 iE(e){return ht({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 oE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function ON(e){return ht({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 IN(e){return ht({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 RN(e){return ht({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 LN(e){return ht({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 DN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function MN(e){return ht({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 FN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=_.jsx(MN,{}),onFiles:l})=>{const d=D.useRef(null),f=D.useId(),p=r!=null?r:f,m=D.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=D.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return _.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[_.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-label`),"aria-hidden":"true",children:u}),_.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${z}-file-input`),type:"file",id:p,accept:t,name:`${z}-file-input`,disabled:n,onInput:T})]})},wl=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>_.jsx("button",{"aria-label":a,className:W(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),BN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?oE:ns;return n?_.jsx("img",{className:W(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(r,{"aria-hidden":"true",size:"16px"})},UN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?oE:ns;return _.jsx(oi,{className:W(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)||"Send message",icon:t!=null&&t.buttonIconUrl?null:_.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(wl,{className:W(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(BN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function HN(e){return ht({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 zN=()=>{const{messages:e}=Wn(),{handleCancel:t}=Rr();return{cancelRequest:D.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},jN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=zN();return n!=null&&n.enableCancelSearch?_.jsx(oi,{className:W(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:_.jsx(HN,{}),disabled:!e,onClick:r}):null};function EH(){}function yH(){}function sE(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 aE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $N=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN={};function uE(e,t){return(qN.jsx?VN:$N).test(e)}const YN=/[ \t\n\f\r]/g;function WN(e){return typeof e=="object"?e.type==="text"?lE(e.value):!1:lE(e)}function lE(e){return e.replace(YN,"")===""}class va{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}va.prototype.normal={},va.prototype.property={},va.prototype.space=void 0;function cE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new va(n,r,t)}function Aa(e){return e.toLowerCase()}class Fn{constructor(t,n){this.attribute=n,this.property=t}}Fn.prototype.attribute="",Fn.prototype.booleanish=!1,Fn.prototype.boolean=!1,Fn.prototype.commaOrSpaceSeparated=!1,Fn.prototype.commaSeparated=!1,Fn.prototype.defined=!1,Fn.prototype.mustUseProperty=!1,Fn.prototype.number=!1,Fn.prototype.overloadedBoolean=!1,Fn.prototype.property="",Fn.prototype.spaceSeparated=!1,Fn.prototype.space=void 0;let GN=0;const Ge=ho(),jt=ho(),Uf=ho(),Ee=ho(),pt=ho(),fo=ho(),Gn=ho();function ho(){return $u(2,++GN)}const Hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:jt,commaOrSpaceSeparated:Gn,commaSeparated:fo,number:Ee,overloadedBoolean:Uf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Hf);class jf extends Fn{constructor(t,n,r,o){let a=-1;if(super(t,n),dE(this,"space",o),typeof r=="number")for(;++a<zf.length;){const u=zf[a];dE(this,zf[a],(r&Hf[u])===Hf[u])}}}jf.prototype.defined=!0;function dE(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new jf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Aa(r)]=r,n[Aa(a.attribute)]=r}return new va(t,n,e.space)}const fE=rs({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:pt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,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 hE(e,t){return t in e?e[t]:t}function pE(e,t){return hE(e,t.toLowerCase())}const XN=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fo,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:pt,autoFocus:Ge,autoPlay:Ge,blocking:pt,capture:null,charSet:null,checked:Ge,cite:null,className:pt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:jt,controls:Ge,controlsList:pt,coords:Ee|fo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Uf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:pt,height:Ee,hidden:Uf,high:Ee,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ge,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,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:Ee,pattern:null,ping:pt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:pt,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:pt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,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:Ge,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,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:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:fo,part:pt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:pE}),KN=rs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,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:pt,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:Ge,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:fo,g2:fo,glyphName:fo,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:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,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:Gn,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:Gn,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:Gn,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:hE}),mE=rs({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()}}),gE=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pE}),EE=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JN=/[A-Z]/g,yE=/-[a-z]/g,ZN=/^data[-\w.:]+$/i;function _l(e,t){const n=Aa(t);let r=t,o=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yE,tP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yE.test(a)){let u=a.replace(JN,eP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=jf}return new o(r,t)}function eP(e){return"-"+e.toLowerCase()}function tP(e){return e.charAt(1).toUpperCase()}const Ca=cE([fE,XN,mE,gE,EE],"html"),Si=cE([fE,KN,mE,gE,EE],"svg");function bE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function TE(e){return e.join(" ").trim()}var is={},$f,wE;function nP(){if(wE)return $f;wE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
18
+ `,f="/",p="*",m="",T="comment",y="declaration";function w(N,x){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];x=x||{};var C=1,A=1;function U(re){var oe=re.match(t);oe&&(C+=oe.length);var Ae=re.lastIndexOf(d);A=~Ae?re.length-Ae:A+re.length}function Y(){var re={line:C,column:A};return function(oe){return oe.position=new R(re),de(),oe}}function R(re){this.start=re,this.end={line:C,column:A},this.source=x.source}R.prototype.content=N;function $(re){var oe=new Error(x.source+":"+C+":"+A+": "+re);if(oe.reason=re,oe.filename=x.source,oe.line=C,oe.column=A,oe.source=N,!x.silent)throw oe}function ne(re){var oe=re.exec(N);if(oe){var Ae=oe[0];return U(Ae),N=N.slice(Ae.length),oe}}function de(){ne(n)}function V(re){var oe;for(re=re||[];oe=ie();)oe!==!1&&re.push(oe);return re}function ie(){var re=Y();if(!(f!=N.charAt(0)||p!=N.charAt(1))){for(var oe=2;m!=N.charAt(oe)&&(p!=N.charAt(oe)||f!=N.charAt(oe+1));)++oe;if(oe+=2,m===N.charAt(oe-1))return $("End of comment missing");var Ae=N.slice(2,oe-2);return A+=2,U(Ae),N=N.slice(oe),A+=2,re({type:T,comment:Ae})}}function fe(){var re=Y(),oe=ne(r);if(oe){if(ie(),!ne(o))return $("property missing ':'");var Ae=ne(a),se=re({type:y,property:v(oe[0].replace(e,m)),value:Ae?v(Ae[0].replace(e,m)):m});return ne(u),se}}function we(){var re=[];V(re);for(var oe;oe=fe();)oe!==!1&&(re.push(oe),V(re));return re}return de(),we()}function v(N){return N?N.replace(l,m):m}return $f=w,$f}var _E;function rP(){if(_E)return is;_E=1;var e=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0}),is.default=n;const t=e(nP());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?o(f,p,d):p&&(a=a||{},a[f]=p)}),a}return is}var ka={},xE;function iP(){if(xE)return ka;xE=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.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()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,l):f=f.replace(r,l),f.replace(t,u))};return ka.camelCase=d,ka}var Na,SE;function oP(){if(SE)return Na;SE=1;var e=Na&&Na.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(rP()),n=iP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Na=r,Na}var sP=oP();const aP=Qe(sP),xl=vE("end"),Lr=vE("start");function vE(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 AE(e){const t=Lr(e),n=xl(e);if(t&&n)return{start:t,end:n}}function Pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?CE(e.position):"start"in e||"end"in e?CE(e):"line"in e||"column"in e?Vf(e):""}function Vf(e){return kE(e&&e.line)+":"+kE(e&&e.column)}function CE(e){return Vf(e&&e.start)+"-"+Vf(e&&e.end)}function kE(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=Pa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const qf={}.hasOwnProperty,uP=new Map,lP=/[A-Z]/g,cP=new Set(["table","tbody","thead","tfoot","tr"]),dP=new Set(["td","th"]),NE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fP(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=TP(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=bP(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"?Si:Ca,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=PE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function PE(e,t,n){if(t.type==="element")return hP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gP(e,t,n);if(t.type==="mdxjsEsm")return mP(e,t);if(t.type==="root")return EP(e,t,n);if(t.type==="text")return yP(e,t)}function hP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=IE(e,t.tagName,!1),u=wP(e,t);let l=Wf(e,t);return cP.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!WN(d):!0})),OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function pP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Oa(e,t.position)}function mP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oa(e,t.position)}function gP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:IE(e,t.name,!0),u=_P(e,t),l=Wf(e,t);return OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function EP(e,t,n){const r={};return Yf(r,Wf(e,t)),e.create(t,e.Fragment,r,n)}function yP(e,t){return t.value}function OE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bP(e,t,n){return r;function r(o,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function TP(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Lr(r);return t(o,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function wP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&qf.call(t.properties,o)){const a=xP(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&dP.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _P(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Oa(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 l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Oa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Wf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:uP;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 l=PE(e,a,u);l!==void 0&&n.push(l)}return n}function xP(e,t,n){const r=_l(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?aE(n):TE(n)),r.property==="style"){let o=typeof n=="object"?n:SP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=vP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?QN[r.property]||r.property:r.attribute,n]}}function SP(e,t){try{return aP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("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 IE(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 l=uE(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=uE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return qf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Oa(e)}function Oa(e,t){const n=new bn("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)qf.call(e,n)&&(t[AP(n)]=e[n]);return t}function AP(e){let t=e.replace(lP,CP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CP(e){return"-"+e.toLowerCase()}const Gf={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"]},kP={};function Xf(e,t){const n=kP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return RE(e,r,o)}function RE(e,t,n){if(NP(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 LE(e.children,t,n)}return Array.isArray(e)?LE(e,t,n):""}function LE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=RE(e[o],t,n);return r.join("")}function NP(e){return!!(e&&typeof e=="object")}const DE=document.createElement("i");function Kf(e){const t="&"+e+";";DE.innerHTML=t;const n=DE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function sr(e,t){return e.length>0?(Xn(e,e.length,0,t),e):t}const ME={}.hasOwnProperty;function FE(e){const t={};let n=-1;for(;++n<e.length;)PP(t,e[n]);return t}function PP(e,t){let n;for(n in t){const o=(ME.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){ME.call(o,u)||(o[u]=[]);const l=a[u];OP(o[u],Array.isArray(l)?l:l?[l]:[])}}}function OP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xn(e,0,0,r)}function BE(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 yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=vi(/[A-Za-z]/),Tn=vi(/[\dA-Za-z]/),IP=vi(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Qf=vi(/\d/),RP=vi(/[\dA-Fa-f]/),LP=vi(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const vl=vi(new RegExp("\\p{P}|\\p{S}","u")),po=vi(/\s/);function vi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function os(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),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 it(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),l(d)):t(d)}function l(d){return Ze(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const DP={tokenize:MP};function MP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const FP={tokenize:BP},UE={tokenize:UP};function BP(e){const t=this,n=[];let r=0,o,a,u;return l;function l(A){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const U=t.events.length;let Y=U,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}x(r);let $=U;for(;$<t.events.length;)t.events[$][1].end=B({},R),$++;return Xn(t.events,Y+1,0,t.events.slice(U)),t.events.length=$,f(A)}return l(A)}function f(A){if(r===n.length){if(!o)return T(A);if(o.currentConstruct&&o.currentConstruct.concrete)return w(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(UE,p,m)(A)}function p(A){return o&&C(),x(r),T(A)}function m(A){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(A)}function T(A){return t.containerState={},e.attempt(UE,y,w)(A)}function y(A){return r++,n.push([t.currentConstruct,t.containerState]),T(A)}function w(A){if(A===null){o&&C(),x(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(A)}function v(A){if(A===null){N(e.exit("chunkFlow"),!0),x(0),e.consume(A);return}return ze(A)?(e.consume(A),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(A),v)}function N(A,U){const Y=t.sliceStream(A);if(U&&Y.push(null),A.previous=a,a&&(a.next=A),a=A,o.defineSkip(A.start),o.write(Y),t.parser.lazy[A.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<u&&(!o.events[R][1].end||o.events[R][1].end.offset>u))return;const $=t.events.length;let ne=$,de,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){V=t.events[ne][1].end;break}de=!0}for(x(r),R=$;R<t.events.length;)t.events[R][1].end=B({},V),R++;Xn(t.events,ne+1,0,t.events.slice($)),t.events.length=R}}function x(A){let U=n.length;for(;U-- >A;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=A}function C(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function UP(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ss(e){if(e===null||mt(e)||po(e))return 1;if(vl(e))return 2}function Al(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 Jf={name:"attention",resolveAll:HP,tokenize:zP};function HP(e,t){let n=-1,r,o,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);HE(m,-d),HE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:B({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},l.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=sr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=sr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=sr(f,Al(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=sr(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=sr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(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 zP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ss(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=ss(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 jP={name:"autolink",tokenize:$P};function $P(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Nn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Tn(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):IP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const Ia={partial:!0,tokenize:VP};function VP(e,t,n){return r;function r(a){return Ze(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ze(a)?t(a):n(a)}}const zE={continuation:{tokenize:YP},exit:WP,name:"blockQuote",tokenize:qP};function qP(e,t,n){const r=this;return o;function o(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function YP(e,t,n){const r=this;return o;function o(u){return Ze(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(zE,t,n)(u)}}function WP(e){e.exit("blockQuote")}const jE={name:"characterEscape",tokenize:GP};function GP(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 LP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const $E={name:"characterReference",tokenize:XP};function XP(e,t,n){const r=this;let o=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=RP,p):(e.enter("characterReferenceValue"),a=7,u=Qf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!Kf(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 VE={partial:!0,tokenize:QP},qE={concrete:!0,name:"codeFenced",tokenize:KP};function KP(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?it(e,m,"whitespace")(R):m(R))}function m(R){return R===null||ze(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(VE,v,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||ze(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),w)}function v(R){return e.attempt(o,U,N)(R)}function N(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return a>0&&Ze(R)?it(e,C,"linePrefix",a+1)(R):C(R)}function C(R){return R===null||ze(R)?e.check(VE,v,U)(R):(e.enter("codeFlowValue"),A(R))}function A(R){return R===null||ze(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),A)}function U(R){return e.exit("codeFenced"),t(R)}function Y(R,$,ne){let de=0;return V;function V(oe){return R.enter("lineEnding"),R.consume(oe),R.exit("lineEnding"),ie}function ie(oe){return R.enter("codeFencedFence"),Ze(oe)?it(R,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):fe(oe)}function fe(oe){return oe===l?(R.enter("codeFencedFenceSequence"),we(oe)):ne(oe)}function we(oe){return oe===l?(de++,R.consume(oe),we):de>=u?(R.exit("codeFencedFenceSequence"),Ze(oe)?it(R,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||ze(oe)?(R.exit("codeFencedFence"),$(oe)):ne(oe)}}}function QP(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 Zf={name:"codeIndented",tokenize:ZP},JP={partial:!0,tokenize:e3};function ZP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),it(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):ze(f)?e.attempt(JP,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||ze(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function e3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):it(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):ze(u)?o(u):n(u)}}const t3={name:"codeText",previous:r3,resolve:n3,tokenize:i3};function n3(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 r3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i3(e,t,n){let r=0,o,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):ze(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||ze(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 o3{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&&Ra(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ra(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ra(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ra(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ra(this.left,n.reverse())}}}function Ra(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function YE(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new o3(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,s3(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=B({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return Xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function s3(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 l=u.events,d=[],f={};let p,m,T=-1,y=n,w=0,v=0;const N=[v];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<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,N.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):N.pop(),T=N.length;T--;){const x=l.slice(N[T],N[T+1]),C=a.pop();d.push([C,C+x.length-1]),e.splice(C,2,x)}for(d.reverse(),T=-1;++T<d.length;)f[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return f}const a3={resolve:l3,tokenize:c3},u3={partial:!0,tokenize:d3};function l3(e){return YE(e),e}function c3(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):ze(l)?e.check(u3,u,a)(l):(e.consume(l),o)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function d3(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(u){if(u===null||ze(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function WE(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(x){return x===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(x),e.exit(a),T):x===null||x===32||x===41||Sl(x)?n(x):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function T(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(l),T(x)):x===null||x===60||ze(x)?n(x):(e.consume(x),x===92?w:y)}function w(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!p&&(x===null||x===41||mt(x))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(x)):p<f&&x===40?(e.consume(x),p++,v):x===41?(e.consume(x),p--,v):x===null||x===32||x===40||Sl(x)?n(x):(e.consume(x),x===92?N:v)}function N(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function GE(e,t,n,r,o,a){const u=this;let l=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 l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):ze(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||ze(y)||l++>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),l++,m):m(y)}}function XE(e,t,n,r,o,a){let u;return l;function l(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):ze(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||ze(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 La(e,t){let n;return r;function r(o){return ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const f3={name:"definition",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return GE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=yr(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 mt(y)?La(e,f)(y):f(y)}function f(y){return WE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(h3,m,m)(y)}function m(y){return Ze(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||ze(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function m3(e,t,n){return r;function r(l){return mt(l)?La(e,o)(l):n(l)}function o(l){return XE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ze(l)?it(e,u,"whitespace")(l):u(l)}function u(l){return l===null||ze(l)?t(l):n(l)}}const g3={name:"hardBreakEscape",tokenize:E3};function E3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const y3={name:"headingAtx",resolve:b3,tokenize:T3};function b3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function T3(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||mt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||ze(p)?(e.exit("atxHeading"),t(p)):Ze(p)?it(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||mt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const w3=["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"],KE=["pre","script","style","textarea"],_3={concrete:!0,name:"htmlFlow",resolveTo:v3,tokenize:A3},x3={partial:!0,tokenize:k3},S3={partial:!0,tokenize:C3};function v3(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 A3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),T):I===47?(e.consume(I),a=!0,v):I===63?(e.consume(I),o=3,r.interrupt?t:k):Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,l=0,w):Nn(I)?(e.consume(I),o=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function w(I){const Se="CDATA[";return I===Se.charCodeAt(l++)?(e.consume(I),l===Se.length?r.interrupt?t:fe:w):n(I)}function v(I){return Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function N(I){if(I===null||I===47||I===62||mt(I)){const Se=I===47,Me=u.toLowerCase();return!Se&&!a&&KE.includes(Me)?(o=1,r.interrupt?t(I):fe(I)):w3.includes(u.toLowerCase())?(o=6,Se?(e.consume(I),x):r.interrupt?t(I):fe(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?C(I):A(I))}return I===45||Tn(I)?(e.consume(I),u+=String.fromCharCode(I),N):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:fe):n(I)}function C(I){return Ze(I)?(e.consume(I),C):V(I)}function A(I){return I===47?(e.consume(I),V):I===58||I===95||Nn(I)?(e.consume(I),U):Ze(I)?(e.consume(I),A):V(I)}function U(I){return I===45||I===46||I===58||I===95||Tn(I)?(e.consume(I),U):Y(I)}function Y(I){return I===61?(e.consume(I),R):Ze(I)?(e.consume(I),Y):A(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,$):Ze(I)?(e.consume(I),R):ne(I)}function $(I){return I===d?(e.consume(I),d=null,de):I===null||ze(I)?n(I):(e.consume(I),$)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mt(I)?Y(I):(e.consume(I),ne)}function de(I){return I===47||I===62||Ze(I)?A(I):n(I)}function V(I){return I===62?(e.consume(I),ie):n(I)}function ie(I){return I===null||ze(I)?fe(I):Ze(I)?(e.consume(I),ie):n(I)}function fe(I){return I===45&&o===2?(e.consume(I),Ae):I===60&&o===1?(e.consume(I),se):I===62&&o===4?(e.consume(I),F):I===63&&o===3?(e.consume(I),k):I===93&&o===5?(e.consume(I),ae):ze(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(x3,K,we)(I)):I===null||ze(I)?(e.exit("htmlFlowData"),we(I)):(e.consume(I),fe)}function we(I){return e.check(S3,re,K)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||ze(I)?we(I):(e.enter("htmlFlowData"),fe(I))}function Ae(I){return I===45?(e.consume(I),k):fe(I)}function se(I){return I===47?(e.consume(I),u="",J):fe(I)}function J(I){if(I===62){const Se=u.toLowerCase();return KE.includes(Se)?(e.consume(I),F):fe(I)}return Nn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),J):fe(I)}function ae(I){return I===93?(e.consume(I),k):fe(I)}function k(I){return I===62?(e.consume(I),F):I===45&&o===2?(e.consume(I),k):fe(I)}function F(I){return I===null||ze(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),F)}function K(I){return e.exit("htmlFlow"),t(I)}}function C3(e,t,n){const r=this;return o;function o(u){return ze(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 k3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ia,t,n)}}const N3={name:"htmlText",tokenize:P3};function P3(e,t,n){const r=this;let o,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),A):Nn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Nn(k)?(e.consume(k),C):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):ze(k)?(u=m,se(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ae(k):k===45?T(k):m(k)}function w(k){const F="CDATA[";return k===F.charCodeAt(a++)?(e.consume(k),a===F.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),N):ze(k)?(u=v,se(k)):(e.consume(k),v)}function N(k){return k===93?(e.consume(k),x):v(k)}function x(k){return k===62?Ae(k):k===93?(e.consume(k),x):v(k)}function C(k){return k===null||k===62?Ae(k):ze(k)?(u=C,se(k)):(e.consume(k),C)}function A(k){return k===null?n(k):k===63?(e.consume(k),U):ze(k)?(u=A,se(k)):(e.consume(k),A)}function U(k){return k===62?Ae(k):A(k)}function Y(k){return Nn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||Tn(k)?(e.consume(k),R):$(k)}function $(k){return ze(k)?(u=$,se(k)):Ze(k)?(e.consume(k),$):Ae(k)}function ne(k){return k===45||Tn(k)?(e.consume(k),ne):k===47||k===62||mt(k)?de(k):n(k)}function de(k){return k===47?(e.consume(k),Ae):k===58||k===95||Nn(k)?(e.consume(k),V):ze(k)?(u=de,se(k)):Ze(k)?(e.consume(k),de):Ae(k)}function V(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),V):ie(k)}function ie(k){return k===61?(e.consume(k),fe):ze(k)?(u=ie,se(k)):Ze(k)?(e.consume(k),ie):de(k)}function fe(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,we):ze(k)?(u=fe,se(k)):Ze(k)?(e.consume(k),fe):(e.consume(k),re)}function we(k){return k===o?(e.consume(k),o=void 0,oe):k===null?n(k):ze(k)?(u=we,se(k)):(e.consume(k),we)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||mt(k)?de(k):(e.consume(k),re)}function oe(k){return k===47||k===62||mt(k)?de(k):n(k)}function Ae(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function se(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?it(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ae(k)}function ae(k){return e.enter("htmlTextData"),u(k)}}const eh={name:"labelEnd",resolveAll:L3,resolveTo:D3,tokenize:M3},O3={tokenize:F3},I3={tokenize:B3},R3={tokenize:U3};function L3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Xn(e,0,e.length,n),e}function D3(e,t){let n=e.length,r=0,o,a,u,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=sr(l,e.slice(a+1,a+r+3)),l=sr(l,[["enter",p,t]]),l=sr(l,Al(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=sr(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=sr(l,e.slice(u+1)),l=sr(l,[["exit",d,t]]),Xn(e,a,e.length,l),e}function M3(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 l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(yr(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(O3,p,u?p:m)(T):T===91?e.attempt(I3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(R3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function F3(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 mt(m)?La(e,a)(m):a(m)}function a(m){return m===41?p(m):WE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?La(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?XE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?La(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function B3(e,t,n){const r=this;return o;function o(l){return GE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function U3(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 H3={name:"labelStartImage",resolveAll:eh.resolveAll,tokenize:z3};function z3(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const j3={name:"labelStartLink",resolveAll:eh.resolveAll,tokenize:$3};function $3(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 th={name:"lineEnding",tokenize:V3};function V3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:q3};function q3(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,l(f)}function l(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ze(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?it(e,l,"whitespace")(f):l(f))}}const Bn={continuation:{tokenize:X3},exit:Q3,name:"list",tokenize:G3},Y3={partial:!0,tokenize:J3},W3={partial:!0,tokenize:K3};function G3(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 l;function l(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Qf(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="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 Qf(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(Ia,r.interrupt?n:p,e.attempt(Y3,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 X3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ia,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ze(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(W3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Bn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function K3(e,t,n){const r=this;return it(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 Q3(e){e.exit(this.containerState.type)}function J3(e,t,n){const r=this;return it(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 QE={name:"setextUnderline",resolveTo:Z3,tokenize:eO};function Z3(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function eO(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"),l(f)}function l(f){return f===o?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ze(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ze(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const tO={tokenize:nO};function nO(e){const t=this,n=e.attempt(Ia,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(a3,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 rO={resolveAll:ZE()},iO=JE("string"),oO=JE("text");function JE(e){return{resolveAll:ZE(e==="text"?sO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=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 ZE(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 sO(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,l=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:B({},r.end)};r.end=B({},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 aO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:f3},disable:{null:[]},document:{42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:zE},flow:{35:y3,42:Cl,45:[QE,Cl],60:_3,61:QE,95:Cl,96:qE,126:qE},flowInitial:{[-2]:Zf,[-1]:Zf,32:Zf},insideSpan:{null:[Jf,rO]},string:{38:$E,92:jE},text:{[-5]:th,[-4]:th,[-3]:th,33:H3,38:$E,42:Jf,60:[jP,N3],91:j3,92:[g3,jE],93:eh,95:Jf,96:t3}},Symbol.toStringTag,{value:"Module"}));function uO(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=[],l=[];const d={attempt:$(Y),check:$(R),consume:C,enter:A,exit:U,interrupt:$(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=sr(u,ie),N(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Al(a,f.events,f),f.events)}function T(ie,fe){return cO(y(ie),fe)}function y(ie){return lO(u,ie)}function w(){const{_bufferIndex:ie,_index:fe,line:we,column:re,offset:oe}=r;return{_bufferIndex:ie,_index:fe,line:we,column:re,offset:oe}}function v(ie){o[ie.line]=ie.column,V()}function N(){let ie;for(;r._index<u.length;){const fe=u[r._index];if(typeof fe=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<fe.length;)x(fe.charCodeAt(r._bufferIndex));else x(fe)}}function x(ie){p=p(ie)}function C(ie){ze(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,V()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function A(ie,fe){const we=fe||{};return we.type=ie,we.start=w(),f.events.push(["enter",we,f]),l.push(we),we}function U(ie){const fe=l.pop();return fe.end=w(),f.events.push(["exit",fe,f]),fe}function Y(ie,fe){ne(ie,fe.from)}function R(ie,fe){fe.restore()}function $(ie,fe){return we;function we(re,oe,Ae){let se,J,ae,k;return Array.isArray(re)?K(re):"tokenize"in re?K([re]):F(re);function F(ke){return be;function be(Ie){const Ue=Ie!==null&&ke[Ie],lt=Ie!==null&&ke.null,cn=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return K(cn)(Ie)}}function K(ke){return se=ke,J=0,ke.length===0?Ae:I(ke[J])}function I(ke){return be;function be(Ie){return k=de(),ae=ke,ke.partial||(f.currentConstruct=ke),ke.name&&f.parser.constructs.disable.null.includes(ke.name)?Me():ke.tokenize.call(fe?Object.assign(Object.create(f),fe):f,d,Se,Me)(Ie)}}function Se(ke){return ie(ae,k),oe}function Me(ke){return k.restore(),++J<se.length?I(se[J]):Ae}}}function ne(ie,fe){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&Xn(f.events,fe,f.events.length-fe,ie.resolve(f.events.slice(fe),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function de(){const ie=w(),fe=f.previous,we=f.currentConstruct,re=f.events.length,oe=Array.from(l);return{from:re,restore:Ae};function Ae(){r=ie,f.previous=fe,f.currentConstruct=we,f.events.length=re,l=oe,V()}}function V(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function lO(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 l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function cO(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 dO(e){const r={constructs:FE([aO,...(e||{}).extensions||[]]),content:o(DP),defined:[],document:o(FP),flow:o(tO),lazy:{},string:o(iO),text:o(oO)};return r;function o(a){return u;function u(l){return uO(r,a,l)}}}function fO(e){for(;!YE(e););return e}const ey=/[\0\t\n\r]/g;function hO(){let e=1,t="",n=!0,r;return o;function o(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(ey.lastIndex=m,f=ey.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const pO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mO(e){return e.replace(pO,gO)}function gO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return BE(n.slice(a?2:1),a?16:10)}return Kf(n)||e}const ty={}.hasOwnProperty;function EO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yO(n)(fO(dO(n).document().write(hO()(e,t,!0))))}function yO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:fe,autolinkEmail:fe,atxHeading:a(Qn),blockQuote:a(lt),characterEscape:fe,characterReference:fe,codeFenced:a(cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(cn,u),codeText:a(Lt,u),codeTextData:fe,data:fe,codeFlowValue:fe,definition:a($t),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Pt),hardBreakEscape:a(_n),hardBreakTrailing:a(_n),htmlFlow:a(Gt,u),htmlFlowData:fe,htmlText:a(Gt,u),htmlTextData:fe,image:a(qe),label:u,link:a(bt),listItem:a(_e),listItemValue:T,listOrdered:a(Vt,m),listUnordered:a(Vt),paragraph:a(Le),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Qn),strong:a(Be),thematicBreak:a(gt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ue,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:$,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:ke,characterReference:be,codeFenced:d(N),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:$,codeIndented:d(x),codeText:d(ae),codeTextData:$,data:$,definition:d(),definitionDestinationString:U,definitionLabelString:A,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(ue),hardBreakTrailing:d(ue),htmlFlow:d(ve),htmlFlowData:$,htmlText:d(re),htmlTextData:$,image:d(oe),label:se,labelText:J,lineEnding:ie,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:xe,resourceDestinationString:k,resourceTitleString:F,resource:K,setextHeading:d(ne),setextHeadingLineSequence:V,setextHeadingText:R,strong:d(),thematicBreak:d()}};ny(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ye=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ye.push(Re);else{const ct=Ye.pop();Re=o(Z,ct,Re)}for(Re=-1;++Re<Z.length;){const ct=t[Z[Re][0]];ty.call(ct,Z[Re][1].type)&&ct[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},Ce),Z[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||ry).call(Ce,void 0,ct[0])}for(ge.position={start:Ai(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ai(Z.length>0?Z[Z.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(Z,ge,Ce){let Ye=ge-1,Re=-1,ct=!1,Xt,qt,dn,qr;for(;++Ye<=Ce;){const fn=Z[Ye];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?Re++:Re--,qr=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(Xt&&!qr&&!Re&&!dn&&(dn=Ye),qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qr=void 0}if(!Re&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||Re===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(Xt){let Yr=Ye;for(qt=void 0;Yr--;){const Jn=Z[Yr];if(Jn[1].type==="lineEnding"||Jn[1].type==="lineEndingBlank"){if(Jn[0]==="exit")continue;qt&&(Z[qt][1].type="lineEndingBlank",ct=!0),Jn[1].type="lineEnding",qt=Yr}else if(!(Jn[1].type==="linePrefix"||Jn[1].type==="blockQuotePrefix"||Jn[1].type==="blockQuotePrefixWhitespace"||Jn[1].type==="blockQuoteMarker"||Jn[1].type==="listItemIndent"))break}dn&&(!qt||dn<qt)&&(Xt._spread=!0),Xt.end=Object.assign({},qt?Z[qt][1].start:fn[1].end),Z.splice(qt||Ye,0,["exit",Xt,fn[2]]),Ye++,Ce++}if(fn[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};Xt=Yr,Z.splice(Ye,0,["enter",Yr,fn[2]]),Ye++,Ce++,dn=void 0,qr=!0}}}return Z[ge][1]._spread=ct,Ce}function a(Z,ge){return Ce;function Ce(Ye){l.call(this,Z(Ye),Ye),ge&&ge.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:Ai(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==Z.type&&(ge?ge.call(this,Z,Ye[0]):(Ye[1]||ry).call(this,Z,Ye[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Pa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=Ai(Z.end)}function p(){return Xf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function A(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase()}function C(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function Y(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function V(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function fe(Z){const Ce=this.stack[this.stack.length-1].children;let Ye=Ce[Ce.length-1];(!Ye||Ye.type!=="text")&&(Ye=Xe(),Ye.position={start:Ai(Z.start),end:void 0},Ce.push(Ye)),this.stack.push(Ye)}function $(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=Ai(Z.end)}function ie(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Ai(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(fe.call(this,Z),$.call(this,Z))}function ue(){this.data.atHardBreak=!0}function ve(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function re(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function ae(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function Ae(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function oe(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=mO(ge),Ce.identifier=yr(ge).toLowerCase()}function se(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ye=Z.children;Ce.children=Ye}else Ce.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function F(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function xe(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Me(Z){this.data.characterReferenceType=Z.type}function ke(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let Ye;Ce?(Ye=BE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Kf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ye}function be(Z){const ge=this.stack.pop();ge.position.end=Ai(Z.end)}function Ie(Z){$.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ue(Z){$.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function lt(){return{type:"blockquote",children:[]}}function cn(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function $t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function Qn(){return{type:"heading",depth:0,children:[]}}function _n(){return{type:"break"}}function Gt(){return{type:"html",value:""}}function qe(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Vt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function _e(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Le(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function ny(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ny(e,r):bO(e,r)}}function bO(e,t){let n;for(n in t)if(ty.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 ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is still open")}function TO(e){const t=this;t.parser=n;function n(r){return EO(r,me(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function wO(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 _O(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{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 dO(e){const r={constructs:FE([aO,...(e||{}).extensions||[]]),content:o(DP),defined:[],document:o(FP),flow:o(tO),lazy:{},string:o(iO),text:o(oO)};return r;function o(a){return u;function u(l){return uO(r,a,l)}}}function fO(e){for(;!YE(e););return e}const ey=/[\0\t\n\r]/g;function hO(){let e=1,t="",n=!0,r;return o;function o(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(ey.lastIndex=m,f=ey.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const pO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mO(e){return e.replace(pO,gO)}function gO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return BE(n.slice(a?2:1),a?16:10)}return Kf(n)||e}const ty={}.hasOwnProperty;function EO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yO(n)(fO(dO(n).document().write(hO()(e,t,!0))))}function yO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Qn),blockQuote:a(lt),characterEscape:de,characterReference:de,codeFenced:a(cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(cn,u),codeText:a(Lt,u),codeTextData:de,data:de,codeFlowValue:de,definition:a($t),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Pt),hardBreakEscape:a(_n),hardBreakTrailing:a(_n),htmlFlow:a(Gt,u),htmlFlowData:de,htmlText:a(Gt,u),htmlTextData:de,image:a(qe),label:u,link:a(bt),listItem:a(xe),listItemValue:T,listOrdered:a(Vt,m),listUnordered:a(Vt),paragraph:a(Le),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Qn),strong:a(Be),thematicBreak:a(gt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ue,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:ke,characterReference:be,codeFenced:d(N),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:V,codeIndented:d(x),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:U,definitionLabelString:C,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(fe),hardBreakTrailing:d(fe),htmlFlow:d(we),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(se),label:ae,labelText:J,lineEnding:ie,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:k,resourceTitleString:F,resource:K,setextHeading:d(ne),setextHeadingLineSequence:$,setextHeadingText:R,strong:d(),thematicBreak:d()}};ny(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ye=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ye.push(Re);else{const ct=Ye.pop();Re=o(Z,ct,Re)}for(Re=-1;++Re<Z.length;){const ct=t[Z[Re][0]];ty.call(ct,Z[Re][1].type)&&ct[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},Ce),Z[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||ry).call(Ce,void 0,ct[0])}for(ge.position={start:Ai(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ai(Z.length>0?Z[Z.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(Z,ge,Ce){let Ye=ge-1,Re=-1,ct=!1,Xt,qt,dn,qr;for(;++Ye<=Ce;){const fn=Z[Ye];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?Re++:Re--,qr=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(Xt&&!qr&&!Re&&!dn&&(dn=Ye),qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qr=void 0}if(!Re&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||Re===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(Xt){let Yr=Ye;for(qt=void 0;Yr--;){const Jn=Z[Yr];if(Jn[1].type==="lineEnding"||Jn[1].type==="lineEndingBlank"){if(Jn[0]==="exit")continue;qt&&(Z[qt][1].type="lineEndingBlank",ct=!0),Jn[1].type="lineEnding",qt=Yr}else if(!(Jn[1].type==="linePrefix"||Jn[1].type==="blockQuotePrefix"||Jn[1].type==="blockQuotePrefixWhitespace"||Jn[1].type==="blockQuoteMarker"||Jn[1].type==="listItemIndent"))break}dn&&(!qt||dn<qt)&&(Xt._spread=!0),Xt.end=Object.assign({},qt?Z[qt][1].start:fn[1].end),Z.splice(qt||Ye,0,["exit",Xt,fn[2]]),Ye++,Ce++}if(fn[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};Xt=Yr,Z.splice(Ye,0,["enter",Yr,fn[2]]),Ye++,Ce++,dn=void 0,qr=!0}}}return Z[ge][1]._spread=ct,Ce}function a(Z,ge){return Ce;function Ce(Ye){l.call(this,Z(Ye),Ye),ge&&ge.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:Ai(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==Z.type&&(ge?ge.call(this,Z,Ye[0]):(Ye[1]||ry).call(this,Z,Ye[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Pa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=Ai(Z.end)}function p(){return Xf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function C(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase()}function A(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function Y(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(Z){const Ce=this.stack[this.stack.length-1].children;let Ye=Ce[Ce.length-1];(!Ye||Ye.type!=="text")&&(Ye=Xe(),Ye.position={start:Ai(Z.start),end:void 0},Ce.push(Ye)),this.stack.push(Ye)}function V(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=Ai(Z.end)}function ie(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Ai(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(de.call(this,Z),V.call(this,Z))}function fe(){this.data.atHardBreak=!0}function we(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function re(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function oe(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function Ae(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=mO(ge),Ce.identifier=yr(ge).toLowerCase()}function ae(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ye=Z.children;Ce.children=Ye}else Ce.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function F(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Se(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Me(Z){this.data.characterReferenceType=Z.type}function ke(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let Ye;Ce?(Ye=BE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Kf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ye}function be(Z){const ge=this.stack.pop();ge.position.end=Ai(Z.end)}function Ie(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ue(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function lt(){return{type:"blockquote",children:[]}}function cn(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function $t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function Qn(){return{type:"heading",depth:0,children:[]}}function _n(){return{type:"break"}}function Gt(){return{type:"html",value:""}}function qe(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Vt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function xe(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Le(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function ny(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ny(e,r):bO(e,r)}}function bO(e,t){let n;for(n in t)if(ty.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 ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is still open")}function TO(e){const t=this;t.parser=n;function n(r){return EO(r,me(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function wO(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 _O(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
21
21
  `}]}function xO(e,t){const n=t.value?t.value+`
22
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 vO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function AO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=os(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,l=e.footnoteCounts.get(r);l===void 0?(l=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,l+=1,e.footnoteCounts.set(r,l);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(l>1?"-"+l:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function 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 kO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function iy(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 NO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iy(e,t);const o={src:os(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 PO(e,t){const n={src:os(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 OO(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 IO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return iy(e,t);const o={href:os(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 RO(e,t){const n={href:os(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 LO(e,t,n){const r=e.all(t),o=n?DO(n):oy(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let l=-1;for(;++l<r.length;){const p=r[l];(o||l!==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 DO(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=oy(n[r])}return t}function oy(e){const t=e.spread;return t==null?e.children.length>1:t}function MO(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 FO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function UO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HO(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)},l=Lr(t.children[1]),d=xl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,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 zO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function jO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sy=9,ay=32;function $O(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(uy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(uy(t.slice(o),o>0,!1)),a.join("")}function uy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===sy||a===ay;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===sy||a===ay;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function VO(e,t){const n={type:"text",value:$O(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const YO={blockquote:wO,break:_O,code:xO,delete:SO,emphasis:vO,footnoteReference:AO,heading:CO,html:kO,imageReference:NO,image:PO,inlineCode:OO,linkReference:IO,link:RO,listItem:LO,list:MO,paragraph:FO,root:BO,strong:UO,table:HO,tableCell:jO,tableRow:zO,text:VO,thematicBreak:qO,toml:kl,yaml:kl,definition:kl,footnoteDefinition:kl};function kl(){}const ly=-1,Nl=0,Da=1,Pl=2,nh=3,rh=4,ih=5,oh=6,cy=7,dy=8,{defineProperty:WO}=Object,fy=typeof self=="object"?self:globalThis,hy=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fy[e](t)},GO=(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 Nl:case ly:return n(u,o);case Da:{const l=n([],o);for(const d of u)l.push(r(d));return l}case Pl:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?WO(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case nh:return n(new Date(u),o);case rh:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case ih:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case oh:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case cy:{const{name:l,message:d}=u;return n(typeof fy[l]=="function"?hy(l,d):new Error(d),o)}case dy: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:l}=new Uint8Array(u);return n(new DataView(l),u)}case"-0":return-0}return n(hy(a,u),o)};return r},py=e=>GO(new Map,e)(0),mo="",{toString:XO}={},{keys:KO,is:QO}=Object,Ma=e=>{const t=typeof e;if(t!=="object"||!e)return[Nl,t];const n=XO.call(e).slice(8,-1);switch(n){case"Array":return[Da,mo];case"Object":return[Pl,mo];case"Date":return[nh,mo];case"RegExp":return[rh,mo];case"Map":return[ih,mo];case"Set":return[oh,mo];case"DataView":return[Da,n]}return n.includes("Array")?[Da,n]:e instanceof Error?[cy,e.name||"Error"]:[Pl,n]},Ol=([e,t])=>e===Nl&&(t==="function"||t==="symbol"),JO=(e,t,n,r)=>{const o=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=Ma(u);switch(l){case Nl:{let p=u;switch(d){case"bigint":l=dy,p=u.toString();break;case"number":if(!u&&QO(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([ly],u)}return o([l,p],u)}case Da:{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([l,p],u);for(const T of u)p.push(a(T));return m}case Pl:{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([l,p],u);for(const T of KO(u))(e||!Ol(Ma(u[T])))&&p.push([a(T),a(u[T])]);return m}case nh:return o([l,isNaN(u.getTime())?mo:u.toISOString()],u);case rh:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case ih:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(Ol(Ma(T))||Ol(Ma(y))))&&p.push([a(T),a(y)]);return m}case oh:{const p=[],m=o([l,p],u);for(const T of u)(e||!Ol(Ma(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},my=(e,{json:t,lossy:n}={})=>{const r=[];return JO(!(t||n),!!t,new Map,r)(e),r},go=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?py(my(e,t)):structuredClone(e):(e,t)=>py(my(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"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=os(m.toLowerCase());let y=0;const w=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){w.length>0&&w.push({type:"text",value:" "});let A=typeof n=="string"?n:n(d,y);typeof A=="string"&&(A={type:"text",value:A}),w.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(A)?A:[A]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const A=N.children[N.children.length-1];A&&A.type==="text"?A.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else p.push(...w);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(B({},go(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 DO(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=oy(n[r])}return t}function oy(e){const t=e.spread;return t==null?e.children.length>1:t}function MO(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 FO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function BO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function UO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HO(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)},l=Lr(t.children[1]),d=xl(t.children[t.children.length-1]);l&&d&&(u.position={start:l,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 zO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function jO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const sy=9,ay=32;function $O(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(uy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(uy(t.slice(o),o>0,!1)),a.join("")}function uy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===sy||a===ay;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===sy||a===ay;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function VO(e,t){const n={type:"text",value:$O(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function qO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const YO={blockquote:wO,break:_O,code:xO,delete:SO,emphasis:vO,footnoteReference:AO,heading:CO,html:kO,imageReference:NO,image:PO,inlineCode:OO,linkReference:IO,link:RO,listItem:LO,list:MO,paragraph:FO,root:BO,strong:UO,table:HO,tableCell:jO,tableRow:zO,text:VO,thematicBreak:qO,toml:kl,yaml:kl,definition:kl,footnoteDefinition:kl};function kl(){}const ly=-1,Nl=0,Da=1,Pl=2,nh=3,rh=4,ih=5,oh=6,cy=7,dy=8,{defineProperty:WO}=Object,fy=typeof self=="object"?self:globalThis,hy=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new fy[e](t)},GO=(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 Nl:case ly:return n(u,o);case Da:{const l=n([],o);for(const d of u)l.push(r(d));return l}case Pl:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?WO(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case nh:return n(new Date(u),o);case rh:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case ih:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case oh:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case cy:{const{name:l,message:d}=u;return n(typeof fy[l]=="function"?hy(l,d):new Error(d),o)}case dy: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:l}=new Uint8Array(u);return n(new DataView(l),u)}case"-0":return-0}return n(hy(a,u),o)};return r},py=e=>GO(new Map,e)(0),mo="",{toString:XO}={},{keys:KO,is:QO}=Object,Ma=e=>{const t=typeof e;if(t!=="object"||!e)return[Nl,t];const n=XO.call(e).slice(8,-1);switch(n){case"Array":return[Da,mo];case"Object":return[Pl,mo];case"Date":return[nh,mo];case"RegExp":return[rh,mo];case"Map":return[ih,mo];case"Set":return[oh,mo];case"DataView":return[Da,n]}return n.includes("Array")?[Da,n]:e instanceof Error?[cy,e.name||"Error"]:[Pl,n]},Ol=([e,t])=>e===Nl&&(t==="function"||t==="symbol"),JO=(e,t,n,r)=>{const o=(u,l)=>{const d=r.push(u)-1;return n.set(l,d),d},a=u=>{if(n.has(u))return n.get(u);let[l,d]=Ma(u);switch(l){case Nl:{let p=u;switch(d){case"bigint":l=dy,p=u.toString();break;case"number":if(!u&&QO(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([ly],u)}return o([l,p],u)}case Da:{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([l,p],u);for(const T of u)p.push(a(T));return m}case Pl:{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([l,p],u);for(const T of KO(u))(e||!Ol(Ma(u[T])))&&p.push([a(T),a(u[T])]);return m}case nh:return o([l,isNaN(u.getTime())?mo:u.toISOString()],u);case rh:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case ih:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(Ol(Ma(T))||Ol(Ma(y))))&&p.push([a(T),a(y)]);return m}case oh:{const p=[],m=o([l,p],u);for(const T of u)(e||!Ol(Ma(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},my=(e,{json:t,lossy:n}={})=>{const r=[];return JO(!(t||n),!!t,new Map,r)(e),r},go=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?py(my(e,t)):structuredClone(e):(e,t)=>py(my(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"]},l=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),T=os(m.toLowerCase());let y=0;const w=[],v=e.footnoteCounts.get(m);for(;v!==void 0&&++y<=v;){w.length>0&&w.push({type:"text",value:" "});let C=typeof n=="string"?n:n(d,y);typeof C=="string"&&(C={type:"text",value:C}),w.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+T+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(C)?C:[C]})}const N=p[p.length-1];if(N&&N.type==="element"&&N.tagName==="p"){const C=N.children[N.children.length-1];C&&C.type==="text"?C.value+=" ":N.children.push({type:"text",value:" "}),N.children.push(...w)}else p.push(...w);const x={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,x),l.push(x)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:me(B({},go(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
25
25
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(l,!0)},{type:"text",value:`
26
- `}]}}const Il=(function(e){if(e==null)return oI;if(typeof e=="function")return Rl(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]=Il(e[n]);return Rl(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 Rl(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 Rl(t);function t(n){return n&&n.type===e}}function Rl(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 kH(e){return e}const gy=[],aI=!0,sh=!1,uI="skip";function Ey(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Il(o),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=gy,w,v,N;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=lI(n(d,p)),y[0]===sh))return y;if("children"in d&&d.children){const x=d;if(x.children&&y[0]!==uI)for(v=(r?x.children.length:-1)+u,N=p.concat(x);v>-1&&v<x.children.length;){const A=x.children[v];if(w=l(A,v,N)(),w[0]===sh)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function lI(e){return Array.isArray(e)?e:typeof e=="number"?[aI,e]:e==null?gy:[e]}function Ll(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),Ey(e,a,l,o);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const ah={}.hasOwnProperty,cI={};function dI(e,t){const n=t||cI,r=new Map,o=new Map,a=new Map,u=B(B({},YO),n.handlers),l={all:f,applyData:hI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:fI,wrap:mI};return Ll(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)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(ah.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:N}=v,x=mn(v,["children"]),A=go(x);return A.children=l.all(p),A}return go(p)}return(l.options.unknownHandler||pI)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const w=l.one(T[y],p);if(w){if(y&&T[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=yy(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=yy(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function fI(e,t){e.position&&(t.position=AE(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,go(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&&!(ah.call(n,"hProperties")||ah.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:`
26
+ `}]}}const Il=(function(e){if(e==null)return oI;if(typeof e=="function")return Rl(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]=Il(e[n]);return Rl(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 Rl(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 Rl(t);function t(n){return n&&n.type===e}}function Rl(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 kH(e){return e}const gy=[],aI=!0,sh=!1,uI="skip";function Ey(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Il(o),u=r?-1:1;l(e,void 0,[])();function l(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(T,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return T;function T(){let y=gy,w,v,N;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=lI(n(d,p)),y[0]===sh))return y;if("children"in d&&d.children){const x=d;if(x.children&&y[0]!==uI)for(v=(r?x.children.length:-1)+u,N=p.concat(x);v>-1&&v<x.children.length;){const C=x.children[v];if(w=l(C,v,N)(),w[0]===sh)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function lI(e){return Array.isArray(e)?e:typeof e=="number"?[aI,e]:e==null?gy:[e]}function Ll(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),Ey(e,a,l,o);function l(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const ah={}.hasOwnProperty,cI={};function dI(e,t){const n=t||cI,r=new Map,o=new Map,a=new Map,u=B(B({},YO),n.handlers),l={all:f,applyData:hI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:fI,wrap:mI};return Ll(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)}}),l;function d(p,m){const T=p.type,y=l.handlers[T];if(ah.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const v=p,{children:N}=v,x=mn(v,["children"]),C=go(x);return C.children=l.all(p),C}return go(p)}return(l.options.unknownHandler||pI)(l,p,m)}function f(p){const m=[];if("children"in p){const T=p.children;let y=-1;for(;++y<T.length;){const w=l.one(T[y],p);if(w){if(y&&T[y-1].type==="break"&&(!Array.isArray(w)&&w.type==="text"&&(w.value=yy(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=yy(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function fI(e,t){e.position&&(t.position=AE(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,go(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&&!(ah.call(n,"hProperties")||ah.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
29
  `}),n}function yy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function by(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=by(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return by(n,B({file:r},e||t))}}function Ty(e){if(e)throw e}var uh,wy;function EI(){if(wy)return uh;wy=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},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return uh=function d(){var f,p,m,T,y,w,v=arguments[0],N=1,x=arguments.length,A=!1;for(typeof v=="boolean"&&(A=v,v=arguments[1]||{},N=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});N<x;++N)if(f=arguments[N],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(A&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(v,{name:p,newValue:d(A,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},uh}var yI=EI();const lh=Qe(yI);function ch(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);l(null,...o);function l(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,l)(...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 l=e.length>u.length;let d;l&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return o(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...l){n||(n=!0,t(u,...l))}function a(u){o(null,u)}}const Dr={basename:wI,dirname:_I,extname:xI,join:SI,sep:"/"};function wI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fa(e);let n=0,r=-1,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,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function _I(e){if(Fa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xI(e){Fa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?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 SI(...e){let t=-1,n;for(;++t<e.length;)Fa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vI(n)}function vI(e){Fa(e);const t=e.codePointAt(0)===47;let n=AI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AI(e,t){let n="",r=0,o=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(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 l===46&&a>-1?a++:a=-1}return n}function Fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const CI={cwd:kI};function kI(){return"/"}function dh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function NI(e){if(typeof e=="string")e=new URL(e);else if(!dh(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 PI(e)}function PI(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 fh=["history","path","basename","stem","extname","dirname"];class _y{constructor(t){let n;t?dh(t)?n={path:t}:typeof t=="string"||OI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":CI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fh.length;){const a=fh[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)fh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){ph(t,"basename"),hh(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){xy(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(hh(t,"extname"),xy(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=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){dh(t)&&(t=NI(t)),ph(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){ph(t,"stem"),hh(t,"stem"),this.path=Dr.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 bn(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 hh(e,t){if(e&&e.includes(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function ph(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xy(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 mh 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 mh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(yh("data",this.frozen),this.namespace[t]=n,this):RI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(yh("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=Dl(t),r=this.parser||this.Parser;return gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gh("process",this.parser||this.Parser),Eh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Dl(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,w=r.stringify(y,T);MI(w)?T.value=w:T.result=w,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(),gh("processSync",this.parser||this.Parser),Eh("processSync",this.compiler||this.Compiler),this.process(t,o),vy("processSync","process",n),r;function o(a,u){n=!0,Ty(a),r=u}}run(t,n,r){Sy(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,l){const d=Dl(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),vy("runSync","run",r),o;function a(u,l){Ty(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Dl(n),o=this.compiler||this.Compiler;return Eh("stringify",o),Sy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(yh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(o.settings=lh(!0,o.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];ch(v)&&ch(y)&&(y=lh(!0,v,y)),r[T]=[f,y,...w]}}}}const LI=new mh().freeze();function gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function yh(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 Sy(e){if(!ch(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dl(e){return DI(e)?e:new _y(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",Ay=[],Cy={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 ky(e){const t=zI(e),n=jI(e);return $I(t.runSync(t.parse(n),n),e)}function zI(e){const t=e.rehypePlugins||Ay,n=e.remarkPlugins||Ay,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),Cy):Cy;return LI().use(TO).use(n).use(gI,r).use(t)}function jI(e){const t=e.children||"",n=new _y;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,l=t.unwrapDisallowed,d=t.urlTransform||Ny;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 Ll(e,f),fP(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Gf)if(Object.hasOwn(Gf,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=Gf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function Ny(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 Py=/[#.]/g;function VI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Py.lastIndex=o;const l=Py.exec(n),d=n.slice(o,l?l.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),l&&(a=l[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Oy(e,t,n){const r=n?GI(n):void 0;function o(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=VI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,qI(u))l.unshift(u);else for(const[m,T]of Object.entries(u))YI(e,d.properties,m,T)}for(const f of l)bh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function qI(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 YI(e,t,n,r){const o=_l(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=bE(r):o.commaSeparated?a=sE(r):o.commaOrSpaceSeparated?a=bE(sE(r).join(" ")):a=Iy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?WI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Iy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function bh(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)bh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?bh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Iy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Aa(n)===Aa(t)))return!0}return n}function WI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function GI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const XI=["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"],KI=Oy(Ca,"div"),QI=Oy(Si,"g",XI);function JI(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 l=n[u];if(l===void 0){const d=Ry(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function 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 l=n[n.length-1],d=Ry(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Ry(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 Eo={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/"},Ly={}.hasOwnProperty,ZI=Object.prototype;function eR(e,t){const n=t||{};return Th({file:n.file||void 0,location:!1,schema:n.space==="svg"?Si:Ca,verbose:n.verbose||!1},e)}function Th(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(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:Dy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=JI(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=tR(e,t),n}}function Dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Th(e,t[n]);r.push(o)}return r}function tR(e,t){const n=e.schema;e.schema=t.namespaceURI===Eo.svg?Si:Ca;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Ly.call(ZI,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?QI:KI)(t.tagName,o,Dy(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=Th(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nR(e,t,n){const r=as(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)Ly.call(n.attrs,u)&&(a[_l(e.schema,u).property]=as(n.attrs[u]));n.startTag;const l=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=My({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=My({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function My(e){return e.line&&e.column?e:void 0}const Fy={}.hasOwnProperty;function By(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Fy.call(o,e)){const d=String(o[e]);u=Fy.call(l,d)?l[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 rR={},iR={}.hasOwnProperty,Uy=By("type",{handlers:{root:sR,element:dR,text:lR,comment:cR,doctype:uR}});function oR(e,t){const r=(t||rR).space;return Uy(e,r==="svg"?Si:Ca)}function sR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function aR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function uR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return us(e,t),t}function lR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return us(e,t),t}function cR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return us(e,t),t}function dR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Si);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&iR.call(e.properties,a)){const d=fR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Eo[u],childNodes:[],parentNode:null};return l.childNodes=wh(e.children,l,r),us(e,l),e.tagName==="template"&&e.content&&(l.content=aR(e.content,r)),l}function fR(e,t,n){const r=_l(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?aE(n):TE(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=Eo[r.space]}return o}function wh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Uy(e[r],n);a.parentNode=t,o.push(a)}return o}function us(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 hR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pR=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]),At="�";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 Un={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hy(e){return e>=55296&&e<=57343}function mR(e){return e>=56320&&e<=57343}function gR(e,t){return(e-55296)*1024+9216+t}function zy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function jy(e){return e>=64976&&e<=65007||pR.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const ER=65536;class yR{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=ER,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,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(mR(n))return this.pos++,this._addGap(),gR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,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,Hy(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){zy(t)?this._err(te.controlCharacterInInputStream):jy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var 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 $y(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 bR=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))),TR=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 wR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=TR.get(e))!==null&&t!==void 0?t:e}var en;(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"})(en||(en={}));const _R=32;var Ci;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ci||(Ci={}));function _h(e){return e>=en.ZERO&&e<=en.NINE}function xR(e){return e>=en.UPPER_A&&e<=en.UPPER_F||e>=en.LOWER_A&&e<=en.LOWER_F}function SR(e){return e>=en.UPPER_A&&e<=en.UPPER_Z||e>=en.LOWER_A&&e<=en.LOWER_Z||_h(e)}function vR(e){return e===en.EQUALS||SR(e)}var tn;(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"})(tn||(tn={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class AR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tn.EntityStart:return t.charCodeAt(n)===en.NUM?(this.state=tn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tn.NamedEntity,this.stateNamedEntity(t,n));case tn.NumericStart:return this.stateNumericStart(t,n);case tn.NumericDecimal:return this.stateNumericDecimal(t,n);case tn.NumericHex:return this.stateNumericHex(t,n);case tn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_R)===en.LOWER_X?(this.state=tn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tn.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(_h(o)||xR(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(_h(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===en.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(wR(this.result),this.consumed),this.errors&&(t!==en.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&Ci.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=CR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||vR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ci.VALUE_LENGTH)>>14,a!==0){if(u===en.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]&Ci.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]&~Ci.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tn.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tn.NumericDecimal:return this.emitNumericEntity(0,2);case tn.NumericHex:return this.emitNumericEntity(0,3);case tn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tn.EntityStart:return 0}}}function CR(e,t,n,r){const o=(t&Ci.BRANCH_LENGTH)>>7,a=t&Ci.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,l=u+o-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+o]}return-1}var ce;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ce||(ce={}));var yo;(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"})(yo||(yo={}));var ar;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ar||(ar={}));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 kR=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 ls(e){var t;return(t=kR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,NR={[ce.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[ce.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[ce.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},xh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(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"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function PR(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ba(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function OR(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return OR(e)||Ba(e)}function Vy(e){return ki(e)||PR(e)}function Fl(e){return e+32}function qy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Yy(e){return qy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function IR(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Hy(e)?te.surrogateCharacterReference:jy(e)?te.noncharacterCharacterReference:zy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class RR{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=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AR(bR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=IR(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($y(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(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ls(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case 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=qy(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=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.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=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ba(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ki(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.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=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ki(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ki(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.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=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=At;break}default:this.currentAttr.name+=String.fromCodePoint(Ba(t)?Fl(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=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.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=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Un.DASH_DASH,!0)?(this._createCommentToken(Un.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Un.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Un.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Un.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Un.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ba(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.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(te.unexpectedNullCharacter),this._createDoctypeToken(At),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.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=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=At;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ba(t)?Fl(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=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Un.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Un.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.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=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.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=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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()&&Vy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Vy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Wy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Gy=new Set([...Wy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),LR=new Set([...Bl,g.OL,g.UL]),DR=new Set([...Bl,g.BUTTON]),Xy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ky=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),MR=new Set([g.TR,g.TEMPLATE,g.HTML]),FR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),BR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),UR=new Set([g.TD,g.TH]);class HR{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ce.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const 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])!==ce.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xh,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(UR,ce.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(BR,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FR,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(MR,ce.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case ce.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ce.SVG:{if(Ky.has(o))return!1;break}case ce.MATHML:{if(Xy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,LR)}hasInButtonScope(t){return this.hasInDynamicScope(t,DR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ce.HTML:{if(xh.has(n))return!0;if(Bl.has(n))return!1;break}case ce.SVG:{if(Ky.has(n))return!1;break}case ce.MATHML:{if(Xy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ce.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ce.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Wy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Gy.has(this.currentTagId);)this.pop()}}const Sh=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const Qy={type:Mr.Marker};class zR{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 l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Mr.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:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Sh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Qy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mr.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(Qy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const Ni={createDocument(){return{nodeName:"#document",mode:ar.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};Ni.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(Ni.isTextNode(n)){n.value+=t;return}}Ni.appendChild(e,Ni.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ni.isTextNode(r)?r.value+=t:Ni.insertBefore(e,Ni.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},Jy="html",jR="about:legacy-compat",$R="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zy=["+//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//"],VR=[...Zy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],qR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),eb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YR=[...eb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function tb(e,t){return t.some(n=>e.startsWith(n))}function WR(e){return e.name===Jy&&e.publicId===null&&(e.systemId===null||e.systemId===jR)}function GR(e){if(e.name!==Jy)return ar.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$R)return ar.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),qR.has(n))return ar.QUIRKS;let r=t===null?VR:Zy;if(tb(n,r))return ar.QUIRKS;if(r=t===null?eb:YR,tb(n,r))return ar.LIMITED_QUIRKS}return ar.NO_QUIRKS}const nb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},XR="definitionurl",KR="definitionURL",QR=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])),JR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ce.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ce.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ce.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ce.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ce.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ce.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ce.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ce.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ce.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ce.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ce.XMLNS}]]),ZR=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])),e6=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 t6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===yo.COLOR||r===yo.SIZE||r===yo.FACE)||e6.has(t)}function rb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===XR){e.attrs[t].name=KR;break}}function ib(e){for(let t=0;t<e.attrs.length;t++){const n=QR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vh(e){for(let t=0;t<e.attrs.length;t++){const n=JR.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 n6(e){const t=ZR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ls(e.tagName))}function r6(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function i6(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===yo.ENCODING){const o=n[r].value.toLowerCase();return o===nb.TEXT_HTML||o===nb.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function o6(e,t,n,r){return(!r||r===ce.HTML)&&i6(e,t,n)||(!r||r===ce.MATHML)&&r6(e,t)}const s6="hidden",a6=8,u6=3;var M;(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"})(M||(M={}));const l6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ob=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),sb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ni,onParseError:null};class ab{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},sb),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 RR(this.options,this),this.activeFormattingElements=new zR(this.treeAdapter),this.fragmentContextID=r?ls(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new HR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},sb),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,ce.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ce.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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:l6,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)===ce.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ce.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Ft.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)!==ce.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.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(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&me(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,ce.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ce.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,ce.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const 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:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ce.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ce.HTML)}_processToken(t){switch(t.type){case 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 o6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Mr.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=M.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=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.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?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.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=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ob.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ce.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return NR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){U4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{lb(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{Eb(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){B4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ch(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{Ch(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.AFTER_BODY:{g6(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{E6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{y6(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?H4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{b6(this,t);break}case M.BEFORE_HEAD:{w6(this,t);break}case M.IN_HEAD:{br(this,t);break}case M.IN_HEAD_NO_SCRIPT:{S6(this,t);break}case M.AFTER_HEAD:{A6(this,t);break}case M.IN_BODY:{wn(this,t);break}case M.IN_TABLE:{cs(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{_4(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{v4(this,t);break}case M.IN_SELECT:{Tb(this,t);break}case M.IN_SELECT_IN_TABLE:{C4(this,t);break}case M.IN_TEMPLATE:{N4(this,t);break}case M.AFTER_BODY:{O4(this,t);break}case M.IN_FRAMESET:{I4(this,t);break}case M.AFTER_FRAMESET:{L4(this,t);break}case M.AFTER_AFTER_BODY:{M4(this,t);break}case M.AFTER_AFTER_FRAMESET:{F4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?z4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{T6(this,t);break}case M.BEFORE_HEAD:{_6(this,t);break}case M.IN_HEAD:{x6(this,t);break}case M.IN_HEAD_NO_SCRIPT:{v6(this,t);break}case M.AFTER_HEAD:{C6(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{f4(this,t);break}case M.IN_TABLE:{qa(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{x4(this,t);break}case M.IN_COLUMN_GROUP:{S4(this,t);break}case M.IN_TABLE_BODY:{Oh(this,t);break}case M.IN_ROW:{bb(this,t);break}case M.IN_CELL:{A4(this,t);break}case M.IN_SELECT:{wb(this,t);break}case M.IN_SELECT_IN_TABLE:{k4(this,t);break}case M.IN_TEMPLATE:{P4(this,t);break}case M.AFTER_BODY:{xb(this,t);break}case M.IN_FRAMESET:{R4(this,t);break}case M.AFTER_FRAMESET:{D4(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{mb(this,t);break}case M.TEXT:{h4(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_TEMPLATE:{_b(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{kh(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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ub(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{gb(this,t);break}}}}function c6(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):pb(e,t),n}function d6(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 f6(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 l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=u6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=h6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function h6(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 p6(e,t,n){const r=e.treeAdapter.getTagName(t),o=ls(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===ce.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function m6(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 Ah(e,t){for(let n=0;n<a6;n++){const r=c6(e,t);if(!r)break;const o=d6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=f6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&p6(e,u,a),m6(e,o,r)}}function Ch(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function g6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function E6(e,t){e._appendCommentNode(t,e.document)}function kh(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 y6(e,t){e._setDocumentType(t);const n=t.forceQuirks?ar.QUIRKS:GR(t);WR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ua(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ar.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function b6(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=M.BEFORE_HEAD):Ha(e,t)}function T6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ha(e,t)}function Ha(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function w6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:za(e,t)}}function _6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?za(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function za(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function br(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ja(e,t)}}function x6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ja(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function bo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function ja(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function S6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{br(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:$a(e,t)}}function v6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{$a(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function A6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),br(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Va(e,t)}}function C6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Va(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Va(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Ke.CHARACTER:{lb(e,t);break}case Ke.WHITESPACE_CHARACTER:{ub(e,t);break}case Ke.COMMENT:{Ch(e,t);break}case Ke.START_TAG:{wn(e,t);break}case Ke.END_TAG:{Hl(e,t);break}case Ke.EOF:{mb(e,t);break}}}function ub(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function lb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function k6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function N6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function P6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_FRAMESET)}function O6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function I6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function R6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function L6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),n||(e.formElement=e.openElements.current))}function D6(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,ce.HTML)}function M6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=Ft.PLAINTEXT}function F6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1}function B6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function U6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function z6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function j6(e,t){e.treeAdapter.getDocumentMode(e.document)!==ar.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function cb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function db(e){const t=$y(e,yo.TYPE);return t!=null&&t.toLowerCase()===s6}function $6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),db(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function V6(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function q6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y6(e,t){t.tagName=X.IMG,t.tagID=g.IMG,cb(e,t)}function W6(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function G6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function X6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function fb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function K6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function Q6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function J6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function Z6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function e4(e,t){e._reconstructActiveFormattingElements(),rb(t),vh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function t4(e,t){e._reconstructActiveFormattingElements(),ib(t),vh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function hb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function wn(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:{U6(e,t);break}case g.A:{B6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{I6(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:{O6(e,t);break}case g.LI:case g.DD:case g.DT:{D6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{cb(e,t);break}case g.HR:{q6(e,t);break}case g.RB:case g.RTC:{J6(e,t);break}case g.RT:case g.RP:{Z6(e,t);break}case g.PRE:case g.LISTING:{R6(e,t);break}case g.XMP:{G6(e,t);break}case g.SVG:{t4(e,t);break}case g.HTML:{k6(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:{br(e,t);break}case g.BODY:{N6(e,t);break}case g.FORM:{L6(e,t);break}case g.NOBR:{H6(e,t);break}case g.MATH:{e4(e,t);break}case g.TABLE:{j6(e,t);break}case g.INPUT:{$6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{V6(e,t);break}case g.IMAGE:{Y6(e,t);break}case g.BUTTON:{F6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{z6(e,t);break}case g.IFRAME:{X6(e,t);break}case g.SELECT:{K6(e,t);break}case g.OPTION:case g.OPTGROUP:{Q6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{fb(e,t);break}case g.FRAMESET:{P6(e,t);break}case g.TEXTAREA:{W6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?fb(e,t):hb(e,t);break}case g.PLAINTEXT:{M6(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:hb(e,t)}}function n4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function r4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,xb(e,t))}function i4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function o4(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 s4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function a4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function u4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function l4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function c4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function d4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function pb(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 Hl(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:{Ah(e,t);break}case g.P:{s4(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:{i4(e,t);break}case g.LI:{a4(e);break}case g.DD:case g.DT:{u4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{l4(e);break}case g.BR:{d4(e);break}case g.BODY:{n4(e,t);break}case g.HTML:{r4(e,t);break}case g.FORM:{o4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{c4(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:pb(e,t)}}function mb(e,t){e.tmplInsertionModeStack.length>0?_b(e,t):kh(e,t)}function f4(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 h4(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nh(e,t){if(e.openElements.currentTagId!==void 0&&ob.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Eb(e,t);break}case Ke.WHITESPACE_CHARACTER:{gb(e,t);break}}else Ya(e,t)}function p4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_CAPTION}function m4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function g4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function E4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_TABLE_BODY}function y4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function b4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function T4(e,t){db(t)?e._appendElement(t,ce.HTML):Ya(e,t),t.ackSelfClosing=!0}function w4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{y4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}case g.COL:{g4(e,t);break}case g.FORM:{w4(e,t);break}case g.TABLE:{b4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{E4(e,t);break}case g.INPUT:{T4(e,t);break}case g.CAPTION:{p4(e,t);break}case g.COLGROUP:{m4(e,t);break}default:Ya(e,t)}}function qa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{bo(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:Ya(e,t)}}function Ya(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function gb(e,t){e.pendingCharacterTokens.push(t)}function Eb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ya(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const yb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function _4(e,t){const n=t.tagID;yb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,cs(e,t)):wn(e,t)}function x4(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=M.IN_TABLE,n===g.TABLE&&qa(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:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{br(e,t);break}default:zl(e,t)}}function S4(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{bo(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,$l(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=M.IN_TABLE,cs(e,t));break}default:cs(e,t)}}function Oh(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=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,qa(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:qa(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=M.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=M.IN_TABLE_BODY,jl(e,t));break}default:cs(e,t)}}function bb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Oh(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=M.IN_TABLE_BODY,Oh(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:qa(e,t)}}function v4(e,t){const n=t.tagID;yb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):wn(e,t)}function A4(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=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),bb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function Tb(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ce.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}}}function wb(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:{bo(e,t);break}}}function C4(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)):Tb(e,t)}function k4(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)):wb(e,t)}function N4(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:{br(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,cs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,wn(e,t)}}function P4(e,t){t.tagID===g.TEMPLATE&&bo(e,t)}function _b(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kh(e,t)}function O4(e,t){t.tagID===g.HTML?wn(e,t):Vl(e,t)}function xb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function I4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.FRAMESET:{e._insertElement(t,ce.HTML);break}case g.FRAME:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{br(e,t);break}}}function R4(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function L4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function D4(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function M4(e,t){t.tagID===g.HTML?wn(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function F4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function B4(e,t){t.chars=At,e._insertCharacters(t)}function U4(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ce.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function H4(e,t){if(t6(t))Sb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?rb(t):r===ce.SVG&&(n6(t),ib(t)),vh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function z4(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)===ce.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 j4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ab(e,t){const n=Z4(e),r=By("type",{handlers:{root:V4,element:q4,text:Y4,comment:kb,doctype:W4,raw:X4},unknown:K4}),o={parser:n?new ab(vb):ab.getFragmentParser(void 0,vb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),ds(o,Lr());const a=n?o.parser.document:o.parser.getFragment(),u=eR(a,{file:o.options.file});return o.stitches&&Ll(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Cb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function V4(e,t){Cb(e.children,t)}function q4(e,t){Q4(e,t),Cb(e.children,t),J4(e,t)}function Y4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function W4(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function G4(e,t){t.stitches=!0;const n=eL(e);if("children"in e&&"children"in n){const r=Ab({type:"root",children:e.children},t.options);n.children=r.children}kb({type:"comment",value:{stitch:n}},t)}function kb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function X4(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,Nb(t,Lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(j4,"&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 K4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))G4(n,t);else{let r="";throw $4.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 ds(e,t){Nb(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=Ft.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 Nb(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 Q4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,Lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Eo.html;o===Eo.html&&n==="svg"&&(o=Eo.svg);const a=oR(me(B({},e),{children:[]}),{space:o===Eo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ga(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function J4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hR.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,xl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ga(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function Z4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ga(e){const t=Lr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 eL(e){return"children"in e?go(me(B({},e),{children:[]})):go(e)}function Pb(e){return function(t,n){return Ab(t,me(B({},e),{file:n}))}}const To=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ob={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...To,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...To],h2:[["className","sr-only"]],img:[...To,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...To,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...To],table:[...To],ul:[...To,["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"]},Pi={}.hasOwnProperty;function tL(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Ob),t):Ob,stack:[]},o=Ib(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ib(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nL(e,n);case"doctype":return rL(e,n);case"element":return iL(e,n);case"root":return oL(e,n);case"text":return sL(e,n)}}}function nL(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 Xa(a,t),a}}function rL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Xa(n,t),n}}function iL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Rb(e,t.children),o=aL(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&&Pi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Xa(u,t),u}function oL(e,t){const r={type:"root",children:Rb(e,t.children)};return Xa(r,t),r}function sL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Xa(r,t),r}function Rb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ib(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function aL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Pi.call(r,n)?r[n]:void 0,u=r&&Pi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Pi.call(l,f)){const p=l[f];let m=Lb(e,Mb(a,f),f,p);m==null&&(m=Lb(e,Mb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Pi.call(o,n)){const p=o[n];for(f in p)Pi.call(p,f)&&!Pi.call(d,f)&&(d[f]=p[f])}return d}function Lb(e,t,n,r){return t?Array.isArray(r)?uL(e,t,n,r):Db(e,t,n,r):void 0}function uL(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Db(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Db(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&lL(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 lL(e,t,n){const r=e.schema.protocols&&Pi.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("?"),l=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Xa(e,t){const n=AE(t);t.data&&(e.data=go(t.data)),n&&(e.position=n)}function Mb(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 cL(e){return function(t){return tL(t,e)}}const Fb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:o,children:a})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return _.jsx("a",me(B(B({className:W(e,`${z}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},dL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:_.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?_.jsx(ky,{rehypePlugins:[Pb,cL],components:{ul:({children:r})=>_.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Fb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Wn(),{setImageFile:u}=ts(),{logger:l,globalClassName:d,searchConfig:f,features:p}=tt(),m=D.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!o||!1,w=y?"connected":"disconnected",v=t||!y,N=()=>a?new Promise((R,V)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>R(ne.result),ne.onerror=fe=>V(fe)}):Promise.resolve(""),x=()=>{u(null)},A=D.useCallback(R=>{const V=R==null?void 0:R[0];if(V&&!v){if(V.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(V)}},[v,u]),C=R=>{t&&R.preventDefault()},U=R=>{if(!t||R.key==="Tab")return;(R.key==="Enter"||R.key==="Backspace"||R.key==="Delete"||R.key.length===1&&!R.metaKey&&!R.ctrlKey)&&R.preventDefault()},Y=R=>et(null,null,function*(){var fe;if(R.preventDefault(),v)return;const V=(((fe=m.current)==null?void 0:fe.value)||"").trim();let ne="";try{ne=yield N()}catch($){l==null||l.error("Error converting file to base64:",$),alert("There was an error processing the file. Please try again.");return}V&&(x(),m.current.value="",r(V,ne))});return _.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&_.jsx(NN,{file:a,componentType:n,globalClassName:d,onRemove:x}),_.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[_.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,w),children:_.jsx("span",{className:`${z}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&_.jsx(FN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:v,globalClassName:d,className:e,onFiles:A}),_.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question","aria-disabled":t||void 0,name:`${z}-user-input`,onBeforeInput:C,onPaste:C,onKeyDown:U}),_.jsx(jN,{isLoading:v}),_.jsx(UN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),_.jsx(dL,{})]})};function fL(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function hL(e){return ht({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 Bb=D.createContext({isOpen:!1,panelId:"",triggerId:""}),Rh=D.createContext(null),Ub=D.createContext(null),wo=()=>{var n,r;const e=D.useContext(Rh),t=D.useContext(Ub);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Hb=({onClearChat:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(hL,{"aria-hidden":"true"}),"Clear chat"]})};function pL(e){return e==null?[]:Array.isArray(e)?e:[e]}var mL=(e,...t)=>e.concat(t),gL=(e,...t)=>e.filter(n=>!t.includes(n)),EL=e=>Array.from(new Set(e));function zb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function yL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return zb(e,t,{step:-r,loop:o})}var bL=e=>Array.isArray(e),jb=e=>e!=null&&typeof e=="object",TL=e=>jb(e)&&!bL(e),Yl=e=>typeof e=="string",fs=e=>typeof e=="function",wL=e=>e==null,_L=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xL=e=>Object.prototype.toString.call(e),$b=Function.prototype.toString,SL=$b.call(Object),vL=e=>{if(!jb(e)||xL(e)!="[object Object]"||kL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_L(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$b.call(n)==SL},AL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,CL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,kL=e=>AL(e)||CL(e),NL=e=>e(),PL=()=>{},Lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function OL(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:IL,max:RL}=Math,LL=e=>Number.isNaN(e),DL=e=>LL(e)?0:e,Vb=(e,t,n)=>IL(RL(DL(e),t),n);function Dh(e){if(!vL(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]=Dh(o))}return n}function Mh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ML(e,t){if(e==null)throw new Error(t())}function FL(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 BL=Object.defineProperty,UL=(e,t,n)=>t in e?BL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fh=(e,t,n)=>UL(e,typeof t!="symbol"?t+"":t,n),qb=()=>{},Wl=e=>typeof e=="object"&&e!==null,hs=e=>e?"":void 0,Yb=e=>e?"true":void 0,HL=1,zL=9,jL=11,nn=e=>Wl(e)&&e.nodeType===HL&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===zL,$L=e=>Wl(e)&&e===e.window,Wb=e=>nn(e)?e.localName||"":"#document";function VL(e){return["html","body","#document"].includes(Wb(e))}var qL=e=>Wl(e)&&e.nodeType!==void 0,_o=e=>qL(e)&&e.nodeType===jL&&"host"in e,YL=e=>nn(e)&&e.localName==="input",WL=e=>nn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ka(e){if(!e)return!1;const t=e.getRootNode();return gs(t)===e}var GL=/(textarea|select)/;function XL(e){if(e==null||!nn(e))return!1;try{return YL(e)&&e.selectionStart!=null||GL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ps(e,t){var r;if(!e||!t||!nn(e)||!nn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&_o(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fr(e){var t;return Gl(e)?e:$L(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function KL(e){return Fr(e).documentElement}function ms(e){var t,n,r;return _o(e)?ms(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:nn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function gs(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 QL(e){if(Wb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_o(e)&&e.host||KL(e);return _o(t)?t.host:t}function Bh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||_o(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Uh=new WeakMap;function Es(e){return Uh.has(e)||Uh.set(e,ms(e).getComputedStyle(e)),Uh.get(e)}var Hh=new Set(["menu","listbox","dialog","grid","tree","region"]),JL=e=>Hh.has(e),Gb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Xb(e,t){const n=new Set,r=Bh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&JL(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Kb(e,t){const n=Bh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Hh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function ZL(e){const t=new Set;return Kb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function e5(e){const t=e.getAttribute("role");return!!(t&&Hh.has(t))}function t5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function n5(e){var t;return t5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function r5(e){if(!e.id)return!1;const t=Bh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&e5(e))}var zh=()=>typeof document!="undefined";function i5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var jh=e=>zh()&&e.test(i5()),o5=e=>zh()&&e.test(navigator.vendor),Qb=()=>zh()&&!!navigator.maxTouchPoints,s5=()=>jh(/^iPhone/i),a5=()=>jh(/^iPad/i)||$h()&&navigator.maxTouchPoints>1,Xl=()=>s5()||a5(),u5=()=>$h()||Xl(),$h=()=>jh(/^Mac/i),l5=()=>u5()&&o5(/apple/i);function c5(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 Tr(e){var n;const t=c5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Jb=e=>e.button===0,d5=e=>e.button===2||$h()&&e.ctrlKey&&e.button===0,f5=e=>"touches"in e&&e.touches.length>0,h5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Zb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function p5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=h5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Zb&&(o=Zb[o]),o}function eT(e,t="client"){const n=f5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var rn=(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)}},tT=e=>nn(e)&&e.tagName==="IFRAME",m5=/^(audio|video|details)$/;function nT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var g5=e=>!Number.isNaN(nT(e)),E5=e=>nT(e)<0;function y5(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 rT(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<o.length;){const d=o[l++];if(!d||a.has(d))continue;a.add(d);const f=y5(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});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,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var Kl="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",iT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&nn(e)&&Br(e)&&o.unshift(e);const u=[];for(const l of o)if(Br(l)){if(tT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...iT(d,{getShadowRoot:r}));continue}u.push(l)}return r?rT(u,r,Br):u};function Br(e){return!nn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&WL(e)}function ys(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&xo(e)&&o.unshift(e);const a=[];for(const u of o)if(xo(u)){if(tT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...ys(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=rT(a,r,xo);return!u.length&&n?o:u}return!a.length&&n?o:a}function xo(e){return nn(e)&&e.tabIndex>0?!0:Br(e)&&!E5(e)}function b5(e,t={}){const n=ys(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function T5(e,t={}){const{current:n,getShadowRoot:r}=t,o=ys(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:gs(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function Qa(e){return e.tabIndex<0&&(m5.test(e.localName)||XL(e))&&!g5(e)?0:e.tabIndex}function oT(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=ys(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var w5=class hS{constructor(){Fh(this,"id",null),Fh(this,"fn_cleanup"),Fh(this,"cleanup",()=>{this.cancel()})}static create(){return new hS}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 Wt(e){const t=w5.create();return t.request(e),t.cleanup}function sT(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 Vh(e){const t=QL(e);return VL(t)?Fr(t).body:nn(t)&&S5(t)?t:Vh(t)}var _5=/auto|scroll|overlay|hidden|clip/,x5=new Set(["inline","contents"]);function S5(e){const t=ms(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return _5.test(n+o+r)&&!x5.has(a)}var bs="default",qh="",Ql=new WeakMap;function v5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(bs==="default"&&(qh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),bs="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>A5({target:t,doc:r})}function A5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(bs!=="disabled")return;bs="restoring",setTimeout(()=>{sT(()=>{bs==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=qh||""),qh="",bs="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function C5(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Wt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(v5(me(B({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function k5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=eT(l),f=Math.sqrt($u(d.x,2)+$u(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=eT(l);r({point:d,event:l})},u=[rn(e,"pointermove",o,!1),rn(e,"pointerup",a,!1),rn(e,"pointercancel",a,!1),rn(e,"contextmenu",a,!1),C5({doc:e})];return()=>{u.forEach(l=>l())}}function N5(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=b5(e,{includeContainer:!0,getShadowRoot:a}),y=T5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&Ka(y)?(o==null||o(),p=T):f.shiftKey&&(Ka(m)||w)?p=n:!f.shiftKey&&Ka(n)?(o==null||o(),p=m):!f.shiftKey&&(Ka(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return rn(u,"keydown",d,!0)}function P5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=mn(l,["defer","triggerElement"]),a=n?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(N5(d,B({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function O5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return qb;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 I5(e,t,n){if(!e)return qb;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 R5(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function L5(e,t){const{timeout:n,rootNode:r}=t,o=ms(r),a=Fr(r),u=new o.AbortController;return R5(new Promise(l=>{const d=e();if(d){l(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var D5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),M5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,aT=e=>{const t={};let n;for(;n=M5.exec(e);)t[n[1]]=n[2];return t},F5=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=aT(e)}else Yl(t)&&(t=aT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function on(...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]=Lh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=D5(t[o],n[o]);continue}if(o==="style"){t[o]=F5(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 NH(e){return e}var Ts=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ts||{}),Yh="__init__";function B5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>gs(t()),a=u=>t().getElementById(u);return me(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ka,getById:a})}function U5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),uT=typeof globalThis.document!="undefined"?D.useLayoutEffect:D.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=D.useState(t),[o,a]=D.useState(r),u=e().value!==void 0,l=D.useRef(o);l.current=u?e().value:o;const d=D.useRef(l.current);uT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var N,x;const w=d.current,v=fs(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(x=(N=e()).onChange)==null||x.call(N,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?co.flushSync:NL)(()=>f(y))},invoke(y,w){var v,N;(N=(v=e()).onChange)==null||N.call(v,y,w)},hash(y){var w,v,N;return(N=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?N:String(y)}}}Zl.cleanup=e=>{D.useEffect(()=>e,[])},Zl.ref=e=>{const t=D.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function H5(e){const t=D.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var z5=(e,t)=>{const n=D.useRef(!1),r=D.useRef(!1);D.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),D.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var ie,ue,ve,re,ae,Ae;const n=D.useMemo(()=>{const{id:oe,ids:J,getRootNode:se}=t;return B5({id:oe,ids:J,getRootNode:se})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(ue=(ie=e.props)==null?void 0:ie.call(e,{props:Dh(t),scope:n}))!=null?ue:t,a=j5(o),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Zl,scope:n,flush:cT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=lT(u),d={get(oe){var J;return(J=l.current)==null?void 0:J[oe].ref.current},set(oe,J){var se;(se=l.current)==null||se[oe].set(J)},initial(oe){var J;return(J=l.current)==null?void 0:J[oe].initial},hash(oe){var se,k;const J=(se=l.current)==null?void 0:se[oe].get();return(k=l.current)==null?void 0:k[oe].hash(J)}},f=D.useRef(new Map),p=D.useRef(null),m=D.useRef(null),T=D.useRef({type:""}),y=()=>me(B({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>me(B({},R),{matches(...oe){return oe.includes(R.ref.current)},hasTag(oe){var J,se;return!!((se=(J=e.states[R.ref.current])==null?void 0:J.tags)!=null&&se.includes(oe))}}),v=H5((ae=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?ae:{}),N=()=>({state:w(),context:d,event:y(),prop:a,send:$,action:x,guard:A,track:z5,refs:v,computed:Y,flush:cT,scope:n,choose:U}),x=oe=>{const J=fs(oe)?oe(N()):oe;if(!J)return;const se=J.map(k=>{var K,I;const F=(I=(K=e.implementations)==null?void 0:K.actions)==null?void 0:I[k];return F||Mh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),F});for(const k of se)k==null||k(N())},A=oe=>{var J,se;return fs(oe)?oe(N()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[oe](N())},C=oe=>{const J=fs(oe)?oe(N()):oe;if(!J)return;const se=J.map(F=>{var I,xe;const K=(xe=(I=e.implementations)==null?void 0:I.effects)==null?void 0:xe[F];return K||Mh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),K}),k=[];for(const F of se){const K=F==null?void 0:F(N());K&&k.push(K)}return()=>k.forEach(F=>F==null?void 0:F())},U=oe=>pL(oe).find(J=>{let se=!J.guard;return Yl(J.guard)?se=!!A(J.guard):fs(J.guard)&&(se=J.guard(N())),se}),Y=oe=>{ML(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[oe];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,J){var k,F,K,I;if(J){const xe=f.current.get(J);xe==null||xe(),f.current.delete(J)}J&&x((k=e.states[J])==null?void 0:k.exit),x((F=p.current)==null?void 0:F.actions);const se=C((K=e.states[oe])==null?void 0:K.effects);if(se&&f.current.set(oe,se),J===Yh){x(e.entry);const xe=C(e.effects);xe&&f.current.set(Yh,xe)}x((I=e.states[oe])==null?void 0:I.entry)}})),V=D.useRef(void 0),ne=D.useRef(Ts.NotStarted);uT(()=>{queueMicrotask(()=>{var F;const se=ne.current===Ts.Started;ne.current=Ts.Started,r(se?"rehydrating...":"initializing...");const k=(F=V.current)!=null?F:R.initial;R.invoke(k,se?R.get():Yh)});const oe=f.current,J=R.ref.current;return()=>{r("unmounting..."),V.current=J,ne.current=Ts.Stopped,oe.forEach(se=>se==null?void 0:se()),f.current=new Map,p.current=null,queueMicrotask(()=>{x(e.exit)})}},[]);const fe=()=>"ref"in R?R.ref.current:R.get(),$=oe=>{queueMicrotask(()=>{var I,xe,Me,ke,be;if(ne.current!==Ts.Started)return;m.current=T.current,T.current=oe;let J=fe();const se=(Me=(I=e.states[J].on)==null?void 0:I[oe.type])!=null?Me:(xe=e.on)==null?void 0:xe[oe.type],k=U(se);if(!k)return;p.current=k;const F=(ke=k.target)!=null?ke:J;r("transition",oe.type,k.target||J,`(${k.actions})`);const K=F!==J;K?co.flushSync(()=>R.set(F)):k.reenter&&!K?R.invoke(J,J):x((be=k.actions)!=null?be:[])})};return(Ae=e.watch)==null||Ae.call(e,N()),{state:w(),send:$,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ne.current}}function lT(e){const t=D.useRef(e);return t.current=e,t}function j5(e){const t=lT(e);return function(r){return t.current[r]}}function cT(e){queueMicrotask(()=>{co.flushSync(()=>e())})}var Wh=U5(e=>e);function tc(...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 $5(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 Gh=e=>{const t=D.memo(D.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return D.createElement(e,me(B({},u),{ref:r}),a);if(!D.isValidElement(a))return null;const l=D.Children.only(a),d=$5(l);return D.cloneElement(l,me(B({},on(u,l.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Pn=(()=>{const e=new Map;return new Proxy(Gh,{apply(t,n,r){return Gh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Gh(r)),e.get(r)}})})();function V5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function So(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=D.createContext(u);l.displayName=t;function d(){var p;const f=D.useContext(l);if(!f&&n){const m=new Error(a!=null?a:V5(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[q5,Xh]=So({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[dT,Ja]=So({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),fT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});fT.displayName="PopoverContent";const hT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:t}))});hT.displayName="PopoverPositioner";const Za=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),pT=e=>Za()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Y5(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 W5={props({props:e}){return me(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Es(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"});Wt(()=>{var l,d;const u=nc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Wt(()=>{e.set("prevAnimationName",nc(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",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Tr(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 l=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),sT(()=>l())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function G5(e,t={}){const{sync:n=!1}=t,r=X5(e);return D.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 X5(e){const t=D.useRef(e);return t.current=e,t}const Kh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=D.useRef(!1),l=me(B({},a),{present:r,onExitComplete:G5(e.onExitComplete)}),d=ec(W5,l),f=Y5(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 vo=(e,t=[])=>({parts:(...n)=>{if(K5(t))return vo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>vo(e,[...t,...n]),omit:(...n)=>vo(e,t.filter(r=>!n.includes(r))),rename:n=>vo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_s(e)}"][data-part="${_s(r)}"]`,`& [data-scope="${_s(e)}"][data-part="${_s(r)}"]`].join(", "),attrs:{"data-scope":_s(e),"data-part":_s(r)}}}),{})}),_s=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),K5=e=>e.length===0;const Q5=["top","right","bottom","left"],Oi=Math.min,ai=Math.max,rc=Math.round,ic=Math.floor,Ur=e=>({x:e,y:e}),J5={left:"right",right:"left",bottom:"top",top:"bottom"};function mT(e,t,n){return ai(e,Oi(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function Ii(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zh(e){return Qh(Hr(e))}function Z5(e,t,n){n===void 0&&(n=!1);const r=xs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function eD(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gT=["left","right"],ET=["right","left"],tD=["top","bottom"],nD=["bottom","top"];function rD(e,t,n){switch(e){case"top":case"bottom":return n?t?ET:gT:t?gT:ET;case"left":case"right":return t?tD:nD;default:return[]}}function iD(e,t,n,r){const o=xs(e);let a=rD(Ii(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){const t=Ii(e);return J5[t]+e.slice(t.length)}function oD(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function yT(e){return typeof e!="number"?oD(e):{top:e,right:e,bottom:e,left:e}}function sc(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 bT(e,t,n){let{reference:r,floating:o}=e;const a=Hr(t),u=Zh(t),l=Jh(u),d=Ii(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[l]/2-o[l]/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}}const w=xs(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function sD(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ui(t,e),w=yT(y),N=l[T?m==="floating"?"reference":"floating":m],x=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(N))==null||n?N:N.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),A=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:A,offsetParent:C,strategy:d}):A);return{top:(x.top-Y.top+w.top)/U.y,bottom:(Y.bottom-x.bottom+w.bottom)/U.y,left:(x.left-Y.left+w.left)/U.x,right:(Y.right-x.right+w.right)/U.x}})}const aD=50,uD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:me(B({},u),{detectOverflow:sD}),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}=bT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const N=a[v];if(!N)continue;const{name:x,fn:A}=N,{x:C,y:U,data:Y,reset:R}=yield A({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});p=C!=null?C:p,m=U!=null?U:m,w[x]=B(B({},w[x]),Y),R&&y<aD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:m}=bT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),lD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ui(e,n)||{};if(p==null)return{};const T=yT(m),y={x:r,y:o},w=Zh(a),v=Jh(w),N=yield l.getDimensions(p),x=w==="y",A=x?"top":"left",C=x?"bottom":"right",U=x?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[w]-y[w]-u.floating[v],R=y[w]-u.reference[w],V=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=V?V[U]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement(V)))&&(ne=d.floating[U]||u.floating[v]);const fe=Y/2-R/2,$=ne/2-N[v]/2-1,ie=Oi(T[A],$),ue=Oi(T[C],$),ve=ne-N[v]-ue,re=ne/2-N[v]/2+fe,ae=mT(ie,re,ve),Ae=!f.arrow&&xs(a)!=null&&re!==ae&&u.reference[v]/2-(re<ie?ie:ue)-N[v]/2<0,oe=Ae?re<ie?re-ie:re-ve:0;return{[w]:y[w]+oe,data:B({[w]:ae,centerOffset:re-ae-oe},Ae&&{alignmentOffset:oe}),reset:Ae}})}}),cD=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:l,initialPlacement:d,platform:f,elements:p}=n,ae=ui(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:N=!0}=ae,x=mn(ae,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const A=Ii(a),C=Hr(d),U=Ii(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!N?[oc(d)]:eD(d)),V=v!=="none";!y&&V&&R.push(...iD(d,N,v,Y));const ne=[d,...R],fe=yield f.detectOverflow(n,x),$=[];let ie=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&$.push(fe[A]),T){const Ae=Z5(a,l,Y);$.push(fe[Ae[0]],fe[Ae[1]])}if(ie=[...ie,{placement:a,overflows:$}],!$.every(Ae=>Ae<=0)){var ue,ve;const Ae=(((ue=u.flip)==null?void 0:ue.index)||0)+1,oe=ne[Ae];if(oe&&(!(T==="alignment"?C!==Hr(oe):!1)||ie.every(k=>Hr(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:Ae,overflows:ie},reset:{placement:oe}};let J=(ve=ie.filter(se=>se.overflows[0]<=0).sort((se,k)=>se.overflows[1]-k.overflows[1])[0])==null?void 0:ve.placement;if(!J)switch(w){case"bestFit":{var re;const se=(re=ie.filter(k=>{if(V){const F=Hr(k.placement);return F===C||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,K)=>F+K,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:re[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}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 wT(e){return Q5.some(t=>e[t]>=0)}const dD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:o}=n,l=ui(e,n),{strategy:a="referenceHidden"}=l,u=mn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,me(B({},u),{elementContext:"reference"})),f=TT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:wT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,me(B({},u),{altBoundary:!0})),f=TT(d,r.floating);return{data:{escapedOffsets:f,escaped:wT(f)}}}default:return{}}})}}},_T=new Set(["left","top"]);function fD(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=Ii(n),l=xs(n),d=Hr(n)==="y",f=_T.has(u)?-1:1,p=a&&d?-1:1,m=ui(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof w=="number"&&(y=l==="end"?w*-1:w),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const hD=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:l,middlewareData:d}=n,f=yield fD(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:me(B({},f),{placement:l})}})}}},pD=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,platform:u}=n,C=ui(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:Y,y:R}=U;return{x:Y,y:R}}}}=C,p=mn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=Hr(a),w=Qh(y);let v=m[w],N=m[y];const x=(U,Y)=>mT(Y+T[U==="y"?"top":"left"],Y,Y-T[U==="y"?"bottom":"right"]);l&&(v=x(w,v)),d&&(N=x(y,N));const A=f.fn(me(B({},n),{[w]:v,[y]:N}));return me(B({},A),{data:{x:A.x-r,y:A.y-o,enabled:{[w]:l,[y]:d}}})})}}},mD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=ui(e,t),T={x:o,y:a},y=Hr(u),w=Qh(y);let v=T[w],N=T[y];const x=ui(f,t),A=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const Y=w==="y"?"height":"width",R=l.reference[w]-l.floating[Y]+A.mainAxis,V=l.reference[w]+l.reference[Y]-A.mainAxis;v<R?v=R:v>V&&(v=V)}if(m){var C,U;const Y=w==="y"?"width":"height",R=_T.has(Ii(u)),V=l.reference[y]-l.floating[Y]+(R&&((C=d.offset)==null?void 0:C[y])||0)+(R?0:A.crossAxis),ne=l.reference[y]+l.reference[Y]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?A.crossAxis:0);N<V?N=V:N>ne&&(N=ne)}return{[w]:v,[y]:N}}}},gD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,$=ui(e,n),{apply:l=()=>{}}=$,d=mn($,["apply"]),f=yield a.detectOverflow(n,d),p=Ii(r),m=xs(r),T=Hr(r)==="y",{width:y,height:w}=o.floating;let v,N;p==="top"||p==="bottom"?(v=p,N=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,v=m==="end"?"top":"bottom");const x=w-f.top-f.bottom,A=y-f.left-f.right,C=Oi(w-f[v],x),U=Oi(y-f[N],A),Y=n.middlewareData.shift,R=!Y;let V=C,ne=U;Y!=null&&Y.enabled.x&&(ne=A),Y!=null&&Y.enabled.y&&(V=x),R&&!m&&(T?ne=y-2*ai(f.left,f.right):V=w-2*ai(f.top,f.bottom)),yield l(me(B({},n),{availableWidth:ne,availableHeight:V}));const fe=yield a.getDimensions(u.floating);return y!==fe.width||w!==fe.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Ss(e){return xT(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(xT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xT(e){return ac()?e instanceof Node||e instanceof Kn(e).Node:!1}function wr(e){return ac()?e instanceof Element||e instanceof Kn(e).Element:!1}function jr(e){return ac()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function ST(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ED(e){return/^(table|td|th)$/.test(Ss(e))}function uc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const yD=/transform|translate|scale|rotate|perspective|filter/,bD=/paint|layout|strict|content/,Ao=e=>!!e&&e!=="none";let tp;function np(e){const t=wr(e)?_r(e):e;return Ao(t.transform)||Ao(t.translate)||Ao(t.scale)||Ao(t.rotate)||Ao(t.perspective)||!rp()&&(Ao(t.backdropFilter)||Ao(t.filter))||yD.test(t.willChange||"")||bD.test(t.contain||"")}function TD(e){let t=Ri(e);for(;jr(t)&&!vs(t);){if(np(t))return t;if(uc(t))return null;t=Ri(t)}return null}function rp(){return tp==null&&(tp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tp}function vs(e){return/^(html|body|#document)$/.test(Ss(e))}function _r(e){return Kn(e).getComputedStyle(e)}function lc(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ri(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ST(e)&&e.host||zr(e);return ST(t)?t.host:t}function vT(e){const t=Ri(e);return vs(t)?(e.ownerDocument||e).body:jr(t)&&eu(t)?t:vT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Kn(o);if(a){const l=ip(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],l&&n?tu(l):[])}else return t.concat(o,tu(o,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AT(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=rc(n)!==a||rc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function op(e){return wr(e)?e:e.contextElement}function As(e){const t=op(e);if(!jr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=AT(t);let u=(a?rc(n.width):n.width)/r,l=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const wD=Ur(0);function CT(e){const t=Kn(e);return!rp()||!t.visualViewport?wD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kn(e)?!1:t}function Co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=op(e);let u=Ur(1);t&&(r?wr(r)&&(u=As(r)):u=As(e));const l=_D(a,n,r)?CT(a):Ur(0);let d=(o.left+l.x)/u.x,f=(o.top+l.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Kn(a),y=r&&wr(r)?Kn(r):r;let w=T,v=ip(w);for(;v&&r&&y!==w;){const N=As(v),x=v.getBoundingClientRect(),A=_r(v),C=x.left+(v.clientLeft+parseFloat(A.paddingLeft))*N.x,U=x.top+(v.clientTop+parseFloat(A.paddingTop))*N.y;d*=N.x,f*=N.y,p*=N.x,m*=N.y,d+=C,f+=U,w=Kn(v),v=ip(w)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:Co(zr(e)).left+n}function kT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function xD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=zr(r),l=t?uc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),m=jr(r);if((m||!m&&!a)&&((Ss(r)!=="body"||eu(u))&&(d=lc(r)),jr(r))){const y=Co(r);f=As(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?kT(u,d):Ur(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 SD(e){return Array.from(e.getClientRects())}function vD(e){const t=zr(e),n=lc(e),r=e.ownerDocument.body,o=ai(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ai(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const l=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=ai(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const NT=25;function AD(e,t){const n=Kn(e),r=zr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(o){a=o.width,u=o.height;const p=rp();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=cc(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,w=Math.abs(r.clientWidth-m.clientWidth-y);w<=NT&&(a-=w)}else f<=NT&&(a+=f);return{width:a,height:u,x:l,y:d}}const CD=new Set(["absolute","fixed"]);function kD(e,t){const n=Co(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=jr(e)?As(e):Ur(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function PT(e,t,n){let r;if(t==="viewport")r=AD(e,n);else if(t==="document")r=vD(zr(e));else if(wr(t))r=kD(t,n);else{const o=CT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function OT(e,t){const n=Ri(e);return n===t||!wr(n)||vs(n)?!1:_r(n).position==="fixed"||OT(n,t)}function ND(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(l=>wr(l)&&Ss(l)!=="body"),o=null;const a=_r(e).position==="fixed";let u=a?Ri(e):e;for(;wr(u)&&!vs(u);){const l=_r(u),d=np(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&CD.has(o.position)||eu(u)&&!d&&OT(e,u))?r=r.filter(p=>p!==u):o=l,u=Ri(u)}return t.set(e,r),r}function PD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:ND(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=PT(t,p,o);return f.top=ai(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=ai(m.left,f.left),f},PT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function OD(e){const{width:t,height:n}=AT(e);return{width:t,height:n}}function ID(e,t,n){const r=jr(t),o=zr(t),a=n==="fixed",u=Co(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||eu(o))&&(l=lc(t)),r){const y=Co(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?kT(o,l):Ur(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function sp(e){return _r(e).position==="static"}function IT(e,t){if(!jr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function RT(e,t){const n=Kn(e);if(uc(e))return n;if(!jr(e)){let o=Ri(e);for(;o&&!vs(o);){if(wr(o)&&!sp(o))return o;o=Ri(o)}return n}let r=IT(e,t);for(;r&&ED(r)&&sp(r);)r=IT(r,t);return r&&vs(r)&&sp(r)&&!np(r)?n:r||TD(e)||n}const RD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||RT,n=this.getDimensions,r=yield n(e.floating);return{reference:ID(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function LD(e){return _r(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:xD,getDocumentElement:zr,getClippingRect:PD,getOffsetParent:RT,getElementRects:RD,getClientRects:SD,getDimensions:OD,getScale:As,isElement:wr,isRTL:LD};function LT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MD(e,t){let n=null,r;const o=zr(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const w=ic(m),v=ic(o.clientWidth-(p+T)),N=ic(o.clientHeight-(m+y)),x=ic(p),C={rootMargin:-w+"px "+-v+"px "+-N+"px "+-x+"px",threshold:ai(0,Oi(1,d))||1};let U=!0;function Y(R){const V=R[0].intersectionRatio;if(V!==d){if(!U)return u();V?u(!1,V):r=setTimeout(()=>{u(!1,1e-7)},1e3)}V===1&&!LT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,me(B({},C),{root:o.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function FD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=op(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=f&&l?MD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(x=>{let[A]=x;A&&A.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,v=d?Co(e):null;d&&N();function N(){const x=Co(e);v&&!LT(v,x)&&n(),v=x,w=requestAnimationFrame(N)}return n(),()=>{var x;p.forEach(A=>{o&&A.removeEventListener("scroll",n),a&&A.removeEventListener("resize",n)}),m==null||m(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const BD=hD,UD=pD,HD=cD,zD=gD,jD=dD,$D=lD,VD=mD,qD=(e,t,n)=>{const r=new Map,o=B({platform:DD},n),a=me(B({},o.platform),{_c:r});return uD(e,t,me(B({},o),{platform:a}))};function DT(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 me(B({},o),{toJSON:()=>o})}function YD(e){if(!e)return DT();const{x:t,y:n,width:r,height:o}=e;return DT(t,n,r,o)}function WD(e,t){return{contextElement:nn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?YD(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),li={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},GD=e=>e==="top"||e==="bottom"?"y":"x";function XD(e,t){return{name:"transformOrigin",fn(n){var fe,$,ie,ue,ve;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=GD(d),p=((fe=o.arrow)==null?void 0:fe.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,w=p+T/2,v=m+y/2,N=Math.abs(((ie=o.shift)==null?void 0:ie.y)||0),x=u.reference.height/2,A=y/2,C=(ve=(ue=e.offset)==null?void 0:ue.mainAxis)!=null?ve:e.gutter,U=typeof C=="number"?C+A:C!=null?C:A,Y=N>U,R={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],V=`${w}px ${u.reference.y+x-l}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(li.transformOrigin.variable,ne?V:R),{data:{transformOrigin:ne?V:R}}}}}var KD={name:"rects",fn({rects:e}){return{data:e}}},QD=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 JD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var ZD={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 ap(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function e8(e,t,n){const r=e||t.createElement("div");return $D({element:r,padding:n.arrowPadding})}function t8(e,t){var n;if(!wL((n=t.offset)!=null?n:t.gutter))return BD(({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:l}=JD(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Dh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function n8(e){if(!e.flip)return;const t=ap(e.boundary);return HD(me(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function r8(e){if(!e.slide&&!e.overlap)return;const t=ap(e.boundary);return UD(me(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:VD()}))}function i8(e){return zD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),l=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",`${l}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function o8(e){var t;if(e.hideWhenDetached)return jD({strategy:"referenceHidden",boundary:(t=ap(e.boundary))!=null?t:"clippingAncestors"})}function s8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function a8(e,t,n={}){const r=WD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},ZD,n),a=t.querySelector("[data-part=arrow]"),u=[t8(a,o),n8(o),r8(o),e8(a,t.ownerDocument,o),QD(a),XD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),i8(o),o8(o),KD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const v=yield qD(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const N=ms(t),x=MT(N,v.x),A=MT(N,v.y);t.style.setProperty("--x",`${x}px`),t.style.setProperty("--y",`${A}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=Es(C);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=s8(o.listeners),w=o.listeners?FD(r,t,T,y):PL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function FT(e,t,n={}){const l=n,{defer:r}=l,o=mn(l,["defer"]),a=r?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(a8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var u8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function l8(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?u8[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 Cs=new WeakMap,dc=new WeakMap,fc={},up=0,BT=e=>e&&(e.host||BT(e.parentNode)),c8=(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),d8=new Set(["script","output","status","next-route-announcer"]),f8=e=>d8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=c8(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const l=fc[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&&nn(y)&&Kb(y,w=>{m(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(f.has(w))T(w);else try{if(f8(w))return;const N=w.getAttribute(o)==="true",x=(Cs.get(w)||0)+1,A=(l.get(w)||0)+1;Cs.set(w,x),l.set(w,A),d.push(w),x===1&&N&&dc.set(w,!0),A===1&&w.setAttribute(r,""),N||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),up++,()=>{d.forEach(y=>{const w=Cs.get(y)-1,v=l.get(y)-1;Cs.set(y,w),l.set(y,v),w||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),v||y.removeAttribute(r)}),up--,up||(Cs=new WeakMap,Cs=new WeakMap,dc=new WeakMap,fc={})}},p8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,m8=(e,t=p8(e),n="data-aria-hidden",r=!0)=>{if(t)return h8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},g8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function UT(e,t={}){const{defer:n=!0}=t,r=n?g8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(m8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function E8(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 y8(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 HT="pointerdown.outside",zT="focus.outside";function b8(e){for(const t of e)if(nn(t)&&Br(t))return!0;return!1}var jT=e=>"clientY"in e;function T8(e,t){if(!jT(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 w8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function $T(e,t){if(!t||!jT(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)},l={x:e.clientX,y:e.clientY};return w8(u,l)?r||a:!1}function _8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Fr(e),f=ms(e),p=E8(f),m=y8(f);function T(C,U){if(!nn(U)||!U.isConnected||ps(e,U)||T8(e,C)||l&&Xb(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const V=Vh(Y);if($T(C,V))return!1}const R=Vh(e);return $T(C,R)?!1:!(n!=null&&n(U))}const y=new Set,w=_o(e==null?void 0:e.getRootNode());function v(C){function U(Y){var fe,$;const R=u&&!Qb()?Wt:ie=>ie(),V=Y!=null?Y:C,ne=($=(fe=V==null?void 0:V.composedPath)==null?void 0:fe.call(V))!=null?$:[V==null?void 0:V.target];R(()=>{const ie=w?ne[0]:Tr(C);if(!(!e||!T(C,ie))){if(o||a){const ue=Lh(o,a);e.addEventListener(HT,ue,{once:!0})}VT(e,HT,{bubbles:!1,cancelable:!0,detail:{originalEvent:V,contextmenu:d5(V),focusable:b8(ne),target:ie}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(rn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const N=new Set,x=setTimeout(()=>{N.add(rn(d,"pointerdown",v,!0)),N.add(m.addEventListener("pointerdown",v,!0)),N.add(p.addEventListener("pointerdown",v,!0))},0);function A(C){(u?Wt:Y=>Y())(()=>{var V,ne;const Y=(ne=(V=C==null?void 0:C.composedPath)==null?void 0:V.call(C))!=null?ne:[C==null?void 0:C.target],R=w?Y[0]:Tr(C);if(!(!e||!T(C,R))){if(r||a){const fe=Lh(r,a);e.addEventListener(zT,fe,{once:!0})}VT(e,zT,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Br(R),target:R}})}})}return Qb()||(N.add(rn(d,"focusin",A,!0)),N.add(m.addEventListener("focusin",A,!0)),N.add(p.addEventListener("focusin",A,!0))),()=>{clearTimeout(x),y.forEach(C=>C()),N.forEach(C=>C())}}function x8(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(_8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function VT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function S8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return rn(Fr(e),"keydown",n,{capture:!0})}var qT="layer:request-dismiss",ur={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=>ps(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ps(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=>ur.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];A8(e,qT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),v8(e,qT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v8(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 A8(e,t,n){e.addEventListener(t,n,{once:!0})}var YT;function WT(){ur.layers.forEach(({node:e})=>{e.style.pointerEvents=ur.isBelowPointerBlockingLayer(e)?"none":"auto"})}function C8(e){e.style.pointerEvents=""}function k8(e,t){const n=Fr(e),r=[];return ur.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(YT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=L5(()=>{const l=o();return nn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Jl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{ur.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=YT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function N8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Mh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ur.add(f),WT();function p(v){var x,A;const N=Tr(v.detail.originalEvent);ur.isBelowPointerBlockingLayer(e)||ur.isInBranch(N)||((x=t.onPointerDownOutside)==null||x.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var x,A;const N=Tr(v.detail.originalEvent);ur.isInBranch(N)||((x=t.onFocusOutside)==null||x.call(t,v),(A=t.onInteractOutside)==null||A.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var N;ur.isTopMost(e)&&((N=t.onEscapeKeyDown)==null||N.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var C;if(!e)return!1;const N=typeof u=="function"?u():u,x=Array.isArray(N)?N:[N],A=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(nn);return A&&x.push(...A),x.some(U=>ps(U,v))||ur.isInNestedLayer(e,v)}const w=[a?k8(e,t.persistentElements):void 0,S8(e,T),x8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ur.remove(e),WT(),C8(e),w.forEach(v=>v==null?void 0:v())}}function GT(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=fs(e)?e():e;o.push(N8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var P8=Object.defineProperty,O8=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>O8(e,typeof t!="symbol"?t+"":t,n),XT={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()}},I8=[],R8=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=Tr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Qa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Qa(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Tr(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Tr(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(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;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{L8(r)&&iu(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(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return n5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?r5(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&&!Br(r)){const o=gs(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!==gs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,D8(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),XT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),l=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{KT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),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 l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Tr(o);this.updateTabbableNodes();let l=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?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||I8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||Fr(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=>{ZL(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?Xb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ys(e,{getShadowRoot:this.config.getShadowRoot}),n=iT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let l=!1;for(let f=0;f<t.length;f++)if(Qa(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(xo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(xo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,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 XT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?KT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(rn(this.doc,"focusin",this.handleFocus,!0),rn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),rn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),rn(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=gs(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)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,L8=e=>!e.isComposing&&e.key==="Escape",KT=e=>setTimeout(e,0),D8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function QT(e,t={}){let n;const r=Wt(()=>{const o=typeof e=="function"?e():e;if(o){n=new R8(o,me(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var lp="data-scroll-lock";function M8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function JT(e){const t=Es(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ZT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(lp))return;const u=JT(r)||JT(o),l=n.innerWidth-r.clientWidth;o.setAttribute(lp,"");const d=()=>I5(r,"--scrollbar-width",`${l}px`),f=M8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),Jl(o,w)},m=()=>{var Y,R;const{scrollX:w,scrollY:v,visualViewport:N}=n,x=(Y=N==null?void 0:N.offsetLeft)!=null?Y:0,A=(R=N==null?void 0:N.offsetTop)!=null?R:0,C={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(A))}px`,left:`${-(w-Math.floor(x))}px`,right:"0"};!u&&l>0&&(C[f]=`${l}px`);const U=Jl(o,C);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(lp)}}var F8=vo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),$r=F8.build(),ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},tw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},B8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},U8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},rw=e=>e.getById(ew(e)),ks=e=>e.getById(tw(e)),Ns=e=>e.getById(cp(e)),iw=e=>e.getById(nw(e)),H8=e=>e.getById(dp(e)),z8=e=>e.getById(fp(e));function j8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=l8(me(B({},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(me(B({id:B8(l)},$r.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(me(B({},$r.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(me(B({},$r.anchor.attrs),{dir:u("dir"),id:ew(l)}))},getTriggerProps(){return t.button(me(B({},$r.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:tw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":cp(l),onPointerDown(y){Jb(y)&&l5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(B({},$r.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({id:nw(l)},$r.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(me(B({},$r.content.attrs),{dir:u("dir"),id:cp(l),tabIndex:-1,role:"dialog","aria-modal":Yb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":hs(d),"aria-labelledby":m.title?dp(l):void 0,"aria-describedby":m.description?fp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(B({},$r.title.attrs),{id:dp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(me(B({},$r.description.attrs),{id:fp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(B({},$r.closeTrigger.attrs),{dir:u("dir"),id:U8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var $8={props({props:e}){return me(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=rw(n))!=null?a:ks(n);return FT(r,()=>iw(n),me(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ns(n);let o=!0;return GT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ks(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:P5(()=>Ns(t),{triggerElement:ks(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?UT(()=>[Ns(t),ks(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ZT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?QT(()=>Ns(t),{initialFocus:()=>oT({root:Ns(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=rw(n))!=null?u:ks(n);FT(o,()=>iw(n),me(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Wt(()=>{Object.assign(e.get("renderedElements"),{title:!!H8(t),description:!!z8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Wt(()=>{const n=oT({root:Ns(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||Wt(()=>{const a=ks(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})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[OH,hc]=So({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IH,hp]=So({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),V8=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec($8,o);return j8(a,Wh)},q8=e=>{const[t,u]=pT(e),l=u,{children:n}=l,r=mn(l,["children"]),o=V8(r),a=Kh(on({present:o.open},t));return _.jsx(q5,{value:o,children:_.jsx(dT,{value:a,children:n})})},ow=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(me(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Pn.button,me(B({},o),{ref:t}))});ow.displayName="PopoverTrigger";function Y8(e){return ht({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 W8(e){return ht({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 G8(e){return ht({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 X8(e){return ht({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 K8(e){return ht({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 Q8(e){return ht({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 pp(e){return ht({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 sw(e){return ht({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 J8=({className:e,componentType:t,children:n})=>{const[r,o]=D.useState(!1),{globalClassName:a}=tt(),u=f=>{o(f.open)},l=D.useCallback(()=>{o(!1)},[]),d=D.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(q8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(ow,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(sw,{"aria-hidden":"true"})}),_.jsx(hT,{children:_.jsx(fT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ub.Provider,{value:d,children:n})})})]})};function aw(e){return ht({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 uw(e){return ht({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[Z8,ko]=So({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),lw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getControlProps(),e);return _.jsx(Pn.div,me(B(B({},r),e),{ref:t}))});lw.displayName="CarouselControl";const cw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["readOnly","index"]),o=ko(),a=on(o.getIndicatorProps(n),r);return _.jsx(Pn.button,me(B({},a),{ref:t}))});cw.displayName="CarouselIndicator";const dw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getIndicatorGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});dw.displayName="CarouselIndicatorGroup";const fw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["index","snapAlign"]),o=ko(),a=on(o.getItemProps(n),r);return _.jsx(Pn.div,me(B({},a),{ref:t}))});fw.displayName="CarouselItem";const hw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getItemGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});hw.displayName="CarouselItemGroup";const pw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getNextTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});pw.displayName="CarouselNextTrigger";const mw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getPrevTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});mw.displayName="CarouselPrevTrigger";function eM(e){const t=Es(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 l(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=l(r,n.width),f=l(o,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function tM(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 gw(e){let t=[];for(const n of e.children)t=t.concat(n,gw(n));return t}function Ew(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?gw(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!tM(n,m,u))continue;const T=Es(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,N=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:N});break;case"center":r[a].center.push({node:p,position:N+m[d]/2});break;case"end":r[a].end.push({node:p,position:N+m[d]});break}}}return r}function yw(e){const t=e.getBoundingClientRect(),n=eM(e),r=Ew(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:bw([...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(Tw(0,o.x))),y:bw([...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(Tw(0,o.y)))}}function nM(e,t,n){const r=Ew(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var bw=e=>[...new Set(e)],Tw=(e,t)=>n=>Math.max(e,Math.min(t,n)),rM=vo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ci=rM.build(),iM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},oM=(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}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},sM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},aM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},uM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},ww=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Hn=e=>e.getById(pc(e)),_w=e=>O5(Hn(e),"[data-part=item]"),lM=(e,t)=>e.getById(ww(e,t)),xw=e=>{const t=Hn(e);if(!t)return;const n=ys(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function cM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=l("slidesPerPage"),N=l("padding"),x=l("translations");return{isPlaying:d,isDragging:f,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return w/y.length},scrollToIndex(A,C){a({type:"INDEX.SET",index:A,instant:C})},scrollTo(A,C){a({type:"PAGE.SET",index:A,instant:C})},scrollNext(A){a({type:"PAGE.NEXT",instant:A})},scrollPrev(A){a({type:"PAGE.PREV",instant:A})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(A){return Array.from(r.get("slidesInView")).includes(A)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(B({},ci.root.attrs),{id:iM(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(B({},ci.itemGroup.attrs),{id:pc(u),"data-orientation":l("orientation"),"data-dragging":hs(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(A){ps(A.currentTarget,Tr(A))&&a({type:"VIEWPORT.FOCUS"})},onBlur(A){ps(A.currentTarget,A.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(A){if(A.defaultPrevented||!l("allowMouseDrag")||!Jb(A))return;const C=Tr(A);Br(C)&&C!==A.currentTarget||(A.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:OL(A=>{const C=l("orientation")==="horizontal"?"deltaX":"deltaY";A[C]<0&&!o("canScrollPrev")||A[C]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:N,[T?"paddingInline":"paddingBlock"]:N,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(A){const C=r.get("slidesInView").includes(A.index);return t.element(me(B({},ci.item.attrs),{id:oM(u,A.index),dir:l("dir"),role:"group","data-index":A.index,"data-inview":hs(C),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":x.item(A.index,l("slideCount")),"aria-hidden":Yb(!C),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=A.snapAlign)!=null?ne:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(A.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(me(B({},ci.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(me(B({},ci.prevTrigger.attrs),{id:aM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":x.prevTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),onClick(A){A.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(B({},ci.nextTrigger.attrs),{dir:l("dir"),id:sM(u),type:"button","aria-label":x.nextTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),disabled:!p,onClick(A){A.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(B({},ci.indicatorGroup.attrs),{dir:l("dir"),id:uM(u),"data-orientation":l("orientation"),onKeyDown(A){if(A.defaultPrevented)return;const C="indicator",U={ArrowDown(V){T||(a({type:"PAGE.NEXT",src:C}),V.preventDefault())},ArrowUp(V){T||(a({type:"PAGE.PREV",src:C}),V.preventDefault())},ArrowRight(V){T&&(a({type:"PAGE.NEXT",src:C}),V.preventDefault())},ArrowLeft(V){T&&(a({type:"PAGE.PREV",src:C}),V.preventDefault())},Home(V){a({type:"PAGE.SET",index:0,src:C}),V.preventDefault()},End(V){a({type:"PAGE.SET",index:y.length-1,src:C}),V.preventDefault()}},Y=p5(A,{dir:l("dir"),orientation:l("orientation")}),R=U[Y];R==null||R(A)}}))},getIndicatorProps(A){return t.button(me(B({},ci.indicator.attrs),{dir:l("dir"),id:ww(u,A.index),type:"button","data-orientation":l("orientation"),"data-index":A.index,"data-readonly":hs(A.readOnly),"data-current":hs(A.index===w),"aria-label":x.indicator(A.index),onClick(C){C.defaultPrevented||A.readOnly||a({type:"PAGE.SET",index:A.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(B({},ci.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":hs(d),"aria-label":d?x.autoplayStop:x.autoplayStart,onClick(A){A.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var dM={props({props:e}){return FL(e,["slideCount"],"carousel"),me(B({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:B({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:fM(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 TL(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Hn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),xw(e)});return xw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Wt(()=>{o(),Wt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?mL(d,m):gL(d,m)},n.get("slidesInView"));n.set("slidesInView",EL(l))},{root:r,threshold:t("inViewThreshold")});return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Hn(n);return r?rn(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 rn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return k5(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 rn(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=Vb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Hn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";o(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=zb(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=yL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Hn(r);if(!o)return;const a=nM(o,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Vb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Hn(n);if(!r)return;const o=yw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Hn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=yw(r),l=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]);Wt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=lM(n,e.get("page"));r&&Wt(()=>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 fM(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}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const hM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec(dM,o);return cM(a,Wh)},Sw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=hM(n),a=on(o.getRootProps(),r);return _.jsx(Z8,{value:o,children:_.jsx(Pn.div,me(B({},a),{ref:t}))})});Sw.displayName="CarouselRoot";function pM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function mM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}const gM=180,EM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},yM=({globalClassName:e,className:t,itemMinWidth:n=gM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:p="Product carousel",children:m})=>{const T=Array.from(m).map(($,ie)=>({node:$,key:D.isValidElement($)&&$.key!=null?$.key:`carousel-item-${ie}`})),y=T.length,w=D.useRef(null),[v,N]=D.useState(0),{width:x}=yk();D.useLayoutEffect(()=>{w.current&&N(w.current.getBoundingClientRect().width)},[x,y]);const A=EM(r),C=n+A,U=v>0?(v+A)/C:1,Y=Math.max(1,Math.floor(U));if(y===0)return null;const R=y>Y,V=Math.ceil(y/Y),ne=R?Math.max(1,U):Y,fe=d==="circle-arrow";return _.jsxs(Sw,{ref:w,className:W(e,t,`${z}-carousel`,{[`${z}-carousel--circle-arrow-navigation`]:fe}),slidesPerPage:ne,slidesPerMove:Y,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[_.jsx(hw,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!R}),children:T.map(({node:$,key:ie},ue)=>_.jsx(fw,{index:ue,className:W(e,`${z}-carousel__item`),children:$},ie))}),l&&R&&_.jsxs(lw,{className:W(e,`${z}-carousel__control`),children:[_.jsx(mw,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:fe?_.jsx(pM,{"aria-hidden":"true",size:"16px"}):_.jsx(G8,{"aria-hidden":"true",size:"16px"})}),_.jsx(pw,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:fe?_.jsx(mM,{"aria-hidden":"true",size:"16px"}):_.jsx(X8,{"aria-hidden":"true",size:"16px"})})]}),u&&R&&_.jsx(dw,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:V},($,ie)=>_.jsx(cw,{index:ie,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},[bM,TM]=So({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),wM=e=>Za()(e,["lazyMount","unmountOnExit"]),[_M,mc]=So({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),vw=D.forwardRef((e,t)=>{const n=mc(),r=TM(),o=Kh(me(B({},r),{present:n.open})),a=on(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Pn.div,me(B({},a),{ref:tc(o.ref,t)}))});vw.displayName="DialogBackdrop";const mp=D.forwardRef((e,t)=>{const n=mc(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});mp.displayName="DialogContent";const gp=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getPositionerProps(),e);return Ja().unmounted?null:_.jsx(Pn.div,me(B({},r),{ref:t}))});gp.displayName="DialogPositioner";var xM=vo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),No=xM.build(),Aw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},gc=e=>e.getById(Ep(e)),SM=e=>e.getById(Aw(e)),vM=e=>e.getById(Cw(e)),AM=e=>e.getById(kw(e)),CM=e=>e.getById(yp(e)),kM=e=>e.getById(bp(e)),NM=e=>e.getById(Nw(e));function PM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(me(B({},No.trigger.attrs),{dir:a("dir"),id:kw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(B({},No.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Cw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({},No.positioner.attrs),{dir:a("dir"),id:Aw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(B({},No.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(me(B({},No.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(me(B({},No.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(me(B({},No.closeTrigger.attrs),{dir:a("dir"),id:Nw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var OM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>NM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return GT(()=>gc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[AM(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 ZT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?QT(()=>gc(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")?UT(()=>[gc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Wt(()=>{e.set("rendered",{title:!!CM(t),description:!!kM(t)})})},syncZIndex({scope:e}){Wt(()=>{const t=gc(e);if(!t)return;const n=Es(t);[SM(e),vM(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})}}}};ws()(["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 IM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,getRootNode:n,dir:r},e),a=ec(OM,o);return PM(a,Wh)},Pw=e=>{const[t,l]=pT(e),d=l,{children:n}=d,r=mn(d,["children"]),[o]=wM(t),a=IM(r),u=Kh(on({present:a.open},t));return _.jsx(_M,{value:a,children:_.jsx(bM,{value:o,children:_.jsx(dT,{value:u,children:n})})})},Ow=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getTitleProps(),e);return _.jsx(Pn.h2,me(B({},r),{ref:t}))});Ow.displayName="DialogTitle";const RM=({children:e})=>{const t=D.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=D.useState(!1),u=D.useMemo(()=>({toggleMenu:()=>a(d=>!d),closeMenu:()=>{var f;const d=document.getElementById(n);d!=null&&d.contains(document.activeElement)&&((f=document.getElementById(r))==null||f.focus({preventScroll:!0})),a(!1)}}),[n,r]),l=D.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return _.jsx(Rh.Provider,{value:u,children:_.jsx(Bb.Provider,{value:l,children:e})})},Iw=()=>D.useContext(Bb),Rw=()=>{const e=D.useContext(Rh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},LM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Iw(),{closeMenu:a}=Rw(),{globalClassName:u}=tt(),l=D.useRef(null);return D.useEffect(()=>{var m;if(!n)return;const d=l.current;(m=d==null?void 0:d.querySelector("button:not(:disabled)"))==null||m.focus();const f=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),a())},p=T=>{var w;const y=T.target;(w=document.getElementById(o))!=null&&w.contains(y)||l.current&&!l.current.contains(y)&&a()};return d==null||d.addEventListener("keydown",f),document.addEventListener("mousedown",p),()=>{d==null||d.removeEventListener("keydown",f),document.removeEventListener("mousedown",p)}},[n,a,o]),n?_.jsx("div",{ref:l,id:r,role:"group","aria-label":"More options",className:W(`${z}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},DM=({componentType:e,className:t})=>{const{toggleMenu:n}=Rw(),{isOpen:r,panelId:o,triggerId:a}=Iw(),{globalClassName:u}=tt();return _.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:_.jsx(sw,{"aria-hidden":"true"})})},Tp=()=>{const{status:e,entryType:t}=Yn(),{messages:n}=Wn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},MM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=Yn(),o=wo(),a=()=>{yl(r||"dialog"),o()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(aw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(aw,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},FM=({componentType:e,globalClassName:t,controls:n,showClose:r,closeButtonAriaLabel:o,onClose:a,showOverflowMenu:u,showPrimaryToggle:l})=>{const d=e==="modal"?MM:Dw;return _.jsx("div",{className:W(t,`${z}-${e}-controls`),children:n!=null?_.jsxs(_.Fragment,{children:[n,r&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:o,onClick:a})]}):_.jsxs(_.Fragment,{children:[u&&_.jsx(DM,{componentType:e}),l&&_.jsx(d,{componentType:e,isIcon:!0}),r&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:o,onClick:a})]})})},BM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=Yn(),o=wo(),a=()=>{kf(!r),o()},u=r?RN:LN,l="Toggle Fullscreen";return t?_.jsx(oi,{ariaLabel:l,title:l,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{"aria-hidden":"true"}),l]})},UM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=Yn(),o=wo(),a=r==="bottom-left",u=()=>{Nf(a?"bottom-right":"bottom-left"),o()},l=a?W8:Y8,d=a?"Move right":"Move left";return t?_.jsx(oi,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{"aria-hidden":"true"}),d]})},HM=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:o,showClearChat:a,showEndConversation:u,showDownloadTranscript:l,onClearChat:d,onEndConversation:f,onDownloadTranscript:p})=>{if(t!=null||!n)return null;const m=e==="modal"?BM:UM;return _.jsxs(LM,{componentType:e,children:[r&&_.jsx(m,{componentType:e}),o&&_.jsx(qM,{componentType:e}),a&&_.jsx(Hb,{componentType:e,onClearChat:d}),u&&f&&_.jsx(jM,{componentType:e,onEndConversation:f}),l&&p&&_.jsx(zM,{componentType:e,onDownloadTranscript:p})]})},Lw=({componentType:e,overflowActions:t,availableActions:n,controls:r,onClearChat:o,onEndConversation:a,onClose:u,onDownloadTranscript:l})=>{const{headerConfig:d,globalClassName:f,themeVariants:p,themeVariables:m}=tt(),{mode:T}=Yn(),y=T==="standalone",w=e==="modal",v=$=>n===void 0||n[$],N=($,ie=!0)=>t.includes($)&&v($)&&ie,x=v("toggleExpanded"),A=N(w?"toggleFullscreen":"toggleDialogPosition"),C=N("minimize"),U=N("clearChat"),Y=v("close"),R=N("endConversation",!!a),V=N("downloadTranscript",!!l),ne=A||C||U||R||V,fe=D.useMemo(()=>{if(!d)return{};const $=kN(d);if(!(m!=null&&m[`${rt}-header-text-font-size`]))return $;const ie={"header-background-color":d.headerBackgroundColor,"header-text-color":d.headerTextColor,"header-text-font-size":d.headerTextFontSize,"header-text-font-weight":d.headerTextFontWeight,"header-text-font-family":d.headerTextFontFamily,"header-text-text-align":d.headerTextTextAlign};return Object.fromEntries(Object.entries(ie).filter(([,ue])=>ue!=null&&ue!=="").map(([ue])=>[`${rt}-${ue}`,$[`${rt}-${ue}`]]))},[d,m]);return _.jsx(RM,{children:_.jsxs("div",{className:W(f,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:W(f,`${z}-${e}-header`,{standalone:y,embedded:!y}),style:fe,children:[d!=null&&d.logoUrl?_.jsx("img",{alt:"",className:W(f,`${z}-${e}-logo`,{standalone:y,embedded:!y}),src:d.logoUrl}):(p==null?void 0:p.logoFallback)==="sparkle"?_.jsx("svg",{className:W(f,`${z}-${e}-logo`,{standalone:y,embedded:!y}),"aria-hidden":"true",viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:_.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:`var(${rt}-on-primary, #ffffff)`,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,_.jsx(Ow,{className:W(f,`${z}-${e}-title`,{standalone:y,embedded:!y}),children:d==null?void 0:d.headerText}),_.jsx(FM,{componentType:e,globalClassName:f,controls:r,showClose:Y,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,onClose:u,showOverflowMenu:ne,showPrimaryToggle:x})]}),_.jsx(HM,{componentType:e,controls:r,showOverflowMenu:ne,showSecondaryToggle:A,showMinimize:C,showClearChat:U,showEndConversation:R,showDownloadTranscript:V,onClearChat:o,onEndConversation:a,onDownloadTranscript:l})]})})},zM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=wo(),[o,a]=D.useState(!1),u=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(fL,{"aria-hidden":"true"}),"Download transcript"]})},jM=({onEndConversation:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[_.jsx(DN,{"aria-hidden":"true"}),"End conversation"]})},$M={sparkle:pp,plus:K8,"paper-plane":Q8},wp=({icon:e,className:t})=>{const n=$M[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},VM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=w=>()=>{a(w)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=w=>_.jsxs(_.Fragment,{children:[l&&_.jsx(wp,{icon:l,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:w})]});return _.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(w=>o?_.jsx(wl,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):_.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const o=()=>{ri(!1),wa(!0),Ff()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(rE,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(rE,{"aria-hidden":"true"}),"Minimize"]})},Dw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=wo(),o=()=>{yl("modal"),r()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(uw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(uw,{"aria-hidden":"true"}),"Show modal"]})},YM=({isWidgetStandalone:e})=>{var N,x;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:l,messages:d}=Wn(),{isLoading:f,handleAskCim:p}=Rr(),m=o==null?void 0:o.icon,T=(N=o==null?void 0:o.iconPosition)!=null?N:"left",y=D.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 d.some(U=>U.name==="conversation_reset")&&r||A},[d,n,r]),w=D.useMemo(()=>{var C,U;const A=((U=(C=l.message)==null?void 0:C.suggestions)!=null?U:[]).map(Y=>Y.displayText.trim()).filter(Boolean);return W0(A,a||[],u)},[(x=l.message)==null?void 0:x.suggestions,a,u]),v=A=>()=>{p({userPrompt:A})};return _.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[_.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&_.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:w.map(A=>_.jsxs(wl,{disabled:f,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(A),children:[m&&_.jsx(wp,{icon:m,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:A})]},A))})]})};function WM(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function GM(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function _p({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!WM(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!GM(o)||r(o,e)}const XM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=tt();if(!n)return null;const u=n.getName(t),l=n.getBrand(t),d=n.getPriceDisplay(t),f=n.getRelativePdp(t),p=n.getPdp(t),m=n.getImage(t),T=f&&typeof f=="string"?new URL(f,window.location.origin).href:p,y=w=>_p({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return _.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[T?_.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),_.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[_.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[l&&_.jsx("p",{className:`${z}-product-tile-brand`,children:l}),T?_.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${z}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",_.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):_.jsx("p",{className:W(r,`${z}-product-tile-name`),title:u,children:u})]}),_.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:_.jsx("p",{className:W(r,`${z}-product-tile-price`),children:d})})]})]})},KM=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=tt(),u=t;return n?_.jsxs("div",{className:W(r,`${z}-display-products`),children:[_.jsx("p",{children:u.message}),u.products&&u.products.length>0&&_.jsx(yM,{globalClassName:r,spacing:(l=a==null?void 0:a.carouselGap)!=null?l:"0.5rem",navigationVariant:o==null?void 0:o.carousel,ariaLabel:"Recommended products",children:u.products.map(d=>{const f=n.getPid(d);return _.jsx(XM,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},QM=({globalClassName:e,message:t,isWidgetStandalone:n})=>_.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:_.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[_.jsx(PN,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),JM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Rr(),{messages:u}=Wn(),l=u.find(v=>v.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Hv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const N=n.suggestions.find(x=>x.displayText===v);N&&o(N,n.eventSourceId||n.id)};return _.jsxs("div",{className:W(e,`${z}-follow-up`),children:[_.jsx("p",{className:W(e,`${z}-text`),children:n.message}),_.jsx(VM,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Mw(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 ZM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eF(e,t,n){const o=Il((n||{}).ignore||[]),a=tF(t);let u=-1;for(;++u<a.length;)Ey(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],w=T?T.children:void 0;if(o(y,w?w.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 w=0;const N=m.children.indexOf(f);let x=!1,A=[];T.lastIndex=0;let C=T.exec(f.value);for(;C;){const U=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let R=y(...C,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=U+1:(w!==U&&A.push({type:"text",value:f.value.slice(w,U)}),Array.isArray(R)?A.push(...R):R&&A.push(R),w=U+C[0].length,x=!0),!T.global)break;C=T.exec(f.value)}return x?(w<f.value.length&&A.push({type:"text",value:f.value.slice(w)}),m.children.splice(N,1,...A)):A=[f],N+A.length}}function tF(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([nF(o[0]),rF(o[1])])}return t}function nF(e){return typeof e=="string"?new RegExp(ZM(e),"g"):e}function rF(e){return typeof e=="function"?e:function(){return e}}const xp="phrasing",Sp=["autolink","link","image","label"];function iF(){return{transforms:[dF],enter:{literalAutolink:sF,literalAutolinkEmail:vp,literalAutolinkHttp:vp,literalAutolinkWww:vp},exit:{literalAutolink:cF,literalAutolinkEmail:lF,literalAutolinkHttp:aF,literalAutolinkWww:uF}}}function oF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:":",before:"[ps]",after:"\\/",inConstruct:xp,notInConstruct:Sp}]}}function sF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vp(e){this.config.enter.autolinkProtocol.call(this,e)}function aF(e){this.config.exit.autolinkProtocol.call(this,e)}function uF(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 lF(e){this.config.exit.autolinkEmail.call(this,e)}function cF(e){this.exit(e)}function dF(e){eF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hF]],{ignore:["link","linkReference"]})}function fF(e,t,n,r,o){let a="";if(!Fw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!pF(n)))return!1;const u=mF(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function hF(e,t,n,r){return!Fw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pF(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 mF(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=Mw(e,"(");let a=Mw(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 Fw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||po(n)||vl(n))&&(!t||n!==47)}Bw.peek=SF;function gF(){this.buffer()}function EF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yF(){this.buffer()}function bF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function TF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wF(e){this.exit(e)}function _F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xF(e){this.exit(e)}function SF(){return"["}function Bw(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=o.move("]"),a}function vF(){return{enter:{gfmFootnoteCallString:gF,gfmFootnoteCall:EF,gfmFootnoteDefinitionLabelString:yF,gfmFootnoteDefinition:bF},exit:{gfmFootnoteCallString:TF,gfmFootnoteCall:wF,gfmFootnoteDefinitionLabelString:_F,gfmFootnoteDefinition:xF}}}function AF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
32
- `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Uw:CF))),f(),d}}function CF(e,t,n){return t===0?e:Uw(e,t,n)}function Uw(e,t,n){return(n?"":" ")+e}const kF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hw.peek=RF;function NF(){return{canContainEols:["delete"],enter:{strikethrough:OF},exit:{strikethrough:IF}}}function PF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kF}],handlers:{delete:Hw}}}function OF(e){this.enter({type:"delete",children:[]},e)}function IF(e){this.exit(e)}function Hw(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,me(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function RF(){return"~"}function LF(e){return e.length}function DF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||LF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],N=[];let x=-1;for(e[p].length>f&&(f=e[p].length);++x<e[p].length;){const A=MF(e[p][x]);if(n.alignDelimiters!==!1){const C=o(A);N[x]=C,(d[x]===void 0||C>d[x])&&(d[x]=C)}v.push(A)}u[p]=v,l[p]=N}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=zw(r[m]);else{const v=zw(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let N="",x="";v===99?(N=":",x=":"):v===108?N=":":v===114&&(x=":");let A=n.alignDelimiters===!1?1:Math.max(1,d[m]-N.length-x.length);const C=N+"-".repeat(A)+x;n.alignDelimiters!==!1&&(A=N.length+A+x.length,A>d[m]&&(d[m]=A),y[m]=A),T[m]=C}u.splice(1,0,T),l.splice(1,0,y),p=-1;const w=[];for(;++p<u.length;){const v=u[p],N=l[p];m=-1;const x=[];for(;++m<f;){const A=v[m]||"";let C="",U="";if(n.alignDelimiters!==!1){const Y=d[m]-(N[m]||0),R=a[m];R===114?C=" ".repeat(Y):R===99?Y%2?(C=" ".repeat(Y/2+.5),U=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),U=C):U=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&A==="")&&(n.delimiterStart!==!1||m)&&x.push(" "),n.alignDelimiters!==!1&&x.push(C),x.push(A),n.alignDelimiters!==!1&&x.push(U),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&x.push("|")}w.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return w.join(`
30
+ `},o),a}function gI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=by(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return by(n,B({file:r},e||t))}}function Ty(e){if(e)throw e}var uh,wy;function EI(){if(wy)return uh;wy=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},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return uh=function d(){var f,p,m,T,y,w,v=arguments[0],N=1,x=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},N=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});N<x;++N)if(f=arguments[N],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(C&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(v,{name:p,newValue:d(C,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},uh}var yI=EI();const lh=Qe(yI);function ch(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);l(null,...o);function l(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,l)(...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 l=e.length>u.length;let d;l&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return o(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...l){n||(n=!0,t(u,...l))}function a(u){o(null,u)}}const Dr={basename:wI,dirname:_I,extname:xI,join:SI,sep:"/"};function wI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fa(e);let n=0,r=-1,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,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function _I(e){if(Fa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xI(e){Fa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?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 SI(...e){let t=-1,n;for(;++t<e.length;)Fa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vI(n)}function vI(e){Fa(e);const t=e.codePointAt(0)===47;let n=AI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AI(e,t){let n="",r=0,o=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(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 l===46&&a>-1?a++:a=-1}return n}function Fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const CI={cwd:kI};function kI(){return"/"}function dh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function NI(e){if(typeof e=="string")e=new URL(e);else if(!dh(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 PI(e)}function PI(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 fh=["history","path","basename","stem","extname","dirname"];class _y{constructor(t){let n;t?dh(t)?n={path:t}:typeof t=="string"||OI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":CI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fh.length;){const a=fh[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)fh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){ph(t,"basename"),hh(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){xy(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(hh(t,"extname"),xy(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=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){dh(t)&&(t=NI(t)),ph(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){ph(t,"stem"),hh(t,"stem"),this.path=Dr.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 bn(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 hh(e,t){if(e&&e.includes(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function ph(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xy(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 mh 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 mh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(yh("data",this.frozen),this.namespace[t]=n,this):RI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(yh("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=Dl(t),r=this.parser||this.Parser;return gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gh("process",this.parser||this.Parser),Eh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Dl(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,w=r.stringify(y,T);MI(w)?T.value=w:T.result=w,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(),gh("processSync",this.parser||this.Parser),Eh("processSync",this.compiler||this.Compiler),this.process(t,o),vy("processSync","process",n),r;function o(a,u){n=!0,Ty(a),r=u}}run(t,n,r){Sy(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,l){const d=Dl(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),vy("runSync","run",r),o;function a(u,l){Ty(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Dl(n),o=this.compiler||this.Compiler;return Eh("stringify",o),Sy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(yh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(o.settings=lh(!0,o.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];ch(v)&&ch(y)&&(y=lh(!0,v,y)),r[T]=[f,y,...w]}}}}const LI=new mh().freeze();function gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function yh(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 Sy(e){if(!ch(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dl(e){return DI(e)?e:new _y(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",Ay=[],Cy={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 ky(e){const t=zI(e),n=jI(e);return $I(t.runSync(t.parse(n),n),e)}function zI(e){const t=e.rehypePlugins||Ay,n=e.remarkPlugins||Ay,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),Cy):Cy;return LI().use(TO).use(n).use(gI,r).use(t)}function jI(e){const t=e.children||"",n=new _y;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,l=t.unwrapDisallowed,d=t.urlTransform||Ny;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 Ll(e,f),fP(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Gf)if(Object.hasOwn(Gf,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=Gf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function Ny(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 Py=/[#.]/g;function VI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Py.lastIndex=o;const l=Py.exec(n),d=n.slice(o,l?l.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),l&&(a=l[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Oy(e,t,n){const r=n?GI(n):void 0;function o(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=VI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,qI(u))l.unshift(u);else for(const[m,T]of Object.entries(u))YI(e,d.properties,m,T)}for(const f of l)bh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function qI(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 YI(e,t,n,r){const o=_l(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=bE(r):o.commaSeparated?a=sE(r):o.commaOrSpaceSeparated?a=bE(sE(r).join(" ")):a=Iy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?WI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Iy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function bh(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)bh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?bh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Iy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Aa(n)===Aa(t)))return!0}return n}function WI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function GI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const XI=["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"],KI=Oy(Ca,"div"),QI=Oy(Si,"g",XI);function JI(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 l=n[u];if(l===void 0){const d=Ry(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function 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 l=n[n.length-1],d=Ry(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Ry(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 Eo={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/"},Ly={}.hasOwnProperty,ZI=Object.prototype;function eR(e,t){const n=t||{};return Th({file:n.file||void 0,location:!1,schema:n.space==="svg"?Si:Ca,verbose:n.verbose||!1},e)}function Th(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(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:Dy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=JI(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=tR(e,t),n}}function Dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Th(e,t[n]);r.push(o)}return r}function tR(e,t){const n=e.schema;e.schema=t.namespaceURI===Eo.svg?Si:Ca;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Ly.call(ZI,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?QI:KI)(t.tagName,o,Dy(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=Th(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nR(e,t,n){const r=as(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)Ly.call(n.attrs,u)&&(a[_l(e.schema,u).property]=as(n.attrs[u]));n.startTag;const l=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=My({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=My({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function My(e){return e.line&&e.column?e:void 0}const Fy={}.hasOwnProperty;function By(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Fy.call(o,e)){const d=String(o[e]);u=Fy.call(l,d)?l[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 rR={},iR={}.hasOwnProperty,Uy=By("type",{handlers:{root:sR,element:dR,text:lR,comment:cR,doctype:uR}});function oR(e,t){const r=(t||rR).space;return Uy(e,r==="svg"?Si:Ca)}function sR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function aR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function uR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return us(e,t),t}function lR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return us(e,t),t}function cR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return us(e,t),t}function dR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Si);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&iR.call(e.properties,a)){const d=fR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Eo[u],childNodes:[],parentNode:null};return l.childNodes=wh(e.children,l,r),us(e,l),e.tagName==="template"&&e.content&&(l.content=aR(e.content,r)),l}function fR(e,t,n){const r=_l(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?aE(n):TE(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=Eo[r.space]}return o}function wh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Uy(e[r],n);a.parentNode=t,o.push(a)}return o}function us(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 hR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pR=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]),At="�";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 Un={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hy(e){return e>=55296&&e<=57343}function mR(e){return e>=56320&&e<=57343}function gR(e,t){return(e-55296)*1024+9216+t}function zy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function jy(e){return e>=64976&&e<=65007||pR.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const ER=65536;class yR{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=ER,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,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(mR(n))return this.pos++,this._addGap(),gR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,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,Hy(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){zy(t)?this._err(te.controlCharacterInInputStream):jy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var 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 $y(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 bR=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))),TR=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 wR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=TR.get(e))!==null&&t!==void 0?t:e}var en;(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"})(en||(en={}));const _R=32;var Ci;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ci||(Ci={}));function _h(e){return e>=en.ZERO&&e<=en.NINE}function xR(e){return e>=en.UPPER_A&&e<=en.UPPER_F||e>=en.LOWER_A&&e<=en.LOWER_F}function SR(e){return e>=en.UPPER_A&&e<=en.UPPER_Z||e>=en.LOWER_A&&e<=en.LOWER_Z||_h(e)}function vR(e){return e===en.EQUALS||SR(e)}var tn;(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"})(tn||(tn={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class AR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tn.EntityStart:return t.charCodeAt(n)===en.NUM?(this.state=tn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tn.NamedEntity,this.stateNamedEntity(t,n));case tn.NumericStart:return this.stateNumericStart(t,n);case tn.NumericDecimal:return this.stateNumericDecimal(t,n);case tn.NumericHex:return this.stateNumericHex(t,n);case tn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_R)===en.LOWER_X?(this.state=tn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tn.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(_h(o)||xR(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(_h(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===en.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(wR(this.result),this.consumed),this.errors&&(t!==en.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&Ci.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=CR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||vR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ci.VALUE_LENGTH)>>14,a!==0){if(u===en.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]&Ci.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]&~Ci.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tn.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tn.NumericDecimal:return this.emitNumericEntity(0,2);case tn.NumericHex:return this.emitNumericEntity(0,3);case tn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tn.EntityStart:return 0}}}function CR(e,t,n,r){const o=(t&Ci.BRANCH_LENGTH)>>7,a=t&Ci.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,l=u+o-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var yo;(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"})(yo||(yo={}));var ar;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ar||(ar={}));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 kR=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 ls(e){var t;return(t=kR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,NR={[le.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[le.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[le.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},xh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(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"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function PR(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ba(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function OR(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return OR(e)||Ba(e)}function Vy(e){return ki(e)||PR(e)}function Fl(e){return e+32}function qy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Yy(e){return qy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function IR(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Hy(e)?te.surrogateCharacterReference:jy(e)?te.noncharacterCharacterReference:zy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class RR{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=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AR(bR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=IR(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($y(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(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ls(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case 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=qy(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=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.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=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ba(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ki(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.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=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ki(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ki(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.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=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.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=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=At;break}default:this.currentAttr.name+=String.fromCodePoint(Ba(t)?Fl(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=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.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=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.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=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Un.DASH_DASH,!0)?(this._createCommentToken(Un.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Un.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Un.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Un.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Un.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ba(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.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(te.unexpectedNullCharacter),this._createDoctypeToken(At),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.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=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=At;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ba(t)?Fl(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=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Un.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Un.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.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=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.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=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.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=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.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()&&Vy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Vy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Wy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Gy=new Set([...Wy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),LR=new Set([...Bl,g.OL,g.UL]),DR=new Set([...Bl,g.BUTTON]),Xy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ky=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),MR=new Set([g.TR,g.TEMPLATE,g.HTML]),FR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),BR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),UR=new Set([g.TD,g.TH]);class HR{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)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(UR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(BR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FR,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(MR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===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 le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(Ky.has(o))return!1;break}case le.MATHML:{if(Xy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,LR)}hasInButtonScope(t){return this.hasInDynamicScope(t,DR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(xh.has(n))return!0;if(Bl.has(n))return!1;break}case le.SVG:{if(Ky.has(n))return!1;break}case le.MATHML:{if(Xy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case 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])===le.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])===le.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&&Wy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Gy.has(this.currentTagId);)this.pop()}}const Sh=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const Qy={type:Mr.Marker};class zR{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 l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Mr.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:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Sh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Qy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mr.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(Qy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const Ni={createDocument(){return{nodeName:"#document",mode:ar.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};Ni.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(Ni.isTextNode(n)){n.value+=t;return}}Ni.appendChild(e,Ni.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ni.isTextNode(r)?r.value+=t:Ni.insertBefore(e,Ni.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},Jy="html",jR="about:legacy-compat",$R="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zy=["+//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//"],VR=[...Zy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],qR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),eb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YR=[...eb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function tb(e,t){return t.some(n=>e.startsWith(n))}function WR(e){return e.name===Jy&&e.publicId===null&&(e.systemId===null||e.systemId===jR)}function GR(e){if(e.name!==Jy)return ar.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$R)return ar.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),qR.has(n))return ar.QUIRKS;let r=t===null?VR:Zy;if(tb(n,r))return ar.QUIRKS;if(r=t===null?eb:YR,tb(n,r))return ar.LIMITED_QUIRKS}return ar.NO_QUIRKS}const nb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},XR="definitionurl",KR="definitionURL",QR=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])),JR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),ZR=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])),e6=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 t6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===yo.COLOR||r===yo.SIZE||r===yo.FACE)||e6.has(t)}function rb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===XR){e.attrs[t].name=KR;break}}function ib(e){for(let t=0;t<e.attrs.length;t++){const n=QR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vh(e){for(let t=0;t<e.attrs.length;t++){const n=JR.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 n6(e){const t=ZR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ls(e.tagName))}function r6(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function i6(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===yo.ENCODING){const o=n[r].value.toLowerCase();return o===nb.TEXT_HTML||o===nb.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function o6(e,t,n,r){return(!r||r===le.HTML)&&i6(e,t,n)||(!r||r===le.MATHML)&&r6(e,t)}const s6="hidden",a6=8,u6=3;var M;(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"})(M||(M={}));const l6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ob=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),sb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ni,onParseError:null};class ab{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},sb),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 RR(this.options,this),this.activeFormattingElements=new zR(this.treeAdapter),this.fragmentContextID=r?ls(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new HR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},sb),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.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:l6,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Ft.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)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.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(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&me(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.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:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.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 o6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Mr.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=M.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=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.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?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.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=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ob.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)===le.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 NR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){U4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{lb(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{Eb(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){B4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ch(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{Ch(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.AFTER_BODY:{g6(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{E6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{y6(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?H4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{b6(this,t);break}case M.BEFORE_HEAD:{w6(this,t);break}case M.IN_HEAD:{br(this,t);break}case M.IN_HEAD_NO_SCRIPT:{S6(this,t);break}case M.AFTER_HEAD:{A6(this,t);break}case M.IN_BODY:{wn(this,t);break}case M.IN_TABLE:{cs(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{_4(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{v4(this,t);break}case M.IN_SELECT:{Tb(this,t);break}case M.IN_SELECT_IN_TABLE:{C4(this,t);break}case M.IN_TEMPLATE:{N4(this,t);break}case M.AFTER_BODY:{O4(this,t);break}case M.IN_FRAMESET:{I4(this,t);break}case M.AFTER_FRAMESET:{L4(this,t);break}case M.AFTER_AFTER_BODY:{M4(this,t);break}case M.AFTER_AFTER_FRAMESET:{F4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?z4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{T6(this,t);break}case M.BEFORE_HEAD:{_6(this,t);break}case M.IN_HEAD:{x6(this,t);break}case M.IN_HEAD_NO_SCRIPT:{v6(this,t);break}case M.AFTER_HEAD:{C6(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{f4(this,t);break}case M.IN_TABLE:{qa(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{x4(this,t);break}case M.IN_COLUMN_GROUP:{S4(this,t);break}case M.IN_TABLE_BODY:{Oh(this,t);break}case M.IN_ROW:{bb(this,t);break}case M.IN_CELL:{A4(this,t);break}case M.IN_SELECT:{wb(this,t);break}case M.IN_SELECT_IN_TABLE:{k4(this,t);break}case M.IN_TEMPLATE:{P4(this,t);break}case M.AFTER_BODY:{xb(this,t);break}case M.IN_FRAMESET:{R4(this,t);break}case M.AFTER_FRAMESET:{D4(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{mb(this,t);break}case M.TEXT:{h4(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_TEMPLATE:{_b(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{kh(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 M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ub(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{gb(this,t);break}}}}function c6(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):pb(e,t),n}function d6(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 f6(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 l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=u6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=h6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function h6(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 p6(e,t,n){const r=e.treeAdapter.getTagName(t),o=ls(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function m6(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 Ah(e,t){for(let n=0;n<a6;n++){const r=c6(e,t);if(!r)break;const o=d6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=f6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&p6(e,u,a),m6(e,o,r)}}function Ch(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function g6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function E6(e,t){e._appendCommentNode(t,e.document)}function kh(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 y6(e,t){e._setDocumentType(t);const n=t.forceQuirks?ar.QUIRKS:GR(t);WR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ua(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ar.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function b6(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ha(e,t)}function T6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ha(e,t)}function Ha(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function w6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:za(e,t)}}function _6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?za(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function za(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function br(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ja(e,t)}}function x6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ja(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function bo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function ja(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function S6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{br(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:$a(e,t)}}function v6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{$a(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function A6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),br(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Va(e,t)}}function C6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Va(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Va(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Ke.CHARACTER:{lb(e,t);break}case Ke.WHITESPACE_CHARACTER:{ub(e,t);break}case Ke.COMMENT:{Ch(e,t);break}case Ke.START_TAG:{wn(e,t);break}case Ke.END_TAG:{Hl(e,t);break}case Ke.EOF:{mb(e,t);break}}}function ub(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function lb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function k6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function N6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function P6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function O6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function I6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function R6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function L6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function D6(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,le.HTML)}function M6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Ft.PLAINTEXT}function F6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function B6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function U6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function z6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function j6(e,t){e.treeAdapter.getDocumentMode(e.document)!==ar.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function cb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function db(e){const t=$y(e,yo.TYPE);return t!=null&&t.toLowerCase()===s6}function $6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),db(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function V6(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function q6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y6(e,t){t.tagName=X.IMG,t.tagID=g.IMG,cb(e,t)}function W6(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function G6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function X6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function fb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function K6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function Q6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function J6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function Z6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function e4(e,t){e._reconstructActiveFormattingElements(),rb(t),vh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function t4(e,t){e._reconstructActiveFormattingElements(),ib(t),vh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function hb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function wn(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:{U6(e,t);break}case g.A:{B6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{I6(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:{O6(e,t);break}case g.LI:case g.DD:case g.DT:{D6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{cb(e,t);break}case g.HR:{q6(e,t);break}case g.RB:case g.RTC:{J6(e,t);break}case g.RT:case g.RP:{Z6(e,t);break}case g.PRE:case g.LISTING:{R6(e,t);break}case g.XMP:{G6(e,t);break}case g.SVG:{t4(e,t);break}case g.HTML:{k6(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:{br(e,t);break}case g.BODY:{N6(e,t);break}case g.FORM:{L6(e,t);break}case g.NOBR:{H6(e,t);break}case g.MATH:{e4(e,t);break}case g.TABLE:{j6(e,t);break}case g.INPUT:{$6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{V6(e,t);break}case g.IMAGE:{Y6(e,t);break}case g.BUTTON:{F6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{z6(e,t);break}case g.IFRAME:{X6(e,t);break}case g.SELECT:{K6(e,t);break}case g.OPTION:case g.OPTGROUP:{Q6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{fb(e,t);break}case g.FRAMESET:{P6(e,t);break}case g.TEXTAREA:{W6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?fb(e,t):hb(e,t);break}case g.PLAINTEXT:{M6(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:hb(e,t)}}function n4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function r4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,xb(e,t))}function i4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function o4(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 s4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function a4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function u4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function l4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function c4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function d4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function pb(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 Hl(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:{Ah(e,t);break}case g.P:{s4(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:{i4(e,t);break}case g.LI:{a4(e);break}case g.DD:case g.DT:{u4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{l4(e);break}case g.BR:{d4(e);break}case g.BODY:{n4(e,t);break}case g.HTML:{r4(e,t);break}case g.FORM:{o4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{c4(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:pb(e,t)}}function mb(e,t){e.tmplInsertionModeStack.length>0?_b(e,t):kh(e,t)}function f4(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 h4(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nh(e,t){if(e.openElements.currentTagId!==void 0&&ob.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Eb(e,t);break}case Ke.WHITESPACE_CHARACTER:{gb(e,t);break}}else Ya(e,t)}function p4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function m4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function g4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function E4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function y4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function b4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function T4(e,t){db(t)?e._appendElement(t,le.HTML):Ya(e,t),t.ackSelfClosing=!0}function w4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{y4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}case g.COL:{g4(e,t);break}case g.FORM:{w4(e,t);break}case g.TABLE:{b4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{E4(e,t);break}case g.INPUT:{T4(e,t);break}case g.CAPTION:{p4(e,t);break}case g.COLGROUP:{m4(e,t);break}default:Ya(e,t)}}function qa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{bo(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:Ya(e,t)}}function Ya(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function gb(e,t){e.pendingCharacterTokens.push(t)}function Eb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ya(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const yb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function _4(e,t){const n=t.tagID;yb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,cs(e,t)):wn(e,t)}function x4(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=M.IN_TABLE,n===g.TABLE&&qa(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:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{br(e,t);break}default:zl(e,t)}}function S4(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{bo(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,$l(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=M.IN_TABLE,cs(e,t));break}default:cs(e,t)}}function Oh(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=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,qa(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:qa(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.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=M.IN_TABLE_BODY,jl(e,t));break}default:cs(e,t)}}function bb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Oh(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=M.IN_TABLE_BODY,Oh(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:qa(e,t)}}function v4(e,t){const n=t.tagID;yb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):wn(e,t)}function A4(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=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),bb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function Tb(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.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:{br(e,t);break}}}function wb(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:{bo(e,t);break}}}function C4(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)):Tb(e,t)}function k4(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)):wb(e,t)}function N4(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:{br(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,cs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,wn(e,t)}}function P4(e,t){t.tagID===g.TEMPLATE&&bo(e,t)}function _b(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kh(e,t)}function O4(e,t){t.tagID===g.HTML?wn(e,t):Vl(e,t)}function xb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.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 Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function I4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{br(e,t);break}}}function R4(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function L4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function D4(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function M4(e,t){t.tagID===g.HTML?wn(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function F4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function B4(e,t){t.chars=At,e._insertCharacters(t)}function U4(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function H4(e,t){if(t6(t))Sb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?rb(t):r===le.SVG&&(n6(t),ib(t)),vh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function z4(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)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}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 j4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ab(e,t){const n=Z4(e),r=By("type",{handlers:{root:V4,element:q4,text:Y4,comment:kb,doctype:W4,raw:X4},unknown:K4}),o={parser:n?new ab(vb):ab.getFragmentParser(void 0,vb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),ds(o,Lr());const a=n?o.parser.document:o.parser.getFragment(),u=eR(a,{file:o.options.file});return o.stitches&&Ll(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Cb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function V4(e,t){Cb(e.children,t)}function q4(e,t){Q4(e,t),Cb(e.children,t),J4(e,t)}function Y4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function W4(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function G4(e,t){t.stitches=!0;const n=eL(e);if("children"in e&&"children"in n){const r=Ab({type:"root",children:e.children},t.options);n.children=r.children}kb({type:"comment",value:{stitch:n}},t)}function kb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function X4(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,Nb(t,Lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(j4,"&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 K4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))G4(n,t);else{let r="";throw $4.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 ds(e,t){Nb(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=Ft.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 Nb(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 Q4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,Lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Eo.html;o===Eo.html&&n==="svg"&&(o=Eo.svg);const a=oR(me(B({},e),{children:[]}),{space:o===Eo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ga(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function J4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hR.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,xl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ga(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function Z4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ga(e){const t=Lr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(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 eL(e){return"children"in e?go(me(B({},e),{children:[]})):go(e)}function Pb(e){return function(t,n){return Ab(t,me(B({},e),{file:n}))}}const To=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ob={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...To,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...To],h2:[["className","sr-only"]],img:[...To,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...To,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...To],table:[...To],ul:[...To,["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"]},Pi={}.hasOwnProperty;function tL(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Ob),t):Ob,stack:[]},o=Ib(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ib(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nL(e,n);case"doctype":return rL(e,n);case"element":return iL(e,n);case"root":return oL(e,n);case"text":return sL(e,n)}}}function nL(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 Xa(a,t),a}}function rL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Xa(n,t),n}}function iL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Rb(e,t.children),o=aL(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&&Pi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Xa(u,t),u}function oL(e,t){const r={type:"root",children:Rb(e,t.children)};return Xa(r,t),r}function sL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Xa(r,t),r}function Rb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ib(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function aL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Pi.call(r,n)?r[n]:void 0,u=r&&Pi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Pi.call(l,f)){const p=l[f];let m=Lb(e,Mb(a,f),f,p);m==null&&(m=Lb(e,Mb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Pi.call(o,n)){const p=o[n];for(f in p)Pi.call(p,f)&&!Pi.call(d,f)&&(d[f]=p[f])}return d}function Lb(e,t,n,r){return t?Array.isArray(r)?uL(e,t,n,r):Db(e,t,n,r):void 0}function uL(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Db(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Db(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&lL(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 lL(e,t,n){const r=e.schema.protocols&&Pi.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("?"),l=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Xa(e,t){const n=AE(t);t.data&&(e.data=go(t.data)),n&&(e.position=n)}function Mb(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 cL(e){return function(t){return tL(t,e)}}const Fb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:o,children:a})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return _.jsx("a",me(B(B({className:W(e,`${z}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},dL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:_.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?_.jsx(ky,{rehypePlugins:[Pb,cL],components:{ul:({children:r})=>_.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Fb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Wn(),{setImageFile:u}=ts(),{logger:l,globalClassName:d,searchConfig:f,features:p}=tt(),m=D.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!o||!1,w=y?"connected":"disconnected",v=t||!y,N=()=>a?new Promise((R,$)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>R(ne.result),ne.onerror=de=>$(de)}):Promise.resolve(""),x=()=>{u(null)},C=D.useCallback(R=>{const $=R==null?void 0:R[0];if($&&!v){if($.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u($)}},[v,u]),A=R=>{t&&R.preventDefault()},U=R=>{if(!t||R.key==="Tab")return;(R.key==="Enter"||R.key==="Backspace"||R.key==="Delete"||R.key.length===1&&!R.metaKey&&!R.ctrlKey)&&R.preventDefault()},Y=R=>et(null,null,function*(){var de;if(R.preventDefault(),v)return;const $=(((de=m.current)==null?void 0:de.value)||"").trim();let ne="";try{ne=yield N()}catch(V){l==null||l.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}$&&(x(),m.current.value="",r($,ne))});return _.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&_.jsx(NN,{file:a,componentType:n,globalClassName:d,onRemove:x}),_.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[_.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,w),children:_.jsx("span",{className:`${z}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&_.jsx(FN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:v,globalClassName:d,className:e,onFiles:C}),_.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question","aria-disabled":t||void 0,name:`${z}-user-input`,onBeforeInput:A,onPaste:A,onKeyDown:U}),_.jsx(jN,{isLoading:v}),_.jsx(UN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),_.jsx(dL,{})]})};function fL(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function hL(e){return ht({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 Bb=D.createContext({isOpen:!1,panelId:"",triggerId:""}),Rh=D.createContext(null),Ub=D.createContext(null),wo=()=>{var n,r;const e=D.useContext(Rh),t=D.useContext(Ub);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Hb=({onClearChat:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(hL,{"aria-hidden":"true"}),"Clear chat"]})};function pL(e){return e==null?[]:Array.isArray(e)?e:[e]}var mL=(e,...t)=>e.concat(t),gL=(e,...t)=>e.filter(n=>!t.includes(n)),EL=e=>Array.from(new Set(e));function zb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function yL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return zb(e,t,{step:-r,loop:o})}var bL=e=>Array.isArray(e),jb=e=>e!=null&&typeof e=="object",TL=e=>jb(e)&&!bL(e),Yl=e=>typeof e=="string",fs=e=>typeof e=="function",wL=e=>e==null,_L=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xL=e=>Object.prototype.toString.call(e),$b=Function.prototype.toString,SL=$b.call(Object),vL=e=>{if(!jb(e)||xL(e)!="[object Object]"||kL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_L(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$b.call(n)==SL},AL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,CL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,kL=e=>AL(e)||CL(e),NL=e=>e(),PL=()=>{},Lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function OL(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:IL,max:RL}=Math,LL=e=>Number.isNaN(e),DL=e=>LL(e)?0:e,Vb=(e,t,n)=>IL(RL(DL(e),t),n);function Dh(e){if(!vL(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]=Dh(o))}return n}function Mh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ML(e,t){if(e==null)throw new Error(t())}function FL(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 BL=Object.defineProperty,UL=(e,t,n)=>t in e?BL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fh=(e,t,n)=>UL(e,typeof t!="symbol"?t+"":t,n),qb=()=>{},Wl=e=>typeof e=="object"&&e!==null,hs=e=>e?"":void 0,Yb=e=>e?"true":void 0,HL=1,zL=9,jL=11,nn=e=>Wl(e)&&e.nodeType===HL&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===zL,$L=e=>Wl(e)&&e===e.window,Wb=e=>nn(e)?e.localName||"":"#document";function VL(e){return["html","body","#document"].includes(Wb(e))}var qL=e=>Wl(e)&&e.nodeType!==void 0,_o=e=>qL(e)&&e.nodeType===jL&&"host"in e,YL=e=>nn(e)&&e.localName==="input",WL=e=>nn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ka(e){if(!e)return!1;const t=e.getRootNode();return gs(t)===e}var GL=/(textarea|select)/;function XL(e){if(e==null||!nn(e))return!1;try{return YL(e)&&e.selectionStart!=null||GL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ps(e,t){var r;if(!e||!t||!nn(e)||!nn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&_o(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fr(e){var t;return Gl(e)?e:$L(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function KL(e){return Fr(e).documentElement}function ms(e){var t,n,r;return _o(e)?ms(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:nn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function gs(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 QL(e){if(Wb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_o(e)&&e.host||KL(e);return _o(t)?t.host:t}function Bh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||_o(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Uh=new WeakMap;function Es(e){return Uh.has(e)||Uh.set(e,ms(e).getComputedStyle(e)),Uh.get(e)}var Hh=new Set(["menu","listbox","dialog","grid","tree","region"]),JL=e=>Hh.has(e),Gb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Xb(e,t){const n=new Set,r=Bh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&JL(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Kb(e,t){const n=Bh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Hh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function ZL(e){const t=new Set;return Kb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function e5(e){const t=e.getAttribute("role");return!!(t&&Hh.has(t))}function t5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function n5(e){var t;return t5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function r5(e){if(!e.id)return!1;const t=Bh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&e5(e))}var zh=()=>typeof document!="undefined";function i5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var jh=e=>zh()&&e.test(i5()),o5=e=>zh()&&e.test(navigator.vendor),Qb=()=>zh()&&!!navigator.maxTouchPoints,s5=()=>jh(/^iPhone/i),a5=()=>jh(/^iPad/i)||$h()&&navigator.maxTouchPoints>1,Xl=()=>s5()||a5(),u5=()=>$h()||Xl(),$h=()=>jh(/^Mac/i),l5=()=>u5()&&o5(/apple/i);function c5(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 Tr(e){var n;const t=c5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Jb=e=>e.button===0,d5=e=>e.button===2||$h()&&e.ctrlKey&&e.button===0,f5=e=>"touches"in e&&e.touches.length>0,h5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Zb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function p5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=h5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Zb&&(o=Zb[o]),o}function eT(e,t="client"){const n=f5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var rn=(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)}},tT=e=>nn(e)&&e.tagName==="IFRAME",m5=/^(audio|video|details)$/;function nT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var g5=e=>!Number.isNaN(nT(e)),E5=e=>nT(e)<0;function y5(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 rT(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<o.length;){const d=o[l++];if(!d||a.has(d))continue;a.add(d);const f=y5(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});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,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var Kl="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",iT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&nn(e)&&Br(e)&&o.unshift(e);const u=[];for(const l of o)if(Br(l)){if(tT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...iT(d,{getShadowRoot:r}));continue}u.push(l)}return r?rT(u,r,Br):u};function Br(e){return!nn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&WL(e)}function ys(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&xo(e)&&o.unshift(e);const a=[];for(const u of o)if(xo(u)){if(tT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...ys(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=rT(a,r,xo);return!u.length&&n?o:u}return!a.length&&n?o:a}function xo(e){return nn(e)&&e.tabIndex>0?!0:Br(e)&&!E5(e)}function b5(e,t={}){const n=ys(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function T5(e,t={}){const{current:n,getShadowRoot:r}=t,o=ys(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:gs(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function Qa(e){return e.tabIndex<0&&(m5.test(e.localName)||XL(e))&&!g5(e)?0:e.tabIndex}function oT(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=ys(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var w5=class hS{constructor(){Fh(this,"id",null),Fh(this,"fn_cleanup"),Fh(this,"cleanup",()=>{this.cancel()})}static create(){return new hS}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 Wt(e){const t=w5.create();return t.request(e),t.cleanup}function sT(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 Vh(e){const t=QL(e);return VL(t)?Fr(t).body:nn(t)&&S5(t)?t:Vh(t)}var _5=/auto|scroll|overlay|hidden|clip/,x5=new Set(["inline","contents"]);function S5(e){const t=ms(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return _5.test(n+o+r)&&!x5.has(a)}var bs="default",qh="",Ql=new WeakMap;function v5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(bs==="default"&&(qh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),bs="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>A5({target:t,doc:r})}function A5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(bs!=="disabled")return;bs="restoring",setTimeout(()=>{sT(()=>{bs==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=qh||""),qh="",bs="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function C5(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Wt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(v5(me(B({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function k5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=eT(l),f=Math.sqrt($u(d.x,2)+$u(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=eT(l);r({point:d,event:l})},u=[rn(e,"pointermove",o,!1),rn(e,"pointerup",a,!1),rn(e,"pointercancel",a,!1),rn(e,"contextmenu",a,!1),C5({doc:e})];return()=>{u.forEach(l=>l())}}function N5(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=b5(e,{includeContainer:!0,getShadowRoot:a}),y=T5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&Ka(y)?(o==null||o(),p=T):f.shiftKey&&(Ka(m)||w)?p=n:!f.shiftKey&&Ka(n)?(o==null||o(),p=m):!f.shiftKey&&(Ka(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return rn(u,"keydown",d,!0)}function P5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=mn(l,["defer","triggerElement"]),a=n?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(N5(d,B({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function O5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return qb;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 I5(e,t,n){if(!e)return qb;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 R5(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function L5(e,t){const{timeout:n,rootNode:r}=t,o=ms(r),a=Fr(r),u=new o.AbortController;return R5(new Promise(l=>{const d=e();if(d){l(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var D5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),M5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,aT=e=>{const t={};let n;for(;n=M5.exec(e);)t[n[1]]=n[2];return t},F5=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=aT(e)}else Yl(t)&&(t=aT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function on(...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]=Lh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=D5(t[o],n[o]);continue}if(o==="style"){t[o]=F5(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 NH(e){return e}var Ts=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ts||{}),Yh="__init__";function B5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>gs(t()),a=u=>t().getElementById(u);return me(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ka,getById:a})}function U5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),uT=typeof globalThis.document!="undefined"?D.useLayoutEffect:D.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=D.useState(t),[o,a]=D.useState(r),u=e().value!==void 0,l=D.useRef(o);l.current=u?e().value:o;const d=D.useRef(l.current);uT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var N,x;const w=d.current,v=fs(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(x=(N=e()).onChange)==null||x.call(N,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?co.flushSync:NL)(()=>f(y))},invoke(y,w){var v,N;(N=(v=e()).onChange)==null||N.call(v,y,w)},hash(y){var w,v,N;return(N=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?N:String(y)}}}Zl.cleanup=e=>{D.useEffect(()=>e,[])},Zl.ref=e=>{const t=D.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function H5(e){const t=D.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var z5=(e,t)=>{const n=D.useRef(!1),r=D.useRef(!1);D.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),D.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var ie,fe,we,re,oe,Ae;const n=D.useMemo(()=>{const{id:se,ids:J,getRootNode:ae}=t;return B5({id:se,ids:J,getRootNode:ae})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(fe=(ie=e.props)==null?void 0:ie.call(e,{props:Dh(t),scope:n}))!=null?fe:t,a=j5(o),u=(we=e.context)==null?void 0:we.call(e,{prop:a,bindable:Zl,scope:n,flush:cT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=lT(u),d={get(se){var J;return(J=l.current)==null?void 0:J[se].ref.current},set(se,J){var ae;(ae=l.current)==null||ae[se].set(J)},initial(se){var J;return(J=l.current)==null?void 0:J[se].initial},hash(se){var ae,k;const J=(ae=l.current)==null?void 0:ae[se].get();return(k=l.current)==null?void 0:k[se].hash(J)}},f=D.useRef(new Map),p=D.useRef(null),m=D.useRef(null),T=D.useRef({type:""}),y=()=>me(B({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>me(B({},R),{matches(...se){return se.includes(R.ref.current)},hasTag(se){var J,ae;return!!((ae=(J=e.states[R.ref.current])==null?void 0:J.tags)!=null&&ae.includes(se))}}),v=H5((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),N=()=>({state:w(),context:d,event:y(),prop:a,send:V,action:x,guard:C,track:z5,refs:v,computed:Y,flush:cT,scope:n,choose:U}),x=se=>{const J=fs(se)?se(N()):se;if(!J)return;const ae=J.map(k=>{var K,I;const F=(I=(K=e.implementations)==null?void 0:K.actions)==null?void 0:I[k];return F||Mh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),F});for(const k of ae)k==null||k(N())},C=se=>{var J,ae;return fs(se)?se(N()):(ae=(J=e.implementations)==null?void 0:J.guards)==null?void 0:ae[se](N())},A=se=>{const J=fs(se)?se(N()):se;if(!J)return;const ae=J.map(F=>{var I,Se;const K=(Se=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Se[F];return K||Mh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),K}),k=[];for(const F of ae){const K=F==null?void 0:F(N());K&&k.push(K)}return()=>k.forEach(F=>F==null?void 0:F())},U=se=>pL(se).find(J=>{let ae=!J.guard;return Yl(J.guard)?ae=!!C(J.guard):fs(J.guard)&&(ae=J.guard(N())),ae}),Y=se=>{ML(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[se];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,J){var k,F,K,I;if(J){const Se=f.current.get(J);Se==null||Se(),f.current.delete(J)}J&&x((k=e.states[J])==null?void 0:k.exit),x((F=p.current)==null?void 0:F.actions);const ae=A((K=e.states[se])==null?void 0:K.effects);if(ae&&f.current.set(se,ae),J===Yh){x(e.entry);const Se=A(e.effects);Se&&f.current.set(Yh,Se)}x((I=e.states[se])==null?void 0:I.entry)}})),$=D.useRef(void 0),ne=D.useRef(Ts.NotStarted);uT(()=>{queueMicrotask(()=>{var F;const ae=ne.current===Ts.Started;ne.current=Ts.Started,r(ae?"rehydrating...":"initializing...");const k=(F=$.current)!=null?F:R.initial;R.invoke(k,ae?R.get():Yh)});const se=f.current,J=R.ref.current;return()=>{r("unmounting..."),$.current=J,ne.current=Ts.Stopped,se.forEach(ae=>ae==null?void 0:ae()),f.current=new Map,p.current=null,queueMicrotask(()=>{x(e.exit)})}},[]);const de=()=>"ref"in R?R.ref.current:R.get(),V=se=>{queueMicrotask(()=>{var I,Se,Me,ke,be;if(ne.current!==Ts.Started)return;m.current=T.current,T.current=se;let J=de();const ae=(Me=(I=e.states[J].on)==null?void 0:I[se.type])!=null?Me:(Se=e.on)==null?void 0:Se[se.type],k=U(ae);if(!k)return;p.current=k;const F=(ke=k.target)!=null?ke:J;r("transition",se.type,k.target||J,`(${k.actions})`);const K=F!==J;K?co.flushSync(()=>R.set(F)):k.reenter&&!K?R.invoke(J,J):x((be=k.actions)!=null?be:[])})};return(Ae=e.watch)==null||Ae.call(e,N()),{state:w(),send:V,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ne.current}}function lT(e){const t=D.useRef(e);return t.current=e,t}function j5(e){const t=lT(e);return function(r){return t.current[r]}}function cT(e){queueMicrotask(()=>{co.flushSync(()=>e())})}var Wh=U5(e=>e);function tc(...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 $5(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 Gh=e=>{const t=D.memo(D.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return D.createElement(e,me(B({},u),{ref:r}),a);if(!D.isValidElement(a))return null;const l=D.Children.only(a),d=$5(l);return D.cloneElement(l,me(B({},on(u,l.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Pn=(()=>{const e=new Map;return new Proxy(Gh,{apply(t,n,r){return Gh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Gh(r)),e.get(r)}})})();function V5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function So(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=D.createContext(u);l.displayName=t;function d(){var p;const f=D.useContext(l);if(!f&&n){const m=new Error(a!=null?a:V5(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[q5,Xh]=So({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[dT,Ja]=So({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),fT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});fT.displayName="PopoverContent";const hT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:t}))});hT.displayName="PopoverPositioner";const Za=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),pT=e=>Za()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Y5(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 W5={props({props:e}){return me(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Es(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"});Wt(()=>{var l,d;const u=nc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Wt(()=>{e.set("prevAnimationName",nc(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",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Tr(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 l=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),sT(()=>l())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function G5(e,t={}){const{sync:n=!1}=t,r=X5(e);return D.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 X5(e){const t=D.useRef(e);return t.current=e,t}const Kh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=D.useRef(!1),l=me(B({},a),{present:r,onExitComplete:G5(e.onExitComplete)}),d=ec(W5,l),f=Y5(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 vo=(e,t=[])=>({parts:(...n)=>{if(K5(t))return vo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>vo(e,[...t,...n]),omit:(...n)=>vo(e,t.filter(r=>!n.includes(r))),rename:n=>vo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_s(e)}"][data-part="${_s(r)}"]`,`& [data-scope="${_s(e)}"][data-part="${_s(r)}"]`].join(", "),attrs:{"data-scope":_s(e),"data-part":_s(r)}}}),{})}),_s=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),K5=e=>e.length===0;const Q5=["top","right","bottom","left"],Oi=Math.min,ai=Math.max,rc=Math.round,ic=Math.floor,Ur=e=>({x:e,y:e}),J5={left:"right",right:"left",bottom:"top",top:"bottom"};function mT(e,t,n){return ai(e,Oi(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function Ii(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zh(e){return Qh(Hr(e))}function Z5(e,t,n){n===void 0&&(n=!1);const r=xs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function eD(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gT=["left","right"],ET=["right","left"],tD=["top","bottom"],nD=["bottom","top"];function rD(e,t,n){switch(e){case"top":case"bottom":return n?t?ET:gT:t?gT:ET;case"left":case"right":return t?tD:nD;default:return[]}}function iD(e,t,n,r){const o=xs(e);let a=rD(Ii(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){const t=Ii(e);return J5[t]+e.slice(t.length)}function oD(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function yT(e){return typeof e!="number"?oD(e):{top:e,right:e,bottom:e,left:e}}function sc(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 bT(e,t,n){let{reference:r,floating:o}=e;const a=Hr(t),u=Zh(t),l=Jh(u),d=Ii(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[l]/2-o[l]/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}}const w=xs(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function sD(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ui(t,e),w=yT(y),N=l[T?m==="floating"?"reference":"floating":m],x=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(N))==null||n?N:N.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(A))&&(yield a.getScale==null?void 0:a.getScale(A))||{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:A,strategy:d}):C);return{top:(x.top-Y.top+w.top)/U.y,bottom:(Y.bottom-x.bottom+w.bottom)/U.y,left:(x.left-Y.left+w.left)/U.x,right:(Y.right-x.right+w.right)/U.x}})}const aD=50,uD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:me(B({},u),{detectOverflow:sD}),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}=bT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const N=a[v];if(!N)continue;const{name:x,fn:C}=N,{x:A,y:U,data:Y,reset:R}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});p=A!=null?A:p,m=U!=null?U:m,w[x]=B(B({},w[x]),Y),R&&y<aD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:m}=bT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),lD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ui(e,n)||{};if(p==null)return{};const T=yT(m),y={x:r,y:o},w=Zh(a),v=Jh(w),N=yield l.getDimensions(p),x=w==="y",C=x?"top":"left",A=x?"bottom":"right",U=x?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[w]-y[w]-u.floating[v],R=y[w]-u.reference[w],$=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=$?$[U]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement($)))&&(ne=d.floating[U]||u.floating[v]);const de=Y/2-R/2,V=ne/2-N[v]/2-1,ie=Oi(T[C],V),fe=Oi(T[A],V),we=ne-N[v]-fe,re=ne/2-N[v]/2+de,oe=mT(ie,re,we),Ae=!f.arrow&&xs(a)!=null&&re!==oe&&u.reference[v]/2-(re<ie?ie:fe)-N[v]/2<0,se=Ae?re<ie?re-ie:re-we:0;return{[w]:y[w]+se,data:B({[w]:oe,centerOffset:re-oe-se},Ae&&{alignmentOffset:se}),reset:Ae}})}}),cD=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:l,initialPlacement:d,platform:f,elements:p}=n,oe=ui(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:N=!0}=oe,x=mn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Ii(a),A=Hr(d),U=Ii(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!N?[oc(d)]:eD(d)),$=v!=="none";!y&&$&&R.push(...iD(d,N,v,Y));const ne=[d,...R],de=yield f.detectOverflow(n,x),V=[];let ie=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(de[C]),T){const Ae=Z5(a,l,Y);V.push(de[Ae[0]],de[Ae[1]])}if(ie=[...ie,{placement:a,overflows:V}],!V.every(Ae=>Ae<=0)){var fe,we;const Ae=(((fe=u.flip)==null?void 0:fe.index)||0)+1,se=ne[Ae];if(se&&(!(T==="alignment"?A!==Hr(se):!1)||ie.every(k=>Hr(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:Ae,overflows:ie},reset:{placement:se}};let J=(we=ie.filter(ae=>ae.overflows[0]<=0).sort((ae,k)=>ae.overflows[1]-k.overflows[1])[0])==null?void 0:we.placement;if(!J)switch(w){case"bestFit":{var re;const ae=(re=ie.filter(k=>{if($){const F=Hr(k.placement);return F===A||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,K)=>F+K,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:re[0];ae&&(J=ae);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}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 wT(e){return Q5.some(t=>e[t]>=0)}const dD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:o}=n,l=ui(e,n),{strategy:a="referenceHidden"}=l,u=mn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,me(B({},u),{elementContext:"reference"})),f=TT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:wT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,me(B({},u),{altBoundary:!0})),f=TT(d,r.floating);return{data:{escapedOffsets:f,escaped:wT(f)}}}default:return{}}})}}},_T=new Set(["left","top"]);function fD(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=Ii(n),l=xs(n),d=Hr(n)==="y",f=_T.has(u)?-1:1,p=a&&d?-1:1,m=ui(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof w=="number"&&(y=l==="end"?w*-1:w),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const hD=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:l,middlewareData:d}=n,f=yield fD(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:me(B({},f),{placement:l})}})}}},pD=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,platform:u}=n,A=ui(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:Y,y:R}=U;return{x:Y,y:R}}}}=A,p=mn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=Hr(a),w=Qh(y);let v=m[w],N=m[y];const x=(U,Y)=>mT(Y+T[U==="y"?"top":"left"],Y,Y-T[U==="y"?"bottom":"right"]);l&&(v=x(w,v)),d&&(N=x(y,N));const C=f.fn(me(B({},n),{[w]:v,[y]:N}));return me(B({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[w]:l,[y]:d}}})})}}},mD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=ui(e,t),T={x:o,y:a},y=Hr(u),w=Qh(y);let v=T[w],N=T[y];const x=ui(f,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const Y=w==="y"?"height":"width",R=l.reference[w]-l.floating[Y]+C.mainAxis,$=l.reference[w]+l.reference[Y]-C.mainAxis;v<R?v=R:v>$&&(v=$)}if(m){var A,U;const Y=w==="y"?"width":"height",R=_T.has(Ii(u)),$=l.reference[y]-l.floating[Y]+(R&&((A=d.offset)==null?void 0:A[y])||0)+(R?0:C.crossAxis),ne=l.reference[y]+l.reference[Y]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?C.crossAxis:0);N<$?N=$:N>ne&&(N=ne)}return{[w]:v,[y]:N}}}},gD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,V=ui(e,n),{apply:l=()=>{}}=V,d=mn(V,["apply"]),f=yield a.detectOverflow(n,d),p=Ii(r),m=xs(r),T=Hr(r)==="y",{width:y,height:w}=o.floating;let v,N;p==="top"||p==="bottom"?(v=p,N=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,v=m==="end"?"top":"bottom");const x=w-f.top-f.bottom,C=y-f.left-f.right,A=Oi(w-f[v],x),U=Oi(y-f[N],C),Y=n.middlewareData.shift,R=!Y;let $=A,ne=U;Y!=null&&Y.enabled.x&&(ne=C),Y!=null&&Y.enabled.y&&($=x),R&&!m&&(T?ne=y-2*ai(f.left,f.right):$=w-2*ai(f.top,f.bottom)),yield l(me(B({},n),{availableWidth:ne,availableHeight:$}));const de=yield a.getDimensions(u.floating);return y!==de.width||w!==de.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Ss(e){return xT(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(xT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xT(e){return ac()?e instanceof Node||e instanceof Kn(e).Node:!1}function wr(e){return ac()?e instanceof Element||e instanceof Kn(e).Element:!1}function jr(e){return ac()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function ST(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ED(e){return/^(table|td|th)$/.test(Ss(e))}function uc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const yD=/transform|translate|scale|rotate|perspective|filter/,bD=/paint|layout|strict|content/,Ao=e=>!!e&&e!=="none";let tp;function np(e){const t=wr(e)?_r(e):e;return Ao(t.transform)||Ao(t.translate)||Ao(t.scale)||Ao(t.rotate)||Ao(t.perspective)||!rp()&&(Ao(t.backdropFilter)||Ao(t.filter))||yD.test(t.willChange||"")||bD.test(t.contain||"")}function TD(e){let t=Ri(e);for(;jr(t)&&!vs(t);){if(np(t))return t;if(uc(t))return null;t=Ri(t)}return null}function rp(){return tp==null&&(tp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tp}function vs(e){return/^(html|body|#document)$/.test(Ss(e))}function _r(e){return Kn(e).getComputedStyle(e)}function lc(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ri(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ST(e)&&e.host||zr(e);return ST(t)?t.host:t}function vT(e){const t=Ri(e);return vs(t)?(e.ownerDocument||e).body:jr(t)&&eu(t)?t:vT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Kn(o);if(a){const l=ip(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],l&&n?tu(l):[])}else return t.concat(o,tu(o,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AT(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=rc(n)!==a||rc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function op(e){return wr(e)?e:e.contextElement}function As(e){const t=op(e);if(!jr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=AT(t);let u=(a?rc(n.width):n.width)/r,l=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const wD=Ur(0);function CT(e){const t=Kn(e);return!rp()||!t.visualViewport?wD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kn(e)?!1:t}function Co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=op(e);let u=Ur(1);t&&(r?wr(r)&&(u=As(r)):u=As(e));const l=_D(a,n,r)?CT(a):Ur(0);let d=(o.left+l.x)/u.x,f=(o.top+l.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Kn(a),y=r&&wr(r)?Kn(r):r;let w=T,v=ip(w);for(;v&&r&&y!==w;){const N=As(v),x=v.getBoundingClientRect(),C=_r(v),A=x.left+(v.clientLeft+parseFloat(C.paddingLeft))*N.x,U=x.top+(v.clientTop+parseFloat(C.paddingTop))*N.y;d*=N.x,f*=N.y,p*=N.x,m*=N.y,d+=A,f+=U,w=Kn(v),v=ip(w)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:Co(zr(e)).left+n}function kT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function xD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=zr(r),l=t?uc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),m=jr(r);if((m||!m&&!a)&&((Ss(r)!=="body"||eu(u))&&(d=lc(r)),jr(r))){const y=Co(r);f=As(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?kT(u,d):Ur(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 SD(e){return Array.from(e.getClientRects())}function vD(e){const t=zr(e),n=lc(e),r=e.ownerDocument.body,o=ai(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ai(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const l=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=ai(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const NT=25;function AD(e,t){const n=Kn(e),r=zr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(o){a=o.width,u=o.height;const p=rp();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=cc(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,w=Math.abs(r.clientWidth-m.clientWidth-y);w<=NT&&(a-=w)}else f<=NT&&(a+=f);return{width:a,height:u,x:l,y:d}}const CD=new Set(["absolute","fixed"]);function kD(e,t){const n=Co(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=jr(e)?As(e):Ur(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function PT(e,t,n){let r;if(t==="viewport")r=AD(e,n);else if(t==="document")r=vD(zr(e));else if(wr(t))r=kD(t,n);else{const o=CT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function OT(e,t){const n=Ri(e);return n===t||!wr(n)||vs(n)?!1:_r(n).position==="fixed"||OT(n,t)}function ND(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(l=>wr(l)&&Ss(l)!=="body"),o=null;const a=_r(e).position==="fixed";let u=a?Ri(e):e;for(;wr(u)&&!vs(u);){const l=_r(u),d=np(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&CD.has(o.position)||eu(u)&&!d&&OT(e,u))?r=r.filter(p=>p!==u):o=l,u=Ri(u)}return t.set(e,r),r}function PD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:ND(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=PT(t,p,o);return f.top=ai(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=ai(m.left,f.left),f},PT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function OD(e){const{width:t,height:n}=AT(e);return{width:t,height:n}}function ID(e,t,n){const r=jr(t),o=zr(t),a=n==="fixed",u=Co(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||eu(o))&&(l=lc(t)),r){const y=Co(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?kT(o,l):Ur(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function sp(e){return _r(e).position==="static"}function IT(e,t){if(!jr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function RT(e,t){const n=Kn(e);if(uc(e))return n;if(!jr(e)){let o=Ri(e);for(;o&&!vs(o);){if(wr(o)&&!sp(o))return o;o=Ri(o)}return n}let r=IT(e,t);for(;r&&ED(r)&&sp(r);)r=IT(r,t);return r&&vs(r)&&sp(r)&&!np(r)?n:r||TD(e)||n}const RD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||RT,n=this.getDimensions,r=yield n(e.floating);return{reference:ID(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function LD(e){return _r(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:xD,getDocumentElement:zr,getClippingRect:PD,getOffsetParent:RT,getElementRects:RD,getClientRects:SD,getDimensions:OD,getScale:As,isElement:wr,isRTL:LD};function LT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MD(e,t){let n=null,r;const o=zr(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const w=ic(m),v=ic(o.clientWidth-(p+T)),N=ic(o.clientHeight-(m+y)),x=ic(p),A={rootMargin:-w+"px "+-v+"px "+-N+"px "+-x+"px",threshold:ai(0,Oi(1,d))||1};let U=!0;function Y(R){const $=R[0].intersectionRatio;if($!==d){if(!U)return u();$?u(!1,$):r=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!LT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,me(B({},A),{root:o.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,A)}n.observe(e)}return u(!0),a}function FD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=op(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=f&&l?MD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(x=>{let[C]=x;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,v=d?Co(e):null;d&&N();function N(){const x=Co(e);v&&!LT(v,x)&&n(),v=x,w=requestAnimationFrame(N)}return n(),()=>{var x;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const BD=hD,UD=pD,HD=cD,zD=gD,jD=dD,$D=lD,VD=mD,qD=(e,t,n)=>{const r=new Map,o=B({platform:DD},n),a=me(B({},o.platform),{_c:r});return uD(e,t,me(B({},o),{platform:a}))};function DT(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 me(B({},o),{toJSON:()=>o})}function YD(e){if(!e)return DT();const{x:t,y:n,width:r,height:o}=e;return DT(t,n,r,o)}function WD(e,t){return{contextElement:nn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?YD(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),li={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},GD=e=>e==="top"||e==="bottom"?"y":"x";function XD(e,t){return{name:"transformOrigin",fn(n){var de,V,ie,fe,we;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=GD(d),p=((de=o.arrow)==null?void 0:de.x)||0,m=((V=o.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=m+y/2,N=Math.abs(((ie=o.shift)==null?void 0:ie.y)||0),x=u.reference.height/2,C=y/2,A=(we=(fe=e.offset)==null?void 0:fe.mainAxis)!=null?we:e.gutter,U=typeof A=="number"?A+C:A!=null?A:C,Y=N>U,R={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],$=`${w}px ${u.reference.y+x-l}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(li.transformOrigin.variable,ne?$:R),{data:{transformOrigin:ne?$:R}}}}}var KD={name:"rects",fn({rects:e}){return{data:e}}},QD=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 JD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var ZD={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 ap(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function e8(e,t,n){const r=e||t.createElement("div");return $D({element:r,padding:n.arrowPadding})}function t8(e,t){var n;if(!wL((n=t.offset)!=null?n:t.gutter))return BD(({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:l}=JD(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Dh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function n8(e){if(!e.flip)return;const t=ap(e.boundary);return HD(me(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function r8(e){if(!e.slide&&!e.overlap)return;const t=ap(e.boundary);return UD(me(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:VD()}))}function i8(e){return zD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),l=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",`${l}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function o8(e){var t;if(e.hideWhenDetached)return jD({strategy:"referenceHidden",boundary:(t=ap(e.boundary))!=null?t:"clippingAncestors"})}function s8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function a8(e,t,n={}){const r=WD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},ZD,n),a=t.querySelector("[data-part=arrow]"),u=[t8(a,o),n8(o),r8(o),e8(a,t.ownerDocument,o),QD(a),XD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),i8(o),o8(o),KD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const v=yield qD(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const N=ms(t),x=MT(N,v.x),C=MT(N,v.y);t.style.setProperty("--x",`${x}px`),t.style.setProperty("--y",`${C}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const A=t.firstElementChild;if(A){const Y=Es(A);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=s8(o.listeners),w=o.listeners?FD(r,t,T,y):PL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function FT(e,t,n={}){const l=n,{defer:r}=l,o=mn(l,["defer"]),a=r?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(a8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var u8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function l8(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?u8[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 Cs=new WeakMap,dc=new WeakMap,fc={},up=0,BT=e=>e&&(e.host||BT(e.parentNode)),c8=(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),d8=new Set(["script","output","status","next-route-announcer"]),f8=e=>d8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=c8(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const l=fc[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&&nn(y)&&Kb(y,w=>{m(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(f.has(w))T(w);else try{if(f8(w))return;const N=w.getAttribute(o)==="true",x=(Cs.get(w)||0)+1,C=(l.get(w)||0)+1;Cs.set(w,x),l.set(w,C),d.push(w),x===1&&N&&dc.set(w,!0),C===1&&w.setAttribute(r,""),N||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),up++,()=>{d.forEach(y=>{const w=Cs.get(y)-1,v=l.get(y)-1;Cs.set(y,w),l.set(y,v),w||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),v||y.removeAttribute(r)}),up--,up||(Cs=new WeakMap,Cs=new WeakMap,dc=new WeakMap,fc={})}},p8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,m8=(e,t=p8(e),n="data-aria-hidden",r=!0)=>{if(t)return h8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},g8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function UT(e,t={}){const{defer:n=!0}=t,r=n?g8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(m8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function E8(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 y8(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 HT="pointerdown.outside",zT="focus.outside";function b8(e){for(const t of e)if(nn(t)&&Br(t))return!0;return!1}var jT=e=>"clientY"in e;function T8(e,t){if(!jT(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 w8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function $T(e,t){if(!t||!jT(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)},l={x:e.clientX,y:e.clientY};return w8(u,l)?r||a:!1}function _8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Fr(e),f=ms(e),p=E8(f),m=y8(f);function T(A,U){if(!nn(U)||!U.isConnected||ps(e,U)||T8(e,A)||l&&Xb(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const $=Vh(Y);if($T(A,$))return!1}const R=Vh(e);return $T(A,R)?!1:!(n!=null&&n(U))}const y=new Set,w=_o(e==null?void 0:e.getRootNode());function v(A){function U(Y){var de,V;const R=u&&!Qb()?Wt:ie=>ie(),$=Y!=null?Y:A,ne=(V=(de=$==null?void 0:$.composedPath)==null?void 0:de.call($))!=null?V:[$==null?void 0:$.target];R(()=>{const ie=w?ne[0]:Tr(A);if(!(!e||!T(A,ie))){if(o||a){const fe=Lh(o,a);e.addEventListener(HT,fe,{once:!0})}VT(e,HT,{bubbles:!1,cancelable:!0,detail:{originalEvent:$,contextmenu:d5($),focusable:b8(ne),target:ie}})}})}A.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(rn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const N=new Set,x=setTimeout(()=>{N.add(rn(d,"pointerdown",v,!0)),N.add(m.addEventListener("pointerdown",v,!0)),N.add(p.addEventListener("pointerdown",v,!0))},0);function C(A){(u?Wt:Y=>Y())(()=>{var $,ne;const Y=(ne=($=A==null?void 0:A.composedPath)==null?void 0:$.call(A))!=null?ne:[A==null?void 0:A.target],R=w?Y[0]:Tr(A);if(!(!e||!T(A,R))){if(r||a){const de=Lh(r,a);e.addEventListener(zT,de,{once:!0})}VT(e,zT,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:Br(R),target:R}})}})}return Qb()||(N.add(rn(d,"focusin",C,!0)),N.add(m.addEventListener("focusin",C,!0)),N.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(x),y.forEach(A=>A()),N.forEach(A=>A())}}function x8(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(_8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function VT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function S8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return rn(Fr(e),"keydown",n,{capture:!0})}var qT="layer:request-dismiss",ur={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=>ps(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ps(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=>ur.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];A8(e,qT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),v8(e,qT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v8(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 A8(e,t,n){e.addEventListener(t,n,{once:!0})}var YT;function WT(){ur.layers.forEach(({node:e})=>{e.style.pointerEvents=ur.isBelowPointerBlockingLayer(e)?"none":"auto"})}function C8(e){e.style.pointerEvents=""}function k8(e,t){const n=Fr(e),r=[];return ur.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(YT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=L5(()=>{const l=o();return nn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Jl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{ur.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=YT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function N8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Mh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ur.add(f),WT();function p(v){var x,C;const N=Tr(v.detail.originalEvent);ur.isBelowPointerBlockingLayer(e)||ur.isInBranch(N)||((x=t.onPointerDownOutside)==null||x.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var x,C;const N=Tr(v.detail.originalEvent);ur.isInBranch(N)||((x=t.onFocusOutside)==null||x.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var N;ur.isTopMost(e)&&((N=t.onEscapeKeyDown)==null||N.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var A;if(!e)return!1;const N=typeof u=="function"?u():u,x=Array.isArray(N)?N:[N],C=(A=t.persistentElements)==null?void 0:A.map(U=>U()).filter(nn);return C&&x.push(...C),x.some(U=>ps(U,v))||ur.isInNestedLayer(e,v)}const w=[a?k8(e,t.persistentElements):void 0,S8(e,T),x8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ur.remove(e),WT(),C8(e),w.forEach(v=>v==null?void 0:v())}}function GT(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=fs(e)?e():e;o.push(N8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var P8=Object.defineProperty,O8=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>O8(e,typeof t!="symbol"?t+"":t,n),XT={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()}},I8=[],R8=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=Tr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Qa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Qa(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Tr(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Tr(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(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;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{L8(r)&&iu(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(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return n5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?r5(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&&!Br(r)){const o=gs(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!==gs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,D8(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),XT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),l=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{KT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),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 l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Tr(o);this.updateTabbableNodes();let l=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?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||I8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||Fr(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=>{ZL(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?Xb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ys(e,{getShadowRoot:this.config.getShadowRoot}),n=iT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let l=!1;for(let f=0;f<t.length;f++)if(Qa(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(xo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(xo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,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 XT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?KT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(rn(this.doc,"focusin",this.handleFocus,!0),rn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),rn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),rn(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=gs(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)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,L8=e=>!e.isComposing&&e.key==="Escape",KT=e=>setTimeout(e,0),D8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function QT(e,t={}){let n;const r=Wt(()=>{const o=typeof e=="function"?e():e;if(o){n=new R8(o,me(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var lp="data-scroll-lock";function M8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function JT(e){const t=Es(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ZT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(lp))return;const u=JT(r)||JT(o),l=n.innerWidth-r.clientWidth;o.setAttribute(lp,"");const d=()=>I5(r,"--scrollbar-width",`${l}px`),f=M8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),Jl(o,w)},m=()=>{var Y,R;const{scrollX:w,scrollY:v,visualViewport:N}=n,x=(Y=N==null?void 0:N.offsetLeft)!=null?Y:0,C=(R=N==null?void 0:N.offsetTop)!=null?R:0,A={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(w-Math.floor(x))}px`,right:"0"};!u&&l>0&&(A[f]=`${l}px`);const U=Jl(o,A);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(lp)}}var F8=vo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),$r=F8.build(),ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},tw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},B8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},U8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},rw=e=>e.getById(ew(e)),ks=e=>e.getById(tw(e)),Ns=e=>e.getById(cp(e)),iw=e=>e.getById(nw(e)),H8=e=>e.getById(dp(e)),z8=e=>e.getById(fp(e));function j8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=l8(me(B({},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(me(B({id:B8(l)},$r.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(me(B({},$r.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(me(B({},$r.anchor.attrs),{dir:u("dir"),id:ew(l)}))},getTriggerProps(){return t.button(me(B({},$r.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:tw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":cp(l),onPointerDown(y){Jb(y)&&l5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(B({},$r.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({id:nw(l)},$r.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(me(B({},$r.content.attrs),{dir:u("dir"),id:cp(l),tabIndex:-1,role:"dialog","aria-modal":Yb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":hs(d),"aria-labelledby":m.title?dp(l):void 0,"aria-describedby":m.description?fp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(B({},$r.title.attrs),{id:dp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(me(B({},$r.description.attrs),{id:fp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(B({},$r.closeTrigger.attrs),{dir:u("dir"),id:U8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var $8={props({props:e}){return me(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=rw(n))!=null?a:ks(n);return FT(r,()=>iw(n),me(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ns(n);let o=!0;return GT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ks(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:P5(()=>Ns(t),{triggerElement:ks(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?UT(()=>[Ns(t),ks(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ZT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?QT(()=>Ns(t),{initialFocus:()=>oT({root:Ns(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=rw(n))!=null?u:ks(n);FT(o,()=>iw(n),me(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Wt(()=>{Object.assign(e.get("renderedElements"),{title:!!H8(t),description:!!z8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Wt(()=>{const n=oT({root:Ns(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||Wt(()=>{const a=ks(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})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[OH,hc]=So({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IH,hp]=So({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),V8=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec($8,o);return j8(a,Wh)},q8=e=>{const[t,u]=pT(e),l=u,{children:n}=l,r=mn(l,["children"]),o=V8(r),a=Kh(on({present:o.open},t));return _.jsx(q5,{value:o,children:_.jsx(dT,{value:a,children:n})})},ow=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(me(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Pn.button,me(B({},o),{ref:t}))});ow.displayName="PopoverTrigger";function Y8(e){return ht({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 W8(e){return ht({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 G8(e){return ht({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 X8(e){return ht({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 K8(e){return ht({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 Q8(e){return ht({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 pp(e){return ht({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 sw(e){return ht({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 J8=({className:e,componentType:t,children:n})=>{const[r,o]=D.useState(!1),{globalClassName:a}=tt(),u=f=>{o(f.open)},l=D.useCallback(()=>{o(!1)},[]),d=D.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(q8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(ow,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(sw,{"aria-hidden":"true"})}),_.jsx(hT,{children:_.jsx(fT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ub.Provider,{value:d,children:n})})})]})};function aw(e){return ht({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 uw(e){return ht({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[Z8,ko]=So({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),lw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getControlProps(),e);return _.jsx(Pn.div,me(B(B({},r),e),{ref:t}))});lw.displayName="CarouselControl";const cw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["readOnly","index"]),o=ko(),a=on(o.getIndicatorProps(n),r);return _.jsx(Pn.button,me(B({},a),{ref:t}))});cw.displayName="CarouselIndicator";const dw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getIndicatorGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});dw.displayName="CarouselIndicatorGroup";const fw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["index","snapAlign"]),o=ko(),a=on(o.getItemProps(n),r);return _.jsx(Pn.div,me(B({},a),{ref:t}))});fw.displayName="CarouselItem";const hw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getItemGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});hw.displayName="CarouselItemGroup";const pw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getNextTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});pw.displayName="CarouselNextTrigger";const mw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getPrevTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});mw.displayName="CarouselPrevTrigger";function eM(e){const t=Es(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 l(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=l(r,n.width),f=l(o,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function tM(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 gw(e){let t=[];for(const n of e.children)t=t.concat(n,gw(n));return t}function Ew(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?gw(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!tM(n,m,u))continue;const T=Es(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,N=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:N});break;case"center":r[a].center.push({node:p,position:N+m[d]/2});break;case"end":r[a].end.push({node:p,position:N+m[d]});break}}}return r}function yw(e){const t=e.getBoundingClientRect(),n=eM(e),r=Ew(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:bw([...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(Tw(0,o.x))),y:bw([...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(Tw(0,o.y)))}}function nM(e,t,n){const r=Ew(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var bw=e=>[...new Set(e)],Tw=(e,t)=>n=>Math.max(e,Math.min(t,n)),rM=vo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ci=rM.build(),iM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},oM=(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}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},sM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},aM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},uM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},ww=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Hn=e=>e.getById(pc(e)),_w=e=>O5(Hn(e),"[data-part=item]"),lM=(e,t)=>e.getById(ww(e,t)),xw=e=>{const t=Hn(e);if(!t)return;const n=ys(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function cM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=l("slidesPerPage"),N=l("padding"),x=l("translations");return{isPlaying:d,isDragging:f,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return w/y.length},scrollToIndex(C,A){a({type:"INDEX.SET",index:C,instant:A})},scrollTo(C,A){a({type:"PAGE.SET",index:C,instant:A})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(B({},ci.root.attrs),{id:iM(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(B({},ci.itemGroup.attrs),{id:pc(u),"data-orientation":l("orientation"),"data-dragging":hs(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){ps(C.currentTarget,Tr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){ps(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!Jb(C))return;const A=Tr(C);Br(A)&&A!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:OL(C=>{const A=l("orientation")==="horizontal"?"deltaX":"deltaY";C[A]<0&&!o("canScrollPrev")||C[A]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:N,[T?"paddingInline":"paddingBlock"]:N,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const A=r.get("slidesInView").includes(C.index);return t.element(me(B({},ci.item.attrs),{id:oM(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":hs(A),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":x.item(C.index,l("slideCount")),"aria-hidden":Yb(!A),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=C.snapAlign)!=null?ne:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(C.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(me(B({},ci.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(me(B({},ci.prevTrigger.attrs),{id:aM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":x.prevTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(B({},ci.nextTrigger.attrs),{dir:l("dir"),id:sM(u),type:"button","aria-label":x.nextTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(B({},ci.indicatorGroup.attrs),{dir:l("dir"),id:uM(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const A="indicator",U={ArrowDown($){T||(a({type:"PAGE.NEXT",src:A}),$.preventDefault())},ArrowUp($){T||(a({type:"PAGE.PREV",src:A}),$.preventDefault())},ArrowRight($){T&&(a({type:"PAGE.NEXT",src:A}),$.preventDefault())},ArrowLeft($){T&&(a({type:"PAGE.PREV",src:A}),$.preventDefault())},Home($){a({type:"PAGE.SET",index:0,src:A}),$.preventDefault()},End($){a({type:"PAGE.SET",index:y.length-1,src:A}),$.preventDefault()}},Y=p5(C,{dir:l("dir"),orientation:l("orientation")}),R=U[Y];R==null||R(C)}}))},getIndicatorProps(C){return t.button(me(B({},ci.indicator.attrs),{dir:l("dir"),id:ww(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":hs(C.readOnly),"data-current":hs(C.index===w),"aria-label":x.indicator(C.index),onClick(A){A.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(B({},ci.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":hs(d),"aria-label":d?x.autoplayStop:x.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var dM={props({props:e}){return FL(e,["slideCount"],"carousel"),me(B({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:B({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:fM(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 TL(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Hn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),xw(e)});return xw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Wt(()=>{o(),Wt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?mL(d,m):gL(d,m)},n.get("slidesInView"));n.set("slidesInView",EL(l))},{root:r,threshold:t("inViewThreshold")});return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Hn(n);return r?rn(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 rn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return k5(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 rn(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=Vb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Hn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";o(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=zb(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=yL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Hn(r);if(!o)return;const a=nM(o,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Vb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Hn(n);if(!r)return;const o=yw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Hn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=yw(r),l=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]);Wt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=lM(n,e.get("page"));r&&Wt(()=>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 fM(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}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const hM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec(dM,o);return cM(a,Wh)},Sw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=hM(n),a=on(o.getRootProps(),r);return _.jsx(Z8,{value:o,children:_.jsx(Pn.div,me(B({},a),{ref:t}))})});Sw.displayName="CarouselRoot";function pM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function mM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}const gM=180,EM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},yM=({globalClassName:e,className:t,itemMinWidth:n=gM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:p="Product carousel",children:m})=>{const T=Array.from(m).map((V,ie)=>({node:V,key:D.isValidElement(V)&&V.key!=null?V.key:`carousel-item-${ie}`})),y=T.length,w=D.useRef(null),[v,N]=D.useState(0),{width:x}=yk();D.useLayoutEffect(()=>{w.current&&N(w.current.getBoundingClientRect().width)},[x,y]);const C=EM(r),A=n+C,U=v>0?(v+C)/A:1,Y=Math.max(1,Math.floor(U));if(y===0)return null;const R=y>Y,$=Math.ceil(y/Y),ne=R?Math.max(1,U):Y,de=d==="circle-arrow";return _.jsxs(Sw,{ref:w,className:W(e,t,`${z}-carousel`,{[`${z}-carousel--circle-arrow-navigation`]:de}),slidesPerPage:ne,slidesPerMove:Y,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[_.jsx(hw,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!R}),children:T.map(({node:V,key:ie},fe)=>_.jsx(fw,{index:fe,className:W(e,`${z}-carousel__item`),children:V},ie))}),l&&R&&_.jsxs(lw,{className:W(e,`${z}-carousel__control`),children:[_.jsx(mw,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:de?_.jsx(pM,{"aria-hidden":"true",size:"16px"}):_.jsx(G8,{"aria-hidden":"true",size:"16px"})}),_.jsx(pw,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:de?_.jsx(mM,{"aria-hidden":"true",size:"16px"}):_.jsx(X8,{"aria-hidden":"true",size:"16px"})})]}),u&&R&&_.jsx(dw,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:$},(V,ie)=>_.jsx(cw,{index:ie,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},[bM,TM]=So({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),wM=e=>Za()(e,["lazyMount","unmountOnExit"]),[_M,mc]=So({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),vw=D.forwardRef((e,t)=>{const n=mc(),r=TM(),o=Kh(me(B({},r),{present:n.open})),a=on(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Pn.div,me(B({},a),{ref:tc(o.ref,t)}))});vw.displayName="DialogBackdrop";const mp=D.forwardRef((e,t)=>{const n=mc(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});mp.displayName="DialogContent";const gp=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getPositionerProps(),e);return Ja().unmounted?null:_.jsx(Pn.div,me(B({},r),{ref:t}))});gp.displayName="DialogPositioner";var xM=vo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),No=xM.build(),Aw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},gc=e=>e.getById(Ep(e)),SM=e=>e.getById(Aw(e)),vM=e=>e.getById(Cw(e)),AM=e=>e.getById(kw(e)),CM=e=>e.getById(yp(e)),kM=e=>e.getById(bp(e)),NM=e=>e.getById(Nw(e));function PM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(me(B({},No.trigger.attrs),{dir:a("dir"),id:kw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(B({},No.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Cw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({},No.positioner.attrs),{dir:a("dir"),id:Aw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(B({},No.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(me(B({},No.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(me(B({},No.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(me(B({},No.closeTrigger.attrs),{dir:a("dir"),id:Nw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var OM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>NM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return GT(()=>gc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[AM(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 ZT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?QT(()=>gc(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")?UT(()=>[gc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Wt(()=>{e.set("rendered",{title:!!CM(t),description:!!kM(t)})})},syncZIndex({scope:e}){Wt(()=>{const t=gc(e);if(!t)return;const n=Es(t);[SM(e),vM(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})}}}};ws()(["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 IM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,getRootNode:n,dir:r},e),a=ec(OM,o);return PM(a,Wh)},Pw=e=>{const[t,l]=pT(e),d=l,{children:n}=d,r=mn(d,["children"]),[o]=wM(t),a=IM(r),u=Kh(on({present:a.open},t));return _.jsx(_M,{value:a,children:_.jsx(bM,{value:o,children:_.jsx(dT,{value:u,children:n})})})},Ow=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getTitleProps(),e);return _.jsx(Pn.h2,me(B({},r),{ref:t}))});Ow.displayName="DialogTitle";const RM=({children:e})=>{const t=D.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=D.useState(!1),u=D.useMemo(()=>({toggleMenu:()=>a(d=>!d),closeMenu:()=>{var f;const d=document.getElementById(n);d!=null&&d.contains(document.activeElement)&&((f=document.getElementById(r))==null||f.focus({preventScroll:!0})),a(!1)}}),[n,r]),l=D.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return _.jsx(Rh.Provider,{value:u,children:_.jsx(Bb.Provider,{value:l,children:e})})},Iw=()=>D.useContext(Bb),Rw=()=>{const e=D.useContext(Rh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},LM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Iw(),{closeMenu:a}=Rw(),{globalClassName:u}=tt(),l=D.useRef(null);return D.useEffect(()=>{var m;if(!n)return;const d=l.current;(m=d==null?void 0:d.querySelector("button:not(:disabled)"))==null||m.focus();const f=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),a())},p=T=>{var w;const y=T.target;(w=document.getElementById(o))!=null&&w.contains(y)||l.current&&!l.current.contains(y)&&a()};return d==null||d.addEventListener("keydown",f),document.addEventListener("mousedown",p),()=>{d==null||d.removeEventListener("keydown",f),document.removeEventListener("mousedown",p)}},[n,a,o]),n?_.jsx("div",{ref:l,id:r,role:"group","aria-label":"More options",className:W(`${z}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},DM=({componentType:e,className:t})=>{const{toggleMenu:n}=Rw(),{isOpen:r,panelId:o,triggerId:a}=Iw(),{globalClassName:u}=tt();return _.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:_.jsx(sw,{"aria-hidden":"true"})})},Tp=()=>{const{status:e,entryType:t}=Yn(),{messages:n}=Wn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},MM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=Yn(),o=wo(),a=()=>{yl(r||"dialog"),o()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(aw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(aw,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},FM=({componentType:e,globalClassName:t,controls:n,additionalControls:r,showClose:o,closeButtonAriaLabel:a,onClose:u,showOverflowMenu:l,showPrimaryToggle:d})=>{const f=e==="modal"?MM:Dw;return _.jsxs("div",{className:W(t,`${z}-${e}-controls`),children:[r,n!=null?_.jsxs(_.Fragment,{children:[n,o&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]}):_.jsxs(_.Fragment,{children:[l&&_.jsx(DM,{componentType:e}),d&&_.jsx(f,{componentType:e,isIcon:!0}),o&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]})]})},BM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=Yn(),o=wo(),a=()=>{kf(!r),o()},u=r?RN:LN,l="Toggle Fullscreen";return t?_.jsx(oi,{ariaLabel:l,title:l,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{"aria-hidden":"true"}),l]})},UM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=Yn(),o=wo(),a=r==="bottom-left",u=()=>{Nf(a?"bottom-right":"bottom-left"),o()},l=a?W8:Y8,d=a?"Move right":"Move left";return t?_.jsx(oi,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{"aria-hidden":"true"}),d]})},HM=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:o,showClearChat:a,showEndConversation:u,showDownloadTranscript:l,onClearChat:d,onEndConversation:f,onDownloadTranscript:p})=>{if(t!=null||!n)return null;const m=e==="modal"?BM:UM;return _.jsxs(LM,{componentType:e,children:[r&&_.jsx(m,{componentType:e}),o&&_.jsx(qM,{componentType:e}),a&&_.jsx(Hb,{componentType:e,onClearChat:d}),u&&f&&_.jsx(jM,{componentType:e,onEndConversation:f}),l&&p&&_.jsx(zM,{componentType:e,onDownloadTranscript:p})]})},Lw=({componentType:e,overflowActions:t,availableActions:n,controls:r,additionalControls:o,leading:a,title:u,onClearChat:l,onEndConversation:d,onClose:f,onDownloadTranscript:p})=>{const{headerConfig:m,globalClassName:T,themeVariants:y,themeVariables:w}=tt(),{mode:v}=Yn(),N=v==="standalone",x=e==="modal",C=we=>n===void 0||n[we],A=(we,re=!0)=>t.includes(we)&&C(we)&&re,U=C("toggleExpanded"),Y=A(x?"toggleFullscreen":"toggleDialogPosition"),R=A("minimize"),$=A("clearChat"),ne=C("close"),de=A("endConversation",!!d),V=A("downloadTranscript",!!p),ie=Y||R||$||de||V,fe=D.useMemo(()=>{if(!m)return{};const we=kN(m);if(!(w!=null&&w[`${rt}-header-text-font-size`]))return we;const re={"header-background-color":m.headerBackgroundColor,"header-text-color":m.headerTextColor,"header-text-font-size":m.headerTextFontSize,"header-text-font-weight":m.headerTextFontWeight,"header-text-font-family":m.headerTextFontFamily,"header-text-text-align":m.headerTextTextAlign};return Object.fromEntries(Object.entries(re).filter(([,oe])=>oe!=null&&oe!=="").map(([oe])=>[`${rt}-${oe}`,we[`${rt}-${oe}`]]))},[m,w]);return _.jsx(RM,{children:_.jsxs("div",{className:W(T,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:W(T,`${z}-${e}-header`,{standalone:N,embedded:!N}),style:fe,children:[a!=null?a:m!=null&&m.logoUrl?_.jsx("img",{alt:"",className:W(T,`${z}-${e}-logo`,{standalone:N,embedded:!N}),src:m.logoUrl}):(y==null?void 0:y.logoFallback)==="sparkle"?_.jsx("svg",{className:W(T,`${z}-${e}-logo`,{standalone:N,embedded:!N}),"aria-hidden":"true",viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:_.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:`var(${rt}-on-primary, #ffffff)`,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,_.jsx(Ow,{className:W(T,`${z}-${e}-title`,{standalone:N,embedded:!N}),children:u!=null?u:m==null?void 0:m.headerText}),_.jsx(FM,{componentType:e,globalClassName:T,controls:r,additionalControls:o,showClose:ne,closeButtonAriaLabel:m==null?void 0:m.closeButtonAriaLabel,onClose:f,showOverflowMenu:ie,showPrimaryToggle:U})]}),_.jsx(HM,{componentType:e,controls:r,showOverflowMenu:ie,showSecondaryToggle:Y,showMinimize:R,showClearChat:$,showEndConversation:de,showDownloadTranscript:V,onClearChat:l,onEndConversation:d,onDownloadTranscript:p})]})})},zM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=wo(),[o,a]=D.useState(!1),u=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(fL,{"aria-hidden":"true"}),"Download transcript"]})},jM=({onEndConversation:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[_.jsx(DN,{"aria-hidden":"true"}),"End conversation"]})},$M={sparkle:pp,plus:K8,"paper-plane":Q8},wp=({icon:e,className:t})=>{const n=$M[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},VM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=w=>()=>{a(w)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=w=>_.jsxs(_.Fragment,{children:[l&&_.jsx(wp,{icon:l,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:w})]});return _.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(w=>o?_.jsx(wl,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):_.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const o=()=>{ri(!1),wa(!0),Ff()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(rE,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(rE,{"aria-hidden":"true"}),"Minimize"]})},Dw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=wo(),o=()=>{yl("modal"),r()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(uw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(uw,{"aria-hidden":"true"}),"Show modal"]})},YM=({isWidgetStandalone:e})=>{var N,x;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:l,messages:d}=Wn(),{isLoading:f,handleAskCim:p}=Rr(),m=o==null?void 0:o.icon,T=(N=o==null?void 0:o.iconPosition)!=null?N:"left",y=D.useMemo(()=>{const C=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 d.some(U=>U.name==="conversation_reset")&&r||C},[d,n,r]),w=D.useMemo(()=>{var A,U;const C=((U=(A=l.message)==null?void 0:A.suggestions)!=null?U:[]).map(Y=>Y.displayText.trim()).filter(Boolean);return W0(C,a||[],u)},[(x=l.message)==null?void 0:x.suggestions,a,u]),v=C=>()=>{p({userPrompt:C})};return _.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[_.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&_.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:w.map(C=>_.jsxs(wl,{disabled:f,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(C),children:[m&&_.jsx(wp,{icon:m,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:C})]},C))})]})};function WM(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function GM(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function _p({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!WM(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!GM(o)||r(o,e)}const XM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=tt();if(!n)return null;const u=n.getName(t),l=n.getBrand(t),d=n.getPriceDisplay(t),f=n.getRelativePdp(t),p=n.getPdp(t),m=n.getImage(t),T=f&&typeof f=="string"?new URL(f,window.location.origin).href:p,y=w=>_p({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return _.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[T?_.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),_.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[_.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[l&&_.jsx("p",{className:`${z}-product-tile-brand`,children:l}),T?_.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${z}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",_.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):_.jsx("p",{className:W(r,`${z}-product-tile-name`),title:u,children:u})]}),_.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:_.jsx("p",{className:W(r,`${z}-product-tile-price`),children:d})})]})]})},KM=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=tt(),u=t;return n?_.jsxs("div",{className:W(r,`${z}-display-products`),children:[_.jsx("p",{children:u.message}),u.products&&u.products.length>0&&_.jsx(yM,{globalClassName:r,spacing:(l=a==null?void 0:a.carouselGap)!=null?l:"0.5rem",navigationVariant:o==null?void 0:o.carousel,ariaLabel:"Recommended products",children:u.products.map(d=>{const f=n.getPid(d);return _.jsx(XM,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},QM=({globalClassName:e,message:t,isWidgetStandalone:n})=>_.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:_.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[_.jsx(PN,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),JM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Rr(),{messages:u}=Wn(),l=u.find(v=>v.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Hv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const N=n.suggestions.find(x=>x.displayText===v);N&&o(N,n.eventSourceId||n.id)};return _.jsxs("div",{className:W(e,`${z}-follow-up`),children:[_.jsx("p",{className:W(e,`${z}-text`),children:n.message}),_.jsx(VM,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Mw(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 ZM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eF(e,t,n){const o=Il((n||{}).ignore||[]),a=tF(t);let u=-1;for(;++u<a.length;)Ey(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],w=T?T.children:void 0;if(o(y,w?w.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 w=0;const N=m.children.indexOf(f);let x=!1,C=[];T.lastIndex=0;let A=T.exec(f.value);for(;A;){const U=A.index,Y={index:A.index,input:A.input,stack:[...p,f]};let R=y(...A,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=U+1:(w!==U&&C.push({type:"text",value:f.value.slice(w,U)}),Array.isArray(R)?C.push(...R):R&&C.push(R),w=U+A[0].length,x=!0),!T.global)break;A=T.exec(f.value)}return x?(w<f.value.length&&C.push({type:"text",value:f.value.slice(w)}),m.children.splice(N,1,...C)):C=[f],N+C.length}}function tF(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([nF(o[0]),rF(o[1])])}return t}function nF(e){return typeof e=="string"?new RegExp(ZM(e),"g"):e}function rF(e){return typeof e=="function"?e:function(){return e}}const xp="phrasing",Sp=["autolink","link","image","label"];function iF(){return{transforms:[dF],enter:{literalAutolink:sF,literalAutolinkEmail:vp,literalAutolinkHttp:vp,literalAutolinkWww:vp},exit:{literalAutolink:cF,literalAutolinkEmail:lF,literalAutolinkHttp:aF,literalAutolinkWww:uF}}}function oF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:":",before:"[ps]",after:"\\/",inConstruct:xp,notInConstruct:Sp}]}}function sF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vp(e){this.config.enter.autolinkProtocol.call(this,e)}function aF(e){this.config.exit.autolinkProtocol.call(this,e)}function uF(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 lF(e){this.config.exit.autolinkEmail.call(this,e)}function cF(e){this.exit(e)}function dF(e){eF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hF]],{ignore:["link","linkReference"]})}function fF(e,t,n,r,o){let a="";if(!Fw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!pF(n)))return!1;const u=mF(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function hF(e,t,n,r){return!Fw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pF(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 mF(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=Mw(e,"(");let a=Mw(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 Fw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||po(n)||vl(n))&&(!t||n!==47)}Bw.peek=SF;function gF(){this.buffer()}function EF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yF(){this.buffer()}function bF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function TF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wF(e){this.exit(e)}function _F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xF(e){this.exit(e)}function SF(){return"["}function Bw(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=o.move("]"),a}function vF(){return{enter:{gfmFootnoteCallString:gF,gfmFootnoteCall:EF,gfmFootnoteDefinitionLabelString:yF,gfmFootnoteDefinition:bF},exit:{gfmFootnoteCallString:TF,gfmFootnoteCall:wF,gfmFootnoteDefinitionLabelString:_F,gfmFootnoteDefinition:xF}}}function AF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
32
+ `:" ")+a.indentLines(a.containerFlow(r,l.current()),t?Uw:CF))),f(),d}}function CF(e,t,n){return t===0?e:Uw(e,t,n)}function Uw(e,t,n){return(n?"":" ")+e}const kF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Hw.peek=RF;function NF(){return{canContainEols:["delete"],enter:{strikethrough:OF},exit:{strikethrough:IF}}}function PF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:kF}],handlers:{delete:Hw}}}function OF(e){this.enter({type:"delete",children:[]},e)}function IF(e){this.exit(e)}function Hw(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,me(B({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function RF(){return"~"}function LF(e){return e.length}function DF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||LF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],N=[];let x=-1;for(e[p].length>f&&(f=e[p].length);++x<e[p].length;){const C=MF(e[p][x]);if(n.alignDelimiters!==!1){const A=o(C);N[x]=A,(d[x]===void 0||A>d[x])&&(d[x]=A)}v.push(C)}u[p]=v,l[p]=N}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=zw(r[m]);else{const v=zw(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let N="",x="";v===99?(N=":",x=":"):v===108?N=":":v===114&&(x=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-N.length-x.length);const A=N+"-".repeat(C)+x;n.alignDelimiters!==!1&&(C=N.length+C+x.length,C>d[m]&&(d[m]=C),y[m]=C),T[m]=A}u.splice(1,0,T),l.splice(1,0,y),p=-1;const w=[];for(;++p<u.length;){const v=u[p],N=l[p];m=-1;const x=[];for(;++m<f;){const C=v[m]||"";let A="",U="";if(n.alignDelimiters!==!1){const Y=d[m]-(N[m]||0),R=a[m];R===114?A=" ".repeat(Y):R===99?Y%2?(A=" ".repeat(Y/2+.5),U=" ".repeat(Y/2-.5)):(A=" ".repeat(Y/2),U=A):U=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&x.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&x.push(" "),n.alignDelimiters!==!1&&x.push(A),x.push(C),n.alignDelimiters!==!1&&x.push(U),n.padding!==!1&&x.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&x.push("|")}w.push(n.delimiterEnd===!1?x.join("").replace(/ +$/,""):x.join(""))}return w.join(`
33
33
  `)}function MF(e){return e==null?"":String(e)}function zw(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 FF(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()),BF);return o(),u}function BF(e,t,n){return">"+(n?"":" ")+e}function UF(e,t){return jw(e,t.inConstruct,!0)&&!jw(e,t.notInConstruct,!1)}function jw(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
34
  `&&UF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
35
  `}function HF(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 zF(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 jF(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 $F(e,t,n,r){const o=jF(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(zF(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,VF);return m(),T}const l=n.createTracker(r),d=o.repeat(Math.max(HF(a,o)+1,3)),f=n.enter("codeFenced");let p=l.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=l.move(n.safe(e.lang,B({before:p,after:" ",encode:["`"]},l.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=l.move(" "),p+=l.move(n.safe(e.meta,B({before:p,after:`
@@ -42,5 +42,5 @@ Error generating stack: `+b.message+`
42
42
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(o),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,B({before:"# ",after:`
44
44
  `},a.current()));return/^[\t ]/.test(f)&&(f=ou(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}qw.peek=KF;function qw(e){return e.value||""}function KF(){return"<"}Yw.peek=QF;function Yw(e,t,n,r){const o=Ap(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,B({before:f,after:"]"},d.current()))),f+=d.move("]("),l(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,B({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,B({before:f,after:e.title?" ":")"},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,B({before:f,after:o},d.current()))),f+=d.move(o),l()),f+=d.move(")"),u(),f}function QF(){return"!"}Ww.peek=JF;function Ww(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("![");const f=n.safe(e.alt,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function JF(){return"!"}Gw.peek=ZF;function Gw(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],l=n.compilePattern(u);let d;if(u.atBreak)for(;d=l.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function ZF(){return"`"}function Xw(e,t){const n=Xf(e);return!!(!t.options.resourceLink&&e.url&&!e.title&&e.children&&e.children.length===1&&e.children[0].type==="text"&&(n===e.url||"mailto:"+n===e.url)&&/^[a-z][a-z+.-]+:/i.test(e.url)&&!/[\0- <>\u007F]/.test(e.url))}Kw.peek=e9;function Kw(e,t,n,r){const o=Ap(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(Xw(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,B({before:m,after:">"},u.current()))),m+=u.move(">"),l(),n.stack=p,m}l=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,B({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,B({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,B({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,B({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),l(),f}function e9(e,t,n){return Xw(e,n)?"<":"["}Qw.peek=t9;function Qw(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const l=n.createTracker(r);let d=l.move("[");const f=n.containerPhrasing(e,B({before:d,after:"]"},l.current()));d+=l.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),B({before:d,after:"]"},l.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==m?d+=l.move(m+"]"):o==="shortcut"?d=d.slice(0,-1):d+=l.move("]"),d}function t9(){return"["}function Cp(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 n9(e){const t=Cp(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 r9(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 Jw(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 i9(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?r9(n):Cp(n);const l=e.ordered?u==="."?")":".":n9(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),Jw(n)===u&&p){let m=-1;for(;++m<e.children.length;){const T=e.children[m];if(T&&T.type==="listItem"&&T.children&&T.children[0]&&T.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=l),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function o9(e){const t=e.options.listItemIndent||"one";if(t!=="tab"&&t!=="one"&&t!=="mixed")throw new Error("Cannot serialize items with `"+t+"` for `options.listItemIndent`, expected `tab`, `one`, or `mixed`");return t}function s9(e,t,n,r){const o=o9(n);let a=n.bulletCurrent||Cp(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 l=n.createTracker(r);l.move(a+" ".repeat(u-a.length)),l.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,l.current()),p);return d(),f;function p(m,T,y){return T?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function a9(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const u9=Il(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function l9(e,t,n,r){return(e.children.some(function(u){return u9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function c9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Zw.peek=d9;function Zw(e,t,n,r){const o=c9(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(o+o);let d=u.move(n.containerPhrasing(e,B({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=Ec(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=ou(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=Ec(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+ou(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function d9(e,t,n){return n.options.strong||"*"}function f9(e,t,n,r){return n.safe(e.value,r)}function h9(e){const t=e.options.ruleRepetition||3;if(t<3)throw new Error("Cannot serialize rules with repetition `"+t+"` for `options.ruleRepetition`, expected `3` or more");return t}function p9(e,t,n){const r=(Jw(n)+(n.options.ruleSpaces?" ":"")).repeat(h9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const e_={blockquote:FF,break:$w,code:$F,definition:qF,emphasis:Vw,hardBreak:$w,heading:XF,html:qw,image:Yw,imageReference:Ww,inlineCode:Gw,link:Kw,linkReference:Qw,list:i9,listItem:s9,paragraph:a9,root:l9,strong:Zw,text:f9,thematicBreak:p9};function m9(){return{enter:{table:g9,tableData:t_,tableHeader:t_,tableRow:y9},exit:{codeText:b9,table:E9,tableData:kp,tableHeader:kp,tableRow:kp}}}function g9(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 E9(e){this.exit(e),this.data.inTable=void 0}function y9(e){this.enter({type:"tableRow",children:[]},e)}function kp(e){this.exit(e)}function t_(e){this.enter({type:"tableCell",children:[]},e)}function b9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,T9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function T9(e,t){return t==="|"?t:e}function w9(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:l}};function u(y,w,v,N){return f(p(y,v,N),y.align)}function l(y,w,v,N){const x=m(y,v,N),A=f([x]);return A.slice(0,A.indexOf(`
46
- `))}function d(y,w,v,N){const x=v.enter("tableCell"),A=v.enter("phrasing"),C=v.containerPhrasing(y,me(B({},N),{before:a,after:a}));return A(),x(),C}function f(y,w){return DF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const N=y.children;let x=-1;const A=[],C=w.enter("table");for(;++x<N.length;)A[x]=m(N[x],w,v);return C(),A}function m(y,w,v){const N=y.children;let x=-1;const A=[],C=w.enter("tableRow");for(;++x<N.length;)A[x]=d(N[x],y,w,v);return C(),A}function T(y,w,v){let N=e_.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function _9(){return{exit:{taskListCheckValueChecked:n_,taskListCheckValueUnchecked:n_,paragraph:S9}}}function x9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v9}}}function n_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function S9(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 l=o[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function v9(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=e_.listItem(e,t,n,B(B({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function A9(){return[iF(),vF(),NF(),m9(),_9()]}function C9(e){return{extensions:[oF(),AF(e),PF(),w9(e),x9()]}}const k9={tokenize:L9,partial:!0},r_={tokenize:D9,partial:!0},i_={tokenize:M9,partial:!0},o_={tokenize:F9,partial:!0},N9={tokenize:B9,partial:!0},s_={name:"wwwAutolink",tokenize:I9,previous:u_},a_={name:"protocolAutolink",tokenize:R9,previous:l_},di={name:"emailAutolink",tokenize:O9,previous:c_},Vr={};function P9(){return{text:Vr}}let Po=48;for(;Po<123;)Vr[Po]=di,Po++,Po===58?Po=65:Po===91&&(Po=97);Vr[43]=di,Vr[45]=di,Vr[46]=di,Vr[95]=di,Vr[72]=[di,a_],Vr[104]=[di,a_],Vr[87]=[di,s_],Vr[119]=[di,s_];function O9(e,t,n){const r=this;let o,a;return u;function u(m){return!Np(m)||!c_.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Np(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(N9,p,f)(m):m===45||m===95||Tn(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&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function I9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!u_.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(k9,e.attempt(r_,e.attempt(i_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function R9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&l_.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Nn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),l;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)||mt(m)||po(m)||vl(m)?n(m):e.attempt(r_,e.attempt(i_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function L9(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 D9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(o_,d,l)(f):f===null||mt(f)||po(f)||f!==45&&vl(f)?d(f):(a=!0,e.consume(f),u)}function l(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 M9(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(o_,t,a)(u):u===null||mt(u)||po(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function F9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),o):l===60||l===null||mt(l)||po(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||po(l)?t(l):r(l)}function a(l){return Nn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),u):n(l)}}function B9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function u_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function l_(e){return!Nn(e)}function c_(e){return!(e===47||Np(e))}function Np(e){return e===43||e===45||e===46||e===95||Tn(e)}function Pp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const U9={tokenize:W9,partial:!0};function H9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:V9,continuation:{tokenize:q9},exit:Y9}},text:{91:{name:"gfmFootnoteCall",tokenize:$9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:z9,resolveTo:j9}}}}function z9(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 l;function l(d){if(!u||!u._balanced)return n(d);const f=yr(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 j9(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)},l=[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,...l),e}function $9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||mt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(yr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return mt(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 V9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!l||w===null||w===91||mt(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=yr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return mt(w)||(l=!0),u++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function q9(e,t,n){return e.check(Ia,t,e.attempt(U9,t,n))}function Y9(e){e.exit("gfmFootnoteDefinition")}function W9(e,t,n){const r=this;return it(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 G9(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,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Xn(T,T.length,0,Al(y,u.slice(f+1,d),l)),Xn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Xn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(w){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=ss(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const N=u.exit("strikethroughSequenceTemporary"),x=ss(w);return N._open=!x||x===2&&!!v,N._close=!v||v===2&&!!x,l(w)}}}class X9{constructor(){this.map=[]}add(t,n,r){K9(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 K9(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 Q9(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 J9(){return{flow:{null:{name:"table",tokenize:Z9,resolveAll:e7}}}}function Z9(e,t,n){const r=this;let o=0,a=0,u;return l;function l($){let ie=r.events.length-1;for(;ie>-1;){const re=r.events[ie][1].type;if(re==="lineEnding"||re==="linePrefix")ie--;else break}const ue=ie>-1?r.events[ie][1].type:null,ve=ue==="tableHead"||ue==="tableRow"?R:d;return ve===R&&r.parser.lazy[r.now().line]?n($):ve($)}function d($){return e.enter("tableHead"),e.enter("tableRow"),f($)}function f($){return $===124||(u=!0,a+=1),p($)}function p($){return $===null?n($):ze($)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume($),e.exit("lineEnding"),y):n($):Ze($)?it(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||mt($)?(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($)?it(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)($):w($))}function w($){return $===45||$===58?N($):$===124?(u=!0,e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),v):Y($)}function v($){return Ze($)?it(e,N,"whitespace")($):N($)}function N($){return $===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),x):$===45?(a+=1,x($)):$===null||ze($)?U($):Y($)}function x($){return $===45?(e.enter("tableDelimiterFiller"),A($)):Y($)}function A($){return $===45?(e.consume($),A):$===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume($),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C($))}function C($){return Ze($)?it(e,U,"whitespace")($):U($)}function U($){return $===124?w($):$===null||ze($)?!u||o!==a?Y($):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t($)):Y($)}function Y($){return n($)}function R($){return e.enter("tableRow"),V($)}function V($){return $===124?(e.enter("tableCellDivider"),e.consume($),e.exit("tableCellDivider"),V):$===null||ze($)?(e.exit("tableRow"),t($)):Ze($)?it(e,V,"whitespace")($):(e.enter("data"),ne($))}function ne($){return $===null||$===124||mt($)?(e.exit("data"),V($)):(e.consume($),$===92?fe:ne)}function fe($){return $===92||$===124?(e.consume($),ne):ne($)}}function e7(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new X9;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(d_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(l=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=yc(T,t,a,o,n,m)):u[1]!==0&&(m=yc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&d_(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=Q9(t.events,n))}return e}function yc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Ps(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ps(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=Ps(t.events,n[2]),p=Ps(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},Ps(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function d_(e,t,n,r,o){const a=[],u=Ps(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 Ps(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const t7={name:"tasklistCheck",tokenize:r7};function n7(){return{text:{91:t7}}}function r7(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 mt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return ze(d)?t(d):Ze(d)?e.check({tokenize:i7},t,n)(d):n(d)}}function i7(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function o7(e){return FE([P9(),H9(),G9(e),J9(),n7()])}const s7={};function a7(e){const t=this,n=e||s7,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(o7(n)),a.push(A9()),u.push(C9(n))}const bc=()=>_.jsx("span",{className:`${z}-blinking-cursor`,children:_.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function u7(e){return/^tel:/i.test(e)?e:Ny(e)}const Op=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>_.jsx("div",{className:W(e,`${z}-markdown`),children:_.jsx(ky,{remarkPlugins:[a7],rehypePlugins:[Pb],urlTransform:u7,components:{h1:({children:a})=>_.jsx("h1",{className:W(e,`${z}-header h1`),children:a}),h2:({children:a})=>_.jsx("h2",{className:W(e,`${z}-header h2`),children:a}),h3:({children:a})=>_.jsx("h3",{className:W(e,`${z}-header h3`),children:a}),ul:({children:a})=>_.jsx("ul",{className:W(e,`${z}-ul`),children:a}),ol:({children:a})=>_.jsx("ol",{className:W(e,`${z}-ol`),children:a}),li:({children:a})=>_.jsx("li",{className:W(e,`${z}-li`),children:a}),a:({href:a,children:u})=>_.jsx(Fb,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>_.jsx("div",{className:W(e,`${z}-table-container`),children:_.jsx("table",{className:W(e,`${z}-table`),children:a})}),thead:({children:a})=>_.jsx("thead",{className:W(e,`${z}-thead`),children:a}),tbody:({children:a})=>_.jsx("tbody",{className:W(e,`${z}-tbody`),children:a}),tr:({children:a})=>_.jsx("tr",{className:W(e,`${z}-tr`),children:a}),th:({children:a})=>_.jsx("th",{className:W(e,`${z}-th`),children:a}),td:({children:a})=>_.jsx("td",{className:W(e,`${z}-td`),children:a}),span:({className:a,children:u})=>a===`${z}-blinking-cursor`?_.jsx(bc,{}):_.jsx("span",{children:u})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")})}),l7=({globalClassName:e,message:t})=>{const[n,r]=D.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return _.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-progress-message`,"standalone"),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","standalone"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&_.jsxs(_.Fragment,{children:[_.jsx(wl,{className:W(e,`${z}-thought-context-button`),onClick:l,children:n?_.jsxs(_.Fragment,{children:["Hide ",_.jsx(ON,{"aria-hidden":"true"})]}):_.jsxs(_.Fragment,{children:["Context ",_.jsx(IN,{"aria-hidden":"true"})]})}),n&&_.jsx("div",{className:W(e,`${z}-thought-container`),children:a&&_.jsx("p",{className:W(e,`${z}-progress-thought`),children:t.thought})})]})]})},c7=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?_.jsx(l7,{globalClassName:e,message:t}):_.jsxs("div",{className:W(e,`${z}-progress-message`,"embedded"),title:t.message,children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","embedded"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("i",{className:W(e,`${z}-progress-text`,"embedded"),children:t.message})]}),d7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return _.jsxs("div",{className:W(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&_.jsxs("div",{className:W(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),_.jsx(Op,{text:t.message})]})},f_=e=>{var d,f;const{configModule:t}=tt(),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),l=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:l}},Tc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>_.jsx("span",{className:W(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),h_=({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(l=>{var f;const d=((f=o[l])==null?void 0:f.join(", "))||"";return _.jsxs("div",{className:W(e,`${z}-facets`),children:[_.jsx("p",{className:W(e,`${z}-facet-category`),children:l}),_.jsx("p",{className:W(e,`${z}-facet-values`),children:d})]},l)})},su=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>_.jsx("span",{className:W(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),f7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=f_(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?_.jsxs("div",{className:W(e,`${z}-user-message standalone`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon standalone`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:a,message:t}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):_.jsxs("div",{className:W(e,`${z}-user-message embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row embedded`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon embedded`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:u})]}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},h7=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>_.jsxs("div",{className:W(e,`${z}-user-search standalone`),children:[_.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-user-search-query standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon standalone`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:u,message:a})]}),_.jsx(su,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),p7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=f_(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}=D.useMemo(()=>{var v,N,x;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(N=r==null?void 0:r.clientContext)==null?void 0:N.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:(x=r==null?void 0:r.browseParams)==null?void 0:x.categoryId,queryLabel:w||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:w||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?_.jsx(h7,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):_.jsxs("div",{className:W(e,`${z}-user-search embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-search-query embedded`),children:[f?_.jsx("img",{className:W(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon embedded`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:l})]}),_.jsx(su,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},p_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Rr(),{onNavigate:f}=tt(),p=v=>_p({event:v,openLinksInNewTab:n,onNavigate:f}),m=l&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const T=e.name,y=!!((w=e.request)!=null&&w.userPrompt);switch(T){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return y?_.jsx(f7,{globalClassName:t,isWidgetStandalone:a,message:e}):_.jsx(p7,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return _.jsx(d7,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return _.jsx(JM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return _.jsx(Op,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return _.jsx(QM,{message:e,isWidgetStandalone:a});case"display_products":return _.jsx(KM,{message:e,isWidgetStandalone:a});case"progress":return _.jsx(c7,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:_.jsxs(_.Fragment,{children:[_.jsx("p",{className:W(t,`${z}-reset-message`),children:"This conversation has been reset."}),_.jsx("p",{className:W(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},m7=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=tt(),{groupedMessages:a}=Wn(),{entryType:u}=Yn();return _.jsxs(_.Fragment,{children:[u==="ask_cim"&&_.jsx(YM,{isWidgetStandalone:e}),a.map(l=>{if(l.messages&&l.type==="group"){let d=new Date(l.createdAt).toLocaleString();const f=l.messages[l.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),_.jsxs("div",{className:W(n,`${z}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>_.jsx("div",{className:`${z}-message-group-child`,children:_.jsx(p_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),_.jsx(su,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return _.jsx("div",{className:W(n,`${z}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:_.jsx(p_,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},g7=4e3,E7=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,g7),y7=({message:e,announcementKey:t})=>{const[n,r]=D.useState("");return D.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),_.jsx("span",{className:`${z}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},b7=()=>{const{groupedMessages:e}=Wn(),n=e.flatMap(r=>{var o;return r.type==="group"?(o=r.messages)!=null?o:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return _.jsx(y7,{message:n?E7(n.message):"",announcementKey:n==null?void 0:n.id})},T7=({isOpen:e}={})=>{const{messages:t}=Rr(),{autoScroll:n}=tt(),r=D.useRef(null);return D.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),D.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},w7={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Ip=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=T7({isOpen:e});return _.jsxs(_.Fragment,{children:[_.jsx(m7,{isWidgetStandalone:t,handleSuggestionClick:r}),_.jsx(b7,{}),n&&_.jsx("div",{style:B(B({},w7),o),children:_.jsx(bc,{})}),_.jsx("div",{ref:a})]})},m_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{copilot:o,isLoading:a,handleUserInput:u,handleSuggestion:l,resetConversation:d}=Rr();return Tp()?o?_.jsxs("div",{className:W(t,`${z}-container`,`${z}-embedded-chat`,e),style:n,children:[_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:l})}),_.jsx(Ih,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u}),_.jsx("div",{className:W(`${z}-embedded-chat-menu`),children:_.jsxs(J8,{componentType:"chat",children:[_.jsx(Dw,{componentType:"chat"}),_.jsx(Hb,{componentType:"chat",onClearChat:d})]})})]}):_.jsx("div",{children:"Loading Copilot..."}):null},g_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=D.useState((d=e.container)==null?void 0:d.current),a=D.useSyncExternalStore(x7,()=>!1,()=>!0),{getRootNode:u}=hc();if(D.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:_7(u);return _.jsx(_.Fragment,{children:D.Children.map(t,f=>co.createPortal(f,l))})},_7=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return _o(n)?n:Fr(t).body},x7=()=>()=>{},S7=["toggleDialogPosition","minimize","clearChat"],v7=["toggleFullscreen","minimize","clearChat"],E_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=Yn(),{copilot:p,isLoading:m,handleUserInput:T,handleSuggestion:y,resetConversation:w}=Rr(),v=Tp(),{isOpen:N}=u||{},x=a==="standalone",A=()=>{ri(!1),Ff()};return p?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsx(gp,{className:W(t,`${z}-dialog-positioner`),style:n,children:_.jsxs(mp,{className:W(t,`${z}-container`,`${z}-dialog`,`${z}-dialog-content`,e,l,d&&"full-height",{standalone:x,embedded:!x}),style:f?{width:f}:void 0,children:[_.jsx(Lw,{componentType:"dialog",overflowActions:S7,onClearChat:w,onClose:A}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:x,embedded:!x}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:x,isLoading:m,isOpen:N,handleSuggestionClick:y})}),_.jsx(Ih,{componentType:"dialog",isLoading:m,onSubmit:T})]})})})}):_.jsx("div",{children:"Loading Copilot..."})},y_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,isModalFullscreen:l}=Yn(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Rr(),{isOpen:y}=u||{},w=a==="standalone",v=Tp(),N=({open:A})=>{if(A){ri(!0);return}x()},x=()=>{ri(!1),Ff()};return v?d?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,open:v,"aria-label":o==null?void 0:o.headerText,onOpenChange:N,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsxs("div",{className:W(t,`${z}-modal-container`),style:n,children:[_.jsx(vw,{className:W(t,`${z}-modal-backdrop`)}),_.jsx(gp,{className:W(t,`${z}-container`,`${z}-modal`,e,{fullscreen:l,standalone:w,embedded:!w}),children:_.jsxs(mp,{className:W(t,`${z}-modal-content`,{standalone:w,embedded:!w}),children:[_.jsx(Lw,{componentType:"modal",overflowActions:v7,onClearChat:T,onClose:x}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:w,isLoading:f,isOpen:y,handleSuggestionClick:m,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),_.jsx(Ih,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):_.jsx("div",{children:"Loading Copilot..."}):null},A7=()=>{const e=Yn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(CN,{}):t==="dialog"?_.jsx(E_,{}):t==="modal"?_.jsx(y_,{}):_.jsx(m_,{})},C7=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=If();D.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&o(d))};return Lk(a),()=>{Dk(a)}},[e,t,n,r,o])},k7=()=>{const{copilot:e}=Wn(),{entryType:t,activePromptsId:n,params:r}=ii(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:l,setIsResponseLoading:d}=If(),{getCopilotSuggestions:f}=V1();C7();const p=D.useCallback(w=>{if(!t||!w)return;f(w,t,N=>{a(N.id)})},[t,f,a]);D.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=D.useCallback(w=>{w.eventSourceId===n&&(u(w),a(w.id),o(!0))},[n,u,a,o]),T=D.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(l(w),d(!1))},[n,l,d]),y=D.useCallback(()=>{o(!0),d(!1)},[o,d]);return D.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},b_={copilot:"Ask Copilot",messaging:"Ask a question"},N7=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:o,isResponseLoading:a}=ii(),u=o||b_[r],[l,d]=D.useState(""),f=t||a,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return _.jsxs("form",{className:W(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:_.jsx(pp,{"aria-hidden":"true",className:W(n,`${z}-prompts-input-icon`)})}),_.jsx("input",{id:`${z}-prompts-input`,className:W(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text","aria-disabled":f||void 0,value:l,onBeforeInput:m,onPaste:m,onChange:T=>{f||d(T.target.value)}}),_.jsx(oi,{className:W(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(ns,{}),disabled:f})]})},P7=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ii(),r=n||b_[t];return _.jsxs("div",{className:W(e,`${z}-prompts-header`),children:[_.jsx(pp,{className:W(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:W(e,`${z}-prompts-header-text`),children:r})]})},T_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=tt(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return _.jsxs("button",{className:W(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(wp,{icon:a,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},O7="Ask me something else",I7=({label:e,disabled:t=!1})=>_.jsx(T_,{label:e||O7,disabled:t,onClick:()=>ri(!0)}),R7=({sendCopilotPrompt:e})=>{var N,x;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=ii(),p=o?(x=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(A=>A.displayText.trim()).filter(Boolean))!=null?x:[]:[],m=o?W0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=A=>()=>{const C=A.trim();C&&e(C)};return _.jsxs("div",{className:W(t,`${z}-prompts-button-group`),children:[T&&_.jsx(bc,{}),m.map(A=>_.jsx(T_,{label:A,disabled:r,onClick:v(A)},A)),w&&_.jsx(I7,{label:u,disabled:r})]})},L7=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ii();return!n||!t?null:_.jsx("div",{className:W(e,`${z}-prompts-user-message-container`),children:_.jsx("p",{className:W(e,`${z}-prompts-user-message`),children:n})})},D7=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=tt(),{isInline:r,responseMessage:o,isResponseLoading:a}=ii();if(!r||!o&&!a)return null;if(a)return _.jsx(bc,{});if(!o)return null;const u=l=>_p({event:l,openLinksInNewTab:t,onNavigate:n});return _.jsx("div",{className:W(e,`${z}-prompts-response-container`,`${z}-message-container`),children:_.jsx(Op,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},M7=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Wn(),{handleCopilotRequestAck:o}=ts(),{status:{isOpen:a}}=Yn(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=ii(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:N,setIsResponseLoading:x}=If(),[A,C]=D.useState(null);D.useEffect(()=>{if(!d||A)return;const Y=document.getElementById(d);Y&&C(Y)},[d,A]);const U=D.useCallback(Y=>{if(!r||!f||!p)return;const R=ne=>{l?(N(null),v(Y),w(ne.id),x(!0)):(a||ri(!0),o(ne))},V={userPrompt:Y,clientContext:B({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(V,R);break;case"search":r.search(B({searchParams:p},V),R);break;case"browse":r.browse(B({browseParams:p},V),R);break;case"pdp":r.productView(B(B({},p),V),R);break}},[r,l,f,p,a,w,N,v,x,o]);return!n||!u||!A||!f?null:co.createPortal(_.jsxs("div",{className:W(e,`${z}-prompts-extension-container`),style:t,children:[T&&_.jsx(N7,{onSubmit:U}),!T&&_.jsx(P7,{}),y&&_.jsx(R7,{sendCopilotPrompt:U}),_.jsxs("div",{className:W(e,`${z}-prompts-extension-messages-container`),children:[_.jsx(L7,{}),_.jsx(D7,{})]})]}),A)},F7=()=>_.jsxs(_.Fragment,{children:[_.jsx(k7,{}),_.jsx(M7,{})]}),w_=e=>_.jsxs(q1,me(B({},e),{children:[_.jsx(A7,{}),_.jsx(F7,{})]}));var wc={},__;function B7(){if(__)return wc;__=1;var e=K1();return wc.createRoot=e.createRoot,wc.hydrateRoot=e.hydrateRoot,wc}var U7=B7();const x_=new WeakMap,S_=(e,t)=>{let n=x_.get(e);n||(n=U7.createRoot(e),x_.set(e,n)),n.render(_.jsx(w_,B({},t)))},H7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=mn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(es(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),S_(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),es(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l},z7=r=>{var o=r,{timeout:e,elementId:t}=o,n=mn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){es(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){es(!0,"warn","Container element not found for id:",t),es(!0,"warn","Beginning observation for element"),H7(B({elementId:t,timeout:e},n));return}S_(a,n)},j7={search:Wk,browse:Nk,pdp:{setPdpContext:P1,updatePdpProductId:Ok,updatePdpLink:Ik},components:{setEntryType:Ta,toggleWidgetOpen:ri,toggleWidgetMinimized:wa,toggleModalFullscreen:kf,setWidgetType:yl,setWidgetDialogPosition:Nf,togglePromptsExtensionOpen:O1,togglePromptsExtensionInline:I1,loadPromptsComponent:Hk,getAskCimPrompts:Mk,getSearchPrompts:Fk,getBrowsePrompts:Bk,getProductViewPrompts:Uk},session:zk},$7=()=>Object.freeze({search:Object.freeze(xt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(Er.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});Fe.CopilotDialog=E_,Fe.CopilotEmbed=m_,Fe.CopilotModal=y_,Fe.CopilotWidget=w_,Fe.CopilotWidgetProvider=q1,Fe.eventHandlers=j7,Fe.injectCopilotWidget=z7,Fe.resolveTheme=pg,Fe.state=$7,Fe.themes=Vv,Fe.useCopilot=Rr,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
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:l}};function u(y,w,v,N){return f(p(y,v,N),y.align)}function l(y,w,v,N){const x=m(y,v,N),C=f([x]);return C.slice(0,C.indexOf(`
46
+ `))}function d(y,w,v,N){const x=v.enter("tableCell"),C=v.enter("phrasing"),A=v.containerPhrasing(y,me(B({},N),{before:a,after:a}));return C(),x(),A}function f(y,w){return DF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const N=y.children;let x=-1;const C=[],A=w.enter("table");for(;++x<N.length;)C[x]=m(N[x],w,v);return A(),C}function m(y,w,v){const N=y.children;let x=-1;const C=[],A=w.enter("tableRow");for(;++x<N.length;)C[x]=d(N[x],y,w,v);return A(),C}function T(y,w,v){let N=e_.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function _9(){return{exit:{taskListCheckValueChecked:n_,taskListCheckValueUnchecked:n_,paragraph:S9}}}function x9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v9}}}function n_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function S9(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 l=o[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function v9(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=e_.listItem(e,t,n,B(B({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function A9(){return[iF(),vF(),NF(),m9(),_9()]}function C9(e){return{extensions:[oF(),AF(e),PF(),w9(e),x9()]}}const k9={tokenize:L9,partial:!0},r_={tokenize:D9,partial:!0},i_={tokenize:M9,partial:!0},o_={tokenize:F9,partial:!0},N9={tokenize:B9,partial:!0},s_={name:"wwwAutolink",tokenize:I9,previous:u_},a_={name:"protocolAutolink",tokenize:R9,previous:l_},di={name:"emailAutolink",tokenize:O9,previous:c_},Vr={};function P9(){return{text:Vr}}let Po=48;for(;Po<123;)Vr[Po]=di,Po++,Po===58?Po=65:Po===91&&(Po=97);Vr[43]=di,Vr[45]=di,Vr[46]=di,Vr[95]=di,Vr[72]=[di,a_],Vr[104]=[di,a_],Vr[87]=[di,s_],Vr[119]=[di,s_];function O9(e,t,n){const r=this;let o,a;return u;function u(m){return!Np(m)||!c_.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Np(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(N9,p,f)(m):m===45||m===95||Tn(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&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function I9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!u_.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(k9,e.attempt(r_,e.attempt(i_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function R9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&l_.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Nn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),l;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)||mt(m)||po(m)||vl(m)?n(m):e.attempt(r_,e.attempt(i_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function L9(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 D9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(o_,d,l)(f):f===null||mt(f)||po(f)||f!==45&&vl(f)?d(f):(a=!0,e.consume(f),u)}function l(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 M9(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(o_,t,a)(u):u===null||mt(u)||po(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function F9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),o):l===60||l===null||mt(l)||po(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||po(l)?t(l):r(l)}function a(l){return Nn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),u):n(l)}}function B9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function u_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function l_(e){return!Nn(e)}function c_(e){return!(e===47||Np(e))}function Np(e){return e===43||e===45||e===46||e===95||Tn(e)}function Pp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const U9={tokenize:W9,partial:!0};function H9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:V9,continuation:{tokenize:q9},exit:Y9}},text:{91:{name:"gfmFootnoteCall",tokenize:$9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:z9,resolveTo:j9}}}}function z9(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 l;function l(d){if(!u||!u._balanced)return n(d);const f=yr(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 j9(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)},l=[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,...l),e}function $9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||mt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(yr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return mt(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 V9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!l||w===null||w===91||mt(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=yr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return mt(w)||(l=!0),u++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function q9(e,t,n){return e.check(Ia,t,e.attempt(U9,t,n))}function Y9(e){e.exit("gfmFootnoteDefinition")}function W9(e,t,n){const r=this;return it(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 G9(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,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Xn(T,T.length,0,Al(y,u.slice(f+1,d),l)),Xn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Xn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(w){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=ss(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const N=u.exit("strikethroughSequenceTemporary"),x=ss(w);return N._open=!x||x===2&&!!v,N._close=!v||v===2&&!!x,l(w)}}}class X9{constructor(){this.map=[]}add(t,n,r){K9(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 K9(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 Q9(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 J9(){return{flow:{null:{name:"table",tokenize:Z9,resolveAll:e7}}}}function Z9(e,t,n){const r=this;let o=0,a=0,u;return l;function l(V){let ie=r.events.length-1;for(;ie>-1;){const re=r.events[ie][1].type;if(re==="lineEnding"||re==="linePrefix")ie--;else break}const fe=ie>-1?r.events[ie][1].type:null,we=fe==="tableHead"||fe==="tableRow"?R:d;return we===R&&r.parser.lazy[r.now().line]?n(V):we(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):ze(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?it(e,p,"whitespace")(V):(a+=1,u&&(u=!1,o+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||mt(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?it(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):w(V))}function w(V){return V===45||V===58?N(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),v):Y(V)}function v(V){return Ze(V)?it(e,N,"whitespace")(V):N(V)}function N(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),x):V===45?(a+=1,x(V)):V===null||ze(V)?U(V):Y(V)}function x(V){return V===45?(e.enter("tableDelimiterFiller"),C(V)):Y(V)}function C(V){return V===45?(e.consume(V),C):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(V))}function A(V){return Ze(V)?it(e,U,"whitespace")(V):U(V)}function U(V){return V===124?w(V):V===null||ze(V)?!u||o!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function R(V){return e.enter("tableRow"),$(V)}function $(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),$):V===null||ze(V)?(e.exit("tableRow"),t(V)):Ze(V)?it(e,$,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||mt(V)?(e.exit("data"),$(V)):(e.consume(V),V===92?de:ne)}function de(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function e7(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new X9;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(d_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(l=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=yc(T,t,a,o,n,m)):u[1]!==0&&(m=yc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&d_(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=Q9(t.events,n))}return e}function yc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Ps(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ps(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=Ps(t.events,n[2]),p=Ps(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},Ps(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function d_(e,t,n,r,o){const a=[],u=Ps(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 Ps(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const t7={name:"tasklistCheck",tokenize:r7};function n7(){return{text:{91:t7}}}function r7(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 mt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return ze(d)?t(d):Ze(d)?e.check({tokenize:i7},t,n)(d):n(d)}}function i7(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function o7(e){return FE([P9(),H9(),G9(e),J9(),n7()])}const s7={};function a7(e){const t=this,n=e||s7,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(o7(n)),a.push(A9()),u.push(C9(n))}const bc=()=>_.jsx("span",{className:`${z}-blinking-cursor`,children:_.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function u7(e){return/^tel:/i.test(e)?e:Ny(e)}const Op=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>_.jsx("div",{className:W(e,`${z}-markdown`),children:_.jsx(ky,{remarkPlugins:[a7],rehypePlugins:[Pb],urlTransform:u7,components:{h1:({children:a})=>_.jsx("h1",{className:W(e,`${z}-header h1`),children:a}),h2:({children:a})=>_.jsx("h2",{className:W(e,`${z}-header h2`),children:a}),h3:({children:a})=>_.jsx("h3",{className:W(e,`${z}-header h3`),children:a}),ul:({children:a})=>_.jsx("ul",{className:W(e,`${z}-ul`),children:a}),ol:({children:a})=>_.jsx("ol",{className:W(e,`${z}-ol`),children:a}),li:({children:a})=>_.jsx("li",{className:W(e,`${z}-li`),children:a}),a:({href:a,children:u})=>_.jsx(Fb,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>_.jsx("div",{className:W(e,`${z}-table-container`),children:_.jsx("table",{className:W(e,`${z}-table`),children:a})}),thead:({children:a})=>_.jsx("thead",{className:W(e,`${z}-thead`),children:a}),tbody:({children:a})=>_.jsx("tbody",{className:W(e,`${z}-tbody`),children:a}),tr:({children:a})=>_.jsx("tr",{className:W(e,`${z}-tr`),children:a}),th:({children:a})=>_.jsx("th",{className:W(e,`${z}-th`),children:a}),td:({children:a})=>_.jsx("td",{className:W(e,`${z}-td`),children:a}),span:({className:a,children:u})=>a===`${z}-blinking-cursor`?_.jsx(bc,{}):_.jsx("span",{children:u})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")})}),l7=({globalClassName:e,message:t})=>{const[n,r]=D.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return _.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-progress-message`,"standalone"),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","standalone"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&_.jsxs(_.Fragment,{children:[_.jsx(wl,{className:W(e,`${z}-thought-context-button`),onClick:l,children:n?_.jsxs(_.Fragment,{children:["Hide ",_.jsx(ON,{"aria-hidden":"true"})]}):_.jsxs(_.Fragment,{children:["Context ",_.jsx(IN,{"aria-hidden":"true"})]})}),n&&_.jsx("div",{className:W(e,`${z}-thought-container`),children:a&&_.jsx("p",{className:W(e,`${z}-progress-thought`),children:t.thought})})]})]})},c7=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?_.jsx(l7,{globalClassName:e,message:t}):_.jsxs("div",{className:W(e,`${z}-progress-message`,"embedded"),title:t.message,children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","embedded"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("i",{className:W(e,`${z}-progress-text`,"embedded"),children:t.message})]}),d7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return _.jsxs("div",{className:W(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&_.jsxs("div",{className:W(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),_.jsx(Op,{text:t.message})]})},f_=e=>{var d,f;const{configModule:t}=tt(),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),l=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:l}},Tc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>_.jsx("span",{className:W(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),h_=({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(l=>{var f;const d=((f=o[l])==null?void 0:f.join(", "))||"";return _.jsxs("div",{className:W(e,`${z}-facets`),children:[_.jsx("p",{className:W(e,`${z}-facet-category`),children:l}),_.jsx("p",{className:W(e,`${z}-facet-values`),children:d})]},l)})},su=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>_.jsx("span",{className:W(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),f7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=f_(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?_.jsxs("div",{className:W(e,`${z}-user-message standalone`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon standalone`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:a,message:t}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):_.jsxs("div",{className:W(e,`${z}-user-message embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row embedded`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon embedded`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:u})]}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},h7=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>_.jsxs("div",{className:W(e,`${z}-user-search standalone`),children:[_.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-user-search-query standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon standalone`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:u,message:a})]}),_.jsx(su,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),p7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=f_(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}=D.useMemo(()=>{var v,N,x;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(N=r==null?void 0:r.clientContext)==null?void 0:N.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:(x=r==null?void 0:r.browseParams)==null?void 0:x.categoryId,queryLabel:w||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:w||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?_.jsx(h7,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):_.jsxs("div",{className:W(e,`${z}-user-search embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-search-query embedded`),children:[f?_.jsx("img",{className:W(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon embedded`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:l})]}),_.jsx(su,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},p_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Rr(),{onNavigate:f}=tt(),p=v=>_p({event:v,openLinksInNewTab:n,onNavigate:f}),m=l&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const T=e.name,y=!!((w=e.request)!=null&&w.userPrompt);switch(T){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return y?_.jsx(f7,{globalClassName:t,isWidgetStandalone:a,message:e}):_.jsx(p7,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return _.jsx(d7,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return _.jsx(JM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return _.jsx(Op,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return _.jsx(QM,{message:e,isWidgetStandalone:a});case"display_products":return _.jsx(KM,{message:e,isWidgetStandalone:a});case"progress":return _.jsx(c7,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:_.jsxs(_.Fragment,{children:[_.jsx("p",{className:W(t,`${z}-reset-message`),children:"This conversation has been reset."}),_.jsx("p",{className:W(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},m7=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=tt(),{groupedMessages:a}=Wn(),{entryType:u}=Yn();return _.jsxs(_.Fragment,{children:[u==="ask_cim"&&_.jsx(YM,{isWidgetStandalone:e}),a.map(l=>{if(l.messages&&l.type==="group"){let d=new Date(l.createdAt).toLocaleString();const f=l.messages[l.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),_.jsxs("div",{className:W(n,`${z}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>_.jsx("div",{className:`${z}-message-group-child`,children:_.jsx(p_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),_.jsx(su,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return _.jsx("div",{className:W(n,`${z}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:_.jsx(p_,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},g7=4e3,E7=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,g7),y7=({message:e,announcementKey:t})=>{const[n,r]=D.useState("");return D.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),_.jsx("span",{className:`${z}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},b7=()=>{const{groupedMessages:e}=Wn(),n=e.flatMap(r=>{var o;return r.type==="group"?(o=r.messages)!=null?o:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return _.jsx(y7,{message:n?E7(n.message):"",announcementKey:n==null?void 0:n.id})},T7=({isOpen:e}={})=>{const{messages:t}=Rr(),{autoScroll:n}=tt(),r=D.useRef(null);return D.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),D.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},w7={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Ip=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=T7({isOpen:e});return _.jsxs(_.Fragment,{children:[_.jsx(m7,{isWidgetStandalone:t,handleSuggestionClick:r}),_.jsx(b7,{}),n&&_.jsx("div",{style:B(B({},w7),o),children:_.jsx(bc,{})}),_.jsx("div",{ref:a})]})},m_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{copilot:o,isLoading:a,handleUserInput:u,handleSuggestion:l,resetConversation:d}=Rr();return Tp()?o?_.jsxs("div",{className:W(t,`${z}-container`,`${z}-embedded-chat`,e),style:n,children:[_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:l})}),_.jsx(Ih,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u}),_.jsx("div",{className:W(`${z}-embedded-chat-menu`),children:_.jsxs(J8,{componentType:"chat",children:[_.jsx(Dw,{componentType:"chat"}),_.jsx(Hb,{componentType:"chat",onClearChat:d})]})})]}):_.jsx("div",{children:"Loading Copilot..."}):null},g_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=D.useState((d=e.container)==null?void 0:d.current),a=D.useSyncExternalStore(x7,()=>!1,()=>!0),{getRootNode:u}=hc();if(D.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:_7(u);return _.jsx(_.Fragment,{children:D.Children.map(t,f=>co.createPortal(f,l))})},_7=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return _o(n)?n:Fr(t).body},x7=()=>()=>{},S7=["toggleDialogPosition","minimize","clearChat"],v7=["toggleFullscreen","minimize","clearChat"],E_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=Yn(),{copilot:p,isLoading:m,handleUserInput:T,handleSuggestion:y,resetConversation:w}=Rr(),v=Tp(),{isOpen:N}=u||{},x=a==="standalone",C=()=>{ri(!1),Ff()};return p?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsx(gp,{className:W(t,`${z}-dialog-positioner`),style:n,children:_.jsxs(mp,{className:W(t,`${z}-container`,`${z}-dialog`,`${z}-dialog-content`,e,l,d&&"full-height",{standalone:x,embedded:!x}),style:f?{width:f}:void 0,children:[_.jsx(Lw,{componentType:"dialog",overflowActions:S7,onClearChat:w,onClose:C}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:x,embedded:!x}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:x,isLoading:m,isOpen:N,handleSuggestionClick:y})}),_.jsx(Ih,{componentType:"dialog",isLoading:m,onSubmit:T})]})})})}):_.jsx("div",{children:"Loading Copilot..."})},y_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,isModalFullscreen:l}=Yn(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Rr(),{isOpen:y}=u||{},w=a==="standalone",v=Tp(),N=({open:C})=>{if(C){ri(!0);return}x()},x=()=>{ri(!1),Ff()};return v?d?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,open:v,"aria-label":o==null?void 0:o.headerText,onOpenChange:N,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsxs("div",{className:W(t,`${z}-modal-container`),style:n,children:[_.jsx(vw,{className:W(t,`${z}-modal-backdrop`)}),_.jsx(gp,{className:W(t,`${z}-container`,`${z}-modal`,e,{fullscreen:l,standalone:w,embedded:!w}),children:_.jsxs(mp,{className:W(t,`${z}-modal-content`,{standalone:w,embedded:!w}),children:[_.jsx(Lw,{componentType:"modal",overflowActions:v7,onClearChat:T,onClose:x}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:w,isLoading:f,isOpen:y,handleSuggestionClick:m,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),_.jsx(Ih,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):_.jsx("div",{children:"Loading Copilot..."}):null},A7=()=>{const e=Yn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(CN,{}):t==="dialog"?_.jsx(E_,{}):t==="modal"?_.jsx(y_,{}):_.jsx(m_,{})},C7=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=If();D.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&o(d))};return Lk(a),()=>{Dk(a)}},[e,t,n,r,o])},k7=()=>{const{copilot:e}=Wn(),{entryType:t,activePromptsId:n,params:r}=ii(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:l,setIsResponseLoading:d}=If(),{getCopilotSuggestions:f}=V1();C7();const p=D.useCallback(w=>{if(!t||!w)return;f(w,t,N=>{a(N.id)})},[t,f,a]);D.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=D.useCallback(w=>{w.eventSourceId===n&&(u(w),a(w.id),o(!0))},[n,u,a,o]),T=D.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(l(w),d(!1))},[n,l,d]),y=D.useCallback(()=>{o(!0),d(!1)},[o,d]);return D.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},b_={copilot:"Ask Copilot",messaging:"Ask a question"},N7=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:o,isResponseLoading:a}=ii(),u=o||b_[r],[l,d]=D.useState(""),f=t||a,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return _.jsxs("form",{className:W(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:_.jsx(pp,{"aria-hidden":"true",className:W(n,`${z}-prompts-input-icon`)})}),_.jsx("input",{id:`${z}-prompts-input`,className:W(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text","aria-disabled":f||void 0,value:l,onBeforeInput:m,onPaste:m,onChange:T=>{f||d(T.target.value)}}),_.jsx(oi,{className:W(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(ns,{}),disabled:f})]})},P7=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ii(),r=n||b_[t];return _.jsxs("div",{className:W(e,`${z}-prompts-header`),children:[_.jsx(pp,{className:W(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:W(e,`${z}-prompts-header-text`),children:r})]})},T_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=tt(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return _.jsxs("button",{className:W(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(wp,{icon:a,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},O7="Ask me something else",I7=({label:e,disabled:t=!1})=>_.jsx(T_,{label:e||O7,disabled:t,onClick:()=>ri(!0)}),R7=({sendCopilotPrompt:e})=>{var N,x;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=ii(),p=o?(x=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(C=>C.displayText.trim()).filter(Boolean))!=null?x:[]:[],m=o?W0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=C=>()=>{const A=C.trim();A&&e(A)};return _.jsxs("div",{className:W(t,`${z}-prompts-button-group`),children:[T&&_.jsx(bc,{}),m.map(C=>_.jsx(T_,{label:C,disabled:r,onClick:v(C)},C)),w&&_.jsx(I7,{label:u,disabled:r})]})},L7=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ii();return!n||!t?null:_.jsx("div",{className:W(e,`${z}-prompts-user-message-container`),children:_.jsx("p",{className:W(e,`${z}-prompts-user-message`),children:n})})},D7=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=tt(),{isInline:r,responseMessage:o,isResponseLoading:a}=ii();if(!r||!o&&!a)return null;if(a)return _.jsx(bc,{});if(!o)return null;const u=l=>_p({event:l,openLinksInNewTab:t,onNavigate:n});return _.jsx("div",{className:W(e,`${z}-prompts-response-container`,`${z}-message-container`),children:_.jsx(Op,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},M7=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Wn(),{handleCopilotRequestAck:o}=ts(),{status:{isOpen:a}}=Yn(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=ii(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:N,setIsResponseLoading:x}=If(),[C,A]=D.useState(null);D.useEffect(()=>{if(!d||C)return;const Y=document.getElementById(d);Y&&A(Y)},[d,C]);const U=D.useCallback(Y=>{if(!r||!f||!p)return;const R=ne=>{l?(N(null),v(Y),w(ne.id),x(!0)):(a||ri(!0),o(ne))},$={userPrompt:Y,clientContext:B({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim($,R);break;case"search":r.search(B({searchParams:p},$),R);break;case"browse":r.browse(B({browseParams:p},$),R);break;case"pdp":r.productView(B(B({},p),$),R);break}},[r,l,f,p,a,w,N,v,x,o]);return!n||!u||!C||!f?null:co.createPortal(_.jsxs("div",{className:W(e,`${z}-prompts-extension-container`),style:t,children:[T&&_.jsx(N7,{onSubmit:U}),!T&&_.jsx(P7,{}),y&&_.jsx(R7,{sendCopilotPrompt:U}),_.jsxs("div",{className:W(e,`${z}-prompts-extension-messages-container`),children:[_.jsx(L7,{}),_.jsx(D7,{})]})]}),C)},F7=()=>_.jsxs(_.Fragment,{children:[_.jsx(k7,{}),_.jsx(M7,{})]}),w_=e=>_.jsxs(q1,me(B({},e),{children:[_.jsx(A7,{}),_.jsx(F7,{})]}));var wc={},__;function B7(){if(__)return wc;__=1;var e=K1();return wc.createRoot=e.createRoot,wc.hydrateRoot=e.hydrateRoot,wc}var U7=B7();const x_=new WeakMap,S_=(e,t)=>{let n=x_.get(e);n||(n=U7.createRoot(e),x_.set(e,n)),n.render(_.jsx(w_,B({},t)))},H7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=mn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(es(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),S_(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),es(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l},z7=r=>{var o=r,{timeout:e,elementId:t}=o,n=mn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){es(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){es(!0,"warn","Container element not found for id:",t),es(!0,"warn","Beginning observation for element"),H7(B({elementId:t,timeout:e},n));return}S_(a,n)},j7={search:Wk,browse:Nk,pdp:{setPdpContext:P1,updatePdpProductId:Ok,updatePdpLink:Ik},components:{setEntryType:Ta,toggleWidgetOpen:ri,toggleWidgetMinimized:wa,toggleModalFullscreen:kf,setWidgetType:yl,setWidgetDialogPosition:Nf,togglePromptsExtensionOpen:O1,togglePromptsExtensionInline:I1,loadPromptsComponent:Hk,getAskCimPrompts:Mk,getSearchPrompts:Fk,getBrowsePrompts:Bk,getProductViewPrompts:Uk},session:zk},$7=()=>Object.freeze({search:Object.freeze(xt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(Er.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});Fe.CopilotDialog=E_,Fe.CopilotEmbed=m_,Fe.CopilotModal=y_,Fe.CopilotWidget=w_,Fe.CopilotWidgetProvider=q1,Fe.eventHandlers=j7,Fe.injectCopilotWidget=z7,Fe.resolveTheme=pg,Fe.state=$7,Fe.themes=Vv,Fe.useCopilot=Rr,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));