@cimulate/copilot-widget 1.62.2 → 1.62.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,46 +1,46 @@
1
- (function(qe,Ue){typeof exports=="object"&&typeof module!="undefined"?module.exports=Ue():typeof define=="function"&&define.amd?define(Ue):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=Ue())})(this,(function(){"use strict";var XU=Object.defineProperty,KU=Object.defineProperties;var QU=Object.getOwnPropertyDescriptors;var zd=Object.getOwnPropertySymbols;var gS=Object.prototype.hasOwnProperty,ES=Object.prototype.propertyIsEnumerable;var fa=(qe,Ue)=>(Ue=Symbol[qe])?Ue:Symbol.for("Symbol."+qe),JU=qe=>{throw TypeError(qe)},Zu=Math.pow,kg=(qe,Ue,Ke)=>Ue in qe?XU(qe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):qe[Ue]=Ke,F=(qe,Ue)=>{for(var Ke in Ue||(Ue={}))gS.call(Ue,Ke)&&kg(qe,Ke,Ue[Ke]);if(zd)for(var Ke of zd(Ue))ES.call(Ue,Ke)&&kg(qe,Ke,Ue[Ke]);return qe},ge=(qe,Ue)=>KU(qe,QU(Ue));var bn=(qe,Ue)=>{var Ke={};for(var lt in qe)gS.call(qe,lt)&&Ue.indexOf(lt)<0&&(Ke[lt]=qe[lt]);if(qe!=null&&zd)for(var lt of zd(qe))Ue.indexOf(lt)<0&&ES.call(qe,lt)&&(Ke[lt]=qe[lt]);return Ke};var ve=(qe,Ue,Ke)=>kg(qe,typeof Ue!="symbol"?Ue+"":Ue,Ke);var et=(qe,Ue,Ke)=>new Promise((lt,$t)=>{var De=gt=>{try{Tn(Ke.next(gt))}catch(wn){$t(wn)}},hn=gt=>{try{Tn(Ke.throw(gt))}catch(wn){$t(wn)}},Tn=gt=>gt.done?lt(gt.value):Promise.resolve(gt.value).then(De,hn);Tn((Ke=Ke.apply(qe,Ue)).next())}),di=function(qe,Ue){this[0]=qe,this[1]=Ue},jd=(qe,Ue,Ke)=>{var lt=(Tn,gt,wn,$r)=>{try{var os=Ke[Tn](gt),po=(gt=os.value)instanceof di,ha=os.done;Promise.resolve(po?gt[0]:gt).then(x=>po?lt(Tn==="return"?Tn:"next",gt[1]?{done:x.done,value:x.value}:x,wn,$r):wn({value:x,done:ha})).catch(x=>lt("throw",x,wn,$r))}catch(x){$r(x)}},$t=(Tn,gt,wn,$r)=>hn[Tn]=os=>(gt=new Promise((po,ha,x)=>(x=()=>lt(Tn,os,po,ha),De?De.then(x):x())),$r=()=>De===wn&&(De=0),De=wn=gt.then($r,$r),gt),De,hn={};return Ke=Ke.apply(qe,Ue),hn[fa("asyncIterator")]=()=>hn,$t("next"),$t("throw"),$t("return"),hn},Pg=qe=>{var Ue=qe[fa("asyncIterator")],Ke=!1,lt,$t={};return Ue==null?(Ue=qe[fa("iterator")](),lt=De=>$t[De]=hn=>Ue[De](hn)):(Ue=Ue.call(qe),lt=De=>$t[De]=hn=>{if(Ke){if(Ke=!1,De==="throw")throw hn;return hn}return Ke=!0,{done:!1,value:new di(new Promise(Tn=>{var gt=Ue[De](hn);gt instanceof Object||JU("Object expected"),Tn(gt)}),1)}}),$t[fa("iterator")]=()=>$t,lt("next"),"throw"in Ue?lt("throw"):$t.throw=De=>{throw De},"return"in Ue&&lt("return"),$t},yS=(qe,Ue,Ke)=>(Ue=qe[fa("asyncIterator")])?Ue.call(qe):(qe=qe[fa("iterator")](),Ue={},Ke=(lt,$t)=>($t=qe[lt])&&(Ue[lt]=De=>new Promise((hn,Tn,gt)=>(De=$t.call(qe,De),gt=De.done,Promise.resolve(De.value).then(wn=>hn({value:wn,done:gt}),Tn)))),Ke("next"),Ke("return"),Ue);var qe=document.createElement("style");qe.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-wrapper .cim-widget-search-status{margin:0;padding:0 8px;font-family:var(--cim-widget-font-family, inherit);font-size:.75rem;font-weight:400;line-height:1.5;color:var(--cim-widget-font-color, #1a202c);overflow-wrap:anywhere}.cim-widget-search-bar-wrapper .cim-widget-search-status.cim-widget-search-error{color:#b91c1c}.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;&:disabled{opacity:.6;cursor:not-allowed}}.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-search-bar-wrapper .cim-widget-connection-status-icon.connecting{background-color:var(--cim-widget-primary-color, #3182ce);animation:cim-widget-search-connecting-pulse 1.5s ease-in-out infinite}@keyframes cim-widget-search-connecting-pulse{0%,to{opacity:1}50%{opacity:.4}}@media(prefers-reduced-motion:reduce){.cim-widget-search-bar-wrapper .cim-widget-connection-status-icon.connecting{animation:none}}.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-chip-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(qe);function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}},lt={},$t={exports:{}},De={};var hn;function Tn(){if(hn)return De;hn=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(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function P(M,K,I){this.props=M,this.context=K,this.refs=v,this.updater=I||y}P.prototype.isReactComponent={},P.prototype.setState=function(M,K){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,K,"setState")},P.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=P.prototype;function C(M,K,I){this.props=M,this.context=K,this.refs=v,this.updater=I||y}var A=C.prototype=new _;A.constructor=C,w(A,P.prototype),A.isPureReactComponent=!0;var H=Array.isArray,U=Object.prototype.hasOwnProperty,L={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function ee(M,K,I){var ue,be={},Ae=null,we=null;if(K!=null)for(ue in K.ref!==void 0&&(we=K.ref),K.key!==void 0&&(Ae=""+K.key),K)U.call(K,ue)&&!z.hasOwnProperty(ue)&&(be[ue]=K[ue]);var Re=arguments.length-2;if(Re===1)be.children=I;else if(1<Re){for(var Fe=Array(Re),at=0;at<Re;at++)Fe[at]=arguments[at+2];be.children=Fe}if(M&&M.defaultProps)for(ue in Re=M.defaultProps,Re)be[ue]===void 0&&(be[ue]=Re[ue]);return{$$typeof:e,type:M,key:Ae,ref:we,props:be,_owner:L.current}}function he(M,K){return{$$typeof:e,type:M.type,key:K,ref:M.ref,props:M.props,_owner:M._owner}}function q(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function re(M){var K={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return K[I]})}var de=/\/+/g;function ye(M,K){return typeof M=="object"&&M!==null&&M.key!=null?re(""+M.key):K.toString(36)}function te(M,K,I,ue,be){var Ae=typeof M;(Ae==="undefined"||Ae==="boolean")&&(M=null);var we=!1;if(M===null)we=!0;else switch(Ae){case"string":case"number":we=!0;break;case"object":switch(M.$$typeof){case e:case t:we=!0}}if(we)return we=M,be=be(we),M=ue===""?"."+ye(we,0):ue,H(be)?(I="",M!=null&&(I=M.replace(de,"$&/")+"/"),te(be,K,I,"",function(at){return at})):be!=null&&(q(be)&&(be=he(be,I+(!be.key||we&&we.key===be.key?"":(""+be.key).replace(de,"$&/")+"/")+M)),K.push(be)),1;if(we=0,ue=ue===""?".":ue+":",H(M))for(var Re=0;Re<M.length;Re++){Ae=M[Re];var Fe=ue+ye(Ae,Re);we+=te(Ae,K,I,Fe,be)}else if(Fe=T(M),typeof Fe=="function")for(M=Fe.call(M),Re=0;!(Ae=M.next()).done;)Ae=Ae.value,Fe=ue+ye(Ae,Re++),we+=te(Ae,K,I,Fe,be);else if(Ae==="object")throw K=String(M),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return we}function oe(M,K,I){if(M==null)return M;var ue=[],be=0;return te(M,ue,"","",function(Ae){return K.call(I,Ae,be++)}),ue}function Ce(M){if(M._status===-1){var K=M._result;K=K(),K.then(function(I){(M._status===0||M._status===-1)&&(M._status=1,M._result=I)},function(I){(M._status===0||M._status===-1)&&(M._status=2,M._result=I)}),M._status===-1&&(M._status=0,M._result=K)}if(M._status===1)return M._result.default;throw M._result}var ae={current:null},J={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:J,ReactCurrentOwner:L};function k(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:oe,forEach:function(M,K,I){oe(M,function(){K.apply(this,arguments)},I)},count:function(M){var K=0;return oe(M,function(){K++}),K},toArray:function(M){return oe(M,function(K){return K})||[]},only:function(M){if(!q(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},De.Component=P,De.Fragment=n,De.Profiler=o,De.PureComponent=C,De.StrictMode=r,De.Suspense=d,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,De.act=k,De.cloneElement=function(M,K,I){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ue=w({},M.props),be=M.key,Ae=M.ref,we=M._owner;if(K!=null){if(K.ref!==void 0&&(Ae=K.ref,we=L.current),K.key!==void 0&&(be=""+K.key),M.type&&M.type.defaultProps)var Re=M.type.defaultProps;for(Fe in K)U.call(K,Fe)&&!z.hasOwnProperty(Fe)&&(ue[Fe]=K[Fe]===void 0&&Re!==void 0?Re[Fe]:K[Fe])}var Fe=arguments.length-2;if(Fe===1)ue.children=I;else if(1<Fe){Re=Array(Fe);for(var at=0;at<Fe;at++)Re[at]=arguments[at+2];ue.children=Re}return{$$typeof:e,type:M.type,key:be,ref:Ae,props:ue,_owner:we}},De.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},De.createElement=ee,De.createFactory=function(M){var K=ee.bind(null,M);return K.type=M,K},De.createRef=function(){return{current:null}},De.forwardRef=function(M){return{$$typeof:l,render:M}},De.isValidElement=q,De.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Ce}},De.memo=function(M,K){return{$$typeof:f,type:M,compare:K===void 0?null:K}},De.startTransition=function(M){var K=J.transition;J.transition={};try{M()}finally{J.transition=K}},De.unstable_act=k,De.useCallback=function(M,K){return ae.current.useCallback(M,K)},De.useContext=function(M){return ae.current.useContext(M)},De.useDebugValue=function(){},De.useDeferredValue=function(M){return ae.current.useDeferredValue(M)},De.useEffect=function(M,K){return ae.current.useEffect(M,K)},De.useId=function(){return ae.current.useId()},De.useImperativeHandle=function(M,K,I){return ae.current.useImperativeHandle(M,K,I)},De.useInsertionEffect=function(M,K){return ae.current.useInsertionEffect(M,K)},De.useLayoutEffect=function(M,K){return ae.current.useLayoutEffect(M,K)},De.useMemo=function(M,K){return ae.current.useMemo(M,K)},De.useReducer=function(M,K,I){return ae.current.useReducer(M,K,I)},De.useRef=function(M){return ae.current.useRef(M)},De.useState=function(M){return ae.current.useState(M)},De.useSyncExternalStore=function(M,K,I){return ae.current.useSyncExternalStore(M,K,I)},De.useTransition=function(){return ae.current.useTransition()},De.version="18.3.1",De}var gt;function wn(){return gt||(gt=1,$t.exports=Tn()),$t.exports}var $r;function os(){if($r)return lt;$r=1;var e=wn(),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 lt.Fragment=n,lt.jsx=u,lt.jsxs=u,lt}var po;function ha(){return po||(po=1,Ke.exports=os()),Ke.exports}var x=ha();const Vr=Object.create(null);Vr.open="0",Vr.close="1",Vr.ping="2",Vr.pong="3",Vr.message="4",Vr.upgrade="5",Vr.noop="6";const el=Object.create(null);Object.keys(Vr).forEach(e=>{el[Vr[e]]=e});const $d={type:"error",data:"parser error"},Ng=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Og=typeof ArrayBuffer=="function",Ig=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Vd=({type:e,data:t},n,r)=>Ng&&t instanceof Blob?n?r(t):Rg(t,r):Og&&(t instanceof ArrayBuffer||Ig(t))?n?r(t):Rg(new Blob([t]),r):r(Vr[e]+(t||"")),Rg=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lg(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qd;function xS(e,t){if(Ng&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lg).then(t);if(Og&&(e.data instanceof ArrayBuffer||Ig(e.data)))return t(Lg(e.data));Vd(e,!1,n=>{qd||(qd=new TextEncoder),t(qd.encode(n))})}const Dg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Dg.length;e++)pa[Dg.charCodeAt(e)]=e;const _S=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=pa[e.charCodeAt(r)],u=pa[e.charCodeAt(r+1)],l=pa[e.charCodeAt(r+2)],d=pa[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},SS=typeof ArrayBuffer=="function",Yd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mg(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:vS(e.substring(1),t)}:el[n]?e.length>1?{type:el[n],data:e.substring(1)}:{type:el[n]}:$d},vS=(e,t)=>{if(SS){const n=_S(e);return Mg(n,t)}else return{base64:!0,data:e}},Mg=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Fg="",AS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Vd(a,!1,l=>{r[u]=l,++o===n&&t(r.join(Fg))})})},CS=(e,t)=>{const n=e.split(Fg),r=[];for(let o=0;o<n.length;o++){const a=Yd(n[o],t);if(r.push(a),a.type==="error")break}return r};function kS(){return new TransformStream({transform(e,t){xS(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 Wd;function tl(e){return e.reduce((t,n)=>t+n.length,0)}function nl(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 PS(e,t){Wd||(Wd=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(tl(n)<1)break;const d=nl(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(tl(n)<2)break;const d=nl(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(tl(n)<8)break;const d=nl(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue($d);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(tl(n)<o)break;const d=nl(n,o);l.enqueue(Yd(a?d:Wd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue($d);break}}}})}const Bg=4;function Vt(e){if(e)return NS(e)}function NS(e){for(var t in Vt.prototype)e[t]=Vt.prototype[t];return e}Vt.prototype.on=Vt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Vt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Vt.prototype.off=Vt.prototype.removeListener=Vt.prototype.removeAllListeners=Vt.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,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},Vt.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Vt.prototype.emitReserved=Vt.prototype.emit,Vt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Vt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const rl=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),pr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),OS="arraybuffer";function ZU(){}function Ug(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const IS=pr.setTimeout,RS=pr.clearTimeout;function il(e,t){t.useNativeTimers?(e.setTimeoutFn=IS.bind(pr),e.clearTimeoutFn=RS.bind(pr)):(e.setTimeoutFn=pr.setTimeout.bind(pr),e.clearTimeoutFn=pr.clearTimeout.bind(pr))}const LS=1.33;function DS(e){return typeof e=="string"?MS(e):Math.ceil((e.byteLength||e.size)*LS)}function MS(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 Hg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function FS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BS(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 US extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gd extends Vt{constructor(t){super(),this.writable=!1,il(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 US(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=Yd(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=FS(t);return n.length?"?"+n:""}}class HS extends Gd{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)};CS(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,AS(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]=Hg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let zg=!1;try{zg=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const zS=zg;function jS(){}class $S extends HS{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 qr extends Vt{constructor(t,n,r){super(),this.createRequest=t,il(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=Ug(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=qr.requestsCount++,qr.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=jS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete qr.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(qr.requestsCount=0,qr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",jg);else if(typeof addEventListener=="function"){const e="onpagehide"in pr?"pagehide":"unload";addEventListener(e,jg,!1)}}function jg(){for(let e in qr.requests)qr.requests.hasOwnProperty(e)&&qr.requests[e].abort()}const VS=(function(){const e=$g({xdomain:!1});return e&&e.responseType!==null})();class qS extends $S{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=VS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qr($g,this.uri(),t)}}function $g(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||zS))return new XMLHttpRequest}catch(n){}if(!t)try{return new pr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Vg=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class YS extends Gd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Vg?{}:Ug(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;Vd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&rl(()=>{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]=Hg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Xd=pr.WebSocket||pr.MozWebSocket;class WS extends YS{createSocket(t,n,r){return Vg?new Xd(t,n,r):n?new Xd(t,n):new Xd(t)}doWrite(t,n){this.ws.send(n)}}class GS extends Gd{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=PS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=kS();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&&rl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const XS={websocket:WS,webtransport:GS,polling:qS},KS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kd(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=KS.exec(e||""),a={},u=14;for(;u--;)a[QS[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=JS(a,a.path),a.queryKey=ZS(a,a.query),a}function JS(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 ZS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Qd=typeof addEventListener=="function"&&typeof removeEventListener=="function",ol=[];Qd&&addEventListener("offline",()=>{ol.forEach(e=>e())},!1);class Ri extends Vt{constructor(t,n){if(super(),this.binaryType=OS,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=Kd(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=Kd(n.host).host);il(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=BS(this.opts.query)),Qd&&(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"})},ol.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Bg,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&&Ri.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",Ri.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+=DS(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,rl(()=>{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(Ri.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(),Qd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ol.indexOf(this._offlineEventListener);r!==-1&&ol.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ri.protocol=Bg;class ev extends Ri{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;Ri.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;Ri.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 tv=class extends ev{constructor(t,n={}){const r=typeof t=="object",o=r?F({},t):F({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>XS[a]).filter(a=>!!a)),super(r?o:t,o)}};function nv(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=Kd(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 rv=typeof ArrayBuffer=="function",iv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,qg=Object.prototype.toString,ov=typeof Blob=="function"||typeof Blob!="undefined"&&qg.call(Blob)==="[object BlobConstructor]",sv=typeof File=="function"||typeof File!="undefined"&&qg.call(File)==="[object FileConstructor]";function Jd(e){return rv&&(e instanceof ArrayBuffer||iv(e))||ov&&e instanceof Blob||sv&&e instanceof File}function sl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(sl(e[n]))return!0;return!1}if(Jd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return sl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&sl(e[n]))return!0;return!1}function av(e){const t=[],n=e.data,r=e;return r.data=al(n,t),r.attachments=t.length,{packet:r,buffers:t}}function al(e,t,n){if(!e)return e;if(Jd(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]=al(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return al(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=al(e[o],t));return r}return e}function uv(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 lv=["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 cv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&sl(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=av(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class ef extends Vt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new dv(n)):super.emitReserved("decoded",n)}else if(Jd(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(!fv(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(ef.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 Yg(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||Yg(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lv.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 dv{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=uv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Yg(e){return Object.prototype.toString.call(e)==="[object Object]"}const hv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ef,Encoder:cv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function Cr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const pv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wg extends Vt{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[Cr(t,"open",this.onopen.bind(this)),Cr(t,"packet",this.onpacket.bind(this)),Cr(t,"error",this.onerror.bind(this)),Cr(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(pv.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 ss(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}ss.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},ss.prototype.reset=function(){this.attempts=0},ss.prototype.setMin=function(e){this.ms=e},ss.prototype.setMax=function(e){this.max=e},ss.prototype.setJitter=function(e){this.jitter=e};class tf extends Vt{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,il(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 ss({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||hv;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 tv(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Cr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Cr(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(Cr(t,"ping",this.onping.bind(this)),Cr(t,"data",this.ondata.bind(this)),Cr(t,"error",this.onerror.bind(this)),Cr(t,"close",this.onclose.bind(this)),Cr(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){rl(()=>{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 Wg(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 ma={};function ul(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=nv(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ma[o]&&a in ma[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new tf(r,t):(ma[o]||(ma[o]=new tf(r,t)),d=ma[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ul,{Manager:tf,Socket:Wg,io:ul,connect:ul});var mv=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===gv})(t)})(e)},gv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ga(e,t){return t.clone!==!1&&t.isMergeableObject(e)?as((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ev(e,t,n){return e.concat(t).map((function(r){return ga(r,n)}))}function Gg(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 Xg(e,t){try{return t in e}catch(n){return!1}}function yv(e,t,n){var r={};return n.isMergeableObject(e)&&Gg(e).forEach((function(o){r[o]=ga(e[o],n)})),Gg(t).forEach((function(o){(function(a,u){return Xg(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(Xg(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return as;var l=u.customMerge(a);return typeof l=="function"?l:as})(o,n)(e[o],t[o],n):r[o]=ga(t[o],n))})),r}function as(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ev,n.isMergeableObject=n.isMergeableObject||mv,n.cloneUnlessOtherwiseSpecified=ga;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):yv(e,t,n):ga(t,n)}as.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return as(n,r,t)}),{})};var bv=as;let Tv=class{constructor(t){Object.assign(this,t)}};function Ln(e){if(e)return(function(t){for(var n in Ln.prototype)t[n]=Ln.prototype[n];return t})(e)}Ln.prototype.on=Ln.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ln.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ln.prototype.off=Ln.prototype.removeListener=Ln.prototype.removeAllListeners=Ln.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},Ln.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},Ln.prototype.emitReserved=Ln.prototype.emit,Ln.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ln.prototype.hasListeners=function(e){return!!this.listeners(e).length};const wv=typeof ArrayBuffer=="function",Kg=Object.prototype.toString,xv=typeof Blob=="function"||typeof Blob!="undefined"&&Kg.call(Blob)==="[object BlobConstructor]",_v=typeof File=="function"||typeof File!="undefined"&&Kg.call(File)==="[object FileConstructor]";function nf(e){return wv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||xv&&e instanceof Blob||_v&&e instanceof File}function ll(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ll(e[n]))return!0;return!1}if(nf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ll(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ll(e[n]))return!0;return!1}function Sv(e){const t=[],n=e.data,r=e;return r.data=rf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function rf(e,t){if(!e)return e;if(nf(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]=rf(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]=rf(e[r],t));return n}return e}function vv(e,t){return e.data=of(e.data,t),delete e.attachments,e}function of(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]=of(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=of(e[n],t));return e}const Av=["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 Cv{constructor(t){this.replacer=t}encode(t){return t.type!==Nt.EVENT&&t.type!==Nt.ACK||!ll(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=Sv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class sf extends Ln{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 kv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!nf(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(!Pv(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(!sf.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 Qg(n);case Nt.DISCONNECT:return n===void 0;case Nt.CONNECT_ERROR:return typeof n=="string"||Qg(n);case Nt.EVENT:case Nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Av.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 kv{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=vv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Pv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Qg(e){return Object.prototype.toString.call(e)==="[object Object]"}const Jg=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],Zg=(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)},e0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Nv=Zg((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),Jg),t0=Zg(e0,e0,Jg),Ov={Encoder:class extends Cv{encode(e){var t,n;return super.encode(ge(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Nv(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 sf{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?t0(r):r)):n instanceof Object?t0(n):n)):t))}}},Iv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Rv{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=[Iv,l,{parser:Ov,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=ul(d,bv.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*Zu(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 jd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new di(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new di(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new di(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 Tv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const n0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),r0=(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 O=wn();const mo=Ue(O);var i0=Symbol.for("immer-nothing"),o0=Symbol.for("immer-draftable"),ct=Symbol.for("immer-state");function mr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var us=Object.getPrototypeOf;function ls(e){return!!e&&!!e[ct]}function fi(e){var t;return e?s0(e)||Array.isArray(e)||!!e[o0]||!!((t=e.constructor)!=null&&t[o0])||ya(e)||dl(e):!1}var Lv=Object.prototype.constructor.toString();function s0(e){if(!e||typeof e!="object")return!1;const t=us(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)===Lv}function Ea(e,t){cl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cl(e){const t=e[ct];return t?t.type_:Array.isArray(e)?1:ya(e)?2:dl(e)?3:0}function af(e,t){return cl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a0(e,t,n){const r=cl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Dv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ya(e){return e instanceof Map}function dl(e){return e instanceof Set}function tn(e){return e.copy_||e.base_}function uf(e,t){if(ya(e))return new Map(e);if(dl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=s0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ct];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(us(e),r)}else{const r=us(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function lf(e,t=!1){return hl(e)||ls(e)||!fi(e)||(cl(e)>1&&Object.defineProperties(e,{set:{value:fl},add:{value:fl},clear:{value:fl},delete:{value:fl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>lf(n,!0))),e}function fl(){mr(2)}function hl(e){return Object.isFrozen(e)}var cf={};function go(e){const t=cf[e];return t||mr(0,e),t}function Mv(e,t){cf[e]||(cf[e]=t)}var ba;function pl(){return ba}function Fv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u0(e,t){t&&(go("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function df(e){ff(e),e.drafts_.forEach(Bv),e.drafts_=null}function ff(e){e===ba&&(ba=e.parent_)}function l0(e){return ba=Fv(ba,e)}function Bv(e){const t=e[ct];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function c0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ct].modified_&&(df(t),mr(4)),fi(e)&&(e=ml(t,e),t.parent_||gl(t,e)),t.patches_&&go("Patches").generateReplacementPatches_(n[ct].base_,e,t.patches_,t.inversePatches_)):e=ml(t,n,[]),df(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i0?e:void 0}function ml(e,t,n){if(hl(t))return t;const r=t[ct];if(!r)return Ea(t,(o,a)=>d0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return gl(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),Ea(a,(l,d)=>d0(e,r,o,l,d,n,u)),gl(e,o,!1),n&&e.patches_&&go("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function d0(e,t,n,r,o,a,u){if(ls(o)){const l=a&&t&&t.type_!==3&&!af(t.assigned_,r)?a.concat(r):void 0,d=ml(e,o,l);if(a0(n,r,d),ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(fi(o)&&!hl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ml(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ya(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&gl(e,o)}}function gl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lf(t,n)}function Uv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:pl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=hf;n&&(o=[r],a=Ta);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var hf={get(e,t){if(t===ct)return e;const n=tn(e);if(!af(n,t))return Hv(e,n,t);const r=n[t];return e.finalized_||!fi(r)?r:r===pf(e.base_,t)?(mf(e),e.copy_[t]=wa(r,e)):r},has(e,t){return t in tn(e)},ownKeys(e){return Reflect.ownKeys(tn(e))},set(e,t,n){const r=f0(tn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=pf(tn(e),t),a=o==null?void 0:o[ct];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Dv(n,o)&&(n!==void 0||af(e.base_,t)))return!0;mf(e),hi(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 pf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,mf(e),hi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=tn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){mr(11)},getPrototypeOf(e){return us(e.base_)},setPrototypeOf(){mr(12)}},Ta={};Ea(hf,(e,t)=>{Ta[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ta.deleteProperty=function(e,t){return Ta.set.call(this,e,t,void 0)},Ta.set=function(e,t,n){return hf.set.call(this,e[0],t,n,e[0])};function pf(e,t){const n=e[ct];return(n?tn(n):e)[t]}function Hv(e,t,n){var o;const r=f0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function f0(e,t){if(!(t in e))return;let n=us(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=us(n)}}function hi(e){e.modified_||(e.modified_=!0,e.parent_&&hi(e.parent_))}function mf(e){e.copy_||(e.copy_=uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zv=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"&&mr(6),r!==void 0&&typeof r!="function"&&mr(7);let o;if(fi(t)){const a=l0(this),u=wa(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?df(a):ff(a)}return u0(a,r),c0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===i0&&(o=void 0),this.autoFreeze_&&lf(o,!0),r){const a=[],u=[];go("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else mr(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){fi(e)||mr(8),ls(e)&&(e=jv(e));const t=l0(this),n=wa(e,void 0);return n[ct].isManual_=!0,ff(t),n}finishDraft(e,t){const n=e&&e[ct];(!n||!n.isManual_)&&mr(9);const{scope_:r}=n;return u0(r,t),c0(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=go("Patches").applyPatches_;return ls(e)?r(e,t):this.produce(e,o=>r(o,t))}};function wa(e,t){const n=ya(e)?go("MapSet").proxyMap_(e,t):dl(e)?go("MapSet").proxySet_(e,t):Uv(e,t);return(t?t.scope_:pl()).drafts_.push(n),n}function jv(e){return ls(e)||mr(10,e),h0(e)}function h0(e){if(!fi(e)||hl(e))return e;const t=e[ct];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=uf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=uf(e,!0);return Ea(n,(r,o)=>{a0(n,r,h0(o))}),t&&(t.finalized_=!1),n}function $v(){class e extends Map{constructor(d,f){super(),this[ct]={type_:2,parent_:f,scope_:f?f.scope_:pl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return tn(this[ct]).size}has(d){return tn(this[ct]).has(d)}set(d,f){const p=this[ct];return u(p),(!tn(p).has(d)||tn(p).get(d)!==f)&&(n(p),hi(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[ct];return u(f),n(f),hi(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ct];u(d),tn(d).size&&(n(d),hi(d),d.assigned_=new Map,Ea(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ct];tn(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ct];u(f);const p=tn(f).get(d);if(f.finalized_||!fi(p)||p!==f.base_.get(d))return p;const m=wa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return tn(this[ct]).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[ct]={type_:3,parent_:f,scope_:f?f.scope_:pl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return tn(this[ct]).size}has(d){const f=this[ct];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[ct];return u(f),this.has(d)||(a(f),hi(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ct];return u(f),a(f),hi(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ct];u(d),tn(d).size&&(a(d),hi(d),d.copy_.clear())}values(){const d=this[ct];return u(d),a(d),d.copy_.values()}entries(){const d=this[ct];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(fi(d)){const f=wa(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&mr(3,JSON.stringify(tn(l)))}Mv("MapSet",{proxyMap_:t,proxySet_:o})}var Vv=new zv,qv=Vv.produce;function p0(e,t,n){var r=O.useMemo(function(){return qv(e)},[e]);return O.useReducer(r,t,n)}const m0={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"},Eo={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},g0=["ask_cim","search","browse","pdp"],Yv=e=>g0.includes(e),E0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(E0));const Wv=new Map(Object.entries(E0).map(([e,t])=>[t,e])),Gv=e=>{var t;return(t=Wv.get(e))!=null?t:null},cs="cimulate",gf=`${cs}:pdp-update`,Ef=`${cs}:browse-update`,yf=`${cs}:search-update`,bf=`${cs}:ui-state-update`,Tf=`${cs}:prompts-state-update`,wf=`${cs}:session-state`,Yr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},m0),Xv={"browse-context":Yr.CONTEXT_UPDATED,categoryId:Yr.CATEGORY_ID_CHANGED,categoryName:Yr.CATEGORY_NAME_CHANGED,page:Yr.PAGE_CHANGED,pageSize:Yr.PAGE_SIZE_CHANGED,includeFacets:Yr.FACET_FILTERS_CHANGED,facetFilters:Yr.FACET_FILTERS_CHANGED,rangeFilters:Yr.RANGE_FILTERS_CHANGED,catalogSegment:Yr.CATALOG_SEGMENT_CHANGED,pricebooks:Yr.PRICEBOOKS_CHANGED},pi=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},m0),Kv={"search-context":pi.SEARCH_CONTEXT_UPDATED,query:pi.QUERY_CHANGED,page:pi.PAGE_CHANGED,pageSize:pi.PAGE_SIZE_CHANGED,includeFacets:pi.FACET_FILTERS_CHANGED,facetFilters:pi.FACET_FILTERS_CHANGED,rangeFilters:pi.RANGE_FILTERS_CHANGED,catalogSegment:pi.CATALOG_SEGMENT_CHANGED,pricebooks:pi.PRICEBOOKS_CHANGED},j="cim-widget",rt=`--${j}`,Li={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},Qv=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||Li.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||Li.secondaryColor,[`${rt}-font-color`]:e.fontColor||Li.fontColor,[`${rt}-font-family`]:e.fontFamily||Li.fontFamily,[`${rt}-background-color`]:e.backgroundColor||Li.backgroundColor,[`${rt}-border-color`]:e.borderColor||Li.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||Li.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||Li.borderRadius)}),y0={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"},El={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"}}},Jv=Object.freeze({legacy:Object.freeze(F({preset:"legacy"},El.legacy.traits)),commerce:Object.freeze(F({preset:"commerce"},El.commerce.traits))}),b0={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"}},T0={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"}},w0={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"}},x0={primaryColor:"primary",secondaryColor:"secondary",fontColor:"text",fontFamily:"fontFamily",backgroundColor:"surface",borderColor:"border",inputBorderColor:"inputBorder",borderRadius:"cardRadius"},_0={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"},Di=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),jn=e=>e===0||typeof e=="string"&&e.trim().length>0,yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),S0=e=>{var T,y;const t=Di(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(yo(t,"tokens")||["density","shape","elevation"].some(w=>yo(t,w)&&t[w]!==El[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?Qv(t):void 0,l=El[r],d=F({},l.traits);typeof t.density=="string"&&yo(b0,t.density)&&(d.density=t.density),typeof t.shape=="string"&&yo(T0,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&yo(w0,t.elevation)&&(d.elevation=t.elevation);const f=F(F(F(F(F({},y0),l.tokens),b0[d.density]),T0[d.shape]),w0[d.elevation]);if(Di(t.tokens))for(const w of Object.keys(y0)){const v=t.tokens[w];yo(t.tokens,w)&&jn(v)&&(f[w]=String(v))}Di(t.tokens)&&jn(t.tokens.fontFamily)&&!jn(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),Di(t.tokens)&&jn(t.tokens.launcherShadow)&&!jn(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),Di(t.tokens)&&jn(t.tokens.transcriptPadding)&&!jn(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),Di(t.tokens)&&jn(t.tokens.text)&&!jn(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=Di(t.tokens)?t.tokens.inputBorder:void 0;!jn(p)&&Di(t.tokens)&&jn(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,v]of Object.entries(x0)){const P=t[w];yo(t,w)&&jn(P)&&(f[v]=String(P),w==="borderColor"&&!jn(t.inputBorderColor)&&!jn(p)&&(f.inputBorder=String(P)),w==="fontFamily"&&(f.productFontFamily=String(P)),w==="fontColor"&&(f.foreground=String(P)),w==="borderRadius"&&(f.controlRadius=f.composerRadius=f.chipRadius=f.mediaRadius=String(P)))}if(u)for(const w of Object.values(x0)){const v=(T=_0[w])!=null?T:w.replace(/[A-Z]/g,P=>`-${P.toLowerCase()}`);f[w]=u[`${rt}-${v}`]}const m={};for(const[w,v]of Object.entries(f)){const P=(y=_0[w])!=null?y:w.replace(/[A-Z]/g,_=>`-${_.toLowerCase()}`);m[`${rt}-${P}`]=v}return{preset:r,compatibility:a,traits:d,tokens:f,cssVariables:u!=null?u:m,variants:F({},l.variants),transcriptClassName:a==="legacy"?"":`${j}-transcript-${l.variants.transcript}`}},mi={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},v0=O.createContext(null),A0=O.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"},C0={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,layout:null};function k0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zv}=Object.prototype,{getPrototypeOf:Mi}=Object,{iterator:xa,toStringTag:P0}=Symbol,_a=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N0=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),O0=(e,t,n)=>e===Object.prototype||!n&&t===null,eA=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(N0(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},Sa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=Mi(n);if(O0(n,o,n===e))return!1;if(_a(n,t))return!0;n=o}return!1},tA=(e,t)=>e!=null&&Sa(e,t)?e[t]:void 0,nA=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Mi(e);if(t===null&&eA(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:Mi(a);if(O0(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)N0(d)||_a(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},xf=(e=>t=>{const n=Zv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gr=e=>(e=e.toLowerCase(),t=>xf(t)===e),yl=e=>t=>typeof t===e,{isArray:bo}=Array,To=yl("undefined");function ds(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&$n(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const I0=gr("ArrayBuffer");function rA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&I0(e.buffer),t}const iA=yl("string"),$n=yl("function"),R0=yl("number"),fs=e=>e!==null&&typeof e=="object",oA=e=>e===!0||e===!1,bl=e=>{if(!fs(e))return!1;const t=Mi(e);return(t===null||t===Object.prototype||Mi(t)===null)&&!Sa(e,P0)&&!Sa(e,xa)},sA=e=>{if(!fs(e)||ds(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},aA=gr("Date"),uA=gr("File"),lA=e=>!!(e&&typeof e.uri!="undefined"),cA=e=>e&&typeof e.getParts!="undefined",dA=gr("Blob"),fA=gr("FileList"),hA=gr("Set"),pA=e=>fs(e)&&$n(e.pipe);function mA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const L0=mA(),D0=typeof L0.FormData!="undefined"?L0.FormData:void 0,gA=e=>{if(!e)return!1;if(D0&&e instanceof D0)return!0;const t=Mi(e);if(!t||t===Object.prototype||!$n(e.append))return!1;const n=xf(e);return n==="formdata"||n==="object"&&$n(e.toString)&&e.toString()==="[object FormData]"},EA=gr("URLSearchParams"),[yA,bA,TA,wA]=["ReadableStream","Request","Response","Headers"].map(gr),xA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function va(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),bo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ds(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 M0(e,t){if(ds(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 wo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,F0=e=>!To(e)&&e!==wo;function _f(...e){const{caseless:t,skipUndefined:n}=F0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&M0(r,u)||u,d=_a(r,l)?r[l]:void 0;bl(d)&&bl(a)?r[l]=_f(d,a):bl(a)?r[l]=_f({},a):bo(a)?r[l]=a.slice():(!n||!To(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||ds(l)||(va(l,o),typeof l!="object"||bo(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];LA.call(l,p)&&o(l[p],p)}}return r}const _A=(e,t,n,{allOwnKeys:r}={})=>(va(t,(o,a)=>{n&&$n(o)?Object.defineProperty(e,a,{__proto__:null,value:k0(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),SA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},AA=(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&&Mi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CA=(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},kA=e=>{if(!e)return null;if(bo(e))return e;let t=e.length;if(!R0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Mi(Uint8Array)),NA=(e,t)=>{const r=(e&&e[xa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},OA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},IA=gr("HTMLFormElement"),RA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:LA}=Object.prototype,DA=gr("RegExp"),B0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};va(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},MA=e=>{B0(e,(t,n)=>{if($n(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if($n(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+"'")})}})},FA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},BA=()=>{},UA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function HA(e){return!!(e&&$n(e.append)&&e[P0]==="FormData"&&e[xa])}const zA=e=>{const t=new WeakSet,n=r=>{if(fs(r)){if(t.has(r))return;if(ds(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(hA(r)){o=[];for(const a of r){const u=n(a);!To(u)&&o.push(u)}}else o=bo(r)?[]:{},va(r,(a,u)=>{const l=n(a);!To(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},jA=gr("AsyncFunction"),$A=e=>e&&(fs(e)||$n(e))&&$n(e.then)&&$n(e.catch),U0=((e,t)=>e?setImmediate:t?((n,r)=>(wo.addEventListener("message",({source:o,data:a})=>{o===wo&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),wo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",$n(wo.postMessage)),VA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(wo):typeof process!="undefined"&&process.nextTick||U0,H0=e=>e!=null&&$n(e[xa]),V={isArray:bo,isArrayBuffer:I0,isBuffer:ds,isFormData:gA,isArrayBufferView:rA,isString:iA,isNumber:R0,isBoolean:oA,isObject:fs,isPlainObject:bl,isEmptyObject:sA,isReadableStream:yA,isRequest:bA,isResponse:TA,isHeaders:wA,isUndefined:To,isDate:aA,isFile:uA,isReactNativeBlob:lA,isReactNative:cA,isBlob:dA,isRegExp:DA,isFunction:$n,isStream:pA,isURLSearchParams:EA,isTypedArray:PA,isFileList:fA,forEach:va,merge:_f,extend:_A,trim:xA,stripBOM:SA,inherits:vA,toFlatObject:AA,kindOf:xf,kindOfTest:gr,endsWith:CA,toArray:kA,forEachEntry:NA,matchAll:OA,isHTMLForm:IA,hasOwnProperty:_a,hasOwnProp:_a,hasOwnInPrototypeChain:Sa,getSafeProp:tA,toSafeFlatObject:nA,reduceDescriptors:B0,freezeMethods:MA,toObjectSet:FA,toCamelCase:RA,noop:BA,toFiniteNumber:UA,findKey:M0,global:wo,isContextDefined:F0,isSpecCompliantForm:HA,toJSONObject:zA,isAsyncFn:jA,isThenable:$A,setImmediate:U0,asap:VA,isIterable:H0,isSafeIterable:e=>e!=null&&Sa(e,xa)&&H0(e)},qA=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),YA=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=V.hasOwnProp(t,n);!n||l&&V.hasOwnProp(qA,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function WA(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 GA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),XA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Sf(e,t){return V.isArray(e)?e.map(n=>Sf(n,t)):WA(String(e).replace(t,""))}const KA=e=>Sf(e,GA),QA=e=>Sf(e,XA);function z0(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=QA(n)}),t}const j0=Symbol("internals");function Aa(e){return e&&String(e).trim().toLowerCase()}function Tl(e){return e===!1||e==null?e:V.isArray(e)?e.map(Tl):KA(String(e))}function JA(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 ZA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function vf(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 eC(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 tC(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=vf(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=vf(d.slice(0,f));if(!ZA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=vf(d.slice(f+1));t[m]=eC(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 nC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Af(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function rC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iC(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let xn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,d,f){const p=Aa(d);if(!p)return;const m=V.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=Tl(l))}const u=(l,d)=>V.forEach(l,(f,p)=>a(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!nC(t))u(YA(t),n);else if(V.isObject(t)&&V.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!V.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],V.hasOwnProp(l,f)?(d=l[f],l[f]=V.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=Aa(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return JA(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Aa(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Af(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Aa(u),u){const l=V.findKey(r,u);l&&(!n||Af(r,r[l],l,n))&&(delete r[l],o=!0)}}return V.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Af(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=Tl(o),delete n[a];return}const l=t?rC(a):String(a).trim();l!==a&&delete n[a],n[l]=Tl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){const t=this.get("set-cookie");return V.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 tC(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[j0]=this[j0]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=Aa(u);r[l]||(iC(o,u),r[l]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};xn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(xn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(xn);const wl="[REDACTED ****]";function oC(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function sC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof xn&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&oC(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?wl:o(d);V.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function $0(e){try{return String(e)}catch(t){return""}}function aC(e){return e.errors.map(n=>{try{return n&&n.message?$0(n.message):$0(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Se=class bS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&V.isArray(t.errors)&&t.errors.length&&(l=aC(t));const d=new bS(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&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?sC(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Se.ERR_BAD_OPTION="ERR_BAD_OPTION",Se.ECONNABORTED="ECONNABORTED",Se.ETIMEDOUT="ETIMEDOUT",Se.ECONNREFUSED="ECONNREFUSED",Se.ERR_NETWORK="ERR_NETWORK",Se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Se.ERR_DEPRECATED="ERR_DEPRECATED",Se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Se.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Se.ERR_CANCELED="ERR_CANCELED",Se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Se.ERR_INVALID_URL="ERR_INVALID_URL",Se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const uC=null,V0=100;function Cf(e){return V.isPlainObject(e)||V.isArray(e)}function q0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function kf(e,t,n){return e?e.concat(t).map(function(o,a){return o=q0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function lC(e){return V.isArray(e)&&!e.some(Cf)}const cC=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function xl(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(C,A)=>{const H=V.getSafeProp(n,C);return V.isUndefined(H)?A:H},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",V0),p=d&&V.isSpecCompliantForm(t),m=[];if(!V.isFunction(a))throw new TypeError("visitor must be a function");function T(C){if(C===null)return"";if(V.isDate(C))return C.toISOString();if(V.isBoolean(C))return C.toString();if(!p&&V.isBlob(C))throw new Se("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(C)||V.isTypedArray(C)){if(p&&typeof d=="function")return new d([C]);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return C}function y(C){if(C>f)throw new Se("Object is too deeply nested ("+C+" levels). Max depth: "+f,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(C,A){if(f===1/0)return JSON.stringify(C);const H=[];return JSON.stringify(C,function(L,z){if(!V.isObject(z))return z;for(;H.length&&H[H.length-1]!==this;)H.pop();return H.push(z),y(A+H.length-1),z})}function v(C,A,H){let U=C;if(V.isReactNative(t)&&V.isReactNativeBlob(C))return t.append(kf(H,A,u),T(C)),!1;if(C&&!H&&typeof C=="object"){if(V.endsWith(A,"{}"))A=o?A:A.slice(0,-2),C=w(C,1);else if(V.isArray(C)&&lC(C)||(V.isFileList(C)||V.endsWith(A,"[]"))&&(U=V.toArray(C)))return A=q0(A),U.forEach(function(z,ee){!(V.isUndefined(z)||z===null)&&t.append(l===!0?kf([A],ee,u):l===null?A:A+"[]",T(z))}),!1}return Cf(C)?!0:(t.append(kf(H,A,u),T(C)),!1)}const P=Object.assign(cC,{defaultVisitor:v,convertValue:T,isVisitable:Cf});function _(C,A,H=0){if(!V.isUndefined(C)){if(y(H),m.indexOf(C)!==-1)throw new Error("Circular reference detected in "+A.join("."));m.push(C),V.forEach(C,function(L,z){(!(V.isUndefined(L)||L===null)&&a.call(t,L,V.isString(z)?z.trim():z,A,P))===!0&&_(L,A?A.concat(z):[z],H+1)}),m.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Y0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Pf(e,t){this._pairs=[],e&&xl(e,this,t)}const W0=Pf.prototype;W0.append=function(t,n){this._pairs.push([t,n])},W0.toString=function(t){const n=t?r=>t.call(this,r,Y0):Y0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function dC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function G0(e,t,n){if(!t)return e;e=e||"";const r=V.isFunction(n)?{serialize:n}:n,o=V.getSafeProp(r,"encode")||dC,a=V.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=V.isURLSearchParams(t)?t.toString():new Pf(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const Ca=Symbol("internals");function X0(e){return e?e.length:0}function K0(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ka(e,t){const n=e.handlers,r=X0(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 Q0{constructor(){this.handlers=[],this[Ca]={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[Ca];this.handlers==null&&(this.handlers=[]),ka(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[Ca];ka(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||(K0(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ka(this,this[Ca]))}forEach(t){const n=this[Ca];ka(this,n),n.iterationDepth++;try{V.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(ka(this,n),K0(this.handlers),n.handlersLength=X0(this.handlers))}}}const Nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Pf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Of=typeof window!="undefined"&&typeof document!="undefined",If=typeof navigator=="object"&&navigator||void 0,hC=Of&&(!If||["ReactNative","NativeScript","NS"].indexOf(If.product)<0),pC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mC=Of&&window.location.href||"http://localhost",nn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Of,hasStandardBrowserEnv:hC,hasStandardBrowserWebWorkerEnv:pC,navigator:If,origin:mC},Symbol.toStringTag,{value:"Module"}))),fC);function gC(e,t){return xl(e,new nn.classes.URLSearchParams,F({visitor:function(n,r,o,a){return nn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const J0=V0;function Z0(e){if(e>J0)throw new Se("FormData field is too deeply nested ("+e+" levels). Max depth: "+J0,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function EC(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function yC(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 e1(e){function t(n,r,o,a){Z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=yC(o[u])),!l)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(EC(r),o,n,0)}),n}return null}const t1=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),hs=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function bC(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Pa={transitional:Nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(e1(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=hs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gC(t,d).toString();if((l=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=hs(this,"env"),p=f&&f.FormData;return xl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),bC(t)):t}],transformResponse:[function(t){const n=hs(this,"transitional")||Pa.transitional,r=n&&n.forcedJSONParsing,o=hs(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,hs(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Se.from(d,Se.ERR_BAD_RESPONSE,this,null,hs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(t1,e=>{Pa.headers[e]={}});function Rf(e,t){const n=this||Pa,r=t||n,o=xn.from(r.headers);let a=r.data;return V.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function n1(e){return!!(e&&e.__CANCEL__)}let Na=class extends Se{constructor(t,n,r){super(t==null?"canceled":t,Se.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function r1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,n.status>=400&&n.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,n.config,n.request,n))}const TC=/[\t\n\r]/g;function i1(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(TC,"")}function Lf(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function wC(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 xC(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 _l=(e,t,n=3)=>{let r=0;const o=wC(50,250);return xC(a=>{if(!a||!V.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)},o1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},s1=(e,t=V.asap)=>(...n)=>t(()=>e(...n)),_C=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,SC=nn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&l.push(`path=${r}`),V.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),V.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 vC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function AC(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 CC=/^https?:(?!\/\/)/i;function kC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${wl}`)}function PC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${wl}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${wl}`);return n===-1?o:`${o}#${kC(t.slice(n+1))}`}function a1(e,t){if(typeof e=="string"){const n=i1(e);if(CC.test(n))throw new Se(`Invalid URL ${JSON.stringify(PC(n))}: missing "//" after protocol`,Se.ERR_INVALID_URL,t)}}function u1(e,t,n,r){a1(t,r);let o=!vC(t);return e&&(o||n===!1)?(a1(e,r),AC(e,t)):t}const l1=e=>e instanceof xn?F({},e):e,NC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function xo(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 V.isPlainObject(p)&&V.isPlainObject(m)?V.merge.call({caseless:y},p,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function o(p,m,T,y){if(V.isUndefined(m)){if(!V.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!V.isUndefined(m))return r(void 0,m)}function u(p,m){if(V.isUndefined(m)){if(!V.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=V.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!V.isUndefined(m))if(V.isPlainObject(m)){if(V.hasOwnProp(m,p))return m[p]}else return;const T=V.hasOwnProp(e,"transitional")?e.transitional:void 0;if(V.isPlainObject(T)&&V.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(V.hasOwnProp(t,T))return r(p,m);if(V.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(l1(p),l1(m),T,!0)};return V.forEach(NC(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=V.hasOwnProp(f,m)?f[m]:o,y=V.hasOwnProp(e,m)?e[m]:void 0,w=V.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);V.isUndefined(v)&&T!==d||(n[m]=v)}),V.hasOwnProp(t,"validateStatus")&&V.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(V.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const OC=["content-type","content-length"];function IC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{OC.includes(r.toLowerCase())&&e.set(r,o)})}const RC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function c1(e){const t=xo({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=xn.from(l),t.url=G0(u1(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=V.getSafeProp(d,"username")||"",y=V.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?RC(y):"")))}catch(w){throw Se.from(w,Se.ERR_BAD_OPTION_VALUE,e)}}if(V.isFormData(r)){const T=V.getSafeProp(r,"getHeaders");nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv||V.isReactNative(r)?l.setContentType(void 0):V.isFunction(T)&&IC(l,T.call(r),n("formDataHeaderPolicy"))}if(nn.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&_C(t.url))){const y=a&&u&&SC.read(u);y&&l.set(a,y)}return t}const LC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=c1(e);let a=o.data;const u=xn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function P(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function C(H){if(!_)return;if(_.status===0&&(Lf(i1(o.url))||Lf(nn.origin))!=="file"&&!(_.responseURL&&_.responseURL.startsWith("file:"))){r(new Se("Request aborted",Se.ECONNABORTED,e,_)),P(),_=null;return}try{H?v&&v(H):w&&w()}catch(ee){setTimeout(()=>{throw ee})}if(!_)return;const U=xn.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),z={data:!l||l==="text"||l==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:U,config:e,request:_};r1(function(he){n(he),P()},function(he){r(he),P()},z),_=null}"onloadend"in _?_.onloadend=C:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(C)},_.onabort=function(){_&&(r(new Se("Request aborted",Se.ECONNABORTED,e,_)),P(),_=null)},_.onerror=function(U){const L=U&&U.message?U.message:"Network Error",z=new Se(L,Se.ERR_NETWORK,e,_);z.event=U||null,r(z),P(),_=null},_.ontimeout=function(){let U=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||Nf;o.timeoutErrorMessage&&(U=o.timeoutErrorMessage),r(new Se(U,L.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,_)),P(),_=null},a===void 0&&u.setContentType(null),"setRequestHeader"in _&&V.forEach(z0(u),function(U,L){_.setRequestHeader(L,U)}),V.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),l&&l!=="json"&&(_.responseType=o.responseType),f&&([T,w,v]=_l(f,!0),_.addEventListener("progress",T)),d&&_.upload&&([m,y]=_l(d),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=H=>{_&&(r(!H||H.type?new Na(null,e,_):H),_.abort(),P(),_=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const A=Lf(o.url);if(A&&!nn.protocols.includes(A)){r(new Se("Unsupported protocol "+A+":",Se.ERR_BAD_REQUEST,e)),P();return}_.send(a||null)})},DC=(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 Se?f:new Na(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Se(`timeout of ${t}ms exceeded`,Se.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=()=>V.asap(u),l},MC=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},FC=function(e,t){return jd(this,null,function*(){try{for(var n=yS(BC(e)),r,o,a;r=!(o=yield new di(n.next())).done;r=!1){const u=o.value;yield*Pg(MC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new di(o.call(n)))}finally{if(a)throw a[0]}}})},BC=function(e){return jd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Pg(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new di(t.read());if(n)break;yield r}}finally{yield new di(t.cancel())}})},d1=(e,t,n,r)=>{const o=FC(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})},f1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,h1=(e,t,n)=>t+2<n&&f1(e.charCodeAt(t+1))&&f1(e.charCodeAt(t+2)),p1=e=>e<=57?e-48:(e&223)-55,UC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,HC=e=>e===9||e===10||e===12||e===13||e===32,zC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},jC=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)},$C=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&&h1(e,a,t)&&(u=p1(e.charCodeAt(a+1))*16+p1(e.charCodeAt(a+2)),a+=2),!HC(u)){if(u===61){r++;continue}if(!UC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?jC(e):zC(n)},VC=(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&&h1(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 qC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return VC(t===-1?e:e.slice(0,t),$C)}const Df="1.20.0",m1=64*1024,YC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Sl}=V,WC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),g1=e=>{if(!V.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},E1=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},GC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},XC=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?Sl(o):typeof fetch=="function",d=Sl(a),f=Sl(u);if(!l)return!1;const p=l&&Sl(n),m=l&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):_=>et(null,null,function*(){return new Uint8Array(yield new a(_).arrayBuffer())})),T=d&&p&&E1(()=>{let _=!1;const C=new a(nn.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),A=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),_&&!A}),y=f&&p&&E1(()=>V.isReadableStream(new u("").body)),w={stream:y&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!w[_]&&(w[_]=(C,A)=>{let H=C&&C[_];if(H)return H.call(C);throw new Se(`Response type '${_}' is not supported`,Se.ERR_NOT_SUPPORT,A)})});const v=_=>et(null,null,function*(){if(_==null)return 0;if(V.isBlob(_))return _.size;if(V.isSpecCompliantForm(_))return(yield new a(nn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(V.isArrayBufferView(_)||V.isArrayBuffer(_))return _.byteLength;if(V.isURLSearchParams(_)&&(_=_+""),V.isString(_))return(yield m(_)).byteLength}),P=(_,C)=>et(null,null,function*(){const A=V.toFiniteNumber(_.getContentLength());return A==null?v(C):A});return _=>et(null,null,function*(){let{url:C,method:A,data:H,signal:U,cancelToken:L,timeout:z,onDownloadProgress:ee,onUploadProgress:he,responseType:q,headers:re,withCredentials:de="same-origin",fetchOptions:ye,maxContentLength:te,maxBodyLength:oe,maxRedirects:Ce}=c1(_);const ae=V.isNumber(te)&&te>-1,J=V.isNumber(oe)&&oe>-1,se=we=>V.hasOwnProp(_,we)?_[we]:void 0;let k=o||fetch;q=q?(q+"").toLowerCase():"text";let M=DC([U,L&&L.toAbortSignal()],z),K=null;const I=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let ue,be=null;const Ae=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,_,K);try{let we;const Re=se("auth");if(Re){const $e=V.getSafeProp(Re,"username")||"",bt=V.getSafeProp(Re,"password")||"";we={username:$e,password:bt}}if(GC(C)){const $e=new URL(C,nn.origin);if(!we&&($e.username||$e.password)){const bt=g1($e.username),Wt=g1($e.password);we={username:bt,password:Wt}}($e.username||$e.password)&&($e.username="",$e.password="",C=$e.href)}if(we&&(re.delete("authorization"),re.set("Authorization","Basic "+btoa(WC((we.username||"")+":"+(we.password||""))))),ae&&typeof C=="string"&&C.startsWith("data:")&&qC(C)>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,K);if(J&&A!=="get"&&A!=="head"){const $e=yield v(H);if(typeof $e=="number"&&isFinite($e)&&(ue=$e,$e>oe))throw Ae()}const Fe=J&&(V.isReadableStream(H)||V.isStream(H)),at=($e,bt,Wt)=>d1($e,m1,It=>{if(J&&It>oe)throw be=Ae();bt&&bt(It)},Wt);if(T&&A!=="get"&&A!=="head"&&(he||Fe)){if(ue=ue==null?yield P(re,H):ue,ue!==0||Fe){let $e=new a(C,{method:"POST",body:H,duplex:"half"}),bt;if(V.isFormData(H)&&(bt=$e.headers.get("content-type"))&&re.setContentType(bt),$e.body){const[Wt,It]=he&&o1(ue,_l(s1(he)))||[];H=at($e.body,Wt,It)}}}else if(Fe&&!d&&p&&A!=="get"&&A!=="head")H=at(H);else if(Fe&&d&&!T&&A!=="get"&&A!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,_,K);V.isString(de)||(de=de?"include":"omit");const ln=d&&"credentials"in a.prototype;if(V.isFormData(H)){const $e=re.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&re.delete("content-type")}re.set("User-Agent","axios/"+Df,!1);const At=ye==null?ye:Object.assign(Object.create(null),ye);At&&(delete At.body,delete At.headers,delete At.method,delete At.signal,delete At.duplex,delete At.credentials);const Ht=Object.assign(Object.create(null),At,{signal:M,method:A.toUpperCase(),headers:z0(re.normalize()),body:H,duplex:"half",credentials:ln?de:void 0});d&&(V.forEach(YC,($e,bt)=>{Ht[bt]===void 0&&(Ht[bt]=$e)}),Ht.signal===void 0&&(Ht.signal=null),Ht.body===void 0&&(Ht.body=null)),Ce===0&&(Ht.redirect="manual",At&&(At.redirect="manual")),K=d&&new a(C,Ht);let Ot=yield d?k(K,At):k(C,Ht);const ar=xn.from(Ot.headers);if(ae){const $e=V.toFiniteNumber(ar.getContentLength());if($e!=null&&$e>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}const Fn=y&&(q==="stream"||q==="response");if(y&&Ot.body&&(ee||ae||Fn&&I)){const $e={};["status","statusText","headers"].forEach(Qt=>{$e[Qt]=Ot[Qt]});const bt=V.toFiniteNumber(ar.getContentLength()),[Wt,It]=ee&&o1(bt,_l(s1(ee),!0))||[];let Bn=0;const ur=Qt=>{if(ae&&(Bn=Qt,Bn>te))throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,K);Wt&&Wt(Qt)};Ot=new u(d1(Ot.body,m1,ur,()=>{It&&It(),I&&I()}),$e)}q=q||"text";let Kt=yield w[V.findKey(w,q)||"text"](Ot,_);if(ae&&!y&&!Fn){let $e;if(Kt!=null&&(typeof Kt.byteLength=="number"?$e=Kt.byteLength:typeof Kt.size=="number"?$e=Kt.size:typeof Kt=="string"&&($e=typeof r=="function"?new r().encode(Kt).byteLength:Kt.length)),typeof $e=="number"&&$e>te)throw new Se("maxContentLength size of "+te+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}return!Fn&&I&&I(),yield new Promise(($e,bt)=>{r1($e,bt,{data:Kt,headers:xn.from(Ot.headers),status:Ot.status,statusText:Ot.statusText,config:_,request:K})})}catch(we){if(I&&I(),M&&M.aborted&&M.reason instanceof Se){const Re=M.reason;throw Re.config=_,K&&(Re.request=K),we!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:we,writable:!0,enumerable:!1,configurable:!0}),Re}if(be)throw K&&!be.request&&(be.request=K),be;if(we instanceof Se)throw K&&!we.request&&(we.request=K),we;if(we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)){const Re=new Se("Network Error",Se.ERR_NETWORK,_,K,we&&we.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:we.cause||we,writable:!0,enumerable:!1,configurable:!0}),Re}throw Se.from(we,we&&we.code,_,K,we&&we.response)}})},KC=new Map,y1=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=KC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:XC(t)),p=f;return f};y1();const Mf={http:uC,xhr:LC,fetch:{get:y1}};V.forEach(Mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const b1=e=>`- ${e}`,QC=e=>V.isFunction(e)||e===null||e===!1;function JC(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!QC(r)&&(o=Mf[(l=String(r)).toLowerCase()],o===void 0))throw new Se(`Unknown adapter '${l}'`);if(o&&(V.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 :
1
+ (function(qe,Ue){typeof exports=="object"&&typeof module!="undefined"?module.exports=Ue():typeof define=="function"&&define.amd?define(Ue):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=Ue())})(this,(function(){"use strict";var XU=Object.defineProperty,KU=Object.defineProperties;var QU=Object.getOwnPropertyDescriptors;var zd=Object.getOwnPropertySymbols;var gS=Object.prototype.hasOwnProperty,ES=Object.prototype.propertyIsEnumerable;var fa=(qe,Ue)=>(Ue=Symbol[qe])?Ue:Symbol.for("Symbol."+qe),JU=qe=>{throw TypeError(qe)},Zu=Math.pow,kg=(qe,Ue,Ke)=>Ue in qe?XU(qe,Ue,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):qe[Ue]=Ke,F=(qe,Ue)=>{for(var Ke in Ue||(Ue={}))gS.call(Ue,Ke)&&kg(qe,Ke,Ue[Ke]);if(zd)for(var Ke of zd(Ue))ES.call(Ue,Ke)&&kg(qe,Ke,Ue[Ke]);return qe},Ee=(qe,Ue)=>KU(qe,QU(Ue));var Tn=(qe,Ue)=>{var Ke={};for(var lt in qe)gS.call(qe,lt)&&Ue.indexOf(lt)<0&&(Ke[lt]=qe[lt]);if(qe!=null&&zd)for(var lt of zd(qe))Ue.indexOf(lt)<0&&ES.call(qe,lt)&&(Ke[lt]=qe[lt]);return Ke};var ve=(qe,Ue,Ke)=>kg(qe,typeof Ue!="symbol"?Ue+"":Ue,Ke);var et=(qe,Ue,Ke)=>new Promise((lt,Vt)=>{var De=gt=>{try{wn(Ke.next(gt))}catch(xn){Vt(xn)}},pn=gt=>{try{wn(Ke.throw(gt))}catch(xn){Vt(xn)}},wn=gt=>gt.done?lt(gt.value):Promise.resolve(gt.value).then(De,pn);wn((Ke=Ke.apply(qe,Ue)).next())}),di=function(qe,Ue){this[0]=qe,this[1]=Ue},jd=(qe,Ue,Ke)=>{var lt=(wn,gt,xn,$r)=>{try{var os=Ke[wn](gt),po=(gt=os.value)instanceof di,ha=os.done;Promise.resolve(po?gt[0]:gt).then(x=>po?lt(wn==="return"?wn:"next",gt[1]?{done:x.done,value:x.value}:x,xn,$r):xn({value:x,done:ha})).catch(x=>lt("throw",x,xn,$r))}catch(x){$r(x)}},Vt=(wn,gt,xn,$r)=>pn[wn]=os=>(gt=new Promise((po,ha,x)=>(x=()=>lt(wn,os,po,ha),De?De.then(x):x())),$r=()=>De===xn&&(De=0),De=xn=gt.then($r,$r),gt),De,pn={};return Ke=Ke.apply(qe,Ue),pn[fa("asyncIterator")]=()=>pn,Vt("next"),Vt("throw"),Vt("return"),pn},Pg=qe=>{var Ue=qe[fa("asyncIterator")],Ke=!1,lt,Vt={};return Ue==null?(Ue=qe[fa("iterator")](),lt=De=>Vt[De]=pn=>Ue[De](pn)):(Ue=Ue.call(qe),lt=De=>Vt[De]=pn=>{if(Ke){if(Ke=!1,De==="throw")throw pn;return pn}return Ke=!0,{done:!1,value:new di(new Promise(wn=>{var gt=Ue[De](pn);gt instanceof Object||JU("Object expected"),wn(gt)}),1)}}),Vt[fa("iterator")]=()=>Vt,lt("next"),"throw"in Ue?lt("throw"):Vt.throw=De=>{throw De},"return"in Ue&&lt("return"),Vt},yS=(qe,Ue,Ke)=>(Ue=qe[fa("asyncIterator")])?Ue.call(qe):(qe=qe[fa("iterator")](),Ue={},Ke=(lt,Vt)=>(Vt=qe[lt])&&(Ue[lt]=De=>new Promise((pn,wn,gt)=>(De=Vt.call(qe,De),gt=De.done,Promise.resolve(De.value).then(xn=>pn({value:xn,done:gt}),wn)))),Ke("next"),Ke("return"),Ue);var qe=document.createElement("style");qe.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-wrapper .cim-widget-search-status{margin:0;padding:0 8px;font-family:var(--cim-widget-font-family, inherit);font-size:.75rem;font-weight:400;line-height:1.5;color:var(--cim-widget-font-color, #1a202c);overflow-wrap:anywhere}.cim-widget-search-bar-wrapper .cim-widget-search-status.cim-widget-search-error{color:#b91c1c}.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;&:disabled{opacity:.6;cursor:not-allowed}}.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-search-bar-wrapper .cim-widget-connection-status-icon.connecting{background-color:var(--cim-widget-primary-color, #3182ce);animation:cim-widget-search-connecting-pulse 1.5s ease-in-out infinite}@keyframes cim-widget-search-connecting-pulse{0%,to{opacity:1}50%{opacity:.4}}@media(prefers-reduced-motion:reduce){.cim-widget-search-bar-wrapper .cim-widget-connection-status-icon.connecting{animation:none}}.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-chip-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(qe);function Ue(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ke={exports:{}},lt={},Vt={exports:{}},De={};var pn;function wn(){if(pn)return De;pn=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(M){return M===null||typeof M!="object"?null:(M=m&&M[m]||M["@@iterator"],typeof M=="function"?M:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,S={};function k(M,K,I){this.props=M,this.context=K,this.refs=S,this.updater=I||y}k.prototype.isReactComponent={},k.prototype.setState=function(M,K){if(typeof M!="object"&&typeof M!="function"&&M!=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,M,K,"setState")},k.prototype.forceUpdate=function(M){this.updater.enqueueForceUpdate(this,M,"forceUpdate")};function _(){}_.prototype=k.prototype;function C(M,K,I){this.props=M,this.context=K,this.refs=S,this.updater=I||y}var A=C.prototype=new _;A.constructor=C,w(A,k.prototype),A.isPureReactComponent=!0;var H=Array.isArray,U=Object.prototype.hasOwnProperty,L={current:null},z={key:!0,ref:!0,__self:!0,__source:!0};function Z(M,K,I){var ue,be={},Ae=null,we=null;if(K!=null)for(ue in K.ref!==void 0&&(we=K.ref),K.key!==void 0&&(Ae=""+K.key),K)U.call(K,ue)&&!z.hasOwnProperty(ue)&&(be[ue]=K[ue]);var Re=arguments.length-2;if(Re===1)be.children=I;else if(1<Re){for(var Fe=Array(Re),at=0;at<Re;at++)Fe[at]=arguments[at+2];be.children=Fe}if(M&&M.defaultProps)for(ue in Re=M.defaultProps,Re)be[ue]===void 0&&(be[ue]=Re[ue]);return{$$typeof:e,type:M,key:Ae,ref:we,props:be,_owner:L.current}}function de(M,K){return{$$typeof:e,type:M.type,key:K,ref:M.ref,props:M.props,_owner:M._owner}}function q(M){return typeof M=="object"&&M!==null&&M.$$typeof===e}function re(M){var K={"=":"=0",":":"=2"};return"$"+M.replace(/[=:]/g,function(I){return K[I]})}var fe=/\/+/g;function pe(M,K){return typeof M=="object"&&M!==null&&M.key!=null?re(""+M.key):K.toString(36)}function ee(M,K,I,ue,be){var Ae=typeof M;(Ae==="undefined"||Ae==="boolean")&&(M=null);var we=!1;if(M===null)we=!0;else switch(Ae){case"string":case"number":we=!0;break;case"object":switch(M.$$typeof){case e:case t:we=!0}}if(we)return we=M,be=be(we),M=ue===""?"."+pe(we,0):ue,H(be)?(I="",M!=null&&(I=M.replace(fe,"$&/")+"/"),ee(be,K,I,"",function(at){return at})):be!=null&&(q(be)&&(be=de(be,I+(!be.key||we&&we.key===be.key?"":(""+be.key).replace(fe,"$&/")+"/")+M)),K.push(be)),1;if(we=0,ue=ue===""?".":ue+":",H(M))for(var Re=0;Re<M.length;Re++){Ae=M[Re];var Fe=ue+pe(Ae,Re);we+=ee(Ae,K,I,Fe,be)}else if(Fe=T(M),typeof Fe=="function")for(M=Fe.call(M),Re=0;!(Ae=M.next()).done;)Ae=Ae.value,Fe=ue+pe(Ae,Re++),we+=ee(Ae,K,I,Fe,be);else if(Ae==="object")throw K=String(M),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(M).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return we}function ie(M,K,I){if(M==null)return M;var ue=[],be=0;return ee(M,ue,"","",function(Ae){return K.call(I,Ae,be++)}),ue}function Ce(M){if(M._status===-1){var K=M._result;K=K(),K.then(function(I){(M._status===0||M._status===-1)&&(M._status=1,M._result=I)},function(I){(M._status===0||M._status===-1)&&(M._status=2,M._result=I)}),M._status===-1&&(M._status=0,M._result=K)}if(M._status===1)return M._result.default;throw M._result}var ae={current:null},J={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:J,ReactCurrentOwner:L};function P(){throw Error("act(...) is not supported in production builds of React.")}return De.Children={map:ie,forEach:function(M,K,I){ie(M,function(){K.apply(this,arguments)},I)},count:function(M){var K=0;return ie(M,function(){K++}),K},toArray:function(M){return ie(M,function(K){return K})||[]},only:function(M){if(!q(M))throw Error("React.Children.only expected to receive a single React element child.");return M}},De.Component=k,De.Fragment=n,De.Profiler=o,De.PureComponent=C,De.StrictMode=r,De.Suspense=d,De.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,De.act=P,De.cloneElement=function(M,K,I){if(M==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+M+".");var ue=w({},M.props),be=M.key,Ae=M.ref,we=M._owner;if(K!=null){if(K.ref!==void 0&&(Ae=K.ref,we=L.current),K.key!==void 0&&(be=""+K.key),M.type&&M.type.defaultProps)var Re=M.type.defaultProps;for(Fe in K)U.call(K,Fe)&&!z.hasOwnProperty(Fe)&&(ue[Fe]=K[Fe]===void 0&&Re!==void 0?Re[Fe]:K[Fe])}var Fe=arguments.length-2;if(Fe===1)ue.children=I;else if(1<Fe){Re=Array(Fe);for(var at=0;at<Fe;at++)Re[at]=arguments[at+2];ue.children=Re}return{$$typeof:e,type:M.type,key:be,ref:Ae,props:ue,_owner:we}},De.createContext=function(M){return M={$$typeof:u,_currentValue:M,_currentValue2:M,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},M.Provider={$$typeof:a,_context:M},M.Consumer=M},De.createElement=Z,De.createFactory=function(M){var K=Z.bind(null,M);return K.type=M,K},De.createRef=function(){return{current:null}},De.forwardRef=function(M){return{$$typeof:l,render:M}},De.isValidElement=q,De.lazy=function(M){return{$$typeof:p,_payload:{_status:-1,_result:M},_init:Ce}},De.memo=function(M,K){return{$$typeof:f,type:M,compare:K===void 0?null:K}},De.startTransition=function(M){var K=J.transition;J.transition={};try{M()}finally{J.transition=K}},De.unstable_act=P,De.useCallback=function(M,K){return ae.current.useCallback(M,K)},De.useContext=function(M){return ae.current.useContext(M)},De.useDebugValue=function(){},De.useDeferredValue=function(M){return ae.current.useDeferredValue(M)},De.useEffect=function(M,K){return ae.current.useEffect(M,K)},De.useId=function(){return ae.current.useId()},De.useImperativeHandle=function(M,K,I){return ae.current.useImperativeHandle(M,K,I)},De.useInsertionEffect=function(M,K){return ae.current.useInsertionEffect(M,K)},De.useLayoutEffect=function(M,K){return ae.current.useLayoutEffect(M,K)},De.useMemo=function(M,K){return ae.current.useMemo(M,K)},De.useReducer=function(M,K,I){return ae.current.useReducer(M,K,I)},De.useRef=function(M){return ae.current.useRef(M)},De.useState=function(M){return ae.current.useState(M)},De.useSyncExternalStore=function(M,K,I){return ae.current.useSyncExternalStore(M,K,I)},De.useTransition=function(){return ae.current.useTransition()},De.version="18.3.1",De}var gt;function xn(){return gt||(gt=1,Vt.exports=wn()),Vt.exports}var $r;function os(){if($r)return lt;$r=1;var e=xn(),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 lt.Fragment=n,lt.jsx=u,lt.jsxs=u,lt}var po;function ha(){return po||(po=1,Ke.exports=os()),Ke.exports}var x=ha();const Vr=Object.create(null);Vr.open="0",Vr.close="1",Vr.ping="2",Vr.pong="3",Vr.message="4",Vr.upgrade="5",Vr.noop="6";const el=Object.create(null);Object.keys(Vr).forEach(e=>{el[Vr[e]]=e});const $d={type:"error",data:"parser error"},Ng=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Og=typeof ArrayBuffer=="function",Ig=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Vd=({type:e,data:t},n,r)=>Ng&&t instanceof Blob?n?r(t):Rg(t,r):Og&&(t instanceof ArrayBuffer||Ig(t))?n?r(t):Rg(new Blob([t]),r):r(Vr[e]+(t||"")),Rg=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function Lg(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let qd;function xS(e,t){if(Ng&&e.data instanceof Blob)return e.data.arrayBuffer().then(Lg).then(t);if(Og&&(e.data instanceof ArrayBuffer||Ig(e.data)))return t(Lg(e.data));Vd(e,!1,n=>{qd||(qd=new TextEncoder),t(qd.encode(n))})}const Dg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",pa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Dg.length;e++)pa[Dg.charCodeAt(e)]=e;const _S=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=pa[e.charCodeAt(r)],u=pa[e.charCodeAt(r+1)],l=pa[e.charCodeAt(r+2)],d=pa[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},SS=typeof ArrayBuffer=="function",Yd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mg(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:vS(e.substring(1),t)}:el[n]?e.length>1?{type:el[n],data:e.substring(1)}:{type:el[n]}:$d},vS=(e,t)=>{if(SS){const n=_S(e);return Mg(n,t)}else return{base64:!0,data:e}},Mg=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Fg="",AS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Vd(a,!1,l=>{r[u]=l,++o===n&&t(r.join(Fg))})})},CS=(e,t)=>{const n=e.split(Fg),r=[];for(let o=0;o<n.length;o++){const a=Yd(n[o],t);if(r.push(a),a.type==="error")break}return r};function kS(){return new TransformStream({transform(e,t){xS(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 Wd;function tl(e){return e.reduce((t,n)=>t+n.length,0)}function nl(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 PS(e,t){Wd||(Wd=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(tl(n)<1)break;const d=nl(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(tl(n)<2)break;const d=nl(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(tl(n)<8)break;const d=nl(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue($d);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(tl(n)<o)break;const d=nl(n,o);l.enqueue(Yd(a?d:Wd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue($d);break}}}})}const Bg=4;function qt(e){if(e)return NS(e)}function NS(e){for(var t in qt.prototype)e[t]=qt.prototype[t];return e}qt.prototype.on=qt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},qt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},qt.prototype.off=qt.prototype.removeListener=qt.prototype.removeAllListeners=qt.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},qt.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},qt.prototype.emitReserved=qt.prototype.emit,qt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},qt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const rl=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),pr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),OS="arraybuffer";function ZU(){}function Ug(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const IS=pr.setTimeout,RS=pr.clearTimeout;function il(e,t){t.useNativeTimers?(e.setTimeoutFn=IS.bind(pr),e.clearTimeoutFn=RS.bind(pr)):(e.setTimeoutFn=pr.setTimeout.bind(pr),e.clearTimeoutFn=pr.clearTimeout.bind(pr))}const LS=1.33;function DS(e){return typeof e=="string"?MS(e):Math.ceil((e.byteLength||e.size)*LS)}function MS(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 Hg(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function FS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function BS(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 US extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Gd extends qt{constructor(t){super(),this.writable=!1,il(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 US(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=Yd(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=FS(t);return n.length?"?"+n:""}}class HS extends Gd{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)};CS(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,AS(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]=Hg()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let zg=!1;try{zg=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const zS=zg;function jS(){}class $S extends HS{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 qr extends qt{constructor(t,n,r){super(),this.createRequest=t,il(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=Ug(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=qr.requestsCount++,qr.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=jS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete qr.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(qr.requestsCount=0,qr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",jg);else if(typeof addEventListener=="function"){const e="onpagehide"in pr?"pagehide":"unload";addEventListener(e,jg,!1)}}function jg(){for(let e in qr.requests)qr.requests.hasOwnProperty(e)&&qr.requests[e].abort()}const VS=(function(){const e=$g({xdomain:!1});return e&&e.responseType!==null})();class qS extends $S{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=VS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new qr($g,this.uri(),t)}}function $g(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||zS))return new XMLHttpRequest}catch(n){}if(!t)try{return new pr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Vg=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class YS extends Gd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Vg?{}:Ug(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;Vd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&rl(()=>{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]=Hg()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Xd=pr.WebSocket||pr.MozWebSocket;class WS extends YS{createSocket(t,n,r){return Vg?new Xd(t,n,r):n?new Xd(t,n):new Xd(t)}doWrite(t,n){this.ws.send(n)}}class GS extends Gd{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=PS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=kS();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&&rl(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const XS={websocket:WS,webtransport:GS,polling:qS},KS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,QS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Kd(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=KS.exec(e||""),a={},u=14;for(;u--;)a[QS[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=JS(a,a.path),a.queryKey=ZS(a,a.query),a}function JS(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 ZS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Qd=typeof addEventListener=="function"&&typeof removeEventListener=="function",ol=[];Qd&&addEventListener("offline",()=>{ol.forEach(e=>e())},!1);class Ri extends qt{constructor(t,n){if(super(),this.binaryType=OS,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=Kd(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=Kd(n.host).host);il(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=BS(this.opts.query)),Qd&&(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"})},ol.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Bg,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&&Ri.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",Ri.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+=DS(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,rl(()=>{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(Ri.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(),Qd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ol.indexOf(this._offlineEventListener);r!==-1&&ol.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ri.protocol=Bg;class ev extends Ri{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;Ri.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;Ri.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 tv=class extends ev{constructor(t,n={}){const r=typeof t=="object",o=r?F({},t):F({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>XS[a]).filter(a=>!!a)),super(r?o:t,o)}};function nv(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=Kd(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 rv=typeof ArrayBuffer=="function",iv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,qg=Object.prototype.toString,ov=typeof Blob=="function"||typeof Blob!="undefined"&&qg.call(Blob)==="[object BlobConstructor]",sv=typeof File=="function"||typeof File!="undefined"&&qg.call(File)==="[object FileConstructor]";function Jd(e){return rv&&(e instanceof ArrayBuffer||iv(e))||ov&&e instanceof Blob||sv&&e instanceof File}function sl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(sl(e[n]))return!0;return!1}if(Jd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return sl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&sl(e[n]))return!0;return!1}function av(e){const t=[],n=e.data,r=e;return r.data=al(n,t),r.attachments=t.length,{packet:r,buffers:t}}function al(e,t,n){if(!e)return e;if(Jd(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]=al(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return al(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=al(e[o],t));return r}return e}function uv(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 lv=["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 cv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&sl(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=av(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class ef extends qt{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 dv(n)):super.emitReserved("decoded",n)}else if(Jd(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(!fv(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(ef.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 Yg(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||Yg(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&lv.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 dv{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=uv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const fv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Yg(e){return Object.prototype.toString.call(e)==="[object Object]"}const hv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:ef,Encoder:cv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function Cr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const pv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wg extends qt{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=[Cr(t,"open",this.onopen.bind(this)),Cr(t,"packet",this.onpacket.bind(this)),Cr(t,"error",this.onerror.bind(this)),Cr(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(pv.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 ss(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}ss.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},ss.prototype.reset=function(){this.attempts=0},ss.prototype.setMin=function(e){this.ms=e},ss.prototype.setMax=function(e){this.max=e},ss.prototype.setJitter=function(e){this.jitter=e};class tf extends qt{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,il(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 ss({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||hv;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 tv(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Cr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Cr(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(Cr(t,"ping",this.onping.bind(this)),Cr(t,"data",this.ondata.bind(this)),Cr(t,"error",this.onerror.bind(this)),Cr(t,"close",this.onclose.bind(this)),Cr(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){rl(()=>{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 Wg(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 ma={};function ul(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=nv(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ma[o]&&a in ma[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new tf(r,t):(ma[o]||(ma[o]=new tf(r,t)),d=ma[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ul,{Manager:tf,Socket:Wg,io:ul,connect:ul});var mv=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===gv})(t)})(e)},gv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ga(e,t){return t.clone!==!1&&t.isMergeableObject(e)?as((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Ev(e,t,n){return e.concat(t).map((function(r){return ga(r,n)}))}function Gg(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 Xg(e,t){try{return t in e}catch(n){return!1}}function yv(e,t,n){var r={};return n.isMergeableObject(e)&&Gg(e).forEach((function(o){r[o]=ga(e[o],n)})),Gg(t).forEach((function(o){(function(a,u){return Xg(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(Xg(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return as;var l=u.customMerge(a);return typeof l=="function"?l:as})(o,n)(e[o],t[o],n):r[o]=ga(t[o],n))})),r}function as(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Ev,n.isMergeableObject=n.isMergeableObject||mv,n.cloneUnlessOtherwiseSpecified=ga;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):yv(e,t,n):ga(t,n)}as.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return as(n,r,t)}),{})};var bv=as;let Tv=class{constructor(t){Object.assign(this,t)}};function Dn(e){if(e)return(function(t){for(var n in Dn.prototype)t[n]=Dn.prototype[n];return t})(e)}Dn.prototype.on=Dn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Dn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Dn.prototype.off=Dn.prototype.removeListener=Dn.prototype.removeAllListeners=Dn.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},Dn.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},Dn.prototype.emitReserved=Dn.prototype.emit,Dn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Dn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const wv=typeof ArrayBuffer=="function",Kg=Object.prototype.toString,xv=typeof Blob=="function"||typeof Blob!="undefined"&&Kg.call(Blob)==="[object BlobConstructor]",_v=typeof File=="function"||typeof File!="undefined"&&Kg.call(File)==="[object FileConstructor]";function nf(e){return wv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||xv&&e instanceof Blob||_v&&e instanceof File}function ll(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ll(e[n]))return!0;return!1}if(nf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ll(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ll(e[n]))return!0;return!1}function Sv(e){const t=[],n=e.data,r=e;return r.data=rf(n,t),r.attachments=t.length,{packet:r,buffers:t}}function rf(e,t){if(!e)return e;if(nf(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]=rf(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]=rf(e[r],t));return n}return e}function vv(e,t){return e.data=of(e.data,t),delete e.attachments,e}function of(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]=of(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=of(e[n],t));return e}const Av=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ot;(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"})(Ot||(Ot={}));class Cv{constructor(t){this.replacer=t}encode(t){return t.type!==Ot.EVENT&&t.type!==Ot.ACK||!ll(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ot.EVENT?Ot.BINARY_EVENT:Ot.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ot.BINARY_EVENT&&t.type!==Ot.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=Sv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class sf extends Dn{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===Ot.BINARY_EVENT;r||n.type===Ot.BINARY_ACK?(n.type=r?Ot.EVENT:Ot.ACK,this.reconstructor=new kv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!nf(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(Ot[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ot.BINARY_EVENT||r.type===Ot.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(!Pv(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(!sf.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 Ot.CONNECT:return Qg(n);case Ot.DISCONNECT:return n===void 0;case Ot.CONNECT_ERROR:return typeof n=="string"||Qg(n);case Ot.EVENT:case Ot.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Av.indexOf(n[0])===-1);case Ot.ACK:case Ot.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kv{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=vv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Pv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Qg(e){return Object.prototype.toString.call(e)==="[object Object]"}const Jg=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],Zg=(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)},e0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),Nv=Zg((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),Jg),t0=Zg(e0,e0,Jg),Ov={Encoder:class extends Cv{encode(e){var t,n;return super.encode(Ee(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],Nv(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 sf{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?t0(r):r)):n instanceof Object?t0(n):n)):t))}}},Iv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Rv{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=[Iv,l,{parser:Ov,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=ul(d,bv.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*Zu(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 jd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new di(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new di(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new di(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 Tv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const n0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),r0=(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 O=xn();const mo=Ue(O);var i0=Symbol.for("immer-nothing"),o0=Symbol.for("immer-draftable"),ct=Symbol.for("immer-state");function mr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var us=Object.getPrototypeOf;function ls(e){return!!e&&!!e[ct]}function fi(e){var t;return e?s0(e)||Array.isArray(e)||!!e[o0]||!!((t=e.constructor)!=null&&t[o0])||ya(e)||dl(e):!1}var Lv=Object.prototype.constructor.toString();function s0(e){if(!e||typeof e!="object")return!1;const t=us(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)===Lv}function Ea(e,t){cl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function cl(e){const t=e[ct];return t?t.type_:Array.isArray(e)?1:ya(e)?2:dl(e)?3:0}function af(e,t){return cl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a0(e,t,n){const r=cl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Dv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function ya(e){return e instanceof Map}function dl(e){return e instanceof Set}function nn(e){return e.copy_||e.base_}function uf(e,t){if(ya(e))return new Map(e);if(dl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=s0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ct];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(us(e),r)}else{const r=us(e);if(r!==null&&n)return F({},e);const o=Object.create(r);return Object.assign(o,e)}}function lf(e,t=!1){return hl(e)||ls(e)||!fi(e)||(cl(e)>1&&Object.defineProperties(e,{set:{value:fl},add:{value:fl},clear:{value:fl},delete:{value:fl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>lf(n,!0))),e}function fl(){mr(2)}function hl(e){return Object.isFrozen(e)}var cf={};function go(e){const t=cf[e];return t||mr(0,e),t}function Mv(e,t){cf[e]||(cf[e]=t)}var ba;function pl(){return ba}function Fv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u0(e,t){t&&(go("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function df(e){ff(e),e.drafts_.forEach(Bv),e.drafts_=null}function ff(e){e===ba&&(ba=e.parent_)}function l0(e){return ba=Fv(ba,e)}function Bv(e){const t=e[ct];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function c0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ct].modified_&&(df(t),mr(4)),fi(e)&&(e=ml(t,e),t.parent_||gl(t,e)),t.patches_&&go("Patches").generateReplacementPatches_(n[ct].base_,e,t.patches_,t.inversePatches_)):e=ml(t,n,[]),df(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i0?e:void 0}function ml(e,t,n){if(hl(t))return t;const r=t[ct];if(!r)return Ea(t,(o,a)=>d0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return gl(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),Ea(a,(l,d)=>d0(e,r,o,l,d,n,u)),gl(e,o,!1),n&&e.patches_&&go("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function d0(e,t,n,r,o,a,u){if(ls(o)){const l=a&&t&&t.type_!==3&&!af(t.assigned_,r)?a.concat(r):void 0,d=ml(e,o,l);if(a0(n,r,d),ls(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(fi(o)&&!hl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ml(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(ya(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&gl(e,o)}}function gl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&lf(t,n)}function Uv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:pl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=hf;n&&(o=[r],a=Ta);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var hf={get(e,t){if(t===ct)return e;const n=nn(e);if(!af(n,t))return Hv(e,n,t);const r=n[t];return e.finalized_||!fi(r)?r:r===pf(e.base_,t)?(mf(e),e.copy_[t]=wa(r,e)):r},has(e,t){return t in nn(e)},ownKeys(e){return Reflect.ownKeys(nn(e))},set(e,t,n){const r=f0(nn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=pf(nn(e),t),a=o==null?void 0:o[ct];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Dv(n,o)&&(n!==void 0||af(e.base_,t)))return!0;mf(e),hi(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 pf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,mf(e),hi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=nn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){mr(11)},getPrototypeOf(e){return us(e.base_)},setPrototypeOf(){mr(12)}},Ta={};Ea(hf,(e,t)=>{Ta[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Ta.deleteProperty=function(e,t){return Ta.set.call(this,e,t,void 0)},Ta.set=function(e,t,n){return hf.set.call(this,e[0],t,n,e[0])};function pf(e,t){const n=e[ct];return(n?nn(n):e)[t]}function Hv(e,t,n){var o;const r=f0(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function f0(e,t){if(!(t in e))return;let n=us(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=us(n)}}function hi(e){e.modified_||(e.modified_=!0,e.parent_&&hi(e.parent_))}function mf(e){e.copy_||(e.copy_=uf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var zv=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"&&mr(6),r!==void 0&&typeof r!="function"&&mr(7);let o;if(fi(t)){const a=l0(this),u=wa(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?df(a):ff(a)}return u0(a,r),c0(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===i0&&(o=void 0),this.autoFreeze_&&lf(o,!0),r){const a=[],u=[];go("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else mr(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){fi(e)||mr(8),ls(e)&&(e=jv(e));const t=l0(this),n=wa(e,void 0);return n[ct].isManual_=!0,ff(t),n}finishDraft(e,t){const n=e&&e[ct];(!n||!n.isManual_)&&mr(9);const{scope_:r}=n;return u0(r,t),c0(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=go("Patches").applyPatches_;return ls(e)?r(e,t):this.produce(e,o=>r(o,t))}};function wa(e,t){const n=ya(e)?go("MapSet").proxyMap_(e,t):dl(e)?go("MapSet").proxySet_(e,t):Uv(e,t);return(t?t.scope_:pl()).drafts_.push(n),n}function jv(e){return ls(e)||mr(10,e),h0(e)}function h0(e){if(!fi(e)||hl(e))return e;const t=e[ct];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=uf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=uf(e,!0);return Ea(n,(r,o)=>{a0(n,r,h0(o))}),t&&(t.finalized_=!1),n}function $v(){class e extends Map{constructor(d,f){super(),this[ct]={type_:2,parent_:f,scope_:f?f.scope_:pl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return nn(this[ct]).size}has(d){return nn(this[ct]).has(d)}set(d,f){const p=this[ct];return u(p),(!nn(p).has(d)||nn(p).get(d)!==f)&&(n(p),hi(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[ct];return u(f),n(f),hi(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ct];u(d),nn(d).size&&(n(d),hi(d),d.assigned_=new Map,Ea(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ct];nn(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[ct];u(f);const p=nn(f).get(d);if(f.finalized_||!fi(p)||p!==f.base_.get(d))return p;const m=wa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return nn(this[ct]).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[ct]={type_:3,parent_:f,scope_:f?f.scope_:pl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return nn(this[ct]).size}has(d){const f=this[ct];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[ct];return u(f),this.has(d)||(a(f),hi(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ct];return u(f),a(f),hi(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ct];u(d),nn(d).size&&(a(d),hi(d),d.copy_.clear())}values(){const d=this[ct];return u(d),a(d),d.copy_.values()}entries(){const d=this[ct];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(fi(d)){const f=wa(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&mr(3,JSON.stringify(nn(l)))}Mv("MapSet",{proxyMap_:t,proxySet_:o})}var Vv=new zv,qv=Vv.produce;function p0(e,t,n){var r=O.useMemo(function(){return qv(e)},[e]);return O.useReducer(r,t,n)}const m0={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"},Eo={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},g0=["ask_cim","search","browse","pdp"],Yv=e=>g0.includes(e),E0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(E0));const Wv=new Map(Object.entries(E0).map(([e,t])=>[t,e])),Gv=e=>{var t;return(t=Wv.get(e))!=null?t:null},cs="cimulate",gf=`${cs}:pdp-update`,Ef=`${cs}:browse-update`,yf=`${cs}:search-update`,bf=`${cs}:ui-state-update`,Tf=`${cs}:prompts-state-update`,wf=`${cs}:session-state`,Yr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},m0),Xv={"browse-context":Yr.CONTEXT_UPDATED,categoryId:Yr.CATEGORY_ID_CHANGED,categoryName:Yr.CATEGORY_NAME_CHANGED,page:Yr.PAGE_CHANGED,pageSize:Yr.PAGE_SIZE_CHANGED,includeFacets:Yr.FACET_FILTERS_CHANGED,facetFilters:Yr.FACET_FILTERS_CHANGED,rangeFilters:Yr.RANGE_FILTERS_CHANGED,catalogSegment:Yr.CATALOG_SEGMENT_CHANGED,pricebooks:Yr.PRICEBOOKS_CHANGED},pi=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},m0),Kv={"search-context":pi.SEARCH_CONTEXT_UPDATED,query:pi.QUERY_CHANGED,page:pi.PAGE_CHANGED,pageSize:pi.PAGE_SIZE_CHANGED,includeFacets:pi.FACET_FILTERS_CHANGED,facetFilters:pi.FACET_FILTERS_CHANGED,rangeFilters:pi.RANGE_FILTERS_CHANGED,catalogSegment:pi.CATALOG_SEGMENT_CHANGED,pricebooks:pi.PRICEBOOKS_CHANGED},j="cim-widget",rt=`--${j}`,Li={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},Qv=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||Li.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||Li.secondaryColor,[`${rt}-font-color`]:e.fontColor||Li.fontColor,[`${rt}-font-family`]:e.fontFamily||Li.fontFamily,[`${rt}-background-color`]:e.backgroundColor||Li.backgroundColor,[`${rt}-border-color`]:e.borderColor||Li.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||Li.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||Li.borderRadius)}),y0={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"},El={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"}}},Jv=Object.freeze({legacy:Object.freeze(F({preset:"legacy"},El.legacy.traits)),commerce:Object.freeze(F({preset:"commerce"},El.commerce.traits))}),b0={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"}},T0={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"}},w0={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"}},x0={primaryColor:"primary",secondaryColor:"secondary",fontColor:"text",fontFamily:"fontFamily",backgroundColor:"surface",borderColor:"border",inputBorderColor:"inputBorder",borderRadius:"cardRadius"},_0={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"},Di=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),$n=e=>e===0||typeof e=="string"&&e.trim().length>0,yo=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),S0=e=>{var T,y;const t=Di(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(yo(t,"tokens")||["density","shape","elevation"].some(w=>yo(t,w)&&t[w]!==El[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?Qv(t):void 0,l=El[r],d=F({},l.traits);typeof t.density=="string"&&yo(b0,t.density)&&(d.density=t.density),typeof t.shape=="string"&&yo(T0,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&yo(w0,t.elevation)&&(d.elevation=t.elevation);const f=F(F(F(F(F({},y0),l.tokens),b0[d.density]),T0[d.shape]),w0[d.elevation]);if(Di(t.tokens))for(const w of Object.keys(y0)){const S=t.tokens[w];yo(t.tokens,w)&&$n(S)&&(f[w]=String(S))}Di(t.tokens)&&$n(t.tokens.fontFamily)&&!$n(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),Di(t.tokens)&&$n(t.tokens.launcherShadow)&&!$n(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),Di(t.tokens)&&$n(t.tokens.transcriptPadding)&&!$n(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),Di(t.tokens)&&$n(t.tokens.text)&&!$n(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=Di(t.tokens)?t.tokens.inputBorder:void 0;!$n(p)&&Di(t.tokens)&&$n(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,S]of Object.entries(x0)){const k=t[w];yo(t,w)&&$n(k)&&(f[S]=String(k),w==="borderColor"&&!$n(t.inputBorderColor)&&!$n(p)&&(f.inputBorder=String(k)),w==="fontFamily"&&(f.productFontFamily=String(k)),w==="fontColor"&&(f.foreground=String(k)),w==="borderRadius"&&(f.controlRadius=f.composerRadius=f.chipRadius=f.mediaRadius=String(k)))}if(u)for(const w of Object.values(x0)){const S=(T=_0[w])!=null?T:w.replace(/[A-Z]/g,k=>`-${k.toLowerCase()}`);f[w]=u[`${rt}-${S}`]}const m={};for(const[w,S]of Object.entries(f)){const k=(y=_0[w])!=null?y:w.replace(/[A-Z]/g,_=>`-${_.toLowerCase()}`);m[`${rt}-${k}`]=S}return{preset:r,compatibility:a,traits:d,tokens:f,cssVariables:u!=null?u:m,variants:F({},l.variants),transcriptClassName:a==="legacy"?"":`${j}-transcript-${l.variants.transcript}`}},mi={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},v0=O.createContext(null),A0=O.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"},C0={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,layout:null};function k0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Zv}=Object.prototype,{getPrototypeOf:Mi}=Object,{iterator:xa,toStringTag:P0}=Symbol,_a=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),N0=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),O0=(e,t,n)=>e===Object.prototype||!n&&t===null,eA=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(N0(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},Sa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=Mi(n);if(O0(n,o,n===e))return!1;if(_a(n,t))return!0;n=o}return!1},tA=(e,t)=>e!=null&&Sa(e,t)?e[t]:void 0,nA=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Mi(e);if(t===null&&eA(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:Mi(a);if(O0(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)N0(d)||_a(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},xf=(e=>t=>{const n=Zv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),gr=e=>(e=e.toLowerCase(),t=>xf(t)===e),yl=e=>t=>typeof t===e,{isArray:bo}=Array,To=yl("undefined");function ds(e){return e!==null&&!To(e)&&e.constructor!==null&&!To(e.constructor)&&Vn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const I0=gr("ArrayBuffer");function rA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&I0(e.buffer),t}const iA=yl("string"),Vn=yl("function"),R0=yl("number"),fs=e=>e!==null&&typeof e=="object",oA=e=>e===!0||e===!1,bl=e=>{if(!fs(e))return!1;const t=Mi(e);return(t===null||t===Object.prototype||Mi(t)===null)&&!Sa(e,P0)&&!Sa(e,xa)},sA=e=>{if(!fs(e)||ds(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},aA=gr("Date"),uA=gr("File"),lA=e=>!!(e&&typeof e.uri!="undefined"),cA=e=>e&&typeof e.getParts!="undefined",dA=gr("Blob"),fA=gr("FileList"),hA=gr("Set"),pA=e=>fs(e)&&Vn(e.pipe);function mA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const L0=mA(),D0=typeof L0.FormData!="undefined"?L0.FormData:void 0,gA=e=>{if(!e)return!1;if(D0&&e instanceof D0)return!0;const t=Mi(e);if(!t||t===Object.prototype||!Vn(e.append))return!1;const n=xf(e);return n==="formdata"||n==="object"&&Vn(e.toString)&&e.toString()==="[object FormData]"},EA=gr("URLSearchParams"),[yA,bA,TA,wA]=["ReadableStream","Request","Response","Headers"].map(gr),xA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function va(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),bo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ds(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 M0(e,t){if(ds(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 wo=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,F0=e=>!To(e)&&e!==wo;function _f(...e){const{caseless:t,skipUndefined:n}=F0(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&M0(r,u)||u,d=_a(r,l)?r[l]:void 0;bl(d)&&bl(a)?r[l]=_f(d,a):bl(a)?r[l]=_f({},a):bo(a)?r[l]=a.slice():(!n||!To(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||ds(l)||(va(l,o),typeof l!="object"||bo(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];LA.call(l,p)&&o(l[p],p)}}return r}const _A=(e,t,n,{allOwnKeys:r}={})=>(va(t,(o,a)=>{n&&Vn(o)?Object.defineProperty(e,a,{__proto__:null,value:k0(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),SA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),vA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},AA=(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&&Mi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},CA=(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},kA=e=>{if(!e)return null;if(bo(e))return e;let t=e.length;if(!R0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},PA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Mi(Uint8Array)),NA=(e,t)=>{const r=(e&&e[xa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},OA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},IA=gr("HTMLFormElement"),RA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:LA}=Object.prototype,DA=gr("RegExp"),B0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};va(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},MA=e=>{B0(e,(t,n)=>{if(Vn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Vn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},FA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return bo(e)?r(e):r(String(e).split(t)),n},BA=()=>{},UA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function HA(e){return!!(e&&Vn(e.append)&&e[P0]==="FormData"&&e[xa])}const zA=e=>{const t=new WeakSet,n=r=>{if(fs(r)){if(t.has(r))return;if(ds(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(hA(r)){o=[];for(const a of r){const u=n(a);!To(u)&&o.push(u)}}else o=bo(r)?[]:{},va(r,(a,u)=>{const l=n(a);!To(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},jA=gr("AsyncFunction"),$A=e=>e&&(fs(e)||Vn(e))&&Vn(e.then)&&Vn(e.catch),U0=((e,t)=>e?setImmediate:t?((n,r)=>(wo.addEventListener("message",({source:o,data:a})=>{o===wo&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),wo.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Vn(wo.postMessage)),VA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(wo):typeof process!="undefined"&&process.nextTick||U0,H0=e=>e!=null&&Vn(e[xa]),V={isArray:bo,isArrayBuffer:I0,isBuffer:ds,isFormData:gA,isArrayBufferView:rA,isString:iA,isNumber:R0,isBoolean:oA,isObject:fs,isPlainObject:bl,isEmptyObject:sA,isReadableStream:yA,isRequest:bA,isResponse:TA,isHeaders:wA,isUndefined:To,isDate:aA,isFile:uA,isReactNativeBlob:lA,isReactNative:cA,isBlob:dA,isRegExp:DA,isFunction:Vn,isStream:pA,isURLSearchParams:EA,isTypedArray:PA,isFileList:fA,forEach:va,merge:_f,extend:_A,trim:xA,stripBOM:SA,inherits:vA,toFlatObject:AA,kindOf:xf,kindOfTest:gr,endsWith:CA,toArray:kA,forEachEntry:NA,matchAll:OA,isHTMLForm:IA,hasOwnProperty:_a,hasOwnProp:_a,hasOwnInPrototypeChain:Sa,getSafeProp:tA,toSafeFlatObject:nA,reduceDescriptors:B0,freezeMethods:MA,toObjectSet:FA,toCamelCase:RA,noop:BA,toFiniteNumber:UA,findKey:M0,global:wo,isContextDefined:F0,isSpecCompliantForm:HA,toJSONObject:zA,isAsyncFn:jA,isThenable:$A,setImmediate:U0,asap:VA,isIterable:H0,isSafeIterable:e=>e!=null&&Sa(e,xa)&&H0(e)},qA=V.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),YA=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=V.hasOwnProp(t,n);!n||l&&V.hasOwnProp(qA,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function WA(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 GA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),XA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function Sf(e,t){return V.isArray(e)?e.map(n=>Sf(n,t)):WA(String(e).replace(t,""))}const KA=e=>Sf(e,GA),QA=e=>Sf(e,XA);function z0(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=QA(n)}),t}const j0=Symbol("internals");function Aa(e){return e&&String(e).trim().toLowerCase()}function Tl(e){return e===!1||e==null?e:V.isArray(e)?e.map(Tl):KA(String(e))}function JA(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 ZA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function vf(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 eC(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 tC(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=vf(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=vf(d.slice(0,f));if(!ZA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=vf(d.slice(f+1));t[m]=eC(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 nC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Af(e,t,n,r,o){if(V.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!V.isString(t)){if(V.isString(r))return t.indexOf(r)!==-1;if(V.isRegExp(r))return r.test(t)}}function rC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function iC(e,t){const n=V.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let _n=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(l,d,f){const p=Aa(d);if(!p)return;const m=V.findKey(o,p);(!m||o[m]===void 0||f===!0||f===void 0&&o[m]!==!1)&&(o[m||d]=Tl(l))}const u=(l,d)=>V.forEach(l,(f,p)=>a(f,p,d));if(V.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(V.isString(t)&&(t=t.trim())&&!nC(t))u(YA(t),n);else if(V.isObject(t)&&V.isSafeIterable(t)){let l=Object.create(null),d,f;for(const p of t){if(!V.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],V.hasOwnProp(l,f)?(d=l[f],l[f]=V.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=Aa(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return JA(o);if(V.isFunction(n))return n.call(this,o,r);if(V.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Aa(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Af(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Aa(u),u){const l=V.findKey(r,u);l&&(!n||Af(r,r[l],l,n))&&(delete r[l],o=!0)}}return V.isArray(t)?t.forEach(a):a(t),o}clear(t){const n=Object.keys(this);let r=n.length,o=!1;for(;r--;){const a=n[r];(!t||Af(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return V.forEach(this,(o,a)=>{const u=V.findKey(r,a);if(u){n[u]=Tl(o),delete n[a];return}const l=t?rC(a):String(a).trim();l!==a&&delete n[a],n[l]=Tl(o),r[l]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return V.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&V.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){const t=this.get("set-cookie");return V.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 tC(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[j0]=this[j0]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=Aa(u);r[l]||(iC(o,u),r[l]=!0)}return V.isArray(t)?t.forEach(a):a(t),this}};_n.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),V.reduceDescriptors(_n.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),V.freezeMethods(_n);const wl="[REDACTED ****]";function oC(e){if(V.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(V.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function sC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||V.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof _n&&(a=a.toJSON()),r.push(a);let u;if(V.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);V.isUndefined(f)||(u[d]=f)});else{if(!V.isPlainObject(a)&&oC(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?wl:o(d);V.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function $0(e){try{return String(e)}catch(t){return""}}function aC(e){return e.errors.map(n=>{try{return n&&n.message?$0(n.message):$0(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Se=class bS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&V.isArray(t.errors)&&t.errors.length&&(l=aC(t));const d=new bS(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&&V.hasOwnProp(t,"redact")?t.redact:void 0,r=V.isArray(n)&&n.length>0?sC(t,n):V.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Se.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Se.ERR_BAD_OPTION="ERR_BAD_OPTION",Se.ECONNABORTED="ECONNABORTED",Se.ETIMEDOUT="ETIMEDOUT",Se.ECONNREFUSED="ECONNREFUSED",Se.ERR_NETWORK="ERR_NETWORK",Se.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Se.ERR_DEPRECATED="ERR_DEPRECATED",Se.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Se.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Se.ERR_CANCELED="ERR_CANCELED",Se.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Se.ERR_INVALID_URL="ERR_INVALID_URL",Se.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const uC=null,V0=100;function Cf(e){return V.isPlainObject(e)||V.isArray(e)}function q0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function kf(e,t,n){return e?e.concat(t).map(function(o,a){return o=q0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function lC(e){return V.isArray(e)&&!e.some(Cf)}const cC=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function xl(e,t,n){if(!V.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(C,A)=>{const H=V.getSafeProp(n,C);return V.isUndefined(H)?A:H},o=r("metaTokens",!0),a=r("visitor")||S,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",V0),p=d&&V.isSpecCompliantForm(t),m=[];if(!V.isFunction(a))throw new TypeError("visitor must be a function");function T(C){if(C===null)return"";if(V.isDate(C))return C.toISOString();if(V.isBoolean(C))return C.toString();if(!p&&V.isBlob(C))throw new Se("Blob is not supported. Use a Buffer instead.");if(V.isArrayBuffer(C)||V.isTypedArray(C)){if(p&&typeof d=="function")return new d([C]);throw new Se("Blob is not supported. Use a Buffer instead.",Se.ERR_NOT_SUPPORT)}return C}function y(C){if(C>f)throw new Se("Object is too deeply nested ("+C+" levels). Max depth: "+f,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(C,A){if(f===1/0)return JSON.stringify(C);const H=[];return JSON.stringify(C,function(L,z){if(!V.isObject(z))return z;for(;H.length&&H[H.length-1]!==this;)H.pop();return H.push(z),y(A+H.length-1),z})}function S(C,A,H){let U=C;if(V.isReactNative(t)&&V.isReactNativeBlob(C))return t.append(kf(H,A,u),T(C)),!1;if(C&&!H&&typeof C=="object"){if(V.endsWith(A,"{}"))A=o?A:A.slice(0,-2),C=w(C,1);else if(V.isArray(C)&&lC(C)||(V.isFileList(C)||V.endsWith(A,"[]"))&&(U=V.toArray(C)))return A=q0(A),U.forEach(function(z,Z){!(V.isUndefined(z)||z===null)&&t.append(l===!0?kf([A],Z,u):l===null?A:A+"[]",T(z))}),!1}return Cf(C)?!0:(t.append(kf(H,A,u),T(C)),!1)}const k=Object.assign(cC,{defaultVisitor:S,convertValue:T,isVisitable:Cf});function _(C,A,H=0){if(!V.isUndefined(C)){if(y(H),m.indexOf(C)!==-1)throw new Error("Circular reference detected in "+A.join("."));m.push(C),V.forEach(C,function(L,z){(!(V.isUndefined(L)||L===null)&&a.call(t,L,V.isString(z)?z.trim():z,A,k))===!0&&_(L,A?A.concat(z):[z],H+1)}),m.pop()}}if(!V.isObject(e))throw new TypeError("data must be an object");return _(e),t}function Y0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Pf(e,t){this._pairs=[],e&&xl(e,this,t)}const W0=Pf.prototype;W0.append=function(t,n){this._pairs.push([t,n])},W0.toString=function(t){const n=t?r=>t.call(this,r,Y0):Y0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function dC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function G0(e,t,n){if(!t)return e;e=e||"";const r=V.isFunction(n)?{serialize:n}:n,o=V.getSafeProp(r,"encode")||dC,a=V.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=V.isURLSearchParams(t)?t.toString():new Pf(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const Ca=Symbol("internals");function X0(e){return e?e.length:0}function K0(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ka(e,t){const n=e.handlers,r=X0(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 Q0{constructor(){this.handlers=[],this[Ca]={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[Ca];this.handlers==null&&(this.handlers=[]),ka(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[Ca];ka(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||(K0(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ka(this,this[Ca]))}forEach(t){const n=this[Ca];ka(this,n),n.iterationDepth++;try{V.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(ka(this,n),K0(this.handlers),n.handlersLength=X0(this.handlers))}}}const Nf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},fC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Pf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Of=typeof window!="undefined"&&typeof document!="undefined",If=typeof navigator=="object"&&navigator||void 0,hC=Of&&(!If||["ReactNative","NativeScript","NS"].indexOf(If.product)<0),pC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",mC=Of&&window.location.href||"http://localhost",rn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Of,hasStandardBrowserEnv:hC,hasStandardBrowserWebWorkerEnv:pC,navigator:If,origin:mC},Symbol.toStringTag,{value:"Module"}))),fC);function gC(e,t){return xl(e,new rn.classes.URLSearchParams,F({visitor:function(n,r,o,a){return rn.isNode&&V.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const J0=V0;function Z0(e){if(e>J0)throw new Se("FormData field is too deeply nested ("+e+" levels). Max depth: "+J0,Se.ERR_FORM_DATA_DEPTH_EXCEEDED)}function EC(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)Z0(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function yC(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 e1(e){function t(n,r,o,a){Z0(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&V.isArray(o)?o.length:u,d?(V.hasOwnProp(o,u)?o[u]=V.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!V.hasOwnProp(o,u)||!V.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&V.isArray(o[u])&&(o[u]=yC(o[u])),!l)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(EC(r),o,n,0)}),n}return null}const t1=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),hs=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function bC(e,t,n){if(V.isString(e))try{return(t||JSON.parse)(e),V.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Pa={transitional:Nf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=V.isObject(t);if(a&&V.isHTMLForm(t)&&(t=new FormData(t)),V.isFormData(t))return o?JSON.stringify(e1(t)):t;if(V.isArrayBuffer(t)||V.isBuffer(t)||V.isStream(t)||V.isFile(t)||V.isBlob(t)||V.isReadableStream(t))return t;if(V.isArrayBufferView(t))return t.buffer;if(V.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=hs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return gC(t,d).toString();if((l=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=hs(this,"env"),p=f&&f.FormData;return xl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),bC(t)):t}],transformResponse:[function(t){const n=hs(this,"transitional")||Pa.transitional,r=n&&n.forcedJSONParsing,o=hs(this,"responseType"),a=o==="json";if(V.isResponse(t)||V.isReadableStream(t))return t;if(t&&V.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,hs(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Se.from(d,Se.ERR_BAD_RESPONSE,this,null,hs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:rn.classes.FormData,Blob:rn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};V.forEach(t1,e=>{Pa.headers[e]={}});function Rf(e,t){const n=this||Pa,r=t||n,o=_n.from(r.headers);let a=r.data;return V.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function n1(e){return!!(e&&e.__CANCEL__)}let Na=class extends Se{constructor(t,n,r){super(t==null?"canceled":t,Se.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function r1(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Se("Request failed with status code "+n.status,n.status>=400&&n.status<500?Se.ERR_BAD_REQUEST:Se.ERR_BAD_RESPONSE,n.config,n.request,n))}const TC=/[\t\n\r]/g;function i1(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(TC,"")}function Lf(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function wC(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 xC(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 _l=(e,t,n=3)=>{let r=0;const o=wC(50,250);return xC(a=>{if(!a||!V.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)},o1=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},s1=(e,t=V.asap)=>(...n)=>t(()=>e(...n)),_C=rn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,rn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(rn.origin),rn.navigator&&/(msie|trident)/i.test(rn.navigator.userAgent)):()=>!0,SC=rn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];V.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),V.isString(r)&&l.push(`path=${r}`),V.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),V.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 vC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function AC(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 CC=/^https?:(?!\/\/)/i;function kC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${wl}`)}function PC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${wl}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${wl}`);return n===-1?o:`${o}#${kC(t.slice(n+1))}`}function a1(e,t){if(typeof e=="string"){const n=i1(e);if(CC.test(n))throw new Se(`Invalid URL ${JSON.stringify(PC(n))}: missing "//" after protocol`,Se.ERR_INVALID_URL,t)}}function u1(e,t,n,r){a1(t,r);let o=!vC(t);return e&&(o||n===!1)?(a1(e,r),AC(e,t)):t}const l1=e=>e instanceof _n?F({},e):e,NC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function xo(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 V.isPlainObject(p)&&V.isPlainObject(m)?V.merge.call({caseless:y},p,m):V.isPlainObject(m)?V.merge({},m):V.isArray(m)?m.slice():m}function o(p,m,T,y){if(V.isUndefined(m)){if(!V.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!V.isUndefined(m))return r(void 0,m)}function u(p,m){if(V.isUndefined(m)){if(!V.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=V.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!V.isUndefined(m))if(V.isPlainObject(m)){if(V.hasOwnProp(m,p))return m[p]}else return;const T=V.hasOwnProp(e,"transitional")?e.transitional:void 0;if(V.isPlainObject(T)&&V.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(V.hasOwnProp(t,T))return r(p,m);if(V.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(l1(p),l1(m),T,!0)};return V.forEach(NC(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=V.hasOwnProp(f,m)?f[m]:o,y=V.hasOwnProp(e,m)?e[m]:void 0,w=V.hasOwnProp(t,m)?t[m]:void 0,S=T(y,w,m);V.isUndefined(S)&&T!==d||(n[m]=S)}),V.hasOwnProp(t,"validateStatus")&&V.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(V.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const OC=["content-type","content-length"];function IC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{OC.includes(r.toLowerCase())&&e.set(r,o)})}const RC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function c1(e){const t=xo({},e),n=T=>V.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=_n.from(l),t.url=G0(u1(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=V.getSafeProp(d,"username")||"",y=V.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?RC(y):"")))}catch(w){throw Se.from(w,Se.ERR_BAD_OPTION_VALUE,e)}}if(V.isFormData(r)){const T=V.getSafeProp(r,"getHeaders");rn.hasStandardBrowserEnv||rn.hasStandardBrowserWebWorkerEnv||V.isReactNative(r)?l.setContentType(void 0):V.isFunction(T)&&IC(l,T.call(r),n("formDataHeaderPolicy"))}if(rn.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&_C(t.url))){const y=a&&u&&SC.read(u);y&&l.set(a,y)}return t}const LC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=c1(e);let a=o.data;const u=_n.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,S;function k(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let _=new XMLHttpRequest;_.open(o.method.toUpperCase(),o.url,!0),_.timeout=o.timeout;function C(H){if(!_)return;if(_.status===0&&(Lf(i1(o.url))||Lf(rn.origin))!=="file"&&!(_.responseURL&&_.responseURL.startsWith("file:"))){r(new Se("Request aborted",Se.ECONNABORTED,e,_)),k(),_=null;return}try{H?S&&S(H):w&&w()}catch(Z){setTimeout(()=>{throw Z})}if(!_)return;const U=_n.from("getAllResponseHeaders"in _&&_.getAllResponseHeaders()),z={data:!l||l==="text"||l==="json"?_.responseText:_.response,status:_.status,statusText:_.statusText,headers:U,config:e,request:_};r1(function(de){n(de),k()},function(de){r(de),k()},z),_=null}"onloadend"in _?_.onloadend=C:_.onreadystatechange=function(){!_||_.readyState!==4||_.status===0&&!(_.responseURL&&_.responseURL.startsWith("file:"))||setTimeout(C)},_.onabort=function(){_&&(r(new Se("Request aborted",Se.ECONNABORTED,e,_)),k(),_=null)},_.onerror=function(U){const L=U&&U.message?U.message:"Network Error",z=new Se(L,Se.ERR_NETWORK,e,_);z.event=U||null,r(z),k(),_=null},_.ontimeout=function(){let U=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const L=o.transitional||Nf;o.timeoutErrorMessage&&(U=o.timeoutErrorMessage),r(new Se(U,L.clarifyTimeoutError?Se.ETIMEDOUT:Se.ECONNABORTED,e,_)),k(),_=null},a===void 0&&u.setContentType(null),"setRequestHeader"in _&&V.forEach(z0(u),function(U,L){_.setRequestHeader(L,U)}),V.isUndefined(o.withCredentials)||(_.withCredentials=!!o.withCredentials),l&&l!=="json"&&(_.responseType=o.responseType),f&&([T,w,S]=_l(f,!0),_.addEventListener("progress",T)),d&&_.upload&&([m,y]=_l(d),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=H=>{_&&(r(!H||H.type?new Na(null,e,_):H),_.abort(),k(),_=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const A=Lf(o.url);if(A&&!rn.protocols.includes(A)){r(new Se("Unsupported protocol "+A+":",Se.ERR_BAD_REQUEST,e)),k();return}_.send(a||null)})},DC=(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 Se?f:new Na(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Se(`timeout of ${t}ms exceeded`,Se.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=()=>V.asap(u),l},MC=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},FC=function(e,t){return jd(this,null,function*(){try{for(var n=yS(BC(e)),r,o,a;r=!(o=yield new di(n.next())).done;r=!1){const u=o.value;yield*Pg(MC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new di(o.call(n)))}finally{if(a)throw a[0]}}})},BC=function(e){return jd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Pg(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new di(t.read());if(n)break;yield r}}finally{yield new di(t.cancel())}})},d1=(e,t,n,r)=>{const o=FC(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})},f1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,h1=(e,t,n)=>t+2<n&&f1(e.charCodeAt(t+1))&&f1(e.charCodeAt(t+2)),p1=e=>e<=57?e-48:(e&223)-55,UC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,HC=e=>e===9||e===10||e===12||e===13||e===32,zC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},jC=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)},$C=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&&h1(e,a,t)&&(u=p1(e.charCodeAt(a+1))*16+p1(e.charCodeAt(a+2)),a+=2),!HC(u)){if(u===61){r++;continue}if(!UC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?jC(e):zC(n)},VC=(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&&h1(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 qC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return VC(t===-1?e:e.slice(0,t),$C)}const Df="1.20.0",m1=64*1024,YC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Sl}=V,WC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),g1=e=>{if(!V.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},E1=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},GC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},XC=e=>{const t=V.global!==void 0&&V.global!==null?V.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=V.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?Sl(o):typeof fetch=="function",d=Sl(a),f=Sl(u);if(!l)return!1;const p=l&&Sl(n),m=l&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):_=>et(null,null,function*(){return new Uint8Array(yield new a(_).arrayBuffer())})),T=d&&p&&E1(()=>{let _=!1;const C=new a(rn.origin,{body:new n,method:"POST",get duplex(){return _=!0,"half"}}),A=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),_&&!A}),y=f&&p&&E1(()=>V.isReadableStream(new u("").body)),w={stream:y&&(_=>_.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!w[_]&&(w[_]=(C,A)=>{let H=C&&C[_];if(H)return H.call(C);throw new Se(`Response type '${_}' is not supported`,Se.ERR_NOT_SUPPORT,A)})});const S=_=>et(null,null,function*(){if(_==null)return 0;if(V.isBlob(_))return _.size;if(V.isSpecCompliantForm(_))return(yield new a(rn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(V.isArrayBufferView(_)||V.isArrayBuffer(_))return _.byteLength;if(V.isURLSearchParams(_)&&(_=_+""),V.isString(_))return(yield m(_)).byteLength}),k=(_,C)=>et(null,null,function*(){const A=V.toFiniteNumber(_.getContentLength());return A==null?S(C):A});return _=>et(null,null,function*(){let{url:C,method:A,data:H,signal:U,cancelToken:L,timeout:z,onDownloadProgress:Z,onUploadProgress:de,responseType:q,headers:re,withCredentials:fe="same-origin",fetchOptions:pe,maxContentLength:ee,maxBodyLength:ie,maxRedirects:Ce}=c1(_);const ae=V.isNumber(ee)&&ee>-1,J=V.isNumber(ie)&&ie>-1,se=we=>V.hasOwnProp(_,we)?_[we]:void 0;let P=o||fetch;q=q?(q+"").toLowerCase():"text";let M=DC([U,L&&L.toAbortSignal()],z),K=null;const I=M&&M.unsubscribe&&(()=>{M.unsubscribe()});let ue,be=null;const Ae=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,_,K);try{let we;const Re=se("auth");if(Re){const $e=V.getSafeProp(Re,"username")||"",bt=V.getSafeProp(Re,"password")||"";we={username:$e,password:bt}}if(GC(C)){const $e=new URL(C,rn.origin);if(!we&&($e.username||$e.password)){const bt=g1($e.username),Gt=g1($e.password);we={username:bt,password:Gt}}($e.username||$e.password)&&($e.username="",$e.password="",C=$e.href)}if(we&&(re.delete("authorization"),re.set("Authorization","Basic "+btoa(WC((we.username||"")+":"+(we.password||""))))),ae&&typeof C=="string"&&C.startsWith("data:")&&qC(C)>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K);if(J&&A!=="get"&&A!=="head"){const $e=yield S(H);if(typeof $e=="number"&&isFinite($e)&&(ue=$e,$e>ie))throw Ae()}const Fe=J&&(V.isReadableStream(H)||V.isStream(H)),at=($e,bt,Gt)=>d1($e,m1,Rt=>{if(J&&Rt>ie)throw be=Ae();bt&&bt(Rt)},Gt);if(T&&A!=="get"&&A!=="head"&&(de||Fe)){if(ue=ue==null?yield k(re,H):ue,ue!==0||Fe){let $e=new a(C,{method:"POST",body:H,duplex:"half"}),bt;if(V.isFormData(H)&&(bt=$e.headers.get("content-type"))&&re.setContentType(bt),$e.body){const[Gt,Rt]=de&&o1(ue,_l(s1(de)))||[];H=at($e.body,Gt,Rt)}}}else if(Fe&&!d&&p&&A!=="get"&&A!=="head")H=at(H);else if(Fe&&d&&!T&&A!=="get"&&A!=="head")throw new Se("Stream request bodies are not supported by the current fetch implementation",Se.ERR_NOT_SUPPORT,_,K);V.isString(fe)||(fe=fe?"include":"omit");const cn=d&&"credentials"in a.prototype;if(V.isFormData(H)){const $e=re.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&re.delete("content-type")}re.set("User-Agent","axios/"+Df,!1);const Ct=pe==null?pe:Object.assign(Object.create(null),pe);Ct&&(delete Ct.body,delete Ct.headers,delete Ct.method,delete Ct.signal,delete Ct.duplex,delete Ct.credentials);const zt=Object.assign(Object.create(null),Ct,{signal:M,method:A.toUpperCase(),headers:z0(re.normalize()),body:H,duplex:"half",credentials:cn?fe:void 0});d&&(V.forEach(YC,($e,bt)=>{zt[bt]===void 0&&(zt[bt]=$e)}),zt.signal===void 0&&(zt.signal=null),zt.body===void 0&&(zt.body=null)),Ce===0&&(zt.redirect="manual",Ct&&(Ct.redirect="manual")),K=d&&new a(C,zt);let It=yield d?P(K,Ct):P(C,zt);const ar=_n.from(It.headers);if(ae){const $e=V.toFiniteNumber(ar.getContentLength());if($e!=null&&$e>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}const Bn=y&&(q==="stream"||q==="response");if(y&&It.body&&(Z||ae||Bn&&I)){const $e={};["status","statusText","headers"].forEach(Jt=>{$e[Jt]=It[Jt]});const bt=V.toFiniteNumber(ar.getContentLength()),[Gt,Rt]=Z&&o1(bt,_l(s1(Z),!0))||[];let Un=0;const ur=Jt=>{if(ae&&(Un=Jt,Un>ee))throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K);Gt&&Gt(Jt)};It=new u(d1(It.body,m1,ur,()=>{Rt&&Rt(),I&&I()}),$e)}q=q||"text";let Qt=yield w[V.findKey(w,q)||"text"](It,_);if(ae&&!y&&!Bn){let $e;if(Qt!=null&&(typeof Qt.byteLength=="number"?$e=Qt.byteLength:typeof Qt.size=="number"?$e=Qt.size:typeof Qt=="string"&&($e=typeof r=="function"?new r().encode(Qt).byteLength:Qt.length)),typeof $e=="number"&&$e>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}return!Bn&&I&&I(),yield new Promise(($e,bt)=>{r1($e,bt,{data:Qt,headers:_n.from(It.headers),status:It.status,statusText:It.statusText,config:_,request:K})})}catch(we){if(I&&I(),M&&M.aborted&&M.reason instanceof Se){const Re=M.reason;throw Re.config=_,K&&(Re.request=K),we!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:we,writable:!0,enumerable:!1,configurable:!0}),Re}if(be)throw K&&!be.request&&(be.request=K),be;if(we instanceof Se)throw K&&!we.request&&(we.request=K),we;if(we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)){const Re=new Se("Network Error",Se.ERR_NETWORK,_,K,we&&we.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:we.cause||we,writable:!0,enumerable:!1,configurable:!0}),Re}throw Se.from(we,we&&we.code,_,K,we&&we.response)}})},KC=new Map,y1=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=KC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:XC(t)),p=f;return f};y1();const Mf={http:uC,xhr:LC,fetch:{get:y1}};V.forEach(Mf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const b1=e=>`- ${e}`,QC=e=>V.isFunction(e)||e===null||e===!1;function JC(e,t){e=V.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!QC(r)&&(o=Mf[(l=String(r)).toLowerCase()],o===void 0))throw new Se(`Unknown adapter '${l}'`);if(o&&(V.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(b1).join(`
6
- `):" "+b1(u[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+l,Se.ERR_NOT_SUPPORT)}return o}const T1={getAdapter:JC,adapters:Mf};function Ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Na(null,e)}function Bf(e){const t=V.toSafeFlatObject(e);return Ff(t),t.headers=xn.from(V.getSafeProp(t,"headers")),t.data=Rf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),T1.getAdapter(t.adapter||Pa.adapter,t)(t).then(function(o){Ff(t),t.response=o;try{o.data=Rf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=xn.from(o.headers),o},function(o){if(!n1(o)&&(Ff(t),o&&o.response)){t.response=o.response;try{o.response.data=Rf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=xn.from(o.response.headers)}return Promise.reject(o)})}const vl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const w1={};vl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Df+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Se(o(u," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!w1[u]&&(w1[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}},vl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ZC(e,t,n){if(typeof e!="object"||e===null)throw new Se("options must be an object",Se.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 Se("option "+a+" must be "+d,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}const Al={assertOptions:ZC,validators:vl},_n=Al.validators;let _o=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Q0,response:new Q0}}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(`
6
+ `):" "+b1(u[0]):"as no adapter specified";throw new Se("There is no suitable adapter to dispatch the request "+l,Se.ERR_NOT_SUPPORT)}return o}const T1={getAdapter:JC,adapters:Mf};function Ff(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Na(null,e)}function Bf(e){const t=V.toSafeFlatObject(e);return Ff(t),t.headers=_n.from(V.getSafeProp(t,"headers")),t.data=Rf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),T1.getAdapter(t.adapter||Pa.adapter,t)(t).then(function(o){Ff(t),t.response=o;try{o.data=Rf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=_n.from(o.headers),o},function(o){if(!n1(o)&&(Ff(t),o&&o.response)){t.response=o.response;try{o.response.data=Rf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=_n.from(o.response.headers)}return Promise.reject(o)})}const vl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{vl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const w1={};vl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Df+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,l)=>{if(t===!1)throw new Se(o(u," has been removed"+(n?" in "+n:"")),Se.ERR_DEPRECATED);return n&&!w1[u]&&(w1[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}},vl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ZC(e,t,n){if(typeof e!="object"||e===null)throw new Se("options must be an object",Se.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 Se("option "+a+" must be "+d,Se.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Se("Unknown option "+a,Se.ERR_BAD_OPTION)}}const Al={assertOptions:ZC,validators:vl},Sn=Al.validators;let _o=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Q0,response:new Q0}}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=xo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Al.assertOptions(r,{silentJSONParsing:_n.transitional(_n.boolean),forcedJSONParsing:_n.transitional(_n.boolean),clarifyTimeoutError:_n.transitional(_n.boolean),legacyInterceptorReqResOrdering:_n.transitional(_n.boolean),advertiseZstdAcceptEncoding:_n.transitional(_n.boolean),validateStatusUndefinedResolves:_n.transitional(_n.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Al.assertOptions(o,{encode:_n.function,serialize:_n.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Al.assertOptions(n,{baseUrl:_n.spelling("baseURL"),withXsrfToken:_n.spelling("withXSRFToken")},!0),n.method=(V.getSafeProp(n,"method")||V.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(t1.concat("common"),w=>{delete a[w]}),n.headers=xn.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 P=n.transitional||Nf;P&&P.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=[Bf.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(P){if(!v){p=Promise.reject(P);break}try{const _=v.call(this,P);V.isThenable(_)&&(p=Promise.resolve(_).then(()=>Bf.call(this,y)))}catch(_){p=Promise.reject(_)}break}}if(!p)try{p=Bf.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=xo(this.defaults,t);const n=u1(t.baseURL,t.url,t.allowAbsoluteUrls,t);return G0(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){_o.prototype[t]=function(n,r){return this.request(xo(r||{},{method:t,url:n,data:r&&V.hasOwnProp(r,"data")?r.data:void 0}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(xo(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}_o.prototype[t]=n(),t!=="query"&&(_o.prototype[t+"Form"]=n(!0))});let ek=class TS{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 Na(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 TS(function(o){t=o}),cancel:t}}};function tk(e){return function(n){return e.apply(null,n)}}function nk(e){return V.isObject(e)&&e.isAxiosError===!0}const Cl={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(Cl).forEach(([e,t])=>{Cl[t]===void 0&&(Cl[t]=e)});function x1(e){const t=new _o(e),n=k0(_o.prototype.request,t);return V.extend(n,_o.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return x1(xo(e,o))},n}const Bt=x1(Pa);Bt.Axios=_o,Bt.CanceledError=Na,Bt.CancelToken=ek,Bt.isCancel=n1,Bt.VERSION=Df,Bt.toFormData=xl,Bt.AxiosError=Se,Bt.Cancel=Bt.CanceledError,Bt.all=function(t){return Promise.all(t)},Bt.spread=tk,Bt.isAxiosError=nk,Bt.mergeConfig=xo,Bt.AxiosHeaders=xn,Bt.formToJSON=e=>e1(V.isHTMLForm(e)?new FormData(e):e),Bt.getAdapter=T1.getAdapter,Bt.HttpStatusCode=Cl,Bt.default=Bt;const{Axios:sH,AxiosError:aH,CanceledError:uH,isCancel:lH,CancelToken:cH,VERSION:dH,all:fH,Cancel:hH,isAxiosError:pH,spread:mH,toFormData:gH,AxiosHeaders:EH,HttpStatusCode:yH,formToJSON:bH,getAdapter:TH,mergeConfig:wH,create:xH}=Bt;class rk{constructor(t,n,r,o=!1,a,u){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Bt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));ve(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 ik{constructor(t,n,r,o=!1,a,u){ve(this,"apiService");ve(this,"config",null);ve(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}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new rk(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 ps=(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 ok{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{ps(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 sk={copilot:"Your Search Assistant",messaging:"Commerce Client"},_1=O.createContext(null),ak=({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:P=3,messageAlignment:_="start",autoScroll:C=!0,showProductDescription:A=!1,componentConfig:H,conversationHistory:U,resetConversationMessage:L="",apiKey:z,apiToken:ee,baseUrl:he,customerId:q,tenantId:re,theme:de,isDevelopment:ye,__features:te,routingAttributes:oe,enableDownloadTranscript:Ce=!0,enablePageContext:ae=!1,enableEscalationToAgent:J=!1,enableImageUpload:se=!1,showProductCaptions:k=!1,connectingMessages:M,staticQuestions:K,staticQuestionsStrategy:I="append",children:ue})=>{const be=e==="messaging",Ae=O.useMemo(()=>{const Ot=oe==null?void 0:oe.isCartMgmtSupported;return Ot===!0||Ot==="true"},[oe]),we=O.useMemo(()=>be?{config:null}:new ik(he,z,ee,ye,q,re),[be,he,z,ee,ye,q,re]),Re=O.useMemo(()=>new ok(ye),[ye]);O.useEffect(()=>{be||!we||we.config||we.getConfig()},[we,be]);const Fe=O.useMemo(()=>S0(de),[de]),at=Fe.cssVariables,ln=O.useMemo(()=>{const Ot=(w==null?void 0:w.placeholder)||T,ar=(w==null?void 0:w.buttonLabel)||y;let Fn="icon";return w!=null&&w.buttonType?Fn=w.buttonType:y&&(Fn="text"),ge(F({},w||{}),{placeholder:Ot,buttonLabel:ar,buttonType:Fn})},[w,T,y]),At=O.useMemo(()=>ge(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||sk[e!=null?e:"copilot"]}),[r,t,n,e]),Ht=O.useMemo(()=>({configModule:we,mode:e!=null?e:"copilot",themeVariants:Fe.compatibility&&e!=="messaging"?ge(F({},Fe.variants),{carousel:"chevron"}):Fe.variants,themeTokens:Fe.compatibility==="legacy"?void 0:Fe.tokens,themeClassName:Fe.transcriptClassName,headerConfig:At,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:I,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:at,logger:Re,searchConfig:ln,suggestionButtonConfig:v,progressStepsLimit:P,messageAlignment:_,autoScroll:C,showProductDescription:!!A,enableMinimize:!!(H!=null&&H.enableMinimize),launcherAriaLabel:H==null?void 0:H.launcherAriaLabel,enableDownloadTranscript:Ce,enablePageContext:ae,enableEscalationToAgent:J,enableImageUpload:se,showProductCaptions:!!k,connectingMessages:M,resetConversationMessage:L,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:be?24:1,limit:U==null?void 0:U.limit},features:te,isCartMgmtSupported:Ae}),[we,e,At,a,K,I,o,p,m,d,f,u,l,ln,v,_,C,A,H,Ce,ae,J,se,P,k,M,L,Re,at,Fe,U,te,Ae,be]);return x.jsx(_1.Provider,{value:Ht,children:ue})},Qe=()=>{const e=O.useContext(_1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class uk{constructor(){ve(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}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"entryTypeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return hk(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 uk,Fi=()=>Je.connected,Oa=()=>Je.isOpen,Uf="cimulate.widget.minimizedOnNav";function lk(){try{const e=sessionStorage.getItem(Uf)==="1";return sessionStorage.removeItem(Uf),e}catch(e){return!1}}function ck(){try{sessionStorage.removeItem(Uf)}catch(e){return}}const dk=e=>{window.addEventListener(bf,e)},fk=e=>{window.removeEventListener(bf,e)},hk=(e,t)=>{const n=new CustomEvent(bf,{detail:{property:e,value:t}});window.dispatchEvent(n)},pk=e=>{Je.connectedProxy.connected=e},Ia=e=>{if(!Yv(e)){const t=g0.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},gi=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,ck())},Ra=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},Hf=e=>{Je.modalProxy.isFullscreen=e},kl=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"},zf=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},mk=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},gk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Qe(),o=O.useCallback(A=>{n({type:Et.SET_COPILOT,payload:A})},[n]),a=O.useCallback(A=>{pk(A),n({type:Et.SET_CONNECTED,payload:A})},[n]),u=O.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=O.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=O.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=O.useCallback(A=>{n({type:Et.ADD_LOADING_MESSAGE,payload:A})},[n]),p=O.useCallback(A=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:A})},[n]),m=O.useCallback(A=>{d(A),f(A.id)},[d,f]),T=O.useCallback(A=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=O.useCallback(A=>{n({type:Et.ADD_CONVERSATION_ID,payload:A})},[n]),w=O.useCallback(A=>{n({type:Et.SET_CONVERSATION_IDS,payload:A})},[n]),v=O.useCallback(A=>{n({type:Et.SET_IMAGE_FILE,payload:A})},[n]),P=O.useCallback(A=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:A})},[n]),_=O.useCallback(A=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),C=O.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:P,setConversationHistoryLoaded:_}),[o,a,u,l,d,f,p,m,T,y,w,v,P,_]);return x.jsx(A0.Provider,{value:C,children:t})};$v();const Ek=(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=Eo.messages,e.groupedMessages=Eo.groupedMessages,e.loadingMessages=Eo.loadingMessages,e.imageFile=Eo.imageFile,e.askCimPrompts=Eo.askCimPrompts,e.conversationHistoryLoaded=Eo.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}},yk=({onCopilotEvent:e,children:t})=>{const[n,r]=p0(Ek,Eo);return x.jsx(v0.Provider,{value:n,children:x.jsx(gk,{onCopilotEvent:e,dispatch:r,children:t})})};function bk(){var e=O.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Tk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function wk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var jf=typeof window!="undefined",La=function(e){O.useEffect(e,[])},xk=function(e){var t=O.useRef(e);t.current=e,La(function(){return function(){return t.current()}})},_k=function(e){var t=O.useRef(0),n=O.useState(e),r=n[0],o=n[1],a=O.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return xk(function(){cancelAnimationFrame(t.current)}),[r,a]},Sk=function(e,t){return e===t};function vk(e,t){t===void 0&&(t=Sk);var n=O.useRef(),r=O.useRef(e),o=bk();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Ak=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=_k({width:jf?window.innerWidth:r,height:jf?window.innerHeight:a}),d=l[0],f=l[1];return O.useEffect(function(){if(jf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return Tk(window,"resize",p),function(){wk(window,"resize",p)}}},[]),d};class Ck{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(pn.size).fill(1).forEach(()=>{const r=pn.first();r&&(t(r),pn.remove())})})}get size(){return this.items.length}}const pn=new Ck,S1=e=>{window.addEventListener(yf,e)},v1=e=>{window.removeEventListener(yf,e)},kk=(e,t,n)=>{const r=new CustomEvent(yf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},A1=e=>{window.addEventListener(Ef,e)},C1=e=>{window.removeEventListener(Ef,e)},Pk=(e,t,n)=>{const r=new CustomEvent(Ef,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},k1=e=>{window.addEventListener(gf,e)},P1=e=>{window.removeEventListener(gf,e)},$f=(e,t,n)=>{const r=new CustomEvent(gf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Nk=e=>{window.addEventListener(wf,e)},Ok=e=>{window.removeEventListener(wf,e)},Da=(e,t,n)=>{const r=new CustomEvent(wf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Ik{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=Xv[n];return Pk(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(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 dt=new Ik,N1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},O1=(e,t,n)=>{var u,l;const r=F({},((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},I1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},R1=({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},L1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},D1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Rk=e=>{if(!Fi()||!Oa()){Fi()&&pn.clear(),pn.add({context:"browse",payload:ge(F({},dt.state),{categoryId:e})});return}dt.categoryIdProxy.categoryId=e},M1=e=>{N1(e,dt)},Lk=(e,t)=>{O1(e,t,dt)},F1=e=>{I1(e,dt)},Dk=({field:e,value:t})=>{R1({field:e,value:t},dt)},Mk=e=>{L1(e,dt)},B1=e=>{D1(e,dt)},U1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Fi(),n=Oa();if(!t||!n){t&&pn.clear(),pn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&M1(e.facetFilters||{}),"rangeFilters"in e&&F1(e.rangeFilters||[]),"catalogSegment"in e&&(dt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&B1(e.pricebooks||[]),"categoryName"in e&&(dt.categoryIdProxy.categoryName=e.categoryName||""),dt.categoryIdProxy.categoryId=e.categoryId},Fk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:U1,updateBrowseCategoryId:Rk,updateCatalogSegment:Mk,updateFacetFilter:Lk,updateFacetFilters:M1,updatePricebooks:B1,updateRangeFilter:Dk,updateRangeFilters:F1},Symbol.toStringTag,{value:"Module"}));class Bk{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>($f(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});ve(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});ve(this,"dispatchContextUpdate",()=>{$f("pdp-context",this.state)});ve(this,"createProxy",t=>new Proxy(F({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 F({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const kr=new Bk,H1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Fi(),n=Oa();if(!t||!n){t&&pn.clear(),pn.add({context:"pdp",payload:F({},e)});return}kr.updateProxy(e),$f("pdp-context",e)},Uk=e=>{kr.proxy.productId=e,Fi()||pn.add({context:"pdp",payload:F({},kr.state)})},Hk=e=>{kr.proxy.pdpLink=e};class zk{constructor(){ve(this,"initialState",C0);ve(this,"promptsStateProxy");ve(this,"promptsParamsProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Ma(n,r),Reflect.set(t,n,r)});ve(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));ve(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));ve(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 qt=new zk,jk=e=>{window.addEventListener(Tf,e)},$k=e=>{window.removeEventListener(Tf,e)},Ma=(e,t)=>{const n=new CustomEvent(Tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},z1=e=>{const t=qt.isOpen,n=typeof e=="boolean"?e:!t;qt.promptsStateProxy.isOpen=n},j1=e=>{const t=qt.isInline,n=typeof e=="boolean"?e:!t;qt.promptsStateProxy.isInline=n},Vk=e=>{qt.promptsParamsProxy=qt.updatePromptsParamsProxy(e),Ma("params",e),qt.promptsStateProxy.entryType="ask_cim"},qk=e=>{qt.promptsParamsProxy=qt.updatePromptsParamsProxy(e),Ma("params",e),qt.promptsStateProxy.entryType="search"},Yk=e=>{qt.promptsParamsProxy=qt.updatePromptsParamsProxy(e),Ma("params",e),qt.promptsStateProxy.entryType="browse"},Wk=e=>{qt.promptsParamsProxy=qt.updatePromptsParamsProxy(e),Ma("params",e),qt.promptsStateProxy.entryType="pdp"},Gk=({elementId:e,entryType:t,params:n,isInline:r})=>{qt.promptsStateProxy.elementId=e,t&&(qt.promptsStateProxy.entryType=t),typeof r=="boolean"&&j1(r),n&&qt.updatePromptsParamsProxy(n),qt.isOpen||z1(!0)},Xk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{Da("endConversation",!0,mi.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{Da("getConversationMessages",{payload:e,callback:t},mi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Da("getSessionInformation",{callback:e},mi.GET_SESSION_INFORMATION)},loadConversation:e=>{Da("loadConversation",e,mi.LOAD_CONVERSATION)},resetConversation:()=>{Da("resetConversation",!0,mi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Kk{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=Kv[n];return kk(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(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 wt=new Kk,Qk=e=>{const t=Oa(),n=Fi();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:ge(F({},wt.state),{query:e})});return}wt.queryProxy.query=e},$1=e=>{N1(e,wt)},Jk=(e,t)=>{O1(e,t,wt)},V1=e=>{I1(e,wt)},Zk=({field:e,value:t})=>{R1({field:e,value:t},wt)},eP=e=>{L1(e,wt)},q1=e=>{D1(e,wt)},Y1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Oa(),n=Fi();if(!n||!t){n&&pn.clear(),pn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&$1(e.facetFilters||{}),"rangeFilters"in e&&V1(e.rangeFilters||[]),"catalogSegment"in e&&(wt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&q1(e.pricebooks||[]),wt.queryProxy.query=e.query},tP=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Y1,updateCatalogSegment:eP,updateFacetFilter:Jk,updateFacetFilters:$1,updatePricebooks:q1,updateRangeFilter:Zk,updateRangeFilters:V1,updateSearchQuery:Qk},Symbol.toStringTag,{value:"Module"})),nP={categoryId:dt.categoryId,categoryName:dt.categoryIdProxy.categoryName||"",facetFilters:dt.facetFilters,rangeFilters:dt.rangeFilters,catalogSegment:dt.catalogSegment,pricebooks:dt.pricebooks},W1=O.createContext(nP),rP=({children:e})=>{const[t,n]=O.useState(dt.categoryId),[r,o]=O.useState(dt.categoryIdProxy.categoryName||""),[a,u]=O.useState(dt.facetFilters||{}),[l,d]=O.useState(dt.rangeFilters||[]),[f,p]=O.useState(dt.catalogSegment||null),[m,T]=O.useState(dt.pricebooks||null);O.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 A1(w),()=>{C1(w)}},[]);const y=O.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return x.jsx(W1.Provider,{value:y,children:e})},iP=()=>{const e=O.useContext(W1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},oP={searchQuery:wt.query,facetFilters:wt.facetFilters,rangeFilters:wt.rangeFilters,catalogSegment:wt.catalogSegment,pricebooks:wt.pricebooks},G1=O.createContext(oP),sP=({children:e})=>{const[t,n]=O.useState(wt.query),[r,o]=O.useState(wt.facetFilters),[a,u]=O.useState(wt.rangeFilters),[l,d]=O.useState(wt.catalogSegment),[f,p]=O.useState(wt.pricebooks);O.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 S1(T),()=>{v1(T)}},[]);const m=O.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return x.jsx(G1.Provider,{value:m,children:e})},aP=()=>{const e=O.useContext(G1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},uP={productId:kr.productId,pdpLink:kr.pdpLink},X1=O.createContext(uP),lP=({children:e})=>{const[t,n]=O.useState(kr.productId),[r,o]=O.useState(kr.pdpLink);O.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 k1(u),()=>{P1(u)}},[]);const a=O.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(X1.Provider,{value:a,children:e})},cP=()=>{const e=O.useContext(X1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},K1=O.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}),dP=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=O.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=O.useState(Je.modeProxy.mode),[d,f]=O.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]=O.useState(Je.dialogProxy.position),[T,y]=O.useState(Je.dialogProxy.isFullHeight),[w,v]=O.useState(Je.dialogProxy.width),[P,_]=O.useState(Je.modalProxy.isFullscreen),C=O.useRef(!1),A=vk(d.type);O.useEffect(()=>{const U=L=>{const{property:z,value:ee}=L.detail||{};if(!(!z||ee===void 0)){if(z==="mode"){l(ee);return}if(z==="entryType"){a(ee);return}if(z==="isMinimized"){f(he=>ge(F({},he),{isMinimized:ee}));return}if(z==="isOpen"){f(he=>ge(F({},he),{isOpen:ee}));return}if(z==="type"){f(he=>ge(F({},he),{type:ee}));return}if(z==="position"){m(ee);return}if(z==="isFullHeight"){y(ee);return}if(z==="width"){v(ee);return}if(z==="isFullscreen"){_(ee);return}}};return dk(U),()=>{fk(U)}},[]),La(()=>{e&&Ia(e)}),La(()=>{if(C.current)return;C.current=!0;const U=n||(t==null?void 0:t.type);U&&kl(U);const L=lk();t&&"isOpen"in t&&gi(!!t.isOpen),t&&"isMinimized"in t&&Ra(!!t.isMinimized),L&&Ra(!0)}),La(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&zf(U),"dialogFullHeight"in t.options&&mk(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&Hf(!!t.options.isModalFullscreen)});const H=O.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:A||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:P}),[u,o,d,A,p,T,w,P]);return x.jsx(K1.Provider,{value:H,children:r})},rr=()=>{const e=O.useContext(K1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Q1=O.createContext(null),J1=O.createContext(null),Vf=()=>{const e=O.useContext(J1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Ei=()=>{const e=O.useContext(Q1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},So=()=>{const e=O.useContext(A0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Vn=()=>{const e=O.useContext(v0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},fP=({copilot:e})=>{const{logger:t,conversationHistory:n}=Qe(),{isInline:r}=Ei(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=So(),{activeConversationId:u}=Vn(),l=O.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=O.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 O.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 _;const P=T.find(C=>C.id===v.eventSourceId);(_=P==null?void 0:P.name)!=null&&_.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}},qf=15e3,hP=({connected:e,canQueue:t})=>{const{imageFile:n}=Vn(),{setImageFile:r,addCopilotEvent:o}=So(),[a,u]=O.useState(null),[l,d]=O.useState(null),f=O.useRef(null),p=O.useRef(0),m=O.useRef(n);m.current=n;const T=O.useCallback((U,L=null)=>{U||p.current++;const z=f.current;z!=null&&z.timer&&clearTimeout(z.timer),f.current=null,z&&(u(U?null:{text:z.text,phase:"failed"}),U&&z.attachment&&m.current===z.attachment&&r(null)),d(L),z==null||z.resolve(U)},[r]),y=O.useCallback((U,L,z)=>{const ee=f.current;if(!ee||ee.phase!=="queued"||ee.send){L(U,z);return}const he=structuredClone(U);ee.send=()=>{let q=!1;Promise.resolve(L(he,re=>{if(!(q||f.current!==ee)){if(q=!0,re.name==="error"){o(re),f.current===ee&&T(!1,"Your message could not be sent. Please try again.");return}z(re),f.current===ee&&T(!0)}})).catch(()=>{f.current===ee&&T(!1,"Your message could not be confirmed. Please try again.")})}},[o,T]),w=O.useCallback((U,L)=>{if(!U.trim()||f.current)return Promise.resolve(!1);if(e){a&&u(null),l&&d(null),L();return}return t?new Promise(z=>{const ee={text:U,phase:"queued",send:null,resolve:z,attachment:m.current};f.current=ee,ee.timer=setTimeout(()=>{f.current===ee&&T(!1,"Your message was not sent in time. Please try again.")},qf),u({text:U,phase:"queued"}),d(null),L(),ee.send||T(!1,"Your message could not be queued. Please try again.")}):Promise.resolve(!1)},[e,t,T,a,l]),v=O.useCallback(U=>{const L=p.current;return z=>L!==p.current?Promise.resolve(!1):U(z)},[]),P=O.useCallback(()=>{const U=f.current;if(!(!(U!=null&&U.send)||U.phase!=="queued")){U.phase="sending",clearTimeout(U.timer),u({text:U.text,phase:"sending"}),U.timer=setTimeout(()=>{f.current===U&&T(!1,"No confirmation received. Your message may have been sent.")},qf);try{U.send()}catch(L){T(!1,"Your message could not be sent. Please try again.")}}},[T]),_=O.useCallback(()=>T(!1),[T]),C=O.useCallback(()=>{const U=f.current;T(!1),U||u(null)},[T]),A=O.useCallback(()=>{if(p.current++,f.current){const U=f.current.phase==="sending";T(!1,U?"Connection lost. Your message may have been sent.":"Could not connect to the assistant. Your message has not been sent.")}},[T]),H=O.useCallback(()=>{p.current++;const U=f.current;clearTimeout(U==null?void 0:U.timer),f.current=null,U==null||U.resolve(!1)},[]);return{pendingInput:a,inputError:l,dispatchRequest:y,submitInput:w,prepareInput:v,flushInput:P,cancelInput:_,resetInput:C,disconnectInput:A,disposeInput:H}},Z1=O.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isConnecting:!1,isConnectionSlow:!1,pendingInput:null,inputError:null,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},prepareUserInput:()=>()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),pP=({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}=Qe(),lr=aP(),{searchQuery:y}=lr,w=bn(lr,["searchQuery"]),Cn=iP(),{categoryId:v}=Cn,P=bn(Cn,["categoryId"]),{productId:_,pdpLink:C}=cP(),{setCopilot:A,setConnected:H,resetCopilot:U,resetCopilotState:L,addCopilotEvent:z,removeLoadingMessage:ee,handleCopilotRequestAck:he,setActiveConversationId:q,setConversationIds:re,setAskCimPrompts:de}=So(),{connected:ye,copilot:te,messages:oe,groupedMessages:Ce,loadingMessages:ae,askCimPrompts:J}=Vn(),{status:se,entryType:k}=rr(),{isInline:M}=Ei(),K=O.useRef(null),[I,ue]=O.useState("idle"),be=I==="connecting"&&!ye,Ae=I==="slow"&&!ye,{pendingInput:we,inputError:Re,dispatchRequest:Fe,submitInput:at,prepareInput:ln,flushInput:At,cancelInput:Ht,resetInput:Ot,disconnectInput:ar,disposeInput:Fn}=hP({connected:!!ye,canQueue:be&&!!te&&se.isOpen}),{getConversationMessages:Kt,getSessionInformation:$e}=fP({copilot:te}),bt=O.useMemo(()=>ae.size>0,[ae]),Wt=O.useCallback(_e=>ae.has(_e),[ae]),It=O.useCallback(({query:_e,facetFilters:Pe,rangeFilters:Ne,catalogSegment:Be,pricebooks:Ct,userPrompt:Rt,imageFile:Un})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const kt={searchParams:{query:_e}};Rt&&(kt.userPrompt=Rt),Un&&(kt.attachments={image:Un}),Pe&&Object.keys(Pe).length>0&&(kt.searchParams.facetFilters=Pe),Ne&&Ne.length>0&&(kt.searchParams.rangeFilters=Ne),Be&&(kt.searchParams.catalogSegment=Be),Ct&&(kt.searchParams.pricebooks=Ct),m&&(kt.clientContext=m),Ia("search"),Fe(kt,(kn,ot)=>te.search(kn,ot),kn=>{const ot=F({},kn);he(ot)})},[p,te,m,he,Fe]),Bn=O.useCallback(({categoryId:_e,categoryName:Pe,facetFilters:Ne,rangeFilters:Be,catalogSegment:Ct,pricebooks:Rt,userPrompt:Un,imageFile:kt})=>{if(!te){p==null||p.error("Copilot is not initialized");return}const kn=Ne&&Object.keys(Ne).length>0;if(_e===""&&!kn){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const ot={browseParams:{categoryId:_e||""}};Un&&(ot.userPrompt=Un),kt&&(ot.attachments={image:kt}),kn&&(ot.browseParams.facetFilters=Ne),Be&&Be.length>0&&(ot.browseParams.rangeFilters=Be),Ct&&(ot.browseParams.catalogSegment=Ct),Array.isArray(Rt)&&Rt.length>0&&(ot.browseParams.pricebooks=Rt),(m||Pe)&&(ot.clientContext={},m&&(ot.clientContext=F({},m)),Pe&&(ot.clientContext.cimLabel=Pe)),Ia("browse"),Fe(ot,(Pn,gn)=>te.browse(Pn,gn),Pn=>{var Rc;const gn=F({},Pn),Dr=((Rc=gn.request)==null?void 0:Rc.clientContext)||{},Qn=(Dr==null?void 0:Dr.cimLabel)||Pe;Qn&&gn.request&&(gn.request.label=Qn),he(gn)})},[p,te,m,he,Fe]),ur=O.useCallback(({productId:_e,productName:Pe,pdpLink:Ne,userPrompt:Be,imageFile:Ct})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Rt={productId:_e};Be&&(Rt.userPrompt=Be),Ne&&(Rt.pdpLink=Ne),Ct&&(Rt.attachments={image:Ct}),(m||Pe)&&(Rt.clientContext={},m&&(Rt.clientContext=F({},m)),Pe&&(Rt.clientContext.cimLabel=Pe)),T&&(Rt.baseCatalogParams=T),Ia("pdp"),Fe(Rt,(Un,kt)=>te.productView(Un,kt),Un=>{var Pn;const kt=F({},Un),kn=((Pn=kt.request)==null?void 0:Pn.clientContext)||{},ot=(kn==null?void 0:kn.cimLabel)||Pe;ot&&kt.request&&(kt.request.label=ot),he(kt)})},[p,te,m,T,he,Fe]),Qt=O.useCallback(({userPrompt:_e,imageFile:Pe})=>{if(!te){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Ne={userPrompt:_e};Pe&&(Ne.attachments={image:Pe}),m&&(Ne.clientContext=m),T&&(Ne.baseCatalogParams=T),Fe(Ne,(Be,Ct)=>te.askCim(Be,Ct),Be=>{const Ct=F({},Be);he(Ct)})},[p,te,m,T,he,Fe]),qo=O.useCallback(_e=>{z(_e),l==null||l(_e)},[z,l]),ie=O.useCallback(_e=>{z(_e),d==null||d(_e)},[z,d]),xe=O.useCallback(_e=>{const Pe=K.current;Pe&&(Pe.established=!0,clearTimeout(Pe.timer)),ue("connected"),u==null||u(_e),H(!0)},[u,H]);O.useEffect(()=>{!te||!ye||!se.isOpen||pn.size>0&&pn.processQueue(_e=>{if(_e.context==="search"){const Pe=F({},_e.payload);Y1(Pe)}if(_e.context==="browse"){const Pe=F({},_e.payload);U1(Pe)}if(_e.context==="pdp"){const Pe=F({},_e.payload);H1(Pe)}})},[se.isOpen,te,ye]),O.useEffect(()=>{ye&&se.isOpen&&At()},[ye,se.isOpen,we,At]);const Ve=O.useCallback(_e=>{const Pe=Ne=>{const Be=ge(F({},Ne),{id:Ne.inquiryLinkId||Ne.id});z(Be)};_e.on("connect_ack",xe),_e.on("connect_error",Ne=>{p==null||p.warn("Copilot connection attempt failed:",Ne)}),_e.on("partial_inquiry",Pe),_e.on("display_products",z),_e.on("progress",z),_e.on("refined_search",qo),_e.on("refined_browse",ie),_e.on("done",Ne=>{ee(Ne.eventSourceId)}),_e.on("error",Ne=>{z(Ne),ee(Ne.eventSourceId)}),_e.onDisconnect(Ne=>{const Be=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Ne),ar(),!Be.includes(Ne)){H(!1);return}p==null||p.log("De-registering event listeners");const Ct=new Date().toISOString();z({name:"error",message:"Connection was lost. Please try again.",createdAt:Ct,id:`error-${Ct}`,sessionId:"session"}),_e.off()})},[p,H,ee,qo,ie,z,xe,ar]);O.useEffect(()=>{if(!te)return;const _e=Pe=>{if(!M){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===J.requestId){de({requestId:Pe.eventSourceId,message:Pe});return}z(Pe)}};return te.on("follow_up",_e),()=>{te.off("follow_up",_e)}},[te,oe,J.requestId,M,z,de]),O.useEffect(()=>{if(!te)return;const _e=Pe=>{if(M)return;const Ne=ge(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});z(Ne)};return te.on("inquiry",_e),()=>{te.off("inquiry",_e)}},[te,M,z]),La(()=>{let _e;n?_e=n:_e=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:_e};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),o&&(Pe.tenantId=o);const Ne=new Rv(Pe);return K.current={sdk:Ne,started:!1,established:!1},A(Ne),Ve(Ne),()=>{var Be;Fn(),clearTimeout((Be=K.current)==null?void 0:Be.timer),K.current=null,Ne.disconnect(),Ne.off(),H(!1),U()}}),O.useEffect(()=>{const _e=K.current;!se.isOpen||!te||(_e==null?void 0:_e.sdk)!==te||_e.started||(_e.started=!0,ue("connecting"),_e.timer=setTimeout(()=>{K.current!==_e||_e.established||(ue("slow"),Ht())},qf),te.connect(),te.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Be}=Pe.data||{};Ne&&q(Ne),Be!=null&&Be.length&&re(Be)}))},[te,se.isOpen,p,q,re,Ht]);const Ge=O.useCallback(_e=>{if(!te)return;const Pe={eventId:_e,reason:"User cancelled the request"};te.cancelRequest(Pe,Ne=>{z(Ne),ee(_e)})},[z,ee,te]),tt=O.useCallback(()=>{Ot(),te&&te.conversationReset({},_e=>{L(),z(_e),te.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Be}=Pe.data||{};Ne&&q(Ne),Be!=null&&Be.length&&re(Be)})})},[te,p,z,L,q,re,Ot]),Mt=O.useCallback(()=>{var Pe,Ne;const _e=ye||(Ne=(Pe=pn.items)==null?void 0:Pe.slice().reverse().find(Be=>Be.context===k))==null?void 0:Ne.payload;return structuredClone({entryType:k,search:F(F({query:y},w),k==="search"?_e:{}),browse:F(F({categoryId:v},P),k==="browse"?_e:{}),pdp:F({productId:_,pdpLink:_e?_e.pdpLink||"":C||""},k==="pdp"?_e:{})})},[ye,k,y,w,v,P,_,C]),Tr=O.useCallback((_e,Pe,Ne=Mt())=>{if(!_e)return;const Be={userPrompt:_e};switch(Pe&&(Be.imageFile=Pe),Ne.entryType){case"ask_cim":Qt(Be);return;case"search":Ne.search.query?It(F(F({},Ne.search),Be)):Qt(Be);return;case"browse":Bn(F(F({},Ne.browse),Be));return;case"pdp":Ne.pdp.productId?ur(F(F({},Ne.pdp),Be)):Qt(Be);return}},[Mt,It,Qt,Bn,ur]),mn=O.useCallback((_e,Pe,Ne)=>at(_e,()=>Tr(_e,Pe,Ne)),[at,Tr]),Lr=O.useCallback(_e=>{const Pe=Mt();return ln(Ne=>mn(_e,Ne,Pe))},[Mt,mn,ln]),oi=O.useCallback((_e,Pe)=>{var Un,kt,kn;const Be=_e.params.userPrompt||"";if(!Be)return;const Ct=oe.find(ot=>ot.id===Pe);if(!Ct)return;const Rt=Ct.name.replace("_suggestions","");if(Rt==="ask_cim"){Qt({userPrompt:Be});return}if(Rt==="copilot_search"){const ot=((Un=Ct.request)==null?void 0:Un.searchParams)||{},gn=ot.query===y;It(ge(F({query:ot.query||y},gn?w:{}),{userPrompt:Be}));return}if(Rt==="copilot_browse"){const ot=Ct.request,Pn=ot.browseParams||{},Dr=Pn.categoryId===v,Qn=((kt=ot.clientContext)==null?void 0:kt.cimLabel)||"";Bn(ge(F({categoryId:Pn.categoryId||v||""},Dr?P:{}),{categoryName:Qn,userPrompt:Be}));return}if(Rt==="product_view"){const ot=Ct.request||{},Pn=ot.productId,gn=Pn===_,Dr=((kn=ot.clientContext)==null?void 0:kn.cimLabel)||"";let Qn="";gn?Qn=C||"":Qn=ot.pdpLink||"",ur({productId:Pn||_,pdpLink:Qn,productName:Dr,userPrompt:Be})}},[oe,y,w,It,Qt,v,P,Bn,ur,_,C]),Jt=O.useMemo(()=>({copilot:te,messages:oe,groupedMessages:Ce,isLoading:bt,isConnecting:be,isConnectionSlow:Ae,pendingInput:we,inputError:Re,isResponseLoading:Wt,handleAskCim:Qt,handleSearch:It,handleBrowse:Bn,handlePdp:ur,handleUserInput:mn,prepareUserInput:Lr,handleSuggestion:oi,handleCancel:Ge,resetConversation:tt,getSessionInformation:$e,getConversationMessages:Kt}),[te,oe,Ce,bt,be,Ae,we,Re,Wt,Qt,It,Bn,ur,mn,Lr,oi,Ge,tt,$e,Kt]);return x.jsx(Z1.Provider,{value:Jt,children:f})},eE=()=>{const{copilot:e}=Vn(),{addCopilotEvent:t}=So();return{getCopilotSuggestions:O.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])}},Wr=()=>{const e=O.useContext(Z1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},mP=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Vn(),{entryType:o}=rr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=So(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Wr(),{getCopilotSuggestions:w}=eE();O.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=O.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:A}=wt.facetFiltersProxy,{rangeFilters:H}=wt.rangeFiltersProxy,{catalogSegment:U}=wt.catalogSegmentProxy,{pricebooks:L}=wt.pricebooksProxy,z={query:C};z.facetFilters=A||{},z.rangeFilters=H||[],z.catalogSegment=U||"",z.pricebooks=L||[],d(F({},z))},[e,d]),P=O.useCallback(({categoryId:C})=>{if(!e)return;const A=dt.categoryIdProxy.categoryName,{facetFilters:H}=dt.facetFiltersProxy,{rangeFilters:U}=dt.rangeFiltersProxy,{catalogSegment:L}=dt.catalogSegmentProxy,{pricebooks:z}=dt.pricebooksProxy,ee={categoryId:C};ee.categoryName=A||"",ee.facetFilters=H||{},ee.rangeFilters=U||[],ee.catalogSegment=L||"",ee.pricebooks=z||[],f(F({},ee))},[e,f]),_=O.useCallback(({productId:C})=>{if(!e||!Fi()||!C)return;const A={productId:C,pdpLink:kr.pdpLink,productName:kr.proxy.productName||""};p(A)},[e,p]);return O.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="query"&&v({query:A.value})};return S1(C),()=>{v1(C)}},[v]),O.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.property)==="pdp-context"){const H=A.value;_({productId:H.productId});return}(A==null?void 0:A.property)==="productId"&&_({productId:A.value})};return k1(C),()=>{P1(C)}},[_]),O.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&P({categoryId:A.value})};return A1(C),()=>{C1(C)}},[P]),O.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.event)==mi.RESET_CONVERSATION&&m(),(A==null?void 0:A.event)==mi.GET_SESSION_INFORMATION){const H=A.value.callback;T(H)}if((A==null?void 0:A.event)==mi.GET_CONVERSATION_MESSAGES){const{payload:H,callback:U}=A.value;if(!H.conversationId||typeof U!="function")return;y(H,U)}if((A==null?void 0:A.event)==mi.LOAD_CONVERSATION){const H=A.value;if(!H.conversationId)return;y(H,L=>{a(),L.forEach(z=>{u(z)})})}};return Nk(C),()=>{Ok(C)}},[m,T,y,a,u]),null},gP=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>x.jsxs(pP,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[x.jsx(mP,{}),f]}),EP={common:{close:"Close",cancel:"Cancel",retry:"Retry",dismiss:"Dismiss",remove:"Remove",search:"Search",checkout:"Checkout",moreOptions:"More options",conversation:"Conversation"},controls:{overflowMenuAriaLabel:"Overflow menu for {componentType}",clearChat:"Clear Chat",clearChatMenu:"Clear Chat",downloadTranscript:"Download transcript",endConversation:"End conversation",toggleMinimizeAriaLabel:"Toggle Minimize",minimize:"Minimize",expandAriaLabel:"Expand",showModal:"Show modal",collapseAriaLabel:"Collapse",showDialog:"Show {previousComponentType}",showDialogFallback:"dialog",toggleFullscreen:"Toggle Fullscreen",moveRight:"Move right",moveLeft:"Move left"},launcher:{openCommerceClientAriaLabel:"Open Commerce Client",openCopilotAriaLabel:"Open Copilot",logoAlt:"Copilot"},header:{defaultHeaderTextCopilot:"Your Search Assistant",defaultHeaderTextMessaging:"Commerce Client"},loading:{loadingCopilot:"Loading Copilot...",loadingResponse:"Loading response",reconnecting:"Reconnecting...",addingToCart:"Adding...",connectingToAgent:"Connecting to agent..."},connecting:{default:["Hey there! 👋 Getting things ready for you…","Connecting you to our shopping assistant…","Just a moment…"],commerce:["Find the right products faster","Compare your best options","Track and manage your orders"],loadingShoppingAssistantAriaLabel:"Loading shopping assistant",loadingShoppingAssistantHeading:"Loading your shopping assistant",connectingToAssistantAriaLabel:"Connecting to assistant",connectedToAssistant:"Connected to assistant",disconnectedFromAssistant:"Disconnected from assistant"},searchBar:{placeholderAskUsAnything:"Ask us anything",placeholderAskAQuestion:"Ask a question",connectToHumanAriaLabel:"Connect to a human agent",connectToHumanSentMessage:"Can you connect me to a human?",currentPageContextAriaLabel:"Current page context",searchCopilotAriaLabel:"Search Copilot",cancelProcessingAriaLabel:"Cancel Copilot chat processing",cancelRequestTitle:"Cancel Copilot request",sendMessageAriaLabel:"Send message"},imageAttachment:{uploadImageAriaLabel:"Upload image",removeImageLabel:"Remove image",previewAlt:"Preview of {fileName}",fileSizeExceeded:"File size exceeds the {maxImageMb}MB limit. Please choose a smaller file.",fileSizeExceeded10mb:"File size exceeds the 10MB limit. Please choose a smaller file.",unsupportedFileType:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",fileProcessingError:"There was an error processing the file. Please try again."},prompts:{askMeSomethingElse:"Ask me something else",submitPromptAriaLabel:"Submit prompt",placeholderAskCopilot:"Ask Copilot",placeholderAskAQuestion:"Ask a question",connectingToAgent:"Connecting to agent...",agentError:"Oops, something went wrong with our agent."},entryMessage:{askCimWelcome:"Hello! I'm your Cimulate Co-Pilot. Ask me anything. I can help you find products, compare items, discover trends, and more!"},messages:{conversationReset:"This conversation has been reset.",startSearchPrompt:"What products would you like to explore today?",genericError:"An error occurred while processing your request.",displayDisplayTrouble:"Oops, I had trouble displaying that response.",requestTrouble:"Oops, I had trouble with your request.",progressHide:"Hide",progressContext:"Context",userProvidedContextAlt:"User-provided context",recommendedProductsAriaLabel:"Recommended products",filterCountOne:"{count} filter",filterCountMultiple:"{count} filters",progressStepCompleted:"completed",progressStepInProgress:"in progress",progressStepAriaLabel:"{step} ({status})"},userQuery:{yourSearch:"Your search",browsingCategory:"Browsing category",viewingProduct:"Viewing product"},product:{goToProductPageAriaLabel:"Go to product page for {name}",viewDetailsAriaLabel:"View details for {name}",productImageAlt:"Product image",noImageAriaLabel:"No image for {name}",noProductImageAriaLabel:"No product image",showMeDetailsSentMessage:"Show me details for {productName}",thisProductFallbackName:"this product",priceFromToAriaLabel:"Price from {low} to {high}",colorVariantLabel:"Color",quantityLabel:"Quantity",decreaseQuantityAriaLabel:"Decrease quantity",increaseQuantityAriaLabel:"Increase quantity",unavailableVariant:"unavailable",addToCart:"Add to cart"},productComparison:{viewDetailsAriaLabel:"View details for {productName}",showDetailsSentMessage:"Show me details for {productName}"},productGallery:{productImagesAriaLabel:"Product images",imageAlt:"{altText} ({index})",imageAltFallback:"Product image {index}",previousImageAriaLabel:"Previous image",nextImageAriaLabel:"Next image",goToImageAriaLabel:"Go to image {index}"},carousel:{productCarouselAriaLabel:"Product carousel",productRecommendationsAriaLabel:"Product recommendations",previousSlideAriaLabel:"Previous slide",nextSlideAriaLabel:"Next slide",goToSlideGroupAriaLabel:"Go to slide group {index}"},price:{currentPriceLabel:"Current price: ",originalPriceLabel:"Original price: "},cart:{checkout:"Checkout",decreaseQuantityAriaLabel:"Decrease quantity",increaseQuantityAriaLabel:"Increase quantity",quantityAriaLabel:"Quantity",quantityHeading:"Quantity",productImageAlt:"Product image",promotionLabel:"Promotion: {promo}",remove:"Remove",subtotalOne:"Subtotal ({count} item)",subtotalMultiple:"Subtotal ({count} items)",coupon:"Coupon",promotions:"Promotions",shipping:"Shipping",shippingDiscount:"Shipping discount",tax:"Tax",estimatedTotal:"Estimated total",enterCouponCode:"Enter coupon code",applyCouponAriaLabel:"Apply coupon",couponNotApplied:"Not applied",shippingAndTaxesFooter:"Shipping and taxes calculated at checkout.",expressCheckoutCompleteWithOrder:"I completed payment using Express Checkout. Show my confirmation for order {orderId}.",expressCheckoutCompleteNoOrder:"I completed payment using Express Checkout. Show my order confirmation.",addToCartWithQty:"Add {qty} of",addToCart:"Add"},orderConfirmation:{productImageAlt:"Product image",promotionLabel:"Promotion: {promo}",quantityLabel:"Qty: {quantity}",orderConfirmed:"Your order is confirmed.",orderNumberLabel:"Order number: {id}",orderedOnLabel:"Ordered on: {date}",subtotal:"Subtotal",coupon:"Coupon",promotions:"Promotions",shipping:"Shipping",shippingDiscount:"Shipping discount",tax:"Tax",total:"Total",shippingAndTaxesFooter:"Shipping and taxes calculated at checkout."},payment:{expressPaymentTitle:"Express payment",paymentFailed:"Payment failed. Please try again or choose another method.",paymentCanceled:"Payment was canceled."},jumpToLatest:{jumpToLatestAriaLabel:"Jump to latest message",jumpToLatestTitle:"Jump to latest message"},attachment:{fallbackAlt:"Attachment"},announcements:{assistantResponseAvailable:"Assistant response available",noProductsFound:"No products found",productsFoundOne:"{count} product found.",productsFoundMultiple:"{count} products found.",productTitleLabelOne:"Product title",productTitleLabelMultiple:"Product titles"},pageContext:{stopAskingAboutAriaLabel:"Stop asking about {label}",askAboutPlaceholder:"Ask about {label}",searchDisplayLabel:'Search: "{query}"',removeSearchContextAriaLabel:"Remove search context for {query}",searchPlaceholder:"Ask us anything",searchDividerLabel:'Search: "{label}"'},errors:{genericRetry:"Couldn't send your message. Please try again.",rateLimited:"We're getting a lot of requests right now. Please try again in a moment.",offline:"You're offline or we couldn't reach the assistant. Check your connection and try again.",messagingUnavailable:"Messaging is unavailable"},session:{sessionEnded:"Your session ended due to inactivity. Starting a new session…",conversationEnded:"This conversation has ended.",participantJoined:"{name} joined the conversation",participantLeft:"{name} left the conversation",participantFallbackName:"Agent"}};function tE(e,t){return t?F(F({},e),t):e}function nE(e,t){const n=EP;if(!e&&!t)return n;const r=o=>tE(tE(n[o],e==null?void 0:e[o]),t==null?void 0:t[o]);return{common:r("common"),controls:r("controls"),launcher:r("launcher"),header:r("header"),loading:r("loading"),connecting:r("connecting"),searchBar:r("searchBar"),imageAttachment:r("imageAttachment"),prompts:r("prompts"),entryMessage:r("entryMessage"),messages:r("messages"),userQuery:r("userQuery"),product:r("product"),productComparison:r("productComparison"),productGallery:r("productGallery"),carousel:r("carousel"),price:r("price"),cart:r("cart"),orderConfirmation:r("orderConfirmation"),payment:r("payment"),jumpToLatest:r("jumpToLatest"),attachment:r("attachment"),announcements:r("announcements"),pageContext:r("pageContext"),errors:r("errors"),session:r("session")}}const rE=O.createContext(null),iE=O.createContext(void 0),yP=({locale:e,translations:t,translationOverrides:n,children:r})=>{const o=O.useMemo(()=>nE(t,n),[t,n]);return x.jsx(iE.Provider,{value:e,children:x.jsx(rE.Provider,{value:o,children:r})})},qn=()=>{const e=O.useContext(rE);return e||nE(void 0,void 0)},Yf=()=>O.useContext(iE);function bP(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>{const o=t[r];return o!=null?String(o):n})}const TP="https://cdn.search.cimulate.ai/copilot-widget",wP=new Set(["da-DK","de-DE","en-US","es-ES","es-MX","fi-FI","fr-FR","it-IT","ja-JP","ko-KR","nb-NO","nl-NL","pl","pt-BR","sv-SE","zh-CN","zh-TW"]),Pl=new Map;function xP(e,t){const[n,r]=O.useState(void 0),o=O.useRef(0);return O.useEffect(()=>{var d;if(!e||t||e==="en-US"||!wP.has(e)){r(void 0);return}const a=`1.62.2:${e}`;if(Pl.has(a)){r((d=Pl.get(a))!=null?d:void 0);return}const u=++o.current,l=`${TP}/1.62.2/locales/${e}.json`;fetch(l).then(f=>{if(!f.ok)throw new Error(`${f.status}`);return f.json()}).then(f=>{Pl.set(a,f),o.current===u&&r(f)}).catch(()=>{Pl.set(a,null)})},[e,t]),n}const _P=({children:e,dispatch:t})=>{const n=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=O.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 x.jsx(J1.Provider,{value:y,children:e})},SP=(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}},vP=({promptsConfig:e,children:t})=>{const[n,r]=p0(SP,ge(F(F({},C0),e||{}),{staticQuestions:n0((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(Q1.Provider,{value:n,children:x.jsx(_P,{dispatch:r,children:t})})},oE=({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:P,initialEntry:_,entryMessage:C,disclaimerText:A,disclaimerMarkdown:H,clientContext:U,baseCatalogParams:L,searchPlaceholder:z,searchButtonLabel:ee,searchConfig:he,suggestionButtonConfig:q,messageAlignment:re,autoScroll:de,promptsConfig:ye,resetConversationMessage:te,conversationHistory:oe,onConnect:Ce,onCopilotEvent:ae,onRefinedSearch:J,onRefinedBrowse:se,locale:k,translations:M,translationOverrides:K,__features:I,children:ue})=>{const be=_==null?void 0:_.params,Ae=xP(k,M!==void 0),we=M!=null?M:Ae;return x.jsx(yP,{locale:k,translations:we,translationOverrides:K,children:x.jsx(ak,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:C,staticQuestions:n0(be==null?void 0:be.staticQuestions),staticQuestionsStrategy:be==null?void 0:be.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:z,searchButtonLabel:ee,searchConfig:he,suggestionButtonConfig:q,messageAlignment:re,autoScroll:de,componentConfig:v,clientContext:U,baseCatalogParams:L,disclaimerMarkdown:H,disclaimerText:A,resetConversationMessage:te,conversationHistory:oe,isDevelopment:y,__features:I,children:x.jsx(dP,{entryType:P!=null?P:_==null?void 0:_.type,componentConfig:v,componentType:w,children:x.jsx(yk,{onCopilotEvent:ae,children:x.jsx(lP,{children:x.jsx(rP,{children:x.jsx(sP,{children:x.jsx(vP,{promptsConfig:ye,children:x.jsx(gP,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:P,onConnect:Ce,onRefinedSearch:J,onRefinedBrowse:se,onCopilotEvent:ae,children:ue})})})})})})})})})};var Wf={exports:{}},Yn={},Gf={exports:{}},Xf={};var sE;function AP(){return sE||(sE=1,(function(e){function t(J,se){var k=J.length;J.push(se);e:for(;0<k;){var M=k-1>>>1,K=J[M];if(0<o(K,se))J[M]=se,J[k]=K,k=M;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 M=0,K=J.length,I=K>>>1;M<I;){var ue=2*(M+1)-1,be=J[ue],Ae=ue+1,we=J[Ae];if(0>o(be,k))Ae<K&&0>o(we,be)?(J[M]=we,J[Ae]=k,M=Ae):(J[M]=be,J[ue]=k,M=ue);else if(Ae<K&&0>o(we,k))J[M]=we,J[Ae]=k,M=Ae;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,P=typeof setTimeout=="function"?setTimeout:null,_=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 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 H(J){if(v=!1,A(J),!w)if(n(d)!==null)w=!0,Ce(U);else{var se=n(f);se!==null&&ae(H,se.startTime-J)}}function U(J,se){w=!1,v&&(v=!1,_(ee),ee=-1),y=!0;var k=T;try{for(A(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!re());){var M=m.callback;if(typeof M=="function"){m.callback=null,T=m.priorityLevel;var K=M(m.expirationTime<=se);se=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),A(se)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var ue=n(f);ue!==null&&ae(H,ue.startTime-se),I=!1}return I}finally{m=null,T=k,y=!1}}var L=!1,z=null,ee=-1,he=5,q=-1;function re(){return!(e.unstable_now()-q<he)}function de(){if(z!==null){var J=e.unstable_now();q=J;var se=!0;try{se=z(!0,J)}finally{se?ye():(L=!1,z=null)}}else L=!1}var ye;if(typeof C=="function")ye=function(){C(de)};else if(typeof MessageChannel!="undefined"){var te=new MessageChannel,oe=te.port2;te.port1.onmessage=de,ye=function(){oe.postMessage(null)}}else ye=function(){P(de,0)};function Ce(J){z=J,L||(L=!0,ye())}function ae(J,se){ee=P(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,Ce(U))},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"):he=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 M=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?M+k:M):k=M,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>M?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(_(ee),ee=-1):v=!0,ae(H,k-M))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ce(U))),J},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(J){var se=T;return function(){var k=T;T=se;try{return J.apply(this,arguments)}finally{T=k}}}})(Xf)),Xf}var aE;function CP(){return aE||(aE=1,Gf.exports=AP()),Gf.exports}var uE;function kP(){if(uE)return Yn;uE=1;var e=wn(),t=CP();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 P={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){P[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];P[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){P[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){P[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){P[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){P[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){P[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){P[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){P[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,C);P[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(_,C);P[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(_,C);P[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){P[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),P.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){P[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,c,h){var E=P.hasOwnProperty(s)?P[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 H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),L=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),ee=Symbol.for("react.strict_mode"),he=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),re=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),ye=Symbol.for("react.suspense"),te=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ae=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,M;function K(i){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
11
- `+M+i}var I=!1;function ue(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(Z){var h=Z}Reflect.construct(i,[],s)}else{try{s.call()}catch(Z){h=Z}i.call(s.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
10
+ `+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=xo(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Al.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean),legacyInterceptorReqResOrdering:Sn.transitional(Sn.boolean),advertiseZstdAcceptEncoding:Sn.transitional(Sn.boolean),validateStatusUndefinedResolves:Sn.transitional(Sn.boolean)},!1),o!=null&&(V.isFunction(o)?n.paramsSerializer={serialize:o}:Al.assertOptions(o,{encode:Sn.function,serialize:Sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Al.assertOptions(n,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),n.method=(V.getSafeProp(n,"method")||V.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&V.merge(a.common,a[n.method]);a&&V.forEach(t1.concat("common"),w=>{delete a[w]}),n.headers=_n.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const k=n.transitional||Nf;k&&k.legacyInterceptorReqResOrdering?l.unshift(S.fulfilled,S.rejected):l.push(S.fulfilled,S.rejected)});const f=[];this.interceptors.response.forEach(function(S){f.push(S.fulfilled,S.rejected)});let p,m=0,T;if(!d){const w=[Bf.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++],S=l[m++];try{y=w?w(y):y}catch(k){if(!S){p=Promise.reject(k);break}try{const _=S.call(this,k);V.isThenable(_)&&(p=Promise.resolve(_).then(()=>Bf.call(this,y)))}catch(_){p=Promise.reject(_)}break}}if(!p)try{p=Bf.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=xo(this.defaults,t);const n=u1(t.baseURL,t.url,t.allowAbsoluteUrls,t);return G0(n,t.params,t.paramsSerializer)}};V.forEach(["delete","get","head","options"],function(t){_o.prototype[t]=function(n,r){return this.request(xo(r||{},{method:t,url:n,data:r&&V.hasOwnProp(r,"data")?r.data:void 0}))}}),V.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(xo(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}_o.prototype[t]=n(),t!=="query"&&(_o.prototype[t+"Form"]=n(!0))});let ek=class TS{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 Na(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 TS(function(o){t=o}),cancel:t}}};function tk(e){return function(n){return e.apply(null,n)}}function nk(e){return V.isObject(e)&&e.isAxiosError===!0}const Cl={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(Cl).forEach(([e,t])=>{Cl[t]===void 0&&(Cl[t]=e)});function x1(e){const t=new _o(e),n=k0(_o.prototype.request,t);return V.extend(n,_o.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return x1(xo(e,o))},n}const Ut=x1(Pa);Ut.Axios=_o,Ut.CanceledError=Na,Ut.CancelToken=ek,Ut.isCancel=n1,Ut.VERSION=Df,Ut.toFormData=xl,Ut.AxiosError=Se,Ut.Cancel=Ut.CanceledError,Ut.all=function(t){return Promise.all(t)},Ut.spread=tk,Ut.isAxiosError=nk,Ut.mergeConfig=xo,Ut.AxiosHeaders=_n,Ut.formToJSON=e=>e1(V.isHTMLForm(e)?new FormData(e):e),Ut.getAdapter=T1.getAdapter,Ut.HttpStatusCode=Cl,Ut.default=Ut;const{Axios:sH,AxiosError:aH,CanceledError:uH,isCancel:lH,CancelToken:cH,VERSION:dH,all:fH,Cancel:hH,isAxiosError:pH,spread:mH,toFormData:gH,AxiosHeaders:EH,HttpStatusCode:yH,formToJSON:bH,getAdapter:TH,mergeConfig:wH,create:xH}=Ut;class rk{constructor(t,n,r,o=!1,a,u){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Ut.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}}));ve(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 ik{constructor(t,n,r,o=!1,a,u){ve(this,"apiService");ve(this,"config",null);ve(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}}));ve(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));ve(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));ve(this,"getDescription",t=>this.getProductFieldValue(t,"description"));ve(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));ve(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));ve(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));ve(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));ve(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));ve(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});ve(this,"getProductField",t=>this.config?this.config[t]:"");ve(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new rk(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 ps=(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 ok{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{ps(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 sk={copilot:"Your Search Assistant",messaging:"Commerce Client"},_1=O.createContext(null),ak=({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:S,progressStepsLimit:k=3,messageAlignment:_="start",autoScroll:C=!0,showProductDescription:A=!1,componentConfig:H,conversationHistory:U,resetConversationMessage:L="",apiKey:z,apiToken:Z,baseUrl:de,customerId:q,tenantId:re,theme:fe,isDevelopment:pe,__features:ee,routingAttributes:ie,enableDownloadTranscript:Ce=!0,enablePageContext:ae=!1,enableEscalationToAgent:J=!1,enableImageUpload:se=!1,showProductCaptions:P=!1,connectingMessages:M,staticQuestions:K,staticQuestionsStrategy:I="append",children:ue})=>{const be=e==="messaging",Ae=O.useMemo(()=>{const It=ie==null?void 0:ie.isCartMgmtSupported;return It===!0||It==="true"},[ie]),we=O.useMemo(()=>be?{config:null}:new ik(de,z,Z,pe,q,re),[be,de,z,Z,pe,q,re]),Re=O.useMemo(()=>new ok(pe),[pe]);O.useEffect(()=>{be||!we||we.config||we.getConfig()},[we,be]);const Fe=O.useMemo(()=>S0(fe),[fe]),at=Fe.cssVariables,cn=O.useMemo(()=>{const It=(w==null?void 0:w.placeholder)||T,ar=(w==null?void 0:w.buttonLabel)||y;let Bn="icon";return w!=null&&w.buttonType?Bn=w.buttonType:y&&(Bn="text"),Ee(F({},w||{}),{placeholder:It,buttonLabel:ar,buttonType:Bn})},[w,T,y]),Ct=O.useMemo(()=>Ee(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||sk[e!=null?e:"copilot"]}),[r,t,n,e]),zt=O.useMemo(()=>({configModule:we,mode:e!=null?e:"copilot",themeVariants:Fe.compatibility&&e!=="messaging"?Ee(F({},Fe.variants),{carousel:"chevron"}):Fe.variants,themeTokens:Fe.compatibility==="legacy"?void 0:Fe.tokens,themeClassName:Fe.transcriptClassName,headerConfig:Ct,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:I,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:at,logger:Re,searchConfig:cn,suggestionButtonConfig:S,progressStepsLimit:k,messageAlignment:_,autoScroll:C,showProductDescription:!!A,enableMinimize:!!(H!=null&&H.enableMinimize),launcherAriaLabel:H==null?void 0:H.launcherAriaLabel,enableDownloadTranscript:Ce,enablePageContext:ae,enableEscalationToAgent:J,enableImageUpload:se,showProductCaptions:!!P,connectingMessages:M,resetConversationMessage:L,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:be?24:1,limit:U==null?void 0:U.limit},features:ee,isCartMgmtSupported:Ae}),[we,e,Ct,a,K,I,o,p,m,d,f,u,l,cn,S,_,C,A,H,Ce,ae,J,se,k,P,M,L,Re,at,Fe,U,ee,Ae,be]);return x.jsx(_1.Provider,{value:zt,children:ue})},Qe=()=>{const e=O.useContext(_1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class uk{constructor(){ve(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}});ve(this,"connectedProxy");ve(this,"modeProxy");ve(this,"entryTypeProxy");ve(this,"statusProxy");ve(this,"dialogProxy");ve(this,"modalProxy",{isFullscreen:!1});ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return hk(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 uk,Fi=()=>Je.connected,Oa=()=>Je.isOpen,Uf="cimulate.widget.minimizedOnNav";function lk(){try{const e=sessionStorage.getItem(Uf)==="1";return sessionStorage.removeItem(Uf),e}catch(e){return!1}}function ck(){try{sessionStorage.removeItem(Uf)}catch(e){return}}const dk=e=>{window.addEventListener(bf,e)},fk=e=>{window.removeEventListener(bf,e)},hk=(e,t)=>{const n=new CustomEvent(bf,{detail:{property:e,value:t}});window.dispatchEvent(n)},pk=e=>{Je.connectedProxy.connected=e},Ia=e=>{if(!Yv(e)){const t=g0.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},gi=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,ck())},Ra=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},Hf=e=>{Je.modalProxy.isFullscreen=e},kl=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"},zf=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},mk=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},gk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=Qe(),o=O.useCallback(A=>{n({type:Et.SET_COPILOT,payload:A})},[n]),a=O.useCallback(A=>{pk(A),n({type:Et.SET_CONNECTED,payload:A})},[n]),u=O.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=O.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=O.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=O.useCallback(A=>{n({type:Et.ADD_LOADING_MESSAGE,payload:A})},[n]),p=O.useCallback(A=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:A})},[n]),m=O.useCallback(A=>{d(A),f(A.id)},[d,f]),T=O.useCallback(A=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=O.useCallback(A=>{n({type:Et.ADD_CONVERSATION_ID,payload:A})},[n]),w=O.useCallback(A=>{n({type:Et.SET_CONVERSATION_IDS,payload:A})},[n]),S=O.useCallback(A=>{n({type:Et.SET_IMAGE_FILE,payload:A})},[n]),k=O.useCallback(A=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:A})},[n]),_=O.useCallback(A=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),C=O.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:S,setAskCimPrompts:k,setConversationHistoryLoaded:_}),[o,a,u,l,d,f,p,m,T,y,w,S,k,_]);return x.jsx(A0.Provider,{value:C,children:t})};$v();const Ek=(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=Eo.messages,e.groupedMessages=Eo.groupedMessages,e.loadingMessages=Eo.loadingMessages,e.imageFile=Eo.imageFile,e.askCimPrompts=Eo.askCimPrompts,e.conversationHistoryLoaded=Eo.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}},yk=({onCopilotEvent:e,children:t})=>{const[n,r]=p0(Ek,Eo);return x.jsx(v0.Provider,{value:n,children:x.jsx(gk,{onCopilotEvent:e,dispatch:r,children:t})})};function bk(){var e=O.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Tk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function wk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var jf=typeof window!="undefined",La=function(e){O.useEffect(e,[])},xk=function(e){var t=O.useRef(e);t.current=e,La(function(){return function(){return t.current()}})},_k=function(e){var t=O.useRef(0),n=O.useState(e),r=n[0],o=n[1],a=O.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return xk(function(){cancelAnimationFrame(t.current)}),[r,a]},Sk=function(e,t){return e===t};function vk(e,t){t===void 0&&(t=Sk);var n=O.useRef(),r=O.useRef(e),o=bk();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Ak=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=_k({width:jf?window.innerWidth:r,height:jf?window.innerHeight:a}),d=l[0],f=l[1];return O.useEffect(function(){if(jf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return Tk(window,"resize",p),function(){wk(window,"resize",p)}}},[]),d};class Ck{constructor(){ve(this,"items",[]);ve(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});ve(this,"remove",()=>this.items.shift());ve(this,"first",()=>this.items.length>0?this.items[0]:null);ve(this,"clear",()=>{this.items.length=0});ve(this,"processQueue",t=>{new Array(mn.size).fill(1).forEach(()=>{const r=mn.first();r&&(t(r),mn.remove())})})}get size(){return this.items.length}}const mn=new Ck,S1=e=>{window.addEventListener(yf,e)},v1=e=>{window.removeEventListener(yf,e)},kk=(e,t,n)=>{const r=new CustomEvent(yf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},A1=e=>{window.addEventListener(Ef,e)},C1=e=>{window.removeEventListener(Ef,e)},Pk=(e,t,n)=>{const r=new CustomEvent(Ef,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},k1=e=>{window.addEventListener(gf,e)},P1=e=>{window.removeEventListener(gf,e)},$f=(e,t,n)=>{const r=new CustomEvent(gf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Nk=e=>{window.addEventListener(wf,e)},Ok=e=>{window.removeEventListener(wf,e)},Da=(e,t,n)=>{const r=new CustomEvent(wf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Ik{constructor(){ve(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"categoryIdProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=Xv[n];return Pk(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(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 dt=new Ik,N1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},O1=(e,t,n)=>{var u,l;const r=F({},((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},I1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},R1=({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},L1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},D1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Rk=e=>{if(!Fi()||!Oa()){Fi()&&mn.clear(),mn.add({context:"browse",payload:Ee(F({},dt.state),{categoryId:e})});return}dt.categoryIdProxy.categoryId=e},M1=e=>{N1(e,dt)},Lk=(e,t)=>{O1(e,t,dt)},F1=e=>{I1(e,dt)},Dk=({field:e,value:t})=>{R1({field:e,value:t},dt)},Mk=e=>{L1(e,dt)},B1=e=>{D1(e,dt)},U1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Fi(),n=Oa();if(!t||!n){t&&mn.clear(),mn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&M1(e.facetFilters||{}),"rangeFilters"in e&&F1(e.rangeFilters||[]),"catalogSegment"in e&&(dt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&B1(e.pricebooks||[]),"categoryName"in e&&(dt.categoryIdProxy.categoryName=e.categoryName||""),dt.categoryIdProxy.categoryId=e.categoryId},Fk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:U1,updateBrowseCategoryId:Rk,updateCatalogSegment:Mk,updateFacetFilter:Lk,updateFacetFilters:M1,updatePricebooks:B1,updateRangeFilter:Dk,updateRangeFilters:F1},Symbol.toStringTag,{value:"Module"}));class Bk{constructor(){ve(this,"initialParams",{productId:"",productName:"",pdpLink:""});ve(this,"proxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>($f(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});ve(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});ve(this,"dispatchContextUpdate",()=>{$f("pdp-context",this.state)});ve(this,"createProxy",t=>new Proxy(F({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 F({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const kr=new Bk,H1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Fi(),n=Oa();if(!t||!n){t&&mn.clear(),mn.add({context:"pdp",payload:F({},e)});return}kr.updateProxy(e),$f("pdp-context",e)},Uk=e=>{kr.proxy.productId=e,Fi()||mn.add({context:"pdp",payload:F({},kr.state)})},Hk=e=>{kr.proxy.pdpLink=e};class zk{constructor(){ve(this,"initialState",C0);ve(this,"promptsStateProxy");ve(this,"promptsParamsProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Ma(n,r),Reflect.set(t,n,r)});ve(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));ve(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));ve(this,"updatePromptsParamsProxy",t=>new Proxy(F({},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 Yt=new zk,jk=e=>{window.addEventListener(Tf,e)},$k=e=>{window.removeEventListener(Tf,e)},Ma=(e,t)=>{const n=new CustomEvent(Tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},z1=e=>{const t=Yt.isOpen,n=typeof e=="boolean"?e:!t;Yt.promptsStateProxy.isOpen=n},j1=e=>{const t=Yt.isInline,n=typeof e=="boolean"?e:!t;Yt.promptsStateProxy.isInline=n},Vk=e=>{Yt.promptsParamsProxy=Yt.updatePromptsParamsProxy(e),Ma("params",e),Yt.promptsStateProxy.entryType="ask_cim"},qk=e=>{Yt.promptsParamsProxy=Yt.updatePromptsParamsProxy(e),Ma("params",e),Yt.promptsStateProxy.entryType="search"},Yk=e=>{Yt.promptsParamsProxy=Yt.updatePromptsParamsProxy(e),Ma("params",e),Yt.promptsStateProxy.entryType="browse"},Wk=e=>{Yt.promptsParamsProxy=Yt.updatePromptsParamsProxy(e),Ma("params",e),Yt.promptsStateProxy.entryType="pdp"},Gk=({elementId:e,entryType:t,params:n,isInline:r})=>{Yt.promptsStateProxy.elementId=e,t&&(Yt.promptsStateProxy.entryType=t),typeof r=="boolean"&&j1(r),n&&Yt.updatePromptsParamsProxy(n),Yt.isOpen||z1(!0)},Xk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{Da("endConversation",!0,mi.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{Da("getConversationMessages",{payload:e,callback:t},mi.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Da("getSessionInformation",{callback:e},mi.GET_SESSION_INFORMATION)},loadConversation:e=>{Da("loadConversation",e,mi.LOAD_CONVERSATION)},resetConversation:()=>{Da("resetConversation",!0,mi.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Kk{constructor(){ve(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});ve(this,"queryProxy");ve(this,"facetFiltersProxy");ve(this,"rangeFiltersProxy");ve(this,"catalogSegmentProxy");ve(this,"pricebooksProxy");ve(this,"_fullGet",(t,n)=>Reflect.get(t,n));ve(this,"_fullSet",(t,n,r)=>{const o=Kv[n];return kk(o,n,r),Reflect.set(t,n,r)});ve(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));ve(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));ve(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 wt=new Kk,Qk=e=>{const t=Oa(),n=Fi();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:Ee(F({},wt.state),{query:e})});return}wt.queryProxy.query=e},$1=e=>{N1(e,wt)},Jk=(e,t)=>{O1(e,t,wt)},V1=e=>{I1(e,wt)},Zk=({field:e,value:t})=>{R1({field:e,value:t},wt)},eP=e=>{L1(e,wt)},q1=e=>{D1(e,wt)},Y1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Oa(),n=Fi();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&$1(e.facetFilters||{}),"rangeFilters"in e&&V1(e.rangeFilters||[]),"catalogSegment"in e&&(wt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&q1(e.pricebooks||[]),wt.queryProxy.query=e.query},tP=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Y1,updateCatalogSegment:eP,updateFacetFilter:Jk,updateFacetFilters:$1,updatePricebooks:q1,updateRangeFilter:Zk,updateRangeFilters:V1,updateSearchQuery:Qk},Symbol.toStringTag,{value:"Module"})),nP={categoryId:dt.categoryId,categoryName:dt.categoryIdProxy.categoryName||"",facetFilters:dt.facetFilters,rangeFilters:dt.rangeFilters,catalogSegment:dt.catalogSegment,pricebooks:dt.pricebooks},W1=O.createContext(nP),rP=({children:e})=>{const[t,n]=O.useState(dt.categoryId),[r,o]=O.useState(dt.categoryIdProxy.categoryName||""),[a,u]=O.useState(dt.facetFilters||{}),[l,d]=O.useState(dt.rangeFilters||[]),[f,p]=O.useState(dt.catalogSegment||null),[m,T]=O.useState(dt.pricebooks||null);O.useEffect(()=>{const w=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&p(S.value),(S==null?void 0:S.property)==="pricebooks"&&T(S.value)};return A1(w),()=>{C1(w)}},[]);const y=O.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return x.jsx(W1.Provider,{value:y,children:e})},iP=()=>{const e=O.useContext(W1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},oP={searchQuery:wt.query,facetFilters:wt.facetFilters,rangeFilters:wt.rangeFilters,catalogSegment:wt.catalogSegment,pricebooks:wt.pricebooks},G1=O.createContext(oP),sP=({children:e})=>{const[t,n]=O.useState(wt.query),[r,o]=O.useState(wt.facetFilters),[a,u]=O.useState(wt.rangeFilters),[l,d]=O.useState(wt.catalogSegment),[f,p]=O.useState(wt.pricebooks);O.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 S1(T),()=>{v1(T)}},[]);const m=O.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return x.jsx(G1.Provider,{value:m,children:e})},aP=()=>{const e=O.useContext(G1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},uP={productId:kr.productId,pdpLink:kr.pdpLink},X1=O.createContext(uP),lP=({children:e})=>{const[t,n]=O.useState(kr.productId),[r,o]=O.useState(kr.pdpLink);O.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 k1(u),()=>{P1(u)}},[]);const a=O.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(X1.Provider,{value:a,children:e})},cP=()=>{const e=O.useContext(X1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},K1=O.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}),dP=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=O.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=O.useState(Je.modeProxy.mode),[d,f]=O.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]=O.useState(Je.dialogProxy.position),[T,y]=O.useState(Je.dialogProxy.isFullHeight),[w,S]=O.useState(Je.dialogProxy.width),[k,_]=O.useState(Je.modalProxy.isFullscreen),C=O.useRef(!1),A=vk(d.type);O.useEffect(()=>{const U=L=>{const{property:z,value:Z}=L.detail||{};if(!(!z||Z===void 0)){if(z==="mode"){l(Z);return}if(z==="entryType"){a(Z);return}if(z==="isMinimized"){f(de=>Ee(F({},de),{isMinimized:Z}));return}if(z==="isOpen"){f(de=>Ee(F({},de),{isOpen:Z}));return}if(z==="type"){f(de=>Ee(F({},de),{type:Z}));return}if(z==="position"){m(Z);return}if(z==="isFullHeight"){y(Z);return}if(z==="width"){S(Z);return}if(z==="isFullscreen"){_(Z);return}}};return dk(U),()=>{fk(U)}},[]),La(()=>{e&&Ia(e)}),La(()=>{if(C.current)return;C.current=!0;const U=n||(t==null?void 0:t.type);U&&kl(U);const L=lk();t&&"isOpen"in t&&gi(!!t.isOpen),t&&"isMinimized"in t&&Ra(!!t.isMinimized),L&&Ra(!0)}),La(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&zf(U),"dialogFullHeight"in t.options&&mk(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&S(t.options.dialogWidth),"isModalFullscreen"in t.options&&Hf(!!t.options.isModalFullscreen)});const H=O.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:A||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:k}),[u,o,d,A,p,T,w,k]);return x.jsx(K1.Provider,{value:H,children:r})},rr=()=>{const e=O.useContext(K1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Q1=O.createContext(null),J1=O.createContext(null),Vf=()=>{const e=O.useContext(J1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},Ei=()=>{const e=O.useContext(Q1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},So=()=>{const e=O.useContext(A0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},qn=()=>{const e=O.useContext(v0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},fP=({copilot:e})=>{const{logger:t,conversationHistory:n}=Qe(),{isInline:r}=Ei(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=So(),{activeConversationId:u}=qn(),l=O.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=O.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 O.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(S=>{var _;const k=T.find(C=>C.id===S.eventSourceId);(_=k==null?void 0:k.name)!=null&&_.endsWith("_suggestions")||(S.bypassHandlers=!0,y.unshift(S))}),y.forEach(S=>{o(S)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},qf=15e3,hP=({connected:e,canQueue:t})=>{const{imageFile:n}=qn(),{setImageFile:r,addCopilotEvent:o}=So(),[a,u]=O.useState(null),[l,d]=O.useState(null),f=O.useRef(null),p=O.useRef(0),m=O.useRef(n);m.current=n;const T=O.useCallback((U,L=null)=>{U||p.current++;const z=f.current;z!=null&&z.timer&&clearTimeout(z.timer),f.current=null,z&&(u(U?null:{text:z.text,phase:"failed"}),U&&z.attachment&&m.current===z.attachment&&r(null)),d(L),z==null||z.resolve(U)},[r]),y=O.useCallback((U,L,z)=>{const Z=f.current;if(!Z||Z.phase!=="queued"||Z.send){L(U,z);return}const de=structuredClone(U);Z.send=()=>{let q=!1;Promise.resolve(L(de,re=>{if(!(q||f.current!==Z)){if(q=!0,re.name==="error"){o(re),f.current===Z&&T(!1,"Your message could not be sent. Please try again.");return}z(re),f.current===Z&&T(!0)}})).catch(()=>{f.current===Z&&T(!1,"Your message could not be confirmed. Please try again.")})}},[o,T]),w=O.useCallback((U,L)=>{if(!U.trim()||f.current)return Promise.resolve(!1);if(e){a&&u(null),l&&d(null),L();return}return t?new Promise(z=>{const Z={text:U,phase:"queued",send:null,resolve:z,attachment:m.current};f.current=Z,Z.timer=setTimeout(()=>{f.current===Z&&T(!1,"Your message was not sent in time. Please try again.")},qf),u({text:U,phase:"queued"}),d(null),L(),Z.send||T(!1,"Your message could not be queued. Please try again.")}):Promise.resolve(!1)},[e,t,T,a,l]),S=O.useCallback(U=>{const L=p.current;return z=>L!==p.current?Promise.resolve(!1):U(z)},[]),k=O.useCallback(()=>{const U=f.current;if(!(!(U!=null&&U.send)||U.phase!=="queued")){U.phase="sending",clearTimeout(U.timer),u({text:U.text,phase:"sending"}),U.timer=setTimeout(()=>{f.current===U&&T(!1,"No confirmation received. Your message may have been sent.")},qf);try{U.send()}catch(L){T(!1,"Your message could not be sent. Please try again.")}}},[T]),_=O.useCallback(()=>T(!1),[T]),C=O.useCallback(()=>{const U=f.current;T(!1),U||u(null)},[T]),A=O.useCallback(()=>{if(p.current++,f.current){const U=f.current.phase==="sending";T(!1,U?"Connection lost. Your message may have been sent.":"Could not connect to the assistant. Your message has not been sent.")}},[T]),H=O.useCallback(()=>{p.current++;const U=f.current;clearTimeout(U==null?void 0:U.timer),f.current=null,U==null||U.resolve(!1)},[]);return{pendingInput:a,inputError:l,dispatchRequest:y,submitInput:w,prepareInput:S,flushInput:k,cancelInput:_,resetInput:C,disconnectInput:A,disposeInput:H}},Z1=O.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isConnecting:!1,isConnectionSlow:!1,pendingInput:null,inputError:null,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},prepareUserInput:()=>()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),pP=({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}=Qe(),lr=aP(),{searchQuery:y}=lr,w=Tn(lr,["searchQuery"]),kn=iP(),{categoryId:S}=kn,k=Tn(kn,["categoryId"]),{productId:_,pdpLink:C}=cP(),{setCopilot:A,setConnected:H,resetCopilot:U,resetCopilotState:L,addCopilotEvent:z,removeLoadingMessage:Z,handleCopilotRequestAck:de,setActiveConversationId:q,setConversationIds:re,setAskCimPrompts:fe}=So(),{connected:pe,copilot:ee,messages:ie,groupedMessages:Ce,loadingMessages:ae,askCimPrompts:J}=qn(),{status:se,entryType:P}=rr(),{isInline:M}=Ei(),K=O.useRef(null),[I,ue]=O.useState("idle"),be=I==="connecting"&&!pe,Ae=I==="slow"&&!pe,{pendingInput:we,inputError:Re,dispatchRequest:Fe,submitInput:at,prepareInput:cn,flushInput:Ct,cancelInput:zt,resetInput:It,disconnectInput:ar,disposeInput:Bn}=hP({connected:!!pe,canQueue:be&&!!ee&&se.isOpen}),{getConversationMessages:Qt,getSessionInformation:$e}=fP({copilot:ee}),bt=O.useMemo(()=>ae.size>0,[ae]),Gt=O.useCallback(_e=>ae.has(_e),[ae]),Rt=O.useCallback(({query:_e,facetFilters:Pe,rangeFilters:Ne,catalogSegment:Be,pricebooks:kt,userPrompt:Lt,imageFile:Hn})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Pt={searchParams:{query:_e}};Lt&&(Pt.userPrompt=Lt),Hn&&(Pt.attachments={image:Hn}),Pe&&Object.keys(Pe).length>0&&(Pt.searchParams.facetFilters=Pe),Ne&&Ne.length>0&&(Pt.searchParams.rangeFilters=Ne),Be&&(Pt.searchParams.catalogSegment=Be),kt&&(Pt.searchParams.pricebooks=kt),m&&(Pt.clientContext=m),Ia("search"),Fe(Pt,(Pn,ot)=>ee.search(Pn,ot),Pn=>{const ot=F({},Pn);de(ot)})},[p,ee,m,de,Fe]),Un=O.useCallback(({categoryId:_e,categoryName:Pe,facetFilters:Ne,rangeFilters:Be,catalogSegment:kt,pricebooks:Lt,userPrompt:Hn,imageFile:Pt})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}const Pn=Ne&&Object.keys(Ne).length>0;if(_e===""&&!Pn){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const ot={browseParams:{categoryId:_e||""}};Hn&&(ot.userPrompt=Hn),Pt&&(ot.attachments={image:Pt}),Pn&&(ot.browseParams.facetFilters=Ne),Be&&Be.length>0&&(ot.browseParams.rangeFilters=Be),kt&&(ot.browseParams.catalogSegment=kt),Array.isArray(Lt)&&Lt.length>0&&(ot.browseParams.pricebooks=Lt),(m||Pe)&&(ot.clientContext={},m&&(ot.clientContext=F({},m)),Pe&&(ot.clientContext.cimLabel=Pe)),Ia("browse"),Fe(ot,(Nn,En)=>ee.browse(Nn,En),Nn=>{var Rc;const En=F({},Nn),Dr=((Rc=En.request)==null?void 0:Rc.clientContext)||{},Qn=(Dr==null?void 0:Dr.cimLabel)||Pe;Qn&&En.request&&(En.request.label=Qn),de(En)})},[p,ee,m,de,Fe]),ur=O.useCallback(({productId:_e,productName:Pe,pdpLink:Ne,userPrompt:Be,imageFile:kt})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Lt={productId:_e};Be&&(Lt.userPrompt=Be),Ne&&(Lt.pdpLink=Ne),kt&&(Lt.attachments={image:kt}),(m||Pe)&&(Lt.clientContext={},m&&(Lt.clientContext=F({},m)),Pe&&(Lt.clientContext.cimLabel=Pe)),T&&(Lt.baseCatalogParams=T),Ia("pdp"),Fe(Lt,(Hn,Pt)=>ee.productView(Hn,Pt),Hn=>{var Nn;const Pt=F({},Hn),Pn=((Nn=Pt.request)==null?void 0:Nn.clientContext)||{},ot=(Pn==null?void 0:Pn.cimLabel)||Pe;ot&&Pt.request&&(Pt.request.label=ot),de(Pt)})},[p,ee,m,T,de,Fe]),Jt=O.useCallback(({userPrompt:_e,imageFile:Pe})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Ne={userPrompt:_e};Pe&&(Ne.attachments={image:Pe}),m&&(Ne.clientContext=m),T&&(Ne.baseCatalogParams=T),Fe(Ne,(Be,kt)=>ee.askCim(Be,kt),Be=>{const kt=F({},Be);de(kt)})},[p,ee,m,T,de,Fe]),qo=O.useCallback(_e=>{z(_e),l==null||l(_e)},[z,l]),oe=O.useCallback(_e=>{z(_e),d==null||d(_e)},[z,d]),xe=O.useCallback(_e=>{const Pe=K.current;Pe&&(Pe.established=!0,clearTimeout(Pe.timer)),ue("connected"),u==null||u(_e),H(!0)},[u,H]);O.useEffect(()=>{!ee||!pe||!se.isOpen||mn.size>0&&mn.processQueue(_e=>{if(_e.context==="search"){const Pe=F({},_e.payload);Y1(Pe)}if(_e.context==="browse"){const Pe=F({},_e.payload);U1(Pe)}if(_e.context==="pdp"){const Pe=F({},_e.payload);H1(Pe)}})},[se.isOpen,ee,pe]),O.useEffect(()=>{pe&&se.isOpen&&Ct()},[pe,se.isOpen,we,Ct]);const Ve=O.useCallback(_e=>{const Pe=Ne=>{const Be=Ee(F({},Ne),{id:Ne.inquiryLinkId||Ne.id});z(Be)};_e.on("connect_ack",xe),_e.on("connect_error",Ne=>{p==null||p.warn("Copilot connection attempt failed:",Ne)}),_e.on("partial_inquiry",Pe),_e.on("display_products",z),_e.on("progress",z),_e.on("refined_search",qo),_e.on("refined_browse",oe),_e.on("done",Ne=>{Z(Ne.eventSourceId)}),_e.on("error",Ne=>{z(Ne),Z(Ne.eventSourceId)}),_e.onDisconnect(Ne=>{const Be=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Ne),ar(),!Be.includes(Ne)){H(!1);return}p==null||p.log("De-registering event listeners");const kt=new Date().toISOString();z({name:"error",message:"Connection was lost. Please try again.",createdAt:kt,id:`error-${kt}`,sessionId:"session"}),_e.off()})},[p,H,Z,qo,oe,z,xe,ar]);O.useEffect(()=>{if(!ee)return;const _e=Pe=>{if(!M){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===J.requestId){fe({requestId:Pe.eventSourceId,message:Pe});return}z(Pe)}};return ee.on("follow_up",_e),()=>{ee.off("follow_up",_e)}},[ee,ie,J.requestId,M,z,fe]),O.useEffect(()=>{if(!ee)return;const _e=Pe=>{if(M)return;const Ne=Ee(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});z(Ne)};return ee.on("inquiry",_e),()=>{ee.off("inquiry",_e)}},[ee,M,z]),La(()=>{let _e;n?_e=n:_e=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:_e};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),o&&(Pe.tenantId=o);const Ne=new Rv(Pe);return K.current={sdk:Ne,started:!1,established:!1},A(Ne),Ve(Ne),()=>{var Be;Bn(),clearTimeout((Be=K.current)==null?void 0:Be.timer),K.current=null,Ne.disconnect(),Ne.off(),H(!1),U()}}),O.useEffect(()=>{const _e=K.current;!se.isOpen||!ee||(_e==null?void 0:_e.sdk)!==ee||_e.started||(_e.started=!0,ue("connecting"),_e.timer=setTimeout(()=>{K.current!==_e||_e.established||(ue("slow"),zt())},qf),ee.connect(),ee.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Be}=Pe.data||{};Ne&&q(Ne),Be!=null&&Be.length&&re(Be)}))},[ee,se.isOpen,p,q,re,zt]);const Ge=O.useCallback(_e=>{if(!ee)return;const Pe={eventId:_e,reason:"User cancelled the request"};ee.cancelRequest(Pe,Ne=>{z(Ne),Z(_e)})},[z,Z,ee]),tt=O.useCallback(()=>{It(),ee&&ee.conversationReset({},_e=>{L(),z(_e),ee.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Be}=Pe.data||{};Ne&&q(Ne),Be!=null&&Be.length&&re(Be)})})},[ee,p,z,L,q,re,It]),Ft=O.useCallback(()=>{var Pe,Ne;const _e=pe||(Ne=(Pe=mn.items)==null?void 0:Pe.slice().reverse().find(Be=>Be.context===P))==null?void 0:Ne.payload;return structuredClone({entryType:P,search:F(F({query:y},w),P==="search"?_e:{}),browse:F(F({categoryId:S},k),P==="browse"?_e:{}),pdp:F({productId:_,pdpLink:_e?_e.pdpLink||"":C||""},P==="pdp"?_e:{})})},[pe,P,y,w,S,k,_,C]),Tr=O.useCallback((_e,Pe,Ne=Ft())=>{if(!_e)return;const Be={userPrompt:_e};switch(Pe&&(Be.imageFile=Pe),Ne.entryType){case"ask_cim":Jt(Be);return;case"search":Ne.search.query?Rt(F(F({},Ne.search),Be)):Jt(Be);return;case"browse":Un(F(F({},Ne.browse),Be));return;case"pdp":Ne.pdp.productId?ur(F(F({},Ne.pdp),Be)):Jt(Be);return}},[Ft,Rt,Jt,Un,ur]),gn=O.useCallback((_e,Pe,Ne)=>at(_e,()=>Tr(_e,Pe,Ne)),[at,Tr]),Lr=O.useCallback(_e=>{const Pe=Ft();return cn(Ne=>gn(_e,Ne,Pe))},[Ft,gn,cn]),oi=O.useCallback((_e,Pe)=>{var Hn,Pt,Pn;const Be=_e.params.userPrompt||"";if(!Be)return;const kt=ie.find(ot=>ot.id===Pe);if(!kt)return;const Lt=kt.name.replace("_suggestions","");if(Lt==="ask_cim"){Jt({userPrompt:Be});return}if(Lt==="copilot_search"){const ot=((Hn=kt.request)==null?void 0:Hn.searchParams)||{},En=ot.query===y;Rt(Ee(F({query:ot.query||y},En?w:{}),{userPrompt:Be}));return}if(Lt==="copilot_browse"){const ot=kt.request,Nn=ot.browseParams||{},Dr=Nn.categoryId===S,Qn=((Pt=ot.clientContext)==null?void 0:Pt.cimLabel)||"";Un(Ee(F({categoryId:Nn.categoryId||S||""},Dr?k:{}),{categoryName:Qn,userPrompt:Be}));return}if(Lt==="product_view"){const ot=kt.request||{},Nn=ot.productId,En=Nn===_,Dr=((Pn=ot.clientContext)==null?void 0:Pn.cimLabel)||"";let Qn="";En?Qn=C||"":Qn=ot.pdpLink||"",ur({productId:Nn||_,pdpLink:Qn,productName:Dr,userPrompt:Be})}},[ie,y,w,Rt,Jt,S,k,Un,ur,_,C]),Zt=O.useMemo(()=>({copilot:ee,messages:ie,groupedMessages:Ce,isLoading:bt,isConnecting:be,isConnectionSlow:Ae,pendingInput:we,inputError:Re,isResponseLoading:Gt,handleAskCim:Jt,handleSearch:Rt,handleBrowse:Un,handlePdp:ur,handleUserInput:gn,prepareUserInput:Lr,handleSuggestion:oi,handleCancel:Ge,resetConversation:tt,getSessionInformation:$e,getConversationMessages:Qt}),[ee,ie,Ce,bt,be,Ae,we,Re,Gt,Jt,Rt,Un,ur,gn,Lr,oi,Ge,tt,$e,Qt]);return x.jsx(Z1.Provider,{value:Zt,children:f})},eE=()=>{const{copilot:e}=qn(),{addCopilotEvent:t}=So();return{getCopilotSuggestions:O.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])}},Wr=()=>{const e=O.useContext(Z1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},mP=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=qn(),{entryType:o}=rr(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=So(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Wr(),{getCopilotSuggestions:w}=eE();O.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 S=O.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:A}=wt.facetFiltersProxy,{rangeFilters:H}=wt.rangeFiltersProxy,{catalogSegment:U}=wt.catalogSegmentProxy,{pricebooks:L}=wt.pricebooksProxy,z={query:C};z.facetFilters=A||{},z.rangeFilters=H||[],z.catalogSegment=U||"",z.pricebooks=L||[],d(F({},z))},[e,d]),k=O.useCallback(({categoryId:C})=>{if(!e)return;const A=dt.categoryIdProxy.categoryName,{facetFilters:H}=dt.facetFiltersProxy,{rangeFilters:U}=dt.rangeFiltersProxy,{catalogSegment:L}=dt.catalogSegmentProxy,{pricebooks:z}=dt.pricebooksProxy,Z={categoryId:C};Z.categoryName=A||"",Z.facetFilters=H||{},Z.rangeFilters=U||[],Z.catalogSegment=L||"",Z.pricebooks=z||[],f(F({},Z))},[e,f]),_=O.useCallback(({productId:C})=>{if(!e||!Fi()||!C)return;const A={productId:C,pdpLink:kr.pdpLink,productName:kr.proxy.productName||""};p(A)},[e,p]);return O.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="query"&&S({query:A.value})};return S1(C),()=>{v1(C)}},[S]),O.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.property)==="pdp-context"){const H=A.value;_({productId:H.productId});return}(A==null?void 0:A.property)==="productId"&&_({productId:A.value})};return k1(C),()=>{P1(C)}},[_]),O.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&k({categoryId:A.value})};return A1(C),()=>{C1(C)}},[k]),O.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.event)==mi.RESET_CONVERSATION&&m(),(A==null?void 0:A.event)==mi.GET_SESSION_INFORMATION){const H=A.value.callback;T(H)}if((A==null?void 0:A.event)==mi.GET_CONVERSATION_MESSAGES){const{payload:H,callback:U}=A.value;if(!H.conversationId||typeof U!="function")return;y(H,U)}if((A==null?void 0:A.event)==mi.LOAD_CONVERSATION){const H=A.value;if(!H.conversationId)return;y(H,L=>{a(),L.forEach(z=>{u(z)})})}};return Nk(C),()=>{Ok(C)}},[m,T,y,a,u]),null},gP=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>x.jsxs(pP,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[x.jsx(mP,{}),f]}),EP={common:{close:"Close",cancel:"Cancel",retry:"Retry",dismiss:"Dismiss",remove:"Remove",search:"Search",checkout:"Checkout",moreOptions:"More options",conversation:"Conversation"},controls:{overflowMenuAriaLabel:"Overflow menu for {componentType}",clearChat:"Clear Chat",clearChatMenu:"Clear Chat",downloadTranscript:"Download transcript",endConversation:"End conversation",toggleMinimizeAriaLabel:"Toggle Minimize",minimize:"Minimize",expandAriaLabel:"Expand",showModal:"Show modal",collapseAriaLabel:"Collapse",showDialog:"Show {previousComponentType}",showDialogFallback:"dialog",toggleFullscreen:"Toggle Fullscreen",moveRight:"Move right",moveLeft:"Move left"},launcher:{openCommerceClientAriaLabel:"Open Commerce Client",openCopilotAriaLabel:"Open Copilot",logoAlt:"Copilot"},header:{defaultHeaderTextCopilot:"Your Search Assistant",defaultHeaderTextMessaging:"Commerce Client"},loading:{loadingCopilot:"Loading Copilot...",loadingResponse:"Loading response",reconnecting:"Reconnecting...",addingToCart:"Adding...",connectingToAgent:"Connecting to agent..."},connecting:{default:["Hey there! 👋 Getting things ready for you…","Connecting you to our shopping assistant…","Just a moment…"],commerce:["Find the right products faster","Compare your best options","Track and manage your orders"],loadingShoppingAssistantAriaLabel:"Loading shopping assistant",loadingShoppingAssistantHeading:"Loading your shopping assistant",connectingToAssistantAriaLabel:"Connecting to assistant",connectedToAssistant:"Connected to assistant",disconnectedFromAssistant:"Disconnected from assistant"},searchBar:{placeholderAskUsAnything:"Ask us anything",placeholderAskAQuestion:"Ask a question",connectToHumanAriaLabel:"Connect to a human agent",connectToHumanSentMessage:"Can you connect me to a human?",currentPageContextAriaLabel:"Current page context",searchCopilotAriaLabel:"Search Copilot",cancelProcessingAriaLabel:"Cancel Copilot chat processing",cancelRequestTitle:"Cancel Copilot request",sendMessageAriaLabel:"Send message"},imageAttachment:{uploadImageAriaLabel:"Upload image",removeImageLabel:"Remove image",previewAlt:"Preview of {fileName}",fileSizeExceeded:"File size exceeds the {maxImageMb}MB limit. Please choose a smaller file.",fileSizeExceeded10mb:"File size exceeds the 10MB limit. Please choose a smaller file.",unsupportedFileType:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",fileProcessingError:"There was an error processing the file. Please try again."},prompts:{askMeSomethingElse:"Ask me something else",submitPromptAriaLabel:"Submit prompt",placeholderAskCopilot:"Ask Copilot",placeholderAskAQuestion:"Ask a question",connectingToAgent:"Connecting to agent...",agentError:"Oops, something went wrong with our agent."},entryMessage:{askCimWelcome:"Hello! I'm your Cimulate Co-Pilot. Ask me anything. I can help you find products, compare items, discover trends, and more!"},messages:{conversationReset:"This conversation has been reset.",startSearchPrompt:"What products would you like to explore today?",genericError:"An error occurred while processing your request.",displayDisplayTrouble:"Oops, I had trouble displaying that response.",requestTrouble:"Oops, I had trouble with your request.",progressHide:"Hide",progressContext:"Context",userProvidedContextAlt:"User-provided context",recommendedProductsAriaLabel:"Recommended products",filterCountOne:"{count} filter",filterCountMultiple:"{count} filters",progressStepCompleted:"completed",progressStepInProgress:"in progress",progressStepAriaLabel:"{step} ({status})"},userQuery:{yourSearch:"Your search",browsingCategory:"Browsing category",viewingProduct:"Viewing product"},product:{goToProductPageAriaLabel:"Go to product page for {name}",viewDetailsAriaLabel:"View details for {name}",productImageAlt:"Product image",noImageAriaLabel:"No image for {name}",noProductImageAriaLabel:"No product image",showMeDetailsSentMessage:"Show me details for {productName}",thisProductFallbackName:"this product",priceFromToAriaLabel:"Price from {low} to {high}",colorVariantLabel:"Color",quantityLabel:"Quantity",decreaseQuantityAriaLabel:"Decrease quantity",increaseQuantityAriaLabel:"Increase quantity",unavailableVariant:"unavailable",addToCart:"Add to cart"},productComparison:{viewDetailsAriaLabel:"View details for {productName}",showDetailsSentMessage:"Show me details for {productName}"},productGallery:{productImagesAriaLabel:"Product images",imageAlt:"{altText} ({index})",imageAltFallback:"Product image {index}",previousImageAriaLabel:"Previous image",nextImageAriaLabel:"Next image",goToImageAriaLabel:"Go to image {index}"},carousel:{productCarouselAriaLabel:"Product carousel",productRecommendationsAriaLabel:"Product recommendations",previousSlideAriaLabel:"Previous slide",nextSlideAriaLabel:"Next slide",goToSlideGroupAriaLabel:"Go to slide group {index}"},price:{currentPriceLabel:"Current price: ",originalPriceLabel:"Original price: "},cart:{checkout:"Checkout",decreaseQuantityAriaLabel:"Decrease quantity",increaseQuantityAriaLabel:"Increase quantity",quantityAriaLabel:"Quantity",quantityHeading:"Quantity",productImageAlt:"Product image",promotionLabel:"Promotion: {promo}",remove:"Remove",subtotalOne:"Subtotal ({count} item)",subtotalMultiple:"Subtotal ({count} items)",coupon:"Coupon",promotions:"Promotions",shipping:"Shipping",shippingDiscount:"Shipping discount",tax:"Tax",estimatedTotal:"Estimated total",enterCouponCode:"Enter coupon code",applyCouponAriaLabel:"Apply coupon",couponNotApplied:"Not applied",shippingAndTaxesFooter:"Shipping and taxes calculated at checkout.",expressCheckoutCompleteWithOrder:"I completed payment using Express Checkout. Show my confirmation for order {orderId}.",expressCheckoutCompleteNoOrder:"I completed payment using Express Checkout. Show my order confirmation.",addToCartWithQty:"Add {qty} of",addToCart:"Add"},orderConfirmation:{productImageAlt:"Product image",promotionLabel:"Promotion: {promo}",quantityLabel:"Qty: {quantity}",orderConfirmed:"Your order is confirmed.",orderNumberLabel:"Order number: {id}",orderedOnLabel:"Ordered on: {date}",subtotal:"Subtotal",coupon:"Coupon",promotions:"Promotions",shipping:"Shipping",shippingDiscount:"Shipping discount",tax:"Tax",total:"Total",shippingAndTaxesFooter:"Shipping and taxes calculated at checkout."},payment:{expressPaymentTitle:"Express payment",paymentFailed:"Payment failed. Please try again or choose another method.",paymentCanceled:"Payment was canceled."},jumpToLatest:{jumpToLatestAriaLabel:"Jump to latest message",jumpToLatestTitle:"Jump to latest message"},attachment:{fallbackAlt:"Attachment"},announcements:{assistantResponseAvailable:"Assistant response available",noProductsFound:"No products found",productsFoundOne:"{count} product found.",productsFoundMultiple:"{count} products found.",productTitleLabelOne:"Product title",productTitleLabelMultiple:"Product titles"},pageContext:{stopAskingAboutAriaLabel:"Stop asking about {label}",askAboutPlaceholder:"Ask about {label}",searchDisplayLabel:'Search: "{query}"',removeSearchContextAriaLabel:"Remove search context for {query}",searchPlaceholder:"Ask us anything",searchDividerLabel:'Search: "{label}"'},errors:{genericRetry:"Couldn't send your message. Please try again.",rateLimited:"We're getting a lot of requests right now. Please try again in a moment.",offline:"You're offline or we couldn't reach the assistant. Check your connection and try again.",messagingUnavailable:"Messaging is unavailable"},session:{sessionEnded:"Your session ended due to inactivity. Starting a new session…",conversationEnded:"This conversation has ended.",participantJoined:"{name} joined the conversation",participantLeft:"{name} left the conversation",participantFallbackName:"Agent"}};function tE(e,t){return t?F(F({},e),t):e}function nE(e,t){const n=EP;if(!e&&!t)return n;const r=o=>tE(tE(n[o],e==null?void 0:e[o]),t==null?void 0:t[o]);return{common:r("common"),controls:r("controls"),launcher:r("launcher"),header:r("header"),loading:r("loading"),connecting:r("connecting"),searchBar:r("searchBar"),imageAttachment:r("imageAttachment"),prompts:r("prompts"),entryMessage:r("entryMessage"),messages:r("messages"),userQuery:r("userQuery"),product:r("product"),productComparison:r("productComparison"),productGallery:r("productGallery"),carousel:r("carousel"),price:r("price"),cart:r("cart"),orderConfirmation:r("orderConfirmation"),payment:r("payment"),jumpToLatest:r("jumpToLatest"),attachment:r("attachment"),announcements:r("announcements"),pageContext:r("pageContext"),errors:r("errors"),session:r("session")}}const rE=O.createContext(null),iE=O.createContext(void 0),yP=({locale:e,translations:t,translationOverrides:n,children:r})=>{const o=O.useMemo(()=>nE(t,n),[t,n]);return x.jsx(iE.Provider,{value:e,children:x.jsx(rE.Provider,{value:o,children:r})})},St=()=>{const e=O.useContext(rE);return e||nE(void 0,void 0)},Yf=()=>O.useContext(iE);function bP(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>{const o=t[r];return o!=null?String(o):n})}const TP="https://cdn.search.cimulate.ai/copilot-widget",wP=new Set(["da-DK","de-DE","en-US","es-ES","es-MX","fi-FI","fr-FR","it-IT","ja-JP","ko-KR","nb-NO","nl-NL","pl","pt-BR","sv-SE","zh-CN","zh-TW"]),Pl=new Map;function xP(e,t){const[n,r]=O.useState(void 0),o=O.useRef(0);return O.useEffect(()=>{var d;if(!e||t||e==="en-US"||!wP.has(e)){r(void 0);return}const a=`1.62.4:${e}`;if(Pl.has(a)){r((d=Pl.get(a))!=null?d:void 0);return}const u=++o.current,l=`${TP}/1.62.4/locales/${e}.json`;fetch(l).then(f=>{if(!f.ok)throw new Error(`${f.status}`);return f.json()}).then(f=>{Pl.set(a,f),o.current===u&&r(f)}).catch(()=>{Pl.set(a,null)})},[e,t]),n}const _P=({children:e,dispatch:t})=>{const n=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=O.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=O.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 x.jsx(J1.Provider,{value:y,children:e})},SP=(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}},vP=({promptsConfig:e,children:t})=>{const[n,r]=p0(SP,Ee(F(F({},C0),e||{}),{staticQuestions:n0((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(Q1.Provider,{value:n,children:x.jsx(_P,{dispatch:r,children:t})})},oE=({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:S,entryType:k,initialEntry:_,entryMessage:C,disclaimerText:A,disclaimerMarkdown:H,clientContext:U,baseCatalogParams:L,searchPlaceholder:z,searchButtonLabel:Z,searchConfig:de,suggestionButtonConfig:q,messageAlignment:re,autoScroll:fe,promptsConfig:pe,resetConversationMessage:ee,conversationHistory:ie,onConnect:Ce,onCopilotEvent:ae,onRefinedSearch:J,onRefinedBrowse:se,locale:P,translations:M,translationOverrides:K,__features:I,children:ue})=>{const be=_==null?void 0:_.params,Ae=xP(P,M!==void 0),we=M!=null?M:Ae;return x.jsx(yP,{locale:P,translations:we,translationOverrides:K,children:x.jsx(ak,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:C,staticQuestions:n0(be==null?void 0:be.staticQuestions),staticQuestionsStrategy:be==null?void 0:be.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:z,searchButtonLabel:Z,searchConfig:de,suggestionButtonConfig:q,messageAlignment:re,autoScroll:fe,componentConfig:S,clientContext:U,baseCatalogParams:L,disclaimerMarkdown:H,disclaimerText:A,resetConversationMessage:ee,conversationHistory:ie,isDevelopment:y,__features:I,children:x.jsx(dP,{entryType:k!=null?k:_==null?void 0:_.type,componentConfig:S,componentType:w,children:x.jsx(yk,{onCopilotEvent:ae,children:x.jsx(lP,{children:x.jsx(rP,{children:x.jsx(sP,{children:x.jsx(vP,{promptsConfig:pe,children:x.jsx(gP,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:k,onConnect:Ce,onRefinedSearch:J,onRefinedBrowse:se,onCopilotEvent:ae,children:ue})})})})})})})})})};var Wf={exports:{}},Yn={},Gf={exports:{}},Xf={};var sE;function AP(){return sE||(sE=1,(function(e){function t(J,se){var P=J.length;J.push(se);e:for(;0<P;){var M=P-1>>>1,K=J[M];if(0<o(K,se))J[M]=se,J[P]=K,P=M;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],P=J.pop();if(P!==se){J[0]=P;e:for(var M=0,K=J.length,I=K>>>1;M<I;){var ue=2*(M+1)-1,be=J[ue],Ae=ue+1,we=J[Ae];if(0>o(be,P))Ae<K&&0>o(we,be)?(J[M]=we,J[Ae]=P,M=Ae):(J[M]=be,J[ue]=P,M=ue);else if(Ae<K&&0>o(we,P))J[M]=we,J[Ae]=P,M=Ae;else break e}}return se}function o(J,se){var P=J.sortIndex-se.sortIndex;return P!==0?P: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,S=!1,k=typeof setTimeout=="function"?setTimeout:null,_=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 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 H(J){if(S=!1,A(J),!w)if(n(d)!==null)w=!0,Ce(U);else{var se=n(f);se!==null&&ae(H,se.startTime-J)}}function U(J,se){w=!1,S&&(S=!1,_(Z),Z=-1),y=!0;var P=T;try{for(A(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!re());){var M=m.callback;if(typeof M=="function"){m.callback=null,T=m.priorityLevel;var K=M(m.expirationTime<=se);se=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),A(se)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var ue=n(f);ue!==null&&ae(H,ue.startTime-se),I=!1}return I}finally{m=null,T=P,y=!1}}var L=!1,z=null,Z=-1,de=5,q=-1;function re(){return!(e.unstable_now()-q<de)}function fe(){if(z!==null){var J=e.unstable_now();q=J;var se=!0;try{se=z(!0,J)}finally{se?pe():(L=!1,z=null)}}else L=!1}var pe;if(typeof C=="function")pe=function(){C(fe)};else if(typeof MessageChannel!="undefined"){var ee=new MessageChannel,ie=ee.port2;ee.port1.onmessage=fe,pe=function(){ie.postMessage(null)}}else pe=function(){k(fe,0)};function Ce(J){z=J,L||(L=!0,pe())}function ae(J,se){Z=k(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,Ce(U))},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 se=3;break;default:se=T}var P=T;T=se;try{return J()}finally{T=P}},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 P=T;T=J;try{return se()}finally{T=P}},e.unstable_scheduleCallback=function(J,se,P){var M=e.unstable_now();switch(typeof P=="object"&&P!==null?(P=P.delay,P=typeof P=="number"&&0<P?M+P:M):P=M,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=P+K,J={id:p++,callback:se,priorityLevel:J,startTime:P,expirationTime:K,sortIndex:-1},P>M?(J.sortIndex=P,t(f,J),n(d)===null&&J===n(f)&&(S?(_(Z),Z=-1):S=!0,ae(H,P-M))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ce(U))),J},e.unstable_shouldYield=re,e.unstable_wrapCallback=function(J){var se=T;return function(){var P=T;T=se;try{return J.apply(this,arguments)}finally{T=P}}}})(Xf)),Xf}var aE;function CP(){return aE||(aE=1,Gf.exports=AP()),Gf.exports}var uE;function kP(){if(uE)return Yn;uE=1;var e=xn(),t=CP();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 S(i,s,c,h,E,b,v){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=v}var k={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){k[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];k[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){k[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){k[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){k[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){k[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){k[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){k[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){k[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var _=/[\-:]([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(_,C);k[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(_,C);k[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(_,C);k[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),k.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){k[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,c,h){var E=k.hasOwnProperty(s)?k[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 H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,U=Symbol.for("react.element"),L=Symbol.for("react.portal"),z=Symbol.for("react.fragment"),Z=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),q=Symbol.for("react.provider"),re=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),pe=Symbol.for("react.suspense"),ee=Symbol.for("react.suspense_list"),ie=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),ae=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 P=Object.assign,M;function K(i){if(M===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);M=s&&s[1]||""}return`
11
+ `+M+i}var I=!1;function ue(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(te){var h=te}Reflect.construct(i,[],s)}else{try{s.call()}catch(te){h=te}i.call(s.prototype)}else{try{throw Error()}catch(te){h=te}i()}}catch(te){if(te&&h&&typeof te.stack=="string"){for(var E=te.stack.split(`
12
12
  `),b=h.stack.split(`
13
- `),S=E.length-1,D=b.length-1;1<=S&&0<=D&&E[S]!==b[D];)D--;for(;1<=S&&0<=D;S--,D--)if(E[S]!==b[D]){if(S!==1||D!==1)do if(S--,D--,0>D||E[S]!==b[D]){var $=`
14
- `+E[S].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=S&&0<=D);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function be(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=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function Ae(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 z:return"Fragment";case L:return"Portal";case he:return"Profiler";case ee:return"StrictMode";case ye:return"Suspense";case te:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case re:return(i.displayName||"Context")+".Consumer";case q:return(i._context.displayName||"Context")+".Provider";case de:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return s=i.displayName||null,s!==null?s:Ae(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Ae(i(s))}catch(c){}}return null}function we(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 Ae(s);case 8:return s===ee?"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 Re(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Fe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function at(i){var s=Fe(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 ln(i){i._valueTracker||(i._valueTracker=at(i))}function At(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Fe(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function Ht(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 Ot(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 ar(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Re(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 Fn(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Kt(i,s){Fn(i,s);var c=Re(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,Re(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function $e(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"||Ht(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Wt=Array.isArray;function It(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=""+Re(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 Bn(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ur(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(Wt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Re(c)}}function Qt(i,s){var c=Re(s.value),h=Re(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 qo(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ie(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ie(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ve,Ge=(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(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var Mt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Tr=["Webkit","ms","Moz","O"];Object.keys(Mt).forEach(function(i){Tr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Mt[s]=Mt[i]})});function mn(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||Mt.hasOwnProperty(i)&&Mt[i]?(""+s).trim():s+"px"}function Lr(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=mn(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var oi=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 Jt(i,s){if(s){if(oi[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 lr(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 Cn=null;function _e(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pe=null,Ne=null,Be=null;function Ct(i){if(i=Bu(i)){if(typeof Pe!="function")throw Error(n(280));var s=i.stateNode;s&&(s=nd(s),Pe(i.stateNode,i.type,s))}}function Rt(i){Ne?Be?Be.push(i):Be=[i]:Ne=i}function Un(){if(Ne){var i=Ne,s=Be;if(Be=Ne=null,Ct(i),s)for(i=0;i<s.length;i++)Ct(s[i])}}function kt(i,s){return i(s)}function kn(){}var ot=!1;function Pn(i,s,c){if(ot)return i(s,c);ot=!0;try{return kt(i,s,c)}finally{ot=!1,(Ne!==null||Be!==null)&&(kn(),Un())}}function gn(i,s){var c=i.stateNode;if(c===null)return null;var h=nd(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 Dr=!1;if(l)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Dr=!0}}),window.addEventListener("test",Qn,Qn),window.removeEventListener("test",Qn,Qn)}catch(i){Dr=!1}function Rc(i,s,c,h,E,b,S,D,$){var Z=Array.prototype.slice.call(arguments,3);try{s.apply(c,Z)}catch(fe){this.onError(fe)}}var bu=!1,Lc=null,Dc=!1,Wp=null,n7={onError:function(i){bu=!0,Lc=i}};function r7(i,s,c,h,E,b,S,D,$){bu=!1,Lc=null,Rc.apply(n7,arguments)}function i7(i,s,c,h,E,b,S,D,$){if(r7.apply(this,arguments),bu){if(bu){var Z=Lc;bu=!1,Lc=null}else throw Error(n(198));Dc||(Dc=!0,Wp=Z)}}function Yo(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 Ux(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 Hx(i){if(Yo(i)!==i)throw Error(n(188))}function o7(i){var s=i.alternate;if(!s){if(s=Yo(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 Hx(E),i;if(b===h)return Hx(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,D=E.child;D;){if(D===c){S=!0,c=E,h=b;break}if(D===h){S=!0,h=E,c=b;break}D=D.sibling}if(!S){for(D=b.child;D;){if(D===c){S=!0,c=b,h=E;break}if(D===h){S=!0,h=b,c=E;break}D=D.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 zx(i){return i=o7(i),i!==null?jx(i):null}function jx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=jx(i);if(s!==null)return s;i=i.sibling}return null}var $x=t.unstable_scheduleCallback,Vx=t.unstable_cancelCallback,s7=t.unstable_shouldYield,a7=t.unstable_requestPaint,zt=t.unstable_now,u7=t.unstable_getCurrentPriorityLevel,Gp=t.unstable_ImmediatePriority,qx=t.unstable_UserBlockingPriority,Mc=t.unstable_NormalPriority,l7=t.unstable_LowPriority,Yx=t.unstable_IdlePriority,Fc=null,si=null;function c7(i){if(si&&typeof si.onCommitFiberRoot=="function")try{si.onCommitFiberRoot(Fc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Mr=Math.clz32?Math.clz32:h7,d7=Math.log,f7=Math.LN2;function h7(i){return i>>>=0,i===0?32:31-(d7(i)/f7|0)|0}var Bc=64,Uc=4194304;function Tu(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 Hc(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 D=S&~E;D!==0?h=Tu(D):(b&=S,b!==0&&(h=Tu(b)))}else S=c&~E,S!==0?h=Tu(S):b!==0&&(h=Tu(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-Mr(s),E=1<<c,h|=i[c],s&=~E;return h}function p7(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 m7(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-Mr(b),D=1<<S,$=E[S];$===-1?((D&c)===0||(D&h)!==0)&&(E[S]=p7(D,s)):$<=s&&(i.expiredLanes|=D),b&=~D}}function Xp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Wx(){var i=Bc;return Bc<<=1,(Bc&4194240)===0&&(Bc=64),i}function Kp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function wu(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Mr(s),i[s]=c}function g7(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-Mr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function Qp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Mr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var ft=0;function Gx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Xx,Jp,Kx,Qx,Jx,Zp=!1,zc=[],Gi=null,Xi=null,Ki=null,xu=new Map,_u=new Map,Qi=[],E7="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 Zx(i,s){switch(i){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":xu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_u.delete(s.pointerId)}}function Su(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=Bu(s),s!==null&&Jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function y7(i,s,c,h,E){switch(s){case"focusin":return Gi=Su(Gi,i,s,c,h,E),!0;case"dragenter":return Xi=Su(Xi,i,s,c,h,E),!0;case"mouseover":return Ki=Su(Ki,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return xu.set(b,Su(xu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,_u.set(b,Su(_u.get(b)||null,i,s,c,h,E)),!0}return!1}function e_(i){var s=Wo(i.target);if(s!==null){var c=Yo(s);if(c!==null){if(s=c.tag,s===13){if(s=Ux(c),s!==null){i.blockedOn=s,Jx(i.priority,function(){Kx(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 jc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=tm(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Cn=h,c.target.dispatchEvent(h),Cn=null}else return s=Bu(c),s!==null&&Jp(s),i.blockedOn=c,!1;s.shift()}return!0}function t_(i,s,c){jc(i)&&c.delete(s)}function b7(){Zp=!1,Gi!==null&&jc(Gi)&&(Gi=null),Xi!==null&&jc(Xi)&&(Xi=null),Ki!==null&&jc(Ki)&&(Ki=null),xu.forEach(t_),_u.forEach(t_)}function vu(i,s){i.blockedOn===s&&(i.blockedOn=null,Zp||(Zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,b7)))}function Au(i){function s(E){return vu(E,i)}if(0<zc.length){vu(zc[0],i);for(var c=1;c<zc.length;c++){var h=zc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Gi!==null&&vu(Gi,i),Xi!==null&&vu(Xi,i),Ki!==null&&vu(Ki,i),xu.forEach(s),_u.forEach(s),c=0;c<Qi.length;c++)h=Qi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Qi.length&&(c=Qi[0],c.blockedOn===null);)e_(c),c.blockedOn===null&&Qi.shift()}var Vs=H.ReactCurrentBatchConfig,$c=!0;function T7(i,s,c,h){var E=ft,b=Vs.transition;Vs.transition=null;try{ft=1,em(i,s,c,h)}finally{ft=E,Vs.transition=b}}function w7(i,s,c,h){var E=ft,b=Vs.transition;Vs.transition=null;try{ft=4,em(i,s,c,h)}finally{ft=E,Vs.transition=b}}function em(i,s,c,h){if($c){var E=tm(i,s,c,h);if(E===null)ym(i,s,h,Vc,c),Zx(i,h);else if(y7(E,i,s,c,h))h.stopPropagation();else if(Zx(i,h),s&4&&-1<E7.indexOf(i)){for(;E!==null;){var b=Bu(E);if(b!==null&&Xx(b),b=tm(i,s,c,h),b===null&&ym(i,s,h,Vc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else ym(i,s,h,null,c)}}var Vc=null;function tm(i,s,c,h){if(Vc=null,i=_e(h),i=Wo(i),i!==null)if(s=Yo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Ux(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 Vc=i,null}function n_(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(u7()){case Gp:return 1;case qx:return 4;case Mc:case l7:return 16;case Yx:return 536870912;default:return 16}default:return 16}}var Ji=null,nm=null,qc=null;function r_(){if(qc)return qc;var i,s=nm,c=s.length,h,E="value"in Ji?Ji.value:Ji.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 qc=E.slice(i,1<h?1-h:void 0)}function Yc(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 Wc(){return!0}function i_(){return!1}function cr(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 D in i)i.hasOwnProperty(D)&&(c=i[D],this[D]=c?c(b):b[D]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wc:i_,this.isPropagationStopped=i_,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=Wc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),s}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rm=cr(qs),Cu=k({},qs,{view:0,detail:0}),x7=cr(Cu),im,om,ku,Gc=k({},Cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:am,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!==ku&&(ku&&i.type==="mousemove"?(im=i.screenX-ku.screenX,om=i.screenY-ku.screenY):om=im=0,ku=i),im)},movementY:function(i){return"movementY"in i?i.movementY:om}}),o_=cr(Gc),_7=k({},Gc,{dataTransfer:0}),S7=cr(_7),v7=k({},Cu,{relatedTarget:0}),sm=cr(v7),A7=k({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),C7=cr(A7),k7=k({},qs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),P7=cr(k7),N7=k({},qs,{data:0}),s_=cr(N7),O7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},I7={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"},R7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L7(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=R7[i])?!!s[i]:!1}function am(){return L7}var D7=k({},Cu,{key:function(i){if(i.key){var s=O7[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Yc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?I7[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:am,charCode:function(i){return i.type==="keypress"?Yc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),M7=cr(D7),F7=k({},Gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),a_=cr(F7),B7=k({},Cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:am}),U7=cr(B7),H7=k({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),z7=cr(H7),j7=k({},Gc,{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}),$7=cr(j7),V7=[9,13,27,32],um=l&&"CompositionEvent"in window,Pu=null;l&&"documentMode"in document&&(Pu=document.documentMode);var q7=l&&"TextEvent"in window&&!Pu,u_=l&&(!um||Pu&&8<Pu&&11>=Pu),l_=" ",c_=!1;function d_(i,s){switch(i){case"keyup":return V7.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ys=!1;function Y7(i,s){switch(i){case"compositionend":return f_(s);case"keypress":return s.which!==32?null:(c_=!0,l_);case"textInput":return i=s.data,i===l_&&c_?null:i;default:return null}}function W7(i,s){if(Ys)return i==="compositionend"||!um&&d_(i,s)?(i=r_(),qc=nm=Ji=null,Ys=!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 u_&&s.locale!=="ko"?null:s.data;default:return null}}var G7={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 h_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!G7[i.type]:s==="textarea"}function p_(i,s,c,h){Rt(h),s=Zc(s,"onChange"),0<s.length&&(c=new rm("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Nu=null,Ou=null;function X7(i){I_(i,0)}function Xc(i){var s=Qs(i);if(At(s))return i}function K7(i,s){if(i==="change")return s}var m_=!1;if(l){var lm;if(l){var cm="oninput"in document;if(!cm){var g_=document.createElement("div");g_.setAttribute("oninput","return;"),cm=typeof g_.oninput=="function"}lm=cm}else lm=!1;m_=lm&&(!document.documentMode||9<document.documentMode)}function E_(){Nu&&(Nu.detachEvent("onpropertychange",y_),Ou=Nu=null)}function y_(i){if(i.propertyName==="value"&&Xc(Ou)){var s=[];p_(s,Ou,i,_e(i)),Pn(X7,s)}}function Q7(i,s,c){i==="focusin"?(E_(),Nu=s,Ou=c,Nu.attachEvent("onpropertychange",y_)):i==="focusout"&&E_()}function J7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Xc(Ou)}function Z7(i,s){if(i==="click")return Xc(s)}function eU(i,s){if(i==="input"||i==="change")return Xc(s)}function tU(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Fr=typeof Object.is=="function"?Object.is:tU;function Iu(i,s){if(Fr(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)||!Fr(i[E],s[E]))return!1}return!0}function b_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function T_(i,s){var c=b_(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=b_(c)}}function w_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?w_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function x_(){for(var i=window,s=Ht();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=Ht(i.document)}return s}function dm(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 nU(i){var s=x_(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&w_(c.ownerDocument.documentElement,c)){if(h!==null&&dm(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=T_(c,b);var S=T_(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 rU=l&&"documentMode"in document&&11>=document.documentMode,Ws=null,fm=null,Ru=null,hm=!1;function __(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;hm||Ws==null||Ws!==Ht(h)||(h=Ws,"selectionStart"in h&&dm(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}),Ru&&Iu(Ru,h)||(Ru=h,h=Zc(fm,"onSelect"),0<h.length&&(s=new rm("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ws)))}function Kc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Gs={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},pm={},S_={};l&&(S_=document.createElement("div").style,"AnimationEvent"in window||(delete Gs.animationend.animation,delete Gs.animationiteration.animation,delete Gs.animationstart.animation),"TransitionEvent"in window||delete Gs.transitionend.transition);function Qc(i){if(pm[i])return pm[i];if(!Gs[i])return i;var s=Gs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in S_)return pm[i]=s[c];return i}var v_=Qc("animationend"),A_=Qc("animationiteration"),C_=Qc("animationstart"),k_=Qc("transitionend"),P_=new Map,N_="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 Zi(i,s){P_.set(i,s),a(s,[i])}for(var mm=0;mm<N_.length;mm++){var gm=N_[mm],iU=gm.toLowerCase(),oU=gm[0].toUpperCase()+gm.slice(1);Zi(iU,"on"+oU)}Zi(v_,"onAnimationEnd"),Zi(A_,"onAnimationIteration"),Zi(C_,"onAnimationStart"),Zi("dblclick","onDoubleClick"),Zi("focusin","onFocus"),Zi("focusout","onBlur"),Zi(k_,"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 Lu="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(" "),sU=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lu));function O_(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,i7(h,s,void 0,i),i.currentTarget=null}function I_(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 D=h[S],$=D.instance,Z=D.currentTarget;if(D=D.listener,$!==b&&E.isPropagationStopped())break e;O_(E,D,Z),b=$}else for(S=0;S<h.length;S++){if(D=h[S],$=D.instance,Z=D.currentTarget,D=D.listener,$!==b&&E.isPropagationStopped())break e;O_(E,D,Z),b=$}}}if(Dc)throw i=Wp,Dc=!1,Wp=null,i}function xt(i,s){var c=s[Sm];c===void 0&&(c=s[Sm]=new Set);var h=i+"__bubble";c.has(h)||(R_(s,i,2,!1),c.add(h))}function Em(i,s,c){var h=0;s&&(h|=4),R_(c,i,h,s)}var Jc="_reactListening"+Math.random().toString(36).slice(2);function Du(i){if(!i[Jc]){i[Jc]=!0,r.forEach(function(c){c!=="selectionchange"&&(sU.has(c)||Em(c,!1,i),Em(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Jc]||(s[Jc]=!0,Em("selectionchange",!1,s))}}function R_(i,s,c,h){switch(n_(s)){case 1:var E=T7;break;case 4:E=w7;break;default:E=em}c=E.bind(null,s,c,i),E=void 0,!Dr||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 ym(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 D=h.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var $=S.tag;if(($===3||$===4)&&($=S.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;S=S.return}for(;D!==null;){if(S=Wo(D),S===null)return;if($=S.tag,$===5||$===6){h=b=S;continue e}D=D.parentNode}}h=h.return}Pn(function(){var Z=b,fe=_e(c),me=[];e:{var le=P_.get(i);if(le!==void 0){var ke=rm,Ie=i;switch(i){case"keypress":if(Yc(c)===0)break e;case"keydown":case"keyup":ke=M7;break;case"focusin":Ie="focus",ke=sm;break;case"focusout":Ie="blur",ke=sm;break;case"beforeblur":case"afterblur":ke=sm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=S7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=U7;break;case v_:case A_:case C_:ke=C7;break;case k_:ke=z7;break;case"scroll":ke=x7;break;case"wheel":ke=$7;break;case"copy":case"cut":case"paste":ke=P7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=a_}var Le=(s&4)!==0,jt=!Le&&i==="scroll",G=Le?le!==null?le+"Capture":null:le;Le=[];for(var Y=Z,Q;Y!==null;){Q=Y;var Te=Q.stateNode;if(Q.tag===5&&Te!==null&&(Q=Te,G!==null&&(Te=gn(Y,G),Te!=null&&Le.push(Mu(Y,Te,Q)))),jt)break;Y=Y.return}0<Le.length&&(le=new ke(le,Ie,null,c,fe),me.push({event:le,listeners:Le}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",le&&c!==Cn&&(Ie=c.relatedTarget||c.fromElement)&&(Wo(Ie)||Ie[vi]))break e;if((ke||le)&&(le=fe.window===fe?fe:(le=fe.ownerDocument)?le.defaultView||le.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=Z,Ie=Ie?Wo(Ie):null,Ie!==null&&(jt=Yo(Ie),Ie!==jt||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=Z),ke!==Ie)){if(Le=o_,Te="onMouseLeave",G="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Le=a_,Te="onPointerLeave",G="onPointerEnter",Y="pointer"),jt=ke==null?le:Qs(ke),Q=Ie==null?le:Qs(Ie),le=new Le(Te,Y+"leave",ke,c,fe),le.target=jt,le.relatedTarget=Q,Te=null,Wo(fe)===Z&&(Le=new Le(G,Y+"enter",Ie,c,fe),Le.target=Q,Le.relatedTarget=jt,Te=Le),jt=Te,ke&&Ie)t:{for(Le=ke,G=Ie,Y=0,Q=Le;Q;Q=Xs(Q))Y++;for(Q=0,Te=G;Te;Te=Xs(Te))Q++;for(;0<Y-Q;)Le=Xs(Le),Y--;for(;0<Q-Y;)G=Xs(G),Q--;for(;Y--;){if(Le===G||G!==null&&Le===G.alternate)break t;Le=Xs(Le),G=Xs(G)}Le=null}else Le=null;ke!==null&&L_(me,le,ke,Le,!1),Ie!==null&&jt!==null&&L_(me,jt,Ie,Le,!0)}}e:{if(le=Z?Qs(Z):window,ke=le.nodeName&&le.nodeName.toLowerCase(),ke==="select"||ke==="input"&&le.type==="file")var Me=K7;else if(h_(le))if(m_)Me=eU;else{Me=J7;var ze=Q7}else(ke=le.nodeName)&&ke.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Me=Z7);if(Me&&(Me=Me(i,Z))){p_(me,Me,c,fe);break e}ze&&ze(i,le,Z),i==="focusout"&&(ze=le._wrapperState)&&ze.controlled&&le.type==="number"&&bt(le,"number",le.value)}switch(ze=Z?Qs(Z):window,i){case"focusin":(h_(ze)||ze.contentEditable==="true")&&(Ws=ze,fm=Z,Ru=null);break;case"focusout":Ru=fm=Ws=null;break;case"mousedown":hm=!0;break;case"contextmenu":case"mouseup":case"dragend":hm=!1,__(me,c,fe);break;case"selectionchange":if(rU)break;case"keydown":case"keyup":__(me,c,fe)}var je;if(um)e:{switch(i){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Ys?d_(i,c)&&(Ye="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ye="onCompositionStart");Ye&&(u_&&c.locale!=="ko"&&(Ys||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ys&&(je=r_()):(Ji=fe,nm="value"in Ji?Ji.value:Ji.textContent,Ys=!0)),ze=Zc(Z,Ye),0<ze.length&&(Ye=new s_(Ye,i,null,c,fe),me.push({event:Ye,listeners:ze}),je?Ye.data=je:(je=f_(c),je!==null&&(Ye.data=je)))),(je=q7?Y7(i,c):W7(i,c))&&(Z=Zc(Z,"onBeforeInput"),0<Z.length&&(fe=new s_("onBeforeInput","beforeinput",null,c,fe),me.push({event:fe,listeners:Z}),fe.data=je))}I_(me,s)})}function Mu(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=gn(i,c),b!=null&&h.unshift(Mu(i,b,E)),b=gn(i,s),b!=null&&h.push(Mu(i,b,E))),i=i.return}return h}function Xs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function L_(i,s,c,h,E){for(var b=s._reactName,S=[];c!==null&&c!==h;){var D=c,$=D.alternate,Z=D.stateNode;if($!==null&&$===h)break;D.tag===5&&Z!==null&&(D=Z,E?($=gn(c,b),$!=null&&S.unshift(Mu(c,$,D))):E||($=gn(c,b),$!=null&&S.push(Mu(c,$,D)))),c=c.return}S.length!==0&&i.push({event:s,listeners:S})}var aU=/\r\n?/g,uU=/\u0000|\uFFFD/g;function D_(i){return(typeof i=="string"?i:""+i).replace(aU,`
15
- `).replace(uU,"")}function ed(i,s,c){if(s=D_(s),D_(i)!==s&&c)throw Error(n(425))}function td(){}var bm=null,Tm=null;function wm(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 xm=typeof setTimeout=="function"?setTimeout:void 0,lU=typeof clearTimeout=="function"?clearTimeout:void 0,M_=typeof Promise=="function"?Promise:void 0,cU=typeof queueMicrotask=="function"?queueMicrotask:typeof M_!="undefined"?function(i){return M_.resolve(null).then(i).catch(dU)}:xm;function dU(i){setTimeout(function(){throw i})}function _m(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),Au(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);Au(s)}function eo(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 F_(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 Ks=Math.random().toString(36).slice(2),ai="__reactFiber$"+Ks,Fu="__reactProps$"+Ks,vi="__reactContainer$"+Ks,Sm="__reactEvents$"+Ks,fU="__reactListeners$"+Ks,hU="__reactHandles$"+Ks;function Wo(i){var s=i[ai];if(s)return s;for(var c=i.parentNode;c;){if(s=c[vi]||c[ai]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=F_(i);i!==null;){if(c=i[ai])return c;i=F_(i)}return s}i=c,c=i.parentNode}return null}function Bu(i){return i=i[ai]||i[vi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Qs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function nd(i){return i[Fu]||null}var vm=[],Js=-1;function to(i){return{current:i}}function _t(i){0>Js||(i.current=vm[Js],vm[Js]=null,Js--)}function Tt(i,s){Js++,vm[Js]=i.current,i.current=s}var no={},Nn=to(no),Jn=to(!1),Go=no;function Zs(i,s){var c=i.type.contextTypes;if(!c)return no;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 Zn(i){return i=i.childContextTypes,i!=null}function rd(){_t(Jn),_t(Nn)}function B_(i,s,c){if(Nn.current!==no)throw Error(n(168));Tt(Nn,s),Tt(Jn,c)}function U_(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,we(i)||"Unknown",E));return k({},c,h)}function id(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||no,Go=Nn.current,Tt(Nn,i),Tt(Jn,Jn.current),!0}function H_(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=U_(i,s,Go),h.__reactInternalMemoizedMergedChildContext=i,_t(Jn),_t(Nn),Tt(Nn,i)):_t(Jn),Tt(Jn,c)}var Ai=null,od=!1,Am=!1;function z_(i){Ai===null?Ai=[i]:Ai.push(i)}function pU(i){od=!0,z_(i)}function ro(){if(!Am&&Ai!==null){Am=!0;var i=0,s=ft;try{var c=Ai;for(ft=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Ai=null,od=!1}catch(E){throw Ai!==null&&(Ai=Ai.slice(i+1)),$x(Gp,ro),E}finally{ft=s,Am=!1}}return null}var ea=[],ta=0,sd=null,ad=0,wr=[],xr=0,Xo=null,Ci=1,ki="";function Ko(i,s){ea[ta++]=ad,ea[ta++]=sd,sd=i,ad=s}function j_(i,s,c){wr[xr++]=Ci,wr[xr++]=ki,wr[xr++]=Xo,Xo=i;var h=Ci;i=ki;var E=32-Mr(h)-1;h&=~(1<<E),c+=1;var b=32-Mr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Ci=1<<32-Mr(s)+E|c<<E|h,ki=b+i}else Ci=1<<b|c<<E|h,ki=i}function Cm(i){i.return!==null&&(Ko(i,1),j_(i,1,0))}function km(i){for(;i===sd;)sd=ea[--ta],ea[ta]=null,ad=ea[--ta],ea[ta]=null;for(;i===Xo;)Xo=wr[--xr],wr[xr]=null,ki=wr[--xr],wr[xr]=null,Ci=wr[--xr],wr[xr]=null}var dr=null,fr=null,Pt=!1,Br=null;function $_(i,s){var c=Ar(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 V_(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,dr=i,fr=eo(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,dr=i,fr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Xo!==null?{id:Ci,overflow:ki}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=Ar(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,dr=i,fr=null,!0):!1;default:return!1}}function Pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Nm(i){if(Pt){var s=fr;if(s){var c=s;if(!V_(i,s)){if(Pm(i))throw Error(n(418));s=eo(c.nextSibling);var h=dr;s&&V_(i,s)?$_(h,c):(i.flags=i.flags&-4097|2,Pt=!1,dr=i)}}else{if(Pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Pt=!1,dr=i}}}function q_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;dr=i}function ud(i){if(i!==dr)return!1;if(!Pt)return q_(i),Pt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!wm(i.type,i.memoizedProps)),s&&(s=fr)){if(Pm(i))throw Y_(),Error(n(418));for(;s;)$_(i,s),s=eo(s.nextSibling)}if(q_(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){fr=eo(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}fr=null}}else fr=dr?eo(i.stateNode.nextSibling):null;return!0}function Y_(){for(var i=fr;i;)i=eo(i.nextSibling)}function na(){fr=dr=null,Pt=!1}function Om(i){Br===null?Br=[i]:Br.push(i)}var mU=H.ReactCurrentBatchConfig;function Uu(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 D=E.refs;S===null?delete D[b]:D[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 ld(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function W_(i){var s=i._init;return s(i._payload)}function G_(i){function s(G,Y){if(i){var Q=G.deletions;Q===null?(G.deletions=[Y],G.flags|=16):Q.push(Y)}}function c(G,Y){if(!i)return null;for(;Y!==null;)s(G,Y),Y=Y.sibling;return null}function h(G,Y){for(G=new Map;Y!==null;)Y.key!==null?G.set(Y.key,Y):G.set(Y.index,Y),Y=Y.sibling;return G}function E(G,Y){return G=fo(G,Y),G.index=0,G.sibling=null,G}function b(G,Y,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<Y?(G.flags|=2,Y):Q):(G.flags|=2,Y)):(G.flags|=1048576,Y)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function D(G,Y,Q,Te){return Y===null||Y.tag!==6?(Y=xg(Q,G.mode,Te),Y.return=G,Y):(Y=E(Y,Q),Y.return=G,Y)}function $(G,Y,Q,Te){var Me=Q.type;return Me===z?fe(G,Y,Q.props.children,Te,Q.key):Y!==null&&(Y.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ce&&W_(Me)===Y.type)?(Te=E(Y,Q.props),Te.ref=Uu(G,Y,Q),Te.return=G,Te):(Te=Rd(Q.type,Q.key,Q.props,null,G.mode,Te),Te.ref=Uu(G,Y,Q),Te.return=G,Te)}function Z(G,Y,Q,Te){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=_g(Q,G.mode,Te),Y.return=G,Y):(Y=E(Y,Q.children||[]),Y.return=G,Y)}function fe(G,Y,Q,Te,Me){return Y===null||Y.tag!==7?(Y=is(Q,G.mode,Te,Me),Y.return=G,Y):(Y=E(Y,Q),Y.return=G,Y)}function me(G,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=xg(""+Y,G.mode,Q),Y.return=G,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case U:return Q=Rd(Y.type,Y.key,Y.props,null,G.mode,Q),Q.ref=Uu(G,null,Y),Q.return=G,Q;case L:return Y=_g(Y,G.mode,Q),Y.return=G,Y;case Ce:var Te=Y._init;return me(G,Te(Y._payload),Q)}if(Wt(Y)||se(Y))return Y=is(Y,G.mode,Q,null),Y.return=G,Y;ld(G,Y)}return null}function le(G,Y,Q,Te){var Me=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Me!==null?null:D(G,Y,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case U:return Q.key===Me?$(G,Y,Q,Te):null;case L:return Q.key===Me?Z(G,Y,Q,Te):null;case Ce:return Me=Q._init,le(G,Y,Me(Q._payload),Te)}if(Wt(Q)||se(Q))return Me!==null?null:fe(G,Y,Q,Te,null);ld(G,Q)}return null}function ke(G,Y,Q,Te,Me){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return G=G.get(Q)||null,D(Y,G,""+Te,Me);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case U:return G=G.get(Te.key===null?Q:Te.key)||null,$(Y,G,Te,Me);case L:return G=G.get(Te.key===null?Q:Te.key)||null,Z(Y,G,Te,Me);case Ce:var ze=Te._init;return ke(G,Y,Q,ze(Te._payload),Me)}if(Wt(Te)||se(Te))return G=G.get(Q)||null,fe(Y,G,Te,Me,null);ld(Y,Te)}return null}function Ie(G,Y,Q,Te){for(var Me=null,ze=null,je=Y,Ye=Y=0,fn=null;je!==null&&Ye<Q.length;Ye++){je.index>Ye?(fn=je,je=null):fn=je.sibling;var ut=le(G,je,Q[Ye],Te);if(ut===null){je===null&&(je=fn);break}i&&je&&ut.alternate===null&&s(G,je),Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut,je=fn}if(Ye===Q.length)return c(G,je),Pt&&Ko(G,Ye),Me;if(je===null){for(;Ye<Q.length;Ye++)je=me(G,Q[Ye],Te),je!==null&&(Y=b(je,Y,Ye),ze===null?Me=je:ze.sibling=je,ze=je);return Pt&&Ko(G,Ye),Me}for(je=h(G,je);Ye<Q.length;Ye++)fn=ke(je,G,Ye,Q[Ye],Te),fn!==null&&(i&&fn.alternate!==null&&je.delete(fn.key===null?Ye:fn.key),Y=b(fn,Y,Ye),ze===null?Me=fn:ze.sibling=fn,ze=fn);return i&&je.forEach(function(ho){return s(G,ho)}),Pt&&Ko(G,Ye),Me}function Le(G,Y,Q,Te){var Me=se(Q);if(typeof Me!="function")throw Error(n(150));if(Q=Me.call(Q),Q==null)throw Error(n(151));for(var ze=Me=null,je=Y,Ye=Y=0,fn=null,ut=Q.next();je!==null&&!ut.done;Ye++,ut=Q.next()){je.index>Ye?(fn=je,je=null):fn=je.sibling;var ho=le(G,je,ut.value,Te);if(ho===null){je===null&&(je=fn);break}i&&je&&ho.alternate===null&&s(G,je),Y=b(ho,Y,Ye),ze===null?Me=ho:ze.sibling=ho,ze=ho,je=fn}if(ut.done)return c(G,je),Pt&&Ko(G,Ye),Me;if(je===null){for(;!ut.done;Ye++,ut=Q.next())ut=me(G,ut.value,Te),ut!==null&&(Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut);return Pt&&Ko(G,Ye),Me}for(je=h(G,je);!ut.done;Ye++,ut=Q.next())ut=ke(je,G,Ye,ut.value,Te),ut!==null&&(i&&ut.alternate!==null&&je.delete(ut.key===null?Ye:ut.key),Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut);return i&&je.forEach(function(GU){return s(G,GU)}),Pt&&Ko(G,Ye),Me}function jt(G,Y,Q,Te){if(typeof Q=="object"&&Q!==null&&Q.type===z&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case U:e:{for(var Me=Q.key,ze=Y;ze!==null;){if(ze.key===Me){if(Me=Q.type,Me===z){if(ze.tag===7){c(G,ze.sibling),Y=E(ze,Q.props.children),Y.return=G,G=Y;break e}}else if(ze.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ce&&W_(Me)===ze.type){c(G,ze.sibling),Y=E(ze,Q.props),Y.ref=Uu(G,ze,Q),Y.return=G,G=Y;break e}c(G,ze);break}else s(G,ze);ze=ze.sibling}Q.type===z?(Y=is(Q.props.children,G.mode,Te,Q.key),Y.return=G,G=Y):(Te=Rd(Q.type,Q.key,Q.props,null,G.mode,Te),Te.ref=Uu(G,Y,Q),Te.return=G,G=Te)}return S(G);case L:e:{for(ze=Q.key;Y!==null;){if(Y.key===ze)if(Y.tag===4&&Y.stateNode.containerInfo===Q.containerInfo&&Y.stateNode.implementation===Q.implementation){c(G,Y.sibling),Y=E(Y,Q.children||[]),Y.return=G,G=Y;break e}else{c(G,Y);break}else s(G,Y);Y=Y.sibling}Y=_g(Q,G.mode,Te),Y.return=G,G=Y}return S(G);case Ce:return ze=Q._init,jt(G,Y,ze(Q._payload),Te)}if(Wt(Q))return Ie(G,Y,Q,Te);if(se(Q))return Le(G,Y,Q,Te);ld(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,Y!==null&&Y.tag===6?(c(G,Y.sibling),Y=E(Y,Q),Y.return=G,G=Y):(c(G,Y),Y=xg(Q,G.mode,Te),Y.return=G,G=Y),S(G)):c(G,Y)}return jt}var ra=G_(!0),X_=G_(!1),cd=to(null),dd=null,ia=null,Im=null;function Rm(){Im=ia=dd=null}function Lm(i){var s=cd.current;_t(cd),i._currentValue=s}function Dm(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 oa(i,s){dd=i,Im=ia=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(er=!0),i.firstContext=null)}function _r(i){var s=i._currentValue;if(Im!==i)if(i={context:i,memoizedValue:s,next:null},ia===null){if(dd===null)throw Error(n(308));ia=i,dd.dependencies={lanes:0,firstContext:i}}else ia=ia.next=i;return s}var Qo=null;function Mm(i){Qo===null?Qo=[i]:Qo.push(i)}function K_(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,Mm(s)):(c.next=E.next,E.next=c),s.interleaved=c,Pi(i,h)}function Pi(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 io=!1;function Fm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Q_(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 Ni(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function oo(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(st&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,Pi(i,c)}return E=h.interleaved,E===null?(s.next=s,Mm(h)):(s.next=E.next,E.next=s),h.interleaved=s,Pi(i,c)}function fd(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,Qp(i,c)}}function J_(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 hd(i,s,c,h){var E=i.updateQueue;io=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var $=D,Z=$.next;$.next=null,S===null?b=Z:S.next=Z,S=$;var fe=i.alternate;fe!==null&&(fe=fe.updateQueue,D=fe.lastBaseUpdate,D!==S&&(D===null?fe.firstBaseUpdate=Z:D.next=Z,fe.lastBaseUpdate=$))}if(b!==null){var me=E.baseState;S=0,fe=Z=$=null,D=b;do{var le=D.lane,ke=D.eventTime;if((h&le)===le){fe!==null&&(fe=fe.next={eventTime:ke,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ie=i,Le=D;switch(le=s,ke=c,Le.tag){case 1:if(Ie=Le.payload,typeof Ie=="function"){me=Ie.call(ke,me,le);break e}me=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Le.payload,le=typeof Ie=="function"?Ie.call(ke,me,le):Ie,le==null)break e;me=k({},me,le);break e;case 2:io=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[D]:le.push(D))}else ke={eventTime:ke,lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},fe===null?(Z=fe=ke,$=me):fe=fe.next=ke,S|=le;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;le=D,D=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(fe===null&&($=me),E.baseState=$,E.firstBaseUpdate=Z,E.lastBaseUpdate=fe,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);es|=S,i.lanes=S,i.memoizedState=me}}function Z_(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 Hu={},ui=to(Hu),zu=to(Hu),ju=to(Hu);function Jo(i){if(i===Hu)throw Error(n(174));return i}function Bm(i,s){switch(Tt(ju,s),Tt(zu,i),Tt(ui,Hu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:xe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=xe(s,i)}_t(ui),Tt(ui,s)}function sa(){_t(ui),_t(zu),_t(ju)}function e2(i){Jo(ju.current);var s=Jo(ui.current),c=xe(s,i.type);s!==c&&(Tt(zu,i),Tt(ui,c))}function Um(i){zu.current===i&&(_t(ui),_t(zu))}var Lt=to(0);function pd(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 Hm=[];function zm(){for(var i=0;i<Hm.length;i++)Hm[i]._workInProgressVersionPrimary=null;Hm.length=0}var md=H.ReactCurrentDispatcher,jm=H.ReactCurrentBatchConfig,Zo=0,Dt=null,Zt=null,cn=null,gd=!1,$u=!1,Vu=0,gU=0;function On(){throw Error(n(321))}function $m(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Fr(i[c],s[c]))return!1;return!0}function Vm(i,s,c,h,E,b){if(Zo=b,Dt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,md.current=i===null||i.memoizedState===null?TU:wU,i=c(h,E),$u){b=0;do{if($u=!1,Vu=0,25<=b)throw Error(n(301));b+=1,cn=Zt=null,s.updateQueue=null,md.current=xU,i=c(h,E)}while($u)}if(md.current=bd,s=Zt!==null&&Zt.next!==null,Zo=0,cn=Zt=Dt=null,gd=!1,s)throw Error(n(300));return i}function qm(){var i=Vu!==0;return Vu=0,i}function li(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return cn===null?Dt.memoizedState=cn=i:cn=cn.next=i,cn}function Sr(){if(Zt===null){var i=Dt.alternate;i=i!==null?i.memoizedState:null}else i=Zt.next;var s=cn===null?Dt.memoizedState:cn.next;if(s!==null)cn=s,Zt=i;else{if(i===null)throw Error(n(310));Zt=i,i={memoizedState:Zt.memoizedState,baseState:Zt.baseState,baseQueue:Zt.baseQueue,queue:Zt.queue,next:null},cn===null?Dt.memoizedState=cn=i:cn=cn.next=i}return cn}function qu(i,s){return typeof s=="function"?s(i):s}function Ym(i){var s=Sr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Zt,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 D=S=null,$=null,Z=b;do{var fe=Z.lane;if((Zo&fe)===fe)$!==null&&($=$.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var me={lane:fe,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};$===null?(D=$=me,S=h):$=$.next=me,Dt.lanes|=fe,es|=fe}Z=Z.next}while(Z!==null&&Z!==b);$===null?S=h:$.next=D,Fr(h,s.memoizedState)||(er=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Dt.lanes|=b,es|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Wm(i){var s=Sr(),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);Fr(b,s.memoizedState)||(er=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function t2(){}function n2(i,s){var c=Dt,h=Sr(),E=s(),b=!Fr(h.memoizedState,E);if(b&&(h.memoizedState=E,er=!0),h=h.queue,Gm(o2.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||cn!==null&&cn.memoizedState.tag&1){if(c.flags|=2048,Yu(9,i2.bind(null,c,h,E,s),void 0,null),dn===null)throw Error(n(349));(Zo&30)!==0||r2(c,s,E)}return E}function r2(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Dt.updateQueue,s===null?(s={lastEffect:null,stores:null},Dt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function i2(i,s,c,h){s.value=c,s.getSnapshot=h,s2(s)&&a2(i)}function o2(i,s,c){return c(function(){s2(s)&&a2(i)})}function s2(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Fr(i,c)}catch(h){return!0}}function a2(i){var s=Pi(i,1);s!==null&&jr(s,i,1,-1)}function u2(i){var s=li();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qu,lastRenderedState:i},s.queue=i,i=i.dispatch=bU.bind(null,Dt,i),[s.memoizedState,i]}function Yu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=Dt.updateQueue,s===null?(s={lastEffect:null,stores:null},Dt.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 l2(){return Sr().memoizedState}function Ed(i,s,c,h){var E=li();Dt.flags|=i,E.memoizedState=Yu(1|s,c,void 0,h===void 0?null:h)}function yd(i,s,c,h){var E=Sr();h=h===void 0?null:h;var b=void 0;if(Zt!==null){var S=Zt.memoizedState;if(b=S.destroy,h!==null&&$m(h,S.deps)){E.memoizedState=Yu(s,c,b,h);return}}Dt.flags|=i,E.memoizedState=Yu(1|s,c,b,h)}function c2(i,s){return Ed(8390656,8,i,s)}function Gm(i,s){return yd(2048,8,i,s)}function d2(i,s){return yd(4,2,i,s)}function f2(i,s){return yd(4,4,i,s)}function h2(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 p2(i,s,c){return c=c!=null?c.concat([i]):null,yd(4,4,h2.bind(null,s,i),c)}function Xm(){}function m2(i,s){var c=Sr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&$m(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function g2(i,s){var c=Sr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&$m(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function E2(i,s,c){return(Zo&21)===0?(i.baseState&&(i.baseState=!1,er=!0),i.memoizedState=c):(Fr(c,s)||(c=Wx(),Dt.lanes|=c,es|=c,i.baseState=!0),s)}function EU(i,s){var c=ft;ft=c!==0&&4>c?c:4,i(!0);var h=jm.transition;jm.transition={};try{i(!1),s()}finally{ft=c,jm.transition=h}}function y2(){return Sr().memoizedState}function yU(i,s,c){var h=lo(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},b2(i))T2(s,c);else if(c=K_(i,s,c,h),c!==null){var E=zn();jr(c,i,h,E),w2(c,s,h)}}function bU(i,s,c){var h=lo(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(b2(i))T2(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,D=b(S,c);if(E.hasEagerState=!0,E.eagerState=D,Fr(D,S)){var $=s.interleaved;$===null?(E.next=E,Mm(s)):(E.next=$.next,$.next=E),s.interleaved=E;return}}catch(Z){}c=K_(i,s,E,h),c!==null&&(E=zn(),jr(c,i,h,E),w2(c,s,h))}}function b2(i){var s=i.alternate;return i===Dt||s!==null&&s===Dt}function T2(i,s){$u=gd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function w2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Qp(i,c)}}var bd={readContext:_r,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},TU={readContext:_r,useCallback:function(i,s){return li().memoizedState=[i,s===void 0?null:s],i},useContext:_r,useEffect:c2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,Ed(4194308,4,h2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Ed(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ed(4,2,i,s)},useMemo:function(i,s){var c=li();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=li();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=yU.bind(null,Dt,i),[h.memoizedState,i]},useRef:function(i){var s=li();return i={current:i},s.memoizedState=i},useState:u2,useDebugValue:Xm,useDeferredValue:function(i){return li().memoizedState=i},useTransition:function(){var i=u2(!1),s=i[0];return i=EU.bind(null,i[1]),li().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=Dt,E=li();if(Pt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),dn===null)throw Error(n(349));(Zo&30)!==0||r2(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,c2(o2.bind(null,h,b,i),[i]),h.flags|=2048,Yu(9,i2.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=li(),s=dn.identifierPrefix;if(Pt){var c=ki,h=Ci;c=(h&~(1<<32-Mr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Vu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=gU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},wU={readContext:_r,useCallback:m2,useContext:_r,useEffect:Gm,useImperativeHandle:p2,useInsertionEffect:d2,useLayoutEffect:f2,useMemo:g2,useReducer:Ym,useRef:l2,useState:function(){return Ym(qu)},useDebugValue:Xm,useDeferredValue:function(i){var s=Sr();return E2(s,Zt.memoizedState,i)},useTransition:function(){var i=Ym(qu)[0],s=Sr().memoizedState;return[i,s]},useMutableSource:t2,useSyncExternalStore:n2,useId:y2,unstable_isNewReconciler:!1},xU={readContext:_r,useCallback:m2,useContext:_r,useEffect:Gm,useImperativeHandle:p2,useInsertionEffect:d2,useLayoutEffect:f2,useMemo:g2,useReducer:Wm,useRef:l2,useState:function(){return Wm(qu)},useDebugValue:Xm,useDeferredValue:function(i){var s=Sr();return Zt===null?s.memoizedState=i:E2(s,Zt.memoizedState,i)},useTransition:function(){var i=Wm(qu)[0],s=Sr().memoizedState;return[i,s]},useMutableSource:t2,useSyncExternalStore:n2,useId:y2,unstable_isNewReconciler:!1};function Ur(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 Km(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 Td={isMounted:function(i){return(i=i._reactInternals)?Yo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=zn(),E=lo(i),b=Ni(h,E);b.payload=s,c!=null&&(b.callback=c),s=oo(i,b,E),s!==null&&(jr(s,i,E,h),fd(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=zn(),E=lo(i),b=Ni(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=oo(i,b,E),s!==null&&(jr(s,i,E,h),fd(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=zn(),h=lo(i),E=Ni(c,h);E.tag=2,s!=null&&(E.callback=s),s=oo(i,E,h),s!==null&&(jr(s,i,h,c),fd(s,i,h))}};function x2(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?!Iu(c,h)||!Iu(E,b):!0}function _2(i,s,c){var h=!1,E=no,b=s.contextType;return typeof b=="object"&&b!==null?b=_r(b):(E=Zn(s)?Go:Nn.current,h=s.contextTypes,b=(h=h!=null)?Zs(i,E):no),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Td,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function S2(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&&Td.enqueueReplaceState(s,s.state,null)}function Qm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Fm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=_r(b):(b=Zn(s)?Go:Nn.current,E.context=Zs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Km(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&&Td.enqueueReplaceState(E,E.state,null),hd(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function aa(i,s){try{var c="",h=s;do c+=be(h),h=h.return;while(h);var E=c}catch(b){E=`
13
+ `),v=E.length-1,D=b.length-1;1<=v&&0<=D&&E[v]!==b[D];)D--;for(;1<=v&&0<=D;v--,D--)if(E[v]!==b[D]){if(v!==1||D!==1)do if(v--,D--,0>D||E[v]!==b[D]){var $=`
14
+ `+E[v].replace(" at new "," at ");return i.displayName&&$.includes("<anonymous>")&&($=$.replace("<anonymous>",i.displayName)),$}while(1<=v&&0<=D);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function be(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=ue(i.type,!1),i;case 11:return i=ue(i.type.render,!1),i;case 1:return i=ue(i.type,!0),i;default:return""}}function Ae(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 z:return"Fragment";case L:return"Portal";case de:return"Profiler";case Z:return"StrictMode";case pe:return"Suspense";case ee:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case re:return(i.displayName||"Context")+".Consumer";case q: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 ie:return s=i.displayName||null,s!==null?s:Ae(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Ae(i(s))}catch(c){}}return null}function we(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 Ae(s);case 8:return s===Z?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Re(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Fe(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function at(i){var s=Fe(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(v){h=""+v,b.call(this,v)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(v){h=""+v},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function cn(i){i._valueTracker||(i._valueTracker=at(i))}function Ct(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Fe(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function zt(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 It(i,s){var c=s.checked;return P({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function ar(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Re(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 Bn(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Qt(i,s){Bn(i,s);var c=Re(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,Re(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function $e(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"||zt(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Gt=Array.isArray;function Rt(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=""+Re(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 Un(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return P({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function ur(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(Gt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Re(c)}}function Jt(i,s){var c=Re(s.value),h=Re(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 qo(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function oe(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function xe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?oe(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ve,Ge=(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(Ve=Ve||document.createElement("div"),Ve.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ve.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var Ft={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},Tr=["Webkit","ms","Moz","O"];Object.keys(Ft).forEach(function(i){Tr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Ft[s]=Ft[i]})});function gn(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||Ft.hasOwnProperty(i)&&Ft[i]?(""+s).trim():s+"px"}function Lr(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=gn(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var oi=P({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 Zt(i,s){if(s){if(oi[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 lr(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 kn=null;function _e(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Pe=null,Ne=null,Be=null;function kt(i){if(i=Bu(i)){if(typeof Pe!="function")throw Error(n(280));var s=i.stateNode;s&&(s=nd(s),Pe(i.stateNode,i.type,s))}}function Lt(i){Ne?Be?Be.push(i):Be=[i]:Ne=i}function Hn(){if(Ne){var i=Ne,s=Be;if(Be=Ne=null,kt(i),s)for(i=0;i<s.length;i++)kt(s[i])}}function Pt(i,s){return i(s)}function Pn(){}var ot=!1;function Nn(i,s,c){if(ot)return i(s,c);ot=!0;try{return Pt(i,s,c)}finally{ot=!1,(Ne!==null||Be!==null)&&(Pn(),Hn())}}function En(i,s){var c=i.stateNode;if(c===null)return null;var h=nd(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 Dr=!1;if(l)try{var Qn={};Object.defineProperty(Qn,"passive",{get:function(){Dr=!0}}),window.addEventListener("test",Qn,Qn),window.removeEventListener("test",Qn,Qn)}catch(i){Dr=!1}function Rc(i,s,c,h,E,b,v,D,$){var te=Array.prototype.slice.call(arguments,3);try{s.apply(c,te)}catch(he){this.onError(he)}}var bu=!1,Lc=null,Dc=!1,Wp=null,n7={onError:function(i){bu=!0,Lc=i}};function r7(i,s,c,h,E,b,v,D,$){bu=!1,Lc=null,Rc.apply(n7,arguments)}function i7(i,s,c,h,E,b,v,D,$){if(r7.apply(this,arguments),bu){if(bu){var te=Lc;bu=!1,Lc=null}else throw Error(n(198));Dc||(Dc=!0,Wp=te)}}function Yo(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 Ux(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 Hx(i){if(Yo(i)!==i)throw Error(n(188))}function o7(i){var s=i.alternate;if(!s){if(s=Yo(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 Hx(E),i;if(b===h)return Hx(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var v=!1,D=E.child;D;){if(D===c){v=!0,c=E,h=b;break}if(D===h){v=!0,h=E,c=b;break}D=D.sibling}if(!v){for(D=b.child;D;){if(D===c){v=!0,c=b,h=E;break}if(D===h){v=!0,h=b,c=E;break}D=D.sibling}if(!v)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function zx(i){return i=o7(i),i!==null?jx(i):null}function jx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=jx(i);if(s!==null)return s;i=i.sibling}return null}var $x=t.unstable_scheduleCallback,Vx=t.unstable_cancelCallback,s7=t.unstable_shouldYield,a7=t.unstable_requestPaint,jt=t.unstable_now,u7=t.unstable_getCurrentPriorityLevel,Gp=t.unstable_ImmediatePriority,qx=t.unstable_UserBlockingPriority,Mc=t.unstable_NormalPriority,l7=t.unstable_LowPriority,Yx=t.unstable_IdlePriority,Fc=null,si=null;function c7(i){if(si&&typeof si.onCommitFiberRoot=="function")try{si.onCommitFiberRoot(Fc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Mr=Math.clz32?Math.clz32:h7,d7=Math.log,f7=Math.LN2;function h7(i){return i>>>=0,i===0?32:31-(d7(i)/f7|0)|0}var Bc=64,Uc=4194304;function Tu(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 Hc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,v=c&268435455;if(v!==0){var D=v&~E;D!==0?h=Tu(D):(b&=v,b!==0&&(h=Tu(b)))}else v=c&~E,v!==0?h=Tu(v):b!==0&&(h=Tu(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-Mr(s),E=1<<c,h|=i[c],s&=~E;return h}function p7(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 m7(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var v=31-Mr(b),D=1<<v,$=E[v];$===-1?((D&c)===0||(D&h)!==0)&&(E[v]=p7(D,s)):$<=s&&(i.expiredLanes|=D),b&=~D}}function Xp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function Wx(){var i=Bc;return Bc<<=1,(Bc&4194240)===0&&(Bc=64),i}function Kp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function wu(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Mr(s),i[s]=c}function g7(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-Mr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function Qp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-Mr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var ft=0;function Gx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Xx,Jp,Kx,Qx,Jx,Zp=!1,zc=[],Gi=null,Xi=null,Ki=null,xu=new Map,_u=new Map,Qi=[],E7="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 Zx(i,s){switch(i){case"focusin":case"focusout":Gi=null;break;case"dragenter":case"dragleave":Xi=null;break;case"mouseover":case"mouseout":Ki=null;break;case"pointerover":case"pointerout":xu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":_u.delete(s.pointerId)}}function Su(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=Bu(s),s!==null&&Jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function y7(i,s,c,h,E){switch(s){case"focusin":return Gi=Su(Gi,i,s,c,h,E),!0;case"dragenter":return Xi=Su(Xi,i,s,c,h,E),!0;case"mouseover":return Ki=Su(Ki,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return xu.set(b,Su(xu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,_u.set(b,Su(_u.get(b)||null,i,s,c,h,E)),!0}return!1}function e_(i){var s=Wo(i.target);if(s!==null){var c=Yo(s);if(c!==null){if(s=c.tag,s===13){if(s=Ux(c),s!==null){i.blockedOn=s,Jx(i.priority,function(){Kx(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 jc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=tm(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);kn=h,c.target.dispatchEvent(h),kn=null}else return s=Bu(c),s!==null&&Jp(s),i.blockedOn=c,!1;s.shift()}return!0}function t_(i,s,c){jc(i)&&c.delete(s)}function b7(){Zp=!1,Gi!==null&&jc(Gi)&&(Gi=null),Xi!==null&&jc(Xi)&&(Xi=null),Ki!==null&&jc(Ki)&&(Ki=null),xu.forEach(t_),_u.forEach(t_)}function vu(i,s){i.blockedOn===s&&(i.blockedOn=null,Zp||(Zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,b7)))}function Au(i){function s(E){return vu(E,i)}if(0<zc.length){vu(zc[0],i);for(var c=1;c<zc.length;c++){var h=zc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Gi!==null&&vu(Gi,i),Xi!==null&&vu(Xi,i),Ki!==null&&vu(Ki,i),xu.forEach(s),_u.forEach(s),c=0;c<Qi.length;c++)h=Qi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Qi.length&&(c=Qi[0],c.blockedOn===null);)e_(c),c.blockedOn===null&&Qi.shift()}var Vs=H.ReactCurrentBatchConfig,$c=!0;function T7(i,s,c,h){var E=ft,b=Vs.transition;Vs.transition=null;try{ft=1,em(i,s,c,h)}finally{ft=E,Vs.transition=b}}function w7(i,s,c,h){var E=ft,b=Vs.transition;Vs.transition=null;try{ft=4,em(i,s,c,h)}finally{ft=E,Vs.transition=b}}function em(i,s,c,h){if($c){var E=tm(i,s,c,h);if(E===null)ym(i,s,h,Vc,c),Zx(i,h);else if(y7(E,i,s,c,h))h.stopPropagation();else if(Zx(i,h),s&4&&-1<E7.indexOf(i)){for(;E!==null;){var b=Bu(E);if(b!==null&&Xx(b),b=tm(i,s,c,h),b===null&&ym(i,s,h,Vc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else ym(i,s,h,null,c)}}var Vc=null;function tm(i,s,c,h){if(Vc=null,i=_e(h),i=Wo(i),i!==null)if(s=Yo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Ux(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 Vc=i,null}function n_(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(u7()){case Gp:return 1;case qx:return 4;case Mc:case l7:return 16;case Yx:return 536870912;default:return 16}default:return 16}}var Ji=null,nm=null,qc=null;function r_(){if(qc)return qc;var i,s=nm,c=s.length,h,E="value"in Ji?Ji.value:Ji.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var v=c-i;for(h=1;h<=v&&s[c-h]===E[b-h];h++);return qc=E.slice(i,1<h?1-h:void 0)}function Yc(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 Wc(){return!0}function i_(){return!1}function cr(i){function s(c,h,E,b,v){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=v,this.currentTarget=null;for(var D in i)i.hasOwnProperty(D)&&(c=i[D],this[D]=c?c(b):b[D]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Wc:i_,this.isPropagationStopped=i_,this}return P(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=Wc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Wc)},persist:function(){},isPersistent:Wc}),s}var qs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rm=cr(qs),Cu=P({},qs,{view:0,detail:0}),x7=cr(Cu),im,om,ku,Gc=P({},Cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:am,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!==ku&&(ku&&i.type==="mousemove"?(im=i.screenX-ku.screenX,om=i.screenY-ku.screenY):om=im=0,ku=i),im)},movementY:function(i){return"movementY"in i?i.movementY:om}}),o_=cr(Gc),_7=P({},Gc,{dataTransfer:0}),S7=cr(_7),v7=P({},Cu,{relatedTarget:0}),sm=cr(v7),A7=P({},qs,{animationName:0,elapsedTime:0,pseudoElement:0}),C7=cr(A7),k7=P({},qs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),P7=cr(k7),N7=P({},qs,{data:0}),s_=cr(N7),O7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},I7={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"},R7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function L7(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=R7[i])?!!s[i]:!1}function am(){return L7}var D7=P({},Cu,{key:function(i){if(i.key){var s=O7[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Yc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?I7[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:am,charCode:function(i){return i.type==="keypress"?Yc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Yc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),M7=cr(D7),F7=P({},Gc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),a_=cr(F7),B7=P({},Cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:am}),U7=cr(B7),H7=P({},qs,{propertyName:0,elapsedTime:0,pseudoElement:0}),z7=cr(H7),j7=P({},Gc,{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}),$7=cr(j7),V7=[9,13,27,32],um=l&&"CompositionEvent"in window,Pu=null;l&&"documentMode"in document&&(Pu=document.documentMode);var q7=l&&"TextEvent"in window&&!Pu,u_=l&&(!um||Pu&&8<Pu&&11>=Pu),l_=" ",c_=!1;function d_(i,s){switch(i){case"keyup":return V7.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function f_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ys=!1;function Y7(i,s){switch(i){case"compositionend":return f_(s);case"keypress":return s.which!==32?null:(c_=!0,l_);case"textInput":return i=s.data,i===l_&&c_?null:i;default:return null}}function W7(i,s){if(Ys)return i==="compositionend"||!um&&d_(i,s)?(i=r_(),qc=nm=Ji=null,Ys=!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 u_&&s.locale!=="ko"?null:s.data;default:return null}}var G7={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 h_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!G7[i.type]:s==="textarea"}function p_(i,s,c,h){Lt(h),s=Zc(s,"onChange"),0<s.length&&(c=new rm("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Nu=null,Ou=null;function X7(i){I_(i,0)}function Xc(i){var s=Qs(i);if(Ct(s))return i}function K7(i,s){if(i==="change")return s}var m_=!1;if(l){var lm;if(l){var cm="oninput"in document;if(!cm){var g_=document.createElement("div");g_.setAttribute("oninput","return;"),cm=typeof g_.oninput=="function"}lm=cm}else lm=!1;m_=lm&&(!document.documentMode||9<document.documentMode)}function E_(){Nu&&(Nu.detachEvent("onpropertychange",y_),Ou=Nu=null)}function y_(i){if(i.propertyName==="value"&&Xc(Ou)){var s=[];p_(s,Ou,i,_e(i)),Nn(X7,s)}}function Q7(i,s,c){i==="focusin"?(E_(),Nu=s,Ou=c,Nu.attachEvent("onpropertychange",y_)):i==="focusout"&&E_()}function J7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Xc(Ou)}function Z7(i,s){if(i==="click")return Xc(s)}function eU(i,s){if(i==="input"||i==="change")return Xc(s)}function tU(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Fr=typeof Object.is=="function"?Object.is:tU;function Iu(i,s){if(Fr(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)||!Fr(i[E],s[E]))return!1}return!0}function b_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function T_(i,s){var c=b_(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=b_(c)}}function w_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?w_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function x_(){for(var i=window,s=zt();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=zt(i.document)}return s}function dm(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 nU(i){var s=x_(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&w_(c.ownerDocument.documentElement,c)){if(h!==null&&dm(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=T_(c,b);var v=T_(c,h);E&&v&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==v.node||i.focusOffset!==v.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(v.node,v.offset)):(s.setEnd(v.node,v.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 rU=l&&"documentMode"in document&&11>=document.documentMode,Ws=null,fm=null,Ru=null,hm=!1;function __(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;hm||Ws==null||Ws!==zt(h)||(h=Ws,"selectionStart"in h&&dm(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}),Ru&&Iu(Ru,h)||(Ru=h,h=Zc(fm,"onSelect"),0<h.length&&(s=new rm("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ws)))}function Kc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Gs={animationend:Kc("Animation","AnimationEnd"),animationiteration:Kc("Animation","AnimationIteration"),animationstart:Kc("Animation","AnimationStart"),transitionend:Kc("Transition","TransitionEnd")},pm={},S_={};l&&(S_=document.createElement("div").style,"AnimationEvent"in window||(delete Gs.animationend.animation,delete Gs.animationiteration.animation,delete Gs.animationstart.animation),"TransitionEvent"in window||delete Gs.transitionend.transition);function Qc(i){if(pm[i])return pm[i];if(!Gs[i])return i;var s=Gs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in S_)return pm[i]=s[c];return i}var v_=Qc("animationend"),A_=Qc("animationiteration"),C_=Qc("animationstart"),k_=Qc("transitionend"),P_=new Map,N_="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 Zi(i,s){P_.set(i,s),a(s,[i])}for(var mm=0;mm<N_.length;mm++){var gm=N_[mm],iU=gm.toLowerCase(),oU=gm[0].toUpperCase()+gm.slice(1);Zi(iU,"on"+oU)}Zi(v_,"onAnimationEnd"),Zi(A_,"onAnimationIteration"),Zi(C_,"onAnimationStart"),Zi("dblclick","onDoubleClick"),Zi("focusin","onFocus"),Zi("focusout","onBlur"),Zi(k_,"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 Lu="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(" "),sU=new Set("cancel close invalid load scroll toggle".split(" ").concat(Lu));function O_(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,i7(h,s,void 0,i),i.currentTarget=null}function I_(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 v=h.length-1;0<=v;v--){var D=h[v],$=D.instance,te=D.currentTarget;if(D=D.listener,$!==b&&E.isPropagationStopped())break e;O_(E,D,te),b=$}else for(v=0;v<h.length;v++){if(D=h[v],$=D.instance,te=D.currentTarget,D=D.listener,$!==b&&E.isPropagationStopped())break e;O_(E,D,te),b=$}}}if(Dc)throw i=Wp,Dc=!1,Wp=null,i}function xt(i,s){var c=s[Sm];c===void 0&&(c=s[Sm]=new Set);var h=i+"__bubble";c.has(h)||(R_(s,i,2,!1),c.add(h))}function Em(i,s,c){var h=0;s&&(h|=4),R_(c,i,h,s)}var Jc="_reactListening"+Math.random().toString(36).slice(2);function Du(i){if(!i[Jc]){i[Jc]=!0,r.forEach(function(c){c!=="selectionchange"&&(sU.has(c)||Em(c,!1,i),Em(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Jc]||(s[Jc]=!0,Em("selectionchange",!1,s))}}function R_(i,s,c,h){switch(n_(s)){case 1:var E=T7;break;case 4:E=w7;break;default:E=em}c=E.bind(null,s,c,i),E=void 0,!Dr||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 ym(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var v=h.tag;if(v===3||v===4){var D=h.stateNode.containerInfo;if(D===E||D.nodeType===8&&D.parentNode===E)break;if(v===4)for(v=h.return;v!==null;){var $=v.tag;if(($===3||$===4)&&($=v.stateNode.containerInfo,$===E||$.nodeType===8&&$.parentNode===E))return;v=v.return}for(;D!==null;){if(v=Wo(D),v===null)return;if($=v.tag,$===5||$===6){h=b=v;continue e}D=D.parentNode}}h=h.return}Nn(function(){var te=b,he=_e(c),ge=[];e:{var le=P_.get(i);if(le!==void 0){var ke=rm,Ie=i;switch(i){case"keypress":if(Yc(c)===0)break e;case"keydown":case"keyup":ke=M7;break;case"focusin":Ie="focus",ke=sm;break;case"focusout":Ie="blur",ke=sm;break;case"beforeblur":case"afterblur":ke=sm;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ke=o_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=S7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=U7;break;case v_:case A_:case C_:ke=C7;break;case k_:ke=z7;break;case"scroll":ke=x7;break;case"wheel":ke=$7;break;case"copy":case"cut":case"paste":ke=P7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=a_}var Le=(s&4)!==0,$t=!Le&&i==="scroll",G=Le?le!==null?le+"Capture":null:le;Le=[];for(var Y=te,Q;Y!==null;){Q=Y;var Te=Q.stateNode;if(Q.tag===5&&Te!==null&&(Q=Te,G!==null&&(Te=En(Y,G),Te!=null&&Le.push(Mu(Y,Te,Q)))),$t)break;Y=Y.return}0<Le.length&&(le=new ke(le,Ie,null,c,he),ge.push({event:le,listeners:Le}))}}if((s&7)===0){e:{if(le=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",le&&c!==kn&&(Ie=c.relatedTarget||c.fromElement)&&(Wo(Ie)||Ie[vi]))break e;if((ke||le)&&(le=he.window===he?he:(le=he.ownerDocument)?le.defaultView||le.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=te,Ie=Ie?Wo(Ie):null,Ie!==null&&($t=Yo(Ie),Ie!==$t||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=te),ke!==Ie)){if(Le=o_,Te="onMouseLeave",G="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Le=a_,Te="onPointerLeave",G="onPointerEnter",Y="pointer"),$t=ke==null?le:Qs(ke),Q=Ie==null?le:Qs(Ie),le=new Le(Te,Y+"leave",ke,c,he),le.target=$t,le.relatedTarget=Q,Te=null,Wo(he)===te&&(Le=new Le(G,Y+"enter",Ie,c,he),Le.target=Q,Le.relatedTarget=$t,Te=Le),$t=Te,ke&&Ie)t:{for(Le=ke,G=Ie,Y=0,Q=Le;Q;Q=Xs(Q))Y++;for(Q=0,Te=G;Te;Te=Xs(Te))Q++;for(;0<Y-Q;)Le=Xs(Le),Y--;for(;0<Q-Y;)G=Xs(G),Q--;for(;Y--;){if(Le===G||G!==null&&Le===G.alternate)break t;Le=Xs(Le),G=Xs(G)}Le=null}else Le=null;ke!==null&&L_(ge,le,ke,Le,!1),Ie!==null&&$t!==null&&L_(ge,$t,Ie,Le,!0)}}e:{if(le=te?Qs(te):window,ke=le.nodeName&&le.nodeName.toLowerCase(),ke==="select"||ke==="input"&&le.type==="file")var Me=K7;else if(h_(le))if(m_)Me=eU;else{Me=J7;var ze=Q7}else(ke=le.nodeName)&&ke.toLowerCase()==="input"&&(le.type==="checkbox"||le.type==="radio")&&(Me=Z7);if(Me&&(Me=Me(i,te))){p_(ge,Me,c,he);break e}ze&&ze(i,le,te),i==="focusout"&&(ze=le._wrapperState)&&ze.controlled&&le.type==="number"&&bt(le,"number",le.value)}switch(ze=te?Qs(te):window,i){case"focusin":(h_(ze)||ze.contentEditable==="true")&&(Ws=ze,fm=te,Ru=null);break;case"focusout":Ru=fm=Ws=null;break;case"mousedown":hm=!0;break;case"contextmenu":case"mouseup":case"dragend":hm=!1,__(ge,c,he);break;case"selectionchange":if(rU)break;case"keydown":case"keyup":__(ge,c,he)}var je;if(um)e:{switch(i){case"compositionstart":var Ye="onCompositionStart";break e;case"compositionend":Ye="onCompositionEnd";break e;case"compositionupdate":Ye="onCompositionUpdate";break e}Ye=void 0}else Ys?d_(i,c)&&(Ye="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ye="onCompositionStart");Ye&&(u_&&c.locale!=="ko"&&(Ys||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Ys&&(je=r_()):(Ji=he,nm="value"in Ji?Ji.value:Ji.textContent,Ys=!0)),ze=Zc(te,Ye),0<ze.length&&(Ye=new s_(Ye,i,null,c,he),ge.push({event:Ye,listeners:ze}),je?Ye.data=je:(je=f_(c),je!==null&&(Ye.data=je)))),(je=q7?Y7(i,c):W7(i,c))&&(te=Zc(te,"onBeforeInput"),0<te.length&&(he=new s_("onBeforeInput","beforeinput",null,c,he),ge.push({event:he,listeners:te}),he.data=je))}I_(ge,s)})}function Mu(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=En(i,c),b!=null&&h.unshift(Mu(i,b,E)),b=En(i,s),b!=null&&h.push(Mu(i,b,E))),i=i.return}return h}function Xs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function L_(i,s,c,h,E){for(var b=s._reactName,v=[];c!==null&&c!==h;){var D=c,$=D.alternate,te=D.stateNode;if($!==null&&$===h)break;D.tag===5&&te!==null&&(D=te,E?($=En(c,b),$!=null&&v.unshift(Mu(c,$,D))):E||($=En(c,b),$!=null&&v.push(Mu(c,$,D)))),c=c.return}v.length!==0&&i.push({event:s,listeners:v})}var aU=/\r\n?/g,uU=/\u0000|\uFFFD/g;function D_(i){return(typeof i=="string"?i:""+i).replace(aU,`
15
+ `).replace(uU,"")}function ed(i,s,c){if(s=D_(s),D_(i)!==s&&c)throw Error(n(425))}function td(){}var bm=null,Tm=null;function wm(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 xm=typeof setTimeout=="function"?setTimeout:void 0,lU=typeof clearTimeout=="function"?clearTimeout:void 0,M_=typeof Promise=="function"?Promise:void 0,cU=typeof queueMicrotask=="function"?queueMicrotask:typeof M_!="undefined"?function(i){return M_.resolve(null).then(i).catch(dU)}:xm;function dU(i){setTimeout(function(){throw i})}function _m(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),Au(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);Au(s)}function eo(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 F_(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 Ks=Math.random().toString(36).slice(2),ai="__reactFiber$"+Ks,Fu="__reactProps$"+Ks,vi="__reactContainer$"+Ks,Sm="__reactEvents$"+Ks,fU="__reactListeners$"+Ks,hU="__reactHandles$"+Ks;function Wo(i){var s=i[ai];if(s)return s;for(var c=i.parentNode;c;){if(s=c[vi]||c[ai]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=F_(i);i!==null;){if(c=i[ai])return c;i=F_(i)}return s}i=c,c=i.parentNode}return null}function Bu(i){return i=i[ai]||i[vi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Qs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function nd(i){return i[Fu]||null}var vm=[],Js=-1;function to(i){return{current:i}}function _t(i){0>Js||(i.current=vm[Js],vm[Js]=null,Js--)}function Tt(i,s){Js++,vm[Js]=i.current,i.current=s}var no={},On=to(no),Jn=to(!1),Go=no;function Zs(i,s){var c=i.type.contextTypes;if(!c)return no;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 Zn(i){return i=i.childContextTypes,i!=null}function rd(){_t(Jn),_t(On)}function B_(i,s,c){if(On.current!==no)throw Error(n(168));Tt(On,s),Tt(Jn,c)}function U_(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,we(i)||"Unknown",E));return P({},c,h)}function id(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||no,Go=On.current,Tt(On,i),Tt(Jn,Jn.current),!0}function H_(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=U_(i,s,Go),h.__reactInternalMemoizedMergedChildContext=i,_t(Jn),_t(On),Tt(On,i)):_t(Jn),Tt(Jn,c)}var Ai=null,od=!1,Am=!1;function z_(i){Ai===null?Ai=[i]:Ai.push(i)}function pU(i){od=!0,z_(i)}function ro(){if(!Am&&Ai!==null){Am=!0;var i=0,s=ft;try{var c=Ai;for(ft=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}Ai=null,od=!1}catch(E){throw Ai!==null&&(Ai=Ai.slice(i+1)),$x(Gp,ro),E}finally{ft=s,Am=!1}}return null}var ea=[],ta=0,sd=null,ad=0,wr=[],xr=0,Xo=null,Ci=1,ki="";function Ko(i,s){ea[ta++]=ad,ea[ta++]=sd,sd=i,ad=s}function j_(i,s,c){wr[xr++]=Ci,wr[xr++]=ki,wr[xr++]=Xo,Xo=i;var h=Ci;i=ki;var E=32-Mr(h)-1;h&=~(1<<E),c+=1;var b=32-Mr(s)+E;if(30<b){var v=E-E%5;b=(h&(1<<v)-1).toString(32),h>>=v,E-=v,Ci=1<<32-Mr(s)+E|c<<E|h,ki=b+i}else Ci=1<<b|c<<E|h,ki=i}function Cm(i){i.return!==null&&(Ko(i,1),j_(i,1,0))}function km(i){for(;i===sd;)sd=ea[--ta],ea[ta]=null,ad=ea[--ta],ea[ta]=null;for(;i===Xo;)Xo=wr[--xr],wr[xr]=null,ki=wr[--xr],wr[xr]=null,Ci=wr[--xr],wr[xr]=null}var dr=null,fr=null,Nt=!1,Br=null;function $_(i,s){var c=Ar(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 V_(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,dr=i,fr=eo(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,dr=i,fr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Xo!==null?{id:Ci,overflow:ki}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=Ar(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,dr=i,fr=null,!0):!1;default:return!1}}function Pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Nm(i){if(Nt){var s=fr;if(s){var c=s;if(!V_(i,s)){if(Pm(i))throw Error(n(418));s=eo(c.nextSibling);var h=dr;s&&V_(i,s)?$_(h,c):(i.flags=i.flags&-4097|2,Nt=!1,dr=i)}}else{if(Pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Nt=!1,dr=i}}}function q_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;dr=i}function ud(i){if(i!==dr)return!1;if(!Nt)return q_(i),Nt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!wm(i.type,i.memoizedProps)),s&&(s=fr)){if(Pm(i))throw Y_(),Error(n(418));for(;s;)$_(i,s),s=eo(s.nextSibling)}if(q_(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){fr=eo(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}fr=null}}else fr=dr?eo(i.stateNode.nextSibling):null;return!0}function Y_(){for(var i=fr;i;)i=eo(i.nextSibling)}function na(){fr=dr=null,Nt=!1}function Om(i){Br===null?Br=[i]:Br.push(i)}var mU=H.ReactCurrentBatchConfig;function Uu(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(v){var D=E.refs;v===null?delete D[b]:D[b]=v},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function ld(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function W_(i){var s=i._init;return s(i._payload)}function G_(i){function s(G,Y){if(i){var Q=G.deletions;Q===null?(G.deletions=[Y],G.flags|=16):Q.push(Y)}}function c(G,Y){if(!i)return null;for(;Y!==null;)s(G,Y),Y=Y.sibling;return null}function h(G,Y){for(G=new Map;Y!==null;)Y.key!==null?G.set(Y.key,Y):G.set(Y.index,Y),Y=Y.sibling;return G}function E(G,Y){return G=fo(G,Y),G.index=0,G.sibling=null,G}function b(G,Y,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<Y?(G.flags|=2,Y):Q):(G.flags|=2,Y)):(G.flags|=1048576,Y)}function v(G){return i&&G.alternate===null&&(G.flags|=2),G}function D(G,Y,Q,Te){return Y===null||Y.tag!==6?(Y=xg(Q,G.mode,Te),Y.return=G,Y):(Y=E(Y,Q),Y.return=G,Y)}function $(G,Y,Q,Te){var Me=Q.type;return Me===z?he(G,Y,Q.props.children,Te,Q.key):Y!==null&&(Y.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ce&&W_(Me)===Y.type)?(Te=E(Y,Q.props),Te.ref=Uu(G,Y,Q),Te.return=G,Te):(Te=Rd(Q.type,Q.key,Q.props,null,G.mode,Te),Te.ref=Uu(G,Y,Q),Te.return=G,Te)}function te(G,Y,Q,Te){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=_g(Q,G.mode,Te),Y.return=G,Y):(Y=E(Y,Q.children||[]),Y.return=G,Y)}function he(G,Y,Q,Te,Me){return Y===null||Y.tag!==7?(Y=is(Q,G.mode,Te,Me),Y.return=G,Y):(Y=E(Y,Q),Y.return=G,Y)}function ge(G,Y,Q){if(typeof Y=="string"&&Y!==""||typeof Y=="number")return Y=xg(""+Y,G.mode,Q),Y.return=G,Y;if(typeof Y=="object"&&Y!==null){switch(Y.$$typeof){case U:return Q=Rd(Y.type,Y.key,Y.props,null,G.mode,Q),Q.ref=Uu(G,null,Y),Q.return=G,Q;case L:return Y=_g(Y,G.mode,Q),Y.return=G,Y;case Ce:var Te=Y._init;return ge(G,Te(Y._payload),Q)}if(Gt(Y)||se(Y))return Y=is(Y,G.mode,Q,null),Y.return=G,Y;ld(G,Y)}return null}function le(G,Y,Q,Te){var Me=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return Me!==null?null:D(G,Y,""+Q,Te);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case U:return Q.key===Me?$(G,Y,Q,Te):null;case L:return Q.key===Me?te(G,Y,Q,Te):null;case Ce:return Me=Q._init,le(G,Y,Me(Q._payload),Te)}if(Gt(Q)||se(Q))return Me!==null?null:he(G,Y,Q,Te,null);ld(G,Q)}return null}function ke(G,Y,Q,Te,Me){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return G=G.get(Q)||null,D(Y,G,""+Te,Me);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case U:return G=G.get(Te.key===null?Q:Te.key)||null,$(Y,G,Te,Me);case L:return G=G.get(Te.key===null?Q:Te.key)||null,te(Y,G,Te,Me);case Ce:var ze=Te._init;return ke(G,Y,Q,ze(Te._payload),Me)}if(Gt(Te)||se(Te))return G=G.get(Q)||null,he(Y,G,Te,Me,null);ld(Y,Te)}return null}function Ie(G,Y,Q,Te){for(var Me=null,ze=null,je=Y,Ye=Y=0,hn=null;je!==null&&Ye<Q.length;Ye++){je.index>Ye?(hn=je,je=null):hn=je.sibling;var ut=le(G,je,Q[Ye],Te);if(ut===null){je===null&&(je=hn);break}i&&je&&ut.alternate===null&&s(G,je),Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut,je=hn}if(Ye===Q.length)return c(G,je),Nt&&Ko(G,Ye),Me;if(je===null){for(;Ye<Q.length;Ye++)je=ge(G,Q[Ye],Te),je!==null&&(Y=b(je,Y,Ye),ze===null?Me=je:ze.sibling=je,ze=je);return Nt&&Ko(G,Ye),Me}for(je=h(G,je);Ye<Q.length;Ye++)hn=ke(je,G,Ye,Q[Ye],Te),hn!==null&&(i&&hn.alternate!==null&&je.delete(hn.key===null?Ye:hn.key),Y=b(hn,Y,Ye),ze===null?Me=hn:ze.sibling=hn,ze=hn);return i&&je.forEach(function(ho){return s(G,ho)}),Nt&&Ko(G,Ye),Me}function Le(G,Y,Q,Te){var Me=se(Q);if(typeof Me!="function")throw Error(n(150));if(Q=Me.call(Q),Q==null)throw Error(n(151));for(var ze=Me=null,je=Y,Ye=Y=0,hn=null,ut=Q.next();je!==null&&!ut.done;Ye++,ut=Q.next()){je.index>Ye?(hn=je,je=null):hn=je.sibling;var ho=le(G,je,ut.value,Te);if(ho===null){je===null&&(je=hn);break}i&&je&&ho.alternate===null&&s(G,je),Y=b(ho,Y,Ye),ze===null?Me=ho:ze.sibling=ho,ze=ho,je=hn}if(ut.done)return c(G,je),Nt&&Ko(G,Ye),Me;if(je===null){for(;!ut.done;Ye++,ut=Q.next())ut=ge(G,ut.value,Te),ut!==null&&(Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut);return Nt&&Ko(G,Ye),Me}for(je=h(G,je);!ut.done;Ye++,ut=Q.next())ut=ke(je,G,Ye,ut.value,Te),ut!==null&&(i&&ut.alternate!==null&&je.delete(ut.key===null?Ye:ut.key),Y=b(ut,Y,Ye),ze===null?Me=ut:ze.sibling=ut,ze=ut);return i&&je.forEach(function(GU){return s(G,GU)}),Nt&&Ko(G,Ye),Me}function $t(G,Y,Q,Te){if(typeof Q=="object"&&Q!==null&&Q.type===z&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case U:e:{for(var Me=Q.key,ze=Y;ze!==null;){if(ze.key===Me){if(Me=Q.type,Me===z){if(ze.tag===7){c(G,ze.sibling),Y=E(ze,Q.props.children),Y.return=G,G=Y;break e}}else if(ze.elementType===Me||typeof Me=="object"&&Me!==null&&Me.$$typeof===Ce&&W_(Me)===ze.type){c(G,ze.sibling),Y=E(ze,Q.props),Y.ref=Uu(G,ze,Q),Y.return=G,G=Y;break e}c(G,ze);break}else s(G,ze);ze=ze.sibling}Q.type===z?(Y=is(Q.props.children,G.mode,Te,Q.key),Y.return=G,G=Y):(Te=Rd(Q.type,Q.key,Q.props,null,G.mode,Te),Te.ref=Uu(G,Y,Q),Te.return=G,G=Te)}return v(G);case L:e:{for(ze=Q.key;Y!==null;){if(Y.key===ze)if(Y.tag===4&&Y.stateNode.containerInfo===Q.containerInfo&&Y.stateNode.implementation===Q.implementation){c(G,Y.sibling),Y=E(Y,Q.children||[]),Y.return=G,G=Y;break e}else{c(G,Y);break}else s(G,Y);Y=Y.sibling}Y=_g(Q,G.mode,Te),Y.return=G,G=Y}return v(G);case Ce:return ze=Q._init,$t(G,Y,ze(Q._payload),Te)}if(Gt(Q))return Ie(G,Y,Q,Te);if(se(Q))return Le(G,Y,Q,Te);ld(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,Y!==null&&Y.tag===6?(c(G,Y.sibling),Y=E(Y,Q),Y.return=G,G=Y):(c(G,Y),Y=xg(Q,G.mode,Te),Y.return=G,G=Y),v(G)):c(G,Y)}return $t}var ra=G_(!0),X_=G_(!1),cd=to(null),dd=null,ia=null,Im=null;function Rm(){Im=ia=dd=null}function Lm(i){var s=cd.current;_t(cd),i._currentValue=s}function Dm(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 oa(i,s){dd=i,Im=ia=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(er=!0),i.firstContext=null)}function _r(i){var s=i._currentValue;if(Im!==i)if(i={context:i,memoizedValue:s,next:null},ia===null){if(dd===null)throw Error(n(308));ia=i,dd.dependencies={lanes:0,firstContext:i}}else ia=ia.next=i;return s}var Qo=null;function Mm(i){Qo===null?Qo=[i]:Qo.push(i)}function K_(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,Mm(s)):(c.next=E.next,E.next=c),s.interleaved=c,Pi(i,h)}function Pi(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 io=!1;function Fm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Q_(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 Ni(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function oo(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(st&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,Pi(i,c)}return E=h.interleaved,E===null?(s.next=s,Mm(h)):(s.next=E.next,E.next=s),h.interleaved=s,Pi(i,c)}function fd(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,Qp(i,c)}}function J_(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 v={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=v:b=b.next=v,c=c.next}while(c!==null);b===null?E=b=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 hd(i,s,c,h){var E=i.updateQueue;io=!1;var b=E.firstBaseUpdate,v=E.lastBaseUpdate,D=E.shared.pending;if(D!==null){E.shared.pending=null;var $=D,te=$.next;$.next=null,v===null?b=te:v.next=te,v=$;var he=i.alternate;he!==null&&(he=he.updateQueue,D=he.lastBaseUpdate,D!==v&&(D===null?he.firstBaseUpdate=te:D.next=te,he.lastBaseUpdate=$))}if(b!==null){var ge=E.baseState;v=0,he=te=$=null,D=b;do{var le=D.lane,ke=D.eventTime;if((h&le)===le){he!==null&&(he=he.next={eventTime:ke,lane:0,tag:D.tag,payload:D.payload,callback:D.callback,next:null});e:{var Ie=i,Le=D;switch(le=s,ke=c,Le.tag){case 1:if(Ie=Le.payload,typeof Ie=="function"){ge=Ie.call(ke,ge,le);break e}ge=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Le.payload,le=typeof Ie=="function"?Ie.call(ke,ge,le):Ie,le==null)break e;ge=P({},ge,le);break e;case 2:io=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,le=E.effects,le===null?E.effects=[D]:le.push(D))}else ke={eventTime:ke,lane:le,tag:D.tag,payload:D.payload,callback:D.callback,next:null},he===null?(te=he=ke,$=ge):he=he.next=ke,v|=le;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;le=D,D=le.next,le.next=null,E.lastBaseUpdate=le,E.shared.pending=null}}while(!0);if(he===null&&($=ge),E.baseState=$,E.firstBaseUpdate=te,E.lastBaseUpdate=he,s=E.shared.interleaved,s!==null){E=s;do v|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);es|=v,i.lanes=v,i.memoizedState=ge}}function Z_(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 Hu={},ui=to(Hu),zu=to(Hu),ju=to(Hu);function Jo(i){if(i===Hu)throw Error(n(174));return i}function Bm(i,s){switch(Tt(ju,s),Tt(zu,i),Tt(ui,Hu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:xe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=xe(s,i)}_t(ui),Tt(ui,s)}function sa(){_t(ui),_t(zu),_t(ju)}function e2(i){Jo(ju.current);var s=Jo(ui.current),c=xe(s,i.type);s!==c&&(Tt(zu,i),Tt(ui,c))}function Um(i){zu.current===i&&(_t(ui),_t(zu))}var Dt=to(0);function pd(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 Hm=[];function zm(){for(var i=0;i<Hm.length;i++)Hm[i]._workInProgressVersionPrimary=null;Hm.length=0}var md=H.ReactCurrentDispatcher,jm=H.ReactCurrentBatchConfig,Zo=0,Mt=null,en=null,dn=null,gd=!1,$u=!1,Vu=0,gU=0;function In(){throw Error(n(321))}function $m(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Fr(i[c],s[c]))return!1;return!0}function Vm(i,s,c,h,E,b){if(Zo=b,Mt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,md.current=i===null||i.memoizedState===null?TU:wU,i=c(h,E),$u){b=0;do{if($u=!1,Vu=0,25<=b)throw Error(n(301));b+=1,dn=en=null,s.updateQueue=null,md.current=xU,i=c(h,E)}while($u)}if(md.current=bd,s=en!==null&&en.next!==null,Zo=0,dn=en=Mt=null,gd=!1,s)throw Error(n(300));return i}function qm(){var i=Vu!==0;return Vu=0,i}function li(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return dn===null?Mt.memoizedState=dn=i:dn=dn.next=i,dn}function Sr(){if(en===null){var i=Mt.alternate;i=i!==null?i.memoizedState:null}else i=en.next;var s=dn===null?Mt.memoizedState:dn.next;if(s!==null)dn=s,en=i;else{if(i===null)throw Error(n(310));en=i,i={memoizedState:en.memoizedState,baseState:en.baseState,baseQueue:en.baseQueue,queue:en.queue,next:null},dn===null?Mt.memoizedState=dn=i:dn=dn.next=i}return dn}function qu(i,s){return typeof s=="function"?s(i):s}function Ym(i){var s=Sr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=en,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var v=E.next;E.next=b.next,b.next=v}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var D=v=null,$=null,te=b;do{var he=te.lane;if((Zo&he)===he)$!==null&&($=$.next={lane:0,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null}),h=te.hasEagerState?te.eagerState:i(h,te.action);else{var ge={lane:he,action:te.action,hasEagerState:te.hasEagerState,eagerState:te.eagerState,next:null};$===null?(D=$=ge,v=h):$=$.next=ge,Mt.lanes|=he,es|=he}te=te.next}while(te!==null&&te!==b);$===null?v=h:$.next=D,Fr(h,s.memoizedState)||(er=!0),s.memoizedState=h,s.baseState=v,s.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Mt.lanes|=b,es|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Wm(i){var s=Sr(),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 v=E=E.next;do b=i(b,v.action),v=v.next;while(v!==E);Fr(b,s.memoizedState)||(er=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function t2(){}function n2(i,s){var c=Mt,h=Sr(),E=s(),b=!Fr(h.memoizedState,E);if(b&&(h.memoizedState=E,er=!0),h=h.queue,Gm(o2.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||dn!==null&&dn.memoizedState.tag&1){if(c.flags|=2048,Yu(9,i2.bind(null,c,h,E,s),void 0,null),fn===null)throw Error(n(349));(Zo&30)!==0||r2(c,s,E)}return E}function r2(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Mt.updateQueue,s===null?(s={lastEffect:null,stores:null},Mt.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function i2(i,s,c,h){s.value=c,s.getSnapshot=h,s2(s)&&a2(i)}function o2(i,s,c){return c(function(){s2(s)&&a2(i)})}function s2(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Fr(i,c)}catch(h){return!0}}function a2(i){var s=Pi(i,1);s!==null&&jr(s,i,1,-1)}function u2(i){var s=li();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:qu,lastRenderedState:i},s.queue=i,i=i.dispatch=bU.bind(null,Mt,i),[s.memoizedState,i]}function Yu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=Mt.updateQueue,s===null?(s={lastEffect:null,stores:null},Mt.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 l2(){return Sr().memoizedState}function Ed(i,s,c,h){var E=li();Mt.flags|=i,E.memoizedState=Yu(1|s,c,void 0,h===void 0?null:h)}function yd(i,s,c,h){var E=Sr();h=h===void 0?null:h;var b=void 0;if(en!==null){var v=en.memoizedState;if(b=v.destroy,h!==null&&$m(h,v.deps)){E.memoizedState=Yu(s,c,b,h);return}}Mt.flags|=i,E.memoizedState=Yu(1|s,c,b,h)}function c2(i,s){return Ed(8390656,8,i,s)}function Gm(i,s){return yd(2048,8,i,s)}function d2(i,s){return yd(4,2,i,s)}function f2(i,s){return yd(4,4,i,s)}function h2(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 p2(i,s,c){return c=c!=null?c.concat([i]):null,yd(4,4,h2.bind(null,s,i),c)}function Xm(){}function m2(i,s){var c=Sr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&$m(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function g2(i,s){var c=Sr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&$m(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function E2(i,s,c){return(Zo&21)===0?(i.baseState&&(i.baseState=!1,er=!0),i.memoizedState=c):(Fr(c,s)||(c=Wx(),Mt.lanes|=c,es|=c,i.baseState=!0),s)}function EU(i,s){var c=ft;ft=c!==0&&4>c?c:4,i(!0);var h=jm.transition;jm.transition={};try{i(!1),s()}finally{ft=c,jm.transition=h}}function y2(){return Sr().memoizedState}function yU(i,s,c){var h=lo(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},b2(i))T2(s,c);else if(c=K_(i,s,c,h),c!==null){var E=jn();jr(c,i,h,E),w2(c,s,h)}}function bU(i,s,c){var h=lo(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(b2(i))T2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var v=s.lastRenderedState,D=b(v,c);if(E.hasEagerState=!0,E.eagerState=D,Fr(D,v)){var $=s.interleaved;$===null?(E.next=E,Mm(s)):(E.next=$.next,$.next=E),s.interleaved=E;return}}catch(te){}c=K_(i,s,E,h),c!==null&&(E=jn(),jr(c,i,h,E),w2(c,s,h))}}function b2(i){var s=i.alternate;return i===Mt||s!==null&&s===Mt}function T2(i,s){$u=gd=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function w2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Qp(i,c)}}var bd={readContext:_r,useCallback:In,useContext:In,useEffect:In,useImperativeHandle:In,useInsertionEffect:In,useLayoutEffect:In,useMemo:In,useReducer:In,useRef:In,useState:In,useDebugValue:In,useDeferredValue:In,useTransition:In,useMutableSource:In,useSyncExternalStore:In,useId:In,unstable_isNewReconciler:!1},TU={readContext:_r,useCallback:function(i,s){return li().memoizedState=[i,s===void 0?null:s],i},useContext:_r,useEffect:c2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,Ed(4194308,4,h2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return Ed(4194308,4,i,s)},useInsertionEffect:function(i,s){return Ed(4,2,i,s)},useMemo:function(i,s){var c=li();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=li();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=yU.bind(null,Mt,i),[h.memoizedState,i]},useRef:function(i){var s=li();return i={current:i},s.memoizedState=i},useState:u2,useDebugValue:Xm,useDeferredValue:function(i){return li().memoizedState=i},useTransition:function(){var i=u2(!1),s=i[0];return i=EU.bind(null,i[1]),li().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=Mt,E=li();if(Nt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),fn===null)throw Error(n(349));(Zo&30)!==0||r2(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,c2(o2.bind(null,h,b,i),[i]),h.flags|=2048,Yu(9,i2.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=li(),s=fn.identifierPrefix;if(Nt){var c=ki,h=Ci;c=(h&~(1<<32-Mr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Vu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=gU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},wU={readContext:_r,useCallback:m2,useContext:_r,useEffect:Gm,useImperativeHandle:p2,useInsertionEffect:d2,useLayoutEffect:f2,useMemo:g2,useReducer:Ym,useRef:l2,useState:function(){return Ym(qu)},useDebugValue:Xm,useDeferredValue:function(i){var s=Sr();return E2(s,en.memoizedState,i)},useTransition:function(){var i=Ym(qu)[0],s=Sr().memoizedState;return[i,s]},useMutableSource:t2,useSyncExternalStore:n2,useId:y2,unstable_isNewReconciler:!1},xU={readContext:_r,useCallback:m2,useContext:_r,useEffect:Gm,useImperativeHandle:p2,useInsertionEffect:d2,useLayoutEffect:f2,useMemo:g2,useReducer:Wm,useRef:l2,useState:function(){return Wm(qu)},useDebugValue:Xm,useDeferredValue:function(i){var s=Sr();return en===null?s.memoizedState=i:E2(s,en.memoizedState,i)},useTransition:function(){var i=Wm(qu)[0],s=Sr().memoizedState;return[i,s]},useMutableSource:t2,useSyncExternalStore:n2,useId:y2,unstable_isNewReconciler:!1};function Ur(i,s){if(i&&i.defaultProps){s=P({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Km(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:P({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var Td={isMounted:function(i){return(i=i._reactInternals)?Yo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=jn(),E=lo(i),b=Ni(h,E);b.payload=s,c!=null&&(b.callback=c),s=oo(i,b,E),s!==null&&(jr(s,i,E,h),fd(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=jn(),E=lo(i),b=Ni(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=oo(i,b,E),s!==null&&(jr(s,i,E,h),fd(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=jn(),h=lo(i),E=Ni(c,h);E.tag=2,s!=null&&(E.callback=s),s=oo(i,E,h),s!==null&&(jr(s,i,h,c),fd(s,i,h))}};function x2(i,s,c,h,E,b,v){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,v):s.prototype&&s.prototype.isPureReactComponent?!Iu(c,h)||!Iu(E,b):!0}function _2(i,s,c){var h=!1,E=no,b=s.contextType;return typeof b=="object"&&b!==null?b=_r(b):(E=Zn(s)?Go:On.current,h=s.contextTypes,b=(h=h!=null)?Zs(i,E):no),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Td,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function S2(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&&Td.enqueueReplaceState(s,s.state,null)}function Qm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Fm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=_r(b):(b=Zn(s)?Go:On.current,E.context=Zs(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Km(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&&Td.enqueueReplaceState(E,E.state,null),hd(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function aa(i,s){try{var c="",h=s;do c+=be(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 Zm(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var _U=typeof WeakMap=="function"?WeakMap:Map;function v2(i,s,c){c=Ni(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){Cd||(Cd=!0,pg=h),Zm(i,s)},c}function A2(i,s,c){c=Ni(-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(){Zm(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){Zm(i,s),typeof h!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),c}function C2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new _U;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=FU.bind(null,i,s,c),s.then(i,i))}function k2(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 P2(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=Ni(-1,1),s.tag=2,oo(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var SU=H.ReactCurrentOwner,er=!1;function Hn(i,s,c,h){s.child=i===null?X_(s,null,c,h):ra(s,i.child,c,h)}function N2(i,s,c,h,E){c=c.render;var b=s.ref;return oa(s,E),h=Vm(i,s,c,h,b,E),c=qm(),i!==null&&!er?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Oi(i,s,E)):(Pt&&c&&Cm(s),s.flags|=1,Hn(i,s,h,E),s.child)}function O2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!wg(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,I2(i,s,b,h,E)):(i=Rd(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:Iu,c(S,h)&&i.ref===s.ref)return Oi(i,s,E)}return s.flags|=1,i=fo(b,h),i.ref=s.ref,i.return=s,s.child=i}function I2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(Iu(b,h)&&i.ref===s.ref)if(er=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(er=!0);else return s.lanes=i.lanes,Oi(i,s,E)}return eg(i,s,c,h,E)}function R2(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(la,hr),hr|=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(la,hr),hr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(la,hr),hr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(la,hr),hr|=h;return Hn(i,s,E,c),s.child}function L2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function eg(i,s,c,h,E){var b=Zn(c)?Go:Nn.current;return b=Zs(s,b),oa(s,E),c=Vm(i,s,c,h,b,E),h=qm(),i!==null&&!er?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Oi(i,s,E)):(Pt&&h&&Cm(s),s.flags|=1,Hn(i,s,c,E),s.child)}function D2(i,s,c,h,E){if(Zn(c)){var b=!0;id(s)}else b=!1;if(oa(s,E),s.stateNode===null)xd(i,s),_2(s,c,h),Qm(s,c,h,E),h=!0;else if(i===null){var S=s.stateNode,D=s.memoizedProps;S.props=D;var $=S.context,Z=c.contextType;typeof Z=="object"&&Z!==null?Z=_r(Z):(Z=Zn(c)?Go:Nn.current,Z=Zs(s,Z));var fe=c.getDerivedStateFromProps,me=typeof fe=="function"||typeof S.getSnapshotBeforeUpdate=="function";me||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==h||$!==Z)&&S2(s,S,h,Z),io=!1;var le=s.memoizedState;S.state=le,hd(s,h,S,E),$=s.memoizedState,D!==h||le!==$||Jn.current||io?(typeof fe=="function"&&(Km(s,c,fe,h),$=s.memoizedState),(D=io||x2(s,c,D,h,le,$,Z))?(me||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=$),S.props=h,S.state=$,S.context=Z,h=D):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,Q_(i,s),D=s.memoizedProps,Z=s.type===s.elementType?D:Ur(s.type,D),S.props=Z,me=s.pendingProps,le=S.context,$=c.contextType,typeof $=="object"&&$!==null?$=_r($):($=Zn(c)?Go:Nn.current,$=Zs(s,$));var ke=c.getDerivedStateFromProps;(fe=typeof ke=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==me||le!==$)&&S2(s,S,h,$),io=!1,le=s.memoizedState,S.state=le,hd(s,h,S,E);var Ie=s.memoizedState;D!==me||le!==Ie||Jn.current||io?(typeof ke=="function"&&(Km(s,c,ke,h),Ie=s.memoizedState),(Z=io||x2(s,c,Z,h,le,Ie,$)||!1)?(fe||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Ie,$),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Ie,$)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ie),S.props=h,S.state=Ie,S.context=$,h=Z):(typeof S.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),h=!1)}return tg(i,s,c,h,b,E)}function tg(i,s,c,h,E,b){L2(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&H_(s,c,!1),Oi(i,s,b);h=s.stateNode,SU.current=s;var D=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=ra(s,i.child,null,b),s.child=ra(s,null,D,b)):Hn(i,s,D,b),s.memoizedState=h.state,E&&H_(s,c,!0),s.child}function M2(i){var s=i.stateNode;s.pendingContext?B_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&B_(i,s.context,!1),Bm(i,s.containerInfo)}function F2(i,s,c,h,E){return na(),Om(E),s.flags|=256,Hn(i,s,c,h),s.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function rg(i){return{baseLanes:i,cachePool:null,transitions:null}}function B2(i,s,c){var h=s.pendingProps,E=Lt.current,b=!1,S=(s.flags&128)!==0,D;if((D=S)||(D=i!==null&&i.memoizedState===null?!1:(E&2)!==0),D?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Lt,E&1),i===null)return Nm(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=Ld(S,h,0,null),i=is(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=rg(c),s.memoizedState=ng,i):ig(s,S));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return vU(i,s,S,h,D,E,c);if(b){b=h.fallback,S=s.mode,E=i.child,D=E.sibling;var $={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=$,s.deletions=null):(h=fo(E,$),h.subtreeFlags=E.subtreeFlags&14680064),D!==null?b=fo(D,b):(b=is(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?rg(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,s.memoizedState=ng,h}return b=i.child,i=b.sibling,h=fo(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 ig(i,s){return s=Ld({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function wd(i,s,c,h){return h!==null&&Om(h),ra(s,i.child,null,c),i=ig(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function vU(i,s,c,h,E,b,S){if(c)return s.flags&256?(s.flags&=-257,h=Jm(Error(n(422))),wd(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=Ld({mode:"visible",children:h.children},E,0,null),b=is(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&ra(s,i.child,null,S),s.child.memoizedState=rg(S),s.memoizedState=ng,b);if((s.mode&1)===0)return wd(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var D=h.dgst;return h=D,b=Error(n(419)),h=Jm(b,h,void 0),wd(i,s,S,h)}if(D=(S&i.childLanes)!==0,er||D){if(h=dn,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,Pi(i,E),jr(h,i,E,-1))}return Tg(),h=Jm(Error(n(421))),wd(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=BU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,fr=eo(E.nextSibling),dr=s,Pt=!0,Br=null,i!==null&&(wr[xr++]=Ci,wr[xr++]=ki,wr[xr++]=Xo,Ci=i.id,ki=i.overflow,Xo=s),s=ig(s,h.children),s.flags|=4096,s)}function U2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Dm(i.return,s,c)}function og(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 H2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(Hn(i,s,h.children,c),h=Lt.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&&U2(i,c,s);else if(i.tag===19)U2(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(Lt,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&&pd(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),og(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&&pd(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}og(s,!0,c,null,b);break;case"together":og(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function xd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Oi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),es|=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=fo(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=fo(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function AU(i,s,c){switch(s.tag){case 3:M2(s),na();break;case 5:e2(s);break;case 1:Zn(s.type)&&id(s);break;case 4:Bm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(cd,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Lt,Lt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?B2(i,s,c):(Tt(Lt,Lt.current&1),i=Oi(i,s,c),i!==null?i.sibling:null);Tt(Lt,Lt.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return H2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Lt,Lt.current),h)break;return null;case 22:case 23:return s.lanes=0,R2(i,s,c)}return Oi(i,s,c)}var z2,sg,j2,$2;z2=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}},sg=function(){},j2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Jo(ui.current);var b=null;switch(c){case"input":E=Ot(i,E),h=Ot(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Bn(i,E),h=Bn(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=td)}Jt(c,h);var S;c=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var D=E[Z];for(S in D)D.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(o.hasOwnProperty(Z)?b||(b=[]):(b=b||[]).push(Z,null));for(Z in h){var $=h[Z];if(D=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&$!==D&&($!=null||D!=null))if(Z==="style")if(D){for(S in D)!D.hasOwnProperty(S)||$&&$.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in $)$.hasOwnProperty(S)&&D[S]!==$[S]&&(c||(c={}),c[S]=$[S])}else c||(b||(b=[]),b.push(Z,c)),c=$;else Z==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,D=D?D.__html:void 0,$!=null&&D!==$&&(b=b||[]).push(Z,$)):Z==="children"?typeof $!="string"&&typeof $!="number"||(b=b||[]).push(Z,""+$):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(o.hasOwnProperty(Z)?($!=null&&Z==="onScroll"&&xt("scroll",i),b||D===$||(b=[])):(b=b||[]).push(Z,$))}c&&(b=b||[]).push("style",c);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},$2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Wu(i,s){if(!Pt)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 In(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 CU(i,s,c){var h=s.pendingProps;switch(km(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return In(s),null;case 1:return Zn(s.type)&&rd(),In(s),null;case 3:return h=s.stateNode,sa(),_t(Jn),_t(Nn),zm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(ud(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Br!==null&&(Eg(Br),Br=null))),sg(i,s),In(s),null;case 5:Um(s);var E=Jo(ju.current);if(c=s.type,i!==null&&s.stateNode!=null)j2(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 In(s),null}if(i=Jo(ui.current),ud(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[ai]=s,h[Fu]=b,i=(s.mode&1)!==0,c){case"dialog":xt("cancel",h),xt("close",h);break;case"iframe":case"object":case"embed":xt("load",h);break;case"video":case"audio":for(E=0;E<Lu.length;E++)xt(Lu[E],h);break;case"source":xt("error",h);break;case"img":case"image":case"link":xt("error",h),xt("load",h);break;case"details":xt("toggle",h);break;case"input":ar(h,b),xt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},xt("invalid",h);break;case"textarea":ur(h,b),xt("invalid",h)}Jt(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var D=b[S];S==="children"?typeof D=="string"?h.textContent!==D&&(b.suppressHydrationWarning!==!0&&ed(h.textContent,D,i),E=["children",D]):typeof D=="number"&&h.textContent!==""+D&&(b.suppressHydrationWarning!==!0&&ed(h.textContent,D,i),E=["children",""+D]):o.hasOwnProperty(S)&&D!=null&&S==="onScroll"&&xt("scroll",h)}switch(c){case"input":ln(h),$e(h,b,!0);break;case"textarea":ln(h),qo(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=td)}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=ie(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[ai]=s,i[Fu]=h,z2(i,s,!1,!1),s.stateNode=i;e:{switch(S=lr(c,h),c){case"dialog":xt("cancel",i),xt("close",i),E=h;break;case"iframe":case"object":case"embed":xt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Lu.length;E++)xt(Lu[E],i);E=h;break;case"source":xt("error",i),E=h;break;case"img":case"image":case"link":xt("error",i),xt("load",i),E=h;break;case"details":xt("toggle",i),E=h;break;case"input":ar(i,h),E=Ot(i,h),xt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),xt("invalid",i);break;case"textarea":ur(i,h),E=Bn(i,h),xt("invalid",i);break;default:E=h}Jt(c,E),D=E;for(b in D)if(D.hasOwnProperty(b)){var $=D[b];b==="style"?Lr(i,$):b==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ge(i,$)):b==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&tt(i,$):typeof $=="number"&&tt(i,""+$):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?$!=null&&b==="onScroll"&&xt("scroll",i):$!=null&&A(i,b,$,S))}switch(c){case"input":ln(i),$e(i,h,!1);break;case"textarea":ln(i),qo(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Re(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?It(i,!!h.multiple,b,!1):h.defaultValue!=null&&It(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=td)}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 In(s),null;case 6:if(i&&s.stateNode!=null)$2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Jo(ju.current),Jo(ui.current),ud(s)){if(h=s.stateNode,c=s.memoizedProps,h[ai]=s,(b=h.nodeValue!==c)&&(i=dr,i!==null))switch(i.tag){case 3:ed(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ed(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[ai]=s,s.stateNode=h}return In(s),null;case 13:if(_t(Lt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Pt&&fr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Y_(),na(),s.flags|=98560,b=!1;else if(b=ud(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[ai]=s}else na(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;In(s),b=!1}else Br!==null&&(Eg(Br),Br=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||(Lt.current&1)!==0?en===0&&(en=3):Tg())),s.updateQueue!==null&&(s.flags|=4),In(s),null);case 4:return sa(),sg(i,s),i===null&&Du(s.stateNode.containerInfo),In(s),null;case 10:return Lm(s.type._context),In(s),null;case 17:return Zn(s.type)&&rd(),In(s),null;case 19:if(_t(Lt),b=s.memoizedState,b===null)return In(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Wu(b,!1);else{if(en!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=pd(i),S!==null){for(s.flags|=128,Wu(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(Lt,Lt.current&1|2),s.child}i=i.sibling}b.tail!==null&&zt()>ca&&(s.flags|=128,h=!0,Wu(b,!1),s.lanes=4194304)}else{if(!h)if(i=pd(S),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Wu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Pt)return In(s),null}else 2*zt()-b.renderingStartTime>ca&&c!==1073741824&&(s.flags|=128,h=!0,Wu(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=zt(),s.sibling=null,c=Lt.current,Tt(Lt,h?c&1|2:c&1),s):(In(s),null);case 22:case 23:return bg(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(hr&1073741824)!==0&&(In(s),s.subtreeFlags&6&&(s.flags|=8192)):In(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function kU(i,s){switch(km(s),s.tag){case 1:return Zn(s.type)&&rd(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return sa(),_t(Jn),_t(Nn),zm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Um(s),null;case 13:if(_t(Lt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));na()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return _t(Lt),null;case 4:return sa(),null;case 10:return Lm(s.type._context),null;case 22:case 23:return bg(),null;case 24:return null;default:return null}}var _d=!1,Rn=!1,PU=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function ua(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ft(i,s,h)}else c.current=null}function ag(i,s,c){try{c()}catch(h){Ft(i,s,h)}}var V2=!1;function NU(i,s){if(bm=$c,i=x_(),dm(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(Te){c=null;break e}var S=0,D=-1,$=-1,Z=0,fe=0,me=i,le=null;t:for(;;){for(var ke;me!==c||E!==0&&me.nodeType!==3||(D=S+E),me!==b||h!==0&&me.nodeType!==3||($=S+h),me.nodeType===3&&(S+=me.nodeValue.length),(ke=me.firstChild)!==null;)le=me,me=ke;for(;;){if(me===i)break t;if(le===c&&++Z===E&&(D=S),le===b&&++fe===h&&($=S),(ke=me.nextSibling)!==null)break;me=le,le=me.parentNode}me=ke}c=D===-1||$===-1?null:{start:D,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(Tm={focusedElem:i,selectionRange:c},$c=!1,Oe=s;Oe!==null;)if(s=Oe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Oe=i;else for(;Oe!==null;){s=Oe;try{var Ie=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ie!==null){var Le=Ie.memoizedProps,jt=Ie.memoizedState,G=s.stateNode,Y=G.getSnapshotBeforeUpdate(s.elementType===s.type?Le:Ur(s.type,Le),jt);G.__reactInternalSnapshotBeforeUpdate=Y}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(Te){Ft(s,s.return,Te)}if(i=s.sibling,i!==null){i.return=s.return,Oe=i;break}Oe=s.return}return Ie=V2,V2=!1,Ie}function Gu(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&&ag(s,c,b)}E=E.next}while(E!==h)}}function Sd(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 ug(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 q2(i){var s=i.alternate;s!==null&&(i.alternate=null,q2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[ai],delete s[Fu],delete s[Sm],delete s[fU],delete s[hU])),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 Y2(i){return i.tag===5||i.tag===3||i.tag===4}function W2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Y2(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 lg(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=td));else if(h!==4&&(i=i.child,i!==null))for(lg(i,s,c),i=i.sibling;i!==null;)lg(i,s,c),i=i.sibling}function cg(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(cg(i,s,c),i=i.sibling;i!==null;)cg(i,s,c),i=i.sibling}var En=null,Hr=!1;function so(i,s,c){for(c=c.child;c!==null;)G2(i,s,c),c=c.sibling}function G2(i,s,c){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(Fc,c)}catch(D){}switch(c.tag){case 5:Rn||ua(c,s);case 6:var h=En,E=Hr;En=null,so(i,s,c),En=h,Hr=E,En!==null&&(Hr?(i=En,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):En.removeChild(c.stateNode));break;case 18:En!==null&&(Hr?(i=En,c=c.stateNode,i.nodeType===8?_m(i.parentNode,c):i.nodeType===1&&_m(i,c),Au(i)):_m(En,c.stateNode));break;case 4:h=En,E=Hr,En=c.stateNode.containerInfo,Hr=!0,so(i,s,c),En=h,Hr=E;break;case 0:case 11:case 14:case 15:if(!Rn&&(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)&&ag(c,s,S),E=E.next}while(E!==h)}so(i,s,c);break;case 1:if(!Rn&&(ua(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(D){Ft(c,s,D)}so(i,s,c);break;case 21:so(i,s,c);break;case 22:c.mode&1?(Rn=(h=Rn)||c.memoizedState!==null,so(i,s,c),Rn=h):so(i,s,c);break;default:so(i,s,c)}}function X2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new PU),s.forEach(function(h){var E=UU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function zr(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,D=S;e:for(;D!==null;){switch(D.tag){case 5:En=D.stateNode,Hr=!1;break e;case 3:En=D.stateNode.containerInfo,Hr=!0;break e;case 4:En=D.stateNode.containerInfo,Hr=!0;break e}D=D.return}if(En===null)throw Error(n(160));G2(b,S,E),En=null,Hr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(Z){Ft(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)K2(s,i),s=s.sibling}function K2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(zr(s,i),ci(i),h&4){try{Gu(3,i,i.return),Sd(3,i)}catch(Le){Ft(i,i.return,Le)}try{Gu(5,i,i.return)}catch(Le){Ft(i,i.return,Le)}}break;case 1:zr(s,i),ci(i),h&512&&c!==null&&ua(c,c.return);break;case 5:if(zr(s,i),ci(i),h&512&&c!==null&&ua(c,c.return),i.flags&32){var E=i.stateNode;try{tt(E,"")}catch(Le){Ft(i,i.return,Le)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,D=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{D==="input"&&b.type==="radio"&&b.name!=null&&Fn(E,b),lr(D,S);var Z=lr(D,b);for(S=0;S<$.length;S+=2){var fe=$[S],me=$[S+1];fe==="style"?Lr(E,me):fe==="dangerouslySetInnerHTML"?Ge(E,me):fe==="children"?tt(E,me):A(E,fe,me,Z)}switch(D){case"input":Kt(E,b);break;case"textarea":Qt(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?It(E,!!b.multiple,ke,!1):le!==!!b.multiple&&(b.defaultValue!=null?It(E,!!b.multiple,b.defaultValue,!0):It(E,!!b.multiple,b.multiple?[]:"",!1))}E[Fu]=b}catch(Le){Ft(i,i.return,Le)}}break;case 6:if(zr(s,i),ci(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Le){Ft(i,i.return,Le)}}break;case 3:if(zr(s,i),ci(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Au(s.containerInfo)}catch(Le){Ft(i,i.return,Le)}break;case 4:zr(s,i),ci(i);break;case 13:zr(s,i),ci(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(hg=zt())),h&4&&X2(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(Rn=(Z=Rn)||fe,zr(s,i),Rn=Z):zr(s,i),ci(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!fe&&(i.mode&1)!==0)for(Oe=i,fe=i.child;fe!==null;){for(me=Oe=fe;Oe!==null;){switch(le=Oe,ke=le.child,le.tag){case 0:case 11:case 14:case 15:Gu(4,le,le.return);break;case 1:ua(le,le.return);var Ie=le.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=le,c=le.return;try{s=h,Ie.props=s.memoizedProps,Ie.state=s.memoizedState,Ie.componentWillUnmount()}catch(Le){Ft(h,c,Le)}}break;case 5:ua(le,le.return);break;case 22:if(le.memoizedState!==null){Z2(me);continue}}ke!==null?(ke.return=le,Oe=ke):Z2(me)}fe=fe.sibling}e:for(fe=null,me=i;;){if(me.tag===5){if(fe===null){fe=me;try{E=me.stateNode,Z?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(D=me.stateNode,$=me.memoizedProps.style,S=$!=null&&$.hasOwnProperty("display")?$.display:null,D.style.display=mn("display",S))}catch(Le){Ft(i,i.return,Le)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Le){Ft(i,i.return,Le)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;fe===me&&(fe=null),me=me.return}fe===me&&(fe=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:zr(s,i),ci(i),h&4&&X2(i);break;case 21:break;default:zr(s,i),ci(i)}}function ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Y2(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&&(tt(E,""),h.flags&=-33);var b=W2(i);cg(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,D=W2(i);lg(i,D,S);break;default:throw Error(n(161))}}catch($){Ft(i,i.return,$)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function OU(i,s,c){Oe=i,Q2(i)}function Q2(i,s,c){for(var h=(i.mode&1)!==0;Oe!==null;){var E=Oe,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||_d;if(!S){var D=E.alternate,$=D!==null&&D.memoizedState!==null||Rn;D=_d;var Z=Rn;if(_d=S,(Rn=$)&&!Z)for(Oe=E;Oe!==null;)S=Oe,$=S.child,S.tag===22&&S.memoizedState!==null?eS(E):$!==null?($.return=S,Oe=$):eS(E);for(;b!==null;)Oe=b,Q2(b),b=b.sibling;Oe=E,_d=D,Rn=Z}J2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):J2(i)}}function J2(i){for(;Oe!==null;){var s=Oe;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Rn||Sd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Rn)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:Ur(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Z_(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}Z_(s,S,c)}break;case 5:var D=s.stateNode;if(c===null&&s.flags&4){c=D;var $=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var Z=s.alternate;if(Z!==null){var fe=Z.memoizedState;if(fe!==null){var me=fe.dehydrated;me!==null&&Au(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Rn||s.flags&512&&ug(s)}catch(le){Ft(s,s.return,le)}}if(s===i){Oe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Oe=c;break}Oe=s.return}}function Z2(i){for(;Oe!==null;){var s=Oe;if(s===i){Oe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Oe=c;break}Oe=s.return}}function eS(i){for(;Oe!==null;){var s=Oe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Sd(4,s)}catch($){Ft(s,c,$)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch($){Ft(s,E,$)}}var b=s.return;try{ug(s)}catch($){Ft(s,b,$)}break;case 5:var S=s.return;try{ug(s)}catch($){Ft(s,S,$)}}}catch($){Ft(s,s.return,$)}if(s===i){Oe=null;break}var D=s.sibling;if(D!==null){D.return=s.return,Oe=D;break}Oe=s.return}}var IU=Math.ceil,vd=H.ReactCurrentDispatcher,dg=H.ReactCurrentOwner,vr=H.ReactCurrentBatchConfig,st=0,dn=null,Gt=null,yn=0,hr=0,la=to(0),en=0,Xu=null,es=0,Ad=0,fg=0,Ku=null,tr=null,hg=0,ca=1/0,Ii=null,Cd=!1,pg=null,ao=null,kd=!1,uo=null,Pd=0,Qu=0,mg=null,Nd=-1,Od=0;function zn(){return(st&6)!==0?zt():Nd!==-1?Nd:Nd=zt()}function lo(i){return(i.mode&1)===0?1:(st&2)!==0&&yn!==0?yn&-yn:mU.transition!==null?(Od===0&&(Od=Wx()),Od):(i=ft,i!==0||(i=window.event,i=i===void 0?16:n_(i.type)),i)}function jr(i,s,c,h){if(50<Qu)throw Qu=0,mg=null,Error(n(185));wu(i,c,h),((st&2)===0||i!==dn)&&(i===dn&&((st&2)===0&&(Ad|=c),en===4&&co(i,yn)),nr(i,h),c===1&&st===0&&(s.mode&1)===0&&(ca=zt()+500,od&&ro()))}function nr(i,s){var c=i.callbackNode;m7(i,s);var h=Hc(i,i===dn?yn:0);if(h===0)c!==null&&Vx(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&Vx(c),s===1)i.tag===0?pU(nS.bind(null,i)):z_(nS.bind(null,i)),cU(function(){(st&6)===0&&ro()}),c=null;else{switch(Gx(h)){case 1:c=Gp;break;case 4:c=qx;break;case 16:c=Mc;break;case 536870912:c=Yx;break;default:c=Mc}c=cS(c,tS.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function tS(i,s){if(Nd=-1,Od=0,(st&6)!==0)throw Error(n(327));var c=i.callbackNode;if(da()&&i.callbackNode!==c)return null;var h=Hc(i,i===dn?yn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Id(i,h);else{s=h;var E=st;st|=2;var b=iS();(dn!==i||yn!==s)&&(Ii=null,ca=zt()+500,ns(i,s));do try{DU();break}catch(D){rS(i,D)}while(!0);Rm(),vd.current=b,st=E,Gt!==null?s=0:(dn=null,yn=0,s=en)}if(s!==0){if(s===2&&(E=Xp(i),E!==0&&(h=E,s=gg(i,E))),s===1)throw c=Xu,ns(i,0),co(i,h),nr(i,zt()),c;if(s===6)co(i,h);else{if(E=i.current.alternate,(h&30)===0&&!RU(E)&&(s=Id(i,h),s===2&&(b=Xp(i),b!==0&&(h=b,s=gg(i,b))),s===1))throw c=Xu,ns(i,0),co(i,h),nr(i,zt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:rs(i,tr,Ii);break;case 3:if(co(i,h),(h&130023424)===h&&(s=hg+500-zt(),10<s)){if(Hc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){zn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=xm(rs.bind(null,i,tr,Ii),s);break}rs(i,tr,Ii);break;case 4:if(co(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-Mr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=zt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*IU(h/1960))-h,10<h){i.timeoutHandle=xm(rs.bind(null,i,tr,Ii),h);break}rs(i,tr,Ii);break;case 5:rs(i,tr,Ii);break;default:throw Error(n(329))}}}return nr(i,zt()),i.callbackNode===c?tS.bind(null,i):null}function gg(i,s){var c=Ku;return i.current.memoizedState.isDehydrated&&(ns(i,s).flags|=256),i=Id(i,s),i!==2&&(s=tr,tr=c,s!==null&&Eg(s)),i}function Eg(i){tr===null?tr=i:tr.push.apply(tr,i)}function RU(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(!Fr(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 co(i,s){for(s&=~fg,s&=~Ad,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Mr(s),h=1<<c;i[c]=-1,s&=~h}}function nS(i){if((st&6)!==0)throw Error(n(327));da();var s=Hc(i,0);if((s&1)===0)return nr(i,zt()),null;var c=Id(i,s);if(i.tag!==0&&c===2){var h=Xp(i);h!==0&&(s=h,c=gg(i,h))}if(c===1)throw c=Xu,ns(i,0),co(i,s),nr(i,zt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,rs(i,tr,Ii),nr(i,zt()),null}function yg(i,s){var c=st;st|=1;try{return i(s)}finally{st=c,st===0&&(ca=zt()+500,od&&ro())}}function ts(i){uo!==null&&uo.tag===0&&(st&6)===0&&da();var s=st;st|=1;var c=vr.transition,h=ft;try{if(vr.transition=null,ft=1,i)return i()}finally{ft=h,vr.transition=c,st=s,(st&6)===0&&ro()}}function bg(){hr=la.current,_t(la)}function ns(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,lU(c)),Gt!==null)for(c=Gt.return;c!==null;){var h=c;switch(km(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&rd();break;case 3:sa(),_t(Jn),_t(Nn),zm();break;case 5:Um(h);break;case 4:sa();break;case 13:_t(Lt);break;case 19:_t(Lt);break;case 10:Lm(h.type._context);break;case 22:case 23:bg()}c=c.return}if(dn=i,Gt=i=fo(i.current,null),yn=hr=s,en=0,Xu=null,fg=Ad=es=0,tr=Ku=null,Qo!==null){for(s=0;s<Qo.length;s++)if(c=Qo[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}Qo=null}return i}function rS(i,s){do{var c=Gt;try{if(Rm(),md.current=bd,gd){for(var h=Dt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}gd=!1}if(Zo=0,cn=Zt=Dt=null,$u=!1,Vu=0,dg.current=null,c===null||c.return===null){en=1,Xu=s,Gt=null;break}e:{var b=i,S=c.return,D=c,$=s;if(s=yn,D.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var Z=$,fe=D,me=fe.tag;if((fe.mode&1)===0&&(me===0||me===11||me===15)){var le=fe.alternate;le?(fe.updateQueue=le.updateQueue,fe.memoizedState=le.memoizedState,fe.lanes=le.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var ke=k2(S);if(ke!==null){ke.flags&=-257,P2(ke,S,D,b,s),ke.mode&1&&C2(b,Z,s),s=ke,$=Z;var Ie=s.updateQueue;if(Ie===null){var Le=new Set;Le.add($),s.updateQueue=Le}else Ie.add($);break e}else{if((s&1)===0){C2(b,Z,s),Tg();break e}$=Error(n(426))}}else if(Pt&&D.mode&1){var jt=k2(S);if(jt!==null){(jt.flags&65536)===0&&(jt.flags|=256),P2(jt,S,D,b,s),Om(aa($,D));break e}}b=$=aa($,D),en!==4&&(en=2),Ku===null?Ku=[b]:Ku.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=v2(b,$,s);J_(b,G);break e;case 1:D=$;var Y=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ao===null||!ao.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var Te=A2(b,D,s);J_(b,Te);break e}}b=b.return}while(b!==null)}sS(c)}catch(Me){s=Me,Gt===c&&c!==null&&(Gt=c=c.return);continue}break}while(!0)}function iS(){var i=vd.current;return vd.current=bd,i===null?bd:i}function Tg(){(en===0||en===3||en===2)&&(en=4),dn===null||(es&268435455)===0&&(Ad&268435455)===0||co(dn,yn)}function Id(i,s){var c=st;st|=2;var h=iS();(dn!==i||yn!==s)&&(Ii=null,ns(i,s));do try{LU();break}catch(E){rS(i,E)}while(!0);if(Rm(),st=c,vd.current=h,Gt!==null)throw Error(n(261));return dn=null,yn=0,en}function LU(){for(;Gt!==null;)oS(Gt)}function DU(){for(;Gt!==null&&!s7();)oS(Gt)}function oS(i){var s=lS(i.alternate,i,hr);i.memoizedProps=i.pendingProps,s===null?sS(i):Gt=s,dg.current=null}function sS(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=CU(c,s,hr),c!==null){Gt=c;return}}else{if(c=kU(c,s),c!==null){c.flags&=32767,Gt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{en=6,Gt=null;return}}if(s=s.sibling,s!==null){Gt=s;return}Gt=s=i}while(s!==null);en===0&&(en=5)}function rs(i,s,c){var h=ft,E=vr.transition;try{vr.transition=null,ft=1,MU(i,s,c,h)}finally{vr.transition=E,ft=h}return null}function MU(i,s,c,h){do da();while(uo!==null);if((st&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(g7(i,b),i===dn&&(Gt=dn=null,yn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||kd||(kd=!0,cS(Mc,function(){return da(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=vr.transition,vr.transition=null;var S=ft;ft=1;var D=st;st|=4,dg.current=null,NU(i,c),K2(c,i),nU(Tm),$c=!!bm,Tm=bm=null,i.current=c,OU(c),a7(),st=D,ft=S,vr.transition=b}else i.current=c;if(kd&&(kd=!1,uo=i,Pd=E),b=i.pendingLanes,b===0&&(ao=null),c7(c.stateNode),nr(i,zt()),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(Cd)throw Cd=!1,i=pg,pg=null,i;return(Pd&1)!==0&&i.tag!==0&&da(),b=i.pendingLanes,(b&1)!==0?i===mg?Qu++:(Qu=0,mg=i):Qu=0,ro(),null}function da(){if(uo!==null){var i=Gx(Pd),s=vr.transition,c=ft;try{if(vr.transition=null,ft=16>i?16:i,uo===null)var h=!1;else{if(i=uo,uo=null,Pd=0,(st&6)!==0)throw Error(n(331));var E=st;for(st|=4,Oe=i.current;Oe!==null;){var b=Oe,S=b.child;if((Oe.flags&16)!==0){var D=b.deletions;if(D!==null){for(var $=0;$<D.length;$++){var Z=D[$];for(Oe=Z;Oe!==null;){var fe=Oe;switch(fe.tag){case 0:case 11:case 15:Gu(8,fe,b)}var me=fe.child;if(me!==null)me.return=fe,Oe=me;else for(;Oe!==null;){fe=Oe;var le=fe.sibling,ke=fe.return;if(q2(fe),fe===Z){Oe=null;break}if(le!==null){le.return=ke,Oe=le;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Le=Ie.child;if(Le!==null){Ie.child=null;do{var jt=Le.sibling;Le.sibling=null,Le=jt}while(Le!==null)}}Oe=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Oe=S;else e:for(;Oe!==null;){if(b=Oe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Gu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Oe=G;break e}Oe=b.return}}var Y=i.current;for(Oe=Y;Oe!==null;){S=Oe;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,Oe=Q;else e:for(S=Y;Oe!==null;){if(D=Oe,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Sd(9,D)}}catch(Me){Ft(D,D.return,Me)}if(D===S){Oe=null;break e}var Te=D.sibling;if(Te!==null){Te.return=D.return,Oe=Te;break e}Oe=D.return}}if(st=E,ro(),si&&typeof si.onPostCommitFiberRoot=="function")try{si.onPostCommitFiberRoot(Fc,i)}catch(Me){}h=!0}return h}finally{ft=c,vr.transition=s}}return!1}function aS(i,s,c){s=aa(c,s),s=v2(i,s,1),i=oo(i,s,1),s=zn(),i!==null&&(wu(i,1,s),nr(i,s))}function Ft(i,s,c){if(i.tag===3)aS(i,i,c);else for(;s!==null;){if(s.tag===3){aS(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ao===null||!ao.has(h))){i=aa(c,i),i=A2(s,i,1),s=oo(s,i,1),i=zn(),s!==null&&(wu(s,1,i),nr(s,i));break}}s=s.return}}function FU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=zn(),i.pingedLanes|=i.suspendedLanes&c,dn===i&&(yn&c)===c&&(en===4||en===3&&(yn&130023424)===yn&&500>zt()-hg?ns(i,0):fg|=c),nr(i,s)}function uS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Uc,Uc<<=1,(Uc&130023424)===0&&(Uc=4194304)));var c=zn();i=Pi(i,s),i!==null&&(wu(i,s,c),nr(i,c))}function BU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),uS(i,c)}function UU(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),uS(i,c)}var lS;lS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Jn.current)er=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return er=!1,AU(i,s,c);er=(i.flags&131072)!==0}else er=!1,Pt&&(s.flags&1048576)!==0&&j_(s,ad,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;xd(i,s),i=s.pendingProps;var E=Zs(s,Nn.current);oa(s,c),E=Vm(null,s,h,i,E,c);var b=qm();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,Zn(h)?(b=!0,id(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Fm(s),E.updater=Td,s.stateNode=E,E._reactInternals=s,Qm(s,h,i,c),s=tg(null,s,h,!0,b,c)):(s.tag=0,Pt&&b&&Cm(s),Hn(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(xd(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=zU(h),i=Ur(h,i),E){case 0:s=eg(null,s,h,i,c);break e;case 1:s=D2(null,s,h,i,c);break e;case 11:s=N2(null,s,h,i,c);break e;case 14:s=O2(null,s,h,Ur(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:Ur(h,E),eg(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),D2(i,s,h,E,c);case 3:e:{if(M2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Q_(i,s),hd(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=aa(Error(n(423)),s),s=F2(i,s,h,c,E);break e}else if(h!==E){E=aa(Error(n(424)),s),s=F2(i,s,h,c,E);break e}else for(fr=eo(s.stateNode.containerInfo.firstChild),dr=s,Pt=!0,Br=null,c=X_(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(na(),h===E){s=Oi(i,s,c);break e}Hn(i,s,h,c)}s=s.child}return s;case 5:return e2(s),i===null&&Nm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,wm(h,E)?S=null:b!==null&&wm(h,b)&&(s.flags|=32),L2(i,s),Hn(i,s,S,c),s.child;case 6:return i===null&&Nm(s),null;case 13:return B2(i,s,c);case 4:return Bm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ra(s,null,h,c):Hn(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),N2(i,s,h,E,c);case 7:return Hn(i,s,s.pendingProps,c),s.child;case 8:return Hn(i,s,s.pendingProps.children,c),s.child;case 12:return Hn(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(cd,h._currentValue),h._currentValue=S,b!==null)if(Fr(b.value,S)){if(b.children===E.children&&!Jn.current){s=Oi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var D=b.dependencies;if(D!==null){S=b.child;for(var $=D.firstContext;$!==null;){if($.context===h){if(b.tag===1){$=Ni(-1,c&-c),$.tag=2;var Z=b.updateQueue;if(Z!==null){Z=Z.shared;var fe=Z.pending;fe===null?$.next=$:($.next=fe.next,fe.next=$),Z.pending=$}}b.lanes|=c,$=b.alternate,$!==null&&($.lanes|=c),Dm(b.return,c,s),D.lanes|=c;break}$=$.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,D=S.alternate,D!==null&&(D.lanes|=c),Dm(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}Hn(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,oa(s,c),E=_r(E),h=h(E),s.flags|=1,Hn(i,s,h,c),s.child;case 14:return h=s.type,E=Ur(h,s.pendingProps),E=Ur(h.type,E),O2(i,s,h,E,c);case 15:return I2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),xd(i,s),s.tag=1,Zn(h)?(i=!0,id(s)):i=!1,oa(s,c),_2(s,h,E),Qm(s,h,E,c),tg(null,s,h,!0,i,c);case 19:return H2(i,s,c);case 22:return R2(i,s,c)}throw Error(n(156,s.tag))};function cS(i,s){return $x(i,s)}function HU(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 Ar(i,s,c,h){return new HU(i,s,c,h)}function wg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zU(i){if(typeof i=="function")return wg(i)?1:0;if(i!=null){if(i=i.$$typeof,i===de)return 11;if(i===oe)return 14}return 2}function fo(i,s){var c=i.alternate;return c===null?(c=Ar(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 Rd(i,s,c,h,E,b){var S=2;if(h=i,typeof i=="function")wg(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case z:return is(c.children,E,b,s);case ee:S=8,E|=8;break;case he:return i=Ar(12,c,s,E|2),i.elementType=he,i.lanes=b,i;case ye:return i=Ar(13,c,s,E),i.elementType=ye,i.lanes=b,i;case te:return i=Ar(19,c,s,E),i.elementType=te,i.lanes=b,i;case ae:return Ld(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case q:S=10;break e;case re:S=9;break e;case de:S=11;break e;case oe:S=14;break e;case Ce:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Ar(S,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function is(i,s,c,h){return i=Ar(7,i,h,s),i.lanes=c,i}function Ld(i,s,c,h){return i=Ar(22,i,h,s),i.elementType=ae,i.lanes=c,i.stateNode={isHidden:!1},i}function xg(i,s,c){return i=Ar(6,i,null,s),i.lanes=c,i}function _g(i,s,c){return s=Ar(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function jU(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=Kp(0),this.expirationTimes=Kp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Sg(i,s,c,h,E,b,S,D,$){return i=new jU(i,s,c,D,$),s===1?(s=1,b===!0&&(s|=8)):s=0,b=Ar(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(b),i}function $U(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function dS(i){if(!i)return no;i=i._reactInternals;e:{if(Yo(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(Zn(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(Zn(c))return U_(i,c,s)}return s}function fS(i,s,c,h,E,b,S,D,$){return i=Sg(c,h,!0,i,E,b,S,D,$),i.context=dS(null),c=i.current,h=zn(),E=lo(c),b=Ni(h,E),b.callback=s!=null?s:null,oo(c,b,E),i.current.lanes=E,wu(i,E,h),nr(i,h),i}function Dd(i,s,c,h){var E=s.current,b=zn(),S=lo(E);return c=dS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ni(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=oo(E,s,S),i!==null&&(jr(i,E,S,b),fd(i,E,S)),S}function Md(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function hS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function vg(i,s){hS(i,s),(i=i.alternate)&&hS(i,s)}function VU(){return null}var pS=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ag(i){this._internalRoot=i}Fd.prototype.render=Ag.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Dd(i,s,null,null)},Fd.prototype.unmount=Ag.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ts(function(){Dd(null,i,null,null)}),s[vi]=null}};function Fd(i){this._internalRoot=i}Fd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Qx();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Qi.length&&s!==0&&s<Qi[c].priority;c++);Qi.splice(c,0,i),c===0&&e_(i)}};function Cg(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Bd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function mS(){}function qU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=Md(S);b.call(Z)}}var S=fS(s,h,i,0,null,!1,!1,"",mS);return i._reactRootContainer=S,i[vi]=S.current,Du(i.nodeType===8?i.parentNode:i),ts(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var D=h;h=function(){var Z=Md($);D.call(Z)}}var $=Sg(i,0,!1,null,null,!1,!1,"",mS);return i._reactRootContainer=$,i[vi]=$.current,Du(i.nodeType===8?i.parentNode:i),ts(function(){Dd(s,$,c,h)}),$}function Ud(i,s,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var D=E;E=function(){var $=Md(S);D.call($)}}Dd(s,S,i,E)}else S=qU(c,s,i,E,h);return Md(S)}Xx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=Tu(s.pendingLanes);c!==0&&(Qp(s,c|1),nr(s,zt()),(st&6)===0&&(ca=zt()+500,ro()))}break;case 13:ts(function(){var h=Pi(i,1);if(h!==null){var E=zn();jr(h,i,1,E)}}),vg(i,1)}},Jp=function(i){if(i.tag===13){var s=Pi(i,134217728);if(s!==null){var c=zn();jr(s,i,134217728,c)}vg(i,134217728)}},Kx=function(i){if(i.tag===13){var s=lo(i),c=Pi(i,s);if(c!==null){var h=zn();jr(c,i,s,h)}vg(i,s)}},Qx=function(){return ft},Jx=function(i,s){var c=ft;try{return ft=i,s()}finally{ft=c}},Pe=function(i,s,c){switch(s){case"input":if(Kt(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=nd(h);if(!E)throw Error(n(90));At(h),Kt(h,E)}}}break;case"textarea":Qt(i,c);break;case"select":s=c.value,s!=null&&It(i,!!c.multiple,s,!1)}},kt=yg,kn=ts;var YU={usingClientEntryPoint:!1,Events:[Bu,Qs,nd,Rt,Un,yg]},Ju={findFiberByHostInstance:Wo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WU={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:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=zx(i),i===null?null:i.stateNode},findFiberByHostInstance:Ju.findFiberByHostInstance||VU,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 Hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hd.isDisabled&&Hd.supportsFiber)try{Fc=Hd.inject(WU),si=Hd}catch(i){}}return Yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YU,Yn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cg(s))throw Error(n(200));return $U(i,s,null,c)},Yn.createRoot=function(i,s){if(!Cg(i))throw Error(n(299));var c=!1,h="",E=pS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=Sg(i,1,!1,null,null,c,!1,h,E),i[vi]=s.current,Du(i.nodeType===8?i.parentNode:i),new Ag(s)},Yn.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=zx(s),i=i===null?null:i.stateNode,i},Yn.flushSync=function(i){return ts(i)},Yn.hydrate=function(i,s,c){if(!Bd(s))throw Error(n(200));return Ud(null,i,s,!0,c)},Yn.hydrateRoot=function(i,s,c){if(!Cg(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=pS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),s=fS(s,null,i,1,c!=null?c:null,E,!1,b,S),i[vi]=s.current,Du(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 Fd(s)},Yn.render=function(i,s,c){if(!Bd(s))throw Error(n(200));return Ud(null,i,s,!1,c)},Yn.unmountComponentAtNode=function(i){if(!Bd(i))throw Error(n(40));return i._reactRootContainer?(ts(function(){Ud(null,null,i,!1,function(){i._reactRootContainer=null,i[vi]=null})}),!0):!1},Yn.unstable_batchedUpdates=yg,Yn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Bd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Ud(i,s,c,!1,h)},Yn.version="18.3.1-next-f1338f8080-20240426",Yn}var lE;function cE(){if(lE)return Wf.exports;lE=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(),Wf.exports=kP(),Wf.exports}var vo=cE();function dE(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=dE(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=dE(e))&&(r&&(r+=" "),r+=t);return r}const PP=()=>document.querySelector(`:is(input, textarea)[name="${j}-user-input"]:not(:disabled)`),Kf=()=>{var e;return(e=PP())!=null?e:document.querySelector(`.${j}-dialog-content, .${j}-modal-content`)},NP=()=>{var e;return(e=Kf())==null?void 0:e.focus({preventScroll:!0})},Qf=()=>{const e=()=>{const n=document.querySelector(`.${j}-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 fE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hE=mo.createContext&&mo.createContext(fE),OP=["attr","size","title"];function IP(e,t){if(e==null)return{};var n=RP(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 RP(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 Nl(){return Nl=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},Nl.apply(this,arguments)}function pE(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 Ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pE(Object(n),!0).forEach(function(r){LP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LP(e,t,n){return t=DP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DP(e){var t=MP(e,"string");return typeof t=="symbol"?t:t+""}function MP(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 mE(e){return e&&e.map((t,n)=>mo.createElement(t.tag,Ol({key:n},t.attr),mE(t.child)))}function ht(e){return t=>mo.createElement(FP,Nl({attr:Ol({},e.attr)},t),mE(e.child))}function FP(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=IP(e,OP),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),mo.createElement("svg",Nl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Ol(Ol({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&mo.createElement("title",null,a),e.children)};return hE!==void 0?mo.createElement(hE.Consumer,null,n=>t(n)):t(fE)}function BP(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 UP=e=>O.isValidElement(e)?O.cloneElement(e,{"aria-hidden":!0}):e,yi=({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:x.jsx("button",{className:W(e,`${j}-icon-button`),type:r,"aria-label":o,"aria-haspopup":a,"aria-expanded":u,title:l,onClick:f,disabled:d,children:t?x.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:"","aria-hidden":"true",loading:"lazy"}):UP(n)}),HP="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",zP=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=Qe(),{status:a}=rr(),u=qn(),l=o==="messaging",d=a.type==="dialog"||a.type==="modal",f=l?u.launcher.openCommerceClientAriaLabel:u.launcher.openCopilotAriaLabel,p=r||f,m=l?x.jsx(BP,{className:W(t,`${j}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||HP,alt:u.launcher.logoAlt,className:W(t,`${j}-minimized-icon-img`)});return x.jsx(yi,{className:W(t,`${j}-minimized-button`),ariaLabel:p,ariaHasPopup:d?"dialog":void 0,ariaExpanded:!1,title:p,icon:m,onClick:e})},jP=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=Qe(),r=O.useId(),o=O.useRef(null),[a]=O.useState(()=>document.createElement("div"));O.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{Ra(!1),gi(!0),setTimeout(NP)};return x.jsxs(x.Fragment,{children:[vo.createPortal(x.jsx("a",{href:`#${r}`,className:W(e,`${j}-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),vo.createPortal(x.jsx("div",{id:r,ref:o,className:W(e,`${j}-minimized-container`,n),style:t,children:x.jsx(zP,{onClick:u})}),document.body)]})},$P=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"}),Jf=({className:e,label:t,onClick:n,disabled:r=!1})=>{const o=qn(),a=t!=null?t:o.common.close;return x.jsx("button",{"aria-label":a,title:a,className:W(e,`${j}-close-button`),disabled:r,onClick:n,type:"button",children:x.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:x.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"})})})},VP=({file:e,componentType:t,globalClassName:n,disabled:r=!1,onRemove:o})=>{const a=e.name||"",[u,l]=O.useState("");return O.useEffect(()=>{const d=URL.createObjectURL(e);return l(d),()=>URL.revokeObjectURL(d)},[e]),x.jsxs("div",{className:W(n,`cim-${t}-component`,`${j}-image-file-preview`),children:[x.jsx("img",{className:W(n,`cim-${t}-component`,`${j}-image-preview`),src:u,alt:`${a} preview`,loading:"lazy"}),x.jsx("span",{className:W(n,`cim-${t}-component`,`${j}-image-file-name`),title:a,children:a}),x.jsx(Jf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",disabled:r,onClick:o})]})};function gE(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 EE(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 ms(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 qP(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 yE(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 bE(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 YP(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 WP(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 GP(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 XP(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 KP(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 QP(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 JP=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=x.jsx(QP,{}),onFiles:l})=>{const d=O.useRef(null),f=O.useId(),p=r!=null?r:f,m=O.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=O.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return x.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[x.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-label`),"aria-hidden":"true",children:u}),x.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${j}-file-input`),type:"file",id:p,accept:t,name:`${j}-file-input`,disabled:n,onInput:T})]})},Il=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>x.jsx("button",{"aria-label":a,className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),ZP=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?bE:ms;return n?x.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(r,{"aria-hidden":"true",size:"16px"})},eN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{const a=qn();if((t==null?void 0:t.buttonType)==="icon"){const l=t.buttonIcon==="arrow"?bE:ms;return x.jsx(yi,{className:W(e,n,`cim-${r}-component`,`${j}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||a.searchBar.sendMessageAriaLabel,icon:t!=null&&t.buttonIconUrl?null:x.jsx(l,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const u=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(Il,{className:W(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[u&&x.jsx(ZP,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||a.common.search]})};function tN(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 nN=()=>{const{messages:e}=Vn(),{handleCancel:t}=Wr();return{cancelRequest:O.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},rN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Qe(),{cancelRequest:r}=nN(),o=qn();return n!=null&&n.enableCancelSearch?x.jsx(yi,{className:W(t,`${j}-cancel-button`),ariaLabel:o.searchBar.cancelProcessingAriaLabel,title:o.searchBar.cancelRequestTitle,icon:x.jsx(tN,{}),disabled:!e,onClick:r}):null};function ez(){}function tz(){}function TE(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 wE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sN={};function xE(e,t){return(sN.jsx?oN:iN).test(e)}const aN=/[ \t\n\f\r]/g;function uN(e){return typeof e=="object"?e.type==="text"?_E(e.value):!1:_E(e)}function _E(e){return e.replace(aN,"")===""}class Fa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Fa.prototype.normal={},Fa.prototype.property={},Fa.prototype.space=void 0;function SE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Fa(n,r,t)}function Ba(e){return e.toLowerCase()}class Wn{constructor(t,n){this.attribute=n,this.property=t}}Wn.prototype.attribute="",Wn.prototype.booleanish=!1,Wn.prototype.boolean=!1,Wn.prototype.commaOrSpaceSeparated=!1,Wn.prototype.commaSeparated=!1,Wn.prototype.defined=!1,Wn.prototype.mustUseProperty=!1,Wn.prototype.number=!1,Wn.prototype.overloadedBoolean=!1,Wn.prototype.property="",Wn.prototype.spaceSeparated=!1,Wn.prototype.space=void 0;let lN=0;const We=Co(),Yt=Co(),Zf=Co(),Ee=Co(),pt=Co(),Ao=Co(),ir=Co();function Co(){return Zu(2,++lN)}const eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Yt,commaOrSpaceSeparated:ir,commaSeparated:Ao,number:Ee,overloadedBoolean:Zf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),th=Object.keys(eh);class nh extends Wn{constructor(t,n,r,o){let a=-1;if(super(t,n),vE(this,"space",o),typeof r=="number")for(;++a<th.length;){const u=th[a];vE(this,th[a],(r&eh[u])===eh[u])}}}nh.prototype.defined=!0;function vE(e,t,n){n&&(e[t]=n)}function gs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new nh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ba(r)]=r,n[Ba(a.attribute)]=r}return new Fa(t,n,e.space)}const AE=gs({properties:{ariaActiveDescendant:null,ariaAtomic:Yt,ariaAutoComplete:null,ariaBusy:Yt,ariaChecked:Yt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Yt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Yt,ariaFlowTo:pt,ariaGrabbed:Yt,ariaHasPopup:null,ariaHidden:Yt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:Ee,ariaLive:null,ariaModal:Yt,ariaMultiLine:Yt,ariaMultiSelectable:Yt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Yt,ariaReadOnly:Yt,ariaRelevant:null,ariaRequired:Yt,ariaRoleDescription:pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Yt,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 CE(e,t){return t in e?e[t]:t}function kE(e,t){return CE(e,t.toLowerCase())}const cN=gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ao,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:pt,autoFocus:We,autoPlay:We,blocking:pt,capture:null,charSet:null,checked:We,cite:null,className:pt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Yt,controls:We,controlsList:pt,coords:Ee|Ao,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Zf,draggable:Yt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:pt,height:Ee,hidden:Zf,high:Ee,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:pt,itemRef:pt,itemScope:We,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:Ee,pattern:null,ping:pt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:pt,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:pt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Yt,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:We,useMap:null,value:Yt,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:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Yt,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:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:Ao,part:pt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:kE}),dN=gs({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:ir,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:We,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:Ao,g2:Ao,glyphName:Ao,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:ir,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:ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ir,rev:ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ir,requiredFeatures:ir,requiredFonts:ir,requiredFormats:ir,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:ir,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:ir,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:ir,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:CE}),PE=gs({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()}}),NE=gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kE}),OE=gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fN={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"},hN=/[A-Z]/g,IE=/-[a-z]/g,pN=/^data[-\w.:]+$/i;function Rl(e,t){const n=Ba(t);let r=t,o=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(IE,gN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!IE.test(a)){let u=a.replace(hN,mN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=nh}return new o(r,t)}function mN(e){return"-"+e.toLowerCase()}function gN(e){return e.charAt(1).toUpperCase()}const Ua=SE([AE,cN,PE,NE,OE],"html"),Bi=SE([AE,dN,PE,NE,OE],"svg");function RE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function LE(e){return e.join(" ").trim()}var Es={},rh,DE;function EN(){if(DE)return rh;DE=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(P,_){if(typeof P!="string")throw new TypeError("First argument must be a string");if(!P)return[];_=_||{};var C=1,A=1;function H(te){var oe=te.match(t);oe&&(C+=oe.length);var Ce=te.lastIndexOf(d);A=~Ce?te.length-Ce:A+te.length}function U(){var te={line:C,column:A};return function(oe){return oe.position=new L(te),he(),oe}}function L(te){this.start=te,this.end={line:C,column:A},this.source=_.source}L.prototype.content=P;function z(te){var oe=new Error(_.source+":"+C+":"+A+": "+te);if(oe.reason=te,oe.filename=_.source,oe.line=C,oe.column=A,oe.source=P,!_.silent)throw oe}function ee(te){var oe=te.exec(P);if(oe){var Ce=oe[0];return H(Ce),P=P.slice(Ce.length),oe}}function he(){ee(n)}function q(te){var oe;for(te=te||[];oe=re();)oe!==!1&&te.push(oe);return te}function re(){var te=U();if(!(f!=P.charAt(0)||p!=P.charAt(1))){for(var oe=2;m!=P.charAt(oe)&&(p!=P.charAt(oe)||f!=P.charAt(oe+1));)++oe;if(oe+=2,m===P.charAt(oe-1))return z("End of comment missing");var Ce=P.slice(2,oe-2);return A+=2,H(Ce),P=P.slice(oe),A+=2,te({type:T,comment:Ce})}}function de(){var te=U(),oe=ee(r);if(oe){if(re(),!ee(o))return z("property missing ':'");var Ce=ee(a),ae=te({type:y,property:v(oe[0].replace(e,m)),value:Ce?v(Ce[0].replace(e,m)):m});return ee(u),ae}}function ye(){var te=[];q(te);for(var oe;oe=de();)oe!==!1&&(te.push(oe),q(te));return te}return he(),ye()}function v(P){return P?P.replace(l,m):m}return rh=w,rh}var ME;function yN(){if(ME)return Es;ME=1;var e=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=n;const t=e(EN());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 Es}var Ha={},FE;function bN(){if(FE)return Ha;FE=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,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 Ha.camelCase=d,Ha}var za,BE;function TN(){if(BE)return za;BE=1;var e=za&&za.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(yN()),n=bN();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,za=r,za}var wN=TN();const xN=Ue(wN),Ll=UE("end"),Gr=UE("start");function UE(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 HE(e){const t=Gr(e),n=Ll(e);if(t&&n)return{start:t,end:n}}function ja(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zE(e.position):"start"in e||"end"in e?zE(e):"line"in e||"column"in e?ih(e):""}function ih(e){return jE(e&&e.line)+":"+jE(e&&e.column)}function zE(e){return ih(e&&e.start)+"-"+ih(e&&e.end)}function jE(e){return e&&typeof e=="number"?e:1}class Sn 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=F({},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=ja(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}}Sn.prototype.file="",Sn.prototype.name="",Sn.prototype.reason="",Sn.prototype.message="",Sn.prototype.stack="",Sn.prototype.column=void 0,Sn.prototype.line=void 0,Sn.prototype.ancestors=void 0,Sn.prototype.cause=void 0,Sn.prototype.fatal=void 0,Sn.prototype.place=void 0,Sn.prototype.ruleId=void 0,Sn.prototype.source=void 0;const oh={}.hasOwnProperty,_N=new Map,SN=/[A-Z]/g,vN=new Set(["table","tbody","thead","tfoot","tr"]),AN=new Set(["td","th"]),$E="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function CN(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=DN(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=LN(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"?Bi:Ua,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=VE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function VE(e,t,n){if(t.type==="element")return kN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return PN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ON(e,t,n);if(t.type==="mdxjsEsm")return NN(e,t);if(t.type==="root")return IN(e,t,n);if(t.type==="text")return RN(e,t)}function kN(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Bi,e.schema=o),e.ancestors.push(t);const a=YE(e,t.tagName,!1),u=MN(e,t);let l=ah(e,t);return vN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!uN(d):!0})),qE(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function PN(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)}$a(e,t.position)}function NN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$a(e,t.position)}function ON(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Bi,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:YE(e,t.name,!0),u=FN(e,t),l=ah(e,t);return qE(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function IN(e,t,n){const r={};return sh(r,ah(e,t)),e.create(t,e.Fragment,r,n)}function RN(e,t){return t.value}function qE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LN(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 DN(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Gr(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 MN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&oh.call(t.properties,o)){const a=BN(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&AN.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 FN(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 $a(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 $a(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function ah(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_N;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const l=VE(e,a,u);l!==void 0&&n.push(l)}return n}function BN(e,t,n){const r=Rl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wE(n):LE(n)),r.property==="style"){let o=typeof n=="object"?n:UN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=HN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?fN[r.property]||r.property:r.attribute,n]}}function UN(e,t){try{return xN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new Sn("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=$E+"#cannot-parse-style-attribute",o}}function YE(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=xE(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=xE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return oh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);$a(e)}function $a(e,t){const n=new Sn("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=$E+"#cannot-handle-mdx-estrees-without-createevaluater",n}function HN(e){const t={};let n;for(n in e)oh.call(e,n)&&(t[zN(n)]=e[n]);return t}function zN(e){let t=e.replace(SN,jN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jN(e){return"-"+e.toLowerCase()}const uh={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"]},$N={};function lh(e,t){const n=$N,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return WE(e,r,o)}function WE(e,t,n){if(VN(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 GE(e.children,t,n)}return Array.isArray(e)?GE(e,t,n):""}function GE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=WE(e[o],t,n);return r.join("")}function VN(e){return!!(e&&typeof e=="object")}const XE=document.createElement("i");function ch(e){const t="&"+e+";";XE.innerHTML=t;const n=XE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function or(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 Er(e,t){return e.length>0?(or(e,e.length,0,t),e):t}const KE={}.hasOwnProperty;function QE(e){const t={};let n=-1;for(;++n<e.length;)qN(t,e[n]);return t}function qN(e,t){let n;for(n in t){const o=(KE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){KE.call(o,u)||(o[u]=[]);const l=a[u];YN(o[u],Array.isArray(l)?l:l?[l]:[])}}}function YN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);or(e,0,0,r)}function JE(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 Pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dn=Ui(/[A-Za-z]/),vn=Ui(/[\dA-Za-z]/),WN=Ui(/[#-'*+\--9=?A-Z^-~]/);function Dl(e){return e!==null&&(e<32||e===127)}const dh=Ui(/\d/),GN=Ui(/[\dA-Fa-f]/),XN=Ui(/[!-/:-@[-`{-~]/);function He(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 Ml=Ui(new RegExp("\\p{P}|\\p{S}","u")),ko=Ui(/\s/);function Ui(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&vn(e.charCodeAt(n+1))&&vn(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 KN={tokenize:QN};function QN(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 He(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const JN={tokenize:ZN},ZE={tokenize:e3};function ZN(e){const t=this,n=[];let r=0,o,a,u;return l;function l(A){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const H=t.events.length;let U=H,L;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){L=t.events[U][1].end;break}_(r);let z=H;for(;z<t.events.length;)t.events[z][1].end=F({},L),z++;return or(t.events,U+1,0,t.events.slice(H)),t.events.length=z,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(ZE,p,m)(A)}function p(A){return o&&C(),_(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(ZE,y,w)(A)}function y(A){return r++,n.push([t.currentConstruct,t.containerState]),T(A)}function w(A){if(A===null){o&&C(),_(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){P(e.exit("chunkFlow"),!0),_(0),e.consume(A);return}return He(A)?(e.consume(A),P(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(A),v)}function P(A,H){const U=t.sliceStream(A);if(H&&U.push(null),A.previous=a,a&&(a.next=A),a=A,o.defineSkip(A.start),o.write(U),t.parser.lazy[A.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<u&&(!o.events[L][1].end||o.events[L][1].end.offset>u))return;const z=t.events.length;let ee=z,he,q;for(;ee--;)if(t.events[ee][0]==="exit"&&t.events[ee][1].type==="chunkFlow"){if(he){q=t.events[ee][1].end;break}he=!0}for(_(r),L=z;L<t.events.length;)t.events[L][1].end=F({},q),L++;or(t.events,ee+1,0,t.events.slice(z)),t.events.length=L}}function _(A){let H=n.length;for(;H-- >A;){const U=n[H];t.containerState=U[1],U[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 e3(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 bs(e){if(e===null||mt(e)||ko(e))return 1;if(Ml(e))return 2}function Fl(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 fh={name:"attention",resolveAll:t3,tokenize:n3};function t3(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=F({},e[r][1].end),T=F({},e[n][1].start);ey(m,-d),ey(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},l.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Er(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Er(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Er(f,Fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Er(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=Er(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,or(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 n3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=bs(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=bs(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 ey(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const r3={name:"autolink",tokenize:i3};function i3(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 Dn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||vn(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||vn(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||Dl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):WN(y)?(e.consume(y),f):n(y)}function p(y){return vn(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||vn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const Va={partial:!0,tokenize:o3};function o3(e,t,n){return r;function r(a){return Ze(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const ty={continuation:{tokenize:a3},exit:u3,name:"blockQuote",tokenize:s3};function s3(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 a3(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(ty,t,n)(u)}}function u3(e){e.exit("blockQuote")}const ny={name:"characterEscape",tokenize:l3};function l3(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 XN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ry={name:"characterReference",tokenize:c3};function c3(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=vn,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=GN,p):(e.enter("characterReferenceValue"),a=7,u=dh,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===vn&&!ch(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 iy={partial:!0,tokenize:f3},oy={concrete:!0,name:"codeFenced",tokenize:d3};function d3(e,t,n){const r=this,o={partial:!0,tokenize:U};let a=0,u=0,l;return d;function d(L){return f(L)}function f(L){const z=r.events[r.events.length-1];return a=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,l=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===l?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?it(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(iy,v,H)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(L))}function T(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(L)):L===96&&L===l?n(L):(e.consume(L),T)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===l?n(L):(e.consume(L),w)}function v(L){return e.attempt(o,H,P)(L)}function P(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),_}function _(L){return a>0&&Ze(L)?it(e,C,"linePrefix",a+1)(L):C(L)}function C(L){return L===null||He(L)?e.check(iy,v,H)(L):(e.enter("codeFlowValue"),A(L))}function A(L){return L===null||He(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),A)}function H(L){return e.exit("codeFenced"),t(L)}function U(L,z,ee){let he=0;return q;function q(oe){return L.enter("lineEnding"),L.consume(oe),L.exit("lineEnding"),re}function re(oe){return L.enter("codeFencedFence"),Ze(oe)?it(L,de,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):de(oe)}function de(oe){return oe===l?(L.enter("codeFencedFenceSequence"),ye(oe)):ee(oe)}function ye(oe){return oe===l?(he++,L.consume(oe),ye):he>=u?(L.exit("codeFencedFenceSequence"),Ze(oe)?it(L,te,"whitespace")(oe):te(oe)):ee(oe)}function te(oe){return oe===null||He(oe)?(L.exit("codeFencedFence"),z(oe)):ee(oe)}}}function f3(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 hh={name:"codeIndented",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(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):He(f)?e.attempt(h3,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function m3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):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):He(u)?o(u):n(u)}}const g3={name:"codeText",previous:y3,resolve:E3,tokenize:b3};function E3(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 y3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function b3(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)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class T3{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&&qa(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),qa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qa(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);qa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qa(this.left,n.reverse())}}}function qa(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 sy(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new T3(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,w3(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=F({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return or(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function w3(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 P=[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,P.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):P.pop(),T=P.length;T--;){const _=l.slice(P[T],P[T+1]),C=a.pop();d.push([C,C+_.length-1]),e.splice(C,2,_)}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 x3={resolve:S3,tokenize:v3},_3={partial:!0,tokenize:A3};function S3(e){return sy(e),e}function v3(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):He(l)?e.check(_3,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 A3(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||He(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 ay(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(_){return _===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(_),e.exit(a),T):_===null||_===32||_===41||Dl(_)?n(_):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(_))}function T(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===62?(e.exit("chunkString"),e.exit(l),T(_)):_===null||_===60||He(_)?n(_):(e.consume(_),_===92?w:y)}function w(_){return _===60||_===62||_===92?(e.consume(_),y):y(_)}function v(_){return!p&&(_===null||_===41||mt(_))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(_)):p<f&&_===40?(e.consume(_),p++,v):_===41?(e.consume(_),p--,v):_===null||_===32||_===40||Dl(_)?n(_):(e.consume(_),_===92?P:v)}function P(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function uy(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):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||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 ly(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):He(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||He(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Ya(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const C3={name:"definition",tokenize:P3},k3={partial:!0,tokenize:N3};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 uy.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=Pr(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)?Ya(e,f)(y):f(y)}function f(y){return ay(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(k3,m,m)(y)}function m(y){return Ze(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function N3(e,t,n){return r;function r(l){return mt(l)?Ya(e,o)(l):n(l)}function o(l){return ly(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||He(l)?t(l):n(l)}}const O3={name:"hardBreakEscape",tokenize:I3};function I3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const R3={name:"headingAtx",resolve:L3,tokenize:D3};function L3(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"},or(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function D3(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||He(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 M3=["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"],cy=["pre","script","style","textarea"],F3={concrete:!0,name:"htmlFlow",resolveTo:H3,tokenize:z3},B3={partial:!0,tokenize:$3},U3={partial:!0,tokenize:j3};function H3(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 z3(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):Dn(I)?(e.consume(I),u=String.fromCharCode(I),P):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,l=0,w):Dn(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 ue="CDATA[";return I===ue.charCodeAt(l++)?(e.consume(I),l===ue.length?r.interrupt?t:de:w):n(I)}function v(I){return Dn(I)?(e.consume(I),u=String.fromCharCode(I),P):n(I)}function P(I){if(I===null||I===47||I===62||mt(I)){const ue=I===47,be=u.toLowerCase();return!ue&&!a&&cy.includes(be)?(o=1,r.interrupt?t(I):de(I)):M3.includes(u.toLowerCase())?(o=6,ue?(e.consume(I),_):r.interrupt?t(I):de(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?C(I):A(I))}return I===45||vn(I)?(e.consume(I),u+=String.fromCharCode(I),P):n(I)}function _(I){return I===62?(e.consume(I),r.interrupt?t:de):n(I)}function C(I){return Ze(I)?(e.consume(I),C):q(I)}function A(I){return I===47?(e.consume(I),q):I===58||I===95||Dn(I)?(e.consume(I),H):Ze(I)?(e.consume(I),A):q(I)}function H(I){return I===45||I===46||I===58||I===95||vn(I)?(e.consume(I),H):U(I)}function U(I){return I===61?(e.consume(I),L):Ze(I)?(e.consume(I),U):A(I)}function L(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,z):Ze(I)?(e.consume(I),L):ee(I)}function z(I){return I===d?(e.consume(I),d=null,he):I===null||He(I)?n(I):(e.consume(I),z)}function ee(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mt(I)?U(I):(e.consume(I),ee)}function he(I){return I===47||I===62||Ze(I)?A(I):n(I)}function q(I){return I===62?(e.consume(I),re):n(I)}function re(I){return I===null||He(I)?de(I):Ze(I)?(e.consume(I),re):n(I)}function de(I){return I===45&&o===2?(e.consume(I),Ce):I===60&&o===1?(e.consume(I),ae):I===62&&o===4?(e.consume(I),M):I===63&&o===3?(e.consume(I),k):I===93&&o===5?(e.consume(I),se):He(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(B3,K,ye)(I)):I===null||He(I)?(e.exit("htmlFlowData"),ye(I)):(e.consume(I),de)}function ye(I){return e.check(U3,te,K)(I)}function te(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||He(I)?ye(I):(e.enter("htmlFlowData"),de(I))}function Ce(I){return I===45?(e.consume(I),k):de(I)}function ae(I){return I===47?(e.consume(I),u="",J):de(I)}function J(I){if(I===62){const ue=u.toLowerCase();return cy.includes(ue)?(e.consume(I),M):de(I)}return Dn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),J):de(I)}function se(I){return I===93?(e.consume(I),k):de(I)}function k(I){return I===62?(e.consume(I),M):I===45&&o===2?(e.consume(I),k):de(I)}function M(I){return I===null||He(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),M)}function K(I){return e.exit("htmlFlow"),t(I)}}function j3(e,t,n){const r=this;return o;function o(u){return He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function $3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Va,t,n)}}const V3={name:"htmlText",tokenize:q3};function q3(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),U):k===63?(e.consume(k),A):Dn(k)?(e.consume(k),ee):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Dn(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):He(k)?(u=m,ae(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ce(k):k===45?T(k):m(k)}function w(k){const M="CDATA[";return k===M.charCodeAt(a++)?(e.consume(k),a===M.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),P):He(k)?(u=v,ae(k)):(e.consume(k),v)}function P(k){return k===93?(e.consume(k),_):v(k)}function _(k){return k===62?Ce(k):k===93?(e.consume(k),_):v(k)}function C(k){return k===null||k===62?Ce(k):He(k)?(u=C,ae(k)):(e.consume(k),C)}function A(k){return k===null?n(k):k===63?(e.consume(k),H):He(k)?(u=A,ae(k)):(e.consume(k),A)}function H(k){return k===62?Ce(k):A(k)}function U(k){return Dn(k)?(e.consume(k),L):n(k)}function L(k){return k===45||vn(k)?(e.consume(k),L):z(k)}function z(k){return He(k)?(u=z,ae(k)):Ze(k)?(e.consume(k),z):Ce(k)}function ee(k){return k===45||vn(k)?(e.consume(k),ee):k===47||k===62||mt(k)?he(k):n(k)}function he(k){return k===47?(e.consume(k),Ce):k===58||k===95||Dn(k)?(e.consume(k),q):He(k)?(u=he,ae(k)):Ze(k)?(e.consume(k),he):Ce(k)}function q(k){return k===45||k===46||k===58||k===95||vn(k)?(e.consume(k),q):re(k)}function re(k){return k===61?(e.consume(k),de):He(k)?(u=re,ae(k)):Ze(k)?(e.consume(k),re):he(k)}function de(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,ye):He(k)?(u=de,ae(k)):Ze(k)?(e.consume(k),de):(e.consume(k),te)}function ye(k){return k===o?(e.consume(k),o=void 0,oe):k===null?n(k):He(k)?(u=ye,ae(k)):(e.consume(k),ye)}function te(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||mt(k)?he(k):(e.consume(k),te)}function oe(k){return k===47||k===62||mt(k)?he(k):n(k)}function Ce(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ae(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 ph={name:"labelEnd",resolveAll:X3,resolveTo:K3,tokenize:Q3},Y3={tokenize:J3},W3={tokenize:Z3},G3={tokenize:eO};function X3(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&&or(e,0,e.length,n),e}function K3(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:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Er(l,e.slice(a+1,a+r+3)),l=Er(l,[["enter",p,t]]),l=Er(l,Fl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Er(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Er(l,e.slice(u+1)),l=Er(l,[["exit",d,t]]),or(e,a,e.length,l),e}function Q3(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(Pr(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(Y3,p,u?p:m)(T):T===91?e.attempt(W3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(G3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function J3(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)?Ya(e,a)(m):a(m)}function a(m){return m===41?p(m):ay(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?Ya(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?ly(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?Ya(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 Z3(e,t,n){const r=this;return o;function o(l){return uy.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function eO(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 tO={name:"labelStartImage",resolveAll:ph.resolveAll,tokenize:nO};function nO(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 rO={name:"labelStartLink",resolveAll:ph.resolveAll,tokenize:iO};function iO(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 mh={name:"lineEnding",tokenize:oO};function oO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Bl={name:"thematicBreak",tokenize:sO};function sO(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||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?it(e,l,"whitespace")(f):l(f))}}const Gn={continuation:{tokenize:cO},exit:fO,name:"list",tokenize:lO},aO={partial:!0,tokenize:hO},uO={partial:!0,tokenize:dO};function lO(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:dh(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(Bl,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 dh(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(Va,r.interrupt?n:p,e.attempt(aO,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 cO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Va,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(uO,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Gn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function dO(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 fO(e){e.exit(this.containerState.type)}function hO(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 dy={name:"setextUnderline",resolveTo:pO,tokenize:mO};function pO(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:F({},e[r][1].start),end:F({},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=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function mO(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||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const gO={tokenize:EO};function EO(e){const t=this,n=e.attempt(Va,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(x3,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 yO={resolveAll:hy()},bO=fy("string"),TO=fy("text");function fy(e){return{resolveAll:hy(e==="text"?wO: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 hy(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 wO(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:F({},r.end)};r.end=F({},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 xO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:C3},disable:{null:[]},document:{42:Gn,43:Gn,45:Gn,48:Gn,49:Gn,50:Gn,51:Gn,52:Gn,53:Gn,54:Gn,55:Gn,56:Gn,57:Gn,62:ty},flow:{35:R3,42:Bl,45:[dy,Bl],60:F3,61:dy,95:Bl,96:oy,126:oy},flowInitial:{[-2]:hh,[-1]:hh,32:hh},insideSpan:{null:[fh,yO]},string:{38:ry,92:ny},text:{[-5]:mh,[-4]:mh,[-3]:mh,33:tO,38:ry,42:fh,60:[r3,V3],91:rO,92:[O3,ny],93:ph,95:fh,96:g3}},Symbol.toStringTag,{value:"Module"}));function _O(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:z(U),check:z(L),consume:C,enter:A,exit:H,interrupt:z(L,{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(re){return u=Er(u,re),P(),u[u.length-1]!==null?[]:(ee(t,0),f.events=Fl(a,f.events,f),f.events)}function T(re,de){return vO(y(re),de)}function y(re){return SO(u,re)}function w(){const{_bufferIndex:re,_index:de,line:ye,column:te,offset:oe}=r;return{_bufferIndex:re,_index:de,line:ye,column:te,offset:oe}}function v(re){o[re.line]=re.column,q()}function P(){let re;for(;r._index<u.length;){const de=u[r._index];if(typeof de=="string")for(re=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===re&&r._bufferIndex<de.length;)_(de.charCodeAt(r._bufferIndex));else _(de)}}function _(re){p=p(re)}function C(re){He(re)?(r.line++,r.column=1,r.offset+=re===-3?2:1,q()):re!==-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=re}function A(re,de){const ye=de||{};return ye.type=re,ye.start=w(),f.events.push(["enter",ye,f]),l.push(ye),ye}function H(re){const de=l.pop();return de.end=w(),f.events.push(["exit",de,f]),de}function U(re,de){ee(re,de.from)}function L(re,de){de.restore()}function z(re,de){return ye;function ye(te,oe,Ce){let ae,J,se,k;return Array.isArray(te)?K(te):"tokenize"in te?K([te]):M(te);function M(Ae){return we;function we(Re){const Fe=Re!==null&&Ae[Re],at=Re!==null&&Ae.null,ln=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(at)?at:at?[at]:[]];return K(ln)(Re)}}function K(Ae){return ae=Ae,J=0,Ae.length===0?Ce:I(Ae[J])}function I(Ae){return we;function we(Re){return k=he(),se=Ae,Ae.partial||(f.currentConstruct=Ae),Ae.name&&f.parser.constructs.disable.null.includes(Ae.name)?be():Ae.tokenize.call(de?Object.assign(Object.create(f),de):f,d,ue,be)(Re)}}function ue(Ae){return re(se,k),oe}function be(Ae){return k.restore(),++J<ae.length?I(ae[J]):Ce}}}function ee(re,de){re.resolveAll&&!a.includes(re)&&a.push(re),re.resolve&&or(f.events,de,f.events.length-de,re.resolve(f.events.slice(de),f)),re.resolveTo&&(f.events=re.resolveTo(f.events,f))}function he(){const re=w(),de=f.previous,ye=f.currentConstruct,te=f.events.length,oe=Array.from(l);return{from:te,restore:Ce};function Ce(){r=re,f.previous=de,f.currentConstruct=ye,f.events.length=te,l=oe,q()}}function q(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function SO(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 vO(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 Zm(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var _U=typeof WeakMap=="function"?WeakMap:Map;function v2(i,s,c){c=Ni(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){Cd||(Cd=!0,pg=h),Zm(i,s)},c}function A2(i,s,c){c=Ni(-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(){Zm(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){Zm(i,s),typeof h!="function"&&(ao===null?ao=new Set([this]):ao.add(this));var v=s.stack;this.componentDidCatch(s.value,{componentStack:v!==null?v:""})}),c}function C2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new _U;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=FU.bind(null,i,s,c),s.then(i,i))}function k2(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 P2(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=Ni(-1,1),s.tag=2,oo(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var SU=H.ReactCurrentOwner,er=!1;function zn(i,s,c,h){s.child=i===null?X_(s,null,c,h):ra(s,i.child,c,h)}function N2(i,s,c,h,E){c=c.render;var b=s.ref;return oa(s,E),h=Vm(i,s,c,h,b,E),c=qm(),i!==null&&!er?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Oi(i,s,E)):(Nt&&c&&Cm(s),s.flags|=1,zn(i,s,h,E),s.child)}function O2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!wg(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,I2(i,s,b,h,E)):(i=Rd(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 v=b.memoizedProps;if(c=c.compare,c=c!==null?c:Iu,c(v,h)&&i.ref===s.ref)return Oi(i,s,E)}return s.flags|=1,i=fo(b,h),i.ref=s.ref,i.return=s,s.child=i}function I2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(Iu(b,h)&&i.ref===s.ref)if(er=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(er=!0);else return s.lanes=i.lanes,Oi(i,s,E)}return eg(i,s,c,h,E)}function R2(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(la,hr),hr|=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(la,hr),hr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(la,hr),hr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(la,hr),hr|=h;return zn(i,s,E,c),s.child}function L2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function eg(i,s,c,h,E){var b=Zn(c)?Go:On.current;return b=Zs(s,b),oa(s,E),c=Vm(i,s,c,h,b,E),h=qm(),i!==null&&!er?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Oi(i,s,E)):(Nt&&h&&Cm(s),s.flags|=1,zn(i,s,c,E),s.child)}function D2(i,s,c,h,E){if(Zn(c)){var b=!0;id(s)}else b=!1;if(oa(s,E),s.stateNode===null)xd(i,s),_2(s,c,h),Qm(s,c,h,E),h=!0;else if(i===null){var v=s.stateNode,D=s.memoizedProps;v.props=D;var $=v.context,te=c.contextType;typeof te=="object"&&te!==null?te=_r(te):(te=Zn(c)?Go:On.current,te=Zs(s,te));var he=c.getDerivedStateFromProps,ge=typeof he=="function"||typeof v.getSnapshotBeforeUpdate=="function";ge||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(D!==h||$!==te)&&S2(s,v,h,te),io=!1;var le=s.memoizedState;v.state=le,hd(s,h,v,E),$=s.memoizedState,D!==h||le!==$||Jn.current||io?(typeof he=="function"&&(Km(s,c,he,h),$=s.memoizedState),(D=io||x2(s,c,D,h,le,$,te))?(ge||typeof v.UNSAFE_componentWillMount!="function"&&typeof v.componentWillMount!="function"||(typeof v.componentWillMount=="function"&&v.componentWillMount(),typeof v.UNSAFE_componentWillMount=="function"&&v.UNSAFE_componentWillMount()),typeof v.componentDidMount=="function"&&(s.flags|=4194308)):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=$),v.props=h,v.state=$,v.context=te,h=D):(typeof v.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{v=s.stateNode,Q_(i,s),D=s.memoizedProps,te=s.type===s.elementType?D:Ur(s.type,D),v.props=te,ge=s.pendingProps,le=v.context,$=c.contextType,typeof $=="object"&&$!==null?$=_r($):($=Zn(c)?Go:On.current,$=Zs(s,$));var ke=c.getDerivedStateFromProps;(he=typeof ke=="function"||typeof v.getSnapshotBeforeUpdate=="function")||typeof v.UNSAFE_componentWillReceiveProps!="function"&&typeof v.componentWillReceiveProps!="function"||(D!==ge||le!==$)&&S2(s,v,h,$),io=!1,le=s.memoizedState,v.state=le,hd(s,h,v,E);var Ie=s.memoizedState;D!==ge||le!==Ie||Jn.current||io?(typeof ke=="function"&&(Km(s,c,ke,h),Ie=s.memoizedState),(te=io||x2(s,c,te,h,le,Ie,$)||!1)?(he||typeof v.UNSAFE_componentWillUpdate!="function"&&typeof v.componentWillUpdate!="function"||(typeof v.componentWillUpdate=="function"&&v.componentWillUpdate(h,Ie,$),typeof v.UNSAFE_componentWillUpdate=="function"&&v.UNSAFE_componentWillUpdate(h,Ie,$)),typeof v.componentDidUpdate=="function"&&(s.flags|=4),typeof v.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof v.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ie),v.props=h,v.state=Ie,v.context=$,h=te):(typeof v.componentDidUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=4),typeof v.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&le===i.memoizedState||(s.flags|=1024),h=!1)}return tg(i,s,c,h,b,E)}function tg(i,s,c,h,E,b){L2(i,s);var v=(s.flags&128)!==0;if(!h&&!v)return E&&H_(s,c,!1),Oi(i,s,b);h=s.stateNode,SU.current=s;var D=v&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&v?(s.child=ra(s,i.child,null,b),s.child=ra(s,null,D,b)):zn(i,s,D,b),s.memoizedState=h.state,E&&H_(s,c,!0),s.child}function M2(i){var s=i.stateNode;s.pendingContext?B_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&B_(i,s.context,!1),Bm(i,s.containerInfo)}function F2(i,s,c,h,E){return na(),Om(E),s.flags|=256,zn(i,s,c,h),s.child}var ng={dehydrated:null,treeContext:null,retryLane:0};function rg(i){return{baseLanes:i,cachePool:null,transitions:null}}function B2(i,s,c){var h=s.pendingProps,E=Dt.current,b=!1,v=(s.flags&128)!==0,D;if((D=v)||(D=i!==null&&i.memoizedState===null?!1:(E&2)!==0),D?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Dt,E&1),i===null)return Nm(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):(v=h.children,i=h.fallback,b?(h=s.mode,b=s.child,v={mode:"hidden",children:v},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=v):b=Ld(v,h,0,null),i=is(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=rg(c),s.memoizedState=ng,i):ig(s,v));if(E=i.memoizedState,E!==null&&(D=E.dehydrated,D!==null))return vU(i,s,v,h,D,E,c);if(b){b=h.fallback,v=s.mode,E=i.child,D=E.sibling;var $={mode:"hidden",children:h.children};return(v&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=$,s.deletions=null):(h=fo(E,$),h.subtreeFlags=E.subtreeFlags&14680064),D!==null?b=fo(D,b):(b=is(b,v,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,v=i.child.memoizedState,v=v===null?rg(c):{baseLanes:v.baseLanes|c,cachePool:null,transitions:v.transitions},b.memoizedState=v,b.childLanes=i.childLanes&~c,s.memoizedState=ng,h}return b=i.child,i=b.sibling,h=fo(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 ig(i,s){return s=Ld({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function wd(i,s,c,h){return h!==null&&Om(h),ra(s,i.child,null,c),i=ig(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function vU(i,s,c,h,E,b,v){if(c)return s.flags&256?(s.flags&=-257,h=Jm(Error(n(422))),wd(i,s,v,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=Ld({mode:"visible",children:h.children},E,0,null),b=is(b,E,v,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&ra(s,i.child,null,v),s.child.memoizedState=rg(v),s.memoizedState=ng,b);if((s.mode&1)===0)return wd(i,s,v,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var D=h.dgst;return h=D,b=Error(n(419)),h=Jm(b,h,void 0),wd(i,s,v,h)}if(D=(v&i.childLanes)!==0,er||D){if(h=fn,h!==null){switch(v&-v){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|v))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,Pi(i,E),jr(h,i,E,-1))}return Tg(),h=Jm(Error(n(421))),wd(i,s,v,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=BU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,fr=eo(E.nextSibling),dr=s,Nt=!0,Br=null,i!==null&&(wr[xr++]=Ci,wr[xr++]=ki,wr[xr++]=Xo,Ci=i.id,ki=i.overflow,Xo=s),s=ig(s,h.children),s.flags|=4096,s)}function U2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Dm(i.return,s,c)}function og(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 H2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(zn(i,s,h.children,c),h=Dt.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&&U2(i,c,s);else if(i.tag===19)U2(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(Dt,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&&pd(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),og(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&&pd(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}og(s,!0,c,null,b);break;case"together":og(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function xd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Oi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),es|=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=fo(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=fo(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function AU(i,s,c){switch(s.tag){case 3:M2(s),na();break;case 5:e2(s);break;case 1:Zn(s.type)&&id(s);break;case 4:Bm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(cd,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Dt,Dt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?B2(i,s,c):(Tt(Dt,Dt.current&1),i=Oi(i,s,c),i!==null?i.sibling:null);Tt(Dt,Dt.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return H2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Dt,Dt.current),h)break;return null;case 22:case 23:return s.lanes=0,R2(i,s,c)}return Oi(i,s,c)}var z2,sg,j2,$2;z2=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}},sg=function(){},j2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Jo(ui.current);var b=null;switch(c){case"input":E=It(i,E),h=It(i,h),b=[];break;case"select":E=P({},E,{value:void 0}),h=P({},h,{value:void 0}),b=[];break;case"textarea":E=Un(i,E),h=Un(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=td)}Zt(c,h);var v;c=null;for(te in E)if(!h.hasOwnProperty(te)&&E.hasOwnProperty(te)&&E[te]!=null)if(te==="style"){var D=E[te];for(v in D)D.hasOwnProperty(v)&&(c||(c={}),c[v]="")}else te!=="dangerouslySetInnerHTML"&&te!=="children"&&te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&te!=="autoFocus"&&(o.hasOwnProperty(te)?b||(b=[]):(b=b||[]).push(te,null));for(te in h){var $=h[te];if(D=E!=null?E[te]:void 0,h.hasOwnProperty(te)&&$!==D&&($!=null||D!=null))if(te==="style")if(D){for(v in D)!D.hasOwnProperty(v)||$&&$.hasOwnProperty(v)||(c||(c={}),c[v]="");for(v in $)$.hasOwnProperty(v)&&D[v]!==$[v]&&(c||(c={}),c[v]=$[v])}else c||(b||(b=[]),b.push(te,c)),c=$;else te==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,D=D?D.__html:void 0,$!=null&&D!==$&&(b=b||[]).push(te,$)):te==="children"?typeof $!="string"&&typeof $!="number"||(b=b||[]).push(te,""+$):te!=="suppressContentEditableWarning"&&te!=="suppressHydrationWarning"&&(o.hasOwnProperty(te)?($!=null&&te==="onScroll"&&xt("scroll",i),b||D===$||(b=[])):(b=b||[]).push(te,$))}c&&(b=b||[]).push("style",c);var te=b;(s.updateQueue=te)&&(s.flags|=4)}},$2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Wu(i,s){if(!Nt)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 Rn(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 CU(i,s,c){var h=s.pendingProps;switch(km(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Rn(s),null;case 1:return Zn(s.type)&&rd(),Rn(s),null;case 3:return h=s.stateNode,sa(),_t(Jn),_t(On),zm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(ud(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,Br!==null&&(Eg(Br),Br=null))),sg(i,s),Rn(s),null;case 5:Um(s);var E=Jo(ju.current);if(c=s.type,i!==null&&s.stateNode!=null)j2(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 Rn(s),null}if(i=Jo(ui.current),ud(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[ai]=s,h[Fu]=b,i=(s.mode&1)!==0,c){case"dialog":xt("cancel",h),xt("close",h);break;case"iframe":case"object":case"embed":xt("load",h);break;case"video":case"audio":for(E=0;E<Lu.length;E++)xt(Lu[E],h);break;case"source":xt("error",h);break;case"img":case"image":case"link":xt("error",h),xt("load",h);break;case"details":xt("toggle",h);break;case"input":ar(h,b),xt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},xt("invalid",h);break;case"textarea":ur(h,b),xt("invalid",h)}Zt(c,b),E=null;for(var v in b)if(b.hasOwnProperty(v)){var D=b[v];v==="children"?typeof D=="string"?h.textContent!==D&&(b.suppressHydrationWarning!==!0&&ed(h.textContent,D,i),E=["children",D]):typeof D=="number"&&h.textContent!==""+D&&(b.suppressHydrationWarning!==!0&&ed(h.textContent,D,i),E=["children",""+D]):o.hasOwnProperty(v)&&D!=null&&v==="onScroll"&&xt("scroll",h)}switch(c){case"input":cn(h),$e(h,b,!0);break;case"textarea":cn(h),qo(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=td)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{v=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=oe(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=v.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=v.createElement(c,{is:h.is}):(i=v.createElement(c),c==="select"&&(v=i,h.multiple?v.multiple=!0:h.size&&(v.size=h.size))):i=v.createElementNS(i,c),i[ai]=s,i[Fu]=h,z2(i,s,!1,!1),s.stateNode=i;e:{switch(v=lr(c,h),c){case"dialog":xt("cancel",i),xt("close",i),E=h;break;case"iframe":case"object":case"embed":xt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Lu.length;E++)xt(Lu[E],i);E=h;break;case"source":xt("error",i),E=h;break;case"img":case"image":case"link":xt("error",i),xt("load",i),E=h;break;case"details":xt("toggle",i),E=h;break;case"input":ar(i,h),E=It(i,h),xt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=P({},h,{value:void 0}),xt("invalid",i);break;case"textarea":ur(i,h),E=Un(i,h),xt("invalid",i);break;default:E=h}Zt(c,E),D=E;for(b in D)if(D.hasOwnProperty(b)){var $=D[b];b==="style"?Lr(i,$):b==="dangerouslySetInnerHTML"?($=$?$.__html:void 0,$!=null&&Ge(i,$)):b==="children"?typeof $=="string"?(c!=="textarea"||$!=="")&&tt(i,$):typeof $=="number"&&tt(i,""+$):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?$!=null&&b==="onScroll"&&xt("scroll",i):$!=null&&A(i,b,$,v))}switch(c){case"input":cn(i),$e(i,h,!1);break;case"textarea":cn(i),qo(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Re(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?Rt(i,!!h.multiple,b,!1):h.defaultValue!=null&&Rt(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=td)}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 Rn(s),null;case 6:if(i&&s.stateNode!=null)$2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Jo(ju.current),Jo(ui.current),ud(s)){if(h=s.stateNode,c=s.memoizedProps,h[ai]=s,(b=h.nodeValue!==c)&&(i=dr,i!==null))switch(i.tag){case 3:ed(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&ed(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[ai]=s,s.stateNode=h}return Rn(s),null;case 13:if(_t(Dt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Nt&&fr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Y_(),na(),s.flags|=98560,b=!1;else if(b=ud(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[ai]=s}else na(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;Rn(s),b=!1}else Br!==null&&(Eg(Br),Br=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||(Dt.current&1)!==0?tn===0&&(tn=3):Tg())),s.updateQueue!==null&&(s.flags|=4),Rn(s),null);case 4:return sa(),sg(i,s),i===null&&Du(s.stateNode.containerInfo),Rn(s),null;case 10:return Lm(s.type._context),Rn(s),null;case 17:return Zn(s.type)&&rd(),Rn(s),null;case 19:if(_t(Dt),b=s.memoizedState,b===null)return Rn(s),null;if(h=(s.flags&128)!==0,v=b.rendering,v===null)if(h)Wu(b,!1);else{if(tn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(v=pd(i),v!==null){for(s.flags|=128,Wu(b,!1),h=v.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,v=b.alternate,v===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=v.childLanes,b.lanes=v.lanes,b.child=v.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=v.memoizedProps,b.memoizedState=v.memoizedState,b.updateQueue=v.updateQueue,b.type=v.type,i=v.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Dt,Dt.current&1|2),s.child}i=i.sibling}b.tail!==null&&jt()>ca&&(s.flags|=128,h=!0,Wu(b,!1),s.lanes=4194304)}else{if(!h)if(i=pd(v),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Wu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!v.alternate&&!Nt)return Rn(s),null}else 2*jt()-b.renderingStartTime>ca&&c!==1073741824&&(s.flags|=128,h=!0,Wu(b,!1),s.lanes=4194304);b.isBackwards?(v.sibling=s.child,s.child=v):(c=b.last,c!==null?c.sibling=v:s.child=v,b.last=v)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=jt(),s.sibling=null,c=Dt.current,Tt(Dt,h?c&1|2:c&1),s):(Rn(s),null);case 22:case 23:return bg(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(hr&1073741824)!==0&&(Rn(s),s.subtreeFlags&6&&(s.flags|=8192)):Rn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function kU(i,s){switch(km(s),s.tag){case 1:return Zn(s.type)&&rd(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return sa(),_t(Jn),_t(On),zm(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Um(s),null;case 13:if(_t(Dt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));na()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return _t(Dt),null;case 4:return sa(),null;case 10:return Lm(s.type._context),null;case 22:case 23:return bg(),null;case 24:return null;default:return null}}var _d=!1,Ln=!1,PU=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function ua(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Bt(i,s,h)}else c.current=null}function ag(i,s,c){try{c()}catch(h){Bt(i,s,h)}}var V2=!1;function NU(i,s){if(bm=$c,i=x_(),dm(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(Te){c=null;break e}var v=0,D=-1,$=-1,te=0,he=0,ge=i,le=null;t:for(;;){for(var ke;ge!==c||E!==0&&ge.nodeType!==3||(D=v+E),ge!==b||h!==0&&ge.nodeType!==3||($=v+h),ge.nodeType===3&&(v+=ge.nodeValue.length),(ke=ge.firstChild)!==null;)le=ge,ge=ke;for(;;){if(ge===i)break t;if(le===c&&++te===E&&(D=v),le===b&&++he===h&&($=v),(ke=ge.nextSibling)!==null)break;ge=le,le=ge.parentNode}ge=ke}c=D===-1||$===-1?null:{start:D,end:$}}else c=null}c=c||{start:0,end:0}}else c=null;for(Tm={focusedElem:i,selectionRange:c},$c=!1,Oe=s;Oe!==null;)if(s=Oe,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Oe=i;else for(;Oe!==null;){s=Oe;try{var Ie=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ie!==null){var Le=Ie.memoizedProps,$t=Ie.memoizedState,G=s.stateNode,Y=G.getSnapshotBeforeUpdate(s.elementType===s.type?Le:Ur(s.type,Le),$t);G.__reactInternalSnapshotBeforeUpdate=Y}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(Te){Bt(s,s.return,Te)}if(i=s.sibling,i!==null){i.return=s.return,Oe=i;break}Oe=s.return}return Ie=V2,V2=!1,Ie}function Gu(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&&ag(s,c,b)}E=E.next}while(E!==h)}}function Sd(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 ug(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 q2(i){var s=i.alternate;s!==null&&(i.alternate=null,q2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[ai],delete s[Fu],delete s[Sm],delete s[fU],delete s[hU])),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 Y2(i){return i.tag===5||i.tag===3||i.tag===4}function W2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||Y2(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 lg(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=td));else if(h!==4&&(i=i.child,i!==null))for(lg(i,s,c),i=i.sibling;i!==null;)lg(i,s,c),i=i.sibling}function cg(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(cg(i,s,c),i=i.sibling;i!==null;)cg(i,s,c),i=i.sibling}var yn=null,Hr=!1;function so(i,s,c){for(c=c.child;c!==null;)G2(i,s,c),c=c.sibling}function G2(i,s,c){if(si&&typeof si.onCommitFiberUnmount=="function")try{si.onCommitFiberUnmount(Fc,c)}catch(D){}switch(c.tag){case 5:Ln||ua(c,s);case 6:var h=yn,E=Hr;yn=null,so(i,s,c),yn=h,Hr=E,yn!==null&&(Hr?(i=yn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):yn.removeChild(c.stateNode));break;case 18:yn!==null&&(Hr?(i=yn,c=c.stateNode,i.nodeType===8?_m(i.parentNode,c):i.nodeType===1&&_m(i,c),Au(i)):_m(yn,c.stateNode));break;case 4:h=yn,E=Hr,yn=c.stateNode.containerInfo,Hr=!0,so(i,s,c),yn=h,Hr=E;break;case 0:case 11:case 14:case 15:if(!Ln&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,v=b.destroy;b=b.tag,v!==void 0&&((b&2)!==0||(b&4)!==0)&&ag(c,s,v),E=E.next}while(E!==h)}so(i,s,c);break;case 1:if(!Ln&&(ua(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(D){Bt(c,s,D)}so(i,s,c);break;case 21:so(i,s,c);break;case 22:c.mode&1?(Ln=(h=Ln)||c.memoizedState!==null,so(i,s,c),Ln=h):so(i,s,c);break;default:so(i,s,c)}}function X2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new PU),s.forEach(function(h){var E=UU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function zr(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,v=s,D=v;e:for(;D!==null;){switch(D.tag){case 5:yn=D.stateNode,Hr=!1;break e;case 3:yn=D.stateNode.containerInfo,Hr=!0;break e;case 4:yn=D.stateNode.containerInfo,Hr=!0;break e}D=D.return}if(yn===null)throw Error(n(160));G2(b,v,E),yn=null,Hr=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(te){Bt(E,s,te)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)K2(s,i),s=s.sibling}function K2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(zr(s,i),ci(i),h&4){try{Gu(3,i,i.return),Sd(3,i)}catch(Le){Bt(i,i.return,Le)}try{Gu(5,i,i.return)}catch(Le){Bt(i,i.return,Le)}}break;case 1:zr(s,i),ci(i),h&512&&c!==null&&ua(c,c.return);break;case 5:if(zr(s,i),ci(i),h&512&&c!==null&&ua(c,c.return),i.flags&32){var E=i.stateNode;try{tt(E,"")}catch(Le){Bt(i,i.return,Le)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,v=c!==null?c.memoizedProps:b,D=i.type,$=i.updateQueue;if(i.updateQueue=null,$!==null)try{D==="input"&&b.type==="radio"&&b.name!=null&&Bn(E,b),lr(D,v);var te=lr(D,b);for(v=0;v<$.length;v+=2){var he=$[v],ge=$[v+1];he==="style"?Lr(E,ge):he==="dangerouslySetInnerHTML"?Ge(E,ge):he==="children"?tt(E,ge):A(E,he,ge,te)}switch(D){case"input":Qt(E,b);break;case"textarea":Jt(E,b);break;case"select":var le=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?Rt(E,!!b.multiple,ke,!1):le!==!!b.multiple&&(b.defaultValue!=null?Rt(E,!!b.multiple,b.defaultValue,!0):Rt(E,!!b.multiple,b.multiple?[]:"",!1))}E[Fu]=b}catch(Le){Bt(i,i.return,Le)}}break;case 6:if(zr(s,i),ci(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Le){Bt(i,i.return,Le)}}break;case 3:if(zr(s,i),ci(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{Au(s.containerInfo)}catch(Le){Bt(i,i.return,Le)}break;case 4:zr(s,i),ci(i);break;case 13:zr(s,i),ci(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(hg=jt())),h&4&&X2(i);break;case 22:if(he=c!==null&&c.memoizedState!==null,i.mode&1?(Ln=(te=Ln)||he,zr(s,i),Ln=te):zr(s,i),ci(i),h&8192){if(te=i.memoizedState!==null,(i.stateNode.isHidden=te)&&!he&&(i.mode&1)!==0)for(Oe=i,he=i.child;he!==null;){for(ge=Oe=he;Oe!==null;){switch(le=Oe,ke=le.child,le.tag){case 0:case 11:case 14:case 15:Gu(4,le,le.return);break;case 1:ua(le,le.return);var Ie=le.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=le,c=le.return;try{s=h,Ie.props=s.memoizedProps,Ie.state=s.memoizedState,Ie.componentWillUnmount()}catch(Le){Bt(h,c,Le)}}break;case 5:ua(le,le.return);break;case 22:if(le.memoizedState!==null){Z2(ge);continue}}ke!==null?(ke.return=le,Oe=ke):Z2(ge)}he=he.sibling}e:for(he=null,ge=i;;){if(ge.tag===5){if(he===null){he=ge;try{E=ge.stateNode,te?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(D=ge.stateNode,$=ge.memoizedProps.style,v=$!=null&&$.hasOwnProperty("display")?$.display:null,D.style.display=gn("display",v))}catch(Le){Bt(i,i.return,Le)}}}else if(ge.tag===6){if(he===null)try{ge.stateNode.nodeValue=te?"":ge.memoizedProps}catch(Le){Bt(i,i.return,Le)}}else if((ge.tag!==22&&ge.tag!==23||ge.memoizedState===null||ge===i)&&ge.child!==null){ge.child.return=ge,ge=ge.child;continue}if(ge===i)break e;for(;ge.sibling===null;){if(ge.return===null||ge.return===i)break e;he===ge&&(he=null),ge=ge.return}he===ge&&(he=null),ge.sibling.return=ge.return,ge=ge.sibling}}break;case 19:zr(s,i),ci(i),h&4&&X2(i);break;case 21:break;default:zr(s,i),ci(i)}}function ci(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(Y2(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&&(tt(E,""),h.flags&=-33);var b=W2(i);cg(i,b,E);break;case 3:case 4:var v=h.stateNode.containerInfo,D=W2(i);lg(i,D,v);break;default:throw Error(n(161))}}catch($){Bt(i,i.return,$)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function OU(i,s,c){Oe=i,Q2(i)}function Q2(i,s,c){for(var h=(i.mode&1)!==0;Oe!==null;){var E=Oe,b=E.child;if(E.tag===22&&h){var v=E.memoizedState!==null||_d;if(!v){var D=E.alternate,$=D!==null&&D.memoizedState!==null||Ln;D=_d;var te=Ln;if(_d=v,(Ln=$)&&!te)for(Oe=E;Oe!==null;)v=Oe,$=v.child,v.tag===22&&v.memoizedState!==null?eS(E):$!==null?($.return=v,Oe=$):eS(E);for(;b!==null;)Oe=b,Q2(b),b=b.sibling;Oe=E,_d=D,Ln=te}J2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):J2(i)}}function J2(i){for(;Oe!==null;){var s=Oe;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:Ln||Sd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!Ln)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:Ur(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Z_(s,b,h);break;case 3:var v=s.updateQueue;if(v!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}Z_(s,v,c)}break;case 5:var D=s.stateNode;if(c===null&&s.flags&4){c=D;var $=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":$.autoFocus&&c.focus();break;case"img":$.src&&(c.src=$.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var te=s.alternate;if(te!==null){var he=te.memoizedState;if(he!==null){var ge=he.dehydrated;ge!==null&&Au(ge)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Ln||s.flags&512&&ug(s)}catch(le){Bt(s,s.return,le)}}if(s===i){Oe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Oe=c;break}Oe=s.return}}function Z2(i){for(;Oe!==null;){var s=Oe;if(s===i){Oe=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Oe=c;break}Oe=s.return}}function eS(i){for(;Oe!==null;){var s=Oe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{Sd(4,s)}catch($){Bt(s,c,$)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch($){Bt(s,E,$)}}var b=s.return;try{ug(s)}catch($){Bt(s,b,$)}break;case 5:var v=s.return;try{ug(s)}catch($){Bt(s,v,$)}}}catch($){Bt(s,s.return,$)}if(s===i){Oe=null;break}var D=s.sibling;if(D!==null){D.return=s.return,Oe=D;break}Oe=s.return}}var IU=Math.ceil,vd=H.ReactCurrentDispatcher,dg=H.ReactCurrentOwner,vr=H.ReactCurrentBatchConfig,st=0,fn=null,Xt=null,bn=0,hr=0,la=to(0),tn=0,Xu=null,es=0,Ad=0,fg=0,Ku=null,tr=null,hg=0,ca=1/0,Ii=null,Cd=!1,pg=null,ao=null,kd=!1,uo=null,Pd=0,Qu=0,mg=null,Nd=-1,Od=0;function jn(){return(st&6)!==0?jt():Nd!==-1?Nd:Nd=jt()}function lo(i){return(i.mode&1)===0?1:(st&2)!==0&&bn!==0?bn&-bn:mU.transition!==null?(Od===0&&(Od=Wx()),Od):(i=ft,i!==0||(i=window.event,i=i===void 0?16:n_(i.type)),i)}function jr(i,s,c,h){if(50<Qu)throw Qu=0,mg=null,Error(n(185));wu(i,c,h),((st&2)===0||i!==fn)&&(i===fn&&((st&2)===0&&(Ad|=c),tn===4&&co(i,bn)),nr(i,h),c===1&&st===0&&(s.mode&1)===0&&(ca=jt()+500,od&&ro()))}function nr(i,s){var c=i.callbackNode;m7(i,s);var h=Hc(i,i===fn?bn:0);if(h===0)c!==null&&Vx(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&Vx(c),s===1)i.tag===0?pU(nS.bind(null,i)):z_(nS.bind(null,i)),cU(function(){(st&6)===0&&ro()}),c=null;else{switch(Gx(h)){case 1:c=Gp;break;case 4:c=qx;break;case 16:c=Mc;break;case 536870912:c=Yx;break;default:c=Mc}c=cS(c,tS.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function tS(i,s){if(Nd=-1,Od=0,(st&6)!==0)throw Error(n(327));var c=i.callbackNode;if(da()&&i.callbackNode!==c)return null;var h=Hc(i,i===fn?bn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Id(i,h);else{s=h;var E=st;st|=2;var b=iS();(fn!==i||bn!==s)&&(Ii=null,ca=jt()+500,ns(i,s));do try{DU();break}catch(D){rS(i,D)}while(!0);Rm(),vd.current=b,st=E,Xt!==null?s=0:(fn=null,bn=0,s=tn)}if(s!==0){if(s===2&&(E=Xp(i),E!==0&&(h=E,s=gg(i,E))),s===1)throw c=Xu,ns(i,0),co(i,h),nr(i,jt()),c;if(s===6)co(i,h);else{if(E=i.current.alternate,(h&30)===0&&!RU(E)&&(s=Id(i,h),s===2&&(b=Xp(i),b!==0&&(h=b,s=gg(i,b))),s===1))throw c=Xu,ns(i,0),co(i,h),nr(i,jt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:rs(i,tr,Ii);break;case 3:if(co(i,h),(h&130023424)===h&&(s=hg+500-jt(),10<s)){if(Hc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){jn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=xm(rs.bind(null,i,tr,Ii),s);break}rs(i,tr,Ii);break;case 4:if(co(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var v=31-Mr(h);b=1<<v,v=s[v],v>E&&(E=v),h&=~b}if(h=E,h=jt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*IU(h/1960))-h,10<h){i.timeoutHandle=xm(rs.bind(null,i,tr,Ii),h);break}rs(i,tr,Ii);break;case 5:rs(i,tr,Ii);break;default:throw Error(n(329))}}}return nr(i,jt()),i.callbackNode===c?tS.bind(null,i):null}function gg(i,s){var c=Ku;return i.current.memoizedState.isDehydrated&&(ns(i,s).flags|=256),i=Id(i,s),i!==2&&(s=tr,tr=c,s!==null&&Eg(s)),i}function Eg(i){tr===null?tr=i:tr.push.apply(tr,i)}function RU(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(!Fr(b(),E))return!1}catch(v){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 co(i,s){for(s&=~fg,s&=~Ad,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Mr(s),h=1<<c;i[c]=-1,s&=~h}}function nS(i){if((st&6)!==0)throw Error(n(327));da();var s=Hc(i,0);if((s&1)===0)return nr(i,jt()),null;var c=Id(i,s);if(i.tag!==0&&c===2){var h=Xp(i);h!==0&&(s=h,c=gg(i,h))}if(c===1)throw c=Xu,ns(i,0),co(i,s),nr(i,jt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,rs(i,tr,Ii),nr(i,jt()),null}function yg(i,s){var c=st;st|=1;try{return i(s)}finally{st=c,st===0&&(ca=jt()+500,od&&ro())}}function ts(i){uo!==null&&uo.tag===0&&(st&6)===0&&da();var s=st;st|=1;var c=vr.transition,h=ft;try{if(vr.transition=null,ft=1,i)return i()}finally{ft=h,vr.transition=c,st=s,(st&6)===0&&ro()}}function bg(){hr=la.current,_t(la)}function ns(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,lU(c)),Xt!==null)for(c=Xt.return;c!==null;){var h=c;switch(km(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&rd();break;case 3:sa(),_t(Jn),_t(On),zm();break;case 5:Um(h);break;case 4:sa();break;case 13:_t(Dt);break;case 19:_t(Dt);break;case 10:Lm(h.type._context);break;case 22:case 23:bg()}c=c.return}if(fn=i,Xt=i=fo(i.current,null),bn=hr=s,tn=0,Xu=null,fg=Ad=es=0,tr=Ku=null,Qo!==null){for(s=0;s<Qo.length;s++)if(c=Qo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var v=b.next;b.next=E,h.next=v}c.pending=h}Qo=null}return i}function rS(i,s){do{var c=Xt;try{if(Rm(),md.current=bd,gd){for(var h=Mt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}gd=!1}if(Zo=0,dn=en=Mt=null,$u=!1,Vu=0,dg.current=null,c===null||c.return===null){tn=1,Xu=s,Xt=null;break}e:{var b=i,v=c.return,D=c,$=s;if(s=bn,D.flags|=32768,$!==null&&typeof $=="object"&&typeof $.then=="function"){var te=$,he=D,ge=he.tag;if((he.mode&1)===0&&(ge===0||ge===11||ge===15)){var le=he.alternate;le?(he.updateQueue=le.updateQueue,he.memoizedState=le.memoizedState,he.lanes=le.lanes):(he.updateQueue=null,he.memoizedState=null)}var ke=k2(v);if(ke!==null){ke.flags&=-257,P2(ke,v,D,b,s),ke.mode&1&&C2(b,te,s),s=ke,$=te;var Ie=s.updateQueue;if(Ie===null){var Le=new Set;Le.add($),s.updateQueue=Le}else Ie.add($);break e}else{if((s&1)===0){C2(b,te,s),Tg();break e}$=Error(n(426))}}else if(Nt&&D.mode&1){var $t=k2(v);if($t!==null){($t.flags&65536)===0&&($t.flags|=256),P2($t,v,D,b,s),Om(aa($,D));break e}}b=$=aa($,D),tn!==4&&(tn=2),Ku===null?Ku=[b]:Ku.push(b),b=v;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=v2(b,$,s);J_(b,G);break e;case 1:D=$;var Y=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof Y.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(ao===null||!ao.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var Te=A2(b,D,s);J_(b,Te);break e}}b=b.return}while(b!==null)}sS(c)}catch(Me){s=Me,Xt===c&&c!==null&&(Xt=c=c.return);continue}break}while(!0)}function iS(){var i=vd.current;return vd.current=bd,i===null?bd:i}function Tg(){(tn===0||tn===3||tn===2)&&(tn=4),fn===null||(es&268435455)===0&&(Ad&268435455)===0||co(fn,bn)}function Id(i,s){var c=st;st|=2;var h=iS();(fn!==i||bn!==s)&&(Ii=null,ns(i,s));do try{LU();break}catch(E){rS(i,E)}while(!0);if(Rm(),st=c,vd.current=h,Xt!==null)throw Error(n(261));return fn=null,bn=0,tn}function LU(){for(;Xt!==null;)oS(Xt)}function DU(){for(;Xt!==null&&!s7();)oS(Xt)}function oS(i){var s=lS(i.alternate,i,hr);i.memoizedProps=i.pendingProps,s===null?sS(i):Xt=s,dg.current=null}function sS(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=CU(c,s,hr),c!==null){Xt=c;return}}else{if(c=kU(c,s),c!==null){c.flags&=32767,Xt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{tn=6,Xt=null;return}}if(s=s.sibling,s!==null){Xt=s;return}Xt=s=i}while(s!==null);tn===0&&(tn=5)}function rs(i,s,c){var h=ft,E=vr.transition;try{vr.transition=null,ft=1,MU(i,s,c,h)}finally{vr.transition=E,ft=h}return null}function MU(i,s,c,h){do da();while(uo!==null);if((st&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(g7(i,b),i===fn&&(Xt=fn=null,bn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||kd||(kd=!0,cS(Mc,function(){return da(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=vr.transition,vr.transition=null;var v=ft;ft=1;var D=st;st|=4,dg.current=null,NU(i,c),K2(c,i),nU(Tm),$c=!!bm,Tm=bm=null,i.current=c,OU(c),a7(),st=D,ft=v,vr.transition=b}else i.current=c;if(kd&&(kd=!1,uo=i,Pd=E),b=i.pendingLanes,b===0&&(ao=null),c7(c.stateNode),nr(i,jt()),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(Cd)throw Cd=!1,i=pg,pg=null,i;return(Pd&1)!==0&&i.tag!==0&&da(),b=i.pendingLanes,(b&1)!==0?i===mg?Qu++:(Qu=0,mg=i):Qu=0,ro(),null}function da(){if(uo!==null){var i=Gx(Pd),s=vr.transition,c=ft;try{if(vr.transition=null,ft=16>i?16:i,uo===null)var h=!1;else{if(i=uo,uo=null,Pd=0,(st&6)!==0)throw Error(n(331));var E=st;for(st|=4,Oe=i.current;Oe!==null;){var b=Oe,v=b.child;if((Oe.flags&16)!==0){var D=b.deletions;if(D!==null){for(var $=0;$<D.length;$++){var te=D[$];for(Oe=te;Oe!==null;){var he=Oe;switch(he.tag){case 0:case 11:case 15:Gu(8,he,b)}var ge=he.child;if(ge!==null)ge.return=he,Oe=ge;else for(;Oe!==null;){he=Oe;var le=he.sibling,ke=he.return;if(q2(he),he===te){Oe=null;break}if(le!==null){le.return=ke,Oe=le;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Le=Ie.child;if(Le!==null){Ie.child=null;do{var $t=Le.sibling;Le.sibling=null,Le=$t}while(Le!==null)}}Oe=b}}if((b.subtreeFlags&2064)!==0&&v!==null)v.return=b,Oe=v;else e:for(;Oe!==null;){if(b=Oe,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Gu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Oe=G;break e}Oe=b.return}}var Y=i.current;for(Oe=Y;Oe!==null;){v=Oe;var Q=v.child;if((v.subtreeFlags&2064)!==0&&Q!==null)Q.return=v,Oe=Q;else e:for(v=Y;Oe!==null;){if(D=Oe,(D.flags&2048)!==0)try{switch(D.tag){case 0:case 11:case 15:Sd(9,D)}}catch(Me){Bt(D,D.return,Me)}if(D===v){Oe=null;break e}var Te=D.sibling;if(Te!==null){Te.return=D.return,Oe=Te;break e}Oe=D.return}}if(st=E,ro(),si&&typeof si.onPostCommitFiberRoot=="function")try{si.onPostCommitFiberRoot(Fc,i)}catch(Me){}h=!0}return h}finally{ft=c,vr.transition=s}}return!1}function aS(i,s,c){s=aa(c,s),s=v2(i,s,1),i=oo(i,s,1),s=jn(),i!==null&&(wu(i,1,s),nr(i,s))}function Bt(i,s,c){if(i.tag===3)aS(i,i,c);else for(;s!==null;){if(s.tag===3){aS(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(ao===null||!ao.has(h))){i=aa(c,i),i=A2(s,i,1),s=oo(s,i,1),i=jn(),s!==null&&(wu(s,1,i),nr(s,i));break}}s=s.return}}function FU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=jn(),i.pingedLanes|=i.suspendedLanes&c,fn===i&&(bn&c)===c&&(tn===4||tn===3&&(bn&130023424)===bn&&500>jt()-hg?ns(i,0):fg|=c),nr(i,s)}function uS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Uc,Uc<<=1,(Uc&130023424)===0&&(Uc=4194304)));var c=jn();i=Pi(i,s),i!==null&&(wu(i,s,c),nr(i,c))}function BU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),uS(i,c)}function UU(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),uS(i,c)}var lS;lS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Jn.current)er=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return er=!1,AU(i,s,c);er=(i.flags&131072)!==0}else er=!1,Nt&&(s.flags&1048576)!==0&&j_(s,ad,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;xd(i,s),i=s.pendingProps;var E=Zs(s,On.current);oa(s,c),E=Vm(null,s,h,i,E,c);var b=qm();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,Zn(h)?(b=!0,id(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Fm(s),E.updater=Td,s.stateNode=E,E._reactInternals=s,Qm(s,h,i,c),s=tg(null,s,h,!0,b,c)):(s.tag=0,Nt&&b&&Cm(s),zn(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(xd(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=zU(h),i=Ur(h,i),E){case 0:s=eg(null,s,h,i,c);break e;case 1:s=D2(null,s,h,i,c);break e;case 11:s=N2(null,s,h,i,c);break e;case 14:s=O2(null,s,h,Ur(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:Ur(h,E),eg(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),D2(i,s,h,E,c);case 3:e:{if(M2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,Q_(i,s),hd(s,h,null,c);var v=s.memoizedState;if(h=v.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:v.cache,pendingSuspenseBoundaries:v.pendingSuspenseBoundaries,transitions:v.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=aa(Error(n(423)),s),s=F2(i,s,h,c,E);break e}else if(h!==E){E=aa(Error(n(424)),s),s=F2(i,s,h,c,E);break e}else for(fr=eo(s.stateNode.containerInfo.firstChild),dr=s,Nt=!0,Br=null,c=X_(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(na(),h===E){s=Oi(i,s,c);break e}zn(i,s,h,c)}s=s.child}return s;case 5:return e2(s),i===null&&Nm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,v=E.children,wm(h,E)?v=null:b!==null&&wm(h,b)&&(s.flags|=32),L2(i,s),zn(i,s,v,c),s.child;case 6:return i===null&&Nm(s),null;case 13:return B2(i,s,c);case 4:return Bm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=ra(s,null,h,c):zn(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),N2(i,s,h,E,c);case 7:return zn(i,s,s.pendingProps,c),s.child;case 8:return zn(i,s,s.pendingProps.children,c),s.child;case 12:return zn(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,v=E.value,Tt(cd,h._currentValue),h._currentValue=v,b!==null)if(Fr(b.value,v)){if(b.children===E.children&&!Jn.current){s=Oi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var D=b.dependencies;if(D!==null){v=b.child;for(var $=D.firstContext;$!==null;){if($.context===h){if(b.tag===1){$=Ni(-1,c&-c),$.tag=2;var te=b.updateQueue;if(te!==null){te=te.shared;var he=te.pending;he===null?$.next=$:($.next=he.next,he.next=$),te.pending=$}}b.lanes|=c,$=b.alternate,$!==null&&($.lanes|=c),Dm(b.return,c,s),D.lanes|=c;break}$=$.next}}else if(b.tag===10)v=b.type===s.type?null:b.child;else if(b.tag===18){if(v=b.return,v===null)throw Error(n(341));v.lanes|=c,D=v.alternate,D!==null&&(D.lanes|=c),Dm(v,c,s),v=b.sibling}else v=b.child;if(v!==null)v.return=b;else for(v=b;v!==null;){if(v===s){v=null;break}if(b=v.sibling,b!==null){b.return=v.return,v=b;break}v=v.return}b=v}zn(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,oa(s,c),E=_r(E),h=h(E),s.flags|=1,zn(i,s,h,c),s.child;case 14:return h=s.type,E=Ur(h,s.pendingProps),E=Ur(h.type,E),O2(i,s,h,E,c);case 15:return I2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ur(h,E),xd(i,s),s.tag=1,Zn(h)?(i=!0,id(s)):i=!1,oa(s,c),_2(s,h,E),Qm(s,h,E,c),tg(null,s,h,!0,i,c);case 19:return H2(i,s,c);case 22:return R2(i,s,c)}throw Error(n(156,s.tag))};function cS(i,s){return $x(i,s)}function HU(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 Ar(i,s,c,h){return new HU(i,s,c,h)}function wg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function zU(i){if(typeof i=="function")return wg(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===ie)return 14}return 2}function fo(i,s){var c=i.alternate;return c===null?(c=Ar(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 Rd(i,s,c,h,E,b){var v=2;if(h=i,typeof i=="function")wg(i)&&(v=1);else if(typeof i=="string")v=5;else e:switch(i){case z:return is(c.children,E,b,s);case Z:v=8,E|=8;break;case de:return i=Ar(12,c,s,E|2),i.elementType=de,i.lanes=b,i;case pe:return i=Ar(13,c,s,E),i.elementType=pe,i.lanes=b,i;case ee:return i=Ar(19,c,s,E),i.elementType=ee,i.lanes=b,i;case ae:return Ld(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case q:v=10;break e;case re:v=9;break e;case fe:v=11;break e;case ie:v=14;break e;case Ce:v=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Ar(v,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function is(i,s,c,h){return i=Ar(7,i,h,s),i.lanes=c,i}function Ld(i,s,c,h){return i=Ar(22,i,h,s),i.elementType=ae,i.lanes=c,i.stateNode={isHidden:!1},i}function xg(i,s,c){return i=Ar(6,i,null,s),i.lanes=c,i}function _g(i,s,c){return s=Ar(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function jU(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=Kp(0),this.expirationTimes=Kp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Kp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function Sg(i,s,c,h,E,b,v,D,$){return i=new jU(i,s,c,D,$),s===1?(s=1,b===!0&&(s|=8)):s=0,b=Ar(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(b),i}function $U(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function dS(i){if(!i)return no;i=i._reactInternals;e:{if(Yo(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(Zn(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(Zn(c))return U_(i,c,s)}return s}function fS(i,s,c,h,E,b,v,D,$){return i=Sg(c,h,!0,i,E,b,v,D,$),i.context=dS(null),c=i.current,h=jn(),E=lo(c),b=Ni(h,E),b.callback=s!=null?s:null,oo(c,b,E),i.current.lanes=E,wu(i,E,h),nr(i,h),i}function Dd(i,s,c,h){var E=s.current,b=jn(),v=lo(E);return c=dS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ni(b,v),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=oo(E,s,v),i!==null&&(jr(i,E,v,b),fd(i,E,v)),v}function Md(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function hS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function vg(i,s){hS(i,s),(i=i.alternate)&&hS(i,s)}function VU(){return null}var pS=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ag(i){this._internalRoot=i}Fd.prototype.render=Ag.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Dd(i,s,null,null)},Fd.prototype.unmount=Ag.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;ts(function(){Dd(null,i,null,null)}),s[vi]=null}};function Fd(i){this._internalRoot=i}Fd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Qx();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Qi.length&&s!==0&&s<Qi[c].priority;c++);Qi.splice(c,0,i),c===0&&e_(i)}};function Cg(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Bd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function mS(){}function qU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var te=Md(v);b.call(te)}}var v=fS(s,h,i,0,null,!1,!1,"",mS);return i._reactRootContainer=v,i[vi]=v.current,Du(i.nodeType===8?i.parentNode:i),ts(),v}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var D=h;h=function(){var te=Md($);D.call(te)}}var $=Sg(i,0,!1,null,null,!1,!1,"",mS);return i._reactRootContainer=$,i[vi]=$.current,Du(i.nodeType===8?i.parentNode:i),ts(function(){Dd(s,$,c,h)}),$}function Ud(i,s,c,h,E){var b=c._reactRootContainer;if(b){var v=b;if(typeof E=="function"){var D=E;E=function(){var $=Md(v);D.call($)}}Dd(s,v,i,E)}else v=qU(c,s,i,E,h);return Md(v)}Xx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=Tu(s.pendingLanes);c!==0&&(Qp(s,c|1),nr(s,jt()),(st&6)===0&&(ca=jt()+500,ro()))}break;case 13:ts(function(){var h=Pi(i,1);if(h!==null){var E=jn();jr(h,i,1,E)}}),vg(i,1)}},Jp=function(i){if(i.tag===13){var s=Pi(i,134217728);if(s!==null){var c=jn();jr(s,i,134217728,c)}vg(i,134217728)}},Kx=function(i){if(i.tag===13){var s=lo(i),c=Pi(i,s);if(c!==null){var h=jn();jr(c,i,s,h)}vg(i,s)}},Qx=function(){return ft},Jx=function(i,s){var c=ft;try{return ft=i,s()}finally{ft=c}},Pe=function(i,s,c){switch(s){case"input":if(Qt(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=nd(h);if(!E)throw Error(n(90));Ct(h),Qt(h,E)}}}break;case"textarea":Jt(i,c);break;case"select":s=c.value,s!=null&&Rt(i,!!c.multiple,s,!1)}},Pt=yg,Pn=ts;var YU={usingClientEntryPoint:!1,Events:[Bu,Qs,nd,Lt,Hn,yg]},Ju={findFiberByHostInstance:Wo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},WU={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:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=zx(i),i===null?null:i.stateNode},findFiberByHostInstance:Ju.findFiberByHostInstance||VU,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 Hd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Hd.isDisabled&&Hd.supportsFiber)try{Fc=Hd.inject(WU),si=Hd}catch(i){}}return Yn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=YU,Yn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cg(s))throw Error(n(200));return $U(i,s,null,c)},Yn.createRoot=function(i,s){if(!Cg(i))throw Error(n(299));var c=!1,h="",E=pS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=Sg(i,1,!1,null,null,c,!1,h,E),i[vi]=s.current,Du(i.nodeType===8?i.parentNode:i),new Ag(s)},Yn.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=zx(s),i=i===null?null:i.stateNode,i},Yn.flushSync=function(i){return ts(i)},Yn.hydrate=function(i,s,c){if(!Bd(s))throw Error(n(200));return Ud(null,i,s,!0,c)},Yn.hydrateRoot=function(i,s,c){if(!Cg(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",v=pS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(v=c.onRecoverableError)),s=fS(s,null,i,1,c!=null?c:null,E,!1,b,v),i[vi]=s.current,Du(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 Fd(s)},Yn.render=function(i,s,c){if(!Bd(s))throw Error(n(200));return Ud(null,i,s,!1,c)},Yn.unmountComponentAtNode=function(i){if(!Bd(i))throw Error(n(40));return i._reactRootContainer?(ts(function(){Ud(null,null,i,!1,function(){i._reactRootContainer=null,i[vi]=null})}),!0):!1},Yn.unstable_batchedUpdates=yg,Yn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Bd(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Ud(i,s,c,!1,h)},Yn.version="18.3.1-next-f1338f8080-20240426",Yn}var lE;function cE(){if(lE)return Wf.exports;lE=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(),Wf.exports=kP(),Wf.exports}var vo=cE();function dE(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=dE(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=dE(e))&&(r&&(r+=" "),r+=t);return r}const PP=()=>document.querySelector(`:is(input, textarea)[name="${j}-user-input"]:not(:disabled)`),Kf=()=>{var e;return(e=PP())!=null?e:document.querySelector(`.${j}-dialog-content, .${j}-modal-content`)},NP=()=>{var e;return(e=Kf())==null?void 0:e.focus({preventScroll:!0})},Qf=()=>{const e=()=>{const n=document.querySelector(`.${j}-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 fE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},hE=mo.createContext&&mo.createContext(fE),OP=["attr","size","title"];function IP(e,t){if(e==null)return{};var n=RP(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 RP(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 Nl(){return Nl=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},Nl.apply(this,arguments)}function pE(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 Ol(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?pE(Object(n),!0).forEach(function(r){LP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):pE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function LP(e,t,n){return t=DP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function DP(e){var t=MP(e,"string");return typeof t=="symbol"?t:t+""}function MP(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 mE(e){return e&&e.map((t,n)=>mo.createElement(t.tag,Ol({key:n},t.attr),mE(t.child)))}function ht(e){return t=>mo.createElement(FP,Nl({attr:Ol({},e.attr)},t),mE(e.child))}function FP(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=IP(e,OP),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),mo.createElement("svg",Nl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Ol(Ol({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&mo.createElement("title",null,a),e.children)};return hE!==void 0?mo.createElement(hE.Consumer,null,n=>t(n)):t(fE)}function BP(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 UP=e=>O.isValidElement(e)?O.cloneElement(e,{"aria-hidden":!0}):e,yi=({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:x.jsx("button",{className:W(e,`${j}-icon-button`),type:r,"aria-label":o,"aria-haspopup":a,"aria-expanded":u,title:l,onClick:f,disabled:d,children:t?x.jsx("img",{className:W(`${j}-icon-image`),src:t,alt:"","aria-hidden":"true",loading:"lazy"}):UP(n)}),HP="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",zP=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=Qe(),{status:a}=rr(),u=St(),l=o==="messaging",d=a.type==="dialog"||a.type==="modal",f=l?u.launcher.openCommerceClientAriaLabel:u.launcher.openCopilotAriaLabel,p=r||f,m=l?x.jsx(BP,{className:W(t,`${j}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||HP,alt:u.launcher.logoAlt,className:W(t,`${j}-minimized-icon-img`)});return x.jsx(yi,{className:W(t,`${j}-minimized-button`),ariaLabel:p,ariaHasPopup:d?"dialog":void 0,ariaExpanded:!1,title:p,icon:m,onClick:e})},jP=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=Qe(),r=O.useId(),o=O.useRef(null),[a]=O.useState(()=>document.createElement("div"));O.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{Ra(!1),gi(!0),setTimeout(NP)};return x.jsxs(x.Fragment,{children:[vo.createPortal(x.jsx("a",{href:`#${r}`,className:W(e,`${j}-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),vo.createPortal(x.jsx("div",{id:r,ref:o,className:W(e,`${j}-minimized-container`,n),style:t,children:x.jsx(zP,{onClick:u})}),document.body)]})},$P=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"}),Jf=({className:e,label:t,onClick:n,disabled:r=!1})=>{const o=St(),a=t!=null?t:o.common.close;return x.jsx("button",{"aria-label":a,title:a,className:W(e,`${j}-close-button`),disabled:r,onClick:n,type:"button",children:x.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:x.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"})})})},VP=({file:e,componentType:t,globalClassName:n,disabled:r=!1,onRemove:o})=>{const a=e.name||"",[u,l]=O.useState("");return O.useEffect(()=>{const d=URL.createObjectURL(e);return l(d),()=>URL.revokeObjectURL(d)},[e]),x.jsxs("div",{className:W(n,`cim-${t}-component`,`${j}-image-file-preview`),children:[x.jsx("img",{className:W(n,`cim-${t}-component`,`${j}-image-preview`),src:u,alt:`${a} preview`,loading:"lazy"}),x.jsx("span",{className:W(n,`cim-${t}-component`,`${j}-image-file-name`),title:a,children:a}),x.jsx(Jf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",disabled:r,onClick:o})]})};function gE(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 EE(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 ms(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 qP(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 yE(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 bE(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 YP(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 WP(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 GP(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 XP(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 KP(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 QP(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 JP=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=x.jsx(QP,{}),onFiles:l})=>{var w;const d=St(),f=O.useRef(null),p=O.useId(),m=r!=null?r:p,T=O.useCallback(()=>{var S;return(S=f.current)==null?void 0:S.click()},[]),y=O.useCallback(S=>{const k=S.target;l(k.files),k.value=""},[l]);return x.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-button`),disabled:n,"aria-label":(w=d.imageAttachment)==null?void 0:w.uploadImageAriaLabel,onClick:T,children:[x.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${j}-image-upload-label`),"aria-hidden":"true",children:u}),x.jsx("input",{ref:f,className:W(o,a,`cim-${e}-component`,`${j}-file-input`),type:"file",id:m,accept:t,name:`${j}-file-input`,disabled:n,onInput:y})]})},Il=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>x.jsx("button",{"aria-label":a,className:W(`${j}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),ZP=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?bE:ms;return n?x.jsx("img",{className:W(`${j}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):x.jsx(r,{"aria-hidden":"true",size:"16px"})},eN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{const a=St();if((t==null?void 0:t.buttonType)==="icon"){const l=t.buttonIcon==="arrow"?bE:ms;return x.jsx(yi,{className:W(e,n,`cim-${r}-component`,`${j}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||a.searchBar.sendMessageAriaLabel,icon:t!=null&&t.buttonIconUrl?null:x.jsx(l,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const u=(t==null?void 0:t.buttonType)==="icon-text";return x.jsxs(Il,{className:W(e,n,`cim-${r}-component`,`${j}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[u&&x.jsx(ZP,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||a.common.search]})};function tN(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 nN=()=>{const{messages:e}=qn(),{handleCancel:t}=Wr();return{cancelRequest:O.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},rN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=Qe(),{cancelRequest:r}=nN(),o=St();return n!=null&&n.enableCancelSearch?x.jsx(yi,{className:W(t,`${j}-cancel-button`),ariaLabel:o.searchBar.cancelProcessingAriaLabel,title:o.searchBar.cancelRequestTitle,icon:x.jsx(tN,{}),disabled:!e,onClick:r}):null};function ez(){}function tz(){}function TE(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 wE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const iN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,oN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,sN={};function xE(e,t){return(sN.jsx?oN:iN).test(e)}const aN=/[ \t\n\f\r]/g;function uN(e){return typeof e=="object"?e.type==="text"?_E(e.value):!1:_E(e)}function _E(e){return e.replace(aN,"")===""}class Fa{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Fa.prototype.normal={},Fa.prototype.property={},Fa.prototype.space=void 0;function SE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Fa(n,r,t)}function Ba(e){return e.toLowerCase()}class Wn{constructor(t,n){this.attribute=n,this.property=t}}Wn.prototype.attribute="",Wn.prototype.booleanish=!1,Wn.prototype.boolean=!1,Wn.prototype.commaOrSpaceSeparated=!1,Wn.prototype.commaSeparated=!1,Wn.prototype.defined=!1,Wn.prototype.mustUseProperty=!1,Wn.prototype.number=!1,Wn.prototype.overloadedBoolean=!1,Wn.prototype.property="",Wn.prototype.spaceSeparated=!1,Wn.prototype.space=void 0;let lN=0;const We=Co(),Wt=Co(),Zf=Co(),ye=Co(),pt=Co(),Ao=Co(),ir=Co();function Co(){return Zu(2,++lN)}const eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Wt,commaOrSpaceSeparated:ir,commaSeparated:Ao,number:ye,overloadedBoolean:Zf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),th=Object.keys(eh);class nh extends Wn{constructor(t,n,r,o){let a=-1;if(super(t,n),vE(this,"space",o),typeof r=="number")for(;++a<th.length;){const u=th[a];vE(this,th[a],(r&eh[u])===eh[u])}}}nh.prototype.defined=!0;function vE(e,t,n){n&&(e[t]=n)}function gs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new nh(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ba(r)]=r,n[Ba(a.attribute)]=r}return new Fa(t,n,e.space)}const AE=gs({properties:{ariaActiveDescendant:null,ariaAtomic:Wt,ariaAutoComplete:null,ariaBusy:Wt,ariaChecked:Wt,ariaColCount:ye,ariaColIndex:ye,ariaColSpan:ye,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Wt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Wt,ariaFlowTo:pt,ariaGrabbed:Wt,ariaHasPopup:null,ariaHidden:Wt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:ye,ariaLive:null,ariaModal:Wt,ariaMultiLine:Wt,ariaMultiSelectable:Wt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:ye,ariaPressed:Wt,ariaReadOnly:Wt,ariaRelevant:null,ariaRequired:Wt,ariaRoleDescription:pt,ariaRowCount:ye,ariaRowIndex:ye,ariaRowSpan:ye,ariaSelected:Wt,ariaSetSize:ye,ariaSort:null,ariaValueMax:ye,ariaValueMin:ye,ariaValueNow:ye,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function CE(e,t){return t in e?e[t]:t}function kE(e,t){return CE(e,t.toLowerCase())}const cN=gs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ao,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:pt,autoFocus:We,autoPlay:We,blocking:pt,capture:null,charSet:null,checked:We,cite:null,className:pt,closedBy:null,colorSpace:null,cols:ye,colSpan:ye,command:null,commandFor:null,content:null,contentEditable:Wt,controls:We,controlsList:pt,coords:ye|Ao,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Zf,draggable:Wt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:pt,height:ye,hidden:Zf,high:ye,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:pt,itemRef:pt,itemScope:We,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:ye,manifest:null,max:null,maxLength:ye,media:null,method:null,min:null,minLength:ye,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:ye,pattern:null,ping:pt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:pt,required:We,reversed:We,rows:ye,rowSpan:ye,sandbox:pt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:ye,sizes:null,slot:null,span:ye,spellCheck:Wt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:ye,step:null,style:null,tabIndex:ye,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Wt,width:ye,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:ye,borderColor:null,bottomMargin:ye,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:ye,leftMargin:ye,link:null,longDesc:null,lowSrc:null,marginHeight:ye,marginWidth:ye,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:ye,rules:null,scheme:null,scrolling:Wt,standby:null,summary:null,text:null,topMargin:ye,valueType:null,version:null,vAlign:null,vLink:null,vSpace:ye,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:Ao,part:pt,prefix:null,property:null,results:ye,security:null,unselectable:null},space:"html",transform:kE}),dN=gs({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:ir,accentHeight:ye,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:ye,amplitude:ye,arabicForm:null,ascent:ye,attributeName:null,attributeType:null,azimuth:ye,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:ye,by:null,calcMode:null,capHeight:ye,className: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:ye,diffuseConstant:ye,direction:null,display:null,dur:null,divisor:ye,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:ye,enableBackground:null,end:null,event:null,exponent:ye,externalResourcesRequired:null,fill:null,fillOpacity:ye,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:Ao,g2:Ao,glyphName:Ao,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:ye,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:ye,horizOriginX:ye,horizOriginY:ye,id:null,ideographic:ye,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:ye,k:ye,k1:ye,k2:ye,k3:ye,k4:ye,kernelMatrix:ir,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:ye,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:ye,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:ye,overlineThickness:ye,paintOrder:null,panose1:null,path:null,pathLength:ye,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:ye,pointsAtY:ye,pointsAtZ:ye,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:ir,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:ir,rev:ir,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:ir,requiredFeatures:ir,requiredFonts:ir,requiredFormats:ir,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:ye,specularExponent:ye,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:ye,strikethroughThickness:ye,string:null,stroke:null,strokeDashArray:ir,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:ye,strokeOpacity:ye,strokeWidth:null,style:null,surfaceScale:ye,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:ir,tabIndex:ye,tableValues:null,target:null,targetX:ye,targetY:ye,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:ir,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:ye,underlineThickness:ye,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:ye,values:null,vAlphabetic:ye,vMathematical:ye,vectorEffect:null,vHanging:ye,vIdeographic:ye,version:null,vertAdvY:ye,vertOriginX:ye,vertOriginY:ye,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:ye,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:CE}),PE=gs({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()}}),NE=gs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:kE}),OE=gs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),fN={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"},hN=/[A-Z]/g,IE=/-[a-z]/g,pN=/^data[-\w.:]+$/i;function Rl(e,t){const n=Ba(t);let r=t,o=Wn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&pN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(IE,gN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!IE.test(a)){let u=a.replace(hN,mN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=nh}return new o(r,t)}function mN(e){return"-"+e.toLowerCase()}function gN(e){return e.charAt(1).toUpperCase()}const Ua=SE([AE,cN,PE,NE,OE],"html"),Bi=SE([AE,dN,PE,NE,OE],"svg");function RE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function LE(e){return e.join(" ").trim()}var Es={},rh,DE;function EN(){if(DE)return rh;DE=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(k,_){if(typeof k!="string")throw new TypeError("First argument must be a string");if(!k)return[];_=_||{};var C=1,A=1;function H(ee){var ie=ee.match(t);ie&&(C+=ie.length);var Ce=ee.lastIndexOf(d);A=~Ce?ee.length-Ce:A+ee.length}function U(){var ee={line:C,column:A};return function(ie){return ie.position=new L(ee),de(),ie}}function L(ee){this.start=ee,this.end={line:C,column:A},this.source=_.source}L.prototype.content=k;function z(ee){var ie=new Error(_.source+":"+C+":"+A+": "+ee);if(ie.reason=ee,ie.filename=_.source,ie.line=C,ie.column=A,ie.source=k,!_.silent)throw ie}function Z(ee){var ie=ee.exec(k);if(ie){var Ce=ie[0];return H(Ce),k=k.slice(Ce.length),ie}}function de(){Z(n)}function q(ee){var ie;for(ee=ee||[];ie=re();)ie!==!1&&ee.push(ie);return ee}function re(){var ee=U();if(!(f!=k.charAt(0)||p!=k.charAt(1))){for(var ie=2;m!=k.charAt(ie)&&(p!=k.charAt(ie)||f!=k.charAt(ie+1));)++ie;if(ie+=2,m===k.charAt(ie-1))return z("End of comment missing");var Ce=k.slice(2,ie-2);return A+=2,H(Ce),k=k.slice(ie),A+=2,ee({type:T,comment:Ce})}}function fe(){var ee=U(),ie=Z(r);if(ie){if(re(),!Z(o))return z("property missing ':'");var Ce=Z(a),ae=ee({type:y,property:S(ie[0].replace(e,m)),value:Ce?S(Ce[0].replace(e,m)):m});return Z(u),ae}}function pe(){var ee=[];q(ee);for(var ie;ie=fe();)ie!==!1&&(ee.push(ie),q(ee));return ee}return de(),pe()}function S(k){return k?k.replace(l,m):m}return rh=w,rh}var ME;function yN(){if(ME)return Es;ME=1;var e=Es&&Es.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Es,"__esModule",{value:!0}),Es.default=n;const t=e(EN());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 Es}var Ha={},FE;function bN(){if(FE)return Ha;FE=1,Object.defineProperty(Ha,"__esModule",{value:!0}),Ha.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,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 Ha.camelCase=d,Ha}var za,BE;function TN(){if(BE)return za;BE=1;var e=za&&za.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(yN()),n=bN();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,za=r,za}var wN=TN();const xN=Ue(wN),Ll=UE("end"),Gr=UE("start");function UE(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 HE(e){const t=Gr(e),n=Ll(e);if(t&&n)return{start:t,end:n}}function ja(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?zE(e.position):"start"in e||"end"in e?zE(e):"line"in e||"column"in e?ih(e):""}function ih(e){return jE(e&&e.line)+":"+jE(e&&e.column)}function zE(e){return ih(e&&e.start)+"-"+ih(e&&e.end)}function jE(e){return e&&typeof e=="number"?e:1}class vn 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=F({},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=ja(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}}vn.prototype.file="",vn.prototype.name="",vn.prototype.reason="",vn.prototype.message="",vn.prototype.stack="",vn.prototype.column=void 0,vn.prototype.line=void 0,vn.prototype.ancestors=void 0,vn.prototype.cause=void 0,vn.prototype.fatal=void 0,vn.prototype.place=void 0,vn.prototype.ruleId=void 0,vn.prototype.source=void 0;const oh={}.hasOwnProperty,_N=new Map,SN=/[A-Z]/g,vN=new Set(["table","tbody","thead","tfoot","tr"]),AN=new Set(["td","th"]),$E="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function CN(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=DN(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=LN(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"?Bi:Ua,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=VE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function VE(e,t,n){if(t.type==="element")return kN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return PN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return ON(e,t,n);if(t.type==="mdxjsEsm")return NN(e,t);if(t.type==="root")return IN(e,t,n);if(t.type==="text")return RN(e,t)}function kN(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Bi,e.schema=o),e.ancestors.push(t);const a=YE(e,t.tagName,!1),u=MN(e,t);let l=ah(e,t);return vN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!uN(d):!0})),qE(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function PN(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)}$a(e,t.position)}function NN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);$a(e,t.position)}function ON(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Bi,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:YE(e,t.name,!0),u=FN(e,t),l=ah(e,t);return qE(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function IN(e,t,n){const r={};return sh(r,ah(e,t)),e.create(t,e.Fragment,r,n)}function RN(e,t){return t.value}function qE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function sh(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function LN(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 DN(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Gr(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 MN(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&oh.call(t.properties,o)){const a=BN(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&AN.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 FN(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 $a(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 $a(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function ah(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:_N;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const l=VE(e,a,u);l!==void 0&&n.push(l)}return n}function BN(e,t,n){const r=Rl(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?wE(n):LE(n)),r.property==="style"){let o=typeof n=="object"?n:UN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=HN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?fN[r.property]||r.property:r.attribute,n]}}function UN(e,t){try{return xN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new vn("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=$E+"#cannot-parse-style-attribute",o}}function YE(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=xE(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=xE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return oh.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);$a(e)}function $a(e,t){const n=new vn("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=$E+"#cannot-handle-mdx-estrees-without-createevaluater",n}function HN(e){const t={};let n;for(n in e)oh.call(e,n)&&(t[zN(n)]=e[n]);return t}function zN(e){let t=e.replace(SN,jN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function jN(e){return"-"+e.toLowerCase()}const uh={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"]},$N={};function lh(e,t){const n=$N,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return WE(e,r,o)}function WE(e,t,n){if(VN(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 GE(e.children,t,n)}return Array.isArray(e)?GE(e,t,n):""}function GE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=WE(e[o],t,n);return r.join("")}function VN(e){return!!(e&&typeof e=="object")}const XE=document.createElement("i");function ch(e){const t="&"+e+";";XE.innerHTML=t;const n=XE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function or(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 Er(e,t){return e.length>0?(or(e,e.length,0,t),e):t}const KE={}.hasOwnProperty;function QE(e){const t={};let n=-1;for(;++n<e.length;)qN(t,e[n]);return t}function qN(e,t){let n;for(n in t){const o=(KE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){KE.call(o,u)||(o[u]=[]);const l=a[u];YN(o[u],Array.isArray(l)?l:l?[l]:[])}}}function YN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);or(e,0,0,r)}function JE(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 Pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=Ui(/[A-Za-z]/),An=Ui(/[\dA-Za-z]/),WN=Ui(/[#-'*+\--9=?A-Z^-~]/);function Dl(e){return e!==null&&(e<32||e===127)}const dh=Ui(/\d/),GN=Ui(/[\dA-Fa-f]/),XN=Ui(/[!-/:-@[-`{-~]/);function He(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 Ml=Ui(new RegExp("\\p{P}|\\p{S}","u")),ko=Ui(/\s/);function Ui(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ys(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&An(e.charCodeAt(n+1))&&An(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 KN={tokenize:QN};function QN(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 He(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const JN={tokenize:ZN},ZE={tokenize:e3};function ZN(e){const t=this,n=[];let r=0,o,a,u;return l;function l(A){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const H=t.events.length;let U=H,L;for(;U--;)if(t.events[U][0]==="exit"&&t.events[U][1].type==="chunkFlow"){L=t.events[U][1].end;break}_(r);let z=H;for(;z<t.events.length;)t.events[z][1].end=F({},L),z++;return or(t.events,U+1,0,t.events.slice(H)),t.events.length=z,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(ZE,p,m)(A)}function p(A){return o&&C(),_(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(ZE,y,w)(A)}function y(A){return r++,n.push([t.currentConstruct,t.containerState]),T(A)}function w(A){if(A===null){o&&C(),_(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(A)}function S(A){if(A===null){k(e.exit("chunkFlow"),!0),_(0),e.consume(A);return}return He(A)?(e.consume(A),k(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(A),S)}function k(A,H){const U=t.sliceStream(A);if(H&&U.push(null),A.previous=a,a&&(a.next=A),a=A,o.defineSkip(A.start),o.write(U),t.parser.lazy[A.start.line]){let L=o.events.length;for(;L--;)if(o.events[L][1].start.offset<u&&(!o.events[L][1].end||o.events[L][1].end.offset>u))return;const z=t.events.length;let Z=z,de,q;for(;Z--;)if(t.events[Z][0]==="exit"&&t.events[Z][1].type==="chunkFlow"){if(de){q=t.events[Z][1].end;break}de=!0}for(_(r),L=z;L<t.events.length;)t.events[L][1].end=F({},q),L++;or(t.events,Z+1,0,t.events.slice(z)),t.events.length=L}}function _(A){let H=n.length;for(;H-- >A;){const U=n[H];t.containerState=U[1],U[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 e3(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 bs(e){if(e===null||mt(e)||ko(e))return 1;if(Ml(e))return 2}function Fl(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 fh={name:"attention",resolveAll:t3,tokenize:n3};function t3(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=F({},e[r][1].end),T=F({},e[n][1].start);ey(m,-d),ey(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},l.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=Er(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=Er(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=Er(f,Fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=Er(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=Er(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,or(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 n3(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=bs(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=bs(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 ey(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const r3={name:"autolink",tokenize:i3};function i3(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 Mn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||An(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||An(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||Dl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):WN(y)?(e.consume(y),f):n(y)}function p(y){return An(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||An(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const Va={partial:!0,tokenize:o3};function o3(e,t,n){return r;function r(a){return Ze(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const ty={continuation:{tokenize:a3},exit:u3,name:"blockQuote",tokenize:s3};function s3(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 a3(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(ty,t,n)(u)}}function u3(e){e.exit("blockQuote")}const ny={name:"characterEscape",tokenize:l3};function l3(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 XN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ry={name:"characterReference",tokenize:c3};function c3(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=An,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=GN,p):(e.enter("characterReferenceValue"),a=7,u=dh,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===An&&!ch(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 iy={partial:!0,tokenize:f3},oy={concrete:!0,name:"codeFenced",tokenize:d3};function d3(e,t,n){const r=this,o={partial:!0,tokenize:U};let a=0,u=0,l;return d;function d(L){return f(L)}function f(L){const z=r.events[r.events.length-1];return a=z&&z[1].type==="linePrefix"?z[2].sliceSerialize(z[1],!0).length:0,l=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===l?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?it(e,m,"whitespace")(L):m(L))}function m(L){return L===null||He(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(iy,S,H)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(L))}function T(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(L)):L===96&&L===l?n(L):(e.consume(L),T)}function y(L){return L===null||He(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(L))}function w(L){return L===null||He(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===l?n(L):(e.consume(L),w)}function S(L){return e.attempt(o,H,k)(L)}function k(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),_}function _(L){return a>0&&Ze(L)?it(e,C,"linePrefix",a+1)(L):C(L)}function C(L){return L===null||He(L)?e.check(iy,S,H)(L):(e.enter("codeFlowValue"),A(L))}function A(L){return L===null||He(L)?(e.exit("codeFlowValue"),C(L)):(e.consume(L),A)}function H(L){return e.exit("codeFenced"),t(L)}function U(L,z,Z){let de=0;return q;function q(ie){return L.enter("lineEnding"),L.consume(ie),L.exit("lineEnding"),re}function re(ie){return L.enter("codeFencedFence"),Ze(ie)?it(L,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ie):fe(ie)}function fe(ie){return ie===l?(L.enter("codeFencedFenceSequence"),pe(ie)):Z(ie)}function pe(ie){return ie===l?(de++,L.consume(ie),pe):de>=u?(L.exit("codeFencedFenceSequence"),Ze(ie)?it(L,ee,"whitespace")(ie):ee(ie)):Z(ie)}function ee(ie){return ie===null||He(ie)?(L.exit("codeFencedFence"),z(ie)):Z(ie)}}}function f3(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 hh={name:"codeIndented",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(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):He(f)?e.attempt(h3,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||He(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function m3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):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):He(u)?o(u):n(u)}}const g3={name:"codeText",previous:y3,resolve:E3,tokenize:b3};function E3(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 y3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function b3(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)):He(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||He(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class T3{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&&qa(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),qa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),qa(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);qa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);qa(this.left,n.reverse())}}}function qa(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 sy(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new T3(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,w3(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=F({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return or(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function w3(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,S=0;const k=[S];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<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&&(S=T+1,k.push(S),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):k.pop(),T=k.length;T--;){const _=l.slice(k[T],k[T+1]),C=a.pop();d.push([C,C+_.length-1]),e.splice(C,2,_)}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 x3={resolve:S3,tokenize:v3},_3={partial:!0,tokenize:A3};function S3(e){return sy(e),e}function v3(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):He(l)?e.check(_3,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 A3(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||He(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 ay(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(_){return _===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(_),e.exit(a),T):_===null||_===32||_===41||Dl(_)?n(_):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),S(_))}function T(_){return _===62?(e.enter(a),e.consume(_),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(_))}function y(_){return _===62?(e.exit("chunkString"),e.exit(l),T(_)):_===null||_===60||He(_)?n(_):(e.consume(_),_===92?w:y)}function w(_){return _===60||_===62||_===92?(e.consume(_),y):y(_)}function S(_){return!p&&(_===null||_===41||mt(_))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(_)):p<f&&_===40?(e.consume(_),p++,S):_===41?(e.consume(_),p--,S):_===null||_===32||_===40||Dl(_)?n(_):(e.consume(_),_===92?k:S)}function k(_){return _===40||_===41||_===92?(e.consume(_),S):S(_)}}function uy(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):He(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||He(y)||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 ly(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):He(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||He(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function Ya(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const C3={name:"definition",tokenize:P3},k3={partial:!0,tokenize:N3};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 uy.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=Pr(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)?Ya(e,f)(y):f(y)}function f(y){return ay(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(k3,m,m)(y)}function m(y){return Ze(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||He(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function N3(e,t,n){return r;function r(l){return mt(l)?Ya(e,o)(l):n(l)}function o(l){return ly(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||He(l)?t(l):n(l)}}const O3={name:"hardBreakEscape",tokenize:I3};function I3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return He(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const R3={name:"headingAtx",resolve:L3,tokenize:D3};function L3(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"},or(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function D3(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||He(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 M3=["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"],cy=["pre","script","style","textarea"],F3={concrete:!0,name:"htmlFlow",resolveTo:H3,tokenize:z3},B3={partial:!0,tokenize:$3},U3={partial:!0,tokenize:j3};function H3(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 z3(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,S):I===63?(e.consume(I),o=3,r.interrupt?t:P):Mn(I)?(e.consume(I),u=String.fromCharCode(I),k):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,l=0,w):Mn(I)?(e.consume(I),o=4,r.interrupt?t:P):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:P):n(I)}function w(I){const ue="CDATA[";return I===ue.charCodeAt(l++)?(e.consume(I),l===ue.length?r.interrupt?t:fe:w):n(I)}function S(I){return Mn(I)?(e.consume(I),u=String.fromCharCode(I),k):n(I)}function k(I){if(I===null||I===47||I===62||mt(I)){const ue=I===47,be=u.toLowerCase();return!ue&&!a&&cy.includes(be)?(o=1,r.interrupt?t(I):fe(I)):M3.includes(u.toLowerCase())?(o=6,ue?(e.consume(I),_):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||An(I)?(e.consume(I),u+=String.fromCharCode(I),k):n(I)}function _(I){return I===62?(e.consume(I),r.interrupt?t:fe):n(I)}function C(I){return Ze(I)?(e.consume(I),C):q(I)}function A(I){return I===47?(e.consume(I),q):I===58||I===95||Mn(I)?(e.consume(I),H):Ze(I)?(e.consume(I),A):q(I)}function H(I){return I===45||I===46||I===58||I===95||An(I)?(e.consume(I),H):U(I)}function U(I){return I===61?(e.consume(I),L):Ze(I)?(e.consume(I),U):A(I)}function L(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,z):Ze(I)?(e.consume(I),L):Z(I)}function z(I){return I===d?(e.consume(I),d=null,de):I===null||He(I)?n(I):(e.consume(I),z)}function Z(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mt(I)?U(I):(e.consume(I),Z)}function de(I){return I===47||I===62||Ze(I)?A(I):n(I)}function q(I){return I===62?(e.consume(I),re):n(I)}function re(I){return I===null||He(I)?fe(I):Ze(I)?(e.consume(I),re):n(I)}function fe(I){return I===45&&o===2?(e.consume(I),Ce):I===60&&o===1?(e.consume(I),ae):I===62&&o===4?(e.consume(I),M):I===63&&o===3?(e.consume(I),P):I===93&&o===5?(e.consume(I),se):He(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(B3,K,pe)(I)):I===null||He(I)?(e.exit("htmlFlowData"),pe(I)):(e.consume(I),fe)}function pe(I){return e.check(U3,ee,K)(I)}function ee(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),ie}function ie(I){return I===null||He(I)?pe(I):(e.enter("htmlFlowData"),fe(I))}function Ce(I){return I===45?(e.consume(I),P):fe(I)}function ae(I){return I===47?(e.consume(I),u="",J):fe(I)}function J(I){if(I===62){const ue=u.toLowerCase();return cy.includes(ue)?(e.consume(I),M):fe(I)}return Mn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),J):fe(I)}function se(I){return I===93?(e.consume(I),P):fe(I)}function P(I){return I===62?(e.consume(I),M):I===45&&o===2?(e.consume(I),P):fe(I)}function M(I){return I===null||He(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),M)}function K(I){return e.exit("htmlFlow"),t(I)}}function j3(e,t,n){const r=this;return o;function o(u){return He(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function $3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Va,t,n)}}const V3={name:"htmlText",tokenize:q3};function q3(e,t,n){const r=this;let o,a,u;return l;function l(P){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(P),d}function d(P){return P===33?(e.consume(P),f):P===47?(e.consume(P),U):P===63?(e.consume(P),A):Mn(P)?(e.consume(P),Z):n(P)}function f(P){return P===45?(e.consume(P),p):P===91?(e.consume(P),a=0,w):Mn(P)?(e.consume(P),C):n(P)}function p(P){return P===45?(e.consume(P),y):n(P)}function m(P){return P===null?n(P):P===45?(e.consume(P),T):He(P)?(u=m,ae(P)):(e.consume(P),m)}function T(P){return P===45?(e.consume(P),y):m(P)}function y(P){return P===62?Ce(P):P===45?T(P):m(P)}function w(P){const M="CDATA[";return P===M.charCodeAt(a++)?(e.consume(P),a===M.length?S:w):n(P)}function S(P){return P===null?n(P):P===93?(e.consume(P),k):He(P)?(u=S,ae(P)):(e.consume(P),S)}function k(P){return P===93?(e.consume(P),_):S(P)}function _(P){return P===62?Ce(P):P===93?(e.consume(P),_):S(P)}function C(P){return P===null||P===62?Ce(P):He(P)?(u=C,ae(P)):(e.consume(P),C)}function A(P){return P===null?n(P):P===63?(e.consume(P),H):He(P)?(u=A,ae(P)):(e.consume(P),A)}function H(P){return P===62?Ce(P):A(P)}function U(P){return Mn(P)?(e.consume(P),L):n(P)}function L(P){return P===45||An(P)?(e.consume(P),L):z(P)}function z(P){return He(P)?(u=z,ae(P)):Ze(P)?(e.consume(P),z):Ce(P)}function Z(P){return P===45||An(P)?(e.consume(P),Z):P===47||P===62||mt(P)?de(P):n(P)}function de(P){return P===47?(e.consume(P),Ce):P===58||P===95||Mn(P)?(e.consume(P),q):He(P)?(u=de,ae(P)):Ze(P)?(e.consume(P),de):Ce(P)}function q(P){return P===45||P===46||P===58||P===95||An(P)?(e.consume(P),q):re(P)}function re(P){return P===61?(e.consume(P),fe):He(P)?(u=re,ae(P)):Ze(P)?(e.consume(P),re):de(P)}function fe(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),o=P,pe):He(P)?(u=fe,ae(P)):Ze(P)?(e.consume(P),fe):(e.consume(P),ee)}function pe(P){return P===o?(e.consume(P),o=void 0,ie):P===null?n(P):He(P)?(u=pe,ae(P)):(e.consume(P),pe)}function ee(P){return P===null||P===34||P===39||P===60||P===61||P===96?n(P):P===47||P===62||mt(P)?de(P):(e.consume(P),ee)}function ie(P){return P===47||P===62||mt(P)?de(P):n(P)}function Ce(P){return P===62?(e.consume(P),e.exit("htmlTextData"),e.exit("htmlText"),t):n(P)}function ae(P){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),J}function J(P){return Ze(P)?it(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(P):se(P)}function se(P){return e.enter("htmlTextData"),u(P)}}const ph={name:"labelEnd",resolveAll:X3,resolveTo:K3,tokenize:Q3},Y3={tokenize:J3},W3={tokenize:Z3},G3={tokenize:eO};function X3(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&&or(e,0,e.length,n),e}function K3(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:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=Er(l,e.slice(a+1,a+r+3)),l=Er(l,[["enter",p,t]]),l=Er(l,Fl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=Er(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=Er(l,e.slice(u+1)),l=Er(l,[["exit",d,t]]),or(e,a,e.length,l),e}function Q3(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(Pr(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(Y3,p,u?p:m)(T):T===91?e.attempt(W3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(G3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function J3(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)?Ya(e,a)(m):a(m)}function a(m){return m===41?p(m):ay(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?Ya(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?ly(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?Ya(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 Z3(e,t,n){const r=this;return o;function o(l){return uy.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function eO(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 tO={name:"labelStartImage",resolveAll:ph.resolveAll,tokenize:nO};function nO(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 rO={name:"labelStartLink",resolveAll:ph.resolveAll,tokenize:iO};function iO(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 mh={name:"lineEnding",tokenize:oO};function oO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Bl={name:"thematicBreak",tokenize:sO};function sO(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||He(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?it(e,l,"whitespace")(f):l(f))}}const Gn={continuation:{tokenize:cO},exit:fO,name:"list",tokenize:lO},aO={partial:!0,tokenize:hO},uO={partial:!0,tokenize:dO};function lO(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:dh(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(Bl,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 dh(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(Va,r.interrupt?n:p,e.attempt(aO,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 cO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Va,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(uO,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Gn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function dO(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 fO(e){e.exit(this.containerState.type)}function hO(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 dy={name:"setextUnderline",resolveTo:pO,tokenize:mO};function pO(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:F({},e[r][1].start),end:F({},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=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function mO(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||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const gO={tokenize:EO};function EO(e){const t=this,n=e.attempt(Va,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(x3,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 yO={resolveAll:hy()},bO=fy("string"),TO=fy("text");function fy(e){return{resolveAll:hy(e==="text"?wO: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 hy(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 wO(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:F({},r.end)};r.end=F({},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 xO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:C3},disable:{null:[]},document:{42:Gn,43:Gn,45:Gn,48:Gn,49:Gn,50:Gn,51:Gn,52:Gn,53:Gn,54:Gn,55:Gn,56:Gn,57:Gn,62:ty},flow:{35:R3,42:Bl,45:[dy,Bl],60:F3,61:dy,95:Bl,96:oy,126:oy},flowInitial:{[-2]:hh,[-1]:hh,32:hh},insideSpan:{null:[fh,yO]},string:{38:ry,92:ny},text:{[-5]:mh,[-4]:mh,[-3]:mh,33:tO,38:ry,42:fh,60:[r3,V3],91:rO,92:[O3,ny],93:ph,95:fh,96:g3}},Symbol.toStringTag,{value:"Module"}));function _O(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:z(U),check:z(L),consume:C,enter:A,exit:H,interrupt:z(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:S,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(re){return u=Er(u,re),k(),u[u.length-1]!==null?[]:(Z(t,0),f.events=Fl(a,f.events,f),f.events)}function T(re,fe){return vO(y(re),fe)}function y(re){return SO(u,re)}function w(){const{_bufferIndex:re,_index:fe,line:pe,column:ee,offset:ie}=r;return{_bufferIndex:re,_index:fe,line:pe,column:ee,offset:ie}}function S(re){o[re.line]=re.column,q()}function k(){let re;for(;r._index<u.length;){const fe=u[r._index];if(typeof fe=="string")for(re=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===re&&r._bufferIndex<fe.length;)_(fe.charCodeAt(r._bufferIndex));else _(fe)}}function _(re){p=p(re)}function C(re){He(re)?(r.line++,r.column=1,r.offset+=re===-3?2:1,q()):re!==-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=re}function A(re,fe){const pe=fe||{};return pe.type=re,pe.start=w(),f.events.push(["enter",pe,f]),l.push(pe),pe}function H(re){const fe=l.pop();return fe.end=w(),f.events.push(["exit",fe,f]),fe}function U(re,fe){Z(re,fe.from)}function L(re,fe){fe.restore()}function z(re,fe){return pe;function pe(ee,ie,Ce){let ae,J,se,P;return Array.isArray(ee)?K(ee):"tokenize"in ee?K([ee]):M(ee);function M(Ae){return we;function we(Re){const Fe=Re!==null&&Ae[Re],at=Re!==null&&Ae.null,cn=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(at)?at:at?[at]:[]];return K(cn)(Re)}}function K(Ae){return ae=Ae,J=0,Ae.length===0?Ce:I(Ae[J])}function I(Ae){return we;function we(Re){return P=de(),se=Ae,Ae.partial||(f.currentConstruct=Ae),Ae.name&&f.parser.constructs.disable.null.includes(Ae.name)?be():Ae.tokenize.call(fe?Object.assign(Object.create(f),fe):f,d,ue,be)(Re)}}function ue(Ae){return re(se,P),ie}function be(Ae){return P.restore(),++J<ae.length?I(ae[J]):Ce}}}function Z(re,fe){re.resolveAll&&!a.includes(re)&&a.push(re),re.resolve&&or(f.events,fe,f.events.length-fe,re.resolve(f.events.slice(fe),f)),re.resolveTo&&(f.events=re.resolveTo(f.events,f))}function de(){const re=w(),fe=f.previous,pe=f.currentConstruct,ee=f.events.length,ie=Array.from(l);return{from:ee,restore:Ce};function Ce(){r=re,f.previous=fe,f.currentConstruct=pe,f.events.length=ee,l=ie,q()}}function q(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function SO(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 vO(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 AO(e){const r={constructs:QE([xO,...(e||{}).extensions||[]]),content:o(KN),defined:[],document:o(JN),flow:o(gO),lazy:{},string:o(bO),text:o(TO)};return r;function o(a){return u;function u(l){return _O(r,a,l)}}}function CO(e){for(;!sy(e););return e}const py=/[\0\t\n\r]/g;function kO(){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(py.lastIndex=m,f=py.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 NO(e){return e.replace(PO,OO)}function OO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return JE(n.slice(a?2:1),a?16:10)}return ch(n)||e}const my={}.hasOwnProperty;function IO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),RO(n)(CO(AO(n).document().write(kO()(e,t,!0))))}function RO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(ar),blockQuote:a(at),characterEscape:he,characterReference:he,codeFenced:a(ln),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(ln,u),codeText:a(At,u),codeTextData:he,data:he,codeFlowValue:he,definition:a(Ht),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ot),hardBreakEscape:a(Fn),hardBreakTrailing:a(Fn),htmlFlow:a(Kt,u),htmlFlowData:he,htmlText:a(Kt,u),htmlTextData:he,image:a($e),label:u,link:a(bt),listItem:a(It),listItemValue:T,listOrdered:a(Wt,m),listUnordered:a(Wt),paragraph:a(Bn),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ar),strong:a(ur),thematicBreak:a(qo)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:Fe,autolinkProtocol:Re,blockQuote:d(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:Ae,characterReference:we,codeFenced:d(P),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:q,codeIndented:d(_),codeText:d(oe),codeTextData:q,data:q,definition:d(),definitionDestinationString:H,definitionLabelString:C,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(de),hardBreakTrailing:d(de),htmlFlow:d(ye),htmlFlowData:q,htmlText:d(te),htmlTextData:q,image:d(ae),label:se,labelText:J,lineEnding:re,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:k,resourceTitleString:M,resource:K,setextHeading:d(ee),setextHeadingLineSequence:z,setextHeadingText:L,strong:d(),thematicBreak:d()}};gy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let xe={type:"root",children:[]};const Ve={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ge=[];let tt=-1;for(;++tt<ie.length;)if(ie[tt][1].type==="listOrdered"||ie[tt][1].type==="listUnordered")if(ie[tt][0]==="enter")Ge.push(tt);else{const Mt=Ge.pop();tt=o(ie,Mt,tt)}for(tt=-1;++tt<ie.length;){const Mt=t[ie[tt][0]];my.call(Mt,ie[tt][1].type)&&Mt[ie[tt][1].type].call(Object.assign({sliceSerialize:ie[tt][2].sliceSerialize},Ve),ie[tt][1])}if(Ve.tokenStack.length>0){const Mt=Ve.tokenStack[Ve.tokenStack.length-1];(Mt[1]||Ey).call(Ve,void 0,Mt[0])}for(xe.position={start:Hi(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:Hi(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)xe=t.transforms[tt](xe)||xe;return xe}function o(ie,xe,Ve){let Ge=xe-1,tt=-1,Mt=!1,Tr,mn,Lr,oi;for(;++Ge<=Ve;){const Jt=ie[Ge];switch(Jt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Jt[0]==="enter"?tt++:tt--,oi=void 0;break}case"lineEndingBlank":{Jt[0]==="enter"&&(Tr&&!oi&&!tt&&!Lr&&(Lr=Ge),oi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oi=void 0}if(!tt&&Jt[0]==="enter"&&Jt[1].type==="listItemPrefix"||tt===-1&&Jt[0]==="exit"&&(Jt[1].type==="listUnordered"||Jt[1].type==="listOrdered")){if(Tr){let lr=Ge;for(mn=void 0;lr--;){const Cn=ie[lr];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;mn&&(ie[mn][1].type="lineEndingBlank",Mt=!0),Cn[1].type="lineEnding",mn=lr}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}Lr&&(!mn||Lr<mn)&&(Tr._spread=!0),Tr.end=Object.assign({},mn?ie[mn][1].start:Jt[1].end),ie.splice(mn||Ge,0,["exit",Tr,Jt[2]]),Ge++,Ve++}if(Jt[1].type==="listItemPrefix"){const lr={type:"listItem",_spread:!1,start:Object.assign({},Jt[1].start),end:void 0};Tr=lr,ie.splice(Ge,0,["enter",lr,Jt[2]]),Ge++,Ve++,Lr=void 0,oi=!0}}}return ie[xe][1]._spread=Mt,Ve}function a(ie,xe){return Ve;function Ve(Ge){l.call(this,ie(Ge),Ge),xe&&xe.call(this,Ge)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ie,xe,Ve){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([xe,Ve||void 0]),ie.position={start:Hi(xe.start),end:void 0}}function d(ie){return xe;function xe(Ve){ie&&ie.call(this,Ve),f.call(this,Ve)}}function f(ie,xe){const Ve=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==ie.type&&(xe?xe.call(this,ie,Ge[0]):(Ge[1]||Ey).call(this,ie,Ge[0]));else throw new Error("Cannot close `"+ie.type+"` ("+ja({start:ie.start,end:ie.end})+"): it’s not open");Ve.position.end=Hi(ie.end)}function p(){return lh(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(ie){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=ie}function w(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function P(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie.replace(/(\r?\n|\r)$/g,"")}function C(ie){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=Pr(this.sliceSerialize(ie)).toLowerCase()}function A(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ie}function H(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ie}function U(ie){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Ve=this.sliceSerialize(ie).length;xe.depth=Ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function z(ie){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function ee(){this.data.setextHeadingSlurpLineEnding=void 0}function he(ie){const Ve=this.stack[this.stack.length-1].children;let Ge=Ve[Ve.length-1];(!Ge||Ge.type!=="text")&&(Ge=Qt(),Ge.position={start:Hi(ie.start),end:void 0},Ve.push(Ge)),this.stack.push(Ge)}function q(ie){const xe=this.stack.pop();xe.value+=this.sliceSerialize(ie),xe.position.end=Hi(ie.end)}function re(ie){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=xe.children[xe.children.length-1];Ve.position.end=Hi(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(he.call(this,ie),q.call(this,ie))}function de(){this.data.atHardBreak=!0}function ye(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function te(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function oe(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.value=ie}function Ce(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=xe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function ae(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=xe,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function J(ie){const xe=this.sliceSerialize(ie),Ve=this.stack[this.stack.length-2];Ve.label=NO(xe),Ve.identifier=Pr(xe).toLowerCase()}function se(){const ie=this.stack[this.stack.length-1],xe=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Ge=ie.children;Ve.children=Ge}else Ve.alt=xe}function k(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.url=ie}function M(){const ie=this.resume(),xe=this.stack[this.stack.length-1];xe.title=ie}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ue(ie){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=Pr(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function be(ie){this.data.characterReferenceType=ie.type}function Ae(ie){const xe=this.sliceSerialize(ie),Ve=this.data.characterReferenceType;let Ge;Ve?(Ge=JE(xe,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=ch(xe);const tt=this.stack[this.stack.length-1];tt.value+=Ge}function we(ie){const xe=this.stack.pop();xe.position.end=Hi(ie.end)}function Re(ie){q.call(this,ie);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(ie)}function Fe(ie){q.call(this,ie);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(ie)}function at(){return{type:"blockquote",children:[]}}function ln(){return{type:"code",lang:null,meta:null,value:""}}function At(){return{type:"inlineCode",value:""}}function Ht(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ot(){return{type:"emphasis",children:[]}}function ar(){return{type:"heading",depth:0,children:[]}}function Fn(){return{type:"break"}}function Kt(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Wt(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function It(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Bn(){return{type:"paragraph",children:[]}}function ur(){return{type:"strong",children:[]}}function Qt(){return{type:"text",value:""}}function qo(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function gy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?gy(e,r):LO(e,r)}}function LO(e,t){let n;for(n in t)if(my.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 Ey(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ja({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ja({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ja({start:t.start,end:t.end})+") is still open")}function DO(e){const t=this;t.parser=n;function n(r){return IO(r,ge(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function MO(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 FO(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 AO(e){const r={constructs:QE([xO,...(e||{}).extensions||[]]),content:o(KN),defined:[],document:o(JN),flow:o(gO),lazy:{},string:o(bO),text:o(TO)};return r;function o(a){return u;function u(l){return _O(r,a,l)}}}function CO(e){for(;!sy(e););return e}const py=/[\0\t\n\r]/g;function kO(){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(py.lastIndex=m,f=py.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 NO(e){return e.replace(PO,OO)}function OO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return JE(n.slice(a?2:1),a?16:10)}return ch(n)||e}const my={}.hasOwnProperty;function IO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),RO(n)(CO(AO(n).document().write(kO()(e,t,!0))))}function RO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(ar),blockQuote:a(at),characterEscape:de,characterReference:de,codeFenced:a(cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(cn,u),codeText:a(Ct,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(zt),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(It),hardBreakEscape:a(Bn),hardBreakTrailing:a(Bn),htmlFlow:a(Qt,u),htmlFlowData:de,htmlText:a(Qt,u),htmlTextData:de,image:a($e),label:u,link:a(bt),listItem:a(Rt),listItemValue:T,listOrdered:a(Gt,m),listUnordered:a(Gt),paragraph:a(Un),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ar),strong:a(ur),thematicBreak:a(qo)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:Fe,autolinkProtocol:Re,blockQuote:d(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:be,characterReferenceMarkerNumeric:be,characterReferenceValue:Ae,characterReference:we,codeFenced:d(k),codeFencedFence:S,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:q,codeIndented:d(_),codeText:d(ie),codeTextData:q,data:q,definition:d(),definitionDestinationString:H,definitionLabelString:C,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(fe),hardBreakTrailing:d(fe),htmlFlow:d(pe),htmlFlowData:q,htmlText:d(ee),htmlTextData:q,image:d(ae),label:se,labelText:J,lineEnding:re,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ue,resourceDestinationString:P,resourceTitleString:M,resource:K,setextHeading:d(Z),setextHeadingLineSequence:z,setextHeadingText:L,strong:d(),thematicBreak:d()}};gy(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(oe){let xe={type:"root",children:[]};const Ve={stack:[xe],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ge=[];let tt=-1;for(;++tt<oe.length;)if(oe[tt][1].type==="listOrdered"||oe[tt][1].type==="listUnordered")if(oe[tt][0]==="enter")Ge.push(tt);else{const Ft=Ge.pop();tt=o(oe,Ft,tt)}for(tt=-1;++tt<oe.length;){const Ft=t[oe[tt][0]];my.call(Ft,oe[tt][1].type)&&Ft[oe[tt][1].type].call(Object.assign({sliceSerialize:oe[tt][2].sliceSerialize},Ve),oe[tt][1])}if(Ve.tokenStack.length>0){const Ft=Ve.tokenStack[Ve.tokenStack.length-1];(Ft[1]||Ey).call(Ve,void 0,Ft[0])}for(xe.position={start:Hi(oe.length>0?oe[0][1].start:{line:1,column:1,offset:0}),end:Hi(oe.length>0?oe[oe.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)xe=t.transforms[tt](xe)||xe;return xe}function o(oe,xe,Ve){let Ge=xe-1,tt=-1,Ft=!1,Tr,gn,Lr,oi;for(;++Ge<=Ve;){const Zt=oe[Ge];switch(Zt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Zt[0]==="enter"?tt++:tt--,oi=void 0;break}case"lineEndingBlank":{Zt[0]==="enter"&&(Tr&&!oi&&!tt&&!Lr&&(Lr=Ge),oi=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:oi=void 0}if(!tt&&Zt[0]==="enter"&&Zt[1].type==="listItemPrefix"||tt===-1&&Zt[0]==="exit"&&(Zt[1].type==="listUnordered"||Zt[1].type==="listOrdered")){if(Tr){let lr=Ge;for(gn=void 0;lr--;){const kn=oe[lr];if(kn[1].type==="lineEnding"||kn[1].type==="lineEndingBlank"){if(kn[0]==="exit")continue;gn&&(oe[gn][1].type="lineEndingBlank",Ft=!0),kn[1].type="lineEnding",gn=lr}else if(!(kn[1].type==="linePrefix"||kn[1].type==="blockQuotePrefix"||kn[1].type==="blockQuotePrefixWhitespace"||kn[1].type==="blockQuoteMarker"||kn[1].type==="listItemIndent"))break}Lr&&(!gn||Lr<gn)&&(Tr._spread=!0),Tr.end=Object.assign({},gn?oe[gn][1].start:Zt[1].end),oe.splice(gn||Ge,0,["exit",Tr,Zt[2]]),Ge++,Ve++}if(Zt[1].type==="listItemPrefix"){const lr={type:"listItem",_spread:!1,start:Object.assign({},Zt[1].start),end:void 0};Tr=lr,oe.splice(Ge,0,["enter",lr,Zt[2]]),Ge++,Ve++,Lr=void 0,oi=!0}}}return oe[xe][1]._spread=Ft,Ve}function a(oe,xe){return Ve;function Ve(Ge){l.call(this,oe(Ge),Ge),xe&&xe.call(this,Ge)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(oe,xe,Ve){this.stack[this.stack.length-1].children.push(oe),this.stack.push(oe),this.tokenStack.push([xe,Ve||void 0]),oe.position={start:Hi(xe.start),end:void 0}}function d(oe){return xe;function xe(Ve){oe&&oe.call(this,Ve),f.call(this,Ve)}}function f(oe,xe){const Ve=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==oe.type&&(xe?xe.call(this,oe,Ge[0]):(Ge[1]||Ey).call(this,oe,Ge[0]));else throw new Error("Cannot close `"+oe.type+"` ("+ja({start:oe.start,end:oe.end})+"): it’s not open");Ve.position.end=Hi(oe.end)}function p(){return lh(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(oe){if(this.data.expectingFirstListItemValue){const xe=this.stack[this.stack.length-2];xe.start=Number.parseInt(this.sliceSerialize(oe),10),this.data.expectingFirstListItemValue=void 0}}function y(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.lang=oe}function w(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.meta=oe}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function k(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe.replace(/(\r?\n|\r)$/g,"")}function C(oe){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=Pr(this.sliceSerialize(oe)).toLowerCase()}function A(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function H(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function U(oe){const xe=this.stack[this.stack.length-1];if(!xe.depth){const Ve=this.sliceSerialize(oe).length;xe.depth=Ve}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function z(oe){const xe=this.stack[this.stack.length-1];xe.depth=this.sliceSerialize(oe).codePointAt(0)===61?1:2}function Z(){this.data.setextHeadingSlurpLineEnding=void 0}function de(oe){const Ve=this.stack[this.stack.length-1].children;let Ge=Ve[Ve.length-1];(!Ge||Ge.type!=="text")&&(Ge=Jt(),Ge.position={start:Hi(oe.start),end:void 0},Ve.push(Ge)),this.stack.push(Ge)}function q(oe){const xe=this.stack.pop();xe.value+=this.sliceSerialize(oe),xe.position.end=Hi(oe.end)}function re(oe){const xe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ve=xe.children[xe.children.length-1];Ve.position.end=Hi(oe.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(xe.type)&&(de.call(this,oe),q.call(this,oe))}function fe(){this.data.atHardBreak=!0}function pe(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ee(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function ie(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.value=oe}function Ce(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function ae(){const oe=this.stack[this.stack.length-1];if(this.data.inReference){const xe=this.data.referenceType||"shortcut";oe.type+="Reference",oe.referenceType=xe,delete oe.url,delete oe.title}else delete oe.identifier,delete oe.label;this.data.referenceType=void 0}function J(oe){const xe=this.sliceSerialize(oe),Ve=this.stack[this.stack.length-2];Ve.label=NO(xe),Ve.identifier=Pr(xe).toLowerCase()}function se(){const oe=this.stack[this.stack.length-1],xe=this.resume(),Ve=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ve.type==="link"){const Ge=oe.children;Ve.children=Ge}else Ve.alt=xe}function P(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.url=oe}function M(){const oe=this.resume(),xe=this.stack[this.stack.length-1];xe.title=oe}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function ue(oe){const xe=this.resume(),Ve=this.stack[this.stack.length-1];Ve.label=xe,Ve.identifier=Pr(this.sliceSerialize(oe)).toLowerCase(),this.data.referenceType="full"}function be(oe){this.data.characterReferenceType=oe.type}function Ae(oe){const xe=this.sliceSerialize(oe),Ve=this.data.characterReferenceType;let Ge;Ve?(Ge=JE(xe,Ve==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=ch(xe);const tt=this.stack[this.stack.length-1];tt.value+=Ge}function we(oe){const xe=this.stack.pop();xe.position.end=Hi(oe.end)}function Re(oe){q.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url=this.sliceSerialize(oe)}function Fe(oe){q.call(this,oe);const xe=this.stack[this.stack.length-1];xe.url="mailto:"+this.sliceSerialize(oe)}function at(){return{type:"blockquote",children:[]}}function cn(){return{type:"code",lang:null,meta:null,value:""}}function Ct(){return{type:"inlineCode",value:""}}function zt(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function It(){return{type:"emphasis",children:[]}}function ar(){return{type:"heading",depth:0,children:[]}}function Bn(){return{type:"break"}}function Qt(){return{type:"html",value:""}}function $e(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Gt(oe){return{type:"list",ordered:oe.type==="listOrdered",start:null,spread:oe._spread,children:[]}}function Rt(oe){return{type:"listItem",spread:oe._spread,checked:null,children:[]}}function Un(){return{type:"paragraph",children:[]}}function ur(){return{type:"strong",children:[]}}function Jt(){return{type:"text",value:""}}function qo(){return{type:"thematicBreak"}}}function Hi(e){return{line:e.line,column:e.column,offset:e.offset}}function gy(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?gy(e,r):LO(e,r)}}function LO(e,t){let n;for(n in t)if(my.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 Ey(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ja({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ja({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ja({start:t.start,end:t.end})+") is still open")}function DO(e){const t=this;t.parser=n;function n(r){return IO(r,Ee(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function MO(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 FO(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 BO(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 UO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function HO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ys(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 jO(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 $O(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function yy(e,t){const n=t.referenceType;let r="]";if(n==="collapsed"?r+="[]":n==="full"&&(r+="["+(t.label||t.identifier)+"]"),t.type==="imageReference")return[{type:"text",value:"!["+t.alt+r}];const o=e.all(t),a=o[0];a&&a.type==="text"?a.value="["+a.value:o.unshift({type:"text",value:"["});const u=o[o.length-1];return u&&u.type==="text"?u.value+=r:o.push({type:"text",value:r}),o}function VO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yy(e,t);const o={src:ys(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 qO(e,t){const n={src:ys(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 YO(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 WO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return yy(e,t);const o={href:ys(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 GO(e,t){const n={href:ys(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 XO(e,t,n){const r=e.all(t),o=n?KO(n):by(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 KO(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=by(n[r])}return t}function by(e){const t=e.spread;return t==null?e.children.length>1:t}function QO(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 JO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tI(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=Gr(t.children[1]),d=Ll(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 nI(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 rI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ty=9,wy=32;function iI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(xy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(xy(t.slice(o),o>0,!1)),a.join("")}function xy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Ty||a===wy;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Ty||a===wy;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function oI(e,t){const n={type:"text",value:iI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const aI={blockquote:MO,break:FO,code:BO,delete:UO,emphasis:HO,footnoteReference:zO,heading:jO,html:$O,imageReference:VO,image:qO,inlineCode:YO,linkReference:WO,link:GO,listItem:XO,list:QO,paragraph:JO,root:ZO,strong:eI,table:tI,tableCell:rI,tableRow:nI,text:oI,thematicBreak:sI,toml:Ul,yaml:Ul,definition:Ul,footnoteDefinition:Ul};function Ul(){}const _y=-1,Hl=0,Wa=1,zl=2,gh=3,Eh=4,yh=5,bh=6,Sy=7,vy=8,{defineProperty:uI}=Object,Ay=typeof self=="object"?self:globalThis,Cy=(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 Ay[e](t)},lI=(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 Hl:case _y:return n(u,o);case Wa:{const l=n([],o);for(const d of u)l.push(r(d));return l}case zl:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?uI(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case gh:return n(new Date(u),o);case Eh:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case yh:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case bh:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case Sy:{const{name:l,message:d}=u;return n(typeof Ay[l]=="function"?Cy(l,d):new Error(d),o)}case vy: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(Cy(a,u),o)};return r},ky=e=>lI(new Map,e)(0),Po="",{toString:cI}={},{keys:dI,is:fI}=Object,Ga=e=>{const t=typeof e;if(t!=="object"||!e)return[Hl,t];const n=cI.call(e).slice(8,-1);switch(n){case"Array":return[Wa,Po];case"Object":return[zl,Po];case"Date":return[gh,Po];case"RegExp":return[Eh,Po];case"Map":return[yh,Po];case"Set":return[bh,Po];case"DataView":return[Wa,n]}return n.includes("Array")?[Wa,n]:e instanceof Error?[Sy,e.name||"Error"]:[zl,n]},jl=([e,t])=>e===Hl&&(t==="function"||t==="symbol"),hI=(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]=Ga(u);switch(l){case Hl:{let p=u;switch(d){case"bigint":l=vy,p=u.toString();break;case"number":if(!u&&fI(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([_y],u)}return o([l,p],u)}case Wa:{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 zl:{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 dI(u))(e||!jl(Ga(u[T])))&&p.push([a(T),a(u[T])]);return m}case gh:return o([l,isNaN(u.getTime())?Po:u.toISOString()],u);case Eh:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case yh:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(jl(Ga(T))||jl(Ga(y))))&&p.push([a(T),a(y)]);return m}case bh:{const p=[],m=o([l,p],u);for(const T of u)(e||!jl(Ga(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},Py=(e,{json:t,lossy:n}={})=>{const r=[];return hI(!(t||n),!!t,new Map,r)(e),r},No=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ky(Py(e,t)):structuredClone(e):(e,t)=>ky(Py(e,t));function pI(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 mI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pI,r=e.options.footnoteBackLabel||mI,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=ys(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 P=p[p.length-1];if(P&&P.type==="element"&&P.tagName==="p"){const C=P.children[P.children.length-1];C&&C.type==="text"?C.value+=" ":P.children.push({type:"text",value:" "}),P.children.push(...w)}else p.push(...w);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:ge(F({},No(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 KO(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=by(n[r])}return t}function by(e){const t=e.spread;return t==null?e.children.length>1:t}function QO(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 JO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function ZO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function eI(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function tI(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=Gr(t.children[1]),d=Ll(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 nI(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 rI(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Ty=9,wy=32;function iI(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(xy(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(xy(t.slice(o),o>0,!1)),a.join("")}function xy(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Ty||a===wy;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Ty||a===wy;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function oI(e,t){const n={type:"text",value:iI(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function sI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const aI={blockquote:MO,break:FO,code:BO,delete:UO,emphasis:HO,footnoteReference:zO,heading:jO,html:$O,imageReference:VO,image:qO,inlineCode:YO,linkReference:WO,link:GO,listItem:XO,list:QO,paragraph:JO,root:ZO,strong:eI,table:tI,tableCell:rI,tableRow:nI,text:oI,thematicBreak:sI,toml:Ul,yaml:Ul,definition:Ul,footnoteDefinition:Ul};function Ul(){}const _y=-1,Hl=0,Wa=1,zl=2,gh=3,Eh=4,yh=5,bh=6,Sy=7,vy=8,{defineProperty:uI}=Object,Ay=typeof self=="object"?self:globalThis,Cy=(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 Ay[e](t)},lI=(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 Hl:case _y:return n(u,o);case Wa:{const l=n([],o);for(const d of u)l.push(r(d));return l}case zl:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?uI(l,p,{value:m,configurable:!0,enumerable:!0,writable:!0}):l[p]=m}return l}case gh:return n(new Date(u),o);case Eh:{const{source:l,flags:d}=u;return n(new RegExp(l,d),o)}case yh:{const l=n(new Map,o);for(const[d,f]of u)l.set(r(d),r(f));return l}case bh:{const l=n(new Set,o);for(const d of u)l.add(r(d));return l}case Sy:{const{name:l,message:d}=u;return n(typeof Ay[l]=="function"?Cy(l,d):new Error(d),o)}case vy: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(Cy(a,u),o)};return r},ky=e=>lI(new Map,e)(0),Po="",{toString:cI}={},{keys:dI,is:fI}=Object,Ga=e=>{const t=typeof e;if(t!=="object"||!e)return[Hl,t];const n=cI.call(e).slice(8,-1);switch(n){case"Array":return[Wa,Po];case"Object":return[zl,Po];case"Date":return[gh,Po];case"RegExp":return[Eh,Po];case"Map":return[yh,Po];case"Set":return[bh,Po];case"DataView":return[Wa,n]}return n.includes("Array")?[Wa,n]:e instanceof Error?[Sy,e.name||"Error"]:[zl,n]},jl=([e,t])=>e===Hl&&(t==="function"||t==="symbol"),hI=(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]=Ga(u);switch(l){case Hl:{let p=u;switch(d){case"bigint":l=vy,p=u.toString();break;case"number":if(!u&&fI(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([_y],u)}return o([l,p],u)}case Wa:{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 zl:{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 dI(u))(e||!jl(Ga(u[T])))&&p.push([a(T),a(u[T])]);return m}case gh:return o([l,isNaN(u.getTime())?Po:u.toISOString()],u);case Eh:{const{source:p,flags:m}=u;return o([l,{source:p,flags:m}],u)}case yh:{const p=[],m=o([l,p],u);for(const[T,y]of u)(e||!(jl(Ga(T))||jl(Ga(y))))&&p.push([a(T),a(y)]);return m}case bh:{const p=[],m=o([l,p],u);for(const T of u)(e||!jl(Ga(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},Py=(e,{json:t,lossy:n}={})=>{const r=[];return hI(!(t||n),!!t,new Map,r)(e),r},No=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?ky(Py(e,t)):structuredClone(e):(e,t)=>ky(Py(e,t));function pI(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 mI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function gI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||pI,r=e.options.footnoteBackLabel||mI,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=ys(m.toLowerCase());let y=0;const w=[],S=e.footnoteCounts.get(m);for(;S!==void 0&&++y<=S;){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 k=p[p.length-1];if(k&&k.type==="element"&&k.tagName==="p"){const C=k.children[k.children.length-1];C&&C.type==="text"?C.value+=" ":k.children.push({type:"text",value:" "}),k.children.push(...w)}else p.push(...w);const _={type:"element",tagName:"li",properties:{id:t+"fn-"+T},children:e.wrap(p,!0)};e.patch(f,_),l.push(_)}if(l.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:Ee(F({},No(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 $l=(function(e){if(e==null)return TI;if(typeof e=="function")return Vl(e);if(typeof e=="object")return Array.isArray(e)?EI(e):yI(e);if(typeof e=="string")return bI(e);throw new Error("Expected function, string, or object as test")});function EI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$l(e[n]);return Vl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function yI(e){const t=e;return Vl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function bI(e){return Vl(t);function t(n){return n&&n.type===e}}function Vl(e){return t;function t(n,r,o){return!!(wI(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function TI(){return!0}function wI(e){return e!==null&&typeof e=="object"&&"type"in e}function dz(e){return e}const Ny=[],xI=!0,Th=!1,_I="skip";function Oy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=$l(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=Ny,w,v,P;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=SI(n(d,p)),y[0]===Th))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==_I)for(v=(r?_.children.length:-1)+u,P=p.concat(_);v>-1&&v<_.children.length;){const C=_.children[v];if(w=l(C,v,P)(),w[0]===Th)return w;v=typeof w[1]=="number"?w[1]:v+u}}return y}}}function SI(e){return Array.isArray(e)?e:typeof e=="number"?[xI,e]:e==null?Ny:[e]}function ql(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),Oy(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 wh={}.hasOwnProperty,vI={};function AI(e,t){const n=t||vI,r=new Map,o=new Map,a=new Map,u=F(F({},aI),n.handlers),l={all:f,applyData:kI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:CI,wrap:NI};return ql(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(wh.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:P}=v,_=bn(v,["children"]),C=No(_);return C.children=l.all(p),C}return No(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=Iy(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=Iy(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function CI(e,t){e.position&&(t.position=HE(e))}function kI(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,No(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&&!(wh.call(n,"hProperties")||wh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
26
+ `}]}}const $l=(function(e){if(e==null)return TI;if(typeof e=="function")return Vl(e);if(typeof e=="object")return Array.isArray(e)?EI(e):yI(e);if(typeof e=="string")return bI(e);throw new Error("Expected function, string, or object as test")});function EI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=$l(e[n]);return Vl(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function yI(e){const t=e;return Vl(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function bI(e){return Vl(t);function t(n){return n&&n.type===e}}function Vl(e){return t;function t(n,r,o){return!!(wI(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function TI(){return!0}function wI(e){return e!==null&&typeof e=="object"&&"type"in e}function dz(e){return e}const Ny=[],xI=!0,Th=!1,_I="skip";function Oy(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=$l(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=Ny,w,S,k;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=SI(n(d,p)),y[0]===Th))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==_I)for(S=(r?_.children.length:-1)+u,k=p.concat(_);S>-1&&S<_.children.length;){const C=_.children[S];if(w=l(C,S,k)(),w[0]===Th)return w;S=typeof w[1]=="number"?w[1]:S+u}}return y}}}function SI(e){return Array.isArray(e)?e:typeof e=="number"?[xI,e]:e==null?Ny:[e]}function ql(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),Oy(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 wh={}.hasOwnProperty,vI={};function AI(e,t){const n=t||vI,r=new Map,o=new Map,a=new Map,u=F(F({},aI),n.handlers),l={all:f,applyData:kI,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:CI,wrap:NI};return ql(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(wh.call(l.handlers,T)&&y)return y(l,p,m);if(l.options.passThrough&&l.options.passThrough.includes(T)){if("children"in p){const S=p,{children:k}=S,_=Tn(S,["children"]),C=No(_);return C.children=l.all(p),C}return No(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=Iy(w.value)),!Array.isArray(w)&&w.type==="element")){const S=w.children[0];S&&S.type==="text"&&(S.value=Iy(S.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function CI(e,t){e.position&&(t.position=HE(e))}function kI(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,No(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&&!(wh.call(n,"hProperties")||wh.call(n,"hChildren"))?{type:"text",value:t.value}:{type:"element",tagName:"div",properties:{},children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function NI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
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 Iy(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Ry(e,t){const n=AI(e,t),r=n.one(e,void 0),o=gI(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 OI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=Ry(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return Ry(n,F({file:r},e||t))}}function Ly(e){if(e)throw e}var xh,Dy;function II(){if(Dy)return xh;Dy=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 xh=function d(){var f,p,m,T,y,w,v=arguments[0],P=1,_=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},P=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});P<_;++P)if(f=arguments[P],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},xh}var RI=II();const _h=Ue(RI);function Sh(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 LI(){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?DI(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 DI(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 Xr={basename:MI,dirname:FI,extname:BI,join:UI,sep:"/"};function MI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xa(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 FI(e){if(Xa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function BI(e){Xa(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 UI(...e){let t=-1,n;for(;++t<e.length;)Xa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":HI(n)}function HI(e){Xa(e);const t=e.codePointAt(0)===47;let n=zI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zI(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 Xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jI={cwd:$I};function $I(){return"/"}function vh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VI(e){if(typeof e=="string")e=new URL(e);else if(!vh(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 qI(e)}function qI(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 Ah=["history","path","basename","stem","extname","dirname"];class My{constructor(t){let n;t?vh(t)?n={path:t}:typeof t=="string"||YI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ah.length;){const a=Ah[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)Ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Xr.basename(this.path):void 0}set basename(t){kh(t,"basename"),Ch(t,"basename"),this.path=Xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xr.dirname(this.path):void 0}set dirname(t){Fy(this.basename,"dirname"),this.path=Xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xr.extname(this.path):void 0}set extname(t){if(Ch(t,"extname"),Fy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vh(t)&&(t=VI(t)),kh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xr.basename(this.path,this.extname):void 0}set stem(t){kh(t,"stem"),Ch(t,"stem"),this.path=Xr.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 Sn(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 Ch(e,t){if(e&&e.includes(Xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xr.sep+"`")}function kh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),GI={}.hasOwnProperty;class Ph extends WI{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=LI()}copy(){const t=new Ph;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(_h(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ih("data",this.frozen),this.namespace[t]=n,this):GI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ih("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=Yl(t),r=this.parser||this.Parser;return Nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Nh("process",this.parser||this.Parser),Oh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Yl(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);QI(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(),Nh("processSync",this.parser||this.Parser),Oh("processSync",this.compiler||this.Compiler),this.process(t,o),Uy("processSync","process",n),r;function o(a,u){n=!0,Ly(a),r=u}}run(t,n,r){By(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=Yl(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),Uy("runSync","run",r),o;function a(u,l){Ly(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Yl(n),o=this.compiler||this.Compiler;return Oh("stringify",o),By(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ih("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=_h(!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];Sh(v)&&Sh(y)&&(y=_h(!0,v,y)),r[T]=[f,y,...w]}}}}const XI=new Ph().freeze();function Nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ih(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 By(e){if(!Sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Uy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yl(e){return KI(e)?e:new My(e)}function KI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function QI(e){return typeof e=="string"||JI(e)}function JI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ZI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hy=[],zy={allowDangerousHtml:!0},eR=/^(https?|ircs?|mailto|xmpp)$/i,tR=[{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 jy(e){const t=nR(e),n=rR(e);return iR(t.runSync(t.parse(n),n),e)}function nR(e){const t=e.rehypePlugins||Hy,n=e.remarkPlugins||Hy,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),zy):zy;return XI().use(DO).use(n).use(OI,r).use(t)}function rR(e){const t=e.children||"",n=new My;return typeof t=="string"&&(n.value=t),n}function iR(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||$y;for(const p of tR)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+ZI+p.id,void 0);return ql(e,f),CN(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.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 uh)if(Object.hasOwn(uh,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=uh[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 $y(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||eR.test(e.slice(0,t))?e:""}const Vy=/[#.]/g;function oR(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Vy.lastIndex=o;const l=Vy.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 qy(e,t,n){const r=n?lR(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=oR(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,sR(u))l.unshift(u);else for(const[m,T]of Object.entries(u))aR(e,d.properties,m,T)}for(const f of l)Rh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function sR(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 aR(e,t,n,r){const o=Rl(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=RE(r):o.commaSeparated?a=TE(r):o.commaOrSpaceSeparated?a=RE(TE(r).join(" ")):a=Yy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?uR(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Yy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Rh(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)Rh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Rh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Yy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ba(n)===Ba(t)))return!0}return n}function uR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function lR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const cR=["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"],dR=qy(Ua,"div"),fR=qy(Bi,"g",cR);function hR(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=Wy(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=Wy(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 Wy(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 Oo={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/"},Gy={}.hasOwnProperty,pR=Object.prototype;function mR(e,t){const n=t||{};return Lh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Bi:Ua,verbose:n.verbose||!1},e)}function Lh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Wl(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:Xy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=hR(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"},Wl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Wl(e,r,n),n}default:return n=gR(e,t),n}}function Xy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Lh(e,t[n]);r.push(o)}return r}function gR(e,t){const n=e.schema;e.schema=t.namespaceURI===Oo.svg?Bi:Ua;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Gy.call(pR,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?fR:dR)(t.tagName,o,Xy(e,t.childNodes));if(Wl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Ts(d.startTag),p=d&&d.endTag&&Ts(d.endTag),m=Lh(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Wl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ER(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ER(e,t,n){const r=Ts(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)Gy.call(n.attrs,u)&&(a[Rl(e.schema,u).property]=Ts(n.attrs[u]));n.startTag;const l=Ts(n.startTag),d=n.endTag?Ts(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Ts(e){const t=Ky({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ky({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ky(e){return e.line&&e.column?e:void 0}const Qy={}.hasOwnProperty;function Jy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Qy.call(o,e)){const d=String(o[e]);u=Qy.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 yR={},bR={}.hasOwnProperty,Zy=Jy("type",{handlers:{root:wR,element:AR,text:SR,comment:vR,doctype:_R}});function TR(e,t){const r=(t||yR).space;return Zy(e,r==="svg"?Bi:Ua)}function wR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Dh(e.children,n,t),ws(e,n),n}function xR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Dh(e.children,n,t),ws(e,n),n}function _R(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ws(e,t),t}function SR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ws(e,t),t}function vR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ws(e,t),t}function AR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Bi);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&bR.call(e.properties,a)){const d=CR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Oo[u],childNodes:[],parentNode:null};return l.childNodes=Dh(e.children,l,r),ws(e,l),e.tagName==="template"&&e.content&&(l.content=xR(e.content,r)),l}function CR(e,t,n){const r=Rl(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?wE(n):LE(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=Oo[r.space]}return o}function Dh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Zy(e[r],n);a.parentNode=t,o.push(a)}return o}function ws(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 kR=["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]),St="�";var N;(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"})(N||(N={}));const Xn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function eb(e){return e>=55296&&e<=57343}function NR(e){return e>=56320&&e<=57343}function OR(e,t){return(e-55296)*1024+9216+t}function tb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function nb(e){return e>=64976&&e<=65007||PR.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const IR=65536;class RR{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=IR,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(NR(n))return this.pos++,this._addGap(),OR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,eb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){tb(t)?this._err(ne.controlCharacterInInputStream):nb(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function rb(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 LR=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))),DR=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 MR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=DR.get(e))!==null&&t!==void 0?t:e}var rn;(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"})(rn||(rn={}));const FR=32;var zi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(zi||(zi={}));function Mh(e){return e>=rn.ZERO&&e<=rn.NINE}function BR(e){return e>=rn.UPPER_A&&e<=rn.UPPER_F||e>=rn.LOWER_A&&e<=rn.LOWER_F}function UR(e){return e>=rn.UPPER_A&&e<=rn.UPPER_Z||e>=rn.LOWER_A&&e<=rn.LOWER_Z||Mh(e)}function HR(e){return e===rn.EQUALS||UR(e)}var on;(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"})(on||(on={}));var bi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(bi||(bi={}));class zR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=on.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bi.Strict}startEntity(t){this.decodeMode=t,this.state=on.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case on.EntityStart:return t.charCodeAt(n)===rn.NUM?(this.state=on.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=on.NamedEntity,this.stateNamedEntity(t,n));case on.NumericStart:return this.stateNumericStart(t,n);case on.NumericDecimal:return this.stateNumericDecimal(t,n);case on.NumericHex:return this.stateNumericHex(t,n);case on.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|FR)===rn.LOWER_X?(this.state=on.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=on.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(Mh(o)||BR(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(Mh(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===rn.SEMI)this.consumed+=1;else if(this.decodeMode===bi.Strict)return 0;return this.emitCodePoint(MR(this.result),this.consumed),this.errors&&(t!==rn.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&zi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=jR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===bi.Attribute&&(a===0||HR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&zi.VALUE_LENGTH)>>14,a!==0){if(u===rn.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==bi.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]&zi.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]&~zi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case on.NamedEntity:return this.result!==0&&(this.decodeMode!==bi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case on.NumericDecimal:return this.emitNumericEntity(0,2);case on.NumericHex:return this.emitNumericEntity(0,3);case on.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case on.EntityStart:return 0}}}function jR(e,t,n,r){const o=(t&zi.BRANCH_LENGTH)>>7,a=t&zi.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 Io;(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"})(Io||(Io={}));var yr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(yr||(yr={}));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 $R=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 xs(e){var t;return(t=$R.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const pe=g,VR={[ce.HTML]:new Set([pe.ADDRESS,pe.APPLET,pe.AREA,pe.ARTICLE,pe.ASIDE,pe.BASE,pe.BASEFONT,pe.BGSOUND,pe.BLOCKQUOTE,pe.BODY,pe.BR,pe.BUTTON,pe.CAPTION,pe.CENTER,pe.COL,pe.COLGROUP,pe.DD,pe.DETAILS,pe.DIR,pe.DIV,pe.DL,pe.DT,pe.EMBED,pe.FIELDSET,pe.FIGCAPTION,pe.FIGURE,pe.FOOTER,pe.FORM,pe.FRAME,pe.FRAMESET,pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6,pe.HEAD,pe.HEADER,pe.HGROUP,pe.HR,pe.HTML,pe.IFRAME,pe.IMG,pe.INPUT,pe.LI,pe.LINK,pe.LISTING,pe.MAIN,pe.MARQUEE,pe.MENU,pe.META,pe.NAV,pe.NOEMBED,pe.NOFRAMES,pe.NOSCRIPT,pe.OBJECT,pe.OL,pe.P,pe.PARAM,pe.PLAINTEXT,pe.PRE,pe.SCRIPT,pe.SECTION,pe.SELECT,pe.SOURCE,pe.STYLE,pe.SUMMARY,pe.TABLE,pe.TBODY,pe.TD,pe.TEMPLATE,pe.TEXTAREA,pe.TFOOT,pe.TH,pe.THEAD,pe.TITLE,pe.TR,pe.TRACK,pe.UL,pe.WBR,pe.XMP]),[ce.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[ce.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},Fh=new Set([pe.H1,pe.H2,pe.H3,pe.H4,pe.H5,pe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var R;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(R||(R={}));const Ut={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function qR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ka(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function YR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function ji(e){return YR(e)||Ka(e)}function ib(e){return ji(e)||qR(e)}function Gl(e){return e+32}function ob(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function sb(e){return ob(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function WR(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:eb(e)?ne.surrogateCharacterReference:nb(e)?ne.noncharacterCharacterReference:tb(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class GR{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new RR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new zR(LR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=WR(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:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(rb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=xs(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ob(t)?Xe.WHITESPACE_CHARACTER:t===N.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?bi.Attribute:bi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ji(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ji(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=St;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ji(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ji(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ji(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ji(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ji(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xn.SCRIPT,!1)&&sb(this.preprocessor.peek(Xn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(St);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Xn.SCRIPT,!1)&&sb(this.preprocessor.peek(Xn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=St;break}default:this.currentAttr.name+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=St;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=St;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Xn.DASH_DASH,!0)?(this._createCommentToken(Xn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Xn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Xn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Xn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(Xn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=St;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ne.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ka(t))this._createDoctypeToken(String.fromCharCode(Gl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(St),this.state=R.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=St;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Xn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Xn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=St;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=St;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=St;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=St;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.NULL:{this._err(ne.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ib(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ib(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ab=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ub=new Set([...ab,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Xl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),XR=new Set([...Xl,g.OL,g.UL]),KR=new Set([...Xl,g.BUTTON]),lb=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),cb=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),QR=new Set([g.TR,g.TEMPLATE,g.HTML]),JR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),ZR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),e6=new Set([g.TD,g.TH]);class t6{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(Fh,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(e6,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(ZR,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(JR,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(QR,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(cb.has(o))return!1;break}case ce.MATHML:{if(lb.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xl)}hasInListItemScope(t){return this.hasInDynamicScope(t,XR)}hasInButtonScope(t){return this.hasInDynamicScope(t,KR)}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(Fh.has(n))return!0;if(Xl.has(n))return!1;break}case ce.SVG:{if(cb.has(n))return!1;break}case ce.MATHML:{if(lb.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&&ab.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ub.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ub.has(this.currentTagId);)this.pop()}}const Bh=3;var Kr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Kr||(Kr={}));const db={type:Kr.Marker};class n6{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===Kr.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<Bh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Bh)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>=Bh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(db)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Kr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Kr.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(db);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Kr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Kr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Kr.Element&&n.element===t)}}const $i={createDocument(){return{nodeName:"#document",mode:yr.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};$i.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($i.isTextNode(n)){n.value+=t;return}}$i.appendChild(e,$i.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&$i.isTextNode(r)?r.value+=t:$i.insertBefore(e,$i.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=F(F({},e.sourceCodeLocation),t)}},fb="html",r6="about:legacy-compat",i6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hb=["+//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//"],o6=[...hb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],s6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),pb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],a6=[...pb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mb(e,t){return t.some(n=>e.startsWith(n))}function u6(e){return e.name===fb&&e.publicId===null&&(e.systemId===null||e.systemId===r6)}function l6(e){if(e.name!==fb)return yr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===i6)return yr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),s6.has(n))return yr.QUIRKS;let r=t===null?o6:hb;if(mb(n,r))return yr.QUIRKS;if(r=t===null?pb:a6,mb(n,r))return yr.LIMITED_QUIRKS}return yr.NO_QUIRKS}const gb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},c6="definitionurl",d6="definitionURL",f6=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])),h6=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}]]),p6=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])),m6=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 g6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Io.COLOR||r===Io.SIZE||r===Io.FACE)||m6.has(t)}function Eb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===c6){e.attrs[t].name=d6;break}}function yb(e){for(let t=0;t<e.attrs.length;t++){const n=f6.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Uh(e){for(let t=0;t<e.attrs.length;t++){const n=h6.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 E6(e){const t=p6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=xs(e.tagName))}function y6(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function b6(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Io.ENCODING){const o=n[r].value.toLowerCase();return o===gb.TEXT_HTML||o===gb.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function T6(e,t,n,r){return(!r||r===ce.HTML)&&b6(e,t,n)||(!r||r===ce.MATHML)&&y6(e,t)}const w6="hidden",x6=8,_6=3;var B;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(B||(B={}));const S6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bb=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Tb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:$i,onParseError:null};class wb{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},Tb),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 GR(this.options,this),this.activeFormattingElements=new n6(this.treeAdapter),this.fragmentContextID=r?xs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new t6(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=F(F({},Tb),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(B.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:S6,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=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=Ut.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ce.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ut.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ut.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ut.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ut.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",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&&ge(F({},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===Xe.END_TAG&&o===n.tagName?{endTag:F({},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 Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return T6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Kr.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=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return bb.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 VR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eL(this,t);return}switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{_b(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_TABLE_TEXT:{Ob(this,t);break}case B.IN_COLUMN_GROUP:{Jl(this,t);break}case B.AFTER_BODY:{tc(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z4(this,t);return}switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_COLUMN_GROUP:{Jl(this,t);break}case B.AFTER_BODY:{tc(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){zh(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{zh(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.AFTER_BODY:{O6(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{I6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{R6(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case B.IN_TABLE_TEXT:{ou(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?tL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{L6(this,t);break}case B.BEFORE_HEAD:{M6(this,t);break}case B.IN_HEAD:{Nr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{U6(this,t);break}case B.AFTER_HEAD:{z6(this,t);break}case B.IN_BODY:{An(this,t);break}case B.IN_TABLE:{_s(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_CAPTION:{F4(this,t);break}case B.IN_COLUMN_GROUP:{Vh(this,t);break}case B.IN_TABLE_BODY:{Zl(this,t);break}case B.IN_ROW:{ec(this,t);break}case B.IN_CELL:{H4(this,t);break}case B.IN_SELECT:{Lb(this,t);break}case B.IN_SELECT_IN_TABLE:{j4(this,t);break}case B.IN_TEMPLATE:{V4(this,t);break}case B.AFTER_BODY:{Y4(this,t);break}case B.IN_FRAMESET:{W4(this,t);break}case B.AFTER_FRAMESET:{X4(this,t);break}case B.AFTER_AFTER_BODY:{Q4(this,t);break}case B.AFTER_AFTER_FRAMESET:{J4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{D6(this,t);break}case B.BEFORE_HEAD:{F6(this,t);break}case B.IN_HEAD:{B6(this,t);break}case B.IN_HEAD_NO_SCRIPT:{H6(this,t);break}case B.AFTER_HEAD:{j6(this,t);break}case B.IN_BODY:{Ql(this,t);break}case B.TEXT:{C4(this,t);break}case B.IN_TABLE:{ru(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_CAPTION:{B4(this,t);break}case B.IN_COLUMN_GROUP:{U4(this,t);break}case B.IN_TABLE_BODY:{qh(this,t);break}case B.IN_ROW:{Rb(this,t);break}case B.IN_CELL:{z4(this,t);break}case B.IN_SELECT:{Db(this,t);break}case B.IN_SELECT_IN_TABLE:{$4(this,t);break}case B.IN_TEMPLATE:{q4(this,t);break}case B.AFTER_BODY:{Fb(this,t);break}case B.IN_FRAMESET:{G4(this,t);break}case B.AFTER_FRAMESET:{K4(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{Pb(this,t);break}case B.TEXT:{k4(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_TEMPLATE:{Mb(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{jh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{xb(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_TABLE_TEXT:{Nb(this,t);break}}}}function v6(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):kb(e,t),n}function A6(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 C6(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>=_6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=k6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function k6(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=xs(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 N6(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 Hh(e,t){for(let n=0;n<x6;n++){const r=v6(e,t);if(!r)break;const o=A6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=C6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&P6(e,u,a),N6(e,o,r)}}function zh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function O6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function I6(e,t){e._appendCommentNode(t,e.document)}function jh(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 R6(e,t){e._setDocumentType(t);const n=t.forceQuirks?yr.QUIRKS:l6(t);u6(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function Qa(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,yr.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function L6(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=B.BEFORE_HEAD):Ja(e,t)}function D6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ja(e,t)}function Ja(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function M6(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:Za(e,t)}}function F6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Za(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Za(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function Nr(e,t){switch(t.tagID){case g.HTML:{An(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,Ut.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ut.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ut.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ut.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:eu(e,t)}}function B6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{eu(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ro(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function eu(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function U6(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Nr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:tu(e,t)}}function H6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{tu(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function tu(e,t){const n=t.type===Xe.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function z6(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Nr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:nu(e,t)}}function j6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{nu(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function nu(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,Kl(e,t)}function Kl(e,t){switch(t.type){case Xe.CHARACTER:{_b(e,t);break}case Xe.WHITESPACE_CHARACTER:{xb(e,t);break}case Xe.COMMENT:{zh(e,t);break}case Xe.START_TAG:{An(e,t);break}case Xe.END_TAG:{Ql(e,t);break}case Xe.EOF:{Pb(e,t);break}}}function xb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _b(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function V6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function q6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET)}function Y6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function W6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function G6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function X6(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 K6(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 Q6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=Ut.PLAINTEXT}function J6(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 Z6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Hh(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 e4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t4(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Hh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function n4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function r4(e,t){e.treeAdapter.getDocumentMode(e.document)!==yr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function Sb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vb(e){const t=rb(e,Io.TYPE);return t!=null&&t.toLowerCase()===w6}function i4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),vb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function o4(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function s4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function a4(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Sb(e,t)}function u4(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ut.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function l4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function c4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ut.RAWTEXT)}function Ab(e,t){e._switchToTextParsing(t,Ut.RAWTEXT)}function d4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function f4(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function h4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function p4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function m4(e,t){e._reconstructActiveFormattingElements(),Eb(t),Uh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function g4(e,t){e._reconstructActiveFormattingElements(),yb(t),Uh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function Cb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function An(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:{e4(e,t);break}case g.A:{Z6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{W6(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:{Y6(e,t);break}case g.LI:case g.DD:case g.DT:{K6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Sb(e,t);break}case g.HR:{s4(e,t);break}case g.RB:case g.RTC:{h4(e,t);break}case g.RT:case g.RP:{p4(e,t);break}case g.PRE:case g.LISTING:{G6(e,t);break}case g.XMP:{l4(e,t);break}case g.SVG:{g4(e,t);break}case g.HTML:{$6(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Nr(e,t);break}case g.BODY:{V6(e,t);break}case g.FORM:{X6(e,t);break}case g.NOBR:{t4(e,t);break}case g.MATH:{m4(e,t);break}case g.TABLE:{r4(e,t);break}case g.INPUT:{i4(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{o4(e,t);break}case g.IMAGE:{a4(e,t);break}case g.BUTTON:{J6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{n4(e,t);break}case g.IFRAME:{c4(e,t);break}case g.SELECT:{d4(e,t);break}case g.OPTION:case g.OPTGROUP:{f4(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ab(e,t);break}case g.FRAMESET:{q6(e,t);break}case g.TEXTAREA:{u4(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ab(e,t):Cb(e,t);break}case g.PLAINTEXT:{Q6(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:Cb(e,t)}}function E4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function y4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,Fb(e,t))}function b4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function T4(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 w4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function x4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function _4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function S4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function v4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function A4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function kb(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 Ql(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:{Hh(e,t);break}case g.P:{w4(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:{b4(e,t);break}case g.LI:{x4(e);break}case g.DD:case g.DT:{_4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{S4(e);break}case g.BR:{A4(e);break}case g.BODY:{E4(e,t);break}case g.HTML:{y4(e,t);break}case g.FORM:{T4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{v4(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:kb(e,t)}}function Pb(e,t){e.tmplInsertionModeStack.length>0?Mb(e,t):jh(e,t)}function C4(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 k4(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function $h(e,t){if(e.openElements.currentTagId!==void 0&&bb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{Ob(e,t);break}case Xe.WHITESPACE_CHARACTER:{Nb(e,t);break}}else iu(e,t)}function P4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CAPTION}function N4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function O4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Vh(e,t)}function I4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_TABLE_BODY}function R4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,Zl(e,t)}function L4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function D4(e,t){vb(t)?e._appendElement(t,ce.HTML):iu(e,t),t.ackSelfClosing=!0}function M4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{R4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}case g.COL:{O4(e,t);break}case g.FORM:{M4(e,t);break}case g.TABLE:{L4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{I4(e,t);break}case g.INPUT:{D4(e,t);break}case g.CAPTION:{P4(e,t);break}case g.COLGROUP:{N4(e,t);break}default:iu(e,t)}}function ru(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ro(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:iu(e,t)}}function iu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Kl(e,t),e.fosterParentingEnabled=n}function Nb(e,t){e.pendingCharacterTokens.push(t)}function Ob(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ou(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)iu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ib=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function F4(e,t){const n=t.tagID;Ib.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,_s(e,t)):An(e,t)}function B4(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===g.TABLE&&ru(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:Ql(e,t)}}function Vh(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Nr(e,t);break}default:Jl(e,t)}}function U4(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ro(e,t);break}case g.COL:break;default:Jl(e,t)}}function Jl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function Zl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,ec(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,_s(e,t));break}default:_s(e,t)}}function qh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,ru(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:ru(e,t)}}function ec(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,Zl(e,t));break}default:_s(e,t)}}function Rb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,qh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,qh(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:ru(e,t)}}function H4(e,t){const n=t.tagID;Ib.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),ec(e,t)):An(e,t)}function z4(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Rb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ql(e,t)}}function Lb(e,t){switch(t.tagID){case g.HTML:{An(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:{Nr(e,t);break}}}function Db(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:{Ro(e,t);break}}}function j4(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)):Lb(e,t)}function $4(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)):Db(e,t)}function V4(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Nr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,_s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,Vh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,Zl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,ec(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,An(e,t)}}function q4(e,t){t.tagID===g.TEMPLATE&&Ro(e,t)}function Mb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):jh(e,t)}function Y4(e,t){t.tagID===g.HTML?An(e,t):tc(e,t)}function Fb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else tc(e,t)}function tc(e,t){e.insertionMode=B.IN_BODY,Kl(e,t)}function W4(e,t){switch(t.tagID){case g.HTML:{An(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:{Nr(e,t);break}}}function G4(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function X4(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function K4(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function Q4(e,t){t.tagID===g.HTML?An(e,t):nc(e,t)}function nc(e,t){e.insertionMode=B.IN_BODY,Kl(e,t)}function J4(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function Z4(e,t){t.chars=St,e._insertCharacters(t)}function eL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bb(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 tL(e,t){if(g6(t))Bb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?Eb(t):r===ce.SVG&&(E6(t),yb(t)),Uh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function nL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Bb(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 rL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,iL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ub={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Hb(e,t){const n=pL(e),r=Jy("type",{handlers:{root:oL,element:sL,text:aL,comment:jb,doctype:uL,raw:cL},unknown:dL}),o={parser:n?new wb(Ub):wb.getFragmentParser(void 0,Ub),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),Ss(o,Gr());const a=n?o.parser.document:o.parser.getFragment(),u=mR(a,{file:o.options.file});return o.stitches&&ql(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 zb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function oL(e,t){zb(e.children,t)}function sL(e,t){fL(e,t),zb(e.children,t),hL(e,t)}function aL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lL(e,t){t.stitches=!0;const n=mL(e);if("children"in e&&"children"in n){const r=Hb({type:"root",children:e.children},t.options);n.children=r.children}jb({type:"comment",value:{stitch:n}},t)}function jb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function cL(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,$b(t,Gr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rL,"&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 dL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lL(n,t);else{let r="";throw iL.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 Ss(e,t){$b(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ut.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function $b(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 fL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ut.PLAINTEXT)return;Ss(t,Gr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Oo.html;o===Oo.html&&n==="svg"&&(o=Oo.svg);const a=TR(ge(F({},e),{children:[]}),{space:o===Oo.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:su(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function hL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&kR.includes(n)||t.parser.tokenizer.state===Ut.PLAINTEXT)return;Ss(t,Ll(e));const r={type:Xe.END_TAG,tagName:n,tagID:xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:su(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ut.RCDATA||t.parser.tokenizer.state===Ut.RAWTEXT||t.parser.tokenizer.state===Ut.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ut.DATA)}function pL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function su(e){const t=Gr(e)||{line:void 0,column:void 0,offset:void 0},n=Ll(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 mL(e){return"children"in e?No(ge(F({},e),{children:[]})):No(e)}function Vb(e){return function(t,n){return Hb(t,ge(F({},e),{file:n}))}}const Lo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],qb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Lo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Lo],h2:[["className","sr-only"]],img:[...Lo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Lo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Lo],table:[...Lo],ul:[...Lo,["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"]},Vi={}.hasOwnProperty;function gL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},qb),t):qb,stack:[]},o=Yb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Yb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return EL(e,n);case"doctype":return yL(e,n);case"element":return bL(e,n);case"root":return TL(e,n);case"text":return wL(e,n)}}}function EL(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 au(a,t),a}}function yL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return au(n,t),n}}function bL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Wb(e,t.children),o=xL(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&&Vi.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 au(u,t),u}function TL(e,t){const r={type:"root",children:Wb(e,t.children)};return au(r,t),r}function wL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return au(r,t),r}function Wb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Yb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function xL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Vi.call(r,n)?r[n]:void 0,u=r&&Vi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Vi.call(l,f)){const p=l[f];let m=Gb(e,Kb(a,f),f,p);m==null&&(m=Gb(e,Kb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Vi.call(o,n)){const p=o[n];for(f in p)Vi.call(p,f)&&!Vi.call(d,f)&&(d[f]=p[f])}return d}function Gb(e,t,n,r){return t?Array.isArray(r)?_L(e,t,n,r):Xb(e,t,n,r):void 0}function _L(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Xb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Xb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&SL(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 SL(e,t,n){const r=e.schema.protocols&&Vi.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 au(e,t){const n=HE(t);t.data&&(e.data=No(t.data)),n&&(e.position=n)}function Kb(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 vL(e){return function(t){return gL(t,e)}}const Qb=({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 x.jsx("a",ge(F(F({className:W(e,`${j}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},AL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Qe();return!e&&!t?null:x.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?x.jsx(jy,{rehypePlugins:[Vb,vL],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Qb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},Yh=({className:e,isLoading:t,isConnecting:n=!1,isConnectionSlow:r=!1,pendingInput:o,inputError:a,componentType:u,onSubmit:l,prepareSubmit:d})=>{const{connected:f,imageFile:p}=Vn(),{setImageFile:m}=So(),{logger:T,globalClassName:y,searchConfig:w,features:v}=Qe(),P=qn(),_=O.useRef(null),C=O.useRef(!1),A=O.useRef(p);A.current=p;const[H,U]=O.useState(!1),[L,z]=O.useState(null),ee=O.useRef({pendingInput:o,imageFile:p});O.useEffect(()=>{var Ae,we;const ue=ee.current;ee.current={pendingInput:o,imageFile:((Ae=ue.pendingInput)==null?void 0:Ae.phase)!=="failed"&&((we=ue.pendingInput)==null?void 0:we.text)===(o==null?void 0:o.text)?ue.imageFile:p};const be=_.current;ue.pendingInput&&ue.pendingInput.phase!=="failed"&&!o&&!a&&!C.current&&(be==null?void 0:be.value)===ue.pendingInput.text&&(be.value="",p&&p===ue.imageFile&&m(null))},[o,a,p,m]);const he=!!(v!=null&&v.enableImageUpload),q=!!f||!1,re=n?"connecting":q?"connected":"disconnected",de=(o==null?void 0:o.phase)==="queued"||(o==null?void 0:o.phase)==="sending",ye=!!(t||H||de),te=ye||!(q||n),oe=a||L;let Ce=null;(o==null?void 0:o.phase)==="queued"?Ce="Your message is queued. Connecting...":(o==null?void 0:o.phase)==="sending"?Ce="Sending your message...":n?Ce="Connecting to assistant...":r&&(Ce="Connection is taking longer than expected.");let ae;n?ae=P.connecting.connectingToAssistantAriaLabel:q?ae=P.connecting.connectedToAssistant:ae=P.connecting.disconnectedFromAssistant;const J=()=>p?new Promise((ue,be)=>{const Ae=new FileReader;Ae.readAsDataURL(p),Ae.onload=()=>ue(Ae.result),Ae.onerror=we=>be(we)}):Promise.resolve(""),se=()=>{ye||C.current||m(null)},k=O.useCallback(ue=>{const be=ue==null?void 0:ue[0];if(be&&!(te||C.current)){if(be.size>10*1024*1024){alert(P.imageAttachment.fileSizeExceeded10mb),m(null);return}m(be)}},[te,m,P]),M=ue=>{(ye||C.current)&&ue.preventDefault()},K=ue=>{if(!ye&&!C.current||ue.key==="Tab")return;(ue.key==="Enter"||ue.key==="Backspace"||ue.key==="Delete"||ue.key.length===1&&!ue.metaKey&&!ue.ctrlKey)&&ue.preventDefault()},I=ue=>et(null,null,function*(){if(ue.preventDefault(),te||C.current)return;const be=_.current,Ae=(be==null?void 0:be.value)||"",we=Ae.trim();if(!(!be||!we)){C.current=!0,U(!0),z(null);try{const Re=d==null?void 0:d(we);let Fe="";try{Fe=yield J()}catch(At){T==null||T.error("Error converting file to base64:",At),_.current&&alert("There was an error processing the file. Please try again.");return}if(_.current!==be||be.value!==Ae||A.current!==p)return;const at=Re?Re(Fe):l(we,Fe);(at===void 0||(yield at))&&_.current===be&&be.value===Ae&&(A.current===p&&m(null),be.value="")}catch(Re){T==null||T.error("Error submitting message:",Re),_.current===be&&z(P.errors.genericRetry)}finally{C.current=!1,_.current===be&&U(!1)}}});return x.jsxs("div",{className:W(y,e,`cim-${u}-component`,p&&"with-attachments",`${j}-search-bar-wrapper`),children:[p&&x.jsx(VP,{file:p,componentType:u,globalClassName:y,disabled:ye,onRemove:se}),x.jsxs("form",{className:W(y,e,`cim-${u}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:I,children:[x.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,re),children:x.jsx("span",{className:`${j}-visually-hidden`,children:ae})}),he&&x.jsx(JP,{componentType:u,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:te,globalClassName:y,className:e,onFiles:k}),x.jsx("input",{className:W(y,e,`cim-${u}-component`,`${j}-search-input`),type:"text",ref:_,defaultValue:(o==null?void 0:o.text)||"",placeholder:w==null?void 0:w.placeholder,"aria-label":(w==null?void 0:w.inputAriaLabel)||(w==null?void 0:w.placeholder)||P.searchBar.placeholderAskAQuestion,"aria-disabled":ye||void 0,readOnly:H||de,name:`${j}-user-input`,onBeforeInput:M,onPaste:M,onCut:M,onDrop:M,onKeyDown:K}),x.jsx(rN,{isLoading:!!t}),x.jsx(eN,{className:e,globalClassName:y,searchConfig:w,componentType:u,isLoading:te})]}),(oe||Ce)&&x.jsx("div",{className:W(y,`${j}-search-status`,oe&&`${j}-search-error`),role:oe?"alert":"status",children:oe||Ce}),x.jsx(AL,{})]})};function CL(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 kL(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 Jb=O.createContext({isOpen:!1,panelId:"",triggerId:""}),Wh=O.createContext(null),Zb=O.createContext(null),Do=()=>{var n,r;const e=O.useContext(Wh),t=O.useContext(Zb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},eT=({onClearChat:e,componentType:t})=>{const n=Do(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(kL,{"aria-hidden":"true"}),"Clear chat"]})};function PL(e){return e==null?[]:Array.isArray(e)?e:[e]}var NL=(e,...t)=>e.concat(t),OL=(e,...t)=>e.filter(n=>!t.includes(n)),IL=e=>Array.from(new Set(e));function tT(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 RL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return tT(e,t,{step:-r,loop:o})}var LL=e=>Array.isArray(e),nT=e=>e!=null&&typeof e=="object",DL=e=>nT(e)&&!LL(e),rc=e=>typeof e=="string",vs=e=>typeof e=="function",ML=e=>e==null,FL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),BL=e=>Object.prototype.toString.call(e),rT=Function.prototype.toString,UL=rT.call(Object),HL=e=>{if(!nT(e)||BL(e)!="[object Object]"||$L(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=FL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rT.call(n)==UL},zL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,jL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,$L=e=>zL(e)||jL(e),VL=e=>e(),qL=()=>{},Gh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function YL(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:WL,max:GL}=Math,XL=e=>Number.isNaN(e),KL=e=>XL(e)?0:e,iT=(e,t,n)=>WL(GL(KL(e),t),n);function Xh(e){if(!HL(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]=Xh(o))}return n}function Kh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function QL(e,t){if(e==null)throw new Error(t())}function JL(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 ZL=Object.defineProperty,e5=(e,t,n)=>t in e?ZL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qh=(e,t,n)=>e5(e,typeof t!="symbol"?t+"":t,n),oT=()=>{},ic=e=>typeof e=="object"&&e!==null,As=e=>e?"":void 0,sT=e=>e?"true":void 0,t5=1,n5=9,r5=11,sn=e=>ic(e)&&e.nodeType===t5&&typeof e.nodeName=="string",oc=e=>ic(e)&&e.nodeType===n5,i5=e=>ic(e)&&e===e.window,aT=e=>sn(e)?e.localName||"":"#document";function o5(e){return["html","body","#document"].includes(aT(e))}var s5=e=>ic(e)&&e.nodeType!==void 0,Mo=e=>s5(e)&&e.nodeType===r5&&"host"in e,a5=e=>sn(e)&&e.localName==="input",u5=e=>sn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function uu(e){if(!e)return!1;const t=e.getRootNode();return Ps(t)===e}var l5=/(textarea|select)/;function c5(e){if(e==null||!sn(e))return!1;try{return a5(e)&&e.selectionStart!=null||l5.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Cs(e,t){var r;if(!e||!t||!sn(e)||!sn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Mo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Qr(e){var t;return oc(e)?e:i5(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function d5(e){return Qr(e).documentElement}function ks(e){var t,n,r;return Mo(e)?ks(e.host):oc(e)?(t=e.defaultView)!=null?t:window:sn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ps(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function f5(e){if(aT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mo(e)&&e.host||d5(e);return Mo(t)?t.host:t}function Jh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),oc(t)||Mo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Zh=new WeakMap;function Ns(e){return Zh.has(e)||Zh.set(e,ks(e).getComputedStyle(e)),Zh.get(e)}var ep=new Set(["menu","listbox","dialog","grid","tree","region"]),h5=e=>ep.has(e),uT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function lT(e,t){const n=new Set,r=Jh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=uT(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&&h5(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function cT(e,t){const n=Jh(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=uT(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&&ep.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function p5(e){const t=new Set;return cT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function m5(e){const t=e.getAttribute("role");return!!(t&&ep.has(t))}function g5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function E5(e){var t;return g5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function y5(e){if(!e.id)return!1;const t=Jh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&m5(e))}var tp=()=>typeof document!="undefined";function b5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var np=e=>tp()&&e.test(b5()),T5=e=>tp()&&e.test(navigator.vendor),dT=()=>tp()&&!!navigator.maxTouchPoints,w5=()=>np(/^iPhone/i),x5=()=>np(/^iPad/i)||rp()&&navigator.maxTouchPoints>1,sc=()=>w5()||x5(),_5=()=>rp()||sc(),rp=()=>np(/^Mac/i),S5=()=>_5()&&T5(/apple/i);function v5(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 Or(e){var n;const t=v5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var fT=e=>e.button===0,A5=e=>e.button===2||rp()&&e.ctrlKey&&e.button===0,C5=e=>"touches"in e&&e.touches.length>0,k5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},hT={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=k5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in hT&&(o=hT[o]),o}function pT(e,t="client"){const n=C5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var an=(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)}},mT=e=>sn(e)&&e.tagName==="IFRAME",N5=/^(audio|video|details)$/;function gT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var O5=e=>!Number.isNaN(gT(e)),I5=e=>gT(e)<0;function R5(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 ET(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=R5(d,t);if(f){const p=Array.from(f.querySelectorAll(ac)).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 ac="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",yT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(ac));(n==!0||n=="if-empty"&&o.length===0)&&sn(e)&&Jr(e)&&o.unshift(e);const u=[];for(const l of o)if(Jr(l)){if(mT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...yT(d,{getShadowRoot:r}));continue}u.push(l)}return r?ET(u,r,Jr):u};function Jr(e){return!sn(e)||e.closest("[inert]")?!1:e.matches(ac)&&u5(e)}function Os(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(ac));n&&Fo(e)&&o.unshift(e);const a=[];for(const u of o)if(Fo(u)){if(mT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Os(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=ET(a,r,Fo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Fo(e){return sn(e)&&e.tabIndex>0?!0:Jr(e)&&!I5(e)}function L5(e,t={}){const n=Os(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function D5(e,t={}){const{current:n,getShadowRoot:r}=t,o=Os(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ps(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function lu(e){return e.tabIndex<0&&(N5.test(e.localName)||c5(e))&&!O5(e)?0:e.tabIndex}function bT(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=Os(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var M5=class wS{constructor(){Qh(this,"id",null),Qh(this,"fn_cleanup"),Qh(this,"cleanup",()=>{this.cancel()})}static create(){return new wS}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 Xt(e){const t=M5.create();return t.request(e),t.cleanup}function TT(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 ip(e){const t=f5(e);return o5(t)?Qr(t).body:sn(t)&&U5(t)?t:ip(t)}var F5=/auto|scroll|overlay|hidden|clip/,B5=new Set(["inline","contents"]);function U5(e){const t=ks(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return F5.test(n+o+r)&&!B5.has(a)}var Is="default",op="",uc=new WeakMap;function H5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return sc()?(Is==="default"&&(op=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Is="disabled"):t&&(uc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>z5({target:t,doc:r})}function z5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(sc()){if(Is!=="disabled")return;Is="restoring",setTimeout(()=>{TT(()=>{Is==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=op||""),op="",Is="default")})},300)}else if(t&&uc.has(t)){const a=uc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),uc.delete(t)}}function j5(e={}){const u=e,{defer:t,target:n}=u,r=bn(u,["defer","target"]),o=t?Xt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(H5(ge(F({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function $5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=pT(l),f=Math.sqrt(Zu(d.x,2)+Zu(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=pT(l);r({point:d,event:l})},u=[an(e,"pointermove",o,!1),an(e,"pointerup",a,!1),an(e,"pointercancel",a,!1),an(e,"contextmenu",a,!1),j5({doc:e})];return()=>{u.forEach(l=>l())}}function V5(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]=L5(e,{includeContainer:!0,getShadowRoot:a}),y=D5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&uu(y)?(o==null||o(),p=T):f.shiftKey&&(uu(m)||w)?p=n:!f.shiftKey&&uu(n)?(o==null||o(),p=m):!f.shiftKey&&(uu(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return an(u,"keydown",d,!0)}function q5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=bn(l,["defer","triggerElement"]),a=n?Xt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(V5(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Y5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function lc(e,t){if(!e)return oT;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 W5(e,t,n){if(!e)return oT;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 G5(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 X5(e,t){const{timeout:n,rootNode:r}=t,o=ks(r),a=Qr(r),u=new o.AbortController;return G5(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 K5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Q5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,wT=e=>{const t={};let n;for(;n=Q5.exec(e);)t[n[1]]=n[2];return t},J5=(e,t)=>{if(rc(e)){if(rc(t))return`${e};${t}`;e=wT(e)}else rc(t)&&(t=wT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function un(...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]=Gh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=K5(t[o],n[o]);continue}if(o==="style"){t[o]=J5(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 fz(e){return e}var Rs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Rs||{}),sp="__init__";function Z5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Qr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ps(t()),a=u=>t().getElementById(u);return ge(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:uu,getById:a})}function eD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ls=()=>e=>Array.from(new Set(e)),xT=typeof globalThis.document!="undefined"?O.useLayoutEffect:O.useEffect;function cc(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=O.useState(t),[o,a]=O.useState(r),u=e().value!==void 0,l=O.useRef(o);l.current=u?e().value:o;const d=O.useRef(l.current);xT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var P,_;const w=d.current,v=vs(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(_=(P=e()).onChange)==null||_.call(P,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?vo.flushSync:VL)(()=>f(y))},invoke(y,w){var v,P;(P=(v=e()).onChange)==null||P.call(v,y,w)},hash(y){var w,v,P;return(P=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?P:String(y)}}}cc.cleanup=e=>{O.useEffect(()=>e,[])},cc.ref=e=>{const t=O.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function tD(e){const t=O.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var nD=(e,t)=>{const n=O.useRef(!1),r=O.useRef(!1);O.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),O.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function dc(e,t={}){var re,de,ye,te,oe,Ce;const n=O.useMemo(()=>{const{id:ae,ids:J,getRootNode:se}=t;return Z5({id:ae,ids:J,getRootNode:se})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},o=(de=(re=e.props)==null?void 0:re.call(e,{props:Xh(t),scope:n}))!=null?de:t,a=rD(o),u=(ye=e.context)==null?void 0:ye.call(e,{prop:a,bindable:cc,scope:n,flush:ST,getContext(){return d},getComputed(){return U},getRefs(){return v},getEvent(){return y()}}),l=_T(u),d={get(ae){var J;return(J=l.current)==null?void 0:J[ae].ref.current},set(ae,J){var se;(se=l.current)==null||se[ae].set(J)},initial(ae){var J;return(J=l.current)==null?void 0:J[ae].initial},hash(ae){var se,k;const J=(se=l.current)==null?void 0:se[ae].get();return(k=l.current)==null?void 0:k[ae].hash(J)}},f=O.useRef(new Map),p=O.useRef(null),m=O.useRef(null),T=O.useRef({type:""}),y=()=>ge(F({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>ge(F({},L),{matches(...ae){return ae.includes(L.ref.current)},hasTag(ae){var J,se;return!!((se=(J=e.states[L.ref.current])==null?void 0:J.tags)!=null&&se.includes(ae))}}),v=tD((oe=(te=e.refs)==null?void 0:te.call(e,{prop:a,context:d}))!=null?oe:{}),P=()=>({state:w(),context:d,event:y(),prop:a,send:q,action:_,guard:C,track:nD,refs:v,computed:U,flush:ST,scope:n,choose:H}),_=ae=>{const J=vs(ae)?ae(P()):ae;if(!J)return;const se=J.map(k=>{var K,I;const M=(I=(K=e.implementations)==null?void 0:K.actions)==null?void 0:I[k];return M||Kh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),M});for(const k of se)k==null||k(P())},C=ae=>{var J,se;return vs(ae)?ae(P()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[ae](P())},A=ae=>{const J=vs(ae)?ae(P()):ae;if(!J)return;const se=J.map(M=>{var I,ue;const K=(ue=(I=e.implementations)==null?void 0:I.effects)==null?void 0:ue[M];return K||Kh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),K}),k=[];for(const M of se){const K=M==null?void 0:M(P());K&&k.push(K)}return()=>k.forEach(M=>M==null?void 0:M())},H=ae=>PL(ae).find(J=>{let se=!J.guard;return rc(J.guard)?se=!!C(J.guard):vs(J.guard)&&(se=J.guard(P())),se}),U=ae=>{QL(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[ae];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:U})},L=cc(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,J){var k,M,K,I;if(J){const ue=f.current.get(J);ue==null||ue(),f.current.delete(J)}J&&_((k=e.states[J])==null?void 0:k.exit),_((M=p.current)==null?void 0:M.actions);const se=A((K=e.states[ae])==null?void 0:K.effects);if(se&&f.current.set(ae,se),J===sp){_(e.entry);const ue=A(e.effects);ue&&f.current.set(sp,ue)}_((I=e.states[ae])==null?void 0:I.entry)}})),z=O.useRef(void 0),ee=O.useRef(Rs.NotStarted);xT(()=>{queueMicrotask(()=>{var M;const se=ee.current===Rs.Started;ee.current=Rs.Started,r(se?"rehydrating...":"initializing...");const k=(M=z.current)!=null?M:L.initial;L.invoke(k,se?L.get():sp)});const ae=f.current,J=L.ref.current;return()=>{r("unmounting..."),z.current=J,ee.current=Rs.Stopped,ae.forEach(se=>se==null?void 0:se()),f.current=new Map,p.current=null,queueMicrotask(()=>{_(e.exit)})}},[]);const he=()=>"ref"in L?L.ref.current:L.get(),q=ae=>{queueMicrotask(()=>{var I,ue,be,Ae,we;if(ee.current!==Rs.Started)return;m.current=T.current,T.current=ae;let J=he();const se=(be=(I=e.states[J].on)==null?void 0:I[ae.type])!=null?be:(ue=e.on)==null?void 0:ue[ae.type],k=H(se);if(!k)return;p.current=k;const M=(Ae=k.target)!=null?Ae:J;r("transition",ae.type,k.target||J,`(${k.actions})`);const K=M!==J;K?vo.flushSync(()=>L.set(M)):k.reenter&&!K?L.invoke(J,J):_((we=k.actions)!=null?we:[])})};return(Ce=e.watch)==null||Ce.call(e,P()),{state:w(),send:q,context:d,prop:a,scope:n,refs:v,computed:U,event:y(),getStatus:()=>ee.current}}function _T(e){const t=O.useRef(e);return t.current=e,t}function rD(e){const t=_T(e);return function(r){return t.current[r]}}function ST(e){queueMicrotask(()=>{vo.flushSync(()=>e())})}var ap=eD(e=>e);function fc(...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 iD(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 up=e=>{const t=O.memo(O.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=bn(f,["asChild","children"]);if(!o)return O.createElement(e,ge(F({},u),{ref:r}),a);if(!O.isValidElement(a))return null;const l=O.Children.only(a),d=iD(l);return O.cloneElement(l,ge(F({},un(u,l.props)),{ref:r?fc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Mn=(()=>{const e=new Map;return new Proxy(up,{apply(t,n,r){return up(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,up(r)),e.get(r)}})})();function oD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Bo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=O.createContext(u);l.displayName=t;function d(){var p;const f=O.useContext(l);if(!f&&n){const m=new Error(a!=null?a:oD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[sD,lp]=Bo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[vT,cu]=Bo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),AT=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=un(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Mn.div,ge(F({},o),{ref:fc(r.ref,t)}))});AT.displayName="PopoverContent";const CT=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=un(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Mn.div,ge(F({},o),{ref:t}))});CT.displayName="PopoverPositioner";const du=()=>(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]},[{},F({},e)]),kT=e=>du()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function aD(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 uD={props({props:e}){return ge(F({},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",Ns(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"});Xt(()=>{var l,d;const u=hc(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})=>{Xt(()=>{e.set("prevAnimationName",hc(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",hc(t.get("styles")))},u=d=>{const f=hc(t.get("styles"));Or(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=lc(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),TT(()=>l())}}}}};function hc(e){return(e==null?void 0:e.animationName)||"none"}Ls()(["onExitComplete","present","immediate"]);function lD(e,t={}){const{sync:n=!1}=t,r=cD(e);return O.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 cD(e){const t=O.useRef(e);return t.current=e,t}const cp=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=bn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=O.useRef(!1),l=ge(F({},a),{present:r,onExitComplete:lD(e.onExitComplete)}),d=dc(uD,l),f=aD(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 Uo=(e,t=[])=>({parts:(...n)=>{if(dD(t))return Uo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Uo(e,[...t,...n]),omit:(...n)=>Uo(e,t.filter(r=>!n.includes(r))),rename:n=>Uo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ds(e)}"][data-part="${Ds(r)}"]`,`& [data-scope="${Ds(e)}"][data-part="${Ds(r)}"]`].join(", "),attrs:{"data-scope":Ds(e),"data-part":Ds(r)}}}),{})}),Ds=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),dD=e=>e.length===0;const fD=["top","right","bottom","left"],qi=Math.min,Ti=Math.max,pc=Math.round,mc=Math.floor,Zr=e=>({x:e,y:e}),hD={left:"right",right:"left",bottom:"top",top:"bottom"};function PT(e,t,n){return Ti(e,qi(t,n))}function wi(e,t){return typeof e=="function"?e(t):e}function Yi(e){return e.split("-")[0]}function Ms(e){return e.split("-")[1]}function dp(e){return e==="x"?"y":"x"}function fp(e){return e==="y"?"height":"width"}function ei(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hp(e){return dp(ei(e))}function pD(e,t,n){n===void 0&&(n=!1);const r=Ms(e),o=hp(e),a=fp(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=gc(u)),[u,gc(u)]}function mD(e){const t=gc(e);return[pp(e),t,pp(t)]}function pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const NT=["left","right"],OT=["right","left"],gD=["top","bottom"],ED=["bottom","top"];function yD(e,t,n){switch(e){case"top":case"bottom":return n?t?OT:NT:t?NT:OT;case"left":case"right":return t?gD:ED;default:return[]}}function bD(e,t,n,r){const o=Ms(e);let a=yD(Yi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(pp)))),a}function gc(e){const t=Yi(e);return hD[t]+e.slice(t.length)}function TD(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 IT(e){return typeof e!="number"?TD(e):{top:e,right:e,bottom:e,left:e}}function Ec(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 RT(e,t,n){let{reference:r,floating:o}=e;const a=ei(t),u=hp(t),l=fp(u),d=Yi(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=Ms(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function wD(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}=wi(t,e),w=IT(y),P=l[T?m==="floating"?"reference":"floating":m],_=Ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(P))==null||n?P:P.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),H=(yield a.isElement==null?void 0:a.isElement(A))&&(yield a.getScale==null?void 0:a.getScale(A))||{x:1,y:1},U=Ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:A,strategy:d}):C);return{top:(_.top-U.top+w.top)/H.y,bottom:(U.bottom-_.bottom+w.bottom)/H.y,left:(_.left-U.left+w.left)/H.x,right:(U.right-_.right+w.right)/H.x}})}const xD=50,_D=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ge(F({},u),{detectOverflow:wD}),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}=RT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const P=a[v];if(!P)continue;const{name:_,fn:C}=P,{x:A,y:H,data:U,reset:L}=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=H!=null?H:m,w[_]=F(F({},w[_]),U),L&&y<xD&&(y++,typeof L=="object"&&(L.placement&&(T=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):L.rects),{x:p,y:m}=RT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),SD=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}=wi(e,n)||{};if(p==null)return{};const T=IT(m),y={x:r,y:o},w=hp(a),v=fp(w),P=yield l.getDimensions(p),_=w==="y",C=_?"top":"left",A=_?"bottom":"right",H=_?"clientHeight":"clientWidth",U=u.reference[v]+u.reference[w]-y[w]-u.floating[v],L=y[w]-u.reference[w],z=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ee=z?z[H]:0;(!ee||!(yield l.isElement==null?void 0:l.isElement(z)))&&(ee=d.floating[H]||u.floating[v]);const he=U/2-L/2,q=ee/2-P[v]/2-1,re=qi(T[C],q),de=qi(T[A],q),ye=ee-P[v]-de,te=ee/2-P[v]/2+he,oe=PT(re,te,ye),Ce=!f.arrow&&Ms(a)!=null&&te!==oe&&u.reference[v]/2-(te<re?re:de)-P[v]/2<0,ae=Ce?te<re?te-re:te-ye:0;return{[w]:y[w]+ae,data:F({[w]:oe,centerOffset:te-oe-ae},Ce&&{alignmentOffset:ae}),reset:Ce}})}}),vD=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=wi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:P=!0}=oe,_=bn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Yi(a),A=ei(d),H=Yi(d)===d,U=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(H||!P?[gc(d)]:mD(d)),z=v!=="none";!y&&z&&L.push(...bD(d,P,v,U));const ee=[d,...L],he=yield f.detectOverflow(n,_),q=[];let re=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&q.push(he[C]),T){const Ce=pD(a,l,U);q.push(he[Ce[0]],he[Ce[1]])}if(re=[...re,{placement:a,overflows:q}],!q.every(Ce=>Ce<=0)){var de,ye;const Ce=(((de=u.flip)==null?void 0:de.index)||0)+1,ae=ee[Ce];if(ae&&(!(T==="alignment"?A!==ei(ae):!1)||re.every(k=>ei(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:Ce,overflows:re},reset:{placement:ae}};let J=(ye=re.filter(se=>se.overflows[0]<=0).sort((se,k)=>se.overflows[1]-k.overflows[1])[0])==null?void 0:ye.placement;if(!J)switch(w){case"bestFit":{var te;const se=(te=re.filter(k=>{if(z){const M=ei(k.placement);return M===A||M==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(M=>M>0).reduce((M,K)=>M+K,0)]).sort((k,M)=>k[1]-M[1])[0])==null?void 0:te[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function LT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DT(e){return fD.some(t=>e[t]>=0)}const AD=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=wi(e,n),{strategy:a="referenceHidden"}=l,u=bn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,ge(F({},u),{elementContext:"reference"})),f=LT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:DT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,ge(F({},u),{altBoundary:!0})),f=LT(d,r.floating);return{data:{escapedOffsets:f,escaped:DT(f)}}}default:return{}}})}}},MT=new Set(["left","top"]);function CD(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=Yi(n),l=Ms(n),d=ei(n)==="y",f=MT.has(u)?-1:1,p=a&&d?-1:1,m=wi(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 kD=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 CD(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:ge(F({},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=wi(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:H=>{let{x:U,y:L}=H;return{x:U,y:L}}}}=A,p=bn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=ei(a),w=dp(y);let v=m[w],P=m[y];const _=(H,U)=>PT(U+T[H==="y"?"top":"left"],U,U-T[H==="y"?"bottom":"right"]);l&&(v=_(w,v)),d&&(P=_(y,P));const C=f.fn(ge(F({},n),{[w]:v,[y]:P}));return ge(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[w]:l,[y]:d}}})})}}},ND=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}=wi(e,t),T={x:o,y:a},y=ei(u),w=dp(y);let v=T[w],P=T[y];const _=wi(f,t),C=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(p){const U=w==="y"?"height":"width",L=l.reference[w]-l.floating[U]+C.mainAxis,z=l.reference[w]+l.reference[U]-C.mainAxis;v<L?v=L:v>z&&(v=z)}if(m){var A,H;const U=w==="y"?"width":"height",L=MT.has(Yi(u)),z=l.reference[y]-l.floating[U]+(L&&((A=d.offset)==null?void 0:A[y])||0)+(L?0:C.crossAxis),ee=l.reference[y]+l.reference[U]+(L?0:((H=d.offset)==null?void 0:H[y])||0)-(L?C.crossAxis:0);P<z?P=z:P>ee&&(P=ee)}return{[w]:v,[y]:P}}}},OD=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,q=wi(e,n),{apply:l=()=>{}}=q,d=bn(q,["apply"]),f=yield a.detectOverflow(n,d),p=Yi(r),m=Ms(r),T=ei(r)==="y",{width:y,height:w}=o.floating;let v,P;p==="top"||p==="bottom"?(v=p,P=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(P=p,v=m==="end"?"top":"bottom");const _=w-f.top-f.bottom,C=y-f.left-f.right,A=qi(w-f[v],_),H=qi(y-f[P],C),U=n.middlewareData.shift,L=!U;let z=A,ee=H;U!=null&&U.enabled.x&&(ee=C),U!=null&&U.enabled.y&&(z=_),L&&!m&&(T?ee=y-2*Ti(f.left,f.right):z=w-2*Ti(f.top,f.bottom)),yield l(ge(F({},n),{availableWidth:ee,availableHeight:z}));const he=yield a.getDimensions(u.floating);return y!==he.width||w!==he.height?{reset:{rects:!0}}:{}})}}};function yc(){return typeof window!="undefined"}function Fs(e){return FT(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(FT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FT(e){return yc()?e instanceof Node||e instanceof sr(e).Node:!1}function Ir(e){return yc()?e instanceof Element||e instanceof sr(e).Element:!1}function ni(e){return yc()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function BT(e){return!yc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function fu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ID(e){return/^(table|td|th)$/.test(Fs(e))}function bc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const RD=/transform|translate|scale|rotate|perspective|filter/,LD=/paint|layout|strict|content/,Ho=e=>!!e&&e!=="none";let mp;function gp(e){const t=Ir(e)?Rr(e):e;return Ho(t.transform)||Ho(t.translate)||Ho(t.scale)||Ho(t.rotate)||Ho(t.perspective)||!Ep()&&(Ho(t.backdropFilter)||Ho(t.filter))||RD.test(t.willChange||"")||LD.test(t.contain||"")}function DD(e){let t=Wi(e);for(;ni(t)&&!Bs(t);){if(gp(t))return t;if(bc(t))return null;t=Wi(t)}return null}function Ep(){return mp==null&&(mp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mp}function Bs(e){return/^(html|body|#document)$/.test(Fs(e))}function Rr(e){return sr(e).getComputedStyle(e)}function Tc(e){return Ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wi(e){if(Fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BT(e)&&e.host||ti(e);return BT(t)?t.host:t}function UT(e){const t=Wi(e);return Bs(t)?(e.ownerDocument||e).body:ni(t)&&fu(t)?t:UT(t)}function hu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=UT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=sr(o);if(a){const l=yp(u);return t.concat(u,u.visualViewport||[],fu(o)?o:[],l&&n?hu(l):[])}else return t.concat(o,hu(o,[],n))}function yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HT(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ni(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=pc(n)!==a||pc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function bp(e){return Ir(e)?e:e.contextElement}function Us(e){const t=bp(e);if(!ni(t))return Zr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=HT(t);let u=(a?pc(n.width):n.width)/r,l=(a?pc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const MD=Zr(0);function zT(e){const t=sr(e);return!Ep()||!t.visualViewport?MD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=bp(e);let u=Zr(1);t&&(r?Ir(r)&&(u=Us(r)):u=Us(e));const l=FD(a,n,r)?zT(a):Zr(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=sr(a),y=r&&Ir(r)?sr(r):r;let w=T,v=yp(w);for(;v&&r&&y!==w;){const P=Us(v),_=v.getBoundingClientRect(),C=Rr(v),A=_.left+(v.clientLeft+parseFloat(C.paddingLeft))*P.x,H=_.top+(v.clientTop+parseFloat(C.paddingTop))*P.y;d*=P.x,f*=P.y,p*=P.x,m*=P.y,d+=A,f+=H,w=sr(v),v=yp(w)}}return Ec({width:p,height:m,x:d,y:f})}function wc(e,t){const n=Tc(e).scrollLeft;return t?t.left+n:zo(ti(e)).left+n}function jT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function BD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=ti(r),l=t?bc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Zr(1);const p=Zr(0),m=ni(r);if((m||!m&&!a)&&((Fs(r)!=="body"||fu(u))&&(d=Tc(r)),ni(r))){const y=zo(r);f=Us(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?jT(u,d):Zr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function UD(e){return Array.from(e.getClientRects())}function HD(e){const t=ti(e),n=Tc(e),r=e.ownerDocument.body,o=Ti(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ti(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+wc(e);const l=-n.scrollTop;return Rr(r).direction==="rtl"&&(u+=Ti(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const $T=25;function zD(e,t){const n=sr(e),r=ti(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=Ep();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=wc(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<=$T&&(a-=w)}else f<=$T&&(a+=f);return{width:a,height:u,x:l,y:d}}const jD=new Set(["absolute","fixed"]);function $D(e,t){const n=zo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ni(e)?Us(e):Zr(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 VT(e,t,n){let r;if(t==="viewport")r=zD(e,n);else if(t==="document")r=HD(ti(e));else if(Ir(t))r=$D(t,n);else{const o=zT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ec(r)}function qT(e,t){const n=Wi(e);return n===t||!Ir(n)||Bs(n)?!1:Rr(n).position==="fixed"||qT(n,t)}function VD(e,t){const n=t.get(e);if(n)return n;let r=hu(e,[],!1).filter(l=>Ir(l)&&Fs(l)!=="body"),o=null;const a=Rr(e).position==="fixed";let u=a?Wi(e):e;for(;Ir(u)&&!Bs(u);){const l=Rr(u),d=gp(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&jD.has(o.position)||fu(u)&&!d&&qT(e,u))?r=r.filter(p=>p!==u):o=l,u=Wi(u)}return t.set(e,r),r}function qD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?bc(t)?[]:VD(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=VT(t,p,o);return f.top=Ti(m.top,f.top),f.right=qi(m.right,f.right),f.bottom=qi(m.bottom,f.bottom),f.left=Ti(m.left,f.left),f},VT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function YD(e){const{width:t,height:n}=HT(e);return{width:t,height:n}}function WD(e,t,n){const r=ni(t),o=ti(t),a=n==="fixed",u=zo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Zr(0);function f(){d.x=wc(o)}if(r||!r&&!a)if((Fs(t)!=="body"||fu(o))&&(l=Tc(t)),r){const y=zo(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?jT(o,l):Zr(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 Tp(e){return Rr(e).position==="static"}function YT(e,t){if(!ni(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function WT(e,t){const n=sr(e);if(bc(e))return n;if(!ni(e)){let o=Wi(e);for(;o&&!Bs(o);){if(Ir(o)&&!Tp(o))return o;o=Wi(o)}return n}let r=YT(e,t);for(;r&&ID(r)&&Tp(r);)r=YT(r,t);return r&&Bs(r)&&Tp(r)&&!gp(r)?n:r||DD(e)||n}const GD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||WT,n=this.getDimensions,r=yield n(e.floating);return{reference:WD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function XD(e){return Rr(e).direction==="rtl"}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:BD,getDocumentElement:ti,getClippingRect:qD,getOffsetParent:WT,getElementRects:GD,getClientRects:UD,getDimensions:YD,getScale:Us,isElement:Ir,isRTL:XD};function GT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QD(e,t){let n=null,r;const o=ti(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=mc(m),v=mc(o.clientWidth-(p+T)),P=mc(o.clientHeight-(m+y)),_=mc(p),A={rootMargin:-w+"px "+-v+"px "+-P+"px "+-_+"px",threshold:Ti(0,qi(1,d))||1};let H=!0;function U(L){const z=L[0].intersectionRatio;if(z!==d){if(!H)return u();z?u(!1,z):r=setTimeout(()=>{u(!1,1e-7)},1e3)}z===1&&!GT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(U,ge(F({},A),{root:o.ownerDocument}))}catch(L){n=new IntersectionObserver(U,A)}n.observe(e)}return u(!0),a}function JD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=bp(e),p=o||a?[...f?hu(f):[],...hu(t)]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const m=f&&l?QD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(_=>{let[C]=_;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?zo(e):null;d&&P();function P(){const _=zo(e);v&&!GT(v,_)&&n(),v=_,w=requestAnimationFrame(P)}return n(),()=>{var _;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(_=y)==null||_.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const ZD=kD,e8=PD,t8=vD,n8=OD,r8=AD,i8=SD,o8=ND,s8=(e,t,n)=>{const r=new Map,o=F({platform:KD},n),a=ge(F({},o.platform),{_c:r});return _D(e,t,ge(F({},o),{platform:a}))};function XT(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 ge(F({},o),{toJSON:()=>o})}function a8(e){if(!e)return XT();const{x:t,y:n,width:r,height:o}=e;return XT(t,n,r,o)}function u8(e,t){return{contextElement:sn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?a8(r):n.getBoundingClientRect()}}}var pu=e=>({variable:e,reference:`var(${e})`}),xi={arrowSize:pu("--arrow-size"),arrowSizeHalf:pu("--arrow-size-half"),arrowBg:pu("--arrow-background"),transformOrigin:pu("--transform-origin"),arrowOffset:pu("--arrow-offset")},l8=e=>e==="top"||e==="bottom"?"y":"x";function c8(e,t){return{name:"transformOrigin",fn(n){var he,q,re,de,ye;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=l8(d),p=((he=o.arrow)==null?void 0:he.x)||0,m=((q=o.arrow)==null?void 0:q.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,P=Math.abs(((re=o.shift)==null?void 0:re.y)||0),_=u.reference.height/2,C=y/2,A=(ye=(de=e.offset)==null?void 0:de.mainAxis)!=null?ye:e.gutter,H=typeof A=="number"?A+C:A!=null?A:C,U=P>H,L={top:`${w}px calc(100% + ${H}px)`,bottom:`${w}px ${-H}px`,left:`calc(100% + ${H}px) ${v}px`,right:`${-H}px ${v}px`}[d],z=`${w}px ${u.reference.y+_-l}px`,ee=!!e.overlap&&f==="y"&&U;return r.floating.style.setProperty(xi.transformOrigin.variable,ee?z:L),{data:{transformOrigin:ee?z:L}}}}}var d8={name:"rects",fn({rects:e}){return{data:e}}},f8=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% + ${xi.arrowOffset.reference})`}),{}}}};function h8(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var p8={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function KT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function wp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function m8(e,t,n){const r=e||t.createElement("div");return i8({element:r,padding:n.arrowPadding})}function g8(e,t){var n;if(!ML((n=t.offset)!=null?n:t.gutter))return ZD(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:l}=h8(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Xh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function E8(e){if(!e.flip)return;const t=wp(e.boundary);return t8(ge(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function y8(e){if(!e.slide&&!e.overlap)return;const t=wp(e.boundary);return e8(ge(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:o8()}))}function b8(e){return n8({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 T8(e){var t;if(e.hideWhenDetached)return r8({strategy:"referenceHidden",boundary:(t=wp(e.boundary))!=null?t:"clippingAncestors"})}function w8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function x8(e,t,n={}){const r=u8(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},p8,n),a=t.querySelector("[data-part=arrow]"),u=[g8(a,o),E8(o),y8(o),m8(a,t.ownerDocument,o),f8(a),c8({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),b8(o),T8(o),d8],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var H;if(!r||!t)return;const v=yield s8(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const P=ks(t),_=KT(P,v.x),C=KT(P,v.y);t.style.setProperty("--x",`${_}px`),t.style.setProperty("--y",`${C}px`),o.hideWhenDetached&&(((H=v.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const A=t.firstElementChild;if(A){const U=Ns(A);t.style.setProperty("--z-index",U.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=w8(o.listeners),w=o.listeners?JD(r,t,T,y):qL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function QT(e,t,n={}){const l=n,{defer:r}=l,o=bn(l,["defer"]),a=r?Xt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(x8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var _8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function S8(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:xi.arrowSize.reference,height:xi.arrowSize.reference,[xi.arrowSizeHalf.variable]:`calc(${xi.arrowSize.reference} / 2)`,[xi.arrowOffset.variable]:`calc(${xi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?_8[t.split("-")[0]]:void 0,background:xi.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 Hs=new WeakMap,xc=new WeakMap,_c={},xp=0,JT=e=>e&&(e.host||JT(e.parentNode)),v8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=JT(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),A8=new Set(["script","output","status","next-route-announcer"]),C8=e=>A8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),k8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=v8(n,Array.isArray(e)?e:[e]);_c[r]||(_c[r]=new WeakMap);const l=_c[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&&sn(y)&&cT(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(C8(w))return;const P=w.getAttribute(o)==="true",_=(Hs.get(w)||0)+1,C=(l.get(w)||0)+1;Hs.set(w,_),l.set(w,C),d.push(w),_===1&&P&&xc.set(w,!0),C===1&&w.setAttribute(r,""),P||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),xp++,()=>{d.forEach(y=>{const w=Hs.get(y)-1,v=l.get(y)-1;Hs.set(y,w),l.set(y,v),w||(xc.has(y)||y.removeAttribute(o),xc.delete(y)),v||y.removeAttribute(r)}),xp--,xp||(Hs=new WeakMap,Hs=new WeakMap,xc=new WeakMap,_c={})}},P8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,N8=(e,t=P8(e),n="data-aria-hidden",r=!0)=>{if(t)return k8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},O8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ZT(e,t={}){const{defer:n=!0}=t,r=n?O8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(N8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function I8(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 R8(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 ew="pointerdown.outside",tw="focus.outside";function L8(e){for(const t of e)if(sn(t)&&Jr(t))return!0;return!1}var nw=e=>"clientY"in e;function D8(e,t){if(!nw(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 M8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function rw(e,t){if(!t||!nw(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 M8(u,l)?r||a:!1}function F8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Qr(e),f=ks(e),p=I8(f),m=R8(f);function T(A,H){if(!sn(H)||!H.isConnected||Cs(e,H)||D8(e,A)||l&&lT(e,H))return!1;const U=d.querySelector(`[aria-controls="${e.id}"]`);if(U){const z=ip(U);if(rw(A,z))return!1}const L=ip(e);return rw(A,L)?!1:!(n!=null&&n(H))}const y=new Set,w=Mo(e==null?void 0:e.getRootNode());function v(A){function H(U){var he,q;const L=u&&!dT()?Xt:re=>re(),z=U!=null?U:A,ee=(q=(he=z==null?void 0:z.composedPath)==null?void 0:he.call(z))!=null?q:[z==null?void 0:z.target];L(()=>{const re=w?ee[0]:Or(A);if(!(!e||!T(A,re))){if(o||a){const de=Gh(o,a);e.addEventListener(ew,de,{once:!0})}iw(e,ew,{bubbles:!1,cancelable:!0,detail:{originalEvent:z,contextmenu:A5(z),focusable:L8(ee),target:re}})}})}A.pointerType==="touch"?(y.forEach(U=>U()),y.add(an(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const P=new Set,_=setTimeout(()=>{P.add(an(d,"pointerdown",v,!0)),P.add(m.addEventListener("pointerdown",v,!0)),P.add(p.addEventListener("pointerdown",v,!0))},0);function C(A){(u?Xt:U=>U())(()=>{var z,ee;const U=(ee=(z=A==null?void 0:A.composedPath)==null?void 0:z.call(A))!=null?ee:[A==null?void 0:A.target],L=w?U[0]:Or(A);if(!(!e||!T(A,L))){if(r||a){const he=Gh(r,a);e.addEventListener(tw,he,{once:!0})}iw(e,tw,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:Jr(L),target:L}})}})}return dT()||(P.add(an(d,"focusin",C,!0)),P.add(m.addEventListener("focusin",C,!0)),P.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(_),y.forEach(A=>A()),P.forEach(A=>A())}}function B8(e,t){const{defer:n}=t,r=n?Xt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(F8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function iw(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function U8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return an(Qr(e),"keydown",n,{capture:!0})}var ow="layer:request-dismiss",br={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=>Cs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Cs(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=>br.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];z8(e,ow,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),H8(e,ow,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function H8(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 z8(e,t,n){e.addEventListener(t,n,{once:!0})}var sw;function aw(){br.layers.forEach(({node:e})=>{e.style.pointerEvents=br.isBelowPointerBlockingLayer(e)?"none":"auto"})}function j8(e){e.style.pointerEvents=""}function $8(e,t){const n=Qr(e),r=[];return br.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(sw=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=X5(()=>{const l=o();return sn(l)?l:null},{timeout:1e3});a.then(l=>r.push(lc(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{br.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=sw,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function V8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Kh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};br.add(f),aw();function p(v){var _,C;const P=Or(v.detail.originalEvent);br.isBelowPointerBlockingLayer(e)||br.isInBranch(P)||((_=t.onPointerDownOutside)==null||_.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 _,C;const P=Or(v.detail.originalEvent);br.isInBranch(P)||((_=t.onFocusOutside)==null||_.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 P;br.isTopMost(e)&&((P=t.onEscapeKeyDown)==null||P.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var A;if(!e)return!1;const P=typeof u=="function"?u():u,_=Array.isArray(P)?P:[P],C=(A=t.persistentElements)==null?void 0:A.map(H=>H()).filter(sn);return C&&_.push(...C),_.some(H=>Cs(H,v))||br.isInNestedLayer(e,v)}const w=[a?$8(e,t.persistentElements):void 0,U8(e,T),B8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{br.remove(e),aw(),j8(e),w.forEach(v=>v==null?void 0:v())}}function uw(e,t){const{defer:n}=t,r=n?Xt:a=>a(),o=[];return o.push(r(()=>{const a=vs(e)?e():e;o.push(V8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var q8=Object.defineProperty,Y8=(e,t,n)=>t in e?q8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,vt=(e,t,n)=>Y8(e,typeof t!="symbol"?t+"":t,n),lw={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()}},W8=[],G8=class{constructor(e,t){vt(this,"trapStack"),vt(this,"config"),vt(this,"doc"),vt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),vt(this,"portalContainers",new Set),vt(this,"listenerCleanups",[]),vt(this,"handleFocus",r=>{const o=Or(r),a=this.findContainerIndex(o,r)>=0;if(a||oc(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(lu(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=>lu(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}),vt(this,"handlePointerDown",r=>{const o=Or(r);if(!(this.findContainerIndex(o,r)>=0)){if(gu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}gu(this.config.allowOutsideClick,r)||r.preventDefault()}}),vt(this,"handleClick",r=>{const o=Or(r);this.findContainerIndex(o,r)>=0||gu(this.config.clickOutsideDeactivates,r)||gu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),vt(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;mu(r)&&r.preventDefault(),this.tryFocus(a)}}),vt(this,"handleEscapeKey",r=>{X8(r)&&gu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),vt(this,"_mutationObserver"),vt(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 E5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?y5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),vt(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)}))}),vt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Jr(r)){const o=Ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),vt(this,"tryFocus",r=>{if(r!==!1&&r!==Ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,K8(r)&&r.select()}}),vt(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({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(),lw.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=()=>{cw(()=>{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}),vt(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}),vt(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}),vt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),vt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),vt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),vt(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}),vt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Or(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||Jr(u)&&!Fo(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=lu(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else mu(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||Jr(u)&&!Fo(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=lu(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else mu(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||W8;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return mu(r)&&!r.shiftKey},isKeyBackward(r){return mu(r)&&r.shiftKey}},t);this.doc=n.document||Qr(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=>{p5(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?lT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Os(e,{getShadowRoot:this.config.getShadowRoot}),n=yT(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(lu(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(Fo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Fo(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 lw.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?cw(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(an(this.doc,"focusin",this.handleFocus,!0),an(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),an(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),an(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),an(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),an(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Ps(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},mu=e=>e.key==="Tab",gu=(e,...t)=>typeof e=="function"?e(...t):e,X8=e=>!e.isComposing&&e.key==="Escape",cw=e=>setTimeout(e,0),K8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function dw(e,t={}){let n;const r=Xt(()=>{const o=typeof e=="function"?e():e;if(o){n=new G8(o,ge(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Qr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var _p="data-scroll-lock";function Q8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function fw(e){const t=Ns(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function hw(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(_p))return;const u=fw(r)||fw(o),l=n.innerWidth-r.clientWidth;o.setAttribute(_p,"");const d=()=>W5(r,"--scrollbar-width",`${l}px`),f=Q8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),lc(o,w)},m=()=>{var U,L;const{scrollX:w,scrollY:v,visualViewport:P}=n,_=(U=P==null?void 0:P.offsetLeft)!=null?U:0,C=(L=P==null?void 0:P.offsetTop)!=null?L:0,A={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(w-Math.floor(_))}px`,right:"0"};!u&&l>0&&(A[f]=`${l}px`);const H=lc(o,A);return()=>{H==null||H(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),sc()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(_p)}}var J8=Uo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),ri=J8.build(),pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},mw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},Z8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},vp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},eM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Ew=e=>e.getById(pw(e)),zs=e=>e.getById(mw(e)),js=e=>e.getById(Sp(e)),yw=e=>e.getById(gw(e)),tM=e=>e.getById(vp(e)),nM=e=>e.getById(Ap(e));function rM(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=S8(ge(F({},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(ge(F({id:Z8(l)},ri.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ge(F({},ri.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ge(F({},ri.anchor.attrs),{dir:u("dir"),id:pw(l)}))},getTriggerProps(){return t.button(ge(F({},ri.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:mw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Sp(l),onPointerDown(y){fT(y)&&S5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ge(F({},ri.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ge(F({id:gw(l)},ri.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ge(F({},ri.content.attrs),{dir:u("dir"),id:Sp(l),tabIndex:-1,role:"dialog","aria-modal":sT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":As(d),"aria-labelledby":m.title?vp(l):void 0,"aria-describedby":m.description?Ap(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(ge(F({},ri.title.attrs),{id:vp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ge(F({},ri.description.attrs),{id:Ap(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ge(F({},ri.closeTrigger.attrs),{dir:u("dir"),id:eM(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var iM={props({props:e}){return ge(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=Ew(n))!=null?a:zs(n);return QT(r,()=>yw(n),ge(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>js(n);let o=!0;return uw(r,{type:"popover",pointerBlocking:t("modal"),exclude:zs(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:q5(()=>js(t),{triggerElement:zs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?ZT(()=>[js(t),zs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return hw(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?dw(()=>js(t),{initialFocus:()=>bT({root:js(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=Ew(n))!=null?u:zs(n);QT(o,()=>yw(n),ge(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Xt(()=>{Object.assign(e.get("renderedElements"),{title:!!tM(t),description:!!nM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Xt(()=>{const n=bT({root:js(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||Xt(()=>{const a=zs(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})}}}};Ls()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[pz,Sc]=Bo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[mz,Cp]=Bo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),oM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,dir:r,getRootNode:n},e),a=dc(iM,o);return rM(a,ap)},sM=e=>{const[t,u]=kT(e),l=u,{children:n}=l,r=bn(l,["children"]),o=oM(r),a=cp(un({present:o.open},t));return x.jsx(sD,{value:o,children:x.jsx(vT,{value:a,children:n})})},bw=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=un(ge(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Mn.button,ge(F({},o),{ref:t}))});bw.displayName="PopoverTrigger";function aM(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 uM(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 lM(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 cM(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 dM(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 fM(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 kp(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 Tw(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 hM=({className:e,componentType:t,children:n})=>{const[r,o]=O.useState(!1),{globalClassName:a}=Qe(),u=f=>{o(f.open)},l=O.useCallback(()=>{o(!1)},[]),d=O.useMemo(()=>({closeMenu:l}),[l]);return x.jsxs(sM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(bw,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(Tw,{"aria-hidden":"true"})}),x.jsx(CT,{children:x.jsx(AT,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Zb.Provider,{value:d,children:n})})})]})};function ww(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 xw(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[pM,jo]=Bo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),_w=O.forwardRef((e,t)=>{const n=jo(),r=un(n.getControlProps(),e);return x.jsx(Mn.div,ge(F(F({},r),e),{ref:t}))});_w.displayName="CarouselControl";const Sw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["readOnly","index"]),o=jo(),a=un(o.getIndicatorProps(n),r);return x.jsx(Mn.button,ge(F({},a),{ref:t}))});Sw.displayName="CarouselIndicator";const vw=O.forwardRef((e,t)=>{const n=jo(),r=un(n.getIndicatorGroupProps(),e);return x.jsx(Mn.div,ge(F({},r),{ref:t}))});vw.displayName="CarouselIndicatorGroup";const Aw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["index","snapAlign"]),o=jo(),a=un(o.getItemProps(n),r);return x.jsx(Mn.div,ge(F({},a),{ref:t}))});Aw.displayName="CarouselItem";const Cw=O.forwardRef((e,t)=>{const n=jo(),r=un(n.getItemGroupProps(),e);return x.jsx(Mn.div,ge(F({},r),{ref:t}))});Cw.displayName="CarouselItemGroup";const kw=O.forwardRef((e,t)=>{const n=jo(),r=un(n.getNextTriggerProps(),e);return x.jsx(Mn.button,ge(F({},r),{ref:t}))});kw.displayName="CarouselNextTrigger";const Pw=O.forwardRef((e,t)=>{const n=jo(),r=un(n.getPrevTriggerProps(),e);return x.jsx(Mn.button,ge(F({},r),{ref:t}))});Pw.displayName="CarouselPrevTrigger";function mM(e){const t=Ns(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 gM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Nw(e){let t=[];for(const n of e.children)t=t.concat(n,Nw(n));return t}function Ow(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Nw(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(!gM(n,m,u))continue;const T=Ns(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,P=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:P});break;case"center":r[a].center.push({node:p,position:P+m[d]/2});break;case"end":r[a].end.push({node:p,position:P+m[d]});break}}}return r}function Iw(e){const t=e.getBoundingClientRect(),n=mM(e),r=Ow(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Rw([...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(Lw(0,o.x))),y:Rw([...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(Lw(0,o.y)))}}function EM(e,t,n){const r=Ow(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Rw=e=>[...new Set(e)],Lw=(e,t)=>n=>Math.max(e,Math.min(t,n)),yM=Uo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),_i=yM.build(),bM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},TM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},vc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},wM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},xM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},_M=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Dw=(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}`},Kn=e=>e.getById(vc(e)),Mw=e=>Y5(Kn(e),"[data-part=item]"),SM=(e,t)=>e.getById(Dw(e,t)),Fw=e=>{const t=Kn(e);if(!t)return;const n=Os(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function vM(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"),P=l("padding"),_=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(ge(F({},_i.root.attrs),{id:bM(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(ge(F({},_i.itemGroup.attrs),{id:vc(u),"data-orientation":l("orientation"),"data-dragging":As(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){Cs(C.currentTarget,Or(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Cs(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!fT(C))return;const A=Or(C);Jr(A)&&A!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:YL(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"]:P,[T?"paddingInline":"paddingBlock"]:P,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const A=r.get("slidesInView").includes(C.index);return t.element(ge(F({},_i.item.attrs),{id:TM(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":As(A),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":_.item(C.index,l("slideCount")),"aria-hidden":sT(!A),style:{scrollSnapAlign:(()=>{var ee;const H=(ee=C.snapAlign)!=null?ee:"start",U=l("slidesPerMove"),L=U==="auto"?Math.floor(l("slidesPerPage")):U;return(C.index+L)%L===0?H:void 0})()}}))},getControlProps(){return t.element(ge(F({},_i.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ge(F({},_i.prevTrigger.attrs),{id:xM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":_.prevTrigger,"data-orientation":l("orientation"),"aria-controls":vc(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ge(F({},_i.nextTrigger.attrs),{dir:l("dir"),id:wM(u),type:"button","aria-label":_.nextTrigger,"data-orientation":l("orientation"),"aria-controls":vc(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ge(F({},_i.indicatorGroup.attrs),{dir:l("dir"),id:_M(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const A="indicator",H={ArrowDown(z){T||(a({type:"PAGE.NEXT",src:A}),z.preventDefault())},ArrowUp(z){T||(a({type:"PAGE.PREV",src:A}),z.preventDefault())},ArrowRight(z){T&&(a({type:"PAGE.NEXT",src:A}),z.preventDefault())},ArrowLeft(z){T&&(a({type:"PAGE.PREV",src:A}),z.preventDefault())},Home(z){a({type:"PAGE.SET",index:0,src:A}),z.preventDefault()},End(z){a({type:"PAGE.SET",index:y.length-1,src:A}),z.preventDefault()}},U=P5(C,{dir:l("dir"),orientation:l("orientation")}),L=H[U];L==null||L(C)}}))},getIndicatorProps(C){return t.button(ge(F({},_i.indicator.attrs),{dir:l("dir"),id:Dw(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":As(C.readOnly),"data-current":As(C.index===w),"aria-label":_.indicator(C.index),onClick(A){A.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ge(F({},_i.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":As(d),"aria-label":d?_.autoplayStop:_.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var AM={props({props:e}){return JL(e,["slideCount"],"carousel"),ge(F({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:F({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:CM(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 DL(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(Kn(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=Kn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Fw(e)});return Fw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Kn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Xt(()=>{o(),Xt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return Mw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Kn(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?NL(d,m):OL(d,m)},n.get("slidesInView"));n.set("slidesInView",IL(l))},{root:r,threshold:t("inViewThreshold")});return Mw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Kn(n);return r?an(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 an(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return $5(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 an(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=iT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Kn(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=Kn(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=tT(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=RL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Kn(r);if(!o)return;const a=EM(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=iT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Kn(n);if(!r)return;const o=Iw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Kn(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=Kn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Kn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Iw(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]);Xt(()=>{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=SM(n,e.get("page"));r&&Xt(()=>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 CM(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}Ls()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Ls()(["index","readOnly"]),Ls()(["index","snapAlign"]);const kM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,dir:r,getRootNode:n},e),a=dc(AM,o);return vM(a,ap)},Bw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=kM(n),a=un(o.getRootProps(),r);return x.jsx(pM,{value:o,children:x.jsx(Mn.div,ge(F({},a),{ref:t}))})});Bw.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 NM(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 OM=180,IM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},RM=({globalClassName:e,className:t,itemMinWidth:n=OM,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((q,re)=>({node:q,key:O.isValidElement(q)&&q.key!=null?q.key:`carousel-item-${re}`})),y=T.length,w=O.useRef(null),[v,P]=O.useState(0),{width:_}=Ak();O.useLayoutEffect(()=>{w.current&&P(w.current.getBoundingClientRect().width)},[_,y]);const C=IM(r),A=n+C,H=v>0?(v+C)/A:1,U=Math.max(1,Math.floor(H));if(y===0)return null;const L=y>U,z=Math.ceil(y/U),ee=L?Math.max(1,H):U,he=d==="circle-arrow";return x.jsxs(Bw,{ref:w,className:W(e,t,`${j}-carousel`,{[`${j}-carousel--circle-arrow-navigation`]:he}),slidesPerPage:ee,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[x.jsx(Cw,{className:W(e,`${j}-carousel__item-group`,{"carousel-row-container":!L}),children:T.map(({node:q,key:re},de)=>x.jsx(Aw,{index:de,className:W(e,`${j}-carousel__item`),children:q},re))}),l&&L&&x.jsxs(_w,{className:W(e,`${j}-carousel__control`),children:[x.jsx(Pw,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:he?x.jsx(PM,{"aria-hidden":"true",size:"16px"}):x.jsx(lM,{"aria-hidden":"true",size:"16px"})}),x.jsx(kw,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:he?x.jsx(NM,{"aria-hidden":"true",size:"16px"}):x.jsx(cM,{"aria-hidden":"true",size:"16px"})})]}),u&&L&&x.jsx(vw,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:z},(q,re)=>x.jsx(Sw,{index:re,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${re+1}`},re))})]})},[LM,DM]=Bo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),MM=e=>du()(e,["lazyMount","unmountOnExit"]),[FM,Ac]=Bo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Uw=O.forwardRef((e,t)=>{const n=Ac(),r=DM(),o=cp(ge(F({},r),{present:n.open})),a=un(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Mn.div,ge(F({},a),{ref:fc(o.ref,t)}))});Uw.displayName="DialogBackdrop";const Pp=O.forwardRef((e,t)=>{const n=Ac(),r=cu(),o=un(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Mn.div,ge(F({},o),{ref:fc(r.ref,t)}))});Pp.displayName="DialogContent";const Np=O.forwardRef((e,t)=>{const n=Ac(),r=un(n.getPositionerProps(),e);return cu().unmounted?null:x.jsx(Mn.div,ge(F({},r),{ref:t}))});Np.displayName="DialogPositioner";var BM=Uo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$o=BM.build(),Hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},zw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},$w=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Cc=e=>e.getById(Op(e)),UM=e=>e.getById(Hw(e)),HM=e=>e.getById(zw(e)),zM=e=>e.getById(jw(e)),jM=e=>e.getById(Ip(e)),$M=e=>e.getById(Rp(e)),VM=e=>e.getById($w(e));function qM(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(ge(F({},$o.trigger.attrs),{dir:a("dir"),id:jw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Op(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ge(F({},$o.backdrop.attrs),{dir:a("dir"),hidden:!d,id:zw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ge(F({},$o.positioner.attrs),{dir:a("dir"),id:Hw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(ge(F({},$o.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Op(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Ip(u),"aria-describedby":f.description?Rp(u):void 0}))},getTitleProps(){return t.element(ge(F({},$o.title.attrs),{dir:a("dir"),id:Ip(u)}))},getDescriptionProps(){return t.element(ge(F({},$o.description.attrs),{dir:a("dir"),id:Rp(u)}))},getCloseTriggerProps(){return t.button(ge(F({},$o.closeTrigger.attrs),{dir:a("dir"),id:$w(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var YM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>VM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({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 uw(()=>Cc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[zM(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 hw(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?dw(()=>Cc(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")?ZT(()=>[Cc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Xt(()=>{e.set("rendered",{title:!!jM(t),description:!!$M(t)})})},syncZIndex({scope:e}){Xt(()=>{const t=Cc(e);if(!t)return;const n=Ns(t);[UM(e),HM(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})}}}};Ls()(["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 WM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,getRootNode:n,dir:r},e),a=dc(YM,o);return qM(a,ap)},Vw=e=>{const[t,l]=kT(e),d=l,{children:n}=d,r=bn(d,["children"]),[o]=MM(t),a=WM(r),u=cp(un({present:a.open},t));return x.jsx(FM,{value:a,children:x.jsx(LM,{value:o,children:x.jsx(vT,{value:u,children:n})})})},qw=O.forwardRef((e,t)=>{const n=Ac(),r=un(n.getTitleProps(),e);return x.jsx(Mn.h2,ge(F({},r),{ref:t}))});qw.displayName="DialogTitle";const GM=({children:e})=>{const t=O.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=O.useState(!1),u=O.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=O.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return x.jsx(Wh.Provider,{value:u,children:x.jsx(Jb.Provider,{value:l,children:e})})},Yw=()=>O.useContext(Jb),Ww=()=>{const e=O.useContext(Wh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},XM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Yw(),{closeMenu:a}=Ww(),{globalClassName:u}=Qe(),l=qn(),d=O.useRef(null);return O.useEffect(()=>{var T;if(!n)return;const f=d.current;(T=f==null?void 0:f.querySelector("button:not(:disabled)"))==null||T.focus();const p=y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),a())},m=y=>{var v;const w=y.target;(v=document.getElementById(o))!=null&&v.contains(w)||d.current&&!d.current.contains(w)&&a()};return f==null||f.addEventListener("keydown",p),document.addEventListener("mousedown",m),()=>{f==null||f.removeEventListener("keydown",p),document.removeEventListener("mousedown",m)}},[n,a,o]),n?x.jsx("div",{ref:d,id:r,role:"group","aria-label":l.common.moreOptions,className:W(`${j}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},KM=({componentType:e,className:t})=>{const{toggleMenu:n}=Ww(),{isOpen:r,panelId:o,triggerId:a}=Yw(),{globalClassName:u}=Qe(),l=qn();return x.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":bP(l.controls.overflowMenuAriaLabel,{componentType:e}),title:l.common.moreOptions,"aria-expanded":r,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:x.jsx(Tw,{"aria-hidden":"true"})})},Lp=()=>{const{status:e,entryType:t}=rr(),{messages:n}=Vn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},QM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),{previousComponentType:r}=rr(),o=Do(),a=()=>{kl(r||"dialog"),o()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(ww,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(ww,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},JM=({componentType:e,globalClassName:t,controls:n,additionalControls:r,showClose:o,closeButtonAriaLabel:a,onClose:u,showOverflowMenu:l,showPrimaryToggle:d})=>{const f=e==="modal"?QM:Xw;return x.jsxs("div",{className:W(t,`${j}-${e}-controls`),children:[r,n!=null?x.jsxs(x.Fragment,{children:[n,o&&x.jsx(Jf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]}):x.jsxs(x.Fragment,{children:[l&&x.jsx(KM,{componentType:e}),d&&x.jsx(f,{componentType:e,isIcon:!0}),o&&x.jsx(Jf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]})]})},ZM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),{isModalFullscreen:r}=rr(),o=Do(),a=qn(),u=()=>{Hf(!r),o()},l=r?GP:XP,d=a.controls.toggleFullscreen;return t?x.jsx(yi,{ariaLabel:d,title:d,className:W(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(l,{}),onClick:u}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(l,{"aria-hidden":"true"}),d]})},eF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),{dialogPosition:r}=rr(),o=Do(),a=qn(),u=r==="bottom-left",l=()=>{zf(u?"bottom-right":"bottom-left"),o()},d=u?uM:aM,f=u?a.controls.moveRight:a.controls.moveLeft;return t?x.jsx(yi,{className:W(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:f,title:f,onClick:l,icon:x.jsx(d,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:l,children:[x.jsx(d,{"aria-hidden":"true"}),f]})},tF=({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"?ZM:eF;return x.jsxs(XM,{componentType:e,children:[r&&x.jsx(m,{componentType:e}),o&&x.jsx(sF,{componentType:e}),a&&x.jsx(eT,{componentType:e,onClearChat:d}),u&&f&&x.jsx(rF,{componentType:e,onEndConversation:f}),l&&p&&x.jsx(nF,{componentType:e,onDownloadTranscript:p})]})},Gw=({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}=Qe(),{mode:v}=rr(),P=v==="standalone",_=e==="modal",C=ye=>n===void 0||n[ye],A=(ye,te=!0)=>t.includes(ye)&&C(ye)&&te,H=C("toggleExpanded"),U=A(_?"toggleFullscreen":"toggleDialogPosition"),L=A("minimize"),z=A("clearChat"),ee=C("close"),he=A("endConversation",!!d),q=A("downloadTranscript",!!p),re=U||L||z||he||q,de=O.useMemo(()=>{if(!m)return{};const ye=$P(m);if(!(w!=null&&w[`${rt}-header-text-font-size`]))return ye;const te={"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(te).filter(([,oe])=>oe!=null&&oe!=="").map(([oe])=>[`${rt}-${oe}`,ye[`${rt}-${oe}`]]))},[m,w]);return x.jsx(GM,{children:x.jsxs("div",{className:W(T,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(T,`${j}-${e}-header`,{standalone:P,embedded:!P}),style:de,children:[a!=null?a:m!=null&&m.logoUrl?x.jsx("img",{alt:"",className:W(T,`${j}-${e}-logo`,{standalone:P,embedded:!P}),src:m.logoUrl}):(y==null?void 0:y.logoFallback)==="sparkle"?x.jsx("svg",{className:W(T,`${j}-${e}-logo`,{standalone:P,embedded:!P}),"aria-hidden":"true",viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:x.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,x.jsx(qw,{className:W(T,`${j}-${e}-title`,{standalone:P,embedded:!P}),children:u!=null?u:m==null?void 0:m.headerText}),x.jsx(JM,{componentType:e,globalClassName:T,controls:r,additionalControls:o,showClose:ee,closeButtonAriaLabel:m==null?void 0:m.closeButtonAriaLabel,onClose:f,showOverflowMenu:re,showPrimaryToggle:H})]}),x.jsx(tF,{componentType:e,controls:r,showOverflowMenu:re,showSecondaryToggle:U,showMinimize:L,showClearChat:z,showEndConversation:he,showDownloadTranscript:q,onClearChat:l,onEndConversation:d,onDownloadTranscript:p})]})})},nF=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=Qe(),r=Do(),[o,a]=O.useState(!1),u=qn(),l=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(d){n==null||n.error("Error downloading transcript:",d)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:l,disabled:o,children:[x.jsx(CL,{"aria-hidden":"true"}),u.controls.downloadTranscript]})},rF=({onEndConversation:e,componentType:t})=>{const n=Do(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[x.jsx(KP,{"aria-hidden":"true"}),"End conversation"]})},iF={sparkle:kp,plus:dM,"paper-plane":fM},Dp=({icon:e,className:t})=>{const n=iF[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},oF=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=Qe(),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=>x.jsxs(x.Fragment,{children:[l&&x.jsx(Dp,{icon:l,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:w})]});return x.jsx("div",{className:W(t,`${j}-suggestion-container ${f}`,e),children:n.map(w=>o?x.jsx(Il,{disabled:r,className:W(t,`${j}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):x.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},sF=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Qe(),o=qn();if(!r)return null;const a=()=>{gi(!1),Ra(!0),Qf()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:o.controls.toggleMinimizeAriaLabel,title:o.controls.minimize,onClick:a,icon:x.jsx(EE,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(EE,{"aria-hidden":"true"}),o.controls.minimize]})},Xw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),r=Do(),o=()=>{kl("modal"),r()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(xw,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(xw,{"aria-hidden":"true"}),"Show modal"]})},aF=({isWidgetStandalone:e})=>{var P,_;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=Qe(),{askCimPrompts:l,messages:d}=Vn(),{isLoading:f,handleAskCim:p}=Wr(),m=o==null?void 0:o.icon,T=(P=o==null?void 0:o.iconPosition)!=null?P:"left",y=O.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(H=>H.name==="conversation_reset")&&r||C},[d,n,r]),w=O.useMemo(()=>{var A,H;const C=((H=(A=l.message)==null?void 0:A.suggestions)!=null?H:[]).map(U=>U.displayText.trim()).filter(Boolean);return r0(C,a||[],u)},[(_=l.message)==null?void 0:_.suggestions,a,u]),v=C=>()=>{p({userPrompt:C})};return x.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&x.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:w.map(C=>x.jsxs(Il,{disabled:f,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(C),children:[m&&x.jsx(Dp,{icon:m,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:C})]},C))})]})};function uF(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function lF(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function Mp({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!uF(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!lF(o)||r(o,e)}const cF=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=Qe();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=>Mp({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return x.jsxs("div",{className:W(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[T?x.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:x.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${j}-product-tile-content`),children:[l&&x.jsx("p",{className:`${j}-product-tile-brand`,children:l}),T?x.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${j}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",x.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${j}-product-tile-name`),title:u,children:u})]}),x.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${j}-product-tile-price`),children:d})})]})]})},dF=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=Qe(),u=t;return n?x.jsxs("div",{className:W(r,`${j}-display-products`),children:[x.jsx("p",{children:u.message}),u.products&&u.products.length>0&&x.jsx(RM,{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 x.jsx(cF,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},fF=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(qP,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),hF=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Wr(),{messages:u}=Vn(),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?Gv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const P=n.suggestions.find(_=>_.displayText===v);P&&o(P,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${j}-follow-up`),children:[x.jsx("p",{className:W(e,`${j}-text`),children:n.message}),x.jsx(oF,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Kw(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 pF(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mF(e,t,n){const o=$l((n||{}).ignore||[]),a=gF(t);let u=-1;for(;++u<a.length;)Oy(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 P=m.children.indexOf(f);let _=!1,C=[];T.lastIndex=0;let A=T.exec(f.value);for(;A;){const H=A.index,U={index:A.index,input:A.input,stack:[...p,f]};let L=y(...A,U);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?T.lastIndex=H+1:(w!==H&&C.push({type:"text",value:f.value.slice(w,H)}),Array.isArray(L)?C.push(...L):L&&C.push(L),w=H+A[0].length,_=!0),!T.global)break;A=T.exec(f.value)}return _?(w<f.value.length&&C.push({type:"text",value:f.value.slice(w)}),m.children.splice(P,1,...C)):C=[f],P+C.length}}function gF(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([EF(o[0]),yF(o[1])])}return t}function EF(e){return typeof e=="string"?new RegExp(pF(e),"g"):e}function yF(e){return typeof e=="function"?e:function(){return e}}const Fp="phrasing",Bp=["autolink","link","image","label"];function bF(){return{transforms:[AF],enter:{literalAutolink:wF,literalAutolinkEmail:Up,literalAutolinkHttp:Up,literalAutolinkWww:Up},exit:{literalAutolink:vF,literalAutolinkEmail:SF,literalAutolinkHttp:xF,literalAutolinkWww:_F}}}function TF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fp,notInConstruct:Bp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fp,notInConstruct:Bp},{character:":",before:"[ps]",after:"\\/",inConstruct:Fp,notInConstruct:Bp}]}}function wF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Up(e){this.config.enter.autolinkProtocol.call(this,e)}function xF(e){this.config.exit.autolinkProtocol.call(this,e)}function _F(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 SF(e){this.config.exit.autolinkEmail.call(this,e)}function vF(e){this.exit(e)}function AF(e){mF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),kF]],{ignore:["link","linkReference"]})}function CF(e,t,n,r,o){let a="";if(!Qw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PF(n)))return!1;const u=NF(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 kF(e,t,n,r){return!Qw(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 NF(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=Kw(e,"(");let a=Kw(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 Qw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ko(n)||Ml(n))&&(!t||n!==47)}Jw.peek=UF;function OF(){this.buffer()}function IF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RF(){this.buffer()}function LF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MF(e){this.exit(e)}function FF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BF(e){this.exit(e)}function UF(){return"["}function Jw(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 HF(){return{enter:{gfmFootnoteCallString:OF,gfmFootnoteCall:IF,gfmFootnoteDefinitionLabelString:RF,gfmFootnoteDefinition:LF},exit:{gfmFootnoteCallString:DF,gfmFootnoteCall:MF,gfmFootnoteDefinitionLabelString:FF,gfmFootnoteDefinition:BF}}}function zF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jw},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?Zw:jF))),f(),d}}function jF(e,t,n){return t===0?e:Zw(e,t,n)}function Zw(e,t,n){return(n?"":" ")+e}const $F=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ex.peek=GF;function VF(){return{canContainEols:["delete"],enter:{strikethrough:YF},exit:{strikethrough:WF}}}function qF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$F}],handlers:{delete:ex}}}function YF(e){this.enter({type:"delete",children:[]},e)}function WF(e){this.exit(e)}function ex(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ge(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function GF(){return"~"}function XF(e){return e.length}function KF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||XF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const v=[],P=[];let _=-1;for(e[p].length>f&&(f=e[p].length);++_<e[p].length;){const C=QF(e[p][_]);if(n.alignDelimiters!==!1){const A=o(C);P[_]=A,(d[_]===void 0||A>d[_])&&(d[_]=A)}v.push(C)}u[p]=v,l[p]=P}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=tx(r[m]);else{const v=tx(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let P="",_="";v===99?(P=":",_=":"):v===108?P=":":v===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-P.length-_.length);const A=P+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=P.length+C+_.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],P=l[p];m=-1;const _=[];for(;++m<f;){const C=v[m]||"";let A="",H="";if(n.alignDelimiters!==!1){const U=d[m]-(P[m]||0),L=a[m];L===114?A=" ".repeat(U):L===99?U%2?(A=" ".repeat(U/2+.5),H=" ".repeat(U/2-.5)):(A=" ".repeat(U/2),H=A):H=" ".repeat(U)}n.delimiterStart!==!1&&!m&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&_.push(" "),n.alignDelimiters!==!1&&_.push(A),_.push(C),n.alignDelimiters!==!1&&_.push(H),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&_.push("|")}w.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return w.join(`
30
+ `},o),a}function OI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=Ry(n,F({file:r},t));yield e.run(o,r)})}:function(n,r){return Ry(n,F({file:r},e||t))}}function Ly(e){if(e)throw e}var xh,Dy;function II(){if(Dy)return xh;Dy=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 xh=function d(){var f,p,m,T,y,w,S=arguments[0],k=1,_=arguments.length,C=!1;for(typeof S=="boolean"&&(C=S,S=arguments[1]||{},k=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});k<_;++k)if(f=arguments[k],f!=null)for(p in f)m=l(S,p),T=l(f,p),S!==T&&(C&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(S,{name:p,newValue:d(C,w,T)})):typeof T!="undefined"&&u(S,{name:p,newValue:T}));return S},xh}var RI=II();const _h=Ue(RI);function Sh(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 LI(){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?DI(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 DI(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 Xr={basename:MI,dirname:FI,extname:BI,join:UI,sep:"/"};function MI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Xa(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 FI(e){if(Xa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function BI(e){Xa(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 UI(...e){let t=-1,n;for(;++t<e.length;)Xa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":HI(n)}function HI(e){Xa(e);const t=e.codePointAt(0)===47;let n=zI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function zI(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 Xa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const jI={cwd:$I};function $I(){return"/"}function vh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function VI(e){if(typeof e=="string")e=new URL(e);else if(!vh(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 qI(e)}function qI(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 Ah=["history","path","basename","stem","extname","dirname"];class My{constructor(t){let n;t?vh(t)?n={path:t}:typeof t=="string"||YI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":jI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Ah.length;){const a=Ah[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)Ah.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Xr.basename(this.path):void 0}set basename(t){kh(t,"basename"),Ch(t,"basename"),this.path=Xr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Xr.dirname(this.path):void 0}set dirname(t){Fy(this.basename,"dirname"),this.path=Xr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Xr.extname(this.path):void 0}set extname(t){if(Ch(t,"extname"),Fy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Xr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vh(t)&&(t=VI(t)),kh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Xr.basename(this.path,this.extname):void 0}set stem(t){kh(t,"stem"),Ch(t,"stem"),this.path=Xr.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 vn(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 Ch(e,t){if(e&&e.includes(Xr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Xr.sep+"`")}function kh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Fy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function YI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const WI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),GI={}.hasOwnProperty;class Ph extends WI{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=LI()}copy(){const t=new Ph;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(_h(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Ih("data",this.frozen),this.namespace[t]=n,this):GI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Ih("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=Yl(t),r=this.parser||this.Parser;return Nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Nh("process",this.parser||this.Parser),Oh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Yl(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);QI(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(),Nh("processSync",this.parser||this.Parser),Oh("processSync",this.compiler||this.Compiler),this.process(t,o),Uy("processSync","process",n),r;function o(a,u){n=!0,Ly(a),r=u}}run(t,n,r){By(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=Yl(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),Uy("runSync","run",r),o;function a(u,l){Ly(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Yl(n),o=this.compiler||this.Compiler;return Oh("stringify",o),By(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Ih("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=_h(!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 S=r[T][1];Sh(S)&&Sh(y)&&(y=_h(!0,S,y)),r[T]=[f,y,...w]}}}}const XI=new Ph().freeze();function Nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Oh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Ih(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 By(e){if(!Sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Uy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Yl(e){return KI(e)?e:new My(e)}function KI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function QI(e){return typeof e=="string"||JI(e)}function JI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const ZI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Hy=[],zy={allowDangerousHtml:!0},eR=/^(https?|ircs?|mailto|xmpp)$/i,tR=[{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 jy(e){const t=nR(e),n=rR(e);return iR(t.runSync(t.parse(n),n),e)}function nR(e){const t=e.rehypePlugins||Hy,n=e.remarkPlugins||Hy,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),zy):zy;return XI().use(DO).use(n).use(OI,r).use(t)}function rR(e){const t=e.children||"",n=new My;return typeof t=="string"&&(n.value=t),n}function iR(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||$y;for(const p of tR)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+ZI+p.id,void 0);return ql(e,f),CN(e,{Fragment:x.Fragment,components:o,ignoreInvalidStyle:!0,jsx:x.jsx,jsxs:x.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 uh)if(Object.hasOwn(uh,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],S=uh[y];(S===null||S.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 $y(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||eR.test(e.slice(0,t))?e:""}const Vy=/[#.]/g;function oR(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Vy.lastIndex=o;const l=Vy.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 qy(e,t,n){const r=n?lR(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=oR(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,sR(u))l.unshift(u);else for(const[m,T]of Object.entries(u))aR(e,d.properties,m,T)}for(const f of l)Rh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function sR(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 aR(e,t,n,r){const o=Rl(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=RE(r):o.commaSeparated?a=TE(r):o.commaOrSpaceSeparated?a=RE(TE(r).join(" ")):a=Yy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?uR(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Yy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Rh(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)Rh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Rh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Yy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ba(n)===Ba(t)))return!0}return n}function uR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function lR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const cR=["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"],dR=qy(Ua,"div"),fR=qy(Bi,"g",cR);function hR(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=Wy(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=Wy(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 Wy(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 Oo={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/"},Gy={}.hasOwnProperty,pR=Object.prototype;function mR(e,t){const n=t||{};return Lh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Bi:Ua,verbose:n.verbose||!1},e)}function Lh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Wl(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:Xy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=hR(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"},Wl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Wl(e,r,n),n}default:return n=gR(e,t),n}}function Xy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Lh(e,t[n]);r.push(o)}return r}function gR(e,t){const n=e.schema;e.schema=t.namespaceURI===Oo.svg?Bi:Ua;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Gy.call(pR,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?fR:dR)(t.tagName,o,Xy(e,t.childNodes));if(Wl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&Ts(d.startTag),p=d&&d.endTag&&Ts(d.endTag),m=Lh(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Wl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=ER(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function ER(e,t,n){const r=Ts(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)Gy.call(n.attrs,u)&&(a[Rl(e.schema,u).property]=Ts(n.attrs[u]));n.startTag;const l=Ts(n.startTag),d=n.endTag?Ts(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function Ts(e){const t=Ky({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ky({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ky(e){return e.line&&e.column?e:void 0}const Qy={}.hasOwnProperty;function Jy(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Qy.call(o,e)){const d=String(o[e]);u=Qy.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 yR={},bR={}.hasOwnProperty,Zy=Jy("type",{handlers:{root:wR,element:AR,text:SR,comment:vR,doctype:_R}});function TR(e,t){const r=(t||yR).space;return Zy(e,r==="svg"?Bi:Ua)}function wR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Dh(e.children,n,t),ws(e,n),n}function xR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Dh(e.children,n,t),ws(e,n),n}function _R(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return ws(e,t),t}function SR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return ws(e,t),t}function vR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return ws(e,t),t}function AR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Bi);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&bR.call(e.properties,a)){const d=CR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Oo[u],childNodes:[],parentNode:null};return l.childNodes=Dh(e.children,l,r),ws(e,l),e.tagName==="template"&&e.content&&(l.content=xR(e.content,r)),l}function CR(e,t,n){const r=Rl(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?wE(n):LE(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=Oo[r.space]}return o}function Dh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Zy(e[r],n);a.parentNode=t,o.push(a)}return o}function ws(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 kR=["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]),vt="�";var N;(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"})(N||(N={}));const Xn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function eb(e){return e>=55296&&e<=57343}function NR(e){return e>=56320&&e<=57343}function OR(e,t){return(e-55296)*1024+9216+t}function tb(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function nb(e){return e>=64976&&e<=65007||PR.has(e)}var ne;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(ne||(ne={}));const IR=65536;class RR{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=IR,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(NR(n))return this.pos++,this._addGap(),OR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,N.EOF;return this._err(ne.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,N.EOF;const r=this.html.charCodeAt(n);return r===N.CARRIAGE_RETURN?N.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,N.EOF;let t=this.html.charCodeAt(this.pos);return t===N.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,N.LINE_FEED):t===N.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,eb(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===N.LINE_FEED||t===N.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){tb(t)?this._err(ne.controlCharacterInInputStream):nb(t)&&this._err(ne.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function rb(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 LR=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))),DR=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 MR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=DR.get(e))!==null&&t!==void 0?t:e}var on;(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"})(on||(on={}));const FR=32;var zi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(zi||(zi={}));function Mh(e){return e>=on.ZERO&&e<=on.NINE}function BR(e){return e>=on.UPPER_A&&e<=on.UPPER_F||e>=on.LOWER_A&&e<=on.LOWER_F}function UR(e){return e>=on.UPPER_A&&e<=on.UPPER_Z||e>=on.LOWER_A&&e<=on.LOWER_Z||Mh(e)}function HR(e){return e===on.EQUALS||UR(e)}var sn;(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"})(sn||(sn={}));var bi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(bi||(bi={}));class zR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=sn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=bi.Strict}startEntity(t){this.decodeMode=t,this.state=sn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case sn.EntityStart:return t.charCodeAt(n)===on.NUM?(this.state=sn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=sn.NamedEntity,this.stateNamedEntity(t,n));case sn.NumericStart:return this.stateNumericStart(t,n);case sn.NumericDecimal:return this.stateNumericDecimal(t,n);case sn.NumericHex:return this.stateNumericHex(t,n);case sn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|FR)===on.LOWER_X?(this.state=sn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=sn.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(Mh(o)||BR(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(Mh(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===on.SEMI)this.consumed+=1;else if(this.decodeMode===bi.Strict)return 0;return this.emitCodePoint(MR(this.result),this.consumed),this.errors&&(t!==on.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&zi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=jR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===bi.Attribute&&(a===0||HR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&zi.VALUE_LENGTH)>>14,a!==0){if(u===on.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==bi.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]&zi.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]&~zi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case sn.NamedEntity:return this.result!==0&&(this.decodeMode!==bi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case sn.NumericDecimal:return this.emitNumericEntity(0,2);case sn.NumericHex:return this.emitNumericEntity(0,3);case sn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sn.EntityStart:return 0}}}function jR(e,t,n,r){const o=(t&zi.BRANCH_LENGTH)>>7,a=t&zi.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 Io;(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"})(Io||(Io={}));var yr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(yr||(yr={}));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 $R=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 xs(e){var t;return(t=$R.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const me=g,VR={[ce.HTML]:new Set([me.ADDRESS,me.APPLET,me.AREA,me.ARTICLE,me.ASIDE,me.BASE,me.BASEFONT,me.BGSOUND,me.BLOCKQUOTE,me.BODY,me.BR,me.BUTTON,me.CAPTION,me.CENTER,me.COL,me.COLGROUP,me.DD,me.DETAILS,me.DIR,me.DIV,me.DL,me.DT,me.EMBED,me.FIELDSET,me.FIGCAPTION,me.FIGURE,me.FOOTER,me.FORM,me.FRAME,me.FRAMESET,me.H1,me.H2,me.H3,me.H4,me.H5,me.H6,me.HEAD,me.HEADER,me.HGROUP,me.HR,me.HTML,me.IFRAME,me.IMG,me.INPUT,me.LI,me.LINK,me.LISTING,me.MAIN,me.MARQUEE,me.MENU,me.META,me.NAV,me.NOEMBED,me.NOFRAMES,me.NOSCRIPT,me.OBJECT,me.OL,me.P,me.PARAM,me.PLAINTEXT,me.PRE,me.SCRIPT,me.SECTION,me.SELECT,me.SOURCE,me.STYLE,me.SUMMARY,me.TABLE,me.TBODY,me.TD,me.TEMPLATE,me.TEXTAREA,me.TFOOT,me.TH,me.THEAD,me.TITLE,me.TR,me.TRACK,me.UL,me.WBR,me.XMP]),[ce.MATHML]:new Set([me.MI,me.MO,me.MN,me.MS,me.MTEXT,me.ANNOTATION_XML]),[ce.SVG]:new Set([me.TITLE,me.FOREIGN_OBJECT,me.DESC]),[ce.XLINK]:new Set,[ce.XML]:new Set,[ce.XMLNS]:new Set},Fh=new Set([me.H1,me.H2,me.H3,me.H4,me.H5,me.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var R;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(R||(R={}));const Ht={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function qR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ka(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function YR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function ji(e){return YR(e)||Ka(e)}function ib(e){return ji(e)||qR(e)}function Gl(e){return e+32}function ob(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function sb(e){return ob(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function WR(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:eb(e)?ne.surrogateCharacterReference:nb(e)?ne.noncharacterCharacterReference:tb(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class GR{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=R.DATA,this.returnState=R.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new RR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new zR(LR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(ne.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(ne.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=WR(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:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(rb(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(ne.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=xs(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(ne.endTagWithAttributes),t.selfClosing&&this._err(ne.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=ob(t)?Xe.WHITESPACE_CHARACTER:t===N.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=R.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?bi.Attribute:bi.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===R.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===R.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case R.DATA:{this._stateData(t);break}case R.RCDATA:{this._stateRcdata(t);break}case R.RAWTEXT:{this._stateRawtext(t);break}case R.SCRIPT_DATA:{this._stateScriptData(t);break}case R.PLAINTEXT:{this._statePlaintext(t);break}case R.TAG_OPEN:{this._stateTagOpen(t);break}case R.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case R.TAG_NAME:{this._stateTagName(t);break}case R.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case R.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case R.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case R.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case R.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case R.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case R.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case R.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case R.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case R.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case R.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case R.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case R.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case R.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case R.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case R.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case R.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case R.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case R.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case R.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case R.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case R.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case R.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case R.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case R.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case R.BOGUS_COMMENT:{this._stateBogusComment(t);break}case R.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case R.COMMENT_START:{this._stateCommentStart(t);break}case R.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case R.COMMENT:{this._stateComment(t);break}case R.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case R.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case R.COMMENT_END:{this._stateCommentEnd(t);break}case R.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case R.DOCTYPE:{this._stateDoctype(t);break}case R.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case R.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case R.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case R.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case R.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case R.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case R.CDATA_SECTION:{this._stateCdataSection(t);break}case R.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case R.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case R.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case R.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.TAG_OPEN;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitCodePoint(t);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case N.AMPERSAND:{this._startCharacterReference();break}case N.LESS_THAN_SIGN:{this.state=R.RCDATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.RAWTEXT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ji(t))this._createStartTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case N.EXCLAMATION_MARK:{this.state=R.MARKUP_DECLARATION_OPEN;break}case N.SOLIDUS:{this.state=R.END_TAG_OPEN;break}case N.QUESTION_MARK:{this._err(ne.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t);break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=R.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ji(t))this._createEndTagToken(),this.state=R.TAG_NAME,this._stateTagName(t);else switch(t){case N.GREATER_THAN_SIGN:{this._err(ne.missingEndTagName),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(ne.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.tagName+=vt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateRcdataLessThanSign(t){t===N.SOLIDUS?this.state=R.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ji(t)?(this.state=R.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=R.BEFORE_ATTRIBUTE_NAME,!1;case N.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=R.SELF_CLOSING_START_TAG,!1;case N.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=R.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===N.SOLIDUS?this.state=R.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ji(t)?(this.state=R.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case N.SOLIDUS:{this.state=R.SCRIPT_DATA_END_TAG_OPEN;break}case N.EXCLAMATION_MARK:{this.state=R.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=R.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ji(t)?(this.state=R.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===N.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===N.HYPHEN_MINUS?(this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=R.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===N.SOLIDUS?this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ji(t)?(this._emitChars("<"),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ji(t)?(this.state=R.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Xn.SCRIPT,!1)&&sb(this.preprocessor.peek(Xn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case N.HYPHEN_MINUS:{this._emitChars("-");break}case N.LESS_THAN_SIGN:{this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case N.GREATER_THAN_SIGN:{this.state=R.SCRIPT_DATA,this._emitChars(">");break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(vt);break}case N.EOF:{this._err(ne.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===N.SOLIDUS?(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Xn.SCRIPT,!1)&&sb(this.preprocessor.peek(Xn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Xn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=R.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=R.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._err(ne.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=R.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:case N.SOLIDUS:case N.GREATER_THAN_SIGN:case N.EOF:{this._leaveAttrName(),this.state=R.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case N.EQUALS_SIGN:{this._leaveAttrName(),this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:{this._err(ne.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.name+=vt;break}default:this.currentAttr.name+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateAfterAttributeName(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.SOLIDUS:{this.state=R.SELF_CLOSING_START_TAG;break}case N.EQUALS_SIGN:{this.state=R.BEFORE_ATTRIBUTE_VALUE;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=R.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{this.state=R.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this.state=R.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingAttributeValue),this.state=R.DATA,this.emitCurrentTagToken();break}default:this.state=R.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case N.APOSTROPHE:{this.state=R.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.AMPERSAND:{this._startCharacterReference();break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),this.currentAttr.value+=vt;break}case N.QUOTATION_MARK:case N.APOSTROPHE:case N.LESS_THAN_SIGN:case N.EQUALS_SIGN:case N.GRAVE_ACCENT:{this._err(ne.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this._leaveAttrValue(),this.state=R.BEFORE_ATTRIBUTE_NAME;break}case N.SOLIDUS:{this._leaveAttrValue(),this.state=R.SELF_CLOSING_START_TAG;break}case N.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBetweenAttributes),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case N.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=R.DATA,this.emitCurrentTagToken();break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:this._err(ne.unexpectedSolidusInTag),this.state=R.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=vt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Xn.DASH_DASH,!0)?(this._createCommentToken(Xn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Xn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Xn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Xn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(Xn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=R.BOGUS_COMMENT):this._ensureHibernation()||(this._err(ne.incorrectlyOpenedComment),this._createCommentToken(2),this.state=R.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_START_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptClosingOfEmptyComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END_DASH;break}case N.LESS_THAN_SIGN:{n.data+="<",this.state=R.COMMENT_LESS_THAN_SIGN;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.data+=vt;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case N.EXCLAMATION_MARK:{n.data+="!",this.state=R.COMMENT_LESS_THAN_SIGN_BANG;break}case N.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=R.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=R.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===N.HYPHEN_MINUS?this.state=R.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=R.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==N.GREATER_THAN_SIGN&&t!==N.EOF&&this._err(ne.nestedComment),this.state=R.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{this.state=R.COMMENT_END;break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentComment(n);break}case N.EXCLAMATION_MARK:{this.state=R.COMMENT_END_BANG;break}case N.HYPHEN_MINUS:{n.data+="-";break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=R.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case N.HYPHEN_MINUS:{n.data+="--!",this.state=R.COMMENT_END_DASH;break}case N.GREATER_THAN_SIGN:{this._err(ne.incorrectlyClosedComment),this.state=R.DATA,this.emitCurrentComment(n);break}case N.EOF:{this._err(ne.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=R.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingWhitespaceBeforeDoctypeName),this.state=R.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ka(t))this._createDoctypeToken(String.fromCharCode(Gl(t))),this.state=R.DOCTYPE_NAME;else switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.NULL:{this._err(ne.unexpectedNullCharacter),this._createDoctypeToken(vt),this.state=R.DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=R.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.AFTER_DOCTYPE_NAME;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.name+=vt;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ka(t)?Gl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Xn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Xn.SYSTEM,!1)?this.state=R.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(ne.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.publicId="",this.state=R.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.publicId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case N.GREATER_THAN_SIGN:{this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:{this.state=R.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.QUOTATION_MARK:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{this._err(ne.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.QUOTATION_MARK:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case N.APOSTROPHE:{n.systemId="",this.state=R.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case N.GREATER_THAN_SIGN:{this._err(ne.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.DATA,this.emitCurrentDoctype(n);break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case N.QUOTATION_MARK:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case N.APOSTROPHE:{this.state=R.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case N.NULL:{this._err(ne.unexpectedNullCharacter),n.systemId+=vt;break}case N.GREATER_THAN_SIGN:{this._err(ne.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case N.SPACE:case N.LINE_FEED:case N.TABULATION:case N.FORM_FEED:break;case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(ne.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=R.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case N.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=R.DATA;break}case N.NULL:{this._err(ne.unexpectedNullCharacter);break}case N.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case N.RIGHT_SQUARE_BRACKET:{this.state=R.CDATA_SECTION_BRACKET;break}case N.EOF:{this._err(ne.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===N.RIGHT_SQUARE_BRACKET?this.state=R.CDATA_SECTION_END:(this._emitChars("]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case N.GREATER_THAN_SIGN:{this.state=R.DATA;break}case N.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=R.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(N.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&ib(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){ib(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ab=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),ub=new Set([...ab,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Xl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),XR=new Set([...Xl,g.OL,g.UL]),KR=new Set([...Xl,g.BUTTON]),lb=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),cb=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),QR=new Set([g.TR,g.TEMPLATE,g.HTML]),JR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),ZR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),e6=new Set([g.TD,g.TH]);class t6{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(Fh,ce.HTML)}popUntilTableCellPopped(){this.popUntilPopped(e6,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(ZR,ce.HTML)}clearBackToTableBodyContext(){this.clearBackTo(JR,ce.HTML)}clearBackToTableRowContext(){this.clearBackTo(QR,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(cb.has(o))return!1;break}case ce.MATHML:{if(lb.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Xl)}hasInListItemScope(t){return this.hasInDynamicScope(t,XR)}hasInButtonScope(t){return this.hasInDynamicScope(t,KR)}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(Fh.has(n))return!0;if(Xl.has(n))return!1;break}case ce.SVG:{if(cb.has(n))return!1;break}case ce.MATHML:{if(lb.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&&ab.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&ub.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&ub.has(this.currentTagId);)this.pop()}}const Bh=3;var Kr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Kr||(Kr={}));const db={type:Kr.Marker};class n6{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===Kr.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<Bh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Bh)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>=Bh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(db)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Kr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Kr.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(db);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Kr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Kr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Kr.Element&&n.element===t)}}const $i={createDocument(){return{nodeName:"#document",mode:yr.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};$i.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($i.isTextNode(n)){n.value+=t;return}}$i.appendChild(e,$i.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&$i.isTextNode(r)?r.value+=t:$i.insertBefore(e,$i.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=F(F({},e.sourceCodeLocation),t)}},fb="html",r6="about:legacy-compat",i6="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",hb=["+//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//"],o6=[...hb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],s6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),pb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],a6=[...pb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function mb(e,t){return t.some(n=>e.startsWith(n))}function u6(e){return e.name===fb&&e.publicId===null&&(e.systemId===null||e.systemId===r6)}function l6(e){if(e.name!==fb)return yr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===i6)return yr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),s6.has(n))return yr.QUIRKS;let r=t===null?o6:hb;if(mb(n,r))return yr.QUIRKS;if(r=t===null?pb:a6,mb(n,r))return yr.LIMITED_QUIRKS}return yr.NO_QUIRKS}const gb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},c6="definitionurl",d6="definitionURL",f6=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])),h6=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}]]),p6=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])),m6=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 g6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Io.COLOR||r===Io.SIZE||r===Io.FACE)||m6.has(t)}function Eb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===c6){e.attrs[t].name=d6;break}}function yb(e){for(let t=0;t<e.attrs.length;t++){const n=f6.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Uh(e){for(let t=0;t<e.attrs.length;t++){const n=h6.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 E6(e){const t=p6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=xs(e.tagName))}function y6(e,t){return t===ce.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function b6(e,t,n){if(t===ce.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Io.ENCODING){const o=n[r].value.toLowerCase();return o===gb.TEXT_HTML||o===gb.APPLICATION_XML}}return t===ce.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function T6(e,t,n,r){return(!r||r===ce.HTML)&&b6(e,t,n)||(!r||r===ce.MATHML)&&y6(e,t)}const w6="hidden",x6=8,_6=3;var B;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(B||(B={}));const S6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},bb=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),Tb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:$i,onParseError:null};class wb{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=B.INITIAL,this.originalInsertionMode=B.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},Tb),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 GR(this.options,this),this.activeFormattingElements=new n6(this.treeAdapter),this.fragmentContextID=r?xs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new t6(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=F(F({},Tb),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(B.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:S6,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=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=Ht.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=Ht.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ht.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ht.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ht.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&&Ee(F({},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===Xe.END_TAG&&o===n.tagName?{endTag:F({},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 Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return T6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Kr.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=B.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=B.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=B.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=B.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=B.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=B.IN_TABLE;return}case g.BODY:{this.insertionMode=B.IN_BODY;return}case g.FRAMESET:{this.insertionMode=B.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?B.AFTER_HEAD:B.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=B.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=B.IN_HEAD;return}break}}this.insertionMode=B.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=B.IN_SELECT_IN_TABLE;return}}this.insertionMode=B.IN_SELECT}_isElementCausesFosterParenting(t){return bb.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 VR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eL(this,t);return}switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{_b(this,t);break}case B.TEXT:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_TABLE_TEXT:{Ob(this,t);break}case B.IN_COLUMN_GROUP:{Jl(this,t);break}case B.AFTER_BODY:{tc(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){Z4(this,t);return}switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.TEXT:{this._insertCharacters(t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_COLUMN_GROUP:{Jl(this,t);break}case B.AFTER_BODY:{tc(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){zh(this,t);return}switch(this.insertionMode){case B.INITIAL:case B.BEFORE_HTML:case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_TEMPLATE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{zh(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.AFTER_BODY:{O6(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{I6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{R6(this,t);break}case B.BEFORE_HEAD:case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:{this._err(t,ne.misplacedDoctype);break}case B.IN_TABLE_TEXT:{ou(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,ne.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?tL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{L6(this,t);break}case B.BEFORE_HEAD:{M6(this,t);break}case B.IN_HEAD:{Nr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{U6(this,t);break}case B.AFTER_HEAD:{z6(this,t);break}case B.IN_BODY:{Cn(this,t);break}case B.IN_TABLE:{_s(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_CAPTION:{F4(this,t);break}case B.IN_COLUMN_GROUP:{Vh(this,t);break}case B.IN_TABLE_BODY:{Zl(this,t);break}case B.IN_ROW:{ec(this,t);break}case B.IN_CELL:{H4(this,t);break}case B.IN_SELECT:{Lb(this,t);break}case B.IN_SELECT_IN_TABLE:{j4(this,t);break}case B.IN_TEMPLATE:{V4(this,t);break}case B.AFTER_BODY:{Y4(this,t);break}case B.IN_FRAMESET:{W4(this,t);break}case B.AFTER_FRAMESET:{X4(this,t);break}case B.AFTER_AFTER_BODY:{Q4(this,t);break}case B.AFTER_AFTER_FRAMESET:{J4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{D6(this,t);break}case B.BEFORE_HEAD:{F6(this,t);break}case B.IN_HEAD:{B6(this,t);break}case B.IN_HEAD_NO_SCRIPT:{H6(this,t);break}case B.AFTER_HEAD:{j6(this,t);break}case B.IN_BODY:{Ql(this,t);break}case B.TEXT:{C4(this,t);break}case B.IN_TABLE:{ru(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_CAPTION:{B4(this,t);break}case B.IN_COLUMN_GROUP:{U4(this,t);break}case B.IN_TABLE_BODY:{qh(this,t);break}case B.IN_ROW:{Rb(this,t);break}case B.IN_CELL:{z4(this,t);break}case B.IN_SELECT:{Db(this,t);break}case B.IN_SELECT_IN_TABLE:{$4(this,t);break}case B.IN_TEMPLATE:{q4(this,t);break}case B.AFTER_BODY:{Fb(this,t);break}case B.IN_FRAMESET:{G4(this,t);break}case B.AFTER_FRAMESET:{K4(this,t);break}case B.AFTER_AFTER_BODY:{nc(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{Qa(this,t);break}case B.BEFORE_HTML:{Ja(this,t);break}case B.BEFORE_HEAD:{Za(this,t);break}case B.IN_HEAD:{eu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{tu(this,t);break}case B.AFTER_HEAD:{nu(this,t);break}case B.IN_BODY:case B.IN_TABLE:case B.IN_CAPTION:case B.IN_COLUMN_GROUP:case B.IN_TABLE_BODY:case B.IN_ROW:case B.IN_CELL:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:{Pb(this,t);break}case B.TEXT:{k4(this,t);break}case B.IN_TABLE_TEXT:{ou(this,t);break}case B.IN_TEMPLATE:{Mb(this,t);break}case B.AFTER_BODY:case B.IN_FRAMESET:case B.AFTER_FRAMESET:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{jh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===N.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case B.IN_HEAD:case B.IN_HEAD_NO_SCRIPT:case B.AFTER_HEAD:case B.TEXT:case B.IN_COLUMN_GROUP:case B.IN_SELECT:case B.IN_SELECT_IN_TABLE:case B.IN_FRAMESET:case B.AFTER_FRAMESET:{this._insertCharacters(t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:case B.AFTER_BODY:case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{xb(this,t);break}case B.IN_TABLE:case B.IN_TABLE_BODY:case B.IN_ROW:{$h(this,t);break}case B.IN_TABLE_TEXT:{Nb(this,t);break}}}}function v6(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):kb(e,t),n}function A6(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 C6(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>=_6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=k6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function k6(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=xs(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 N6(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 Hh(e,t){for(let n=0;n<x6;n++){const r=v6(e,t);if(!r)break;const o=A6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=C6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&P6(e,u,a),N6(e,o,r)}}function zh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function O6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function I6(e,t){e._appendCommentNode(t,e.document)}function jh(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 R6(e,t){e._setDocumentType(t);const n=t.forceQuirks?yr.QUIRKS:l6(t);u6(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function Qa(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,yr.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function L6(e,t){t.tagID===g.HTML?(e._insertElement(t,ce.HTML),e.insertionMode=B.BEFORE_HEAD):Ja(e,t)}function D6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ja(e,t)}function Ja(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function M6(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.HEAD:{e._insertElement(t,ce.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:Za(e,t)}}function F6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Za(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function Za(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function Nr(e,t){switch(t.tagID){case g.HTML:{Cn(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,Ht.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ht.RAWTEXT):(e._insertElement(t,ce.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ht.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ht.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=B.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(B.IN_TEMPLATE);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:eu(e,t)}}function B6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=B.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{eu(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Ro(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,ne.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,ne.endTagWithoutMatchingOpenElement)}function eu(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function U6(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Nr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:tu(e,t)}}function H6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{tu(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function tu(e,t){const n=t.type===Xe.EOF?ne.openElementsLeftAfterEof:ne.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=B.IN_HEAD,e._processToken(t)}function z6(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BODY:{e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,ne.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Nr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:nu(e,t)}}function j6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{nu(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function nu(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,Kl(e,t)}function Kl(e,t){switch(t.type){case Xe.CHARACTER:{_b(e,t);break}case Xe.WHITESPACE_CHARACTER:{xb(e,t);break}case Xe.COMMENT:{zh(e,t);break}case Xe.START_TAG:{Cn(e,t);break}case Xe.END_TAG:{Ql(e,t);break}case Xe.EOF:{Pb(e,t);break}}}function xb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function _b(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function V6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function q6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_FRAMESET)}function Y6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML)}function W6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Fh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ce.HTML)}function G6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function X6(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 K6(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 Q6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.tokenizer.state=Ht.PLAINTEXT}function J6(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 Z6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Hh(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 e4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function t4(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Hh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ce.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function n4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function r4(e,t){e.treeAdapter.getDocumentMode(e.document)!==yr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function Sb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function vb(e){const t=rb(e,Io.TYPE);return t!=null&&t.toLowerCase()===w6}function i4(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ce.HTML),vb(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function o4(e,t){e._appendElement(t,ce.HTML),t.ackSelfClosing=!0}function s4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,ce.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function a4(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Sb(e,t)}function u4(e,t){e._insertElement(t,ce.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ht.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function l4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ht.RAWTEXT)}function c4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ht.RAWTEXT)}function Ab(e,t){e._switchToTextParsing(t,Ht.RAWTEXT)}function d4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===B.IN_TABLE||e.insertionMode===B.IN_CAPTION||e.insertionMode===B.IN_TABLE_BODY||e.insertionMode===B.IN_ROW||e.insertionMode===B.IN_CELL?B.IN_SELECT_IN_TABLE:B.IN_SELECT}function f4(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function h4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ce.HTML)}function p4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,ce.HTML)}function m4(e,t){e._reconstructActiveFormattingElements(),Eb(t),Uh(t),t.selfClosing?e._appendElement(t,ce.MATHML):e._insertElement(t,ce.MATHML),t.ackSelfClosing=!0}function g4(e,t){e._reconstructActiveFormattingElements(),yb(t),Uh(t),t.selfClosing?e._appendElement(t,ce.SVG):e._insertElement(t,ce.SVG),t.ackSelfClosing=!0}function Cb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ce.HTML)}function Cn(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:{e4(e,t);break}case g.A:{Z6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{W6(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:{Y6(e,t);break}case g.LI:case g.DD:case g.DT:{K6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Sb(e,t);break}case g.HR:{s4(e,t);break}case g.RB:case g.RTC:{h4(e,t);break}case g.RT:case g.RP:{p4(e,t);break}case g.PRE:case g.LISTING:{G6(e,t);break}case g.XMP:{l4(e,t);break}case g.SVG:{g4(e,t);break}case g.HTML:{$6(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Nr(e,t);break}case g.BODY:{V6(e,t);break}case g.FORM:{X6(e,t);break}case g.NOBR:{t4(e,t);break}case g.MATH:{m4(e,t);break}case g.TABLE:{r4(e,t);break}case g.INPUT:{i4(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{o4(e,t);break}case g.IMAGE:{a4(e,t);break}case g.BUTTON:{J6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{n4(e,t);break}case g.IFRAME:{c4(e,t);break}case g.SELECT:{d4(e,t);break}case g.OPTION:case g.OPTGROUP:{f4(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ab(e,t);break}case g.FRAMESET:{q6(e,t);break}case g.TEXTAREA:{u4(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ab(e,t):Cb(e,t);break}case g.PLAINTEXT:{Q6(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:Cb(e,t)}}function E4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function y4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,Fb(e,t))}function b4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function T4(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 w4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function x4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function _4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function S4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function v4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function A4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function kb(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 Ql(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:{Hh(e,t);break}case g.P:{w4(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:{b4(e,t);break}case g.LI:{x4(e);break}case g.DD:case g.DT:{_4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{S4(e);break}case g.BR:{A4(e);break}case g.BODY:{E4(e,t);break}case g.HTML:{y4(e,t);break}case g.FORM:{T4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{v4(e,t);break}case g.TEMPLATE:{Ro(e,t);break}default:kb(e,t)}}function Pb(e,t){e.tmplInsertionModeStack.length>0?Mb(e,t):jh(e,t)}function C4(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 k4(e,t){e._err(t,ne.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function $h(e,t){if(e.openElements.currentTagId!==void 0&&bb.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=B.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{Ob(e,t);break}case Xe.WHITESPACE_CHARACTER:{Nb(e,t);break}}else iu(e,t)}function P4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CAPTION}function N4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function O4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Vh(e,t)}function I4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_TABLE_BODY}function R4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,Zl(e,t)}function L4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function D4(e,t){vb(t)?e._appendElement(t,ce.HTML):iu(e,t),t.ackSelfClosing=!0}function M4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ce.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function _s(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{R4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}case g.COL:{O4(e,t);break}case g.FORM:{M4(e,t);break}case g.TABLE:{L4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{I4(e,t);break}case g.INPUT:{D4(e,t);break}case g.CAPTION:{P4(e,t);break}case g.COLGROUP:{N4(e,t);break}default:iu(e,t)}}function ru(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Ro(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:iu(e,t)}}function iu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Kl(e,t),e.fosterParentingEnabled=n}function Nb(e,t){e.pendingCharacterTokens.push(t)}function Ob(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ou(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)iu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Ib=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function F4(e,t){const n=t.tagID;Ib.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,_s(e,t)):Cn(e,t)}function B4(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,n===g.TABLE&&ru(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:Ql(e,t)}}function Vh(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.COL:{e._appendElement(t,ce.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Nr(e,t);break}default:Jl(e,t)}}function U4(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TEMPLATE:{Ro(e,t);break}case g.COL:break;default:Jl(e,t)}}function Jl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function Zl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=B.IN_ROW,ec(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,_s(e,t));break}default:_s(e,t)}}function qh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE,ru(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:ru(e,t)}}function ec(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ce.HTML),e.insertionMode=B.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,Zl(e,t));break}default:_s(e,t)}}function Rb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,qh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=B.IN_TABLE_BODY,qh(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:ru(e,t)}}function H4(e,t){const n=t.tagID;Ib.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),ec(e,t)):Cn(e,t)}function z4(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),Rb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Ql(e,t)}}function Lb(e,t){switch(t.tagID){case g.HTML:{Cn(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:{Nr(e,t);break}}}function Db(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:{Ro(e,t);break}}}function j4(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)):Lb(e,t)}function $4(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)):Db(e,t)}function V4(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Nr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=B.IN_TABLE,e.insertionMode=B.IN_TABLE,_s(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=B.IN_COLUMN_GROUP,e.insertionMode=B.IN_COLUMN_GROUP,Vh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=B.IN_TABLE_BODY,e.insertionMode=B.IN_TABLE_BODY,Zl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,ec(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,Cn(e,t)}}function q4(e,t){t.tagID===g.TEMPLATE&&Ro(e,t)}function Mb(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):jh(e,t)}function Y4(e,t){t.tagID===g.HTML?Cn(e,t):tc(e,t)}function Fb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=B.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else tc(e,t)}function tc(e,t){e.insertionMode=B.IN_BODY,Kl(e,t)}function W4(e,t){switch(t.tagID){case g.HTML:{Cn(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:{Nr(e,t);break}}}function G4(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=B.AFTER_FRAMESET))}function X4(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function K4(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function Q4(e,t){t.tagID===g.HTML?Cn(e,t):nc(e,t)}function nc(e,t){e.insertionMode=B.IN_BODY,Kl(e,t)}function J4(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function Z4(e,t){t.chars=vt,e._insertCharacters(t)}function eL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Bb(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 tL(e,t){if(g6(t))Bb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ce.MATHML?Eb(t):r===ce.SVG&&(E6(t),yb(t)),Uh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function nL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Bb(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 rL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,iL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Ub={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Hb(e,t){const n=pL(e),r=Jy("type",{handlers:{root:oL,element:sL,text:aL,comment:jb,doctype:uL,raw:cL},unknown:dL}),o={parser:n?new wb(Ub):wb.getFragmentParser(void 0,Ub),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),Ss(o,Gr());const a=n?o.parser.document:o.parser.getFragment(),u=mR(a,{file:o.options.file});return o.stitches&&ql(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 zb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function oL(e,t){zb(e.children,t)}function sL(e,t){fL(e,t),zb(e.children,t),hL(e,t)}function aL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lL(e,t){t.stitches=!0;const n=mL(e);if("children"in e&&"children"in n){const r=Hb({type:"root",children:e.children},t.options);n.children=r.children}jb({type:"comment",value:{stitch:n}},t)}function jb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:su(e)};Ss(t,Gr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function cL(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,$b(t,Gr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rL,"&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 dL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lL(n,t);else{let r="";throw iL.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 Ss(e,t){$b(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=Ht.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 $b(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 fL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ht.PLAINTEXT)return;Ss(t,Gr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Oo.html;o===Oo.html&&n==="svg"&&(o=Oo.svg);const a=TR(Ee(F({},e),{children:[]}),{space:o===Oo.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:su(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function hL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&kR.includes(n)||t.parser.tokenizer.state===Ht.PLAINTEXT)return;Ss(t,Ll(e));const r={type:Xe.END_TAG,tagName:n,tagID:xs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:su(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ht.RCDATA||t.parser.tokenizer.state===Ht.RAWTEXT||t.parser.tokenizer.state===Ht.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ht.DATA)}function pL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function su(e){const t=Gr(e)||{line:void 0,column:void 0,offset:void 0},n=Ll(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 mL(e){return"children"in e?No(Ee(F({},e),{children:[]})):No(e)}function Vb(e){return function(t,n){return Hb(t,Ee(F({},e),{file:n}))}}const Lo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],qb={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Lo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Lo],h2:[["className","sr-only"]],img:[...Lo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Lo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Lo],table:[...Lo],ul:[...Lo,["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"]},Vi={}.hasOwnProperty;function gL(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},qb),t):qb,stack:[]},o=Yb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Yb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return EL(e,n);case"doctype":return yL(e,n);case"element":return bL(e,n);case"root":return TL(e,n);case"text":return wL(e,n)}}}function EL(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 au(a,t),a}}function yL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return au(n,t),n}}function bL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Wb(e,t.children),o=xL(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&&Vi.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 au(u,t),u}function TL(e,t){const r={type:"root",children:Wb(e,t.children)};return au(r,t),r}function wL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return au(r,t),r}function Wb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Yb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function xL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Vi.call(r,n)?r[n]:void 0,u=r&&Vi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Vi.call(l,f)){const p=l[f];let m=Gb(e,Kb(a,f),f,p);m==null&&(m=Gb(e,Kb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Vi.call(o,n)){const p=o[n];for(f in p)Vi.call(p,f)&&!Vi.call(d,f)&&(d[f]=p[f])}return d}function Gb(e,t,n,r){return t?Array.isArray(r)?_L(e,t,n,r):Xb(e,t,n,r):void 0}function _L(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Xb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Xb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&SL(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 SL(e,t,n){const r=e.schema.protocols&&Vi.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 au(e,t){const n=HE(t);t.data&&(e.data=No(t.data)),n&&(e.position=n)}function Kb(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 vL(e){return function(t){return gL(t,e)}}const Qb=({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 x.jsx("a",Ee(F(F({className:W(e,`${j}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},AL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=Qe();return!e&&!t?null:x.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?x.jsx(jy,{rehypePlugins:[Vb,vL],components:{ul:({children:r})=>x.jsx("ul",{className:W(n,`${j}-ul`),children:r}),ol:({children:r})=>x.jsx("ol",{className:W(n,`${j}-ol`),children:r}),li:({children:r})=>x.jsx("li",{className:W(n,`${j}-li`),children:r}),a:({href:r,title:o,children:a})=>x.jsx(Qb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>x.jsx("img",{className:W(n,`${j}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>x.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:r}),span:({children:r})=>x.jsx("span",{className:W(n,`${j}-disclaimer-text-span`),children:r})},children:t}):x.jsx("p",{className:W(n,`${j}-disclaimer-text`),children:e})})},Yh=({className:e,isLoading:t,isConnecting:n=!1,isConnectionSlow:r=!1,pendingInput:o,inputError:a,componentType:u,onSubmit:l,prepareSubmit:d})=>{const{connected:f,imageFile:p}=qn(),{setImageFile:m}=So(),{logger:T,globalClassName:y,searchConfig:w,features:S}=Qe(),k=St(),_=O.useRef(null),C=O.useRef(!1),A=O.useRef(p);A.current=p;const[H,U]=O.useState(!1),[L,z]=O.useState(null),Z=O.useRef({pendingInput:o,imageFile:p});O.useEffect(()=>{var Ae,we;const ue=Z.current;Z.current={pendingInput:o,imageFile:((Ae=ue.pendingInput)==null?void 0:Ae.phase)!=="failed"&&((we=ue.pendingInput)==null?void 0:we.text)===(o==null?void 0:o.text)?ue.imageFile:p};const be=_.current;ue.pendingInput&&ue.pendingInput.phase!=="failed"&&!o&&!a&&!C.current&&(be==null?void 0:be.value)===ue.pendingInput.text&&(be.value="",p&&p===ue.imageFile&&m(null))},[o,a,p,m]);const de=!!(S!=null&&S.enableImageUpload),q=!!f||!1,re=n?"connecting":q?"connected":"disconnected",fe=(o==null?void 0:o.phase)==="queued"||(o==null?void 0:o.phase)==="sending",pe=!!(t||H||fe),ee=pe||!(q||n),ie=a||L;let Ce=null;(o==null?void 0:o.phase)==="queued"?Ce="Your message is queued. Connecting...":(o==null?void 0:o.phase)==="sending"?Ce="Sending your message...":n?Ce="Connecting to assistant...":r&&(Ce="Connection is taking longer than expected.");let ae;n?ae=k.connecting.connectingToAssistantAriaLabel:q?ae=k.connecting.connectedToAssistant:ae=k.connecting.disconnectedFromAssistant;const J=()=>p?new Promise((ue,be)=>{const Ae=new FileReader;Ae.readAsDataURL(p),Ae.onload=()=>ue(Ae.result),Ae.onerror=we=>be(we)}):Promise.resolve(""),se=()=>{pe||C.current||m(null)},P=O.useCallback(ue=>{const be=ue==null?void 0:ue[0];if(be&&!(ee||C.current)){if(be.size>10*1024*1024){alert(k.imageAttachment.fileSizeExceeded10mb),m(null);return}m(be)}},[ee,m,k]),M=ue=>{(pe||C.current)&&ue.preventDefault()},K=ue=>{if(!pe&&!C.current||ue.key==="Tab")return;(ue.key==="Enter"||ue.key==="Backspace"||ue.key==="Delete"||ue.key.length===1&&!ue.metaKey&&!ue.ctrlKey)&&ue.preventDefault()},I=ue=>et(null,null,function*(){if(ue.preventDefault(),ee||C.current)return;const be=_.current,Ae=(be==null?void 0:be.value)||"",we=Ae.trim();if(!(!be||!we)){C.current=!0,U(!0),z(null);try{const Re=d==null?void 0:d(we);let Fe="";try{Fe=yield J()}catch(Ct){T==null||T.error("Error converting file to base64:",Ct),_.current&&alert("There was an error processing the file. Please try again.");return}if(_.current!==be||be.value!==Ae||A.current!==p)return;const at=Re?Re(Fe):l(we,Fe);(at===void 0||(yield at))&&_.current===be&&be.value===Ae&&(A.current===p&&m(null),be.value="")}catch(Re){T==null||T.error("Error submitting message:",Re),_.current===be&&z(k.errors.genericRetry)}finally{C.current=!1,_.current===be&&U(!1)}}});return x.jsxs("div",{className:W(y,e,`cim-${u}-component`,p&&"with-attachments",`${j}-search-bar-wrapper`),children:[p&&x.jsx(VP,{file:p,componentType:u,globalClassName:y,disabled:pe,onRemove:se}),x.jsxs("form",{className:W(y,e,`cim-${u}-component`,`${j}-search-bar`),name:`${j}-search-form`,onSubmit:I,children:[x.jsx("span",{role:"status",className:W(`${j}-connection-status-icon`,re),children:x.jsx("span",{className:`${j}-visually-hidden`,children:ae})}),de&&x.jsx(JP,{componentType:u,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:ee,globalClassName:y,className:e,onFiles:P}),x.jsx("input",{className:W(y,e,`cim-${u}-component`,`${j}-search-input`),type:"text",ref:_,defaultValue:(o==null?void 0:o.text)||"",placeholder:w==null?void 0:w.placeholder,"aria-label":(w==null?void 0:w.inputAriaLabel)||(w==null?void 0:w.placeholder)||k.searchBar.placeholderAskAQuestion,"aria-disabled":pe||void 0,readOnly:H||fe,name:`${j}-user-input`,onBeforeInput:M,onPaste:M,onCut:M,onDrop:M,onKeyDown:K}),x.jsx(rN,{isLoading:!!t}),x.jsx(eN,{className:e,globalClassName:y,searchConfig:w,componentType:u,isLoading:ee})]}),(ie||Ce)&&x.jsx("div",{className:W(y,`${j}-search-status`,ie&&`${j}-search-error`),role:ie?"alert":"status",children:ie||Ce}),x.jsx(AL,{})]})};function CL(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 kL(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 Jb=O.createContext({isOpen:!1,panelId:"",triggerId:""}),Wh=O.createContext(null),Zb=O.createContext(null),Do=()=>{var n,r;const e=O.useContext(Wh),t=O.useContext(Zb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},eT=({onClearChat:e,componentType:t})=>{const n=Do(),r=St(),o=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:o,children:[x.jsx(kL,{"aria-hidden":"true"}),r.controls.clearChatMenu]})};function PL(e){return e==null?[]:Array.isArray(e)?e:[e]}var NL=(e,...t)=>e.concat(t),OL=(e,...t)=>e.filter(n=>!t.includes(n)),IL=e=>Array.from(new Set(e));function tT(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 RL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return tT(e,t,{step:-r,loop:o})}var LL=e=>Array.isArray(e),nT=e=>e!=null&&typeof e=="object",DL=e=>nT(e)&&!LL(e),rc=e=>typeof e=="string",vs=e=>typeof e=="function",ML=e=>e==null,FL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),BL=e=>Object.prototype.toString.call(e),rT=Function.prototype.toString,UL=rT.call(Object),HL=e=>{if(!nT(e)||BL(e)!="[object Object]"||$L(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=FL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&rT.call(n)==UL},zL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,jL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,$L=e=>zL(e)||jL(e),VL=e=>e(),qL=()=>{},Gh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function YL(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:WL,max:GL}=Math,XL=e=>Number.isNaN(e),KL=e=>XL(e)?0:e,iT=(e,t,n)=>WL(GL(KL(e),t),n);function Xh(e){if(!HL(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]=Xh(o))}return n}function Kh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function QL(e,t){if(e==null)throw new Error(t())}function JL(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 ZL=Object.defineProperty,e5=(e,t,n)=>t in e?ZL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qh=(e,t,n)=>e5(e,typeof t!="symbol"?t+"":t,n),oT=()=>{},ic=e=>typeof e=="object"&&e!==null,As=e=>e?"":void 0,sT=e=>e?"true":void 0,t5=1,n5=9,r5=11,an=e=>ic(e)&&e.nodeType===t5&&typeof e.nodeName=="string",oc=e=>ic(e)&&e.nodeType===n5,i5=e=>ic(e)&&e===e.window,aT=e=>an(e)?e.localName||"":"#document";function o5(e){return["html","body","#document"].includes(aT(e))}var s5=e=>ic(e)&&e.nodeType!==void 0,Mo=e=>s5(e)&&e.nodeType===r5&&"host"in e,a5=e=>an(e)&&e.localName==="input",u5=e=>an(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function uu(e){if(!e)return!1;const t=e.getRootNode();return Ps(t)===e}var l5=/(textarea|select)/;function c5(e){if(e==null||!an(e))return!1;try{return a5(e)&&e.selectionStart!=null||l5.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Cs(e,t){var r;if(!e||!t||!an(e)||!an(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Mo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Qr(e){var t;return oc(e)?e:i5(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function d5(e){return Qr(e).documentElement}function ks(e){var t,n,r;return Mo(e)?ks(e.host):oc(e)?(t=e.defaultView)!=null?t:window:an(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Ps(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function f5(e){if(aT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Mo(e)&&e.host||d5(e);return Mo(t)?t.host:t}function Jh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),oc(t)||Mo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Zh=new WeakMap;function Ns(e){return Zh.has(e)||Zh.set(e,ks(e).getComputedStyle(e)),Zh.get(e)}var ep=new Set(["menu","listbox","dialog","grid","tree","region"]),h5=e=>ep.has(e),uT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function lT(e,t){const n=new Set,r=Jh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=uT(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&&h5(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function cT(e,t){const n=Jh(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=uT(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&&ep.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function p5(e){const t=new Set;return cT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function m5(e){const t=e.getAttribute("role");return!!(t&&ep.has(t))}function g5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function E5(e){var t;return g5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function y5(e){if(!e.id)return!1;const t=Jh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&m5(e))}var tp=()=>typeof document!="undefined";function b5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var np=e=>tp()&&e.test(b5()),T5=e=>tp()&&e.test(navigator.vendor),dT=()=>tp()&&!!navigator.maxTouchPoints,w5=()=>np(/^iPhone/i),x5=()=>np(/^iPad/i)||rp()&&navigator.maxTouchPoints>1,sc=()=>w5()||x5(),_5=()=>rp()||sc(),rp=()=>np(/^Mac/i),S5=()=>_5()&&T5(/apple/i);function v5(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 Or(e){var n;const t=v5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var fT=e=>e.button===0,A5=e=>e.button===2||rp()&&e.ctrlKey&&e.button===0,C5=e=>"touches"in e&&e.touches.length>0,k5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},hT={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=k5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in hT&&(o=hT[o]),o}function pT(e,t="client"){const n=C5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var un=(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)}},mT=e=>an(e)&&e.tagName==="IFRAME",N5=/^(audio|video|details)$/;function gT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var O5=e=>!Number.isNaN(gT(e)),I5=e=>gT(e)<0;function R5(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 ET(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=R5(d,t);if(f){const p=Array.from(f.querySelectorAll(ac)).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 ac="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",yT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(ac));(n==!0||n=="if-empty"&&o.length===0)&&an(e)&&Jr(e)&&o.unshift(e);const u=[];for(const l of o)if(Jr(l)){if(mT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...yT(d,{getShadowRoot:r}));continue}u.push(l)}return r?ET(u,r,Jr):u};function Jr(e){return!an(e)||e.closest("[inert]")?!1:e.matches(ac)&&u5(e)}function Os(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(ac));n&&Fo(e)&&o.unshift(e);const a=[];for(const u of o)if(Fo(u)){if(mT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Os(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=ET(a,r,Fo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Fo(e){return an(e)&&e.tabIndex>0?!0:Jr(e)&&!I5(e)}function L5(e,t={}){const n=Os(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function D5(e,t={}){const{current:n,getShadowRoot:r}=t,o=Os(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Ps(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function lu(e){return e.tabIndex<0&&(N5.test(e.localName)||c5(e))&&!O5(e)?0:e.tabIndex}function bT(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=Os(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var M5=class wS{constructor(){Qh(this,"id",null),Qh(this,"fn_cleanup"),Qh(this,"cleanup",()=>{this.cancel()})}static create(){return new wS}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 Kt(e){const t=M5.create();return t.request(e),t.cleanup}function TT(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 ip(e){const t=f5(e);return o5(t)?Qr(t).body:an(t)&&U5(t)?t:ip(t)}var F5=/auto|scroll|overlay|hidden|clip/,B5=new Set(["inline","contents"]);function U5(e){const t=ks(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return F5.test(n+o+r)&&!B5.has(a)}var Is="default",op="",uc=new WeakMap;function H5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return sc()?(Is==="default"&&(op=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Is="disabled"):t&&(uc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>z5({target:t,doc:r})}function z5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(sc()){if(Is!=="disabled")return;Is="restoring",setTimeout(()=>{TT(()=>{Is==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=op||""),op="",Is="default")})},300)}else if(t&&uc.has(t)){const a=uc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),uc.delete(t)}}function j5(e={}){const u=e,{defer:t,target:n}=u,r=Tn(u,["defer","target"]),o=t?Kt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(H5(Ee(F({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function $5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=pT(l),f=Math.sqrt(Zu(d.x,2)+Zu(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=pT(l);r({point:d,event:l})},u=[un(e,"pointermove",o,!1),un(e,"pointerup",a,!1),un(e,"pointercancel",a,!1),un(e,"contextmenu",a,!1),j5({doc:e})];return()=>{u.forEach(l=>l())}}function V5(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]=L5(e,{includeContainer:!0,getShadowRoot:a}),y=D5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&uu(y)?(o==null||o(),p=T):f.shiftKey&&(uu(m)||w)?p=n:!f.shiftKey&&uu(n)?(o==null||o(),p=m):!f.shiftKey&&(uu(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return un(u,"keydown",d,!0)}function q5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=Tn(l,["defer","triggerElement"]),a=n?Kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(V5(d,F({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Y5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function lc(e,t){if(!e)return oT;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 W5(e,t,n){if(!e)return oT;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 G5(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 X5(e,t){const{timeout:n,rootNode:r}=t,o=ks(r),a=Qr(r),u=new o.AbortController;return G5(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 K5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Q5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,wT=e=>{const t={};let n;for(;n=Q5.exec(e);)t[n[1]]=n[2];return t},J5=(e,t)=>{if(rc(e)){if(rc(t))return`${e};${t}`;e=wT(e)}else rc(t)&&(t=wT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function ln(...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]=Gh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=K5(t[o],n[o]);continue}if(o==="style"){t[o]=J5(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 fz(e){return e}var Rs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Rs||{}),sp="__init__";function Z5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Qr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Ps(t()),a=u=>t().getElementById(u);return Ee(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:uu,getById:a})}function eD(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Ls=()=>e=>Array.from(new Set(e)),xT=typeof globalThis.document!="undefined"?O.useLayoutEffect:O.useEffect;function cc(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=O.useState(t),[o,a]=O.useState(r),u=e().value!==void 0,l=O.useRef(o);l.current=u?e().value:o;const d=O.useRef(l.current);xT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var k,_;const w=d.current,S=vs(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:w}),u||a(S),n(S,w)||(_=(k=e()).onChange)==null||_.call(k,S,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?vo.flushSync:VL)(()=>f(y))},invoke(y,w){var S,k;(k=(S=e()).onChange)==null||k.call(S,y,w)},hash(y){var w,S,k;return(k=(S=(w=e()).hash)==null?void 0:S.call(w,y))!=null?k:String(y)}}}cc.cleanup=e=>{O.useEffect(()=>e,[])},cc.ref=e=>{const t=O.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function tD(e){const t=O.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var nD=(e,t)=>{const n=O.useRef(!1),r=O.useRef(!1);O.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),O.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function dc(e,t={}){var re,fe,pe,ee,ie,Ce;const n=O.useMemo(()=>{const{id:ae,ids:J,getRootNode:se}=t;return Z5({id:ae,ids:J,getRootNode:se})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},o=(fe=(re=e.props)==null?void 0:re.call(e,{props:Xh(t),scope:n}))!=null?fe:t,a=rD(o),u=(pe=e.context)==null?void 0:pe.call(e,{prop:a,bindable:cc,scope:n,flush:ST,getContext(){return d},getComputed(){return U},getRefs(){return S},getEvent(){return y()}}),l=_T(u),d={get(ae){var J;return(J=l.current)==null?void 0:J[ae].ref.current},set(ae,J){var se;(se=l.current)==null||se[ae].set(J)},initial(ae){var J;return(J=l.current)==null?void 0:J[ae].initial},hash(ae){var se,P;const J=(se=l.current)==null?void 0:se[ae].get();return(P=l.current)==null?void 0:P[ae].hash(J)}},f=O.useRef(new Map),p=O.useRef(null),m=O.useRef(null),T=O.useRef({type:""}),y=()=>Ee(F({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>Ee(F({},L),{matches(...ae){return ae.includes(L.ref.current)},hasTag(ae){var J,se;return!!((se=(J=e.states[L.ref.current])==null?void 0:J.tags)!=null&&se.includes(ae))}}),S=tD((ie=(ee=e.refs)==null?void 0:ee.call(e,{prop:a,context:d}))!=null?ie:{}),k=()=>({state:w(),context:d,event:y(),prop:a,send:q,action:_,guard:C,track:nD,refs:S,computed:U,flush:ST,scope:n,choose:H}),_=ae=>{const J=vs(ae)?ae(k()):ae;if(!J)return;const se=J.map(P=>{var K,I;const M=(I=(K=e.implementations)==null?void 0:K.actions)==null?void 0:I[P];return M||Kh(`[zag-js] No implementation found for action "${JSON.stringify(P)}"`),M});for(const P of se)P==null||P(k())},C=ae=>{var J,se;return vs(ae)?ae(k()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[ae](k())},A=ae=>{const J=vs(ae)?ae(k()):ae;if(!J)return;const se=J.map(M=>{var I,ue;const K=(ue=(I=e.implementations)==null?void 0:I.effects)==null?void 0:ue[M];return K||Kh(`[zag-js] No implementation found for effect "${JSON.stringify(M)}"`),K}),P=[];for(const M of se){const K=M==null?void 0:M(k());K&&P.push(K)}return()=>P.forEach(M=>M==null?void 0:M())},H=ae=>PL(ae).find(J=>{let se=!J.guard;return rc(J.guard)?se=!!C(J.guard):vs(J.guard)&&(se=J.guard(k())),se}),U=ae=>{QL(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[ae];return J({context:d,event:y(),prop:a,refs:S,scope:n,computed:U})},L=cc(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,J){var P,M,K,I;if(J){const ue=f.current.get(J);ue==null||ue(),f.current.delete(J)}J&&_((P=e.states[J])==null?void 0:P.exit),_((M=p.current)==null?void 0:M.actions);const se=A((K=e.states[ae])==null?void 0:K.effects);if(se&&f.current.set(ae,se),J===sp){_(e.entry);const ue=A(e.effects);ue&&f.current.set(sp,ue)}_((I=e.states[ae])==null?void 0:I.entry)}})),z=O.useRef(void 0),Z=O.useRef(Rs.NotStarted);xT(()=>{queueMicrotask(()=>{var M;const se=Z.current===Rs.Started;Z.current=Rs.Started,r(se?"rehydrating...":"initializing...");const P=(M=z.current)!=null?M:L.initial;L.invoke(P,se?L.get():sp)});const ae=f.current,J=L.ref.current;return()=>{r("unmounting..."),z.current=J,Z.current=Rs.Stopped,ae.forEach(se=>se==null?void 0:se()),f.current=new Map,p.current=null,queueMicrotask(()=>{_(e.exit)})}},[]);const de=()=>"ref"in L?L.ref.current:L.get(),q=ae=>{queueMicrotask(()=>{var I,ue,be,Ae,we;if(Z.current!==Rs.Started)return;m.current=T.current,T.current=ae;let J=de();const se=(be=(I=e.states[J].on)==null?void 0:I[ae.type])!=null?be:(ue=e.on)==null?void 0:ue[ae.type],P=H(se);if(!P)return;p.current=P;const M=(Ae=P.target)!=null?Ae:J;r("transition",ae.type,P.target||J,`(${P.actions})`);const K=M!==J;K?vo.flushSync(()=>L.set(M)):P.reenter&&!K?L.invoke(J,J):_((we=P.actions)!=null?we:[])})};return(Ce=e.watch)==null||Ce.call(e,k()),{state:w(),send:q,context:d,prop:a,scope:n,refs:S,computed:U,event:y(),getStatus:()=>Z.current}}function _T(e){const t=O.useRef(e);return t.current=e,t}function rD(e){const t=_T(e);return function(r){return t.current[r]}}function ST(e){queueMicrotask(()=>{vo.flushSync(()=>e())})}var ap=eD(e=>e);function fc(...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 iD(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 up=e=>{const t=O.memo(O.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=Tn(f,["asChild","children"]);if(!o)return O.createElement(e,Ee(F({},u),{ref:r}),a);if(!O.isValidElement(a))return null;const l=O.Children.only(a),d=iD(l);return O.cloneElement(l,Ee(F({},ln(u,l.props)),{ref:r?fc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Fn=(()=>{const e=new Map;return new Proxy(up,{apply(t,n,r){return up(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,up(r)),e.get(r)}})})();function oD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Bo(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=O.createContext(u);l.displayName=t;function d(){var p;const f=O.useContext(l);if(!f&&n){const m=new Error(a!=null?a:oD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[sD,lp]=Bo({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[vT,cu]=Bo({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),AT=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=ln(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Fn.div,Ee(F({},o),{ref:fc(r.ref,t)}))});AT.displayName="PopoverContent";const CT=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=ln(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Fn.div,Ee(F({},o),{ref:t}))});CT.displayName="PopoverPositioner";const du=()=>(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]},[{},F({},e)]),kT=e=>du()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function aD(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 uD={props({props:e}){return Ee(F({},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",Ns(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"});Kt(()=>{var l,d;const u=hc(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})=>{Kt(()=>{e.set("prevAnimationName",hc(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",hc(t.get("styles")))},u=d=>{const f=hc(t.get("styles"));Or(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=lc(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),TT(()=>l())}}}}};function hc(e){return(e==null?void 0:e.animationName)||"none"}Ls()(["onExitComplete","present","immediate"]);function lD(e,t={}){const{sync:n=!1}=t,r=cD(e);return O.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 cD(e){const t=O.useRef(e);return t.current=e,t}const cp=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=Tn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=O.useRef(!1),l=Ee(F({},a),{present:r,onExitComplete:lD(e.onExitComplete)}),d=dc(uD,l),f=aD(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 Uo=(e,t=[])=>({parts:(...n)=>{if(dD(t))return Uo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Uo(e,[...t,...n]),omit:(...n)=>Uo(e,t.filter(r=>!n.includes(r))),rename:n=>Uo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Ds(e)}"][data-part="${Ds(r)}"]`,`& [data-scope="${Ds(e)}"][data-part="${Ds(r)}"]`].join(", "),attrs:{"data-scope":Ds(e),"data-part":Ds(r)}}}),{})}),Ds=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),dD=e=>e.length===0;const fD=["top","right","bottom","left"],qi=Math.min,Ti=Math.max,pc=Math.round,mc=Math.floor,Zr=e=>({x:e,y:e}),hD={left:"right",right:"left",bottom:"top",top:"bottom"};function PT(e,t,n){return Ti(e,qi(t,n))}function wi(e,t){return typeof e=="function"?e(t):e}function Yi(e){return e.split("-")[0]}function Ms(e){return e.split("-")[1]}function dp(e){return e==="x"?"y":"x"}function fp(e){return e==="y"?"height":"width"}function ei(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hp(e){return dp(ei(e))}function pD(e,t,n){n===void 0&&(n=!1);const r=Ms(e),o=hp(e),a=fp(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=gc(u)),[u,gc(u)]}function mD(e){const t=gc(e);return[pp(e),t,pp(t)]}function pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const NT=["left","right"],OT=["right","left"],gD=["top","bottom"],ED=["bottom","top"];function yD(e,t,n){switch(e){case"top":case"bottom":return n?t?OT:NT:t?NT:OT;case"left":case"right":return t?gD:ED;default:return[]}}function bD(e,t,n,r){const o=Ms(e);let a=yD(Yi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(pp)))),a}function gc(e){const t=Yi(e);return hD[t]+e.slice(t.length)}function TD(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 IT(e){return typeof e!="number"?TD(e):{top:e,right:e,bottom:e,left:e}}function Ec(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 RT(e,t,n){let{reference:r,floating:o}=e;const a=ei(t),u=hp(t),l=fp(u),d=Yi(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=Ms(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function wD(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}=wi(t,e),w=IT(y),k=l[T?m==="floating"?"reference":"floating":m],_=Ec(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(k))==null||n?k:k.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),H=(yield a.isElement==null?void 0:a.isElement(A))&&(yield a.getScale==null?void 0:a.getScale(A))||{x:1,y:1},U=Ec(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:A,strategy:d}):C);return{top:(_.top-U.top+w.top)/H.y,bottom:(U.bottom-_.bottom+w.bottom)/H.y,left:(_.left-U.left+w.left)/H.x,right:(U.right-_.right+w.right)/H.x}})}const xD=50,_D=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:Ee(F({},u),{detectOverflow:wD}),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}=RT(f,r,d),T=r,y=0;const w={};for(let S=0;S<a.length;S++){const k=a[S];if(!k)continue;const{name:_,fn:C}=k,{x:A,y:H,data:U,reset:L}=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=H!=null?H:m,w[_]=F(F({},w[_]),U),L&&y<xD&&(y++,typeof L=="object"&&(L.placement&&(T=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):L.rects),{x:p,y:m}=RT(f,T,d)),S=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),SD=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}=wi(e,n)||{};if(p==null)return{};const T=IT(m),y={x:r,y:o},w=hp(a),S=fp(w),k=yield l.getDimensions(p),_=w==="y",C=_?"top":"left",A=_?"bottom":"right",H=_?"clientHeight":"clientWidth",U=u.reference[S]+u.reference[w]-y[w]-u.floating[S],L=y[w]-u.reference[w],z=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let Z=z?z[H]:0;(!Z||!(yield l.isElement==null?void 0:l.isElement(z)))&&(Z=d.floating[H]||u.floating[S]);const de=U/2-L/2,q=Z/2-k[S]/2-1,re=qi(T[C],q),fe=qi(T[A],q),pe=Z-k[S]-fe,ee=Z/2-k[S]/2+de,ie=PT(re,ee,pe),Ce=!f.arrow&&Ms(a)!=null&&ee!==ie&&u.reference[S]/2-(ee<re?re:fe)-k[S]/2<0,ae=Ce?ee<re?ee-re:ee-pe:0;return{[w]:y[w]+ae,data:F({[w]:ie,centerOffset:ee-ie-ae},Ce&&{alignmentOffset:ae}),reset:Ce}})}}),vD=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,ie=wi(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:k=!0}=ie,_=Tn(ie,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Yi(a),A=ei(d),H=Yi(d)===d,U=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(H||!k?[gc(d)]:mD(d)),z=S!=="none";!y&&z&&L.push(...bD(d,k,S,U));const Z=[d,...L],de=yield f.detectOverflow(n,_),q=[];let re=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&q.push(de[C]),T){const Ce=pD(a,l,U);q.push(de[Ce[0]],de[Ce[1]])}if(re=[...re,{placement:a,overflows:q}],!q.every(Ce=>Ce<=0)){var fe,pe;const Ce=(((fe=u.flip)==null?void 0:fe.index)||0)+1,ae=Z[Ce];if(ae&&(!(T==="alignment"?A!==ei(ae):!1)||re.every(P=>ei(P.placement)===A?P.overflows[0]>0:!0)))return{data:{index:Ce,overflows:re},reset:{placement:ae}};let J=(pe=re.filter(se=>se.overflows[0]<=0).sort((se,P)=>se.overflows[1]-P.overflows[1])[0])==null?void 0:pe.placement;if(!J)switch(w){case"bestFit":{var ee;const se=(ee=re.filter(P=>{if(z){const M=ei(P.placement);return M===A||M==="y"}return!0}).map(P=>[P.placement,P.overflows.filter(M=>M>0).reduce((M,K)=>M+K,0)]).sort((P,M)=>P[1]-M[1])[0])==null?void 0:ee[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function LT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function DT(e){return fD.some(t=>e[t]>=0)}const AD=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=wi(e,n),{strategy:a="referenceHidden"}=l,u=Tn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,Ee(F({},u),{elementContext:"reference"})),f=LT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:DT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,Ee(F({},u),{altBoundary:!0})),f=LT(d,r.floating);return{data:{escapedOffsets:f,escaped:DT(f)}}}default:return{}}})}}},MT=new Set(["left","top"]);function CD(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=Yi(n),l=Ms(n),d=ei(n)==="y",f=MT.has(u)?-1:1,p=a&&d?-1:1,m=wi(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 kD=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 CD(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:Ee(F({},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=wi(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:H=>{let{x:U,y:L}=H;return{x:U,y:L}}}}=A,p=Tn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=ei(a),w=dp(y);let S=m[w],k=m[y];const _=(H,U)=>PT(U+T[H==="y"?"top":"left"],U,U-T[H==="y"?"bottom":"right"]);l&&(S=_(w,S)),d&&(k=_(y,k));const C=f.fn(Ee(F({},n),{[w]:S,[y]:k}));return Ee(F({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[w]:l,[y]:d}}})})}}},ND=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}=wi(e,t),T={x:o,y:a},y=ei(u),w=dp(y);let S=T[w],k=T[y];const _=wi(f,t),C=typeof _=="number"?{mainAxis:_,crossAxis:0}:{mainAxis:(n=_.mainAxis)!=null?n:0,crossAxis:(r=_.crossAxis)!=null?r:0};if(p){const U=w==="y"?"height":"width",L=l.reference[w]-l.floating[U]+C.mainAxis,z=l.reference[w]+l.reference[U]-C.mainAxis;S<L?S=L:S>z&&(S=z)}if(m){var A,H;const U=w==="y"?"width":"height",L=MT.has(Yi(u)),z=l.reference[y]-l.floating[U]+(L&&((A=d.offset)==null?void 0:A[y])||0)+(L?0:C.crossAxis),Z=l.reference[y]+l.reference[U]+(L?0:((H=d.offset)==null?void 0:H[y])||0)-(L?C.crossAxis:0);k<z?k=z:k>Z&&(k=Z)}return{[w]:S,[y]:k}}}},OD=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,q=wi(e,n),{apply:l=()=>{}}=q,d=Tn(q,["apply"]),f=yield a.detectOverflow(n,d),p=Yi(r),m=Ms(r),T=ei(r)==="y",{width:y,height:w}=o.floating;let S,k;p==="top"||p==="bottom"?(S=p,k=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(k=p,S=m==="end"?"top":"bottom");const _=w-f.top-f.bottom,C=y-f.left-f.right,A=qi(w-f[S],_),H=qi(y-f[k],C),U=n.middlewareData.shift,L=!U;let z=A,Z=H;U!=null&&U.enabled.x&&(Z=C),U!=null&&U.enabled.y&&(z=_),L&&!m&&(T?Z=y-2*Ti(f.left,f.right):z=w-2*Ti(f.top,f.bottom)),yield l(Ee(F({},n),{availableWidth:Z,availableHeight:z}));const de=yield a.getDimensions(u.floating);return y!==de.width||w!==de.height?{reset:{rects:!0}}:{}})}}};function yc(){return typeof window!="undefined"}function Fs(e){return FT(e)?(e.nodeName||"").toLowerCase():"#document"}function sr(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ti(e){var t;return(t=(FT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function FT(e){return yc()?e instanceof Node||e instanceof sr(e).Node:!1}function Ir(e){return yc()?e instanceof Element||e instanceof sr(e).Element:!1}function ni(e){return yc()?e instanceof HTMLElement||e instanceof sr(e).HTMLElement:!1}function BT(e){return!yc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof sr(e).ShadowRoot}function fu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Rr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ID(e){return/^(table|td|th)$/.test(Fs(e))}function bc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const RD=/transform|translate|scale|rotate|perspective|filter/,LD=/paint|layout|strict|content/,Ho=e=>!!e&&e!=="none";let mp;function gp(e){const t=Ir(e)?Rr(e):e;return Ho(t.transform)||Ho(t.translate)||Ho(t.scale)||Ho(t.rotate)||Ho(t.perspective)||!Ep()&&(Ho(t.backdropFilter)||Ho(t.filter))||RD.test(t.willChange||"")||LD.test(t.contain||"")}function DD(e){let t=Wi(e);for(;ni(t)&&!Bs(t);){if(gp(t))return t;if(bc(t))return null;t=Wi(t)}return null}function Ep(){return mp==null&&(mp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mp}function Bs(e){return/^(html|body|#document)$/.test(Fs(e))}function Rr(e){return sr(e).getComputedStyle(e)}function Tc(e){return Ir(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Wi(e){if(Fs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||BT(e)&&e.host||ti(e);return BT(t)?t.host:t}function UT(e){const t=Wi(e);return Bs(t)?(e.ownerDocument||e).body:ni(t)&&fu(t)?t:UT(t)}function hu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=UT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=sr(o);if(a){const l=yp(u);return t.concat(u,u.visualViewport||[],fu(o)?o:[],l&&n?hu(l):[])}else return t.concat(o,hu(o,[],n))}function yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function HT(e){const t=Rr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ni(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=pc(n)!==a||pc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function bp(e){return Ir(e)?e:e.contextElement}function Us(e){const t=bp(e);if(!ni(t))return Zr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=HT(t);let u=(a?pc(n.width):n.width)/r,l=(a?pc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const MD=Zr(0);function zT(e){const t=sr(e);return!Ep()||!t.visualViewport?MD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function FD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==sr(e)?!1:t}function zo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=bp(e);let u=Zr(1);t&&(r?Ir(r)&&(u=Us(r)):u=Us(e));const l=FD(a,n,r)?zT(a):Zr(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=sr(a),y=r&&Ir(r)?sr(r):r;let w=T,S=yp(w);for(;S&&r&&y!==w;){const k=Us(S),_=S.getBoundingClientRect(),C=Rr(S),A=_.left+(S.clientLeft+parseFloat(C.paddingLeft))*k.x,H=_.top+(S.clientTop+parseFloat(C.paddingTop))*k.y;d*=k.x,f*=k.y,p*=k.x,m*=k.y,d+=A,f+=H,w=sr(S),S=yp(w)}}return Ec({width:p,height:m,x:d,y:f})}function wc(e,t){const n=Tc(e).scrollLeft;return t?t.left+n:zo(ti(e)).left+n}function jT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-wc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function BD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=ti(r),l=t?bc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Zr(1);const p=Zr(0),m=ni(r);if((m||!m&&!a)&&((Fs(r)!=="body"||fu(u))&&(d=Tc(r)),ni(r))){const y=zo(r);f=Us(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?jT(u,d):Zr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function UD(e){return Array.from(e.getClientRects())}function HD(e){const t=ti(e),n=Tc(e),r=e.ownerDocument.body,o=Ti(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Ti(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+wc(e);const l=-n.scrollTop;return Rr(r).direction==="rtl"&&(u+=Ti(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const $T=25;function zD(e,t){const n=sr(e),r=ti(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=Ep();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=wc(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<=$T&&(a-=w)}else f<=$T&&(a+=f);return{width:a,height:u,x:l,y:d}}const jD=new Set(["absolute","fixed"]);function $D(e,t){const n=zo(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ni(e)?Us(e):Zr(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 VT(e,t,n){let r;if(t==="viewport")r=zD(e,n);else if(t==="document")r=HD(ti(e));else if(Ir(t))r=$D(t,n);else{const o=zT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ec(r)}function qT(e,t){const n=Wi(e);return n===t||!Ir(n)||Bs(n)?!1:Rr(n).position==="fixed"||qT(n,t)}function VD(e,t){const n=t.get(e);if(n)return n;let r=hu(e,[],!1).filter(l=>Ir(l)&&Fs(l)!=="body"),o=null;const a=Rr(e).position==="fixed";let u=a?Wi(e):e;for(;Ir(u)&&!Bs(u);){const l=Rr(u),d=gp(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&jD.has(o.position)||fu(u)&&!d&&qT(e,u))?r=r.filter(p=>p!==u):o=l,u=Wi(u)}return t.set(e,r),r}function qD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?bc(t)?[]:VD(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=VT(t,p,o);return f.top=Ti(m.top,f.top),f.right=qi(m.right,f.right),f.bottom=qi(m.bottom,f.bottom),f.left=Ti(m.left,f.left),f},VT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function YD(e){const{width:t,height:n}=HT(e);return{width:t,height:n}}function WD(e,t,n){const r=ni(t),o=ti(t),a=n==="fixed",u=zo(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Zr(0);function f(){d.x=wc(o)}if(r||!r&&!a)if((Fs(t)!=="body"||fu(o))&&(l=Tc(t)),r){const y=zo(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?jT(o,l):Zr(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 Tp(e){return Rr(e).position==="static"}function YT(e,t){if(!ni(e)||Rr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ti(e)===n&&(n=n.ownerDocument.body),n}function WT(e,t){const n=sr(e);if(bc(e))return n;if(!ni(e)){let o=Wi(e);for(;o&&!Bs(o);){if(Ir(o)&&!Tp(o))return o;o=Wi(o)}return n}let r=YT(e,t);for(;r&&ID(r)&&Tp(r);)r=YT(r,t);return r&&Bs(r)&&Tp(r)&&!gp(r)?n:r||DD(e)||n}const GD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||WT,n=this.getDimensions,r=yield n(e.floating);return{reference:WD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function XD(e){return Rr(e).direction==="rtl"}const KD={convertOffsetParentRelativeRectToViewportRelativeRect:BD,getDocumentElement:ti,getClippingRect:qD,getOffsetParent:WT,getElementRects:GD,getClientRects:UD,getDimensions:YD,getScale:Us,isElement:Ir,isRTL:XD};function GT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function QD(e,t){let n=null,r;const o=ti(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=mc(m),S=mc(o.clientWidth-(p+T)),k=mc(o.clientHeight-(m+y)),_=mc(p),A={rootMargin:-w+"px "+-S+"px "+-k+"px "+-_+"px",threshold:Ti(0,qi(1,d))||1};let H=!0;function U(L){const z=L[0].intersectionRatio;if(z!==d){if(!H)return u();z?u(!1,z):r=setTimeout(()=>{u(!1,1e-7)},1e3)}z===1&&!GT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(U,Ee(F({},A),{root:o.ownerDocument}))}catch(L){n=new IntersectionObserver(U,A)}n.observe(e)}return u(!0),a}function JD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=bp(e),p=o||a?[...f?hu(f):[],...hu(t)]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const m=f&&l?QD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(_=>{let[C]=_;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,S=d?zo(e):null;d&&k();function k(){const _=zo(e);S&&!GT(S,_)&&n(),S=_,w=requestAnimationFrame(k)}return n(),()=>{var _;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(_=y)==null||_.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const ZD=kD,e8=PD,t8=vD,n8=OD,r8=AD,i8=SD,o8=ND,s8=(e,t,n)=>{const r=new Map,o=F({platform:KD},n),a=Ee(F({},o.platform),{_c:r});return _D(e,t,Ee(F({},o),{platform:a}))};function XT(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 Ee(F({},o),{toJSON:()=>o})}function a8(e){if(!e)return XT();const{x:t,y:n,width:r,height:o}=e;return XT(t,n,r,o)}function u8(e,t){return{contextElement:an(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?a8(r):n.getBoundingClientRect()}}}var pu=e=>({variable:e,reference:`var(${e})`}),xi={arrowSize:pu("--arrow-size"),arrowSizeHalf:pu("--arrow-size-half"),arrowBg:pu("--arrow-background"),transformOrigin:pu("--transform-origin"),arrowOffset:pu("--arrow-offset")},l8=e=>e==="top"||e==="bottom"?"y":"x";function c8(e,t){return{name:"transformOrigin",fn(n){var de,q,re,fe,pe;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=l8(d),p=((de=o.arrow)==null?void 0:de.x)||0,m=((q=o.arrow)==null?void 0:q.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,S=m+y/2,k=Math.abs(((re=o.shift)==null?void 0:re.y)||0),_=u.reference.height/2,C=y/2,A=(pe=(fe=e.offset)==null?void 0:fe.mainAxis)!=null?pe:e.gutter,H=typeof A=="number"?A+C:A!=null?A:C,U=k>H,L={top:`${w}px calc(100% + ${H}px)`,bottom:`${w}px ${-H}px`,left:`calc(100% + ${H}px) ${S}px`,right:`${-H}px ${S}px`}[d],z=`${w}px ${u.reference.y+_-l}px`,Z=!!e.overlap&&f==="y"&&U;return r.floating.style.setProperty(xi.transformOrigin.variable,Z?z:L),{data:{transformOrigin:Z?z:L}}}}}var d8={name:"rects",fn({rects:e}){return{data:e}}},f8=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% + ${xi.arrowOffset.reference})`}),{}}}};function h8(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var p8={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function KT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function wp(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function m8(e,t,n){const r=e||t.createElement("div");return i8({element:r,padding:n.arrowPadding})}function g8(e,t){var n;if(!ML((n=t.offset)!=null?n:t.gutter))return ZD(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:l}=h8(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Xh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function E8(e){if(!e.flip)return;const t=wp(e.boundary);return t8(Ee(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function y8(e){if(!e.slide&&!e.overlap)return;const t=wp(e.boundary);return e8(Ee(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:o8()}))}function b8(e){return n8({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 T8(e){var t;if(e.hideWhenDetached)return r8({strategy:"referenceHidden",boundary:(t=wp(e.boundary))!=null?t:"clippingAncestors"})}function w8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function x8(e,t,n={}){const r=u8(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},p8,n),a=t.querySelector("[data-part=arrow]"),u=[g8(a,o),E8(o),y8(o),m8(a,t.ownerDocument,o),f8(a),c8({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),b8(o),T8(o),d8],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var H;if(!r||!t)return;const S=yield s8(r,t,{placement:l,middleware:u,strategy:d});f==null||f(S),p==null||p({placed:!0});const k=ks(t),_=KT(k,S.x),C=KT(k,S.y);t.style.setProperty("--x",`${_}px`),t.style.setProperty("--y",`${C}px`),o.hideWhenDetached&&(((H=S.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const A=t.firstElementChild;if(A){const U=Ns(A);t.style.setProperty("--z-index",U.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=w8(o.listeners),w=o.listeners?JD(r,t,T,y):qL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function QT(e,t,n={}){const l=n,{defer:r}=l,o=Tn(l,["defer"]),a=r?Kt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(x8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var _8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function S8(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:xi.arrowSize.reference,height:xi.arrowSize.reference,[xi.arrowSizeHalf.variable]:`calc(${xi.arrowSize.reference} / 2)`,[xi.arrowOffset.variable]:`calc(${xi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?_8[t.split("-")[0]]:void 0,background:xi.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 Hs=new WeakMap,xc=new WeakMap,_c={},xp=0,JT=e=>e&&(e.host||JT(e.parentNode)),v8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=JT(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),A8=new Set(["script","output","status","next-route-announcer"]),C8=e=>A8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),k8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=v8(n,Array.isArray(e)?e:[e]);_c[r]||(_c[r]=new WeakMap);const l=_c[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&&an(y)&&cT(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(C8(w))return;const k=w.getAttribute(o)==="true",_=(Hs.get(w)||0)+1,C=(l.get(w)||0)+1;Hs.set(w,_),l.set(w,C),d.push(w),_===1&&k&&xc.set(w,!0),C===1&&w.setAttribute(r,""),k||w.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",w,S)}})};return T(n),f.clear(),xp++,()=>{d.forEach(y=>{const w=Hs.get(y)-1,S=l.get(y)-1;Hs.set(y,w),l.set(y,S),w||(xc.has(y)||y.removeAttribute(o),xc.delete(y)),S||y.removeAttribute(r)}),xp--,xp||(Hs=new WeakMap,Hs=new WeakMap,xc=new WeakMap,_c={})}},P8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,N8=(e,t=P8(e),n="data-aria-hidden",r=!0)=>{if(t)return k8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},O8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ZT(e,t={}){const{defer:n=!0}=t,r=n?O8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(N8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function I8(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 R8(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 ew="pointerdown.outside",tw="focus.outside";function L8(e){for(const t of e)if(an(t)&&Jr(t))return!0;return!1}var nw=e=>"clientY"in e;function D8(e,t){if(!nw(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 M8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function rw(e,t){if(!t||!nw(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 M8(u,l)?r||a:!1}function F8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Qr(e),f=ks(e),p=I8(f),m=R8(f);function T(A,H){if(!an(H)||!H.isConnected||Cs(e,H)||D8(e,A)||l&&lT(e,H))return!1;const U=d.querySelector(`[aria-controls="${e.id}"]`);if(U){const z=ip(U);if(rw(A,z))return!1}const L=ip(e);return rw(A,L)?!1:!(n!=null&&n(H))}const y=new Set,w=Mo(e==null?void 0:e.getRootNode());function S(A){function H(U){var de,q;const L=u&&!dT()?Kt:re=>re(),z=U!=null?U:A,Z=(q=(de=z==null?void 0:z.composedPath)==null?void 0:de.call(z))!=null?q:[z==null?void 0:z.target];L(()=>{const re=w?Z[0]:Or(A);if(!(!e||!T(A,re))){if(o||a){const fe=Gh(o,a);e.addEventListener(ew,fe,{once:!0})}iw(e,ew,{bubbles:!1,cancelable:!0,detail:{originalEvent:z,contextmenu:A5(z),focusable:L8(Z),target:re}})}})}A.pointerType==="touch"?(y.forEach(U=>U()),y.add(un(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const k=new Set,_=setTimeout(()=>{k.add(un(d,"pointerdown",S,!0)),k.add(m.addEventListener("pointerdown",S,!0)),k.add(p.addEventListener("pointerdown",S,!0))},0);function C(A){(u?Kt:U=>U())(()=>{var z,Z;const U=(Z=(z=A==null?void 0:A.composedPath)==null?void 0:z.call(A))!=null?Z:[A==null?void 0:A.target],L=w?U[0]:Or(A);if(!(!e||!T(A,L))){if(r||a){const de=Gh(r,a);e.addEventListener(tw,de,{once:!0})}iw(e,tw,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:Jr(L),target:L}})}})}return dT()||(k.add(un(d,"focusin",C,!0)),k.add(m.addEventListener("focusin",C,!0)),k.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(_),y.forEach(A=>A()),k.forEach(A=>A())}}function B8(e,t){const{defer:n}=t,r=n?Kt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(F8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function iw(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function U8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return un(Qr(e),"keydown",n,{capture:!0})}var ow="layer:request-dismiss",br={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=>Cs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Cs(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=>br.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];z8(e,ow,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),H8(e,ow,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function H8(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 z8(e,t,n){e.addEventListener(t,n,{once:!0})}var sw;function aw(){br.layers.forEach(({node:e})=>{e.style.pointerEvents=br.isBelowPointerBlockingLayer(e)?"none":"auto"})}function j8(e){e.style.pointerEvents=""}function $8(e,t){const n=Qr(e),r=[];return br.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(sw=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=X5(()=>{const l=o();return an(l)?l:null},{timeout:1e3});a.then(l=>r.push(lc(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{br.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=sw,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function V8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Kh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};br.add(f),aw();function p(S){var _,C;const k=Or(S.detail.originalEvent);br.isBelowPointerBlockingLayer(e)||br.isInBranch(k)||((_=t.onPointerDownOutside)==null||_.call(t,S),(C=t.onInteractOutside)==null||C.call(t,S),!S.defaultPrevented&&(l&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function m(S){var _,C;const k=Or(S.detail.originalEvent);br.isInBranch(k)||((_=t.onFocusOutside)==null||_.call(t,S),(C=t.onInteractOutside)==null||C.call(t,S),!S.defaultPrevented&&(l&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function T(S){var k;br.isTopMost(e)&&((k=t.onEscapeKeyDown)==null||k.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function y(S){var A;if(!e)return!1;const k=typeof u=="function"?u():u,_=Array.isArray(k)?k:[k],C=(A=t.persistentElements)==null?void 0:A.map(H=>H()).filter(an);return C&&_.push(...C),_.some(H=>Cs(H,S))||br.isInNestedLayer(e,S)}const w=[a?$8(e,t.persistentElements):void 0,U8(e,T),B8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{br.remove(e),aw(),j8(e),w.forEach(S=>S==null?void 0:S())}}function uw(e,t){const{defer:n}=t,r=n?Kt:a=>a(),o=[];return o.push(r(()=>{const a=vs(e)?e():e;o.push(V8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var q8=Object.defineProperty,Y8=(e,t,n)=>t in e?q8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,At=(e,t,n)=>Y8(e,typeof t!="symbol"?t+"":t,n),lw={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()}},W8=[],G8=class{constructor(e,t){At(this,"trapStack"),At(this,"config"),At(this,"doc"),At(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),At(this,"portalContainers",new Set),At(this,"listenerCleanups",[]),At(this,"handleFocus",r=>{const o=Or(r),a=this.findContainerIndex(o,r)>=0;if(a||oc(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(lu(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=>lu(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}),At(this,"handlePointerDown",r=>{const o=Or(r);if(!(this.findContainerIndex(o,r)>=0)){if(gu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}gu(this.config.allowOutsideClick,r)||r.preventDefault()}}),At(this,"handleClick",r=>{const o=Or(r);this.findContainerIndex(o,r)>=0||gu(this.config.clickOutsideDeactivates,r)||gu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),At(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;mu(r)&&r.preventDefault(),this.tryFocus(a)}}),At(this,"handleEscapeKey",r=>{X8(r)&&gu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),At(this,"_mutationObserver"),At(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(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 E5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?y5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),At(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),At(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Jr(r)){const o=Ps(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),At(this,"tryFocus",r=>{if(r!==!1&&r!==Ps(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,K8(r)&&r.select()}}),At(this,"deactivate",r=>{if(!this.state.active)return this;const o=F({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(),lw.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=()=>{cw(()=>{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}),At(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),At(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),At(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),At(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),At(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let 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}),At(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Or(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||Jr(u)&&!Fo(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=lu(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else mu(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||Jr(u)&&!Fo(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=lu(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else mu(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||W8;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return mu(r)&&!r.shiftKey},isKeyBackward(r){return mu(r)&&r.shiftKey}},t);this.doc=n.document||Qr(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=>{p5(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?lT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Os(e,{getShadowRoot:this.config.getShadowRoot}),n=yT(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(lu(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(Fo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Fo(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 lw.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?cw(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(un(this.doc,"focusin",this.handleFocus,!0),un(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),un(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),un(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),un(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),un(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=Ps(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},mu=e=>e.key==="Tab",gu=(e,...t)=>typeof e=="function"?e(...t):e,X8=e=>!e.isComposing&&e.key==="Escape",cw=e=>setTimeout(e,0),K8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function dw(e,t={}){let n;const r=Kt(()=>{const o=typeof e=="function"?e():e;if(o){n=new G8(o,Ee(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Qr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var _p="data-scroll-lock";function Q8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function fw(e){const t=Ns(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function hw(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(_p))return;const u=fw(r)||fw(o),l=n.innerWidth-r.clientWidth;o.setAttribute(_p,"");const d=()=>W5(r,"--scrollbar-width",`${l}px`),f=Q8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),lc(o,w)},m=()=>{var U,L;const{scrollX:w,scrollY:S,visualViewport:k}=n,_=(U=k==null?void 0:k.offsetLeft)!=null?U:0,C=(L=k==null?void 0:k.offsetTop)!=null?L:0,A={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(C))}px`,left:`${-(w-Math.floor(_))}px`,right:"0"};!u&&l>0&&(A[f]=`${l}px`);const H=lc(o,A);return()=>{H==null||H(),n.scrollTo({left:w,top:S,behavior:"instant"})}},T=[d(),sc()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(_p)}}var J8=Uo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),ri=J8.build(),pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},mw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},gw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},Z8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},vp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Ap=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},eM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Ew=e=>e.getById(pw(e)),zs=e=>e.getById(mw(e)),js=e=>e.getById(Sp(e)),yw=e=>e.getById(gw(e)),tM=e=>e.getById(vp(e)),nM=e=>e.getById(Ap(e));function rM(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=S8(Ee(F({},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(Ee(F({id:Z8(l)},ri.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(Ee(F({},ri.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(Ee(F({},ri.anchor.attrs),{dir:u("dir"),id:pw(l)}))},getTriggerProps(){return t.button(Ee(F({},ri.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:mw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Sp(l),onPointerDown(y){fT(y)&&S5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(Ee(F({},ri.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Ee(F({id:gw(l)},ri.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(Ee(F({},ri.content.attrs),{dir:u("dir"),id:Sp(l),tabIndex:-1,role:"dialog","aria-modal":sT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":As(d),"aria-labelledby":m.title?vp(l):void 0,"aria-describedby":m.description?Ap(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(Ee(F({},ri.title.attrs),{id:vp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(Ee(F({},ri.description.attrs),{id:Ap(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(Ee(F({},ri.closeTrigger.attrs),{dir:u("dir"),id:eM(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var iM={props({props:e}){return Ee(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({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=Ew(n))!=null?a:zs(n);return QT(r,()=>yw(n),Ee(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>js(n);let o=!0;return uw(r,{type:"popover",pointerBlocking:t("modal"),exclude:zs(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:q5(()=>js(t),{triggerElement:zs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?ZT(()=>[js(t),zs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return hw(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?dw(()=>js(t),{initialFocus:()=>bT({root:js(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=Ew(n))!=null?u:zs(n);QT(o,()=>yw(n),Ee(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Kt(()=>{Object.assign(e.get("renderedElements"),{title:!!tM(t),description:!!nM(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Kt(()=>{const n=bT({root:js(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||Kt(()=>{const a=zs(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})}}}};Ls()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[pz,Sc]=Bo({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[mz,Cp]=Bo({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),oM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,dir:r,getRootNode:n},e),a=dc(iM,o);return rM(a,ap)},sM=e=>{const[t,u]=kT(e),l=u,{children:n}=l,r=Tn(l,["children"]),o=oM(r),a=cp(ln({present:o.open},t));return x.jsx(sD,{value:o,children:x.jsx(vT,{value:a,children:n})})},bw=O.forwardRef((e,t)=>{const n=lp(),r=cu(),o=ln(Ee(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Fn.button,Ee(F({},o),{ref:t}))});bw.displayName="PopoverTrigger";function aM(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 uM(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 lM(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 cM(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 dM(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 fM(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 kp(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 Tw(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 hM=({className:e,componentType:t,children:n})=>{const[r,o]=O.useState(!1),{globalClassName:a}=Qe(),u=f=>{o(f.open)},l=O.useCallback(()=>{o(!1)},[]),d=O.useMemo(()=>({closeMenu:l}),[l]);return x.jsxs(sM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(bw,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(Tw,{"aria-hidden":"true"})}),x.jsx(CT,{children:x.jsx(AT,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Zb.Provider,{value:d,children:n})})})]})};function ww(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 xw(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[pM,jo]=Bo({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),_w=O.forwardRef((e,t)=>{const n=jo(),r=ln(n.getControlProps(),e);return x.jsx(Fn.div,Ee(F(F({},r),e),{ref:t}))});_w.displayName="CarouselControl";const Sw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["readOnly","index"]),o=jo(),a=ln(o.getIndicatorProps(n),r);return x.jsx(Fn.button,Ee(F({},a),{ref:t}))});Sw.displayName="CarouselIndicator";const vw=O.forwardRef((e,t)=>{const n=jo(),r=ln(n.getIndicatorGroupProps(),e);return x.jsx(Fn.div,Ee(F({},r),{ref:t}))});vw.displayName="CarouselIndicatorGroup";const Aw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["index","snapAlign"]),o=jo(),a=ln(o.getItemProps(n),r);return x.jsx(Fn.div,Ee(F({},a),{ref:t}))});Aw.displayName="CarouselItem";const Cw=O.forwardRef((e,t)=>{const n=jo(),r=ln(n.getItemGroupProps(),e);return x.jsx(Fn.div,Ee(F({},r),{ref:t}))});Cw.displayName="CarouselItemGroup";const kw=O.forwardRef((e,t)=>{const n=jo(),r=ln(n.getNextTriggerProps(),e);return x.jsx(Fn.button,Ee(F({},r),{ref:t}))});kw.displayName="CarouselNextTrigger";const Pw=O.forwardRef((e,t)=>{const n=jo(),r=ln(n.getPrevTriggerProps(),e);return x.jsx(Fn.button,Ee(F({},r),{ref:t}))});Pw.displayName="CarouselPrevTrigger";function mM(e){const t=Ns(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 gM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Nw(e){let t=[];for(const n of e.children)t=t.concat(n,Nw(n));return t}function Ow(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?Nw(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(!gM(n,m,u))continue;const T=Ns(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const S=a==="x"?w:y,k=m[l]-n[l]+e[f];switch(S){case"none":break;case"start":r[a].start.push({node:p,position:k});break;case"center":r[a].center.push({node:p,position:k+m[d]/2});break;case"end":r[a].end.push({node:p,position:k+m[d]});break}}}return r}function Iw(e){const t=e.getBoundingClientRect(),n=mM(e),r=Ow(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Rw([...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(Lw(0,o.x))),y:Rw([...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(Lw(0,o.y)))}}function EM(e,t,n){const r=Ow(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Rw=e=>[...new Set(e)],Lw=(e,t)=>n=>Math.max(e,Math.min(t,n)),yM=Uo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),_i=yM.build(),bM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},TM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},vc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},wM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},xM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},_M=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Dw=(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}`},Kn=e=>e.getById(vc(e)),Mw=e=>Y5(Kn(e),"[data-part=item]"),SM=(e,t)=>e.getById(Dw(e,t)),Fw=e=>{const t=Kn(e);if(!t)return;const n=Os(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function vM(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"),S=l("slidesPerPage"),k=l("padding"),_=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(Ee(F({},_i.root.attrs),{id:bM(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":S,"--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(Ee(F({},_i.itemGroup.attrs),{id:vc(u),"data-orientation":l("orientation"),"data-dragging":As(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){Cs(C.currentTarget,Or(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Cs(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!fT(C))return;const A=Or(C);Jr(A)&&A!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:YL(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"]:k,[T?"paddingInline":"paddingBlock"]:k,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const A=r.get("slidesInView").includes(C.index);return t.element(Ee(F({},_i.item.attrs),{id:TM(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":As(A),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":_.item(C.index,l("slideCount")),"aria-hidden":sT(!A),style:{scrollSnapAlign:(()=>{var Z;const H=(Z=C.snapAlign)!=null?Z:"start",U=l("slidesPerMove"),L=U==="auto"?Math.floor(l("slidesPerPage")):U;return(C.index+L)%L===0?H:void 0})()}}))},getControlProps(){return t.element(Ee(F({},_i.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(Ee(F({},_i.prevTrigger.attrs),{id:xM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":_.prevTrigger,"data-orientation":l("orientation"),"aria-controls":vc(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(Ee(F({},_i.nextTrigger.attrs),{dir:l("dir"),id:wM(u),type:"button","aria-label":_.nextTrigger,"data-orientation":l("orientation"),"aria-controls":vc(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(Ee(F({},_i.indicatorGroup.attrs),{dir:l("dir"),id:_M(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const A="indicator",H={ArrowDown(z){T||(a({type:"PAGE.NEXT",src:A}),z.preventDefault())},ArrowUp(z){T||(a({type:"PAGE.PREV",src:A}),z.preventDefault())},ArrowRight(z){T&&(a({type:"PAGE.NEXT",src:A}),z.preventDefault())},ArrowLeft(z){T&&(a({type:"PAGE.PREV",src:A}),z.preventDefault())},Home(z){a({type:"PAGE.SET",index:0,src:A}),z.preventDefault()},End(z){a({type:"PAGE.SET",index:y.length-1,src:A}),z.preventDefault()}},U=P5(C,{dir:l("dir"),orientation:l("orientation")}),L=H[U];L==null||L(C)}}))},getIndicatorProps(C){return t.button(Ee(F({},_i.indicator.attrs),{dir:l("dir"),id:Dw(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":As(C.readOnly),"data-current":As(C.index===w),"aria-label":_.indicator(C.index),onClick(A){A.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(Ee(F({},_i.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":As(d),"aria-label":d?_.autoplayStop:_.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var AM={props({props:e}){return JL(e,["slideCount"],"carousel"),Ee(F({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:F({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:CM(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 DL(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(Kn(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=Kn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Fw(e)});return Fw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Kn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Kt(()=>{o(),Kt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return Mw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Kn(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?NL(d,m):OL(d,m)},n.get("slidesInView"));n.set("slidesInView",IL(l))},{root:r,threshold:t("inViewThreshold")});return Mw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Kn(n);return r?un(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 un(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return $5(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 un(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=iT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Kn(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=Kn(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=tT(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=RL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Kn(r);if(!o)return;const a=EM(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=iT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Kn(n);if(!r)return;const o=Iw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Kn(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=Kn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Kn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Iw(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]);Kt(()=>{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=SM(n,e.get("page"));r&&Kt(()=>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 CM(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}Ls()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Ls()(["index","readOnly"]),Ls()(["index","snapAlign"]);const kM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,dir:r,getRootNode:n},e),a=dc(AM,o);return vM(a,ap)},Bw=O.forwardRef((e,t)=>{const[n,r]=du()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=kM(n),a=ln(o.getRootProps(),r);return x.jsx(pM,{value:o,children:x.jsx(Fn.div,Ee(F({},a),{ref:t}))})});Bw.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 NM(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 OM=180,IM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},RM=({globalClassName:e,className:t,itemMinWidth:n=OM,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})=>{var re,fe;const T=Array.from(m).map((pe,ee)=>({node:pe,key:O.isValidElement(pe)&&pe.key!=null?pe.key:`carousel-item-${ee}`})),y=T.length,w=O.useRef(null),[S,k]=O.useState(0),{width:_}=Ak();O.useLayoutEffect(()=>{w.current&&k(w.current.getBoundingClientRect().width)},[_,y]);const C=IM(r),A=n+C,H=S>0?(S+C)/A:1,U=Math.max(1,Math.floor(H)),L=St();if(y===0)return null;const z=y>U,Z=Math.ceil(y/U),de=z?Math.max(1,H):U,q=d==="circle-arrow";return x.jsxs(Bw,{ref:w,className:W(e,t,`${j}-carousel`,{[`${j}-carousel--circle-arrow-navigation`]:q}),slidesPerPage:de,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[x.jsx(Cw,{className:W(e,`${j}-carousel__item-group`,{"carousel-row-container":!z}),children:T.map(({node:pe,key:ee},ie)=>x.jsx(Aw,{index:ie,className:W(e,`${j}-carousel__item`),children:pe},ee))}),l&&z&&x.jsxs(_w,{className:W(e,`${j}-carousel__control`),children:[x.jsx(Pw,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":(re=L.carousel)==null?void 0:re.previousSlideAriaLabel,children:q?x.jsx(PM,{"aria-hidden":"true",size:"16px"}):x.jsx(lM,{"aria-hidden":"true",size:"16px"})}),x.jsx(kw,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":(fe=L.carousel)==null?void 0:fe.nextSlideAriaLabel,children:q?x.jsx(NM,{"aria-hidden":"true",size:"16px"}):x.jsx(cM,{"aria-hidden":"true",size:"16px"})})]}),u&&z&&x.jsx(vw,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:Z},(pe,ee)=>x.jsx(Sw,{index:ee,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${ee+1}`},ee))})]})},[LM,DM]=Bo({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),MM=e=>du()(e,["lazyMount","unmountOnExit"]),[FM,Ac]=Bo({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Uw=O.forwardRef((e,t)=>{const n=Ac(),r=DM(),o=cp(Ee(F({},r),{present:n.open})),a=ln(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Fn.div,Ee(F({},a),{ref:fc(o.ref,t)}))});Uw.displayName="DialogBackdrop";const Pp=O.forwardRef((e,t)=>{const n=Ac(),r=cu(),o=ln(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Fn.div,Ee(F({},o),{ref:fc(r.ref,t)}))});Pp.displayName="DialogContent";const Np=O.forwardRef((e,t)=>{const n=Ac(),r=ln(n.getPositionerProps(),e);return cu().unmounted?null:x.jsx(Fn.div,Ee(F({},r),{ref:t}))});Np.displayName="DialogPositioner";var BM=Uo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),$o=BM.build(),Hw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},zw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Op=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},jw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},$w=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Cc=e=>e.getById(Op(e)),UM=e=>e.getById(Hw(e)),HM=e=>e.getById(zw(e)),zM=e=>e.getById(jw(e)),jM=e=>e.getById(Ip(e)),$M=e=>e.getById(Rp(e)),VM=e=>e.getById($w(e));function qM(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(Ee(F({},$o.trigger.attrs),{dir:a("dir"),id:jw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Op(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(Ee(F({},$o.backdrop.attrs),{dir:a("dir"),hidden:!d,id:zw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(Ee(F({},$o.positioner.attrs),{dir:a("dir"),id:Hw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(Ee(F({},$o.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Op(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:Ip(u),"aria-describedby":f.description?Rp(u):void 0}))},getTitleProps(){return t.element(Ee(F({},$o.title.attrs),{dir:a("dir"),id:Ip(u)}))},getDescriptionProps(){return t.element(Ee(F({},$o.description.attrs),{dir:a("dir"),id:Rp(u)}))},getCloseTriggerProps(){return t.button(Ee(F({},$o.closeTrigger.attrs),{dir:a("dir"),id:$w(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var YM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>VM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return F({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 uw(()=>Cc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[zM(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 hw(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?dw(()=>Cc(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")?ZT(()=>[Cc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Kt(()=>{e.set("rendered",{title:!!jM(t),description:!!$M(t)})})},syncZIndex({scope:e}){Kt(()=>{const t=Cc(e);if(!t)return;const n=Ns(t);[UM(e),HM(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})}}}};Ls()(["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 WM=e=>{const t=O.useId(),{getRootNode:n}=Sc(),{dir:r}=Cp(),o=F({id:t,getRootNode:n,dir:r},e),a=dc(YM,o);return qM(a,ap)},Vw=e=>{const[t,l]=kT(e),d=l,{children:n}=d,r=Tn(d,["children"]),[o]=MM(t),a=WM(r),u=cp(ln({present:a.open},t));return x.jsx(FM,{value:a,children:x.jsx(LM,{value:o,children:x.jsx(vT,{value:u,children:n})})})},qw=O.forwardRef((e,t)=>{const n=Ac(),r=ln(n.getTitleProps(),e);return x.jsx(Fn.h2,Ee(F({},r),{ref:t}))});qw.displayName="DialogTitle";const GM=({children:e})=>{const t=O.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=O.useState(!1),u=O.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=O.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return x.jsx(Wh.Provider,{value:u,children:x.jsx(Jb.Provider,{value:l,children:e})})},Yw=()=>O.useContext(Jb),Ww=()=>{const e=O.useContext(Wh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},XM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Yw(),{closeMenu:a}=Ww(),{globalClassName:u}=Qe(),l=St(),d=O.useRef(null);return O.useEffect(()=>{var T;if(!n)return;const f=d.current;(T=f==null?void 0:f.querySelector("button:not(:disabled)"))==null||T.focus();const p=y=>{y.key==="Escape"&&(y.preventDefault(),y.stopPropagation(),a())},m=y=>{var S;const w=y.target;(S=document.getElementById(o))!=null&&S.contains(w)||d.current&&!d.current.contains(w)&&a()};return f==null||f.addEventListener("keydown",p),document.addEventListener("mousedown",m),()=>{f==null||f.removeEventListener("keydown",p),document.removeEventListener("mousedown",m)}},[n,a,o]),n?x.jsx("div",{ref:d,id:r,role:"group","aria-label":l.common.moreOptions,className:W(`${j}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},KM=({componentType:e,className:t})=>{const{toggleMenu:n}=Ww(),{isOpen:r,panelId:o,triggerId:a}=Yw(),{globalClassName:u}=Qe(),l=St();return x.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":bP(l.controls.overflowMenuAriaLabel,{componentType:e}),title:l.common.moreOptions,"aria-expanded":r,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:x.jsx(Tw,{"aria-hidden":"true"})})},Lp=()=>{const{status:e,entryType:t}=rr(),{messages:n}=qn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},QM=({componentType:e,isIcon:t})=>{var l,d;const{globalClassName:n}=Qe(),{previousComponentType:r}=rr(),o=Do(),a=St(),u=()=>{kl(r||"dialog"),o()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:(l=a.controls)==null?void 0:l.collapseAriaLabel,title:(d=a.controls)==null?void 0:d.collapseAriaLabel,onClick:u,icon:x.jsx(ww,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(ww,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},JM=({componentType:e,globalClassName:t,controls:n,additionalControls:r,showClose:o,closeButtonAriaLabel:a,onClose:u,showOverflowMenu:l,showPrimaryToggle:d})=>{const f=e==="modal"?QM:Xw;return x.jsxs("div",{className:W(t,`${j}-${e}-controls`),children:[r,n!=null?x.jsxs(x.Fragment,{children:[n,o&&x.jsx(Jf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]}):x.jsxs(x.Fragment,{children:[l&&x.jsx(KM,{componentType:e}),d&&x.jsx(f,{componentType:e,isIcon:!0}),o&&x.jsx(Jf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]})]})},ZM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),{isModalFullscreen:r}=rr(),o=Do(),a=St(),u=()=>{Hf(!r),o()},l=r?GP:XP,d=a.controls.toggleFullscreen;return t?x.jsx(yi,{ariaLabel:d,title:d,className:W(n,`${j}-modal-fullscreen-button`,`cim-${e}-component`),icon:x.jsx(l,{}),onClick:u}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-modal-fullscreen-button`,`cim-${e}-component`),onClick:u,children:[x.jsx(l,{"aria-hidden":"true"}),d]})},eF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=Qe(),{dialogPosition:r}=rr(),o=Do(),a=St(),u=r==="bottom-left",l=()=>{zf(u?"bottom-right":"bottom-left"),o()},d=u?uM:aM,f=u?a.controls.moveRight:a.controls.moveLeft;return t?x.jsx(yi,{className:W(n,`${j}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:f,title:f,onClick:l,icon:x.jsx(d,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-left-right-toggle-button`,`cim-${e}-component`),onClick:l,children:[x.jsx(d,{"aria-hidden":"true"}),f]})},tF=({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"?ZM:eF;return x.jsxs(XM,{componentType:e,children:[r&&x.jsx(m,{componentType:e}),o&&x.jsx(sF,{componentType:e}),a&&x.jsx(eT,{componentType:e,onClearChat:d}),u&&f&&x.jsx(rF,{componentType:e,onEndConversation:f}),l&&p&&x.jsx(nF,{componentType:e,onDownloadTranscript:p})]})},Gw=({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}=Qe(),{mode:S}=rr(),k=S==="standalone",_=e==="modal",C=pe=>n===void 0||n[pe],A=(pe,ee=!0)=>t.includes(pe)&&C(pe)&&ee,H=C("toggleExpanded"),U=A(_?"toggleFullscreen":"toggleDialogPosition"),L=A("minimize"),z=A("clearChat"),Z=C("close"),de=A("endConversation",!!d),q=A("downloadTranscript",!!p),re=U||L||z||de||q,fe=O.useMemo(()=>{if(!m)return{};const pe=$P(m);if(!(w!=null&&w[`${rt}-header-text-font-size`]))return pe;const ee={"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(ee).filter(([,ie])=>ie!=null&&ie!=="").map(([ie])=>[`${rt}-${ie}`,pe[`${rt}-${ie}`]]))},[m,w]);return x.jsx(GM,{children:x.jsxs("div",{className:W(T,`${j}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[x.jsxs("div",{className:W(T,`${j}-${e}-header`,{standalone:k,embedded:!k}),style:fe,children:[a!=null?a:m!=null&&m.logoUrl?x.jsx("img",{alt:"",className:W(T,`${j}-${e}-logo`,{standalone:k,embedded:!k}),src:m.logoUrl}):(y==null?void 0:y.logoFallback)==="sparkle"?x.jsx("svg",{className:W(T,`${j}-${e}-logo`,{standalone:k,embedded:!k}),"aria-hidden":"true",viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:x.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,x.jsx(qw,{className:W(T,`${j}-${e}-title`,{standalone:k,embedded:!k}),children:u!=null?u:m==null?void 0:m.headerText}),x.jsx(JM,{componentType:e,globalClassName:T,controls:r,additionalControls:o,showClose:Z,closeButtonAriaLabel:m==null?void 0:m.closeButtonAriaLabel,onClose:f,showOverflowMenu:re,showPrimaryToggle:H})]}),x.jsx(tF,{componentType:e,controls:r,showOverflowMenu:re,showSecondaryToggle:U,showMinimize:L,showClearChat:z,showEndConversation:de,showDownloadTranscript:q,onClearChat:l,onEndConversation:d,onDownloadTranscript:p})]})})},nF=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=Qe(),r=Do(),[o,a]=O.useState(!1),u=St(),l=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(d){n==null||n.error("Error downloading transcript:",d)}finally{a(!1)}}});return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:l,disabled:o,children:[x.jsx(CL,{"aria-hidden":"true"}),u.controls.downloadTranscript]})},rF=({onEndConversation:e,componentType:t})=>{const n=Do(),r=St(),o=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:o,children:[x.jsx(KP,{"aria-hidden":"true"}),r.controls.endConversation]})},iF={sparkle:kp,plus:dM,"paper-plane":fM},Dp=({icon:e,className:t})=>{const n=iF[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},oF=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=Qe(),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=>x.jsxs(x.Fragment,{children:[l&&x.jsx(Dp,{icon:l,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:w})]});return x.jsx("div",{className:W(t,`${j}-suggestion-container ${f}`,e),children:n.map(w=>o?x.jsx(Il,{disabled:r,className:W(t,`${j}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):x.jsx("button",{disabled:r,className:W(t,`${j}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},sF=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=Qe(),o=St();if(!r)return null;const a=()=>{gi(!1),Ra(!0),Qf()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:o.controls.toggleMinimizeAriaLabel,title:o.controls.minimize,onClick:a,icon:x.jsx(EE,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(EE,{"aria-hidden":"true"}),o.controls.minimize]})},Xw=({componentType:e,isIcon:t})=>{var u,l;const{globalClassName:n}=Qe(),r=Do(),o=St(),a=()=>{kl("modal"),r()};return t?x.jsx(yi,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:(u=o.controls)==null?void 0:u.expandAriaLabel,title:(l=o.controls)==null?void 0:l.expandAriaLabel,onClick:a,icon:x.jsx(xw,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(xw,{"aria-hidden":"true"}),"Show modal"]})},aF=({isWidgetStandalone:e})=>{var k,_;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=Qe(),{askCimPrompts:l,messages:d}=qn(),{isLoading:f,handleAskCim:p}=Wr(),m=o==null?void 0:o.icon,T=(k=o==null?void 0:o.iconPosition)!=null?k:"left",y=O.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(H=>H.name==="conversation_reset")&&r||C},[d,n,r]),w=O.useMemo(()=>{var A,H;const C=((H=(A=l.message)==null?void 0:A.suggestions)!=null?H:[]).map(U=>U.displayText.trim()).filter(Boolean);return r0(C,a||[],u)},[(_=l.message)==null?void 0:_.suggestions,a,u]),S=C=>()=>{p({userPrompt:C})};return x.jsxs("div",{className:W(t,`${j}-ask-cim-entry-message`,`${j}-message-group`,e?"standalone":"embedded"),children:[x.jsx("p",{className:W(t,`${j}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&x.jsx("div",{className:W(t,`${j}-ask-cim-suggestions-container`,`${j}-suggestion-container`,e?"standalone":"embedded"),children:w.map(C=>x.jsxs(Il,{disabled:f,className:W(t,`${j}-ask-cim-suggestion-button`,`${j}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:S(C),children:[m&&x.jsx(Dp,{icon:m,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:C})]},C))})]})};function uF(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function lF(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function Mp({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!uF(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!lF(o)||r(o,e)}const cF=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=Qe();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=>Mp({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return x.jsxs("div",{className:W(r,`${j}-product-tile`,{embedded:!e,standalone:e}),children:[T?x.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:x.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):x.jsx("img",{className:W(r,`${j}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),x.jsxs("div",{className:W(r,`${j}-product-tile-details`,{embedded:!e,standalone:e}),children:[x.jsxs("div",{className:W(r,`${j}-product-tile-content`),children:[l&&x.jsx("p",{className:`${j}-product-tile-brand`,children:l}),T?x.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${j}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",x.jsx("span",{className:W(r,`${j}-product-tile-pdp-arrow`),children:"→"})]}):x.jsx("p",{className:W(r,`${j}-product-tile-name`),title:u,children:u})]}),x.jsx("div",{className:W(r,`${j}-product-tile-footer`),children:x.jsx("p",{className:W(r,`${j}-product-tile-price`),children:d})})]})]})},dF=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=Qe(),u=t;return n?x.jsxs("div",{className:W(r,`${j}-display-products`),children:[x.jsx("p",{children:u.message}),u.products&&u.products.length>0&&x.jsx(RM,{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 x.jsx(cF,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},fF=({globalClassName:e,message:t,isWidgetStandalone:n})=>x.jsx("div",{className:W(e,`${j}-error-message`,{standalone:n,embedded:!n}),children:x.jsxs("p",{className:W(e,`${j}-error-message-text`,{standalone:n,embedded:!n}),children:[x.jsx(qP,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),hF=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Wr(),{messages:u}=qn(),l=u.find(S=>S.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Gv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=S=>{const k=n.suggestions.find(_=>_.displayText===S);k&&o(k,n.eventSourceId||n.id)};return x.jsxs("div",{className:W(e,`${j}-follow-up`),children:[x.jsx("p",{className:W(e,`${j}-text`),children:n.message}),x.jsx(oF,{suggestions:n.suggestions.map(S=>S.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Kw(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 pF(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mF(e,t,n){const o=$l((n||{}).ignore||[]),a=gF(t);let u=-1;for(;++u<a.length;)Oy(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 k=m.children.indexOf(f);let _=!1,C=[];T.lastIndex=0;let A=T.exec(f.value);for(;A;){const H=A.index,U={index:A.index,input:A.input,stack:[...p,f]};let L=y(...A,U);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?T.lastIndex=H+1:(w!==H&&C.push({type:"text",value:f.value.slice(w,H)}),Array.isArray(L)?C.push(...L):L&&C.push(L),w=H+A[0].length,_=!0),!T.global)break;A=T.exec(f.value)}return _?(w<f.value.length&&C.push({type:"text",value:f.value.slice(w)}),m.children.splice(k,1,...C)):C=[f],k+C.length}}function gF(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([EF(o[0]),yF(o[1])])}return t}function EF(e){return typeof e=="string"?new RegExp(pF(e),"g"):e}function yF(e){return typeof e=="function"?e:function(){return e}}const Fp="phrasing",Bp=["autolink","link","image","label"];function bF(){return{transforms:[AF],enter:{literalAutolink:wF,literalAutolinkEmail:Up,literalAutolinkHttp:Up,literalAutolinkWww:Up},exit:{literalAutolink:vF,literalAutolinkEmail:SF,literalAutolinkHttp:xF,literalAutolinkWww:_F}}}function TF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fp,notInConstruct:Bp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fp,notInConstruct:Bp},{character:":",before:"[ps]",after:"\\/",inConstruct:Fp,notInConstruct:Bp}]}}function wF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Up(e){this.config.enter.autolinkProtocol.call(this,e)}function xF(e){this.config.exit.autolinkProtocol.call(this,e)}function _F(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 SF(e){this.config.exit.autolinkEmail.call(this,e)}function vF(e){this.exit(e)}function AF(e){mF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,CF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),kF]],{ignore:["link","linkReference"]})}function CF(e,t,n,r,o){let a="";if(!Qw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!PF(n)))return!1;const u=NF(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 kF(e,t,n,r){return!Qw(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 NF(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=Kw(e,"(");let a=Kw(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 Qw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||ko(n)||Ml(n))&&(!t||n!==47)}Jw.peek=UF;function OF(){this.buffer()}function IF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RF(){this.buffer()}function LF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MF(e){this.exit(e)}function FF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BF(e){this.exit(e)}function UF(){return"["}function Jw(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 HF(){return{enter:{gfmFootnoteCallString:OF,gfmFootnoteCall:IF,gfmFootnoteDefinitionLabelString:RF,gfmFootnoteDefinition:LF},exit:{gfmFootnoteCallString:DF,gfmFootnoteCall:MF,gfmFootnoteDefinitionLabelString:FF,gfmFootnoteDefinition:BF}}}function zF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Jw},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?Zw:jF))),f(),d}}function jF(e,t,n){return t===0?e:Zw(e,t,n)}function Zw(e,t,n){return(n?"":" ")+e}const $F=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ex.peek=GF;function VF(){return{canContainEols:["delete"],enter:{strikethrough:YF},exit:{strikethrough:WF}}}function qF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$F}],handlers:{delete:ex}}}function YF(e){this.enter({type:"delete",children:[]},e)}function WF(e){this.exit(e)}function ex(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,Ee(F({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function GF(){return"~"}function XF(e){return e.length}function KF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||XF,a=[],u=[],l=[],d=[];let f=0,p=-1;for(;++p<e.length;){const S=[],k=[];let _=-1;for(e[p].length>f&&(f=e[p].length);++_<e[p].length;){const C=QF(e[p][_]);if(n.alignDelimiters!==!1){const A=o(C);k[_]=A,(d[_]===void 0||A>d[_])&&(d[_]=A)}S.push(C)}u[p]=S,l[p]=k}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=tx(r[m]);else{const S=tx(r);for(;++m<f;)a[m]=S}m=-1;const T=[],y=[];for(;++m<f;){const S=a[m];let k="",_="";S===99?(k=":",_=":"):S===108?k=":":S===114&&(_=":");let C=n.alignDelimiters===!1?1:Math.max(1,d[m]-k.length-_.length);const A=k+"-".repeat(C)+_;n.alignDelimiters!==!1&&(C=k.length+C+_.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 S=u[p],k=l[p];m=-1;const _=[];for(;++m<f;){const C=S[m]||"";let A="",H="";if(n.alignDelimiters!==!1){const U=d[m]-(k[m]||0),L=a[m];L===114?A=" ".repeat(U):L===99?U%2?(A=" ".repeat(U/2+.5),H=" ".repeat(U/2-.5)):(A=" ".repeat(U/2),H=A):H=" ".repeat(U)}n.delimiterStart!==!1&&!m&&_.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&C==="")&&(n.delimiterStart!==!1||m)&&_.push(" "),n.alignDelimiters!==!1&&_.push(A),_.push(C),n.alignDelimiters!==!1&&_.push(H),n.padding!==!1&&_.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&_.push("|")}w.push(n.delimiterEnd===!1?_.join("").replace(/ +$/,""):_.join(""))}return w.join(`
33
33
  `)}function QF(e){return e==null?"":String(e)}function tx(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 JF(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()),ZF);return o(),u}function ZF(e,t,n){return">"+(n?"":" ")+e}function e9(e,t){return nx(e,t.inConstruct,!0)&&!nx(e,t.notInConstruct,!1)}function nx(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 rx(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
34
34
  `&&e9(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
35
35
  `}function t9(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 n9(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 r9(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 i9(e,t,n,r){const o=r9(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(n9(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,o9);return m(),T}const l=n.createTracker(r),d=o.repeat(Math.max(t9(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,F({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,F({before:p,after:`
36
36
  `,encode:["`"]},l.current()))),m()}return p+=l.move(`
37
37
  `),a&&(p+=l.move(a+`
38
38
  `)),p+=l.move(d),f(),p}function o9(e,t,n){return(n?"":" ")+e}function Hp(e){const t=e.options.quote||'"';if(t!=='"'&&t!=="'")throw new Error("Cannot serialize title with `"+t+"` for `options.quote`, expected `\"`, or `'`");return t}function s9(e,t,n,r){const o=Hp(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let l=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),F({before:f,after:"]"},d.current()))),f+=d.move("]: "),l(),!e.url||/[\0- \u007F]/.test(e.url)?(l=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,F({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
39
- `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),l()),u(),f}function a9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Eu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kc(e,t,n){const r=bs(e),o=bs(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ix.peek=u9;function ix(e,t,n,r){const o=a9(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(o);let d=u.move(n.containerPhrasing(e,F({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=kc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Eu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=kc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+Eu(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function u9(e,t,n){return n.options.emphasis||"*"}function l9(e,t){let n=!1;return ql(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Th}),!!((!e.depth||e.depth<3)&&lh(e)&&(t.options.setext||n))}function c9(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(l9(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,ge(F({},a.current()),{before:`
39
+ `},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,F({before:f,after:o},d.current()))),f+=d.move(o),l()),u(),f}function a9(e){const t=e.options.emphasis||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize emphasis with `"+t+"` for `options.emphasis`, expected `*`, or `_`");return t}function Eu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function kc(e,t,n){const r=bs(e),o=bs(t);return r===void 0?o===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:o===void 0?{inside:!1,outside:!1}:o===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}ix.peek=u9;function ix(e,t,n,r){const o=a9(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(o);let d=u.move(n.containerPhrasing(e,F({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=kc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Eu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=kc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+Eu(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function u9(e,t,n){return n.options.emphasis||"*"}function l9(e,t){let n=!1;return ql(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Th}),!!((!e.depth||e.depth<3)&&lh(e)&&(t.options.setext||n))}function c9(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(l9(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,Ee(F({},a.current()),{before:`
40
40
  `,after:`
41
41
  `}));return m(),p(),T+`
42
42
  `+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
43
43
  `))+1))}const u="#".repeat(o),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
44
44
  `},a.current()));return/^[\t ]/.test(f)&&(f=Eu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}ox.peek=d9;function ox(e){return e.value||""}function d9(){return"<"}sx.peek=f9;function sx(e,t,n,r){const o=Hp(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,F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({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,F({before:f,after:o},d.current()))),f+=d.move(o),l()),f+=d.move(")"),u(),f}function f9(){return"!"}ax.peek=h9;function ax(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,F({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),F({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 h9(){return"!"}ux.peek=p9;function ux(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 p9(){return"`"}function lx(e,t){const n=lh(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))}cx.peek=m9;function cx(e,t,n,r){const o=Hp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(lx(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({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,F({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,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({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,F({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),l(),f}function m9(e,t,n){return lx(e,n)?"<":"["}dx.peek=g9;function dx(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,F({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),F({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 g9(){return"["}function zp(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 E9(e){const t=zp(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 y9(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 fx(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 b9(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?y9(n):zp(n);const l=e.ordered?u==="."?")":".":E9(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),fx(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 T9(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 w9(e,t,n,r){const o=T9(n);let a=n.bulletCurrent||zp(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 x9(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const _9=$l(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function S9(e,t,n,r){return(e.children.some(function(u){return _9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function v9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}hx.peek=A9;function hx(e,t,n,r){const o=v9(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(o+o);let d=u.move(n.containerPhrasing(e,F({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=kc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Eu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=kc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+Eu(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function A9(e,t,n){return n.options.strong||"*"}function C9(e,t,n,r){return n.safe(e.value,r)}function k9(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=(fx(n)+(n.options.ruleSpaces?" ":"")).repeat(k9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const px={blockquote:JF,break:rx,code:i9,definition:s9,emphasis:ix,hardBreak:rx,heading:c9,html:ox,image:sx,imageReference:ax,inlineCode:ux,link:cx,linkReference:dx,list:b9,listItem:w9,paragraph:x9,root:S9,strong:hx,text:C9,thematicBreak:P9};function N9(){return{enter:{table:O9,tableData:mx,tableHeader:mx,tableRow:R9},exit:{codeText:L9,table:I9,tableData:jp,tableHeader:jp,tableRow:jp}}}function O9(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 I9(e){this.exit(e),this.data.inTable=void 0}function R9(e){this.enter({type:"tableRow",children:[]},e)}function jp(e){this.exit(e)}function mx(e){this.enter({type:"tableCell",children:[]},e)}function L9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,D9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function D9(e,t){return t==="|"?t:e}function M9(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,P){return f(p(y,v,P),y.align)}function l(y,w,v,P){const _=m(y,v,P),C=f([_]);return C.slice(0,C.indexOf(`
46
- `))}function d(y,w,v,P){const _=v.enter("tableCell"),C=v.enter("phrasing"),A=v.containerPhrasing(y,ge(F({},P),{before:a,after:a}));return C(),_(),A}function f(y,w){return KF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const P=y.children;let _=-1;const C=[],A=w.enter("table");for(;++_<P.length;)C[_]=m(P[_],w,v);return A(),C}function m(y,w,v){const P=y.children;let _=-1;const C=[],A=w.enter("tableRow");for(;++_<P.length;)C[_]=d(P[_],y,w,v);return A(),C}function T(y,w,v){let P=px.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function F9(){return{exit:{taskListCheckValueChecked:gx,taskListCheckValueUnchecked:gx,paragraph:U9}}}function B9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:H9}}}function gx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function U9(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 H9(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=px.listItem(e,t,n,F(F({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function z9(){return[bF(),HF(),VF(),N9(),F9()]}function j9(e){return{extensions:[TF(),zF(e),qF(),M9(e),B9()]}}const $9={tokenize:X9,partial:!0},Ex={tokenize:K9,partial:!0},yx={tokenize:Q9,partial:!0},bx={tokenize:J9,partial:!0},V9={tokenize:Z9,partial:!0},Tx={name:"wwwAutolink",tokenize:W9,previous:xx},wx={name:"protocolAutolink",tokenize:G9,previous:_x},Si={name:"emailAutolink",tokenize:Y9,previous:Sx},ii={};function q9(){return{text:ii}}let Vo=48;for(;Vo<123;)ii[Vo]=Si,Vo++,Vo===58?Vo=65:Vo===91&&(Vo=97);ii[43]=Si,ii[45]=Si,ii[46]=Si,ii[95]=Si,ii[72]=[Si,wx],ii[104]=[Si,wx],ii[87]=[Si,Tx],ii[119]=[Si,Tx];function Y9(e,t,n){const r=this;let o,a;return u;function u(m){return!$p(m)||!Sx.call(r,r.previous)||Vp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return $p(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(V9,p,f)(m):m===45||m===95||vn(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&&Dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function W9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!xx.call(r,r.previous)||Vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($9,e.attempt(Ex,e.attempt(yx,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function G9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&_x.call(r,r.previous)&&!Vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Dn(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||Dl(m)||mt(m)||ko(m)||Ml(m)?n(m):e.attempt(Ex,e.attempt(yx,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function X9(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 K9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(bx,d,l)(f):f===null||mt(f)||ko(f)||f!==45&&Ml(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 Q9(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(bx,t,a)(u):u===null||mt(u)||ko(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function J9(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)||ko(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||ko(l)?t(l):r(l)}function a(l){return Dn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Dn(l)?(e.consume(l),u):n(l)}}function Z9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return vn(a)?n(a):t(a)}}function xx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function _x(e){return!Dn(e)}function Sx(e){return!(e===47||$p(e))}function $p(e){return e===43||e===45||e===46||e===95||vn(e)}function Vp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const eB={tokenize:uB,partial:!0};function tB(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oB,continuation:{tokenize:sB},exit:aB}},text:{91:{name:"gfmFootnoteCall",tokenize:iB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nB,resolveTo:rB}}}}function nB(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=Pr(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 rB(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 iB(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(Pr(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 oB(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=Pr(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 sB(e,t,n){return e.check(Va,t,e.attempt(eB,t,n))}function aB(e){e.exit("gfmFootnoteDefinition")}function uB(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 lB(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&&or(T,T.length,0,Fl(y,u.slice(f+1,d),l)),or(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),or(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=bs(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const P=u.exit("strikethroughSequenceTemporary"),_=bs(w);return P._open=!_||_===2&&!!v,P._close=!v||v===2&&!!_,l(w)}}}class cB{constructor(){this.map=[]}add(t,n,r){dB(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 dB(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 fB(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 hB(){return{flow:{null:{name:"table",tokenize:pB,resolveAll:mB}}}}function pB(e,t,n){const r=this;let o=0,a=0,u;return l;function l(q){let re=r.events.length-1;for(;re>-1;){const te=r.events[re][1].type;if(te==="lineEnding"||te==="linePrefix")re--;else break}const de=re>-1?r.events[re][1].type:null,ye=de==="tableHead"||de==="tableRow"?L:d;return ye===L&&r.parser.lazy[r.now().line]?n(q):ye(q)}function d(q){return e.enter("tableHead"),e.enter("tableRow"),f(q)}function f(q){return q===124||(u=!0,a+=1),p(q)}function p(q){return q===null?n(q):He(q)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),y):n(q):Ze(q)?it(e,p,"whitespace")(q):(a+=1,u&&(u=!1,o+=1),q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(q)))}function m(q){return q===null||q===124||mt(q)?(e.exit("data"),p(q)):(e.consume(q),q===92?T:m)}function T(q){return q===92||q===124?(e.consume(q),m):m(q)}function y(q){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(q):(e.enter("tableDelimiterRow"),u=!1,Ze(q)?it(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):w(q))}function w(q){return q===45||q===58?P(q):q===124?(u=!0,e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),v):U(q)}function v(q){return Ze(q)?it(e,P,"whitespace")(q):P(q)}function P(q){return q===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),_):q===45?(a+=1,_(q)):q===null||He(q)?H(q):U(q)}function _(q){return q===45?(e.enter("tableDelimiterFiller"),C(q)):U(q)}function C(q){return q===45?(e.consume(q),C):q===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(q))}function A(q){return Ze(q)?it(e,H,"whitespace")(q):H(q)}function H(q){return q===124?w(q):q===null||He(q)?!u||o!==a?U(q):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(q)):U(q)}function U(q){return n(q)}function L(q){return e.enter("tableRow"),z(q)}function z(q){return q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),z):q===null||He(q)?(e.exit("tableRow"),t(q)):Ze(q)?it(e,z,"whitespace")(q):(e.enter("data"),ee(q))}function ee(q){return q===null||q===124||mt(q)?(e.exit("data"),z(q)):(e.consume(q),q===92?he:ee)}function he(q){return q===92||q===124?(e.consume(q),ee):ee(q)}}function mB(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 cB;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(vx(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=Pc(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=Pc(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=Pc(T,t,a,o,n,m)):u[1]!==0&&(m=Pc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&vx(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=fB(t.events,n))}return e}function Pc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},$s(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=$s(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=$s(t.events,n[2]),p=$s(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({},$s(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function vx(e,t,n,r,o){const a=[],u=$s(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 $s(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gB={name:"tasklistCheck",tokenize:yB};function EB(){return{text:{91:gB}}}function yB(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 He(d)?t(d):Ze(d)?e.check({tokenize:bB},t,n)(d):n(d)}}function bB(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function TB(e){return QE([q9(),tB(),lB(e),hB(),EB()])}const wB={};function xB(e){const t=this,n=e||wB,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(TB(n)),a.push(z9()),u.push(j9(n))}const Nc=()=>x.jsx("span",{className:`${j}-blinking-cursor`,children:x.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function _B(e){return/^tel:/i.test(e)?e:$y(e)}const qp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>x.jsx("div",{className:W(e,`${j}-markdown`),children:x.jsx(jy,{remarkPlugins:[xB],rehypePlugins:[Vb],urlTransform:_B,components:{h1:({children:a})=>x.jsx("h1",{className:W(e,`${j}-header h1`),children:a}),h2:({children:a})=>x.jsx("h2",{className:W(e,`${j}-header h2`),children:a}),h3:({children:a})=>x.jsx("h3",{className:W(e,`${j}-header h3`),children:a}),ul:({children:a})=>x.jsx("ul",{className:W(e,`${j}-ul`),children:a}),ol:({children:a})=>x.jsx("ol",{className:W(e,`${j}-ol`),children:a}),li:({children:a})=>x.jsx("li",{className:W(e,`${j}-li`),children:a}),a:({href:a,children:u})=>x.jsx(Qb,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>x.jsx("div",{className:W(e,`${j}-table-container`),children:x.jsx("table",{className:W(e,`${j}-table`),children:a})}),thead:({children:a})=>x.jsx("thead",{className:W(e,`${j}-thead`),children:a}),tbody:({children:a})=>x.jsx("tbody",{className:W(e,`${j}-tbody`),children:a}),tr:({children:a})=>x.jsx("tr",{className:W(e,`${j}-tr`),children:a}),th:({children:a})=>x.jsx("th",{className:W(e,`${j}-th`),children:a}),td:({children:a})=>x.jsx("td",{className:W(e,`${j}-td`),children:a}),span:({className:a,children:u})=>a===`${j}-blinking-cursor`?x.jsx(Nc,{}):x.jsx("span",{children:u})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")})}),SB=({globalClassName:e,message:t})=>{const[n,r]=O.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${j}-progress-message`,"standalone"),children:[x.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:x.jsx(gE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(Il,{className:W(e,`${j}-thought-context-button`),onClick:l,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(YP,{"aria-hidden":"true"})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(WP,{"aria-hidden":"true"})]})}),n&&x.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&x.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},vB=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(SB,{globalClassName:e,message:t}):x.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:x.jsx(gE,{"aria-hidden":"true"})}),x.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),AB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return x.jsxs("div",{className:W(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(qp,{text:t.message})]})},Ax=e=>{var d,f;const{configModule:t}=Qe(),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}},Oc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),Cx=({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 x.jsxs("div",{className:W(e,`${j}-facets`),children:[x.jsx("p",{className:W(e,`${j}-facet-category`),children:l}),x.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},l)})},yu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),CB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=Ax(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?x.jsxs("div",{className:W(e,`${j}-user-message standalone`),children:[x.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[d?x.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:x.jsx(yE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(Oc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(Cx,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(yu,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):x.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[x.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[d?x.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:x.jsx(yE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&x.jsx(Oc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(yu,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},kB=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>x.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?x.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&x.jsx(Oc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),x.jsx(Cx,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(yu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),PB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=Ax(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}=O.useMemo(()=>{var v,P,_;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(P=r==null?void 0:r.clientContext)==null?void 0:P.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:(_=r==null?void 0:r.browseParams)==null?void 0:_.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?x.jsx(kB,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):x.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[x.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?x.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold embedded`),children:T||m}),u.length>0&&x.jsx(Oc,{isWidgetStandalone:!1,filterCount:l})]}),x.jsx(yu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},kx=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Wr(),{onNavigate:f}=Qe(),p=v=>Mp({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?x.jsx(CB,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(PB,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(AB,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(hF,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(qp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return x.jsx(fF,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(dF,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(vB,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:W(t,`${j}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},NB=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=Qe(),{groupedMessages:a}=Vn(),{entryType:u}=rr();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(aF,{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()),x.jsxs("div",{className:W(n,`${j}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>x.jsx("div",{className:`${j}-message-group-child`,children:x.jsx(kx,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(yu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return x.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:x.jsx(kx,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},OB=4e3,IB=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,OB),RB=({message:e,announcementKey:t})=>{const[n,r]=O.useState("");return O.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),x.jsx("span",{className:`${j}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},LB=()=>{const{groupedMessages:e}=Vn(),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 x.jsx(RB,{message:n?IB(n.message):"",announcementKey:n==null?void 0:n.id})},DB=({isOpen:e}={})=>{const{messages:t}=Wr(),{autoScroll:n}=Qe(),r=O.useRef(null);return O.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),O.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},MB={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Yp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=DB({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(NB,{isWidgetStandalone:t,handleSuggestionClick:r}),x.jsx(LB,{}),n&&x.jsx("div",{style:F(F({},MB),o),children:x.jsx(Nc,{})}),x.jsx("div",{ref:a})]})},Px=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=Qe(),{copilot:o,isLoading:a,isConnecting:u,isConnectionSlow:l,pendingInput:d,inputError:f,handleUserInput:p,prepareUserInput:m,handleSuggestion:T,resetConversation:y}=Wr(),w=Yf();return Lp()?o?x.jsxs("div",{className:W(t,`${j}-container`,`${j}-embedded-chat`,e),style:n,lang:w,children:[x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:x.jsx(Yp,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:T})}),x.jsx(Yh,{componentType:"chat",className:"embedded-chat",isLoading:a,isConnecting:u,isConnectionSlow:l,pendingInput:d,inputError:f,onSubmit:p,prepareSubmit:m}),x.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:x.jsxs(hM,{componentType:"chat",children:[x.jsx(Xw,{componentType:"chat"}),x.jsx(eT,{componentType:"chat",onClearChat:y})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},Nx=e=>{var d;const{children:t,disabled:n}=e,[r,o]=O.useState((d=e.container)==null?void 0:d.current),a=O.useSyncExternalStore(BB,()=>!1,()=>!0),{getRootNode:u}=Sc();if(O.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const l=r!=null?r:FB(u);return x.jsx(x.Fragment,{children:O.Children.map(t,f=>vo.createPortal(f,l))})},FB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Mo(n)?n:Qr(t).body},BB=()=>()=>{},UB=["toggleDialogPosition","minimize","clearChat"],HB=["toggleFullscreen","minimize","clearChat"],Ox=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=Qe(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=rr(),p=Yf(),{copilot:m,isLoading:T,isConnecting:y,isConnectionSlow:w,pendingInput:v,inputError:P,handleUserInput:_,prepareUserInput:C,handleSuggestion:A,resetConversation:H}=Wr(),U=Lp(),{isOpen:L}=u||{},z=a==="standalone",ee=()=>{gi(!1),Qf()};return m?x.jsx(Vw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:U,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Kf,children:x.jsx(Nx,{children:x.jsx(Np,{className:W(t,`${j}-dialog-positioner`),style:n,children:x.jsxs(Pp,{className:W(t,`${j}-container`,`${j}-dialog`,`${j}-dialog-content`,e,l,d&&"full-height",{standalone:z,embedded:!z}),style:f?{width:f}:void 0,lang:p,children:[x.jsx(Gw,{componentType:"dialog",overflowActions:UB,onClearChat:H,onClose:ee}),x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,{standalone:z,embedded:!z}),role:"region","aria-label":"Conversation",children:x.jsx(Yp,{isWidgetStandalone:z,isLoading:T,isOpen:L,handleSuggestionClick:A})}),x.jsx(Yh,{componentType:"dialog",isLoading:T,isConnecting:y,isConnectionSlow:w,pendingInput:v,inputError:P,onSubmit:_,prepareSubmit:C})]})})})}):x.jsx("div",{children:"Loading Copilot..."})},Ix=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=Qe(),{mode:a,status:u,isModalFullscreen:l}=rr(),{copilot:d,isLoading:f,isConnecting:p,isConnectionSlow:m,pendingInput:T,inputError:y,handleUserInput:w,prepareUserInput:v,handleSuggestion:P,resetConversation:_}=Wr(),{isOpen:C}=u||{},A=a==="standalone",H=Yf(),U=Lp(),L=({open:ee})=>{if(ee){gi(!0);return}z()},z=()=>{gi(!1),Qf()};return U?d?x.jsx(Vw,{lazyMount:!0,unmountOnExit:!0,open:U,"aria-label":o==null?void 0:o.headerText,onOpenChange:L,initialFocusEl:Kf,children:x.jsx(Nx,{children:x.jsxs("div",{className:W(t,`${j}-modal-container`),style:n,children:[x.jsx(Uw,{className:W(t,`${j}-modal-backdrop`)}),x.jsx(Np,{className:W(t,`${j}-container`,`${j}-modal`,e,{fullscreen:l,standalone:A,embedded:!A}),lang:H,children:x.jsxs(Pp,{className:W(t,`${j}-modal-content`,{standalone:A,embedded:!A}),children:[x.jsx(Gw,{componentType:"modal",overflowActions:HB,onClearChat:_,onClose:z}),x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,{standalone:A,embedded:!A}),role:"region","aria-label":"Conversation",children:x.jsx(Yp,{isWidgetStandalone:A,isLoading:f,isOpen:C,handleSuggestionClick:P,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(Yh,{componentType:"modal",isLoading:f,isConnecting:p,isConnectionSlow:m,pendingInput:T,inputError:y,onSubmit:w,prepareSubmit:v})]})})]})})}):x.jsx("div",{children:"Loading Copilot..."}):null},zB=()=>{const e=rr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(jP,{}):t==="dialog"?x.jsx(Ox,{}):t==="modal"?x.jsx(Ix,{}):x.jsx(Px,{})},jB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Vf();O.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 jk(a),()=>{$k(a)}},[e,t,n,r,o])},$B=()=>{const{copilot:e,connected:t}=Vn(),{entryType:n,activePromptsId:r,params:o}=Ei(),{setIsInitialized:a,setActivePromptsId:u,setPromptsMessage:l,setResponseMessage:d,setIsResponseLoading:f}=Vf(),{getCopilotSuggestions:p}=eE();jB();const m=O.useCallback(v=>{if(!n||!v)return;p(v,n,_=>{u(_.id)})},[n,p,u]);O.useEffect(()=>{!e||!t||!n||!o||m(o)},[e,t,n,o,m]);const T=O.useCallback(v=>{v.eventSourceId===r&&(l(v),u(v.id),a(!0))},[r,l,u,a]),y=O.useCallback(v=>{(v==null?void 0:v.eventSourceId)===r&&(d(v),f(!1))},[r,d,f]),w=O.useCallback(()=>{a(!0),f(!1)},[a,f]);return O.useEffect(()=>{if(e)return e.on("follow_up",T),e.on("inquiry",y),e.on("error",w),()=>{e.off("follow_up",T),e.off("inquiry",y),e.off("error",w)}},[e,T,y,w]),null},Rx=e=>{const{mode:t}=Qe(),n=qn(),r=t==="messaging"?n.prompts.placeholderAskAQuestion:n.prompts.placeholderAskCopilot;return e||r},VB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n}=Qe(),{placeholder:r,isResponseLoading:o}=Ei(),a=qn(),u=Rx(r),[l,d]=O.useState(""),f=t||o,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return x.jsxs("form",{className:W(n,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":u,children:x.jsx(kp,{"aria-hidden":"true",className:W(n,`${j}-prompts-input-icon`)})}),x.jsx("input",{id:`${j}-prompts-input`,className:W(n,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:u,type:"text","aria-disabled":f||void 0,value:l,onBeforeInput:m,onPaste:m,onChange:T=>{f||d(T.target.value)}}),x.jsx(yi,{className:W(n,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:a.prompts.submitPromptAriaLabel,icon:x.jsx(ms,{}),disabled:f})]})},qB=()=>{const{globalClassName:e}=Qe(),{placeholder:t}=Ei(),n=Rx(t);return x.jsxs("div",{className:W(e,`${j}-prompts-header`),children:[x.jsx(kp,{className:W(e,`${j}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:W(e,`${j}-prompts-header-text`),children:n})]})},Lx=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=Qe(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return x.jsxs("button",{className:W(r,`${j}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(Dp,{icon:a,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},YB=({label:e,disabled:t=!1})=>{const n=qn();return x.jsx(Lx,{label:e||n.prompts.askMeSomethingElse,disabled:t,onClick:()=>gi(!0)})},WB=({sendCopilotPrompt:e})=>{var P,_;const{globalClassName:t}=Qe(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=Ei(),p=o?(_=(P=n==null?void 0:n.suggestions)==null?void 0:P.map(C=>C.displayText.trim()).filter(Boolean))!=null?_:[]:[],m=o?r0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=C=>()=>{const A=C.trim();A&&e(A)};return x.jsxs("div",{className:W(t,`${j}-prompts-button-group`),children:[T&&x.jsx(Nc,{}),m.map(C=>x.jsx(Lx,{label:C,disabled:r,onClick:v(C)},C)),w&&x.jsx(YB,{label:u,disabled:r})]})},GB=()=>{const{globalClassName:e}=Qe(),{isInline:t,userPrompt:n}=Ei();return!n||!t?null:x.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:x.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},XB=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=Qe(),{isInline:r,responseMessage:o,isResponseLoading:a}=Ei();if(!r||!o&&!a)return null;if(a)return x.jsx(Nc,{});if(!o)return null;const u=l=>Mp({event:l,openLinksInNewTab:t,onNavigate:n});return x.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:x.jsx(qp,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},KB=()=>{const{globalClassName:e,themeVariables:t}=Qe(),{connected:n,copilot:r}=Vn(),{handleCopilotRequestAck:o}=So(),{status:{isOpen:a}}=rr(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=Ei(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:P,setIsResponseLoading:_}=Vf(),[C,A]=O.useState(null);O.useEffect(()=>{if(!d||C)return;const U=document.getElementById(d);U&&A(U)},[d,C]);const H=O.useCallback(U=>{if(!r||!f||!p)return;const L=ee=>{l?(P(null),v(U),w(ee.id),_(!0)):(a||gi(!0),o(ee))},z={userPrompt:U,clientContext:F({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(z,L);break;case"search":r.search(F({searchParams:p},z),L);break;case"browse":r.browse(F({browseParams:p},z),L);break;case"pdp":r.productView(F(F({},p),z),L);break}},[r,l,f,p,a,w,P,v,_,o]);return!n||!u||!C||!f?null:vo.createPortal(x.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[T&&x.jsx(VB,{onSubmit:H}),!T&&x.jsx(qB,{}),y&&x.jsx(WB,{sendCopilotPrompt:H}),x.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[x.jsx(GB,{}),x.jsx(XB,{})]})]}),C)},QB=()=>x.jsxs(x.Fragment,{children:[x.jsx($B,{}),x.jsx(KB,{})]}),Dx=e=>x.jsxs(oE,ge(F({},e),{children:[x.jsx(zB,{}),x.jsx(QB,{})]})),JB="1.62.2";var Ic={},Mx;function ZB(){if(Mx)return Ic;Mx=1;var e=cE();return Ic.createRoot=e.createRoot,Ic.hydrateRoot=e.hydrateRoot,Ic}var e7=ZB();const Fx=new WeakMap,Bx=(e,t)=>{let n=Fx.get(e);n||(n=e7.createRoot(e),Fx.set(e,n)),n.render(x.jsx(Dx,F({},t)))},t7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=bn(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&&(ps(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),Bx(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),ps(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:Ox,CopilotEmbed:Px,CopilotModal:Ix,CopilotWidget:Dx,CopilotWidgetProvider:oE,eventHandlers:{search:tP,browse:Fk,pdp:{setPdpContext:H1,updatePdpProductId:Uk,updatePdpLink:Hk},components:{setEntryType:Ia,toggleWidgetOpen:gi,toggleWidgetMinimized:Ra,toggleModalFullscreen:Hf,setWidgetType:kl,setWidgetDialogPosition:zf,togglePromptsExtensionOpen:z1,togglePromptsExtensionInline:j1,loadPromptsComponent:Gk,getAskCimPrompts:Vk,getSearchPrompts:qk,getBrowsePrompts:Yk,getProductViewPrompts:Wk},session:Xk},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=bn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ps(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){ps(!0,"warn","Container element not found for id:",t),ps(!0,"warn","Beginning observation for element"),t7(F({elementId:t,timeout:e},n));return}Bx(a,n)},resolveTheme:S0,state:()=>Object.freeze({search:Object.freeze(wt.state),browse:Object.freeze(dt.state),pdp:Object.freeze(kr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),themes:Jv,useCopilot:Wr,version:JB},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,S,k){return f(p(y,S,k),y.align)}function l(y,w,S,k){const _=m(y,S,k),C=f([_]);return C.slice(0,C.indexOf(`
46
+ `))}function d(y,w,S,k){const _=S.enter("tableCell"),C=S.enter("phrasing"),A=S.containerPhrasing(y,Ee(F({},k),{before:a,after:a}));return C(),_(),A}function f(y,w){return KF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,S){const k=y.children;let _=-1;const C=[],A=w.enter("table");for(;++_<k.length;)C[_]=m(k[_],w,S);return A(),C}function m(y,w,S){const k=y.children;let _=-1;const C=[],A=w.enter("tableRow");for(;++_<k.length;)C[_]=d(k[_],y,w,S);return A(),C}function T(y,w,S){let k=px.inlineCode(y,w,S);return S.stack.includes("tableCell")&&(k=k.replace(/\|/g,"\\$&")),k}}function F9(){return{exit:{taskListCheckValueChecked:gx,taskListCheckValueUnchecked:gx,paragraph:U9}}}function B9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:H9}}}function gx(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function U9(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 H9(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=px.listItem(e,t,n,F(F({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function z9(){return[bF(),HF(),VF(),N9(),F9()]}function j9(e){return{extensions:[TF(),zF(e),qF(),M9(e),B9()]}}const $9={tokenize:X9,partial:!0},Ex={tokenize:K9,partial:!0},yx={tokenize:Q9,partial:!0},bx={tokenize:J9,partial:!0},V9={tokenize:Z9,partial:!0},Tx={name:"wwwAutolink",tokenize:W9,previous:xx},wx={name:"protocolAutolink",tokenize:G9,previous:_x},Si={name:"emailAutolink",tokenize:Y9,previous:Sx},ii={};function q9(){return{text:ii}}let Vo=48;for(;Vo<123;)ii[Vo]=Si,Vo++,Vo===58?Vo=65:Vo===91&&(Vo=97);ii[43]=Si,ii[45]=Si,ii[46]=Si,ii[95]=Si,ii[72]=[Si,wx],ii[104]=[Si,wx],ii[87]=[Si,Tx],ii[119]=[Si,Tx];function Y9(e,t,n){const r=this;let o,a;return u;function u(m){return!$p(m)||!Sx.call(r,r.previous)||Vp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return $p(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(V9,p,f)(m):m===45||m===95||An(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&&Mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function W9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!xx.call(r,r.previous)||Vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($9,e.attempt(Ex,e.attempt(yx,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function G9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&_x.call(r,r.previous)&&!Vp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Mn(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||Dl(m)||mt(m)||ko(m)||Ml(m)?n(m):e.attempt(Ex,e.attempt(yx,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function X9(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 K9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(bx,d,l)(f):f===null||mt(f)||ko(f)||f!==45&&Ml(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 Q9(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(bx,t,a)(u):u===null||mt(u)||ko(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function J9(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)||ko(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||ko(l)?t(l):r(l)}function a(l){return Mn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Mn(l)?(e.consume(l),u):n(l)}}function Z9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return An(a)?n(a):t(a)}}function xx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function _x(e){return!Mn(e)}function Sx(e){return!(e===47||$p(e))}function $p(e){return e===43||e===45||e===46||e===95||An(e)}function Vp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const eB={tokenize:uB,partial:!0};function tB(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oB,continuation:{tokenize:sB},exit:aB}},text:{91:{name:"gfmFootnoteCall",tokenize:iB},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nB,resolveTo:rB}}}}function nB(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=Pr(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 rB(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 iB(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(Pr(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 oB(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 S=e.exit("gfmFootnoteDefinitionLabelString");return a=Pr(r.sliceSerialize(S)),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 sB(e,t,n){return e.check(Va,t,e.attempt(eB,t,n))}function aB(e){e.exit("gfmFootnoteDefinition")}function uB(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 lB(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&&or(T,T.length,0,Fl(y,u.slice(f+1,d),l)),or(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),or(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 S=bs(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const k=u.exit("strikethroughSequenceTemporary"),_=bs(w);return k._open=!_||_===2&&!!S,k._close=!S||S===2&&!!_,l(w)}}}class cB{constructor(){this.map=[]}add(t,n,r){dB(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 dB(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 fB(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 hB(){return{flow:{null:{name:"table",tokenize:pB,resolveAll:mB}}}}function pB(e,t,n){const r=this;let o=0,a=0,u;return l;function l(q){let re=r.events.length-1;for(;re>-1;){const ee=r.events[re][1].type;if(ee==="lineEnding"||ee==="linePrefix")re--;else break}const fe=re>-1?r.events[re][1].type:null,pe=fe==="tableHead"||fe==="tableRow"?L:d;return pe===L&&r.parser.lazy[r.now().line]?n(q):pe(q)}function d(q){return e.enter("tableHead"),e.enter("tableRow"),f(q)}function f(q){return q===124||(u=!0,a+=1),p(q)}function p(q){return q===null?n(q):He(q)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(q),e.exit("lineEnding"),y):n(q):Ze(q)?it(e,p,"whitespace")(q):(a+=1,u&&(u=!1,o+=1),q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(q)))}function m(q){return q===null||q===124||mt(q)?(e.exit("data"),p(q)):(e.consume(q),q===92?T:m)}function T(q){return q===92||q===124?(e.consume(q),m):m(q)}function y(q){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(q):(e.enter("tableDelimiterRow"),u=!1,Ze(q)?it(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(q):w(q))}function w(q){return q===45||q===58?k(q):q===124?(u=!0,e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),S):U(q)}function S(q){return Ze(q)?it(e,k,"whitespace")(q):k(q)}function k(q){return q===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),_):q===45?(a+=1,_(q)):q===null||He(q)?H(q):U(q)}function _(q){return q===45?(e.enter("tableDelimiterFiller"),C(q)):U(q)}function C(q){return q===45?(e.consume(q),C):q===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(q),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(q))}function A(q){return Ze(q)?it(e,H,"whitespace")(q):H(q)}function H(q){return q===124?w(q):q===null||He(q)?!u||o!==a?U(q):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(q)):U(q)}function U(q){return n(q)}function L(q){return e.enter("tableRow"),z(q)}function z(q){return q===124?(e.enter("tableCellDivider"),e.consume(q),e.exit("tableCellDivider"),z):q===null||He(q)?(e.exit("tableRow"),t(q)):Ze(q)?it(e,z,"whitespace")(q):(e.enter("data"),Z(q))}function Z(q){return q===null||q===124||mt(q)?(e.exit("data"),z(q)):(e.consume(q),q===92?de:Z)}function de(q){return q===92||q===124?(e.consume(q),Z):Z(q)}}function mB(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 cB;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(vx(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=Pc(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=Pc(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=Pc(T,t,a,o,n,m)):u[1]!==0&&(m=Pc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&vx(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=fB(t.events,n))}return e}function Pc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},$s(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=$s(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=$s(t.events,n[2]),p=$s(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,S=n[3]-n[2]-1;e.add(w,S,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},$s(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function vx(e,t,n,r,o){const a=[],u=$s(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 $s(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gB={name:"tasklistCheck",tokenize:yB};function EB(){return{text:{91:gB}}}function yB(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 He(d)?t(d):Ze(d)?e.check({tokenize:bB},t,n)(d):n(d)}}function bB(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function TB(e){return QE([q9(),tB(),lB(e),hB(),EB()])}const wB={};function xB(e){const t=this,n=e||wB,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(TB(n)),a.push(z9()),u.push(j9(n))}const Nc=()=>x.jsx("span",{className:`${j}-blinking-cursor`,children:x.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:x.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function _B(e){return/^tel:/i.test(e)?e:$y(e)}const qp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>x.jsx("div",{className:W(e,`${j}-markdown`),children:x.jsx(jy,{remarkPlugins:[xB],rehypePlugins:[Vb],urlTransform:_B,components:{h1:({children:a})=>x.jsx("h1",{className:W(e,`${j}-header h1`),children:a}),h2:({children:a})=>x.jsx("h2",{className:W(e,`${j}-header h2`),children:a}),h3:({children:a})=>x.jsx("h3",{className:W(e,`${j}-header h3`),children:a}),ul:({children:a})=>x.jsx("ul",{className:W(e,`${j}-ul`),children:a}),ol:({children:a})=>x.jsx("ol",{className:W(e,`${j}-ol`),children:a}),li:({children:a})=>x.jsx("li",{className:W(e,`${j}-li`),children:a}),a:({href:a,children:u})=>x.jsx(Qb,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>x.jsx("div",{className:W(e,`${j}-table-container`),children:x.jsx("table",{className:W(e,`${j}-table`),children:a})}),thead:({children:a})=>x.jsx("thead",{className:W(e,`${j}-thead`),children:a}),tbody:({children:a})=>x.jsx("tbody",{className:W(e,`${j}-tbody`),children:a}),tr:({children:a})=>x.jsx("tr",{className:W(e,`${j}-tr`),children:a}),th:({children:a})=>x.jsx("th",{className:W(e,`${j}-th`),children:a}),td:({children:a})=>x.jsx("td",{className:W(e,`${j}-td`),children:a}),span:({className:a,children:u})=>a===`${j}-blinking-cursor`?x.jsx(Nc,{}):x.jsx("span",{children:u})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")})}),SB=({globalClassName:e,message:t})=>{const[n,r]=O.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${j}-progress-message`,"standalone"),children:[x.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","standalone"),children:x.jsx(gE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&x.jsxs(x.Fragment,{children:[x.jsx(Il,{className:W(e,`${j}-thought-context-button`),onClick:l,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(YP,{"aria-hidden":"true"})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(WP,{"aria-hidden":"true"})]})}),n&&x.jsx("div",{className:W(e,`${j}-thought-container`),children:a&&x.jsx("p",{className:W(e,`${j}-progress-thought`),children:t.thought})})]})]})},vB=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(SB,{globalClassName:e,message:t}):x.jsxs("div",{className:W(e,`${j}-progress-message`,"embedded"),title:t.message,children:[x.jsx("span",{className:W(e,`${j}-message-icon`,"progress-icon","embedded"),children:x.jsx(gE,{"aria-hidden":"true"})}),x.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),AB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return x.jsxs("div",{className:W(e,`${j}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&x.jsxs("div",{className:W(e,`${j}-refined-event-query`,{embedded:!n,standalone:n}),children:[x.jsx("span",{className:W(e,`${j}-message-icon`,`${j}-refined-event-icon`,{embedded:!n,standalone:n}),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text`,`${j}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),x.jsx(qp,{text:t.message})]})},Ax=e=>{var d,f;const{configModule:t}=Qe(),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}},Oc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>x.jsx("span",{className:W(t,`${j}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),Cx=({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 x.jsxs("div",{className:W(e,`${j}-facets`),children:[x.jsx("p",{className:W(e,`${j}-facet-category`),children:l}),x.jsx("p",{className:W(e,`${j}-facet-values`),children:d})]},l)})},yu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),CB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var p,m,T,y;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=Ax(t),l=St(),d=new Date(o).toLocaleString(),f=(p=r==null?void 0:r.attachments)==null?void 0:p.image;return n?x.jsxs("div",{className:W(e,`${j}-user-message standalone`),children:[x.jsxs("div",{className:W(e,`${j}-user-message-row standalone`),children:[f?x.jsx("img",{className:W(e,`${j}-user-message-image standalone`),src:f,alt:(m=l.messages)==null?void 0:m.userProvidedContextAlt,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-message-icon standalone`),children:x.jsx(yE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&x.jsx(Oc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(Cx,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(yu,{globalClassName:e,timestamp:d,isWidgetStandalone:!0})]}):x.jsxs("div",{className:W(e,`${j}-user-message embedded`),children:[x.jsxs("div",{className:W(e,`${j}-user-message-row embedded`),children:[f?x.jsx("img",{className:W(e,`${j}-user-message-image`,"embedded"),src:f,alt:(T=l.messages)==null?void 0:T.userProvidedContextAlt,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-message-icon embedded`),children:x.jsx(yE,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-user-message-text embedded`),children:(y=t.request)==null?void 0:y.userPrompt}),a.length>0&&x.jsx(Oc,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(yu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]})},kB=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>x.jsxs("div",{className:W(e,`${j}-user-search standalone`),children:[x.jsxs("div",{children:[x.jsxs("div",{className:W(e,`${j}-user-search-query standalone`),children:[d?x.jsx("img",{className:W(e,`${j}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-search-icon standalone`),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&x.jsx(Oc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),x.jsx(Cx,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(yu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),PB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=Ax(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}=O.useMemo(()=>{var S,k,_;const w=typeof((S=r==null?void 0:r.clientContext)==null?void 0:S.cimLabel)=="string"?(k=r==null?void 0:r.clientContext)==null?void 0:k.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:(_=r==null?void 0:r.browseParams)==null?void 0:_.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?x.jsx(kB,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):x.jsxs("div",{className:W(e,`${j}-user-search embedded`),children:[x.jsxs("div",{className:W(e,`${j}-user-search-query embedded`),children:[f?x.jsx("img",{className:W(e,`${j}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):x.jsx("span",{className:W(e,`${j}-message-icon user-search-icon embedded`),children:x.jsx(ms,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold embedded`),children:T||m}),u.length>0&&x.jsx(Oc,{isWidgetStandalone:!1,filterCount:l})]}),x.jsx(yu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},kx=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Wr(),{onNavigate:f}=Qe(),p=S=>Mp({event:S,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?x.jsx(CB,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(PB,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(AB,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(hF,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return x.jsx(qp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return x.jsx(fF,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(dF,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(vB,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:x.jsxs(x.Fragment,{children:[x.jsx("p",{className:W(t,`${j}-reset-message`),children:"This conversation has been reset."}),x.jsx("p",{className:W(t,`${j}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},NB=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=Qe(),{groupedMessages:a}=qn(),{entryType:u}=rr();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(aF,{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()),x.jsxs("div",{className:W(n,`${j}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>x.jsx("div",{className:`${j}-message-group-child`,children:x.jsx(kx,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(yu,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return x.jsx("div",{className:W(n,`${j}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:x.jsx(kx,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},OB=4e3,IB=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,OB),RB=({message:e,announcementKey:t})=>{const[n,r]=O.useState("");return O.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),x.jsx("span",{className:`${j}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},LB=()=>{const{groupedMessages:e}=qn(),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 x.jsx(RB,{message:n?IB(n.message):"",announcementKey:n==null?void 0:n.id})},DB=({isOpen:e}={})=>{const{messages:t}=Wr(),{autoScroll:n}=Qe(),r=O.useRef(null);return O.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),O.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},MB={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Yp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=DB({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(NB,{isWidgetStandalone:t,handleSuggestionClick:r}),x.jsx(LB,{}),n&&x.jsx("div",{style:F(F({},MB),o),children:x.jsx(Nc,{})}),x.jsx("div",{ref:a})]})},Px=()=>{var _,C;const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=Qe(),{copilot:o,isLoading:a,isConnecting:u,isConnectionSlow:l,pendingInput:d,inputError:f,handleUserInput:p,prepareUserInput:m,handleSuggestion:T,resetConversation:y}=Wr(),w=Yf(),S=St();return Lp()?o?x.jsxs("div",{className:W(t,`${j}-container`,`${j}-embedded-chat`,e),style:n,lang:w,children:[x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":(C=S.common)==null?void 0:C.conversation,children:x.jsx(Yp,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:T})}),x.jsx(Yh,{componentType:"chat",className:"embedded-chat",isLoading:a,isConnecting:u,isConnectionSlow:l,pendingInput:d,inputError:f,onSubmit:p,prepareSubmit:m}),x.jsx("div",{className:W(`${j}-embedded-chat-menu`),children:x.jsxs(hM,{componentType:"chat",children:[x.jsx(Xw,{componentType:"chat"}),x.jsx(eT,{componentType:"chat",onClearChat:y})]})})]}):x.jsx("div",{children:(_=S.loading)==null?void 0:_.loadingCopilot}):null},Nx=e=>{var d;const{children:t,disabled:n}=e,[r,o]=O.useState((d=e.container)==null?void 0:d.current),a=O.useSyncExternalStore(BB,()=>!1,()=>!0),{getRootNode:u}=Sc();if(O.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return x.jsx(x.Fragment,{children:t});const l=r!=null?r:FB(u);return x.jsx(x.Fragment,{children:O.Children.map(t,f=>vo.createPortal(f,l))})},FB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Mo(n)?n:Qr(t).body},BB=()=>()=>{},UB=["toggleDialogPosition","minimize","clearChat"],HB=["toggleFullscreen","minimize","clearChat"],Ox=()=>{var q,re;const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=Qe(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=rr(),p=Yf(),m=St(),{copilot:T,isLoading:y,isConnecting:w,isConnectionSlow:S,pendingInput:k,inputError:_,handleUserInput:C,prepareUserInput:A,handleSuggestion:H,resetConversation:U}=Wr(),L=Lp(),{isOpen:z}=u||{},Z=a==="standalone",de=()=>{gi(!1),Qf()};return T?x.jsx(Vw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:L,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Kf,children:x.jsx(Nx,{children:x.jsx(Np,{className:W(t,`${j}-dialog-positioner`),style:n,children:x.jsxs(Pp,{className:W(t,`${j}-container`,`${j}-dialog`,`${j}-dialog-content`,e,l,d&&"full-height",{standalone:Z,embedded:!Z}),style:f?{width:f}:void 0,lang:p,children:[x.jsx(Gw,{componentType:"dialog",overflowActions:UB,onClearChat:U,onClose:de}),x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,{standalone:Z,embedded:!Z}),role:"region","aria-label":(re=m.common)==null?void 0:re.conversation,children:x.jsx(Yp,{isWidgetStandalone:Z,isLoading:y,isOpen:z,handleSuggestionClick:H})}),x.jsx(Yh,{componentType:"dialog",isLoading:y,isConnecting:w,isConnectionSlow:S,pendingInput:k,inputError:_,onSubmit:C,prepareSubmit:A})]})})})}):x.jsx("div",{children:(q=m.loading)==null?void 0:q.loadingCopilot})},Ix=()=>{var de,q;const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=Qe(),{mode:a,status:u,isModalFullscreen:l}=rr(),{copilot:d,isLoading:f,isConnecting:p,isConnectionSlow:m,pendingInput:T,inputError:y,handleUserInput:w,prepareUserInput:S,handleSuggestion:k,resetConversation:_}=Wr(),{isOpen:C}=u||{},A=a==="standalone",H=Yf(),U=St(),L=Lp(),z=({open:re})=>{if(re){gi(!0);return}Z()},Z=()=>{gi(!1),Qf()};return L?d?x.jsx(Vw,{lazyMount:!0,unmountOnExit:!0,open:L,"aria-label":o==null?void 0:o.headerText,onOpenChange:z,initialFocusEl:Kf,children:x.jsx(Nx,{children:x.jsxs("div",{className:W(t,`${j}-modal-container`),style:n,children:[x.jsx(Uw,{className:W(t,`${j}-modal-backdrop`)}),x.jsx(Np,{className:W(t,`${j}-container`,`${j}-modal`,e,{fullscreen:l,standalone:A,embedded:!A}),lang:H,children:x.jsxs(Pp,{className:W(t,`${j}-modal-content`,{standalone:A,embedded:!A}),children:[x.jsx(Gw,{componentType:"modal",overflowActions:HB,onClearChat:_,onClose:Z}),x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,{standalone:A,embedded:!A}),role:"region","aria-label":(q=U.common)==null?void 0:q.conversation,children:x.jsx(Yp,{isWidgetStandalone:A,isLoading:f,isOpen:C,handleSuggestionClick:k,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),x.jsx(Yh,{componentType:"modal",isLoading:f,isConnecting:p,isConnectionSlow:m,pendingInput:T,inputError:y,onSubmit:w,prepareSubmit:S})]})})]})})}):x.jsx("div",{children:(de=U.loading)==null?void 0:de.loadingCopilot}):null},zB=()=>{const e=rr(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(jP,{}):t==="dialog"?x.jsx(Ox,{}):t==="modal"?x.jsx(Ix,{}):x.jsx(Px,{})},jB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=Vf();O.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 jk(a),()=>{$k(a)}},[e,t,n,r,o])},$B=()=>{const{copilot:e,connected:t}=qn(),{entryType:n,activePromptsId:r,params:o}=Ei(),{setIsInitialized:a,setActivePromptsId:u,setPromptsMessage:l,setResponseMessage:d,setIsResponseLoading:f}=Vf(),{getCopilotSuggestions:p}=eE();jB();const m=O.useCallback(S=>{if(!n||!S)return;p(S,n,_=>{u(_.id)})},[n,p,u]);O.useEffect(()=>{!e||!t||!n||!o||m(o)},[e,t,n,o,m]);const T=O.useCallback(S=>{S.eventSourceId===r&&(l(S),u(S.id),a(!0))},[r,l,u,a]),y=O.useCallback(S=>{(S==null?void 0:S.eventSourceId)===r&&(d(S),f(!1))},[r,d,f]),w=O.useCallback(()=>{a(!0),f(!1)},[a,f]);return O.useEffect(()=>{if(e)return e.on("follow_up",T),e.on("inquiry",y),e.on("error",w),()=>{e.off("follow_up",T),e.off("inquiry",y),e.off("error",w)}},[e,T,y,w]),null},Rx=e=>{const{mode:t}=Qe(),n=St(),r=t==="messaging"?n.prompts.placeholderAskAQuestion:n.prompts.placeholderAskCopilot;return e||r},VB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n}=Qe(),{placeholder:r,isResponseLoading:o}=Ei(),a=St(),u=Rx(r),[l,d]=O.useState(""),f=t||o,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return x.jsxs("form",{className:W(n,`${j}-prompts-input-container`),name:`${j}-prompts-form`,onSubmit:p,children:[x.jsx("label",{htmlFor:`${j}-prompts-input`,"aria-label":u,children:x.jsx(kp,{"aria-hidden":"true",className:W(n,`${j}-prompts-input-icon`)})}),x.jsx("input",{id:`${j}-prompts-input`,className:W(n,`${j}-prompts-input`),name:`${j}-prompts-input`,placeholder:u,type:"text","aria-disabled":f||void 0,value:l,onBeforeInput:m,onPaste:m,onChange:T=>{f||d(T.target.value)}}),x.jsx(yi,{className:W(n,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:a.prompts.submitPromptAriaLabel,icon:x.jsx(ms,{}),disabled:f})]})},qB=()=>{const{globalClassName:e}=Qe(),{placeholder:t}=Ei(),n=Rx(t);return x.jsxs("div",{className:W(e,`${j}-prompts-header`),children:[x.jsx(kp,{className:W(e,`${j}-prompts-input-icon`),"aria-hidden":"true"}),x.jsx("span",{className:W(e,`${j}-prompts-header-text`),children:n})]})},Lx=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=Qe(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return x.jsxs("button",{className:W(r,`${j}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&x.jsx(Dp,{icon:a,className:`${j}-suggestion-button-icon`}),x.jsx("span",{children:e})]})},YB=({label:e,disabled:t=!1})=>{const n=St();return x.jsx(Lx,{label:e||n.prompts.askMeSomethingElse,disabled:t,onClick:()=>gi(!0)})},WB=({sendCopilotPrompt:e})=>{var k,_;const{globalClassName:t}=Qe(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=Ei(),p=o?(_=(k=n==null?void 0:n.suggestions)==null?void 0:k.map(C=>C.displayText.trim()).filter(Boolean))!=null?_:[]:[],m=o?r0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,S=C=>()=>{const A=C.trim();A&&e(A)};return x.jsxs("div",{className:W(t,`${j}-prompts-button-group`),children:[T&&x.jsx(Nc,{}),m.map(C=>x.jsx(Lx,{label:C,disabled:r,onClick:S(C)},C)),w&&x.jsx(YB,{label:u,disabled:r})]})},GB=()=>{const{globalClassName:e}=Qe(),{isInline:t,userPrompt:n}=Ei();return!n||!t?null:x.jsx("div",{className:W(e,`${j}-prompts-user-message-container`),children:x.jsx("p",{className:W(e,`${j}-prompts-user-message`),children:n})})},XB=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=Qe(),{isInline:r,responseMessage:o,isResponseLoading:a}=Ei();if(!r||!o&&!a)return null;if(a)return x.jsx(Nc,{});if(!o)return null;const u=l=>Mp({event:l,openLinksInNewTab:t,onNavigate:n});return x.jsx("div",{className:W(e,`${j}-prompts-response-container`,`${j}-message-container`),children:x.jsx(qp,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},KB=()=>{const{globalClassName:e,themeVariables:t}=Qe(),{connected:n,copilot:r}=qn(),{handleCopilotRequestAck:o}=So(),{status:{isOpen:a}}=rr(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=Ei(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:S,setResponseMessage:k,setIsResponseLoading:_}=Vf(),[C,A]=O.useState(null);O.useEffect(()=>{if(!d||C)return;const U=document.getElementById(d);U&&A(U)},[d,C]);const H=O.useCallback(U=>{if(!r||!f||!p)return;const L=Z=>{l?(k(null),S(U),w(Z.id),_(!0)):(a||gi(!0),o(Z))},z={userPrompt:U,clientContext:F({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(z,L);break;case"search":r.search(F({searchParams:p},z),L);break;case"browse":r.browse(F({browseParams:p},z),L);break;case"pdp":r.productView(F(F({},p),z),L);break}},[r,l,f,p,a,w,k,S,_,o]);return!n||!u||!C||!f?null:vo.createPortal(x.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[T&&x.jsx(VB,{onSubmit:H}),!T&&x.jsx(qB,{}),y&&x.jsx(WB,{sendCopilotPrompt:H}),x.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[x.jsx(GB,{}),x.jsx(XB,{})]})]}),C)},QB=()=>x.jsxs(x.Fragment,{children:[x.jsx($B,{}),x.jsx(KB,{})]}),Dx=e=>x.jsxs(oE,Ee(F({},e),{children:[x.jsx(zB,{}),x.jsx(QB,{})]})),JB="1.62.4";var Ic={},Mx;function ZB(){if(Mx)return Ic;Mx=1;var e=cE();return Ic.createRoot=e.createRoot,Ic.hydrateRoot=e.hydrateRoot,Ic}var e7=ZB();const Fx=new WeakMap,Bx=(e,t)=>{let n=Fx.get(e);n||(n=e7.createRoot(e),Fx.set(e,n)),n.render(x.jsx(Dx,F({},t)))},t7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=Tn(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&&(ps(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),Bx(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),ps(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:Ox,CopilotEmbed:Px,CopilotModal:Ix,CopilotWidget:Dx,CopilotWidgetProvider:oE,eventHandlers:{search:tP,browse:Fk,pdp:{setPdpContext:H1,updatePdpProductId:Uk,updatePdpLink:Hk},components:{setEntryType:Ia,toggleWidgetOpen:gi,toggleWidgetMinimized:Ra,toggleModalFullscreen:Hf,setWidgetType:kl,setWidgetDialogPosition:zf,togglePromptsExtensionOpen:z1,togglePromptsExtensionInline:j1,loadPromptsComponent:Gk,getAskCimPrompts:Vk,getSearchPrompts:qk,getBrowsePrompts:Yk,getProductViewPrompts:Wk},session:Xk},injectCopilotWidget:r=>{var o=r,{timeout:e,elementId:t}=o,n=Tn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){ps(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){ps(!0,"warn","Container element not found for id:",t),ps(!0,"warn","Beginning observation for element"),t7(F({elementId:t,timeout:e},n));return}Bx(a,n)},resolveTheme:S0,state:()=>Object.freeze({search:Object.freeze(wt.state),browse:Object.freeze(dt.state),pdp:Object.freeze(kr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),themes:Jv,useCopilot:Wr,version:JB},Symbol.toStringTag,{value:"Module"}))}));