@cimulate/copilot-widget 1.58.1 → 1.60.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/README.md +91 -3
- package/dist/cimulate-copilot-widget.css +1 -1
- package/dist/cimulate-copilot-widget.d.ts +300 -2
- package/dist/cimulate-copilot-widget.es.js +8915 -8525
- package/dist/cimulate-copilot-widget.umd.js +31 -31
- package/dist/{client-DaAK0txn.js → client-C4_HVnQ6.js} +156 -146
- package/dist/copilot.css +1 -1
- package/dist/copilot.es.js +8913 -8523
- package/dist/copilot.umd.js +31 -31
- package/dist/locales/da-DK.json +238 -0
- package/dist/locales/de-DE.json +238 -0
- package/dist/locales/en-US.json +237 -0
- package/dist/locales/es-ES.json +238 -0
- package/dist/locales/es-MX.json +238 -0
- package/dist/locales/fi-FI.json +238 -0
- package/dist/locales/fr-FR.json +238 -0
- package/dist/locales/it-IT.json +238 -0
- package/dist/locales/ja-JP.json +238 -0
- package/dist/locales/ko-KR.json +234 -0
- package/dist/locales/nb-NO.json +238 -0
- package/dist/locales/nl-NL.json +238 -0
- package/dist/locales/pl.json +238 -0
- package/dist/locales/pt-BR.json +238 -0
- package/dist/locales/sv-SE.json +238 -0
- package/dist/locales/zh-CN.json +230 -0
- package/dist/locales/zh-TW.json +230 -0
- package/dist/messaging.css +1 -1
- package/dist/messaging.d.ts +307 -1
- package/dist/messaging.es.js +10864 -10682
- package/dist/messaging.umd.js +38 -38
- package/dist/o11y-sdk.umd.js +2 -2
- package/package.json +3 -2
package/dist/copilot.umd.js
CHANGED
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(Fe,Ve){typeof exports=="object"&&typeof module!="undefined"?Ve(exports):typeof define=="function"&&define.amd?define(["exports"],Ve):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ve(Fe.CimulateCopilot={}))})(this,(function(Fe){"use strict";var BU=Object.defineProperty,UU=Object.defineProperties;var HU=Object.getOwnPropertyDescriptors;var Nd=Object.getOwnPropertySymbols;var uS=Object.prototype.hasOwnProperty,lS=Object.prototype.propertyIsEnumerable;var ta=(Fe,Ve)=>(Ve=Symbol[Fe])?Ve:Symbol.for("Symbol."+Fe),zU=Fe=>{throw TypeError(Fe)},$u=Math.pow,y0=(Fe,Ve,Qe)=>Ve in Fe?BU(Fe,Ve,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):Fe[Ve]=Qe,B=(Fe,Ve)=>{for(var Qe in Ve||(Ve={}))uS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);if(Nd)for(var Qe of Nd(Ve))lS.call(Ve,Qe)&&y0(Fe,Qe,Ve[Qe]);return Fe},me=(Fe,Ve)=>UU(Fe,HU(Ve));var mn=(Fe,Ve)=>{var Qe={};for(var ft in Fe)uS.call(Fe,ft)&&Ve.indexOf(ft)<0&&(Qe[ft]=Fe[ft]);if(Fe!=null&&Nd)for(var ft of Nd(Fe))Ve.indexOf(ft)<0&&lS.call(Fe,ft)&&(Qe[ft]=Fe[ft]);return Qe};var _e=(Fe,Ve,Qe)=>y0(Fe,typeof Ve!="symbol"?Ve+"":Ve,Qe);var et=(Fe,Ve,Qe)=>new Promise((ft,Rt)=>{var wt=_t=>{try{ln(Qe.next(_t))}catch(Cn){Rt(Cn)}},He=_t=>{try{ln(Qe.throw(_t))}catch(Cn){Rt(Cn)}},ln=_t=>_t.done?ft(_t.value):Promise.resolve(_t.value).then(wt,He);ln((Qe=Qe.apply(Fe,Ve)).next())}),Jr=function(Fe,Ve){this[0]=Fe,this[1]=Ve},Pd=(Fe,Ve,Qe)=>{var ft=(ln,_t,Cn,mr)=>{try{var Zi=Qe[ln](_t),Vo=(_t=Zi.value)instanceof Jr,qo=Zi.done;Promise.resolve(Vo?_t[0]:_t).then(Rn=>Vo?ft(ln==="return"?ln:"next",_t[1]?{done:Rn.done,value:Rn.value}:Rn,Cn,mr):Cn({value:Rn,done:qo})).catch(Rn=>ft("throw",Rn,Cn,mr))}catch(Rn){mr(Rn)}},Rt=(ln,_t,Cn,mr)=>He[ln]=Zi=>(_t=new Promise((Vo,qo,Rn)=>(Rn=()=>ft(ln,Zi,Vo,qo),wt?wt.then(Rn):Rn())),mr=()=>wt===Cn&&(wt=0),wt=Cn=_t.then(mr,mr),_t),wt,He={};return Qe=Qe.apply(Fe,Ve),He[ta("asyncIterator")]=()=>He,Rt("next"),Rt("throw"),Rt("return"),He},b0=Fe=>{var Ve=Fe[ta("asyncIterator")],Qe=!1,ft,Rt={};return Ve==null?(Ve=Fe[ta("iterator")](),ft=wt=>Rt[wt]=He=>Ve[wt](He)):(Ve=Ve.call(Fe),ft=wt=>Rt[wt]=He=>{if(Qe){if(Qe=!1,wt==="throw")throw He;return He}return Qe=!0,{done:!1,value:new Jr(new Promise(ln=>{var _t=Ve[wt](He);_t instanceof Object||zU("Object expected"),ln(_t)}),1)}}),Rt[ta("iterator")]=()=>Rt,ft("next"),"throw"in Ve?ft("throw"):Rt.throw=wt=>{throw wt},"return"in Ve&&ft("return"),Rt},cS=(Fe,Ve,Qe)=>(Ve=Fe[ta("asyncIterator")])?Ve.call(Fe):(Fe=Fe[ta("iterator")](),Ve={},Qe=(ft,Rt)=>(Rt=Fe[ft])&&(Ve[ft]=wt=>new Promise((He,ln,_t)=>(wt=Rt.call(Fe,wt),_t=wt.done,Promise.resolve(wt.value).then(Cn=>He({value:Cn,done:_t}),ln)))),Qe("next"),Qe("return"),Ve);var Ve=document.createElement("style");Ve.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-skip-link{position:fixed;top:1rem;left:1rem;z-index:2147483647;padding:.75rem 1rem;border:2px solid currentColor;border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #1a202c);font-family:var(--cim-widget-font-family, inherit);font-size:1rem;transform:translateY(calc(-100% - 2rem))}.cim-widget-skip-link:focus{transform:none;outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:50%;padding:.25rem;border:none;color:#fff;box-shadow:var(--cim-widget-launcher-shadow, 0 4px 6px #00000040, 0 1px 3px #00000050);background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:var(--cim-widget-launcher-animation);transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-transcript-unified-card{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}@media(prefers-reduced-motion:reduce){.cim-widget-minimized-container.cim-widget-transcript-unified-card .cim-widget-minimized-button{animation:none;transition:none}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}.cim-widget-search-input:is(input,textarea){width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;color:var(--cim-widget-font-color, #1a202c);border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius)}.cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-font-color, #1a202c);opacity:1}.cim-widget-search-input:is(input,textarea):focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}@media(max-width:576px){.cim-widget-search-input:is(input,textarea){font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}&:has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-search-input:focus-visible{outline:none}.cim-widget-search-input:is(input,textarea){flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-input-group .cim-widget-messaging-input-group:has(.cim-widget-search-input:focus-visible){outline:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-embedded-chat.cim-widget-transcript-unified-card>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-transcript-unified-card .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent}.cim-widget-dialog-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-dialog.cim-widget-transcript-unified-card{border:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header-wrapper:has(+.cim-widget-dialog-subheader) .cim-widget-dialog-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-transcript-unified-card .cim-widget-dialog-header{height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0;.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent}.cim-widget-modal-subheader{flex-shrink:0;min-width:0;border-bottom:1px solid var(--cim-widget-border-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-header{box-sizing:border-box;height:var(--cim-widget-header-height);min-height:var(--cim-widget-header-height);gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow);background-color:var(--cim-widget-header-background-color);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-header-wrapper:has(+.cim-widget-modal-subheader) .cim-widget-modal-header{border-bottom-color:transparent;box-shadow:none}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-subheader{border-bottom-color:var(--cim-widget-border-color, #e0e0e0);box-shadow:var(--cim-widget-header-shadow)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-header-text-color);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight);line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-transcript-unified-card .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-canvas, var(--cim-widget-background-color));font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-container :focus-visible:not(.cim-widget-search-input),.cim-widget-minimized-container :focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:var(--cim-widget-transcript-padding, 1rem);&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-transcript-unified-card{background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-container{gap:var(--cim-widget-transcript-gap);padding:var(--cim-widget-transcript-padding);background-color:var(--cim-widget-canvas)}.cim-widget-transcript-unified-card .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-message-group-child{width:100%}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-markdown,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text,.cim-widget-transcript-unified-card .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:var(--cim-widget-transcript-gap);width:100%;max-width:100%;padding:var(--cim-widget-card-padding);border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-cart-box,.cim-widget-transcript-unified-card .cim-widget-cart-summary,.cim-widget-transcript-unified-card .cim-widget-cart-expanded,.cim-widget-transcript-unified-card .cim-widget-cart-coupon,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-field,.cim-widget-transcript-unified-card .cim-widget-cart-coupon-input{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-cart-expanded{border-top:none}.cim-widget-transcript-unified-card .cim-widget-cart-totals{border-top:1px solid var(--cim-widget-border-color);padding-top:16px;gap:12px}.cim-widget-transcript-unified-card .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-transcript-unified-card .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-foreground)}.cim-widget-transcript-unified-card .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__card{border-color:var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__title-link{color:var(--cim-widget-foreground);font-size:.875rem}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description{color:var(--cim-widget-muted);font-size:.75rem;opacity:1}.cim-widget-transcript-unified-card .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-transcript-unified-card button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip{border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip:hover{background-color:var(--cim-widget-subtle);border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-variant-selection);border-color:var(--cim-widget-variant-selection-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-variant-selection-hover);border-color:var(--cim-widget-variant-selection-hover-border);color:var(--cim-widget-variant-selection-text)}.cim-widget-transcript-unified-card label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-variant-selection-border);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-muted);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-placeholder,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__content{background-color:var(--cim-widget-background-color)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__title-link,.cim-widget-transcript-unified-card .cim-widget-msg-product-card__price,.cim-widget-transcript-unified-card .cim-widget-product-tile-name,.cim-widget-transcript-unified-card .cim-widget-product-tile-price{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:600}.cim-widget-transcript-unified-card .cim-widget-carousel__control{padding:0}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid var(--cim-widget-border-color);border-radius:50%;background-color:var(--cim-widget-background-color);color:var(--cim-widget-muted);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:hover,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:hover{background-color:var(--cim-widget-background-color);border-color:var(--cim-widget-outline);box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-transcript-unified-card .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid var(--cim-widget-foreground);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid var(--cim-widget-border-color)}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-transcript-unified-card .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-transcript-unified-card .cim-widget-markdown>:first-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-transcript-unified-card .cim-widget-markdown>:last-child,.cim-widget-transcript-unified-card .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-ask-cim-suggestions-container,.cim-widget-transcript-unified-card .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-outline);border-radius:var(--cim-widget-chip-radius);background-color:var(--cim-widget-subtle);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:hover,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-transcript-unified-card button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-user-message.embedded,.cim-widget-transcript-unified-card .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-user-message-text{font-family:var( --cim-widget-product-font-family, "Source Sans Pro", var(--cim-widget-font-family, sans-serif) );font-weight:400}.cim-widget-transcript-unified-card .cim-widget-message.embedded{margin-bottom:0}.cim-widget-transcript-unified-card .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-transcript-unified-card .cim-widget-search-bar{gap:.5rem}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-composer-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .625rem;border:1px solid var(--cim-widget-input-border-color, #767676);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-transcript-unified-card .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-transcript-unified-card .cim-widget-connection-status-icon{display:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea){min-height:var(--cim-widget-control-size);padding:0 .625rem;border:0;border-radius:var(--cim-widget-composer-radius);background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-muted);opacity:1}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:var(--cim-widget-composer-radius)}.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-transcript-unified-card .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-transcript-unified-card .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):has(.cim-widget-search-input:focus-visible){outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-search-input:is(input,textarea):focus-visible{outline:none}.cim-widget-transcript-unified-card .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:var(--cim-widget-control-size);border:0;border-radius:50%;background-color:var(--cim-widget-send-background);color:var(--cim-widget-on-primary)}.cim-widget-transcript-unified-card .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:hover{background-color:var(--cim-widget-send-hover-background);border-color:transparent}.cim-widget-transcript-unified-card .cim-widget-search-button-icon:focus-visible{outline:3px solid var(--cim-widget-primary-color, #0b5cab);outline-offset:2px}.cim-widget-transcript-unified-card .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-muted)}@media(max-width:576px){.cim-widget-transcript-unified-card .cim-widget-message-container{padding:var(--cim-widget-mobile-transcript-padding)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper{padding-right:var(--cim-widget-mobile-transcript-padding);padding-left:var(--cim-widget-mobile-transcript-padding)}}.cim-widget-transcript-unified-card .cim-widget-msg-product-card,.cim-widget-transcript-unified-card .cim-widget-cart-box{box-shadow:var(--cim-widget-card-shadow)}.cim-widget-transcript-unified-card .cim-widget-msg-product-card__image-wrapper,.cim-widget-transcript-unified-card .cim-widget-msg-pdp__gallery{border-radius:var(--cim-widget-media-radius)}.cim-widget-transcript-unified-card .cim-widget-cart-qty-selector{border-radius:var(--cim-widget-control-radius)}.cim-widget-transcript-unified-card .cim-widget-search-bar-wrapper:not(.with-attachments) .cim-widget-messaging-composer-group:has(.cim-widget-search-input:is(input,textarea):placeholder-shown) .cim-widget-search-button-icon{background-color:var(--cim-widget-send-idle-background);color:var(--cim-widget-send-idle-foreground)}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(Ve);function Qe(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Rt={},wt={exports:{}},He={};var ln;function _t(){if(ln)return He;ln=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function N(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}N.prototype.isReactComponent={},N.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,K,"setState")},N.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function x(){}x.prototype=N.prototype;function C(F,K,I){this.props=F,this.context=K,this.refs=v,this.updater=I||y}var A=C.prototype=new x;A.constructor=C,w(A,N.prototype),A.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},$={key:!0,ref:!0,__self:!0,__source:!0};function ne(F,K,I){var Se,Me={},ke=null,be=null;if(K!=null)for(Se in K.ref!==void 0&&(be=K.ref),K.key!==void 0&&(ke=""+K.key),K)Y.call(K,Se)&&!$.hasOwnProperty(Se)&&(Me[Se]=K[Se]);var Ie=arguments.length-2;if(Ie===1)Me.children=I;else if(1<Ie){for(var Ue=Array(Ie),lt=0;lt<Ie;lt++)Ue[lt]=arguments[lt+2];Me.children=Ue}if(F&&F.defaultProps)for(Se in Ie=F.defaultProps,Ie)Me[Se]===void 0&&(Me[Se]=Ie[Se]);return{$$typeof:e,type:F,key:ke,ref:be,props:Me,_owner:R.current}}function de(F,K){return{$$typeof:e,type:F.type,key:K,ref:F.ref,props:F.props,_owner:F._owner}}function V(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function ie(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(I){return K[I]})}var fe=/\/+/g;function we(F,K){return typeof F=="object"&&F!==null&&F.key!=null?ie(""+F.key):K.toString(36)}function re(F,K,I,Se,Me){var ke=typeof F;(ke==="undefined"||ke==="boolean")&&(F=null);var be=!1;if(F===null)be=!0;else switch(ke){case"string":case"number":be=!0;break;case"object":switch(F.$$typeof){case e:case t:be=!0}}if(be)return be=F,Me=Me(be),F=Se===""?"."+we(be,0):Se,U(Me)?(I="",F!=null&&(I=F.replace(fe,"$&/")+"/"),re(Me,K,I,"",function(lt){return lt})):Me!=null&&(V(Me)&&(Me=de(Me,I+(!Me.key||be&&be.key===Me.key?"":(""+Me.key).replace(fe,"$&/")+"/")+F)),K.push(Me)),1;if(be=0,Se=Se===""?".":Se+":",U(F))for(var Ie=0;Ie<F.length;Ie++){ke=F[Ie];var Ue=Se+we(ke,Ie);be+=re(ke,K,I,Ue,Me)}else if(Ue=T(F),typeof Ue=="function")for(F=Ue.call(F),Ie=0;!(ke=F.next()).done;)ke=ke.value,Ue=Se+we(ke,Ie++),be+=re(ke,K,I,Ue,Me);else if(ke==="object")throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return be}function oe(F,K,I){if(F==null)return F;var Se=[],Me=0;return re(F,Se,"","",function(ke){return K.call(I,ke,Me++)}),Se}function Ae(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(I){(F._status===0||F._status===-1)&&(F._status=1,F._result=I)},function(I){(F._status===0||F._status===-1)&&(F._status=2,F._result=I)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._result}var se={current:null},J={transition:null},ae={ReactCurrentDispatcher:se,ReactCurrentBatchConfig:J,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return He.Children={map:oe,forEach:function(F,K,I){oe(F,function(){K.apply(this,arguments)},I)},count:function(F){var K=0;return oe(F,function(){K++}),K},toArray:function(F){return oe(F,function(K){return K})||[]},only:function(F){if(!V(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},He.Component=N,He.Fragment=n,He.Profiler=o,He.PureComponent=C,He.StrictMode=r,He.Suspense=d,He.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ae,He.act=k,He.cloneElement=function(F,K,I){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var Se=w({},F.props),Me=F.key,ke=F.ref,be=F._owner;if(K!=null){if(K.ref!==void 0&&(ke=K.ref,be=R.current),K.key!==void 0&&(Me=""+K.key),F.type&&F.type.defaultProps)var Ie=F.type.defaultProps;for(Ue in K)Y.call(K,Ue)&&!$.hasOwnProperty(Ue)&&(Se[Ue]=K[Ue]===void 0&&Ie!==void 0?Ie[Ue]:K[Ue])}var Ue=arguments.length-2;if(Ue===1)Se.children=I;else if(1<Ue){Ie=Array(Ue);for(var lt=0;lt<Ue;lt++)Ie[lt]=arguments[lt+2];Se.children=Ie}return{$$typeof:e,type:F.type,key:Me,ref:ke,props:Se,_owner:be}},He.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},He.createElement=ne,He.createFactory=function(F){var K=ne.bind(null,F);return K.type=F,K},He.createRef=function(){return{current:null}},He.forwardRef=function(F){return{$$typeof:l,render:F}},He.isValidElement=V,He.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:Ae}},He.memo=function(F,K){return{$$typeof:f,type:F,compare:K===void 0?null:K}},He.startTransition=function(F){var K=J.transition;J.transition={};try{F()}finally{J.transition=K}},He.unstable_act=k,He.useCallback=function(F,K){return se.current.useCallback(F,K)},He.useContext=function(F){return se.current.useContext(F)},He.useDebugValue=function(){},He.useDeferredValue=function(F){return se.current.useDeferredValue(F)},He.useEffect=function(F,K){return se.current.useEffect(F,K)},He.useId=function(){return se.current.useId()},He.useImperativeHandle=function(F,K,I){return se.current.useImperativeHandle(F,K,I)},He.useInsertionEffect=function(F,K){return se.current.useInsertionEffect(F,K)},He.useLayoutEffect=function(F,K){return se.current.useLayoutEffect(F,K)},He.useMemo=function(F,K){return se.current.useMemo(F,K)},He.useReducer=function(F,K,I){return se.current.useReducer(F,K,I)},He.useRef=function(F){return se.current.useRef(F)},He.useState=function(F){return se.current.useState(F)},He.useSyncExternalStore=function(F,K,I){return se.current.useSyncExternalStore(F,K,I)},He.useTransition=function(){return se.current.useTransition()},He.version="18.3.1",He}var Cn;function mr(){return Cn||(Cn=1,wt.exports=_t()),wt.exports}var Zi;function Vo(){if(Zi)return Rt;Zi=1;var e=mr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(l,d,f){var p,m={},T=null,y=null;f!==void 0&&(T=""+f),d.key!==void 0&&(T=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(l&&l.defaultProps)for(p in d=l.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:l,key:T,ref:y,props:m,_owner:o.current}}return Rt.Fragment=n,Rt.jsx=u,Rt.jsxs=u,Rt}var qo;function Rn(){return qo||(qo=1,ft.exports=Vo()),ft.exports}var _=Rn();const Pr=Object.create(null);Pr.open="0",Pr.close="1",Pr.ping="2",Pr.pong="3",Pr.message="4",Pr.upgrade="5",Pr.noop="6";const Vu=Object.create(null);Object.keys(Pr).forEach(e=>{Vu[Pr[e]]=e});const Od={type:"error",data:"parser error"},T0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",w0=typeof ArrayBuffer=="function",_0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,Id=({type:e,data:t},n,r)=>T0&&t instanceof Blob?n?r(t):x0(t,r):w0&&(t instanceof ArrayBuffer||_0(t))?n?r(t):x0(new Blob([t]),r):r(Pr[e]+(t||"")),x0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function S0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Rd;function pS(e,t){if(T0&&e.data instanceof Blob)return e.data.arrayBuffer().then(S0).then(t);if(w0&&(e.data instanceof ArrayBuffer||_0(e.data)))return t(S0(e.data));Id(e,!1,n=>{Rd||(Rd=new TextEncoder),t(Rd.encode(n))})}const v0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",na=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<v0.length;e++)na[v0.charCodeAt(e)]=e;const mS=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,l,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=na[e.charCodeAt(r)],u=na[e.charCodeAt(r+1)],l=na[e.charCodeAt(r+2)],d=na[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|l>>2,p[o++]=(l&3)<<6|d&63;return f},gS=typeof ArrayBuffer=="function",Ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:A0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:ES(e.substring(1),t)}:Vu[n]?e.length>1?{type:Vu[n],data:e.substring(1)}:{type:Vu[n]}:Od},ES=(e,t)=>{if(gS){const n=mS(e);return A0(n,t)}else return{base64:!0,data:e}},A0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,C0="",yS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{Id(a,!1,l=>{r[u]=l,++o===n&&t(r.join(C0))})})},bS=(e,t)=>{const n=e.split(C0),r=[];for(let o=0;o<n.length;o++){const a=Ld(n[o],t);if(r.push(a),a.type==="error")break}return r};function TS(){return new TransformStream({transform(e,t){pS(e,n=>{const r=n.length;let o;if(r<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,r);else if(r<65536){o=new Uint8Array(3);const a=new DataView(o.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{o=new Uint8Array(9);const a=new DataView(o.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(o[0]|=128),t.enqueue(o),t.enqueue(n)})}})}let Dd;function qu(e){return e.reduce((t,n)=>t+n.length,0)}function Yu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function wS(e,t){Dd||(Dd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,l){for(n.push(u);;){if(r===0){if(qu(n)<1)break;const d=Yu(n,1);a=(d[0]&128)===128,o=d[0]&127,o<126?r=3:o===126?r=1:r=2}else if(r===1){if(qu(n)<2)break;const d=Yu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(qu(n)<8)break;const d=Yu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(qu(n)<o)break;const d=Yu(n,o);l.enqueue(Ld(a?d:Dd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Od);break}}}})}const k0=4;function Ht(e){if(e)return _S(e)}function _S(e){for(var t in Ht.prototype)e[t]=Ht.prototype[t];return e}Ht.prototype.on=Ht.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Ht.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Ht.prototype.off=Ht.prototype.removeListener=Ht.prototype.removeAllListeners=Ht.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n=this._callbacks["$"+e];if(!n)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var r,o=0;o<n.length;o++)if(r=n[o],r===t||r.fn===t){n.splice(o,1);break}return n.length===0&&delete this._callbacks["$"+e],this},Ht.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){n=n.slice(0);for(var r=0,o=n.length;r<o;++r)n[r].apply(this,t)}return this},Ht.prototype.emitReserved=Ht.prototype.emit,Ht.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Ht.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Wu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),rr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),xS="arraybuffer";function jU(){}function N0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const SS=rr.setTimeout,vS=rr.clearTimeout;function Gu(e,t){t.useNativeTimers?(e.setTimeoutFn=SS.bind(rr),e.clearTimeoutFn=vS.bind(rr)):(e.setTimeoutFn=rr.setTimeout.bind(rr),e.clearTimeoutFn=rr.clearTimeout.bind(rr))}const AS=1.33;function CS(e){return typeof e=="string"?kS(e):Math.ceil((e.byteLength||e.size)*AS)}function kS(e){let t=0,n=0;for(let r=0,o=e.length;r<o;r++)t=e.charCodeAt(r),t<128?n+=1:t<2048?n+=2:t<55296||t>=57344?n+=3:(r++,n+=4);return n}function P0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function NS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function PS(e){let t={},n=e.split("&");for(let r=0,o=n.length;r<o;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class OS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Md extends Ht{constructor(t){super(),this.writable=!1,Gu(this,t),this.opts=t,this.query=t.query,this.socket=t.socket,this.supportsBinary=!t.forceBase64}onError(t,n,r){return super.emitReserved("error",new OS(t,n,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return(this.readyState==="opening"||this.readyState==="open")&&(this.doClose(),this.onClose()),this}send(t){this.readyState==="open"&&this.write(t)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(t){const n=Ld(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=NS(t);return n.length?"?"+n:""}}class IS extends Md{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};bS(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,yS(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=P0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let O0=!1;try{O0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const RS=O0;function LS(){}class DS extends IS{constructor(t){if(super(t),typeof location!="undefined"){const n=location.protocol==="https:";let r=location.port;r||(r=n?"443":"80"),this.xd=typeof location!="undefined"&&t.hostname!==location.hostname||r!==t.port}}doWrite(t,n){const r=this.request({method:"POST",data:t});r.on("success",n),r.on("error",(o,a)=>{this.onError("xhr post error",o,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Or extends Ht{constructor(t,n,r){super(),this.createRequest=t,Gu(this,r),this._opts=r,this._method=r.method||"GET",this._uri=n,this._data=r.data!==void 0?r.data:null,this._create()}_create(){var t;const n=N0(this._opts,"agent","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","autoUnref");n.xdomain=!!this._opts.xd;const r=this._xhr=this.createRequest(n);try{r.open(this._method,this._uri,!0);try{if(this._opts.extraHeaders){r.setDisableHeaderCheck&&r.setDisableHeaderCheck(!0);for(let o in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(o)&&r.setRequestHeader(o,this._opts.extraHeaders[o])}}catch(o){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(o){}try{r.setRequestHeader("Accept","*/*")}catch(o){}(t=this._opts.cookieJar)===null||t===void 0||t.addCookies(r),"withCredentials"in r&&(r.withCredentials=this._opts.withCredentials),this._opts.requestTimeout&&(r.timeout=this._opts.requestTimeout),r.onreadystatechange=()=>{var o;r.readyState===3&&((o=this._opts.cookieJar)===null||o===void 0||o.parseCookies(r.getResponseHeader("set-cookie"))),r.readyState===4&&(r.status===200||r.status===1223?this._onLoad():this.setTimeoutFn(()=>{this._onError(typeof r.status=="number"?r.status:0)},0))},r.send(this._data)}catch(o){this.setTimeoutFn(()=>{this._onError(o)},0);return}typeof document!="undefined"&&(this._index=Or.requestsCount++,Or.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=LS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Or.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Or.requestsCount=0,Or.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",I0);else if(typeof addEventListener=="function"){const e="onpagehide"in rr?"pagehide":"unload";addEventListener(e,I0,!1)}}function I0(){for(let e in Or.requests)Or.requests.hasOwnProperty(e)&&Or.requests[e].abort()}const MS=(function(){const e=R0({xdomain:!1});return e&&e.responseType!==null})();class FS extends DS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=MS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Or(R0,this.uri(),t)}}function R0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||RS))return new XMLHttpRequest}catch(n){}if(!t)try{return new rr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const L0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class BS extends Md{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=L0?{}:N0(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=this.createSocket(t,n,r)}catch(o){return this.emitReserved("error",o)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=t=>this.onClose({description:"websocket connection closed",context:t}),this.ws.onmessage=t=>this.onData(t.data),this.ws.onerror=t=>this.onError("websocket error",t)}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;Id(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){typeof this.ws!="undefined"&&(this.ws.onerror=()=>{},this.ws.close(),this.ws=null)}uri(){const t=this.opts.secure?"wss":"ws",n=this.query||{};return this.opts.timestampRequests&&(n[this.opts.timestampParam]=P0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Fd=rr.WebSocket||rr.MozWebSocket;class US extends BS{createSocket(t,n,r){return L0?new Fd(t,n,r):n?new Fd(t,n):new Fd(t)}doWrite(t,n){this.ws.send(n)}}class HS extends Md{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=wS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=TS();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:l,value:d})=>{l||(this.onPacket(d),a())}).catch(l=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&Wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const zS={websocket:US,webtransport:HS,polling:FS},jS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,$S=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Bd(e){if(e.length>8e3)throw"URI too long";const t=e,n=e.indexOf("["),r=e.indexOf("]");n!=-1&&r!=-1&&(e=e.substring(0,n)+e.substring(n,r).replace(/:/g,";")+e.substring(r,e.length));let o=jS.exec(e||""),a={},u=14;for(;u--;)a[$S[u]]=o[u]||"";return n!=-1&&r!=-1&&(a.source=t,a.host=a.host.substring(1,a.host.length-1).replace(/;/g,":"),a.authority=a.authority.replace("[","").replace("]","").replace(/;/g,":"),a.ipv6uri=!0),a.pathNames=VS(a,a.path),a.queryKey=qS(a,a.query),a}function VS(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function qS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Ud=typeof addEventListener=="function"&&typeof removeEventListener=="function",Xu=[];Ud&&addEventListener("offline",()=>{Xu.forEach(e=>e())},!1);class Ti extends Ht{constructor(t,n){if(super(),this.binaryType=xS,this.writeBuffer=[],this._prevBufferLen=0,this._pingInterval=-1,this._pingTimeout=-1,this._maxPayload=-1,this._pingTimeoutTime=1/0,t&&typeof t=="object"&&(n=t,t=null),t){const r=Bd(t);n.hostname=r.host,n.secure=r.protocol==="https"||r.protocol==="wss",n.port=r.port,r.query&&(n.query=r.query)}else n.host&&(n.hostname=Bd(n.host).host);Gu(this,n),this.secure=n.secure!=null?n.secure:typeof location!="undefined"&&location.protocol==="https:",n.hostname&&!n.port&&(n.port=this.secure?"443":"80"),this.hostname=n.hostname||(typeof location!="undefined"?location.hostname:"localhost"),this.port=n.port||(typeof location!="undefined"&&location.port?location.port:this.secure?"443":"80"),this.transports=[],this._transportsByName={},n.transports.forEach(r=>{const o=r.prototype.name;this.transports.push(o),this._transportsByName[o]=r}),this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},n),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),typeof this.opts.query=="string"&&(this.opts.query=PS(this.opts.query)),Ud&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Xu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=k0,n.transport=t,this.id&&(n.sid=this.id);const r=Object.assign({},this.opts,{query:n,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[t]);return new this._transportsByName[t](r)}_open(){if(this.transports.length===0){this.setTimeoutFn(()=>{this.emitReserved("error","No transports available")},0);return}const t=this.opts.rememberUpgrade&&Ti.priorWebsocketSuccess&&this.transports.indexOf("websocket")!==-1?"websocket":this.transports[0];this.readyState="opening";const n=this.createTransport(t);n.open(),this.setTransport(n)}setTransport(t){this.transport&&this.transport.removeAllListeners(),this.transport=t,t.on("drain",this._onDrain.bind(this)).on("packet",this._onPacket.bind(this)).on("error",this._onError.bind(this)).on("close",n=>this._onClose("transport close",n))}onOpen(){this.readyState="open",Ti.priorWebsocketSuccess=this.transport.name==="websocket",this.emitReserved("open"),this.flush()}_onPacket(t){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing")switch(this.emitReserved("packet",t),this.emitReserved("heartbeat"),t.type){case"open":this.onHandshake(JSON.parse(t.data));break;case"ping":this._sendPacket("pong"),this.emitReserved("ping"),this.emitReserved("pong"),this._resetPingTimeout();break;case"error":const n=new Error("server error");n.code=t.data,this._onError(n);break;case"message":this.emitReserved("data",t.data),this.emitReserved("message",t.data);break}}onHandshake(t){this.emitReserved("handshake",t),this.id=t.sid,this.transport.query.sid=t.sid,this._pingInterval=t.pingInterval,this._pingTimeout=t.pingTimeout,this._maxPayload=t.maxPayload,this.onOpen(),this.readyState!=="closed"&&this._resetPingTimeout()}_resetPingTimeout(){this.clearTimeoutFn(this._pingTimeoutTimer);const t=this._pingInterval+this._pingTimeout;this._pingTimeoutTime=Date.now()+t,this._pingTimeoutTimer=this.setTimeoutFn(()=>{this._onClose("ping timeout")},t),this.opts.autoUnref&&this._pingTimeoutTimer.unref()}_onDrain(){this.writeBuffer.splice(0,this._prevBufferLen),this._prevBufferLen=0,this.writeBuffer.length===0?this.emitReserved("drain"):this.flush()}flush(){if(this.readyState!=="closed"&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const t=this._getWritablePackets();this.transport.send(t),this._prevBufferLen=t.length,this.emitReserved("flush")}}_getWritablePackets(){if(!(this._maxPayload&&this.transport.name==="polling"&&this.writeBuffer.length>1))return this.writeBuffer;let n=1;for(let r=0;r<this.writeBuffer.length;r++){const o=this.writeBuffer[r].data;if(o&&(n+=CS(o)),r>0&&n>this._maxPayload)return this.writeBuffer.slice(0,r);n+=2}return this.writeBuffer}_hasPingExpired(){if(!this._pingTimeoutTime)return!0;const t=Date.now()>this._pingTimeoutTime;return t&&(this._pingTimeoutTime=0,Wu(()=>{this._onClose("ping timeout")},this.setTimeoutFn)),t}write(t,n,r){return this._sendPacket("message",t,n,r),this}send(t,n,r){return this._sendPacket("message",t,n,r),this}_sendPacket(t,n,r,o){if(typeof n=="function"&&(o=n,n=void 0),typeof r=="function"&&(o=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const a={type:t,data:n,options:r};this.emitReserved("packetCreate",a),this.writeBuffer.push(a),o&&this.once("flush",o),this.flush()}close(){const t=()=>{this._onClose("forced close"),this.transport.close()},n=()=>{this.off("upgrade",n),this.off("upgradeError",n),t()},r=()=>{this.once("upgrade",n),this.once("upgradeError",n)};return(this.readyState==="opening"||this.readyState==="open")&&(this.readyState="closing",this.writeBuffer.length?this.once("drain",()=>{this.upgrading?r():t()}):this.upgrading?r():t()),this}_onError(t){if(Ti.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),Ud&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Xu.indexOf(this._offlineEventListener);r!==-1&&Xu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ti.protocol=k0;class YS extends Ti{constructor(){super(...arguments),this._upgrades=[]}onOpen(){if(super.onOpen(),this.readyState==="open"&&this.opts.upgrade)for(let t=0;t<this._upgrades.length;t++)this._probe(this._upgrades[t])}_probe(t){let n=this.createTransport(t),r=!1;Ti.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ti.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(p(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const T=new Error("probe error");T.transport=n.name,this.emitReserved("upgradeError",T)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=m=>{const T=new Error("probe error: "+m);T.transport=n.name,a(),this.emitReserved("upgradeError",T)};function l(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",l),this.off("close",d),this.off("upgrading",f)};n.once("open",o),n.once("error",u),n.once("close",l),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let WS=class extends YS{constructor(t,n={}){const r=typeof t=="object",o=r?B({},t):B({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>zS[a]).filter(a=>!!a)),super(r?o:t,o)}};function GS(e,t="",n){let r=e;n=n||typeof location!="undefined"&&location,e==null&&(e=n.protocol+"//"+n.host),typeof e=="string"&&(e.charAt(0)==="/"&&(e.charAt(1)==="/"?e=n.protocol+e:e=n.host+e),/^(https?|wss?):\/\//.test(e)||(typeof n!="undefined"?e=n.protocol+"//"+e:e="https://"+e),r=Bd(e)),r.port||(/^(http|ws)$/.test(r.protocol)?r.port="80":/^(http|ws)s$/.test(r.protocol)&&(r.port="443")),r.path=r.path||"/";const a=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+a+":"+r.port+t,r.href=r.protocol+"://"+a+(n&&n.port===r.port?"":":"+r.port),r}const XS=typeof ArrayBuffer=="function",KS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,D0=Object.prototype.toString,QS=typeof Blob=="function"||typeof Blob!="undefined"&&D0.call(Blob)==="[object BlobConstructor]",JS=typeof File=="function"||typeof File!="undefined"&&D0.call(File)==="[object FileConstructor]";function Hd(e){return XS&&(e instanceof ArrayBuffer||KS(e))||QS&&e instanceof Blob||JS&&e instanceof File}function Ku(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ku(e[n]))return!0;return!1}if(Hd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ku(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ku(e[n]))return!0;return!1}function ZS(e){const t=[],n=e.data,r=e;return r.data=Qu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Qu(e,t,n){if(!e)return e;if(Hd(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let o=0;o<e.length;o++)r[o]=Qu(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Qu(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=Qu(e[o],t));return r}return e}function ev(e,t){return e.data=zd(e.data,t),delete e.attachments,e}function zd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}else if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=zd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=zd(e[n],t));return e}const tv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var nt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(nt||(nt={}));class nv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&Ku(t)?this.encodeAsBinary({type:t.type===nt.EVENT?nt.BINARY_EVENT:nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===nt.BINARY_EVENT||t.type===nt.BINARY_ACK)&&(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=ZS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class jd extends Ht{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===nt.BINARY_EVENT;r||n.type===nt.BINARY_ACK?(n.type=r?nt.EVENT:nt.ACK,this.reconstructor=new rv(n)):super.emitReserved("decoded",n)}else if(Hd(t)||t.base64)if(this.reconstructor)n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n));else throw new Error("got binary data when not reconstructing a packet");else throw new Error("Unknown type: "+t)}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===nt.BINARY_EVENT||r.type===nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!iv(l)||l<1)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(jd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case nt.CONNECT:return M0(n);case nt.DISCONNECT:return n===void 0;case nt.CONNECT_ERROR:return typeof n=="string"||M0(n);case nt.EVENT:case nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&tv.indexOf(n[0])===-1);case nt.ACK:case nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class rv{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const iv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function M0(e){return Object.prototype.toString.call(e)==="[object Object]"}const ov=Object.freeze(Object.defineProperty({__proto__:null,Decoder:jd,Encoder:nv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function gr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const sv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class F0 extends Ht{constructor(t,n,r){super(),this.connected=!1,this.recovered=!1,this.receiveBuffer=[],this.sendBuffer=[],this._queue=[],this._queueSeq=0,this.ids=0,this.acks={},this.flags={},this.io=t,this.nsp=n,r&&r.auth&&(this.auth=r.auth),this._opts=Object.assign({},r),this.io._autoConnect&&this.open()}get disconnected(){return!this.connected}subEvents(){if(this.subs)return;const t=this.io;this.subs=[gr(t,"open",this.onopen.bind(this)),gr(t,"packet",this.onpacket.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(t,"close",this.onclose.bind(this))]}get active(){return!!this.subs}connect(){return this.connected?this:(this.subEvents(),this.io._reconnecting||this.io.open(),this.io._readyState==="open"&&this.onopen(),this)}open(){return this.connect()}send(...t){return t.unshift("message"),this.emit.apply(this,t),this}emit(t,...n){var r,o,a;if(sv.hasOwnProperty(t))throw new Error('"'+t.toString()+'" is a reserved event name');if(n.unshift(t),this._opts.retries&&!this.flags.fromQueue&&!this.flags.volatile)return this._addToQueue(n),this;const u={type:nt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const l=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!l||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let l=0;l<this.sendBuffer.length;l++)this.sendBuffer[l].id===t&&this.sendBuffer.splice(l,1);n.call(this,new Error("operation has timed out"))},o),u=(...l)=>{this.io.clearTimeoutFn(a),n.apply(this,l)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,l)=>u?o(u):r(l);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>(this._queue[0],o!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(o)):(this._queue.shift(),n&&n(null,...a)),r.pending=!1,this._drainQueue())),this._queue.push(r),this._drainQueue()}_drainQueue(t=!1){if(!this.connected||this._queue.length===0)return;const n=this._queue[0];n.pending&&!t||(n.pending=!0,n.tryCount++,this.flags=n.flags,this.emit.apply(this,n.args))}packet(t){t.nsp=this.nsp,this.io._packet(t)}onopen(){typeof this.auth=="function"?this.auth(t=>{this._sendConnectPacket(t)}):this._sendConnectPacket(this.auth)}_sendConnectPacket(t){this.packet({type:nt.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},t):t})}onerror(t){this.connected||this.emitReserved("connect_error",t)}onclose(t,n){this.connected=!1,delete this.id,this.emitReserved("disconnect",t,n),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach(t=>{if(!this.sendBuffer.some(r=>String(r.id)===t)){const r=this.acks[t];delete this.acks[t],r.withError&&r.call(this,new Error("socket has been disconnected"))}})}onpacket(t){if(t.nsp===this.nsp)switch(t.type){case nt.CONNECT:t.data&&t.data.sid?this.onconnect(t.data.sid,t.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case nt.EVENT:case nt.BINARY_EVENT:this.onevent(t);break;case nt.ACK:case nt.BINARY_ACK:this.onack(t);break;case nt.DISCONNECT:this.ondisconnect();break;case nt.CONNECT_ERROR:this.destroy();const r=new Error(t.data.message);r.data=t.data.data,this.emitReserved("connect_error",r);break}}onevent(t){const n=t.data||[];t.id!=null&&n.push(this.ack(t.id)),this.connected?this.emitEvent(n):this.receiveBuffer.push(Object.freeze(n))}emitEvent(t){if(this._anyListeners&&this._anyListeners.length){const n=this._anyListeners.slice();for(const r of n)r.apply(this,t)}super.emit.apply(this,t),this._pid&&t.length&&typeof t[t.length-1]=="string"&&(this._lastOffset=t[t.length-1])}ack(t){const n=this;let r=!1;return function(...o){r||(r=!0,n.packet({type:nt.ACK,id:t,data:o}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:nt.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(t){return this.flags.compress=t,this}get volatile(){return this.flags.volatile=!0,this}timeout(t){return this.flags.timeout=t,this}onAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(t),this}prependAny(t){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(t),this}offAny(t){if(!this._anyListeners)return this;if(t){const n=this._anyListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyListeners=[];return this}listenersAny(){return this._anyListeners||[]}onAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.push(t),this}prependAnyOutgoing(t){return this._anyOutgoingListeners=this._anyOutgoingListeners||[],this._anyOutgoingListeners.unshift(t),this}offAnyOutgoing(t){if(!this._anyOutgoingListeners)return this;if(t){const n=this._anyOutgoingListeners;for(let r=0;r<n.length;r++)if(t===n[r])return n.splice(r,1),this}else this._anyOutgoingListeners=[];return this}listenersAnyOutgoing(){return this._anyOutgoingListeners||[]}notifyOutgoingListeners(t){if(this._anyOutgoingListeners&&this._anyOutgoingListeners.length){const n=this._anyOutgoingListeners.slice();for(const r of n)r.apply(this,t.data)}}}function Yo(e){e=e||{},this.ms=e.min||100,this.max=e.max||1e4,this.factor=e.factor||2,this.jitter=e.jitter>0&&e.jitter<=1?e.jitter:0,this.attempts=0}Yo.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),n=Math.floor(t*this.jitter*e);e=(Math.floor(t*10)&1)==0?e-n:e+n}return Math.min(e,this.max)|0},Yo.prototype.reset=function(){this.attempts=0},Yo.prototype.setMin=function(e){this.ms=e},Yo.prototype.setMax=function(e){this.max=e},Yo.prototype.setJitter=function(e){this.jitter=e};class $d extends Ht{constructor(t,n){var r;super(),this.nsps={},this.subs=[],t&&typeof t=="object"&&(n=t,t=void 0),n=n||{},n.path=n.path||"/socket.io",this.opts=n,Gu(this,n),this.reconnection(n.reconnection!==!1),this.reconnectionAttempts(n.reconnectionAttempts||1/0),this.reconnectionDelay(n.reconnectionDelay||1e3),this.reconnectionDelayMax(n.reconnectionDelayMax||5e3),this.randomizationFactor((r=n.randomizationFactor)!==null&&r!==void 0?r:.5),this.backoff=new Yo({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const o=n.parser||ov;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=n.autoConnect!==!1,this._autoConnect&&this.open()}reconnection(t){return arguments.length?(this._reconnection=!!t,t||(this.skipReconnect=!0),this):this._reconnection}reconnectionAttempts(t){return t===void 0?this._reconnectionAttempts:(this._reconnectionAttempts=t,this)}reconnectionDelay(t){var n;return t===void 0?this._reconnectionDelay:(this._reconnectionDelay=t,(n=this.backoff)===null||n===void 0||n.setMin(t),this)}randomizationFactor(t){var n;return t===void 0?this._randomizationFactor:(this._randomizationFactor=t,(n=this.backoff)===null||n===void 0||n.setJitter(t),this)}reconnectionDelayMax(t){var n;return t===void 0?this._reconnectionDelayMax:(this._reconnectionDelayMax=t,(n=this.backoff)===null||n===void 0||n.setMax(t),this)}timeout(t){return arguments.length?(this._timeout=t,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&this.backoff.attempts===0&&this.reconnect()}open(t){if(~this._readyState.indexOf("open"))return this;this.engine=new WS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=gr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=gr(n,"error",a);if(this._timeout!==!1){const l=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},l);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(gr(t,"ping",this.onping.bind(this)),gr(t,"data",this.ondata.bind(this)),gr(t,"error",this.onerror.bind(this)),gr(t,"close",this.onclose.bind(this)),gr(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(t){try{this.decoder.add(t)}catch(n){this.onclose("parse error",n)}}ondecoded(t){Wu(()=>{this.emitReserved("packet",t)},this.setTimeoutFn)}onerror(t){this.emitReserved("error",t)}socket(t,n){let r=this.nsps[t];return r?this._autoConnect&&!r.active&&r.connect():(r=new F0(this,t,n),this.nsps[t]=r),r}_destroy(t){const n=Object.keys(this.nsps);for(const r of n)if(this.nsps[r].active)return;this._close()}_packet(t){const n=this.encoder.encode(t);for(let r=0;r<n.length;r++)this.engine.write(n[r],t.options)}cleanup(){this.subs.forEach(t=>t()),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close")}disconnect(){return this._close()}onclose(t,n){var r;this.cleanup(),(r=this.engine)===null||r===void 0||r.close(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",t,n),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const t=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const n=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn(()=>{t.skipReconnect||(this.emitReserved("reconnect_attempt",t.backoff.attempts),!t.skipReconnect&&t.open(o=>{o?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",o)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const ra={};function Ju(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=GS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=ra[o]&&a in ra[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new $d(r,t):(ra[o]||(ra[o]=new $d(r,t)),d=ra[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Ju,{Manager:$d,Socket:F0,io:Ju,connect:Ju});var av=function(e){return(function(t){return!!t&&typeof t=="object"})(e)&&!(function(t){var n=Object.prototype.toString.call(t);return n==="[object RegExp]"||n==="[object Date]"||(function(r){return r.$$typeof===uv})(t)})(e)},uv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ia(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Wo((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function lv(e,t,n){return e.concat(t).map((function(r){return ia(r,n)}))}function B0(e){return Object.keys(e).concat((function(t){return Object.getOwnPropertySymbols?Object.getOwnPropertySymbols(t).filter((function(n){return Object.propertyIsEnumerable.call(t,n)})):[]})(e))}function U0(e,t){try{return t in e}catch(n){return!1}}function cv(e,t,n){var r={};return n.isMergeableObject(e)&&B0(e).forEach((function(o){r[o]=ia(e[o],n)})),B0(t).forEach((function(o){(function(a,u){return U0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(U0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Wo;var l=u.customMerge(a);return typeof l=="function"?l:Wo})(o,n)(e[o],t[o],n):r[o]=ia(t[o],n))})),r}function Wo(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||lv,n.isMergeableObject=n.isMergeableObject||av,n.cloneUnlessOtherwiseSpecified=ia;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):cv(e,t,n):ia(t,n)}Wo.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Wo(n,r,t)}),{})};var dv=Wo;let fv=class{constructor(t){Object.assign(this,t)}};function kn(e){if(e)return(function(t){for(var n in kn.prototype)t[n]=kn.prototype[n];return t})(e)}kn.prototype.on=kn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},kn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},kn.prototype.off=kn.prototype.removeListener=kn.prototype.removeAllListeners=kn.prototype.removeEventListener=function(e,t){if(this._callbacks=this._callbacks||{},arguments.length==0)return this._callbacks={},this;var n,r=this._callbacks["$"+e];if(!r)return this;if(arguments.length==1)return delete this._callbacks["$"+e],this;for(var o=0;o<r.length;o++)if((n=r[o])===t||n.fn===t){r.splice(o,1);break}return r.length===0&&delete this._callbacks["$"+e],this},kn.prototype.emit=function(e){this._callbacks=this._callbacks||{};for(var t=new Array(arguments.length-1),n=this._callbacks["$"+e],r=1;r<arguments.length;r++)t[r-1]=arguments[r];if(n){r=0;for(var o=(n=n.slice(0)).length;r<o;++r)n[r].apply(this,t)}return this},kn.prototype.emitReserved=kn.prototype.emit,kn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},kn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const hv=typeof ArrayBuffer=="function",H0=Object.prototype.toString,pv=typeof Blob=="function"||typeof Blob!="undefined"&&H0.call(Blob)==="[object BlobConstructor]",mv=typeof File=="function"||typeof File!="undefined"&&H0.call(File)==="[object FileConstructor]";function Vd(e){return hv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||pv&&e instanceof Blob||mv&&e instanceof File}function Zu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Zu(e[n]))return!0;return!1}if(Vd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Zu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Zu(e[n]))return!0;return!1}function gv(e){const t=[],n=e.data,r=e;return r.data=qd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function qd(e,t){if(!e)return e;if(Vd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=qd(e[r],t);return n}if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=qd(e[r],t));return n}return e}function Ev(e,t){return e.data=Yd(e.data,t),delete e.attachments,e}function Yd(e,t){if(!e)return e;if(e&&e._placeholder===!0){if(typeof e.num=="number"&&e.num>=0&&e.num<t.length)return t[e.num];throw new Error("illegal attachments")}if(Array.isArray(e))for(let n=0;n<e.length;n++)e[n]=Yd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Yd(e[n],t));return e}const yv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Nt;(function(e){e[e.CONNECT=0]="CONNECT",e[e.DISCONNECT=1]="DISCONNECT",e[e.EVENT=2]="EVENT",e[e.ACK=3]="ACK",e[e.CONNECT_ERROR=4]="CONNECT_ERROR",e[e.BINARY_EVENT=5]="BINARY_EVENT",e[e.BINARY_ACK=6]="BINARY_ACK"})(Nt||(Nt={}));class bv{constructor(t){this.replacer=t}encode(t){return t.type!==Nt.EVENT&&t.type!==Nt.ACK||!Zu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Nt.EVENT?Nt.BINARY_EVENT:Nt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Nt.BINARY_EVENT&&t.type!==Nt.BINARY_ACK||(n+=t.attachments+"-"),t.nsp&&t.nsp!=="/"&&(n+=t.nsp+","),t.id!=null&&(n+=t.id),t.data!=null&&(n+=JSON.stringify(t.data,this.replacer)),n}encodeAsBinary(t){const n=gv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class Wd extends kn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Nt.BINARY_EVENT;r||n.type===Nt.BINARY_ACK?(n.type=r?Nt.EVENT:Nt.ACK,this.reconstructor=new Tv(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Vd(t)&&!t.base64)throw new Error("Unknown type: "+t);if(!this.reconstructor)throw new Error("got binary data when not reconstructing a packet");n=this.reconstructor.takeBinaryData(t),n&&(this.reconstructor=null,super.emitReserved("decoded",n))}}decodeString(t){let n=0;const r={type:Number(t.charAt(0))};if(Nt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Nt.BINARY_EVENT||r.type===Nt.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const l=Number(u);if(!wv(l)||l<0)throw new Error("Illegal attachments");if(l>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=l}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(!Wd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Nt.CONNECT:return z0(n);case Nt.DISCONNECT:return n===void 0;case Nt.CONNECT_ERROR:return typeof n=="string"||z0(n);case Nt.EVENT:case Nt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&yv.indexOf(n[0])===-1);case Nt.ACK:case Nt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Tv{constructor(t){this.packet=t,this.buffers=[],this.reconPack=t}takeBinaryData(t){if(this.buffers.push(t),this.buffers.length===this.reconPack.attachments){const n=Ev(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const wv=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const j0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],$0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([l,d])=>{const f=[...a,t(l)];return[e(l),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((l=>l[1])):Object.fromEntries(u)},V0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),_v=$0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),j0),q0=$0(V0,V0,j0),xv={Encoder:class extends bv{encode(e){var t,n;return super.encode(me(B({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],_v(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Wd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?q0(r):r)):n instanceof Object?q0(n):n)):t))}}},Sv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class vv{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",customerId:a,tenantId:u,socketOptions:l={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const T=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=T==null?void 0:T[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${o}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[Sv,l,{parser:xv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Ju(d,dv.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*$u(2,this.reconnectAttempts),this.maxReconnectDelay);console.info(`[Copilot SDK] Retry #${this.reconnectAttempts+1} in ${t}ms...`),this.reconnectTimeout=setTimeout((()=>{this.socket.connected||this.socket.active||(this.reconnectAttempts++,this.reconnect())}),t)}else console.error("[Copilot SDK] Max reconnect attempts reached.")}reconnect(){this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts||(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.socket.connect())}browse(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return et(this,null,function*(){return this.asyncResponse("faceted_navigation",t,n)})}cancelRequest(t,n){return this.asyncResponse("cancel",t,n)}conversationReset(t,n){return this.asyncResponse("conversation_reset",t,n)}productView(t,n){return et(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return et(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return et(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return et(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(o=>{n&&n(o),r(o)}))}))})}on(t,n){return this.socket.on(t,n),n}once(t,n){this.socket.once(t,n)}off(t,n){this.socket.off(t,n)}disconnect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.offInternalHandlers(),this.socket.disconnect()}onDisconnect(t){this.socket.on("disconnect",t)}asyncResponse(t,n,r){return et(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return Pd(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new Jr(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new Jr(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new Jr(p==null?void 0:p())}})})((({emit:u,cancel:l})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&l(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>et(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,l)=>this.socket.emit(t,n,(d=>{d.name==="error"?l(new fv(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}const Y0=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),W0=(e,t,n)=>{if(n==="override"&&t.length>0)return t;const r=n==="prepend"?[...t,...e]:[...e,...t];return Array.from(new Set(r))};var D=mr();const eo=Qe(D);var G0=Symbol.for("immer-nothing"),X0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function ir(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Go=Object.getPrototypeOf;function Xo(e){return!!e&&!!e[at]}function Zr(e){var t;return e?K0(e)||Array.isArray(e)||!!e[X0]||!!((t=e.constructor)!=null&&t[X0])||sa(e)||tl(e):!1}var Av=Object.prototype.constructor.toString();function K0(e){if(!e||typeof e!="object")return!1;const t=Go(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===Av}function oa(e,t){el(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function el(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:sa(e)?2:tl(e)?3:0}function Gd(e,t){return el(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Q0(e,t,n){const r=el(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Cv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function sa(e){return e instanceof Map}function tl(e){return e instanceof Set}function Jt(e){return e.copy_||e.base_}function Xd(e,t){if(sa(e))return new Map(e);if(tl(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=K0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],l=r[u];l.writable===!1&&(l.writable=!0,l.configurable=!0),(l.get||l.set)&&(r[u]={configurable:!0,writable:!0,enumerable:l.enumerable,value:e[u]})}return Object.create(Go(e),r)}else{const r=Go(e);if(r!==null&&n)return B({},e);const o=Object.create(r);return Object.assign(o,e)}}function Kd(e,t=!1){return rl(e)||Xo(e)||!Zr(e)||(el(e)>1&&Object.defineProperties(e,{set:{value:nl},add:{value:nl},clear:{value:nl},delete:{value:nl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>Kd(n,!0))),e}function nl(){ir(2)}function rl(e){return Object.isFrozen(e)}var Qd={};function to(e){const t=Qd[e];return t||ir(0,e),t}function kv(e,t){Qd[e]||(Qd[e]=t)}var aa;function il(){return aa}function Nv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function J0(e,t){t&&(to("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Jd(e){Zd(e),e.drafts_.forEach(Pv),e.drafts_=null}function Zd(e){e===aa&&(aa=e.parent_)}function Z0(e){return aa=Nv(aa,e)}function Pv(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function eg(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Jd(t),ir(4)),Zr(e)&&(e=ol(t,e),t.parent_||sl(t,e)),t.patches_&&to("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=ol(t,n,[]),Jd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==G0?e:void 0}function ol(e,t,n){if(rl(t))return t;const r=t[at];if(!r)return oa(t,(o,a)=>tg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return sl(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const o=r.copy_;let a=o,u=!1;r.type_===3&&(a=new Set(o),o.clear(),u=!0),oa(a,(l,d)=>tg(e,r,o,l,d,n,u)),sl(e,o,!1),n&&e.patches_&&to("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tg(e,t,n,r,o,a,u){if(Xo(o)){const l=a&&t&&t.type_!==3&&!Gd(t.assigned_,r)?a.concat(r):void 0,d=ol(e,o,l);if(Q0(n,r,d),Xo(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Zr(o)&&!rl(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ol(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(sa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&sl(e,o)}}function sl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Kd(t,n)}function Ov(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:il(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=ef;n&&(o=[r],a=ua);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var ef={get(e,t){if(t===at)return e;const n=Jt(e);if(!Gd(n,t))return Iv(e,n,t);const r=n[t];return e.finalized_||!Zr(r)?r:r===tf(e.base_,t)?(nf(e),e.copy_[t]=la(r,e)):r},has(e,t){return t in Jt(e)},ownKeys(e){return Reflect.ownKeys(Jt(e))},set(e,t,n){const r=ng(Jt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=tf(Jt(e),t),a=o==null?void 0:o[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Cv(n,o)&&(n!==void 0||Gd(e.base_,t)))return!0;nf(e),ei(e)}return e.copy_[t]===n&&(n!==void 0||t in e.copy_)||Number.isNaN(n)&&Number.isNaN(e.copy_[t])||(e.copy_[t]=n,e.assigned_[t]=!0),!0},deleteProperty(e,t){return tf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,nf(e),ei(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Jt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){ir(11)},getPrototypeOf(e){return Go(e.base_)},setPrototypeOf(){ir(12)}},ua={};oa(ef,(e,t)=>{ua[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ua.deleteProperty=function(e,t){return ua.set.call(this,e,t,void 0)},ua.set=function(e,t,n){return ef.set.call(this,e[0],t,n,e[0])};function tf(e,t){const n=e[at];return(n?Jt(n):e)[t]}function Iv(e,t,n){var o;const r=ng(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ng(e,t){if(!(t in e))return;let n=Go(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Go(n)}}function ei(e){e.modified_||(e.modified_=!0,e.parent_&&ei(e.parent_))}function nf(e){e.copy_||(e.copy_=Xd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Rv=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&ir(6),r!==void 0&&typeof r!="function"&&ir(7);let o;if(Zr(t)){const a=Z0(this),u=la(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?Jd(a):Zd(a)}return J0(a,r),eg(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===G0&&(o=void 0),this.autoFreeze_&&Kd(o,!0),r){const a=[],u=[];to("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else ir(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...l)=>this.produceWithPatches(u,d=>t(d,...l));let r,o;return[this.produce(t,n,(u,l)=>{r=u,o=l}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Zr(e)||ir(8),Xo(e)&&(e=Lv(e));const t=Z0(this),n=la(e,void 0);return n[at].isManual_=!0,Zd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&ir(9);const{scope_:r}=n;return J0(r,t),eg(void 0,r)}setAutoFreeze(e){this.autoFreeze_=e}setUseStrictShallowCopy(e){this.useStrictShallowCopy_=e}applyPatches(e,t){let n;for(n=t.length-1;n>=0;n--){const o=t[n];if(o.path.length===0&&o.op==="replace"){e=o.value;break}}n>-1&&(t=t.slice(n+1));const r=to("Patches").applyPatches_;return Xo(e)?r(e,t):this.produce(e,o=>r(o,t))}};function la(e,t){const n=sa(e)?to("MapSet").proxyMap_(e,t):tl(e)?to("MapSet").proxySet_(e,t):Ov(e,t);return(t?t.scope_:il()).drafts_.push(n),n}function Lv(e){return Xo(e)||ir(10,e),rg(e)}function rg(e){if(!Zr(e)||rl(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Xd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Xd(e,!0);return oa(n,(r,o)=>{Q0(n,r,rg(o))}),t&&(t.finalized_=!1),n}function Dv(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Jt(this[at]).size}has(d){return Jt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Jt(p).has(d)||Jt(p).get(d)!==f)&&(n(p),ei(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),ei(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Jt(d).size&&(n(d),ei(d),d.assigned_=new Map,oa(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Jt(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[at];u(f);const p=Jt(f).get(d);if(f.finalized_||!Zr(p)||p!==f.base_.get(d))return p;const m=la(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Jt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(l,d){return new e(l,d)}function n(l){l.copy_||(l.assigned_=new Map,l.copy_=new Map(l.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:il(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Jt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),ei(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),ei(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Jt(d).size&&(a(d),ei(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function o(l,d){return new r(l,d)}function a(l){l.copy_||(l.copy_=new Set,l.base_.forEach(d=>{if(Zr(d)){const f=la(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&ir(3,JSON.stringify(Jt(l)))}kv("MapSet",{proxyMap_:t,proxySet_:o})}var Mv=new Rv,Fv=Mv.produce;function ig(e,t,n){var r=D.useMemo(function(){return Fv(e)},[e]);return D.useReducer(r,t,n)}const og={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},Et={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},no={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},sg=["ask_cim","search","browse","pdp"],Bv=e=>sg.includes(e),ag={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(ag));const Uv=new Map(Object.entries(ag).map(([e,t])=>[t,e])),Hv=e=>{var t;return(t=Uv.get(e))!=null?t:null},Ko="cimulate",rf=`${Ko}:pdp-update`,of=`${Ko}:browse-update`,sf=`${Ko}:search-update`,af=`${Ko}:ui-state-update`,uf=`${Ko}:prompts-state-update`,lf=`${Ko}:session-state`,Ir=B({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},og),zv={"browse-context":Ir.CONTEXT_UPDATED,categoryId:Ir.CATEGORY_ID_CHANGED,categoryName:Ir.CATEGORY_NAME_CHANGED,page:Ir.PAGE_CHANGED,pageSize:Ir.PAGE_SIZE_CHANGED,includeFacets:Ir.FACET_FILTERS_CHANGED,facetFilters:Ir.FACET_FILTERS_CHANGED,rangeFilters:Ir.RANGE_FILTERS_CHANGED,catalogSegment:Ir.CATALOG_SEGMENT_CHANGED,pricebooks:Ir.PRICEBOOKS_CHANGED},ti=B({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},og),jv={"search-context":ti.SEARCH_CONTEXT_UPDATED,query:ti.QUERY_CHANGED,page:ti.PAGE_CHANGED,pageSize:ti.PAGE_SIZE_CHANGED,includeFacets:ti.FACET_FILTERS_CHANGED,facetFilters:ti.FACET_FILTERS_CHANGED,rangeFilters:ti.RANGE_FILTERS_CHANGED,catalogSegment:ti.CATALOG_SEGMENT_CHANGED,pricebooks:ti.PRICEBOOKS_CHANGED},z="cim-widget",rt=`--${z}`,wi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},$v=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||wi.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||wi.secondaryColor,[`${rt}-font-color`]:e.fontColor||wi.fontColor,[`${rt}-font-family`]:e.fontFamily||wi.fontFamily,[`${rt}-background-color`]:e.backgroundColor||wi.backgroundColor,[`${rt}-border-color`]:e.borderColor||wi.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||wi.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||wi.borderRadius)}),ug={primary:"#3182ce",secondary:"#2c5282",text:"#1a202c",fontFamily:"inherit",surface:"#ffffff",border:"#dddddd",inputBorder:"#767676",canvas:`var(${rt}-background-color)`,muted:"#5c5c5c",subtle:"#f7f7f7",outline:"#a3a3a3",foreground:"#181818",onPrimary:"#ffffff",focus:`var(${rt}-primary-color)`,variantSelection:"#e5e5e5",variantSelectionHover:"#d9d9d9",variantSelectionText:"#141415",variantSelectionBorder:"#c5c5c5",variantSelectionHoverBorder:"#b8b8b8",loaderStart:"#4f7fce",loaderEnd:"#c85d94",sendIdleBackground:`var(${rt}-send-background)`,sendIdleForeground:`var(${rt}-on-primary)`,sendBackground:`var(${rt}-primary-color)`,sendHoverBackground:`var(${rt}-secondary-color)`,productFontFamily:`var(${rt}-font-family, inherit)`,cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem",transcriptPadding:"1rem",mobileTranscriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem",cardShadow:"none",headerShadow:"none",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050",launcherAnimation:"none",headerBackground:"transparent",headerText:"inherit",headerFontSize:"1.25rem",headerFontWeight:"bold",headerFontFamily:"inherit"},al={legacy:{traits:{density:"compact",shape:"sharp",elevation:"flat"},tokens:{},variants:{transcript:"grouped",connecting:"pulse",quantity:"input",carousel:"chevron",logoFallback:"none",userMessageIcon:"visible"}},commerce:{traits:{density:"comfortable",shape:"round",elevation:"raised"},tokens:{launcherAnimation:"cim-widget-fab-pulse 2s infinite ease-in-out",primary:"#3a3a3a",secondary:"#2d2d2d",text:"#3e3e3c",border:"#e8e8e8",subtle:"#f5f5f5",variantSelection:"#e87524",variantSelectionHover:"#d96616",variantSelectionText:"#181818",variantSelectionBorder:"#e87524",variantSelectionHoverBorder:"#d96616",loaderStart:`var(${rt}-primary-color)`,loaderEnd:`var(${rt}-primary-color)`,sendIdleBackground:"#e8e8e8",sendIdleForeground:"#767676",canvas:"#fcfcfc",sendBackground:"#111111",sendHoverBackground:"#333333",productFontFamily:`"Source Sans Pro", var(${rt}-font-family, sans-serif)`,headerBackground:`var(${rt}-background-color)`,headerText:`var(${rt}-font-color)`,headerFontSize:"1rem",headerFontWeight:"400"},variants:{transcript:"unified-card",connecting:"sparkles",quantity:"stepper",carousel:"circle-arrow",logoFallback:"sparkle",userMessageIcon:"hidden"}}},Vv=Object.freeze({legacy:Object.freeze(B({preset:"legacy"},al.legacy.traits)),commerce:Object.freeze(B({preset:"commerce"},al.commerce.traits))}),lg={compact:{transcriptPadding:"1rem",cardPadding:"0.75rem",transcriptGap:"0.5rem",carouselGap:"0.5rem",headerHeight:"auto",controlSize:"2.25rem"},comfortable:{transcriptPadding:"1.25rem",cardPadding:"1.25rem",transcriptGap:"1rem",carouselGap:"12px",headerHeight:"3.875rem",controlSize:"2.75rem"}},cg={sharp:{cardRadius:"0.25rem",controlRadius:"0.25rem",composerRadius:"0.25rem",chipRadius:"0.25rem",mediaRadius:"0.25rem"},soft:{cardRadius:"0.5rem",controlRadius:"0.375rem",composerRadius:"0.5rem",chipRadius:"0.5rem",mediaRadius:"0.375rem"},round:{cardRadius:"0.75rem",controlRadius:"0.75rem",composerRadius:"999px",chipRadius:"999px",mediaRadius:"0.75rem"}},dg={flat:{cardShadow:"none",headerShadow:"none",launcherShadow:"none",launcherAnimation:"none"},raised:{cardShadow:"0 1px 2px #0000000d",headerShadow:"0 1px 1px -1px #17171b08, 0 14px 30px -20px #17171b1a",launcherShadow:"0 4px 6px #00000040, 0 1px 3px #00000050"}},fg={primaryColor:"primary",secondaryColor:"secondary",fontColor:"text",fontFamily:"fontFamily",backgroundColor:"surface",borderColor:"border",inputBorderColor:"inputBorder",borderRadius:"cardRadius"},hg={primary:"primary-color",secondary:"secondary-color",text:"font-color",surface:"background-color",border:"border-color",inputBorder:"input-border-color",cardRadius:"border-radius",headerBackground:"header-background-color",headerText:"header-text-color",headerFontSize:"header-text-font-size",headerFontWeight:"header-text-font-weight",headerFontFamily:"header-text-font-family"},_i=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Ln=e=>e===0||typeof e=="string"&&e.trim().length>0,ro=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),pg=e=>{var T,y;const t=_i(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(ro(t,"tokens")||["density","shape","elevation"].some(w=>ro(t,w)&&t[w]!==al[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?$v(t):void 0,l=al[r],d=B({},l.traits);typeof t.density=="string"&&ro(lg,t.density)&&(d.density=t.density),typeof t.shape=="string"&&ro(cg,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&ro(dg,t.elevation)&&(d.elevation=t.elevation);const f=B(B(B(B(B({},ug),l.tokens),lg[d.density]),cg[d.shape]),dg[d.elevation]);if(_i(t.tokens))for(const w of Object.keys(ug)){const v=t.tokens[w];ro(t.tokens,w)&&Ln(v)&&(f[w]=String(v))}_i(t.tokens)&&Ln(t.tokens.fontFamily)&&!Ln(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),_i(t.tokens)&&Ln(t.tokens.launcherShadow)&&!Ln(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),_i(t.tokens)&&Ln(t.tokens.transcriptPadding)&&!Ln(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),_i(t.tokens)&&Ln(t.tokens.text)&&!Ln(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=_i(t.tokens)?t.tokens.inputBorder:void 0;!Ln(p)&&_i(t.tokens)&&Ln(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,v]of Object.entries(fg)){const N=t[w];ro(t,w)&&Ln(N)&&(f[v]=String(N),w==="borderColor"&&!Ln(t.inputBorderColor)&&!Ln(p)&&(f.inputBorder=String(N)),w==="fontFamily"&&(f.productFontFamily=String(N)),w==="fontColor"&&(f.foreground=String(N)),w==="borderRadius"&&(f.controlRadius=f.composerRadius=f.chipRadius=f.mediaRadius=String(N)))}if(u)for(const w of Object.values(fg)){const v=(T=hg[w])!=null?T:w.replace(/[A-Z]/g,N=>`-${N.toLowerCase()}`);f[w]=u[`${rt}-${v}`]}const m={};for(const[w,v]of Object.entries(f)){const N=(y=hg[w])!=null?y:w.replace(/[A-Z]/g,x=>`-${x.toLowerCase()}`);m[`${rt}-${N}`]=v}return{preset:r,compatibility:a,traits:d,tokens:f,cssVariables:u!=null?u:m,variants:B({},l.variants),transcriptClassName:a==="legacy"?"":`${z}-transcript-${l.variants.transcript}`}},ni={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},mg=D.createContext(null),gg=D.createContext(null),yt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Eg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};function yg(e,t){return function(){return e.apply(t,arguments)}}const{toString:qv}=Object.prototype,{getPrototypeOf:xi}=Object,{iterator:ca,toStringTag:bg}=Symbol,da=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Tg=e=>typeof e=="string"&&(e==="__proto__"||e==="constructor"||e==="prototype"),wg=(e,t,n)=>e===Object.prototype||!n&&t===null,Yv=e=>{if(!Object.isExtensible(e))return!1;const t=Object.getOwnPropertyNames(e);return Object.getOwnPropertySymbols&&t.push(...Object.getOwnPropertySymbols(e)),t.every(n=>{if(Tg(n))return!1;const r=Object.getOwnPropertyDescriptor(e,n);return!!r&&r.configurable&&r.writable===!0})},fa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=xi(n);if(wg(n,o,n===e))return!1;if(da(n,t))return!0;n=o}return!1},Wv=(e,t)=>e!=null&&fa(e,t)?e[t]:void 0,Gv=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=xi(e);if(t===null&&Yv(e))return e;const n=Object.create(null),r=Object.create(null),o=[];let a=e;for(;a!=null&&o.indexOf(a)===-1;){o.push(a);const u=a===e?t:xi(a);if(wg(a,u,a===e))break;const l=Object.getOwnPropertyNames(a);Object.getOwnPropertySymbols&&l.push(...Object.getOwnPropertySymbols(a));for(const d of l)Tg(d)||da(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},cf=(e=>t=>{const n=qv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),or=e=>(e=e.toLowerCase(),t=>cf(t)===e),ul=e=>t=>typeof t===e,{isArray:io}=Array,oo=ul("undefined");function Qo(e){return e!==null&&!oo(e)&&e.constructor!==null&&!oo(e.constructor)&&Dn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const _g=or("ArrayBuffer");function Xv(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&_g(e.buffer),t}const Kv=ul("string"),Dn=ul("function"),xg=ul("number"),Jo=e=>e!==null&&typeof e=="object",Qv=e=>e===!0||e===!1,ll=e=>{if(!Jo(e))return!1;const t=xi(e);return(t===null||t===Object.prototype||xi(t)===null)&&!fa(e,bg)&&!fa(e,ca)},Jv=e=>{if(!Jo(e)||Qo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},Zv=or("Date"),eA=or("File"),tA=e=>!!(e&&typeof e.uri!="undefined"),nA=e=>e&&typeof e.getParts!="undefined",rA=or("Blob"),iA=or("FileList"),oA=or("Set"),sA=e=>Jo(e)&&Dn(e.pipe);function aA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Sg=aA(),vg=typeof Sg.FormData!="undefined"?Sg.FormData:void 0,uA=e=>{if(!e)return!1;if(vg&&e instanceof vg)return!0;const t=xi(e);if(!t||t===Object.prototype||!Dn(e.append))return!1;const n=cf(e);return n==="formdata"||n==="object"&&Dn(e.toString)&&e.toString()==="[object FormData]"},lA=or("URLSearchParams"),[cA,dA,fA,hA]=["ReadableStream","Request","Response","Headers"].map(or),pA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ha(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),io(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Qo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let l;for(r=0;r<u;r++)l=a[r],t.call(null,e[l],l,e)}}function Ag(e,t){if(Qo(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,o;for(;r-- >0;)if(o=n[r],t===o.toLowerCase())return o;return null}const so=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,Cg=e=>!oo(e)&&e!==so;function df(...e){const{caseless:t,skipUndefined:n}=Cg(this)&&this||{},r={},o=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const l=t&&typeof u=="string"&&Ag(r,u)||u,d=da(r,l)?r[l]:void 0;ll(d)&&ll(a)?r[l]=df(d,a):ll(a)?r[l]=df({},a):io(a)?r[l]=a.slice():(!n||!oo(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||Qo(l)||(ha(l,o),typeof l!="object"||io(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];AA.call(l,p)&&o(l[p],p)}}return r}const mA=(e,t,n,{allOwnKeys:r}={})=>(ha(t,(o,a)=>{n&&Dn(o)?Object.defineProperty(e,a,{__proto__:null,value:yg(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),gA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),EA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},yA=(e,t,n,r)=>{let o,a,u;const l={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!l[u]&&(t[u]=e[u],l[u]=!0);e=n!==!1&&xi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},bA=(e,t,n)=>{e=String(e),(n===void 0||n>e.length)&&(n=e.length),n-=t.length;const r=e.indexOf(t,n);return r!==-1&&r===n},TA=e=>{if(!e)return null;if(io(e))return e;let t=e.length;if(!xg(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},wA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&xi(Uint8Array)),_A=(e,t)=>{const r=(e&&e[ca]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},xA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},SA=or("HTMLFormElement"),vA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:AA}=Object.prototype,CA=or("RegExp"),kg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ha(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},kA=e=>{kg(e,(t,n)=>{if(Dn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Dn(r)){if(t.enumerable=!1,"writable"in t){t.writable=!1;return}t.set||(t.set=()=>{throw Error("Can not rewrite read-only method '"+n+"'")})}})},NA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return io(e)?r(e):r(String(e).split(t)),n},PA=()=>{},OA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function IA(e){return!!(e&&Dn(e.append)&&e[bg]==="FormData"&&e[ca])}const RA=e=>{const t=new WeakSet,n=r=>{if(Jo(r)){if(t.has(r))return;if(Qo(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(oA(r)){o=[];for(const a of r){const u=n(a);!oo(u)&&o.push(u)}}else o=io(r)?[]:{},ha(r,(a,u)=>{const l=n(a);!oo(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},LA=or("AsyncFunction"),DA=e=>e&&(Jo(e)||Dn(e))&&Dn(e.then)&&Dn(e.catch),Ng=((e,t)=>e?setImmediate:t?((n,r)=>(so.addEventListener("message",({source:o,data:a})=>{o===so&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),so.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Dn(so.postMessage)),MA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(so):typeof process!="undefined"&&process.nextTick||Ng,Pg=e=>e!=null&&Dn(e[ca]),j={isArray:io,isArrayBuffer:_g,isBuffer:Qo,isFormData:uA,isArrayBufferView:Xv,isString:Kv,isNumber:xg,isBoolean:Qv,isObject:Jo,isPlainObject:ll,isEmptyObject:Jv,isReadableStream:cA,isRequest:dA,isResponse:fA,isHeaders:hA,isUndefined:oo,isDate:Zv,isFile:eA,isReactNativeBlob:tA,isReactNative:nA,isBlob:rA,isRegExp:CA,isFunction:Dn,isStream:sA,isURLSearchParams:lA,isTypedArray:wA,isFileList:iA,forEach:ha,merge:df,extend:mA,trim:pA,stripBOM:gA,inherits:EA,toFlatObject:yA,kindOf:cf,kindOfTest:or,endsWith:bA,toArray:TA,forEachEntry:_A,matchAll:xA,isHTMLForm:SA,hasOwnProperty:da,hasOwnProp:da,hasOwnInPrototypeChain:fa,getSafeProp:Wv,toSafeFlatObject:Gv,reduceDescriptors:kg,freezeMethods:kA,toObjectSet:NA,toCamelCase:vA,noop:PA,toFiniteNumber:OA,findKey:Ag,global:so,isContextDefined:Cg,isSpecCompliantForm:IA,toJSONObject:RA,isAsyncFn:LA,isThenable:DA,setImmediate:Ng,asap:MA,isIterable:Pg,isSafeIterable:e=>e!=null&&fa(e,ca)&&Pg(e)},FA=j.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),BA=e=>{const t={};let n,r,o;return e&&e.split(`
|
|
3
|
-
`).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim();const l=
|
|
4
|
-
`)}getSetCookie(){const t=this.get("set-cookie");return j.isArray(t)?t:t==null||t===!1?[]:[t]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static parseParameters(t){return WA(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[Ig]=this[Ig]={accessors:{}}).accessors,o=this.prototype;function a(u){const l=pa(u);r[l]||(KA(o,u),r[l]=!0)}return j.isArray(t)?t.forEach(a):a(t),this}};gn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),j.reduceDescriptors(gn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),j.freezeMethods(gn);const dl="[REDACTED ****]";function QA(e){if(j.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if(j.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function JA(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],o=a=>{if(a===null||typeof a!="object"||j.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof gn&&(a=a.toJSON()),r.push(a);let u;if(j.isArray(a))u=[],a.forEach((l,d)=>{const f=o(l);j.isUndefined(f)||(u[d]=f)});else{if(!j.isPlainObject(a)&&QA(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?dl:o(d);j.isUndefined(f)||(u[l]=f)}}return r.pop(),u};return o(e)}function Rg(e){try{return String(e)}catch(t){return""}}function ZA(e){return e.errors.map(n=>{try{return n&&n.message?Rg(n.message):Rg(n)}catch(r){return""}}).filter(Boolean).join("; ")||e.name||"AggregateError"}let Te=class dS extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&j.isArray(t.errors)&&t.errors.length&&(l=ZA(t));const d=new dS(l,n||t.code,r,o,a);return Object.defineProperty(d,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),d.name=t.name,t.status!=null&&d.status==null&&(d.status=t.status),u&&Object.assign(d,u),d}constructor(t,n,r,o,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),o&&(this.request=o),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&j.hasOwnProp(t,"redact")?t.redact:void 0,r=j.isArray(n)&&n.length>0?JA(t,n):j.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};Te.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Te.ERR_BAD_OPTION="ERR_BAD_OPTION",Te.ECONNABORTED="ECONNABORTED",Te.ETIMEDOUT="ETIMEDOUT",Te.ECONNREFUSED="ECONNREFUSED",Te.ERR_NETWORK="ERR_NETWORK",Te.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Te.ERR_DEPRECATED="ERR_DEPRECATED",Te.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Te.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Te.ERR_CANCELED="ERR_CANCELED",Te.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Te.ERR_INVALID_URL="ERR_INVALID_URL",Te.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const eC=null,Lg=100;function mf(e){return j.isPlainObject(e)||j.isArray(e)}function Dg(e){return j.endsWith(e,"[]")?e.slice(0,-2):e}function gf(e,t,n){return e?e.concat(t).map(function(o,a){return o=Dg(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function tC(e){return j.isArray(e)&&!e.some(mf)}const nC=j.toFlatObject(j,{},null,function(t){return/^is[A-Z]/.test(t)});function fl(e,t,n){if(!j.isObject(e))throw new TypeError("target must be an object");t=t||new FormData;const r=(C,A)=>{const U=j.getSafeProp(n,C);return j.isUndefined(U)?A:U},o=r("metaTokens",!0),a=r("visitor")||v,u=r("dots",!1),l=r("indexes",!1),d=r("Blob")||typeof Blob!="undefined"&&Blob,f=r("maxDepth",Lg),p=d&&j.isSpecCompliantForm(t),m=[];if(!j.isFunction(a))throw new TypeError("visitor must be a function");function T(C){if(C===null)return"";if(j.isDate(C))return C.toISOString();if(j.isBoolean(C))return C.toString();if(!p&&j.isBlob(C))throw new Te("Blob is not supported. Use a Buffer instead.");if(j.isArrayBuffer(C)||j.isTypedArray(C)){if(p&&typeof d=="function")return new d([C]);throw new Te("Blob is not supported. Use a Buffer instead.",Te.ERR_NOT_SUPPORT)}return C}function y(C){if(C>f)throw new Te("Object is too deeply nested ("+C+" levels). Max depth: "+f,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function w(C,A){if(f===1/0)return JSON.stringify(C);const U=[];return JSON.stringify(C,function(R,$){if(!j.isObject($))return $;for(;U.length&&U[U.length-1]!==this;)U.pop();return U.push($),y(A+U.length-1),$})}function v(C,A,U){let Y=C;if(j.isReactNative(t)&&j.isReactNativeBlob(C))return t.append(gf(U,A,u),T(C)),!1;if(C&&!U&&typeof C=="object"){if(j.endsWith(A,"{}"))A=o?A:A.slice(0,-2),C=w(C,1);else if(j.isArray(C)&&tC(C)||(j.isFileList(C)||j.endsWith(A,"[]"))&&(Y=j.toArray(C)))return A=Dg(A),Y.forEach(function($,ne){!(j.isUndefined($)||$===null)&&t.append(l===!0?gf([A],ne,u):l===null?A:A+"[]",T($))}),!1}return mf(C)?!0:(t.append(gf(U,A,u),T(C)),!1)}const N=Object.assign(nC,{defaultVisitor:v,convertValue:T,isVisitable:mf});function x(C,A,U=0){if(!j.isUndefined(C)){if(y(U),m.indexOf(C)!==-1)throw new Error("Circular reference detected in "+A.join("."));m.push(C),j.forEach(C,function(R,$){(!(j.isUndefined(R)||R===null)&&a.call(t,R,j.isString($)?$.trim():$,A,N))===!0&&x(R,A?A.concat($):[$],U+1)}),m.pop()}}if(!j.isObject(e))throw new TypeError("data must be an object");return x(e),t}function Mg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function Ef(e,t){this._pairs=[],e&&fl(e,this,t)}const Fg=Ef.prototype;Fg.append=function(t,n){this._pairs.push([t,n])},Fg.toString=function(t){const n=t?r=>t.call(this,r,Mg):Mg;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function rC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function Bg(e,t,n){if(!t)return e;e=e||"";const r=j.isFunction(n)?{serialize:n}:n,o=j.getSafeProp(r,"encode")||rC,a=j.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=j.isURLSearchParams(t)?t.toString():new Ef(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const ma=Symbol("internals");function Ug(e){return e?e.length:0}function Hg(e){if(e)for(;e.length&&e[e.length-1]===null;)e.pop()}function ga(e,t){const n=e.handlers,r=Ug(n);n!==t.handlersRef?(t.handlersRef=n,t.handlerEntries.clear()):r!==t.handlersLength&&(r?t.handlerEntries.forEach(function(a,u){n[a.index]!==a.handler&&t.handlerEntries.delete(u)}):t.handlerEntries.clear()),t.handlersLength=r}class zg{constructor(){this.handlers=[],this[ma]={handlersRef:this.handlers,handlersLength:this.handlers.length,handlerEntries:new Map,iterationDepth:0,nextId:0}}use(t,n,r){const o={fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null},a=this[ma];this.handlers==null&&(this.handlers=[]),ga(this,a);const u=a.nextId++;return this.handlers.push(o),a.handlerEntries.set(u,{handler:o,index:this.handlers.length-1}),a.handlersLength=this.handlers.length,u}eject(t){const n=this[ma];ga(this,n);const r=n.handlerEntries.get(t);if(r){if(n.handlerEntries.delete(t),this.handlers[r.index]!==r.handler)return;this.handlers[r.index]=null,n.iterationDepth||(Hg(this.handlers),n.handlersLength=this.handlers.length)}}clear(){this.handlers&&(this.handlers=[],ga(this,this[ma]))}forEach(t){const n=this[ma];ga(this,n),n.iterationDepth++;try{j.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(ga(this,n),Hg(this.handlers),n.handlersLength=Ug(this.handlers))}}}const yf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},iC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ef,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},bf=typeof window!="undefined"&&typeof document!="undefined",Tf=typeof navigator=="object"&&navigator||void 0,oC=bf&&(!Tf||["ReactNative","NativeScript","NS"].indexOf(Tf.product)<0),sC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",aC=bf&&window.location.href||"http://localhost",Zt=B(B({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:bf,hasStandardBrowserEnv:oC,hasStandardBrowserWebWorkerEnv:sC,navigator:Tf,origin:aC},Symbol.toStringTag,{value:"Module"}))),iC);function uC(e,t){return fl(e,new Zt.classes.URLSearchParams,B({visitor:function(n,r,o,a){return Zt.isNode&&j.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const jg=Lg;function $g(e){if(e>jg)throw new Te("FormData field is too deeply nested ("+e+" levels). Max depth: "+jg,Te.ERR_FORM_DATA_DEPTH_EXCEEDED)}function lC(e){const t=[],n=/[^.[\]]+|\[([^.[\]]*)]/g;let r;for(;(r=n.exec(e))!==null;)$g(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function cC(e){const t={},n=Object.keys(e);let r;const o=n.length;let a;for(r=0;r<o;r++)a=n[r],t[a]=e[a];return t}function Vg(e){function t(n,r,o,a){$g(a);let u=n[a++];if(u==="__proto__")return!0;const l=Number.isFinite(+u),d=a>=n.length;return u=!u&&j.isArray(o)?o.length:u,d?(j.hasOwnProp(o,u)?o[u]=j.isArray(o[u])?o[u].concat(r):[o[u],r]:o[u]=r,!l):((!j.hasOwnProp(o,u)||!j.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&j.isArray(o[u])&&(o[u]=cC(o[u])),!l)}if(j.isFormData(e)&&j.isFunction(e.entries)){const n={};return j.forEachEntry(e,(r,o)=>{t(lC(r),o,n,0)}),n}return null}const qg=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),Zo=(e,t)=>e!=null&&j.hasOwnProp(e,t)?e[t]:void 0;function dC(e,t,n){if(j.isString(e))try{return(t||JSON.parse)(e),j.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const Ea={transitional:yf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=j.isObject(t);if(a&&j.isHTMLForm(t)&&(t=new FormData(t)),j.isFormData(t))return o?JSON.stringify(Vg(t)):t;if(j.isArrayBuffer(t)||j.isBuffer(t)||j.isStream(t)||j.isFile(t)||j.isBlob(t)||j.isReadableStream(t))return t;if(j.isArrayBufferView(t))return t.buffer;if(j.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let l;if(a){const d=Zo(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return uC(t,d).toString();if((l=j.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=Zo(this,"env"),p=f&&f.FormData;return fl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),dC(t)):t}],transformResponse:[function(t){const n=Zo(this,"transitional")||Ea.transitional,r=n&&n.forcedJSONParsing,o=Zo(this,"responseType"),a=o==="json";if(j.isResponse(t)||j.isReadableStream(t))return t;if(t&&j.isString(t)&&(r&&!o||a)){const l=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,Zo(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Te.from(d,Te.ERR_BAD_RESPONSE,this,null,Zo(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:Zt.classes.FormData,Blob:Zt.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};j.forEach(qg,e=>{Ea.headers[e]={}});function wf(e,t){const n=this||Ea,r=t||n,o=gn.from(r.headers);let a=r.data;return j.forEach(e,function(l){a=l.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function Yg(e){return!!(e&&e.__CANCEL__)}let ya=class extends Te{constructor(t,n,r){super(t==null?"canceled":t,Te.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Wg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Te("Request failed with status code "+n.status,n.status>=400&&n.status<500?Te.ERR_BAD_REQUEST:Te.ERR_BAD_RESPONSE,n.config,n.request,n))}const fC=/[\t\n\r]/g;function Gg(e){if(typeof e!="string")return e;let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t).replace(fC,"")}function _f(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function hC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let o=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[o]=d,r[o]=f;let m=a,T=0;for(;m!==o;)T+=n[m++],m=m%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(T*1e3/y):void 0}}function pC(e,t){let n=0,r=1e3/t,o,a;const u=(p,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...p)};return[(...p)=>{const m=Date.now(),T=m-n;T>=r?u(p,m):(o=p,a||(a=setTimeout(()=>{a=null,u(o)},r-T)))},()=>o&&u(o),(...p)=>u(p)]}const hl=(e,t,n=3)=>{let r=0;const o=hC(50,250);return pC(a=>{if(!a||!j.isNumber(a.loaded))return;const u=a.loaded,l=a.lengthComputable?a.total:void 0,d=Math.max(0,l!=null?Math.min(u,l):u),f=Math.max(0,d-r),p=o(f);r=Math.max(r,d);const m={loaded:d,total:l,progress:l?d/l:void 0,bytes:f,rate:p||void 0,estimated:p&&l?(l-d)/p:void 0,event:a,lengthComputable:l!=null,[t?"download":"upload"]:!0};e(m)},n)},Xg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Kg=(e,t=j.asap)=>(...n)=>t(()=>e(...n)),mC=Zt.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,Zt.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(Zt.origin),Zt.navigator&&/(msie|trident)/i.test(Zt.navigator.userAgent)):()=>!0,gC=Zt.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const l=[`${e}=${encodeURIComponent(t)}`];j.isNumber(n)&&l.push(`expires=${new Date(n).toUTCString()}`),j.isString(r)&&l.push(`path=${r}`),j.isString(o)&&l.push(`domain=${o}`),a===!0&&l.push("secure"),j.isString(u)&&l.push(`SameSite=${u}`),document.cookie=l.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),o=r.indexOf("=");if(o!==-1&&r.slice(0,o)===e)try{return decodeURIComponent(r.slice(o+1))}catch(a){return r.slice(o+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function EC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function yC(e,t){if(!t)return e;let n=e.length;for(;n>0&&e.charCodeAt(n-1)===47;)n--;return e.slice(0,n)+"/"+t.replace(/^\/+/,"")}const bC=/^https?:(?!\/\/)/i;function TC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${dl}`)}function wC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${dl}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${dl}`);return n===-1?o:`${o}#${TC(t.slice(n+1))}`}function Qg(e,t){if(typeof e=="string"){const n=Gg(e);if(bC.test(n))throw new Te(`Invalid URL ${JSON.stringify(wC(n))}: missing "//" after protocol`,Te.ERR_INVALID_URL,t)}}function Jg(e,t,n,r){Qg(t,r);let o=!EC(t);return e&&(o||n===!1)?(Qg(e,r),yC(e,t)):t}const Zg=e=>e instanceof gn?B({},e):e,_C=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function ao(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,T,y){return j.isPlainObject(p)&&j.isPlainObject(m)?j.merge.call({caseless:y},p,m):j.isPlainObject(m)?j.merge({},m):j.isArray(m)?m.slice():m}function o(p,m,T,y){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p,T,y)}else return r(p,m,T,y)}function a(p,m){if(!j.isUndefined(m))return r(void 0,m)}function u(p,m){if(j.isUndefined(m)){if(!j.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function l(p){const m=j.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!j.isUndefined(m))if(j.isPlainObject(m)){if(j.hasOwnProp(m,p))return m[p]}else return;const T=j.hasOwnProp(e,"transitional")?e.transitional:void 0;if(j.isPlainObject(T)&&j.hasOwnProp(T,p))return T[p]}function d(p,m,T){if(j.hasOwnProp(t,T))return r(p,m);if(j.hasOwnProp(e,T))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutErrorMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,T)=>o(Zg(p),Zg(m),T,!0)};return j.forEach(_C(B(B({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=j.hasOwnProp(f,m)?f[m]:o,y=j.hasOwnProp(e,m)?e[m]:void 0,w=j.hasOwnProp(t,m)?t[m]:void 0,v=T(y,w,m);j.isUndefined(v)&&T!==d||(n[m]=v)}),j.hasOwnProp(t,"validateStatus")&&j.isUndefined(t.validateStatus)&&l("validateStatusUndefinedResolves")===!1&&(j.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const xC=["content-type","content-length"];function SC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{xC.includes(r.toLowerCase())&&e.set(r,o)})}const vC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function e1(e){const t=ao({},e),n=T=>j.hasOwnProp(t,T)?t[T]:void 0,r=n("data");let o=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let l=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=l=gn.from(l),t.url=Bg(Jg(f,m,p,t),n("params"),n("paramsSerializer")),d){const T=j.getSafeProp(d,"username")||"",y=j.getSafeProp(d,"password")||"";try{l.set("Authorization","Basic "+btoa(T+":"+(y?vC(y):"")))}catch(w){throw Te.from(w,Te.ERR_BAD_OPTION_VALUE,e)}}if(j.isFormData(r)){const T=j.getSafeProp(r,"getHeaders");Zt.hasStandardBrowserEnv||Zt.hasStandardBrowserWebWorkerEnv||j.isReactNative(r)?l.setContentType(void 0):j.isFunction(T)&&SC(l,T.call(r),n("formDataHeaderPolicy"))}if(Zt.hasStandardBrowserEnv&&(j.isFunction(o)&&(o=o(t)),o===!0||o==null&&mC(t.url))){const y=a&&u&&gC.read(u);y&&l.set(a,y)}return t}const AC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=e1(e);let a=o.data;const u=gn.from(o.headers).normalize();let{responseType:l,onUploadProgress:d,onDownloadProgress:f}=o,p,m,T,y,w,v;function N(){y&&y(),w&&w(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let x=new XMLHttpRequest;x.open(o.method.toUpperCase(),o.url,!0),x.timeout=o.timeout;function C(U){if(!x)return;if(x.status===0&&(_f(Gg(o.url))||_f(Zt.origin))!=="file"&&!(x.responseURL&&x.responseURL.startsWith("file:"))){r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null;return}try{U?v&&v(U):w&&w()}catch(ne){setTimeout(()=>{throw ne})}if(!x)return;const Y=gn.from("getAllResponseHeaders"in x&&x.getAllResponseHeaders()),$={data:!l||l==="text"||l==="json"?x.responseText:x.response,status:x.status,statusText:x.statusText,headers:Y,config:e,request:x};Wg(function(de){n(de),N()},function(de){r(de),N()},$),x=null}"onloadend"in x?x.onloadend=C:x.onreadystatechange=function(){!x||x.readyState!==4||x.status===0&&!(x.responseURL&&x.responseURL.startsWith("file:"))||setTimeout(C)},x.onabort=function(){x&&(r(new Te("Request aborted",Te.ECONNABORTED,e,x)),N(),x=null)},x.onerror=function(Y){const R=Y&&Y.message?Y.message:"Network Error",$=new Te(R,Te.ERR_NETWORK,e,x);$.event=Y||null,r($),N(),x=null},x.ontimeout=function(){let Y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const R=o.transitional||yf;o.timeoutErrorMessage&&(Y=o.timeoutErrorMessage),r(new Te(Y,R.clarifyTimeoutError?Te.ETIMEDOUT:Te.ECONNABORTED,e,x)),N(),x=null},a===void 0&&u.setContentType(null),"setRequestHeader"in x&&j.forEach(Og(u),function(Y,R){x.setRequestHeader(R,Y)}),j.isUndefined(o.withCredentials)||(x.withCredentials=!!o.withCredentials),l&&l!=="json"&&(x.responseType=o.responseType),f&&([T,w,v]=hl(f,!0),x.addEventListener("progress",T)),d&&x.upload&&([m,y]=hl(d),x.upload.addEventListener("progress",m),x.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=U=>{x&&(r(!U||U.type?new ya(null,e,x):U),x.abort(),N(),x=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const A=_f(o.url);if(A&&!Zt.protocols.includes(A)){r(new Te("Unsupported protocol "+A+":",Te.ERR_BAD_REQUEST,e)),N();return}x.send(a||null)})},CC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const o=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof Te?f:new ya(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,o(new Te(`timeout of ${t}ms exceeded`,Te.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(o):d.removeEventListener("abort",o)}),e=null)};e.forEach(d=>{if(!r){if(d.aborted){o.call(d);return}d.addEventListener("abort",o,{once:!0})}});const{signal:l}=n;return l.unsubscribe=()=>j.asap(u),l},kC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,o;for(;r<n;)o=r+t,yield e.slice(r,o),r=o},NC=function(e,t){return Pd(this,null,function*(){try{for(var n=cS(PC(e)),r,o,a;r=!(o=yield new Jr(n.next())).done;r=!1){const u=o.value;yield*b0(kC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Jr(o.call(n)))}finally{if(a)throw a[0]}}})},PC=function(e){return Pd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*b0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Jr(t.read());if(n)break;yield r}}finally{yield new Jr(t.cancel())}})},t1=(e,t,n,r)=>{const o=NC(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return et(this,null,function*(){try{const{done:p,value:m}=yield o.next();if(p){l(),f.close();return}let T=m.byteLength;if(n){let y=a+=T;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw l(p),p}})},cancel(f){return l(f),o.return()}},{highWaterMark:2})},n1=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,r1=(e,t,n)=>t+2<n&&n1(e.charCodeAt(t+1))&&n1(e.charCodeAt(t+2)),i1=e=>e<=57?e-48:(e&223)-55,OC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,IC=e=>e===9||e===10||e===12||e===13||e===32,RC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},LC=e=>{const t=e.length;let n=0;return t>0&&e.charCodeAt(t-1)===61&&(n++,t>1&&e.charCodeAt(t-2)===61&&n++),Math.floor((t-n)*3/4)},DC=e=>{const t=e.length;let n=0,r=0,o=!1;for(let a=0;a<t;a++){let u=e.charCodeAt(a);if(u===37&&r1(e,a,t)&&(u=i1(e.charCodeAt(a+1))*16+i1(e.charCodeAt(a+2)),a+=2),!IC(u)){if(u===61){r++;continue}if(!OC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?LC(e):RC(n)},MC=(e,t)=>{if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const n=e.indexOf(",");if(n<0)return 0;const r=e.slice(5,n),o=e.slice(n+1);if(/;base64/i.test(r))return t(o);let u=0;for(let l=0,d=o.length;l<d;l++){const f=o.charCodeAt(l);if(f===37&&r1(o,l,d))u+=1,l+=2;else if(f<128)u+=1;else if(f<2048)u+=2;else if(f>=55296&&f<=56319&&l+1<d){const p=o.charCodeAt(l+1);p>=56320&&p<=57343?(u+=4,l++):u+=3}else u+=3}return u};function FC(e){const t=typeof e=="string"?e.indexOf("#"):-1;return MC(t===-1?e:e.slice(0,t),DC)}const xf="1.20.0",o1=64*1024,BC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:pl}=j,UC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),s1=e=>{if(!j.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},a1=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},HC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},zC=e=>{const t=j.global!==void 0&&j.global!==null?j.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=j.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:o,Request:a,Response:u}=e,l=o?pl(o):typeof fetch=="function",d=pl(a),f=pl(u);if(!l)return!1;const p=l&&pl(n),m=l&&(typeof r=="function"?(x=>C=>x.encode(C))(new r):x=>et(null,null,function*(){return new Uint8Array(yield new a(x).arrayBuffer())})),T=d&&p&&a1(()=>{let x=!1;const C=new a(Zt.origin,{body:new n,method:"POST",get duplex(){return x=!0,"half"}}),A=C.headers.has("Content-Type");return C.body!=null&&C.body.cancel(),x&&!A}),y=f&&p&&a1(()=>j.isReadableStream(new u("").body)),w={stream:y&&(x=>x.body)};l&&["text","arrayBuffer","blob","formData","stream"].forEach(x=>{!w[x]&&(w[x]=(C,A)=>{let U=C&&C[x];if(U)return U.call(C);throw new Te(`Response type '${x}' is not supported`,Te.ERR_NOT_SUPPORT,A)})});const v=x=>et(null,null,function*(){if(x==null)return 0;if(j.isBlob(x))return x.size;if(j.isSpecCompliantForm(x))return(yield new a(Zt.origin,{method:"POST",body:x}).arrayBuffer()).byteLength;if(j.isArrayBufferView(x)||j.isArrayBuffer(x))return x.byteLength;if(j.isURLSearchParams(x)&&(x=x+""),j.isString(x))return(yield m(x)).byteLength}),N=(x,C)=>et(null,null,function*(){const A=j.toFiniteNumber(x.getContentLength());return A==null?v(C):A});return x=>et(null,null,function*(){let{url:C,method:A,data:U,signal:Y,cancelToken:R,timeout:$,onDownloadProgress:ne,onUploadProgress:de,responseType:V,headers:ie,withCredentials:fe="same-origin",fetchOptions:we,maxContentLength:re,maxBodyLength:oe,maxRedirects:Ae}=e1(x);const se=j.isNumber(re)&&re>-1,J=j.isNumber(oe)&&oe>-1,ae=be=>j.hasOwnProp(x,be)?x[be]:void 0;let k=o||fetch;V=V?(V+"").toLowerCase():"text";let F=CC([Y,R&&R.toAbortSignal()],$),K=null;const I=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let Se,Me=null;const ke=()=>new Te("Request body larger than maxBodyLength limit",Te.ERR_BAD_REQUEST,x,K);try{let be;const Ie=ae("auth");if(Ie){const qe=j.getSafeProp(Ie,"username")||"",bt=j.getSafeProp(Ie,"password")||"";be={username:qe,password:bt}}if(HC(C)){const qe=new URL(C,Zt.origin);if(!be&&(qe.username||qe.password)){const bt=s1(qe.username),Vt=s1(qe.password);be={username:bt,password:Vt}}(qe.username||qe.password)&&(qe.username="",qe.password="",C=qe.href)}if(be&&(ie.delete("authorization"),ie.set("Authorization","Basic "+btoa(UC((be.username||"")+":"+(be.password||""))))),se&&typeof C=="string"&&C.startsWith("data:")&&FC(C)>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);if(J&&A!=="get"&&A!=="head"){const qe=yield v(U);if(typeof qe=="number"&&isFinite(qe)&&(Se=qe,qe>oe))throw ke()}const Ue=J&&(j.isReadableStream(U)||j.isStream(U)),lt=(qe,bt,Vt)=>t1(qe,o1,xe=>{if(J&&xe>oe)throw Me=ke();bt&&bt(xe)},Vt);if(T&&A!=="get"&&A!=="head"&&(de||Ue)){if(Se=Se==null?yield N(ie,U):Se,Se!==0||Ue){let qe=new a(C,{method:"POST",body:U,duplex:"half"}),bt;if(j.isFormData(U)&&(bt=qe.headers.get("content-type"))&&ie.setContentType(bt),qe.body){const[Vt,xe]=de&&Xg(Se,hl(Kg(de)))||[];U=lt(qe.body,Vt,xe)}}}else if(Ue&&!d&&p&&A!=="get"&&A!=="head")U=lt(U);else if(Ue&&d&&!T&&A!=="get"&&A!=="head")throw new Te("Stream request bodies are not supported by the current fetch implementation",Te.ERR_NOT_SUPPORT,x,K);j.isString(fe)||(fe=fe?"include":"omit");const cn=d&&"credentials"in a.prototype;if(j.isFormData(U)){const qe=ie.getContentType();qe&&/^multipart\/form-data/i.test(qe)&&!/boundary=/i.test(qe)&&ie.delete("content-type")}ie.set("User-Agent","axios/"+xf,!1);const Lt=we==null?we:Object.assign(Object.create(null),we);Lt&&(delete Lt.body,delete Lt.headers,delete Lt.method,delete Lt.signal,delete Lt.duplex,delete Lt.credentials);const $t=Object.assign(Object.create(null),Lt,{signal:F,method:A.toUpperCase(),headers:Og(ie.normalize()),body:U,duplex:"half",credentials:cn?fe:void 0});d&&(j.forEach(BC,(qe,bt)=>{$t[bt]===void 0&&($t[bt]=qe)}),$t.signal===void 0&&($t.signal=null),$t.body===void 0&&($t.body=null)),Ae===0&&($t.redirect="manual",Lt&&(Lt.redirect="manual")),K=d&&new a(C,$t);let Pt=yield d?k(K,Lt):k(C,$t);const Qn=gn.from(Pt.headers);if(se){const qe=j.toFiniteNumber(Qn.getContentLength());if(qe!=null&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}const _n=y&&(V==="stream"||V==="response");if(y&&Pt.body&&(ne||se||_n&&I)){const qe={};["status","statusText","headers"].forEach(Xe=>{qe[Xe]=Pt[Xe]});const bt=j.toFiniteNumber(Qn.getContentLength()),[Vt,xe]=ne&&Xg(bt,hl(Kg(ne),!0))||[];let Le=0;const Be=Xe=>{if(se&&(Le=Xe,Le>re))throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K);Vt&&Vt(Xe)};Pt=new u(t1(Pt.body,o1,Be,()=>{xe&&xe(),I&&I()}),qe)}V=V||"text";let Gt=yield w[j.findKey(w,V)||"text"](Pt,x);if(se&&!y&&!_n){let qe;if(Gt!=null&&(typeof Gt.byteLength=="number"?qe=Gt.byteLength:typeof Gt.size=="number"?qe=Gt.size:typeof Gt=="string"&&(qe=typeof r=="function"?new r().encode(Gt).byteLength:Gt.length)),typeof qe=="number"&&qe>re)throw new Te("maxContentLength size of "+re+" exceeded",Te.ERR_BAD_RESPONSE,x,K)}return!_n&&I&&I(),yield new Promise((qe,bt)=>{Wg(qe,bt,{data:Gt,headers:gn.from(Pt.headers),status:Pt.status,statusText:Pt.statusText,config:x,request:K})})}catch(be){if(I&&I(),F&&F.aborted&&F.reason instanceof Te){const Ie=F.reason;throw Ie.config=x,K&&(Ie.request=K),be!==Ie&&Object.defineProperty(Ie,"cause",{__proto__:null,value:be,writable:!0,enumerable:!1,configurable:!0}),Ie}if(Me)throw K&&!Me.request&&(Me.request=K),Me;if(be instanceof Te)throw K&&!be.request&&(be.request=K),be;if(be&&be.name==="TypeError"&&/Load failed|fetch/i.test(be.message)){const Ie=new Te("Network Error",Te.ERR_NETWORK,x,K,be&&be.response);throw Object.defineProperty(Ie,"cause",{__proto__:null,value:be.cause||be,writable:!0,enumerable:!1,configurable:!0}),Ie}throw Te.from(be,be&&be.code,x,K,be&&be.response)}})},jC=new Map,u1=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,l=u,d,f,p=jC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:zC(t)),p=f;return f};u1();const Sf={http:eC,xhr:AC,fetch:{get:u1}};j.forEach(Sf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const l1=e=>`- ${e}`,$C=e=>j.isFunction(e)||e===null||e===!1;function VC(e,t){e=j.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let l;if(o=r,!$C(r)&&(o=Sf[(l=String(r)).toLowerCase()],o===void 0))throw new Te(`Unknown adapter '${l}'`);if(o&&(j.isFunction(o)||(o=o.get(t))))break;a[l||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let l=n?u.length>1?`since :
|
|
5
|
-
`+u.map(
|
|
6
|
-
`):" "+
|
|
1
|
+
(function(Me,$e){typeof exports=="object"&&typeof module!="undefined"?$e(exports):typeof define=="function"&&define.amd?define(["exports"],$e):(Me=typeof globalThis!="undefined"?globalThis:Me||self,$e(Me.CimulateCopilot={}))})(this,(function(Me){"use strict";var WU=Object.defineProperty,GU=Object.defineProperties;var XU=Object.getOwnPropertyDescriptors;var jd=Object.getOwnPropertySymbols;var pS=Object.prototype.hasOwnProperty,mS=Object.prototype.propertyIsEnumerable;var ma=(Me,$e)=>($e=Symbol[Me])?$e:Symbol.for("Symbol."+Me),KU=Me=>{throw TypeError(Me)},tl=Math.pow,kg=(Me,$e,Ke)=>$e in Me?WU(Me,$e,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Me[$e]=Ke,M=(Me,$e)=>{for(var Ke in $e||($e={}))pS.call($e,Ke)&&kg(Me,Ke,$e[Ke]);if(jd)for(var Ke of jd($e))mS.call($e,Ke)&&kg(Me,Ke,$e[Ke]);return Me},ge=(Me,$e)=>GU(Me,XU($e));var wn=(Me,$e)=>{var Ke={};for(var ft in Me)pS.call(Me,ft)&&$e.indexOf(ft)<0&&(Ke[ft]=Me[ft]);if(Me!=null&&jd)for(var ft of jd(Me))$e.indexOf(ft)<0&&mS.call(Me,ft)&&(Ke[ft]=Me[ft]);return Ke};var ve=(Me,$e,Ke)=>kg(Me,typeof $e!="symbol"?$e+"":$e,Ke);var Ze=(Me,$e,Ke)=>new Promise((ft,Bt)=>{var wt=xt=>{try{mn(Ke.next(xt))}catch(Ln){Bt(Ln)}},Be=xt=>{try{mn(Ke.throw(xt))}catch(Ln){Bt(Ln)}},mn=xt=>xt.done?ft(xt.value):Promise.resolve(xt.value).then(wt,Be);mn((Ke=Ke.apply(Me,$e)).next())}),hi=function(Me,$e){this[0]=Me,this[1]=$e},$d=(Me,$e,Ke)=>{var ft=(mn,xt,Ln,kr)=>{try{var go=Ke[mn](xt),as=(xt=go.value)instanceof hi,us=go.done;Promise.resolve(as?xt[0]:xt).then($n=>as?ft(mn==="return"?mn:"next",xt[1]?{done:$n.done,value:$n.value}:$n,Ln,kr):Ln({value:$n,done:us})).catch($n=>ft("throw",$n,Ln,kr))}catch($n){kr($n)}},Bt=(mn,xt,Ln,kr)=>Be[mn]=go=>(xt=new Promise((as,us,$n)=>($n=()=>ft(mn,go,as,us),wt?wt.then($n):$n())),kr=()=>wt===Ln&&(wt=0),wt=Ln=xt.then(kr,kr),xt),wt,Be={};return Ke=Ke.apply(Me,$e),Be[ma("asyncIterator")]=()=>Be,Bt("next"),Bt("throw"),Bt("return"),Be},Pg=Me=>{var $e=Me[ma("asyncIterator")],Ke=!1,ft,Bt={};return $e==null?($e=Me[ma("iterator")](),ft=wt=>Bt[wt]=Be=>$e[wt](Be)):($e=$e.call(Me),ft=wt=>Bt[wt]=Be=>{if(Ke){if(Ke=!1,wt==="throw")throw Be;return Be}return Ke=!0,{done:!1,value:new hi(new Promise(mn=>{var xt=$e[wt](Be);xt instanceof Object||KU("Object expected"),mn(xt)}),1)}}),Bt[ma("iterator")]=()=>Bt,ft("next"),"throw"in $e?ft("throw"):Bt.throw=wt=>{throw wt},"return"in $e&&ft("return"),Bt},gS=(Me,$e,Ke)=>($e=Me[ma("asyncIterator")])?$e.call(Me):(Me=Me[ma("iterator")](),$e={},Ke=(ft,Bt)=>(Bt=Me[ft])&&($e[ft]=wt=>new Promise((Be,mn,xt)=>(wt=Bt.call(Me,wt),xt=wt.done,Promise.resolve(wt.value).then(Ln=>Be({value:Ln,done:xt}),mn)))),Ke("next"),Ke("return"),$e);var $e=document.createElement("style");$e.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-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($e);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ft={exports:{}},Bt={},wt={exports:{}},Be={};var mn;function xt(){if(mn)return Be;mn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),l=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function T(F){return F===null||typeof F!="object"?null:(F=m&&F[m]||F["@@iterator"],typeof F=="function"?F:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},w=Object.assign,v={};function P(F,K,O){this.props=F,this.context=K,this.refs=v,this.updater=O||y}P.prototype.isReactComponent={},P.prototype.setState=function(F,K){if(typeof F!="object"&&typeof F!="function"&&F!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,F,K,"setState")},P.prototype.forceUpdate=function(F){this.updater.enqueueForceUpdate(this,F,"forceUpdate")};function _(){}_.prototype=P.prototype;function C(F,K,O){this.props=F,this.context=K,this.refs=v,this.updater=O||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 te(F,K,O){var ce,we={},Ce=null,xe=null;if(K!=null)for(ce in K.ref!==void 0&&(xe=K.ref),K.key!==void 0&&(Ce=""+K.key),K)U.call(K,ce)&&!z.hasOwnProperty(ce)&&(we[ce]=K[ce]);var Re=arguments.length-2;if(Re===1)we.children=O;else if(1<Re){for(var Fe=Array(Re),at=0;at<Re;at++)Fe[at]=arguments[at+2];we.children=Fe}if(F&&F.defaultProps)for(ce in Re=F.defaultProps,Re)we[ce]===void 0&&(we[ce]=Re[ce]);return{$$typeof:e,type:F,key:Ce,ref:xe,props:we,_owner:L.current}}function he(F,K){return{$$typeof:e,type:F.type,key:K,ref:F.ref,props:F.props,_owner:F._owner}}function q(F){return typeof F=="object"&&F!==null&&F.$$typeof===e}function re(F){var K={"=":"=0",":":"=2"};return"$"+F.replace(/[=:]/g,function(O){return K[O]})}var de=/\/+/g;function ye(F,K){return typeof F=="object"&&F!==null&&F.key!=null?re(""+F.key):K.toString(36)}function ee(F,K,O,ce,we){var Ce=typeof F;(Ce==="undefined"||Ce==="boolean")&&(F=null);var xe=!1;if(F===null)xe=!0;else switch(Ce){case"string":case"number":xe=!0;break;case"object":switch(F.$$typeof){case e:case t:xe=!0}}if(xe)return xe=F,we=we(xe),F=ce===""?"."+ye(xe,0):ce,H(we)?(O="",F!=null&&(O=F.replace(de,"$&/")+"/"),ee(we,K,O,"",function(at){return at})):we!=null&&(q(we)&&(we=he(we,O+(!we.key||xe&&xe.key===we.key?"":(""+we.key).replace(de,"$&/")+"/")+F)),K.push(we)),1;if(xe=0,ce=ce===""?".":ce+":",H(F))for(var Re=0;Re<F.length;Re++){Ce=F[Re];var Fe=ce+ye(Ce,Re);xe+=ee(Ce,K,O,Fe,we)}else if(Fe=T(F),typeof Fe=="function")for(F=Fe.call(F),Re=0;!(Ce=F.next()).done;)Ce=Ce.value,Fe=ce+ye(Ce,Re++),xe+=ee(Ce,K,O,Fe,we);else if(Ce==="object")throw K=String(F),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(F).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return xe}function oe(F,K,O){if(F==null)return F;var ce=[],we=0;return ee(F,ce,"","",function(Ce){return K.call(O,Ce,we++)}),ce}function Ae(F){if(F._status===-1){var K=F._result;K=K(),K.then(function(O){(F._status===0||F._status===-1)&&(F._status=1,F._result=O)},function(O){(F._status===0||F._status===-1)&&(F._status=2,F._result=O)}),F._status===-1&&(F._status=0,F._result=K)}if(F._status===1)return F._result.default;throw F._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 Be.Children={map:oe,forEach:function(F,K,O){oe(F,function(){K.apply(this,arguments)},O)},count:function(F){var K=0;return oe(F,function(){K++}),K},toArray:function(F){return oe(F,function(K){return K})||[]},only:function(F){if(!q(F))throw Error("React.Children.only expected to receive a single React element child.");return F}},Be.Component=P,Be.Fragment=n,Be.Profiler=o,Be.PureComponent=C,Be.StrictMode=r,Be.Suspense=d,Be.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,Be.act=k,Be.cloneElement=function(F,K,O){if(F==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+F+".");var ce=w({},F.props),we=F.key,Ce=F.ref,xe=F._owner;if(K!=null){if(K.ref!==void 0&&(Ce=K.ref,xe=L.current),K.key!==void 0&&(we=""+K.key),F.type&&F.type.defaultProps)var Re=F.type.defaultProps;for(Fe in K)U.call(K,Fe)&&!z.hasOwnProperty(Fe)&&(ce[Fe]=K[Fe]===void 0&&Re!==void 0?Re[Fe]:K[Fe])}var Fe=arguments.length-2;if(Fe===1)ce.children=O;else if(1<Fe){Re=Array(Fe);for(var at=0;at<Fe;at++)Re[at]=arguments[at+2];ce.children=Re}return{$$typeof:e,type:F.type,key:we,ref:Ce,props:ce,_owner:xe}},Be.createContext=function(F){return F={$$typeof:u,_currentValue:F,_currentValue2:F,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},F.Provider={$$typeof:a,_context:F},F.Consumer=F},Be.createElement=te,Be.createFactory=function(F){var K=te.bind(null,F);return K.type=F,K},Be.createRef=function(){return{current:null}},Be.forwardRef=function(F){return{$$typeof:l,render:F}},Be.isValidElement=q,Be.lazy=function(F){return{$$typeof:p,_payload:{_status:-1,_result:F},_init:Ae}},Be.memo=function(F,K){return{$$typeof:f,type:F,compare:K===void 0?null:K}},Be.startTransition=function(F){var K=J.transition;J.transition={};try{F()}finally{J.transition=K}},Be.unstable_act=k,Be.useCallback=function(F,K){return ae.current.useCallback(F,K)},Be.useContext=function(F){return ae.current.useContext(F)},Be.useDebugValue=function(){},Be.useDeferredValue=function(F){return ae.current.useDeferredValue(F)},Be.useEffect=function(F,K){return ae.current.useEffect(F,K)},Be.useId=function(){return ae.current.useId()},Be.useImperativeHandle=function(F,K,O){return ae.current.useImperativeHandle(F,K,O)},Be.useInsertionEffect=function(F,K){return ae.current.useInsertionEffect(F,K)},Be.useLayoutEffect=function(F,K){return ae.current.useLayoutEffect(F,K)},Be.useMemo=function(F,K){return ae.current.useMemo(F,K)},Be.useReducer=function(F,K,O){return ae.current.useReducer(F,K,O)},Be.useRef=function(F){return ae.current.useRef(F)},Be.useState=function(F){return ae.current.useState(F)},Be.useSyncExternalStore=function(F,K,O){return ae.current.useSyncExternalStore(F,K,O)},Be.useTransition=function(){return ae.current.useTransition()},Be.version="18.3.1",Be}var Ln;function kr(){return Ln||(Ln=1,wt.exports=xt()),wt.exports}var go;function as(){if(go)return Bt;go=1;var e=kr(),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 Bt.Fragment=n,Bt.jsx=u,Bt.jsxs=u,Bt}var us;function $n(){return us||(us=1,ft.exports=as()),ft.exports}var x=$n();const Yr=Object.create(null);Yr.open="0",Yr.close="1",Yr.ping="2",Yr.pong="3",Yr.message="4",Yr.upgrade="5",Yr.noop="6";const nl=Object.create(null);Object.keys(Yr).forEach(e=>{nl[Yr[e]]=e});const Vd={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,qd=({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(Yr[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 Yd;function TS(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));qd(e,!1,n=>{Yd||(Yd=new TextEncoder),t(Yd.encode(n))})}const Dg="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",ga=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Dg.length;e++)ga[Dg.charCodeAt(e)]=e;const wS=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=ga[e.charCodeAt(r)],u=ga[e.charCodeAt(r+1)],l=ga[e.charCodeAt(r+2)],d=ga[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},xS=typeof ArrayBuffer=="function",Wd=(e,t)=>{if(typeof e!="string")return{type:"message",data:Mg(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:_S(e.substring(1),t)}:nl[n]?e.length>1?{type:nl[n],data:e.substring(1)}:{type:nl[n]}:Vd},_S=(e,t)=>{if(xS){const n=wS(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="",SS=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{qd(a,!1,l=>{r[u]=l,++o===n&&t(r.join(Fg))})})},vS=(e,t)=>{const n=e.split(Fg),r=[];for(let o=0;o<n.length;o++){const a=Wd(n[o],t);if(r.push(a),a.type==="error")break}return r};function AS(){return new TransformStream({transform(e,t){TS(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 Gd;function rl(e){return e.reduce((t,n)=>t+n.length,0)}function il(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 CS(e,t){Gd||(Gd=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(rl(n)<1)break;const d=il(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(rl(n)<2)break;const d=il(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(rl(n)<8)break;const d=il(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){l.enqueue(Vd);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(rl(n)<o)break;const d=il(n,o);l.enqueue(Wd(a?d:Gd.decode(d),t)),r=0}if(o===0||o>e){l.enqueue(Vd);break}}}})}const Bg=4;function Yt(e){if(e)return kS(e)}function kS(e){for(var t in Yt.prototype)e[t]=Yt.prototype[t];return e}Yt.prototype.on=Yt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Yt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Yt.prototype.off=Yt.prototype.removeListener=Yt.prototype.removeAllListeners=Yt.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},Yt.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},Yt.prototype.emitReserved=Yt.prototype.emit,Yt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Yt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const ol=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),mr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),PS="arraybuffer";function QU(){}function Ug(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const NS=mr.setTimeout,OS=mr.clearTimeout;function sl(e,t){t.useNativeTimers?(e.setTimeoutFn=NS.bind(mr),e.clearTimeoutFn=OS.bind(mr)):(e.setTimeoutFn=mr.setTimeout.bind(mr),e.clearTimeoutFn=mr.clearTimeout.bind(mr))}const IS=1.33;function RS(e){return typeof e=="string"?LS(e):Math.ceil((e.byteLength||e.size)*IS)}function LS(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 DS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function MS(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 FS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Xd extends Yt{constructor(t){super(),this.writable=!1,sl(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 FS(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=Wd(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=DS(t);return n.length?"?"+n:""}}class BS extends Xd{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)};vS(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,SS(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 US=zg;function HS(){}class zS extends BS{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 Wr extends Yt{constructor(t,n,r){super(),this.createRequest=t,sl(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=Wr.requestsCount++,Wr.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=HS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Wr.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(Wr.requestsCount=0,Wr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",jg);else if(typeof addEventListener=="function"){const e="onpagehide"in mr?"pagehide":"unload";addEventListener(e,jg,!1)}}function jg(){for(let e in Wr.requests)Wr.requests.hasOwnProperty(e)&&Wr.requests[e].abort()}const jS=(function(){const e=$g({xdomain:!1});return e&&e.responseType!==null})();class $S extends zS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=jS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Wr($g,this.uri(),t)}}function $g(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||US))return new XMLHttpRequest}catch(n){}if(!t)try{return new mr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Vg=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class VS extends Xd{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;qd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&ol(()=>{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 Kd=mr.WebSocket||mr.MozWebSocket;class qS extends VS{createSocket(t,n,r){return Vg?new Kd(t,n,r):n?new Kd(t,n):new Kd(t)}doWrite(t,n){this.ws.send(n)}}class YS extends Xd{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=CS(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=AS();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&&ol(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const WS={websocket:qS,webtransport:YS,polling:$S},GS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,XS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Qd(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=GS.exec(e||""),a={},u=14;for(;u--;)a[XS[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=KS(a,a.path),a.queryKey=QS(a,a.query),a}function KS(e,t){const n=/\/{2,9}/g,r=t.replace(n,"/").split("/");return(t.slice(0,1)=="/"||t.length===0)&&r.splice(0,1),t.slice(-1)=="/"&&r.splice(r.length-1,1),r}function QS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const Jd=typeof addEventListener=="function"&&typeof removeEventListener=="function",al=[];Jd&&addEventListener("offline",()=>{al.forEach(e=>e())},!1);class Di extends Yt{constructor(t,n){if(super(),this.binaryType=PS,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=Qd(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=Qd(n.host).host);sl(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=MS(this.opts.query)),Jd&&(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"})},al.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&&Di.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",Di.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+=RS(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,ol(()=>{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(Di.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(),Jd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=al.indexOf(this._offlineEventListener);r!==-1&&al.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Di.protocol=Bg;class JS extends Di{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;Di.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;Di.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 ZS=class extends JS{constructor(t,n={}){const r=typeof t=="object",o=r?M({},t):M({},n);(!o.transports||o.transports&&typeof o.transports[0]=="string")&&(o.transports=(o.transports||["polling","websocket","webtransport"]).map(a=>WS[a]).filter(a=>!!a)),super(r?o:t,o)}};function ev(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=Qd(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 tv=typeof ArrayBuffer=="function",nv=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,qg=Object.prototype.toString,rv=typeof Blob=="function"||typeof Blob!="undefined"&&qg.call(Blob)==="[object BlobConstructor]",iv=typeof File=="function"||typeof File!="undefined"&&qg.call(File)==="[object FileConstructor]";function Zd(e){return tv&&(e instanceof ArrayBuffer||nv(e))||rv&&e instanceof Blob||iv&&e instanceof File}function ul(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ul(e[n]))return!0;return!1}if(Zd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ul(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ul(e[n]))return!0;return!1}function ov(e){const t=[],n=e.data,r=e;return r.data=ll(n,t),r.attachments=t.length,{packet:r,buffers:t}}function ll(e,t,n){if(!e)return e;if(Zd(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]=ll(e[o],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return ll(e.toJSON(),t,!0);const r={};for(const o in e)Object.prototype.hasOwnProperty.call(e,o)&&(r[o]=ll(e[o],t));return r}return e}function sv(e,t){return e.data=ef(e.data,t),delete e.attachments,e}function ef(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]=ef(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=ef(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 uv{constructor(t){this.replacer=t}encode(t){return(t.type===nt.EVENT||t.type===nt.ACK)&&ul(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=ov(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class tf extends Yt{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 lv(n)):super.emitReserved("decoded",n)}else if(Zd(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(!cv(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(tf.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"&&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 lv{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=sv(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const cv=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 dv=Object.freeze(Object.defineProperty({__proto__:null,Decoder:tf,Encoder:uv,get PacketType(){return nt}},Symbol.toStringTag,{value:"Module"}));function Pr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const fv=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class Wg extends Yt{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=[Pr(t,"open",this.onopen.bind(this)),Pr(t,"packet",this.onpacket.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(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(fv.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 ls(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}ls.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},ls.prototype.reset=function(){this.attempts=0},ls.prototype.setMin=function(e){this.ms=e},ls.prototype.setMax=function(e){this.max=e},ls.prototype.setJitter=function(e){this.jitter=e};class nf extends Yt{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,sl(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 ls({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||dv;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 ZS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=Pr(n,"open",function(){r.onopen(),t&&t()}),a=l=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",l),t?t(l):this.maybeReconnectOnOpen()},u=Pr(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(Pr(t,"ping",this.onping.bind(this)),Pr(t,"data",this.ondata.bind(this)),Pr(t,"error",this.onerror.bind(this)),Pr(t,"close",this.onclose.bind(this)),Pr(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){ol(()=>{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 Ea={};function cl(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=ev(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Ea[o]&&a in Ea[o].nsps,l=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return l?d=new nf(r,t):(Ea[o]||(Ea[o]=new nf(r,t)),d=Ea[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(cl,{Manager:nf,Socket:Wg,io:cl,connect:cl});var hv=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===pv})(t)})(e)},pv=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ya(e,t){return t.clone!==!1&&t.isMergeableObject(e)?cs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function mv(e,t,n){return e.concat(t).map((function(r){return ya(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 gv(e,t,n){var r={};return n.isMergeableObject(e)&&Gg(e).forEach((function(o){r[o]=ya(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 cs;var l=u.customMerge(a);return typeof l=="function"?l:cs})(o,n)(e[o],t[o],n):r[o]=ya(t[o],n))})),r}function cs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||mv,n.isMergeableObject=n.isMergeableObject||hv,n.cloneUnlessOtherwiseSpecified=ya;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):gv(e,t,n):ya(t,n)}cs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return cs(n,r,t)}),{})};var Ev=cs;let yv=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 bv=typeof ArrayBuffer=="function",Kg=Object.prototype.toString,Tv=typeof Blob=="function"||typeof Blob!="undefined"&&Kg.call(Blob)==="[object BlobConstructor]",wv=typeof File=="function"||typeof File!="undefined"&&Kg.call(File)==="[object FileConstructor]";function rf(e){return bv&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Tv&&e instanceof Blob||wv&&e instanceof File}function dl(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(dl(e[n]))return!0;return!1}if(rf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return dl(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&dl(e[n]))return!0;return!1}function xv(e){const t=[],n=e.data,r=e;return r.data=of(n,t),r.attachments=t.length,{packet:r,buffers:t}}function of(e,t){if(!e)return e;if(rf(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]=of(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]=of(e[r],t));return n}return e}function _v(e,t){return e.data=sf(e.data,t),delete e.attachments,e}function sf(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]=sf(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=sf(e[n],t));return e}const Sv=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var It;(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"})(It||(It={}));class vv{constructor(t){this.replacer=t}encode(t){return t.type!==It.EVENT&&t.type!==It.ACK||!dl(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===It.EVENT?It.BINARY_EVENT:It.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==It.BINARY_EVENT&&t.type!==It.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=xv(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}class af 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===It.BINARY_EVENT;r||n.type===It.BINARY_ACK?(n.type=r?It.EVENT:It.ACK,this.reconstructor=new Av(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!rf(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(It[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===It.BINARY_EVENT||r.type===It.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(!Cv(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(!af.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 It.CONNECT:return Qg(n);case It.DISCONNECT:return n===void 0;case It.CONNECT_ERROR:return typeof n=="string"||Qg(n);case It.EVENT:case It.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Sv.indexOf(n[0])===-1);case It.ACK:case It.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class Av{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=_v(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Cv=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())),kv=Zg((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),Jg),t0=Zg(e0,e0,Jg),Pv={Encoder:class extends vv{encode(e){var t,n;return super.encode(ge(M({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],kv(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 af{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))}}},Nv={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Ov{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=[Nv,l,{parser:Pv,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=cl(d,Ev.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*tl(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 Ze(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ze(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 Ze(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ze(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ze(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ze(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 Ze(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return $d(this,null,function*(){const l=[];let d=!1,f=null;const p=yield new hi(u({emit:m=>{l.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)l.length>0?yield l.shift():yield new hi(new Promise((m=>{f=m})));for(;l.length>0;)yield l.shift()}finally{yield new hi(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),()=>Ze(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 yv(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 I=kr();const Eo=Ke(I);var i0=Symbol.for("immer-nothing"),o0=Symbol.for("immer-draftable"),lt=Symbol.for("immer-state");function gr(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ds=Object.getPrototypeOf;function fs(e){return!!e&&!!e[lt]}function pi(e){var t;return e?s0(e)||Array.isArray(e)||!!e[o0]||!!((t=e.constructor)!=null&&t[o0])||Ta(e)||hl(e):!1}var Iv=Object.prototype.constructor.toString();function s0(e){if(!e||typeof e!="object")return!1;const t=ds(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)===Iv}function ba(e,t){fl(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function fl(e){const t=e[lt];return t?t.type_:Array.isArray(e)?1:Ta(e)?2:hl(e)?3:0}function uf(e,t){return fl(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function a0(e,t,n){const r=fl(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Rv(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Ta(e){return e instanceof Map}function hl(e){return e instanceof Set}function rn(e){return e.copy_||e.base_}function lf(e,t){if(Ta(e))return new Map(e);if(hl(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[lt];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(ds(e),r)}else{const r=ds(e);if(r!==null&&n)return M({},e);const o=Object.create(r);return Object.assign(o,e)}}function cf(e,t=!1){return ml(e)||fs(e)||!pi(e)||(fl(e)>1&&Object.defineProperties(e,{set:{value:pl},add:{value:pl},clear:{value:pl},delete:{value:pl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>cf(n,!0))),e}function pl(){gr(2)}function ml(e){return Object.isFrozen(e)}var df={};function yo(e){const t=df[e];return t||gr(0,e),t}function Lv(e,t){df[e]||(df[e]=t)}var wa;function gl(){return wa}function Dv(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function u0(e,t){t&&(yo("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function ff(e){hf(e),e.drafts_.forEach(Mv),e.drafts_=null}function hf(e){e===wa&&(wa=e.parent_)}function l0(e){return wa=Dv(wa,e)}function Mv(e){const t=e[lt];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[lt].modified_&&(ff(t),gr(4)),pi(e)&&(e=El(t,e),t.parent_||yl(t,e)),t.patches_&&yo("Patches").generateReplacementPatches_(n[lt].base_,e,t.patches_,t.inversePatches_)):e=El(t,n,[]),ff(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==i0?e:void 0}function El(e,t,n){if(ml(t))return t;const r=t[lt];if(!r)return ba(t,(o,a)=>d0(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return yl(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),ba(a,(l,d)=>d0(e,r,o,l,d,n,u)),yl(e,o,!1),n&&e.patches_&&yo("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function d0(e,t,n,r,o,a,u){if(fs(o)){const l=a&&t&&t.type_!==3&&!uf(t.assigned_,r)?a.concat(r):void 0,d=El(e,o,l);if(a0(n,r,d),fs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(pi(o)&&!ml(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;El(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Ta(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&yl(e,o)}}function yl(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&cf(t,n)}function Fv(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:gl(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=pf;n&&(o=[r],a=xa);const{revoke:u,proxy:l}=Proxy.revocable(o,a);return r.draft_=l,r.revoke_=u,l}var pf={get(e,t){if(t===lt)return e;const n=rn(e);if(!uf(n,t))return Bv(e,n,t);const r=n[t];return e.finalized_||!pi(r)?r:r===mf(e.base_,t)?(gf(e),e.copy_[t]=_a(r,e)):r},has(e,t){return t in rn(e)},ownKeys(e){return Reflect.ownKeys(rn(e))},set(e,t,n){const r=f0(rn(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=mf(rn(e),t),a=o==null?void 0:o[lt];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Rv(n,o)&&(n!==void 0||uf(e.base_,t)))return!0;gf(e),mi(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 mf(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,gf(e),mi(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=rn(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){gr(11)},getPrototypeOf(e){return ds(e.base_)},setPrototypeOf(){gr(12)}},xa={};ba(pf,(e,t)=>{xa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),xa.deleteProperty=function(e,t){return xa.set.call(this,e,t,void 0)},xa.set=function(e,t,n){return pf.set.call(this,e[0],t,n,e[0])};function mf(e,t){const n=e[lt];return(n?rn(n):e)[t]}function Bv(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=ds(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ds(n)}}function mi(e){e.modified_||(e.modified_=!0,e.parent_&&mi(e.parent_))}function gf(e){e.copy_||(e.copy_=lf(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Uv=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"&&gr(6),r!==void 0&&typeof r!="function"&&gr(7);let o;if(pi(t)){const a=l0(this),u=_a(t,void 0);let l=!0;try{o=n(u),l=!1}finally{l?ff(a):hf(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_&&cf(o,!0),r){const a=[],u=[];yo("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else gr(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){pi(e)||gr(8),fs(e)&&(e=Hv(e));const t=l0(this),n=_a(e,void 0);return n[lt].isManual_=!0,hf(t),n}finishDraft(e,t){const n=e&&e[lt];(!n||!n.isManual_)&&gr(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=yo("Patches").applyPatches_;return fs(e)?r(e,t):this.produce(e,o=>r(o,t))}};function _a(e,t){const n=Ta(e)?yo("MapSet").proxyMap_(e,t):hl(e)?yo("MapSet").proxySet_(e,t):Fv(e,t);return(t?t.scope_:gl()).drafts_.push(n),n}function Hv(e){return fs(e)||gr(10,e),h0(e)}function h0(e){if(!pi(e)||ml(e))return e;const t=e[lt];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=lf(e,t.scope_.immer_.useStrictShallowCopy_)}else n=lf(e,!0);return ba(n,(r,o)=>{a0(n,r,h0(o))}),t&&(t.finalized_=!1),n}function zv(){class e extends Map{constructor(d,f){super(),this[lt]={type_:2,parent_:f,scope_:f?f.scope_:gl(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return rn(this[lt]).size}has(d){return rn(this[lt]).has(d)}set(d,f){const p=this[lt];return u(p),(!rn(p).has(d)||rn(p).get(d)!==f)&&(n(p),mi(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[lt];return u(f),n(f),mi(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[lt];u(d),rn(d).size&&(n(d),mi(d),d.assigned_=new Map,ba(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[lt];rn(p).forEach((m,T,y)=>{d.call(f,this.get(T),T,this)})}get(d){const f=this[lt];u(f);const p=rn(f).get(d);if(f.finalized_||!pi(p)||p!==f.base_.get(d))return p;const m=_a(p,f);return n(f),f.copy_.set(d,m),m}keys(){return rn(this[lt]).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[lt]={type_:3,parent_:f,scope_:f?f.scope_:gl(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return rn(this[lt]).size}has(d){const f=this[lt];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[lt];return u(f),this.has(d)||(a(f),mi(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[lt];return u(f),a(f),mi(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[lt];u(d),rn(d).size&&(a(d),mi(d),d.copy_.clear())}values(){const d=this[lt];return u(d),a(d),d.copy_.values()}entries(){const d=this[lt];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(pi(d)){const f=_a(d,l);l.drafts_.set(d,f),l.copy_.add(f)}else l.copy_.add(d)}))}function u(l){l.revoked_&&gr(3,JSON.stringify(rn(l)))}Lv("MapSet",{proxyMap_:t,proxySet_:o})}var jv=new Uv,$v=jv.produce;function p0(e,t,n){var r=I.useMemo(function(){return $v(e)},[e]);return I.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"},gt={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"},bo={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"],Vv=e=>g0.includes(e),E0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(E0));const qv=new Map(Object.entries(E0).map(([e,t])=>[t,e])),Yv=e=>{var t;return(t=qv.get(e))!=null?t:null},hs="cimulate",Ef=`${hs}:pdp-update`,yf=`${hs}:browse-update`,bf=`${hs}:search-update`,Tf=`${hs}:ui-state-update`,wf=`${hs}:prompts-state-update`,xf=`${hs}:session-state`,Gr=M({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},m0),Wv={"browse-context":Gr.CONTEXT_UPDATED,categoryId:Gr.CATEGORY_ID_CHANGED,categoryName:Gr.CATEGORY_NAME_CHANGED,page:Gr.PAGE_CHANGED,pageSize:Gr.PAGE_SIZE_CHANGED,includeFacets:Gr.FACET_FILTERS_CHANGED,facetFilters:Gr.FACET_FILTERS_CHANGED,rangeFilters:Gr.RANGE_FILTERS_CHANGED,catalogSegment:Gr.CATALOG_SEGMENT_CHANGED,pricebooks:Gr.PRICEBOOKS_CHANGED},gi=M({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},m0),Gv={"search-context":gi.SEARCH_CONTEXT_UPDATED,query:gi.QUERY_CHANGED,page:gi.PAGE_CHANGED,pageSize:gi.PAGE_SIZE_CHANGED,includeFacets:gi.FACET_FILTERS_CHANGED,facetFilters:gi.FACET_FILTERS_CHANGED,rangeFilters:gi.RANGE_FILTERS_CHANGED,catalogSegment:gi.CATALOG_SEGMENT_CHANGED,pricebooks:gi.PRICEBOOKS_CHANGED},j="cim-widget",rt=`--${j}`,Mi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",inputBorderColor:"#767676",borderRadius:"0.25rem"},Xv=(e={})=>({[`${rt}-primary-color`]:e.primaryColor||Mi.primaryColor,[`${rt}-secondary-color`]:e.secondaryColor||Mi.secondaryColor,[`${rt}-font-color`]:e.fontColor||Mi.fontColor,[`${rt}-font-family`]:e.fontFamily||Mi.fontFamily,[`${rt}-background-color`]:e.backgroundColor||Mi.backgroundColor,[`${rt}-border-color`]:e.borderColor||Mi.borderColor,[`${rt}-input-border-color`]:e.inputBorderColor||e.borderColor||Mi.inputBorderColor,[`${rt}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||Mi.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"},bl={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"}}},Kv=Object.freeze({legacy:Object.freeze(M({preset:"legacy"},bl.legacy.traits)),commerce:Object.freeze(M({preset:"commerce"},bl.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"},Fi=e=>e!==null&&typeof e=="object"&&!Array.isArray(e),Vn=e=>e===0||typeof e=="string"&&e.trim().length>0,To=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),S0=e=>{var T,y;const t=Fi(e)?e:{},r=t.preset==="commerce"?"commerce":"legacy",a=!(To(t,"tokens")||["density","shape","elevation"].some(w=>To(t,w)&&t[w]!==bl[r].traits[w]))&&r==="legacy"?"legacy":null,u=a?Xv(t):void 0,l=bl[r],d=M({},l.traits);typeof t.density=="string"&&To(b0,t.density)&&(d.density=t.density),typeof t.shape=="string"&&To(T0,t.shape)&&(d.shape=t.shape),typeof t.elevation=="string"&&To(w0,t.elevation)&&(d.elevation=t.elevation);const f=M(M(M(M(M({},y0),l.tokens),b0[d.density]),T0[d.shape]),w0[d.elevation]);if(Fi(t.tokens))for(const w of Object.keys(y0)){const v=t.tokens[w];To(t.tokens,w)&&Vn(v)&&(f[w]=String(v))}Fi(t.tokens)&&Vn(t.tokens.fontFamily)&&!Vn(t.tokens.productFontFamily)&&(f.productFontFamily=`var(${rt}-font-family)`),Fi(t.tokens)&&Vn(t.tokens.launcherShadow)&&!Vn(t.tokens.launcherAnimation)&&(f.launcherAnimation="none"),Fi(t.tokens)&&Vn(t.tokens.transcriptPadding)&&!Vn(t.tokens.mobileTranscriptPadding)&&(f.mobileTranscriptPadding=String(t.tokens.transcriptPadding)),Fi(t.tokens)&&Vn(t.tokens.text)&&!Vn(t.tokens.foreground)&&(f.foreground=`var(${rt}-font-color)`);const p=Fi(t.tokens)?t.tokens.inputBorder:void 0;!Vn(p)&&Fi(t.tokens)&&Vn(t.tokens.border)&&(f.inputBorder=String(t.tokens.border));for(const[w,v]of Object.entries(x0)){const P=t[w];To(t,w)&&Vn(P)&&(f[v]=String(P),w==="borderColor"&&!Vn(t.inputBorderColor)&&!Vn(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:M({},l.variants),transcriptClassName:a==="legacy"?"":`${j}-transcript-${l.variants.transcript}`}},Ei={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=I.createContext(null),A0=I.createContext(null),Et={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};function k0(e,t){return function(){return e.apply(t,arguments)}}const{toString:Qv}=Object.prototype,{getPrototypeOf:Bi}=Object,{iterator:Sa,toStringTag:P0}=Symbol,va=(({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,Jv=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})},Aa=(e,t)=>{let n=e;const r=[];for(;n!=null;){if(r.indexOf(n)!==-1)return!1;r.push(n);const o=Bi(n);if(O0(n,o,n===e))return!1;if(va(n,t))return!0;n=o}return!1},Zv=(e,t)=>e!=null&&Aa(e,t)?e[t]:void 0,eA=e=>{if(e==null||typeof e!="object"&&typeof e!="function")return e;const t=Bi(e);if(t===null&&Jv(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:Bi(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)||va(r,d)||(n[d]=e[d],r[d]=!0);a=u}return n},_f=(e=>t=>{const n=Qv.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),Er=e=>(e=e.toLowerCase(),t=>_f(t)===e),Tl=e=>t=>typeof t===e,{isArray:wo}=Array,xo=Tl("undefined");function ps(e){return e!==null&&!xo(e)&&e.constructor!==null&&!xo(e.constructor)&&qn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const I0=Er("ArrayBuffer");function tA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&I0(e.buffer),t}const nA=Tl("string"),qn=Tl("function"),R0=Tl("number"),ms=e=>e!==null&&typeof e=="object",rA=e=>e===!0||e===!1,wl=e=>{if(!ms(e))return!1;const t=Bi(e);return(t===null||t===Object.prototype||Bi(t)===null)&&!Aa(e,P0)&&!Aa(e,Sa)},iA=e=>{if(!ms(e)||ps(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},oA=Er("Date"),sA=Er("File"),aA=e=>!!(e&&typeof e.uri!="undefined"),uA=e=>e&&typeof e.getParts!="undefined",lA=Er("Blob"),cA=Er("FileList"),dA=Er("Set"),fA=e=>ms(e)&&qn(e.pipe);function hA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const L0=hA(),D0=typeof L0.FormData!="undefined"?L0.FormData:void 0,pA=e=>{if(!e)return!1;if(D0&&e instanceof D0)return!0;const t=Bi(e);if(!t||t===Object.prototype||!qn(e.append))return!1;const n=_f(e);return n==="formdata"||n==="object"&&qn(e.toString)&&e.toString()==="[object FormData]"},mA=Er("URLSearchParams"),[gA,EA,yA,bA]=["ReadableStream","Request","Response","Headers"].map(Er),TA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function Ca(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),wo(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(ps(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(ps(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 _o=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,F0=e=>!xo(e)&&e!==_o;function Sf(...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=va(r,l)?r[l]:void 0;wl(d)&&wl(a)?r[l]=Sf(d,a):wl(a)?r[l]=Sf({},a):wo(a)?r[l]=a.slice():(!n||!xo(a))&&(r[l]=a)};for(let a=0,u=e.length;a<u;a++){const l=e[a];if(!l||ps(l)||(Ca(l,o),typeof l!="object"||wo(l)))continue;const d=Object.getOwnPropertySymbols(l);for(let f=0;f<d.length;f++){const p=d[f];IA.call(l,p)&&o(l[p],p)}}return r}const wA=(e,t,n,{allOwnKeys:r}={})=>(Ca(t,(o,a)=>{n&&qn(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),xA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),_A=(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)},SA=(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&&Bi(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},vA=(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},AA=e=>{if(!e)return null;if(wo(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},CA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&Bi(Uint8Array)),kA=(e,t)=>{const r=(e&&e[Sa]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},PA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},NA=Er("HTMLFormElement"),OA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),{propertyIsEnumerable:IA}=Object.prototype,RA=Er("RegExp"),B0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};Ca(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},LA=e=>{B0(e,(t,n)=>{if(qn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(qn(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+"'")})}})},DA=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return wo(e)?r(e):r(String(e).split(t)),n},MA=()=>{},FA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function BA(e){return!!(e&&qn(e.append)&&e[P0]==="FormData"&&e[Sa])}const UA=e=>{const t=new WeakSet,n=r=>{if(ms(r)){if(t.has(r))return;if(ps(r))return r;if(!("toJSON"in r)){t.add(r);let o;if(dA(r)){o=[];for(const a of r){const u=n(a);!xo(u)&&o.push(u)}}else o=wo(r)?[]:{},Ca(r,(a,u)=>{const l=n(a);!xo(l)&&(o[u]=l)});return t.delete(r),o}}return r};return n(e)},HA=Er("AsyncFunction"),zA=e=>e&&(ms(e)||qn(e))&&qn(e.then)&&qn(e.catch),U0=((e,t)=>e?setImmediate:t?((n,r)=>(_o.addEventListener("message",({source:o,data:a})=>{o===_o&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),_o.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",qn(_o.postMessage)),jA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(_o):typeof process!="undefined"&&process.nextTick||U0,H0=e=>e!=null&&qn(e[Sa]),V={isArray:wo,isArrayBuffer:I0,isBuffer:ps,isFormData:pA,isArrayBufferView:tA,isString:nA,isNumber:R0,isBoolean:rA,isObject:ms,isPlainObject:wl,isEmptyObject:iA,isReadableStream:gA,isRequest:EA,isResponse:yA,isHeaders:bA,isUndefined:xo,isDate:oA,isFile:sA,isReactNativeBlob:aA,isReactNative:uA,isBlob:lA,isRegExp:RA,isFunction:qn,isStream:fA,isURLSearchParams:mA,isTypedArray:CA,isFileList:cA,forEach:Ca,merge:Sf,extend:wA,trim:TA,stripBOM:xA,inherits:_A,toFlatObject:SA,kindOf:_f,kindOfTest:Er,endsWith:vA,toArray:AA,forEachEntry:kA,matchAll:PA,isHTMLForm:NA,hasOwnProperty:va,hasOwnProp:va,hasOwnInPrototypeChain:Aa,getSafeProp:Zv,toSafeFlatObject:eA,reduceDescriptors:B0,freezeMethods:LA,toObjectSet:DA,toCamelCase:OA,noop:MA,toFiniteNumber:FA,findKey:M0,global:_o,isContextDefined:F0,isSpecCompliantForm:BA,toJSONObject:UA,isAsyncFn:HA,isThenable:zA,setImmediate:U0,asap:jA,isIterable:H0,isSafeIterable:e=>e!=null&&Aa(e,Sa)&&H0(e)},$A=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"]),VA=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($A,n)||(n==="set-cookie"?l?t[n].push(r):t[n]=[r]:t[n]=l?t[n]+", "+r:r)}),t};function qA(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 YA=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),WA=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function vf(e,t){return V.isArray(e)?e.map(n=>vf(n,t)):qA(String(e).replace(t,""))}const GA=e=>vf(e,YA),XA=e=>vf(e,WA);function z0(e){const t=Object.create(null);return V.forEach(e.toJSON(),(n,r)=>{t[r]=XA(n)}),t}const j0=Symbol("internals");function ka(e){return e&&String(e).trim().toLowerCase()}function xl(e){return e===!1||e==null?e:V.isArray(e)?e.map(xl):GA(String(e))}function KA(e){const t=Object.create(null),n=/([^\s,;=]+)\s*(?:=\s*([^,;]+))?/g;let r;for(;r=n.exec(e);)t[r[1]]=r[2];return t}const QA=/^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;function Af(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 JA(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 ZA(e){const t=Object.create(null),n=String(e);let r=0,o=!1,a=!1;function u(l){const d=Af(n.slice(r,l)),f=d.indexOf("=");if(f<1)return;const p=Af(d.slice(0,f));if(!QA.test(p))return;const m=p.toLowerCase();if(m==="__proto__"||m==="constructor"||m==="prototype")return;const T=Af(d.slice(f+1));t[m]=JA(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 eC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Cf(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 tC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function nC(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=ka(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]=xl(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())&&!eC(t))u(VA(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=ka(t),t){const r=V.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return KA(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=ka(t),t){const r=V.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Cf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=ka(u),u){const l=V.findKey(r,u);l&&(!n||Cf(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||Cf(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]=xl(o),delete n[a];return}const l=t?tC(a):String(a).trim();l!==a&&delete n[a],n[l]=xl(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 ZA(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=ka(u);r[l]||(nC(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 _l="[REDACTED ****]";function rC(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 iC(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)&&rC(a))return r.pop(),a;u=Object.create(null);for(const[l,d]of Object.entries(a)){const f=n.has(l.toLowerCase())?_l: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 oC(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 ES extends Error{static from(t,n,r,o,a,u){let l=t.message;!l&&V.isArray(t.errors)&&t.errors.length&&(l=oC(t));const d=new ES(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?iC(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 sC=null,V0=100;function kf(e){return V.isPlainObject(e)||V.isArray(e)}function q0(e){return V.endsWith(e,"[]")?e.slice(0,-2):e}function Pf(e,t,n){return e?e.concat(t).map(function(o,a){return o=q0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function aC(e){return V.isArray(e)&&!e.some(kf)}const uC=V.toFlatObject(V,{},null,function(t){return/^is[A-Z]/.test(t)});function Sl(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(Pf(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)&&aC(C)||(V.isFileList(C)||V.endsWith(A,"[]"))&&(U=V.toArray(C)))return A=q0(A),U.forEach(function(z,te){!(V.isUndefined(z)||z===null)&&t.append(l===!0?Pf([A],te,u):l===null?A:A+"[]",T(z))}),!1}return kf(C)?!0:(t.append(Pf(H,A,u),T(C)),!1)}const P=Object.assign(uC,{defaultVisitor:v,convertValue:T,isVisitable:kf});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 Nf(e,t){this._pairs=[],e&&Sl(e,this,t)}const W0=Nf.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 lC(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")||lC,a=V.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=V.isURLSearchParams(t)?t.toString():new Nf(t,r).toString(o),u){const l=e.indexOf("#");l!==-1&&(e=e.slice(0,l)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}const Pa=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 Na(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[Pa]={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[Pa];this.handlers==null&&(this.handlers=[]),Na(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[Pa];Na(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=[],Na(this,this[Pa]))}forEach(t){const n=this[Pa];Na(this,n),n.iterationDepth++;try{V.forEach(this.handlers,function(o){o!==null&&t(o)})}finally{--n.iterationDepth||(Na(this,n),K0(this.handlers),n.handlersLength=X0(this.handlers))}}}const Of={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},cC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Nf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},If=typeof window!="undefined"&&typeof document!="undefined",Rf=typeof navigator=="object"&&navigator||void 0,dC=If&&(!Rf||["ReactNative","NativeScript","NS"].indexOf(Rf.product)<0),fC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",hC=If&&window.location.href||"http://localhost",on=M(M({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:If,hasStandardBrowserEnv:dC,hasStandardBrowserWebWorkerEnv:fC,navigator:Rf,origin:hC},Symbol.toStringTag,{value:"Module"}))),cC);function pC(e,t){return Sl(e,new on.classes.URLSearchParams,M({visitor:function(n,r,o,a){return on.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 mC(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 gC(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]=gC(o[u])),!l)}if(V.isFormData(e)&&V.isFunction(e.entries)){const n={};return V.forEachEntry(e,(r,o)=>{t(mC(r),o,n,0)}),n}return null}const t1=Object.freeze(["get","delete","head","options","post","put","patch","purge","link","unlink","query"]),gs=(e,t)=>e!=null&&V.hasOwnProp(e,t)?e[t]:void 0;function EC(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 Oa={transitional:Of,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=gs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return pC(t,d).toString();if((l=V.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=gs(this,"env"),p=f&&f.FormData;return Sl(l?{"files[]":t}:t,p&&new p,d)}}return a||o?(n.setContentType("application/json",!1),EC(t)):t}],transformResponse:[function(t){const n=gs(this,"transitional")||Oa.transitional,r=n&&n.forcedJSONParsing,o=gs(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,gs(this,"parseReviver"))}catch(d){if(l)throw d.name==="SyntaxError"?Se.from(d,Se.ERR_BAD_RESPONSE,this,null,gs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:on.classes.FormData,Blob:on.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=>{Oa.headers[e]={}});function Lf(e,t){const n=this||Oa,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 Ia=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 yC=/[\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(yC,"")}function Df(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function bC(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 TC(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 vl=(e,t,n=3)=>{let r=0;const o=bC(50,250);return TC(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)),wC=on.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,on.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(on.origin),on.navigator&&/(msie|trident)/i.test(on.navigator.userAgent)):()=>!0,xC=on.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 _C(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function SC(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 vC=/^https?:(?!\/\/)/i;function AC(e){return e&&e.replace(/(^|&)([^=&]*=)?[^&]+/g,(t,n,r="")=>`${n}${r}${_l}`)}function CC(e){const t=e.replace(/^(https?:\/{0,2})[^/?#]*@/i,`$1${_l}@`),n=t.indexOf("#"),o=(n===-1?t:t.slice(0,n)).replace(/([?&][^=&#]*=)[^&#]*/g,`$1${_l}`);return n===-1?o:`${o}#${AC(t.slice(n+1))}`}function a1(e,t){if(typeof e=="string"){const n=i1(e);if(vC.test(n))throw new Se(`Invalid URL ${JSON.stringify(CC(n))}: missing "//" after protocol`,Se.ERR_INVALID_URL,t)}}function u1(e,t,n,r){a1(t,r);let o=!_C(t);return e&&(o||n===!1)?(a1(e,r),SC(e,t)):t}const l1=e=>e instanceof xn?M({},e):e,kC=e=>Object.getOwnPropertySymbols&&Object.getOwnPropertyDescriptor?Object.keys(e).concat(Object.getOwnPropertySymbols(e).filter(t=>Object.getOwnPropertyDescriptor(e,t).enumerable)):Object.keys(e);function So(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(kC(M(M({},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 PC=["content-type","content-length"];function NC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,o])=>{PC.includes(r.toLowerCase())&&e.set(r,o)})}const OC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function c1(e){const t=So({},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?OC(y):"")))}catch(w){throw Se.from(w,Se.ERR_BAD_OPTION_VALUE,e)}}if(V.isFormData(r)){const T=V.getSafeProp(r,"getHeaders");on.hasStandardBrowserEnv||on.hasStandardBrowserWebWorkerEnv||V.isReactNative(r)?l.setContentType(void 0):V.isFunction(T)&&NC(l,T.call(r),n("formDataHeaderPolicy"))}if(on.hasStandardBrowserEnv&&(V.isFunction(o)&&(o=o(t)),o===!0||o==null&&wC(t.url))){const y=a&&u&&xC.read(u);y&&l.set(a,y)}return t}const IC=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&&(Df(i1(o.url))||Df(on.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(te){setTimeout(()=>{throw te})}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||Of;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]=vl(f,!0),_.addEventListener("progress",T)),d&&_.upload&&([m,y]=vl(d),_.upload.addEventListener("progress",m),_.upload.addEventListener("loadend",y)),(o.cancelToken||o.signal)&&(p=H=>{_&&(r(!H||H.type?new Ia(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=Df(o.url);if(A&&!on.protocols.includes(A)){r(new Se("Unsupported protocol "+A+":",Se.ERR_BAD_REQUEST,e)),P();return}_.send(a||null)})},RC=(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 Ia(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},LC=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},DC=function(e,t){return $d(this,null,function*(){try{for(var n=gS(MC(e)),r,o,a;r=!(o=yield new hi(n.next())).done;r=!1){const u=o.value;yield*Pg(LC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new hi(o.call(n)))}finally{if(a)throw a[0]}}})},MC=function(e){return $d(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Pg(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new hi(t.read());if(n)break;yield r}}finally{yield new hi(t.cancel())}})},d1=(e,t,n,r)=>{const o=DC(e,t);let a=0,u,l=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ze(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,FC=e=>e>=65&&e<=90||e>=97&&e<=122||e>=48&&e<=57||e===43||e===47||e===45||e===95,BC=e=>e===9||e===10||e===12||e===13||e===32,UC=e=>{const t=Math.floor(e/4),n=e%4;return t*3+(n===2?1:n===3?2:0)},HC=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)},zC=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),!BC(u)){if(u===61){r++;continue}if(!FC(u)||r>0){o=!0;continue}n++}}return o||r>2||r>0&&(n+r)%4!==0||n%4===1?HC(e):UC(n)},jC=(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 $C(e){const t=typeof e=="string"?e.indexOf("#"):-1;return jC(t===-1?e:e.slice(0,t),zC)}const Mf="1.20.0",m1=64*1024,VC={cache:"default",redirect:"follow",referrer:"about:client",referrerPolicy:"",mode:"cors",integrity:"",keepalive:!1,priority:"auto",window:null},{isFunction:Al}=V,qC=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}},YC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},WC=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?Al(o):typeof fetch=="function",d=Al(a),f=Al(u);if(!l)return!1;const p=l&&Al(n),m=l&&(typeof r=="function"?(_=>C=>_.encode(C))(new r):_=>Ze(null,null,function*(){return new Uint8Array(yield new a(_).arrayBuffer())})),T=d&&p&&E1(()=>{let _=!1;const C=new a(on.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=_=>Ze(null,null,function*(){if(_==null)return 0;if(V.isBlob(_))return _.size;if(V.isSpecCompliantForm(_))return(yield new a(on.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(V.isArrayBufferView(_)||V.isArrayBuffer(_))return _.byteLength;if(V.isURLSearchParams(_)&&(_=_+""),V.isString(_))return(yield m(_)).byteLength}),P=(_,C)=>Ze(null,null,function*(){const A=V.toFiniteNumber(_.getContentLength());return A==null?v(C):A});return _=>Ze(null,null,function*(){let{url:C,method:A,data:H,signal:U,cancelToken:L,timeout:z,onDownloadProgress:te,onUploadProgress:he,responseType:q,headers:re,withCredentials:de="same-origin",fetchOptions:ye,maxContentLength:ee,maxBodyLength:oe,maxRedirects:Ae}=c1(_);const ae=V.isNumber(ee)&&ee>-1,J=V.isNumber(oe)&&oe>-1,se=xe=>V.hasOwnProp(_,xe)?_[xe]:void 0;let k=o||fetch;q=q?(q+"").toLowerCase():"text";let F=RC([U,L&&L.toAbortSignal()],z),K=null;const O=F&&F.unsubscribe&&(()=>{F.unsubscribe()});let ce,we=null;const Ce=()=>new Se("Request body larger than maxBodyLength limit",Se.ERR_BAD_REQUEST,_,K);try{let xe;const Re=se("auth");if(Re){const Ve=V.getSafeProp(Re,"username")||"",bt=V.getSafeProp(Re,"password")||"";xe={username:Ve,password:bt}}if(YC(C)){const Ve=new URL(C,on.origin);if(!xe&&(Ve.username||Ve.password)){const bt=g1(Ve.username),Xt=g1(Ve.password);xe={username:bt,password:Xt}}(Ve.username||Ve.password)&&(Ve.username="",Ve.password="",C=Ve.href)}if(xe&&(re.delete("authorization"),re.set("Authorization","Basic "+btoa(qC((xe.username||"")+":"+(xe.password||""))))),ae&&typeof C=="string"&&C.startsWith("data:")&&$C(C)>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K);if(J&&A!=="get"&&A!=="head"){const Ve=yield v(H);if(typeof Ve=="number"&&isFinite(Ve)&&(ce=Ve,Ve>oe))throw Ce()}const Fe=J&&(V.isReadableStream(H)||V.isStream(H)),at=(Ve,bt,Xt)=>d1(Ve,m1,Lt=>{if(J&&Lt>oe)throw we=Ce();bt&&bt(Lt)},Xt);if(T&&A!=="get"&&A!=="head"&&(he||Fe)){if(ce=ce==null?yield P(re,H):ce,ce!==0||Fe){let Ve=new a(C,{method:"POST",body:H,duplex:"half"}),bt;if(V.isFormData(H)&&(bt=Ve.headers.get("content-type"))&&re.setContentType(bt),Ve.body){const[Xt,Lt]=he&&o1(ce,vl(s1(he)))||[];H=at(Ve.body,Xt,Lt)}}}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 dn=d&&"credentials"in a.prototype;if(V.isFormData(H)){const Ve=re.getContentType();Ve&&/^multipart\/form-data/i.test(Ve)&&!/boundary=/i.test(Ve)&&re.delete("content-type")}re.set("User-Agent","axios/"+Mf,!1);const kt=ye==null?ye:Object.assign(Object.create(null),ye);kt&&(delete kt.body,delete kt.headers,delete kt.method,delete kt.signal,delete kt.duplex,delete kt.credentials);const $t=Object.assign(Object.create(null),kt,{signal:F,method:A.toUpperCase(),headers:z0(re.normalize()),body:H,duplex:"half",credentials:dn?de:void 0});d&&(V.forEach(VC,(Ve,bt)=>{$t[bt]===void 0&&($t[bt]=Ve)}),$t.signal===void 0&&($t.signal=null),$t.body===void 0&&($t.body=null)),Ae===0&&($t.redirect="manual",kt&&(kt.redirect="manual")),K=d&&new a(C,$t);let Rt=yield d?k(K,kt):k(C,$t);const ur=xn.from(Rt.headers);if(ae){const Ve=V.toFiniteNumber(ur.getContentLength());if(Ve!=null&&Ve>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}const Bn=y&&(q==="stream"||q==="response");if(y&&Rt.body&&(te||ae||Bn&&O)){const Ve={};["status","statusText","headers"].forEach(Zt=>{Ve[Zt]=Rt[Zt]});const bt=V.toFiniteNumber(ur.getContentLength()),[Xt,Lt]=te&&o1(bt,vl(s1(te),!0))||[];let Un=0;const lr=Zt=>{if(ae&&(Un=Zt,Un>ee))throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K);Xt&&Xt(Zt)};Rt=new u(d1(Rt.body,m1,lr,()=>{Lt&&Lt(),O&&O()}),Ve)}q=q||"text";let Jt=yield w[V.findKey(w,q)||"text"](Rt,_);if(ae&&!y&&!Bn){let Ve;if(Jt!=null&&(typeof Jt.byteLength=="number"?Ve=Jt.byteLength:typeof Jt.size=="number"?Ve=Jt.size:typeof Jt=="string"&&(Ve=typeof r=="function"?new r().encode(Jt).byteLength:Jt.length)),typeof Ve=="number"&&Ve>ee)throw new Se("maxContentLength size of "+ee+" exceeded",Se.ERR_BAD_RESPONSE,_,K)}return!Bn&&O&&O(),yield new Promise((Ve,bt)=>{r1(Ve,bt,{data:Jt,headers:xn.from(Rt.headers),status:Rt.status,statusText:Rt.statusText,config:_,request:K})})}catch(xe){if(O&&O(),F&&F.aborted&&F.reason instanceof Se){const Re=F.reason;throw Re.config=_,K&&(Re.request=K),xe!==Re&&Object.defineProperty(Re,"cause",{__proto__:null,value:xe,writable:!0,enumerable:!1,configurable:!0}),Re}if(we)throw K&&!we.request&&(we.request=K),we;if(xe instanceof Se)throw K&&!xe.request&&(xe.request=K),xe;if(xe&&xe.name==="TypeError"&&/Load failed|fetch/i.test(xe.message)){const Re=new Se("Network Error",Se.ERR_NETWORK,_,K,xe&&xe.response);throw Object.defineProperty(Re,"cause",{__proto__:null,value:xe.cause||xe,writable:!0,enumerable:!1,configurable:!0}),Re}throw Se.from(xe,xe&&xe.code,_,K,xe&&xe.response)}})},GC=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=GC;for(;l--;)d=a[l],f=p.get(d),f===void 0&&p.set(d,f=l?new Map:WC(t)),p=f;return f};y1();const Ff={http:sC,xhr:IC,fetch:{get:y1}};V.forEach(Ff,(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}`,XC=e=>V.isFunction(e)||e===null||e===!1;function KC(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,!XC(r)&&(o=Ff[(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
|
+
`+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:KC,adapters:Ff};function Bf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Ia(null,e)}function Uf(e){const t=V.toSafeFlatObject(e);return Bf(t),t.headers=xn.from(V.getSafeProp(t,"headers")),t.data=Lf.call(t,t.transformRequest),["post","put","patch"].indexOf(t.method)!==-1&&t.headers.setContentType("application/x-www-form-urlencoded",!1),T1.getAdapter(t.adapter||Oa.adapter,t)(t).then(function(o){Bf(t),t.response=o;try{o.data=Lf.call(t,t.transformResponse,o)}finally{delete t.response}return o.headers=xn.from(o.headers),o},function(o){if(!n1(o)&&(Bf(t),o&&o.response)){t.response=o.response;try{o.response.data=Lf.call(t,t.transformResponse,o.response)}finally{delete t.response}o.response.headers=xn.from(o.response.headers)}return Promise.reject(o)})}const Cl={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Cl[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const w1={};Cl.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Mf+"] 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}},Cl.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function QC(e,t,n){if(typeof e!="object"||e===null)throw new 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 kl={assertOptions:QC,validators:Cl},_n=kl.validators;let vo=class{constructor(t){this.defaults=t||{},this.interceptors={request:new Q0,response:new Q0}}request(t,n){return Ze(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error)try{let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack;let u="";if(typeof a=="string"){const l=a.indexOf(`
|
|
7
7
|
`);u=l===-1?"":a.slice(l+1)}if(!r.stack)r.stack=u;else if(u){const l=u.indexOf(`
|
|
8
8
|
`),d=l===-1?-1:u.indexOf(`
|
|
9
9
|
`,l+1),f=d===-1?"":u.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
|
|
10
|
-
`+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ao(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&gl.assertOptions(r,{silentJSONParsing:En.transitional(En.boolean),forcedJSONParsing:En.transitional(En.boolean),clarifyTimeoutError:En.transitional(En.boolean),legacyInterceptorReqResOrdering:En.transitional(En.boolean),advertiseZstdAcceptEncoding:En.transitional(En.boolean),validateStatusUndefinedResolves:En.transitional(En.boolean)},!1),o!=null&&(j.isFunction(o)?n.paramsSerializer={serialize:o}:gl.assertOptions(o,{encode:En.function,serialize:En.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),gl.assertOptions(n,{baseUrl:En.spelling("baseURL"),withXsrfToken:En.spelling("withXSRFToken")},!0),n.method=(j.getSafeProp(n,"method")||j.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=a&&j.merge(a.common,a[n.method]);a&&j.forEach(qg.concat("common"),w=>{delete a[w]}),n.headers=gn.concat(u,a);const l=[];let d=!0;this.interceptors.request.forEach(function(v){if(typeof v.runWhen=="function"&&v.runWhen(n)===!1)return;d=d&&v.synchronous;const N=n.transitional||yf;N&&N.legacyInterceptorReqResOrdering?l.unshift(v.fulfilled,v.rejected):l.push(v.fulfilled,v.rejected)});const f=[];this.interceptors.response.forEach(function(v){f.push(v.fulfilled,v.rejected)});let p,m=0,T;if(!d){const w=[Af.bind(this),void 0];for(w.unshift(...l),w.push(...f),T=w.length,p=Promise.resolve(n);m<T;)p=p.then(w[m++],w[m++]);return p}T=l.length;let y=n;for(;m<T;){const w=l[m++],v=l[m++];try{y=w?w(y):y}catch(N){if(!v){p=Promise.reject(N);break}try{const x=v.call(this,N);j.isThenable(x)&&(p=Promise.resolve(x).then(()=>Af.call(this,y)))}catch(x){p=Promise.reject(x)}break}}if(!p)try{p=Af.call(this,y)}catch(w){p=Promise.reject(w)}for(m=0,T=f.length;m<T;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ao(this.defaults,t);const n=Jg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return Bg(n,t.params,t.paramsSerializer)}};j.forEach(["delete","get","head","options"],function(t){uo.prototype[t]=function(n,r){return this.request(ao(r||{},{method:t,url:n,data:r&&j.hasOwnProp(r,"data")?r.data:void 0}))}}),j.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,l){return this.request(ao(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}uo.prototype[t]=n(),t!=="query"&&(uo.prototype[t+"Form"]=n(!0))});let YC=class fS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(l=>{r.subscribe(l),a=l}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,l){r.reason||(r.reason=new ya(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new fS(function(o){t=o}),cancel:t}}};function WC(e){return function(n){return e.apply(null,n)}}function GC(e){return j.isObject(e)&&e.isAxiosError===!0}const El={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(El).forEach(([e,t])=>{El[t]===void 0&&(El[t]=e)});function f1(e){const t=new uo(e),n=yg(uo.prototype.request,t);return j.extend(n,uo.prototype,t,{allOwnKeys:!0}),j.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return f1(ao(e,o))},n}const Mt=f1(Ea);Mt.Axios=uo,Mt.CanceledError=ya,Mt.CancelToken=YC,Mt.isCancel=Yg,Mt.VERSION=xf,Mt.toFormData=fl,Mt.AxiosError=Te,Mt.Cancel=Mt.CanceledError,Mt.all=function(t){return Promise.all(t)},Mt.spread=WC,Mt.isAxiosError=GC,Mt.mergeConfig=ao,Mt.AxiosHeaders=gn,Mt.formToJSON=e=>Vg(j.isHTMLForm(e)?new FormData(e):e),Mt.getAdapter=c1.getAdapter,Mt.HttpStatusCode=El,Mt.default=Mt;const{Axios:XU,AxiosError:KU,CanceledError:QU,isCancel:JU,CancelToken:ZU,VERSION:eH,all:tH,Cancel:nH,isAxiosError:rH,spread:iH,toFormData:oH,AxiosHeaders:sH,HttpStatusCode:aH,formToJSON:uH,getAdapter:lH,mergeConfig:cH,create:dH}=Mt;class XC{constructor(t,n,r,o=!1,a,u){_e(this,"CIMULATE_API_HEADER","x-cimulate-api-key");_e(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");_e(this,"CIMULATE_SEARCH_API_PATH","api/v1");_e(this,"baseApiUrl");_e(this,"headers",{});_e(this,"fetchConfig",()=>et(this,null,function*(){try{const t=yield Mt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));_e(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const o=new URL(t);return o.hostname=o.hostname.replace(/^copilot\./,"api."),o.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,o)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class KC{constructor(t,n,r,o=!1,a,u){_e(this,"apiService");_e(this,"config",null);_e(this,"getConfig",()=>et(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));_e(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));_e(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));_e(this,"getDescription",t=>this.getProductFieldValue(t,"description"));_e(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));_e(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));_e(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));_e(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));_e(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));_e(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});_e(this,"getProductField",t=>this.config?this.config[t]:"");_e(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new XC(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const es=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class QC{constructor(t=!1){_e(this,"isDevelopment");_e(this,"_log",(t,n,...r)=>{es(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const JC={copilot:"Your Search Assistant",messaging:"Commerce Client"},h1=D.createContext(null),ZC=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:o="",entryMessage:a,openLinksInNewTab:u=!1,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,searchPlaceholder:T,searchButtonLabel:y,searchConfig:w,suggestionButtonConfig:v,progressStepsLimit:N=3,messageAlignment:x="start",autoScroll:C=!0,showProductDescription:A=!1,componentConfig:U,conversationHistory:Y,resetConversationMessage:R="",apiKey:$,apiToken:ne,baseUrl:de,customerId:V,tenantId:ie,theme:fe,isDevelopment:we,__features:re,routingAttributes:oe,enableDownloadTranscript:Ae=!0,enablePageContext:se=!1,enableEscalationToAgent:J=!1,enableImageUpload:ae=!1,showProductCaptions:k=!1,connectingMessages:F,staticQuestions:K,staticQuestionsStrategy:I="append",children:Se})=>{const Me=e==="messaging",ke=D.useMemo(()=>{const Pt=oe==null?void 0:oe.isCartMgmtSupported;return Pt===!0||Pt==="true"},[oe]),be=D.useMemo(()=>Me?{config:null}:new KC(de,$,ne,we,V,ie),[Me,de,$,ne,we,V,ie]),Ie=D.useMemo(()=>new QC(we),[we]);D.useEffect(()=>{Me||!be||be.config||be.getConfig()},[be,Me]);const Ue=D.useMemo(()=>pg(fe),[fe]),lt=Ue.cssVariables,cn=D.useMemo(()=>{const Pt=(w==null?void 0:w.placeholder)||T,Qn=(w==null?void 0:w.buttonLabel)||y;let _n="icon";return w!=null&&w.buttonType?_n=w.buttonType:y&&(_n="text"),me(B({},w||{}),{placeholder:Pt,buttonLabel:Qn,buttonType:_n})},[w,T,y]),Lt=D.useMemo(()=>me(B({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||JC[e!=null?e:"copilot"]}),[r,t,n,e]),$t=D.useMemo(()=>({configModule:be,mode:e!=null?e:"copilot",themeVariants:Ue.compatibility&&e!=="messaging"?me(B({},Ue.variants),{carousel:"chevron"}):Ue.variants,themeTokens:Ue.compatibility==="legacy"?void 0:Ue.tokens,themeClassName:Ue.transcriptClassName,headerConfig:Lt,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:I,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:lt,logger:Ie,searchConfig:cn,suggestionButtonConfig:v,progressStepsLimit:N,messageAlignment:x,autoScroll:C,showProductDescription:!!A,enableMinimize:!!(U!=null&&U.enableMinimize),launcherAriaLabel:U==null?void 0:U.launcherAriaLabel,enableDownloadTranscript:Ae,enablePageContext:se,enableEscalationToAgent:J,enableImageUpload:ae,showProductCaptions:!!k,connectingMessages:F,resetConversationMessage:R,conversationHistory:{sinceHours:typeof(Y==null?void 0:Y.sinceHours)=="number"?Y.sinceHours:Me?24:1,limit:Y==null?void 0:Y.limit},features:re,isCartMgmtSupported:ke}),[be,e,Lt,a,K,I,o,p,m,d,f,u,l,cn,v,x,C,A,U,Ae,se,J,ae,N,k,F,R,Ie,lt,Ue,Y,re,ke,Me]);return _.jsx(h1.Provider,{value:$t,children:Se})},tt=()=>{const e=D.useContext(h1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class ek{constructor(){_e(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});_e(this,"connectedProxy");_e(this,"modeProxy");_e(this,"entryTypeProxy");_e(this,"statusProxy");_e(this,"dialogProxy");_e(this,"modalProxy",{isFullscreen:!1});_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return ok(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new ek,lo=()=>Je.connected,ba=()=>Je.isOpen,Cf="cimulate.widget.minimizedOnNav";function tk(){try{const e=sessionStorage.getItem(Cf)==="1";return sessionStorage.removeItem(Cf),e}catch(e){return!1}}function nk(){try{sessionStorage.removeItem(Cf)}catch(e){return}}const rk=e=>{window.addEventListener(af,e)},ik=e=>{window.removeEventListener(af,e)},ok=(e,t)=>{const n=new CustomEvent(af,{detail:{property:e,value:t}});window.dispatchEvent(n)},sk=e=>{Je.connectedProxy.connected=e},Ta=e=>{if(!Bv(e)){const t=sg.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ri=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,nk())},wa=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},kf=e=>{Je.modalProxy.isFullscreen=e},yl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Nf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},ak=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},uk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),o=D.useCallback(A=>{n({type:Et.SET_COPILOT,payload:A})},[n]),a=D.useCallback(A=>{sk(A),n({type:Et.SET_CONNECTED,payload:A})},[n]),u=D.useCallback(()=>{n({type:Et.RESET_COPILOT,payload:{}})},[n]),l=D.useCallback(()=>{n({type:Et.RESET_STATE,payload:{}})},[n]),d=D.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:Et.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),f=D.useCallback(A=>{n({type:Et.ADD_LOADING_MESSAGE,payload:A})},[n]),p=D.useCallback(A=>{n({type:Et.REMOVE_LOADING_MESSAGE,payload:A})},[n]),m=D.useCallback(A=>{d(A),f(A.id)},[d,f]),T=D.useCallback(A=>{n({type:Et.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=D.useCallback(A=>{n({type:Et.ADD_CONVERSATION_ID,payload:A})},[n]),w=D.useCallback(A=>{n({type:Et.SET_CONVERSATION_IDS,payload:A})},[n]),v=D.useCallback(A=>{n({type:Et.SET_IMAGE_FILE,payload:A})},[n]),N=D.useCallback(A=>{n({type:Et.SET_ASK_CIM_PROMPTS,payload:A})},[n]),x=D.useCallback(A=>{n({type:Et.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),C=D.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:l,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:T,addConversationId:y,setConversationIds:w,setImageFile:v,setAskCimPrompts:N,setConversationHistoryLoaded:x}),[o,a,u,l,d,f,p,m,T,y,w,v,N,x]);return _.jsx(gg.Provider,{value:C,children:t})};Dv();const lk=(e,t)=>{const{type:n,payload:r}=t;if(n===Et.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const l=u.findIndex(d=>d.id===o.id);if(l!==-1){u[l]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case Et.RESET_STATE:e.messages=no.messages,e.groupedMessages=no.groupedMessages,e.loadingMessages=no.loadingMessages,e.imageFile=no.imageFile,e.askCimPrompts=no.askCimPrompts,e.conversationHistoryLoaded=no.conversationHistoryLoaded;break;case Et.RESET_COPILOT:e.copilot=null;break;case Et.SET_COPILOT:e.copilot=r;break;case Et.SET_CONNECTED:e.connected=r;break;case Et.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case Et.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case Et.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case Et.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case Et.SET_CONVERSATION_IDS:e.conversationIds=r;break;case Et.SET_IMAGE_FILE:e.imageFile=r;break;case Et.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case Et.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},ck=({onCopilotEvent:e,children:t})=>{const[n,r]=ig(lk,no);return _.jsx(mg.Provider,{value:n,children:_.jsx(uk,{onCopilotEvent:e,dispatch:r,children:t})})};function dk(){var e=D.useRef(!0);return e.current?(e.current=!1,!0):e.current}function fk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function hk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Pf=typeof window!="undefined",_a=function(e){D.useEffect(e,[])},pk=function(e){var t=D.useRef(e);t.current=e,_a(function(){return function(){return t.current()}})},mk=function(e){var t=D.useRef(0),n=D.useState(e),r=n[0],o=n[1],a=D.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return pk(function(){cancelAnimationFrame(t.current)}),[r,a]},gk=function(e,t){return e===t};function Ek(e,t){t===void 0&&(t=gk);var n=D.useRef(),r=D.useRef(e),o=dk();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var yk=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,o=t.initialHeight,a=o===void 0?1/0:o,u=t.onChange,l=mk({width:Pf?window.innerWidth:r,height:Pf?window.innerHeight:a}),d=l[0],f=l[1];return D.useEffect(function(){if(Pf){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return fk(window,"resize",p),function(){hk(window,"resize",p)}}},[]),d};class bk{constructor(){_e(this,"items",[]);_e(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});_e(this,"remove",()=>this.items.shift());_e(this,"first",()=>this.items.length>0?this.items[0]:null);_e(this,"clear",()=>{this.items.length=0});_e(this,"processQueue",t=>{new Array(yn.size).fill(1).forEach(()=>{const r=yn.first();r&&(t(r),yn.remove())})})}get size(){return this.items.length}}const yn=new bk,p1=e=>{window.addEventListener(sf,e)},m1=e=>{window.removeEventListener(sf,e)},Tk=(e,t,n)=>{const r=new CustomEvent(sf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},g1=e=>{window.addEventListener(of,e)},E1=e=>{window.removeEventListener(of,e)},wk=(e,t,n)=>{const r=new CustomEvent(of,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},y1=e=>{window.addEventListener(rf,e)},b1=e=>{window.removeEventListener(rf,e)},Of=(e,t,n)=>{const r=new CustomEvent(rf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},_k=e=>{window.addEventListener(lf,e)},xk=e=>{window.removeEventListener(lf,e)},xa=(e,t,n)=>{const r=new CustomEvent(lf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Sk{constructor(){_e(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"categoryIdProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const o=zv[n];return wk(o,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new Sk,T1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},w1=(e,t,n)=>{var u,l;const r=B({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((l=r[e])!=null&&l.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},_1=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},x1=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const l=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=l.rangeFilters},S1=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},v1=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},vk=e=>{if(!lo()||!ba()){lo()&&yn.clear(),yn.add({context:"browse",payload:me(B({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},A1=e=>{T1(e,ut)},Ak=(e,t)=>{w1(e,t,ut)},C1=e=>{_1(e,ut)},Ck=({field:e,value:t})=>{x1({field:e,value:t},ut)},kk=e=>{S1(e,ut)},k1=e=>{v1(e,ut)},N1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"browse",payload:B({},e)});return}"facetFilters"in e&&A1(e.facetFilters||{}),"rangeFilters"in e&&C1(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&k1(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Nk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:N1,updateBrowseCategoryId:vk,updateCatalogSegment:kk,updateFacetFilter:Ak,updateFacetFilters:A1,updatePricebooks:k1,updateRangeFilter:Ck,updateRangeFilters:C1},Symbol.toStringTag,{value:"Module"}));class Pk{constructor(){_e(this,"initialParams",{productId:"",productName:"",pdpLink:""});_e(this,"proxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>(Of(n,r),Reflect.set(t,n,r)));_e(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});_e(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});_e(this,"dispatchContextUpdate",()=>{Of("pdp-context",this.state)});_e(this,"createProxy",t=>new Proxy(B({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return B({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Er=new Pk,P1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=lo(),n=ba();if(!t||!n){t&&yn.clear(),yn.add({context:"pdp",payload:B({},e)});return}Er.updateProxy(e),Of("pdp-context",e)},Ok=e=>{Er.proxy.productId=e,lo()||yn.add({context:"pdp",payload:B({},Er.state)})},Ik=e=>{Er.proxy.pdpLink=e};class Rk{constructor(){_e(this,"initialState",Eg);_e(this,"promptsStateProxy");_e(this,"promptsParamsProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return Sa(n,r),Reflect.set(t,n,r)});_e(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));_e(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));_e(this,"updatePromptsParamsProxy",t=>new Proxy(B({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const zt=new Rk,Lk=e=>{window.addEventListener(uf,e)},Dk=e=>{window.removeEventListener(uf,e)},Sa=(e,t)=>{const n=new CustomEvent(uf,{detail:{property:e,value:t}});window.dispatchEvent(n)},O1=e=>{const t=zt.isOpen,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isOpen=n},I1=e=>{const t=zt.isInline,n=typeof e=="boolean"?e:!t;zt.promptsStateProxy.isInline=n},Mk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="ask_cim"},Fk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="search"},Bk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="browse"},Uk=e=>{zt.promptsParamsProxy=zt.updatePromptsParamsProxy(e),Sa("params",e),zt.promptsStateProxy.entryType="pdp"},Hk=({elementId:e,entryType:t,params:n,isInline:r})=>{zt.promptsStateProxy.elementId=e,t&&(zt.promptsStateProxy.entryType=t),typeof r=="boolean"&&I1(r),n&&zt.updatePromptsParamsProxy(n),zt.isOpen||O1(!0)},zk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{xa("endConversation",!0,ni.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{xa("getConversationMessages",{payload:e,callback:t},ni.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{xa("getSessionInformation",{callback:e},ni.GET_SESSION_INFORMATION)},loadConversation:e=>{xa("loadConversation",e,ni.LOAD_CONVERSATION)},resetConversation:()=>{xa("resetConversation",!0,ni.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class jk{constructor(){_e(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});_e(this,"queryProxy");_e(this,"facetFiltersProxy");_e(this,"rangeFiltersProxy");_e(this,"catalogSegmentProxy");_e(this,"pricebooksProxy");_e(this,"_fullGet",(t,n)=>Reflect.get(t,n));_e(this,"_fullSet",(t,n,r)=>{const o=jv[n];return Tk(o,n,r),Reflect.set(t,n,r)});_e(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));_e(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const xt=new jk,$k=e=>{const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:me(B({},xt.state),{query:e})});return}xt.queryProxy.query=e},R1=e=>{T1(e,xt)},Vk=(e,t)=>{w1(e,t,xt)},L1=e=>{_1(e,xt)},qk=({field:e,value:t})=>{x1({field:e,value:t},xt)},Yk=e=>{S1(e,xt)},D1=e=>{v1(e,xt)},M1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=ba(),n=lo();if(!n||!t){n&&yn.clear(),yn.add({context:"search",payload:B({},e)});return}"facetFilters"in e&&R1(e.facetFilters||{}),"rangeFilters"in e&&L1(e.rangeFilters||[]),"catalogSegment"in e&&(xt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&D1(e.pricebooks||[]),xt.queryProxy.query=e.query},Wk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:M1,updateCatalogSegment:Yk,updateFacetFilter:Vk,updateFacetFilters:R1,updatePricebooks:D1,updateRangeFilter:qk,updateRangeFilters:L1,updateSearchQuery:$k},Symbol.toStringTag,{value:"Module"})),Gk={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},F1=D.createContext(Gk),Xk=({children:e})=>{const[t,n]=D.useState(ut.categoryId),[r,o]=D.useState(ut.categoryIdProxy.categoryName||""),[a,u]=D.useState(ut.facetFilters||{}),[l,d]=D.useState(ut.rangeFilters||[]),[f,p]=D.useState(ut.catalogSegment||null),[m,T]=D.useState(ut.pricebooks||null);D.useEffect(()=>{const w=({detail:v})=>{(v==null?void 0:v.property)==="categoryId"&&n(v.value),(v==null?void 0:v.property)==="categoryName"&&o(v.value),(v==null?void 0:v.property)==="facetFilters"&&u(v.value),(v==null?void 0:v.property)==="rangeFilters"&&d(v.value),(v==null?void 0:v.property)==="catalogSegment"&&p(v.value),(v==null?void 0:v.property)==="pricebooks"&&T(v.value)};return g1(w),()=>{E1(w)}},[]);const y=D.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:l,catalogSegment:f,pricebooks:m}),[t,r,a,l,f,m]);return _.jsx(F1.Provider,{value:y,children:e})},Kk=()=>{const e=D.useContext(F1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},Qk={searchQuery:xt.query,facetFilters:xt.facetFilters,rangeFilters:xt.rangeFilters,catalogSegment:xt.catalogSegment,pricebooks:xt.pricebooks},B1=D.createContext(Qk),Jk=({children:e})=>{const[t,n]=D.useState(xt.query),[r,o]=D.useState(xt.facetFilters),[a,u]=D.useState(xt.rangeFilters),[l,d]=D.useState(xt.catalogSegment),[f,p]=D.useState(xt.pricebooks);D.useEffect(()=>{const T=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&o(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return p1(T),()=>{m1(T)}},[]);const m=D.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:l,pricebooks:f}),[t,r,a,l,f]);return _.jsx(B1.Provider,{value:m,children:e})},Zk=()=>{const e=D.useContext(B1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},eN={productId:Er.productId,pdpLink:Er.pdpLink},U1=D.createContext(eN),tN=({children:e})=>{const[t,n]=D.useState(Er.productId),[r,o]=D.useState(Er.pdpLink);D.useEffect(()=>{const u=({detail:l})=>{if((l==null?void 0:l.property)==="pdp-context"){const d=l.value;n(d.productId),o(d.pdpLink);return}(l==null?void 0:l.property)==="productId"&&n(l.value),(l==null?void 0:l.property)==="pdpLink"&&o(l.value)};return y1(u),()=>{b1(u)}},[]);const a=D.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return _.jsx(U1.Provider,{value:a,children:e})},nN=()=>{const e=D.useContext(U1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},H1=D.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),rN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=D.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,l]=D.useState(Je.modeProxy.mode),[d,f]=D.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=D.useState(Je.dialogProxy.position),[T,y]=D.useState(Je.dialogProxy.isFullHeight),[w,v]=D.useState(Je.dialogProxy.width),[N,x]=D.useState(Je.modalProxy.isFullscreen),C=D.useRef(!1),A=Ek(d.type);D.useEffect(()=>{const Y=R=>{const{property:$,value:ne}=R.detail||{};if(!(!$||ne===void 0)){if($==="mode"){l(ne);return}if($==="entryType"){a(ne);return}if($==="isMinimized"){f(de=>me(B({},de),{isMinimized:ne}));return}if($==="isOpen"){f(de=>me(B({},de),{isOpen:ne}));return}if($==="type"){f(de=>me(B({},de),{type:ne}));return}if($==="position"){m(ne);return}if($==="isFullHeight"){y(ne);return}if($==="width"){v(ne);return}if($==="isFullscreen"){x(ne);return}}};return rk(Y),()=>{ik(Y)}},[]),_a(()=>{e&&Ta(e)}),_a(()=>{if(C.current)return;C.current=!0;const Y=n||(t==null?void 0:t.type);Y&&yl(Y);const R=tk();t&&"isOpen"in t&&ri(!!t.isOpen),t&&"isMinimized"in t&&wa(!!t.isMinimized),R&&wa(!0)}),_a(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Nf(Y),"dialogFullHeight"in t.options&&ak(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&kf(!!t.options.isModalFullscreen)});const U=D.useMemo(()=>({mode:u,entryType:o,status:d,previousComponentType:A||"dialog",dialogPosition:p,isDialogFullHeight:T,dialogWidth:w,isModalFullscreen:N}),[u,o,d,A,p,T,w,N]);return _.jsx(H1.Provider,{value:U,children:r})},Yn=()=>{const e=D.useContext(H1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},z1=D.createContext(null),j1=D.createContext(null),If=()=>{const e=D.useContext(j1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ii=()=>{const e=D.useContext(z1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},ts=()=>{const e=D.useContext(gg);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Wn=()=>{const e=D.useContext(mg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},iN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ii(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=ts(),{activeConversationId:u}=Wn(),l=D.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=D.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return D.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,T=>{const y=[];[...T.reverse()||[]].forEach(v=>{var x;const N=T.find(C=>C.id===v.eventSourceId);(x=N==null?void 0:N.name)!=null&&x.endsWith("_suggestions")||(v.bypassHandlers=!0,y.unshift(v))}),y.forEach(v=>{o(v)}),a(!0)})},[t,r,u,d,o,a,n]),{getSessionInformation:l,getConversationMessages:d}},$1=D.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),oN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:T}=tt(),bt=Zk(),{searchQuery:y}=bt,w=mn(bt,["searchQuery"]),Vt=Kk(),{categoryId:v}=Vt,N=mn(Vt,["categoryId"]),{productId:x,pdpLink:C}=nN(),{setCopilot:A,setConnected:U,resetCopilot:Y,resetCopilotState:R,addCopilotEvent:$,removeLoadingMessage:ne,handleCopilotRequestAck:de,setActiveConversationId:V,setConversationIds:ie,setAskCimPrompts:fe}=ts(),{connected:we,copilot:re,messages:oe,groupedMessages:Ae,loadingMessages:se,askCimPrompts:J}=Wn(),{status:ae,entryType:k}=Yn(),{isInline:F}=ii(),{getConversationMessages:K,getSessionInformation:I}=iN({copilot:re}),Se=D.useMemo(()=>se.size>0,[se]),Me=D.useCallback(xe=>se.has(xe),[se]),ke=D.useCallback(({query:xe,facetFilters:Le,rangeFilters:Be,catalogSegment:Xe,pricebooks:gt,userPrompt:Z,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Ce={searchParams:{query:xe}};Z&&(Ce.userPrompt=Z),ge&&(Ce.attachments={image:ge}),Le&&Object.keys(Le).length>0&&(Ce.searchParams.facetFilters=Le),Be&&Be.length>0&&(Ce.searchParams.rangeFilters=Be),Xe&&(Ce.searchParams.catalogSegment=Xe),gt&&(Ce.searchParams.pricebooks=gt),m&&(Ce.clientContext=m),Ta("search"),re.search(Ce,Ye=>{const Re=B({},Ye);de(Re)})},[p,de,re,m]),be=D.useCallback(({categoryId:xe,categoryName:Le,facetFilters:Be,rangeFilters:Xe,catalogSegment:gt,pricebooks:Z,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ye=Be&&Object.keys(Be).length>0;if(xe===""&&!Ye){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Re={browseParams:{categoryId:xe||""}};ge&&(Re.userPrompt=ge),Ce&&(Re.attachments={image:Ce}),Ye&&(Re.browseParams.facetFilters=Be),Xe&&Xe.length>0&&(Re.browseParams.rangeFilters=Xe),gt&&(Re.browseParams.catalogSegment=gt),Array.isArray(Z)&&Z.length>0&&(Re.browseParams.pricebooks=Z),(m||Le)&&(Re.clientContext={},m&&(Re.clientContext=B({},m)),Le&&(Re.clientContext.cimLabel=Le)),Ta("browse"),re.browse(Re,ct=>{var qr;const Xt=B({},ct),qt=((qr=Xt.request)==null?void 0:qr.clientContext)||{},dn=(qt==null?void 0:qt.cimLabel)||Le;dn&&Xt.request&&(Xt.request.label=dn),de(Xt)})},[p,de,re,m]),Ie=D.useCallback(({productId:xe,productName:Le,pdpLink:Be,userPrompt:Xe,imageFile:gt})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Z={productId:xe};Xe&&(Z.userPrompt=Xe),Be&&(Z.pdpLink=Be),gt&&(Z.attachments={image:gt}),(m||Le)&&(Z.clientContext={},m&&(Z.clientContext=B({},m)),Le&&(Z.clientContext.cimLabel=Le)),T&&(Z.baseCatalogParams=T),Ta("pdp"),re.productView(Z,ge=>{var ct;const Ce=B({},ge),Ye=((ct=Ce.request)==null?void 0:ct.clientContext)||{},Re=(Ye==null?void 0:Ye.cimLabel)||Le;Re&&Ce.request&&(Ce.request.label=Re),de(Ce)})},[p,re,de,m,T]),Ue=D.useCallback(({userPrompt:xe,imageFile:Le})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!xe)return;const Be={userPrompt:xe};Le&&(Be.attachments={image:Le}),m&&(Be.clientContext=m),T&&(Be.baseCatalogParams=T),re.askCim(Be,Xe=>{const gt=B({},Xe);de(gt)})},[p,re,de,m,T]),lt=D.useCallback(xe=>{$(xe),l==null||l(xe)},[$,l]),cn=D.useCallback(xe=>{$(xe),d==null||d(xe)},[$,d]),Lt=D.useCallback(xe=>{u==null||u(xe),U(!0)},[u,U]);D.useEffect(()=>{!re||!we||!ae.isOpen||yn.size>0&&yn.processQueue(xe=>{if(xe.context==="search"){const Le=B({},xe.payload);M1(Le)}if(xe.context==="browse"){const Le=B({},xe.payload);N1(Le)}if(xe.context==="pdp"){const Le=B({},xe.payload);P1(Le)}})},[ae.isOpen,re,we]);const $t=D.useCallback(xe=>{const Le=Be=>{const Xe=me(B({},Be),{id:Be.inquiryLinkId||Be.id});$(Xe)};xe.on("connect_ack",Lt),xe.on("partial_inquiry",Le),xe.on("display_products",$),xe.on("progress",$),xe.on("refined_search",lt),xe.on("refined_browse",cn),xe.on("done",Be=>{ne(Be.eventSourceId)}),xe.on("error",Be=>{$(Be),ne(Be.eventSourceId)}),xe.onDisconnect(Be=>{const Xe=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Be),!Xe.includes(Be)){U(!1);return}p==null||p.log("De-registering event listeners");const gt=new Date().toISOString();$({name:"error",message:"Connection was lost. Please try again.",createdAt:gt,id:`error-${gt}`,sessionId:"session"}),xe.off()})},[p,U,ne,lt,cn,$,Lt]);D.useEffect(()=>{if(!re)return;const xe=Le=>{if(!F){if(!Le.message&&Le.eventSourceId&&Le.eventSourceId===J.requestId){fe({requestId:Le.eventSourceId,message:Le});return}$(Le)}};return re.on("follow_up",xe),()=>{re.off("follow_up",xe)}},[re,oe,J.requestId,F,$,fe]),D.useEffect(()=>{if(!re)return;const xe=Le=>{if(F)return;const Be=me(B({},Le),{id:Le.inquiryLinkId||Le.id});$(Be)};return re.on("inquiry",xe),()=>{re.off("inquiry",xe)}},[re,F,$]),_a(()=>{let xe;n?xe=n:xe=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Le={baseUrl:xe};e?Le.apiKey=e:t&&(Le.apiToken=t),r&&(Le.customerId=r),o&&(Le.tenantId=o);const Be=new vv(Le);return A(Be),$t(Be),Be.connect(),Be.requestSessionInformation(Xe=>{p==null||p.log("Session Information: ",Xe);const{activeConversationId:gt,conversationIds:Z}=Xe.data||{};gt&&V(gt),Z!=null&&Z.length&&ie(Z)}),()=>{Be.disconnect(),Be.off(),Y()}});const Pt=D.useCallback(xe=>{if(!re)return;const Le={eventId:xe,reason:"User cancelled the request"};re.cancelRequest(Le,Be=>{$(Be),ne(xe)})},[$,ne,re]),Qn=D.useCallback(()=>{re&&re.conversationReset({},xe=>{R(),$(xe),re.requestSessionInformation(Le=>{p==null||p.log("Session Information: ",Le);const{activeConversationId:Be,conversationIds:Xe}=Le.data||{};Be&&V(Be),Xe!=null&&Xe.length&&ie(Xe)})})},[re,p,$,R,V,ie]),_n=D.useCallback((xe,Le)=>{if(!xe)return;const Be={userPrompt:xe};switch(Le&&(Be.imageFile=Le),k){case"ask_cim":Ue(Be);return;case"search":y?ke(B(B({query:y},w),Be)):Ue(Be);return;case"browse":be(B(B({categoryId:v},N),Be));return;case"pdp":x?Ie(B({productId:x,pdpLink:C||""},Be)):Ue(Be);return}},[k,y,w,ke,Ue,v,N,be,Ie,x,C]),Gt=D.useCallback((xe,Le)=>{var ge,Ce,Ye;const Xe=xe.params.userPrompt||"";if(!Xe)return;const gt=oe.find(Re=>Re.id===Le);if(!gt)return;const Z=gt.name.replace("_suggestions","");if(Z==="ask_cim"){Ue({userPrompt:Xe});return}if(Z==="copilot_search"){const Re=((ge=gt.request)==null?void 0:ge.searchParams)||{},Xt=Re.query===y;ke(me(B({query:Re.query||y},Xt?w:{}),{userPrompt:Xe}));return}if(Z==="copilot_browse"){const Re=gt.request,ct=Re.browseParams||{},qt=ct.categoryId===v,dn=((Ce=Re.clientContext)==null?void 0:Ce.cimLabel)||"";be(me(B({categoryId:ct.categoryId||v||""},qt?N:{}),{categoryName:dn,userPrompt:Xe}));return}if(Z==="product_view"){const Re=gt.request||{},ct=Re.productId,Xt=ct===x,qt=((Ye=Re.clientContext)==null?void 0:Ye.cimLabel)||"";let dn="";Xt?dn=C||"":dn=Re.pdpLink||"",Ie({productId:ct||x,pdpLink:dn,productName:qt,userPrompt:Xe})}},[oe,y,w,ke,Ue,v,N,be,Ie,x,C]),qe=D.useMemo(()=>({copilot:re,messages:oe,groupedMessages:Ae,isLoading:Se,isResponseLoading:Me,handleAskCim:Ue,handleSearch:ke,handleBrowse:be,handlePdp:Ie,handleUserInput:_n,handleSuggestion:Gt,handleCancel:Pt,resetConversation:Qn,getSessionInformation:I,getConversationMessages:K}),[re,oe,Ae,Se,Me,Ue,ke,be,Ie,_n,Gt,Pt,Qn,I,K]);return _.jsx($1.Provider,{value:qe,children:f})},V1=()=>{const{copilot:e}=Wn(),{addCopilotEvent:t}=ts();return{getCopilotSuggestions:D.useCallback((r,o,a)=>{if(!e||!o||!r)return;const u=l=>{t(l),a(l)};switch(o){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Rr=()=>{const e=D.useContext($1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},sN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Wn(),{entryType:o}=Yn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=ts(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Rr(),{getCopilotSuggestions:w}=V1();D.useEffect(()=>{!e||!o||!t||!r||n.requestId||o==="ask_cim"&&w({},o,C=>{l({requestId:C.id,message:null})})},[e,t,n.requestId,o,r,w,l]);const v=D.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:A}=xt.facetFiltersProxy,{rangeFilters:U}=xt.rangeFiltersProxy,{catalogSegment:Y}=xt.catalogSegmentProxy,{pricebooks:R}=xt.pricebooksProxy,$={query:C};$.facetFilters=A||{},$.rangeFilters=U||[],$.catalogSegment=Y||"",$.pricebooks=R||[],d(B({},$))},[e,d]),N=D.useCallback(({categoryId:C})=>{if(!e)return;const A=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:$}=ut.pricebooksProxy,ne={categoryId:C};ne.categoryName=A||"",ne.facetFilters=U||{},ne.rangeFilters=Y||[],ne.catalogSegment=R||"",ne.pricebooks=$||[],f(B({},ne))},[e,f]),x=D.useCallback(({productId:C})=>{if(!e||!C)return;const A={productId:C,pdpLink:Er.pdpLink,productName:Er.proxy.productName||""};p(A)},[e,p]);return D.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="query"&&v({query:A.value})};return p1(C),()=>{m1(C)}},[v]),D.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.property)==="pdp-context"){const U=A.value;x({productId:U.productId});return}(A==null?void 0:A.property)==="productId"&&x({productId:A.value})};return y1(C),()=>{b1(C)}},[x]),D.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&N({categoryId:A.value})};return g1(C),()=>{E1(C)}},[N]),D.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.event)==ni.RESET_CONVERSATION&&m(),(A==null?void 0:A.event)==ni.GET_SESSION_INFORMATION){const U=A.value.callback;T(U)}if((A==null?void 0:A.event)==ni.GET_CONVERSATION_MESSAGES){const{payload:U,callback:Y}=A.value;if(!U.conversationId||typeof Y!="function")return;y(U,Y)}if((A==null?void 0:A.event)==ni.LOAD_CONVERSATION){const U=A.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach($=>{u($)})})}};return _k(C),()=>{xk(C)}},[m,T,y,a,u]),null},aN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>_.jsxs(oN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[_.jsx(sN,{}),f]}),uN=({children:e,dispatch:t})=>{const n=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=D.useCallback(w=>{t({type:yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=D.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:o,setElementId:a,setEntryType:u,setActivePromptsId:l,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:T}),[n,r,o,a,u,l,d,f,p,m,T]);return _.jsx(j1.Provider,{value:y,children:e})},lN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case yt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case yt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case yt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case yt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case yt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case yt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case yt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case yt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case yt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case yt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case yt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case yt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case yt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},cN=({promptsConfig:e,children:t})=>{const[n,r]=ig(lN,me(B(B({},Eg),e||{}),{staticQuestions:Y0((e==null?void 0:e.staticQuestions)||[])}));return _.jsx(z1.Provider,{value:n,children:_.jsx(uN,{dispatch:r,children:t})})},q1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,theme:f,openLinksInNewTab:p,onNavigate:m,globalClassName:T,isDevelopment:y=!1,componentType:w,componentConfig:v,entryType:N,initialEntry:x,entryMessage:C,disclaimerText:A,disclaimerMarkdown:U,clientContext:Y,baseCatalogParams:R,searchPlaceholder:$,searchButtonLabel:ne,searchConfig:de,suggestionButtonConfig:V,messageAlignment:ie,autoScroll:fe,promptsConfig:we,resetConversationMessage:re,conversationHistory:oe,onConnect:Ae,onCopilotEvent:se,onRefinedSearch:J,onRefinedBrowse:ae,__features:k,children:F})=>{const K=x==null?void 0:x.params;return _.jsx(ZC,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:C,staticQuestions:Y0(K==null?void 0:K.staticQuestions),staticQuestionsStrategy:K==null?void 0:K.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:$,searchButtonLabel:ne,searchConfig:de,suggestionButtonConfig:V,messageAlignment:ie,autoScroll:fe,componentConfig:v,clientContext:Y,baseCatalogParams:R,disclaimerMarkdown:U,disclaimerText:A,resetConversationMessage:re,conversationHistory:oe,isDevelopment:y,__features:k,children:_.jsx(rN,{entryType:N!=null?N:x==null?void 0:x.type,componentConfig:v,componentType:w,children:_.jsx(ck,{onCopilotEvent:se,children:_.jsx(tN,{children:_.jsx(Xk,{children:_.jsx(Jk,{children:_.jsx(cN,{promptsConfig:we,children:_.jsx(aN,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:N,onConnect:Ae,onRefinedSearch:J,onRefinedBrowse:ae,onCopilotEvent:se,children:F})})})})})})})})};var Rf={exports:{}},Mn={},Lf={exports:{}},Df={};var Y1;function dN(){return Y1||(Y1=1,(function(e){function t(J,ae){var k=J.length;J.push(ae);e:for(;0<k;){var F=k-1>>>1,K=J[F];if(0<o(K,ae))J[F]=ae,J[k]=K,k=F;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var ae=J[0],k=J.pop();if(k!==ae){J[0]=k;e:for(var F=0,K=J.length,I=K>>>1;F<I;){var Se=2*(F+1)-1,Me=J[Se],ke=Se+1,be=J[ke];if(0>o(Me,k))ke<K&&0>o(be,Me)?(J[F]=be,J[ke]=k,F=ke):(J[F]=Me,J[Se]=k,F=Se);else if(ke<K&&0>o(be,k))J[F]=be,J[ke]=k,F=ke;else break e}}return ae}function o(J,ae){var k=J.sortIndex-ae.sortIndex;return k!==0?k:J.id-ae.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,l=u.now();e.unstable_now=function(){return u.now()-l}}var d=[],f=[],p=1,m=null,T=3,y=!1,w=!1,v=!1,N=typeof setTimeout=="function"?setTimeout:null,x=typeof clearTimeout=="function"?clearTimeout:null,C=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(J){for(var ae=n(f);ae!==null;){if(ae.callback===null)r(f);else if(ae.startTime<=J)r(f),ae.sortIndex=ae.expirationTime,t(d,ae);else break;ae=n(f)}}function U(J){if(v=!1,A(J),!w)if(n(d)!==null)w=!0,Ae(Y);else{var ae=n(f);ae!==null&&se(U,ae.startTime-J)}}function Y(J,ae){w=!1,v&&(v=!1,x(ne),ne=-1),y=!0;var k=T;try{for(A(ae),m=n(d);m!==null&&(!(m.expirationTime>ae)||J&&!ie());){var F=m.callback;if(typeof F=="function"){m.callback=null,T=m.priorityLevel;var K=F(m.expirationTime<=ae);ae=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),A(ae)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var Se=n(f);Se!==null&&se(U,Se.startTime-ae),I=!1}return I}finally{m=null,T=k,y=!1}}var R=!1,$=null,ne=-1,de=5,V=-1;function ie(){return!(e.unstable_now()-V<de)}function fe(){if($!==null){var J=e.unstable_now();V=J;var ae=!0;try{ae=$(!0,J)}finally{ae?we():(R=!1,$=null)}}else R=!1}var we;if(typeof C=="function")we=function(){C(fe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=fe,we=function(){oe.postMessage(null)}}else we=function(){N(fe,0)};function Ae(J){$=J,R||(R=!0,we())}function se(J,ae){ne=N(function(){J(e.unstable_now())},ae)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){w||y||(w=!0,Ae(Y))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):de=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return T},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(T){case 1:case 2:case 3:var ae=3;break;default:ae=T}var k=T;T=ae;try{return J()}finally{T=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,ae){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var k=T;T=J;try{return ae()}finally{T=k}},e.unstable_scheduleCallback=function(J,ae,k){var F=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?F+k:F):k=F,J){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=k+K,J={id:p++,callback:ae,priorityLevel:J,startTime:k,expirationTime:K,sortIndex:-1},k>F?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(x(ne),ne=-1):v=!0,se(U,k-F))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ae(Y))),J},e.unstable_shouldYield=ie,e.unstable_wrapCallback=function(J){var ae=T;return function(){var k=T;T=ae;try{return J.apply(this,arguments)}finally{T=k}}}})(Df)),Df}var W1;function fN(){return W1||(W1=1,Lf.exports=dN()),Lf.exports}var G1;function hN(){if(G1)return Mn;G1=1;var e=mr(),t=fN();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,c=1;c<arguments.length;c++)s+="&args[]="+encodeURIComponent(arguments[c]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var l=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function T(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,s,c,h){if(c!==null&&c.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:c!==null?!c.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function w(i,s,c,h){if(s===null||typeof s=="undefined"||y(i,s,c,h))return!0;if(h)return!1;if(c!==null)switch(c.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function v(i,s,c,h,E,b,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=c,this.propertyName=i,this.type=s,this.sanitizeURL=b,this.removeEmptyString=S}var N={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){N[i]=new v(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];N[s]=new v(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){N[i]=new v(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){N[i]=new v(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){N[i]=new v(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){N[i]=new v(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){N[i]=new v(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){N[i]=new v(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){N[i]=new v(i,5,!1,i.toLowerCase(),null,!1,!1)});var x=/[\-:]([a-z])/g;function C(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(x,C);N[s]=new v(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!1,!1)}),N.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){N[i]=new v(i,1,!1,i.toLowerCase(),null,!0,!0)});function A(i,s,c,h){var E=N.hasOwnProperty(s)?N[s]:null;(E!==null?E.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(w(s,c,E,h)&&(c=null),h||E===null?T(s)&&(c===null?i.removeAttribute(s):i.setAttribute(s,""+c)):E.mustUseProperty?i[E.propertyName]=c===null?E.type===3?!1:"":c:(s=E.attributeName,h=E.attributeNamespace,c===null?i.removeAttribute(s):(E=E.type,c=E===3||E===4&&c===!0?"":""+c,h?i.setAttributeNS(h,s,c):i.setAttribute(s,c))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),$=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),ie=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),we=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Ae=Symbol.for("react.lazy"),se=Symbol.for("react.offscreen"),J=Symbol.iterator;function ae(i){return i===null||typeof i!="object"?null:(i=J&&i[J]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,F;function K(i){if(F===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
|
|
11
|
-
`+F+i}var
|
|
10
|
+
`+u)}}catch(o){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=So(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&kl.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}:kl.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),kl.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||Of;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=[Uf.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(()=>Uf.call(this,y)))}catch(_){p=Promise.reject(_)}break}}if(!p)try{p=Uf.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=So(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){vo.prototype[t]=function(n,r){return this.request(So(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(So(l||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}vo.prototype[t]=n(),t!=="query"&&(vo.prototype[t+"Form"]=n(!0))});let JC=class yS{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 Ia(a,u,l),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new yS(function(o){t=o}),cancel:t}}};function ZC(e){return function(n){return e.apply(null,n)}}function ek(e){return V.isObject(e)&&e.isAxiosError===!0}const Pl={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(Pl).forEach(([e,t])=>{Pl[t]===void 0&&(Pl[t]=e)});function x1(e){const t=new vo(e),n=k0(vo.prototype.request,t);return V.extend(n,vo.prototype,t,{allOwnKeys:!0}),V.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return x1(So(e,o))},n}const zt=x1(Oa);zt.Axios=vo,zt.CanceledError=Ia,zt.CancelToken=JC,zt.isCancel=n1,zt.VERSION=Mf,zt.toFormData=Sl,zt.AxiosError=Se,zt.Cancel=zt.CanceledError,zt.all=function(t){return Promise.all(t)},zt.spread=ZC,zt.isAxiosError=ek,zt.mergeConfig=So,zt.AxiosHeaders=xn,zt.formToJSON=e=>e1(V.isHTMLForm(e)?new FormData(e):e),zt.getAdapter=T1.getAdapter,zt.HttpStatusCode=Pl,zt.default=zt;const{Axios:iH,AxiosError:oH,CanceledError:sH,isCancel:aH,CancelToken:uH,VERSION:lH,all:cH,Cancel:dH,isAxiosError:fH,spread:hH,toFormData:pH,AxiosHeaders:mH,HttpStatusCode:gH,formToJSON:EH,getAdapter:yH,mergeConfig:bH,create:TH}=zt;class tk{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",()=>Ze(this,null,function*(){try{const t=yield zt.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 nk{constructor(t,n,r,o=!1,a,u){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>Ze(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 tk(t,n,r,o,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Es=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class rk{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Es(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const ik={copilot:"Your Search Assistant",messaging:"Commerce Client"},_1=I.createContext(null),ok=({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:te,baseUrl:he,customerId:q,tenantId:re,theme:de,isDevelopment:ye,__features:ee,routingAttributes:oe,enableDownloadTranscript:Ae=!0,enablePageContext:ae=!1,enableEscalationToAgent:J=!1,enableImageUpload:se=!1,showProductCaptions:k=!1,connectingMessages:F,staticQuestions:K,staticQuestionsStrategy:O="append",children:ce})=>{const we=e==="messaging",Ce=I.useMemo(()=>{const Rt=oe==null?void 0:oe.isCartMgmtSupported;return Rt===!0||Rt==="true"},[oe]),xe=I.useMemo(()=>we?{config:null}:new nk(he,z,te,ye,q,re),[we,he,z,te,ye,q,re]),Re=I.useMemo(()=>new rk(ye),[ye]);I.useEffect(()=>{we||!xe||xe.config||xe.getConfig()},[xe,we]);const Fe=I.useMemo(()=>S0(de),[de]),at=Fe.cssVariables,dn=I.useMemo(()=>{const Rt=(w==null?void 0:w.placeholder)||T,ur=(w==null?void 0:w.buttonLabel)||y;let Bn="icon";return w!=null&&w.buttonType?Bn=w.buttonType:y&&(Bn="text"),ge(M({},w||{}),{placeholder:Rt,buttonLabel:ur,buttonType:Bn})},[w,T,y]),kt=I.useMemo(()=>ge(M({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||ik[e!=null?e:"copilot"]}),[r,t,n,e]),$t=I.useMemo(()=>({configModule:xe,mode:e!=null?e:"copilot",themeVariants:Fe.compatibility&&e!=="messaging"?ge(M({},Fe.variants),{carousel:"chevron"}):Fe.variants,themeTokens:Fe.compatibility==="legacy"?void 0:Fe.tokens,themeClassName:Fe.transcriptClassName,headerConfig:kt,entryMessage:a,staticQuestions:K||[],staticQuestionsStrategy:O,globalClassName:o,openLinksInNewTab:u,onNavigate:l,disclaimerText:d,disclaimerMarkdown:f,clientContext:p,baseCatalogParams:m,themeVariables:at,logger:Re,searchConfig:dn,suggestionButtonConfig:v,progressStepsLimit:P,messageAlignment:_,autoScroll:C,showProductDescription:!!A,enableMinimize:!!(H!=null&&H.enableMinimize),launcherAriaLabel:H==null?void 0:H.launcherAriaLabel,enableDownloadTranscript:Ae,enablePageContext:ae,enableEscalationToAgent:J,enableImageUpload:se,showProductCaptions:!!k,connectingMessages:F,resetConversationMessage:L,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:we?24:1,limit:U==null?void 0:U.limit},features:ee,isCartMgmtSupported:Ce}),[xe,e,kt,a,K,O,o,p,m,d,f,u,l,dn,v,_,C,A,H,Ae,ae,J,se,P,k,F,L,Re,at,Fe,U,ee,Ce,we]);return x.jsx(_1.Provider,{value:$t,children:ce})},et=()=>{const e=I.useContext(_1);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class sk{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 dk(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 Qe=new sk,Ui=()=>Qe.connected,Ra=()=>Qe.isOpen,Hf="cimulate.widget.minimizedOnNav";function ak(){try{const e=sessionStorage.getItem(Hf)==="1";return sessionStorage.removeItem(Hf),e}catch(e){return!1}}function uk(){try{sessionStorage.removeItem(Hf)}catch(e){return}}const lk=e=>{window.addEventListener(Tf,e)},ck=e=>{window.removeEventListener(Tf,e)},dk=(e,t)=>{const n=new CustomEvent(Tf,{detail:{property:e,value:t}});window.dispatchEvent(n)},fk=e=>{Qe.connectedProxy.connected=e},La=e=>{if(!Vv(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}.`)}Qe.entryTypeProxy.entryType=e},yi=e=>{const t=Qe.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Qe.statusProxy.isOpen=n,n&&(Qe.statusProxy.isMinimized=!1,uk())},Da=e=>{const t=Qe.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Qe.statusProxy.isMinimized=n,n&&(Qe.statusProxy.isOpen=!1)},zf=e=>{Qe.modalProxy.isFullscreen=e},Nl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Qe.statusProxy.type=e,e==="dialog"||e==="chat"?Qe.modeProxy.mode="embedded":Qe.modeProxy.mode="standalone"},jf=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(", ")}.`);Qe.dialogProxy.position=e},hk=e=>{const t=Qe.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Qe.dialogProxy.isFullHeight=n},pk=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=et(),o=I.useCallback(A=>{n({type:gt.SET_COPILOT,payload:A})},[n]),a=I.useCallback(A=>{fk(A),n({type:gt.SET_CONNECTED,payload:A})},[n]),u=I.useCallback(()=>{n({type:gt.RESET_COPILOT,payload:{}})},[n]),l=I.useCallback(()=>{n({type:gt.RESET_STATE,payload:{}})},[n]),d=I.useCallback(A=>{r==null||r.log(`${A.name} event received`,A),n({type:gt.ADD_MESSAGE,payload:A}),A.bypassHandlers||e==null||e(A)},[e,r,n]),f=I.useCallback(A=>{n({type:gt.ADD_LOADING_MESSAGE,payload:A})},[n]),p=I.useCallback(A=>{n({type:gt.REMOVE_LOADING_MESSAGE,payload:A})},[n]),m=I.useCallback(A=>{d(A),f(A.id)},[d,f]),T=I.useCallback(A=>{n({type:gt.SET_ACTIVE_CONVERSATION_ID,payload:A})},[n]),y=I.useCallback(A=>{n({type:gt.ADD_CONVERSATION_ID,payload:A})},[n]),w=I.useCallback(A=>{n({type:gt.SET_CONVERSATION_IDS,payload:A})},[n]),v=I.useCallback(A=>{n({type:gt.SET_IMAGE_FILE,payload:A})},[n]),P=I.useCallback(A=>{n({type:gt.SET_ASK_CIM_PROMPTS,payload:A})},[n]),_=I.useCallback(A=>{n({type:gt.SET_CONVERSATION_HISTORY_LOADED,payload:A})},[n]),C=I.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})};zv();const mk=(e,t)=>{const{type:n,payload:r}=t;if(n===gt.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 gt.RESET_STATE:e.messages=bo.messages,e.groupedMessages=bo.groupedMessages,e.loadingMessages=bo.loadingMessages,e.imageFile=bo.imageFile,e.askCimPrompts=bo.askCimPrompts,e.conversationHistoryLoaded=bo.conversationHistoryLoaded;break;case gt.RESET_COPILOT:e.copilot=null;break;case gt.SET_COPILOT:e.copilot=r;break;case gt.SET_CONNECTED:e.connected=r;break;case gt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case gt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case gt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case gt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case gt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case gt.SET_IMAGE_FILE:e.imageFile=r;break;case gt.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 gt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},gk=({onCopilotEvent:e,children:t})=>{const[n,r]=p0(mk,bo);return x.jsx(v0.Provider,{value:n,children:x.jsx(pk,{onCopilotEvent:e,dispatch:r,children:t})})};function Ek(){var e=I.useRef(!0);return e.current?(e.current=!1,!0):e.current}function yk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function bk(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var $f=typeof window!="undefined",Ma=function(e){I.useEffect(e,[])},Tk=function(e){var t=I.useRef(e);t.current=e,Ma(function(){return function(){return t.current()}})},wk=function(e){var t=I.useRef(0),n=I.useState(e),r=n[0],o=n[1],a=I.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){o(u)})},[]);return Tk(function(){cancelAnimationFrame(t.current)}),[r,a]},xk=function(e,t){return e===t};function _k(e,t){t===void 0&&(t=xk);var n=I.useRef(),r=I.useRef(e),o=Ek();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Sk=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=wk({width:$f?window.innerWidth:r,height:$f?window.innerHeight:a}),d=l[0],f=l[1];return I.useEffect(function(){if($f){var p=function(){var m=window.innerWidth,T=window.innerHeight;f({width:m,height:T}),u&&u(m,T)};return yk(window,"resize",p),function(){bk(window,"resize",p)}}},[]),d};class vk{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(gn.size).fill(1).forEach(()=>{const r=gn.first();r&&(t(r),gn.remove())})})}get size(){return this.items.length}}const gn=new vk,S1=e=>{window.addEventListener(bf,e)},v1=e=>{window.removeEventListener(bf,e)},Ak=(e,t,n)=>{const r=new CustomEvent(bf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},A1=e=>{window.addEventListener(yf,e)},C1=e=>{window.removeEventListener(yf,e)},Ck=(e,t,n)=>{const r=new CustomEvent(yf,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},k1=e=>{window.addEventListener(Ef,e)},P1=e=>{window.removeEventListener(Ef,e)},Vf=(e,t,n)=>{const r=new CustomEvent(Ef,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},kk=e=>{window.addEventListener(xf,e)},Pk=e=>{window.removeEventListener(xf,e)},Fa=(e,t,n)=>{const r=new CustomEvent(xf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Nk{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=Wv[n];return Ck(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 ct=new Nk,N1=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},O1=(e,t,n)=>{var u,l;const r=M({},((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},Ok=e=>{if(!Ui()||!Ra()){Ui()&&gn.clear(),gn.add({context:"browse",payload:ge(M({},ct.state),{categoryId:e})});return}ct.categoryIdProxy.categoryId=e},M1=e=>{N1(e,ct)},Ik=(e,t)=>{O1(e,t,ct)},F1=e=>{I1(e,ct)},Rk=({field:e,value:t})=>{R1({field:e,value:t},ct)},Lk=e=>{L1(e,ct)},B1=e=>{D1(e,ct)},U1=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Ui(),n=Ra();if(!t||!n){t&&gn.clear(),gn.add({context:"browse",payload:M({},e)});return}"facetFilters"in e&&M1(e.facetFilters||{}),"rangeFilters"in e&&F1(e.rangeFilters||[]),"catalogSegment"in e&&(ct.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&B1(e.pricebooks||[]),"categoryName"in e&&(ct.categoryIdProxy.categoryName=e.categoryName||""),ct.categoryIdProxy.categoryId=e.categoryId},Dk=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:U1,updateBrowseCategoryId:Ok,updateCatalogSegment:Lk,updateFacetFilter:Ik,updateFacetFilters:M1,updatePricebooks:B1,updateRangeFilter:Rk,updateRangeFilters:F1},Symbol.toStringTag,{value:"Module"}));class Mk{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)=>(Vf(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",()=>{Vf("pdp-context",this.state)});ve(this,"createProxy",t=>new Proxy(M({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 M({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Nr=new Mk,H1=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Ui(),n=Ra();if(!t||!n){t&&gn.clear(),gn.add({context:"pdp",payload:M({},e)});return}Nr.updateProxy(e),Vf("pdp-context",e)},Fk=e=>{Nr.proxy.productId=e,Ui()||gn.add({context:"pdp",payload:M({},Nr.state)})},Bk=e=>{Nr.proxy.pdpLink=e};class Uk{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 Ba(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(M({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Wt=new Uk,Hk=e=>{window.addEventListener(wf,e)},zk=e=>{window.removeEventListener(wf,e)},Ba=(e,t)=>{const n=new CustomEvent(wf,{detail:{property:e,value:t}});window.dispatchEvent(n)},z1=e=>{const t=Wt.isOpen,n=typeof e=="boolean"?e:!t;Wt.promptsStateProxy.isOpen=n},j1=e=>{const t=Wt.isInline,n=typeof e=="boolean"?e:!t;Wt.promptsStateProxy.isInline=n},jk=e=>{Wt.promptsParamsProxy=Wt.updatePromptsParamsProxy(e),Ba("params",e),Wt.promptsStateProxy.entryType="ask_cim"},$k=e=>{Wt.promptsParamsProxy=Wt.updatePromptsParamsProxy(e),Ba("params",e),Wt.promptsStateProxy.entryType="search"},Vk=e=>{Wt.promptsParamsProxy=Wt.updatePromptsParamsProxy(e),Ba("params",e),Wt.promptsStateProxy.entryType="browse"},qk=e=>{Wt.promptsParamsProxy=Wt.updatePromptsParamsProxy(e),Ba("params",e),Wt.promptsStateProxy.entryType="pdp"},Yk=({elementId:e,entryType:t,params:n,isInline:r})=>{Wt.promptsStateProxy.elementId=e,t&&(Wt.promptsStateProxy.entryType=t),typeof r=="boolean"&&j1(r),n&&Wt.updatePromptsParamsProxy(n),Wt.isOpen||z1(!0)},Wk=Object.freeze(Object.defineProperty({__proto__:null,endConversation:()=>{Fa("endConversation",!0,Ei.END_CONVERSATION)},getConversationMessages:({payload:e,callback:t})=>{Fa("getConversationMessages",{payload:e,callback:t},Ei.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Fa("getSessionInformation",{callback:e},Ei.GET_SESSION_INFORMATION)},loadConversation:e=>{Fa("loadConversation",e,Ei.LOAD_CONVERSATION)},resetConversation:()=>{Fa("resetConversation",!0,Ei.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Gk{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=Gv[n];return Ak(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 _t=new Gk,Xk=e=>{const t=Ra(),n=Ui();if(!n||!t){n&&gn.clear(),gn.add({context:"search",payload:ge(M({},_t.state),{query:e})});return}_t.queryProxy.query=e},$1=e=>{N1(e,_t)},Kk=(e,t)=>{O1(e,t,_t)},V1=e=>{I1(e,_t)},Qk=({field:e,value:t})=>{R1({field:e,value:t},_t)},Jk=e=>{L1(e,_t)},q1=e=>{D1(e,_t)},Y1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Ra(),n=Ui();if(!n||!t){n&&gn.clear(),gn.add({context:"search",payload:M({},e)});return}"facetFilters"in e&&$1(e.facetFilters||{}),"rangeFilters"in e&&V1(e.rangeFilters||[]),"catalogSegment"in e&&(_t.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&q1(e.pricebooks||[]),_t.queryProxy.query=e.query},Zk=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Y1,updateCatalogSegment:Jk,updateFacetFilter:Kk,updateFacetFilters:$1,updatePricebooks:q1,updateRangeFilter:Qk,updateRangeFilters:V1,updateSearchQuery:Xk},Symbol.toStringTag,{value:"Module"})),eP={categoryId:ct.categoryId,categoryName:ct.categoryIdProxy.categoryName||"",facetFilters:ct.facetFilters,rangeFilters:ct.rangeFilters,catalogSegment:ct.catalogSegment,pricebooks:ct.pricebooks},W1=I.createContext(eP),tP=({children:e})=>{const[t,n]=I.useState(ct.categoryId),[r,o]=I.useState(ct.categoryIdProxy.categoryName||""),[a,u]=I.useState(ct.facetFilters||{}),[l,d]=I.useState(ct.rangeFilters||[]),[f,p]=I.useState(ct.catalogSegment||null),[m,T]=I.useState(ct.pricebooks||null);I.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=I.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})},nP=()=>{const e=I.useContext(W1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},rP={searchQuery:_t.query,facetFilters:_t.facetFilters,rangeFilters:_t.rangeFilters,catalogSegment:_t.catalogSegment,pricebooks:_t.pricebooks},G1=I.createContext(rP),iP=({children:e})=>{const[t,n]=I.useState(_t.query),[r,o]=I.useState(_t.facetFilters),[a,u]=I.useState(_t.rangeFilters),[l,d]=I.useState(_t.catalogSegment),[f,p]=I.useState(_t.pricebooks);I.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=I.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})},oP=()=>{const e=I.useContext(G1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},sP={productId:Nr.productId,pdpLink:Nr.pdpLink},X1=I.createContext(sP),aP=({children:e})=>{const[t,n]=I.useState(Nr.productId),[r,o]=I.useState(Nr.pdpLink);I.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=I.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return x.jsx(X1.Provider,{value:a,children:e})},uP=()=>{const e=I.useContext(X1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},K1=I.createContext({mode:Qe.modeProxy.mode,entryType:Qe.entryType,status:Qe.statusProxy,dialogPosition:Qe.dialogProxy.position,isDialogFullHeight:Qe.dialogProxy.isFullHeight,dialogWidth:Qe.dialogProxy.width,isModalFullscreen:Qe.modalProxy.isFullscreen,previousComponentType:Qe.statusProxy.type}),lP=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[o,a]=I.useState(e!=null?e:Qe.entryTypeProxy.entryType),[u,l]=I.useState(Qe.modeProxy.mode),[d,f]=I.useState({type:n||Qe.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Qe.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Qe.statusProxy.isMinimized}),[p,m]=I.useState(Qe.dialogProxy.position),[T,y]=I.useState(Qe.dialogProxy.isFullHeight),[w,v]=I.useState(Qe.dialogProxy.width),[P,_]=I.useState(Qe.modalProxy.isFullscreen),C=I.useRef(!1),A=_k(d.type);I.useEffect(()=>{const U=L=>{const{property:z,value:te}=L.detail||{};if(!(!z||te===void 0)){if(z==="mode"){l(te);return}if(z==="entryType"){a(te);return}if(z==="isMinimized"){f(he=>ge(M({},he),{isMinimized:te}));return}if(z==="isOpen"){f(he=>ge(M({},he),{isOpen:te}));return}if(z==="type"){f(he=>ge(M({},he),{type:te}));return}if(z==="position"){m(te);return}if(z==="isFullHeight"){y(te);return}if(z==="width"){v(te);return}if(z==="isFullscreen"){_(te);return}}};return lk(U),()=>{ck(U)}},[]),Ma(()=>{e&&La(e)}),Ma(()=>{if(C.current)return;C.current=!0;const U=n||(t==null?void 0:t.type);U&&Nl(U);const L=ak();t&&"isOpen"in t&&yi(!!t.isOpen),t&&"isMinimized"in t&&Da(!!t.isMinimized),L&&Da(!0)}),Ma(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&jf(U),"dialogFullHeight"in t.options&&hk(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&v(t.options.dialogWidth),"isModalFullscreen"in t.options&&zf(!!t.options.isModalFullscreen)});const H=I.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})},ir=()=>{const e=I.useContext(K1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Q1=I.createContext(null),J1=I.createContext(null),qf=()=>{const e=I.useContext(J1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},bi=()=>{const e=I.useContext(Q1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Ao=()=>{const e=I.useContext(A0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Yn=()=>{const e=I.useContext(v0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},cP=({copilot:e})=>{const{logger:t,conversationHistory:n}=et(),{isInline:r}=bi(),{addCopilotEvent:o,setConversationHistoryLoaded:a}=Ao(),{activeConversationId:u}=Yn(),l=I.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=I.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 I.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}},Yf=15e3,dP=({connected:e,canQueue:t})=>{const{imageFile:n}=Yn(),{setImageFile:r,addCopilotEvent:o}=Ao(),[a,u]=I.useState(null),[l,d]=I.useState(null),f=I.useRef(null),p=I.useRef(0),m=I.useRef(n);m.current=n;const T=I.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=I.useCallback((U,L,z)=>{const te=f.current;if(!te||te.phase!=="queued"||te.send){L(U,z);return}const he=structuredClone(U);te.send=()=>{let q=!1;Promise.resolve(L(he,re=>{if(!(q||f.current!==te)){if(q=!0,re.name==="error"){o(re),f.current===te&&T(!1,"Your message could not be sent. Please try again.");return}z(re),f.current===te&&T(!0)}})).catch(()=>{f.current===te&&T(!1,"Your message could not be confirmed. Please try again.")})}},[o,T]),w=I.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 te={text:U,phase:"queued",send:null,resolve:z,attachment:m.current};f.current=te,te.timer=setTimeout(()=>{f.current===te&&T(!1,"Your message was not sent in time. Please try again.")},Yf),u({text:U,phase:"queued"}),d(null),L(),te.send||T(!1,"Your message could not be queued. Please try again.")}):Promise.resolve(!1)},[e,t,T,a,l]),v=I.useCallback(U=>{const L=p.current;return z=>L!==p.current?Promise.resolve(!1):U(z)},[]),P=I.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.")},Yf);try{U.send()}catch(L){T(!1,"Your message could not be sent. Please try again.")}}},[T]),_=I.useCallback(()=>T(!1),[T]),C=I.useCallback(()=>{const U=f.current;T(!1),U||u(null)},[T]),A=I.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=I.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=I.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:()=>{}}),fP=({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}=et(),cr=oP(),{searchQuery:y}=cr,w=wn(cr,["searchQuery"]),Cn=nP(),{categoryId:v}=Cn,P=wn(Cn,["categoryId"]),{productId:_,pdpLink:C}=uP(),{setCopilot:A,setConnected:H,resetCopilot:U,resetCopilotState:L,addCopilotEvent:z,removeLoadingMessage:te,handleCopilotRequestAck:he,setActiveConversationId:q,setConversationIds:re,setAskCimPrompts:de}=Ao(),{connected:ye,copilot:ee,messages:oe,groupedMessages:Ae,loadingMessages:ae,askCimPrompts:J}=Yn(),{status:se,entryType:k}=ir(),{isInline:F}=bi(),K=I.useRef(null),[O,ce]=I.useState("idle"),we=O==="connecting"&&!ye,Ce=O==="slow"&&!ye,{pendingInput:xe,inputError:Re,dispatchRequest:Fe,submitInput:at,prepareInput:dn,flushInput:kt,cancelInput:$t,resetInput:Rt,disconnectInput:ur,disposeInput:Bn}=dP({connected:!!ye,canQueue:we&&!!ee&&se.isOpen}),{getConversationMessages:Jt,getSessionInformation:Ve}=cP({copilot:ee}),bt=I.useMemo(()=>ae.size>0,[ae]),Xt=I.useCallback(_e=>ae.has(_e),[ae]),Lt=I.useCallback(({query:_e,facetFilters:Pe,rangeFilters:Ne,catalogSegment:Ue,pricebooks:Pt,userPrompt:Dt,imageFile:Hn})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Nt={searchParams:{query:_e}};Dt&&(Nt.userPrompt=Dt),Hn&&(Nt.attachments={image:Hn}),Pe&&Object.keys(Pe).length>0&&(Nt.searchParams.facetFilters=Pe),Ne&&Ne.length>0&&(Nt.searchParams.rangeFilters=Ne),Ue&&(Nt.searchParams.catalogSegment=Ue),Pt&&(Nt.searchParams.pricebooks=Pt),m&&(Nt.clientContext=m),La("search"),Fe(Nt,(kn,ot)=>ee.search(kn,ot),kn=>{const ot=M({},kn);he(ot)})},[p,ee,m,he,Fe]),Un=I.useCallback(({categoryId:_e,categoryName:Pe,facetFilters:Ne,rangeFilters:Ue,catalogSegment:Pt,pricebooks:Dt,userPrompt:Hn,imageFile:Nt})=>{if(!ee){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||""}};Hn&&(ot.userPrompt=Hn),Nt&&(ot.attachments={image:Nt}),kn&&(ot.browseParams.facetFilters=Ne),Ue&&Ue.length>0&&(ot.browseParams.rangeFilters=Ue),Pt&&(ot.browseParams.catalogSegment=Pt),Array.isArray(Dt)&&Dt.length>0&&(ot.browseParams.pricebooks=Dt),(m||Pe)&&(ot.clientContext={},m&&(ot.clientContext=M({},m)),Pe&&(ot.clientContext.cimLabel=Pe)),La("browse"),Fe(ot,(Pn,yn)=>ee.browse(Pn,yn),Pn=>{var Lc;const yn=M({},Pn),Br=((Lc=yn.request)==null?void 0:Lc.clientContext)||{},Jn=(Br==null?void 0:Br.cimLabel)||Pe;Jn&&yn.request&&(yn.request.label=Jn),he(yn)})},[p,ee,m,he,Fe]),lr=I.useCallback(({productId:_e,productName:Pe,pdpLink:Ne,userPrompt:Ue,imageFile:Pt})=>{if(!ee){p==null||p.error("Copilot is not initialized");return}if(!_e)return;const Dt={productId:_e};Ue&&(Dt.userPrompt=Ue),Ne&&(Dt.pdpLink=Ne),Pt&&(Dt.attachments={image:Pt}),(m||Pe)&&(Dt.clientContext={},m&&(Dt.clientContext=M({},m)),Pe&&(Dt.clientContext.cimLabel=Pe)),T&&(Dt.baseCatalogParams=T),La("pdp"),Fe(Dt,(Hn,Nt)=>ee.productView(Hn,Nt),Hn=>{var Pn;const Nt=M({},Hn),kn=((Pn=Nt.request)==null?void 0:Pn.clientContext)||{},ot=(kn==null?void 0:kn.cimLabel)||Pe;ot&&Nt.request&&(Nt.request.label=ot),he(Nt)})},[p,ee,m,T,he,Fe]),Zt=I.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,(Ue,Pt)=>ee.askCim(Ue,Pt),Ue=>{const Pt=M({},Ue);he(Pt)})},[p,ee,m,T,he,Fe]),Wo=I.useCallback(_e=>{z(_e),l==null||l(_e)},[z,l]),ie=I.useCallback(_e=>{z(_e),d==null||d(_e)},[z,d]),Te=I.useCallback(_e=>{const Pe=K.current;Pe&&(Pe.established=!0,clearTimeout(Pe.timer)),ce("connected"),u==null||u(_e),H(!0)},[u,H]);I.useEffect(()=>{!ee||!ye||!se.isOpen||gn.size>0&&gn.processQueue(_e=>{if(_e.context==="search"){const Pe=M({},_e.payload);Y1(Pe)}if(_e.context==="browse"){const Pe=M({},_e.payload);U1(Pe)}if(_e.context==="pdp"){const Pe=M({},_e.payload);H1(Pe)}})},[se.isOpen,ee,ye]),I.useEffect(()=>{ye&&se.isOpen&&kt()},[ye,se.isOpen,xe,kt]);const qe=I.useCallback(_e=>{const Pe=Ne=>{const Ue=ge(M({},Ne),{id:Ne.inquiryLinkId||Ne.id});z(Ue)};_e.on("connect_ack",Te),_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",Wo),_e.on("refined_browse",ie),_e.on("done",Ne=>{te(Ne.eventSourceId)}),_e.on("error",Ne=>{z(Ne),te(Ne.eventSourceId)}),_e.onDisconnect(Ne=>{const Ue=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Ne),ur(),!Ue.includes(Ne)){H(!1);return}p==null||p.log("De-registering event listeners");const Pt=new Date().toISOString();z({name:"error",message:"Connection was lost. Please try again.",createdAt:Pt,id:`error-${Pt}`,sessionId:"session"}),_e.off()})},[p,H,te,Wo,ie,z,Te,ur]);I.useEffect(()=>{if(!ee)return;const _e=Pe=>{if(!F){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===J.requestId){de({requestId:Pe.eventSourceId,message:Pe});return}z(Pe)}};return ee.on("follow_up",_e),()=>{ee.off("follow_up",_e)}},[ee,oe,J.requestId,F,z,de]),I.useEffect(()=>{if(!ee)return;const _e=Pe=>{if(F)return;const Ne=ge(M({},Pe),{id:Pe.inquiryLinkId||Pe.id});z(Ne)};return ee.on("inquiry",_e),()=>{ee.off("inquiry",_e)}},[ee,F,z]),Ma(()=>{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 Ov(Pe);return K.current={sdk:Ne,started:!1,established:!1},A(Ne),qe(Ne),()=>{var Ue;Bn(),clearTimeout((Ue=K.current)==null?void 0:Ue.timer),K.current=null,Ne.disconnect(),Ne.off(),H(!1),U()}}),I.useEffect(()=>{const _e=K.current;!se.isOpen||!ee||(_e==null?void 0:_e.sdk)!==ee||_e.started||(_e.started=!0,ce("connecting"),_e.timer=setTimeout(()=>{K.current!==_e||_e.established||(ce("slow"),$t())},Yf),ee.connect(),ee.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Ue}=Pe.data||{};Ne&&q(Ne),Ue!=null&&Ue.length&&re(Ue)}))},[ee,se.isOpen,p,q,re,$t]);const Ge=I.useCallback(_e=>{if(!ee)return;const Pe={eventId:_e,reason:"User cancelled the request"};ee.cancelRequest(Pe,Ne=>{z(Ne),te(_e)})},[z,te,ee]),tt=I.useCallback(()=>{Rt(),ee&&ee.conversationReset({},_e=>{L(),z(_e),ee.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Ne,conversationIds:Ue}=Pe.data||{};Ne&&q(Ne),Ue!=null&&Ue.length&&re(Ue)})})},[ee,p,z,L,q,re,Rt]),Ut=I.useCallback(()=>{var Pe,Ne;const _e=ye||(Ne=(Pe=gn.items)==null?void 0:Pe.slice().reverse().find(Ue=>Ue.context===k))==null?void 0:Ne.payload;return structuredClone({entryType:k,search:M(M({query:y},w),k==="search"?_e:{}),browse:M(M({categoryId:v},P),k==="browse"?_e:{}),pdp:M({productId:_,pdpLink:_e?_e.pdpLink||"":C||""},k==="pdp"?_e:{})})},[ye,k,y,w,v,P,_,C]),wr=I.useCallback((_e,Pe,Ne=Ut())=>{if(!_e)return;const Ue={userPrompt:_e};switch(Pe&&(Ue.imageFile=Pe),Ne.entryType){case"ask_cim":Zt(Ue);return;case"search":Ne.search.query?Lt(M(M({},Ne.search),Ue)):Zt(Ue);return;case"browse":Un(M(M({},Ne.browse),Ue));return;case"pdp":Ne.pdp.productId?lr(M(M({},Ne.pdp),Ue)):Zt(Ue);return}},[Ut,Lt,Zt,Un,lr]),En=I.useCallback((_e,Pe,Ne)=>at(_e,()=>wr(_e,Pe,Ne)),[at,wr]),Fr=I.useCallback(_e=>{const Pe=Ut();return dn(Ne=>En(_e,Ne,Pe))},[Ut,En,dn]),ai=I.useCallback((_e,Pe)=>{var Hn,Nt,kn;const Ue=_e.params.userPrompt||"";if(!Ue)return;const Pt=oe.find(ot=>ot.id===Pe);if(!Pt)return;const Dt=Pt.name.replace("_suggestions","");if(Dt==="ask_cim"){Zt({userPrompt:Ue});return}if(Dt==="copilot_search"){const ot=((Hn=Pt.request)==null?void 0:Hn.searchParams)||{},yn=ot.query===y;Lt(ge(M({query:ot.query||y},yn?w:{}),{userPrompt:Ue}));return}if(Dt==="copilot_browse"){const ot=Pt.request,Pn=ot.browseParams||{},Br=Pn.categoryId===v,Jn=((Nt=ot.clientContext)==null?void 0:Nt.cimLabel)||"";Un(ge(M({categoryId:Pn.categoryId||v||""},Br?P:{}),{categoryName:Jn,userPrompt:Ue}));return}if(Dt==="product_view"){const ot=Pt.request||{},Pn=ot.productId,yn=Pn===_,Br=((kn=ot.clientContext)==null?void 0:kn.cimLabel)||"";let Jn="";yn?Jn=C||"":Jn=ot.pdpLink||"",lr({productId:Pn||_,pdpLink:Jn,productName:Br,userPrompt:Ue})}},[oe,y,w,Lt,Zt,v,P,Un,lr,_,C]),en=I.useMemo(()=>({copilot:ee,messages:oe,groupedMessages:Ae,isLoading:bt,isConnecting:we,isConnectionSlow:Ce,pendingInput:xe,inputError:Re,isResponseLoading:Xt,handleAskCim:Zt,handleSearch:Lt,handleBrowse:Un,handlePdp:lr,handleUserInput:En,prepareUserInput:Fr,handleSuggestion:ai,handleCancel:Ge,resetConversation:tt,getSessionInformation:Ve,getConversationMessages:Jt}),[ee,oe,Ae,bt,we,Ce,xe,Re,Xt,Zt,Lt,Un,lr,En,Fr,ai,Ge,tt,Ve,Jt]);return x.jsx(Z1.Provider,{value:en,children:f})},eE=()=>{const{copilot:e}=Yn(),{addCopilotEvent:t}=Ao();return{getCopilotSuggestions:I.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])}},Xr=()=>{const e=I.useContext(Z1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},hP=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=Yn(),{entryType:o}=ir(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:l}=Ao(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:T,getConversationMessages:y}=Xr(),{getCopilotSuggestions:w}=eE();I.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=I.useCallback(({query:C})=>{if(!e||!C)return;const{facetFilters:A}=_t.facetFiltersProxy,{rangeFilters:H}=_t.rangeFiltersProxy,{catalogSegment:U}=_t.catalogSegmentProxy,{pricebooks:L}=_t.pricebooksProxy,z={query:C};z.facetFilters=A||{},z.rangeFilters=H||[],z.catalogSegment=U||"",z.pricebooks=L||[],d(M({},z))},[e,d]),P=I.useCallback(({categoryId:C})=>{if(!e)return;const A=ct.categoryIdProxy.categoryName,{facetFilters:H}=ct.facetFiltersProxy,{rangeFilters:U}=ct.rangeFiltersProxy,{catalogSegment:L}=ct.catalogSegmentProxy,{pricebooks:z}=ct.pricebooksProxy,te={categoryId:C};te.categoryName=A||"",te.facetFilters=H||{},te.rangeFilters=U||[],te.catalogSegment=L||"",te.pricebooks=z||[],f(M({},te))},[e,f]),_=I.useCallback(({productId:C})=>{if(!e||!Ui()||!C)return;const A={productId:C,pdpLink:Nr.pdpLink,productName:Nr.proxy.productName||""};p(A)},[e,p]);return I.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="query"&&v({query:A.value})};return S1(C),()=>{v1(C)}},[v]),I.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)}},[_]),I.useEffect(()=>{const C=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&P({categoryId:A.value})};return A1(C),()=>{C1(C)}},[P]),I.useEffect(()=>{const C=({detail:A})=>{if((A==null?void 0:A.event)==Ei.RESET_CONVERSATION&&m(),(A==null?void 0:A.event)==Ei.GET_SESSION_INFORMATION){const H=A.value.callback;T(H)}if((A==null?void 0:A.event)==Ei.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)==Ei.LOAD_CONVERSATION){const H=A.value;if(!H.conversationId)return;y(H,L=>{a(),L.forEach(z=>{u(z)})})}};return kk(C),()=>{Pk(C)}},[m,T,y,a,u]),null},pP=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:f})=>x.jsxs(fP,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:o,isDevelopment:a,onConnect:u,onRefinedSearch:l,onRefinedBrowse:d,children:[x.jsx(hP,{}),f]}),mP={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:"Something went wrong. 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 yt(e,t){return t?M(M({},e),t):e}function tE(e){const t=mP;return e?{common:yt(t.common,e.common),controls:yt(t.controls,e.controls),launcher:yt(t.launcher,e.launcher),header:yt(t.header,e.header),loading:yt(t.loading,e.loading),connecting:yt(t.connecting,e.connecting),searchBar:yt(t.searchBar,e.searchBar),imageAttachment:yt(t.imageAttachment,e.imageAttachment),prompts:yt(t.prompts,e.prompts),entryMessage:yt(t.entryMessage,e.entryMessage),messages:yt(t.messages,e.messages),userQuery:yt(t.userQuery,e.userQuery),product:yt(t.product,e.product),productComparison:yt(t.productComparison,e.productComparison),productGallery:yt(t.productGallery,e.productGallery),carousel:yt(t.carousel,e.carousel),price:yt(t.price,e.price),cart:yt(t.cart,e.cart),orderConfirmation:yt(t.orderConfirmation,e.orderConfirmation),payment:yt(t.payment,e.payment),jumpToLatest:yt(t.jumpToLatest,e.jumpToLatest),attachment:yt(t.attachment,e.attachment),announcements:yt(t.announcements,e.announcements),pageContext:yt(t.pageContext,e.pageContext),errors:yt(t.errors,e.errors),session:yt(t.session,e.session)}:t}const nE=I.createContext(null),gP=({translations:e,children:t})=>{const n=I.useMemo(()=>tE(e),[e]);return x.jsx(nE.Provider,{value:n,children:t})},Or=()=>{const e=I.useContext(nE);return e||tE(void 0)};function EP(e,t){return e.replace(/\{(\w+)\}/g,(n,r)=>{const o=t[r];return o!=null?String(o):n})}const yP=({children:e,dispatch:t})=>{const n=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_INITIALIZED,payload:w})},[t]),r=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_OPEN,payload:w})},[t]),o=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_INLINE,payload:w})},[t]),a=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:w})},[t]),u=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:w})},[t]),l=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:w})},[t]),d=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:w})},[t]),f=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_PARAMS,payload:w})},[t]),p=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:w})},[t]),m=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:w})},[t]),T=I.useCallback(w=>{t({type:Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:w})},[t]),y=I.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})},bP=(e,t)=>{const{type:n,payload:r}=t;switch(n){case Et.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case Et.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case Et.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case Et.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case Et.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case Et.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case Et.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case Et.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case Et.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case Et.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case Et.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case Et.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case Et.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},TP=({promptsConfig:e,children:t})=>{const[n,r]=p0(bP,ge(M(M({},C0),e||{}),{staticQuestions:n0((e==null?void 0:e.staticQuestions)||[])}));return x.jsx(Q1.Provider,{value:n,children:x.jsx(yP,{dispatch:r,children:t})})},rE=({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:te,searchConfig:he,suggestionButtonConfig:q,messageAlignment:re,autoScroll:de,promptsConfig:ye,resetConversationMessage:ee,conversationHistory:oe,onConnect:Ae,onCopilotEvent:ae,onRefinedSearch:J,onRefinedBrowse:se,translations:k,__features:F,children:K})=>{const O=_==null?void 0:_.params;return x.jsx(gP,{translations:k,children:x.jsx(ok,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:o,tenantId:a,logoUrl:u,headerText:l,headerConfig:d,entryMessage:C,staticQuestions:n0(O==null?void 0:O.staticQuestions),staticQuestionsStrategy:O==null?void 0:O.staticQuestionsStrategy,theme:f,globalClassName:T,openLinksInNewTab:p,onNavigate:m,searchPlaceholder:z,searchButtonLabel:te,searchConfig:he,suggestionButtonConfig:q,messageAlignment:re,autoScroll:de,componentConfig:v,clientContext:U,baseCatalogParams:L,disclaimerMarkdown:H,disclaimerText:A,resetConversationMessage:ee,conversationHistory:oe,isDevelopment:y,__features:F,children:x.jsx(lP,{entryType:P!=null?P:_==null?void 0:_.type,componentConfig:v,componentType:w,children:x.jsx(gk,{onCopilotEvent:ae,children:x.jsx(aP,{children:x.jsx(tP,{children:x.jsx(iP,{children:x.jsx(TP,{promptsConfig:ye,children:x.jsx(pP,{apiKey:t,apiToken:n,baseUrl:r,customerId:o,tenantId:a,isDevelopment:y,entryType:P,onConnect:Ae,onRefinedSearch:J,onRefinedBrowse:se,onCopilotEvent:ae,children:K})})})})})})})})})};var Wf={exports:{}},Wn={},Gf={exports:{}},Xf={};var iE;function wP(){return iE||(iE=1,(function(e){function t(J,se){var k=J.length;J.push(se);e:for(;0<k;){var F=k-1>>>1,K=J[F];if(0<o(K,se))J[F]=se,J[k]=K,k=F;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var se=J[0],k=J.pop();if(k!==se){J[0]=k;e:for(var F=0,K=J.length,O=K>>>1;F<O;){var ce=2*(F+1)-1,we=J[ce],Ce=ce+1,xe=J[Ce];if(0>o(we,k))Ce<K&&0>o(xe,we)?(J[F]=xe,J[Ce]=k,F=Ce):(J[F]=we,J[ce]=k,F=ce);else if(Ce<K&&0>o(xe,k))J[F]=xe,J[Ce]=k,F=Ce;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,Ae(U);else{var se=n(f);se!==null&&ae(H,se.startTime-J)}}function U(J,se){w=!1,v&&(v=!1,_(te),te=-1),y=!0;var k=T;try{for(A(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!re());){var F=m.callback;if(typeof F=="function"){m.callback=null,T=m.priorityLevel;var K=F(m.expirationTime<=se);se=e.unstable_now(),typeof K=="function"?m.callback=K:m===n(d)&&r(d),A(se)}else r(d);m=n(d)}if(m!==null)var O=!0;else{var ce=n(f);ce!==null&&ae(H,ce.startTime-se),O=!1}return O}finally{m=null,T=k,y=!1}}var L=!1,z=null,te=-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 ee=new MessageChannel,oe=ee.port2;ee.port1.onmessage=de,ye=function(){oe.postMessage(null)}}else ye=function(){P(de,0)};function Ae(J){z=J,L||(L=!0,ye())}function ae(J,se){te=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,Ae(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 F=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?F+k:F):k=F,J){case 1:var K=-1;break;case 2:K=250;break;case 5:K=1073741823;break;case 4:K=1e4;break;default:K=5e3}return K=k+K,J={id:p++,callback:se,priorityLevel:J,startTime:k,expirationTime:K,sortIndex:-1},k>F?(J.sortIndex=k,t(f,J),n(d)===null&&J===n(f)&&(v?(_(te),te=-1):v=!0,ae(H,k-F))):(J.sortIndex=K,t(d,J),w||y||(w=!0,Ae(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 oE;function xP(){return oE||(oE=1,Gf.exports=wP()),Gf.exports}var sE;function _P(){if(sE)return Wn;sE=1;var e=kr(),t=xP();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"),te=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"),ee=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),Ae=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,F;function K(i){if(F===void 0)try{throw Error()}catch(c){var s=c.stack.trim().match(/\n( *(at )?)/);F=s&&s[1]||""}return`
|
|
11
|
+
`+F+i}var O=!1;function ce(i,s){if(!i||O)return"";O=!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(`
|
|
12
12
|
`),b=h.stack.split(`
|
|
13
|
-
`),S=E.length-1,
|
|
14
|
-
`+E[S].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=S&&0<=L);break}}}finally{I=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function Me(i){switch(i.tag){case 5:return K(i.type);case 16:return K("Lazy");case 13:return K("Suspense");case 19:return K("SuspenseList");case 0:case 2:case 15:return i=Se(i.type,!1),i;case 11:return i=Se(i.type.render,!1),i;case 1:return i=Se(i.type,!0),i;default:return""}}function ke(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case $:return"Fragment";case R:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case we:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ie:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case fe:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return s=i.displayName||null,s!==null?s:ke(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return ke(i(s))}catch(c){}}return null}function be(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ke(s);case 8:return s===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof s=="function")return s.displayName||s.name||null;if(typeof s=="string")return s}return null}function Ie(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ue(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function lt(i){var s=Ue(i)?"checked":"value",c=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof c!="undefined"&&typeof c.get=="function"&&typeof c.set=="function"){var E=c.get,b=c.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return E.call(this)},set:function(S){h=""+S,b.call(this,S)}}),Object.defineProperty(i,s,{enumerable:c.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function cn(i){i._valueTracker||(i._valueTracker=lt(i))}function Lt(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var c=s.getValue(),h="";return i&&(h=Ue(i)?i.checked?"true":"false":i.value),i=h,i!==c?(s.setValue(i),!0):!1}function $t(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Pt(i,s){var c=s.checked;return k({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:c!=null?c:i._wrapperState.initialChecked})}function Qn(i,s){var c=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;c=Ie(s.value!=null?s.value:c),i._wrapperState={initialChecked:h,initialValue:c,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function _n(i,s){s=s.checked,s!=null&&A(i,"checked",s,!1)}function Gt(i,s){_n(i,s);var c=Ie(s.value),h=s.type;if(c!=null)h==="number"?(c===0&&i.value===""||i.value!=c)&&(i.value=""+c):i.value!==""+c&&(i.value=""+c);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?bt(i,s.type,c):s.hasOwnProperty("defaultValue")&&bt(i,s.type,Ie(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function qe(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||$t(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Vt=Array.isArray;function xe(i,s,c,h){if(i=i.options,s){s={};for(var E=0;E<c.length;E++)s["$"+c[E]]=!0;for(c=0;c<i.length;c++)E=s.hasOwnProperty("$"+i[c].value),i[c].selected!==E&&(i[c].selected=E),E&&h&&(i[c].defaultSelected=!0)}else{for(c=""+Ie(c),s=null,E=0;E<i.length;E++){if(i[E].value===c){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}s!==null||i[E].disabled||(s=i[E])}s!==null&&(s.selected=!0)}}function Le(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Be(i,s){var c=s.value;if(c==null){if(c=s.children,s=s.defaultValue,c!=null){if(s!=null)throw Error(n(92));if(Vt(c)){if(1<c.length)throw Error(n(93));c=c[0]}s=c}s==null&&(s=""),c=s}i._wrapperState={initialValue:Ie(c)}}function Xe(i,s){var c=Ie(s.value),h=Ie(s.defaultValue);c!=null&&(c=""+c,c!==i.value&&(i.value=c),s.defaultValue==null&&i.defaultValue!==c&&(i.defaultValue=c)),h!=null&&(i.defaultValue=""+h)}function gt(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function Z(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?Z(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ye=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,c,h,E){MSApp.execUnsafeLocalFunction(function(){return i(s,c,h,E)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function Re(i,s){if(s){var c=i.firstChild;if(c&&c===i.lastChild&&c.nodeType===3){c.nodeValue=s;return}}i.textContent=s}var ct={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},Xt=["Webkit","ms","Moz","O"];Object.keys(ct).forEach(function(i){Xt.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),ct[s]=ct[i]})});function qt(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||ct.hasOwnProperty(i)&&ct[i]?(""+s).trim():s+"px"}function dn(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=qt(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var qr=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function fn(i,s){if(s){if(qr[i]&&(s.children!=null||s.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(s.dangerouslySetInnerHTML!=null){if(s.children!=null)throw Error(n(60));if(typeof s.dangerouslySetInnerHTML!="object"||!("__html"in s.dangerouslySetInnerHTML))throw Error(n(61))}if(s.style!=null&&typeof s.style!="object")throw Error(n(62))}}function Yr(i,s){if(i.indexOf("-")===-1)return typeof s.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Jn=null;function Rp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Lp=null,Os=null,Is=null;function v_(i){if(i=ku(i)){if(typeof Lp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Vc(s),Lp(i.stateNode,i.type,s))}}function A_(i){Os?Is?Is.push(i):Is=[i]:Os=i}function C_(){if(Os){var i=Os,s=Is;if(Is=Os=null,v_(i),s)for(i=0;i<s.length;i++)v_(s[i])}}function k_(i,s){return i(s)}function N_(){}var Dp=!1;function P_(i,s,c){if(Dp)return i(s,c);Dp=!0;try{return k_(i,s,c)}finally{Dp=!1,(Os!==null||Is!==null)&&(N_(),C_())}}function au(i,s){var c=i.stateNode;if(c===null)return null;var h=Vc(c);if(h===null)return null;c=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(c&&typeof c!="function")throw Error(n(231,s,typeof c));return c}var Mp=!1;if(l)try{var uu={};Object.defineProperty(uu,"passive",{get:function(){Mp=!0}}),window.addEventListener("test",uu,uu),window.removeEventListener("test",uu,uu)}catch(i){Mp=!1}function V7(i,s,c,h,E,b,S,L,H){var ee=Array.prototype.slice.call(arguments,3);try{s.apply(c,ee)}catch(ce){this.onError(ce)}}var lu=!1,_c=null,xc=!1,Fp=null,q7={onError:function(i){lu=!0,_c=i}};function Y7(i,s,c,h,E,b,S,L,H){lu=!1,_c=null,V7.apply(q7,arguments)}function W7(i,s,c,h,E,b,S,L,H){if(Y7.apply(this,arguments),lu){if(lu){var ee=_c;lu=!1,_c=null}else throw Error(n(198));xc||(xc=!0,Fp=ee)}}function Oo(i){var s=i,c=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(c=s.return),i=s.return;while(i)}return s.tag===3?c:null}function O_(i){if(i.tag===13){var s=i.memoizedState;if(s===null&&(i=i.alternate,i!==null&&(s=i.memoizedState)),s!==null)return s.dehydrated}return null}function I_(i){if(Oo(i)!==i)throw Error(n(188))}function G7(i){var s=i.alternate;if(!s){if(s=Oo(i),s===null)throw Error(n(188));return s!==i?null:i}for(var c=i,h=s;;){var E=c.return;if(E===null)break;var b=E.alternate;if(b===null){if(h=E.return,h!==null){c=h;continue}break}if(E.child===b.child){for(b=E.child;b;){if(b===c)return I_(E),i;if(b===h)return I_(E),s;b=b.sibling}throw Error(n(188))}if(c.return!==h.return)c=E,h=b;else{for(var S=!1,L=E.child;L;){if(L===c){S=!0,c=E,h=b;break}if(L===h){S=!0,h=E,c=b;break}L=L.sibling}if(!S){for(L=b.child;L;){if(L===c){S=!0,c=b,h=E;break}if(L===h){S=!0,h=b,c=E;break}L=L.sibling}if(!S)throw Error(n(189))}}if(c.alternate!==h)throw Error(n(190))}if(c.tag!==3)throw Error(n(188));return c.stateNode.current===c?i:s}function R_(i){return i=G7(i),i!==null?L_(i):null}function L_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=L_(i);if(s!==null)return s;i=i.sibling}return null}var D_=t.unstable_scheduleCallback,M_=t.unstable_cancelCallback,X7=t.unstable_shouldYield,K7=t.unstable_requestPaint,Bt=t.unstable_now,Q7=t.unstable_getCurrentPriorityLevel,Bp=t.unstable_ImmediatePriority,F_=t.unstable_UserBlockingPriority,Sc=t.unstable_NormalPriority,J7=t.unstable_LowPriority,B_=t.unstable_IdlePriority,vc=null,Wr=null;function Z7(i){if(Wr&&typeof Wr.onCommitFiberRoot=="function")try{Wr.onCommitFiberRoot(vc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var xr=Math.clz32?Math.clz32:nB,eB=Math.log,tB=Math.LN2;function nB(i){return i>>>=0,i===0?32:31-(eB(i)/tB|0)|0}var Ac=64,Cc=4194304;function cu(i){switch(i&-i){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return i&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return i&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return i}}function kc(i,s){var c=i.pendingLanes;if(c===0)return 0;var h=0,E=i.suspendedLanes,b=i.pingedLanes,S=c&268435455;if(S!==0){var L=S&~E;L!==0?h=cu(L):(b&=S,b!==0&&(h=cu(b)))}else S=c&~E,S!==0?h=cu(S):b!==0&&(h=cu(b));if(h===0)return 0;if(s!==0&&s!==h&&(s&E)===0&&(E=h&-h,b=s&-s,E>=b||E===16&&(b&4194240)!==0))return s;if((h&4)!==0&&(h|=c&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)c=31-xr(s),E=1<<c,h|=i[c],s&=~E;return h}function rB(i,s){switch(i){case 1:case 2:case 4:return s+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return s+5e3;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return-1;case 134217728:case 268435456:case 536870912:case 1073741824:return-1;default:return-1}}function iB(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-xr(b),L=1<<S,H=E[S];H===-1?((L&c)===0||(L&h)!==0)&&(E[S]=rB(L,s)):H<=s&&(i.expiredLanes|=L),b&=~L}}function Up(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function U_(){var i=Ac;return Ac<<=1,(Ac&4194240)===0&&(Ac=64),i}function Hp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function du(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-xr(s),i[s]=c}function oB(i,s){var c=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<c;){var E=31-xr(c),b=1<<E;s[E]=0,h[E]=-1,i[E]=-1,c&=~b}}function zp(i,s){var c=i.entangledLanes|=s;for(i=i.entanglements;c;){var h=31-xr(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function H_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var z_,jp,j_,$_,V_,$p=!1,Nc=[],Li=null,Di=null,Mi=null,fu=new Map,hu=new Map,Fi=[],sB="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function q_(i,s){switch(i){case"focusin":case"focusout":Li=null;break;case"dragenter":case"dragleave":Di=null;break;case"mouseover":case"mouseout":Mi=null;break;case"pointerover":case"pointerout":fu.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":hu.delete(s.pointerId)}}function pu(i,s,c,h,E,b){return i===null||i.nativeEvent!==b?(i={blockedOn:s,domEventName:c,eventSystemFlags:h,nativeEvent:b,targetContainers:[E]},s!==null&&(s=ku(s),s!==null&&jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function aB(i,s,c,h,E){switch(s){case"focusin":return Li=pu(Li,i,s,c,h,E),!0;case"dragenter":return Di=pu(Di,i,s,c,h,E),!0;case"mouseover":return Mi=pu(Mi,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return fu.set(b,pu(fu.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,hu.set(b,pu(hu.get(b)||null,i,s,c,h,E)),!0}return!1}function Y_(i){var s=Io(i.target);if(s!==null){var c=Oo(s);if(c!==null){if(s=c.tag,s===13){if(s=O_(c),s!==null){i.blockedOn=s,V_(i.priority,function(){j_(c)});return}}else if(s===3&&c.stateNode.current.memoizedState.isDehydrated){i.blockedOn=c.tag===3?c.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Pc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var c=qp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(c===null){c=i.nativeEvent;var h=new c.constructor(c.type,c);Jn=h,c.target.dispatchEvent(h),Jn=null}else return s=ku(c),s!==null&&jp(s),i.blockedOn=c,!1;s.shift()}return!0}function W_(i,s,c){Pc(i)&&c.delete(s)}function uB(){$p=!1,Li!==null&&Pc(Li)&&(Li=null),Di!==null&&Pc(Di)&&(Di=null),Mi!==null&&Pc(Mi)&&(Mi=null),fu.forEach(W_),hu.forEach(W_)}function mu(i,s){i.blockedOn===s&&(i.blockedOn=null,$p||($p=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,uB)))}function gu(i){function s(E){return mu(E,i)}if(0<Nc.length){mu(Nc[0],i);for(var c=1;c<Nc.length;c++){var h=Nc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Li!==null&&mu(Li,i),Di!==null&&mu(Di,i),Mi!==null&&mu(Mi,i),fu.forEach(s),hu.forEach(s),c=0;c<Fi.length;c++)h=Fi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Fi.length&&(c=Fi[0],c.blockedOn===null);)Y_(c),c.blockedOn===null&&Fi.shift()}var Rs=U.ReactCurrentBatchConfig,Oc=!0;function lB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=1,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function cB(i,s,c,h){var E=dt,b=Rs.transition;Rs.transition=null;try{dt=4,Vp(i,s,c,h)}finally{dt=E,Rs.transition=b}}function Vp(i,s,c,h){if(Oc){var E=qp(i,s,c,h);if(E===null)um(i,s,h,Ic,c),q_(i,h);else if(aB(E,i,s,c,h))h.stopPropagation();else if(q_(i,h),s&4&&-1<sB.indexOf(i)){for(;E!==null;){var b=ku(E);if(b!==null&&z_(b),b=qp(i,s,c,h),b===null&&um(i,s,h,Ic,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else um(i,s,h,null,c)}}var Ic=null;function qp(i,s,c,h){if(Ic=null,i=Rp(h),i=Io(i),i!==null)if(s=Oo(i),s===null)i=null;else if(c=s.tag,c===13){if(i=O_(s),i!==null)return i;i=null}else if(c===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return Ic=i,null}function G_(i){switch(i){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Q7()){case Bp:return 1;case F_:return 4;case Sc:case J7:return 16;case B_:return 536870912;default:return 16}default:return 16}}var Bi=null,Yp=null,Rc=null;function X_(){if(Rc)return Rc;var i,s=Yp,c=s.length,h,E="value"in Bi?Bi.value:Bi.textContent,b=E.length;for(i=0;i<c&&s[i]===E[i];i++);var S=c-i;for(h=1;h<=S&&s[c-h]===E[b-h];h++);return Rc=E.slice(i,1<h?1-h:void 0)}function Lc(i){var s=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&s===13&&(i=13)):i=s,i===10&&(i=13),32<=i||i===13?i:0}function Dc(){return!0}function K_(){return!1}function Zn(i){function s(c,h,E,b,S){this._reactName=c,this._targetInst=E,this.type=h,this.nativeEvent=b,this.target=S,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(c=i[L],this[L]=c?c(b):b[L]);return this.isDefaultPrevented=(b.defaultPrevented!=null?b.defaultPrevented:b.returnValue===!1)?Dc:K_,this.isPropagationStopped=K_,this}return k(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var c=this.nativeEvent;c&&(c.preventDefault?c.preventDefault():typeof c.returnValue!="unknown"&&(c.returnValue=!1),this.isDefaultPrevented=Dc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Dc)},persist:function(){},isPersistent:Dc}),s}var Ls={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Wp=Zn(Ls),Eu=k({},Ls,{view:0,detail:0}),dB=Zn(Eu),Gp,Xp,yu,Mc=k({},Eu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Qp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==yu&&(yu&&i.type==="mousemove"?(Gp=i.screenX-yu.screenX,Xp=i.screenY-yu.screenY):Xp=Gp=0,yu=i),Gp)},movementY:function(i){return"movementY"in i?i.movementY:Xp}}),Q_=Zn(Mc),fB=k({},Mc,{dataTransfer:0}),hB=Zn(fB),pB=k({},Eu,{relatedTarget:0}),Kp=Zn(pB),mB=k({},Ls,{animationName:0,elapsedTime:0,pseudoElement:0}),gB=Zn(mB),EB=k({},Ls,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),yB=Zn(EB),bB=k({},Ls,{data:0}),J_=Zn(bB),TB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wB={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},_B={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function xB(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=_B[i])?!!s[i]:!1}function Qp(){return xB}var SB=k({},Eu,{key:function(i){if(i.key){var s=TB[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Lc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?wB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Qp,charCode:function(i){return i.type==="keypress"?Lc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Lc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),vB=Zn(SB),AB=k({},Mc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),Z_=Zn(AB),CB=k({},Eu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Qp}),kB=Zn(CB),NB=k({},Ls,{propertyName:0,elapsedTime:0,pseudoElement:0}),PB=Zn(NB),OB=k({},Mc,{deltaX:function(i){return"deltaX"in i?i.deltaX:"wheelDeltaX"in i?-i.wheelDeltaX:0},deltaY:function(i){return"deltaY"in i?i.deltaY:"wheelDeltaY"in i?-i.wheelDeltaY:"wheelDelta"in i?-i.wheelDelta:0},deltaZ:0,deltaMode:0}),IB=Zn(OB),RB=[9,13,27,32],Jp=l&&"CompositionEvent"in window,bu=null;l&&"documentMode"in document&&(bu=document.documentMode);var LB=l&&"TextEvent"in window&&!bu,ex=l&&(!Jp||bu&&8<bu&&11>=bu),tx=" ",nx=!1;function rx(i,s){switch(i){case"keyup":return RB.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function ix(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Ds=!1;function DB(i,s){switch(i){case"compositionend":return ix(s);case"keypress":return s.which!==32?null:(nx=!0,tx);case"textInput":return i=s.data,i===tx&&nx?null:i;default:return null}}function MB(i,s){if(Ds)return i==="compositionend"||!Jp&&rx(i,s)?(i=X_(),Rc=Yp=Bi=null,Ds=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(s.ctrlKey||s.altKey||s.metaKey)||s.ctrlKey&&s.altKey){if(s.char&&1<s.char.length)return s.char;if(s.which)return String.fromCharCode(s.which)}return null;case"compositionend":return ex&&s.locale!=="ko"?null:s.data;default:return null}}var FB={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function ox(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!FB[i.type]:s==="textarea"}function sx(i,s,c,h){A_(h),s=zc(s,"onChange"),0<s.length&&(c=new Wp("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Tu=null,wu=null;function BB(i){Sx(i,0)}function Fc(i){var s=Hs(i);if(Lt(s))return i}function UB(i,s){if(i==="change")return s}var ax=!1;if(l){var Zp;if(l){var em="oninput"in document;if(!em){var ux=document.createElement("div");ux.setAttribute("oninput","return;"),em=typeof ux.oninput=="function"}Zp=em}else Zp=!1;ax=Zp&&(!document.documentMode||9<document.documentMode)}function lx(){Tu&&(Tu.detachEvent("onpropertychange",cx),wu=Tu=null)}function cx(i){if(i.propertyName==="value"&&Fc(wu)){var s=[];sx(s,wu,i,Rp(i)),P_(BB,s)}}function HB(i,s,c){i==="focusin"?(lx(),Tu=s,wu=c,Tu.attachEvent("onpropertychange",cx)):i==="focusout"&&lx()}function zB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Fc(wu)}function jB(i,s){if(i==="click")return Fc(s)}function $B(i,s){if(i==="input"||i==="change")return Fc(s)}function VB(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Sr=typeof Object.is=="function"?Object.is:VB;function _u(i,s){if(Sr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var c=Object.keys(i),h=Object.keys(s);if(c.length!==h.length)return!1;for(h=0;h<c.length;h++){var E=c[h];if(!d.call(s,E)||!Sr(i[E],s[E]))return!1}return!0}function dx(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function fx(i,s){var c=dx(i);i=0;for(var h;c;){if(c.nodeType===3){if(h=i+c.textContent.length,i<=s&&h>=s)return{node:c,offset:s-i};i=h}e:{for(;c;){if(c.nextSibling){c=c.nextSibling;break e}c=c.parentNode}c=void 0}c=dx(c)}}function hx(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?hx(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function px(){for(var i=window,s=$t();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=$t(i.document)}return s}function tm(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s&&(s==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||s==="textarea"||i.contentEditable==="true")}function qB(i){var s=px(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&hx(c.ownerDocument.documentElement,c)){if(h!==null&&tm(c)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in c)c.selectionStart=s,c.selectionEnd=Math.min(i,c.value.length);else if(i=(s=c.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var E=c.textContent.length,b=Math.min(h.start,E);h=h.end===void 0?b:Math.min(h.end,E),!i.extend&&b>h&&(E=h,h=b,b=E),E=fx(c,b);var S=fx(c,h);E&&S&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(E.node,E.offset),i.removeAllRanges(),b>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=c;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof c.focus=="function"&&c.focus(),c=0;c<s.length;c++)i=s[c],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var YB=l&&"documentMode"in document&&11>=document.documentMode,Ms=null,nm=null,xu=null,rm=!1;function mx(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;rm||Ms==null||Ms!==$t(h)||(h=Ms,"selectionStart"in h&&tm(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),xu&&_u(xu,h)||(xu=h,h=zc(nm,"onSelect"),0<h.length&&(s=new Wp("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ms)))}function Bc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Fs={animationend:Bc("Animation","AnimationEnd"),animationiteration:Bc("Animation","AnimationIteration"),animationstart:Bc("Animation","AnimationStart"),transitionend:Bc("Transition","TransitionEnd")},im={},gx={};l&&(gx=document.createElement("div").style,"AnimationEvent"in window||(delete Fs.animationend.animation,delete Fs.animationiteration.animation,delete Fs.animationstart.animation),"TransitionEvent"in window||delete Fs.transitionend.transition);function Uc(i){if(im[i])return im[i];if(!Fs[i])return i;var s=Fs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in gx)return im[i]=s[c];return i}var Ex=Uc("animationend"),yx=Uc("animationiteration"),bx=Uc("animationstart"),Tx=Uc("transitionend"),wx=new Map,_x="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Ui(i,s){wx.set(i,s),a(s,[i])}for(var om=0;om<_x.length;om++){var sm=_x[om],WB=sm.toLowerCase(),GB=sm[0].toUpperCase()+sm.slice(1);Ui(WB,"on"+GB)}Ui(Ex,"onAnimationEnd"),Ui(yx,"onAnimationIteration"),Ui(bx,"onAnimationStart"),Ui("dblclick","onDoubleClick"),Ui("focusin","onFocus"),Ui("focusout","onBlur"),Ui(Tx,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Su="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),XB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Su));function xx(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,W7(h,s,void 0,i),i.currentTarget=null}function Sx(i,s){s=(s&4)!==0;for(var c=0;c<i.length;c++){var h=i[c],E=h.event;h=h.listeners;e:{var b=void 0;if(s)for(var S=h.length-1;0<=S;S--){var L=h[S],H=L.instance,ee=L.currentTarget;if(L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}else for(S=0;S<h.length;S++){if(L=h[S],H=L.instance,ee=L.currentTarget,L=L.listener,H!==b&&E.isPropagationStopped())break e;xx(E,L,ee),b=H}}}if(xc)throw i=Fp,xc=!1,Fp=null,i}function St(i,s){var c=s[pm];c===void 0&&(c=s[pm]=new Set);var h=i+"__bubble";c.has(h)||(vx(s,i,2,!1),c.add(h))}function am(i,s,c){var h=0;s&&(h|=4),vx(c,i,h,s)}var Hc="_reactListening"+Math.random().toString(36).slice(2);function vu(i){if(!i[Hc]){i[Hc]=!0,r.forEach(function(c){c!=="selectionchange"&&(XB.has(c)||am(c,!1,i),am(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Hc]||(s[Hc]=!0,am("selectionchange",!1,s))}}function vx(i,s,c,h){switch(G_(s)){case 1:var E=lB;break;case 4:E=cB;break;default:E=Vp}c=E.bind(null,s,c,i),E=void 0,!Mp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(s,c,{capture:!0,passive:E}):i.addEventListener(s,c,!0):E!==void 0?i.addEventListener(s,c,{passive:E}):i.addEventListener(s,c,!1)}function um(i,s,c,h,E){var b=h;if((s&1)===0&&(s&2)===0&&h!==null)e:for(;;){if(h===null)return;var S=h.tag;if(S===3||S===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(S===4)for(S=h.return;S!==null;){var H=S.tag;if((H===3||H===4)&&(H=S.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;S=S.return}for(;L!==null;){if(S=Io(L),S===null)return;if(H=S.tag,H===5||H===6){h=b=S;continue e}L=L.parentNode}}h=h.return}P_(function(){var ee=b,ce=Rp(c),pe=[];e:{var ue=wx.get(i);if(ue!==void 0){var ve=Wp,Pe=i;switch(i){case"keypress":if(Lc(c)===0)break e;case"keydown":case"keyup":ve=vB;break;case"focusin":Pe="focus",ve=Kp;break;case"focusout":Pe="blur",ve=Kp;break;case"beforeblur":case"afterblur":ve=Kp;break;case"click":if(c.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":ve=Q_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ve=hB;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ve=kB;break;case Ex:case yx:case bx:ve=gB;break;case Tx:ve=PB;break;case"scroll":ve=dB;break;case"wheel":ve=IB;break;case"copy":case"cut":case"paste":ve=yB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ve=Z_}var Oe=(s&4)!==0,Ut=!Oe&&i==="scroll",G=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var q=ee,Q;q!==null;){Q=q;var ye=Q.stateNode;if(Q.tag===5&&ye!==null&&(Q=ye,G!==null&&(ye=au(q,G),ye!=null&&Oe.push(Au(q,ye,Q)))),Ut)break;q=q.return}0<Oe.length&&(ue=new ve(ue,Pe,null,c,ce),pe.push({event:ue,listeners:Oe}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",ve=i==="mouseout"||i==="pointerout",ue&&c!==Jn&&(Pe=c.relatedTarget||c.fromElement)&&(Io(Pe)||Pe[fi]))break e;if((ve||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,ve?(Pe=c.relatedTarget||c.toElement,ve=ee,Pe=Pe?Io(Pe):null,Pe!==null&&(Ut=Oo(Pe),Pe!==Ut||Pe.tag!==5&&Pe.tag!==6)&&(Pe=null)):(ve=null,Pe=ee),ve!==Pe)){if(Oe=Q_,ye="onMouseLeave",G="onMouseEnter",q="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=Z_,ye="onPointerLeave",G="onPointerEnter",q="pointer"),Ut=ve==null?ue:Hs(ve),Q=Pe==null?ue:Hs(Pe),ue=new Oe(ye,q+"leave",ve,c,ce),ue.target=Ut,ue.relatedTarget=Q,ye=null,Io(ce)===ee&&(Oe=new Oe(G,q+"enter",Pe,c,ce),Oe.target=Q,Oe.relatedTarget=Ut,ye=Oe),Ut=ye,ve&&Pe)t:{for(Oe=ve,G=Pe,q=0,Q=Oe;Q;Q=Bs(Q))q++;for(Q=0,ye=G;ye;ye=Bs(ye))Q++;for(;0<q-Q;)Oe=Bs(Oe),q--;for(;0<Q-q;)G=Bs(G),Q--;for(;q--;){if(Oe===G||G!==null&&Oe===G.alternate)break t;Oe=Bs(Oe),G=Bs(G)}Oe=null}else Oe=null;ve!==null&&Ax(pe,ue,ve,Oe,!1),Pe!==null&&Ut!==null&&Ax(pe,Ut,Pe,Oe,!0)}}e:{if(ue=ee?Hs(ee):window,ve=ue.nodeName&&ue.nodeName.toLowerCase(),ve==="select"||ve==="input"&&ue.type==="file")var De=UB;else if(ox(ue))if(ax)De=$B;else{De=zB;var je=HB}else(ve=ue.nodeName)&&ve.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=jB);if(De&&(De=De(i,ee))){sx(pe,De,c,ce);break e}je&&je(i,ue,ee),i==="focusout"&&(je=ue._wrapperState)&&je.controlled&&ue.type==="number"&&bt(ue,"number",ue.value)}switch(je=ee?Hs(ee):window,i){case"focusin":(ox(je)||je.contentEditable==="true")&&(Ms=je,nm=ee,xu=null);break;case"focusout":xu=nm=Ms=null;break;case"mousedown":rm=!0;break;case"contextmenu":case"mouseup":case"dragend":rm=!1,mx(pe,c,ce);break;case"selectionchange":if(YB)break;case"keydown":case"keyup":mx(pe,c,ce)}var $e;if(Jp)e:{switch(i){case"compositionstart":var We="onCompositionStart";break e;case"compositionend":We="onCompositionEnd";break e;case"compositionupdate":We="onCompositionUpdate";break e}We=void 0}else Ds?rx(i,c)&&(We="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(We="onCompositionStart");We&&(ex&&c.locale!=="ko"&&(Ds||We!=="onCompositionStart"?We==="onCompositionEnd"&&Ds&&($e=X_()):(Bi=ce,Yp="value"in Bi?Bi.value:Bi.textContent,Ds=!0)),je=zc(ee,We),0<je.length&&(We=new J_(We,i,null,c,ce),pe.push({event:We,listeners:je}),$e?We.data=$e:($e=ix(c),$e!==null&&(We.data=$e)))),($e=LB?DB(i,c):MB(i,c))&&(ee=zc(ee,"onBeforeInput"),0<ee.length&&(ce=new J_("onBeforeInput","beforeinput",null,c,ce),pe.push({event:ce,listeners:ee}),ce.data=$e))}Sx(pe,s)})}function Au(i,s,c){return{instance:i,listener:s,currentTarget:c}}function zc(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=au(i,c),b!=null&&h.unshift(Au(i,b,E)),b=au(i,s),b!=null&&h.push(Au(i,b,E))),i=i.return}return h}function Bs(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Ax(i,s,c,h,E){for(var b=s._reactName,S=[];c!==null&&c!==h;){var L=c,H=L.alternate,ee=L.stateNode;if(H!==null&&H===h)break;L.tag===5&&ee!==null&&(L=ee,E?(H=au(c,b),H!=null&&S.unshift(Au(c,H,L))):E||(H=au(c,b),H!=null&&S.push(Au(c,H,L)))),c=c.return}S.length!==0&&i.push({event:s,listeners:S})}var KB=/\r\n?/g,QB=/\u0000|\uFFFD/g;function Cx(i){return(typeof i=="string"?i:""+i).replace(KB,`
|
|
15
|
-
`).replace(QB,"")}function jc(i,s,c){if(s=Cx(s),Cx(i)!==s&&c)throw Error(n(425))}function $c(){}var lm=null,cm=null;function dm(i,s){return i==="textarea"||i==="noscript"||typeof s.children=="string"||typeof s.children=="number"||typeof s.dangerouslySetInnerHTML=="object"&&s.dangerouslySetInnerHTML!==null&&s.dangerouslySetInnerHTML.__html!=null}var fm=typeof setTimeout=="function"?setTimeout:void 0,JB=typeof clearTimeout=="function"?clearTimeout:void 0,kx=typeof Promise=="function"?Promise:void 0,ZB=typeof queueMicrotask=="function"?queueMicrotask:typeof kx!="undefined"?function(i){return kx.resolve(null).then(i).catch(eU)}:fm;function eU(i){setTimeout(function(){throw i})}function hm(i,s){var c=s,h=0;do{var E=c.nextSibling;if(i.removeChild(c),E&&E.nodeType===8)if(c=E.data,c==="/$"){if(h===0){i.removeChild(E),gu(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);gu(s)}function Hi(i){for(;i!=null;i=i.nextSibling){var s=i.nodeType;if(s===1||s===3)break;if(s===8){if(s=i.data,s==="$"||s==="$!"||s==="$?")break;if(s==="/$")return null}}return i}function Nx(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="$"||c==="$!"||c==="$?"){if(s===0)return i;s--}else c==="/$"&&s++}i=i.previousSibling}return null}var Us=Math.random().toString(36).slice(2),Gr="__reactFiber$"+Us,Cu="__reactProps$"+Us,fi="__reactContainer$"+Us,pm="__reactEvents$"+Us,tU="__reactListeners$"+Us,nU="__reactHandles$"+Us;function Io(i){var s=i[Gr];if(s)return s;for(var c=i.parentNode;c;){if(s=c[fi]||c[Gr]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=Nx(i);i!==null;){if(c=i[Gr])return c;i=Nx(i)}return s}i=c,c=i.parentNode}return null}function ku(i){return i=i[Gr]||i[fi],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Hs(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Vc(i){return i[Cu]||null}var mm=[],zs=-1;function zi(i){return{current:i}}function vt(i){0>zs||(i.current=mm[zs],mm[zs]=null,zs--)}function Tt(i,s){zs++,mm[zs]=i.current,i.current=s}var ji={},xn=zi(ji),zn=zi(!1),Ro=ji;function js(i,s){var c=i.type.contextTypes;if(!c)return ji;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var E={},b;for(b in c)E[b]=s[b];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=E),E}function jn(i){return i=i.childContextTypes,i!=null}function qc(){vt(zn),vt(xn)}function Px(i,s,c){if(xn.current!==ji)throw Error(n(168));Tt(xn,s),Tt(zn,c)}function Ox(i,s,c){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return c;h=h.getChildContext();for(var E in h)if(!(E in s))throw Error(n(108,be(i)||"Unknown",E));return k({},c,h)}function Yc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||ji,Ro=xn.current,Tt(xn,i),Tt(zn,zn.current),!0}function Ix(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=Ox(i,s,Ro),h.__reactInternalMemoizedMergedChildContext=i,vt(zn),vt(xn),Tt(xn,i)):vt(zn),Tt(zn,c)}var hi=null,Wc=!1,gm=!1;function Rx(i){hi===null?hi=[i]:hi.push(i)}function rU(i){Wc=!0,Rx(i)}function $i(){if(!gm&&hi!==null){gm=!0;var i=0,s=dt;try{var c=hi;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}hi=null,Wc=!1}catch(E){throw hi!==null&&(hi=hi.slice(i+1)),D_(Bp,$i),E}finally{dt=s,gm=!1}}return null}var $s=[],Vs=0,Gc=null,Xc=0,lr=[],cr=0,Lo=null,pi=1,mi="";function Do(i,s){$s[Vs++]=Xc,$s[Vs++]=Gc,Gc=i,Xc=s}function Lx(i,s,c){lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,Lo=i;var h=pi;i=mi;var E=32-xr(h)-1;h&=~(1<<E),c+=1;var b=32-xr(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,pi=1<<32-xr(s)+E|c<<E|h,mi=b+i}else pi=1<<b|c<<E|h,mi=i}function Em(i){i.return!==null&&(Do(i,1),Lx(i,1,0))}function ym(i){for(;i===Gc;)Gc=$s[--Vs],$s[Vs]=null,Xc=$s[--Vs],$s[Vs]=null;for(;i===Lo;)Lo=lr[--cr],lr[cr]=null,mi=lr[--cr],lr[cr]=null,pi=lr[--cr],lr[cr]=null}var er=null,tr=null,kt=!1,vr=null;function Dx(i,s){var c=pr(5,null,null,0);c.elementType="DELETED",c.stateNode=s,c.return=i,s=i.deletions,s===null?(i.deletions=[c],i.flags|=16):s.push(c)}function Mx(i,s){switch(i.tag){case 5:var c=i.type;return s=s.nodeType!==1||c.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,er=i,tr=Hi(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,er=i,tr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Lo!==null?{id:pi,overflow:mi}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=pr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,er=i,tr=null,!0):!1;default:return!1}}function bm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Tm(i){if(kt){var s=tr;if(s){var c=s;if(!Mx(i,s)){if(bm(i))throw Error(n(418));s=Hi(c.nextSibling);var h=er;s&&Mx(i,s)?Dx(h,c):(i.flags=i.flags&-4097|2,kt=!1,er=i)}}else{if(bm(i))throw Error(n(418));i.flags=i.flags&-4097|2,kt=!1,er=i}}}function Fx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;er=i}function Kc(i){if(i!==er)return!1;if(!kt)return Fx(i),kt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!dm(i.type,i.memoizedProps)),s&&(s=tr)){if(bm(i))throw Bx(),Error(n(418));for(;s;)Dx(i,s),s=Hi(s.nextSibling)}if(Fx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var c=i.data;if(c==="/$"){if(s===0){tr=Hi(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}tr=null}}else tr=er?Hi(i.stateNode.nextSibling):null;return!0}function Bx(){for(var i=tr;i;)i=Hi(i.nextSibling)}function qs(){tr=er=null,kt=!1}function wm(i){vr===null?vr=[i]:vr.push(i)}var iU=U.ReactCurrentBatchConfig;function Nu(i,s,c){if(i=c.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(c._owner){if(c=c._owner,c){if(c.tag!==1)throw Error(n(309));var h=c.stateNode}if(!h)throw Error(n(147,i));var E=h,b=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===b?s.ref:(s=function(S){var L=E.refs;S===null?delete L[b]:L[b]=S},s._stringRef=b,s)}if(typeof i!="string")throw Error(n(284));if(!c._owner)throw Error(n(290,i))}return i}function Qc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function Ux(i){var s=i._init;return s(i._payload)}function Hx(i){function s(G,q){if(i){var Q=G.deletions;Q===null?(G.deletions=[q],G.flags|=16):Q.push(q)}}function c(G,q){if(!i)return null;for(;q!==null;)s(G,q),q=q.sibling;return null}function h(G,q){for(G=new Map;q!==null;)q.key!==null?G.set(q.key,q):G.set(q.index,q),q=q.sibling;return G}function E(G,q){return G=Qi(G,q),G.index=0,G.sibling=null,G}function b(G,q,Q){return G.index=Q,i?(Q=G.alternate,Q!==null?(Q=Q.index,Q<q?(G.flags|=2,q):Q):(G.flags|=2,q)):(G.flags|=1048576,q)}function S(G){return i&&G.alternate===null&&(G.flags|=2),G}function L(G,q,Q,ye){return q===null||q.tag!==6?(q=f0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q),q.return=G,q)}function H(G,q,Q,ye){var De=Q.type;return De===$?ce(G,q,Q.props.children,ye,Q.key):q!==null&&(q.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===q.type)?(ye=E(q,Q.props),ye.ref=Nu(G,q,Q),ye.return=G,ye):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,ye)}function ee(G,q,Q,ye){return q===null||q.tag!==4||q.stateNode.containerInfo!==Q.containerInfo||q.stateNode.implementation!==Q.implementation?(q=h0(Q,G.mode,ye),q.return=G,q):(q=E(q,Q.children||[]),q.return=G,q)}function ce(G,q,Q,ye,De){return q===null||q.tag!==7?(q=$o(Q,G.mode,ye,De),q.return=G,q):(q=E(q,Q),q.return=G,q)}function pe(G,q,Q){if(typeof q=="string"&&q!==""||typeof q=="number")return q=f0(""+q,G.mode,Q),q.return=G,q;if(typeof q=="object"&&q!==null){switch(q.$$typeof){case Y:return Q=wd(q.type,q.key,q.props,null,G.mode,Q),Q.ref=Nu(G,null,q),Q.return=G,Q;case R:return q=h0(q,G.mode,Q),q.return=G,q;case Ae:var ye=q._init;return pe(G,ye(q._payload),Q)}if(Vt(q)||ae(q))return q=$o(q,G.mode,Q,null),q.return=G,q;Qc(G,q)}return null}function ue(G,q,Q,ye){var De=q!==null?q.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return De!==null?null:L(G,q,""+Q,ye);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:return Q.key===De?H(G,q,Q,ye):null;case R:return Q.key===De?ee(G,q,Q,ye):null;case Ae:return De=Q._init,ue(G,q,De(Q._payload),ye)}if(Vt(Q)||ae(Q))return De!==null?null:ce(G,q,Q,ye,null);Qc(G,Q)}return null}function ve(G,q,Q,ye,De){if(typeof ye=="string"&&ye!==""||typeof ye=="number")return G=G.get(Q)||null,L(q,G,""+ye,De);if(typeof ye=="object"&&ye!==null){switch(ye.$$typeof){case Y:return G=G.get(ye.key===null?Q:ye.key)||null,H(q,G,ye,De);case R:return G=G.get(ye.key===null?Q:ye.key)||null,ee(q,G,ye,De);case Ae:var je=ye._init;return ve(G,q,Q,je(ye._payload),De)}if(Vt(ye)||ae(ye))return G=G.get(Q)||null,ce(q,G,ye,De,null);Qc(q,ye)}return null}function Pe(G,q,Q,ye){for(var De=null,je=null,$e=q,We=q=0,un=null;$e!==null&&We<Q.length;We++){$e.index>We?(un=$e,$e=null):un=$e.sibling;var st=ue(G,$e,Q[We],ye);if(st===null){$e===null&&($e=un);break}i&&$e&&st.alternate===null&&s(G,$e),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st,$e=un}if(We===Q.length)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;We<Q.length;We++)$e=pe(G,Q[We],ye),$e!==null&&(q=b($e,q,We),je===null?De=$e:je.sibling=$e,je=$e);return kt&&Do(G,We),De}for($e=h(G,$e);We<Q.length;We++)un=ve($e,G,We,Q[We],ye),un!==null&&(i&&un.alternate!==null&&$e.delete(un.key===null?We:un.key),q=b(un,q,We),je===null?De=un:je.sibling=un,je=un);return i&&$e.forEach(function(Ji){return s(G,Ji)}),kt&&Do(G,We),De}function Oe(G,q,Q,ye){var De=ae(Q);if(typeof De!="function")throw Error(n(150));if(Q=De.call(Q),Q==null)throw Error(n(151));for(var je=De=null,$e=q,We=q=0,un=null,st=Q.next();$e!==null&&!st.done;We++,st=Q.next()){$e.index>We?(un=$e,$e=null):un=$e.sibling;var Ji=ue(G,$e,st.value,ye);if(Ji===null){$e===null&&($e=un);break}i&&$e&&Ji.alternate===null&&s(G,$e),q=b(Ji,q,We),je===null?De=Ji:je.sibling=Ji,je=Ji,$e=un}if(st.done)return c(G,$e),kt&&Do(G,We),De;if($e===null){for(;!st.done;We++,st=Q.next())st=pe(G,st.value,ye),st!==null&&(q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return kt&&Do(G,We),De}for($e=h(G,$e);!st.done;We++,st=Q.next())st=ve($e,G,We,st.value,ye),st!==null&&(i&&st.alternate!==null&&$e.delete(st.key===null?We:st.key),q=b(st,q,We),je===null?De=st:je.sibling=st,je=st);return i&&$e.forEach(function(FU){return s(G,FU)}),kt&&Do(G,We),De}function Ut(G,q,Q,ye){if(typeof Q=="object"&&Q!==null&&Q.type===$&&Q.key===null&&(Q=Q.props.children),typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case Y:e:{for(var De=Q.key,je=q;je!==null;){if(je.key===De){if(De=Q.type,De===$){if(je.tag===7){c(G,je.sibling),q=E(je,Q.props.children),q.return=G,G=q;break e}}else if(je.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&Ux(De)===je.type){c(G,je.sibling),q=E(je,Q.props),q.ref=Nu(G,je,Q),q.return=G,G=q;break e}c(G,je);break}else s(G,je);je=je.sibling}Q.type===$?(q=$o(Q.props.children,G.mode,ye,Q.key),q.return=G,G=q):(ye=wd(Q.type,Q.key,Q.props,null,G.mode,ye),ye.ref=Nu(G,q,Q),ye.return=G,G=ye)}return S(G);case R:e:{for(je=Q.key;q!==null;){if(q.key===je)if(q.tag===4&&q.stateNode.containerInfo===Q.containerInfo&&q.stateNode.implementation===Q.implementation){c(G,q.sibling),q=E(q,Q.children||[]),q.return=G,G=q;break e}else{c(G,q);break}else s(G,q);q=q.sibling}q=h0(Q,G.mode,ye),q.return=G,G=q}return S(G);case Ae:return je=Q._init,Ut(G,q,je(Q._payload),ye)}if(Vt(Q))return Pe(G,q,Q,ye);if(ae(Q))return Oe(G,q,Q,ye);Qc(G,Q)}return typeof Q=="string"&&Q!==""||typeof Q=="number"?(Q=""+Q,q!==null&&q.tag===6?(c(G,q.sibling),q=E(q,Q),q.return=G,G=q):(c(G,q),q=f0(Q,G.mode,ye),q.return=G,G=q),S(G)):c(G,q)}return Ut}var Ys=Hx(!0),zx=Hx(!1),Jc=zi(null),Zc=null,Ws=null,_m=null;function xm(){_m=Ws=Zc=null}function Sm(i){var s=Jc.current;vt(Jc),i._currentValue=s}function vm(i,s,c){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===c)break;i=i.return}}function Gs(i,s){Zc=i,_m=Ws=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&($n=!0),i.firstContext=null)}function dr(i){var s=i._currentValue;if(_m!==i)if(i={context:i,memoizedValue:s,next:null},Ws===null){if(Zc===null)throw Error(n(308));Ws=i,Zc.dependencies={lanes:0,firstContext:i}}else Ws=Ws.next=i;return s}var Mo=null;function Am(i){Mo===null?Mo=[i]:Mo.push(i)}function jx(i,s,c,h){var E=s.interleaved;return E===null?(c.next=c,Am(s)):(c.next=E.next,E.next=c),s.interleaved=c,gi(i,h)}function gi(i,s){i.lanes|=s;var c=i.alternate;for(c!==null&&(c.lanes|=s),c=i,i=i.return;i!==null;)i.childLanes|=s,c=i.alternate,c!==null&&(c.childLanes|=s),c=i,i=i.return;return c.tag===3?c.stateNode:null}var Vi=!1;function Cm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function $x(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ei(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function qi(i,s,c){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(ot&2)!==0){var E=h.pending;return E===null?s.next=s:(s.next=E.next,E.next=s),h.pending=s,gi(i,c)}return E=h.interleaved,E===null?(s.next=s,Am(h)):(s.next=E.next,E.next=s),h.interleaved=s,gi(i,c)}function ed(i,s,c){if(s=s.updateQueue,s!==null&&(s=s.shared,(c&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}function Vx(i,s){var c=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,c===h)){var E=null,b=null;if(c=c.firstBaseUpdate,c!==null){do{var S={eventTime:c.eventTime,lane:c.lane,tag:c.tag,payload:c.payload,callback:c.callback,next:null};b===null?E=b=S:b=b.next=S,c=c.next}while(c!==null);b===null?E=b=s:b=b.next=s}else E=b=s;c={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:b,shared:h.shared,effects:h.effects},i.updateQueue=c;return}i=c.lastBaseUpdate,i===null?c.firstBaseUpdate=s:i.next=s,c.lastBaseUpdate=s}function td(i,s,c,h){var E=i.updateQueue;Vi=!1;var b=E.firstBaseUpdate,S=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,ee=H.next;H.next=null,S===null?b=ee:S.next=ee,S=H;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==S&&(L===null?ce.firstBaseUpdate=ee:L.next=ee,ce.lastBaseUpdate=H))}if(b!==null){var pe=E.baseState;S=0,ce=ee=H=null,L=b;do{var ue=L.lane,ve=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:ve,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Pe=i,Oe=L;switch(ue=s,ve=c,Oe.tag){case 1:if(Pe=Oe.payload,typeof Pe=="function"){pe=Pe.call(ve,pe,ue);break e}pe=Pe;break e;case 3:Pe.flags=Pe.flags&-65537|128;case 0:if(Pe=Oe.payload,ue=typeof Pe=="function"?Pe.call(ve,pe,ue):Pe,ue==null)break e;pe=k({},pe,ue);break e;case 2:Vi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else ve={eventTime:ve,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(ee=ce=ve,H=pe):ce=ce.next=ve,S|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=ee,E.lastBaseUpdate=ce,s=E.shared.interleaved,s!==null){E=s;do S|=E.lane,E=E.next;while(E!==s)}else b===null&&(E.shared.lanes=0);Uo|=S,i.lanes=S,i.memoizedState=pe}}function qx(i,s,c){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],E=h.callback;if(E!==null){if(h.callback=null,h=c,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Pu={},Xr=zi(Pu),Ou=zi(Pu),Iu=zi(Pu);function Fo(i){if(i===Pu)throw Error(n(174));return i}function km(i,s){switch(Tt(Iu,s),Tt(Ou,i),Tt(Xr,Pu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:ge(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=ge(s,i)}vt(Xr),Tt(Xr,s)}function Xs(){vt(Xr),vt(Ou),vt(Iu)}function Yx(i){Fo(Iu.current);var s=Fo(Xr.current),c=ge(s,i.type);s!==c&&(Tt(Ou,i),Tt(Xr,c))}function Nm(i){Ou.current===i&&(vt(Xr),vt(Ou))}var Ot=zi(0);function nd(i){for(var s=i;s!==null;){if(s.tag===13){var c=s.memoizedState;if(c!==null&&(c=c.dehydrated,c===null||c.data==="$?"||c.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Pm=[];function Om(){for(var i=0;i<Pm.length;i++)Pm[i]._workInProgressVersionPrimary=null;Pm.length=0}var rd=U.ReactCurrentDispatcher,Im=U.ReactCurrentBatchConfig,Bo=0,It=null,Kt=null,sn=null,id=!1,Ru=!1,Lu=0,oU=0;function Sn(){throw Error(n(321))}function Rm(i,s){if(s===null)return!1;for(var c=0;c<s.length&&c<i.length;c++)if(!Sr(i[c],s[c]))return!1;return!0}function Lm(i,s,c,h,E,b){if(Bo=b,It=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,rd.current=i===null||i.memoizedState===null?lU:cU,i=c(h,E),Ru){b=0;do{if(Ru=!1,Lu=0,25<=b)throw Error(n(301));b+=1,sn=Kt=null,s.updateQueue=null,rd.current=dU,i=c(h,E)}while(Ru)}if(rd.current=ad,s=Kt!==null&&Kt.next!==null,Bo=0,sn=Kt=It=null,id=!1,s)throw Error(n(300));return i}function Dm(){var i=Lu!==0;return Lu=0,i}function Kr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return sn===null?It.memoizedState=sn=i:sn=sn.next=i,sn}function fr(){if(Kt===null){var i=It.alternate;i=i!==null?i.memoizedState:null}else i=Kt.next;var s=sn===null?It.memoizedState:sn.next;if(s!==null)sn=s,Kt=i;else{if(i===null)throw Error(n(310));Kt=i,i={memoizedState:Kt.memoizedState,baseState:Kt.baseState,baseQueue:Kt.baseQueue,queue:Kt.queue,next:null},sn===null?It.memoizedState=sn=i:sn=sn.next=i}return sn}function Du(i,s){return typeof s=="function"?s(i):s}function Mm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=Kt,E=h.baseQueue,b=c.pending;if(b!==null){if(E!==null){var S=E.next;E.next=b.next,b.next=S}h.baseQueue=E=b,c.pending=null}if(E!==null){b=E.next,h=h.baseState;var L=S=null,H=null,ee=b;do{var ce=ee.lane;if((Bo&ce)===ce)H!==null&&(H=H.next={lane:0,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null}),h=ee.hasEagerState?ee.eagerState:i(h,ee.action);else{var pe={lane:ce,action:ee.action,hasEagerState:ee.hasEagerState,eagerState:ee.eagerState,next:null};H===null?(L=H=pe,S=h):H=H.next=pe,It.lanes|=ce,Uo|=ce}ee=ee.next}while(ee!==null&&ee!==b);H===null?S=h:H.next=L,Sr(h,s.memoizedState)||($n=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=H,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,It.lanes|=b,Uo|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Fm(i){var s=fr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=c.dispatch,E=c.pending,b=s.memoizedState;if(E!==null){c.pending=null;var S=E=E.next;do b=i(b,S.action),S=S.next;while(S!==E);Sr(b,s.memoizedState)||($n=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Wx(){}function Gx(i,s){var c=It,h=fr(),E=s(),b=!Sr(h.memoizedState,E);if(b&&(h.memoizedState=E,$n=!0),h=h.queue,Bm(Qx.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||sn!==null&&sn.memoizedState.tag&1){if(c.flags|=2048,Mu(9,Kx.bind(null,c,h,E,s),void 0,null),an===null)throw Error(n(349));(Bo&30)!==0||Xx(c,s,E)}return E}function Xx(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function Kx(i,s,c,h){s.value=c,s.getSnapshot=h,Jx(s)&&Zx(i)}function Qx(i,s,c){return c(function(){Jx(s)&&Zx(i)})}function Jx(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Sr(i,c)}catch(h){return!0}}function Zx(i){var s=gi(i,1);s!==null&&Nr(s,i,1,-1)}function e2(i){var s=Kr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Du,lastRenderedState:i},s.queue=i,i=i.dispatch=uU.bind(null,It,i),[s.memoizedState,i]}function Mu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=It.updateQueue,s===null?(s={lastEffect:null,stores:null},It.updateQueue=s,s.lastEffect=i.next=i):(c=s.lastEffect,c===null?s.lastEffect=i.next=i:(h=c.next,c.next=i,i.next=h,s.lastEffect=i)),i}function t2(){return fr().memoizedState}function od(i,s,c,h){var E=Kr();It.flags|=i,E.memoizedState=Mu(1|s,c,void 0,h===void 0?null:h)}function sd(i,s,c,h){var E=fr();h=h===void 0?null:h;var b=void 0;if(Kt!==null){var S=Kt.memoizedState;if(b=S.destroy,h!==null&&Rm(h,S.deps)){E.memoizedState=Mu(s,c,b,h);return}}It.flags|=i,E.memoizedState=Mu(1|s,c,b,h)}function n2(i,s){return od(8390656,8,i,s)}function Bm(i,s){return sd(2048,8,i,s)}function r2(i,s){return sd(4,2,i,s)}function i2(i,s){return sd(4,4,i,s)}function o2(i,s){if(typeof s=="function")return i=i(),s(i),function(){s(null)};if(s!=null)return i=i(),s.current=i,function(){s.current=null}}function s2(i,s,c){return c=c!=null?c.concat([i]):null,sd(4,4,o2.bind(null,s,i),c)}function Um(){}function a2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(c.memoizedState=[i,s],i)}function u2(i,s){var c=fr();s=s===void 0?null:s;var h=c.memoizedState;return h!==null&&s!==null&&Rm(s,h[1])?h[0]:(i=i(),c.memoizedState=[i,s],i)}function l2(i,s,c){return(Bo&21)===0?(i.baseState&&(i.baseState=!1,$n=!0),i.memoizedState=c):(Sr(c,s)||(c=U_(),It.lanes|=c,Uo|=c,i.baseState=!0),s)}function sU(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=Im.transition;Im.transition={};try{i(!1),s()}finally{dt=c,Im.transition=h}}function c2(){return fr().memoizedState}function aU(i,s,c){var h=Xi(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},d2(i))f2(s,c);else if(c=jx(i,s,c,h),c!==null){var E=In();Nr(c,i,h,E),h2(c,s,h)}}function uU(i,s,c){var h=Xi(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(d2(i))f2(s,E);else{var b=i.alternate;if(i.lanes===0&&(b===null||b.lanes===0)&&(b=s.lastRenderedReducer,b!==null))try{var S=s.lastRenderedState,L=b(S,c);if(E.hasEagerState=!0,E.eagerState=L,Sr(L,S)){var H=s.interleaved;H===null?(E.next=E,Am(s)):(E.next=H.next,H.next=E),s.interleaved=E;return}}catch(ee){}c=jx(i,s,E,h),c!==null&&(E=In(),Nr(c,i,h,E),h2(c,s,h))}}function d2(i){var s=i.alternate;return i===It||s!==null&&s===It}function f2(i,s){Ru=id=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function h2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,zp(i,c)}}var ad={readContext:dr,useCallback:Sn,useContext:Sn,useEffect:Sn,useImperativeHandle:Sn,useInsertionEffect:Sn,useLayoutEffect:Sn,useMemo:Sn,useReducer:Sn,useRef:Sn,useState:Sn,useDebugValue:Sn,useDeferredValue:Sn,useTransition:Sn,useMutableSource:Sn,useSyncExternalStore:Sn,useId:Sn,unstable_isNewReconciler:!1},lU={readContext:dr,useCallback:function(i,s){return Kr().memoizedState=[i,s===void 0?null:s],i},useContext:dr,useEffect:n2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,od(4194308,4,o2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return od(4194308,4,i,s)},useInsertionEffect:function(i,s){return od(4,2,i,s)},useMemo:function(i,s){var c=Kr();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=Kr();return s=c!==void 0?c(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=aU.bind(null,It,i),[h.memoizedState,i]},useRef:function(i){var s=Kr();return i={current:i},s.memoizedState=i},useState:e2,useDebugValue:Um,useDeferredValue:function(i){return Kr().memoizedState=i},useTransition:function(){var i=e2(!1),s=i[0];return i=sU.bind(null,i[1]),Kr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=It,E=Kr();if(kt){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),an===null)throw Error(n(349));(Bo&30)!==0||Xx(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,n2(Qx.bind(null,h,b,i),[i]),h.flags|=2048,Mu(9,Kx.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=Kr(),s=an.identifierPrefix;if(kt){var c=mi,h=pi;c=(h&~(1<<32-xr(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Lu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=oU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},cU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Mm,useRef:t2,useState:function(){return Mm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Mm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1},dU={readContext:dr,useCallback:a2,useContext:dr,useEffect:Bm,useImperativeHandle:s2,useInsertionEffect:r2,useLayoutEffect:i2,useMemo:u2,useReducer:Fm,useRef:t2,useState:function(){return Fm(Du)},useDebugValue:Um,useDeferredValue:function(i){var s=fr();return Kt===null?s.memoizedState=i:l2(s,Kt.memoizedState,i)},useTransition:function(){var i=Fm(Du)[0],s=fr().memoizedState;return[i,s]},useMutableSource:Wx,useSyncExternalStore:Gx,useId:c2,unstable_isNewReconciler:!1};function Ar(i,s){if(i&&i.defaultProps){s=k({},s),i=i.defaultProps;for(var c in i)s[c]===void 0&&(s[c]=i[c]);return s}return s}function Hm(i,s,c,h){s=i.memoizedState,c=c(h,s),c=c==null?s:k({},s,c),i.memoizedState=c,i.lanes===0&&(i.updateQueue.baseState=c)}var ud={isMounted:function(i){return(i=i._reactInternals)?Oo(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=In(),E=Xi(i),b=Ei(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=qi(i,b,E),s!==null&&(Nr(s,i,E,h),ed(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=In(),h=Xi(i),E=Ei(c,h);E.tag=2,s!=null&&(E.callback=s),s=qi(i,E,h),s!==null&&(Nr(s,i,h,c),ed(s,i,h))}};function p2(i,s,c,h,E,b,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,b,S):s.prototype&&s.prototype.isPureReactComponent?!_u(c,h)||!_u(E,b):!0}function m2(i,s,c){var h=!1,E=ji,b=s.contextType;return typeof b=="object"&&b!==null?b=dr(b):(E=jn(s)?Ro:xn.current,h=s.contextTypes,b=(h=h!=null)?js(i,E):ji),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=ud,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function g2(i,s,c,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(c,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(c,h),s.state!==i&&ud.enqueueReplaceState(s,s.state,null)}function zm(i,s,c,h){var E=i.stateNode;E.props=c,E.state=i.memoizedState,E.refs={},Cm(i);var b=s.contextType;typeof b=="object"&&b!==null?E.context=dr(b):(b=jn(s)?Ro:xn.current,E.context=js(i,b)),E.state=i.memoizedState,b=s.getDerivedStateFromProps,typeof b=="function"&&(Hm(i,s,b,c),E.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(s=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),s!==E.state&&ud.enqueueReplaceState(E,E.state,null),td(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function Ks(i,s){try{var c="",h=s;do c+=Me(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
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{O=!1,Error.prepareStackTrace=c}return(i=i?i.displayName||i.name:"")?K(i):""}function we(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=ce(i.type,!1),i;case 11:return i=ce(i.type.render,!1),i;case 1:return i=ce(i.type,!0),i;default:return""}}function Ce(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 te:return"StrictMode";case ye: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 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:Ce(i.type)||"Memo";case Ae:s=i._payload,i=i._init;try{return Ce(i(s))}catch(c){}}return null}function xe(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 Ce(s);case 8:return s===te?"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 dn(i){i._valueTracker||(i._valueTracker=at(i))}function kt(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 $t(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(s){return i.body}}function Rt(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 ur(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 Jt(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 Ve(i,s,c){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,c||s===i.value||(i.value=s),i.defaultValue=s}c=i.name,c!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,c!==""&&(i.name=c)}function bt(i,s,c){(s!=="number"||$t(i.ownerDocument)!==i)&&(c==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+c&&(i.defaultValue=""+c))}var Xt=Array.isArray;function Lt(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 k({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function lr(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(Xt(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 Zt(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 Wo(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 Te(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 qe,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(qe=qe||document.createElement("div"),qe.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=qe.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 Ut={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},wr=["Webkit","ms","Moz","O"];Object.keys(Ut).forEach(function(i){wr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Ut[s]=Ut[i]})});function En(i,s,c){return s==null||typeof s=="boolean"||s===""?"":c||typeof s!="number"||s===0||Ut.hasOwnProperty(i)&&Ut[i]?(""+s).trim():s+"px"}function Fr(i,s){i=i.style;for(var c in s)if(s.hasOwnProperty(c)){var h=c.indexOf("--")===0,E=En(c,s[c],h);c==="float"&&(c="cssFloat"),h?i.setProperty(c,E):i[c]=E}}var ai=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 en(i,s){if(s){if(ai[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 cr(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,Ue=null;function Pt(i){if(i=Hu(i)){if(typeof Pe!="function")throw Error(n(280));var s=i.stateNode;s&&(s=rd(s),Pe(i.stateNode,i.type,s))}}function Dt(i){Ne?Ue?Ue.push(i):Ue=[i]:Ne=i}function Hn(){if(Ne){var i=Ne,s=Ue;if(Ue=Ne=null,Pt(i),s)for(i=0;i<s.length;i++)Pt(s[i])}}function Nt(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 Nt(i,s,c)}finally{ot=!1,(Ne!==null||Ue!==null)&&(kn(),Hn())}}function yn(i,s){var c=i.stateNode;if(c===null)return null;var h=rd(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 Br=!1;if(l)try{var Jn={};Object.defineProperty(Jn,"passive",{get:function(){Br=!0}}),window.addEventListener("test",Jn,Jn),window.removeEventListener("test",Jn,Jn)}catch(i){Br=!1}function Lc(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 wu=!1,Dc=null,Mc=!1,Wp=null,e7={onError:function(i){wu=!0,Dc=i}};function t7(i,s,c,h,E,b,S,D,$){wu=!1,Dc=null,Lc.apply(e7,arguments)}function n7(i,s,c,h,E,b,S,D,$){if(t7.apply(this,arguments),wu){if(wu){var Z=Dc;wu=!1,Dc=null}else throw Error(n(198));Mc||(Mc=!0,Wp=Z)}}function Go(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 Fx(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 Bx(i){if(Go(i)!==i)throw Error(n(188))}function r7(i){var s=i.alternate;if(!s){if(s=Go(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 Bx(E),i;if(b===h)return Bx(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 Ux(i){return i=r7(i),i!==null?Hx(i):null}function Hx(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=Hx(i);if(s!==null)return s;i=i.sibling}return null}var zx=t.unstable_scheduleCallback,jx=t.unstable_cancelCallback,i7=t.unstable_shouldYield,o7=t.unstable_requestPaint,Vt=t.unstable_now,s7=t.unstable_getCurrentPriorityLevel,Gp=t.unstable_ImmediatePriority,$x=t.unstable_UserBlockingPriority,Fc=t.unstable_NormalPriority,a7=t.unstable_LowPriority,Vx=t.unstable_IdlePriority,Bc=null,ui=null;function u7(i){if(ui&&typeof ui.onCommitFiberRoot=="function")try{ui.onCommitFiberRoot(Bc,i,void 0,(i.current.flags&128)===128)}catch(s){}}var Ur=Math.clz32?Math.clz32:d7,l7=Math.log,c7=Math.LN2;function d7(i){return i>>>=0,i===0?32:31-(l7(i)/c7|0)|0}var Uc=64,Hc=4194304;function xu(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 zc(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=xu(D):(b&=S,b!==0&&(h=xu(b)))}else S=c&~E,S!==0?h=xu(S):b!==0&&(h=xu(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-Ur(s),E=1<<c,h|=i[c],s&=~E;return h}function f7(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 h7(i,s){for(var c=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,b=i.pendingLanes;0<b;){var S=31-Ur(b),D=1<<S,$=E[S];$===-1?((D&c)===0||(D&h)!==0)&&(E[S]=f7(D,s)):$<=s&&(i.expiredLanes|=D),b&=~D}}function Xp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function qx(){var i=Uc;return Uc<<=1,(Uc&4194240)===0&&(Uc=64),i}function Kp(i){for(var s=[],c=0;31>c;c++)s.push(i);return s}function _u(i,s,c){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-Ur(s),i[s]=c}function p7(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-Ur(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-Ur(c),E=1<<h;E&s|i[h]&s&&(i[h]|=s),c&=~E}}var dt=0;function Yx(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var Wx,Jp,Gx,Xx,Kx,Zp=!1,jc=[],Ki=null,Qi=null,Ji=null,Su=new Map,vu=new Map,Zi=[],m7="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 Qx(i,s){switch(i){case"focusin":case"focusout":Ki=null;break;case"dragenter":case"dragleave":Qi=null;break;case"mouseover":case"mouseout":Ji=null;break;case"pointerover":case"pointerout":Su.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":vu.delete(s.pointerId)}}function Au(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=Hu(s),s!==null&&Jp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,E!==null&&s.indexOf(E)===-1&&s.push(E),i)}function g7(i,s,c,h,E){switch(s){case"focusin":return Ki=Au(Ki,i,s,c,h,E),!0;case"dragenter":return Qi=Au(Qi,i,s,c,h,E),!0;case"mouseover":return Ji=Au(Ji,i,s,c,h,E),!0;case"pointerover":var b=E.pointerId;return Su.set(b,Au(Su.get(b)||null,i,s,c,h,E)),!0;case"gotpointercapture":return b=E.pointerId,vu.set(b,Au(vu.get(b)||null,i,s,c,h,E)),!0}return!1}function Jx(i){var s=Xo(i.target);if(s!==null){var c=Go(s);if(c!==null){if(s=c.tag,s===13){if(s=Fx(c),s!==null){i.blockedOn=s,Kx(i.priority,function(){Gx(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 $c(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=Hu(c),s!==null&&Jp(s),i.blockedOn=c,!1;s.shift()}return!0}function Zx(i,s,c){$c(i)&&c.delete(s)}function E7(){Zp=!1,Ki!==null&&$c(Ki)&&(Ki=null),Qi!==null&&$c(Qi)&&(Qi=null),Ji!==null&&$c(Ji)&&(Ji=null),Su.forEach(Zx),vu.forEach(Zx)}function Cu(i,s){i.blockedOn===s&&(i.blockedOn=null,Zp||(Zp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,E7)))}function ku(i){function s(E){return Cu(E,i)}if(0<jc.length){Cu(jc[0],i);for(var c=1;c<jc.length;c++){var h=jc[c];h.blockedOn===i&&(h.blockedOn=null)}}for(Ki!==null&&Cu(Ki,i),Qi!==null&&Cu(Qi,i),Ji!==null&&Cu(Ji,i),Su.forEach(s),vu.forEach(s),c=0;c<Zi.length;c++)h=Zi[c],h.blockedOn===i&&(h.blockedOn=null);for(;0<Zi.length&&(c=Zi[0],c.blockedOn===null);)Jx(c),c.blockedOn===null&&Zi.shift()}var Ws=H.ReactCurrentBatchConfig,Vc=!0;function y7(i,s,c,h){var E=dt,b=Ws.transition;Ws.transition=null;try{dt=1,em(i,s,c,h)}finally{dt=E,Ws.transition=b}}function b7(i,s,c,h){var E=dt,b=Ws.transition;Ws.transition=null;try{dt=4,em(i,s,c,h)}finally{dt=E,Ws.transition=b}}function em(i,s,c,h){if(Vc){var E=tm(i,s,c,h);if(E===null)ym(i,s,h,qc,c),Qx(i,h);else if(g7(E,i,s,c,h))h.stopPropagation();else if(Qx(i,h),s&4&&-1<m7.indexOf(i)){for(;E!==null;){var b=Hu(E);if(b!==null&&Wx(b),b=tm(i,s,c,h),b===null&&ym(i,s,h,qc,c),b===E)break;E=b}E!==null&&h.stopPropagation()}else ym(i,s,h,null,c)}}var qc=null;function tm(i,s,c,h){if(qc=null,i=_e(h),i=Xo(i),i!==null)if(s=Go(i),s===null)i=null;else if(c=s.tag,c===13){if(i=Fx(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 qc=i,null}function e_(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(s7()){case Gp:return 1;case $x:return 4;case Fc:case a7:return 16;case Vx:return 536870912;default:return 16}default:return 16}}var eo=null,nm=null,Yc=null;function t_(){if(Yc)return Yc;var i,s=nm,c=s.length,h,E="value"in eo?eo.value:eo.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 Yc=E.slice(i,1<h?1-h:void 0)}function Wc(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 Gc(){return!0}function n_(){return!1}function dr(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)?Gc:n_,this.isPropagationStopped=n_,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=Gc)},stopPropagation:function(){var c=this.nativeEvent;c&&(c.stopPropagation?c.stopPropagation():typeof c.cancelBubble!="unknown"&&(c.cancelBubble=!0),this.isPropagationStopped=Gc)},persist:function(){},isPersistent:Gc}),s}var Gs={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},rm=dr(Gs),Pu=k({},Gs,{view:0,detail:0}),T7=dr(Pu),im,om,Nu,Xc=k({},Pu,{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!==Nu&&(Nu&&i.type==="mousemove"?(im=i.screenX-Nu.screenX,om=i.screenY-Nu.screenY):om=im=0,Nu=i),im)},movementY:function(i){return"movementY"in i?i.movementY:om}}),r_=dr(Xc),w7=k({},Xc,{dataTransfer:0}),x7=dr(w7),_7=k({},Pu,{relatedTarget:0}),sm=dr(_7),S7=k({},Gs,{animationName:0,elapsedTime:0,pseudoElement:0}),v7=dr(S7),A7=k({},Gs,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),C7=dr(A7),k7=k({},Gs,{data:0}),i_=dr(k7),P7={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},N7={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"},O7={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function I7(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=O7[i])?!!s[i]:!1}function am(){return I7}var R7=k({},Pu,{key:function(i){if(i.key){var s=P7[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=Wc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?N7[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"?Wc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Wc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),L7=dr(R7),D7=k({},Xc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),o_=dr(D7),M7=k({},Pu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:am}),F7=dr(M7),B7=k({},Gs,{propertyName:0,elapsedTime:0,pseudoElement:0}),U7=dr(B7),H7=k({},Xc,{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}),z7=dr(H7),j7=[9,13,27,32],um=l&&"CompositionEvent"in window,Ou=null;l&&"documentMode"in document&&(Ou=document.documentMode);var $7=l&&"TextEvent"in window&&!Ou,s_=l&&(!um||Ou&&8<Ou&&11>=Ou),a_=" ",u_=!1;function l_(i,s){switch(i){case"keyup":return j7.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function c_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Xs=!1;function V7(i,s){switch(i){case"compositionend":return c_(s);case"keypress":return s.which!==32?null:(u_=!0,a_);case"textInput":return i=s.data,i===a_&&u_?null:i;default:return null}}function q7(i,s){if(Xs)return i==="compositionend"||!um&&l_(i,s)?(i=t_(),Yc=nm=eo=null,Xs=!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 s_&&s.locale!=="ko"?null:s.data;default:return null}}var Y7={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 d_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!Y7[i.type]:s==="textarea"}function f_(i,s,c,h){Dt(h),s=ed(s,"onChange"),0<s.length&&(c=new rm("onChange","change",null,c,h),i.push({event:c,listeners:s}))}var Iu=null,Ru=null;function W7(i){N_(i,0)}function Kc(i){var s=ea(i);if(kt(s))return i}function G7(i,s){if(i==="change")return s}var h_=!1;if(l){var lm;if(l){var cm="oninput"in document;if(!cm){var p_=document.createElement("div");p_.setAttribute("oninput","return;"),cm=typeof p_.oninput=="function"}lm=cm}else lm=!1;h_=lm&&(!document.documentMode||9<document.documentMode)}function m_(){Iu&&(Iu.detachEvent("onpropertychange",g_),Ru=Iu=null)}function g_(i){if(i.propertyName==="value"&&Kc(Ru)){var s=[];f_(s,Ru,i,_e(i)),Pn(W7,s)}}function X7(i,s,c){i==="focusin"?(m_(),Iu=s,Ru=c,Iu.attachEvent("onpropertychange",g_)):i==="focusout"&&m_()}function K7(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Kc(Ru)}function Q7(i,s){if(i==="click")return Kc(s)}function J7(i,s){if(i==="input"||i==="change")return Kc(s)}function Z7(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var Hr=typeof Object.is=="function"?Object.is:Z7;function Lu(i,s){if(Hr(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)||!Hr(i[E],s[E]))return!1}return!0}function E_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function y_(i,s){var c=E_(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=E_(c)}}function b_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?b_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function T_(){for(var i=window,s=$t();s instanceof i.HTMLIFrameElement;){try{var c=typeof s.contentWindow.location.href=="string"}catch(h){c=!1}if(c)i=s.contentWindow;else break;s=$t(i.document)}return s}function 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 eU(i){var s=T_(),c=i.focusedElem,h=i.selectionRange;if(s!==c&&c&&c.ownerDocument&&b_(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=y_(c,b);var S=y_(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 tU=l&&"documentMode"in document&&11>=document.documentMode,Ks=null,fm=null,Du=null,hm=!1;function w_(i,s,c){var h=c.window===c?c.document:c.nodeType===9?c:c.ownerDocument;hm||Ks==null||Ks!==$t(h)||(h=Ks,"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}),Du&&Lu(Du,h)||(Du=h,h=ed(fm,"onSelect"),0<h.length&&(s=new rm("onSelect","select",null,s,c),i.push({event:s,listeners:h}),s.target=Ks)))}function Qc(i,s){var c={};return c[i.toLowerCase()]=s.toLowerCase(),c["Webkit"+i]="webkit"+s,c["Moz"+i]="moz"+s,c}var Qs={animationend:Qc("Animation","AnimationEnd"),animationiteration:Qc("Animation","AnimationIteration"),animationstart:Qc("Animation","AnimationStart"),transitionend:Qc("Transition","TransitionEnd")},pm={},x_={};l&&(x_=document.createElement("div").style,"AnimationEvent"in window||(delete Qs.animationend.animation,delete Qs.animationiteration.animation,delete Qs.animationstart.animation),"TransitionEvent"in window||delete Qs.transitionend.transition);function Jc(i){if(pm[i])return pm[i];if(!Qs[i])return i;var s=Qs[i],c;for(c in s)if(s.hasOwnProperty(c)&&c in x_)return pm[i]=s[c];return i}var __=Jc("animationend"),S_=Jc("animationiteration"),v_=Jc("animationstart"),A_=Jc("transitionend"),C_=new Map,k_="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 to(i,s){C_.set(i,s),a(s,[i])}for(var mm=0;mm<k_.length;mm++){var gm=k_[mm],nU=gm.toLowerCase(),rU=gm[0].toUpperCase()+gm.slice(1);to(nU,"on"+rU)}to(__,"onAnimationEnd"),to(S_,"onAnimationIteration"),to(v_,"onAnimationStart"),to("dblclick","onDoubleClick"),to("focusin","onFocus"),to("focusout","onBlur"),to(A_,"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 Mu="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(" "),iU=new Set("cancel close invalid load scroll toggle".split(" ").concat(Mu));function P_(i,s,c){var h=i.type||"unknown-event";i.currentTarget=c,n7(h,s,void 0,i),i.currentTarget=null}function N_(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;P_(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;P_(E,D,Z),b=$}}}if(Mc)throw i=Wp,Mc=!1,Wp=null,i}function St(i,s){var c=s[Sm];c===void 0&&(c=s[Sm]=new Set);var h=i+"__bubble";c.has(h)||(O_(s,i,2,!1),c.add(h))}function Em(i,s,c){var h=0;s&&(h|=4),O_(c,i,h,s)}var Zc="_reactListening"+Math.random().toString(36).slice(2);function Fu(i){if(!i[Zc]){i[Zc]=!0,r.forEach(function(c){c!=="selectionchange"&&(iU.has(c)||Em(c,!1,i),Em(c,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[Zc]||(s[Zc]=!0,Em("selectionchange",!1,s))}}function O_(i,s,c,h){switch(e_(s)){case 1:var E=y7;break;case 4:E=b7;break;default:E=em}c=E.bind(null,s,c,i),E=void 0,!Br||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=Xo(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 ue=C_.get(i);if(ue!==void 0){var ke=rm,Ie=i;switch(i){case"keypress":if(Wc(c)===0)break e;case"keydown":case"keyup":ke=L7;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=r_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":ke=x7;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":ke=F7;break;case __:case S_:case v_:ke=v7;break;case A_:ke=U7;break;case"scroll":ke=T7;break;case"wheel":ke=z7;break;case"copy":case"cut":case"paste":ke=C7;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":ke=o_}var Le=(s&4)!==0,qt=!Le&&i==="scroll",G=Le?ue!==null?ue+"Capture":null:ue;Le=[];for(var Y=Z,Q;Y!==null;){Q=Y;var be=Q.stateNode;if(Q.tag===5&&be!==null&&(Q=be,G!==null&&(be=yn(Y,G),be!=null&&Le.push(Bu(Y,be,Q)))),qt)break;Y=Y.return}0<Le.length&&(ue=new ke(ue,Ie,null,c,fe),me.push({event:ue,listeners:Le}))}}if((s&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",ke=i==="mouseout"||i==="pointerout",ue&&c!==Cn&&(Ie=c.relatedTarget||c.fromElement)&&(Xo(Ie)||Ie[Ci]))break e;if((ke||ue)&&(ue=fe.window===fe?fe:(ue=fe.ownerDocument)?ue.defaultView||ue.parentWindow:window,ke?(Ie=c.relatedTarget||c.toElement,ke=Z,Ie=Ie?Xo(Ie):null,Ie!==null&&(qt=Go(Ie),Ie!==qt||Ie.tag!==5&&Ie.tag!==6)&&(Ie=null)):(ke=null,Ie=Z),ke!==Ie)){if(Le=r_,be="onMouseLeave",G="onMouseEnter",Y="mouse",(i==="pointerout"||i==="pointerover")&&(Le=o_,be="onPointerLeave",G="onPointerEnter",Y="pointer"),qt=ke==null?ue:ea(ke),Q=Ie==null?ue:ea(Ie),ue=new Le(be,Y+"leave",ke,c,fe),ue.target=qt,ue.relatedTarget=Q,be=null,Xo(fe)===Z&&(Le=new Le(G,Y+"enter",Ie,c,fe),Le.target=Q,Le.relatedTarget=qt,be=Le),qt=be,ke&&Ie)t:{for(Le=ke,G=Ie,Y=0,Q=Le;Q;Q=Js(Q))Y++;for(Q=0,be=G;be;be=Js(be))Q++;for(;0<Y-Q;)Le=Js(Le),Y--;for(;0<Q-Y;)G=Js(G),Q--;for(;Y--;){if(Le===G||G!==null&&Le===G.alternate)break t;Le=Js(Le),G=Js(G)}Le=null}else Le=null;ke!==null&&I_(me,ue,ke,Le,!1),Ie!==null&&qt!==null&&I_(me,qt,Ie,Le,!0)}}e:{if(ue=Z?ea(Z):window,ke=ue.nodeName&&ue.nodeName.toLowerCase(),ke==="select"||ke==="input"&&ue.type==="file")var De=G7;else if(d_(ue))if(h_)De=J7;else{De=K7;var ze=X7}else(ke=ue.nodeName)&&ke.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=Q7);if(De&&(De=De(i,Z))){f_(me,De,c,fe);break e}ze&&ze(i,ue,Z),i==="focusout"&&(ze=ue._wrapperState)&&ze.controlled&&ue.type==="number"&&bt(ue,"number",ue.value)}switch(ze=Z?ea(Z):window,i){case"focusin":(d_(ze)||ze.contentEditable==="true")&&(Ks=ze,fm=Z,Du=null);break;case"focusout":Du=fm=Ks=null;break;case"mousedown":hm=!0;break;case"contextmenu":case"mouseup":case"dragend":hm=!1,w_(me,c,fe);break;case"selectionchange":if(tU)break;case"keydown":case"keyup":w_(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 Xs?l_(i,c)&&(Ye="onCompositionEnd"):i==="keydown"&&c.keyCode===229&&(Ye="onCompositionStart");Ye&&(s_&&c.locale!=="ko"&&(Xs||Ye!=="onCompositionStart"?Ye==="onCompositionEnd"&&Xs&&(je=t_()):(eo=fe,nm="value"in eo?eo.value:eo.textContent,Xs=!0)),ze=ed(Z,Ye),0<ze.length&&(Ye=new i_(Ye,i,null,c,fe),me.push({event:Ye,listeners:ze}),je?Ye.data=je:(je=c_(c),je!==null&&(Ye.data=je)))),(je=$7?V7(i,c):q7(i,c))&&(Z=ed(Z,"onBeforeInput"),0<Z.length&&(fe=new i_("onBeforeInput","beforeinput",null,c,fe),me.push({event:fe,listeners:Z}),fe.data=je))}N_(me,s)})}function Bu(i,s,c){return{instance:i,listener:s,currentTarget:c}}function ed(i,s){for(var c=s+"Capture",h=[];i!==null;){var E=i,b=E.stateNode;E.tag===5&&b!==null&&(E=b,b=yn(i,c),b!=null&&h.unshift(Bu(i,b,E)),b=yn(i,s),b!=null&&h.push(Bu(i,b,E))),i=i.return}return h}function Js(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function I_(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?($=yn(c,b),$!=null&&S.unshift(Bu(c,$,D))):E||($=yn(c,b),$!=null&&S.push(Bu(c,$,D)))),c=c.return}S.length!==0&&i.push({event:s,listeners:S})}var oU=/\r\n?/g,sU=/\u0000|\uFFFD/g;function R_(i){return(typeof i=="string"?i:""+i).replace(oU,`
|
|
15
|
+
`).replace(sU,"")}function td(i,s,c){if(s=R_(s),R_(i)!==s&&c)throw Error(n(425))}function nd(){}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,aU=typeof clearTimeout=="function"?clearTimeout:void 0,L_=typeof Promise=="function"?Promise:void 0,uU=typeof queueMicrotask=="function"?queueMicrotask:typeof L_!="undefined"?function(i){return L_.resolve(null).then(i).catch(lU)}:xm;function lU(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),ku(s);return}h--}else c!=="$"&&c!=="$?"&&c!=="$!"||h++;c=E}while(c);ku(s)}function no(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 D_(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 Zs=Math.random().toString(36).slice(2),li="__reactFiber$"+Zs,Uu="__reactProps$"+Zs,Ci="__reactContainer$"+Zs,Sm="__reactEvents$"+Zs,cU="__reactListeners$"+Zs,dU="__reactHandles$"+Zs;function Xo(i){var s=i[li];if(s)return s;for(var c=i.parentNode;c;){if(s=c[Ci]||c[li]){if(c=s.alternate,s.child!==null||c!==null&&c.child!==null)for(i=D_(i);i!==null;){if(c=i[li])return c;i=D_(i)}return s}i=c,c=i.parentNode}return null}function Hu(i){return i=i[li]||i[Ci],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function ea(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function rd(i){return i[Uu]||null}var vm=[],ta=-1;function ro(i){return{current:i}}function vt(i){0>ta||(i.current=vm[ta],vm[ta]=null,ta--)}function Tt(i,s){ta++,vm[ta]=i.current,i.current=s}var io={},Nn=ro(io),Zn=ro(!1),Ko=io;function na(i,s){var c=i.type.contextTypes;if(!c)return io;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 er(i){return i=i.childContextTypes,i!=null}function id(){vt(Zn),vt(Nn)}function M_(i,s,c){if(Nn.current!==io)throw Error(n(168));Tt(Nn,s),Tt(Zn,c)}function F_(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,xe(i)||"Unknown",E));return k({},c,h)}function od(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||io,Ko=Nn.current,Tt(Nn,i),Tt(Zn,Zn.current),!0}function B_(i,s,c){var h=i.stateNode;if(!h)throw Error(n(169));c?(i=F_(i,s,Ko),h.__reactInternalMemoizedMergedChildContext=i,vt(Zn),vt(Nn),Tt(Nn,i)):vt(Zn),Tt(Zn,c)}var ki=null,sd=!1,Am=!1;function U_(i){ki===null?ki=[i]:ki.push(i)}function fU(i){sd=!0,U_(i)}function oo(){if(!Am&&ki!==null){Am=!0;var i=0,s=dt;try{var c=ki;for(dt=1;i<c.length;i++){var h=c[i];do h=h(!0);while(h!==null)}ki=null,sd=!1}catch(E){throw ki!==null&&(ki=ki.slice(i+1)),zx(Gp,oo),E}finally{dt=s,Am=!1}}return null}var ra=[],ia=0,ad=null,ud=0,xr=[],_r=0,Qo=null,Pi=1,Ni="";function Jo(i,s){ra[ia++]=ud,ra[ia++]=ad,ad=i,ud=s}function H_(i,s,c){xr[_r++]=Pi,xr[_r++]=Ni,xr[_r++]=Qo,Qo=i;var h=Pi;i=Ni;var E=32-Ur(h)-1;h&=~(1<<E),c+=1;var b=32-Ur(s)+E;if(30<b){var S=E-E%5;b=(h&(1<<S)-1).toString(32),h>>=S,E-=S,Pi=1<<32-Ur(s)+E|c<<E|h,Ni=b+i}else Pi=1<<b|c<<E|h,Ni=i}function Cm(i){i.return!==null&&(Jo(i,1),H_(i,1,0))}function km(i){for(;i===ad;)ad=ra[--ia],ra[ia]=null,ud=ra[--ia],ra[ia]=null;for(;i===Qo;)Qo=xr[--_r],xr[_r]=null,Ni=xr[--_r],xr[_r]=null,Pi=xr[--_r],xr[_r]=null}var fr=null,hr=null,Ot=!1,zr=null;function z_(i,s){var c=Cr(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 j_(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,fr=i,hr=no(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,fr=i,hr=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(c=Qo!==null?{id:Pi,overflow:Ni}:null,i.memoizedState={dehydrated:s,treeContext:c,retryLane:1073741824},c=Cr(18,null,null,0),c.stateNode=s,c.return=i,i.child=c,fr=i,hr=null,!0):!1;default:return!1}}function Pm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Nm(i){if(Ot){var s=hr;if(s){var c=s;if(!j_(i,s)){if(Pm(i))throw Error(n(418));s=no(c.nextSibling);var h=fr;s&&j_(i,s)?z_(h,c):(i.flags=i.flags&-4097|2,Ot=!1,fr=i)}}else{if(Pm(i))throw Error(n(418));i.flags=i.flags&-4097|2,Ot=!1,fr=i}}}function $_(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;fr=i}function ld(i){if(i!==fr)return!1;if(!Ot)return $_(i),Ot=!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=hr)){if(Pm(i))throw V_(),Error(n(418));for(;s;)z_(i,s),s=no(s.nextSibling)}if($_(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){hr=no(i.nextSibling);break e}s--}else c!=="$"&&c!=="$!"&&c!=="$?"||s++}i=i.nextSibling}hr=null}}else hr=fr?no(i.stateNode.nextSibling):null;return!0}function V_(){for(var i=hr;i;)i=no(i.nextSibling)}function oa(){hr=fr=null,Ot=!1}function Om(i){zr===null?zr=[i]:zr.push(i)}var hU=H.ReactCurrentBatchConfig;function zu(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 cd(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function q_(i){var s=i._init;return s(i._payload)}function Y_(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=po(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,be){return Y===null||Y.tag!==6?(Y=xg(Q,G.mode,be),Y.return=G,Y):(Y=E(Y,Q),Y.return=G,Y)}function $(G,Y,Q,be){var De=Q.type;return De===z?fe(G,Y,Q.props.children,be,Q.key):Y!==null&&(Y.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&q_(De)===Y.type)?(be=E(Y,Q.props),be.ref=zu(G,Y,Q),be.return=G,be):(be=Ld(Q.type,Q.key,Q.props,null,G.mode,be),be.ref=zu(G,Y,Q),be.return=G,be)}function Z(G,Y,Q,be){return Y===null||Y.tag!==4||Y.stateNode.containerInfo!==Q.containerInfo||Y.stateNode.implementation!==Q.implementation?(Y=_g(Q,G.mode,be),Y.return=G,Y):(Y=E(Y,Q.children||[]),Y.return=G,Y)}function fe(G,Y,Q,be,De){return Y===null||Y.tag!==7?(Y=ss(Q,G.mode,be,De),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=Ld(Y.type,Y.key,Y.props,null,G.mode,Q),Q.ref=zu(G,null,Y),Q.return=G,Q;case L:return Y=_g(Y,G.mode,Q),Y.return=G,Y;case Ae:var be=Y._init;return me(G,be(Y._payload),Q)}if(Xt(Y)||se(Y))return Y=ss(Y,G.mode,Q,null),Y.return=G,Y;cd(G,Y)}return null}function ue(G,Y,Q,be){var De=Y!==null?Y.key:null;if(typeof Q=="string"&&Q!==""||typeof Q=="number")return De!==null?null:D(G,Y,""+Q,be);if(typeof Q=="object"&&Q!==null){switch(Q.$$typeof){case U:return Q.key===De?$(G,Y,Q,be):null;case L:return Q.key===De?Z(G,Y,Q,be):null;case Ae:return De=Q._init,ue(G,Y,De(Q._payload),be)}if(Xt(Q)||se(Q))return De!==null?null:fe(G,Y,Q,be,null);cd(G,Q)}return null}function ke(G,Y,Q,be,De){if(typeof be=="string"&&be!==""||typeof be=="number")return G=G.get(Q)||null,D(Y,G,""+be,De);if(typeof be=="object"&&be!==null){switch(be.$$typeof){case U:return G=G.get(be.key===null?Q:be.key)||null,$(Y,G,be,De);case L:return G=G.get(be.key===null?Q:be.key)||null,Z(Y,G,be,De);case Ae:var ze=be._init;return ke(G,Y,Q,ze(be._payload),De)}if(Xt(be)||se(be))return G=G.get(Q)||null,fe(Y,G,be,De,null);cd(Y,be)}return null}function Ie(G,Y,Q,be){for(var De=null,ze=null,je=Y,Ye=Y=0,pn=null;je!==null&&Ye<Q.length;Ye++){je.index>Ye?(pn=je,je=null):pn=je.sibling;var ut=ue(G,je,Q[Ye],be);if(ut===null){je===null&&(je=pn);break}i&&je&&ut.alternate===null&&s(G,je),Y=b(ut,Y,Ye),ze===null?De=ut:ze.sibling=ut,ze=ut,je=pn}if(Ye===Q.length)return c(G,je),Ot&&Jo(G,Ye),De;if(je===null){for(;Ye<Q.length;Ye++)je=me(G,Q[Ye],be),je!==null&&(Y=b(je,Y,Ye),ze===null?De=je:ze.sibling=je,ze=je);return Ot&&Jo(G,Ye),De}for(je=h(G,je);Ye<Q.length;Ye++)pn=ke(je,G,Ye,Q[Ye],be),pn!==null&&(i&&pn.alternate!==null&&je.delete(pn.key===null?Ye:pn.key),Y=b(pn,Y,Ye),ze===null?De=pn:ze.sibling=pn,ze=pn);return i&&je.forEach(function(mo){return s(G,mo)}),Ot&&Jo(G,Ye),De}function Le(G,Y,Q,be){var De=se(Q);if(typeof De!="function")throw Error(n(150));if(Q=De.call(Q),Q==null)throw Error(n(151));for(var ze=De=null,je=Y,Ye=Y=0,pn=null,ut=Q.next();je!==null&&!ut.done;Ye++,ut=Q.next()){je.index>Ye?(pn=je,je=null):pn=je.sibling;var mo=ue(G,je,ut.value,be);if(mo===null){je===null&&(je=pn);break}i&&je&&mo.alternate===null&&s(G,je),Y=b(mo,Y,Ye),ze===null?De=mo:ze.sibling=mo,ze=mo,je=pn}if(ut.done)return c(G,je),Ot&&Jo(G,Ye),De;if(je===null){for(;!ut.done;Ye++,ut=Q.next())ut=me(G,ut.value,be),ut!==null&&(Y=b(ut,Y,Ye),ze===null?De=ut:ze.sibling=ut,ze=ut);return Ot&&Jo(G,Ye),De}for(je=h(G,je);!ut.done;Ye++,ut=Q.next())ut=ke(je,G,Ye,ut.value,be),ut!==null&&(i&&ut.alternate!==null&&je.delete(ut.key===null?Ye:ut.key),Y=b(ut,Y,Ye),ze===null?De=ut:ze.sibling=ut,ze=ut);return i&&je.forEach(function(YU){return s(G,YU)}),Ot&&Jo(G,Ye),De}function qt(G,Y,Q,be){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 De=Q.key,ze=Y;ze!==null;){if(ze.key===De){if(De=Q.type,De===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===De||typeof De=="object"&&De!==null&&De.$$typeof===Ae&&q_(De)===ze.type){c(G,ze.sibling),Y=E(ze,Q.props),Y.ref=zu(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=ss(Q.props.children,G.mode,be,Q.key),Y.return=G,G=Y):(be=Ld(Q.type,Q.key,Q.props,null,G.mode,be),be.ref=zu(G,Y,Q),be.return=G,G=be)}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,be),Y.return=G,G=Y}return S(G);case Ae:return ze=Q._init,qt(G,Y,ze(Q._payload),be)}if(Xt(Q))return Ie(G,Y,Q,be);if(se(Q))return Le(G,Y,Q,be);cd(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,be),Y.return=G,G=Y),S(G)):c(G,Y)}return qt}var sa=Y_(!0),W_=Y_(!1),dd=ro(null),fd=null,aa=null,Im=null;function Rm(){Im=aa=fd=null}function Lm(i){var s=dd.current;vt(dd),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 ua(i,s){fd=i,Im=aa=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(tr=!0),i.firstContext=null)}function Sr(i){var s=i._currentValue;if(Im!==i)if(i={context:i,memoizedValue:s,next:null},aa===null){if(fd===null)throw Error(n(308));aa=i,fd.dependencies={lanes:0,firstContext:i}}else aa=aa.next=i;return s}var Zo=null;function Mm(i){Zo===null?Zo=[i]:Zo.push(i)}function G_(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,Oi(i,h)}function Oi(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 so=!1;function Fm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function X_(i,s){i=i.updateQueue,s.updateQueue===i&&(s.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function Ii(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function ao(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,Oi(i,c)}return E=h.interleaved,E===null?(s.next=s,Mm(h)):(s.next=E.next,E.next=s),h.interleaved=s,Oi(i,c)}function hd(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 K_(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 pd(i,s,c,h){var E=i.updateQueue;so=!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 ue=D.lane,ke=D.eventTime;if((h&ue)===ue){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(ue=s,ke=c,Le.tag){case 1:if(Ie=Le.payload,typeof Ie=="function"){me=Ie.call(ke,me,ue);break e}me=Ie;break e;case 3:Ie.flags=Ie.flags&-65537|128;case 0:if(Ie=Le.payload,ue=typeof Ie=="function"?Ie.call(ke,me,ue):Ie,ue==null)break e;me=k({},me,ue);break e;case 2:so=!0}}D.callback!==null&&D.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[D]:ue.push(D))}else ke={eventTime:ke,lane:ue,tag:D.tag,payload:D.payload,callback:D.callback,next:null},fe===null?(Z=fe=ke,$=me):fe=fe.next=ke,S|=ue;if(D=D.next,D===null){if(D=E.shared.pending,D===null)break;ue=D,D=ue.next,ue.next=null,E.lastBaseUpdate=ue,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);ns|=S,i.lanes=S,i.memoizedState=me}}function Q_(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 ju={},ci=ro(ju),$u=ro(ju),Vu=ro(ju);function es(i){if(i===ju)throw Error(n(174));return i}function Bm(i,s){switch(Tt(Vu,s),Tt($u,i),Tt(ci,ju),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:Te(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=Te(s,i)}vt(ci),Tt(ci,s)}function la(){vt(ci),vt($u),vt(Vu)}function J_(i){es(Vu.current);var s=es(ci.current),c=Te(s,i.type);s!==c&&(Tt($u,i),Tt(ci,c))}function Um(i){$u.current===i&&(vt(ci),vt($u))}var Mt=ro(0);function md(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 gd=H.ReactCurrentDispatcher,jm=H.ReactCurrentBatchConfig,ts=0,Ft=null,tn=null,fn=null,Ed=!1,qu=!1,Yu=0,pU=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(!Hr(i[c],s[c]))return!1;return!0}function Vm(i,s,c,h,E,b){if(ts=b,Ft=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,gd.current=i===null||i.memoizedState===null?yU:bU,i=c(h,E),qu){b=0;do{if(qu=!1,Yu=0,25<=b)throw Error(n(301));b+=1,fn=tn=null,s.updateQueue=null,gd.current=TU,i=c(h,E)}while(qu)}if(gd.current=Td,s=tn!==null&&tn.next!==null,ts=0,fn=tn=Ft=null,Ed=!1,s)throw Error(n(300));return i}function qm(){var i=Yu!==0;return Yu=0,i}function di(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return fn===null?Ft.memoizedState=fn=i:fn=fn.next=i,fn}function vr(){if(tn===null){var i=Ft.alternate;i=i!==null?i.memoizedState:null}else i=tn.next;var s=fn===null?Ft.memoizedState:fn.next;if(s!==null)fn=s,tn=i;else{if(i===null)throw Error(n(310));tn=i,i={memoizedState:tn.memoizedState,baseState:tn.baseState,baseQueue:tn.baseQueue,queue:tn.queue,next:null},fn===null?Ft.memoizedState=fn=i:fn=fn.next=i}return fn}function Wu(i,s){return typeof s=="function"?s(i):s}function Ym(i){var s=vr(),c=s.queue;if(c===null)throw Error(n(311));c.lastRenderedReducer=i;var h=tn,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((ts&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,Ft.lanes|=fe,ns|=fe}Z=Z.next}while(Z!==null&&Z!==b);$===null?S=h:$.next=D,Hr(h,s.memoizedState)||(tr=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=$,c.lastRenderedState=h}if(i=c.interleaved,i!==null){E=i;do b=E.lane,Ft.lanes|=b,ns|=b,E=E.next;while(E!==i)}else E===null&&(c.lanes=0);return[s.memoizedState,c.dispatch]}function Wm(i){var s=vr(),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);Hr(b,s.memoizedState)||(tr=!0),s.memoizedState=b,s.baseQueue===null&&(s.baseState=b),c.lastRenderedState=b}return[b,h]}function Z_(){}function e2(i,s){var c=Ft,h=vr(),E=s(),b=!Hr(h.memoizedState,E);if(b&&(h.memoizedState=E,tr=!0),h=h.queue,Gm(r2.bind(null,c,h,i),[i]),h.getSnapshot!==s||b||fn!==null&&fn.memoizedState.tag&1){if(c.flags|=2048,Gu(9,n2.bind(null,c,h,E,s),void 0,null),hn===null)throw Error(n(349));(ts&30)!==0||t2(c,s,E)}return E}function t2(i,s,c){i.flags|=16384,i={getSnapshot:s,value:c},s=Ft.updateQueue,s===null?(s={lastEffect:null,stores:null},Ft.updateQueue=s,s.stores=[i]):(c=s.stores,c===null?s.stores=[i]:c.push(i))}function n2(i,s,c,h){s.value=c,s.getSnapshot=h,i2(s)&&o2(i)}function r2(i,s,c){return c(function(){i2(s)&&o2(i)})}function i2(i){var s=i.getSnapshot;i=i.value;try{var c=s();return!Hr(i,c)}catch(h){return!0}}function o2(i){var s=Oi(i,1);s!==null&&qr(s,i,1,-1)}function s2(i){var s=di();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Wu,lastRenderedState:i},s.queue=i,i=i.dispatch=EU.bind(null,Ft,i),[s.memoizedState,i]}function Gu(i,s,c,h){return i={tag:i,create:s,destroy:c,deps:h,next:null},s=Ft.updateQueue,s===null?(s={lastEffect:null,stores:null},Ft.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 a2(){return vr().memoizedState}function yd(i,s,c,h){var E=di();Ft.flags|=i,E.memoizedState=Gu(1|s,c,void 0,h===void 0?null:h)}function bd(i,s,c,h){var E=vr();h=h===void 0?null:h;var b=void 0;if(tn!==null){var S=tn.memoizedState;if(b=S.destroy,h!==null&&$m(h,S.deps)){E.memoizedState=Gu(s,c,b,h);return}}Ft.flags|=i,E.memoizedState=Gu(1|s,c,b,h)}function u2(i,s){return yd(8390656,8,i,s)}function Gm(i,s){return bd(2048,8,i,s)}function l2(i,s){return bd(4,2,i,s)}function c2(i,s){return bd(4,4,i,s)}function d2(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 f2(i,s,c){return c=c!=null?c.concat([i]):null,bd(4,4,d2.bind(null,s,i),c)}function Xm(){}function h2(i,s){var c=vr();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 p2(i,s){var c=vr();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 m2(i,s,c){return(ts&21)===0?(i.baseState&&(i.baseState=!1,tr=!0),i.memoizedState=c):(Hr(c,s)||(c=qx(),Ft.lanes|=c,ns|=c,i.baseState=!0),s)}function mU(i,s){var c=dt;dt=c!==0&&4>c?c:4,i(!0);var h=jm.transition;jm.transition={};try{i(!1),s()}finally{dt=c,jm.transition=h}}function g2(){return vr().memoizedState}function gU(i,s,c){var h=fo(i);if(c={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null},E2(i))y2(s,c);else if(c=G_(i,s,c,h),c!==null){var E=jn();qr(c,i,h,E),b2(c,s,h)}}function EU(i,s,c){var h=fo(i),E={lane:h,action:c,hasEagerState:!1,eagerState:null,next:null};if(E2(i))y2(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,Hr(D,S)){var $=s.interleaved;$===null?(E.next=E,Mm(s)):(E.next=$.next,$.next=E),s.interleaved=E;return}}catch(Z){}c=G_(i,s,E,h),c!==null&&(E=jn(),qr(c,i,h,E),b2(c,s,h))}}function E2(i){var s=i.alternate;return i===Ft||s!==null&&s===Ft}function y2(i,s){qu=Ed=!0;var c=i.pending;c===null?s.next=s:(s.next=c.next,c.next=s),i.pending=s}function b2(i,s,c){if((c&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,c|=h,s.lanes=c,Qp(i,c)}}var Td={readContext:Sr,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},yU={readContext:Sr,useCallback:function(i,s){return di().memoizedState=[i,s===void 0?null:s],i},useContext:Sr,useEffect:u2,useImperativeHandle:function(i,s,c){return c=c!=null?c.concat([i]):null,yd(4194308,4,d2.bind(null,s,i),c)},useLayoutEffect:function(i,s){return yd(4194308,4,i,s)},useInsertionEffect:function(i,s){return yd(4,2,i,s)},useMemo:function(i,s){var c=di();return s=s===void 0?null:s,i=i(),c.memoizedState=[i,s],i},useReducer:function(i,s,c){var h=di();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=gU.bind(null,Ft,i),[h.memoizedState,i]},useRef:function(i){var s=di();return i={current:i},s.memoizedState=i},useState:s2,useDebugValue:Xm,useDeferredValue:function(i){return di().memoizedState=i},useTransition:function(){var i=s2(!1),s=i[0];return i=mU.bind(null,i[1]),di().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,c){var h=Ft,E=di();if(Ot){if(c===void 0)throw Error(n(407));c=c()}else{if(c=s(),hn===null)throw Error(n(349));(ts&30)!==0||t2(h,s,c)}E.memoizedState=c;var b={value:c,getSnapshot:s};return E.queue=b,u2(r2.bind(null,h,b,i),[i]),h.flags|=2048,Gu(9,n2.bind(null,h,b,c,s),void 0,null),c},useId:function(){var i=di(),s=hn.identifierPrefix;if(Ot){var c=Ni,h=Pi;c=(h&~(1<<32-Ur(h)-1)).toString(32)+c,s=":"+s+"R"+c,c=Yu++,0<c&&(s+="H"+c.toString(32)),s+=":"}else c=pU++,s=":"+s+"r"+c.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},bU={readContext:Sr,useCallback:h2,useContext:Sr,useEffect:Gm,useImperativeHandle:f2,useInsertionEffect:l2,useLayoutEffect:c2,useMemo:p2,useReducer:Ym,useRef:a2,useState:function(){return Ym(Wu)},useDebugValue:Xm,useDeferredValue:function(i){var s=vr();return m2(s,tn.memoizedState,i)},useTransition:function(){var i=Ym(Wu)[0],s=vr().memoizedState;return[i,s]},useMutableSource:Z_,useSyncExternalStore:e2,useId:g2,unstable_isNewReconciler:!1},TU={readContext:Sr,useCallback:h2,useContext:Sr,useEffect:Gm,useImperativeHandle:f2,useInsertionEffect:l2,useLayoutEffect:c2,useMemo:p2,useReducer:Wm,useRef:a2,useState:function(){return Wm(Wu)},useDebugValue:Xm,useDeferredValue:function(i){var s=vr();return tn===null?s.memoizedState=i:m2(s,tn.memoizedState,i)},useTransition:function(){var i=Wm(Wu)[0],s=vr().memoizedState;return[i,s]},useMutableSource:Z_,useSyncExternalStore:e2,useId:g2,unstable_isNewReconciler:!1};function jr(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 wd={isMounted:function(i){return(i=i._reactInternals)?Go(i)===i:!1},enqueueSetState:function(i,s,c){i=i._reactInternals;var h=jn(),E=fo(i),b=Ii(h,E);b.payload=s,c!=null&&(b.callback=c),s=ao(i,b,E),s!==null&&(qr(s,i,E,h),hd(s,i,E))},enqueueReplaceState:function(i,s,c){i=i._reactInternals;var h=jn(),E=fo(i),b=Ii(h,E);b.tag=1,b.payload=s,c!=null&&(b.callback=c),s=ao(i,b,E),s!==null&&(qr(s,i,E,h),hd(s,i,E))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var c=jn(),h=fo(i),E=Ii(c,h);E.tag=2,s!=null&&(E.callback=s),s=ao(i,E,h),s!==null&&(qr(s,i,h,c),hd(s,i,h))}};function T2(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?!Lu(c,h)||!Lu(E,b):!0}function w2(i,s,c){var h=!1,E=io,b=s.contextType;return typeof b=="object"&&b!==null?b=Sr(b):(E=er(s)?Ko:Nn.current,h=s.contextTypes,b=(h=h!=null)?na(i,E):io),s=new s(c,b),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=wd,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=b),s}function x2(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&&wd.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=Sr(b):(b=er(s)?Ko:Nn.current,E.context=na(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&&wd.enqueueReplaceState(E,E.state,null),pd(i,c,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function ca(i,s){try{var c="",h=s;do c+=we(h),h=h.return;while(h);var E=c}catch(b){E=`
|
|
16
16
|
Error generating stack: `+b.message+`
|
|
17
|
-
`+b.stack}return{value:i,source:s,stack:E,digest:null}}function jm(i,s,c){return{value:i,source:null,stack:c!=null?c:null,digest:s!=null?s:null}}function $m(i,s){try{console.error(s.value)}catch(c){setTimeout(function(){throw c})}}var fU=typeof WeakMap=="function"?WeakMap:Map;function E2(i,s,c){c=Ei(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){md||(md=!0,i0=h),$m(i,s)},c}function y2(i,s,c){c=Ei(-1,c),c.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=s.value;c.payload=function(){return h(E)},c.callback=function(){$m(i,s)}}var b=i.stateNode;return b!==null&&typeof b.componentDidCatch=="function"&&(c.callback=function(){$m(i,s),typeof h!="function"&&(Wi===null?Wi=new Set([this]):Wi.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),c}function b2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new fU;var E=new Set;h.set(s,E)}else E=h.get(s),E===void 0&&(E=new Set,h.set(s,E));E.has(c)||(E.add(c),i=AU.bind(null,i,s,c),s.then(i,i))}function T2(i){do{var s;if((s=i.tag===13)&&(s=i.memoizedState,s=s!==null?s.dehydrated!==null:!0),s)return i;i=i.return}while(i!==null);return null}function w2(i,s,c,h,E){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,c.flags|=131072,c.flags&=-52805,c.tag===1&&(c.alternate===null?c.tag=17:(s=Ei(-1,1),s.tag=2,qi(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var hU=U.ReactCurrentOwner,$n=!1;function On(i,s,c,h){s.child=i===null?zx(s,null,c,h):Ys(s,i.child,c,h)}function _2(i,s,c,h,E){c=c.render;var b=s.ref;return Gs(s,E),h=Lm(i,s,c,h,b,E),c=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&c&&Em(s),s.flags|=1,On(i,s,h,E),s.child)}function x2(i,s,c,h,E){if(i===null){var b=c.type;return typeof b=="function"&&!d0(b)&&b.defaultProps===void 0&&c.compare===null&&c.defaultProps===void 0?(s.tag=15,s.type=b,S2(i,s,b,h,E)):(i=wd(c.type,null,h,s,s.mode,E),i.ref=s.ref,i.return=s,s.child=i)}if(b=i.child,(i.lanes&E)===0){var S=b.memoizedProps;if(c=c.compare,c=c!==null?c:_u,c(S,h)&&i.ref===s.ref)return yi(i,s,E)}return s.flags|=1,i=Qi(b,h),i.ref=s.ref,i.return=s,s.child=i}function S2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(_u(b,h)&&i.ref===s.ref)if($n=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&($n=!0);else return s.lanes=i.lanes,yi(i,s,E)}return Vm(i,s,c,h,E)}function v2(i,s,c){var h=s.pendingProps,E=h.children,b=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},Tt(Js,nr),nr|=c;else{if((c&1073741824)===0)return i=b!==null?b.baseLanes|c:c,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,Tt(Js,nr),nr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(Js,nr),nr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(Js,nr),nr|=h;return On(i,s,E,c),s.child}function A2(i,s){var c=s.ref;(i===null&&c!==null||i!==null&&i.ref!==c)&&(s.flags|=512,s.flags|=2097152)}function Vm(i,s,c,h,E){var b=jn(c)?Ro:xn.current;return b=js(s,b),Gs(s,E),c=Lm(i,s,c,h,b,E),h=Dm(),i!==null&&!$n?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,yi(i,s,E)):(kt&&h&&Em(s),s.flags|=1,On(i,s,c,E),s.child)}function C2(i,s,c,h,E){if(jn(c)){var b=!0;Yc(s)}else b=!1;if(Gs(s,E),s.stateNode===null)cd(i,s),m2(s,c,h),zm(s,c,h,E),h=!0;else if(i===null){var S=s.stateNode,L=s.memoizedProps;S.props=L;var H=S.context,ee=c.contextType;typeof ee=="object"&&ee!==null?ee=dr(ee):(ee=jn(c)?Ro:xn.current,ee=js(s,ee));var ce=c.getDerivedStateFromProps,pe=typeof ce=="function"||typeof S.getSnapshotBeforeUpdate=="function";pe||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==h||H!==ee)&&g2(s,S,h,ee),Vi=!1;var ue=s.memoizedState;S.state=ue,td(s,h,S,E),H=s.memoizedState,L!==h||ue!==H||zn.current||Vi?(typeof ce=="function"&&(Hm(s,c,ce,h),H=s.memoizedState),(L=Vi||p2(s,c,L,h,ue,H,ee))?(pe||typeof S.UNSAFE_componentWillMount!="function"&&typeof S.componentWillMount!="function"||(typeof S.componentWillMount=="function"&&S.componentWillMount(),typeof S.UNSAFE_componentWillMount=="function"&&S.UNSAFE_componentWillMount()),typeof S.componentDidMount=="function"&&(s.flags|=4194308)):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=h,s.memoizedState=H),S.props=h,S.state=H,S.context=ee,h=L):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,$x(i,s),L=s.memoizedProps,ee=s.type===s.elementType?L:Ar(s.type,L),S.props=ee,pe=s.pendingProps,ue=S.context,H=c.contextType,typeof H=="object"&&H!==null?H=dr(H):(H=jn(c)?Ro:xn.current,H=js(s,H));var ve=c.getDerivedStateFromProps;(ce=typeof ve=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(L!==pe||ue!==H)&&g2(s,S,h,H),Vi=!1,ue=s.memoizedState,S.state=ue,td(s,h,S,E);var Pe=s.memoizedState;L!==pe||ue!==Pe||zn.current||Vi?(typeof ve=="function"&&(Hm(s,c,ve,h),Pe=s.memoizedState),(ee=Vi||p2(s,c,ee,h,ue,Pe,H)||!1)?(ce||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Pe,H),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Pe,H)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Pe),S.props=h,S.state=Pe,S.context=H,h=ee):(typeof S.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),h=!1)}return qm(i,s,c,h,b,E)}function qm(i,s,c,h,E,b){A2(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&Ix(s,c,!1),yi(i,s,b);h=s.stateNode,hU.current=s;var L=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Ys(s,i.child,null,b),s.child=Ys(s,null,L,b)):On(i,s,L,b),s.memoizedState=h.state,E&&Ix(s,c,!0),s.child}function k2(i){var s=i.stateNode;s.pendingContext?Px(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Px(i,s.context,!1),km(i,s.containerInfo)}function N2(i,s,c,h,E){return qs(),wm(E),s.flags|=256,On(i,s,c,h),s.child}var Ym={dehydrated:null,treeContext:null,retryLane:0};function Wm(i){return{baseLanes:i,cachePool:null,transitions:null}}function P2(i,s,c){var h=s.pendingProps,E=Ot.current,b=!1,S=(s.flags&128)!==0,L;if((L=S)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(b=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Tt(Ot,E&1),i===null)return Tm(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(S=h.children,i=h.fallback,b?(h=s.mode,b=s.child,S={mode:"hidden",children:S},(h&1)===0&&b!==null?(b.childLanes=0,b.pendingProps=S):b=_d(S,h,0,null),i=$o(i,h,c,null),b.return=s,i.return=s,b.sibling=i,s.child=b,s.child.memoizedState=Wm(c),s.memoizedState=Ym,i):Gm(s,S));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return pU(i,s,S,h,L,E,c);if(b){b=h.fallback,S=s.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==E?(h=s.child,h.childLanes=0,h.pendingProps=H,s.deletions=null):(h=Qi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?b=Qi(L,b):(b=$o(b,S,c,null),b.flags|=2),b.return=s,h.return=s,h.sibling=b,s.child=h,h=b,b=s.child,S=i.child.memoizedState,S=S===null?Wm(c):{baseLanes:S.baseLanes|c,cachePool:null,transitions:S.transitions},b.memoizedState=S,b.childLanes=i.childLanes&~c,s.memoizedState=Ym,h}return b=i.child,i=b.sibling,h=Qi(b,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=c),h.return=s,h.sibling=null,i!==null&&(c=s.deletions,c===null?(s.deletions=[i],s.flags|=16):c.push(i)),s.child=h,s.memoizedState=null,h}function Gm(i,s){return s=_d({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function ld(i,s,c,h){return h!==null&&wm(h),Ys(s,i.child,null,c),i=Gm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function pU(i,s,c,h,E,b,S){if(c)return s.flags&256?(s.flags&=-257,h=jm(Error(n(422))),ld(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=_d({mode:"visible",children:h.children},E,0,null),b=$o(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&Ys(s,i.child,null,S),s.child.memoizedState=Wm(S),s.memoizedState=Ym,b);if((s.mode&1)===0)return ld(i,s,S,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,b=Error(n(419)),h=jm(b,h,void 0),ld(i,s,S,h)}if(L=(S&i.childLanes)!==0,$n||L){if(h=an,h!==null){switch(S&-S){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|S))!==0?0:E,E!==0&&E!==b.retryLane&&(b.retryLane=E,gi(i,E),Nr(h,i,E,-1))}return c0(),h=jm(Error(n(421))),ld(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=CU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,tr=Hi(E.nextSibling),er=s,kt=!0,vr=null,i!==null&&(lr[cr++]=pi,lr[cr++]=mi,lr[cr++]=Lo,pi=i.id,mi=i.overflow,Lo=s),s=Gm(s,h.children),s.flags|=4096,s)}function O2(i,s,c){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),vm(i.return,s,c)}function Xm(i,s,c,h,E){var b=i.memoizedState;b===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:c,tailMode:E}:(b.isBackwards=s,b.rendering=null,b.renderingStartTime=0,b.last=h,b.tail=c,b.tailMode=E)}function I2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(On(i,s,h.children,c),h=Ot.current,(h&2)!==0)h=h&1|2,s.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=s.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&O2(i,c,s);else if(i.tag===19)O2(i,c,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Tt(Ot,h),(s.mode&1)===0)s.memoizedState=null;else switch(E){case"forwards":for(c=s.child,E=null;c!==null;)i=c.alternate,i!==null&&nd(i)===null&&(E=c),c=c.sibling;c=E,c===null?(E=s.child,s.child=null):(E=c.sibling,c.sibling=null),Xm(s,!1,E,c,b);break;case"backwards":for(c=null,E=s.child,s.child=null;E!==null;){if(i=E.alternate,i!==null&&nd(i)===null){s.child=E;break}i=E.sibling,E.sibling=c,c=E,E=i}Xm(s,!0,c,null,b);break;case"together":Xm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function cd(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function yi(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),Uo|=s.lanes,(c&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,c=Qi(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=Qi(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function mU(i,s,c){switch(s.tag){case 3:k2(s),qs();break;case 5:Yx(s);break;case 1:jn(s.type)&&Yc(s);break;case 4:km(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(Jc,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Ot,Ot.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?P2(i,s,c):(Tt(Ot,Ot.current&1),i=yi(i,s,c),i!==null?i.sibling:null);Tt(Ot,Ot.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return I2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Ot,Ot.current),h)break;return null;case 22:case 23:return s.lanes=0,v2(i,s,c)}return yi(i,s,c)}var R2,Km,L2,D2;R2=function(i,s){for(var c=s.child;c!==null;){if(c.tag===5||c.tag===6)i.appendChild(c.stateNode);else if(c.tag!==4&&c.child!==null){c.child.return=c,c=c.child;continue}if(c===s)break;for(;c.sibling===null;){if(c.return===null||c.return===s)return;c=c.return}c.sibling.return=c.return,c=c.sibling}},Km=function(){},L2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,Fo(Xr.current);var b=null;switch(c){case"input":E=Pt(i,E),h=Pt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),b=[];break;case"textarea":E=Le(i,E),h=Le(i,h),b=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=$c)}fn(c,h);var S;c=null;for(ee in E)if(!h.hasOwnProperty(ee)&&E.hasOwnProperty(ee)&&E[ee]!=null)if(ee==="style"){var L=E[ee];for(S in L)L.hasOwnProperty(S)&&(c||(c={}),c[S]="")}else ee!=="dangerouslySetInnerHTML"&&ee!=="children"&&ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&ee!=="autoFocus"&&(o.hasOwnProperty(ee)?b||(b=[]):(b=b||[]).push(ee,null));for(ee in h){var H=h[ee];if(L=E!=null?E[ee]:void 0,h.hasOwnProperty(ee)&&H!==L&&(H!=null||L!=null))if(ee==="style")if(L){for(S in L)!L.hasOwnProperty(S)||H&&H.hasOwnProperty(S)||(c||(c={}),c[S]="");for(S in H)H.hasOwnProperty(S)&&L[S]!==H[S]&&(c||(c={}),c[S]=H[S])}else c||(b||(b=[]),b.push(ee,c)),c=H;else ee==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(b=b||[]).push(ee,H)):ee==="children"?typeof H!="string"&&typeof H!="number"||(b=b||[]).push(ee,""+H):ee!=="suppressContentEditableWarning"&&ee!=="suppressHydrationWarning"&&(o.hasOwnProperty(ee)?(H!=null&&ee==="onScroll"&&St("scroll",i),b||L===H||(b=[])):(b=b||[]).push(ee,H))}c&&(b=b||[]).push("style",c);var ee=b;(s.updateQueue=ee)&&(s.flags|=4)}},D2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Fu(i,s){if(!kt)switch(i.tailMode){case"hidden":s=i.tail;for(var c=null;s!==null;)s.alternate!==null&&(c=s),s=s.sibling;c===null?i.tail=null:c.sibling=null;break;case"collapsed":c=i.tail;for(var h=null;c!==null;)c.alternate!==null&&(h=c),c=c.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function vn(i){var s=i.alternate!==null&&i.alternate.child===i.child,c=0,h=0;if(s)for(var E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)c|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=c,s}function gU(i,s,c){var h=s.pendingProps;switch(ym(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return vn(s),null;case 1:return jn(s.type)&&qc(),vn(s),null;case 3:return h=s.stateNode,Xs(),vt(zn),vt(xn),Om(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Kc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,vr!==null&&(a0(vr),vr=null))),Km(i,s),vn(s),null;case 5:Nm(s);var E=Fo(Iu.current);if(c=s.type,i!==null&&s.stateNode!=null)L2(i,s,c,h,E),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return vn(s),null}if(i=Fo(Xr.current),Kc(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[Gr]=s,h[Cu]=b,i=(s.mode&1)!==0,c){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":Qn(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":Be(h,b),St("invalid",h)}fn(c,b),E=null;for(var S in b)if(b.hasOwnProperty(S)){var L=b[S];S==="children"?typeof L=="string"?h.textContent!==L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(b.suppressHydrationWarning!==!0&&jc(h.textContent,L,i),E=["children",""+L]):o.hasOwnProperty(S)&&L!=null&&S==="onScroll"&&St("scroll",h)}switch(c){case"input":cn(h),qe(h,b,!0);break;case"textarea":cn(h),gt(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=$c)}h=E,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=Z(c)),i==="http://www.w3.org/1999/xhtml"?c==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(c,{is:h.is}):(i=S.createElement(c),c==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,c),i[Gr]=s,i[Cu]=h,R2(i,s,!1,!1),s.stateNode=i;e:{switch(S=Yr(c,h),c){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<Su.length;E++)St(Su[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":Qn(i,h),E=Pt(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":Be(i,h),E=Le(i,h),St("invalid",i);break;default:E=h}fn(c,E),L=E;for(b in L)if(L.hasOwnProperty(b)){var H=L[b];b==="style"?dn(i,H):b==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ye(i,H)):b==="children"?typeof H=="string"?(c!=="textarea"||H!=="")&&Re(i,H):typeof H=="number"&&Re(i,""+H):b!=="suppressContentEditableWarning"&&b!=="suppressHydrationWarning"&&b!=="autoFocus"&&(o.hasOwnProperty(b)?H!=null&&b==="onScroll"&&St("scroll",i):H!=null&&A(i,b,H,S))}switch(c){case"input":cn(i),qe(i,h,!1);break;case"textarea":cn(i),gt(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ie(h.value));break;case"select":i.multiple=!!h.multiple,b=h.value,b!=null?xe(i,!!h.multiple,b,!1):h.defaultValue!=null&&xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=$c)}switch(c){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return vn(s),null;case 6:if(i&&s.stateNode!=null)D2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=Fo(Iu.current),Fo(Xr.current),Kc(s)){if(h=s.stateNode,c=s.memoizedProps,h[Gr]=s,(b=h.nodeValue!==c)&&(i=er,i!==null))switch(i.tag){case 3:jc(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&jc(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[Gr]=s,s.stateNode=h}return vn(s),null;case 13:if(vt(Ot),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(kt&&tr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)Bx(),qs(),s.flags|=98560,b=!1;else if(b=Kc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!b)throw Error(n(318));if(b=s.memoizedState,b=b!==null?b.dehydrated:null,!b)throw Error(n(317));b[Gr]=s}else qs(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;vn(s),b=!1}else vr!==null&&(a0(vr),vr=null),b=!0;if(!b)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=c,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(Ot.current&1)!==0?Qt===0&&(Qt=3):c0())),s.updateQueue!==null&&(s.flags|=4),vn(s),null);case 4:return Xs(),Km(i,s),i===null&&vu(s.stateNode.containerInfo),vn(s),null;case 10:return Sm(s.type._context),vn(s),null;case 17:return jn(s.type)&&qc(),vn(s),null;case 19:if(vt(Ot),b=s.memoizedState,b===null)return vn(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Fu(b,!1);else{if(Qt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=nd(i),S!==null){for(s.flags|=128,Fu(b,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=c,c=s.child;c!==null;)b=c,i=h,b.flags&=14680066,S=b.alternate,S===null?(b.childLanes=0,b.lanes=i,b.child=null,b.subtreeFlags=0,b.memoizedProps=null,b.memoizedState=null,b.updateQueue=null,b.dependencies=null,b.stateNode=null):(b.childLanes=S.childLanes,b.lanes=S.lanes,b.child=S.child,b.subtreeFlags=0,b.deletions=null,b.memoizedProps=S.memoizedProps,b.memoizedState=S.memoizedState,b.updateQueue=S.updateQueue,b.type=S.type,i=S.dependencies,b.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),c=c.sibling;return Tt(Ot,Ot.current&1|2),s.child}i=i.sibling}b.tail!==null&&Bt()>Zs&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304)}else{if(!h)if(i=nd(S),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Fu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!kt)return vn(s),null}else 2*Bt()-b.renderingStartTime>Zs&&c!==1073741824&&(s.flags|=128,h=!0,Fu(b,!1),s.lanes=4194304);b.isBackwards?(S.sibling=s.child,s.child=S):(c=b.last,c!==null?c.sibling=S:s.child=S,b.last=S)}return b.tail!==null?(s=b.tail,b.rendering=s,b.tail=s.sibling,b.renderingStartTime=Bt(),s.sibling=null,c=Ot.current,Tt(Ot,h?c&1|2:c&1),s):(vn(s),null);case 22:case 23:return l0(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(nr&1073741824)!==0&&(vn(s),s.subtreeFlags&6&&(s.flags|=8192)):vn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function EU(i,s){switch(ym(s),s.tag){case 1:return jn(s.type)&&qc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return Xs(),vt(zn),vt(xn),Om(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Nm(s),null;case 13:if(vt(Ot),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));qs()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(Ot),null;case 4:return Xs(),null;case 10:return Sm(s.type._context),null;case 22:case 23:return l0(),null;case 24:return null;default:return null}}var dd=!1,An=!1,yU=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Qs(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Dt(i,s,h)}else c.current=null}function Qm(i,s,c){try{c()}catch(h){Dt(i,s,h)}}var M2=!1;function bU(i,s){if(lm=Oc,i=px(),tm(i)){if("selectionStart"in i)var c={start:i.selectionStart,end:i.selectionEnd};else e:{c=(c=i.ownerDocument)&&c.defaultView||window;var h=c.getSelection&&c.getSelection();if(h&&h.rangeCount!==0){c=h.anchorNode;var E=h.anchorOffset,b=h.focusNode;h=h.focusOffset;try{c.nodeType,b.nodeType}catch(ye){c=null;break e}var S=0,L=-1,H=-1,ee=0,ce=0,pe=i,ue=null;t:for(;;){for(var ve;pe!==c||E!==0&&pe.nodeType!==3||(L=S+E),pe!==b||h!==0&&pe.nodeType!==3||(H=S+h),pe.nodeType===3&&(S+=pe.nodeValue.length),(ve=pe.firstChild)!==null;)ue=pe,pe=ve;for(;;){if(pe===i)break t;if(ue===c&&++ee===E&&(L=S),ue===b&&++ce===h&&(H=S),(ve=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=ve}c=L===-1||H===-1?null:{start:L,end:H}}else c=null}c=c||{start:0,end:0}}else c=null;for(cm={focusedElem:i,selectionRange:c},Oc=!1,Ne=s;Ne!==null;)if(s=Ne,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Ne=i;else for(;Ne!==null;){s=Ne;try{var Pe=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Pe!==null){var Oe=Pe.memoizedProps,Ut=Pe.memoizedState,G=s.stateNode,q=G.getSnapshotBeforeUpdate(s.elementType===s.type?Oe:Ar(s.type,Oe),Ut);G.__reactInternalSnapshotBeforeUpdate=q}break;case 3:var Q=s.stateNode.containerInfo;Q.nodeType===1?Q.textContent="":Q.nodeType===9&&Q.documentElement&&Q.removeChild(Q.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(ye){Dt(s,s.return,ye)}if(i=s.sibling,i!==null){i.return=s.return,Ne=i;break}Ne=s.return}return Pe=M2,M2=!1,Pe}function Bu(i,s,c){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var b=E.destroy;E.destroy=void 0,b!==void 0&&Qm(s,c,b)}E=E.next}while(E!==h)}}function fd(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var c=s=s.next;do{if((c.tag&i)===i){var h=c.create;c.destroy=h()}c=c.next}while(c!==s)}}function Jm(i){var s=i.ref;if(s!==null){var c=i.stateNode;i.tag,i=c,typeof s=="function"?s(i):s.current=i}}function F2(i){var s=i.alternate;s!==null&&(i.alternate=null,F2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Gr],delete s[Cu],delete s[pm],delete s[tU],delete s[nU])),i.stateNode=null,i.return=null,i.dependencies=null,i.memoizedProps=null,i.memoizedState=null,i.pendingProps=null,i.stateNode=null,i.updateQueue=null}function B2(i){return i.tag===5||i.tag===3||i.tag===4}function U2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||B2(i.return))return null;i=i.return}for(i.sibling.return=i.return,i=i.sibling;i.tag!==5&&i.tag!==6&&i.tag!==18;){if(i.flags&2||i.child===null||i.tag===4)continue e;i.child.return=i,i=i.child}if(!(i.flags&2))return i.stateNode}}function Zm(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.nodeType===8?c.parentNode.insertBefore(i,s):c.insertBefore(i,s):(c.nodeType===8?(s=c.parentNode,s.insertBefore(i,c)):(s=c,s.appendChild(i)),c=c._reactRootContainer,c!=null||s.onclick!==null||(s.onclick=$c));else if(h!==4&&(i=i.child,i!==null))for(Zm(i,s,c),i=i.sibling;i!==null;)Zm(i,s,c),i=i.sibling}function e0(i,s,c){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?c.insertBefore(i,s):c.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(e0(i,s,c),i=i.sibling;i!==null;)e0(i,s,c),i=i.sibling}var hn=null,Cr=!1;function Yi(i,s,c){for(c=c.child;c!==null;)H2(i,s,c),c=c.sibling}function H2(i,s,c){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(vc,c)}catch(L){}switch(c.tag){case 5:An||Qs(c,s);case 6:var h=hn,E=Cr;hn=null,Yi(i,s,c),hn=h,Cr=E,hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):hn.removeChild(c.stateNode));break;case 18:hn!==null&&(Cr?(i=hn,c=c.stateNode,i.nodeType===8?hm(i.parentNode,c):i.nodeType===1&&hm(i,c),gu(i)):hm(hn,c.stateNode));break;case 4:h=hn,E=Cr,hn=c.stateNode.containerInfo,Cr=!0,Yi(i,s,c),hn=h,Cr=E;break;case 0:case 11:case 14:case 15:if(!An&&(h=c.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var b=E,S=b.destroy;b=b.tag,S!==void 0&&((b&2)!==0||(b&4)!==0)&&Qm(c,s,S),E=E.next}while(E!==h)}Yi(i,s,c);break;case 1:if(!An&&(Qs(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(L){Dt(c,s,L)}Yi(i,s,c);break;case 21:Yi(i,s,c);break;case 22:c.mode&1?(An=(h=An)||c.memoizedState!==null,Yi(i,s,c),An=h):Yi(i,s,c);break;default:Yi(i,s,c)}}function z2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new yU),s.forEach(function(h){var E=kU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function kr(i,s){var c=s.deletions;if(c!==null)for(var h=0;h<c.length;h++){var E=c[h];try{var b=i,S=s,L=S;e:for(;L!==null;){switch(L.tag){case 5:hn=L.stateNode,Cr=!1;break e;case 3:hn=L.stateNode.containerInfo,Cr=!0;break e;case 4:hn=L.stateNode.containerInfo,Cr=!0;break e}L=L.return}if(hn===null)throw Error(n(160));H2(b,S,E),hn=null,Cr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(ee){Dt(E,s,ee)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)j2(s,i),s=s.sibling}function j2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(kr(s,i),Qr(i),h&4){try{Bu(3,i,i.return),fd(3,i)}catch(Oe){Dt(i,i.return,Oe)}try{Bu(5,i,i.return)}catch(Oe){Dt(i,i.return,Oe)}}break;case 1:kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return);break;case 5:if(kr(s,i),Qr(i),h&512&&c!==null&&Qs(c,c.return),i.flags&32){var E=i.stateNode;try{Re(E,"")}catch(Oe){Dt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var b=i.memoizedProps,S=c!==null?c.memoizedProps:b,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&b.type==="radio"&&b.name!=null&&_n(E,b),Yr(L,S);var ee=Yr(L,b);for(S=0;S<H.length;S+=2){var ce=H[S],pe=H[S+1];ce==="style"?dn(E,pe):ce==="dangerouslySetInnerHTML"?Ye(E,pe):ce==="children"?Re(E,pe):A(E,ce,pe,ee)}switch(L){case"input":Gt(E,b);break;case"textarea":Xe(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ve=b.value;ve!=null?xe(E,!!b.multiple,ve,!1):ue!==!!b.multiple&&(b.defaultValue!=null?xe(E,!!b.multiple,b.defaultValue,!0):xe(E,!!b.multiple,b.multiple?[]:"",!1))}E[Cu]=b}catch(Oe){Dt(i,i.return,Oe)}}break;case 6:if(kr(s,i),Qr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Oe){Dt(i,i.return,Oe)}}break;case 3:if(kr(s,i),Qr(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{gu(s.containerInfo)}catch(Oe){Dt(i,i.return,Oe)}break;case 4:kr(s,i),Qr(i);break;case 13:kr(s,i),Qr(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(r0=Bt())),h&4&&z2(i);break;case 22:if(ce=c!==null&&c.memoizedState!==null,i.mode&1?(An=(ee=An)||ce,kr(s,i),An=ee):kr(s,i),Qr(i),h&8192){if(ee=i.memoizedState!==null,(i.stateNode.isHidden=ee)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(pe=Ne=ce;Ne!==null;){switch(ue=Ne,ve=ue.child,ue.tag){case 0:case 11:case 14:case 15:Bu(4,ue,ue.return);break;case 1:Qs(ue,ue.return);var Pe=ue.stateNode;if(typeof Pe.componentWillUnmount=="function"){h=ue,c=ue.return;try{s=h,Pe.props=s.memoizedProps,Pe.state=s.memoizedState,Pe.componentWillUnmount()}catch(Oe){Dt(h,c,Oe)}}break;case 5:Qs(ue,ue.return);break;case 22:if(ue.memoizedState!==null){q2(pe);continue}}ve!==null?(ve.return=ue,Ne=ve):q2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,ee?(b=E.style,typeof b.setProperty=="function"?b.setProperty("display","none","important"):b.display="none"):(L=pe.stateNode,H=pe.memoizedProps.style,S=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=qt("display",S))}catch(Oe){Dt(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=ee?"":pe.memoizedProps}catch(Oe){Dt(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:kr(s,i),Qr(i),h&4&&z2(i);break;case 21:break;default:kr(s,i),Qr(i)}}function Qr(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(B2(c)){var h=c;break e}c=c.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Re(E,""),h.flags&=-33);var b=U2(i);e0(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,L=U2(i);Zm(i,L,S);break;default:throw Error(n(161))}}catch(H){Dt(i,i.return,H)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function TU(i,s,c){Ne=i,$2(i)}function $2(i,s,c){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,b=E.child;if(E.tag===22&&h){var S=E.memoizedState!==null||dd;if(!S){var L=E.alternate,H=L!==null&&L.memoizedState!==null||An;L=dd;var ee=An;if(dd=S,(An=H)&&!ee)for(Ne=E;Ne!==null;)S=Ne,H=S.child,S.tag===22&&S.memoizedState!==null?Y2(E):H!==null?(H.return=S,Ne=H):Y2(E);for(;b!==null;)Ne=b,$2(b),b=b.sibling;Ne=E,dd=L,An=ee}V2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Ne=b):V2(i)}}function V2(i){for(;Ne!==null;){var s=Ne;if((s.flags&8772)!==0){var c=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:An||fd(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!An)if(c===null)h.componentDidMount();else{var E=s.elementType===s.type?c.memoizedProps:Ar(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&qx(s,b,h);break;case 3:var S=s.updateQueue;if(S!==null){if(c=null,s.child!==null)switch(s.child.tag){case 5:c=s.child.stateNode;break;case 1:c=s.child.stateNode}qx(s,S,c)}break;case 5:var L=s.stateNode;if(c===null&&s.flags&4){c=L;var H=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&c.focus();break;case"img":H.src&&(c.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var ee=s.alternate;if(ee!==null){var ce=ee.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&gu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}An||s.flags&512&&Jm(s)}catch(ue){Dt(s,s.return,ue)}}if(s===i){Ne=null;break}if(c=s.sibling,c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function q2(i){for(;Ne!==null;){var s=Ne;if(s===i){Ne=null;break}var c=s.sibling;if(c!==null){c.return=s.return,Ne=c;break}Ne=s.return}}function Y2(i){for(;Ne!==null;){var s=Ne;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{fd(4,s)}catch(H){Dt(s,c,H)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch(H){Dt(s,E,H)}}var b=s.return;try{Jm(s)}catch(H){Dt(s,b,H)}break;case 5:var S=s.return;try{Jm(s)}catch(H){Dt(s,S,H)}}}catch(H){Dt(s,s.return,H)}if(s===i){Ne=null;break}var L=s.sibling;if(L!==null){L.return=s.return,Ne=L;break}Ne=s.return}}var wU=Math.ceil,hd=U.ReactCurrentDispatcher,t0=U.ReactCurrentOwner,hr=U.ReactCurrentBatchConfig,ot=0,an=null,Yt=null,pn=0,nr=0,Js=zi(0),Qt=0,Uu=null,Uo=0,pd=0,n0=0,Hu=null,Vn=null,r0=0,Zs=1/0,bi=null,md=!1,i0=null,Wi=null,gd=!1,Gi=null,Ed=0,zu=0,o0=null,yd=-1,bd=0;function In(){return(ot&6)!==0?Bt():yd!==-1?yd:yd=Bt()}function Xi(i){return(i.mode&1)===0?1:(ot&2)!==0&&pn!==0?pn&-pn:iU.transition!==null?(bd===0&&(bd=U_()),bd):(i=dt,i!==0||(i=window.event,i=i===void 0?16:G_(i.type)),i)}function Nr(i,s,c,h){if(50<zu)throw zu=0,o0=null,Error(n(185));du(i,c,h),((ot&2)===0||i!==an)&&(i===an&&((ot&2)===0&&(pd|=c),Qt===4&&Ki(i,pn)),qn(i,h),c===1&&ot===0&&(s.mode&1)===0&&(Zs=Bt()+500,Wc&&$i()))}function qn(i,s){var c=i.callbackNode;iB(i,s);var h=kc(i,i===an?pn:0);if(h===0)c!==null&&M_(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&M_(c),s===1)i.tag===0?rU(G2.bind(null,i)):Rx(G2.bind(null,i)),ZB(function(){(ot&6)===0&&$i()}),c=null;else{switch(H_(h)){case 1:c=Bp;break;case 4:c=F_;break;case 16:c=Sc;break;case 536870912:c=B_;break;default:c=Sc}c=nS(c,W2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function W2(i,s){if(yd=-1,bd=0,(ot&6)!==0)throw Error(n(327));var c=i.callbackNode;if(ea()&&i.callbackNode!==c)return null;var h=kc(i,i===an?pn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Td(i,h);else{s=h;var E=ot;ot|=2;var b=K2();(an!==i||pn!==s)&&(bi=null,Zs=Bt()+500,zo(i,s));do try{SU();break}catch(L){X2(i,L)}while(!0);xm(),hd.current=b,ot=E,Yt!==null?s=0:(an=null,pn=0,s=Qt)}if(s!==0){if(s===2&&(E=Up(i),E!==0&&(h=E,s=s0(i,E))),s===1)throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;if(s===6)Ki(i,h);else{if(E=i.current.alternate,(h&30)===0&&!_U(E)&&(s=Td(i,h),s===2&&(b=Up(i),b!==0&&(h=b,s=s0(i,b))),s===1))throw c=Uu,zo(i,0),Ki(i,h),qn(i,Bt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:jo(i,Vn,bi);break;case 3:if(Ki(i,h),(h&130023424)===h&&(s=r0+500-Bt(),10<s)){if(kc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){In(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),s);break}jo(i,Vn,bi);break;case 4:if(Ki(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-xr(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Bt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*wU(h/1960))-h,10<h){i.timeoutHandle=fm(jo.bind(null,i,Vn,bi),h);break}jo(i,Vn,bi);break;case 5:jo(i,Vn,bi);break;default:throw Error(n(329))}}}return qn(i,Bt()),i.callbackNode===c?W2.bind(null,i):null}function s0(i,s){var c=Hu;return i.current.memoizedState.isDehydrated&&(zo(i,s).flags|=256),i=Td(i,s),i!==2&&(s=Vn,Vn=c,s!==null&&a0(s)),i}function a0(i){Vn===null?Vn=i:Vn.push.apply(Vn,i)}function _U(i){for(var s=i;;){if(s.flags&16384){var c=s.updateQueue;if(c!==null&&(c=c.stores,c!==null))for(var h=0;h<c.length;h++){var E=c[h],b=E.getSnapshot;E=E.value;try{if(!Sr(b(),E))return!1}catch(S){return!1}}}if(c=s.child,s.subtreeFlags&16384&&c!==null)c.return=s,s=c;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Ki(i,s){for(s&=~n0,s&=~pd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-xr(s),h=1<<c;i[c]=-1,s&=~h}}function G2(i){if((ot&6)!==0)throw Error(n(327));ea();var s=kc(i,0);if((s&1)===0)return qn(i,Bt()),null;var c=Td(i,s);if(i.tag!==0&&c===2){var h=Up(i);h!==0&&(s=h,c=s0(i,h))}if(c===1)throw c=Uu,zo(i,0),Ki(i,s),qn(i,Bt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,jo(i,Vn,bi),qn(i,Bt()),null}function u0(i,s){var c=ot;ot|=1;try{return i(s)}finally{ot=c,ot===0&&(Zs=Bt()+500,Wc&&$i())}}function Ho(i){Gi!==null&&Gi.tag===0&&(ot&6)===0&&ea();var s=ot;ot|=1;var c=hr.transition,h=dt;try{if(hr.transition=null,dt=1,i)return i()}finally{dt=h,hr.transition=c,ot=s,(ot&6)===0&&$i()}}function l0(){nr=Js.current,vt(Js)}function zo(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,JB(c)),Yt!==null)for(c=Yt.return;c!==null;){var h=c;switch(ym(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&qc();break;case 3:Xs(),vt(zn),vt(xn),Om();break;case 5:Nm(h);break;case 4:Xs();break;case 13:vt(Ot);break;case 19:vt(Ot);break;case 10:Sm(h.type._context);break;case 22:case 23:l0()}c=c.return}if(an=i,Yt=i=Qi(i.current,null),pn=nr=s,Qt=0,Uu=null,n0=pd=Uo=0,Vn=Hu=null,Mo!==null){for(s=0;s<Mo.length;s++)if(c=Mo[s],h=c.interleaved,h!==null){c.interleaved=null;var E=h.next,b=c.pending;if(b!==null){var S=b.next;b.next=E,h.next=S}c.pending=h}Mo=null}return i}function X2(i,s){do{var c=Yt;try{if(xm(),rd.current=ad,id){for(var h=It.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}id=!1}if(Bo=0,sn=Kt=It=null,Ru=!1,Lu=0,t0.current=null,c===null||c.return===null){Qt=1,Uu=s,Yt=null;break}e:{var b=i,S=c.return,L=c,H=s;if(s=pn,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var ee=H,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var ve=T2(S);if(ve!==null){ve.flags&=-257,w2(ve,S,L,b,s),ve.mode&1&&b2(b,ee,s),s=ve,H=ee;var Pe=s.updateQueue;if(Pe===null){var Oe=new Set;Oe.add(H),s.updateQueue=Oe}else Pe.add(H);break e}else{if((s&1)===0){b2(b,ee,s),c0();break e}H=Error(n(426))}}else if(kt&&L.mode&1){var Ut=T2(S);if(Ut!==null){(Ut.flags&65536)===0&&(Ut.flags|=256),w2(Ut,S,L,b,s),wm(Ks(H,L));break e}}b=H=Ks(H,L),Qt!==4&&(Qt=2),Hu===null?Hu=[b]:Hu.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=E2(b,H,s);Vx(b,G);break e;case 1:L=H;var q=b.type,Q=b.stateNode;if((b.flags&128)===0&&(typeof q.getDerivedStateFromError=="function"||Q!==null&&typeof Q.componentDidCatch=="function"&&(Wi===null||!Wi.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var ye=y2(b,L,s);Vx(b,ye);break e}}b=b.return}while(b!==null)}J2(c)}catch(De){s=De,Yt===c&&c!==null&&(Yt=c=c.return);continue}break}while(!0)}function K2(){var i=hd.current;return hd.current=ad,i===null?ad:i}function c0(){(Qt===0||Qt===3||Qt===2)&&(Qt=4),an===null||(Uo&268435455)===0&&(pd&268435455)===0||Ki(an,pn)}function Td(i,s){var c=ot;ot|=2;var h=K2();(an!==i||pn!==s)&&(bi=null,zo(i,s));do try{xU();break}catch(E){X2(i,E)}while(!0);if(xm(),ot=c,hd.current=h,Yt!==null)throw Error(n(261));return an=null,pn=0,Qt}function xU(){for(;Yt!==null;)Q2(Yt)}function SU(){for(;Yt!==null&&!X7();)Q2(Yt)}function Q2(i){var s=tS(i.alternate,i,nr);i.memoizedProps=i.pendingProps,s===null?J2(i):Yt=s,t0.current=null}function J2(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=gU(c,s,nr),c!==null){Yt=c;return}}else{if(c=EU(c,s),c!==null){c.flags&=32767,Yt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{Qt=6,Yt=null;return}}if(s=s.sibling,s!==null){Yt=s;return}Yt=s=i}while(s!==null);Qt===0&&(Qt=5)}function jo(i,s,c){var h=dt,E=hr.transition;try{hr.transition=null,dt=1,vU(i,s,c,h)}finally{hr.transition=E,dt=h}return null}function vU(i,s,c,h){do ea();while(Gi!==null);if((ot&6)!==0)throw Error(n(327));c=i.finishedWork;var E=i.finishedLanes;if(c===null)return null;if(i.finishedWork=null,i.finishedLanes=0,c===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var b=c.lanes|c.childLanes;if(oB(i,b),i===an&&(Yt=an=null,pn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||gd||(gd=!0,nS(Sc,function(){return ea(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=hr.transition,hr.transition=null;var S=dt;dt=1;var L=ot;ot|=4,t0.current=null,bU(i,c),j2(c,i),qB(cm),Oc=!!lm,cm=lm=null,i.current=c,TU(c),K7(),ot=L,dt=S,hr.transition=b}else i.current=c;if(gd&&(gd=!1,Gi=i,Ed=E),b=i.pendingLanes,b===0&&(Wi=null),Z7(c.stateNode),qn(i,Bt()),s!==null)for(h=i.onRecoverableError,c=0;c<s.length;c++)E=s[c],h(E.value,{componentStack:E.stack,digest:E.digest});if(md)throw md=!1,i=i0,i0=null,i;return(Ed&1)!==0&&i.tag!==0&&ea(),b=i.pendingLanes,(b&1)!==0?i===o0?zu++:(zu=0,o0=i):zu=0,$i(),null}function ea(){if(Gi!==null){var i=H_(Ed),s=hr.transition,c=dt;try{if(hr.transition=null,dt=16>i?16:i,Gi===null)var h=!1;else{if(i=Gi,Gi=null,Ed=0,(ot&6)!==0)throw Error(n(331));var E=ot;for(ot|=4,Ne=i.current;Ne!==null;){var b=Ne,S=b.child;if((Ne.flags&16)!==0){var L=b.deletions;if(L!==null){for(var H=0;H<L.length;H++){var ee=L[H];for(Ne=ee;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Bu(8,ce,b)}var pe=ce.child;if(pe!==null)pe.return=ce,Ne=pe;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,ve=ce.return;if(F2(ce),ce===ee){Ne=null;break}if(ue!==null){ue.return=ve,Ne=ue;break}Ne=ve}}}var Pe=b.alternate;if(Pe!==null){var Oe=Pe.child;if(Oe!==null){Pe.child=null;do{var Ut=Oe.sibling;Oe.sibling=null,Oe=Ut}while(Oe!==null)}}Ne=b}}if((b.subtreeFlags&2064)!==0&&S!==null)S.return=b,Ne=S;else e:for(;Ne!==null;){if(b=Ne,(b.flags&2048)!==0)switch(b.tag){case 0:case 11:case 15:Bu(9,b,b.return)}var G=b.sibling;if(G!==null){G.return=b.return,Ne=G;break e}Ne=b.return}}var q=i.current;for(Ne=q;Ne!==null;){S=Ne;var Q=S.child;if((S.subtreeFlags&2064)!==0&&Q!==null)Q.return=S,Ne=Q;else e:for(S=q;Ne!==null;){if(L=Ne,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:fd(9,L)}}catch(De){Dt(L,L.return,De)}if(L===S){Ne=null;break e}var ye=L.sibling;if(ye!==null){ye.return=L.return,Ne=ye;break e}Ne=L.return}}if(ot=E,$i(),Wr&&typeof Wr.onPostCommitFiberRoot=="function")try{Wr.onPostCommitFiberRoot(vc,i)}catch(De){}h=!0}return h}finally{dt=c,hr.transition=s}}return!1}function Z2(i,s,c){s=Ks(c,s),s=E2(i,s,1),i=qi(i,s,1),s=In(),i!==null&&(du(i,1,s),qn(i,s))}function Dt(i,s,c){if(i.tag===3)Z2(i,i,c);else for(;s!==null;){if(s.tag===3){Z2(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Wi===null||!Wi.has(h))){i=Ks(c,i),i=y2(s,i,1),s=qi(s,i,1),i=In(),s!==null&&(du(s,1,i),qn(s,i));break}}s=s.return}}function AU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=In(),i.pingedLanes|=i.suspendedLanes&c,an===i&&(pn&c)===c&&(Qt===4||Qt===3&&(pn&130023424)===pn&&500>Bt()-r0?zo(i,0):n0|=c),qn(i,s)}function eS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Cc,Cc<<=1,(Cc&130023424)===0&&(Cc=4194304)));var c=In();i=gi(i,s),i!==null&&(du(i,s,c),qn(i,c))}function CU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),eS(i,c)}function kU(i,s){var c=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(c=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),eS(i,c)}var tS;tS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||zn.current)$n=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return $n=!1,mU(i,s,c);$n=(i.flags&131072)!==0}else $n=!1,kt&&(s.flags&1048576)!==0&&Lx(s,Xc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;cd(i,s),i=s.pendingProps;var E=js(s,xn.current);Gs(s,c),E=Lm(null,s,h,i,E,c);var b=Dm();return s.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,jn(h)?(b=!0,Yc(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Cm(s),E.updater=ud,s.stateNode=E,E._reactInternals=s,zm(s,h,i,c),s=qm(null,s,h,!0,b,c)):(s.tag=0,kt&&b&&Em(s),On(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(cd(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=PU(h),i=Ar(h,i),E){case 0:s=Vm(null,s,h,i,c);break e;case 1:s=C2(null,s,h,i,c);break e;case 11:s=_2(null,s,h,i,c);break e;case 14:s=x2(null,s,h,Ar(h.type,i),c);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),Vm(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),C2(i,s,h,E,c);case 3:e:{if(k2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,$x(i,s),td(s,h,null,c);var S=s.memoizedState;if(h=S.element,b.isDehydrated)if(b={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=b,s.memoizedState=b,s.flags&256){E=Ks(Error(n(423)),s),s=N2(i,s,h,c,E);break e}else if(h!==E){E=Ks(Error(n(424)),s),s=N2(i,s,h,c,E);break e}else for(tr=Hi(s.stateNode.containerInfo.firstChild),er=s,kt=!0,vr=null,c=zx(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(qs(),h===E){s=yi(i,s,c);break e}On(i,s,h,c)}s=s.child}return s;case 5:return Yx(s),i===null&&Tm(s),h=s.type,E=s.pendingProps,b=i!==null?i.memoizedProps:null,S=E.children,dm(h,E)?S=null:b!==null&&dm(h,b)&&(s.flags|=32),A2(i,s),On(i,s,S,c),s.child;case 6:return i===null&&Tm(s),null;case 13:return P2(i,s,c);case 4:return km(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ys(s,null,h,c):On(i,s,h,c),s.child;case 11:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),_2(i,s,h,E,c);case 7:return On(i,s,s.pendingProps,c),s.child;case 8:return On(i,s,s.pendingProps.children,c),s.child;case 12:return On(i,s,s.pendingProps.children,c),s.child;case 10:e:{if(h=s.type._context,E=s.pendingProps,b=s.memoizedProps,S=E.value,Tt(Jc,h._currentValue),h._currentValue=S,b!==null)if(Sr(b.value,S)){if(b.children===E.children&&!zn.current){s=yi(i,s,c);break e}}else for(b=s.child,b!==null&&(b.return=s);b!==null;){var L=b.dependencies;if(L!==null){S=b.child;for(var H=L.firstContext;H!==null;){if(H.context===h){if(b.tag===1){H=Ei(-1,c&-c),H.tag=2;var ee=b.updateQueue;if(ee!==null){ee=ee.shared;var ce=ee.pending;ce===null?H.next=H:(H.next=ce.next,ce.next=H),ee.pending=H}}b.lanes|=c,H=b.alternate,H!==null&&(H.lanes|=c),vm(b.return,c,s),L.lanes|=c;break}H=H.next}}else if(b.tag===10)S=b.type===s.type?null:b.child;else if(b.tag===18){if(S=b.return,S===null)throw Error(n(341));S.lanes|=c,L=S.alternate,L!==null&&(L.lanes|=c),vm(S,c,s),S=b.sibling}else S=b.child;if(S!==null)S.return=b;else for(S=b;S!==null;){if(S===s){S=null;break}if(b=S.sibling,b!==null){b.return=S.return,S=b;break}S=S.return}b=S}On(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,Gs(s,c),E=dr(E),h=h(E),s.flags|=1,On(i,s,h,c),s.child;case 14:return h=s.type,E=Ar(h,s.pendingProps),E=Ar(h.type,E),x2(i,s,h,E,c);case 15:return S2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:Ar(h,E),cd(i,s),s.tag=1,jn(h)?(i=!0,Yc(s)):i=!1,Gs(s,c),m2(s,h,E),zm(s,h,E,c),qm(null,s,h,!0,i,c);case 19:return I2(i,s,c);case 22:return v2(i,s,c)}throw Error(n(156,s.tag))};function nS(i,s){return D_(i,s)}function NU(i,s,c,h){this.tag=i,this.key=c,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function pr(i,s,c,h){return new NU(i,s,c,h)}function d0(i){return i=i.prototype,!(!i||!i.isReactComponent)}function PU(i){if(typeof i=="function")return d0(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===oe)return 14}return 2}function Qi(i,s){var c=i.alternate;return c===null?(c=pr(i.tag,s,i.key,i.mode),c.elementType=i.elementType,c.type=i.type,c.stateNode=i.stateNode,c.alternate=i,i.alternate=c):(c.pendingProps=s,c.type=i.type,c.flags=0,c.subtreeFlags=0,c.deletions=null),c.flags=i.flags&14680064,c.childLanes=i.childLanes,c.lanes=i.lanes,c.child=i.child,c.memoizedProps=i.memoizedProps,c.memoizedState=i.memoizedState,c.updateQueue=i.updateQueue,s=i.dependencies,c.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},c.sibling=i.sibling,c.index=i.index,c.ref=i.ref,c}function wd(i,s,c,h,E,b){var S=2;if(h=i,typeof i=="function")d0(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case $:return $o(c.children,E,b,s);case ne:S=8,E|=8;break;case de:return i=pr(12,c,s,E|2),i.elementType=de,i.lanes=b,i;case we:return i=pr(13,c,s,E),i.elementType=we,i.lanes=b,i;case re:return i=pr(19,c,s,E),i.elementType=re,i.lanes=b,i;case se:return _d(c,E,b,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:S=10;break e;case ie:S=9;break e;case fe:S=11;break e;case oe:S=14;break e;case Ae:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=pr(S,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function $o(i,s,c,h){return i=pr(7,i,h,s),i.lanes=c,i}function _d(i,s,c,h){return i=pr(22,i,h,s),i.elementType=se,i.lanes=c,i.stateNode={isHidden:!1},i}function f0(i,s,c){return i=pr(6,i,null,s),i.lanes=c,i}function h0(i,s,c){return s=pr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function OU(i,s,c,h,E){this.tag=s,this.containerInfo=i,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Hp(0),this.expirationTimes=Hp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Hp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function p0(i,s,c,h,E,b,S,L,H){return i=new OU(i,s,c,L,H),s===1?(s=1,b===!0&&(s|=8)):s=0,b=pr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Cm(b),i}function IU(i,s,c){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:s,implementation:c}}function rS(i){if(!i)return ji;i=i._reactInternals;e:{if(Oo(i)!==i||i.tag!==1)throw Error(n(170));var s=i;do{switch(s.tag){case 3:s=s.stateNode.context;break e;case 1:if(jn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var c=i.type;if(jn(c))return Ox(i,c,s)}return s}function iS(i,s,c,h,E,b,S,L,H){return i=p0(c,h,!0,i,E,b,S,L,H),i.context=rS(null),c=i.current,h=In(),E=Xi(c),b=Ei(h,E),b.callback=s!=null?s:null,qi(c,b,E),i.current.lanes=E,du(i,E,h),qn(i,h),i}function xd(i,s,c,h){var E=s.current,b=In(),S=Xi(E);return c=rS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ei(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=qi(E,s,S),i!==null&&(Nr(i,E,S,b),ed(i,E,S)),S}function Sd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function oS(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var c=i.retryLane;i.retryLane=c!==0&&c<s?c:s}}function m0(i,s){oS(i,s),(i=i.alternate)&&oS(i,s)}function RU(){return null}var sS=typeof reportError=="function"?reportError:function(i){console.error(i)};function g0(i){this._internalRoot=i}vd.prototype.render=g0.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));xd(i,s,null,null)},vd.prototype.unmount=g0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ho(function(){xd(null,i,null,null)}),s[fi]=null}};function vd(i){this._internalRoot=i}vd.prototype.unstable_scheduleHydration=function(i){if(i){var s=$_();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Fi.length&&s!==0&&s<Fi[c].priority;c++);Fi.splice(c,0,i),c===0&&Y_(i)}};function E0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ad(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function aS(){}function LU(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var ee=Sd(S);b.call(ee)}}var S=iS(s,h,i,0,null,!1,!1,"",aS);return i._reactRootContainer=S,i[fi]=S.current,vu(i.nodeType===8?i.parentNode:i),Ho(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var ee=Sd(H);L.call(ee)}}var H=p0(i,0,!1,null,null,!1,!1,"",aS);return i._reactRootContainer=H,i[fi]=H.current,vu(i.nodeType===8?i.parentNode:i),Ho(function(){xd(s,H,c,h)}),H}function Cd(i,s,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var L=E;E=function(){var H=Sd(S);L.call(H)}}xd(s,S,i,E)}else S=LU(c,s,i,E,h);return Sd(S)}z_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=cu(s.pendingLanes);c!==0&&(zp(s,c|1),qn(s,Bt()),(ot&6)===0&&(Zs=Bt()+500,$i()))}break;case 13:Ho(function(){var h=gi(i,1);if(h!==null){var E=In();Nr(h,i,1,E)}}),m0(i,1)}},jp=function(i){if(i.tag===13){var s=gi(i,134217728);if(s!==null){var c=In();Nr(s,i,134217728,c)}m0(i,134217728)}},j_=function(i){if(i.tag===13){var s=Xi(i),c=gi(i,s);if(c!==null){var h=In();Nr(c,i,s,h)}m0(i,s)}},$_=function(){return dt},V_=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Lp=function(i,s,c){switch(s){case"input":if(Gt(i,c),s=c.name,c.type==="radio"&&s!=null){for(c=i;c.parentNode;)c=c.parentNode;for(c=c.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<c.length;s++){var h=c[s];if(h!==i&&h.form===i.form){var E=Vc(h);if(!E)throw Error(n(90));Lt(h),Gt(h,E)}}}break;case"textarea":Xe(i,c);break;case"select":s=c.value,s!=null&&xe(i,!!c.multiple,s,!1)}},k_=u0,N_=Ho;var DU={usingClientEntryPoint:!1,Events:[ku,Hs,Vc,A_,C_,u0]},ju={findFiberByHostInstance:Io,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},MU={bundleType:ju.bundleType,version:ju.version,rendererPackageName:ju.rendererPackageName,rendererConfig:ju.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=R_(i),i===null?null:i.stateNode},findFiberByHostInstance:ju.findFiberByHostInstance||RU,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.3.1-next-f1338f8080-20240426"};if(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__!="undefined"){var kd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!kd.isDisabled&&kd.supportsFiber)try{vc=kd.inject(MU),Wr=kd}catch(i){}}return Mn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=DU,Mn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!E0(s))throw Error(n(200));return IU(i,s,null,c)},Mn.createRoot=function(i,s){if(!E0(i))throw Error(n(299));var c=!1,h="",E=sS;return s!=null&&(s.unstable_strictMode===!0&&(c=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(E=s.onRecoverableError)),s=p0(i,1,!1,null,null,c,!1,h,E),i[fi]=s.current,vu(i.nodeType===8?i.parentNode:i),new g0(s)},Mn.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var s=i._reactInternals;if(s===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=R_(s),i=i===null?null:i.stateNode,i},Mn.flushSync=function(i){return Ho(i)},Mn.hydrate=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!0,c)},Mn.hydrateRoot=function(i,s,c){if(!E0(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=sS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),s=iS(s,null,i,1,c!=null?c:null,E,!1,b,S),i[fi]=s.current,vu(i),h)for(i=0;i<h.length;i++)c=h[i],E=c._getVersion,E=E(c._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[c,E]:s.mutableSourceEagerHydrationData.push(c,E);return new vd(s)},Mn.render=function(i,s,c){if(!Ad(s))throw Error(n(200));return Cd(null,i,s,!1,c)},Mn.unmountComponentAtNode=function(i){if(!Ad(i))throw Error(n(40));return i._reactRootContainer?(Ho(function(){Cd(null,null,i,!1,function(){i._reactRootContainer=null,i[fi]=null})}),!0):!1},Mn.unstable_batchedUpdates=u0,Mn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Ad(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Cd(i,s,c,!1,h)},Mn.version="18.3.1-next-f1338f8080-20240426",Mn}var X1;function K1(){if(X1)return Rf.exports;X1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Rf.exports=hN(),Rf.exports}var co=K1();function Q1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=Q1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function W(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Q1(e))&&(r&&(r+=" "),r+=t);return r}const pN=()=>document.querySelector(`:is(input, textarea)[name="${z}-user-input"]:not(:disabled)`),Mf=()=>{var e;return(e=pN())!=null?e:document.querySelector(`.${z}-dialog-content, .${z}-modal-content`)},mN=()=>{var e;return(e=Mf())==null?void 0:e.focus({preventScroll:!0})},Ff=()=>{const e=()=>{const n=document.querySelector(`.${z}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var J1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Z1=eo.createContext&&eo.createContext(J1),gN=["attr","size","title"];function EN(e,t){if(e==null)return{};var n=yN(e,t),r,o;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(o=0;o<a.length;o++)r=a[o],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function yN(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function bl(){return bl=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},bl.apply(this,arguments)}function eE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(o){return Object.getOwnPropertyDescriptor(e,o).enumerable})),n.push.apply(n,r)}return n}function Tl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?eE(Object(n),!0).forEach(function(r){bN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):eE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function bN(e,t,n){return t=TN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function TN(e){var t=wN(e,"string");return typeof t=="symbol"?t:t+""}function wN(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function tE(e){return e&&e.map((t,n)=>eo.createElement(t.tag,Tl({key:n},t.attr),tE(t.child)))}function ht(e){return t=>eo.createElement(_N,bl({attr:Tl({},e.attr)},t),tE(e.child))}function _N(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=EN(e,gN),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),eo.createElement("svg",bl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Tl(Tl({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&eo.createElement("title",null,a),e.children)};return Z1!==void 0?eo.createElement(Z1.Consumer,null,n=>t(n)):t(J1)}function xN(e){return ht({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const SN=e=>D.isValidElement(e)?D.cloneElement(e,{"aria-hidden":!0}):e,oi=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,ariaHasPopup:a,ariaExpanded:u,title:l,disabled:d=!1,onClick:f})=>!n&&!t?null:_.jsx("button",{className:W(e,`${z}-icon-button`),type:r,"aria-label":o,"aria-haspopup":a,"aria-expanded":u,title:l,onClick:f,disabled:d,children:t?_.jsx("img",{className:W(`${z}-icon-image`),src:t,alt:"","aria-hidden":"true",loading:"lazy"}):SN(n)}),vN="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",AN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=tt(),{status:a}=Yn(),u=o==="messaging",l=a.type==="dialog"||a.type==="modal",f=r||(u?"Open Commerce Client":"Open Copilot"),p=u?_.jsx(xN,{className:W(t,`${z}-minimized-icon`)}):_.jsx("img",{src:(n==null?void 0:n.logoUrl)||vN,alt:"Copilot",className:W(t,`${z}-minimized-icon-img`)});return _.jsx(oi,{className:W(t,`${z}-minimized-button`),ariaLabel:f,ariaHasPopup:l?"dialog":void 0,ariaExpanded:!1,title:f,icon:p,onClick:e})},CN=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=tt(),r=D.useId(),o=D.useRef(null),[a]=D.useState(()=>document.createElement("div"));D.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{wa(!1),ri(!0),setTimeout(mN)};return _.jsxs(_.Fragment,{children:[co.createPortal(_.jsx("a",{href:`#${r}`,className:W(e,`${z}-skip-link`),style:t,onClick:l=>{var d,f;l.preventDefault(),(f=(d=o.current)==null?void 0:d.querySelector("button"))==null||f.focus({preventScroll:!0})},children:"Skip to chat"}),a),co.createPortal(_.jsx("div",{id:r,ref:o,className:W(e,`${z}-minimized-container`,n),style:t,children:_.jsx(AN,{onClick:u})}),document.body)]})},kN=e=>({[`${rt}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${rt}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${rt}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${rt}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${rt}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${rt}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),Bf=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>_.jsx("button",{"aria-label":t,title:t,className:W(e,`${z}-close-button`),disabled:r,onClick:n,type:"button",children:_.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:_.jsx("path",{d:"M18.3 5.7a1 1 0 0 0-1.4-1.4L12 9.6 7.1 4.7a1 1 0 1 0-1.4 1.4l4.9 4.9-4.9 4.9a1 1 0 1 0 1.4 1.4l4.9-4.9 4.9 4.9a1 1 0 0 0 1.4-1.4l-4.9-4.9 4.9-4.9z"})})}),NN=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const o=e.name||"",[a,u]=D.useState("");return D.useEffect(()=>{const l=URL.createObjectURL(e);return u(l),()=>URL.revokeObjectURL(l)},[e]),_.jsxs("div",{className:W(n,`cim-${t}-component`,`${z}-image-file-preview`),children:[_.jsx("img",{className:W(n,`cim-${t}-component`,`${z}-image-preview`),src:a,alt:`${o} preview`,loading:"lazy"}),_.jsx("span",{className:W(n,`cim-${t}-component`,`${z}-image-file-name`),title:o,children:o}),_.jsx(Bf,{className:W(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})};function nE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z"},child:[]}]})(e)}function rE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function ns(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M15.5 14h-.79l-.28-.27A6.471 6.471 0 0 0 16 9.5 6.5 6.5 0 1 0 9.5 16c1.61 0 3.09-.59 4.23-1.57l.27.28v.79l5 4.99L20.49 19l-4.99-5zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14z"},child:[]}]})(e)}function PN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M11 15h2v2h-2zm0-8h2v6h-2zm.99-5C6.47 2 2 6.48 2 12s4.47 10 9.99 10C17.52 22 22 17.52 22 12S17.52 2 11.99 2zM12 20c-4.42 0-8-3.58-8-8s3.58-8 8-8 8 3.58 8 8-3.58 8-8 8z"},child:[]}]})(e)}function iE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M20 2H4c-1.1 0-1.99.9-1.99 2L2 22l4-4h14c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zM6 9h12v2H6V9zm8 5H6v-2h8v2zm4-6H6V6h12v2z"},child:[]}]})(e)}function oE(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function ON(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 8-6 6 1.41 1.41L12 10.83l4.59 4.58L18 14z"},child:[]}]})(e)}function IN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M16.59 8.59 12 13.17 7.41 8.59 6 10l6 6 6-6z"},child:[]}]})(e)}function RN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M5 16h3v3h2v-5H5v2zm3-8H5v2h5V5H8v3zm6 11h2v-3h3v-2h-5v5zm2-11V5h-2v5h5V8h-3z"},child:[]}]})(e)}function LN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M7 14H5v5h5v-2H7v-3zm-2-4h2V7h3V5H5v5zm12 7h-3v2h5v-5h-2v3zM14 5v2h3v3h2V5h-5z"},child:[]}]})(e)}function DN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function MN(e){return ht({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m14.12 4 1.83 2H20v12H4V6h4.05l1.83-2h4.24M15 2H9L7.17 4H4c-1.1 0-2 .9-2 2v12c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V6c0-1.1-.9-2-2-2h-3.17L15 2zm-3 7c1.65 0 3 1.35 3 3s-1.35 3-3 3-3-1.35-3-3 1.35-3 3-3m0-2c-2.76 0-5 2.24-5 5s2.24 5 5 5 5-2.24 5-5-2.24-5-5-5z"},child:[]}]})(e)}const FN=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=_.jsx(MN,{}),onFiles:l})=>{const d=D.useRef(null),f=D.useId(),p=r!=null?r:f,m=D.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=D.useCallback(y=>{const w=y.target;l(w.files),w.value=""},[l]);return _.jsxs("button",{type:"button",className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[_.jsx("span",{className:W(o,a,`cim-${e}-component`,n&&"disabled",`${z}-image-upload-label`),"aria-hidden":"true",children:u}),_.jsx("input",{ref:d,className:W(o,a,`cim-${e}-component`,`${z}-file-input`),type:"file",id:p,accept:t,name:`${z}-file-input`,disabled:n,onInput:T})]})},wl=({className:e,children:t,type:n,disabled:r=!1,onClick:o,"aria-label":a})=>_.jsx("button",{"aria-label":a,className:W(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),BN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?oE:ns;return n?_.jsx("img",{className:W(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):_.jsx(r,{"aria-hidden":"true",size:"16px"})},UN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?oE:ns;return _.jsx(oi,{className:W(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Send message",icon:t!=null&&t.buttonIconUrl?null:_.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const a=(t==null?void 0:t.buttonType)==="icon-text";return _.jsxs(wl,{className:W(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&_.jsx(BN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function HN(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const zN=()=>{const{messages:e}=Wn(),{handleCancel:t}=Rr();return{cancelRequest:D.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},jN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=zN();return n!=null&&n.enableCancelSearch?_.jsx(oi,{className:W(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:_.jsx(HN,{}),disabled:!e,onClick:r}):null};function EH(){}function yH(){}function sE(e){const t=[],n=String(e||"");let r=n.indexOf(","),o=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(o,r).trim();(u||!a)&&t.push(u),o=r+1,r=n.indexOf(",",o)}return t}function aE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $N=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,VN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qN={};function uE(e,t){return(qN.jsx?VN:$N).test(e)}const YN=/[ \t\n\f\r]/g;function WN(e){return typeof e=="object"?e.type==="text"?lE(e.value):!1:lE(e)}function lE(e){return e.replace(YN,"")===""}class va{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}va.prototype.normal={},va.prototype.property={},va.prototype.space=void 0;function cE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new va(n,r,t)}function Aa(e){return e.toLowerCase()}class Fn{constructor(t,n){this.attribute=n,this.property=t}}Fn.prototype.attribute="",Fn.prototype.booleanish=!1,Fn.prototype.boolean=!1,Fn.prototype.commaOrSpaceSeparated=!1,Fn.prototype.commaSeparated=!1,Fn.prototype.defined=!1,Fn.prototype.mustUseProperty=!1,Fn.prototype.number=!1,Fn.prototype.overloadedBoolean=!1,Fn.prototype.property="",Fn.prototype.spaceSeparated=!1,Fn.prototype.space=void 0;let GN=0;const Ge=ho(),jt=ho(),Uf=ho(),Ee=ho(),pt=ho(),fo=ho(),Gn=ho();function ho(){return $u(2,++GN)}const Hf=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ge,booleanish:jt,commaOrSpaceSeparated:Gn,commaSeparated:fo,number:Ee,overloadedBoolean:Uf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),zf=Object.keys(Hf);class jf extends Fn{constructor(t,n,r,o){let a=-1;if(super(t,n),dE(this,"space",o),typeof r=="number")for(;++a<zf.length;){const u=zf[a];dE(this,zf[a],(r&Hf[u])===Hf[u])}}}jf.prototype.defined=!0;function dE(e,t,n){n&&(e[t]=n)}function rs(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new jf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Aa(r)]=r,n[Aa(a.attribute)]=r}return new va(t,n,e.space)}const fE=rs({properties:{ariaActiveDescendant:null,ariaAtomic:jt,ariaAutoComplete:null,ariaBusy:jt,ariaChecked:jt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:jt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:jt,ariaFlowTo:pt,ariaGrabbed:jt,ariaHasPopup:null,ariaHidden:jt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:Ee,ariaLive:null,ariaModal:jt,ariaMultiLine:jt,ariaMultiSelectable:jt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:jt,ariaReadOnly:jt,ariaRelevant:null,ariaRequired:jt,ariaRoleDescription:pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:jt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function hE(e,t){return t in e?e[t]:t}function pE(e,t){return hE(e,t.toLowerCase())}const XN=rs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:fo,acceptCharset:pt,accessKey:pt,action:null,allow:null,allowFullScreen:Ge,allowPaymentRequest:Ge,allowUserMedia:Ge,alpha:Ge,alt:null,as:null,async:Ge,autoCapitalize:null,autoComplete:pt,autoFocus:Ge,autoPlay:Ge,blocking:pt,capture:null,charSet:null,checked:Ge,cite:null,className:pt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:jt,controls:Ge,controlsList:pt,coords:Ee|fo,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ge,defer:Ge,dir:null,dirName:null,disabled:Ge,download:Uf,draggable:jt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ge,formTarget:null,headers:pt,height:Ee,hidden:Uf,high:Ee,href:null,hrefLang:null,htmlFor:pt,httpEquiv:pt,id:null,imageSizes:null,imageSrcSet:null,inert:Ge,inputMode:null,integrity:null,is:null,isMap:Ge,itemId:null,itemProp:pt,itemRef:pt,itemScope:Ge,itemType:pt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ge,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:Ge,muted:Ge,name:null,nonce:null,noModule:Ge,noValidate:Ge,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:Ge,optimum:Ee,pattern:null,ping:pt,placeholder:null,playsInline:Ge,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ge,referrerPolicy:null,rel:pt,required:Ge,reversed:Ge,rows:Ee,rowSpan:Ee,sandbox:pt,scope:null,scoped:Ge,seamless:Ge,selected:Ge,shadowRootClonable:Ge,shadowRootCustomElementRegistry:Ge,shadowRootDelegatesFocus:Ge,shadowRootMode:null,shadowRootSerializable:Ge,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:jt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:Ge,useMap:null,value:jt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:pt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ge,declare:Ge,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:Ge,noHref:Ge,noShade:Ge,noWrap:Ge,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:jt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:Ge,disablePictureInPicture:Ge,disableRemotePlayback:Ge,exportParts:fo,part:pt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:pE}),KN=rs({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Gn,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className:pt,clip:null,clipPath:null,clipPathUnits:null,clipRule:null,color:null,colorInterpolation:null,colorInterpolationFilters:null,colorProfile:null,colorRendering:null,content:null,contentScriptType:null,contentStyleType:null,crossOrigin:null,cursor:null,cx:null,cy:null,d:null,dataType:null,defaultAction:null,descent:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:Ge,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:fo,g2:fo,glyphName:fo,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:Gn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:pt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Gn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Gn,rev:Gn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Gn,requiredFeatures:Gn,requiredFonts:Gn,requiredFormats:Gn,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:Gn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Gn,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Gn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:hE}),mE=rs({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),gE=rs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:pE}),EE=rs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),QN={classId:"classID",dataType:"datatype",itemId:"itemID",strokeDashArray:"strokeDasharray",strokeDashOffset:"strokeDashoffset",strokeLineCap:"strokeLinecap",strokeLineJoin:"strokeLinejoin",strokeMiterLimit:"strokeMiterlimit",typeOf:"typeof",xLinkActuate:"xlinkActuate",xLinkArcRole:"xlinkArcrole",xLinkHref:"xlinkHref",xLinkRole:"xlinkRole",xLinkShow:"xlinkShow",xLinkTitle:"xlinkTitle",xLinkType:"xlinkType",xmlnsXLink:"xmlnsXlink"},JN=/[A-Z]/g,yE=/-[a-z]/g,ZN=/^data[-\w.:]+$/i;function _l(e,t){const n=Aa(t);let r=t,o=Fn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&ZN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(yE,tP);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!yE.test(a)){let u=a.replace(JN,eP);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=jf}return new o(r,t)}function eP(e){return"-"+e.toLowerCase()}function tP(e){return e.charAt(1).toUpperCase()}const Ca=cE([fE,XN,mE,gE,EE],"html"),Si=cE([fE,KN,mE,gE,EE],"svg");function bE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function TE(e){return e.join(" ").trim()}var is={},$f,wE;function nP(){if(wE)return $f;wE=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,l=/^\s+|\s+$/g,d=`
|
|
18
|
-
`,f="/",p="*",m="",T="comment",y="declaration";function w(N,x){if(typeof N!="string")throw new TypeError("First argument must be a string");if(!N)return[];x=x||{};var C=1,A=1;function U(re){var oe=re.match(t);oe&&(C+=oe.length);var Ae=re.lastIndexOf(d);A=~Ae?re.length-Ae:A+re.length}function Y(){var re={line:C,column:A};return function(oe){return oe.position=new R(re),de(),oe}}function R(re){this.start=re,this.end={line:C,column:A},this.source=x.source}R.prototype.content=N;function $(re){var oe=new Error(x.source+":"+C+":"+A+": "+re);if(oe.reason=re,oe.filename=x.source,oe.line=C,oe.column=A,oe.source=N,!x.silent)throw oe}function ne(re){var oe=re.exec(N);if(oe){var Ae=oe[0];return U(Ae),N=N.slice(Ae.length),oe}}function de(){ne(n)}function V(re){var oe;for(re=re||[];oe=ie();)oe!==!1&&re.push(oe);return re}function ie(){var re=Y();if(!(f!=N.charAt(0)||p!=N.charAt(1))){for(var oe=2;m!=N.charAt(oe)&&(p!=N.charAt(oe)||f!=N.charAt(oe+1));)++oe;if(oe+=2,m===N.charAt(oe-1))return $("End of comment missing");var Ae=N.slice(2,oe-2);return A+=2,U(Ae),N=N.slice(oe),A+=2,re({type:T,comment:Ae})}}function fe(){var re=Y(),oe=ne(r);if(oe){if(ie(),!ne(o))return $("property missing ':'");var Ae=ne(a),se=re({type:y,property:v(oe[0].replace(e,m)),value:Ae?v(Ae[0].replace(e,m)):m});return ne(u),se}}function we(){var re=[];V(re);for(var oe;oe=fe();)oe!==!1&&(re.push(oe),V(re));return re}return de(),we()}function v(N){return N?N.replace(l,m):m}return $f=w,$f}var _E;function rP(){if(_E)return is;_E=1;var e=is&&is.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(is,"__esModule",{value:!0}),is.default=n;const t=e(nP());function n(r,o){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),l=typeof o=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;l?o(f,p,d):p&&(a=a||{},a[f]=p)}),a}return is}var ka={},xE;function iP(){if(xE)return ka;xE=1,Object.defineProperty(ka,"__esModule",{value:!0}),ka.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},l=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,l):f=f.replace(r,l),f.replace(t,u))};return ka.camelCase=d,ka}var Na,SE;function oP(){if(SE)return Na;SE=1;var e=Na&&Na.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(rP()),n=iP();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(l,d){l&&d&&(u[(0,n.camelCase)(l,a)]=d)}),u}return r.default=r,Na=r,Na}var sP=oP();const aP=Qe(sP),xl=vE("end"),Lr=vE("start");function vE(e){return t;function t(n){const r=n&&n.position&&n.position[e]||{};if(typeof r.line=="number"&&r.line>0&&typeof r.column=="number"&&r.column>0)return{line:r.line,column:r.column,offset:typeof r.offset=="number"&&r.offset>-1?r.offset:void 0}}}function AE(e){const t=Lr(e),n=xl(e);if(t&&n)return{start:t,end:n}}function Pa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?CE(e.position):"start"in e||"end"in e?CE(e):"line"in e||"column"in e?Vf(e):""}function Vf(e){return kE(e&&e.line)+":"+kE(e&&e.column)}function CE(e){return Vf(e&&e.start)+"-"+Vf(e&&e.end)}function kE(e){return e&&typeof e=="number"?e:1}class bn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let o="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=B({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const l=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=l?l.column:void 0,this.fatal=void 0,this.file="",this.message=o,this.line=l?l.line:void 0,this.name=Pa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}bn.prototype.file="",bn.prototype.name="",bn.prototype.reason="",bn.prototype.message="",bn.prototype.stack="",bn.prototype.column=void 0,bn.prototype.line=void 0,bn.prototype.ancestors=void 0,bn.prototype.cause=void 0,bn.prototype.fatal=void 0,bn.prototype.place=void 0,bn.prototype.ruleId=void 0,bn.prototype.source=void 0;const qf={}.hasOwnProperty,uP=new Map,lP=/[A-Z]/g,cP=new Set(["table","tbody","thead","tfoot","tr"]),dP=new Set(["td","th"]),NE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fP(e,t){if(!t||t.Fragment===void 0)throw new TypeError("Expected `Fragment` in options");const n=t.filePath||void 0;let r;if(t.development){if(typeof t.jsxDEV!="function")throw new TypeError("Expected `jsxDEV` in options when `development: true`");r=TP(n,t.jsxDEV)}else{if(typeof t.jsx!="function")throw new TypeError("Expected `jsx` in production options");if(typeof t.jsxs!="function")throw new TypeError("Expected `jsxs` in production options");r=bP(n,t.jsx,t.jsxs)}const o={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?Si:Ca,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=PE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function PE(e,t,n){if(t.type==="element")return hP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gP(e,t,n);if(t.type==="mdxjsEsm")return mP(e,t);if(t.type==="root")return EP(e,t,n);if(t.type==="text")return yP(e,t)}function hP(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=IE(e,t.tagName,!1),u=wP(e,t);let l=Wf(e,t);return cP.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!WN(d):!0})),OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function pP(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Oa(e,t.position)}function mP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Oa(e,t.position)}function gP(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Si,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:IE(e,t.name,!0),u=_P(e,t),l=Wf(e,t);return OE(e,u,a,t),Yf(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function EP(e,t,n){const r={};return Yf(r,Wf(e,t)),e.create(t,e.Fragment,r,n)}function yP(e,t){return t.value}function OE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Yf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function bP(e,t,n){return r;function r(o,a,u,l){const f=Array.isArray(u.children)?n:t;return l?f(a,u,l):f(a,u)}}function TP(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Lr(r);return t(o,a,u,l,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function wP(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&qf.call(t.properties,o)){const a=xP(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&dP.has(t.tagName)?r=l:n[u]=l}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function _P(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const l=u.properties[0];l.type,Object.assign(n,e.evaluater.evaluateExpression(l.argument))}else Oa(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const l=r.value.data.estree.body[0];l.type,a=e.evaluater.evaluateExpression(l.expression)}else Oa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function Wf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:uP;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const l=PE(e,a,u);l!==void 0&&n.push(l)}return n}function xP(e,t,n){const r=_l(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?aE(n):TE(n)),r.property==="style"){let o=typeof n=="object"?n:SP(e,String(n));return e.stylePropertyNameCase==="css"&&(o=vP(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?QN[r.property]||r.property:r.attribute,n]}}function SP(e,t){try{return aP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new bn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw o.file=e.filePath||void 0,o.url=NE+"#cannot-parse-style-attribute",o}}function IE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const l=uE(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:l,computed:!!(a&&l.type==="Literal"),optional:!1}:l}r=u}else r=uE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return qf.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);Oa(e)}function Oa(e,t){const n=new bn("Cannot handle MDX estrees without `createEvaluater`",{ancestors:e.ancestors,place:t,ruleId:"mdx-estree",source:"hast-util-to-jsx-runtime"});throw n.file=e.filePath||void 0,n.url=NE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function vP(e){const t={};let n;for(n in e)qf.call(e,n)&&(t[AP(n)]=e[n]);return t}function AP(e){let t=e.replace(lP,CP);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function CP(e){return"-"+e.toLowerCase()}const Gf={action:["form"],cite:["blockquote","del","ins","q"],data:["object"],formAction:["button","input"],href:["a","area","base","link"],icon:["menuitem"],itemId:null,manifest:["html"],ping:["a","area"],poster:["video"],src:["audio","embed","iframe","img","input","script","source","track","video"]},kP={};function Xf(e,t){const n=kP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return RE(e,r,o)}function RE(e,t,n){if(NP(e)){if("value"in e)return e.type==="html"&&!n?"":e.value;if(t&&"alt"in e&&e.alt)return e.alt;if("children"in e)return LE(e.children,t,n)}return Array.isArray(e)?LE(e,t,n):""}function LE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=RE(e[o],t,n);return r.join("")}function NP(e){return!!(e&&typeof e=="object")}const DE=document.createElement("i");function Kf(e){const t="&"+e+";";DE.innerHTML=t;const n=DE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Xn(e,t,n,r){const o=e.length;let a=0,u;if(t<0?t=-t>o?0:o+t:t=t>o?o:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function sr(e,t){return e.length>0?(Xn(e,e.length,0,t),e):t}const ME={}.hasOwnProperty;function FE(e){const t={};let n=-1;for(;++n<e.length;)PP(t,e[n]);return t}function PP(e,t){let n;for(n in t){const o=(ME.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){ME.call(o,u)||(o[u]=[]);const l=a[u];OP(o[u],Array.isArray(l)?l:l?[l]:[])}}}function OP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Xn(e,0,0,r)}function BE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function yr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Nn=vi(/[A-Za-z]/),Tn=vi(/[\dA-Za-z]/),IP=vi(/[#-'*+\--9=?A-Z^-~]/);function Sl(e){return e!==null&&(e<32||e===127)}const Qf=vi(/\d/),RP=vi(/[\dA-Fa-f]/),LP=vi(/[!-/:-@[-`{-~]/);function ze(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const vl=vi(new RegExp("\\p{P}|\\p{S}","u")),po=vi(/\s/);function vi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function os(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&Tn(e.charCodeAt(n+1))&&Tn(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const l=e.charCodeAt(n+1);a<56320&&l>56319&&l<57344?(u=String.fromCharCode(a,l),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function it(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),l(d)):t(d)}function l(d){return Ze(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const DP={tokenize:MP};function MP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(l){if(l===null){e.consume(l);return}return e.enter("lineEnding"),e.consume(l),e.exit("lineEnding"),it(e,t,"linePrefix")}function o(l){return e.enter("paragraph"),a(l)}function a(l){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(l)}function u(l){if(l===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(l);return}return ze(l)?(e.consume(l),e.exit("chunkText"),a):(e.consume(l),u)}}const FP={tokenize:BP},UE={tokenize:UP};function BP(e){const t=this,n=[];let r=0,o,a,u;return l;function l(A){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(A)}return f(A)}function d(A){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&C();const U=t.events.length;let Y=U,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}x(r);let $=U;for(;$<t.events.length;)t.events[$][1].end=B({},R),$++;return Xn(t.events,Y+1,0,t.events.slice(U)),t.events.length=$,f(A)}return l(A)}function f(A){if(r===n.length){if(!o)return T(A);if(o.currentConstruct&&o.currentConstruct.concrete)return w(A);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(UE,p,m)(A)}function p(A){return o&&C(),x(r),T(A)}function m(A){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,w(A)}function T(A){return t.containerState={},e.attempt(UE,y,w)(A)}function y(A){return r++,n.push([t.currentConstruct,t.containerState]),T(A)}function w(A){if(A===null){o&&C(),x(0),e.consume(A);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),v(A)}function v(A){if(A===null){N(e.exit("chunkFlow"),!0),x(0),e.consume(A);return}return ze(A)?(e.consume(A),N(e.exit("chunkFlow")),r=0,t.interrupt=void 0,l):(e.consume(A),v)}function N(A,U){const Y=t.sliceStream(A);if(U&&Y.push(null),A.previous=a,a&&(a.next=A),a=A,o.defineSkip(A.start),o.write(Y),t.parser.lazy[A.start.line]){let R=o.events.length;for(;R--;)if(o.events[R][1].start.offset<u&&(!o.events[R][1].end||o.events[R][1].end.offset>u))return;const $=t.events.length;let ne=$,de,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){V=t.events[ne][1].end;break}de=!0}for(x(r),R=$;R<t.events.length;)t.events[R][1].end=B({},V),R++;Xn(t.events,ne+1,0,t.events.slice($)),t.events.length=R}}function x(A){let U=n.length;for(;U-- >A;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=A}function C(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function UP(e,t,n){return it(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function ss(e){if(e===null||mt(e)||po(e))return 1;if(vl(e))return 2}function Al(e,t,n){const r=[];let o=-1;for(;++o<e.length;){const a=e[o].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Jf={name:"attention",resolveAll:HP,tokenize:zP};function HP(e,t){let n=-1,r,o,a,u,l,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=B({},e[r][1].end),T=B({},e[n][1].start);HE(m,-d),HE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:B({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:B({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:B({},e[r][1].end),end:B({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:B({},u.start),end:B({},l.end)},e[r][1].end=B({},u.start),e[n][1].start=B({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=sr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=sr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=sr(f,Al(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=sr(f,[["exit",a,t],["enter",l,t],["exit",l,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=sr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Xn(e,r-1,n-r+3,f),n=r+f.length-p-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function zP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=ss(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),l(d)}function l(d){if(d===a)return e.consume(d),l;const f=e.exit("attentionSequence"),p=ss(d),m=!p||p===2&&o||n.includes(d),T=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(o||!T)),f._close=!!(a===42?T:T&&(p||!m)),t(d)}}function HE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jP={name:"autolink",tokenize:$P};function $P(e,t,n){let r=0;return o;function o(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return Nn(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||Tn(y)?(r=1,l(y)):f(y)}function l(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||Tn(y))&&r++<32?(e.consume(y),l):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||Sl(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):IP(y)?(e.consume(y),f):n(y)}function p(y){return Tn(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):T(y)}function T(y){if((y===45||Tn(y))&&r++<63){const w=y===45?T:m;return e.consume(y),w}return n(y)}}const Ia={partial:!0,tokenize:VP};function VP(e,t,n){return r;function r(a){return Ze(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||ze(a)?t(a):n(a)}}const zE={continuation:{tokenize:YP},exit:WP,name:"blockQuote",tokenize:qP};function qP(e,t,n){const r=this;return o;function o(u){if(u===62){const l=r.containerState;return l.open||(e.enter("blockQuote",{_container:!0}),l.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function YP(e,t,n){const r=this;return o;function o(u){return Ze(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(zE,t,n)(u)}}function WP(e){e.exit("blockQuote")}const jE={name:"characterEscape",tokenize:GP};function GP(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),o}function o(a){return LP(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const $E={name:"characterReference",tokenize:XP};function XP(e,t,n){const r=this;let o=0,a,u;return l;function l(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=Tn,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=RP,p):(e.enter("characterReferenceValue"),a=7,u=Qf,p(m))}function p(m){if(m===59&&o){const T=e.exit("characterReferenceValue");return u===Tn&&!Kf(r.sliceSerialize(T))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&o++<a?(e.consume(m),p):n(m)}}const VE={partial:!0,tokenize:QP},qE={concrete:!0,name:"codeFenced",tokenize:KP};function KP(e,t,n){const r=this,o={partial:!0,tokenize:Y};let a=0,u=0,l;return d;function d(R){return f(R)}function f(R){const $=r.events[r.events.length-1];return a=$&&$[1].type==="linePrefix"?$[2].sliceSerialize($[1],!0).length:0,l=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===l?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?it(e,m,"whitespace")(R):m(R))}function m(R){return R===null||ze(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(VE,v,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),T(R))}function T(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),it(e,y,"whitespace")(R)):R===96&&R===l?n(R):(e.consume(R),T)}function y(R){return R===null||ze(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),w(R))}function w(R){return R===null||ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===l?n(R):(e.consume(R),w)}function v(R){return e.attempt(o,U,N)(R)}function N(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),x}function x(R){return a>0&&Ze(R)?it(e,C,"linePrefix",a+1)(R):C(R)}function C(R){return R===null||ze(R)?e.check(VE,v,U)(R):(e.enter("codeFlowValue"),A(R))}function A(R){return R===null||ze(R)?(e.exit("codeFlowValue"),C(R)):(e.consume(R),A)}function U(R){return e.exit("codeFenced"),t(R)}function Y(R,$,ne){let de=0;return V;function V(oe){return R.enter("lineEnding"),R.consume(oe),R.exit("lineEnding"),ie}function ie(oe){return R.enter("codeFencedFence"),Ze(oe)?it(R,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):fe(oe)}function fe(oe){return oe===l?(R.enter("codeFencedFenceSequence"),we(oe)):ne(oe)}function we(oe){return oe===l?(de++,R.consume(oe),we):de>=u?(R.exit("codeFencedFenceSequence"),Ze(oe)?it(R,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||ze(oe)?(R.exit("codeFencedFence"),$(oe)):ne(oe)}}}function QP(e,t,n){const r=this;return o;function o(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const Zf={name:"codeIndented",tokenize:ZP},JP={partial:!0,tokenize:e3};function ZP(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),it(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):ze(f)?e.attempt(JP,u,d)(f):(e.enter("codeFlowValue"),l(f))}function l(f){return f===null||ze(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),l)}function d(f){return e.exit("codeIndented"),t(f)}}function e3(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):it(e,a,"linePrefix",5)(u)}function a(u){const l=r.events[r.events.length-1];return l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):ze(u)?o(u):n(u)}}const t3={name:"codeText",previous:r3,resolve:n3,tokenize:i3};function n3(e){let t=e.length-4,n=3,r,o;if((e[n][1].type==="lineEnding"||e[n][1].type==="space")&&(e[t][1].type==="lineEnding"||e[t][1].type==="space")){for(r=n;++r<t;)if(e[r][1].type==="codeTextData"){e[n][1].type="codeTextPadding",e[t][1].type="codeTextPadding",n+=2,t-=2;break}}for(r=n-1,t++;++r<=t;)o===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(o=r):(r===t||e[r][1].type==="lineEnding")&&(e[o][1].type="codeTextData",r!==o+2&&(e[o][1].end=e[r-1][1].end,e.splice(o+2,r-o-2),t-=r-o-2,r=o+2),o=void 0);return e}function r3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function i3(e,t,n){let r=0,o,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),l(m)}function l(m){return m===96?(e.consume(m),r++,l):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),o=0,p(m)):ze(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||ze(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class o3{constructor(t){this.left=t?[...t]:[],this.right=[]}get(t){if(t<0||t>=this.left.length+this.right.length)throw new RangeError("Cannot access index `"+t+"` in a splice buffer of size `"+(this.left.length+this.right.length)+"`");return t<this.left.length?this.left[t]:this.right[this.right.length-t+this.left.length-1]}get length(){return this.left.length+this.right.length}shift(){return this.setCursor(0),this.right.pop()}slice(t,n){const r=n==null?Number.POSITIVE_INFINITY:n;return r<this.left.length?this.left.slice(t,r):t>this.left.length?this.right.slice(this.right.length-r+this.left.length,this.right.length-t+this.left.length).reverse():this.left.slice(t).concat(this.right.slice(this.right.length-r+this.left.length).reverse())}splice(t,n,r){const o=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-o,Number.POSITIVE_INFINITY);return r&&Ra(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),Ra(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Ra(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);Ra(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Ra(this.left,n.reverse())}}}function Ra(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function YE(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new o3(e);for(;++n<p.length;){for(;n in t;)n=t[n];if(r=p.get(n),n&&r[1].type==="chunkFlow"&&p.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,a=0,a<d.length&&d[a][1].type==="lineEndingBlank"&&(a+=2),a<d.length&&d[a][1].type==="content"))for(;++a<d.length&&d[a][1].type!=="content";)d[a][1].type==="chunkText"&&(d[a][1]._isInFirstContentOfListItem=!0,a++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,s3(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=B({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return Xn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function s3(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const l=u.events,d=[],f={};let p,m,T=-1,y=n,w=0,v=0;const N=[v];for(;y;){for(;e.get(++o)[1]!==y;);a.push(o),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++T<l.length;)l[T][0]==="exit"&&l[T-1][0]==="enter"&&l[T][1].type===l[T-1][1].type&&l[T][1].start.line!==l[T][1].end.line&&(v=T+1,N.push(v),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):N.pop(),T=N.length;T--;){const x=l.slice(N[T],N[T+1]),C=a.pop();d.push([C,C+x.length-1]),e.splice(C,2,x)}for(d.reverse(),T=-1;++T<d.length;)f[w+d[T][0]]=w+d[T][1],w+=d[T][1]-d[T][0]-1;return f}const a3={resolve:l3,tokenize:c3},u3={partial:!0,tokenize:d3};function l3(e){return YE(e),e}function c3(e,t){let n;return r;function r(l){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(l)}function o(l){return l===null?a(l):ze(l)?e.check(u3,u,a)(l):(e.consume(l),o)}function a(l){return e.exit("chunkContent"),e.exit("content"),t(l)}function u(l){return e.consume(l),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function d3(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),it(e,a,"linePrefix")}function a(u){if(u===null||ze(u))return n(u);const l=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&l&&l[1].type==="linePrefix"&&l[2].sliceSerialize(l[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function WE(e,t,n,r,o,a,u,l,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(x){return x===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(x),e.exit(a),T):x===null||x===32||x===41||Sl(x)?n(x):(e.enter(r),e.enter(u),e.enter(l),e.enter("chunkString",{contentType:"string"}),v(x))}function T(x){return x===62?(e.enter(a),e.consume(x),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(l),e.enter("chunkString",{contentType:"string"}),y(x))}function y(x){return x===62?(e.exit("chunkString"),e.exit(l),T(x)):x===null||x===60||ze(x)?n(x):(e.consume(x),x===92?w:y)}function w(x){return x===60||x===62||x===92?(e.consume(x),y):y(x)}function v(x){return!p&&(x===null||x===41||mt(x))?(e.exit("chunkString"),e.exit(l),e.exit(u),e.exit(r),t(x)):p<f&&x===40?(e.consume(x),p++,v):x===41?(e.consume(x),p--,v):x===null||x===32||x===40||Sl(x)?n(x):(e.consume(x),x===92?N:v)}function N(x){return x===40||x===41||x===92?(e.consume(x),v):v(x)}}function GE(e,t,n,r,o,a){const u=this;let l=0,d;return f;function f(y){return e.enter(r),e.enter(o),e.consume(y),e.exit(o),e.enter(a),p}function p(y){return l>999||y===null||y===91||y===93&&!d||y===94&&!l&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(o),e.consume(y),e.exit(o),e.exit(r),t):ze(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||ze(y)||l++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function XE(e,t,n,r,o,a){let u;return l;function l(T){return T===34||T===39||T===40?(e.enter(r),e.enter(o),e.consume(T),e.exit(o),u=T===40?41:T,d):n(T)}function d(T){return T===u?(e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):(e.enter(a),f(T))}function f(T){return T===u?(e.exit(a),d(u)):T===null?n(T):ze(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),it(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(T))}function p(T){return T===u||T===null||ze(T)?(e.exit("chunkString"),f(T)):(e.consume(T),T===92?m:p)}function m(T){return T===u||T===92?(e.consume(T),p):p(T)}}function La(e,t){let n;return r;function r(o){return ze(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ze(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const f3={name:"definition",tokenize:p3},h3={partial:!0,tokenize:m3};function p3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return GE.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return mt(y)?La(e,f)(y):f(y)}function f(y){return WE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(h3,m,m)(y)}function m(y){return Ze(y)?it(e,T,"whitespace")(y):T(y)}function T(y){return y===null||ze(y)?(e.exit("definition"),r.parser.defined.push(o),t(y)):n(y)}}function m3(e,t,n){return r;function r(l){return mt(l)?La(e,o)(l):n(l)}function o(l){return XE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Ze(l)?it(e,u,"whitespace")(l):u(l)}function u(l){return l===null||ze(l)?t(l):n(l)}}const g3={name:"hardBreakEscape",tokenize:E3};function E3(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return ze(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const y3={name:"headingAtx",resolve:b3,tokenize:T3};function b3(e,t){let n=e.length-2,r=3,o,a;return e[r][1].type==="whitespace"&&(r+=2),n-2>r&&e[n][1].type==="whitespace"&&(n-=2),e[n][1].type==="atxHeadingSequence"&&(r===n-1||n-4>r&&e[n-2][1].type==="whitespace")&&(n-=r+1===n?2:4),n>r&&(o={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},a={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},Xn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function T3(e,t,n){let r=0;return o;function o(p){return e.enter("atxHeading"),a(p)}function a(p){return e.enter("atxHeadingSequence"),u(p)}function u(p){return p===35&&r++<6?(e.consume(p),u):p===null||mt(p)?(e.exit("atxHeadingSequence"),l(p)):n(p)}function l(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||ze(p)?(e.exit("atxHeading"),t(p)):Ze(p)?it(e,l,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),l(p))}function f(p){return p===null||p===35||mt(p)?(e.exit("atxHeadingText"),l(p)):(e.consume(p),f)}}const w3=["address","article","aside","base","basefont","blockquote","body","caption","center","col","colgroup","dd","details","dialog","dir","div","dl","dt","fieldset","figcaption","figure","footer","form","frame","frameset","h1","h2","h3","h4","h5","h6","head","header","hr","html","iframe","legend","li","link","main","menu","menuitem","nav","noframes","ol","optgroup","option","p","param","search","section","summary","table","tbody","td","tfoot","th","thead","title","tr","track","ul"],KE=["pre","script","style","textarea"],_3={concrete:!0,name:"htmlFlow",resolveTo:v3,tokenize:A3},x3={partial:!0,tokenize:k3},S3={partial:!0,tokenize:C3};function v3(e){let t=e.length;for(;t--&&!(e[t][0]==="enter"&&e[t][1].type==="htmlFlow"););return t>1&&e[t-2][1].type==="linePrefix"&&(e[t][1].start=e[t-2][1].start,e[t+1][1].start=e[t-2][1].start,e.splice(t-2,2)),e}function A3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),T):I===47?(e.consume(I),a=!0,v):I===63?(e.consume(I),o=3,r.interrupt?t:k):Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function T(I){return I===45?(e.consume(I),o=2,y):I===91?(e.consume(I),o=5,l=0,w):Nn(I)?(e.consume(I),o=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function w(I){const Se="CDATA[";return I===Se.charCodeAt(l++)?(e.consume(I),l===Se.length?r.interrupt?t:fe:w):n(I)}function v(I){return Nn(I)?(e.consume(I),u=String.fromCharCode(I),N):n(I)}function N(I){if(I===null||I===47||I===62||mt(I)){const Se=I===47,Me=u.toLowerCase();return!Se&&!a&&KE.includes(Me)?(o=1,r.interrupt?t(I):fe(I)):w3.includes(u.toLowerCase())?(o=6,Se?(e.consume(I),x):r.interrupt?t(I):fe(I)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?C(I):A(I))}return I===45||Tn(I)?(e.consume(I),u+=String.fromCharCode(I),N):n(I)}function x(I){return I===62?(e.consume(I),r.interrupt?t:fe):n(I)}function C(I){return Ze(I)?(e.consume(I),C):V(I)}function A(I){return I===47?(e.consume(I),V):I===58||I===95||Nn(I)?(e.consume(I),U):Ze(I)?(e.consume(I),A):V(I)}function U(I){return I===45||I===46||I===58||I===95||Tn(I)?(e.consume(I),U):Y(I)}function Y(I){return I===61?(e.consume(I),R):Ze(I)?(e.consume(I),Y):A(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,$):Ze(I)?(e.consume(I),R):ne(I)}function $(I){return I===d?(e.consume(I),d=null,de):I===null||ze(I)?n(I):(e.consume(I),$)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||mt(I)?Y(I):(e.consume(I),ne)}function de(I){return I===47||I===62||Ze(I)?A(I):n(I)}function V(I){return I===62?(e.consume(I),ie):n(I)}function ie(I){return I===null||ze(I)?fe(I):Ze(I)?(e.consume(I),ie):n(I)}function fe(I){return I===45&&o===2?(e.consume(I),Ae):I===60&&o===1?(e.consume(I),se):I===62&&o===4?(e.consume(I),F):I===63&&o===3?(e.consume(I),k):I===93&&o===5?(e.consume(I),ae):ze(I)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(x3,K,we)(I)):I===null||ze(I)?(e.exit("htmlFlowData"),we(I)):(e.consume(I),fe)}function we(I){return e.check(S3,re,K)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||ze(I)?we(I):(e.enter("htmlFlowData"),fe(I))}function Ae(I){return I===45?(e.consume(I),k):fe(I)}function se(I){return I===47?(e.consume(I),u="",J):fe(I)}function J(I){if(I===62){const Se=u.toLowerCase();return KE.includes(Se)?(e.consume(I),F):fe(I)}return Nn(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),J):fe(I)}function ae(I){return I===93?(e.consume(I),k):fe(I)}function k(I){return I===62?(e.consume(I),F):I===45&&o===2?(e.consume(I),k):fe(I)}function F(I){return I===null||ze(I)?(e.exit("htmlFlowData"),K(I)):(e.consume(I),F)}function K(I){return e.exit("htmlFlow"),t(I)}}function C3(e,t,n){const r=this;return o;function o(u){return ze(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function k3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ia,t,n)}}const N3={name:"htmlText",tokenize:P3};function P3(e,t,n){const r=this;let o,a,u;return l;function l(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),A):Nn(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Nn(k)?(e.consume(k),C):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),T):ze(k)?(u=m,se(k)):(e.consume(k),m)}function T(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?Ae(k):k===45?T(k):m(k)}function w(k){const F="CDATA[";return k===F.charCodeAt(a++)?(e.consume(k),a===F.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),N):ze(k)?(u=v,se(k)):(e.consume(k),v)}function N(k){return k===93?(e.consume(k),x):v(k)}function x(k){return k===62?Ae(k):k===93?(e.consume(k),x):v(k)}function C(k){return k===null||k===62?Ae(k):ze(k)?(u=C,se(k)):(e.consume(k),C)}function A(k){return k===null?n(k):k===63?(e.consume(k),U):ze(k)?(u=A,se(k)):(e.consume(k),A)}function U(k){return k===62?Ae(k):A(k)}function Y(k){return Nn(k)?(e.consume(k),R):n(k)}function R(k){return k===45||Tn(k)?(e.consume(k),R):$(k)}function $(k){return ze(k)?(u=$,se(k)):Ze(k)?(e.consume(k),$):Ae(k)}function ne(k){return k===45||Tn(k)?(e.consume(k),ne):k===47||k===62||mt(k)?de(k):n(k)}function de(k){return k===47?(e.consume(k),Ae):k===58||k===95||Nn(k)?(e.consume(k),V):ze(k)?(u=de,se(k)):Ze(k)?(e.consume(k),de):Ae(k)}function V(k){return k===45||k===46||k===58||k===95||Tn(k)?(e.consume(k),V):ie(k)}function ie(k){return k===61?(e.consume(k),fe):ze(k)?(u=ie,se(k)):Ze(k)?(e.consume(k),ie):de(k)}function fe(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),o=k,we):ze(k)?(u=fe,se(k)):Ze(k)?(e.consume(k),fe):(e.consume(k),re)}function we(k){return k===o?(e.consume(k),o=void 0,oe):k===null?n(k):ze(k)?(u=we,se(k)):(e.consume(k),we)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||mt(k)?de(k):(e.consume(k),re)}function oe(k){return k===47||k===62||mt(k)?de(k):n(k)}function Ae(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function se(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),J}function J(k){return Ze(k)?it(e,ae,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ae(k)}function ae(k){return e.enter("htmlTextData"),u(k)}}const eh={name:"labelEnd",resolveAll:L3,resolveTo:D3,tokenize:M3},O3={tokenize:F3},I3={tokenize:B3},R3={tokenize:U3};function L3(e){let t=-1;const n=[];for(;++t<e.length;){const r=e[t][1];if(n.push(e[t]),r.type==="labelImage"||r.type==="labelLink"||r.type==="labelEnd"){const o=r.type==="labelImage"?4:2;r.type="data",t+=o}}return e.length!==n.length&&Xn(e,0,e.length,n),e}function D3(e,t){let n=e.length,r=0,o,a,u,l;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:B({},e[a][1].start),end:B({},e[e.length-1][1].end)},f={type:"label",start:B({},e[a][1].start),end:B({},e[u][1].end)},p={type:"labelText",start:B({},e[a+r+2][1].end),end:B({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=sr(l,e.slice(a+1,a+r+3)),l=sr(l,[["enter",p,t]]),l=sr(l,Al(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=sr(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=sr(l,e.slice(u+1)),l=sr(l,[["exit",d,t]]),Xn(e,a,e.length,l),e}function M3(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return l;function l(T){return a?a._inactive?m(T):(u=r.parser.defined.includes(yr(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(T),e.exit("labelMarker"),e.exit("labelEnd"),d):n(T)}function d(T){return T===40?e.attempt(O3,p,u?p:m)(T):T===91?e.attempt(I3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt(R3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function F3(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),o}function o(m){return mt(m)?La(e,a)(m):a(m)}function a(m){return m===41?p(m):WE(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?La(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?XE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?La(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function B3(e,t,n){const r=this;return o;function o(l){return GE.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(yr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function U3(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),o}function o(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const H3={name:"labelStartImage",resolveAll:eh.resolveAll,tokenize:z3};function z3(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const j3={name:"labelStartLink",resolveAll:eh.resolveAll,tokenize:$3};function $3(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const th={name:"lineEnding",tokenize:V3};function V3(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Cl={name:"thematicBreak",tokenize:q3};function q3(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,l(f)}function l(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||ze(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?it(e,l,"whitespace")(f):l(f))}}const Bn={continuation:{tokenize:X3},exit:Q3,name:"list",tokenize:G3},Y3={partial:!0,tokenize:J3},W3={partial:!0,tokenize:K3};function G3(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return l;function l(y){const w=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(w==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Qf(y)){if(r.containerState.type||(r.containerState.type=w,e.enter(w,{_container:!0})),w==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(Cl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Qf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(Ia,r.interrupt?n:p,e.attempt(Y3,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),T):n(y)}function T(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function X3(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ia,o,a);function o(l){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,it(e,t,"listItemIndent",r.containerState.size+1)(l)}function a(l){return r.containerState.furtherBlankLines||!Ze(l)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(l)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(W3,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Bn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function K3(e,t,n){const r=this;return it(e,o,"listItemIndent",r.containerState.size+1);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="listItemIndent"&&u[2].sliceSerialize(u[1],!0).length===r.containerState.size?t(a):n(a)}}function Q3(e){e.exit(this.containerState.type)}function J3(e,t,n){const r=this;return it(e,o,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function o(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const QE={name:"setextUnderline",resolveTo:Z3,tokenize:eO};function Z3(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:B({},e[r][1].start),end:B({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=B({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function eO(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),l(f)}function l(f){return f===o?(e.consume(f),l):(e.exit("setextHeadingLineSequence"),Ze(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||ze(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const tO={tokenize:nO};function nO(e){const t=this,n=e.attempt(Ia,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(a3,o)),"linePrefix")));return n;function r(a){if(a===null){e.consume(a);return}return e.enter("lineEndingBlank"),e.consume(a),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function o(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rO={resolveAll:ZE()},iO=JE("string"),oO=JE("text");function JE(e){return{resolveAll:ZE(e==="text"?sO:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,l);return u;function u(p){return f(p)?a(p):l(p)}function l(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=o[p];let T=-1;if(m)for(;++T<m.length;){const y=m[T];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function ZE(e){return t;function t(n,r){let o=-1,a;for(;++o<=n.length;)a===void 0?n[o]&&n[o][1].type==="data"&&(a=o,o++):(!n[o]||n[o][1].type!=="data")&&(o!==a+2&&(n[a][1].end=n[o-1][1].end,n.splice(a+2,o-a-2),o=a+2),a=void 0);return e?e(n,r):n}}function sO(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,l=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)l++,u--;if(u)break;u=-1}else if(f===-2)d=!0,l++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(l=0),l){const f={type:n===e.length||d||l<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-l,offset:r.end.offset-l},end:B({},r.end)};r.end=B({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const aO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:f3},disable:{null:[]},document:{42:Bn,43:Bn,45:Bn,48:Bn,49:Bn,50:Bn,51:Bn,52:Bn,53:Bn,54:Bn,55:Bn,56:Bn,57:Bn,62:zE},flow:{35:y3,42:Cl,45:[QE,Cl],60:_3,61:QE,95:Cl,96:qE,126:qE},flowInitial:{[-2]:Zf,[-1]:Zf,32:Zf},insideSpan:{null:[Jf,rO]},string:{38:$E,92:jE},text:{[-5]:th,[-4]:th,[-3]:th,33:H3,38:$E,42:Jf,60:[jP,N3],91:j3,92:[g3,jE],93:eh,95:Jf,96:t3}},Symbol.toStringTag,{value:"Module"}));function uO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],l=[];const d={attempt:$(Y),check:$(R),consume:C,enter:A,exit:U,interrupt:$(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:v,events:[],now:w,parser:e,previous:null,sliceSerialize:T,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(ie){return u=sr(u,ie),N(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Al(a,f.events,f),f.events)}function T(ie,fe){return cO(y(ie),fe)}function y(ie){return lO(u,ie)}function w(){const{_bufferIndex:ie,_index:fe,line:we,column:re,offset:oe}=r;return{_bufferIndex:ie,_index:fe,line:we,column:re,offset:oe}}function v(ie){o[ie.line]=ie.column,V()}function N(){let ie;for(;r._index<u.length;){const fe=u[r._index];if(typeof fe=="string")for(ie=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ie&&r._bufferIndex<fe.length;)x(fe.charCodeAt(r._bufferIndex));else x(fe)}}function x(ie){p=p(ie)}function C(ie){ze(ie)?(r.line++,r.column=1,r.offset+=ie===-3?2:1,V()):ie!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),f.previous=ie}function A(ie,fe){const we=fe||{};return we.type=ie,we.start=w(),f.events.push(["enter",we,f]),l.push(we),we}function U(ie){const fe=l.pop();return fe.end=w(),f.events.push(["exit",fe,f]),fe}function Y(ie,fe){ne(ie,fe.from)}function R(ie,fe){fe.restore()}function $(ie,fe){return we;function we(re,oe,Ae){let se,J,ae,k;return Array.isArray(re)?K(re):"tokenize"in re?K([re]):F(re);function F(ke){return be;function be(Ie){const Ue=Ie!==null&&ke[Ie],lt=Ie!==null&&ke.null,cn=[...Array.isArray(Ue)?Ue:Ue?[Ue]:[],...Array.isArray(lt)?lt:lt?[lt]:[]];return K(cn)(Ie)}}function K(ke){return se=ke,J=0,ke.length===0?Ae:I(ke[J])}function I(ke){return be;function be(Ie){return k=de(),ae=ke,ke.partial||(f.currentConstruct=ke),ke.name&&f.parser.constructs.disable.null.includes(ke.name)?Me():ke.tokenize.call(fe?Object.assign(Object.create(f),fe):f,d,Se,Me)(Ie)}}function Se(ke){return ie(ae,k),oe}function Me(ke){return k.restore(),++J<se.length?I(se[J]):Ae}}}function ne(ie,fe){ie.resolveAll&&!a.includes(ie)&&a.push(ie),ie.resolve&&Xn(f.events,fe,f.events.length-fe,ie.resolve(f.events.slice(fe),f)),ie.resolveTo&&(f.events=ie.resolveTo(f.events,f))}function de(){const ie=w(),fe=f.previous,we=f.currentConstruct,re=f.events.length,oe=Array.from(l);return{from:re,restore:Ae};function Ae(){r=ie,f.previous=fe,f.currentConstruct=we,f.events.length=re,l=oe,V()}}function V(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function lO(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const l=u[0];typeof l=="string"?u[0]=l.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function cO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
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 wU=typeof WeakMap=="function"?WeakMap:Map;function _2(i,s,c){c=Ii(-1,c),c.tag=3,c.payload={element:null};var h=s.value;return c.callback=function(){kd||(kd=!0,pg=h),Zm(i,s)},c}function S2(i,s,c){c=Ii(-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"&&(lo===null?lo=new Set([this]):lo.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),c}function v2(i,s,c){var h=i.pingCache;if(h===null){h=i.pingCache=new wU;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=DU.bind(null,i,s,c),s.then(i,i))}function A2(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 C2(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=Ii(-1,1),s.tag=2,ao(c,s,1))),c.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var xU=H.ReactCurrentOwner,tr=!1;function zn(i,s,c,h){s.child=i===null?W_(s,null,c,h):sa(s,i.child,c,h)}function k2(i,s,c,h,E){c=c.render;var b=s.ref;return ua(s,E),h=Vm(i,s,c,h,b,E),c=qm(),i!==null&&!tr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Ri(i,s,E)):(Ot&&c&&Cm(s),s.flags|=1,zn(i,s,h,E),s.child)}function P2(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,N2(i,s,b,h,E)):(i=Ld(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:Lu,c(S,h)&&i.ref===s.ref)return Ri(i,s,E)}return s.flags|=1,i=po(b,h),i.ref=s.ref,i.return=s,s.child=i}function N2(i,s,c,h,E){if(i!==null){var b=i.memoizedProps;if(Lu(b,h)&&i.ref===s.ref)if(tr=!1,s.pendingProps=h=b,(i.lanes&E)!==0)(i.flags&131072)!==0&&(tr=!0);else return s.lanes=i.lanes,Ri(i,s,E)}return eg(i,s,c,h,E)}function O2(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(fa,pr),pr|=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(fa,pr),pr|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=b!==null?b.baseLanes:c,Tt(fa,pr),pr|=h}else b!==null?(h=b.baseLanes|c,s.memoizedState=null):h=c,Tt(fa,pr),pr|=h;return zn(i,s,E,c),s.child}function I2(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=er(c)?Ko:Nn.current;return b=na(s,b),ua(s,E),c=Vm(i,s,c,h,b,E),h=qm(),i!==null&&!tr?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~E,Ri(i,s,E)):(Ot&&h&&Cm(s),s.flags|=1,zn(i,s,c,E),s.child)}function R2(i,s,c,h,E){if(er(c)){var b=!0;od(s)}else b=!1;if(ua(s,E),s.stateNode===null)_d(i,s),w2(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=Sr(Z):(Z=er(c)?Ko:Nn.current,Z=na(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)&&x2(s,S,h,Z),so=!1;var ue=s.memoizedState;S.state=ue,pd(s,h,S,E),$=s.memoizedState,D!==h||ue!==$||Zn.current||so?(typeof fe=="function"&&(Km(s,c,fe,h),$=s.memoizedState),(D=so||T2(s,c,D,h,ue,$,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,X_(i,s),D=s.memoizedProps,Z=s.type===s.elementType?D:jr(s.type,D),S.props=Z,me=s.pendingProps,ue=S.context,$=c.contextType,typeof $=="object"&&$!==null?$=Sr($):($=er(c)?Ko:Nn.current,$=na(s,$));var ke=c.getDerivedStateFromProps;(fe=typeof ke=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(D!==me||ue!==$)&&x2(s,S,h,$),so=!1,ue=s.memoizedState,S.state=ue,pd(s,h,S,E);var Ie=s.memoizedState;D!==me||ue!==Ie||Zn.current||so?(typeof ke=="function"&&(Km(s,c,ke,h),Ie=s.memoizedState),(Z=so||T2(s,c,Z,h,ue,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&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ue===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&&ue===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||D===i.memoizedProps&&ue===i.memoizedState||(s.flags|=1024),h=!1)}return tg(i,s,c,h,b,E)}function tg(i,s,c,h,E,b){I2(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return E&&B_(s,c,!1),Ri(i,s,b);h=s.stateNode,xU.current=s;var D=S&&typeof c.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=sa(s,i.child,null,b),s.child=sa(s,null,D,b)):zn(i,s,D,b),s.memoizedState=h.state,E&&B_(s,c,!0),s.child}function L2(i){var s=i.stateNode;s.pendingContext?M_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&M_(i,s.context,!1),Bm(i,s.containerInfo)}function D2(i,s,c,h,E){return oa(),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 M2(i,s,c){var h=s.pendingProps,E=Mt.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(Mt,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=Dd(S,h,0,null),i=ss(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 _U(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=po(E,$),h.subtreeFlags=E.subtreeFlags&14680064),D!==null?b=po(D,b):(b=ss(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=po(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=Dd({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function xd(i,s,c,h){return h!==null&&Om(h),sa(s,i.child,null,c),i=ig(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function _U(i,s,c,h,E,b,S){if(c)return s.flags&256?(s.flags&=-257,h=Jm(Error(n(422))),xd(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(b=h.fallback,E=s.mode,h=Dd({mode:"visible",children:h.children},E,0,null),b=ss(b,E,S,null),b.flags|=2,h.return=s,b.return=s,h.sibling=b,s.child=h,(s.mode&1)!==0&&sa(s,i.child,null,S),s.child.memoizedState=rg(S),s.memoizedState=ng,b);if((s.mode&1)===0)return xd(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),xd(i,s,S,h)}if(D=(S&i.childLanes)!==0,tr||D){if(h=hn,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,Oi(i,E),qr(h,i,E,-1))}return Tg(),h=Jm(Error(n(421))),xd(i,s,S,h)}return E.data==="$?"?(s.flags|=128,s.child=i.child,s=MU.bind(null,i),E._reactRetry=s,null):(i=b.treeContext,hr=no(E.nextSibling),fr=s,Ot=!0,zr=null,i!==null&&(xr[_r++]=Pi,xr[_r++]=Ni,xr[_r++]=Qo,Pi=i.id,Ni=i.overflow,Qo=s),s=ig(s,h.children),s.flags|=4096,s)}function F2(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 B2(i,s,c){var h=s.pendingProps,E=h.revealOrder,b=h.tail;if(zn(i,s,h.children,c),h=Mt.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&&F2(i,c,s);else if(i.tag===19)F2(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(Mt,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&&md(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&&md(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 _d(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function Ri(i,s,c){if(i!==null&&(s.dependencies=i.dependencies),ns|=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=po(i,i.pendingProps),s.child=c,c.return=s;i.sibling!==null;)i=i.sibling,c=c.sibling=po(i,i.pendingProps),c.return=s;c.sibling=null}return s.child}function SU(i,s,c){switch(s.tag){case 3:L2(s),oa();break;case 5:J_(s);break;case 1:er(s.type)&&od(s);break;case 4:Bm(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,E=s.memoizedProps.value;Tt(dd,h._currentValue),h._currentValue=E;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(Tt(Mt,Mt.current&1),s.flags|=128,null):(c&s.child.childLanes)!==0?M2(i,s,c):(Tt(Mt,Mt.current&1),i=Ri(i,s,c),i!==null?i.sibling:null);Tt(Mt,Mt.current&1);break;case 19:if(h=(c&s.childLanes)!==0,(i.flags&128)!==0){if(h)return B2(i,s,c);s.flags|=128}if(E=s.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Tt(Mt,Mt.current),h)break;return null;case 22:case 23:return s.lanes=0,O2(i,s,c)}return Ri(i,s,c)}var U2,sg,H2,z2;U2=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(){},H2=function(i,s,c,h){var E=i.memoizedProps;if(E!==h){i=s.stateNode,es(ci.current);var b=null;switch(c){case"input":E=Rt(i,E),h=Rt(i,h),b=[];break;case"select":E=k({},E,{value:void 0}),h=k({},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=nd)}en(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"&&St("scroll",i),b||D===$||(b=[])):(b=b||[]).push(Z,$))}c&&(b=b||[]).push("style",c);var Z=b;(s.updateQueue=Z)&&(s.flags|=4)}},z2=function(i,s,c,h){c!==h&&(s.flags|=4)};function Xu(i,s){if(!Ot)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 vU(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 er(s.type)&&id(),In(s),null;case 3:return h=s.stateNode,la(),vt(Zn),vt(Nn),zm(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(ld(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,zr!==null&&(Eg(zr),zr=null))),sg(i,s),In(s),null;case 5:Um(s);var E=es(Vu.current);if(c=s.type,i!==null&&s.stateNode!=null)H2(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=es(ci.current),ld(s)){h=s.stateNode,c=s.type;var b=s.memoizedProps;switch(h[li]=s,h[Uu]=b,i=(s.mode&1)!==0,c){case"dialog":St("cancel",h),St("close",h);break;case"iframe":case"object":case"embed":St("load",h);break;case"video":case"audio":for(E=0;E<Mu.length;E++)St(Mu[E],h);break;case"source":St("error",h);break;case"img":case"image":case"link":St("error",h),St("load",h);break;case"details":St("toggle",h);break;case"input":ur(h,b),St("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!b.multiple},St("invalid",h);break;case"textarea":lr(h,b),St("invalid",h)}en(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&&td(h.textContent,D,i),E=["children",D]):typeof D=="number"&&h.textContent!==""+D&&(b.suppressHydrationWarning!==!0&&td(h.textContent,D,i),E=["children",""+D]):o.hasOwnProperty(S)&&D!=null&&S==="onScroll"&&St("scroll",h)}switch(c){case"input":dn(h),Ve(h,b,!0);break;case"textarea":dn(h),Wo(h);break;case"select":case"option":break;default:typeof b.onClick=="function"&&(h.onclick=nd)}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[li]=s,i[Uu]=h,U2(i,s,!1,!1),s.stateNode=i;e:{switch(S=cr(c,h),c){case"dialog":St("cancel",i),St("close",i),E=h;break;case"iframe":case"object":case"embed":St("load",i),E=h;break;case"video":case"audio":for(E=0;E<Mu.length;E++)St(Mu[E],i);E=h;break;case"source":St("error",i),E=h;break;case"img":case"image":case"link":St("error",i),St("load",i),E=h;break;case"details":St("toggle",i),E=h;break;case"input":ur(i,h),E=Rt(i,h),St("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),St("invalid",i);break;case"textarea":lr(i,h),E=Un(i,h),St("invalid",i);break;default:E=h}en(c,E),D=E;for(b in D)if(D.hasOwnProperty(b)){var $=D[b];b==="style"?Fr(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"&&St("scroll",i):$!=null&&A(i,b,$,S))}switch(c){case"input":dn(i),Ve(i,h,!1);break;case"textarea":dn(i),Wo(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?Lt(i,!!h.multiple,b,!1):h.defaultValue!=null&&Lt(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=nd)}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)z2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(c=es(Vu.current),es(ci.current),ld(s)){if(h=s.stateNode,c=s.memoizedProps,h[li]=s,(b=h.nodeValue!==c)&&(i=fr,i!==null))switch(i.tag){case 3:td(h.nodeValue,c,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&td(h.nodeValue,c,(i.mode&1)!==0)}b&&(s.flags|=4)}else h=(c.nodeType===9?c:c.ownerDocument).createTextNode(h),h[li]=s,s.stateNode=h}return In(s),null;case 13:if(vt(Mt),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(Ot&&hr!==null&&(s.mode&1)!==0&&(s.flags&128)===0)V_(),oa(),s.flags|=98560,b=!1;else if(b=ld(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[li]=s}else oa(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;In(s),b=!1}else zr!==null&&(Eg(zr),zr=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||(Mt.current&1)!==0?nn===0&&(nn=3):Tg())),s.updateQueue!==null&&(s.flags|=4),In(s),null);case 4:return la(),sg(i,s),i===null&&Fu(s.stateNode.containerInfo),In(s),null;case 10:return Lm(s.type._context),In(s),null;case 17:return er(s.type)&&id(),In(s),null;case 19:if(vt(Mt),b=s.memoizedState,b===null)return In(s),null;if(h=(s.flags&128)!==0,S=b.rendering,S===null)if(h)Xu(b,!1);else{if(nn!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=md(i),S!==null){for(s.flags|=128,Xu(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(Mt,Mt.current&1|2),s.child}i=i.sibling}b.tail!==null&&Vt()>ha&&(s.flags|=128,h=!0,Xu(b,!1),s.lanes=4194304)}else{if(!h)if(i=md(S),i!==null){if(s.flags|=128,h=!0,c=i.updateQueue,c!==null&&(s.updateQueue=c,s.flags|=4),Xu(b,!0),b.tail===null&&b.tailMode==="hidden"&&!S.alternate&&!Ot)return In(s),null}else 2*Vt()-b.renderingStartTime>ha&&c!==1073741824&&(s.flags|=128,h=!0,Xu(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=Vt(),s.sibling=null,c=Mt.current,Tt(Mt,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?(pr&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 AU(i,s){switch(km(s),s.tag){case 1:return er(s.type)&&id(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return la(),vt(Zn),vt(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(vt(Mt),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));oa()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return vt(Mt),null;case 4:return la(),null;case 10:return Lm(s.type._context),null;case 22:case 23:return bg(),null;case 24:return null;default:return null}}var Sd=!1,Rn=!1,CU=typeof WeakSet=="function"?WeakSet:Set,Oe=null;function da(i,s){var c=i.ref;if(c!==null)if(typeof c=="function")try{c(null)}catch(h){Ht(i,s,h)}else c.current=null}function ag(i,s,c){try{c()}catch(h){Ht(i,s,h)}}var j2=!1;function kU(i,s){if(bm=Vc,i=T_(),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(be){c=null;break e}var S=0,D=-1,$=-1,Z=0,fe=0,me=i,ue=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;)ue=me,me=ke;for(;;){if(me===i)break t;if(ue===c&&++Z===E&&(D=S),ue===b&&++fe===h&&($=S),(ke=me.nextSibling)!==null)break;me=ue,ue=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},Vc=!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,qt=Ie.memoizedState,G=s.stateNode,Y=G.getSnapshotBeforeUpdate(s.elementType===s.type?Le:jr(s.type,Le),qt);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(be){Ht(s,s.return,be)}if(i=s.sibling,i!==null){i.return=s.return,Oe=i;break}Oe=s.return}return Ie=j2,j2=!1,Ie}function Ku(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 vd(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 $2(i){var s=i.alternate;s!==null&&(i.alternate=null,$2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[li],delete s[Uu],delete s[Sm],delete s[cU],delete s[dU])),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 V2(i){return i.tag===5||i.tag===3||i.tag===4}function q2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||V2(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=nd));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 bn=null,$r=!1;function uo(i,s,c){for(c=c.child;c!==null;)Y2(i,s,c),c=c.sibling}function Y2(i,s,c){if(ui&&typeof ui.onCommitFiberUnmount=="function")try{ui.onCommitFiberUnmount(Bc,c)}catch(D){}switch(c.tag){case 5:Rn||da(c,s);case 6:var h=bn,E=$r;bn=null,uo(i,s,c),bn=h,$r=E,bn!==null&&($r?(i=bn,c=c.stateNode,i.nodeType===8?i.parentNode.removeChild(c):i.removeChild(c)):bn.removeChild(c.stateNode));break;case 18:bn!==null&&($r?(i=bn,c=c.stateNode,i.nodeType===8?_m(i.parentNode,c):i.nodeType===1&&_m(i,c),ku(i)):_m(bn,c.stateNode));break;case 4:h=bn,E=$r,bn=c.stateNode.containerInfo,$r=!0,uo(i,s,c),bn=h,$r=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)}uo(i,s,c);break;case 1:if(!Rn&&(da(c,s),h=c.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=c.memoizedProps,h.state=c.memoizedState,h.componentWillUnmount()}catch(D){Ht(c,s,D)}uo(i,s,c);break;case 21:uo(i,s,c);break;case 22:c.mode&1?(Rn=(h=Rn)||c.memoizedState!==null,uo(i,s,c),Rn=h):uo(i,s,c);break;default:uo(i,s,c)}}function W2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var c=i.stateNode;c===null&&(c=i.stateNode=new CU),s.forEach(function(h){var E=FU.bind(null,i,h);c.has(h)||(c.add(h),h.then(E,E))})}}function Vr(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:bn=D.stateNode,$r=!1;break e;case 3:bn=D.stateNode.containerInfo,$r=!0;break e;case 4:bn=D.stateNode.containerInfo,$r=!0;break e}D=D.return}if(bn===null)throw Error(n(160));Y2(b,S,E),bn=null,$r=!1;var $=E.alternate;$!==null&&($.return=null),E.return=null}catch(Z){Ht(E,s,Z)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)G2(s,i),s=s.sibling}function G2(i,s){var c=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Vr(s,i),fi(i),h&4){try{Ku(3,i,i.return),vd(3,i)}catch(Le){Ht(i,i.return,Le)}try{Ku(5,i,i.return)}catch(Le){Ht(i,i.return,Le)}}break;case 1:Vr(s,i),fi(i),h&512&&c!==null&&da(c,c.return);break;case 5:if(Vr(s,i),fi(i),h&512&&c!==null&&da(c,c.return),i.flags&32){var E=i.stateNode;try{tt(E,"")}catch(Le){Ht(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&&Bn(E,b),cr(D,S);var Z=cr(D,b);for(S=0;S<$.length;S+=2){var fe=$[S],me=$[S+1];fe==="style"?Fr(E,me):fe==="dangerouslySetInnerHTML"?Ge(E,me):fe==="children"?tt(E,me):A(E,fe,me,Z)}switch(D){case"input":Jt(E,b);break;case"textarea":Zt(E,b);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!b.multiple;var ke=b.value;ke!=null?Lt(E,!!b.multiple,ke,!1):ue!==!!b.multiple&&(b.defaultValue!=null?Lt(E,!!b.multiple,b.defaultValue,!0):Lt(E,!!b.multiple,b.multiple?[]:"",!1))}E[Uu]=b}catch(Le){Ht(i,i.return,Le)}}break;case 6:if(Vr(s,i),fi(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,b=i.memoizedProps;try{E.nodeValue=b}catch(Le){Ht(i,i.return,Le)}}break;case 3:if(Vr(s,i),fi(i),h&4&&c!==null&&c.memoizedState.isDehydrated)try{ku(s.containerInfo)}catch(Le){Ht(i,i.return,Le)}break;case 4:Vr(s,i),fi(i);break;case 13:Vr(s,i),fi(i),E=i.child,E.flags&8192&&(b=E.memoizedState!==null,E.stateNode.isHidden=b,!b||E.alternate!==null&&E.alternate.memoizedState!==null||(hg=Vt())),h&4&&W2(i);break;case 22:if(fe=c!==null&&c.memoizedState!==null,i.mode&1?(Rn=(Z=Rn)||fe,Vr(s,i),Rn=Z):Vr(s,i),fi(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(ue=Oe,ke=ue.child,ue.tag){case 0:case 11:case 14:case 15:Ku(4,ue,ue.return);break;case 1:da(ue,ue.return);var Ie=ue.stateNode;if(typeof Ie.componentWillUnmount=="function"){h=ue,c=ue.return;try{s=h,Ie.props=s.memoizedProps,Ie.state=s.memoizedState,Ie.componentWillUnmount()}catch(Le){Ht(h,c,Le)}}break;case 5:da(ue,ue.return);break;case 22:if(ue.memoizedState!==null){Q2(me);continue}}ke!==null?(ke.return=ue,Oe=ke):Q2(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=En("display",S))}catch(Le){Ht(i,i.return,Le)}}}else if(me.tag===6){if(fe===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Le){Ht(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:Vr(s,i),fi(i),h&4&&W2(i);break;case 21:break;default:Vr(s,i),fi(i)}}function fi(i){var s=i.flags;if(s&2){try{e:{for(var c=i.return;c!==null;){if(V2(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=q2(i);cg(i,b,E);break;case 3:case 4:var S=h.stateNode.containerInfo,D=q2(i);lg(i,D,S);break;default:throw Error(n(161))}}catch($){Ht(i,i.return,$)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function PU(i,s,c){Oe=i,X2(i)}function X2(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||Sd;if(!S){var D=E.alternate,$=D!==null&&D.memoizedState!==null||Rn;D=Sd;var Z=Rn;if(Sd=S,(Rn=$)&&!Z)for(Oe=E;Oe!==null;)S=Oe,$=S.child,S.tag===22&&S.memoizedState!==null?J2(E):$!==null?($.return=S,Oe=$):J2(E);for(;b!==null;)Oe=b,X2(b),b=b.sibling;Oe=E,Sd=D,Rn=Z}K2(i)}else(E.subtreeFlags&8772)!==0&&b!==null?(b.return=E,Oe=b):K2(i)}}function K2(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||vd(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:jr(s.type,c.memoizedProps);h.componentDidUpdate(E,c.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var b=s.updateQueue;b!==null&&Q_(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}Q_(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&&ku(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(ue){Ht(s,s.return,ue)}}if(s===i){Oe=null;break}if(c=s.sibling,c!==null){c.return=s.return,Oe=c;break}Oe=s.return}}function Q2(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 J2(i){for(;Oe!==null;){var s=Oe;try{switch(s.tag){case 0:case 11:case 15:var c=s.return;try{vd(4,s)}catch($){Ht(s,c,$)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var E=s.return;try{h.componentDidMount()}catch($){Ht(s,E,$)}}var b=s.return;try{ug(s)}catch($){Ht(s,b,$)}break;case 5:var S=s.return;try{ug(s)}catch($){Ht(s,S,$)}}}catch($){Ht(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 NU=Math.ceil,Ad=H.ReactCurrentDispatcher,dg=H.ReactCurrentOwner,Ar=H.ReactCurrentBatchConfig,st=0,hn=null,Kt=null,Tn=0,pr=0,fa=ro(0),nn=0,Qu=null,ns=0,Cd=0,fg=0,Ju=null,nr=null,hg=0,ha=1/0,Li=null,kd=!1,pg=null,lo=null,Pd=!1,co=null,Nd=0,Zu=0,mg=null,Od=-1,Id=0;function jn(){return(st&6)!==0?Vt():Od!==-1?Od:Od=Vt()}function fo(i){return(i.mode&1)===0?1:(st&2)!==0&&Tn!==0?Tn&-Tn:hU.transition!==null?(Id===0&&(Id=qx()),Id):(i=dt,i!==0||(i=window.event,i=i===void 0?16:e_(i.type)),i)}function qr(i,s,c,h){if(50<Zu)throw Zu=0,mg=null,Error(n(185));_u(i,c,h),((st&2)===0||i!==hn)&&(i===hn&&((st&2)===0&&(Cd|=c),nn===4&&ho(i,Tn)),rr(i,h),c===1&&st===0&&(s.mode&1)===0&&(ha=Vt()+500,sd&&oo()))}function rr(i,s){var c=i.callbackNode;h7(i,s);var h=zc(i,i===hn?Tn:0);if(h===0)c!==null&&jx(c),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(c!=null&&jx(c),s===1)i.tag===0?fU(eS.bind(null,i)):U_(eS.bind(null,i)),uU(function(){(st&6)===0&&oo()}),c=null;else{switch(Yx(h)){case 1:c=Gp;break;case 4:c=$x;break;case 16:c=Fc;break;case 536870912:c=Vx;break;default:c=Fc}c=uS(c,Z2.bind(null,i))}i.callbackPriority=s,i.callbackNode=c}}function Z2(i,s){if(Od=-1,Id=0,(st&6)!==0)throw Error(n(327));var c=i.callbackNode;if(pa()&&i.callbackNode!==c)return null;var h=zc(i,i===hn?Tn:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Rd(i,h);else{s=h;var E=st;st|=2;var b=nS();(hn!==i||Tn!==s)&&(Li=null,ha=Vt()+500,is(i,s));do try{RU();break}catch(D){tS(i,D)}while(!0);Rm(),Ad.current=b,st=E,Kt!==null?s=0:(hn=null,Tn=0,s=nn)}if(s!==0){if(s===2&&(E=Xp(i),E!==0&&(h=E,s=gg(i,E))),s===1)throw c=Qu,is(i,0),ho(i,h),rr(i,Vt()),c;if(s===6)ho(i,h);else{if(E=i.current.alternate,(h&30)===0&&!OU(E)&&(s=Rd(i,h),s===2&&(b=Xp(i),b!==0&&(h=b,s=gg(i,b))),s===1))throw c=Qu,is(i,0),ho(i,h),rr(i,Vt()),c;switch(i.finishedWork=E,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:os(i,nr,Li);break;case 3:if(ho(i,h),(h&130023424)===h&&(s=hg+500-Vt(),10<s)){if(zc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){jn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=xm(os.bind(null,i,nr,Li),s);break}os(i,nr,Li);break;case 4:if(ho(i,h),(h&4194240)===h)break;for(s=i.eventTimes,E=-1;0<h;){var S=31-Ur(h);b=1<<S,S=s[S],S>E&&(E=S),h&=~b}if(h=E,h=Vt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*NU(h/1960))-h,10<h){i.timeoutHandle=xm(os.bind(null,i,nr,Li),h);break}os(i,nr,Li);break;case 5:os(i,nr,Li);break;default:throw Error(n(329))}}}return rr(i,Vt()),i.callbackNode===c?Z2.bind(null,i):null}function gg(i,s){var c=Ju;return i.current.memoizedState.isDehydrated&&(is(i,s).flags|=256),i=Rd(i,s),i!==2&&(s=nr,nr=c,s!==null&&Eg(s)),i}function Eg(i){nr===null?nr=i:nr.push.apply(nr,i)}function OU(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(!Hr(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 ho(i,s){for(s&=~fg,s&=~Cd,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var c=31-Ur(s),h=1<<c;i[c]=-1,s&=~h}}function eS(i){if((st&6)!==0)throw Error(n(327));pa();var s=zc(i,0);if((s&1)===0)return rr(i,Vt()),null;var c=Rd(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=Qu,is(i,0),ho(i,s),rr(i,Vt()),c;if(c===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,os(i,nr,Li),rr(i,Vt()),null}function yg(i,s){var c=st;st|=1;try{return i(s)}finally{st=c,st===0&&(ha=Vt()+500,sd&&oo())}}function rs(i){co!==null&&co.tag===0&&(st&6)===0&&pa();var s=st;st|=1;var c=Ar.transition,h=dt;try{if(Ar.transition=null,dt=1,i)return i()}finally{dt=h,Ar.transition=c,st=s,(st&6)===0&&oo()}}function bg(){pr=fa.current,vt(fa)}function is(i,s){i.finishedWork=null,i.finishedLanes=0;var c=i.timeoutHandle;if(c!==-1&&(i.timeoutHandle=-1,aU(c)),Kt!==null)for(c=Kt.return;c!==null;){var h=c;switch(km(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&id();break;case 3:la(),vt(Zn),vt(Nn),zm();break;case 5:Um(h);break;case 4:la();break;case 13:vt(Mt);break;case 19:vt(Mt);break;case 10:Lm(h.type._context);break;case 22:case 23:bg()}c=c.return}if(hn=i,Kt=i=po(i.current,null),Tn=pr=s,nn=0,Qu=null,fg=Cd=ns=0,nr=Ju=null,Zo!==null){for(s=0;s<Zo.length;s++)if(c=Zo[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}Zo=null}return i}function tS(i,s){do{var c=Kt;try{if(Rm(),gd.current=Td,Ed){for(var h=Ft.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Ed=!1}if(ts=0,fn=tn=Ft=null,qu=!1,Yu=0,dg.current=null,c===null||c.return===null){nn=1,Qu=s,Kt=null;break}e:{var b=i,S=c.return,D=c,$=s;if(s=Tn,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 ue=fe.alternate;ue?(fe.updateQueue=ue.updateQueue,fe.memoizedState=ue.memoizedState,fe.lanes=ue.lanes):(fe.updateQueue=null,fe.memoizedState=null)}var ke=A2(S);if(ke!==null){ke.flags&=-257,C2(ke,S,D,b,s),ke.mode&1&&v2(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){v2(b,Z,s),Tg();break e}$=Error(n(426))}}else if(Ot&&D.mode&1){var qt=A2(S);if(qt!==null){(qt.flags&65536)===0&&(qt.flags|=256),C2(qt,S,D,b,s),Om(ca($,D));break e}}b=$=ca($,D),nn!==4&&(nn=2),Ju===null?Ju=[b]:Ju.push(b),b=S;do{switch(b.tag){case 3:b.flags|=65536,s&=-s,b.lanes|=s;var G=_2(b,$,s);K_(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"&&(lo===null||!lo.has(Q)))){b.flags|=65536,s&=-s,b.lanes|=s;var be=S2(b,D,s);K_(b,be);break e}}b=b.return}while(b!==null)}iS(c)}catch(De){s=De,Kt===c&&c!==null&&(Kt=c=c.return);continue}break}while(!0)}function nS(){var i=Ad.current;return Ad.current=Td,i===null?Td:i}function Tg(){(nn===0||nn===3||nn===2)&&(nn=4),hn===null||(ns&268435455)===0&&(Cd&268435455)===0||ho(hn,Tn)}function Rd(i,s){var c=st;st|=2;var h=nS();(hn!==i||Tn!==s)&&(Li=null,is(i,s));do try{IU();break}catch(E){tS(i,E)}while(!0);if(Rm(),st=c,Ad.current=h,Kt!==null)throw Error(n(261));return hn=null,Tn=0,nn}function IU(){for(;Kt!==null;)rS(Kt)}function RU(){for(;Kt!==null&&!i7();)rS(Kt)}function rS(i){var s=aS(i.alternate,i,pr);i.memoizedProps=i.pendingProps,s===null?iS(i):Kt=s,dg.current=null}function iS(i){var s=i;do{var c=s.alternate;if(i=s.return,(s.flags&32768)===0){if(c=vU(c,s,pr),c!==null){Kt=c;return}}else{if(c=AU(c,s),c!==null){c.flags&=32767,Kt=c;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{nn=6,Kt=null;return}}if(s=s.sibling,s!==null){Kt=s;return}Kt=s=i}while(s!==null);nn===0&&(nn=5)}function os(i,s,c){var h=dt,E=Ar.transition;try{Ar.transition=null,dt=1,LU(i,s,c,h)}finally{Ar.transition=E,dt=h}return null}function LU(i,s,c,h){do pa();while(co!==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(p7(i,b),i===hn&&(Kt=hn=null,Tn=0),(c.subtreeFlags&2064)===0&&(c.flags&2064)===0||Pd||(Pd=!0,uS(Fc,function(){return pa(),null})),b=(c.flags&15990)!==0,(c.subtreeFlags&15990)!==0||b){b=Ar.transition,Ar.transition=null;var S=dt;dt=1;var D=st;st|=4,dg.current=null,kU(i,c),G2(c,i),eU(Tm),Vc=!!bm,Tm=bm=null,i.current=c,PU(c),o7(),st=D,dt=S,Ar.transition=b}else i.current=c;if(Pd&&(Pd=!1,co=i,Nd=E),b=i.pendingLanes,b===0&&(lo=null),u7(c.stateNode),rr(i,Vt()),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(kd)throw kd=!1,i=pg,pg=null,i;return(Nd&1)!==0&&i.tag!==0&&pa(),b=i.pendingLanes,(b&1)!==0?i===mg?Zu++:(Zu=0,mg=i):Zu=0,oo(),null}function pa(){if(co!==null){var i=Yx(Nd),s=Ar.transition,c=dt;try{if(Ar.transition=null,dt=16>i?16:i,co===null)var h=!1;else{if(i=co,co=null,Nd=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:Ku(8,fe,b)}var me=fe.child;if(me!==null)me.return=fe,Oe=me;else for(;Oe!==null;){fe=Oe;var ue=fe.sibling,ke=fe.return;if($2(fe),fe===Z){Oe=null;break}if(ue!==null){ue.return=ke,Oe=ue;break}Oe=ke}}}var Ie=b.alternate;if(Ie!==null){var Le=Ie.child;if(Le!==null){Ie.child=null;do{var qt=Le.sibling;Le.sibling=null,Le=qt}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:Ku(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:vd(9,D)}}catch(De){Ht(D,D.return,De)}if(D===S){Oe=null;break e}var be=D.sibling;if(be!==null){be.return=D.return,Oe=be;break e}Oe=D.return}}if(st=E,oo(),ui&&typeof ui.onPostCommitFiberRoot=="function")try{ui.onPostCommitFiberRoot(Bc,i)}catch(De){}h=!0}return h}finally{dt=c,Ar.transition=s}}return!1}function oS(i,s,c){s=ca(c,s),s=_2(i,s,1),i=ao(i,s,1),s=jn(),i!==null&&(_u(i,1,s),rr(i,s))}function Ht(i,s,c){if(i.tag===3)oS(i,i,c);else for(;s!==null;){if(s.tag===3){oS(s,i,c);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(lo===null||!lo.has(h))){i=ca(c,i),i=S2(s,i,1),s=ao(s,i,1),i=jn(),s!==null&&(_u(s,1,i),rr(s,i));break}}s=s.return}}function DU(i,s,c){var h=i.pingCache;h!==null&&h.delete(s),s=jn(),i.pingedLanes|=i.suspendedLanes&c,hn===i&&(Tn&c)===c&&(nn===4||nn===3&&(Tn&130023424)===Tn&&500>Vt()-hg?is(i,0):fg|=c),rr(i,s)}function sS(i,s){s===0&&((i.mode&1)===0?s=1:(s=Hc,Hc<<=1,(Hc&130023424)===0&&(Hc=4194304)));var c=jn();i=Oi(i,s),i!==null&&(_u(i,s,c),rr(i,c))}function MU(i){var s=i.memoizedState,c=0;s!==null&&(c=s.retryLane),sS(i,c)}function FU(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),sS(i,c)}var aS;aS=function(i,s,c){if(i!==null)if(i.memoizedProps!==s.pendingProps||Zn.current)tr=!0;else{if((i.lanes&c)===0&&(s.flags&128)===0)return tr=!1,SU(i,s,c);tr=(i.flags&131072)!==0}else tr=!1,Ot&&(s.flags&1048576)!==0&&H_(s,ud,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;_d(i,s),i=s.pendingProps;var E=na(s,Nn.current);ua(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,er(h)?(b=!0,od(s)):b=!1,s.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Fm(s),E.updater=wd,s.stateNode=E,E._reactInternals=s,Qm(s,h,i,c),s=tg(null,s,h,!0,b,c)):(s.tag=0,Ot&&b&&Cm(s),zn(null,s,E,c),s=s.child),s;case 16:h=s.elementType;e:{switch(_d(i,s),i=s.pendingProps,E=h._init,h=E(h._payload),s.type=h,E=s.tag=UU(h),i=jr(h,i),E){case 0:s=eg(null,s,h,i,c);break e;case 1:s=R2(null,s,h,i,c);break e;case 11:s=k2(null,s,h,i,c);break e;case 14:s=P2(null,s,h,jr(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:jr(h,E),eg(i,s,h,E,c);case 1:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:jr(h,E),R2(i,s,h,E,c);case 3:e:{if(L2(s),i===null)throw Error(n(387));h=s.pendingProps,b=s.memoizedState,E=b.element,X_(i,s),pd(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=ca(Error(n(423)),s),s=D2(i,s,h,c,E);break e}else if(h!==E){E=ca(Error(n(424)),s),s=D2(i,s,h,c,E);break e}else for(hr=no(s.stateNode.containerInfo.firstChild),fr=s,Ot=!0,zr=null,c=W_(s,null,h,c),s.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;else{if(oa(),h===E){s=Ri(i,s,c);break e}zn(i,s,h,c)}s=s.child}return s;case 5:return J_(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),I2(i,s),zn(i,s,S,c),s.child;case 6:return i===null&&Nm(s),null;case 13:return M2(i,s,c);case 4:return Bm(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=sa(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:jr(h,E),k2(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,S=E.value,Tt(dd,h._currentValue),h._currentValue=S,b!==null)if(Hr(b.value,S)){if(b.children===E.children&&!Zn.current){s=Ri(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){$=Ii(-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}zn(i,s,E.children,c),s=s.child}return s;case 9:return E=s.type,h=s.pendingProps.children,ua(s,c),E=Sr(E),h=h(E),s.flags|=1,zn(i,s,h,c),s.child;case 14:return h=s.type,E=jr(h,s.pendingProps),E=jr(h.type,E),P2(i,s,h,E,c);case 15:return N2(i,s,s.type,s.pendingProps,c);case 17:return h=s.type,E=s.pendingProps,E=s.elementType===h?E:jr(h,E),_d(i,s),s.tag=1,er(h)?(i=!0,od(s)):i=!1,ua(s,c),w2(s,h,E),Qm(s,h,E,c),tg(null,s,h,!0,i,c);case 19:return B2(i,s,c);case 22:return O2(i,s,c)}throw Error(n(156,s.tag))};function uS(i,s){return zx(i,s)}function BU(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 Cr(i,s,c,h){return new BU(i,s,c,h)}function wg(i){return i=i.prototype,!(!i||!i.isReactComponent)}function UU(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 po(i,s){var c=i.alternate;return c===null?(c=Cr(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 Ld(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 ss(c.children,E,b,s);case te:S=8,E|=8;break;case he:return i=Cr(12,c,s,E|2),i.elementType=he,i.lanes=b,i;case ye:return i=Cr(13,c,s,E),i.elementType=ye,i.lanes=b,i;case ee:return i=Cr(19,c,s,E),i.elementType=ee,i.lanes=b,i;case ae:return Dd(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 Ae:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=Cr(S,c,s,E),s.elementType=i,s.type=h,s.lanes=b,s}function ss(i,s,c,h){return i=Cr(7,i,h,s),i.lanes=c,i}function Dd(i,s,c,h){return i=Cr(22,i,h,s),i.elementType=ae,i.lanes=c,i.stateNode={isHidden:!1},i}function xg(i,s,c){return i=Cr(6,i,null,s),i.lanes=c,i}function _g(i,s,c){return s=Cr(4,i.children!==null?i.children:[],i.key,s),s.lanes=c,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function HU(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 HU(i,s,c,D,$),s===1?(s=1,b===!0&&(s|=8)):s=0,b=Cr(3,null,null,s),i.current=b,b.stateNode=i,b.memoizedState={element:h,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null},Fm(b),i}function zU(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 lS(i){if(!i)return io;i=i._reactInternals;e:{if(Go(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(er(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(er(c))return F_(i,c,s)}return s}function cS(i,s,c,h,E,b,S,D,$){return i=Sg(c,h,!0,i,E,b,S,D,$),i.context=lS(null),c=i.current,h=jn(),E=fo(c),b=Ii(h,E),b.callback=s!=null?s:null,ao(c,b,E),i.current.lanes=E,_u(i,E,h),rr(i,h),i}function Md(i,s,c,h){var E=s.current,b=jn(),S=fo(E);return c=lS(c),s.context===null?s.context=c:s.pendingContext=c,s=Ii(b,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=ao(E,s,S),i!==null&&(qr(i,E,S,b),hd(i,E,S)),S}function Fd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function dS(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){dS(i,s),(i=i.alternate)&&dS(i,s)}function jU(){return null}var fS=typeof reportError=="function"?reportError:function(i){console.error(i)};function Ag(i){this._internalRoot=i}Bd.prototype.render=Ag.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Md(i,s,null,null)},Bd.prototype.unmount=Ag.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;rs(function(){Md(null,i,null,null)}),s[Ci]=null}};function Bd(i){this._internalRoot=i}Bd.prototype.unstable_scheduleHydration=function(i){if(i){var s=Xx();i={blockedOn:null,target:i,priority:s};for(var c=0;c<Zi.length&&s!==0&&s<Zi[c].priority;c++);Zi.splice(c,0,i),c===0&&Jx(i)}};function Cg(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Ud(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function hS(){}function $U(i,s,c,h,E){if(E){if(typeof h=="function"){var b=h;h=function(){var Z=Fd(S);b.call(Z)}}var S=cS(s,h,i,0,null,!1,!1,"",hS);return i._reactRootContainer=S,i[Ci]=S.current,Fu(i.nodeType===8?i.parentNode:i),rs(),S}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var D=h;h=function(){var Z=Fd($);D.call(Z)}}var $=Sg(i,0,!1,null,null,!1,!1,"",hS);return i._reactRootContainer=$,i[Ci]=$.current,Fu(i.nodeType===8?i.parentNode:i),rs(function(){Md(s,$,c,h)}),$}function Hd(i,s,c,h,E){var b=c._reactRootContainer;if(b){var S=b;if(typeof E=="function"){var D=E;E=function(){var $=Fd(S);D.call($)}}Md(s,S,i,E)}else S=$U(c,s,i,E,h);return Fd(S)}Wx=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var c=xu(s.pendingLanes);c!==0&&(Qp(s,c|1),rr(s,Vt()),(st&6)===0&&(ha=Vt()+500,oo()))}break;case 13:rs(function(){var h=Oi(i,1);if(h!==null){var E=jn();qr(h,i,1,E)}}),vg(i,1)}},Jp=function(i){if(i.tag===13){var s=Oi(i,134217728);if(s!==null){var c=jn();qr(s,i,134217728,c)}vg(i,134217728)}},Gx=function(i){if(i.tag===13){var s=fo(i),c=Oi(i,s);if(c!==null){var h=jn();qr(c,i,s,h)}vg(i,s)}},Xx=function(){return dt},Kx=function(i,s){var c=dt;try{return dt=i,s()}finally{dt=c}},Pe=function(i,s,c){switch(s){case"input":if(Jt(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=rd(h);if(!E)throw Error(n(90));kt(h),Jt(h,E)}}}break;case"textarea":Zt(i,c);break;case"select":s=c.value,s!=null&&Lt(i,!!c.multiple,s,!1)}},Nt=yg,kn=rs;var VU={usingClientEntryPoint:!1,Events:[Hu,ea,rd,Dt,Hn,yg]},el={findFiberByHostInstance:Xo,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},qU={bundleType:el.bundleType,version:el.version,rendererPackageName:el.rendererPackageName,rendererConfig:el.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=Ux(i),i===null?null:i.stateNode},findFiberByHostInstance:el.findFiberByHostInstance||jU,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 zd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!zd.isDisabled&&zd.supportsFiber)try{Bc=zd.inject(qU),ui=zd}catch(i){}}return Wn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=VU,Wn.createPortal=function(i,s){var c=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Cg(s))throw Error(n(200));return zU(i,s,null,c)},Wn.createRoot=function(i,s){if(!Cg(i))throw Error(n(299));var c=!1,h="",E=fS;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[Ci]=s.current,Fu(i.nodeType===8?i.parentNode:i),new Ag(s)},Wn.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=Ux(s),i=i===null?null:i.stateNode,i},Wn.flushSync=function(i){return rs(i)},Wn.hydrate=function(i,s,c){if(!Ud(s))throw Error(n(200));return Hd(null,i,s,!0,c)},Wn.hydrateRoot=function(i,s,c){if(!Cg(i))throw Error(n(405));var h=c!=null&&c.hydratedSources||null,E=!1,b="",S=fS;if(c!=null&&(c.unstable_strictMode===!0&&(E=!0),c.identifierPrefix!==void 0&&(b=c.identifierPrefix),c.onRecoverableError!==void 0&&(S=c.onRecoverableError)),s=cS(s,null,i,1,c!=null?c:null,E,!1,b,S),i[Ci]=s.current,Fu(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 Bd(s)},Wn.render=function(i,s,c){if(!Ud(s))throw Error(n(200));return Hd(null,i,s,!1,c)},Wn.unmountComponentAtNode=function(i){if(!Ud(i))throw Error(n(40));return i._reactRootContainer?(rs(function(){Hd(null,null,i,!1,function(){i._reactRootContainer=null,i[Ci]=null})}),!0):!1},Wn.unstable_batchedUpdates=yg,Wn.unstable_renderSubtreeIntoContainer=function(i,s,c,h){if(!Ud(c))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Hd(i,s,c,!1,h)},Wn.version="18.3.1-next-f1338f8080-20240426",Wn}var aE;function uE(){if(aE)return Wf.exports;aE=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=_P(),Wf.exports}var Co=uE();function lE(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=lE(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=lE(e))&&(r&&(r+=" "),r+=t);return r}const SP=()=>document.querySelector(`:is(input, textarea)[name="${j}-user-input"]:not(:disabled)`),Kf=()=>{var e;return(e=SP())!=null?e:document.querySelector(`.${j}-dialog-content, .${j}-modal-content`)},vP=()=>{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 cE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},dE=Eo.createContext&&Eo.createContext(cE),AP=["attr","size","title"];function CP(e,t){if(e==null)return{};var n=kP(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 kP(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 Ol(){return Ol=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},Ol.apply(this,arguments)}function fE(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 Il(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?fE(Object(n),!0).forEach(function(r){PP(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):fE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function PP(e,t,n){return t=NP(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function NP(e){var t=OP(e,"string");return typeof t=="symbol"?t:t+""}function OP(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 hE(e){return e&&e.map((t,n)=>Eo.createElement(t.tag,Il({key:n},t.attr),hE(t.child)))}function ht(e){return t=>Eo.createElement(IP,Ol({attr:Il({},e.attr)},t),hE(e.child))}function IP(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=CP(e,AP),l=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Eo.createElement("svg",Ol({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Il(Il({color:e.color||n.color},n.style),e.style),height:l,width:l,xmlns:"http://www.w3.org/2000/svg"}),a&&Eo.createElement("title",null,a),e.children)};return dE!==void 0?Eo.createElement(dE.Consumer,null,n=>t(n)):t(cE)}function RP(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 LP=e=>I.isValidElement(e)?I.cloneElement(e,{"aria-hidden":!0}):e,Ti=({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"}):LP(n)}),DP="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",MP=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:o}=et(),{status:a}=ir(),u=Or(),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(RP,{className:W(t,`${j}-minimized-icon`)}):x.jsx("img",{src:(n==null?void 0:n.logoUrl)||DP,alt:u.launcher.logoAlt,className:W(t,`${j}-minimized-icon-img`)});return x.jsx(Ti,{className:W(t,`${j}-minimized-button`),ariaLabel:p,ariaHasPopup:d?"dialog":void 0,ariaExpanded:!1,title:p,icon:m,onClick:e})},FP=()=>{const{globalClassName:e,themeVariables:t,themeClassName:n}=et(),r=I.useId(),o=I.useRef(null),[a]=I.useState(()=>document.createElement("div"));I.useEffect(()=>(document.body.prepend(a),()=>a.remove()),[a]);const u=()=>{Da(!1),yi(!0),setTimeout(vP)};return x.jsxs(x.Fragment,{children:[Co.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),Co.createPortal(x.jsx("div",{id:r,ref:o,className:W(e,`${j}-minimized-container`,n),style:t,children:x.jsx(MP,{onClick:u})}),document.body)]})},BP=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=Or(),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"})})})},UP=({file:e,componentType:t,globalClassName:n,disabled:r=!1,onRemove:o})=>{const a=e.name||"",[u,l]=I.useState("");return I.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 pE(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 mE(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 ys(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 HP(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 gE(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 EE(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 zP(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 jP(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 $P(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 VP(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 qP(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 YP(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 WP=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:o,className:a,icon:u=x.jsx(YP,{}),onFiles:l})=>{const d=I.useRef(null),f=I.useId(),p=r!=null?r:f,m=I.useCallback(()=>{var y;return(y=d.current)==null?void 0:y.click()},[]),T=I.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})]})},Rl=({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}),GP=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?EE:ys;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"})},XP=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{const a=Or();if((t==null?void 0:t.buttonType)==="icon"){const l=t.buttonIcon==="arrow"?EE:ys;return x.jsx(Ti,{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(Rl,{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(GP,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||a.common.search]})};function KP(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 QP=()=>{const{messages:e}=Yn(),{handleCancel:t}=Xr();return{cancelRequest:I.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],o=r.eventSourceId||r.id;t(o)},[t,e])}},JP=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=et(),{cancelRequest:r}=QP(),o=Or();return n!=null&&n.enableCancelSearch?x.jsx(Ti,{className:W(t,`${j}-cancel-button`),ariaLabel:o.searchBar.cancelProcessingAriaLabel,title:o.searchBar.cancelRequestTitle,icon:x.jsx(KP,{}),disabled:!e,onClick:r}):null};function JH(){}function ZH(){}function yE(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 bE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const ZP=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,eN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,tN={};function TE(e,t){return(tN.jsx?eN:ZP).test(e)}const nN=/[ \t\n\f\r]/g;function rN(e){return typeof e=="object"?e.type==="text"?wE(e.value):!1:wE(e)}function wE(e){return e.replace(nN,"")===""}class Ua{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ua.prototype.normal={},Ua.prototype.property={},Ua.prototype.space=void 0;function xE(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Ua(n,r,t)}function Ha(e){return e.toLowerCase()}class Gn{constructor(t,n){this.attribute=n,this.property=t}}Gn.prototype.attribute="",Gn.prototype.booleanish=!1,Gn.prototype.boolean=!1,Gn.prototype.commaOrSpaceSeparated=!1,Gn.prototype.commaSeparated=!1,Gn.prototype.defined=!1,Gn.prototype.mustUseProperty=!1,Gn.prototype.number=!1,Gn.prototype.overloadedBoolean=!1,Gn.prototype.property="",Gn.prototype.spaceSeparated=!1,Gn.prototype.space=void 0;let iN=0;const We=Po(),Gt=Po(),Zf=Po(),Ee=Po(),pt=Po(),ko=Po(),or=Po();function Po(){return tl(2,++iN)}const eh=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Gt,commaOrSpaceSeparated:or,commaSeparated:ko,number:Ee,overloadedBoolean:Zf,spaceSeparated:pt},Symbol.toStringTag,{value:"Module"})),th=Object.keys(eh);class nh extends Gn{constructor(t,n,r,o){let a=-1;if(super(t,n),_E(this,"space",o),typeof r=="number")for(;++a<th.length;){const u=th[a];_E(this,th[a],(r&eh[u])===eh[u])}}}nh.prototype.defined=!0;function _E(e,t,n){n&&(e[t]=n)}function bs(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[Ha(r)]=r,n[Ha(a.attribute)]=r}return new Ua(t,n,e.space)}const SE=bs({properties:{ariaActiveDescendant:null,ariaAtomic:Gt,ariaAutoComplete:null,ariaBusy:Gt,ariaChecked:Gt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:pt,ariaCurrent:null,ariaDescribedBy:pt,ariaDetails:null,ariaDisabled:Gt,ariaDropEffect:pt,ariaErrorMessage:null,ariaExpanded:Gt,ariaFlowTo:pt,ariaGrabbed:Gt,ariaHasPopup:null,ariaHidden:Gt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:pt,ariaLevel:Ee,ariaLive:null,ariaModal:Gt,ariaMultiLine:Gt,ariaMultiSelectable:Gt,ariaOrientation:null,ariaOwns:pt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Gt,ariaReadOnly:Gt,ariaRelevant:null,ariaRequired:Gt,ariaRoleDescription:pt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Gt,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 vE(e,t){return t in e?e[t]:t}function AE(e,t){return vE(e,t.toLowerCase())}const oN=bs({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:ko,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:Gt,controls:We,controlsList:pt,coords:Ee|ko,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Zf,draggable:Gt,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:Gt,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:Gt,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:Gt,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:ko,part:pt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:AE}),sN=bs({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:or,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:ko,g2:ko,glyphName:ko,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:or,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:or,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:or,rev:or,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:or,requiredFeatures:or,requiredFonts:or,requiredFormats:or,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:or,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:or,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:or,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:vE}),CE=bs({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()}}),kE=bs({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:AE}),PE=bs({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),aN={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"},uN=/[A-Z]/g,NE=/-[a-z]/g,lN=/^data[-\w.:]+$/i;function Ll(e,t){const n=Ha(t);let r=t,o=Gn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&lN.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(NE,dN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!NE.test(a)){let u=a.replace(uN,cN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=nh}return new o(r,t)}function cN(e){return"-"+e.toLowerCase()}function dN(e){return e.charAt(1).toUpperCase()}const za=xE([SE,oN,CE,kE,PE],"html"),Hi=xE([SE,sN,CE,kE,PE],"svg");function OE(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function IE(e){return e.join(" ").trim()}var Ts={},rh,RE;function fN(){if(RE)return rh;RE=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(ee){var oe=ee.match(t);oe&&(C+=oe.length);var Ae=ee.lastIndexOf(d);A=~Ae?ee.length-Ae:A+ee.length}function U(){var ee={line:C,column:A};return function(oe){return oe.position=new L(ee),he(),oe}}function L(ee){this.start=ee,this.end={line:C,column:A},this.source=_.source}L.prototype.content=P;function z(ee){var oe=new Error(_.source+":"+C+":"+A+": "+ee);if(oe.reason=ee,oe.filename=_.source,oe.line=C,oe.column=A,oe.source=P,!_.silent)throw oe}function te(ee){var oe=ee.exec(P);if(oe){var Ae=oe[0];return H(Ae),P=P.slice(Ae.length),oe}}function he(){te(n)}function q(ee){var oe;for(ee=ee||[];oe=re();)oe!==!1&&ee.push(oe);return ee}function re(){var ee=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 Ae=P.slice(2,oe-2);return A+=2,H(Ae),P=P.slice(oe),A+=2,ee({type:T,comment:Ae})}}function de(){var ee=U(),oe=te(r);if(oe){if(re(),!te(o))return z("property missing ':'");var Ae=te(a),ae=ee({type:y,property:v(oe[0].replace(e,m)),value:Ae?v(Ae[0].replace(e,m)):m});return te(u),ae}}function ye(){var ee=[];q(ee);for(var oe;oe=de();)oe!==!1&&(ee.push(oe),q(ee));return ee}return he(),ye()}function v(P){return P?P.replace(l,m):m}return rh=w,rh}var LE;function hN(){if(LE)return Ts;LE=1;var e=Ts&&Ts.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Ts,"__esModule",{value:!0}),Ts.default=n;const t=e(fN());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 Ts}var ja={},DE;function pN(){if(DE)return ja;DE=1,Object.defineProperty(ja,"__esModule",{value:!0}),ja.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 ja.camelCase=d,ja}var $a,ME;function mN(){if(ME)return $a;ME=1;var e=$a&&$a.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(hN()),n=pN();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,$a=r,$a}var gN=mN();const EN=Ke(gN),Dl=FE("end"),Kr=FE("start");function FE(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 BE(e){const t=Kr(e),n=Dl(e);if(t&&n)return{start:t,end:n}}function Va(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?UE(e.position):"start"in e||"end"in e?UE(e):"line"in e||"column"in e?ih(e):""}function ih(e){return HE(e&&e.line)+":"+HE(e&&e.column)}function UE(e){return ih(e&&e.start)+"-"+ih(e&&e.end)}function HE(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=M({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const 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=Va(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,yN=new Map,bN=/[A-Z]/g,TN=new Set(["table","tbody","thead","tfoot","tr"]),wN=new Set(["td","th"]),zE="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function xN(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=NN(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=PN(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"?Hi:za,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=jE(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function jE(e,t,n){if(t.type==="element")return _N(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return SN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return AN(e,t,n);if(t.type==="mdxjsEsm")return vN(e,t);if(t.type==="root")return CN(e,t,n);if(t.type==="text")return kN(e,t)}function _N(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Hi,e.schema=o),e.ancestors.push(t);const a=VE(e,t.tagName,!1),u=ON(e,t);let l=ah(e,t);return TN.has(t.tagName)&&(l=l.filter(function(d){return typeof d=="string"?!rN(d):!0})),$E(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function SN(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)}qa(e,t.position)}function vN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);qa(e,t.position)}function AN(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Hi,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:VE(e,t.name,!0),u=IN(e,t),l=ah(e,t);return $E(e,u,a,t),sh(u,l),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function CN(e,t,n){const r={};return sh(r,ah(e,t)),e.create(t,e.Fragment,r,n)}function kN(e,t){return t.value}function $E(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 PN(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 NN(e,t){return n;function n(r,o,a,u){const l=Array.isArray(a.children),d=Kr(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 ON(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&oh.call(t.properties,o)){const a=RN(e,o,t.properties[o]);if(a){const[u,l]=a;e.tableCellAlignToStyle&&u==="align"&&typeof l=="string"&&wN.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 IN(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 qa(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 qa(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:yN;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=jE(e,a,u);l!==void 0&&n.push(l)}return n}function RN(e,t,n){const r=Ll(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?bE(n):IE(n)),r.property==="style"){let o=typeof n=="object"?n:LN(e,String(n));return e.stylePropertyNameCase==="css"&&(o=DN(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?aN[r.property]||r.property:r.attribute,n]}}function LN(e,t){try{return EN(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=zE+"#cannot-parse-style-attribute",o}}function VE(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=TE(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=TE(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);qa(e)}function qa(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=zE+"#cannot-handle-mdx-estrees-without-createevaluater",n}function DN(e){const t={};let n;for(n in e)oh.call(e,n)&&(t[MN(n)]=e[n]);return t}function MN(e){let t=e.replace(bN,FN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function FN(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"]},BN={};function lh(e,t){const n=BN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return qE(e,r,o)}function qE(e,t,n){if(UN(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 YE(e.children,t,n)}return Array.isArray(e)?YE(e,t,n):""}function YE(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=qE(e[o],t,n);return r.join("")}function UN(e){return!!(e&&typeof e=="object")}const WE=document.createElement("i");function ch(e){const t="&"+e+";";WE.innerHTML=t;const n=WE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function sr(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 yr(e,t){return e.length>0?(sr(e,e.length,0,t),e):t}const GE={}.hasOwnProperty;function XE(e){const t={};let n=-1;for(;++n<e.length;)HN(t,e[n]);return t}function HN(e,t){let n;for(n in t){const o=(GE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){GE.call(o,u)||(o[u]=[]);const l=a[u];zN(o[u],Array.isArray(l)?l:l?[l]:[])}}}function zN(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);sr(e,0,0,r)}function KE(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 Ir(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Mn=zi(/[A-Za-z]/),vn=zi(/[\dA-Za-z]/),jN=zi(/[#-'*+\--9=?A-Z^-~]/);function Ml(e){return e!==null&&(e<32||e===127)}const dh=zi(/\d/),$N=zi(/[\dA-Fa-f]/),VN=zi(/[!-/:-@[-`{-~]/);function He(e){return e!==null&&e<-2}function mt(e){return e!==null&&(e<0||e===32)}function Je(e){return e===-2||e===-1||e===32}const Fl=zi(new RegExp("\\p{P}|\\p{S}","u")),No=zi(/\s/);function zi(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function ws(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 Je(d)?(e.enter(n),l(d)):t(d)}function l(d){return Je(d)&&a++<o?(e.consume(d),l):(e.exit(n),t(d))}}const qN={tokenize:YN};function YN(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 WN={tokenize:GN},QE={tokenize:XN};function GN(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=M({},L),z++;return sr(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(QE,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(QE,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 te=z,he,q;for(;te--;)if(t.events[te][0]==="exit"&&t.events[te][1].type==="chunkFlow"){if(he){q=t.events[te][1].end;break}he=!0}for(_(r),L=z;L<t.events.length;)t.events[L][1].end=M({},q),L++;sr(t.events,te+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 XN(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 xs(e){if(e===null||mt(e)||No(e))return 1;if(Fl(e))return 2}function Bl(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:KN,tokenize:QN};function KN(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=M({},e[r][1].end),T=M({},e[n][1].start);JE(m,-d),JE(T,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:M({},e[r][1].end)},l={type:d>1?"strongSequence":"emphasisSequence",start:M({},e[n][1].start),end:T},a={type:d>1?"strongText":"emphasisText",start:M({},e[r][1].end),end:M({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:M({},u.start),end:M({},l.end)},e[r][1].end=M({},u.start),e[n][1].start=M({},l.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=yr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=yr(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=yr(f,Bl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=yr(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=yr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,sr(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 QN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=xs(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=xs(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 JE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const JN={name:"autolink",tokenize:ZN};function ZN(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||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||Ml(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):jN(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 Ya={partial:!0,tokenize:e3};function e3(e,t,n){return r;function r(a){return Je(a)?it(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||He(a)?t(a):n(a)}}const ZE={continuation:{tokenize:n3},exit:r3,name:"blockQuote",tokenize:t3};function t3(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 Je(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function n3(e,t,n){const r=this;return o;function o(u){return Je(u)?it(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(ZE,t,n)(u)}}function r3(e){e.exit("blockQuote")}const ey={name:"characterEscape",tokenize:i3};function i3(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 VN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const ty={name:"characterReference",tokenize:o3};function o3(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=$N,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 ny={partial:!0,tokenize:a3},ry={concrete:!0,name:"codeFenced",tokenize:s3};function s3(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"),Je(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(ny,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)):Je(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&&Je(L)?it(e,C,"linePrefix",a+1)(L):C(L)}function C(L){return L===null||He(L)?e.check(ny,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,te){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"),Je(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)):te(oe)}function ye(oe){return oe===l?(he++,L.consume(oe),ye):he>=u?(L.exit("codeFencedFenceSequence"),Je(oe)?it(L,ee,"whitespace")(oe):ee(oe)):te(oe)}function ee(oe){return oe===null||He(oe)?(L.exit("codeFencedFence"),z(oe)):te(oe)}}}function a3(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:l3},u3={partial:!0,tokenize:c3};function l3(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(u3,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 c3(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 d3={name:"codeText",previous:h3,resolve:f3,tokenize:p3};function f3(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 h3(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function p3(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 m3{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&&Wa(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),Wa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Wa(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);Wa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Wa(this.left,n.reverse())}}}function Wa(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 iy(e){const t={};let n=-1,r,o,a,u,l,d,f;const p=new m3(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,g3(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(p.get(o)[1].type="lineEndingBlank"),u[1].type="lineEnding",o=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;o&&(r[1].end=M({},p.get(o)[1].start),l=p.slice(o,n),l.unshift(r),p.splice(o,n-o+1,l))}}return sr(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function g3(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 E3={resolve:b3,tokenize:T3},y3={partial:!0,tokenize:w3};function b3(e){return iy(e),e}function T3(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(y3,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 w3(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 oy(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||Ml(_)?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||Ml(_)?n(_):(e.consume(_),_===92?P:v)}function P(_){return _===40||_===41||_===92?(e.consume(_),v):v(_)}}function sy(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=!Je(y)),y===92?T:m)}function T(y){return y===91||y===92||y===93?(e.consume(y),l++,m):m(y)}}function ay(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 Ga(e,t){let n;return r;function r(o){return He(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Je(o)?it(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const x3={name:"definition",tokenize:S3},_3={partial:!0,tokenize:v3};function S3(e,t,n){const r=this;let o;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return sy.call(r,e,l,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function l(y){return o=Ir(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)?Ga(e,f)(y):f(y)}function f(y){return oy(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(_3,m,m)(y)}function m(y){return Je(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 v3(e,t,n){return r;function r(l){return mt(l)?Ga(e,o)(l):n(l)}function o(l){return ay(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(l)}function a(l){return Je(l)?it(e,u,"whitespace")(l):u(l)}function u(l){return l===null||He(l)?t(l):n(l)}}const A3={name:"hardBreakEscape",tokenize:C3};function C3(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 k3={name:"headingAtx",resolve:P3,tokenize:N3};function P3(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"},sr(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function N3(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)):Je(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 O3=["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"],uy=["pre","script","style","textarea"],I3={concrete:!0,name:"htmlFlow",resolveTo:D3,tokenize:M3},R3={partial:!0,tokenize:B3},L3={partial:!0,tokenize:F3};function D3(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 M3(e,t,n){const r=this;let o,a,u,l,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),m}function m(O){return O===33?(e.consume(O),T):O===47?(e.consume(O),a=!0,v):O===63?(e.consume(O),o=3,r.interrupt?t:k):Mn(O)?(e.consume(O),u=String.fromCharCode(O),P):n(O)}function T(O){return O===45?(e.consume(O),o=2,y):O===91?(e.consume(O),o=5,l=0,w):Mn(O)?(e.consume(O),o=4,r.interrupt?t:k):n(O)}function y(O){return O===45?(e.consume(O),r.interrupt?t:k):n(O)}function w(O){const ce="CDATA[";return O===ce.charCodeAt(l++)?(e.consume(O),l===ce.length?r.interrupt?t:de:w):n(O)}function v(O){return Mn(O)?(e.consume(O),u=String.fromCharCode(O),P):n(O)}function P(O){if(O===null||O===47||O===62||mt(O)){const ce=O===47,we=u.toLowerCase();return!ce&&!a&&uy.includes(we)?(o=1,r.interrupt?t(O):de(O)):O3.includes(u.toLowerCase())?(o=6,ce?(e.consume(O),_):r.interrupt?t(O):de(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?C(O):A(O))}return O===45||vn(O)?(e.consume(O),u+=String.fromCharCode(O),P):n(O)}function _(O){return O===62?(e.consume(O),r.interrupt?t:de):n(O)}function C(O){return Je(O)?(e.consume(O),C):q(O)}function A(O){return O===47?(e.consume(O),q):O===58||O===95||Mn(O)?(e.consume(O),H):Je(O)?(e.consume(O),A):q(O)}function H(O){return O===45||O===46||O===58||O===95||vn(O)?(e.consume(O),H):U(O)}function U(O){return O===61?(e.consume(O),L):Je(O)?(e.consume(O),U):A(O)}function L(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,z):Je(O)?(e.consume(O),L):te(O)}function z(O){return O===d?(e.consume(O),d=null,he):O===null||He(O)?n(O):(e.consume(O),z)}function te(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||mt(O)?U(O):(e.consume(O),te)}function he(O){return O===47||O===62||Je(O)?A(O):n(O)}function q(O){return O===62?(e.consume(O),re):n(O)}function re(O){return O===null||He(O)?de(O):Je(O)?(e.consume(O),re):n(O)}function de(O){return O===45&&o===2?(e.consume(O),Ae):O===60&&o===1?(e.consume(O),ae):O===62&&o===4?(e.consume(O),F):O===63&&o===3?(e.consume(O),k):O===93&&o===5?(e.consume(O),se):He(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(R3,K,ye)(O)):O===null||He(O)?(e.exit("htmlFlowData"),ye(O)):(e.consume(O),de)}function ye(O){return e.check(L3,ee,K)(O)}function ee(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),oe}function oe(O){return O===null||He(O)?ye(O):(e.enter("htmlFlowData"),de(O))}function Ae(O){return O===45?(e.consume(O),k):de(O)}function ae(O){return O===47?(e.consume(O),u="",J):de(O)}function J(O){if(O===62){const ce=u.toLowerCase();return uy.includes(ce)?(e.consume(O),F):de(O)}return Mn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),J):de(O)}function se(O){return O===93?(e.consume(O),k):de(O)}function k(O){return O===62?(e.consume(O),F):O===45&&o===2?(e.consume(O),k):de(O)}function F(O){return O===null||He(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),F)}function K(O){return e.exit("htmlFlow"),t(O)}}function F3(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 B3(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(Ya,t,n)}}const U3={name:"htmlText",tokenize:H3};function H3(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):Mn(k)?(e.consume(k),te):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,w):Mn(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?Ae(k):k===45?T(k):m(k)}function w(k){const F="CDATA[";return k===F.charCodeAt(a++)?(e.consume(k),a===F.length?v:w):n(k)}function v(k){return k===null?n(k):k===93?(e.consume(k),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?Ae(k):k===93?(e.consume(k),_):v(k)}function C(k){return k===null||k===62?Ae(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?Ae(k):A(k)}function U(k){return Mn(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)):Je(k)?(e.consume(k),z):Ae(k)}function te(k){return k===45||vn(k)?(e.consume(k),te):k===47||k===62||mt(k)?he(k):n(k)}function he(k){return k===47?(e.consume(k),Ae):k===58||k===95||Mn(k)?(e.consume(k),q):He(k)?(u=he,ae(k)):Je(k)?(e.consume(k),he):Ae(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)):Je(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)):Je(k)?(e.consume(k),de):(e.consume(k),ee)}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 ee(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),ee)}function oe(k){return k===47||k===62||mt(k)?he(k):n(k)}function Ae(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 Je(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:V3,resolveTo:q3,tokenize:Y3},z3={tokenize:W3},j3={tokenize:G3},$3={tokenize:X3};function V3(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&&sr(e,0,e.length,n),e}function q3(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:M({},e[a][1].start),end:M({},e[e.length-1][1].end)},f={type:"label",start:M({},e[a][1].start),end:M({},e[u][1].end)},p={type:"labelText",start:M({},e[a+r+2][1].end),end:M({},e[u-2][1].start)};return l=[["enter",d,t],["enter",f,t]],l=yr(l,e.slice(a+1,a+r+3)),l=yr(l,[["enter",p,t]]),l=yr(l,Bl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),l=yr(l,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),l=yr(l,e.slice(u+1)),l=yr(l,[["exit",d,t]]),sr(e,a,e.length,l),e}function Y3(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(Ir(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(z3,p,u?p:m)(T):T===91?e.attempt(j3,p,u?f:m)(T):u?p(T):m(T)}function f(T){return e.attempt($3,p,m)(T)}function p(T){return t(T)}function m(T){return a._balanced=!0,n(T)}}function W3(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)?Ga(e,a)(m):a(m)}function a(m){return m===41?p(m):oy(e,u,l,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return mt(m)?Ga(e,d)(m):p(m)}function l(m){return n(m)}function d(m){return m===34||m===39||m===40?ay(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return mt(m)?Ga(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 G3(e,t,n){const r=this;return o;function o(l){return sy.call(r,e,a,u,"reference","referenceMarker","referenceString")(l)}function a(l){return r.parser.defined.includes(Ir(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(l):n(l)}function u(l){return n(l)}}function X3(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 K3={name:"labelStartImage",resolveAll:ph.resolveAll,tokenize:Q3};function Q3(e,t,n){const r=this;return o;function o(l){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(l),e.exit("labelImageMarker"),a}function a(l){return l===91?(e.enter("labelMarker"),e.consume(l),e.exit("labelMarker"),e.exit("labelImage"),u):n(l)}function u(l){return l===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(l):t(l)}}const J3={name:"labelStartLink",resolveAll:ph.resolveAll,tokenize:Z3};function Z3(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:eO};function eO(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),it(e,t,"linePrefix")}}const Ul={name:"thematicBreak",tokenize:tO};function tO(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"),Je(f)?it(e,l,"whitespace")(f):l(f))}}const Xn={continuation:{tokenize:oO},exit:aO,name:"list",tokenize:iO},nO={partial:!0,tokenize:uO},rO={partial:!0,tokenize:sO};function iO(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(Ul,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(Ya,r.interrupt?n:p,e.attempt(nO,T,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,T(y)}function m(y){return Je(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 oO(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(Ya,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||!Je(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(rO,t,u)(l))}function u(l){return r.containerState._closeFlow=!0,r.interrupt=void 0,it(e,e.attempt(Xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(l)}}function sO(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 aO(e){e.exit(this.containerState.type)}function uO(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!Je(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const ly={name:"setextUnderline",resolveTo:lO,tokenize:cO};function lO(e,t){let n=e.length,r,o,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(o=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:M({},e[r][1].start),end:M({},e[e.length-1][1].end)};return e[o][1].type="setextHeadingText",a?(e.splice(o,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=M({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function cO(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"),Je(f)?it(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||He(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const dO={tokenize:fO};function fO(e){const t=this,n=e.attempt(Ya,r,e.attempt(this.parser.constructs.flowInitial,o,it(e,e.attempt(this.parser.constructs.flow,o,e.attempt(E3,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 hO={resolveAll:dy()},pO=cy("string"),mO=cy("text");function cy(e){return{resolveAll:dy(e==="text"?gO: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 dy(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 gO(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:M({},r.end)};r.end=M({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const EO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:x3},disable:{null:[]},document:{42:Xn,43:Xn,45:Xn,48:Xn,49:Xn,50:Xn,51:Xn,52:Xn,53:Xn,54:Xn,55:Xn,56:Xn,57:Xn,62:ZE},flow:{35:k3,42:Ul,45:[ly,Ul],60:I3,61:ly,95:Ul,96:ry,126:ry},flowInitial:{[-2]:hh,[-1]:hh,32:hh},insideSpan:{null:[fh,hO]},string:{38:ty,92:ey},text:{[-5]:mh,[-4]:mh,[-3]:mh,33:K3,38:ty,42:fh,60:[JN,U3],91:J3,92:[A3,ey],93:ph,95:fh,96:d3}},Symbol.toStringTag,{value:"Module"}));function yO(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=yr(u,re),P(),u[u.length-1]!==null?[]:(te(t,0),f.events=Bl(a,f.events,f),f.events)}function T(re,de){return TO(y(re),de)}function y(re){return bO(u,re)}function w(){const{_bufferIndex:re,_index:de,line:ye,column:ee,offset:oe}=r;return{_bufferIndex:re,_index:de,line:ye,column:ee,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){te(re,de.from)}function L(re,de){de.restore()}function z(re,de){return ye;function ye(ee,oe,Ae){let ae,J,se,k;return Array.isArray(ee)?K(ee):"tokenize"in ee?K([ee]):F(ee);function F(Ce){return xe;function xe(Re){const Fe=Re!==null&&Ce[Re],at=Re!==null&&Ce.null,dn=[...Array.isArray(Fe)?Fe:Fe?[Fe]:[],...Array.isArray(at)?at:at?[at]:[]];return K(dn)(Re)}}function K(Ce){return ae=Ce,J=0,Ce.length===0?Ae:O(Ce[J])}function O(Ce){return xe;function xe(Re){return k=he(),se=Ce,Ce.partial||(f.currentConstruct=Ce),Ce.name&&f.parser.constructs.disable.null.includes(Ce.name)?we():Ce.tokenize.call(de?Object.assign(Object.create(f),de):f,d,ce,we)(Re)}}function ce(Ce){return re(se,k),oe}function we(Ce){return k.restore(),++J<ae.length?O(ae[J]):Ae}}}function te(re,de){re.resolveAll&&!a.includes(re)&&a.push(re),re.resolve&&sr(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,ee=f.events.length,oe=Array.from(l);return{from:ee,restore:Ae};function Ae(){r=re,f.previous=de,f.currentConstruct=ye,f.events.length=ee,l=oe,q()}}function q(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function bO(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 TO(e,t){let n=-1;const r=[];let o;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
19
19
|
`;break}case-3:{u=`\r
|
|
20
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&o)continue;u=" ";break}default:u=String.fromCharCode(a)}o=a===-2,r.push(u)}return r.join("")}function dO(e){const r={constructs:FE([aO,...(e||{}).extensions||[]]),content:o(DP),defined:[],document:o(FP),flow:o(tO),lazy:{},string:o(iO),text:o(oO)};return r;function o(a){return u;function u(l){return uO(r,a,l)}}}function fO(e){for(;!YE(e););return e}const ey=/[\0\t\n\r]/g;function hO(){let e=1,t="",n=!0,r;return o;function o(a,u,l){const d=[];let f,p,m,T,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(ey.lastIndex=m,f=ey.exec(a),T=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(T),!f){t=a.slice(m);break}if(y===10&&m===T&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<T&&(d.push(a.slice(m,T)),e+=T-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=T+1}return l&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const pO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mO(e){return e.replace(pO,gO)}function gO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return BE(n.slice(a?2:1),a?16:10)}return Kf(n)||e}const ty={}.hasOwnProperty;function EO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yO(n)(fO(dO(n).document().write(hO()(e,t,!0))))}function yO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Qn),blockQuote:a(lt),characterEscape:de,characterReference:de,codeFenced:a(cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(cn,u),codeText:a(Lt,u),codeTextData:de,data:de,codeFlowValue:de,definition:a($t),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Pt),hardBreakEscape:a(_n),hardBreakTrailing:a(_n),htmlFlow:a(Gt,u),htmlFlowData:de,htmlText:a(Gt,u),htmlTextData:de,image:a(qe),label:u,link:a(bt),listItem:a(xe),listItemValue:T,listOrdered:a(Vt,m),listUnordered:a(Vt),paragraph:a(Le),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Qn),strong:a(Be),thematicBreak:a(gt)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ue,autolinkProtocol:Ie,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Me,characterReferenceMarkerNumeric:Me,characterReferenceValue:ke,characterReference:be,codeFenced:d(N),codeFencedFence:v,codeFencedFenceInfo:y,codeFencedFenceMeta:w,codeFlowValue:V,codeIndented:d(x),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:U,definitionLabelString:C,definitionTitleString:A,emphasis:d(),hardBreakEscape:d(fe),hardBreakTrailing:d(fe),htmlFlow:d(we),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(se),label:ae,labelText:J,lineEnding:ie,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:Se,resourceDestinationString:k,resourceTitleString:F,resource:K,setextHeading:d(ne),setextHeadingLineSequence:$,setextHeadingText:R,strong:d(),thematicBreak:d()}};ny(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(Z){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:l,exit:f,buffer:u,resume:p,data:n},Ye=[];let Re=-1;for(;++Re<Z.length;)if(Z[Re][1].type==="listOrdered"||Z[Re][1].type==="listUnordered")if(Z[Re][0]==="enter")Ye.push(Re);else{const ct=Ye.pop();Re=o(Z,ct,Re)}for(Re=-1;++Re<Z.length;){const ct=t[Z[Re][0]];ty.call(ct,Z[Re][1].type)&&ct[Z[Re][1].type].call(Object.assign({sliceSerialize:Z[Re][2].sliceSerialize},Ce),Z[Re][1])}if(Ce.tokenStack.length>0){const ct=Ce.tokenStack[Ce.tokenStack.length-1];(ct[1]||ry).call(Ce,void 0,ct[0])}for(ge.position={start:Ai(Z.length>0?Z[0][1].start:{line:1,column:1,offset:0}),end:Ai(Z.length>0?Z[Z.length-2][1].end:{line:1,column:1,offset:0})},Re=-1;++Re<t.transforms.length;)ge=t.transforms[Re](ge)||ge;return ge}function o(Z,ge,Ce){let Ye=ge-1,Re=-1,ct=!1,Xt,qt,dn,qr;for(;++Ye<=Ce;){const fn=Z[Ye];switch(fn[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{fn[0]==="enter"?Re++:Re--,qr=void 0;break}case"lineEndingBlank":{fn[0]==="enter"&&(Xt&&!qr&&!Re&&!dn&&(dn=Ye),qr=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:qr=void 0}if(!Re&&fn[0]==="enter"&&fn[1].type==="listItemPrefix"||Re===-1&&fn[0]==="exit"&&(fn[1].type==="listUnordered"||fn[1].type==="listOrdered")){if(Xt){let Yr=Ye;for(qt=void 0;Yr--;){const Jn=Z[Yr];if(Jn[1].type==="lineEnding"||Jn[1].type==="lineEndingBlank"){if(Jn[0]==="exit")continue;qt&&(Z[qt][1].type="lineEndingBlank",ct=!0),Jn[1].type="lineEnding",qt=Yr}else if(!(Jn[1].type==="linePrefix"||Jn[1].type==="blockQuotePrefix"||Jn[1].type==="blockQuotePrefixWhitespace"||Jn[1].type==="blockQuoteMarker"||Jn[1].type==="listItemIndent"))break}dn&&(!qt||dn<qt)&&(Xt._spread=!0),Xt.end=Object.assign({},qt?Z[qt][1].start:fn[1].end),Z.splice(qt||Ye,0,["exit",Xt,fn[2]]),Ye++,Ce++}if(fn[1].type==="listItemPrefix"){const Yr={type:"listItem",_spread:!1,start:Object.assign({},fn[1].start),end:void 0};Xt=Yr,Z.splice(Ye,0,["enter",Yr,fn[2]]),Ye++,Ce++,dn=void 0,qr=!0}}}return Z[ge][1]._spread=ct,Ce}function a(Z,ge){return Ce;function Ce(Ye){l.call(this,Z(Ye),Ye),ge&&ge.call(this,Ye)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(Z,ge,Ce){this.stack[this.stack.length-1].children.push(Z),this.stack.push(Z),this.tokenStack.push([ge,Ce||void 0]),Z.position={start:Ai(ge.start),end:void 0}}function d(Z){return ge;function ge(Ce){Z&&Z.call(this,Ce),f.call(this,Ce)}}function f(Z,ge){const Ce=this.stack.pop(),Ye=this.tokenStack.pop();if(Ye)Ye[0].type!==Z.type&&(ge?ge.call(this,Z,Ye[0]):(Ye[1]||ry).call(this,Z,Ye[0]));else throw new Error("Cannot close `"+Z.type+"` ("+Pa({start:Z.start,end:Z.end})+"): it’s not open");Ce.position.end=Ai(Z.end)}function p(){return Xf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(Z){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(Z),10),this.data.expectingFirstListItemValue=void 0}}function y(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=Z}function w(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=Z}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function N(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function x(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z.replace(/(\r?\n|\r)$/g,"")}function C(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase()}function A(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function U(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function Y(Z){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(Z).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function $(Z){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(Z).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(Z){const Ce=this.stack[this.stack.length-1].children;let Ye=Ce[Ce.length-1];(!Ye||Ye.type!=="text")&&(Ye=Xe(),Ye.position={start:Ai(Z.start),end:void 0},Ce.push(Ye)),this.stack.push(Ye)}function V(Z){const ge=this.stack.pop();ge.value+=this.sliceSerialize(Z),ge.position.end=Ai(Z.end)}function ie(Z){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Ai(Z.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(de.call(this,Z),V.call(this,Z))}function fe(){this.data.atHardBreak=!0}function we(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function re(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function oe(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.value=Z}function Ae(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function se(){const Z=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";Z.type+="Reference",Z.referenceType=ge,delete Z.url,delete Z.title}else delete Z.identifier,delete Z.label;this.data.referenceType=void 0}function J(Z){const ge=this.sliceSerialize(Z),Ce=this.stack[this.stack.length-2];Ce.label=mO(ge),Ce.identifier=yr(ge).toLowerCase()}function ae(){const Z=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ye=Z.children;Ce.children=Ye}else Ce.alt=ge}function k(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.url=Z}function F(){const Z=this.resume(),ge=this.stack[this.stack.length-1];ge.title=Z}function K(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function Se(Z){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=yr(this.sliceSerialize(Z)).toLowerCase(),this.data.referenceType="full"}function Me(Z){this.data.characterReferenceType=Z.type}function ke(Z){const ge=this.sliceSerialize(Z),Ce=this.data.characterReferenceType;let Ye;Ce?(Ye=BE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ye=Kf(ge);const Re=this.stack[this.stack.length-1];Re.value+=Ye}function be(Z){const ge=this.stack.pop();ge.position.end=Ai(Z.end)}function Ie(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(Z)}function Ue(Z){V.call(this,Z);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(Z)}function lt(){return{type:"blockquote",children:[]}}function cn(){return{type:"code",lang:null,meta:null,value:""}}function Lt(){return{type:"inlineCode",value:""}}function $t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Pt(){return{type:"emphasis",children:[]}}function Qn(){return{type:"heading",depth:0,children:[]}}function _n(){return{type:"break"}}function Gt(){return{type:"html",value:""}}function qe(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Vt(Z){return{type:"list",ordered:Z.type==="listOrdered",start:null,spread:Z._spread,children:[]}}function xe(Z){return{type:"listItem",spread:Z._spread,checked:null,children:[]}}function Le(){return{type:"paragraph",children:[]}}function Be(){return{type:"strong",children:[]}}function Xe(){return{type:"text",value:""}}function gt(){return{type:"thematicBreak"}}}function Ai(e){return{line:e.line,column:e.column,offset:e.offset}}function ny(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?ny(e,r):bO(e,r)}}function bO(e,t){let n;for(n in t)if(ty.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function ry(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Pa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Pa({start:t.start,end:t.end})+") is still open")}function TO(e){const t=this;t.parser=n;function n(r){return EO(r,me(B(B({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function wO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function _O(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
-
`}]}function
|
|
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
|
|
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 wO(e){const r={constructs:XE([EO,...(e||{}).extensions||[]]),content:o(qN),defined:[],document:o(WN),flow:o(dO),lazy:{},string:o(pO),text:o(mO)};return r;function o(a){return u;function u(l){return yO(r,a,l)}}}function xO(e){for(;!iy(e););return e}const fy=/[\0\t\n\r]/g;function _O(){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(fy.lastIndex=m,f=fy.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 SO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function vO(e){return e.replace(SO,AO)}function AO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return KE(n.slice(a?2:1),a?16:10)}return ch(n)||e}const hy={}.hasOwnProperty;function CO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),kO(n)(xO(wO(n).document().write(_O()(e,t,!0))))}function kO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(bt),autolinkProtocol:he,autolinkEmail:he,atxHeading:a(ur),blockQuote:a(at),characterEscape:he,characterReference:he,codeFenced:a(dn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(dn,u),codeText:a(kt,u),codeTextData:he,data:he,codeFlowValue:he,definition:a($t),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Rt),hardBreakEscape:a(Bn),hardBreakTrailing:a(Bn),htmlFlow:a(Jt,u),htmlFlowData:he,htmlText:a(Jt,u),htmlTextData:he,image:a(Ve),label:u,link:a(bt),listItem:a(Lt),listItemValue:T,listOrdered:a(Xt,m),listUnordered:a(Xt),paragraph:a(Un),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(ur),strong:a(lr),thematicBreak:a(Wo)},exit:{atxHeading:d(),atxHeadingSequence:U,autolink:d(),autolinkEmail:Fe,autolinkProtocol:Re,blockQuote:d(),characterEscapeValue:q,characterReferenceMarkerHexadecimal:we,characterReferenceMarkerNumeric:we,characterReferenceValue:Ce,characterReference:xe,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(ee),htmlTextData:q,image:d(ae),label:se,labelText:J,lineEnding:re,link:d(Ae),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ce,resourceDestinationString:k,resourceTitleString:F,resource:K,setextHeading:d(te),setextHeadingLineSequence:z,setextHeadingText:L,strong:d(),thematicBreak:d()}};py(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ie){let Te={type:"root",children:[]};const qe={stack:[Te],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 Ut=Ge.pop();tt=o(ie,Ut,tt)}for(tt=-1;++tt<ie.length;){const Ut=t[ie[tt][0]];hy.call(Ut,ie[tt][1].type)&&Ut[ie[tt][1].type].call(Object.assign({sliceSerialize:ie[tt][2].sliceSerialize},qe),ie[tt][1])}if(qe.tokenStack.length>0){const Ut=qe.tokenStack[qe.tokenStack.length-1];(Ut[1]||my).call(qe,void 0,Ut[0])}for(Te.position={start:ji(ie.length>0?ie[0][1].start:{line:1,column:1,offset:0}),end:ji(ie.length>0?ie[ie.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)Te=t.transforms[tt](Te)||Te;return Te}function o(ie,Te,qe){let Ge=Te-1,tt=-1,Ut=!1,wr,En,Fr,ai;for(;++Ge<=qe;){const en=ie[Ge];switch(en[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{en[0]==="enter"?tt++:tt--,ai=void 0;break}case"lineEndingBlank":{en[0]==="enter"&&(wr&&!ai&&!tt&&!Fr&&(Fr=Ge),ai=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ai=void 0}if(!tt&&en[0]==="enter"&&en[1].type==="listItemPrefix"||tt===-1&&en[0]==="exit"&&(en[1].type==="listUnordered"||en[1].type==="listOrdered")){if(wr){let cr=Ge;for(En=void 0;cr--;){const Cn=ie[cr];if(Cn[1].type==="lineEnding"||Cn[1].type==="lineEndingBlank"){if(Cn[0]==="exit")continue;En&&(ie[En][1].type="lineEndingBlank",Ut=!0),Cn[1].type="lineEnding",En=cr}else if(!(Cn[1].type==="linePrefix"||Cn[1].type==="blockQuotePrefix"||Cn[1].type==="blockQuotePrefixWhitespace"||Cn[1].type==="blockQuoteMarker"||Cn[1].type==="listItemIndent"))break}Fr&&(!En||Fr<En)&&(wr._spread=!0),wr.end=Object.assign({},En?ie[En][1].start:en[1].end),ie.splice(En||Ge,0,["exit",wr,en[2]]),Ge++,qe++}if(en[1].type==="listItemPrefix"){const cr={type:"listItem",_spread:!1,start:Object.assign({},en[1].start),end:void 0};wr=cr,ie.splice(Ge,0,["enter",cr,en[2]]),Ge++,qe++,Fr=void 0,ai=!0}}}return ie[Te][1]._spread=Ut,qe}function a(ie,Te){return qe;function qe(Ge){l.call(this,ie(Ge),Ge),Te&&Te.call(this,Ge)}}function u(){this.stack.push({type:"fragment",children:[]})}function l(ie,Te,qe){this.stack[this.stack.length-1].children.push(ie),this.stack.push(ie),this.tokenStack.push([Te,qe||void 0]),ie.position={start:ji(Te.start),end:void 0}}function d(ie){return Te;function Te(qe){ie&&ie.call(this,qe),f.call(this,qe)}}function f(ie,Te){const qe=this.stack.pop(),Ge=this.tokenStack.pop();if(Ge)Ge[0].type!==ie.type&&(Te?Te.call(this,ie,Ge[0]):(Ge[1]||my).call(this,ie,Ge[0]));else throw new Error("Cannot close `"+ie.type+"` ("+Va({start:ie.start,end:ie.end})+"): it’s not open");qe.position.end=ji(ie.end)}function p(){return lh(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function T(ie){if(this.data.expectingFirstListItemValue){const Te=this.stack[this.stack.length-2];Te.start=Number.parseInt(this.sliceSerialize(ie),10),this.data.expectingFirstListItemValue=void 0}}function y(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.lang=ie}function w(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.meta=ie}function v(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function P(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function _(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie.replace(/(\r?\n|\r)$/g,"")}function C(ie){const Te=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Te,qe.identifier=Ir(this.sliceSerialize(ie)).toLowerCase()}function A(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function H(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function U(ie){const Te=this.stack[this.stack.length-1];if(!Te.depth){const qe=this.sliceSerialize(ie).length;Te.depth=qe}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function z(ie){const Te=this.stack[this.stack.length-1];Te.depth=this.sliceSerialize(ie).codePointAt(0)===61?1:2}function te(){this.data.setextHeadingSlurpLineEnding=void 0}function he(ie){const qe=this.stack[this.stack.length-1].children;let Ge=qe[qe.length-1];(!Ge||Ge.type!=="text")&&(Ge=Zt(),Ge.position={start:ji(ie.start),end:void 0},qe.push(Ge)),this.stack.push(Ge)}function q(ie){const Te=this.stack.pop();Te.value+=this.sliceSerialize(ie),Te.position.end=ji(ie.end)}function re(ie){const Te=this.stack[this.stack.length-1];if(this.data.atHardBreak){const qe=Te.children[Te.children.length-1];qe.position.end=ji(ie.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(Te.type)&&(he.call(this,ie),q.call(this,ie))}function de(){this.data.atHardBreak=!0}function ye(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function ee(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function oe(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.value=ie}function Ae(){const ie=this.stack[this.stack.length-1];if(this.data.inReference){const Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,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 Te=this.data.referenceType||"shortcut";ie.type+="Reference",ie.referenceType=Te,delete ie.url,delete ie.title}else delete ie.identifier,delete ie.label;this.data.referenceType=void 0}function J(ie){const Te=this.sliceSerialize(ie),qe=this.stack[this.stack.length-2];qe.label=vO(Te),qe.identifier=Ir(Te).toLowerCase()}function se(){const ie=this.stack[this.stack.length-1],Te=this.resume(),qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,qe.type==="link"){const Ge=ie.children;qe.children=Ge}else qe.alt=Te}function k(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.url=ie}function F(){const ie=this.resume(),Te=this.stack[this.stack.length-1];Te.title=ie}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function ce(ie){const Te=this.resume(),qe=this.stack[this.stack.length-1];qe.label=Te,qe.identifier=Ir(this.sliceSerialize(ie)).toLowerCase(),this.data.referenceType="full"}function we(ie){this.data.characterReferenceType=ie.type}function Ce(ie){const Te=this.sliceSerialize(ie),qe=this.data.characterReferenceType;let Ge;qe?(Ge=KE(Te,qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ge=ch(Te);const tt=this.stack[this.stack.length-1];tt.value+=Ge}function xe(ie){const Te=this.stack.pop();Te.position.end=ji(ie.end)}function Re(ie){q.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url=this.sliceSerialize(ie)}function Fe(ie){q.call(this,ie);const Te=this.stack[this.stack.length-1];Te.url="mailto:"+this.sliceSerialize(ie)}function at(){return{type:"blockquote",children:[]}}function dn(){return{type:"code",lang:null,meta:null,value:""}}function kt(){return{type:"inlineCode",value:""}}function $t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Rt(){return{type:"emphasis",children:[]}}function ur(){return{type:"heading",depth:0,children:[]}}function Bn(){return{type:"break"}}function Jt(){return{type:"html",value:""}}function Ve(){return{type:"image",title:null,url:"",alt:null}}function bt(){return{type:"link",title:null,url:"",children:[]}}function Xt(ie){return{type:"list",ordered:ie.type==="listOrdered",start:null,spread:ie._spread,children:[]}}function Lt(ie){return{type:"listItem",spread:ie._spread,checked:null,children:[]}}function Un(){return{type:"paragraph",children:[]}}function lr(){return{type:"strong",children:[]}}function Zt(){return{type:"text",value:""}}function Wo(){return{type:"thematicBreak"}}}function ji(e){return{line:e.line,column:e.column,offset:e.offset}}function py(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?py(e,r):PO(e,r)}}function PO(e,t){let n;for(n in t)if(hy.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 my(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+Va({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+Va({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+Va({start:t.start,end:t.end})+") is still open")}function NO(e){const t=this;t.parser=n;function n(r){return CO(r,ge(M(M({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function OO(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 IO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
+
`}]}function RO(e,t){const n=t.value?t.value+`
|
|
22
|
+
`:"",r={},o=t.lang?t.lang.split(/\s+/):[];o.length>0&&(r.className=["language-"+o[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function LO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function DO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function MO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=ws(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 FO(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 BO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function gy(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 UO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gy(e,t);const o={src:ws(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 HO(e,t){const n={src:ws(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 zO(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 jO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return gy(e,t);const o={href:ws(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 $O(e,t){const n={href:ws(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 VO(e,t,n){const r=e.all(t),o=n?qO(n):Ey(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
|
|
24
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function qO(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=Ey(n[r])}return t}function Ey(e){const t=e.spread;return t==null?e.children.length>1:t}function YO(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 WO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function GO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function XO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function KO(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=Kr(t.children[1]),d=Dl(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 QO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,l=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<l;){const m=t.children[d],T={},y=u?u[d]:void 0;y&&(T.align=y);let w={type:"element",tagName:a,properties:T,children:[]};m&&(w.children=e.all(m),e.patch(m,w),w=e.applyData(m,w)),f.push(w)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function JO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const yy=9,by=32;function ZO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(Ty(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(Ty(t.slice(o),o>0,!1)),a.join("")}function Ty(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===yy||a===by;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===yy||a===by;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function eI(e,t){const n={type:"text",value:ZO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function tI(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const nI={blockquote:OO,break:IO,code:RO,delete:LO,emphasis:DO,footnoteReference:MO,heading:FO,html:BO,imageReference:UO,image:HO,inlineCode:zO,linkReference:jO,link:$O,listItem:VO,list:YO,paragraph:WO,root:GO,strong:XO,table:KO,tableCell:JO,tableRow:QO,text:eI,thematicBreak:tI,toml:Hl,yaml:Hl,definition:Hl,footnoteDefinition:Hl};function Hl(){}const wy=-1,zl=0,Xa=1,jl=2,gh=3,Eh=4,yh=5,bh=6,xy=7,_y=8,{defineProperty:rI}=Object,Sy=typeof self=="object"?self:globalThis,vy=(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 Sy[e](t)},iI=(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 zl:case wy:return n(u,o);case Xa:{const l=n([],o);for(const d of u)l.push(r(d));return l}case jl:{const l=n({},o);for(const[d,f]of u){const p=r(d),m=r(f);p==="__proto__"?rI(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 xy:{const{name:l,message:d}=u;return n(typeof Sy[l]=="function"?vy(l,d):new Error(d),o)}case _y: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(vy(a,u),o)};return r},Ay=e=>iI(new Map,e)(0),Oo="",{toString:oI}={},{keys:sI,is:aI}=Object,Ka=e=>{const t=typeof e;if(t!=="object"||!e)return[zl,t];const n=oI.call(e).slice(8,-1);switch(n){case"Array":return[Xa,Oo];case"Object":return[jl,Oo];case"Date":return[gh,Oo];case"RegExp":return[Eh,Oo];case"Map":return[yh,Oo];case"Set":return[bh,Oo];case"DataView":return[Xa,n]}return n.includes("Array")?[Xa,n]:e instanceof Error?[xy,e.name||"Error"]:[jl,n]},$l=([e,t])=>e===zl&&(t==="function"||t==="symbol"),uI=(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]=Ka(u);switch(l){case zl:{let p=u;switch(d){case"bigint":l=_y,p=u.toString();break;case"number":if(!u&&aI(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([wy],u)}return o([l,p],u)}case Xa:{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 jl:{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 sI(u))(e||!$l(Ka(u[T])))&&p.push([a(T),a(u[T])]);return m}case gh:return o([l,isNaN(u.getTime())?Oo: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||!($l(Ka(T))||$l(Ka(y))))&&p.push([a(T),a(y)]);return m}case bh:{const p=[],m=o([l,p],u);for(const T of u)(e||!$l(Ka(T)))&&p.push(a(T));return m}}const{message:f}=u;return o([l,{name:d,message:f}],u)};return a},Cy=(e,{json:t,lossy:n}={})=>{const r=[];return uI(!(t||n),!!t,new Map,r)(e),r},Io=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Ay(Cy(e,t)):structuredClone(e):(e,t)=>Ay(Cy(e,t));function lI(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 cI(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function dI(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||lI,r=e.options.footnoteBackLabel||cI,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=ws(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(M({},Io(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
|
|
26
|
+
`}]}}const Vl=(function(e){if(e==null)return mI;if(typeof e=="function")return ql(e);if(typeof e=="object")return Array.isArray(e)?fI(e):hI(e);if(typeof e=="string")return pI(e);throw new Error("Expected function, string, or object as test")});function fI(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Vl(e[n]);return ql(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function hI(e){const t=e;return ql(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function pI(e){return ql(t);function t(n){return n&&n.type===e}}function ql(e){return t;function t(n,r,o){return!!(gI(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function mI(){return!0}function gI(e){return e!==null&&typeof e=="object"&&"type"in e}function lz(e){return e}const ky=[],EI=!0,Th=!1,yI="skip";function Py(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=Vl(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=ky,w,v,P;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=bI(n(d,p)),y[0]===Th))return y;if("children"in d&&d.children){const _=d;if(_.children&&y[0]!==yI)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 bI(e){return Array.isArray(e)?e:typeof e=="number"?[EI,e]:e==null?ky:[e]}function Yl(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),Py(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,TI={};function wI(e,t){const n=t||TI,r=new Map,o=new Map,a=new Map,u=M(M({},nI),n.handlers),l={all:f,applyData:_I,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:xI,wrap:vI};return Yl(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,_=wn(v,["children"]),C=Io(_);return C.children=l.all(p),C}return Io(p)}return(l.options.unknownHandler||SI)(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=Ny(w.value)),!Array.isArray(w)&&w.type==="element")){const v=w.children[0];v&&v.type==="text"&&(v.value=Ny(v.value))}Array.isArray(w)?m.push(...w):m.push(w)}}}return m}}function xI(e,t){e.position&&(t.position=BE(e))}function _I(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,Io(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function SI(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 vI(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
27
27
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
|
-
`}),n}function
|
|
30
|
-
`},o),a}function gI(e,t){return e&&"run"in e?function(n,r){return et(this,null,function*(){const o=by(n,B({file:r},t));yield e.run(o,r)})}:function(n,r){return by(n,B({file:r},e||t))}}function Ty(e){if(e)throw e}var uh,wy;function EI(){if(wy)return uh;wy=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var T;for(T in f);return typeof T=="undefined"||e.call(f,T)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},l=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return uh=function d(){var f,p,m,T,y,w,v=arguments[0],N=1,x=arguments.length,C=!1;for(typeof v=="boolean"&&(C=v,v=arguments[1]||{},N=2),(v==null||typeof v!="object"&&typeof v!="function")&&(v={});N<x;++N)if(f=arguments[N],f!=null)for(p in f)m=l(v,p),T=l(f,p),v!==T&&(C&&T&&(a(T)||(y=o(T)))?(y?(y=!1,w=m&&o(m)?m:[]):w=m&&a(m)?m:{},u(v,{name:p,newValue:d(C,w,T)})):typeof T!="undefined"&&u(v,{name:p,newValue:T}));return v},uh}var yI=EI();const lh=Qe(yI);function ch(e){if(typeof e!="object"||e===null)return!1;const t=Object.getPrototypeOf(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(Symbol.toStringTag in e)&&!(Symbol.iterator in e)}function bI(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);l(null,...o);function l(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<o.length;)(f[m]===null||f[m]===void 0)&&(f[m]=o[m]);o=f,p?TI(p,l)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function TI(e,t){let n;return r;function r(...u){const l=e.length>u.length;let d;l&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(l&&n)throw p;return o(p)}l||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...l){n||(n=!0,t(u,...l))}function a(u){o(null,u)}}const Dr={basename:wI,dirname:_I,extname:xI,join:SI,sep:"/"};function wI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Fa(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,l=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),l>-1&&(e.codePointAt(o)===t.codePointAt(l--)?l<0&&(r=o):(l=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function _I(e){if(Fa(e),e.length===0)return".";let t=-1,n=e.length,r;for(;--n;)if(e.codePointAt(n)===47){if(r){t=n;break}}else r||(r=!0);return t<0?e.codePointAt(0)===47?"/":".":t===1&&e.codePointAt(0)===47?"//":e.slice(0,t)}function xI(e){Fa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const l=e.codePointAt(t);if(l===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),l===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function SI(...e){let t=-1,n;for(;++t<e.length;)Fa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":vI(n)}function vI(e){Fa(e);const t=e.codePointAt(0)===47;let n=AI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function AI(e,t){let n="",r=0,o=-1,a=0,u=-1,l,d;for(;++u<=e.length;){if(u<e.length)l=e.codePointAt(u);else{if(l===47)break;l=47}if(l===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else l===46&&a>-1?a++:a=-1}return n}function Fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const CI={cwd:kI};function kI(){return"/"}function dh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function NI(e){if(typeof e=="string")e=new URL(e);else if(!dh(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return PI(e)}function PI(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const fh=["history","path","basename","stem","extname","dirname"];class _y{constructor(t){let n;t?dh(t)?n={path:t}:typeof t=="string"||OI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":CI.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<fh.length;){const a=fh[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let o;for(o in n)fh.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?Dr.basename(this.path):void 0}set basename(t){ph(t,"basename"),hh(t,"basename"),this.path=Dr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Dr.dirname(this.path):void 0}set dirname(t){xy(this.basename,"dirname"),this.path=Dr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Dr.extname(this.path):void 0}set extname(t){if(hh(t,"extname"),xy(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Dr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){dh(t)&&(t=NI(t)),ph(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Dr.basename(this.path,this.extname):void 0}set stem(t){ph(t,"stem"),hh(t,"stem"),this.path=Dr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const o=this.message(t,n,r);throw o.fatal=!0,o}info(t,n,r){const o=this.message(t,n,r);return o.fatal=void 0,o}message(t,n,r){const o=new bn(t,n,r);return this.path&&(o.name=this.path+":"+o.name,o.file=this.path),o.fatal=!1,this.messages.push(o),o}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function hh(e,t){if(e&&e.includes(Dr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Dr.sep+"`")}function ph(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function xy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function OI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const II=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),RI={}.hasOwnProperty;class mh extends II{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=bI()}copy(){const t=new mh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(lh(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(yh("data",this.frozen),this.namespace[t]=n,this):RI.call(this.namespace,t)&&this.namespace[t]||void 0:t?(yh("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const o=n.call(t,...r);typeof o=="function"&&this.transformers.use(o)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Dl(t),r=this.parser||this.Parser;return gh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),gh("process",this.parser||this.Parser),Eh("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const l=Dl(t),d=r.parse(l);r.run(d,l,function(p,m,T){if(p||!m||!T)return f(p);const y=m,w=r.stringify(y,T);MI(w)?T.value=w:T.result=w,f(p,T)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),gh("processSync",this.parser||this.Parser),Eh("processSync",this.compiler||this.Compiler),this.process(t,o),vy("processSync","process",n),r;function o(a,u){n=!0,Ty(a),r=u}}run(t,n,r){Sy(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,l){const d=Dl(n);o.run(t,d,f);function f(p,m,T){const y=m||t;p?l(p):u?u(y):r(void 0,y,T)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),vy("runSync","run",r),o;function a(u,l){Ty(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Dl(n),o=this.compiler||this.Compiler;return Eh("stringify",o),Sy(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(yh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?l(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");l(f.plugins),f.settings&&(o.settings=lh(!0,o.settings,f.settings))}function l(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,T=-1;for(;++m<r.length;)if(r[m][0]===f){T=m;break}if(T===-1)r.push([f,...p]);else if(p.length>0){let[y,...w]=p;const v=r[T][1];ch(v)&&ch(y)&&(y=lh(!0,v,y)),r[T]=[f,y,...w]}}}}const LI=new mh().freeze();function gh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Eh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function yh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function Sy(e){if(!ch(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function vy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Dl(e){return DI(e)?e:new _y(e)}function DI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function MI(e){return typeof e=="string"||FI(e)}function FI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const BI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",Ay=[],Cy={allowDangerousHtml:!0},UI=/^(https?|ircs?|mailto|xmpp)$/i,HI=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function ky(e){const t=zI(e),n=jI(e);return $I(t.runSync(t.parse(n),n),e)}function zI(e){const t=e.rehypePlugins||Ay,n=e.remarkPlugins||Ay,r=e.remarkRehypeOptions?B(B({},e.remarkRehypeOptions),Cy):Cy;return LI().use(TO).use(n).use(gI,r).use(t)}function jI(e){const t=e.children||"",n=new _y;return typeof t=="string"&&(n.value=t),n}function $I(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||Ny;for(const p of HI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+BI+p.id,void 0);return Ll(e,f),fP(e,{Fragment:_.Fragment,components:o,ignoreInvalidStyle:!0,jsx:_.jsx,jsxs:_.jsxs,passKeys:!0,passNode:!0});function f(p,m,T){if(p.type==="raw"&&T&&typeof m=="number")return u?T.children.splice(m,1):T.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Gf)if(Object.hasOwn(Gf,y)&&Object.hasOwn(p.properties,y)){const w=p.properties[y],v=Gf[y];(v===null||v.includes(p.tagName))&&(p.properties[y]=d(String(w||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,T)),y&&T&&typeof m=="number")return l&&p.children?T.children.splice(m,1,...p.children):T.children.splice(m,1),m}}}function Ny(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),o=e.indexOf("/");return t===-1||o!==-1&&t>o||n!==-1&&t>n||r!==-1&&t>r||UI.test(e.slice(0,t))?e:""}const Py=/[#.]/g;function VI(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){Py.lastIndex=o;const l=Py.exec(n),d=n.slice(o,l?l.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),l&&(a=l[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function Oy(e,t,n){const r=n?GI(n):void 0;function o(a,u,...l){let d;if(a==null){d={type:"root",children:[]};const f=u;l.unshift(f)}else{d=VI(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,qI(u))l.unshift(u);else for(const[m,T]of Object.entries(u))YI(e,d.properties,m,T)}for(const f of l)bh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function qI(e){if(e===null||typeof e!="object"||Array.isArray(e))return!0;if(typeof e.type!="string")return!1;const t=e,n=Object.keys(e);for(const r of n){const o=t[r];if(o&&typeof o=="object"){if(!Array.isArray(o))return!0;const a=o;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function YI(e,t,n,r){const o=_l(e,n);let a;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;a=r}else typeof r=="boolean"?a=r:typeof r=="string"?o.spaceSeparated?a=bE(r):o.commaSeparated?a=sE(r):o.commaOrSpaceSeparated?a=bE(sE(r).join(" ")):a=Iy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?WI(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Iy(o,o.property,l));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function bh(e,t){if(t!=null)if(typeof t=="number"||typeof t=="string")e.push({type:"text",value:String(t)});else if(Array.isArray(t))for(const n of t)bh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?bh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function Iy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Aa(n)===Aa(t)))return!0}return n}function WI(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function GI(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const XI=["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","solidColor","textArea","textPath"],KI=Oy(Ca,"div"),QI=Oy(Si,"g",XI);function JI(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let l=n[u];if(l===void 0){const d=Ry(t,n[u-1]);l=d===-1?t.length+1:d+1,n[u]=l}if(l>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const l=n[n.length-1],d=Ry(t,l),f=d===-1?t.length+1:d+1;if(l===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function Ry(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Eo={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},Ly={}.hasOwnProperty,ZI=Object.prototype;function eR(e,t){const n=t||{};return Th({file:n.file||void 0,location:!1,schema:n.space==="svg"?Si:Ca,verbose:n.verbose||!1},e)}function Th(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Ml(e,r,n),n}case"#document":case"#document-fragment":{const r=t,o="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:Dy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=JI(a),l=u.toPoint(0),d=u.toPoint(a.length);n.position={start:l,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Ml(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Ml(e,r,n),n}default:return n=tR(e,t),n}}function Dy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Th(e,t[n]);r.push(o)}return r}function tR(e,t){const n=e.schema;e.schema=t.namespaceURI===Eo.svg?Si:Ca;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Ly.call(ZI,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?QI:KI)(t.tagName,o,Dy(e,t.childNodes));if(Ml(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&as(d.startTag),p=d&&d.endTag&&as(d.endTag),m=Th(e,l.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Ml(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=nR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function nR(e,t,n){const r=as(n);if(t.type==="element"){const o=t.children[t.children.length-1];if(r&&!n.endTag&&o&&o.position&&o.position.end&&(r.end=Object.assign({},o.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)Ly.call(n.attrs,u)&&(a[_l(e.schema,u).property]=as(n.attrs[u]));n.startTag;const l=as(n.startTag),d=n.endTag?as(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function as(e){const t=My({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=My({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function My(e){return e.line&&e.column?e:void 0}const Fy={}.hasOwnProperty;function By(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Fy.call(o,e)){const d=String(o[e]);u=Fy.call(l,d)?l[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const rR={},iR={}.hasOwnProperty,Uy=By("type",{handlers:{root:sR,element:dR,text:lR,comment:cR,doctype:uR}});function oR(e,t){const r=(t||rR).space;return Uy(e,r==="svg"?Si:Ca)}function sR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function aR(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=wh(e.children,n,t),us(e,n),n}function uR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return us(e,t),t}function lR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return us(e,t),t}function cR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return us(e,t),t}function dR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Si);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&iR.call(e.properties,a)){const d=fR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Eo[u],childNodes:[],parentNode:null};return l.childNodes=wh(e.children,l,r),us(e,l),e.tagName==="template"&&e.content&&(l.content=aR(e.content,r)),l}function fR(e,t,n){const r=_l(e,t);if(n===!1||n===null||n===void 0||typeof n=="number"&&Number.isNaN(n)||!n&&r.boolean)return;Array.isArray(n)&&(n=r.commaSeparated?aE(n):TE(n));const o={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=o.name.indexOf(":");a<0?o.prefix="":(o.name=o.name.slice(a+1),o.prefix=r.attribute.slice(0,a)),o.namespace=Eo[r.space]}return o}function wh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Uy(e[r],n);a.parentNode=t,o.push(a)}return o}function us(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const hR=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],pR=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),At="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Un={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Hy(e){return e>=55296&&e<=57343}function mR(e){return e>=56320&&e<=57343}function gR(e,t){return(e-55296)*1024+9216+t}function zy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function jy(e){return e>=64976&&e<=65007||pR.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const ER=65536;class yR{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=ER,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,l=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(mR(n))return this.pos++,this._addGap(),gR(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Hy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){zy(t)?this._err(te.controlCharacterInInputStream):jy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ke;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Ke||(Ke={}));function $y(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const bR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),TR=new Map([[0,65533],[128,8364],[130,8218],[131,402],[132,8222],[133,8230],[134,8224],[135,8225],[136,710],[137,8240],[138,352],[139,8249],[140,338],[142,381],[145,8216],[146,8217],[147,8220],[148,8221],[149,8226],[150,8211],[151,8212],[152,732],[153,8482],[154,353],[155,8250],[156,339],[158,382],[159,376]]);function wR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=TR.get(e))!==null&&t!==void 0?t:e}var en;(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(en||(en={}));const _R=32;var Ci;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Ci||(Ci={}));function _h(e){return e>=en.ZERO&&e<=en.NINE}function xR(e){return e>=en.UPPER_A&&e<=en.UPPER_F||e>=en.LOWER_A&&e<=en.LOWER_F}function SR(e){return e>=en.UPPER_A&&e<=en.UPPER_Z||e>=en.LOWER_A&&e<=en.LOWER_Z||_h(e)}function vR(e){return e===en.EQUALS||SR(e)}var tn;(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(tn||(tn={}));var si;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(si||(si={}));class AR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=tn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=si.Strict}startEntity(t){this.decodeMode=t,this.state=tn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case tn.EntityStart:return t.charCodeAt(n)===en.NUM?(this.state=tn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=tn.NamedEntity,this.stateNamedEntity(t,n));case tn.NumericStart:return this.stateNumericStart(t,n);case tn.NumericDecimal:return this.stateNumericDecimal(t,n);case tn.NumericHex:return this.stateNumericHex(t,n);case tn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_R)===en.LOWER_X?(this.state=tn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=tn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,o){if(n!==r){const a=r-n;this.result=this.result*Math.pow(o,a)+Number.parseInt(t.substr(n,a),o),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o)||xR(o))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(o,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const o=t.charCodeAt(n);if(_h(o))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(o,2)}return this.addToNumericResult(t,r,n,10),-1}emitNumericEntity(t,n){var r;if(this.consumed<=n)return(r=this.errors)===null||r===void 0||r.absenceOfDigitsInNumericCharacterReference(this.consumed),0;if(t===en.SEMI)this.consumed+=1;else if(this.decodeMode===si.Strict)return 0;return this.emitCodePoint(wR(this.result),this.consumed),this.errors&&(t!==en.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let o=r[this.treeIndex],a=(o&Ci.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=CR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===si.Attribute&&(a===0||vR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&Ci.VALUE_LENGTH)>>14,a!==0){if(u===en.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==si.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,o=(r[n]&Ci.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,o,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:o}=this;return this.emitCodePoint(n===1?o[t]&~Ci.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case tn.NamedEntity:return this.result!==0&&(this.decodeMode!==si.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case tn.NumericDecimal:return this.emitNumericEntity(0,2);case tn.NumericHex:return this.emitNumericEntity(0,3);case tn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case tn.EntityStart:return 0}}}function CR(e,t,n,r){const o=(t&Ci.BRANCH_LENGTH)>>7,a=t&Ci.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,l=u+o-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var yo;(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(yo||(yo={}));var ar;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(ar||(ar={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const kR=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function ls(e){var t;return(t=kR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,NR={[le.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[le.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[le.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},xh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const Ft={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function PR(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Ba(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function OR(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function ki(e){return OR(e)||Ba(e)}function Vy(e){return ki(e)||PR(e)}function Fl(e){return e+32}function qy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function Yy(e){return qy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function IR(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:Hy(e)?te.surrogateCharacterReference:jy(e)?te.noncharacterCharacterReference:zy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class RR{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new yR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AR(bR,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=IR(r);o&&this._err(o,1)}}:void 0)}_err(t,n=0){var r,o;(o=(r=this.handler).onParseError)===null||o===void 0||o.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Ke.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ke.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ke.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ke.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if($y(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const o=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);o[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=ls(t.tagName),t.type===Ke.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Ke.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ke.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ke.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Ke.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=qy(t)?Ke.WHITESPACE_CHARACTER:t===P.NULL?Ke.NULL_CHARACTER:Ke.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ke.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?si.Attribute:si.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(ki(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(ki(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ba(t)?Fl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){ki(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){ki(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:ki(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){ki(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(At);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Un.SCRIPT,!1)&&Yy(this.preprocessor.peek(Un.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Un.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=At;break}default:this.currentAttr.name+=String.fromCodePoint(Ba(t)?Fl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=At;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Un.DASH_DASH,!0)?(this._createCommentToken(Un.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Un.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Un.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Un.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Un.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=At;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Ba(t))this._createDoctypeToken(String.fromCharCode(Fl(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(At),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=At;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ba(t)?Fl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Un.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Un.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=At;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Vy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Vy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Wy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Gy=new Set([...Wy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Bl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),LR=new Set([...Bl,g.OL,g.UL]),DR=new Set([...Bl,g.BUTTON]),Xy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ky=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),MR=new Set([g.TR,g.TEMPLATE,g.HTML]),FR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),BR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),UR=new Set([g.TD,g.TH]);class HR{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(xh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(UR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(BR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(FR,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(MR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(Ky.has(o))return!1;break}case le.MATHML:{if(Xy.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Bl)}hasInListItemScope(t){return this.hasInDynamicScope(t,LR)}hasInButtonScope(t){return this.hasInDynamicScope(t,DR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(xh.has(n))return!0;if(Bl.has(n))return!1;break}case le.SVG:{if(Ky.has(n))return!1;break}case le.MATHML:{if(Xy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&Wy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Gy.has(this.currentTagId);)this.pop()}}const Sh=3;var Mr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Mr||(Mr={}));const Qy={type:Mr.Marker};class zR{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let l=0;l<this.entries.length;l++){const d=this.entries[l];if(d.type===Mr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:l,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<Sh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<Sh)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const l=r[u];l.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=Sh&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Qy)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Mr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Mr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Qy);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Mr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Mr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Mr.Element&&n.element===t)}}const Ni={createDocument(){return{nodeName:"#document",mode:ar.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ni.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(Ni.isTextNode(n)){n.value+=t;return}}Ni.appendChild(e,Ni.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ni.isTextNode(r)?r.value+=t:Ni.insertBefore(e,Ni.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=B(B({},e.sourceCodeLocation),t)}},Jy="html",jR="about:legacy-compat",$R="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Zy=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],VR=[...Zy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],qR=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),eb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],YR=[...eb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function tb(e,t){return t.some(n=>e.startsWith(n))}function WR(e){return e.name===Jy&&e.publicId===null&&(e.systemId===null||e.systemId===jR)}function GR(e){if(e.name!==Jy)return ar.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===$R)return ar.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),qR.has(n))return ar.QUIRKS;let r=t===null?VR:Zy;if(tb(n,r))return ar.QUIRKS;if(r=t===null?eb:YR,tb(n,r))return ar.LIMITED_QUIRKS}return ar.NO_QUIRKS}const nb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},XR="definitionurl",KR="definitionURL",QR=new Map(["attributeName","attributeType","baseFrequency","baseProfile","calcMode","clipPathUnits","diffuseConstant","edgeMode","filterUnits","glyphRef","gradientTransform","gradientUnits","kernelMatrix","kernelUnitLength","keyPoints","keySplines","keyTimes","lengthAdjust","limitingConeAngle","markerHeight","markerUnits","markerWidth","maskContentUnits","maskUnits","numOctaves","pathLength","patternContentUnits","patternTransform","patternUnits","pointsAtX","pointsAtY","pointsAtZ","preserveAlpha","preserveAspectRatio","primitiveUnits","refX","refY","repeatCount","repeatDur","requiredExtensions","requiredFeatures","specularConstant","specularExponent","spreadMethod","startOffset","stdDeviation","stitchTiles","surfaceScale","systemLanguage","tableValues","targetX","targetY","textLength","viewBox","viewTarget","xChannelSelector","yChannelSelector","zoomAndPan"].map(e=>[e.toLowerCase(),e])),JR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),ZR=new Map(["altGlyph","altGlyphDef","altGlyphItem","animateColor","animateMotion","animateTransform","clipPath","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","foreignObject","glyphRef","linearGradient","radialGradient","textPath"].map(e=>[e.toLowerCase(),e])),e6=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function t6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===yo.COLOR||r===yo.SIZE||r===yo.FACE)||e6.has(t)}function rb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===XR){e.attrs[t].name=KR;break}}function ib(e){for(let t=0;t<e.attrs.length;t++){const n=QR.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function vh(e){for(let t=0;t<e.attrs.length;t++){const n=JR.get(e.attrs[t].name);n&&(e.attrs[t].prefix=n.prefix,e.attrs[t].name=n.name,e.attrs[t].namespace=n.namespace)}}function n6(e){const t=ZR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=ls(e.tagName))}function r6(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function i6(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===yo.ENCODING){const o=n[r].value.toLowerCase();return o===nb.TEXT_HTML||o===nb.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function o6(e,t,n,r){return(!r||r===le.HTML)&&i6(e,t,n)||(!r||r===le.MATHML)&&r6(e,t)}const s6="hidden",a6=8,u6=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const l6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ob=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),sb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ni,onParseError:null};class ab{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=B(B({},sb),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new RR(this.options,this),this.activeFormattingElements=new zR(this.treeAdapter),this.fragmentContextID=r?ls(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new HR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=B(B({},sb),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var o;if(!this.onParseError)return;const a=(o=t.location)!==null&&o!==void 0?o:l6,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=Ft.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Ft.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Ft.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Ft.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Ft.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&me(B({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===Ke.END_TAG&&o===n.tagName?{endTag:B({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Ke.CHARACTER:{this.onCharacter(t);break}case Ke.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ke.COMMENT:{this.onComment(t);break}case Ke.DOCTYPE:{this.onDoctype(t);break}case Ke.START_TAG:{this._processStartTag(t);break}case Ke.END_TAG:{this.onEndTag(t);break}case Ke.EOF:{this.onEof(t);break}case Ke.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return o6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Mr.Marker||this.openElements.contains(o.element)),r=n===-1?t-1:n-1;for(let o=r;o>=0;o--){const a=this.activeFormattingElements.entries[o];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return ob.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return NR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){U4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{lb(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{Eb(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){B4(this,t);return}switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_COLUMN_GROUP:{zl(this,t);break}case M.AFTER_BODY:{Vl(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Ch(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{Ch(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.AFTER_BODY:{g6(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{E6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{y6(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?H4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{b6(this,t);break}case M.BEFORE_HEAD:{w6(this,t);break}case M.IN_HEAD:{br(this,t);break}case M.IN_HEAD_NO_SCRIPT:{S6(this,t);break}case M.AFTER_HEAD:{A6(this,t);break}case M.IN_BODY:{wn(this,t);break}case M.IN_TABLE:{cs(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{_4(this,t);break}case M.IN_COLUMN_GROUP:{Ph(this,t);break}case M.IN_TABLE_BODY:{jl(this,t);break}case M.IN_ROW:{$l(this,t);break}case M.IN_CELL:{v4(this,t);break}case M.IN_SELECT:{Tb(this,t);break}case M.IN_SELECT_IN_TABLE:{C4(this,t);break}case M.IN_TEMPLATE:{N4(this,t);break}case M.AFTER_BODY:{O4(this,t);break}case M.IN_FRAMESET:{I4(this,t);break}case M.AFTER_FRAMESET:{L4(this,t);break}case M.AFTER_AFTER_BODY:{M4(this,t);break}case M.AFTER_AFTER_FRAMESET:{F4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?z4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{T6(this,t);break}case M.BEFORE_HEAD:{_6(this,t);break}case M.IN_HEAD:{x6(this,t);break}case M.IN_HEAD_NO_SCRIPT:{v6(this,t);break}case M.AFTER_HEAD:{C6(this,t);break}case M.IN_BODY:{Hl(this,t);break}case M.TEXT:{f4(this,t);break}case M.IN_TABLE:{qa(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_CAPTION:{x4(this,t);break}case M.IN_COLUMN_GROUP:{S4(this,t);break}case M.IN_TABLE_BODY:{Oh(this,t);break}case M.IN_ROW:{bb(this,t);break}case M.IN_CELL:{A4(this,t);break}case M.IN_SELECT:{wb(this,t);break}case M.IN_SELECT_IN_TABLE:{k4(this,t);break}case M.IN_TEMPLATE:{P4(this,t);break}case M.AFTER_BODY:{xb(this,t);break}case M.IN_FRAMESET:{R4(this,t);break}case M.AFTER_FRAMESET:{D4(this,t);break}case M.AFTER_AFTER_BODY:{ql(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Ua(this,t);break}case M.BEFORE_HTML:{Ha(this,t);break}case M.BEFORE_HEAD:{za(this,t);break}case M.IN_HEAD:{ja(this,t);break}case M.IN_HEAD_NO_SCRIPT:{$a(this,t);break}case M.AFTER_HEAD:{Va(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{mb(this,t);break}case M.TEXT:{h4(this,t);break}case M.IN_TABLE_TEXT:{Wa(this,t);break}case M.IN_TEMPLATE:{_b(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{kh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ub(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{Nh(this,t);break}case M.IN_TABLE_TEXT:{gb(this,t);break}}}}function c6(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):pb(e,t),n}function d6(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const o=e.openElements.items[r];if(o===t.element)break;e._isSpecialElement(o,e.openElements.tagIDs[r])&&(n=o)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function f6(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const l=e.activeFormattingElements.getElementEntry(u),d=l&&a>=u6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=h6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function h6(e,t){const n=e.treeAdapter.getNamespaceURI(t.element),r=e.treeAdapter.createElement(t.token.tagName,n,t.token.attrs);return e.openElements.replace(t.element,r),t.element=r,r}function p6(e,t,n){const r=e.treeAdapter.getTagName(t),o=ls(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function m6(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:o}=n,a=e.treeAdapter.createElement(o.tagName,r,o.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,o),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,o.tagID)}function Ah(e,t){for(let n=0;n<a6;n++){const r=c6(e,t);if(!r)break;const o=d6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=f6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&p6(e,u,a),m6(e,o,r)}}function Ch(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function g6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function E6(e,t){e._appendCommentNode(t,e.document)}function kh(e,t){if(e.stopped=!0,t.location){const n=e.fragmentContext?0:2;for(let r=e.openElements.stackTop;r>=n;r--)e._setEndLocation(e.openElements.items[r],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){const r=e.openElements.items[0],o=e.treeAdapter.getNodeSourceCodeLocation(r);if(o&&!o.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const a=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(a);u&&!u.endTag&&e._setEndLocation(a,t)}}}}function y6(e,t){e._setDocumentType(t);const n=t.forceQuirks?ar.QUIRKS:GR(t);WR(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Ua(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,ar.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function b6(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ha(e,t)}function T6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ha(e,t)}function Ha(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function w6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:za(e,t)}}function _6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?za(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function za(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function br(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Ft.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Ft.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Ft.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Ft.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:ja(e,t)}}function x6(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{ja(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function bo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function ja(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function S6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{br(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:$a(e,t)}}function v6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{$a(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function $a(e,t){const n=t.type===Ke.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function A6(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),br(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Va(e,t)}}function C6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Va(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Va(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Ul(e,t)}function Ul(e,t){switch(t.type){case Ke.CHARACTER:{lb(e,t);break}case Ke.WHITESPACE_CHARACTER:{ub(e,t);break}case Ke.COMMENT:{Ch(e,t);break}case Ke.START_TAG:{wn(e,t);break}case Ke.END_TAG:{Hl(e,t);break}case Ke.EOF:{mb(e,t);break}}}function ub(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function lb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function k6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function N6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function P6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function O6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function I6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&xh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function R6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function L6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function D6(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function M6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=Ft.PLAINTEXT}function F6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function B6(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(Ah(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function U6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ah(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function z6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function j6(e,t){e.treeAdapter.getDocumentMode(e.document)!==ar.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function cb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function db(e){const t=$y(e,yo.TYPE);return t!=null&&t.toLowerCase()===s6}function $6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),db(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function V6(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function q6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Y6(e,t){t.tagName=X.IMG,t.tagID=g.IMG,cb(e,t)}function W6(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Ft.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function G6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function X6(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Ft.RAWTEXT)}function fb(e,t){e._switchToTextParsing(t,Ft.RAWTEXT)}function K6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function Q6(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function J6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function Z6(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function e4(e,t){e._reconstructActiveFormattingElements(),rb(t),vh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function t4(e,t){e._reconstructActiveFormattingElements(),ib(t),vh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function hb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function wn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{U6(e,t);break}case g.A:{B6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{I6(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{O6(e,t);break}case g.LI:case g.DD:case g.DT:{D6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{cb(e,t);break}case g.HR:{q6(e,t);break}case g.RB:case g.RTC:{J6(e,t);break}case g.RT:case g.RP:{Z6(e,t);break}case g.PRE:case g.LISTING:{R6(e,t);break}case g.XMP:{G6(e,t);break}case g.SVG:{t4(e,t);break}case g.HTML:{k6(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{br(e,t);break}case g.BODY:{N6(e,t);break}case g.FORM:{L6(e,t);break}case g.NOBR:{H6(e,t);break}case g.MATH:{e4(e,t);break}case g.TABLE:{j6(e,t);break}case g.INPUT:{$6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{V6(e,t);break}case g.IMAGE:{Y6(e,t);break}case g.BUTTON:{F6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{z6(e,t);break}case g.IFRAME:{X6(e,t);break}case g.SELECT:{K6(e,t);break}case g.OPTION:case g.OPTGROUP:{Q6(e,t);break}case g.NOEMBED:case g.NOFRAMES:{fb(e,t);break}case g.FRAMESET:{P6(e,t);break}case g.TEXTAREA:{W6(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?fb(e,t):hb(e,t);break}case g.PLAINTEXT:{M6(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:hb(e,t)}}function n4(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function r4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,xb(e,t))}function i4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function o4(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function s4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function a4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function u4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function l4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function c4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function d4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function pb(e,t){const n=t.tagName,r=t.tagID;for(let o=e.openElements.stackTop;o>0;o--){const a=e.openElements.items[o],u=e.openElements.tagIDs[o];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=o&&e.openElements.shortenToLength(o);break}if(e._isSpecialElement(a,u))break}}function Hl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{Ah(e,t);break}case g.P:{s4(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{i4(e,t);break}case g.LI:{a4(e);break}case g.DD:case g.DT:{u4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{l4(e);break}case g.BR:{d4(e);break}case g.BODY:{n4(e,t);break}case g.HTML:{r4(e,t);break}case g.FORM:{o4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{c4(e,t);break}case g.TEMPLATE:{bo(e,t);break}default:pb(e,t)}}function mb(e,t){e.tmplInsertionModeStack.length>0?_b(e,t):kh(e,t)}function f4(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function h4(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Nh(e,t){if(e.openElements.currentTagId!==void 0&&ob.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Ke.CHARACTER:{Eb(e,t);break}case Ke.WHITESPACE_CHARACTER:{gb(e,t);break}}else Ya(e,t)}function p4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function m4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function g4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t)}function E4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function y4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,jl(e,t)}function b4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function T4(e,t){db(t)?e._appendElement(t,le.HTML):Ya(e,t),t.ackSelfClosing=!0}function w4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function cs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{y4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}case g.COL:{g4(e,t);break}case g.FORM:{w4(e,t);break}case g.TABLE:{b4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{E4(e,t);break}case g.INPUT:{T4(e,t);break}case g.CAPTION:{p4(e,t);break}case g.COLGROUP:{m4(e,t);break}default:Ya(e,t)}}function qa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{bo(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ya(e,t)}}function Ya(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ul(e,t),e.fosterParentingEnabled=n}function gb(e,t){e.pendingCharacterTokens.push(t)}function Eb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Wa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ya(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const yb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function _4(e,t){const n=t.tagID;yb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,cs(e,t)):wn(e,t)}function x4(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&qa(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Hl(e,t)}}function Ph(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{br(e,t);break}default:zl(e,t)}}function S4(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{bo(e,t);break}case g.COL:break;default:zl(e,t)}}function zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function jl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,$l(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,cs(e,t));break}default:cs(e,t)}}function Oh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,qa(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:qa(e,t)}}function $l(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,jl(e,t));break}default:cs(e,t)}}function bb(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Oh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Oh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:qa(e,t)}}function v4(e,t){const n=t.tagID;yb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),$l(e,t)):wn(e,t)}function A4(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),bb(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Hl(e,t)}}function Tb(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{br(e,t);break}}}function wb(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{bo(e,t);break}}}function C4(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):Tb(e,t)}function k4(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):wb(e,t)}function N4(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{br(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,cs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,Ph(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,jl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,$l(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,wn(e,t)}}function P4(e,t){t.tagID===g.TEMPLATE&&bo(e,t)}function _b(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):kh(e,t)}function O4(e,t){t.tagID===g.HTML?wn(e,t):Vl(e,t)}function xb(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Vl(e,t)}function Vl(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function I4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{br(e,t);break}}}function R4(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function L4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function D4(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function M4(e,t){t.tagID===g.HTML?wn(e,t):ql(e,t)}function ql(e,t){e.insertionMode=M.IN_BODY,Ul(e,t)}function F4(e,t){switch(t.tagID){case g.HTML:{wn(e,t);break}case g.NOFRAMES:{br(e,t);break}}}function B4(e,t){t.chars=At,e._insertCharacters(t)}function U4(e,t){e._insertCharacters(t),e.framesetOk=!1}function Sb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function H4(e,t){if(t6(t))Sb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?rb(t):r===le.SVG&&(n6(t),ib(t)),vh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function z4(e,t){if(t.tagID===g.P||t.tagID===g.BR){Sb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const j4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,$4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),vb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Ab(e,t){const n=Z4(e),r=By("type",{handlers:{root:V4,element:q4,text:Y4,comment:kb,doctype:W4,raw:X4},unknown:K4}),o={parser:n?new ab(vb):ab.getFragmentParser(void 0,vb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),ds(o,Lr());const a=n?o.parser.document:o.parser.getFragment(),u=eR(a,{file:o.options.file});return o.stitches&&Ll(u,"comment",function(l,d,f){const p=l;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Cb(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function V4(e,t){Cb(e.children,t)}function q4(e,t){Q4(e,t),Cb(e.children,t),J4(e,t)}function Y4(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ke.CHARACTER,chars:e.value,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function W4(e,t){const n={type:Ke.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function G4(e,t){t.stitches=!0;const n=eL(e);if("children"in e&&"children"in n){const r=Ab({type:"root",children:e.children},t.options);n.children=r.children}kb({type:"comment",value:{stitch:n}},t)}function kb(e,t){const n=e.value,r={type:Ke.COMMENT,data:n,location:Ga(e)};ds(t,Lr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function X4(e,t){if(t.parser.tokenizer.preprocessor.html="",t.parser.tokenizer.preprocessor.pos=-1,t.parser.tokenizer.preprocessor.lastGapPos=-2,t.parser.tokenizer.preprocessor.gapStack=[],t.parser.tokenizer.preprocessor.skipNextNewLine=!1,t.parser.tokenizer.preprocessor.lastChunkWritten=!1,t.parser.tokenizer.preprocessor.endOfChunkHit=!1,t.parser.tokenizer.preprocessor.isEol=!1,Nb(t,Lr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(j4,"<$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function K4(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))G4(n,t);else{let r="";throw $4.has(n.type)&&(r=". It looks like you are using MDX nodes with `hast-util-raw` (or `rehype-raw`). If you use this because you are using remark or rehype plugins that inject `'html'` nodes, then please raise an issue with that plugin, as its a bad and slow idea. If you use this because you are using markdown syntax, then you have to configure this utility (or plugin) to pass through these nodes (see `passThrough` in docs), but you can also migrate to use the MDX syntax"),new Error("Cannot compile `"+n.type+"` node"+r)}}function ds(e,t){Nb(e,t);const n=e.parser.tokenizer.currentCharacterToken;n&&n.location&&(n.location.endLine=e.parser.tokenizer.preprocessor.line,n.location.endCol=e.parser.tokenizer.preprocessor.col+1,n.location.endOffset=e.parser.tokenizer.preprocessor.offset+1,e.parser.currentToken=n,e.parser._processToken(e.parser.currentToken)),e.parser.tokenizer.paused=!1,e.parser.tokenizer.inLoop=!1,e.parser.tokenizer.active=!1,e.parser.tokenizer.returnState=Ft.DATA,e.parser.tokenizer.charRefCode=-1,e.parser.tokenizer.consumedAfterSnapshot=-1,e.parser.tokenizer.currentLocation=null,e.parser.tokenizer.currentCharacterToken=null,e.parser.tokenizer.currentToken=null,e.parser.tokenizer.currentAttr={name:"",value:""}}function Nb(e,t){if(t&&t.offset!==void 0){const n={startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:-1,endCol:-1,endOffset:-1};e.parser.tokenizer.preprocessor.lineStartPos=-t.column+1,e.parser.tokenizer.preprocessor.droppedBufferSize=t.offset,e.parser.tokenizer.preprocessor.line=t.line,e.parser.tokenizer.currentLocation=n}}function Q4(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,Lr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Eo.html;o===Eo.html&&n==="svg"&&(o=Eo.svg);const a=oR(me(B({},e),{children:[]}),{space:o===Eo.svg?"svg":"html"}),u={type:Ke.START_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ga(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function J4(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&hR.includes(n)||t.parser.tokenizer.state===Ft.PLAINTEXT)return;ds(t,xl(e));const r={type:Ke.END_TAG,tagName:n,tagID:ls(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ga(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Ft.RCDATA||t.parser.tokenizer.state===Ft.RAWTEXT||t.parser.tokenizer.state===Ft.SCRIPT_DATA)&&(t.parser.tokenizer.state=Ft.DATA)}function Z4(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ga(e){const t=Lr(e)||{line:void 0,column:void 0,offset:void 0},n=xl(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function eL(e){return"children"in e?go(me(B({},e),{children:[]})):go(e)}function Pb(e){return function(t,n){return Ab(t,me(B({},e),{file:n}))}}const To=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Ob={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...To,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...To],h2:[["className","sr-only"]],img:[...To,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...To,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...To],table:[...To],ul:[...To,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Pi={}.hasOwnProperty;function tL(e,t){let n={type:"root",children:[]};const r={schema:t?B(B({},Ob),t):Ob,stack:[]},o=Ib(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Ib(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return nL(e,n);case"doctype":return rL(e,n);case"element":return iL(e,n);case"root":return oL(e,n);case"text":return sL(e,n)}}}function nL(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),a={type:"comment",value:r<0?n:n.slice(0,r)};return Xa(a,t),a}}function rL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Xa(n,t),n}}function iL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Rb(e,t.children),o=aL(e,t.properties);e.stack.pop();let a=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(a=!0,e.schema.ancestors&&Pi.call(e.schema.ancestors,n))){const l=e.schema.ancestors[n];let d=-1;for(a=!1;++d<l.length;)e.stack.includes(l[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Xa(u,t),u}function oL(e,t){const r={type:"root",children:Rb(e,t.children)};return Xa(r,t),r}function sL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Xa(r,t),r}function Rb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Ib(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function aL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Pi.call(r,n)?r[n]:void 0,u=r&&Pi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Pi.call(l,f)){const p=l[f];let m=Lb(e,Mb(a,f),f,p);m==null&&(m=Lb(e,Mb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Pi.call(o,n)){const p=o[n];for(f in p)Pi.call(p,f)&&!Pi.call(d,f)&&(d[f]=p[f])}return d}function Lb(e,t,n,r){return t?Array.isArray(r)?uL(e,t,n,r):Db(e,t,n,r):void 0}function uL(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Db(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Db(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&lL(e,n,r)){if(typeof t=="object"&&t.length>1){let o=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){o=!0;break}}else if(u===r){o=!0;break}}if(!o)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function lL(e,t,n){const r=e.schema.protocols&&Pi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),l=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||l>-1&&a>l)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Xa(e,t){const n=AE(t);t.data&&(e.data=go(t.data)),n&&(e.position=n)}function Mb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function cL(e){return function(t){return tL(t,e)}}const Fb=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:o,children:a})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return _.jsx("a",me(B(B({className:W(e,`${z}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},dL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:_.jsx("div",{className:W(n,`${z}-disclaimer`),children:t?_.jsx(ky,{rehypePlugins:[Pb,cL],components:{ul:({children:r})=>_.jsx("ul",{className:W(n,`${z}-ul`),children:r}),ol:({children:r})=>_.jsx("ol",{className:W(n,`${z}-ol`),children:r}),li:({children:r})=>_.jsx("li",{className:W(n,`${z}-li`),children:r}),a:({href:r,title:o,children:a})=>_.jsx(Fb,{globalClassName:n,openLinksInNewTab:!0,href:r,title:o,children:a}),img:({src:r,alt:o})=>_.jsx("img",{className:W(n,`${z}-disclaimer-image`),src:r,alt:o}),p:({children:r})=>_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>_.jsx("span",{className:W(n,`${z}-disclaimer-text-span`),children:r})},children:t}):_.jsx("p",{className:W(n,`${z}-disclaimer-text`),children:e})})},Ih=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Wn(),{setImageFile:u}=ts(),{logger:l,globalClassName:d,searchConfig:f,features:p}=tt(),m=D.useRef(null),T=!!(p!=null&&p.enableImageUpload),y=!!o||!1,w=y?"connected":"disconnected",v=t||!y,N=()=>a?new Promise((R,$)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>R(ne.result),ne.onerror=de=>$(de)}):Promise.resolve(""),x=()=>{u(null)},C=D.useCallback(R=>{const $=R==null?void 0:R[0];if($&&!v){if($.size>10*1024*1024){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u($)}},[v,u]),A=R=>{t&&R.preventDefault()},U=R=>{if(!t||R.key==="Tab")return;(R.key==="Enter"||R.key==="Backspace"||R.key==="Delete"||R.key.length===1&&!R.metaKey&&!R.ctrlKey)&&R.preventDefault()},Y=R=>et(null,null,function*(){var de;if(R.preventDefault(),v)return;const $=(((de=m.current)==null?void 0:de.value)||"").trim();let ne="";try{ne=yield N()}catch(V){l==null||l.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}$&&(x(),m.current.value="",r($,ne))});return _.jsxs("div",{className:W(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&_.jsx(NN,{file:a,componentType:n,globalClassName:d,onRemove:x}),_.jsxs("form",{className:W(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[_.jsx("span",{role:"status",className:W(`${z}-connection-status-icon`,w),children:_.jsx("span",{className:`${z}-visually-hidden`,children:y?"Connected to assistant":"Disconnected from assistant"})}),T&&_.jsx(FN,{componentType:n,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:v,globalClassName:d,className:e,onFiles:C}),_.jsx("input",{className:W(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,"aria-label":(f==null?void 0:f.inputAriaLabel)||(f==null?void 0:f.placeholder)||"Ask a question","aria-disabled":t||void 0,name:`${z}-user-input`,onBeforeInput:A,onPaste:A,onKeyDown:U}),_.jsx(jN,{isLoading:v}),_.jsx(UN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),_.jsx(dL,{})]})};function fL(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function hL(e){return ht({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M6 8h-6v-6h1v4.109c1.013-3.193 4.036-5.484 7.5-5.484 3.506 0 6.621 2.36 7.574 5.739l-0.963 0.271c-0.832-2.95-3.551-5.011-6.611-5.011-3.226 0.001-6.016 2.276-6.708 5.376h4.208v1zM11 9v1h4.208c-0.693 3.101-3.479 5.375-6.708 5.375-3.062 0-5.78-2.061-6.611-5.011l-0.963 0.271c0.952 3.379 4.067 5.739 7.574 5.739 3.459 0 6.475-2.28 7.5-5.482v4.108h1v-6h-6z"},child:[]}]})(e)}const Bb=D.createContext({isOpen:!1,panelId:"",triggerId:""}),Rh=D.createContext(null),Ub=D.createContext(null),wo=()=>{var n,r;const e=D.useContext(Rh),t=D.useContext(Ub);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Hb=({onClearChat:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[_.jsx(hL,{"aria-hidden":"true"}),"Clear chat"]})};function pL(e){return e==null?[]:Array.isArray(e)?e:[e]}var mL=(e,...t)=>e.concat(t),gL=(e,...t)=>e.filter(n=>!t.includes(n)),EL=e=>Array.from(new Set(e));function zb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function yL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return zb(e,t,{step:-r,loop:o})}var bL=e=>Array.isArray(e),jb=e=>e!=null&&typeof e=="object",TL=e=>jb(e)&&!bL(e),Yl=e=>typeof e=="string",fs=e=>typeof e=="function",wL=e=>e==null,_L=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),xL=e=>Object.prototype.toString.call(e),$b=Function.prototype.toString,SL=$b.call(Object),vL=e=>{if(!jb(e)||xL(e)!="[object Object]"||kL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_L(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&$b.call(n)==SL},AL=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,CL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,kL=e=>AL(e)||CL(e),NL=e=>e(),PL=()=>{},Lh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function OL(e,t=0){let n=0,r=null;return((...o)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...o),n=a):r||(r=setTimeout(()=>{e(...o),n=Date.now(),r=null},t-u))})}var{min:IL,max:RL}=Math,LL=e=>Number.isNaN(e),DL=e=>LL(e)?0:e,Vb=(e,t,n)=>IL(RL(DL(e),t),n);function Dh(e){if(!vL(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const o=e[r];o!==void 0&&(n[r]=Dh(o))}return n}function Mh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function ML(e,t){if(e==null)throw new Error(t())}function FL(e,t,n){let r=[];for(const o of t)e[o]==null&&r.push(o);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var BL=Object.defineProperty,UL=(e,t,n)=>t in e?BL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Fh=(e,t,n)=>UL(e,typeof t!="symbol"?t+"":t,n),qb=()=>{},Wl=e=>typeof e=="object"&&e!==null,hs=e=>e?"":void 0,Yb=e=>e?"true":void 0,HL=1,zL=9,jL=11,nn=e=>Wl(e)&&e.nodeType===HL&&typeof e.nodeName=="string",Gl=e=>Wl(e)&&e.nodeType===zL,$L=e=>Wl(e)&&e===e.window,Wb=e=>nn(e)?e.localName||"":"#document";function VL(e){return["html","body","#document"].includes(Wb(e))}var qL=e=>Wl(e)&&e.nodeType!==void 0,_o=e=>qL(e)&&e.nodeType===jL&&"host"in e,YL=e=>nn(e)&&e.localName==="input",WL=e=>nn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Ka(e){if(!e)return!1;const t=e.getRootNode();return gs(t)===e}var GL=/(textarea|select)/;function XL(e){if(e==null||!nn(e))return!1;try{return YL(e)&&e.selectionStart!=null||GL.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function ps(e,t){var r;if(!e||!t||!nn(e)||!nn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&_o(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Fr(e){var t;return Gl(e)?e:$L(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function KL(e){return Fr(e).documentElement}function ms(e){var t,n,r;return _o(e)?ms(e.host):Gl(e)?(t=e.defaultView)!=null?t:window:nn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function gs(e){let t=e.activeElement;for(;t!=null&&t.shadowRoot;){const n=t.shadowRoot.activeElement;if(!n||n===t)break;t=n}return t}function QL(e){if(Wb(e)==="html")return e;const t=e.assignedSlot||e.parentNode||_o(e)&&e.host||KL(e);return _o(t)?t.host:t}function Bh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Gl(t)||_o(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Uh=new WeakMap;function Es(e){return Uh.has(e)||Uh.set(e,ms(e).getComputedStyle(e)),Uh.get(e)}var Hh=new Set(["menu","listbox","dialog","grid","tree","region"]),JL=e=>Hh.has(e),Gb=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Xb(e,t){const n=new Set,r=Bh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";if(m&&JL(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Kb(e,t){const n=Bh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const l of u){if(l.getAttribute("aria-expanded")!=="true")continue;const d=Gb(l);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),T=p.getAttribute("aria-modal")==="true";m&&Hh.has(m)&&!T&&(t(p),o(p))}}}};o(e)}function ZL(e){const t=new Set;return Kb(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function e5(e){const t=e.getAttribute("role");return!!(t&&Hh.has(t))}function t5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function n5(e){var t;return t5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function r5(e){if(!e.id)return!1;const t=Bh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&e5(e))}var zh=()=>typeof document!="undefined";function i5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var jh=e=>zh()&&e.test(i5()),o5=e=>zh()&&e.test(navigator.vendor),Qb=()=>zh()&&!!navigator.maxTouchPoints,s5=()=>jh(/^iPhone/i),a5=()=>jh(/^iPad/i)||$h()&&navigator.maxTouchPoints>1,Xl=()=>s5()||a5(),u5=()=>$h()||Xl(),$h=()=>jh(/^Mac/i),l5=()=>u5()&&o5(/apple/i);function c5(e){var t,n,r,o;return(o=(t=e.composedPath)==null?void 0:t.call(e))!=null?o:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Tr(e){var n;const t=c5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Jb=e=>e.button===0,d5=e=>e.button===2||$h()&&e.ctrlKey&&e.button===0,f5=e=>"touches"in e&&e.touches.length>0,h5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Zb={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function p5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=h5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in Zb&&(o=Zb[o]),o}function eT(e,t="client"){const n=f5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var rn=(e,t,n,r)=>{const o=typeof e=="function"?e():e;return o==null||o.addEventListener(t,n,r),()=>{o==null||o.removeEventListener(t,n,r)}},tT=e=>nn(e)&&e.tagName==="IFRAME",m5=/^(audio|video|details)$/;function nT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var g5=e=>!Number.isNaN(nT(e)),E5=e=>nT(e)<0;function y5(e,t){if(!t)return null;if(t===!0)return e.shadowRoot||null;const n=t(e);return(n===!0?e.shadowRoot:n)||null}function rT(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let l=0;for(;l<o.length;){const d=o[l++];if(!d||a.has(d))continue;a.add(d);const f=y5(d,t);if(f){const p=Array.from(f.querySelectorAll(Kl)).filter(n),m=u.get(d);if(m!==void 0){const T=m+1;r.splice(T,0,...p),p.forEach((y,w)=>{u.set(y,T+w)});for(let y=T+p.length;y<r.length;y++)u.set(r[y],y)}else{const T=r.length;r.push(...p),p.forEach((y,w)=>{u.set(y,T+w)})}o.push(...p)}}return r}var Kl="input:not([type='hidden']):not([disabled]), select:not([disabled]), textarea:not([disabled]), a[href], button:not([disabled]), [tabindex], iframe, object, embed, area[href], audio[controls], video[controls], [contenteditable]:not([contenteditable='false']), details > summary:first-of-type",iT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));(n==!0||n=="if-empty"&&o.length===0)&&nn(e)&&Br(e)&&o.unshift(e);const u=[];for(const l of o)if(Br(l)){if(tT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...iT(d,{getShadowRoot:r}));continue}u.push(l)}return r?rT(u,r,Br):u};function Br(e){return!nn(e)||e.closest("[inert]")?!1:e.matches(Kl)&&WL(e)}function ys(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Kl));n&&xo(e)&&o.unshift(e);const a=[];for(const u of o)if(xo(u)){if(tT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...ys(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=rT(a,r,xo);return!u.length&&n?o:u}return!a.length&&n?o:a}function xo(e){return nn(e)&&e.tabIndex>0?!0:Br(e)&&!E5(e)}function b5(e,t={}){const n=ys(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function T5(e,t={}){const{current:n,getShadowRoot:r}=t,o=ys(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:gs(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function Qa(e){return e.tabIndex<0&&(m5.test(e.localName)||XL(e))&&!g5(e)?0:e.tabIndex}function oT(e){const{root:t,getInitialEl:n,filter:r,enabled:o=!0}=e;if(!o)return;let a=null;if(a||(a=typeof n=="function"?n():n),a||(a=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!a){const u=ys(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var w5=class hS{constructor(){Fh(this,"id",null),Fh(this,"fn_cleanup"),Fh(this,"cleanup",()=>{this.cancel()})}static create(){return new hS}request(t){this.cancel(),this.id=globalThis.requestAnimationFrame(()=>{this.id=null,this.fn_cleanup=t==null?void 0:t()})}cancel(){var t;this.id!==null&&(globalThis.cancelAnimationFrame(this.id),this.id=null),(t=this.fn_cleanup)==null||t.call(this),this.fn_cleanup=void 0}isActive(){return this.id!==null}};function Wt(e){const t=w5.create();return t.request(e),t.cleanup}function sT(e){const t=new Set;function n(r){const o=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(o))}return n(()=>n(e)),function(){t.forEach(o=>o())}}function Vh(e){const t=QL(e);return VL(t)?Fr(t).body:nn(t)&&S5(t)?t:Vh(t)}var _5=/auto|scroll|overlay|hidden|clip/,x5=new Set(["inline","contents"]);function S5(e){const t=ms(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return _5.test(n+o+r)&&!x5.has(a)}var bs="default",qh="",Ql=new WeakMap;function v5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return Xl()?(bs==="default"&&(qh=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),bs="disabled"):t&&(Ql.set(t,t.style.userSelect),t.style.userSelect="none"),()=>A5({target:t,doc:r})}function A5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(Xl()){if(bs!=="disabled")return;bs="restoring",setTimeout(()=>{sT(()=>{bs==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=qh||""),qh="",bs="default")})},300)}else if(t&&Ql.has(t)){const a=Ql.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Ql.delete(t)}}function C5(e={}){const u=e,{defer:t,target:n}=u,r=mn(u,["defer","target"]),o=t?Wt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(v5(me(B({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function k5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=eT(l),f=Math.sqrt($u(d.x,2)+$u(d.y,2)),p=l.pointerType==="touch"?10:5;if(!(f<p)){if(l.pointerType==="mouse"&&l.button===0){a(l);return}n({point:d,event:l})}},a=l=>{const d=eT(l);r({point:d,event:l})},u=[rn(e,"pointermove",o,!1),rn(e,"pointerup",a,!1),rn(e,"pointercancel",a,!1),rn(e,"contextmenu",a,!1),C5({doc:e})];return()=>{u.forEach(l=>l())}}function N5(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,l=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,T]=b5(e,{includeContainer:!0,getShadowRoot:a}),y=T5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&Ka(y)?(o==null||o(),p=T):f.shiftKey&&(Ka(m)||w)?p=n:!f.shiftKey&&Ka(n)?(o==null||o(),p=m):!f.shiftKey&&(Ka(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return rn(u,"keydown",d,!0)}function P5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=mn(l,["defer","triggerElement"]),a=n?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(N5(d,B({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function O5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Jl(e,t){if(!e)return qb;const n=Object.keys(t).reduce((r,o)=>(r[o]=e.style.getPropertyValue(o),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function I5(e,t,n){if(!e)return qb;const r=e.style.getPropertyValue(t);return e.style.setProperty(t,n),()=>{e.style.setProperty(t,r),e.style.length===0&&e.removeAttribute("style")}}function R5(e,t,n){const{signal:r}=t;return[new Promise((u,l)=>{const d=setTimeout(()=>{l(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),l(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),l(f))})}),()=>t.abort()]}function L5(e,t){const{timeout:n,rootNode:r}=t,o=ms(r),a=Fr(r),u=new o.AbortController;return R5(new Promise(l=>{const d=e();if(d){l(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),l(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var D5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),M5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,aT=e=>{const t={};let n;for(;n=M5.exec(e);)t[n[1]]=n[2];return t},F5=(e,t)=>{if(Yl(e)){if(Yl(t))return`${e};${t}`;e=aT(e)}else Yl(t)&&(t=aT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function on(...e){let t={};for(let n of e){if(!n)continue;for(let o in t){if(o.startsWith("on")&&typeof t[o]=="function"&&typeof n[o]=="function"){t[o]=Lh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=D5(t[o],n[o]);continue}if(o==="style"){t[o]=F5(t[o],n[o]);continue}t[o]=n[o]!==void 0?n[o]:t[o]}for(let o in n)t[o]===void 0&&(t[o]=n[o]);const r=Object.getOwnPropertySymbols(n);for(let o of r)t[o]=n[o]}return t}function NH(e){return e}var Ts=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ts||{}),Yh="__init__";function B5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Fr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>gs(t()),a=u=>t().getElementById(u);return me(B({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Ka,getById:a})}function U5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var ws=()=>e=>Array.from(new Set(e)),uT=typeof globalThis.document!="undefined"?D.useLayoutEffect:D.useEffect;function Zl(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=D.useState(t),[o,a]=D.useState(r),u=e().value!==void 0,l=D.useRef(o);l.current=u?e().value:o;const d=D.useRef(l.current);uT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var N,x;const w=d.current,v=fs(y)?y(w):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:v,prev:w}),u||a(v),n(v,w)||(x=(N=e()).onChange)==null||x.call(N,v,w)};function p(){return u?e().value:o}return{initial:r,ref:l,get:p,set(y){(e().sync?co.flushSync:NL)(()=>f(y))},invoke(y,w){var v,N;(N=(v=e()).onChange)==null||N.call(v,y,w)},hash(y){var w,v,N;return(N=(v=(w=e()).hash)==null?void 0:v.call(w,y))!=null?N:String(y)}}}Zl.cleanup=e=>{D.useEffect(()=>e,[])},Zl.ref=e=>{const t=D.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function H5(e){const t=D.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var z5=(e,t)=>{const n=D.useRef(!1),r=D.useRef(!1);D.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),D.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ec(e,t={}){var ie,fe,we,re,oe,Ae;const n=D.useMemo(()=>{const{id:se,ids:J,getRootNode:ae}=t;return B5({id:se,ids:J,getRootNode:ae})},[t]),r=(...se)=>{e.debug&&console.log(...se)},o=(fe=(ie=e.props)==null?void 0:ie.call(e,{props:Dh(t),scope:n}))!=null?fe:t,a=j5(o),u=(we=e.context)==null?void 0:we.call(e,{prop:a,bindable:Zl,scope:n,flush:cT,getContext(){return d},getComputed(){return Y},getRefs(){return v},getEvent(){return y()}}),l=lT(u),d={get(se){var J;return(J=l.current)==null?void 0:J[se].ref.current},set(se,J){var ae;(ae=l.current)==null||ae[se].set(J)},initial(se){var J;return(J=l.current)==null?void 0:J[se].initial},hash(se){var ae,k;const J=(ae=l.current)==null?void 0:ae[se].get();return(k=l.current)==null?void 0:k[se].hash(J)}},f=D.useRef(new Map),p=D.useRef(null),m=D.useRef(null),T=D.useRef({type:""}),y=()=>me(B({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>me(B({},R),{matches(...se){return se.includes(R.ref.current)},hasTag(se){var J,ae;return!!((ae=(J=e.states[R.ref.current])==null?void 0:J.tags)!=null&&ae.includes(se))}}),v=H5((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),N=()=>({state:w(),context:d,event:y(),prop:a,send:V,action:x,guard:C,track:z5,refs:v,computed:Y,flush:cT,scope:n,choose:U}),x=se=>{const J=fs(se)?se(N()):se;if(!J)return;const ae=J.map(k=>{var K,I;const F=(I=(K=e.implementations)==null?void 0:K.actions)==null?void 0:I[k];return F||Mh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),F});for(const k of ae)k==null||k(N())},C=se=>{var J,ae;return fs(se)?se(N()):(ae=(J=e.implementations)==null?void 0:J.guards)==null?void 0:ae[se](N())},A=se=>{const J=fs(se)?se(N()):se;if(!J)return;const ae=J.map(F=>{var I,Se;const K=(Se=(I=e.implementations)==null?void 0:I.effects)==null?void 0:Se[F];return K||Mh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),K}),k=[];for(const F of ae){const K=F==null?void 0:F(N());K&&k.push(K)}return()=>k.forEach(F=>F==null?void 0:F())},U=se=>pL(se).find(J=>{let ae=!J.guard;return Yl(J.guard)?ae=!!C(J.guard):fs(J.guard)&&(ae=J.guard(N())),ae}),Y=se=>{ML(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[se];return J({context:d,event:y(),prop:a,refs:v,scope:n,computed:Y})},R=Zl(()=>({defaultValue:e.initialState({prop:a}),onChange(se,J){var k,F,K,I;if(J){const Se=f.current.get(J);Se==null||Se(),f.current.delete(J)}J&&x((k=e.states[J])==null?void 0:k.exit),x((F=p.current)==null?void 0:F.actions);const ae=A((K=e.states[se])==null?void 0:K.effects);if(ae&&f.current.set(se,ae),J===Yh){x(e.entry);const Se=A(e.effects);Se&&f.current.set(Yh,Se)}x((I=e.states[se])==null?void 0:I.entry)}})),$=D.useRef(void 0),ne=D.useRef(Ts.NotStarted);uT(()=>{queueMicrotask(()=>{var F;const ae=ne.current===Ts.Started;ne.current=Ts.Started,r(ae?"rehydrating...":"initializing...");const k=(F=$.current)!=null?F:R.initial;R.invoke(k,ae?R.get():Yh)});const se=f.current,J=R.ref.current;return()=>{r("unmounting..."),$.current=J,ne.current=Ts.Stopped,se.forEach(ae=>ae==null?void 0:ae()),f.current=new Map,p.current=null,queueMicrotask(()=>{x(e.exit)})}},[]);const de=()=>"ref"in R?R.ref.current:R.get(),V=se=>{queueMicrotask(()=>{var I,Se,Me,ke,be;if(ne.current!==Ts.Started)return;m.current=T.current,T.current=se;let J=de();const ae=(Me=(I=e.states[J].on)==null?void 0:I[se.type])!=null?Me:(Se=e.on)==null?void 0:Se[se.type],k=U(ae);if(!k)return;p.current=k;const F=(ke=k.target)!=null?ke:J;r("transition",se.type,k.target||J,`(${k.actions})`);const K=F!==J;K?co.flushSync(()=>R.set(F)):k.reenter&&!K?R.invoke(J,J):x((be=k.actions)!=null?be:[])})};return(Ae=e.watch)==null||Ae.call(e,N()),{state:w(),send:V,context:d,prop:a,scope:n,refs:v,computed:Y,event:y(),getStatus:()=>ne.current}}function lT(e){const t=D.useRef(e);return t.current=e,t}function j5(e){const t=lT(e);return function(r){return t.current[r]}}function cT(e){queueMicrotask(()=>{co.flushSync(()=>e())})}var Wh=U5(e=>e);function tc(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const o=r(t);typeof o=="function"&&n.push(o)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function $5(e){var r,o;let t=(r=Object.getOwnPropertyDescriptor(e.props,"ref"))==null?void 0:r.get,n=t&&"isReactWarning"in t&&t.isReactWarning;return n?e.ref:(t=(o=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:o.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Gh=e=>{const t=D.memo(D.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=mn(f,["asChild","children"]);if(!o)return D.createElement(e,me(B({},u),{ref:r}),a);if(!D.isValidElement(a))return null;const l=D.Children.only(a),d=$5(l);return D.cloneElement(l,me(B({},on(u,l.props)),{ref:r?tc(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Pn=(()=>{const e=new Map;return new Proxy(Gh,{apply(t,n,r){return Gh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Gh(r)),e.get(r)}})})();function V5(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function So(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=D.createContext(u);l.displayName=t;function d(){var p;const f=D.useContext(l);if(!f&&n){const m=new Error(a!=null?a:V5(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[q5,Xh]=So({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[dT,Ja]=So({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),fT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});fT.displayName="PopoverContent";const hT=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(n.getPositionerProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:t}))});hT.displayName="PopoverPositioner";const Za=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},B({},e)]),pT=e=>Za()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function Y5(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var W5={props({props:e}){return me(B({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Es(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const o=r("present");if(o)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!o&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});Wt(()=>{var l,d;const u=nc(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((l=t.get("styles"))==null?void 0:l.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{Wt(()=>{e.set("prevAnimationName",nc(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const o=t.get("node");if(!o)return;const a=d=>{var p,m,T;((T=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?T:d.target)===o&&e.set("prevAnimationName",nc(t.get("styles")))},u=d=>{const f=nc(t.get("styles"));Tr(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const l=Jl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),sT(()=>l())}}}}};function nc(e){return(e==null?void 0:e.animationName)||"none"}ws()(["onExitComplete","present","immediate"]);function G5(e,t={}){const{sync:n=!1}=t,r=X5(e);return D.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function X5(e){const t=D.useRef(e);return t.current=e,t}const Kh=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=mn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=D.useRef(!1),l=me(B({},a),{present:r,onExitComplete:G5(e.onExitComplete)}),d=ec(W5,l),f=Y5(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var vo=(e,t=[])=>({parts:(...n)=>{if(K5(t))return vo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>vo(e,[...t,...n]),omit:(...n)=>vo(e,t.filter(r=>!n.includes(r))),rename:n=>vo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${_s(e)}"][data-part="${_s(r)}"]`,`& [data-scope="${_s(e)}"][data-part="${_s(r)}"]`].join(", "),attrs:{"data-scope":_s(e),"data-part":_s(r)}}}),{})}),_s=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),K5=e=>e.length===0;const Q5=["top","right","bottom","left"],Oi=Math.min,ai=Math.max,rc=Math.round,ic=Math.floor,Ur=e=>({x:e,y:e}),J5={left:"right",right:"left",bottom:"top",top:"bottom"};function mT(e,t,n){return ai(e,Oi(t,n))}function ui(e,t){return typeof e=="function"?e(t):e}function Ii(e){return e.split("-")[0]}function xs(e){return e.split("-")[1]}function Qh(e){return e==="x"?"y":"x"}function Jh(e){return e==="y"?"height":"width"}function Hr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Zh(e){return Qh(Hr(e))}function Z5(e,t,n){n===void 0&&(n=!1);const r=xs(e),o=Zh(e),a=Jh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=oc(u)),[u,oc(u)]}function eD(e){const t=oc(e);return[ep(e),t,ep(t)]}function ep(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const gT=["left","right"],ET=["right","left"],tD=["top","bottom"],nD=["bottom","top"];function rD(e,t,n){switch(e){case"top":case"bottom":return n?t?ET:gT:t?gT:ET;case"left":case"right":return t?tD:nD;default:return[]}}function iD(e,t,n,r){const o=xs(e);let a=rD(Ii(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(ep)))),a}function oc(e){const t=Ii(e);return J5[t]+e.slice(t.length)}function oD(e){var t,n,r,o;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(o=e.left)!=null?o:0}}function yT(e){return typeof e!="number"?oD(e):{top:e,right:e,bottom:e,left:e}}function sc(e){const{x:t,y:n,width:r,height:o}=e;return{width:r,height:o,top:n,left:t,right:t+r,bottom:n+o,x:t,y:n}}function bT(e,t,n){let{reference:r,floating:o}=e;const a=Hr(t),u=Zh(t),l=Jh(u),d=Ii(t),f=a==="y",p=r.x+r.width/2-o.width/2,m=r.y+r.height/2-o.height/2,T=r[l]/2-o[l]/2;let y;switch(d){case"top":y={x:p,y:r.y-o.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-o.width,y:m};break;default:y={x:r.x,y:r.y}}const w=xs(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function sD(e,t){return et(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:l,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:T=!1,padding:y=0}=ui(t,e),w=yT(y),N=l[T?m==="floating"?"reference":"floating":m],x=sc(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(N))==null||n?N:N.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(l.floating)),boundary:f,rootBoundary:p,strategy:d})),C=m==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,A=yield a.getOffsetParent==null?void 0:a.getOffsetParent(l.floating),U=(yield a.isElement==null?void 0:a.isElement(A))&&(yield a.getScale==null?void 0:a.getScale(A))||{x:1,y:1},Y=sc(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:l,rect:C,offsetParent:A,strategy:d}):C);return{top:(x.top-Y.top+w.top)/U.y,bottom:(Y.bottom-x.bottom+w.bottom)/U.y,left:(x.left-Y.left+w.left)/U.x,right:(Y.right-x.right+w.right)/U.x}})}const aD=50,uD=(e,t,n)=>et(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:me(B({},u),{detectOverflow:sD}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:m}=bT(f,r,d),T=r,y=0;const w={};for(let v=0;v<a.length;v++){const N=a[v];if(!N)continue;const{name:x,fn:C}=N,{x:A,y:U,data:Y,reset:R}=yield C({x:p,y:m,initialPlacement:r,placement:T,strategy:o,middlewareData:w,rects:f,platform:l,elements:{reference:e,floating:t}});p=A!=null?A:p,m=U!=null?U:m,w[x]=B(B({},w[x]),Y),R&&y<aD&&(y++,typeof R=="object"&&(R.placement&&(T=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):R.rects),{x:p,y:m}=bT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),lD=e=>({name:"arrow",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=ui(e,n)||{};if(p==null)return{};const T=yT(m),y={x:r,y:o},w=Zh(a),v=Jh(w),N=yield l.getDimensions(p),x=w==="y",C=x?"top":"left",A=x?"bottom":"right",U=x?"clientHeight":"clientWidth",Y=u.reference[v]+u.reference[w]-y[w]-u.floating[v],R=y[w]-u.reference[w],$=yield l.getOffsetParent==null?void 0:l.getOffsetParent(p);let ne=$?$[U]:0;(!ne||!(yield l.isElement==null?void 0:l.isElement($)))&&(ne=d.floating[U]||u.floating[v]);const de=Y/2-R/2,V=ne/2-N[v]/2-1,ie=Oi(T[C],V),fe=Oi(T[A],V),we=ne-N[v]-fe,re=ne/2-N[v]/2+de,oe=mT(ie,re,we),Ae=!f.arrow&&xs(a)!=null&&re!==oe&&u.reference[v]/2-(re<ie?ie:fe)-N[v]/2<0,se=Ae?re<ie?re-ie:re-we:0;return{[w]:y[w]+se,data:B({[w]:oe,centerOffset:re-oe-se},Ae&&{alignmentOffset:se}),reset:Ae}})}}),cD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return et(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,oe=ui(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:N=!0}=oe,x=mn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Ii(a),A=Hr(d),U=Ii(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!N?[oc(d)]:eD(d)),$=v!=="none";!y&&$&&R.push(...iD(d,N,v,Y));const ne=[d,...R],de=yield f.detectOverflow(n,x),V=[];let ie=((o=u.flip)==null?void 0:o.overflows)||[];if(m&&V.push(de[C]),T){const Ae=Z5(a,l,Y);V.push(de[Ae[0]],de[Ae[1]])}if(ie=[...ie,{placement:a,overflows:V}],!V.every(Ae=>Ae<=0)){var fe,we;const Ae=(((fe=u.flip)==null?void 0:fe.index)||0)+1,se=ne[Ae];if(se&&(!(T==="alignment"?A!==Hr(se):!1)||ie.every(k=>Hr(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:Ae,overflows:ie},reset:{placement:se}};let J=(we=ie.filter(ae=>ae.overflows[0]<=0).sort((ae,k)=>ae.overflows[1]-k.overflows[1])[0])==null?void 0:we.placement;if(!J)switch(w){case"bestFit":{var re;const ae=(re=ie.filter(k=>{if($){const F=Hr(k.placement);return F===A||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,K)=>F+K,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:re[0];ae&&(J=ae);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function TT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function wT(e){return Q5.some(t=>e[t]>=0)}const dD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return et(this,null,function*(){const{rects:r,platform:o}=n,l=ui(e,n),{strategy:a="referenceHidden"}=l,u=mn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,me(B({},u),{elementContext:"reference"})),f=TT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:wT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,me(B({},u),{altBoundary:!0})),f=TT(d,r.floating);return{data:{escapedOffsets:f,escaped:wT(f)}}}default:return{}}})}}},_T=new Set(["left","top"]);function fD(e,t){return et(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Ii(n),l=xs(n),d=Hr(n)==="y",f=_T.has(u)?-1:1,p=a&&d?-1:1,m=ui(t,e);let{mainAxis:T,crossAxis:y,alignmentAxis:w}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return l&&typeof w=="number"&&(y=l==="end"?w*-1:w),d?{x:y*p,y:T*f}:{x:T*f,y:y*p}})}const hD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return et(this,null,function*(){var r,o;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield fD(n,e);return l===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:me(B({},f),{placement:l})}})}}},pD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return et(this,null,function*(){const{x:r,y:o,placement:a,platform:u}=n,A=ui(e,n),{mainAxis:l=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:Y,y:R}=U;return{x:Y,y:R}}}}=A,p=mn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=Hr(a),w=Qh(y);let v=m[w],N=m[y];const x=(U,Y)=>mT(Y+T[U==="y"?"top":"left"],Y,Y-T[U==="y"?"bottom":"right"]);l&&(v=x(w,v)),d&&(N=x(y,N));const C=f.fn(me(B({},n),{[w]:v,[y]:N}));return me(B({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[w]:l,[y]:d}}})})}}},mD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:o,y:a,placement:u,rects:l,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=ui(e,t),T={x:o,y:a},y=Hr(u),w=Qh(y);let v=T[w],N=T[y];const x=ui(f,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:{mainAxis:(n=x.mainAxis)!=null?n:0,crossAxis:(r=x.crossAxis)!=null?r:0};if(p){const Y=w==="y"?"height":"width",R=l.reference[w]-l.floating[Y]+C.mainAxis,$=l.reference[w]+l.reference[Y]-C.mainAxis;v<R?v=R:v>$&&(v=$)}if(m){var A,U;const Y=w==="y"?"width":"height",R=_T.has(Ii(u)),$=l.reference[y]-l.floating[Y]+(R&&((A=d.offset)==null?void 0:A[y])||0)+(R?0:C.crossAxis),ne=l.reference[y]+l.reference[Y]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?C.crossAxis:0);N<$?N=$:N>ne&&(N=ne)}return{[w]:v,[y]:N}}}},gD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return et(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,V=ui(e,n),{apply:l=()=>{}}=V,d=mn(V,["apply"]),f=yield a.detectOverflow(n,d),p=Ii(r),m=xs(r),T=Hr(r)==="y",{width:y,height:w}=o.floating;let v,N;p==="top"||p==="bottom"?(v=p,N=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(N=p,v=m==="end"?"top":"bottom");const x=w-f.top-f.bottom,C=y-f.left-f.right,A=Oi(w-f[v],x),U=Oi(y-f[N],C),Y=n.middlewareData.shift,R=!Y;let $=A,ne=U;Y!=null&&Y.enabled.x&&(ne=C),Y!=null&&Y.enabled.y&&($=x),R&&!m&&(T?ne=y-2*ai(f.left,f.right):$=w-2*ai(f.top,f.bottom)),yield l(me(B({},n),{availableWidth:ne,availableHeight:$}));const de=yield a.getDimensions(u.floating);return y!==de.width||w!==de.height?{reset:{rects:!0}}:{}})}}};function ac(){return typeof window!="undefined"}function Ss(e){return xT(e)?(e.nodeName||"").toLowerCase():"#document"}function Kn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function zr(e){var t;return(t=(xT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function xT(e){return ac()?e instanceof Node||e instanceof Kn(e).Node:!1}function wr(e){return ac()?e instanceof Element||e instanceof Kn(e).Element:!1}function jr(e){return ac()?e instanceof HTMLElement||e instanceof Kn(e).HTMLElement:!1}function ST(e){return!ac()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Kn(e).ShadowRoot}function eu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=_r(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function ED(e){return/^(table|td|th)$/.test(Ss(e))}function uc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const yD=/transform|translate|scale|rotate|perspective|filter/,bD=/paint|layout|strict|content/,Ao=e=>!!e&&e!=="none";let tp;function np(e){const t=wr(e)?_r(e):e;return Ao(t.transform)||Ao(t.translate)||Ao(t.scale)||Ao(t.rotate)||Ao(t.perspective)||!rp()&&(Ao(t.backdropFilter)||Ao(t.filter))||yD.test(t.willChange||"")||bD.test(t.contain||"")}function TD(e){let t=Ri(e);for(;jr(t)&&!vs(t);){if(np(t))return t;if(uc(t))return null;t=Ri(t)}return null}function rp(){return tp==null&&(tp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),tp}function vs(e){return/^(html|body|#document)$/.test(Ss(e))}function _r(e){return Kn(e).getComputedStyle(e)}function lc(e){return wr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ri(e){if(Ss(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ST(e)&&e.host||zr(e);return ST(t)?t.host:t}function vT(e){const t=Ri(e);return vs(t)?(e.ownerDocument||e).body:jr(t)&&eu(t)?t:vT(t)}function tu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=vT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Kn(o);if(a){const l=ip(u);return t.concat(u,u.visualViewport||[],eu(o)?o:[],l&&n?tu(l):[])}else return t.concat(o,tu(o,[],n))}function ip(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function AT(e){const t=_r(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=jr(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=rc(n)!==a||rc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function op(e){return wr(e)?e:e.contextElement}function As(e){const t=op(e);if(!jr(t))return Ur(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=AT(t);let u=(a?rc(n.width):n.width)/r,l=(a?rc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const wD=Ur(0);function CT(e){const t=Kn(e);return!rp()||!t.visualViewport?wD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Kn(e)?!1:t}function Co(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=op(e);let u=Ur(1);t&&(r?wr(r)&&(u=As(r)):u=As(e));const l=_D(a,n,r)?CT(a):Ur(0);let d=(o.left+l.x)/u.x,f=(o.top+l.y)/u.y,p=o.width/u.x,m=o.height/u.y;if(a){const T=Kn(a),y=r&&wr(r)?Kn(r):r;let w=T,v=ip(w);for(;v&&r&&y!==w;){const N=As(v),x=v.getBoundingClientRect(),C=_r(v),A=x.left+(v.clientLeft+parseFloat(C.paddingLeft))*N.x,U=x.top+(v.clientTop+parseFloat(C.paddingTop))*N.y;d*=N.x,f*=N.y,p*=N.x,m*=N.y,d+=A,f+=U,w=Kn(v),v=ip(w)}}return sc({width:p,height:m,x:d,y:f})}function cc(e,t){const n=lc(e).scrollLeft;return t?t.left+n:Co(zr(e)).left+n}function kT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-cc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function xD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=zr(r),l=t?uc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Ur(1);const p=Ur(0),m=jr(r);if((m||!m&&!a)&&((Ss(r)!=="body"||eu(u))&&(d=lc(r)),jr(r))){const y=Co(r);f=As(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?kT(u,d):Ur(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+T.x,y:n.y*f.y-d.scrollTop*f.y+p.y+T.y}}function SD(e){return Array.from(e.getClientRects())}function vD(e){const t=zr(e),n=lc(e),r=e.ownerDocument.body,o=ai(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ai(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+cc(e);const l=-n.scrollTop;return _r(r).direction==="rtl"&&(u+=ai(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const NT=25;function AD(e,t){const n=Kn(e),r=zr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,l=0,d=0;if(o){a=o.width,u=o.height;const p=rp();(!p||p&&t==="fixed")&&(l=o.offsetLeft,d=o.offsetTop)}const f=cc(r);if(f<=0){const p=r.ownerDocument,m=p.body,T=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(T.marginLeft)+parseFloat(T.marginRight)||0,w=Math.abs(r.clientWidth-m.clientWidth-y);w<=NT&&(a-=w)}else f<=NT&&(a+=f);return{width:a,height:u,x:l,y:d}}const CD=new Set(["absolute","fixed"]);function kD(e,t){const n=Co(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=jr(e)?As(e):Ur(1),u=e.clientWidth*a.x,l=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:l,x:d,y:f}}function PT(e,t,n){let r;if(t==="viewport")r=AD(e,n);else if(t==="document")r=vD(zr(e));else if(wr(t))r=kD(t,n);else{const o=CT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return sc(r)}function OT(e,t){const n=Ri(e);return n===t||!wr(n)||vs(n)?!1:_r(n).position==="fixed"||OT(n,t)}function ND(e,t){const n=t.get(e);if(n)return n;let r=tu(e,[],!1).filter(l=>wr(l)&&Ss(l)!=="body"),o=null;const a=_r(e).position==="fixed";let u=a?Ri(e):e;for(;wr(u)&&!vs(u);){const l=_r(u),d=np(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&CD.has(o.position)||eu(u)&&!d&&OT(e,u))?r=r.filter(p=>p!==u):o=l,u=Ri(u)}return t.set(e,r),r}function PD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?uc(t)?[]:ND(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=PT(t,p,o);return f.top=ai(m.top,f.top),f.right=Oi(m.right,f.right),f.bottom=Oi(m.bottom,f.bottom),f.left=ai(m.left,f.left),f},PT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function OD(e){const{width:t,height:n}=AT(e);return{width:t,height:n}}function ID(e,t,n){const r=jr(t),o=zr(t),a=n==="fixed",u=Co(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=Ur(0);function f(){d.x=cc(o)}if(r||!r&&!a)if((Ss(t)!=="body"||eu(o))&&(l=lc(t)),r){const y=Co(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?kT(o,l):Ur(0),m=u.left+l.scrollLeft-d.x-p.x,T=u.top+l.scrollTop-d.y-p.y;return{x:m,y:T,width:u.width,height:u.height}}function sp(e){return _r(e).position==="static"}function IT(e,t){if(!jr(e)||_r(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return zr(e)===n&&(n=n.ownerDocument.body),n}function RT(e,t){const n=Kn(e);if(uc(e))return n;if(!jr(e)){let o=Ri(e);for(;o&&!vs(o);){if(wr(o)&&!sp(o))return o;o=Ri(o)}return n}let r=IT(e,t);for(;r&&ED(r)&&sp(r);)r=IT(r,t);return r&&vs(r)&&sp(r)&&!np(r)?n:r||TD(e)||n}const RD=function(e){return et(this,null,function*(){const t=this.getOffsetParent||RT,n=this.getDimensions,r=yield n(e.floating);return{reference:ID(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function LD(e){return _r(e).direction==="rtl"}const DD={convertOffsetParentRelativeRectToViewportRelativeRect:xD,getDocumentElement:zr,getClippingRect:PD,getOffsetParent:RT,getElementRects:RD,getClientRects:SD,getDimensions:OD,getScale:As,isElement:wr,isRTL:LD};function LT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function MD(e,t){let n=null,r;const o=zr(e);function a(){var l;clearTimeout(r),(l=n)==null||l.disconnect(),n=null}function u(l,d){l===void 0&&(l=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:T,height:y}=f;if(l||t(),!T||!y)return;const w=ic(m),v=ic(o.clientWidth-(p+T)),N=ic(o.clientHeight-(m+y)),x=ic(p),A={rootMargin:-w+"px "+-v+"px "+-N+"px "+-x+"px",threshold:ai(0,Oi(1,d))||1};let U=!0;function Y(R){const $=R[0].intersectionRatio;if($!==d){if(!U)return u();$?u(!1,$):r=setTimeout(()=>{u(!1,1e-7)},1e3)}$===1&&!LT(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,me(B({},A),{root:o.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,A)}n.observe(e)}return u(!0),a}function FD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:l=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=op(e),p=o||a?[...f?tu(f):[],...tu(t)]:[];p.forEach(x=>{o&&x.addEventListener("scroll",n,{passive:!0}),a&&x.addEventListener("resize",n)});const m=f&&l?MD(f,n):null;let T=-1,y=null;u&&(y=new ResizeObserver(x=>{let[C]=x;C&&C.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(T),T=requestAnimationFrame(()=>{var A;(A=y)==null||A.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let w,v=d?Co(e):null;d&&N();function N(){const x=Co(e);v&&!LT(v,x)&&n(),v=x,w=requestAnimationFrame(N)}return n(),()=>{var x;p.forEach(C=>{o&&C.removeEventListener("scroll",n),a&&C.removeEventListener("resize",n)}),m==null||m(),(x=y)==null||x.disconnect(),y=null,d&&cancelAnimationFrame(w)}}const BD=hD,UD=pD,HD=cD,zD=gD,jD=dD,$D=lD,VD=mD,qD=(e,t,n)=>{const r=new Map,o=B({platform:DD},n),a=me(B({},o.platform),{_c:r});return uD(e,t,me(B({},o),{platform:a}))};function DT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const o={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return me(B({},o),{toJSON:()=>o})}function YD(e){if(!e)return DT();const{x:t,y:n,width:r,height:o}=e;return DT(t,n,r,o)}function WD(e,t){return{contextElement:nn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?YD(r):n.getBoundingClientRect()}}}var nu=e=>({variable:e,reference:`var(${e})`}),li={arrowSize:nu("--arrow-size"),arrowSizeHalf:nu("--arrow-size-half"),arrowBg:nu("--arrow-background"),transformOrigin:nu("--transform-origin"),arrowOffset:nu("--arrow-offset")},GD=e=>e==="top"||e==="bottom"?"y":"x";function XD(e,t){return{name:"transformOrigin",fn(n){var de,V,ie,fe,we;const{elements:r,middlewareData:o,placement:a,rects:u,y:l}=n,d=a.split("-")[0],f=GD(d),p=((de=o.arrow)==null?void 0:de.x)||0,m=((V=o.arrow)==null?void 0:V.y)||0,T=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,w=p+T/2,v=m+y/2,N=Math.abs(((ie=o.shift)==null?void 0:ie.y)||0),x=u.reference.height/2,C=y/2,A=(we=(fe=e.offset)==null?void 0:fe.mainAxis)!=null?we:e.gutter,U=typeof A=="number"?A+C:A!=null?A:C,Y=N>U,R={top:`${w}px calc(100% + ${U}px)`,bottom:`${w}px ${-U}px`,left:`calc(100% + ${U}px) ${v}px`,right:`${-U}px ${v}px`}[d],$=`${w}px ${u.reference.y+x-l}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(li.transformOrigin.variable,ne?$:R),{data:{transformOrigin:ne?$:R}}}}}var KD={name:"rects",fn({rects:e}){return{data:e}}},QD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:o}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:o!=null?`${o}px`:"",[a]:`calc(100% + ${li.arrowOffset.reference})`}),{}}}};function JD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var ZD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function MT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function ap(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function e8(e,t,n){const r=e||t.createElement("div");return $D({element:r,padding:n.arrowPadding})}function t8(e,t){var n;if(!wL((n=t.offset)!=null?n:t.gutter))return BD(({placement:r})=>{var p,m,T,y;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:l}=JD(r),d=l?void 0:t.shift,f=(y=(T=t.offset)==null?void 0:T.crossAxis)!=null?y:d;return Dh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function n8(e){if(!e.flip)return;const t=ap(e.boundary);return HD(me(B({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function r8(e){if(!e.slide&&!e.overlap)return;const t=ap(e.boundary);return UD(me(B({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:VD()}))}function i8(e){return zD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),l=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${l}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function o8(e){var t;if(e.hideWhenDetached)return jD({strategy:"referenceHidden",boundary:(t=ap(e.boundary))!=null?t:"clippingAncestors"})}function s8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function a8(e,t,n={}){const r=WD(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},ZD,n),a=t.querySelector("[data-part=arrow]"),u=[t8(a,o),n8(o),r8(o),e8(a,t.ownerDocument,o),QD(a),XD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),i8(o),o8(o),KD],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>et(null,null,function*(){var U;if(!r||!t)return;const v=yield qD(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const N=ms(t),x=MT(N,v.x),C=MT(N,v.y);t.style.setProperty("--x",`${x}px`),t.style.setProperty("--y",`${C}px`),o.hideWhenDetached&&(((U=v.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const A=t.firstElementChild;if(A){const Y=Es(A);t.style.setProperty("--z-index",Y.zIndex)}}),T=()=>et(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=s8(o.listeners),w=o.listeners?FD(r,t,T,y):PL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function FT(e,t,n={}){const l=n,{defer:r}=l,o=mn(l,["defer"]),a=r?Wt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(a8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var u8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function l8(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:li.arrowSize.reference,height:li.arrowSize.reference,[li.arrowSizeHalf.variable]:`calc(${li.arrowSize.reference} / 2)`,[li.arrowOffset.variable]:`calc(${li.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?u8[t.split("-")[0]]:void 0,background:li.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:o,isolation:"isolate",minWidth:n?void 0:"max-content",width:n?"var(--reference-width)":void 0,maxWidth:r?"var(--available-width)":void 0,maxHeight:r?"var(--available-height)":void 0,pointerEvents:t?void 0:"none",top:"0px",left:"0px",transform:t?"translate3d(var(--x), var(--y), 0)":"translate3d(0, -100vh, 0)",zIndex:"var(--z-index)"}}}var Cs=new WeakMap,dc=new WeakMap,fc={},up=0,BT=e=>e&&(e.host||BT(e.parentNode)),c8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=BT(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),d8=new Set(["script","output","status","next-route-announcer"]),f8=e=>d8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),h8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=c8(n,Array.isArray(e)?e:[e]);fc[r]||(fc[r]=new WeakMap);const l=fc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&nn(y)&&Kb(y,w=>{m(w)})});const T=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,w=>{if(f.has(w))T(w);else try{if(f8(w))return;const N=w.getAttribute(o)==="true",x=(Cs.get(w)||0)+1,C=(l.get(w)||0)+1;Cs.set(w,x),l.set(w,C),d.push(w),x===1&&N&&dc.set(w,!0),C===1&&w.setAttribute(r,""),N||w.setAttribute(o,"true")}catch(v){console.error("[zag-js > ariaHidden] cannot operate on ",w,v)}})};return T(n),f.clear(),up++,()=>{d.forEach(y=>{const w=Cs.get(y)-1,v=l.get(y)-1;Cs.set(y,w),l.set(y,v),w||(dc.has(y)||y.removeAttribute(o),dc.delete(y)),v||y.removeAttribute(r)}),up--,up||(Cs=new WeakMap,Cs=new WeakMap,dc=new WeakMap,fc={})}},p8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,m8=(e,t=p8(e),n="data-aria-hidden",r=!0)=>{if(t)return h8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},g8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function UT(e,t={}){const{defer:n=!0}=t,r=n?g8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(m8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function E8(e){const t={each(n){var r;for(let o=0;o<((r=e.frames)==null?void 0:r.length);o+=1){const a=e.frames[o];a&&n(a)}},addEventListener(n,r,o){return t.each(a=>{try{a.document.addEventListener(n,r,o)}catch(u){}}),()=>{try{t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener(n,r,o){t.each(a=>{try{a.document.removeEventListener(n,r,o)}catch(u){}})}};return t}function y8(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,o)=>{try{t==null||t.addEventListener(n,r,o)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}},removeEventListener:(n,r,o)=>{try{t==null||t.removeEventListener(n,r,o)}catch(a){}}}}var HT="pointerdown.outside",zT="focus.outside";function b8(e){for(const t of e)if(nn(t)&&Br(t))return!0;return!1}var jT=e=>"clientY"in e;function T8(e,t){if(!jT(t)||!e)return!1;const n=e.getBoundingClientRect();return n.width===0||n.height===0?!1:n.top<=t.clientY&&t.clientY<=n.top+n.height&&n.left<=t.clientX&&t.clientX<=n.left+n.width}function w8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function $T(e,t){if(!t||!jT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},l={x:e.clientX,y:e.clientY};return w8(u,l)?r||a:!1}function _8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Fr(e),f=ms(e),p=E8(f),m=y8(f);function T(A,U){if(!nn(U)||!U.isConnected||ps(e,U)||T8(e,A)||l&&Xb(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const $=Vh(Y);if($T(A,$))return!1}const R=Vh(e);return $T(A,R)?!1:!(n!=null&&n(U))}const y=new Set,w=_o(e==null?void 0:e.getRootNode());function v(A){function U(Y){var de,V;const R=u&&!Qb()?Wt:ie=>ie(),$=Y!=null?Y:A,ne=(V=(de=$==null?void 0:$.composedPath)==null?void 0:de.call($))!=null?V:[$==null?void 0:$.target];R(()=>{const ie=w?ne[0]:Tr(A);if(!(!e||!T(A,ie))){if(o||a){const fe=Lh(o,a);e.addEventListener(HT,fe,{once:!0})}VT(e,HT,{bubbles:!1,cancelable:!0,detail:{originalEvent:$,contextmenu:d5($),focusable:b8(ne),target:ie}})}})}A.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(rn(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const N=new Set,x=setTimeout(()=>{N.add(rn(d,"pointerdown",v,!0)),N.add(m.addEventListener("pointerdown",v,!0)),N.add(p.addEventListener("pointerdown",v,!0))},0);function C(A){(u?Wt:Y=>Y())(()=>{var $,ne;const Y=(ne=($=A==null?void 0:A.composedPath)==null?void 0:$.call(A))!=null?ne:[A==null?void 0:A.target],R=w?Y[0]:Tr(A);if(!(!e||!T(A,R))){if(r||a){const de=Lh(r,a);e.addEventListener(zT,de,{once:!0})}VT(e,zT,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:Br(R),target:R}})}})}return Qb()||(N.add(rn(d,"focusin",C,!0)),N.add(m.addEventListener("focusin",C,!0)),N.add(p.addEventListener("focusin",C,!0))),()=>{clearTimeout(x),y.forEach(A=>A()),N.forEach(A=>A())}}function x8(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(_8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function VT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function S8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return rn(Fr(e),"keydown",n,{capture:!0})}var qT="layer:request-dismiss",ur={layers:[],branches:[],count(){return this.layers.length},pointerBlockingLayers(){return this.layers.filter(e=>e.pointerBlocking)},topMostPointerBlockingLayer(){return[...this.pointerBlockingLayers()].slice(-1)[0]},hasPointerBlockingLayer(){return this.pointerBlockingLayers().length>0},isBelowPointerBlockingLayer(e){var r;const t=this.indexOf(e),n=this.topMostPointerBlockingLayer()?this.indexOf((r=this.topMostPointerBlockingLayer())==null?void 0:r.node):-1;return t<n},isTopMost(e){const t=this.layers[this.count()-1];return(t==null?void 0:t.node)===e},getNestedLayers(e){return Array.from(this.layers).slice(this.indexOf(e)+1)},getLayersByType(e){return this.layers.filter(t=>t.type===e)},getNestedLayersByType(e,t){const n=this.indexOf(e);return n===-1?[]:this.layers.slice(n+1).filter(r=>r.type===t)},getParentLayerOfType(e,t){const n=this.indexOf(e);if(!(n<=0))return this.layers.slice(0,n).reverse().find(r=>r.type===t)},countNestedLayersOfType(e,t){return this.getNestedLayersByType(e,t).length},isInNestedLayer(e,t){return this.getNestedLayers(e).some(n=>ps(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>ps(t,e))},add(e){this.layers.push(e),this.syncLayers()},addBranch(e){this.branches.push(e)},remove(e){const t=this.indexOf(e);t<0||(t<this.count()-1&&this.getNestedLayers(e).forEach(r=>ur.dismiss(r.node,e)),this.layers.splice(t,1),this.syncLayers())},removeBranch(e){const t=this.branches.indexOf(e);t>=0&&this.branches.splice(t,1)},syncLayers(){this.layers.forEach((e,t)=>{e.node.style.setProperty("--layer-index",`${t}`),e.node.removeAttribute("data-nested"),e.node.removeAttribute("data-has-nested"),this.getParentLayerOfType(e.node,e.type)&&e.node.setAttribute("data-nested",e.type);const r=this.countNestedLayersOfType(e.node,e.type);r>0&&e.node.setAttribute("data-has-nested",e.type),e.node.style.setProperty("--nested-layer-count",`${r}`)})},indexOf(e){return this.layers.findIndex(t=>t.node===e)},dismiss(e,t){const n=this.indexOf(e);if(n===-1)return;const r=this.layers[n];A8(e,qT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),v8(e,qT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v8(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(o)}function A8(e,t,n){e.addEventListener(t,n,{once:!0})}var YT;function WT(){ur.layers.forEach(({node:e})=>{e.style.pointerEvents=ur.isBelowPointerBlockingLayer(e)?"none":"auto"})}function C8(e){e.style.pointerEvents=""}function k8(e,t){const n=Fr(e),r=[];return ur.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(YT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=L5(()=>{const l=o();return nn(l)?l:null},{timeout:1e3});a.then(l=>r.push(Jl(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{ur.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=YT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function N8(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Mh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:l,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};ur.add(f),WT();function p(v){var x,C;const N=Tr(v.detail.originalEvent);ur.isBelowPointerBlockingLayer(e)||ur.isInBranch(N)||((x=t.onPointerDownOutside)==null||x.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onPointerDownOutside:",v.detail.originalEvent),r==null||r()))}function m(v){var x,C;const N=Tr(v.detail.originalEvent);ur.isInBranch(N)||((x=t.onFocusOutside)==null||x.call(t,v),(C=t.onInteractOutside)==null||C.call(t,v),!v.defaultPrevented&&(l&&console.log("onFocusOutside:",v.detail.originalEvent),r==null||r()))}function T(v){var N;ur.isTopMost(e)&&((N=t.onEscapeKeyDown)==null||N.call(t,v),!v.defaultPrevented&&r&&(v.preventDefault(),r()))}function y(v){var A;if(!e)return!1;const N=typeof u=="function"?u():u,x=Array.isArray(N)?N:[N],C=(A=t.persistentElements)==null?void 0:A.map(U=>U()).filter(nn);return C&&x.push(...C),x.some(U=>ps(U,v))||ur.isInNestedLayer(e,v)}const w=[a?k8(e,t.persistentElements):void 0,S8(e,T),x8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{ur.remove(e),WT(),C8(e),w.forEach(v=>v==null?void 0:v())}}function GT(e,t){const{defer:n}=t,r=n?Wt:a=>a(),o=[];return o.push(r(()=>{const a=fs(e)?e():e;o.push(N8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var P8=Object.defineProperty,O8=(e,t,n)=>t in e?P8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>O8(e,typeof t!="symbol"?t+"":t,n),XT={activateTrap(e,t){if(e.length>0){const r=e[e.length-1];r!==t&&r.pause()}const n=e.indexOf(t);n===-1||e.splice(n,1),e.push(t)},deactivateTrap(e,t){const n=e.indexOf(t);n!==-1&&e.splice(n,1),e.length>0&&e[e.length-1].unpause()}},I8=[],R8=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Tr(r),a=this.findContainerIndex(o,r)>=0;if(a||Gl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(Qa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],l=!1):p-1>=0&&(u=f[p-1],l=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>Qa(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Tr(r);if(!(this.findContainerIndex(o,r)>=0)){if(iu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}iu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Tr(r);this.findContainerIndex(o,r)>=0||iu(this.config.clickOutsideDeactivates,r)||iu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;ru(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{L8(r)&&iu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return n5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?r5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Br(r)){const o=gs(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==gs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,D8(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=B({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),XT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),l=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{KT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Tr(o);this.updateTabbableNodes();let l=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?l=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:l=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Br(u)&&!xo(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,T=this.state.tabbableGroups[m];l=Qa(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else ru(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||I8;const n=B({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return ru(r)&&!r.shiftKey},isKeyBackward(r){return ru(r)&&r.shiftKey}},t);this.doc=n.document||Fr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{ZL(e).forEach(n=>{this.addPortalContainer(n)})})}get active(){return this.state.active}get paused(){return this.state.paused}findContainerIndex(e,t){const n=typeof(t==null?void 0:t.composedPath)=="function"?t.composedPath():void 0;return this.state.containerGroups.findIndex(({container:r,tabbableNodes:o})=>r.contains(e)||(n==null?void 0:n.includes(r))||o.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Xb(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ys(e,{getShadowRoot:this.config.getShadowRoot}),n=iT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let l=!1;for(let f=0;f<t.length;f++)if(Qa(t[f])>0){l=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const T=n.indexOf(f);if(!(T<0)){if(p){for(let y=T+1;y<n.length;y++)if(xo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(xo(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:l,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return XT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?KT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(rn(this.doc,"focusin",this.handleFocus,!0),rn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),rn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),rn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),rn(this.doc,"keydown",this.handleEscapeKey)),this}removeListeners(){if(this.state.active)return this.listenerCleanups.forEach(e=>e()),this.listenerCleanups=[],this}activate(e){if(this.state.active)return this;const t=this.getOption(e,"onActivate"),n=this.getOption(e,"onPostActivate"),r=this.getOption(e,"checkCanFocusTrap");r||this.updateTabbableNodes(),this.state.active=!0,this.state.paused=!1,this.state.nodeFocusedBeforeActivation=gs(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},ru=e=>e.key==="Tab",iu=(e,...t)=>typeof e=="function"?e(...t):e,L8=e=>!e.isComposing&&e.key==="Escape",KT=e=>setTimeout(e,0),D8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function QT(e,t={}){let n;const r=Wt(()=>{const o=typeof e=="function"?e():e;if(o){n=new R8(o,me(B({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Fr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var lp="data-scroll-lock";function M8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function JT(e){const t=Es(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function ZT(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:o}=t;if(o.hasAttribute(lp))return;const u=JT(r)||JT(o),l=n.innerWidth-r.clientWidth;o.setAttribute(lp,"");const d=()=>I5(r,"--scrollbar-width",`${l}px`),f=M8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),Jl(o,w)},m=()=>{var Y,R;const{scrollX:w,scrollY:v,visualViewport:N}=n,x=(Y=N==null?void 0:N.offsetLeft)!=null?Y:0,C=(R=N==null?void 0:N.offsetTop)!=null?R:0,A={position:"fixed",overflow:"hidden",top:`${-(v-Math.floor(C))}px`,left:`${-(w-Math.floor(x))}px`,right:"0"};!u&&l>0&&(A[f]=`${l}px`);const U=Jl(o,A);return()=>{U==null||U(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),Xl()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(lp)}}var F8=vo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),$r=F8.build(),ew=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},tw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},cp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},B8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},dp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},fp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},U8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},rw=e=>e.getById(ew(e)),ks=e=>e.getById(tw(e)),Ns=e=>e.getById(cp(e)),iw=e=>e.getById(nw(e)),H8=e=>e.getById(dp(e)),z8=e=>e.getById(fp(e));function j8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=l8(me(B({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(me(B({id:B8(l)},$r.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(me(B({},$r.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(me(B({},$r.anchor.attrs),{dir:u("dir"),id:ew(l)}))},getTriggerProps(){return t.button(me(B({},$r.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:tw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":cp(l),onPointerDown(y){Jb(y)&&l5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(me(B({},$r.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({id:nw(l)},$r.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(me(B({},$r.content.attrs),{dir:u("dir"),id:cp(l),tabIndex:-1,role:"dialog","aria-modal":Yb(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":hs(d),"aria-labelledby":m.title?dp(l):void 0,"aria-describedby":m.description?fp(l):void 0,"data-placement":f}))},getTitleProps(){return t.element(me(B({},$r.title.attrs),{id:dp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(me(B({},$r.description.attrs),{id:fp(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(me(B({},$r.closeTrigger.attrs),{dir:u("dir"),id:U8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var $8={props({props:e}){return me(B({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:B({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=rw(n))!=null?a:ks(n);return FT(r,()=>iw(n),me(B({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>Ns(n);let o=!0;return GT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ks(n),defer:!0,onEscapeKeyDown(a){var u;(u=t("onEscapeKeyDown"))==null||u(a),!t("closeOnEscape")&&a.preventDefault()},onInteractOutside(a){var u;(u=t("onInteractOutside"))==null||u(a),!a.defaultPrevented&&(o=!(a.detail.focusable||a.detail.contextmenu),t("closeOnInteractOutside")||a.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:o})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:P5(()=>Ns(t),{triggerElement:ks(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?UT(()=>[Ns(t),ks(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return ZT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?QT(()=>Ns(t),{initialFocus:()=>oT({root:Ns(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const o=(u=rw(n))!=null?u:ks(n);FT(o,()=>iw(n),me(B(B({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Wt(()=>{Object.assign(e.get("renderedElements"),{title:!!H8(t),description:!!z8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Wt(()=>{const n=oT({root:Ns(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,o;const n=(o=e.restoreFocus)!=null?o:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||Wt(()=>{const a=ks(t);a==null||a.focus({preventScroll:!0})})},invokeOnOpen({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!0})})},invokeOnClose({prop:e,flush:t}){t(()=>{var n;(n=e("onOpenChange"))==null||n({open:!1})})},toggleVisibility({event:e,send:t,prop:n}){t({type:n("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:e})}}}};ws()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[OH,hc]=So({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IH,hp]=So({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),V8=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec($8,o);return j8(a,Wh)},q8=e=>{const[t,u]=pT(e),l=u,{children:n}=l,r=mn(l,["children"]),o=V8(r),a=Kh(on({present:o.open},t));return _.jsx(q5,{value:o,children:_.jsx(dT,{value:a,children:n})})},ow=D.forwardRef((e,t)=>{const n=Xh(),r=Ja(),o=on(me(B({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return _.jsx(Pn.button,me(B({},o),{ref:t}))});ow.displayName="PopoverTrigger";function Y8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.854 3.646a.5.5 0 0 1 0 .708L8.207 8l3.647 3.646a.5.5 0 0 1-.708.708l-4-4a.5.5 0 0 1 0-.708l4-4a.5.5 0 0 1 .708 0M4.5 1a.5.5 0 0 0-.5.5v13a.5.5 0 0 0 1 0v-13a.5.5 0 0 0-.5-.5"},child:[]}]})(e)}function W8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.146 3.646a.5.5 0 0 0 0 .708L7.793 8l-3.647 3.646a.5.5 0 0 0 .708.708l4-4a.5.5 0 0 0 0-.708l-4-4a.5.5 0 0 0-.708 0M11.5 1a.5.5 0 0 1 .5.5v13a.5.5 0 0 1-1 0v-13a.5.5 0 0 1 .5-.5"},child:[]}]})(e)}function G8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function X8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function K8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function Q8(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function pp(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function sw(e){return ht({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const J8=({className:e,componentType:t,children:n})=>{const[r,o]=D.useState(!1),{globalClassName:a}=tt(),u=f=>{o(f.open)},l=D.useCallback(()=>{o(!1)},[]),d=D.useMemo(()=>({closeMenu:l}),[l]);return _.jsxs(q8,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[_.jsx(ow,{"aria-label":`Overflow menu for ${t}`,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:_.jsx(sw,{"aria-hidden":"true"})}),_.jsx(hT,{children:_.jsx(fT,{className:W(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:_.jsx(Ub.Provider,{value:d,children:n})})})]})};function aw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function uw(e){return ht({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M17.5858 5H14V3H21V10H19V6.41421L14.7071 10.7071L13.2929 9.29289L17.5858 5ZM3 14H5V17.5858L9.29289 13.2929L10.7071 14.7071L6.41421 19H10V21H3V14Z"},child:[]}]})(e)}const[Z8,ko]=So({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),lw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getControlProps(),e);return _.jsx(Pn.div,me(B(B({},r),e),{ref:t}))});lw.displayName="CarouselControl";const cw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["readOnly","index"]),o=ko(),a=on(o.getIndicatorProps(n),r);return _.jsx(Pn.button,me(B({},a),{ref:t}))});cw.displayName="CarouselIndicator";const dw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getIndicatorGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});dw.displayName="CarouselIndicatorGroup";const fw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["index","snapAlign"]),o=ko(),a=on(o.getItemProps(n),r);return _.jsx(Pn.div,me(B({},a),{ref:t}))});fw.displayName="CarouselItem";const hw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getItemGroupProps(),e);return _.jsx(Pn.div,me(B({},r),{ref:t}))});hw.displayName="CarouselItemGroup";const pw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getNextTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});pw.displayName="CarouselNextTrigger";const mw=D.forwardRef((e,t)=>{const n=ko(),r=on(n.getPrevTriggerProps(),e);return _.jsx(Pn.button,me(B({},r),{ref:t}))});mw.displayName="CarouselPrevTrigger";function eM(e){const t=Es(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),o=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function l(T,y){let w=parseFloat(T);return/%/.test(T)&&(w/=100,w*=y),Number.isNaN(w)?0:w}let d=l(r,n.width),f=l(o,n.height),p=l(a,n.width),m=l(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function tM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function gw(e){let t=[];for(const n of e.children)t=t.concat(n,gw(n));return t}function Ew(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?gw(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",l=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of o){const m=p.getBoundingClientRect();if(!tM(n,m,u))continue;const T=Es(p);let[y,w]=T.getPropertyValue("scroll-snap-align").split(" ");typeof w=="undefined"&&(w=y);const v=a==="x"?w:y,N=m[l]-n[l]+e[f];switch(v){case"none":break;case"start":r[a].start.push({node:p,position:N});break;case"center":r[a].center.push({node:p,position:N+m[d]/2});break;case"end":r[a].end.push({node:p,position:N+m[d]});break}}}return r}function yw(e){const t=e.getBoundingClientRect(),n=eM(e),r=Ew(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:bw([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(Tw(0,o.x))),y:bw([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(Tw(0,o.y)))}}function nM(e,t,n){const r=Ew(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var bw=e=>[...new Set(e)],Tw=(e,t)=>n=>Math.max(e,Math.min(t,n)),rM=vo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ci=rM.build(),iM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},oM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},pc=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},sM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},aM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},uM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},ww=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:indicator:${t}`},Hn=e=>e.getById(pc(e)),_w=e=>O5(Hn(e),"[data-part=item]"),lM=(e,t)=>e.getById(ww(e,t)),xw=e=>{const t=Hn(e);if(!t)return;const n=ys(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function cM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop:l}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=o("canScrollNext"),m=o("canScrollPrev"),T=o("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),w=r.get("page"),v=l("slidesPerPage"),N=l("padding"),x=l("translations");return{isPlaying:d,isDragging:f,page:w,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return w/y.length},scrollToIndex(C,A){a({type:"INDEX.SET",index:C,instant:A})},scrollTo(C,A){a({type:"PAGE.SET",index:C,instant:A})},scrollNext(C){a({type:"PAGE.NEXT",instant:C})},scrollPrev(C){a({type:"PAGE.PREV",instant:C})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(C){return Array.from(r.get("slidesInView")).includes(C)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(me(B({},ci.root.attrs),{id:iM(u),role:"region","aria-roledescription":"carousel","data-orientation":l("orientation"),dir:l("dir"),style:{"--slides-per-page":v,"--slide-spacing":l("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(me(B({},ci.itemGroup.attrs),{id:pc(u),"data-orientation":l("orientation"),"data-dragging":hs(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){ps(C.currentTarget,Tr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){ps(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!Jb(C))return;const A=Tr(C);Br(A)&&A!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:OL(C=>{const A=l("orientation")==="horizontal"?"deltaX":"deltaY";C[A]<0&&!o("canScrollPrev")||C[A]>0&&!o("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[T?"x":"y",l("snapType")].join(" "),gridAutoFlow:T?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[T?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[T?"scrollPaddingInline":"scrollPaddingBlock"]:N,[T?"paddingInline":"paddingBlock"]:N,[T?"overflowX":"overflowY"]:"auto"}}))},getItemProps(C){const A=r.get("slidesInView").includes(C.index);return t.element(me(B({},ci.item.attrs),{id:oM(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":hs(A),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":x.item(C.index,l("slideCount")),"aria-hidden":Yb(!A),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=C.snapAlign)!=null?ne:"start",Y=l("slidesPerMove"),R=Y==="auto"?Math.floor(l("slidesPerPage")):Y;return(C.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(me(B({},ci.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(me(B({},ci.prevTrigger.attrs),{id:aM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":x.prevTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(me(B({},ci.nextTrigger.attrs),{dir:l("dir"),id:sM(u),type:"button","aria-label":x.nextTrigger,"data-orientation":l("orientation"),"aria-controls":pc(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(me(B({},ci.indicatorGroup.attrs),{dir:l("dir"),id:uM(u),"data-orientation":l("orientation"),onKeyDown(C){if(C.defaultPrevented)return;const A="indicator",U={ArrowDown($){T||(a({type:"PAGE.NEXT",src:A}),$.preventDefault())},ArrowUp($){T||(a({type:"PAGE.PREV",src:A}),$.preventDefault())},ArrowRight($){T&&(a({type:"PAGE.NEXT",src:A}),$.preventDefault())},ArrowLeft($){T&&(a({type:"PAGE.PREV",src:A}),$.preventDefault())},Home($){a({type:"PAGE.SET",index:0,src:A}),$.preventDefault()},End($){a({type:"PAGE.SET",index:y.length-1,src:A}),$.preventDefault()}},Y=p5(C,{dir:l("dir"),orientation:l("orientation")}),R=U[Y];R==null||R(C)}}))},getIndicatorProps(C){return t.button(me(B({},ci.indicator.attrs),{dir:l("dir"),id:ww(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":hs(C.readOnly),"data-current":hs(C.index===w),"aria-label":x.indicator(C.index),onClick(A){A.defaultPrevented||C.readOnly||a({type:"PAGE.SET",index:C.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(me(B({},ci.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":hs(d),"aria-label":d?x.autoplayStop:x.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var dM={props({props:e}){return FL(e,["slideCount"],"carousel"),me(B({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:B({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:fM(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return TL(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:o}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{o({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{o({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Hn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Hn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),xw(e)});return xw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Hn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Wt(()=>{o(),Wt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Hn(e),o=e.getWin(),a=new o.IntersectionObserver(u=>{const l=u.reduce((d,f)=>{var T;const p=f.target,m=Number((T=p.dataset.index)!=null?T:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?mL(d,m):gL(d,m)},n.get("slidesInView"));n.set("slidesInView",EL(l))},{root:r,threshold:t("inViewThreshold")});return _w(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Hn(n);return r?rn(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return rn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return k5(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return rn(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:o}){var f;const a=t.instant?"instant":"smooth",u=Vb((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Hn(n);if(!l)return;const d=r("isHorizontal")?"left":"top";o(()=>{l.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Hn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=zb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=yL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Hn(r);if(!o)return;const a=nM(o,n("isHorizontal")?"x":"y",l=>l.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(l=>Math.abs(l-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=Vb(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Hn(n);if(!r)return;const o=yw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Hn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Hn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Hn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=yw(r),l=u.x.reduce((f,p)=>Math.abs(p-o)<Math.abs(f-o)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);Wt(()=>{r.scrollTo({left:l,top:d,behavior:"smooth"});const f=n("isHorizontal")?l:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=lM(n,e.get("page"));r&&Wt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function fM(e,t,n){if(e==null||n<=0)return[];const r=[],o=t==="auto"?Math.floor(n):t;if(o<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=o)r.push(a);return r}ws()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),ws()(["index","readOnly"]),ws()(["index","snapAlign"]);const hM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,dir:r,getRootNode:n},e),a=ec(dM,o);return cM(a,Wh)},Sw=D.forwardRef((e,t)=>{const[n,r]=Za()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=hM(n),a=on(o.getRootProps(),r);return _.jsx(Z8,{value:o,children:_.jsx(Pn.div,me(B({},a),{ref:t}))})});Sw.displayName="CarouselRoot";function pM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function mM(e){return ht({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}const gM=180,EM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},yM=({globalClassName:e,className:t,itemMinWidth:n=gM,spacing:r="0.5rem",loop:o=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:l=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:p="Product carousel",children:m})=>{const T=Array.from(m).map((V,ie)=>({node:V,key:D.isValidElement(V)&&V.key!=null?V.key:`carousel-item-${ie}`})),y=T.length,w=D.useRef(null),[v,N]=D.useState(0),{width:x}=yk();D.useLayoutEffect(()=>{w.current&&N(w.current.getBoundingClientRect().width)},[x,y]);const C=EM(r),A=n+C,U=v>0?(v+C)/A:1,Y=Math.max(1,Math.floor(U));if(y===0)return null;const R=y>Y,$=Math.ceil(y/Y),ne=R?Math.max(1,U):Y,de=d==="circle-arrow";return _.jsxs(Sw,{ref:w,className:W(e,t,`${z}-carousel`,{[`${z}-carousel--circle-arrow-navigation`]:de}),slidesPerPage:ne,slidesPerMove:Y,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[_.jsx(hw,{className:W(e,`${z}-carousel__item-group`,{"carousel-row-container":!R}),children:T.map(({node:V,key:ie},fe)=>_.jsx(fw,{index:fe,className:W(e,`${z}-carousel__item`),children:V},ie))}),l&&R&&_.jsxs(lw,{className:W(e,`${z}-carousel__control`),children:[_.jsx(mw,{className:W(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:de?_.jsx(pM,{"aria-hidden":"true",size:"16px"}):_.jsx(G8,{"aria-hidden":"true",size:"16px"})}),_.jsx(pw,{className:W(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:de?_.jsx(mM,{"aria-hidden":"true",size:"16px"}):_.jsx(X8,{"aria-hidden":"true",size:"16px"})})]}),u&&R&&_.jsx(dw,{className:W(e,`${z}-carousel__indicator-group`),children:Array.from({length:$},(V,ie)=>_.jsx(cw,{index:ie,className:W(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${ie+1}`},ie))})]})},[bM,TM]=So({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),wM=e=>Za()(e,["lazyMount","unmountOnExit"]),[_M,mc]=So({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),vw=D.forwardRef((e,t)=>{const n=mc(),r=TM(),o=Kh(me(B({},r),{present:n.open})),a=on(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:_.jsx(Pn.div,me(B({},a),{ref:tc(o.ref,t)}))});vw.displayName="DialogBackdrop";const mp=D.forwardRef((e,t)=>{const n=mc(),r=Ja(),o=on(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:_.jsx(Pn.div,me(B({},o),{ref:tc(r.ref,t)}))});mp.displayName="DialogContent";const gp=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getPositionerProps(),e);return Ja().unmounted?null:_.jsx(Pn.div,me(B({},r),{ref:t}))});gp.displayName="DialogPositioner";var xM=vo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),No=xM.build(),Aw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Cw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Ep=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},kw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},yp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},bp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Nw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},gc=e=>e.getById(Ep(e)),SM=e=>e.getById(Aw(e)),vM=e=>e.getById(Cw(e)),AM=e=>e.getById(kw(e)),CM=e=>e.getById(yp(e)),kM=e=>e.getById(bp(e)),NM=e=>e.getById(Nw(e));function PM(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,l=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(me(B({},No.trigger.attrs),{dir:a("dir"),id:kw(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ep(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(me(B({},No.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Cw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(me(B({},No.positioner.attrs),{dir:a("dir"),id:Aw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(me(B({},No.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Ep(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":l||void 0,"aria-labelledby":l||!f.title?void 0:yp(u),"aria-describedby":f.description?bp(u):void 0}))},getTitleProps(){return t.element(me(B({},No.title.attrs),{dir:a("dir"),id:yp(u)}))},getDescriptionProps(){return t.element(me(B({},No.description.attrs),{dir:a("dir"),id:bp(u)}))},getCloseTriggerProps(){return t.button(me(B({},No.closeTrigger.attrs),{dir:a("dir"),id:Nw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var OM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>NM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return B({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return GT(()=>gc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[AM(e)],onInteractOutside(o){var a;(a=n("onInteractOutside"))==null||a(o),n("closeOnInteractOutside")||o.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(o){var a;(a=n("onEscapeKeyDown"))==null||a(o),n("closeOnEscape")||o.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return ZT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?QT(()=>gc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var o,a;return(a=(o=t("finalFocusEl"))==null?void 0:o())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?UT(()=>[gc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Wt(()=>{e.set("rendered",{title:!!CM(t),description:!!kM(t)})})},syncZIndex({scope:e}){Wt(()=>{const t=gc(e);if(!t)return;const n=Es(t);[SM(e),vM(e)].forEach(o=>{o==null||o.style.setProperty("--z-index",n.zIndex),o==null||o.style.setProperty("--layer-index",n.getPropertyValue("--layer-index"))})})},invokeOnClose({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!1})},invokeOnOpen({prop:e}){var t;(t=e("onOpenChange"))==null||t({open:!0})},toggleVisibility({prop:e,send:t,event:n}){t({type:e("open")?"CONTROLLED.OPEN":"CONTROLLED.CLOSE",previousEvent:n})}}}};ws()(["aria-label","closeOnEscape","closeOnInteractOutside","dir","finalFocusEl","getRootNode","getRootNode","id","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","preventScroll","restoreFocus","role","trapFocus"]);const IM=e=>{const t=D.useId(),{getRootNode:n}=hc(),{dir:r}=hp(),o=B({id:t,getRootNode:n,dir:r},e),a=ec(OM,o);return PM(a,Wh)},Pw=e=>{const[t,l]=pT(e),d=l,{children:n}=d,r=mn(d,["children"]),[o]=wM(t),a=IM(r),u=Kh(on({present:a.open},t));return _.jsx(_M,{value:a,children:_.jsx(bM,{value:o,children:_.jsx(dT,{value:u,children:n})})})},Ow=D.forwardRef((e,t)=>{const n=mc(),r=on(n.getTitleProps(),e);return _.jsx(Pn.h2,me(B({},r),{ref:t}))});Ow.displayName="DialogTitle";const RM=({children:e})=>{const t=D.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=D.useState(!1),u=D.useMemo(()=>({toggleMenu:()=>a(d=>!d),closeMenu:()=>{var f;const d=document.getElementById(n);d!=null&&d.contains(document.activeElement)&&((f=document.getElementById(r))==null||f.focus({preventScroll:!0})),a(!1)}}),[n,r]),l=D.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return _.jsx(Rh.Provider,{value:u,children:_.jsx(Bb.Provider,{value:l,children:e})})},Iw=()=>D.useContext(Bb),Rw=()=>{const e=D.useContext(Rh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},LM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Iw(),{closeMenu:a}=Rw(),{globalClassName:u}=tt(),l=D.useRef(null);return D.useEffect(()=>{var m;if(!n)return;const d=l.current;(m=d==null?void 0:d.querySelector("button:not(:disabled)"))==null||m.focus();const f=T=>{T.key==="Escape"&&(T.preventDefault(),T.stopPropagation(),a())},p=T=>{var w;const y=T.target;(w=document.getElementById(o))!=null&&w.contains(y)||l.current&&!l.current.contains(y)&&a()};return d==null||d.addEventListener("keydown",f),document.addEventListener("mousedown",p),()=>{d==null||d.removeEventListener("keydown",f),document.removeEventListener("mousedown",p)}},[n,a,o]),n?_.jsx("div",{ref:l,id:r,role:"group","aria-label":"More options",className:W(`${z}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},DM=({componentType:e,className:t})=>{const{toggleMenu:n}=Rw(),{isOpen:r,panelId:o,triggerId:a}=Iw(),{globalClassName:u}=tt();return _.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:W(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:_.jsx(sw,{"aria-hidden":"true"})})},Tp=()=>{const{status:e,entryType:t}=Yn(),{messages:n}=Wn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},MM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=Yn(),o=wo(),a=()=>{yl(r||"dialog"),o()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:_.jsx(aw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(aw,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},FM=({componentType:e,globalClassName:t,controls:n,additionalControls:r,showClose:o,closeButtonAriaLabel:a,onClose:u,showOverflowMenu:l,showPrimaryToggle:d})=>{const f=e==="modal"?MM:Dw;return _.jsxs("div",{className:W(t,`${z}-${e}-controls`),children:[r,n!=null?_.jsxs(_.Fragment,{children:[n,o&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]}):_.jsxs(_.Fragment,{children:[l&&_.jsx(DM,{componentType:e}),d&&_.jsx(f,{componentType:e,isIcon:!0}),o&&_.jsx(Bf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]})]})},BM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=Yn(),o=wo(),a=()=>{kf(!r),o()},u=r?RN:LN,l="Toggle Fullscreen";return t?_.jsx(oi,{ariaLabel:l,title:l,className:W(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:_.jsx(u,{}),onClick:a}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[_.jsx(u,{"aria-hidden":"true"}),l]})},UM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=Yn(),o=wo(),a=r==="bottom-left",u=()=>{Nf(a?"bottom-right":"bottom-left"),o()},l=a?W8:Y8,d=a?"Move right":"Move left";return t?_.jsx(oi,{className:W(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:_.jsx(l,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[_.jsx(l,{"aria-hidden":"true"}),d]})},HM=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:o,showClearChat:a,showEndConversation:u,showDownloadTranscript:l,onClearChat:d,onEndConversation:f,onDownloadTranscript:p})=>{if(t!=null||!n)return null;const m=e==="modal"?BM:UM;return _.jsxs(LM,{componentType:e,children:[r&&_.jsx(m,{componentType:e}),o&&_.jsx(qM,{componentType:e}),a&&_.jsx(Hb,{componentType:e,onClearChat:d}),u&&f&&_.jsx(jM,{componentType:e,onEndConversation:f}),l&&p&&_.jsx(zM,{componentType:e,onDownloadTranscript:p})]})},Lw=({componentType:e,overflowActions:t,availableActions:n,controls:r,additionalControls:o,leading:a,title:u,onClearChat:l,onEndConversation:d,onClose:f,onDownloadTranscript:p})=>{const{headerConfig:m,globalClassName:T,themeVariants:y,themeVariables:w}=tt(),{mode:v}=Yn(),N=v==="standalone",x=e==="modal",C=we=>n===void 0||n[we],A=(we,re=!0)=>t.includes(we)&&C(we)&&re,U=C("toggleExpanded"),Y=A(x?"toggleFullscreen":"toggleDialogPosition"),R=A("minimize"),$=A("clearChat"),ne=C("close"),de=A("endConversation",!!d),V=A("downloadTranscript",!!p),ie=Y||R||$||de||V,fe=D.useMemo(()=>{if(!m)return{};const we=kN(m);if(!(w!=null&&w[`${rt}-header-text-font-size`]))return we;const re={"header-background-color":m.headerBackgroundColor,"header-text-color":m.headerTextColor,"header-text-font-size":m.headerTextFontSize,"header-text-font-weight":m.headerTextFontWeight,"header-text-font-family":m.headerTextFontFamily,"header-text-text-align":m.headerTextTextAlign};return Object.fromEntries(Object.entries(re).filter(([,oe])=>oe!=null&&oe!=="").map(([oe])=>[`${rt}-${oe}`,we[`${rt}-${oe}`]]))},[m,w]);return _.jsx(RM,{children:_.jsxs("div",{className:W(T,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[_.jsxs("div",{className:W(T,`${z}-${e}-header`,{standalone:N,embedded:!N}),style:fe,children:[a!=null?a:m!=null&&m.logoUrl?_.jsx("img",{alt:"",className:W(T,`${z}-${e}-logo`,{standalone:N,embedded:!N}),src:m.logoUrl}):(y==null?void 0:y.logoFallback)==="sparkle"?_.jsx("svg",{className:W(T,`${z}-${e}-logo`,{standalone:N,embedded:!N}),"aria-hidden":"true",viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:_.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:`var(${rt}-on-primary, #ffffff)`,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,_.jsx(Ow,{className:W(T,`${z}-${e}-title`,{standalone:N,embedded:!N}),children:u!=null?u:m==null?void 0:m.headerText}),_.jsx(FM,{componentType:e,globalClassName:T,controls:r,additionalControls:o,showClose:ne,closeButtonAriaLabel:m==null?void 0:m.closeButtonAriaLabel,onClose:f,showOverflowMenu:ie,showPrimaryToggle:U})]}),_.jsx(HM,{componentType:e,controls:r,showOverflowMenu:ie,showSecondaryToggle:Y,showMinimize:R,showClearChat:$,showEndConversation:de,showDownloadTranscript:V,onClearChat:l,onEndConversation:d,onDownloadTranscript:p})]})})},zM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=wo(),[o,a]=D.useState(!1),u=()=>et(null,null,function*(){if(!o){a(!0);try{yield e(),r()}catch(l){n==null||n.error("Error downloading transcript:",l)}finally{a(!1)}}});return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:o,children:[_.jsx(fL,{"aria-hidden":"true"}),"Download transcript"]})},jM=({onEndConversation:e,componentType:t})=>{const n=wo(),r=()=>{e(),n()};return _.jsxs("button",{className:W(`${z}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[_.jsx(DN,{"aria-hidden":"true"}),"End conversation"]})},$M={sparkle:pp,plus:K8,"paper-plane":Q8},wp=({icon:e,className:t})=>{const n=$M[e];return n?_.jsx(n,{className:t,"aria-hidden":"true"}):null},VM=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),l=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=o?"standalone":"embedded",p=w=>()=>{a(w)},m={"has-icon":!!l,"icon-right":!!l&&d==="right"},T=w=>_.jsxs(_.Fragment,{children:[l&&_.jsx(wp,{icon:l,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:w})]});return _.jsx("div",{className:W(t,`${z}-suggestion-container ${f}`,e),children:n.map(w=>o?_.jsx(wl,{disabled:r,className:W(t,`${z}-suggestion-button standalone`,m),onClick:p(w),children:T(w)},w):_.jsx("button",{disabled:r,className:W(t,`${z}-suggestion-button embedded`,m),onClick:p(w),children:T(w)},w))})},qM=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const o=()=>{ri(!1),wa(!0),Ff()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:o,icon:_.jsx(rE,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(rE,{"aria-hidden":"true"}),"Minimize"]})},Dw=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=wo(),o=()=>{yl("modal"),r()};return t?_.jsx(oi,{className:W(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:_.jsx(uw,{})}):_.jsxs("button",{className:W(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[_.jsx(uw,{"aria-hidden":"true"}),"Show modal"]})},YM=({isWidgetStandalone:e})=>{var N,x;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=tt(),{askCimPrompts:l,messages:d}=Wn(),{isLoading:f,handleAskCim:p}=Rr(),m=o==null?void 0:o.icon,T=(N=o==null?void 0:o.iconPosition)!=null?N:"left",y=D.useMemo(()=>{const C=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return d.some(U=>U.name==="conversation_reset")&&r||C},[d,n,r]),w=D.useMemo(()=>{var A,U;const C=((U=(A=l.message)==null?void 0:A.suggestions)!=null?U:[]).map(Y=>Y.displayText.trim()).filter(Boolean);return W0(C,a||[],u)},[(x=l.message)==null?void 0:x.suggestions,a,u]),v=C=>()=>{p({userPrompt:C})};return _.jsxs("div",{className:W(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[_.jsx("p",{className:W(t,`${z}-ask-cim-entry-text`),children:y}),!!(w!=null&&w.length)&&_.jsx("div",{className:W(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:w.map(C=>_.jsxs(wl,{disabled:f,className:W(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!m,"icon-right":!!m&&T==="right"}),onClick:v(C),children:[m&&_.jsx(wp,{icon:m,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:C})]},C))})]})};function WM(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function GM(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function _p({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!WM(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!GM(o)||r(o,e)}const XM=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=tt();if(!n)return null;const u=n.getName(t),l=n.getBrand(t),d=n.getPriceDisplay(t),f=n.getRelativePdp(t),p=n.getPdp(t),m=n.getImage(t),T=f&&typeof f=="string"?new URL(f,window.location.origin).href:p,y=w=>_p({event:w,href:`${T}`,openLinksInNewTab:o,onNavigate:a});return _.jsxs("div",{className:W(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[T?_.jsx("a",{href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${u}`,onClick:y,children:_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"})}):_.jsx("img",{className:W(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${u}`,loading:"lazy"}),_.jsxs("div",{className:W(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[_.jsxs("div",{className:W(r,`${z}-product-tile-content`),children:[l&&_.jsx("p",{className:`${z}-product-tile-brand`,children:l}),T?_.jsxs("a",{"aria-label":`Go to product page for ${u}`,className:W(r,`${z}-product-tile-pdp`),href:`${T}`,target:o?"_blank":"_self",rel:"noopener noreferrer",onClick:y,children:[u," ",_.jsx("span",{className:W(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):_.jsx("p",{className:W(r,`${z}-product-tile-name`),title:u,children:u})]}),_.jsx("div",{className:W(r,`${z}-product-tile-footer`),children:_.jsx("p",{className:W(r,`${z}-product-tile-price`),children:d})})]})]})},KM=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=tt(),u=t;return n?_.jsxs("div",{className:W(r,`${z}-display-products`),children:[_.jsx("p",{children:u.message}),u.products&&u.products.length>0&&_.jsx(yM,{globalClassName:r,spacing:(l=a==null?void 0:a.carouselGap)!=null?l:"0.5rem",navigationVariant:o==null?void 0:o.carousel,ariaLabel:"Recommended products",children:u.products.map(d=>{const f=n.getPid(d);return _.jsx(XM,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},QM=({globalClassName:e,message:t,isWidgetStandalone:n})=>_.jsx("div",{className:W(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:_.jsxs("p",{className:W(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[_.jsx(PN,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),JM=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Rr(),{messages:u}=Wn(),l=u.find(v=>v.id===n.eventSourceId),d=!!l,f=((w=l==null?void 0:l.name)==null?void 0:w.replace("_suggestions",""))||"",p=d?Hv(f):null,T=a||!d||!(d&&(p===t||t==="ask_cim")),y=v=>{const N=n.suggestions.find(x=>x.displayText===v);N&&o(N,n.eventSourceId||n.id)};return _.jsxs("div",{className:W(e,`${z}-follow-up`),children:[_.jsx("p",{className:W(e,`${z}-text`),children:n.message}),_.jsx(VM,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Mw(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,o=n.indexOf(t);for(;o!==-1;)r++,o=n.indexOf(t,o+t.length);return r}function ZM(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function eF(e,t,n){const o=Il((n||{}).ignore||[]),a=tF(t);let u=-1;for(;++u<a.length;)Ey(e,"text",l);function l(f,p){let m=-1,T;for(;++m<p.length;){const y=p[m],w=T?T.children:void 0;if(o(y,w?w.indexOf(y):void 0,T))return;T=y}if(T)return d(f,p)}function d(f,p){const m=p[p.length-1],T=a[u][0],y=a[u][1];let w=0;const N=m.children.indexOf(f);let x=!1,C=[];T.lastIndex=0;let A=T.exec(f.value);for(;A;){const U=A.index,Y={index:A.index,input:A.input,stack:[...p,f]};let R=y(...A,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?T.lastIndex=U+1:(w!==U&&C.push({type:"text",value:f.value.slice(w,U)}),Array.isArray(R)?C.push(...R):R&&C.push(R),w=U+A[0].length,x=!0),!T.global)break;A=T.exec(f.value)}return x?(w<f.value.length&&C.push({type:"text",value:f.value.slice(w)}),m.children.splice(N,1,...C)):C=[f],N+C.length}}function tF(e){const t=[];if(!Array.isArray(e))throw new TypeError("Expected find and replace tuple or list of tuples");const n=!e[0]||Array.isArray(e[0])?e:[e];let r=-1;for(;++r<n.length;){const o=n[r];t.push([nF(o[0]),rF(o[1])])}return t}function nF(e){return typeof e=="string"?new RegExp(ZM(e),"g"):e}function rF(e){return typeof e=="function"?e:function(){return e}}const xp="phrasing",Sp=["autolink","link","image","label"];function iF(){return{transforms:[dF],enter:{literalAutolink:sF,literalAutolinkEmail:vp,literalAutolinkHttp:vp,literalAutolinkWww:vp},exit:{literalAutolink:cF,literalAutolinkEmail:lF,literalAutolinkHttp:aF,literalAutolinkWww:uF}}}function oF(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:xp,notInConstruct:Sp},{character:":",before:"[ps]",after:"\\/",inConstruct:xp,notInConstruct:Sp}]}}function sF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function vp(e){this.config.enter.autolinkProtocol.call(this,e)}function aF(e){this.config.exit.autolinkProtocol.call(this,e)}function uF(e){this.config.exit.data.call(this,e);const t=this.stack[this.stack.length-1];t.type,t.url="http://"+this.sliceSerialize(e)}function lF(e){this.config.exit.autolinkEmail.call(this,e)}function cF(e){this.exit(e)}function dF(e){eF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,fF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),hF]],{ignore:["link","linkReference"]})}function fF(e,t,n,r,o){let a="";if(!Fw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!pF(n)))return!1;const u=mF(n+r);if(!u[0])return!1;const l={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[l,{type:"text",value:u[1]}]:l}function hF(e,t,n,r){return!Fw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function pF(e){const t=e.split(".");return!(t.length<2||t[t.length-1]&&(/_/.test(t[t.length-1])||!/[a-zA-Z\d]/.test(t[t.length-1]))||t[t.length-2]&&(/_/.test(t[t.length-2])||!/[a-zA-Z\d]/.test(t[t.length-2])))}function mF(e){const t=/[!"&'),.:;<>?\]}]+$/.exec(e);if(!t)return[e,void 0];e=e.slice(0,t.index);let n=t[0],r=n.indexOf(")");const o=Mw(e,"(");let a=Mw(e,")");for(;r!==-1&&o>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function Fw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||po(n)||vl(n))&&(!t||n!==47)}Bw.peek=SF;function gF(){this.buffer()}function EF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function yF(){this.buffer()}function bF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function TF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function wF(e){this.exit(e)}function _F(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=yr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function xF(e){this.exit(e)}function SF(){return"["}function Bw(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),l=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),l(),u(),a+=o.move("]"),a}function vF(){return{enter:{gfmFootnoteCallString:gF,gfmFootnoteCall:EF,gfmFootnoteDefinitionLabelString:yF,gfmFootnoteDefinition:bF},exit:{gfmFootnoteCallString:TF,gfmFootnoteCall:wF,gfmFootnoteDefinitionLabelString:_F,gfmFootnoteDefinition:xF}}}function AF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Bw},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const l=a.createTracker(u);let d=l.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=l.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=l.move("]:"),r.children&&r.children.length>0&&(l.shift(4),d+=l.move((t?`
|
|
32
|
-
`:" ")+a.indentLines(a.containerFlow(r,l.current()),t?
|
|
33
|
-
`)}function
|
|
34
|
-
`&&
|
|
35
|
-
`}function
|
|
29
|
+
`}),n}function Ny(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function Oy(e,t){const n=wI(e,t),r=n.one(e,void 0),o=dI(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 AI(e,t){return e&&"run"in e?function(n,r){return Ze(this,null,function*(){const o=Oy(n,M({file:r},t));yield e.run(o,r)})}:function(n,r){return Oy(n,M({file:r},e||t))}}function Iy(e){if(e)throw e}var xh,Ry;function CI(){if(Ry)return xh;Ry=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 kI=CI();const _h=Ke(kI);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 PI(){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?NI(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 NI(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 Qr={basename:OI,dirname:II,extname:RI,join:LI,sep:"/"};function OI(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');Qa(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 II(e){if(Qa(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 RI(e){Qa(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 LI(...e){let t=-1,n;for(;++t<e.length;)Qa(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":DI(n)}function DI(e){Qa(e);const t=e.codePointAt(0)===47;let n=MI(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function MI(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 Qa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const FI={cwd:BI};function BI(){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 UI(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 HI(e)}function HI(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 Ly{constructor(t){let n;t?vh(t)?n={path:t}:typeof t=="string"||zI(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":FI.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"?Qr.basename(this.path):void 0}set basename(t){kh(t,"basename"),Ch(t,"basename"),this.path=Qr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Qr.dirname(this.path):void 0}set dirname(t){Dy(this.basename,"dirname"),this.path=Qr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Qr.extname(this.path):void 0}set extname(t){if(Ch(t,"extname"),Dy(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=Qr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){vh(t)&&(t=UI(t)),kh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Qr.basename(this.path,this.extname):void 0}set stem(t){kh(t,"stem"),Ch(t,"stem"),this.path=Qr.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(Qr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Qr.sep+"`")}function kh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function Dy(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function zI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jI=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),$I={}.hasOwnProperty;class Ph extends jI{constructor(){super("copy"),this.Compiler=void 0,this.Parser=void 0,this.attachers=[],this.compiler=void 0,this.freezeIndex=-1,this.frozen=void 0,this.namespace={},this.parser=void 0,this.transformers=PI()}copy(){const t=new 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):$I.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=Wl(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=Wl(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);YI(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),Fy("processSync","process",n),r;function o(a,u){n=!0,Iy(a),r=u}}run(t,n,r){My(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=Wl(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),Fy("runSync","run",r),o;function a(u,l){Iy(u),o=l,r=!0}}stringify(t,n){this.freeze();const r=Wl(n),o=this.compiler||this.Compiler;return Oh("stringify",o),My(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 VI=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 My(e){if(!Sh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function Fy(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Wl(e){return qI(e)?e:new Ly(e)}function qI(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function YI(e){return typeof e=="string"||WI(e)}function WI(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const GI="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",By=[],Uy={allowDangerousHtml:!0},XI=/^(https?|ircs?|mailto|xmpp)$/i,KI=[{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 Hy(e){const t=QI(e),n=JI(e);return ZI(t.runSync(t.parse(n),n),e)}function QI(e){const t=e.rehypePlugins||By,n=e.remarkPlugins||By,r=e.remarkRehypeOptions?M(M({},e.remarkRehypeOptions),Uy):Uy;return VI().use(NO).use(n).use(AI,r).use(t)}function JI(e){const t=e.children||"",n=new Ly;return typeof t=="string"&&(n.value=t),n}function ZI(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,l=t.unwrapDisallowed,d=t.urlTransform||zy;for(const p of KI)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+GI+p.id,void 0);return Yl(e,f),xN(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 zy(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||XI.test(e.slice(0,t))?e:""}const jy=/[#.]/g;function eR(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){jy.lastIndex=o;const l=jy.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 $y(e,t,n){const r=n?iR(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=eR(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,tR(u))l.unshift(u);else for(const[m,T]of Object.entries(u))nR(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 tR(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 nR(e,t,n,r){const o=Ll(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=OE(r):o.commaSeparated?a=yE(r):o.commaOrSpaceSeparated?a=OE(yE(r).join(" ")):a=Vy(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?rR(r):String(r);if(Array.isArray(a)){const u=[];for(const l of a)u.push(Vy(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 Vy(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ha(n)===Ha(t)))return!0}return n}function rR(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function iR(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const oR=["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"],sR=$y(za,"div"),aR=$y(Hi,"g",oR);function uR(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=qy(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=qy(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 qy(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 Ro={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/"},Yy={}.hasOwnProperty,lR=Object.prototype;function cR(e,t){const n=t||{};return Lh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Hi:za,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},Gl(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:Wy(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=uR(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"},Gl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Gl(e,r,n),n}default:return n=dR(e,t),n}}function Wy(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Lh(e,t[n]);r.push(o)}return r}function dR(e,t){const n=e.schema;e.schema=t.namespaceURI===Ro.svg?Hi:za;let r=-1;const o={};for(;++r<t.attrs.length;){const l=t.attrs[r],d=(l.prefix?l.prefix+":":"")+l.name;Yy.call(lR,d)||(o[d]=l.value)}const u=(e.schema.space==="svg"?aR:sR)(t.tagName,o,Wy(e,t.childNodes));if(Gl(e,t,u),u.tagName==="template"){const l=t,d=l.sourceCodeLocation,f=d&&d.startTag&&_s(d.startTag),p=d&&d.endTag&&_s(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 Gl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=fR(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function fR(e,t,n){const r=_s(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)Yy.call(n.attrs,u)&&(a[Ll(e.schema,u).property]=_s(n.attrs[u]));n.startTag;const l=_s(n.startTag),d=n.endTag?_s(n.endTag):void 0,f={opening:l};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function _s(e){const t=Gy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Gy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Gy(e){return e.line&&e.column?e:void 0}const Xy={}.hasOwnProperty;function Ky(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const l=r.handlers;if(o&&Xy.call(o,e)){const d=String(o[e]);u=Xy.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 hR={},pR={}.hasOwnProperty,Qy=Ky("type",{handlers:{root:gR,element:wR,text:bR,comment:TR,doctype:yR}});function mR(e,t){const r=(t||hR).space;return Qy(e,r==="svg"?Hi:za)}function gR(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Dh(e.children,n,t),Ss(e,n),n}function ER(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Dh(e.children,n,t),Ss(e,n),n}function yR(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ss(e,t),t}function bR(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ss(e,t),t}function TR(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ss(e,t),t}function wR(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Hi);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&pR.call(e.properties,a)){const d=xR(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,l={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Ro[u],childNodes:[],parentNode:null};return l.childNodes=Dh(e.children,l,r),Ss(e,l),e.tagName==="template"&&e.content&&(l.content=ER(e.content,r)),l}function xR(e,t,n){const r=Ll(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?bE(n):IE(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=Ro[r.space]}return o}function Dh(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=Qy(e[r],n);a.parentNode=t,o.push(a)}return o}function Ss(e,t){const n=e.position;n&&n.start&&n.end&&(n.start.offset,n.end.offset,t.sourceCodeLocation={startLine:n.start.line,startCol:n.start.column,startOffset:n.start.offset,endLine:n.end.line,endCol:n.end.column,endOffset:n.end.offset})}const _R=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],SR=new Set([65534,65535,131070,131071,196606,196607,262142,262143,327678,327679,393214,393215,458750,458751,524286,524287,589822,589823,655358,655359,720894,720895,786430,786431,851966,851967,917502,917503,983038,983039,1048574,1048575,1114110,1114111]),At="�";var 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 Kn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Jy(e){return e>=55296&&e<=57343}function vR(e){return e>=56320&&e<=57343}function AR(e,t){return(e-55296)*1024+9216+t}function Zy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function eb(e){return e>=64976&&e<=65007||SR.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 CR=65536;class kR{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=CR,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(vR(n))return this.pos++,this._addGap(),AR(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,Jy(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){Zy(t)?this._err(ne.controlCharacterInInputStream):eb(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 tb(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 PR=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),NR=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 OR(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=NR.get(e))!==null&&t!==void 0?t:e}var sn;(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"})(sn||(sn={}));const IR=32;var $i;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})($i||($i={}));function Mh(e){return e>=sn.ZERO&&e<=sn.NINE}function RR(e){return e>=sn.UPPER_A&&e<=sn.UPPER_F||e>=sn.LOWER_A&&e<=sn.LOWER_F}function LR(e){return e>=sn.UPPER_A&&e<=sn.UPPER_Z||e>=sn.LOWER_A&&e<=sn.LOWER_Z||Mh(e)}function DR(e){return e===sn.EQUALS||LR(e)}var an;(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"})(an||(an={}));var wi;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(wi||(wi={}));class MR{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=an.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=wi.Strict}startEntity(t){this.decodeMode=t,this.state=an.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case an.EntityStart:return t.charCodeAt(n)===sn.NUM?(this.state=an.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=an.NamedEntity,this.stateNamedEntity(t,n));case an.NumericStart:return this.stateNumericStart(t,n);case an.NumericDecimal:return this.stateNumericDecimal(t,n);case an.NumericHex:return this.stateNumericHex(t,n);case an.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|IR)===sn.LOWER_X?(this.state=an.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=an.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)||RR(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===sn.SEMI)this.consumed+=1;else if(this.decodeMode===wi.Strict)return 0;return this.emitCodePoint(OR(this.result),this.consumed),this.errors&&(t!==sn.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&$i.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=FR(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===wi.Attribute&&(a===0||DR(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&$i.VALUE_LENGTH)>>14,a!==0){if(u===sn.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==wi.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]&$i.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]&~$i.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case an.NamedEntity:return this.result!==0&&(this.decodeMode!==wi.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case an.NumericDecimal:return this.emitNumericEntity(0,2);case an.NumericHex:return this.emitNumericEntity(0,3);case an.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case an.EntityStart:return 0}}}function FR(e,t,n,r){const o=(t&$i.BRANCH_LENGTH)>>7,a=t&$i.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,l=u+o-1;for(;u<=l;){const d=u+l>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)l=d-1;else return e[d+o]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var Lo;(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"})(Lo||(Lo={}));var br;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(br||(br={}));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 BR=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 vs(e){var t;return(t=BR.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const pe=g,UR={[le.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]),[le.MATHML]:new Set([pe.MI,pe.MO,pe.MN,pe.MS,pe.MTEXT,pe.ANNOTATION_XML]),[le.SVG]:new Set([pe.TITLE,pe.FOREIGN_OBJECT,pe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.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 jt={DATA:R.DATA,RCDATA:R.RCDATA,RAWTEXT:R.RAWTEXT,SCRIPT_DATA:R.SCRIPT_DATA,PLAINTEXT:R.PLAINTEXT,CDATA_SECTION:R.CDATA_SECTION};function HR(e){return e>=N.DIGIT_0&&e<=N.DIGIT_9}function Ja(e){return e>=N.LATIN_CAPITAL_A&&e<=N.LATIN_CAPITAL_Z}function zR(e){return e>=N.LATIN_SMALL_A&&e<=N.LATIN_SMALL_Z}function Vi(e){return zR(e)||Ja(e)}function nb(e){return Vi(e)||HR(e)}function Xl(e){return e+32}function rb(e){return e===N.SPACE||e===N.LINE_FEED||e===N.TABULATION||e===N.FORM_FEED}function ib(e){return rb(e)||e===N.SOLIDUS||e===N.GREATER_THAN_SIGN}function jR(e){return e===N.NULL?ne.nullCharacterReference:e>1114111?ne.characterReferenceOutsideUnicodeRange:Jy(e)?ne.surrogateCharacterReference:eb(e)?ne.noncharacterCharacterReference:Zy(e)||e===N.CARRIAGE_RETURN?ne.controlCharacterReference:null}class $R{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 kR(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new MR(PR,(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=jR(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(tb(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=vs(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=rb(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()?wi.Attribute:wi.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(At);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(At);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(At);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case N.NULL:{this._err(ne.unexpectedNullCharacter),this._emitChars(At);break}case N.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Vi(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(Vi(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+=At;break}case N.EOF:{this._err(ne.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Ja(t)?Xl(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){Vi(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){Vi(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){Vi(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(At);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(At);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(At);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:Vi(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){Vi(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(Kn.SCRIPT,!1)&&ib(this.preprocessor.peek(Kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Kn.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(At);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(At);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(At);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(Kn.SCRIPT,!1)&&ib(this.preprocessor.peek(Kn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Kn.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+=At;break}default:this.currentAttr.name+=String.fromCodePoint(Ja(t)?Xl(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+=At;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+=At;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+=At;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+=At;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Kn.DASH_DASH,!0)?(this._createCommentToken(Kn.DASH_DASH.length+1),this.state=R.COMMENT_START):this._consumeSequenceIfMatch(Kn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Kn.DOCTYPE.length+1),this.state=R.DOCTYPE):this._consumeSequenceIfMatch(Kn.CDATA_START,!0)?this.inForeignNode?this.state=R.CDATA_SECTION:(this._err(ne.cdataInHtmlContent),this._createCommentToken(Kn.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+=At;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(Ja(t))this._createDoctypeToken(String.fromCharCode(Xl(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(At),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+=At;break}case N.EOF:{this._err(ne.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Ja(t)?Xl(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(Kn.PUBLIC,!1)?this.state=R.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Kn.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+=At;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+=At;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+=At;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+=At;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()&&nb(this.preprocessor.peek(1))?R.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){nb(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===N.SEMICOLON&&this._err(ne.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const ob=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),sb=new Set([...ob,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Kl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),VR=new Set([...Kl,g.OL,g.UL]),qR=new Set([...Kl,g.BUTTON]),ab=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),ub=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),YR=new Set([g.TR,g.TEMPLATE,g.HTML]),WR=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),GR=new Set([g.TABLE,g.TEMPLATE,g.HTML]),XR=new Set([g.TD,g.TH]);class KR{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const o=this._indexOf(t)+1;this.items.splice(o,0,n),this.tagIDs.splice(o,0,r),this.stackTop++,o===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,o===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(Fh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(XR,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(GR,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(WR,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(YR,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const o=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case le.SVG:{if(ub.has(o))return!1;break}case le.MATHML:{if(ab.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Kl)}hasInListItemScope(t){return this.hasInDynamicScope(t,VR)}hasInButtonScope(t){return this.hasInDynamicScope(t,qR)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(Fh.has(n))return!0;if(Kl.has(n))return!1;break}case le.SVG:{if(ub.has(n))return!1;break}case le.MATHML:{if(ab.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&ob.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&sb.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&sb.has(this.currentTagId);)this.pop()}}const Bh=3;var Jr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Jr||(Jr={}));const lb={type:Jr.Marker};class QR{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===Jr.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(lb)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Jr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Jr.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(lb);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Jr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Jr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Jr.Element&&n.element===t)}}const qi={createDocument(){return{nodeName:"#document",mode:br.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};qi.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(qi.isTextNode(n)){n.value+=t;return}}qi.appendChild(e,qi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&qi.isTextNode(r)?r.value+=t:qi.insertBefore(e,qi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=M(M({},e.sourceCodeLocation),t)}},cb="html",JR="about:legacy-compat",ZR="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",db=["+//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//"],e6=[...db,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],t6=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),fb=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],n6=[...fb,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function hb(e,t){return t.some(n=>e.startsWith(n))}function r6(e){return e.name===cb&&e.publicId===null&&(e.systemId===null||e.systemId===JR)}function i6(e){if(e.name!==cb)return br.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===ZR)return br.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),t6.has(n))return br.QUIRKS;let r=t===null?e6:db;if(hb(n,r))return br.QUIRKS;if(r=t===null?fb:n6,hb(n,r))return br.LIMITED_QUIRKS}return br.NO_QUIRKS}const pb={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},o6="definitionurl",s6="definitionURL",a6=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])),u6=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),l6=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])),c6=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 d6(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Lo.COLOR||r===Lo.SIZE||r===Lo.FACE)||c6.has(t)}function mb(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===o6){e.attrs[t].name=s6;break}}function gb(e){for(let t=0;t<e.attrs.length;t++){const n=a6.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=u6.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 f6(e){const t=l6.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=vs(e.tagName))}function h6(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function p6(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Lo.ENCODING){const o=n[r].value.toLowerCase();return o===pb.TEXT_HTML||o===pb.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function m6(e,t,n,r){return(!r||r===le.HTML)&&p6(e,t,n)||(!r||r===le.MATHML)&&h6(e,t)}const g6="hidden",E6=8,y6=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 b6={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Eb=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),yb={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:qi,onParseError:null};class bb{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=M(M({},yb),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 $R(this.options,this),this.activeFormattingElements=new QR(this.treeAdapter),this.fragmentContextID=r?vs(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new KR(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=M(M({},yb),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const o=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(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:b6,u={code:n,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:r?a.startLine:a.endLine,endCol:r?a.startCol:a.endCol,endOffset:r?a.startOffset:a.endOffset};this.onParseError(u)}onItemPush(t,n,r){var o,a;(a=(o=this.treeAdapter).onItemPush)===null||a===void 0||a.call(o,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,o;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(o=(r=this.treeAdapter).onItemPop)===null||o===void 0||o.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=B.TEXT}switchToPlaintextParsing(){this.insertionMode=B.TEXT,this.originalInsertionMode=B.IN_BODY,this.tokenizer.state=jt.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=jt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=jt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=jt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=jt.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(M({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const o=this.treeAdapter.getChildNodes(n),a=r?o.lastIndexOf(r):o.length,u=o[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:p}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:p})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}_adoptNodes(t,n){for(let r=this.treeAdapter.getFirstChild(t);r;r=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(r),this.treeAdapter.appendChild(n,r)}_setEndLocation(t,n){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&n.location){const r=n.location,o=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&o===n.tagName?{endTag:M({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case 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 m6(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Jr.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 Eb.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return UR[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){X4(this,t);return}switch(this.insertionMode){case B.INITIAL:{Za(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{iu(this,t);break}case B.IN_BODY:case B.IN_CAPTION:case B.IN_CELL:case B.IN_TEMPLATE:{wb(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:{Pb(this,t);break}case B.IN_COLUMN_GROUP:{Zl(this,t);break}case B.AFTER_BODY:{nc(this,t);break}case B.AFTER_AFTER_BODY:{rc(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){G4(this,t);return}switch(this.insertionMode){case B.INITIAL:{Za(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{iu(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:{Zl(this,t);break}case B.AFTER_BODY:{nc(this,t);break}case B.AFTER_AFTER_BODY:{rc(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:{au(this,t);break}case B.AFTER_BODY:{A6(this,t);break}case B.AFTER_AFTER_BODY:case B.AFTER_AFTER_FRAMESET:{C6(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case B.INITIAL:{k6(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:{au(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)?K4(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Za(this,t);break}case B.BEFORE_HTML:{P6(this,t);break}case B.BEFORE_HEAD:{O6(this,t);break}case B.IN_HEAD:{Rr(this,t);break}case B.IN_HEAD_NO_SCRIPT:{L6(this,t);break}case B.AFTER_HEAD:{M6(this,t);break}case B.IN_BODY:{An(this,t);break}case B.IN_TABLE:{As(this,t);break}case B.IN_TABLE_TEXT:{au(this,t);break}case B.IN_CAPTION:{I4(this,t);break}case B.IN_COLUMN_GROUP:{Vh(this,t);break}case B.IN_TABLE_BODY:{ec(this,t);break}case B.IN_ROW:{tc(this,t);break}case B.IN_CELL:{D4(this,t);break}case B.IN_SELECT:{Ib(this,t);break}case B.IN_SELECT_IN_TABLE:{F4(this,t);break}case B.IN_TEMPLATE:{U4(this,t);break}case B.AFTER_BODY:{z4(this,t);break}case B.IN_FRAMESET:{j4(this,t);break}case B.AFTER_FRAMESET:{V4(this,t);break}case B.AFTER_AFTER_BODY:{Y4(this,t);break}case B.AFTER_AFTER_FRAMESET:{W4(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?Q4(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case B.INITIAL:{Za(this,t);break}case B.BEFORE_HTML:{N6(this,t);break}case B.BEFORE_HEAD:{I6(this,t);break}case B.IN_HEAD:{R6(this,t);break}case B.IN_HEAD_NO_SCRIPT:{D6(this,t);break}case B.AFTER_HEAD:{F6(this,t);break}case B.IN_BODY:{Jl(this,t);break}case B.TEXT:{x4(this,t);break}case B.IN_TABLE:{ou(this,t);break}case B.IN_TABLE_TEXT:{au(this,t);break}case B.IN_CAPTION:{R4(this,t);break}case B.IN_COLUMN_GROUP:{L4(this,t);break}case B.IN_TABLE_BODY:{qh(this,t);break}case B.IN_ROW:{Ob(this,t);break}case B.IN_CELL:{M4(this,t);break}case B.IN_SELECT:{Rb(this,t);break}case B.IN_SELECT_IN_TABLE:{B4(this,t);break}case B.IN_TEMPLATE:{H4(this,t);break}case B.AFTER_BODY:{Db(this,t);break}case B.IN_FRAMESET:{$4(this,t);break}case B.AFTER_FRAMESET:{q4(this,t);break}case B.AFTER_AFTER_BODY:{rc(this,t);break}}}onEof(t){switch(this.insertionMode){case B.INITIAL:{Za(this,t);break}case B.BEFORE_HTML:{eu(this,t);break}case B.BEFORE_HEAD:{tu(this,t);break}case B.IN_HEAD:{nu(this,t);break}case B.IN_HEAD_NO_SCRIPT:{ru(this,t);break}case B.AFTER_HEAD:{iu(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:{Cb(this,t);break}case B.TEXT:{_4(this,t);break}case B.IN_TABLE_TEXT:{au(this,t);break}case B.IN_TEMPLATE:{Lb(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:{Tb(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:{kb(this,t);break}}}}function T6(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):Ab(e,t),n}function w6(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 x6(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>=y6;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(u)):(u=_6(e,l),r===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function _6(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 S6(e,t,n){const r=e.treeAdapter.getTagName(t),o=vs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function v6(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<E6;n++){const r=T6(e,t);if(!r)break;const o=w6(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=x6(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&S6(e,u,a),v6(e,o,r)}}function zh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function A6(e,t){e._appendCommentNode(t,e.openElements.items[0])}function C6(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 k6(e,t){e._setDocumentType(t);const n=t.forceQuirks?br.QUIRKS:i6(t);r6(t)||e._err(t,ne.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=B.BEFORE_HTML}function Za(e,t){e._err(t,ne.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,br.QUIRKS),e.insertionMode=B.BEFORE_HTML,e._processToken(t)}function P6(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=B.BEFORE_HEAD):eu(e,t)}function N6(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&eu(e,t)}function eu(e,t){e._insertFakeRootElement(),e.insertionMode=B.BEFORE_HEAD,e._processToken(t)}function O6(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD;break}default:tu(e,t)}}function I6(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?tu(e,t):e._err(t,ne.endTagWithoutMatchingOpenElement)}function tu(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=B.IN_HEAD,e._processToken(t)}function Rr(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,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,jt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,jt.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=B.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,jt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,jt.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:nu(e,t)}}function R6(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:{nu(e,t);break}case g.TEMPLATE:{Do(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function Do(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 nu(e,t){e.openElements.pop(),e.insertionMode=B.AFTER_HEAD,e._processToken(t)}function L6(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:{Rr(e,t);break}case g.NOSCRIPT:{e._err(t,ne.nestedNoscriptInHead);break}default:ru(e,t)}}function D6(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=B.IN_HEAD;break}case g.BR:{ru(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function ru(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 M6(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=B.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.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),Rr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,ne.misplacedStartTagForHeadElement);break}default:iu(e,t)}}function F6(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{iu(e,t);break}case g.TEMPLATE:{Do(e,t);break}default:e._err(t,ne.endTagWithoutMatchingOpenElement)}}function iu(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=B.IN_BODY,Ql(e,t)}function Ql(e,t){switch(t.type){case Xe.CHARACTER:{wb(e,t);break}case Xe.WHITESPACE_CHARACTER:{Tb(e,t);break}case Xe.COMMENT:{zh(e,t);break}case Xe.START_TAG:{An(e,t);break}case Xe.END_TAG:{Jl(e,t);break}case Xe.EOF:{Cb(e,t);break}}}function Tb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function wb(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function B6(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function U6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function H6(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=B.IN_FRAMESET)}function z6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function j6(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,le.HTML)}function $6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function V6(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function q6(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const o=e.openElements.tagIDs[r];if(n===g.LI&&o===g.LI||(n===g.DD||n===g.DT)&&(o===g.DD||o===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==g.ADDRESS&&o!==g.DIV&&o!==g.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function Y6(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=jt.PLAINTEXT}function W6(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function G6(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,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function X6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function K6(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Hh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function Q6(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function J6(e,t){e.treeAdapter.getDocumentMode(e.document)!==br.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=B.IN_TABLE}function xb(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function _b(e){const t=tb(e,Lo.TYPE);return t!=null&&t.toLowerCase()===g6}function Z6(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),_b(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function e4(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function t4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function n4(e,t){t.tagName=X.IMG,t.tagID=g.IMG,xb(e,t)}function r4(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=jt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=B.TEXT}function i4(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,jt.RAWTEXT)}function o4(e,t){e.framesetOk=!1,e._switchToTextParsing(t,jt.RAWTEXT)}function Sb(e,t){e._switchToTextParsing(t,jt.RAWTEXT)}function s4(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.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 a4(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function u4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function l4(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function c4(e,t){e._reconstructActiveFormattingElements(),mb(t),Uh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function d4(e,t){e._reconstructActiveFormattingElements(),gb(t),Uh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function vb(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.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:{X6(e,t);break}case g.A:{G6(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{j6(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:{z6(e,t);break}case g.LI:case g.DD:case g.DT:{q6(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{xb(e,t);break}case g.HR:{t4(e,t);break}case g.RB:case g.RTC:{u4(e,t);break}case g.RT:case g.RP:{l4(e,t);break}case g.PRE:case g.LISTING:{$6(e,t);break}case g.XMP:{i4(e,t);break}case g.SVG:{d4(e,t);break}case g.HTML:{B6(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:{Rr(e,t);break}case g.BODY:{U6(e,t);break}case g.FORM:{V6(e,t);break}case g.NOBR:{K6(e,t);break}case g.MATH:{c4(e,t);break}case g.TABLE:{J6(e,t);break}case g.INPUT:{Z6(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{e4(e,t);break}case g.IMAGE:{n4(e,t);break}case g.BUTTON:{W6(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{Q6(e,t);break}case g.IFRAME:{o4(e,t);break}case g.SELECT:{s4(e,t);break}case g.OPTION:case g.OPTGROUP:{a4(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Sb(e,t);break}case g.FRAMESET:{H6(e,t);break}case g.TEXTAREA:{r4(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Sb(e,t):vb(e,t);break}case g.PLAINTEXT:{Y6(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:vb(e,t)}}function f4(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 h4(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=B.AFTER_BODY,Db(e,t))}function p4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function m4(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 g4(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function E4(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function y4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function b4(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function T4(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function w4(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Ab(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 Jl(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:{g4(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:{p4(e,t);break}case g.LI:{E4(e);break}case g.DD:case g.DT:{y4(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{b4(e);break}case g.BR:{w4(e);break}case g.BODY:{f4(e,t);break}case g.HTML:{h4(e,t);break}case g.FORM:{m4(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{T4(e,t);break}case g.TEMPLATE:{Do(e,t);break}default:Ab(e,t)}}function Cb(e,t){e.tmplInsertionModeStack.length>0?Lb(e,t):jh(e,t)}function x4(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 _4(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&&Eb.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:{Pb(e,t);break}case Xe.WHITESPACE_CHARACTER:{kb(e,t);break}}else su(e,t)}function S4(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=B.IN_CAPTION}function v4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=B.IN_COLUMN_GROUP}function A4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=B.IN_COLUMN_GROUP,Vh(e,t)}function C4(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=B.IN_TABLE_BODY}function k4(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=B.IN_TABLE_BODY,ec(e,t)}function P4(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function N4(e,t){_b(t)?e._appendElement(t,le.HTML):su(e,t),t.ackSelfClosing=!0}function O4(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function As(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{k4(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Rr(e,t);break}case g.COL:{A4(e,t);break}case g.FORM:{O4(e,t);break}case g.TABLE:{P4(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{C4(e,t);break}case g.INPUT:{N4(e,t);break}case g.CAPTION:{S4(e,t);break}case g.COLGROUP:{v4(e,t);break}default:su(e,t)}}function ou(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Do(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:su(e,t)}}function su(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Ql(e,t),e.fosterParentingEnabled=n}function kb(e,t){e.pendingCharacterTokens.push(t)}function Pb(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function au(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)su(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const Nb=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function I4(e,t){const n=t.tagID;Nb.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=B.IN_TABLE,As(e,t)):An(e,t)}function R4(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&&ou(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:Jl(e,t)}}function Vh(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Rr(e,t);break}default:Zl(e,t)}}function L4(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:{Do(e,t);break}case g.COL:break;default:Zl(e,t)}}function Zl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=B.IN_TABLE,e._processToken(t))}function ec(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.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,tc(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,As(e,t));break}default:As(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,ou(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:ou(e,t)}}function tc(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.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,ec(e,t));break}default:As(e,t)}}function Ob(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:ou(e,t)}}function D4(e,t){const n=t.tagID;Nb.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),tc(e,t)):An(e,t)}function M4(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(),Ob(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Jl(e,t)}}function Ib(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,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Rr(e,t);break}}}function Rb(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{Do(e,t);break}}}function F4(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)):Ib(e,t)}function B4(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Rb(e,t)}function U4(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:{Rr(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,As(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,ec(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=B.IN_ROW,e.insertionMode=B.IN_ROW,tc(e,t);break}default:e.tmplInsertionModeStack[0]=B.IN_BODY,e.insertionMode=B.IN_BODY,An(e,t)}}function H4(e,t){t.tagID===g.TEMPLATE&&Do(e,t)}function Lb(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 z4(e,t){t.tagID===g.HTML?An(e,t):nc(e,t)}function Db(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 nc(e,t)}function nc(e,t){e.insertionMode=B.IN_BODY,Ql(e,t)}function j4(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Rr(e,t);break}}}function $4(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 V4(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.NOFRAMES:{Rr(e,t);break}}}function q4(e,t){t.tagID===g.HTML&&(e.insertionMode=B.AFTER_AFTER_FRAMESET)}function Y4(e,t){t.tagID===g.HTML?An(e,t):rc(e,t)}function rc(e,t){e.insertionMode=B.IN_BODY,Ql(e,t)}function W4(e,t){switch(t.tagID){case g.HTML:{An(e,t);break}case g.NOFRAMES:{Rr(e,t);break}}}function G4(e,t){t.chars=At,e._insertCharacters(t)}function X4(e,t){e._insertCharacters(t),e.framesetOk=!1}function Mb(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function K4(e,t){if(d6(t))Mb(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?mb(t):r===le.SVG&&(f6(t),gb(t)),Uh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function Q4(e,t){if(t.tagID===g.P||t.tagID===g.BR){Mb(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const J4=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,Z4=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Fb={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Bb(e,t){const n=lL(e),r=Ky("type",{handlers:{root:eL,element:tL,text:nL,comment:Hb,doctype:rL,raw:oL},unknown:sL}),o={parser:n?new bb(Fb):bb.getFragmentParser(void 0,Fb),handle(l){r(l,o)},stitches:!1,options:t||{}};r(e,o),Cs(o,Kr());const a=n?o.parser.document:o.parser.getFragment(),u=cR(a,{file:o.options.file});return o.stitches&&Yl(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 Ub(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function eL(e,t){Ub(e.children,t)}function tL(e,t){aL(e,t),Ub(e.children,t),uL(e,t)}function nL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:uu(e)};Cs(t,Kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function rL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:uu(e)};Cs(t,Kr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function iL(e,t){t.stitches=!0;const n=cL(e);if("children"in e&&"children"in n){const r=Bb({type:"root",children:e.children},t.options);n.children=r.children}Hb({type:"comment",value:{stitch:n}},t)}function Hb(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:uu(e)};Cs(t,Kr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function oL(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,zb(t,Kr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(J4,"<$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 sL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))iL(n,t);else{let r="";throw Z4.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 Cs(e,t){zb(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=jt.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 zb(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 aL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===jt.PLAINTEXT)return;Cs(t,Kr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Ro.html;o===Ro.html&&n==="svg"&&(o=Ro.svg);const a=mR(ge(M({},e),{children:[]}),{space:o===Ro.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:vs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:uu(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function uL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&_R.includes(n)||t.parser.tokenizer.state===jt.PLAINTEXT)return;Cs(t,Dl(e));const r={type:Xe.END_TAG,tagName:n,tagID:vs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:uu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===jt.RCDATA||t.parser.tokenizer.state===jt.RAWTEXT||t.parser.tokenizer.state===jt.SCRIPT_DATA)&&(t.parser.tokenizer.state=jt.DATA)}function lL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function uu(e){const t=Kr(e)||{line:void 0,column:void 0,offset:void 0},n=Dl(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 cL(e){return"children"in e?Io(ge(M({},e),{children:[]})):Io(e)}function jb(e){return function(t,n){return Bb(t,ge(M({},e),{file:n}))}}const Mo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],$b={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Mo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Mo],h2:[["className","sr-only"]],img:[...Mo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Mo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Mo],table:[...Mo],ul:[...Mo,["className","contains-task-list"]],"*":["abbr","accept","acceptCharset","accessKey","action","align","alt","axis","border","cellPadding","cellSpacing","char","charOff","charSet","checked","clear","colSpan","color","cols","compact","coords","dateTime","dir","encType","frame","hSpace","headers","height","hrefLang","htmlFor","id","isMap","itemProp","label","lang","maxLength","media","method","multiple","name","noHref","noShade","noWrap","open","prompt","readOnly","rev","rowSpan","rows","rules","scope","selected","shape","size","span","start","summary","tabIndex","title","useMap","vAlign","value","width"]},clobber:["ariaDescribedBy","ariaLabelledBy","id","name"],clobberPrefix:"user-content-",protocols:{cite:["http","https"],href:["http","https","irc","ircs","mailto","xmpp"],longDesc:["http","https"],src:["http","https"]},required:{input:{disabled:!0,type:"checkbox"}},strip:["script"],tagNames:["a","b","blockquote","br","code","dd","del","details","div","dl","dt","em","h1","h2","h3","h4","h5","h6","hr","i","img","input","ins","kbd","li","ol","p","picture","pre","q","rp","rt","ruby","s","samp","section","source","span","strike","strong","sub","summary","sup","table","tbody","td","tfoot","th","thead","tr","tt","ul","var"]},Yi={}.hasOwnProperty;function dL(e,t){let n={type:"root",children:[]};const r={schema:t?M(M({},$b),t):$b,stack:[]},o=Vb(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function Vb(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return fL(e,n);case"doctype":return hL(e,n);case"element":return pL(e,n);case"root":return mL(e,n);case"text":return gL(e,n)}}}function fL(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 lu(a,t),a}}function hL(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return lu(n,t),n}}function pL(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=qb(e,t.children),o=EL(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&&Yi.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 lu(u,t),u}function mL(e,t){const r={type:"root",children:qb(e,t.children)};return lu(r,t),r}function gL(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return lu(r,t),r}function qb(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=Vb(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function EL(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&Yi.call(r,n)?r[n]:void 0,u=r&&Yi.call(r,"*")?r["*"]:void 0,l=t&&typeof t=="object"?t:{},d={};let f;for(f in l)if(Yi.call(l,f)){const p=l[f];let m=Yb(e,Gb(a,f),f,p);m==null&&(m=Yb(e,Gb(u,f),f,p)),m!=null&&(d[f]=m)}if(o&&Yi.call(o,n)){const p=o[n];for(f in p)Yi.call(p,f)&&!Yi.call(d,f)&&(d[f]=p[f])}return d}function Yb(e,t,n,r){return t?Array.isArray(r)?yL(e,t,n,r):Wb(e,t,n,r):void 0}function yL(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Wb(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Wb(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&bL(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 bL(e,t,n){const r=e.schema.protocols&&Yi.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 lu(e,t){const n=BE(t);t.data&&(e.data=Io(t.data)),n&&(e.position=n)}function Gb(e,t){let n,r=-1;if(e)for(;++r<e.length;){const o=e[r],a=typeof o=="string"?o:o[0];if(a===t)return o;a==="data*"&&(n=o)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function TL(e){return function(t){return dL(t,e)}}const Xb=({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(M(M({className:W(e,`${j}-link`)},n?{href:n,target:d,onClick:o}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:a}))},wL=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=et();return!e&&!t?null:x.jsx("div",{className:W(n,`${j}-disclaimer`),children:t?x.jsx(Hy,{rehypePlugins:[jb,TL],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(Xb,{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}=Yn(),{setImageFile:m}=Ao(),{logger:T,globalClassName:y,searchConfig:w,features:v}=et(),P=Or(),_=I.useRef(null),C=I.useRef(!1),A=I.useRef(p);A.current=p;const[H,U]=I.useState(!1),[L,z]=I.useState(null),te=I.useRef({pendingInput:o,imageFile:p});I.useEffect(()=>{var Ce,xe;const ce=te.current;te.current={pendingInput:o,imageFile:((Ce=ce.pendingInput)==null?void 0:Ce.phase)!=="failed"&&((xe=ce.pendingInput)==null?void 0:xe.text)===(o==null?void 0:o.text)?ce.imageFile:p};const we=_.current;ce.pendingInput&&ce.pendingInput.phase!=="failed"&&!o&&!a&&!C.current&&(we==null?void 0:we.value)===ce.pendingInput.text&&(we.value="",p&&p===ce.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),ee=ye||!(q||n),oe=a||L;let Ae=null;(o==null?void 0:o.phase)==="queued"?Ae="Your message is queued. Connecting...":(o==null?void 0:o.phase)==="sending"?Ae="Sending your message...":n?Ae="Connecting to assistant...":r&&(Ae="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((ce,we)=>{const Ce=new FileReader;Ce.readAsDataURL(p),Ce.onload=()=>ce(Ce.result),Ce.onerror=xe=>we(xe)}):Promise.resolve(""),se=()=>{ye||C.current||m(null)},k=I.useCallback(ce=>{const we=ce==null?void 0:ce[0];if(we&&!(ee||C.current)){if(we.size>10*1024*1024){alert(P.imageAttachment.fileSizeExceeded10mb),m(null);return}m(we)}},[ee,m,P]),F=ce=>{(ye||C.current)&&ce.preventDefault()},K=ce=>{if(!ye&&!C.current||ce.key==="Tab")return;(ce.key==="Enter"||ce.key==="Backspace"||ce.key==="Delete"||ce.key.length===1&&!ce.metaKey&&!ce.ctrlKey)&&ce.preventDefault()},O=ce=>Ze(null,null,function*(){if(ce.preventDefault(),ee||C.current)return;const we=_.current,Ce=(we==null?void 0:we.value)||"",xe=Ce.trim();if(!(!we||!xe)){C.current=!0,U(!0),z(null);try{const Re=d==null?void 0:d(xe);let Fe="";try{Fe=yield J()}catch(kt){T==null||T.error("Error converting file to base64:",kt),_.current&&alert("There was an error processing the file. Please try again.");return}if(_.current!==we||we.value!==Ce||A.current!==p)return;const at=Re?Re(Fe):l(xe,Fe);(at===void 0||(yield at))&&_.current===we&&we.value===Ce&&(A.current===p&&m(null),we.value="")}catch(Re){T==null||T.error("Error submitting message:",Re),_.current===we&&z(P.errors.genericRetry)}finally{C.current=!1,_.current===we&&U(!1)}}});return x.jsxs("div",{className:W(y,e,`cim-${u}-component`,p&&"with-attachments",`${j}-search-bar-wrapper`),children:[p&&x.jsx(UP,{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:O,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(WP,{componentType:u,accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",disabled:ee,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:F,onPaste:F,onCut:F,onDrop:F,onKeyDown:K}),x.jsx(JP,{isLoading:!!t}),x.jsx(XP,{className:e,globalClassName:y,searchConfig:w,componentType:u,isLoading:ee})]}),(oe||Ae)&&x.jsx("div",{className:W(y,`${j}-search-status`,oe&&`${j}-search-error`),role:oe?"alert":"status",children:oe||Ae}),x.jsx(wL,{})]})};function xL(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 _L(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 Kb=I.createContext({isOpen:!1,panelId:"",triggerId:""}),Wh=I.createContext(null),Qb=I.createContext(null),Fo=()=>{var n,r;const e=I.useContext(Wh),t=I.useContext(Qb);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Jb=({onClearChat:e,componentType:t})=>{const n=Fo(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[x.jsx(_L,{"aria-hidden":"true"}),"Clear chat"]})};function SL(e){return e==null?[]:Array.isArray(e)?e:[e]}var vL=(e,...t)=>e.concat(t),AL=(e,...t)=>e.filter(n=>!t.includes(n)),CL=e=>Array.from(new Set(e));function Zb(e,t,n={}){const{step:r=1,loop:o=!0}=n,a=t+r,u=e.length,l=u-1;return t===-1?r>0?0:l:a<0?o?l:0:a>=u?o?0:t>u?u:t:a}function kL(e,t,n={}){const{step:r=1,loop:o=!0}=n;return Zb(e,t,{step:-r,loop:o})}var PL=e=>Array.isArray(e),eT=e=>e!=null&&typeof e=="object",NL=e=>eT(e)&&!PL(e),ic=e=>typeof e=="string",ks=e=>typeof e=="function",OL=e=>e==null,IL=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),RL=e=>Object.prototype.toString.call(e),tT=Function.prototype.toString,LL=tT.call(Object),DL=e=>{if(!eT(e)||RL(e)!="[object Object]"||BL(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=IL(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&tT.call(n)==LL},ML=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,FL=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,BL=e=>ML(e)||FL(e),UL=e=>e(),HL=()=>{},Gh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function zL(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:jL,max:$L}=Math,VL=e=>Number.isNaN(e),qL=e=>VL(e)?0:e,nT=(e,t,n)=>jL($L(qL(e),t),n);function Xh(e){if(!DL(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 YL(e,t){if(e==null)throw new Error(t())}function WL(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 GL=Object.defineProperty,XL=(e,t,n)=>t in e?GL(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Qh=(e,t,n)=>XL(e,typeof t!="symbol"?t+"":t,n),rT=()=>{},oc=e=>typeof e=="object"&&e!==null,Ps=e=>e?"":void 0,iT=e=>e?"true":void 0,KL=1,QL=9,JL=11,un=e=>oc(e)&&e.nodeType===KL&&typeof e.nodeName=="string",sc=e=>oc(e)&&e.nodeType===QL,ZL=e=>oc(e)&&e===e.window,oT=e=>un(e)?e.localName||"":"#document";function e5(e){return["html","body","#document"].includes(oT(e))}var t5=e=>oc(e)&&e.nodeType!==void 0,Bo=e=>t5(e)&&e.nodeType===JL&&"host"in e,n5=e=>un(e)&&e.localName==="input",r5=e=>un(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function cu(e){if(!e)return!1;const t=e.getRootNode();return Is(t)===e}var i5=/(textarea|select)/;function o5(e){if(e==null||!un(e))return!1;try{return n5(e)&&e.selectionStart!=null||i5.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Ns(e,t){var r;if(!e||!t||!un(e)||!un(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&Bo(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Zr(e){var t;return sc(e)?e:ZL(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function s5(e){return Zr(e).documentElement}function Os(e){var t,n,r;return Bo(e)?Os(e.host):sc(e)?(t=e.defaultView)!=null?t:window:un(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Is(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 a5(e){if(oT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||Bo(e)&&e.host||s5(e);return Bo(t)?t.host:t}function Jh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),sc(t)||Bo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Zh=new WeakMap;function Rs(e){return Zh.has(e)||Zh.set(e,Os(e).getComputedStyle(e)),Zh.get(e)}var ep=new Set(["menu","listbox","dialog","grid","tree","region"]),u5=e=>ep.has(e),sT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function aT(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=sT(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&&u5(m)&&!T&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function uT(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=sT(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 l5(e){const t=new Set;return uT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function c5(e){const t=e.getAttribute("role");return!!(t&&ep.has(t))}function d5(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function f5(e){var t;return d5(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function h5(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)&&c5(e))}var tp=()=>typeof document!="undefined";function p5(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var np=e=>tp()&&e.test(p5()),m5=e=>tp()&&e.test(navigator.vendor),lT=()=>tp()&&!!navigator.maxTouchPoints,g5=()=>np(/^iPhone/i),E5=()=>np(/^iPad/i)||rp()&&navigator.maxTouchPoints>1,ac=()=>g5()||E5(),y5=()=>rp()||ac(),rp=()=>np(/^Mac/i),b5=()=>y5()&&m5(/apple/i);function T5(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 Lr(e){var n;const t=T5(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var cT=e=>e.button===0,w5=e=>e.button===2||rp()&&e.ctrlKey&&e.button===0,x5=e=>"touches"in e&&e.touches.length>0,_5={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},dT={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function S5(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let o=e.key;return o=(u=_5[o])!=null?u:o,n==="rtl"&&r==="horizontal"&&o in dT&&(o=dT[o]),o}function fT(e,t="client"){const n=x5(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var ln=(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)}},hT=e=>un(e)&&e.tagName==="IFRAME",v5=/^(audio|video|details)$/;function pT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var A5=e=>!Number.isNaN(pT(e)),C5=e=>pT(e)<0;function k5(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 mT(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=k5(d,t);if(f){const p=Array.from(f.querySelectorAll(uc)).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 uc="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",gT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(uc));(n==!0||n=="if-empty"&&o.length===0)&&un(e)&&ei(e)&&o.unshift(e);const u=[];for(const l of o)if(ei(l)){if(hT(l)&&l.contentDocument){const d=l.contentDocument.body;u.push(...gT(d,{getShadowRoot:r}));continue}u.push(l)}return r?mT(u,r,ei):u};function ei(e){return!un(e)||e.closest("[inert]")?!1:e.matches(uc)&&r5(e)}function Ls(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(uc));n&&Uo(e)&&o.unshift(e);const a=[];for(const u of o)if(Uo(u)){if(hT(u)&&u.contentDocument){const l=u.contentDocument.body;a.push(...Ls(l,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=mT(a,r,Uo);return!u.length&&n?o:u}return!a.length&&n?o:a}function Uo(e){return un(e)&&e.tabIndex>0?!0:ei(e)&&!C5(e)}function P5(e,t={}){const n=Ls(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function N5(e,t={}){const{current:n,getShadowRoot:r}=t,o=Ls(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Is(a);if(!u)return null;const l=o.indexOf(u);return o[l+1]||null}function du(e){return e.tabIndex<0&&(v5.test(e.localName)||o5(e))&&!A5(e)?0:e.tabIndex}function ET(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=Ls(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var O5=class bS{constructor(){Qh(this,"id",null),Qh(this,"fn_cleanup"),Qh(this,"cleanup",()=>{this.cancel()})}static create(){return new bS}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 Qt(e){const t=O5.create();return t.request(e),t.cleanup}function yT(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=a5(e);return e5(t)?Zr(t).body:un(t)&&L5(t)?t:ip(t)}var I5=/auto|scroll|overlay|hidden|clip/,R5=new Set(["inline","contents"]);function L5(e){const t=Os(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return I5.test(n+o+r)&&!R5.has(a)}var Ds="default",op="",lc=new WeakMap;function D5(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,o=r.documentElement;return ac()?(Ds==="default"&&(op=o.style.webkitUserSelect,o.style.webkitUserSelect="none"),Ds="disabled"):t&&(lc.set(t,t.style.userSelect),t.style.userSelect="none"),()=>M5({target:t,doc:r})}function M5(e={}){const{target:t,doc:n}=e,o=(n!=null?n:document).documentElement;if(ac()){if(Ds!=="disabled")return;Ds="restoring",setTimeout(()=>{yT(()=>{Ds==="restoring"&&(o.style.webkitUserSelect==="none"&&(o.style.webkitUserSelect=op||""),op="",Ds="default")})},300)}else if(t&&lc.has(t)){const a=lc.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),lc.delete(t)}}function F5(e={}){const u=e,{defer:t,target:n}=u,r=wn(u,["defer","target"]),o=t?Qt:l=>l(),a=[];return a.push(o(()=>{const l=typeof n=="function"?n():n;a.push(D5(ge(M({},r),{target:l})))})),()=>{a.forEach(l=>l==null?void 0:l())}}function B5(e,t){const{onPointerMove:n,onPointerUp:r}=t,o=l=>{const d=fT(l),f=Math.sqrt(tl(d.x,2)+tl(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=fT(l);r({point:d,event:l})},u=[ln(e,"pointermove",o,!1),ln(e,"pointerup",a,!1),ln(e,"pointercancel",a,!1),ln(e,"contextmenu",a,!1),F5({doc:e})];return()=>{u.forEach(l=>l())}}function U5(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]=P5(e,{includeContainer:!0,getShadowRoot:a}),y=N5(l,{current:n,getShadowRoot:a}),w=!m&&!T;f.shiftKey&&cu(y)?(o==null||o(),p=T):f.shiftKey&&(cu(m)||w)?p=n:!f.shiftKey&&cu(n)?(o==null||o(),p=m):!f.shiftKey&&(cu(T)||w)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return ln(u,"keydown",d,!0)}function H5(e,t){const l=t,{defer:n,triggerElement:r}=l,o=wn(l,["defer","triggerElement"]),a=n?Qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(U5(d,M({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function z5(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function cc(e,t){if(!e)return rT;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 j5(e,t,n){if(!e)return rT;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 $5(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 V5(e,t){const{timeout:n,rootNode:r}=t,o=Os(r),a=Zr(r),u=new o.AbortController;return $5(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 q5=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),Y5=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,bT=e=>{const t={};let n;for(;n=Y5.exec(e);)t[n[1]]=n[2];return t},W5=(e,t)=>{if(ic(e)){if(ic(t))return`${e};${t}`;e=bT(e)}else ic(t)&&(t=bT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cn(...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]=q5(t[o],n[o]);continue}if(o==="style"){t[o]=W5(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 cz(e){return e}var Ms=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ms||{}),sp="__init__";function G5(e){const t=()=>{var u,l;return(l=(u=e.getRootNode)==null?void 0:u.call(e))!=null?l:document},n=()=>Zr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Is(t()),a=u=>t().getElementById(u);return ge(M({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:cu,getById:a})}function X5(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Fs=()=>e=>Array.from(new Set(e)),TT=typeof globalThis.document!="undefined"?I.useLayoutEffect:I.useEffect;function dc(e){var m,T;const t=(m=e().value)!=null?m:e().defaultValue,n=(T=e().isEqual)!=null?T:Object.is,[r]=I.useState(t),[o,a]=I.useState(r),u=e().value!==void 0,l=I.useRef(o);l.current=u?e().value:o;const d=I.useRef(l.current);TT(()=>{d.current=l.current},[o,e().value]);const f=y=>{var P,_;const w=d.current,v=ks(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?Co.flushSync:UL)(()=>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)}}}dc.cleanup=e=>{I.useEffect(()=>e,[])},dc.ref=e=>{const t=I.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function K5(e){const t=I.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var Q5=(e,t)=>{const n=I.useRef(!1),r=I.useRef(!1);I.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),I.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function fc(e,t={}){var re,de,ye,ee,oe,Ae;const n=I.useMemo(()=>{const{id:ae,ids:J,getRootNode:se}=t;return G5({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=J5(o),u=(ye=e.context)==null?void 0:ye.call(e,{prop:a,bindable:dc,scope:n,flush:xT,getContext(){return d},getComputed(){return U},getRefs(){return v},getEvent(){return y()}}),l=wT(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=I.useRef(new Map),p=I.useRef(null),m=I.useRef(null),T=I.useRef({type:""}),y=()=>ge(M({},T.current),{current(){return T.current},previous(){return m.current}}),w=()=>ge(M({},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=K5((oe=(ee=e.refs)==null?void 0:ee.call(e,{prop:a,context:d}))!=null?oe:{}),P=()=>({state:w(),context:d,event:y(),prop:a,send:q,action:_,guard:C,track:Q5,refs:v,computed:U,flush:xT,scope:n,choose:H}),_=ae=>{const J=ks(ae)?ae(P()):ae;if(!J)return;const se=J.map(k=>{var K,O;const F=(O=(K=e.implementations)==null?void 0:K.actions)==null?void 0:O[k];return F||Kh(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),F});for(const k of se)k==null||k(P())},C=ae=>{var J,se;return ks(ae)?ae(P()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[ae](P())},A=ae=>{const J=ks(ae)?ae(P()):ae;if(!J)return;const se=J.map(F=>{var O,ce;const K=(ce=(O=e.implementations)==null?void 0:O.effects)==null?void 0:ce[F];return K||Kh(`[zag-js] No implementation found for effect "${JSON.stringify(F)}"`),K}),k=[];for(const F of se){const K=F==null?void 0:F(P());K&&k.push(K)}return()=>k.forEach(F=>F==null?void 0:F())},H=ae=>SL(ae).find(J=>{let se=!J.guard;return ic(J.guard)?se=!!C(J.guard):ks(J.guard)&&(se=J.guard(P())),se}),U=ae=>{YL(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=dc(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,J){var k,F,K,O;if(J){const ce=f.current.get(J);ce==null||ce(),f.current.delete(J)}J&&_((k=e.states[J])==null?void 0:k.exit),_((F=p.current)==null?void 0:F.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 ce=A(e.effects);ce&&f.current.set(sp,ce)}_((O=e.states[ae])==null?void 0:O.entry)}})),z=I.useRef(void 0),te=I.useRef(Ms.NotStarted);TT(()=>{queueMicrotask(()=>{var F;const se=te.current===Ms.Started;te.current=Ms.Started,r(se?"rehydrating...":"initializing...");const k=(F=z.current)!=null?F:L.initial;L.invoke(k,se?L.get():sp)});const ae=f.current,J=L.ref.current;return()=>{r("unmounting..."),z.current=J,te.current=Ms.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 O,ce,we,Ce,xe;if(te.current!==Ms.Started)return;m.current=T.current,T.current=ae;let J=he();const se=(we=(O=e.states[J].on)==null?void 0:O[ae.type])!=null?we:(ce=e.on)==null?void 0:ce[ae.type],k=H(se);if(!k)return;p.current=k;const F=(Ce=k.target)!=null?Ce:J;r("transition",ae.type,k.target||J,`(${k.actions})`);const K=F!==J;K?Co.flushSync(()=>L.set(F)):k.reenter&&!K?L.invoke(J,J):_((xe=k.actions)!=null?xe:[])})};return(Ae=e.watch)==null||Ae.call(e,P()),{state:w(),send:q,context:d,prop:a,scope:n,refs:v,computed:U,event:y(),getStatus:()=>te.current}}function wT(e){const t=I.useRef(e);return t.current=e,t}function J5(e){const t=wT(e);return function(r){return t.current[r]}}function xT(e){queueMicrotask(()=>{Co.flushSync(()=>e())})}var ap=X5(e=>e);function hc(...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 Z5(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=I.memo(I.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=wn(f,["asChild","children"]);if(!o)return I.createElement(e,ge(M({},u),{ref:r}),a);if(!I.isValidElement(a))return null;const l=I.Children.only(a),d=Z5(l);return I.cloneElement(l,ge(M({},cn(u,l.props)),{ref:r?hc(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 eD(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Ho(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,l=I.createContext(u);l.displayName=t;function d(){var p;const f=I.useContext(l);if(!f&&n){const m=new Error(a!=null?a:eD(r,o));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[l.Provider,d,l]}const[tD,lp]=Ho({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[_T,fu]=Ho({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),ST=I.forwardRef((e,t)=>{const n=lp(),r=fu(),o=cn(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Fn.div,ge(M({},o),{ref:hc(r.ref,t)}))});ST.displayName="PopoverContent";const vT=I.forwardRef((e,t)=>{const n=lp(),r=fu(),o=cn(n.getPositionerProps(),e);return r.unmounted?null:x.jsx(Fn.div,ge(M({},o),{ref:t}))});vT.displayName="PopoverPositioner";const hu=()=>(e,t)=>t.reduce((n,r)=>{const[o,a]=n,u=r;return a[u]!==void 0&&(o[u]=a[u]),delete a[u],[o,a]},[{},M({},e)]),AT=e=>hu()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function nD(e,t){const{state:n,send:r,context:o}=e,a=n.matches("mounted","unmountSuspended");return{skip:!o.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var rD={props({props:e}){return ge(M({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Rs(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"});Qt(()=>{var l,d;const u=pc(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})=>{Qt(()=>{e.set("prevAnimationName",pc(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",pc(t.get("styles")))},u=d=>{const f=pc(t.get("styles"));Lr(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=cc(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),yT(()=>l())}}}}};function pc(e){return(e==null?void 0:e.animationName)||"none"}Fs()(["onExitComplete","present","immediate"]);function iD(e,t={}){const{sync:n=!1}=t,r=oD(e);return I.useCallback((...o)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...o)}):(a=r.current)==null?void 0:a.call(r,...o)},[n,r])}function oD(e){const t=I.useRef(e);return t.current=e,t}const cp=(e={})=>{const T=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=T,a=wn(T,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=I.useRef(!1),l=ge(M({},a),{present:r,onExitComplete:iD(e.onExitComplete)}),d=fc(rD,l),f=nD(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var zo=(e,t=[])=>({parts:(...n)=>{if(sD(t))return zo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>zo(e,[...t,...n]),omit:(...n)=>zo(e,t.filter(r=>!n.includes(r))),rename:n=>zo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Bs(e)}"][data-part="${Bs(r)}"]`,`& [data-scope="${Bs(e)}"][data-part="${Bs(r)}"]`].join(", "),attrs:{"data-scope":Bs(e),"data-part":Bs(r)}}}),{})}),Bs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),sD=e=>e.length===0;const aD=["top","right","bottom","left"],Wi=Math.min,xi=Math.max,mc=Math.round,gc=Math.floor,ti=e=>({x:e,y:e}),uD={left:"right",right:"left",bottom:"top",top:"bottom"};function CT(e,t,n){return xi(e,Wi(t,n))}function _i(e,t){return typeof e=="function"?e(t):e}function Gi(e){return e.split("-")[0]}function Us(e){return e.split("-")[1]}function dp(e){return e==="x"?"y":"x"}function fp(e){return e==="y"?"height":"width"}function ni(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function hp(e){return dp(ni(e))}function lD(e,t,n){n===void 0&&(n=!1);const r=Us(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=Ec(u)),[u,Ec(u)]}function cD(e){const t=Ec(e);return[pp(e),t,pp(t)]}function pp(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const kT=["left","right"],PT=["right","left"],dD=["top","bottom"],fD=["bottom","top"];function hD(e,t,n){switch(e){case"top":case"bottom":return n?t?PT:kT:t?kT:PT;case"left":case"right":return t?dD:fD;default:return[]}}function pD(e,t,n,r){const o=Us(e);let a=hD(Gi(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(pp)))),a}function Ec(e){const t=Gi(e);return uD[t]+e.slice(t.length)}function mD(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 NT(e){return typeof e!="number"?mD(e):{top:e,right:e,bottom:e,left:e}}function yc(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 OT(e,t,n){let{reference:r,floating:o}=e;const a=ni(t),u=hp(t),l=fp(u),d=Gi(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=Us(t);return w&&(y[u]+=T*(w==="end"?1:-1)*(n&&f?-1:1)),y}function gD(e,t){return Ze(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}=_i(t,e),w=NT(y),P=l[T?m==="floating"?"reference":"floating":m],_=yc(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=yc(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 ED=50,yD=(e,t,n)=>Ze(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,l=u.detectOverflow?u:ge(M({},u),{detectOverflow:gD}),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}=OT(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[_]=M(M({},w[_]),U),L&&y<ED&&(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}=OT(f,T,d)),v=-1)}return{x:p,y:m,placement:T,strategy:o,middlewareData:w}}),bD=e=>({name:"arrow",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:l,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=_i(e,n)||{};if(p==null)return{};const T=NT(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 te=z?z[H]:0;(!te||!(yield l.isElement==null?void 0:l.isElement(z)))&&(te=d.floating[H]||u.floating[v]);const he=U/2-L/2,q=te/2-P[v]/2-1,re=Wi(T[C],q),de=Wi(T[A],q),ye=te-P[v]-de,ee=te/2-P[v]/2+he,oe=CT(re,ee,ye),Ae=!f.arrow&&Us(a)!=null&&ee!==oe&&u.reference[v]/2-(ee<re?re:de)-P[v]/2<0,ae=Ae?ee<re?ee-re:ee-ye:0;return{[w]:y[w]+ae,data:M({[w]:oe,centerOffset:ee-oe-ae},Ae&&{alignmentOffset:ae}),reset:Ae}})}}),TD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ze(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:l,initialPlacement:d,platform:f,elements:p}=n,oe=_i(e,n),{mainAxis:m=!0,crossAxis:T=!0,fallbackPlacements:y,fallbackStrategy:w="bestFit",fallbackAxisSideDirection:v="none",flipAlignment:P=!0}=oe,_=wn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const C=Gi(a),A=ni(d),H=Gi(d)===d,U=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(H||!P?[Ec(d)]:cD(d)),z=v!=="none";!y&&z&&L.push(...pD(d,P,v,U));const te=[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 Ae=lD(a,l,U);q.push(he[Ae[0]],he[Ae[1]])}if(re=[...re,{placement:a,overflows:q}],!q.every(Ae=>Ae<=0)){var de,ye;const Ae=(((de=u.flip)==null?void 0:de.index)||0)+1,ae=te[Ae];if(ae&&(!(T==="alignment"?A!==ni(ae):!1)||re.every(k=>ni(k.placement)===A?k.overflows[0]>0:!0)))return{data:{index:Ae,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 ee;const se=(ee=re.filter(k=>{if(z){const F=ni(k.placement);return F===A||F==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(F=>F>0).reduce((F,K)=>F+K,0)]).sort((k,F)=>k[1]-F[1])[0])==null?void 0:ee[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(a!==J)return{reset:{placement:J}}}return{}})}}};function IT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function RT(e){return aD.some(t=>e[t]>=0)}const wD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ze(this,null,function*(){const{rects:r,platform:o}=n,l=_i(e,n),{strategy:a="referenceHidden"}=l,u=wn(l,["strategy"]);switch(a){case"referenceHidden":{const d=yield o.detectOverflow(n,ge(M({},u),{elementContext:"reference"})),f=IT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:RT(f)}}}case"escaped":{const d=yield o.detectOverflow(n,ge(M({},u),{altBoundary:!0})),f=IT(d,r.floating);return{data:{escapedOffsets:f,escaped:RT(f)}}}default:return{}}})}}},LT=new Set(["left","top"]);function xD(e,t){return Ze(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Gi(n),l=Us(n),d=ni(n)==="y",f=LT.has(u)?-1:1,p=a&&d?-1:1,m=_i(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 _D=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ze(this,null,function*(){var r,o;const{x:a,y:u,placement:l,middlewareData:d}=n,f=yield xD(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(M({},f),{placement:l})}})}}},SD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ze(this,null,function*(){const{x:r,y:o,placement:a,platform:u}=n,A=_i(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=wn(A,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},T=yield u.detectOverflow(n,p),y=ni(a),w=dp(y);let v=m[w],P=m[y];const _=(H,U)=>CT(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(M({},n),{[w]:v,[y]:P}));return ge(M({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[w]:l,[y]:d}}})})}}},vD=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}=_i(e,t),T={x:o,y:a},y=ni(u),w=dp(y);let v=T[w],P=T[y];const _=_i(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=LT.has(Gi(u)),z=l.reference[y]-l.floating[U]+(L&&((A=d.offset)==null?void 0:A[y])||0)+(L?0:C.crossAxis),te=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>te&&(P=te)}return{[w]:v,[y]:P}}}},AD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ze(this,null,function*(){const{placement:r,rects:o,platform:a,elements:u}=n,q=_i(e,n),{apply:l=()=>{}}=q,d=wn(q,["apply"]),f=yield a.detectOverflow(n,d),p=Gi(r),m=Us(r),T=ni(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=Wi(w-f[v],_),H=Wi(y-f[P],C),U=n.middlewareData.shift,L=!U;let z=A,te=H;U!=null&&U.enabled.x&&(te=C),U!=null&&U.enabled.y&&(z=_),L&&!m&&(T?te=y-2*xi(f.left,f.right):z=w-2*xi(f.top,f.bottom)),yield l(ge(M({},n),{availableWidth:te,availableHeight:z}));const he=yield a.getDimensions(u.floating);return y!==he.width||w!==he.height?{reset:{rects:!0}}:{}})}}};function bc(){return typeof window!="undefined"}function Hs(e){return DT(e)?(e.nodeName||"").toLowerCase():"#document"}function ar(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ri(e){var t;return(t=(DT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function DT(e){return bc()?e instanceof Node||e instanceof ar(e).Node:!1}function Dr(e){return bc()?e instanceof Element||e instanceof ar(e).Element:!1}function ii(e){return bc()?e instanceof HTMLElement||e instanceof ar(e).HTMLElement:!1}function MT(e){return!bc()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof ar(e).ShadowRoot}function pu(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=Mr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&o!=="inline"&&o!=="contents"}function CD(e){return/^(table|td|th)$/.test(Hs(e))}function Tc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const kD=/transform|translate|scale|rotate|perspective|filter/,PD=/paint|layout|strict|content/,jo=e=>!!e&&e!=="none";let mp;function gp(e){const t=Dr(e)?Mr(e):e;return jo(t.transform)||jo(t.translate)||jo(t.scale)||jo(t.rotate)||jo(t.perspective)||!Ep()&&(jo(t.backdropFilter)||jo(t.filter))||kD.test(t.willChange||"")||PD.test(t.contain||"")}function ND(e){let t=Xi(e);for(;ii(t)&&!zs(t);){if(gp(t))return t;if(Tc(t))return null;t=Xi(t)}return null}function Ep(){return mp==null&&(mp=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),mp}function zs(e){return/^(html|body|#document)$/.test(Hs(e))}function Mr(e){return ar(e).getComputedStyle(e)}function wc(e){return Dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Xi(e){if(Hs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||MT(e)&&e.host||ri(e);return MT(t)?t.host:t}function FT(e){const t=Xi(e);return zs(t)?(e.ownerDocument||e).body:ii(t)&&pu(t)?t:FT(t)}function mu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=FT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=ar(o);if(a){const l=yp(u);return t.concat(u,u.visualViewport||[],pu(o)?o:[],l&&n?mu(l):[])}else return t.concat(o,mu(o,[],n))}function yp(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function BT(e){const t=Mr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=ii(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,l=mc(n)!==a||mc(r)!==u;return l&&(n=a,r=u),{width:n,height:r,$:l}}function bp(e){return Dr(e)?e:e.contextElement}function js(e){const t=bp(e);if(!ii(t))return ti(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=BT(t);let u=(a?mc(n.width):n.width)/r,l=(a?mc(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!l||!Number.isFinite(l))&&(l=1),{x:u,y:l}}const OD=ti(0);function UT(e){const t=ar(e);return!Ep()||!t.visualViewport?OD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function ID(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==ar(e)?!1:t}function $o(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=bp(e);let u=ti(1);t&&(r?Dr(r)&&(u=js(r)):u=js(e));const l=ID(a,n,r)?UT(a):ti(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=ar(a),y=r&&Dr(r)?ar(r):r;let w=T,v=yp(w);for(;v&&r&&y!==w;){const P=js(v),_=v.getBoundingClientRect(),C=Mr(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=ar(v),v=yp(w)}}return yc({width:p,height:m,x:d,y:f})}function xc(e,t){const n=wc(e).scrollLeft;return t?t.left+n:$o(ri(e)).left+n}function HT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-xc(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function RD(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=ri(r),l=t?Tc(t.floating):!1;if(r===u||l&&a)return n;let d={scrollLeft:0,scrollTop:0},f=ti(1);const p=ti(0),m=ii(r);if((m||!m&&!a)&&((Hs(r)!=="body"||pu(u))&&(d=wc(r)),ii(r))){const y=$o(r);f=js(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const T=u&&!m&&!a?HT(u,d):ti(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 LD(e){return Array.from(e.getClientRects())}function DD(e){const t=ri(e),n=wc(e),r=e.ownerDocument.body,o=xi(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=xi(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+xc(e);const l=-n.scrollTop;return Mr(r).direction==="rtl"&&(u+=xi(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:l}}const zT=25;function MD(e,t){const n=ar(e),r=ri(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=xc(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<=zT&&(a-=w)}else f<=zT&&(a+=f);return{width:a,height:u,x:l,y:d}}const FD=new Set(["absolute","fixed"]);function BD(e,t){const n=$o(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=ii(e)?js(e):ti(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 jT(e,t,n){let r;if(t==="viewport")r=MD(e,n);else if(t==="document")r=DD(ri(e));else if(Dr(t))r=BD(t,n);else{const o=UT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return yc(r)}function $T(e,t){const n=Xi(e);return n===t||!Dr(n)||zs(n)?!1:Mr(n).position==="fixed"||$T(n,t)}function UD(e,t){const n=t.get(e);if(n)return n;let r=mu(e,[],!1).filter(l=>Dr(l)&&Hs(l)!=="body"),o=null;const a=Mr(e).position==="fixed";let u=a?Xi(e):e;for(;Dr(u)&&!zs(u);){const l=Mr(u),d=gp(u);!d&&l.position==="fixed"&&(o=null),(a?!d&&!o:!d&&l.position==="static"&&!!o&&FD.has(o.position)||pu(u)&&!d&&$T(e,u))?r=r.filter(p=>p!==u):o=l,u=Xi(u)}return t.set(e,r),r}function HD(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Tc(t)?[]:UD(t,this._c):[].concat(n),r],l=u[0],d=u.reduce((f,p)=>{const m=jT(t,p,o);return f.top=xi(m.top,f.top),f.right=Wi(m.right,f.right),f.bottom=Wi(m.bottom,f.bottom),f.left=xi(m.left,f.left),f},jT(t,l,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function zD(e){const{width:t,height:n}=BT(e);return{width:t,height:n}}function jD(e,t,n){const r=ii(t),o=ri(t),a=n==="fixed",u=$o(e,!0,a,t);let l={scrollLeft:0,scrollTop:0};const d=ti(0);function f(){d.x=xc(o)}if(r||!r&&!a)if((Hs(t)!=="body"||pu(o))&&(l=wc(t)),r){const y=$o(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?HT(o,l):ti(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 Mr(e).position==="static"}function VT(e,t){if(!ii(e)||Mr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ri(e)===n&&(n=n.ownerDocument.body),n}function qT(e,t){const n=ar(e);if(Tc(e))return n;if(!ii(e)){let o=Xi(e);for(;o&&!zs(o);){if(Dr(o)&&!Tp(o))return o;o=Xi(o)}return n}let r=VT(e,t);for(;r&&CD(r)&&Tp(r);)r=VT(r,t);return r&&zs(r)&&Tp(r)&&!gp(r)?n:r||ND(e)||n}const $D=function(e){return Ze(this,null,function*(){const t=this.getOffsetParent||qT,n=this.getDimensions,r=yield n(e.floating);return{reference:jD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function VD(e){return Mr(e).direction==="rtl"}const qD={convertOffsetParentRelativeRectToViewportRelativeRect:RD,getDocumentElement:ri,getClippingRect:HD,getOffsetParent:qT,getElementRects:$D,getClientRects:LD,getDimensions:zD,getScale:js,isElement:Dr,isRTL:VD};function YT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function YD(e,t){let n=null,r;const o=ri(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=gc(m),v=gc(o.clientWidth-(p+T)),P=gc(o.clientHeight-(m+y)),_=gc(p),A={rootMargin:-w+"px "+-v+"px "+-P+"px "+-_+"px",threshold:xi(0,Wi(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&&!YT(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(U,ge(M({},A),{root:o.ownerDocument}))}catch(L){n=new IntersectionObserver(U,A)}n.observe(e)}return u(!0),a}function WD(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?mu(f):[],...mu(t)]:[];p.forEach(_=>{o&&_.addEventListener("scroll",n,{passive:!0}),a&&_.addEventListener("resize",n)});const m=f&&l?YD(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?$o(e):null;d&&P();function P(){const _=$o(e);v&&!YT(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 GD=_D,XD=SD,KD=TD,QD=AD,JD=wD,ZD=bD,e8=vD,t8=(e,t,n)=>{const r=new Map,o=M({platform:qD},n),a=ge(M({},o.platform),{_c:r});return yD(e,t,ge(M({},o),{platform:a}))};function WT(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(M({},o),{toJSON:()=>o})}function n8(e){if(!e)return WT();const{x:t,y:n,width:r,height:o}=e;return WT(t,n,r,o)}function r8(e,t){return{contextElement:un(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?n8(r):n.getBoundingClientRect()}}}var gu=e=>({variable:e,reference:`var(${e})`}),Si={arrowSize:gu("--arrow-size"),arrowSizeHalf:gu("--arrow-size-half"),arrowBg:gu("--arrow-background"),transformOrigin:gu("--transform-origin"),arrowOffset:gu("--arrow-offset")},i8=e=>e==="top"||e==="bottom"?"y":"x";function o8(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=i8(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`,te=!!e.overlap&&f==="y"&&U;return r.floating.style.setProperty(Si.transformOrigin.variable,te?z:L),{data:{transformOrigin:te?z:L}}}}}var s8={name:"rects",fn({rects:e}){return{data:e}}},a8=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% + ${Si.arrowOffset.reference})`}),{}}}};function u8(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var l8={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function GT(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 c8(e,t,n){const r=e||t.createElement("div");return ZD({element:r,padding:n.arrowPadding})}function d8(e,t){var n;if(!OL((n=t.offset)!=null?n:t.gutter))return GD(({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}=u8(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 f8(e){if(!e.flip)return;const t=wp(e.boundary);return KD(ge(M({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function h8(e){if(!e.slide&&!e.overlap)return;const t=wp(e.boundary);return XD(ge(M({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:e8()}))}function p8(e){return QD({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 m8(e){var t;if(e.hideWhenDetached)return JD({strategy:"referenceHidden",boundary:(t=wp(e.boundary))!=null?t:"clippingAncestors"})}function g8(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function E8(e,t,n={}){const r=r8(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},l8,n),a=t.querySelector("[data-part=arrow]"),u=[d8(a,o),f8(o),h8(o),c8(a,t.ownerDocument,o),a8(a),o8({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),p8(o),m8(o),s8],{placement:l,strategy:d,onComplete:f,onPositioned:p}=o,m=()=>Ze(null,null,function*(){var H;if(!r||!t)return;const v=yield t8(r,t,{placement:l,middleware:u,strategy:d});f==null||f(v),p==null||p({placed:!0});const P=Os(t),_=GT(P,v.x),C=GT(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=Rs(A);t.style.setProperty("--z-index",U.zIndex)}}),T=()=>Ze(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=g8(o.listeners),w=o.listeners?WD(r,t,T,y):HL;return T(),()=>{w==null||w(),p==null||p({placed:!1})}}function XT(e,t,n={}){const l=n,{defer:r}=l,o=wn(l,["defer"]),a=r?Qt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(E8(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var y8={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function b8(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Si.arrowSize.reference,height:Si.arrowSize.reference,[Si.arrowSizeHalf.variable]:`calc(${Si.arrowSize.reference} / 2)`,[Si.arrowOffset.variable]:`calc(${Si.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?y8[t.split("-")[0]]:void 0,background:Si.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 $s=new WeakMap,_c=new WeakMap,Sc={},xp=0,KT=e=>e&&(e.host||KT(e.parentNode)),T8=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=KT(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),w8=new Set(["script","output","status","next-route-announcer"]),x8=e=>w8.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),_8=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=T8(n,Array.isArray(e)?e:[e]);Sc[r]||(Sc[r]=new WeakMap);const l=Sc[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&&un(y)&&uT(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(x8(w))return;const P=w.getAttribute(o)==="true",_=($s.get(w)||0)+1,C=(l.get(w)||0)+1;$s.set(w,_),l.set(w,C),d.push(w),_===1&&P&&_c.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=$s.get(y)-1,v=l.get(y)-1;$s.set(y,w),l.set(y,v),w||(_c.has(y)||y.removeAttribute(o),_c.delete(y)),v||y.removeAttribute(r)}),xp--,xp||($s=new WeakMap,$s=new WeakMap,_c=new WeakMap,Sc={})}},S8=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,v8=(e,t=S8(e),n="data-aria-hidden",r=!0)=>{if(t)return _8(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},A8=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function QT(e,t={}){const{defer:n=!0}=t,r=n?A8:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(v8(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function C8(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 k8(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 JT="pointerdown.outside",ZT="focus.outside";function P8(e){for(const t of e)if(un(t)&&ei(t))return!0;return!1}var ew=e=>"clientY"in e;function N8(e,t){if(!ew(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 O8(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function tw(e,t){if(!t||!ew(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 O8(u,l)?r||a:!1}function I8(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:l=!0}=t;if(!e)return;const d=Zr(e),f=Os(e),p=C8(f),m=k8(f);function T(A,H){if(!un(H)||!H.isConnected||Ns(e,H)||N8(e,A)||l&&aT(e,H))return!1;const U=d.querySelector(`[aria-controls="${e.id}"]`);if(U){const z=ip(U);if(tw(A,z))return!1}const L=ip(e);return tw(A,L)?!1:!(n!=null&&n(H))}const y=new Set,w=Bo(e==null?void 0:e.getRootNode());function v(A){function H(U){var he,q;const L=u&&!lT()?Qt:re=>re(),z=U!=null?U:A,te=(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?te[0]:Lr(A);if(!(!e||!T(A,re))){if(o||a){const de=Gh(o,a);e.addEventListener(JT,de,{once:!0})}nw(e,JT,{bubbles:!1,cancelable:!0,detail:{originalEvent:z,contextmenu:w5(z),focusable:P8(te),target:re}})}})}A.pointerType==="touch"?(y.forEach(U=>U()),y.add(ln(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(ln(d,"pointerdown",v,!0)),P.add(m.addEventListener("pointerdown",v,!0)),P.add(p.addEventListener("pointerdown",v,!0))},0);function C(A){(u?Qt:U=>U())(()=>{var z,te;const U=(te=(z=A==null?void 0:A.composedPath)==null?void 0:z.call(A))!=null?te:[A==null?void 0:A.target],L=w?U[0]:Lr(A);if(!(!e||!T(A,L))){if(r||a){const he=Gh(r,a);e.addEventListener(ZT,he,{once:!0})}nw(e,ZT,{bubbles:!1,cancelable:!0,detail:{originalEvent:A,contextmenu:!1,focusable:ei(L),target:L}})}})}return lT()||(P.add(ln(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 R8(e,t){const{defer:n}=t,r=n?Qt:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(I8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function nw(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function L8(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return ln(Zr(e),"keydown",n,{capture:!0})}var rw="layer:request-dismiss",Tr={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=>Ns(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Ns(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=>Tr.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];M8(e,rw,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),D8(e,rw,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function D8(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 M8(e,t,n){e.addEventListener(t,n,{once:!0})}var iw;function ow(){Tr.layers.forEach(({node:e})=>{e.style.pointerEvents=Tr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function F8(e){e.style.pointerEvents=""}function B8(e,t){const n=Zr(e),r=[];return Tr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(iw=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=V5(()=>{const l=o();return un(l)?l:null},{timeout:1e3});a.then(l=>r.push(cc(l,{pointerEvents:"auto"}))),r.push(u)}),()=>{Tr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=iw,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function U8(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};Tr.add(f),ow();function p(v){var _,C;const P=Lr(v.detail.originalEvent);Tr.isBelowPointerBlockingLayer(e)||Tr.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=Lr(v.detail.originalEvent);Tr.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;Tr.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(un);return C&&_.push(...C),_.some(H=>Ns(H,v))||Tr.isInNestedLayer(e,v)}const w=[a?B8(e,t.persistentElements):void 0,L8(e,T),R8(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{Tr.remove(e),ow(),F8(e),w.forEach(v=>v==null?void 0:v())}}function sw(e,t){const{defer:n}=t,r=n?Qt:a=>a(),o=[];return o.push(r(()=>{const a=ks(e)?e():e;o.push(U8(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var H8=Object.defineProperty,z8=(e,t,n)=>t in e?H8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ct=(e,t,n)=>z8(e,typeof t!="symbol"?t+"":t,n),aw={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()}},j8=[],$8=class{constructor(e,t){Ct(this,"trapStack"),Ct(this,"config"),Ct(this,"doc"),Ct(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ct(this,"portalContainers",new Set),Ct(this,"listenerCleanups",[]),Ct(this,"handleFocus",r=>{const o=Lr(r),a=this.findContainerIndex(o,r)>=0;if(a||sc(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,l=!0;if(this.state.mostRecentlyFocusedNode)if(du(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=>du(f)>0))||(l=!1);else l=!1;l&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),Ct(this,"handlePointerDown",r=>{const o=Lr(r);if(!(this.findContainerIndex(o,r)>=0)){if(yu(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}yu(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ct(this,"handleClick",r=>{const o=Lr(r);this.findContainerIndex(o,r)>=0||yu(this.config.clickOutsideDeactivates,r)||yu(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ct(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const o=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:o});if(!a)return;Eu(r)&&r.preventDefault(),this.tryFocus(a)}}),Ct(this,"handleEscapeKey",r=>{V8(r)&&yu(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ct(this,"_mutationObserver"),Ct(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(l=>Array.from(l.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(l=>l.type==="attributes"&&(l.attributeName==="aria-controls"||l.attributeName==="aria-expanded")?!0:l.type==="childList"&&l.addedNodes.length>0?Array.from(l.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return f5(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?h5(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ct(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(o=>{var a;(a=this._mutationObserver)==null||a.observe(o,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(o=>{this.observePortalContainer(o)}))}),Ct(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!ei(r)){const o=Is(this.doc);if(o&&this.findContainerIndex(o)>=0)r=o;else{const a=this.state.tabbableGroups[0];r=a&&a.firstTabbableNode||this.getNodeForOption("fallbackFocus")}}else r===null&&(r=this.getNodeForOption("fallbackFocus"));if(!r)throw new Error("Your focus-trap needs to have at least one focusable element");return r.isConnected||(r=this.getNodeForOption("fallbackFocus")),r}),Ct(this,"tryFocus",r=>{if(r!==!1&&r!==Is(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,q8(r)&&r.select()}}),Ct(this,"deactivate",r=>{if(!this.state.active)return this;const o=M({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),aw.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=()=>{uw(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&l){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return l(p).then(f,f),this}return f(),this}),Ct(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,o==null||o(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const o=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,o==null||o(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),Ct(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ct(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),Ct(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),Ct(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let l=u;if(typeof u=="string"){try{l=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!l&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return l}),Ct(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||Lr(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||ei(u)&&!Uo(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=du(u)>=0?T.lastTabbableNode:T.lastDomTabbableNode}else Eu(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||ei(u)&&!Uo(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=du(u)>=0?T.firstTabbableNode:T.firstDomTabbableNode}else Eu(o)||(l=f==null?void 0:f.nextTabbableNode(u))}}else l=this.getNodeForOption("fallbackFocus");return l}),this.trapStack=t.trapStack||j8;const n=M({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Eu(r)&&!r.shiftKey},isKeyBackward(r){return Eu(r)&&r.shiftKey}},t);this.doc=n.document||Zr(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=>{l5(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?aT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=Ls(e,{getShadowRoot:this.config.getShadowRoot}),n=gT(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(du(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(Uo(n[y]))return n[y]}else for(let y=T-1;y>=0;y--)if(Uo(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 aw.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?uw(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(ln(this.doc,"focusin",this.handleFocus,!0),ln(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),ln(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),ln(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),ln(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),ln(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=Is(this.doc),t==null||t();const o=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(o,o),this):(o(),this)}},Eu=e=>e.key==="Tab",yu=(e,...t)=>typeof e=="function"?e(...t):e,V8=e=>!e.isComposing&&e.key==="Escape",uw=e=>setTimeout(e,0),q8=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function lw(e,t={}){let n;const r=Qt(()=>{const o=typeof e=="function"?e():e;if(o){n=new $8(o,ge(M({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Zr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var _p="data-scroll-lock";function Y8(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function cw(e){const t=Rs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function dw(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=cw(r)||cw(o),l=n.innerWidth-r.clientWidth;o.setAttribute(_p,"");const d=()=>j5(r,"--scrollbar-width",`${l}px`),f=Y8(r),p=()=>{const w={overflow:"hidden"};return!u&&l>0&&(w[f]=`${l}px`),cc(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=cc(o,A);return()=>{H==null||H(),n.scrollTo({left:w,top:v,behavior:"instant"})}},T=[d(),ac()?m():p()];return()=>{T.forEach(w=>w==null?void 0:w()),o.removeAttribute(_p)}}var W8=zo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),oi=W8.build(),fw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},hw=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`},pw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},G8=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`},X8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},mw=e=>e.getById(fw(e)),Vs=e=>e.getById(hw(e)),qs=e=>e.getById(Sp(e)),gw=e=>e.getById(pw(e)),K8=e=>e.getById(vp(e)),Q8=e=>e.getById(Ap(e));function J8(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:l}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),T=b8(ge(M({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&o({type:y?"OPEN":"CLOSE"})},reposition(y={}){o({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(ge(M({id:G8(l)},oi.arrow.attrs),{dir:u("dir"),style:T.arrow}))},getArrowTipProps(){return t.element(ge(M({},oi.arrowTip.attrs),{dir:u("dir"),style:T.arrowTip}))},getAnchorProps(){return t.element(ge(M({},oi.anchor.attrs),{dir:u("dir"),id:fw(l)}))},getTriggerProps(){return t.button(ge(M({},oi.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:hw(l),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Sp(l),onPointerDown(y){cT(y)&&b5()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||o({type:"TOGGLE"})},onBlur(y){o({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(ge(M({},oi.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ge(M({id:pw(l)},oi.positioner.attrs),{dir:u("dir"),style:T.floating}))},getContentProps(){return t.element(ge(M({},oi.content.attrs),{dir:u("dir"),id:Sp(l),tabIndex:-1,role:"dialog","aria-modal":iT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":Ps(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(M({},oi.title.attrs),{id:vp(l),dir:u("dir")}))},getDescriptionProps(){return t.element(ge(M({},oi.description.attrs),{id:Ap(l),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ge(M({},oi.closeTrigger.attrs),{dir:u("dir"),id:X8(l),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),o({type:"CLOSE"}))}}))}}}var Z8={props({props:e}){return ge(M({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:M({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=mw(n))!=null?a:Vs(n);return XT(r,()=>gw(n),ge(M({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>qs(n);let o=!0;return sw(r,{type:"popover",pointerBlocking:t("modal"),exclude:Vs(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:H5(()=>qs(t),{triggerElement:Vs(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?QT(()=>[qs(t),Vs(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return dw(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?lw(()=>qs(t),{initialFocus:()=>ET({root:qs(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=mw(n))!=null?u:Vs(n);XT(o,()=>gw(n),ge(M(M({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(l){r.set("currentPlacement",l.placement)}}))},checkRenderedElements({context:e,scope:t}){Qt(()=>{Object.assign(e.get("renderedElements"),{title:!!K8(t),description:!!Q8(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||Qt(()=>{const n=ET({root:qs(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||Qt(()=>{const a=Vs(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})}}}};Fs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[fz,vc]=Ho({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[hz,Cp]=Ho({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),eM=e=>{const t=I.useId(),{getRootNode:n}=vc(),{dir:r}=Cp(),o=M({id:t,dir:r,getRootNode:n},e),a=fc(Z8,o);return J8(a,ap)},tM=e=>{const[t,u]=AT(e),l=u,{children:n}=l,r=wn(l,["children"]),o=eM(r),a=cp(cn({present:o.open},t));return x.jsx(tD,{value:o,children:x.jsx(_T,{value:a,children:n})})},Ew=I.forwardRef((e,t)=>{const n=lp(),r=fu(),o=cn(ge(M({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return x.jsx(Fn.button,ge(M({},o),{ref:t}))});Ew.displayName="PopoverTrigger";function nM(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 rM(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 iM(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 oM(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 sM(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 aM(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 yw(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 uM=({className:e,componentType:t,children:n})=>{const[r,o]=I.useState(!1),{globalClassName:a}=et(),u=f=>{o(f.open)},l=I.useCallback(()=>{o(!1)},[]),d=I.useMemo(()=>({closeMenu:l}),[l]);return x.jsxs(tM,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[x.jsx(Ew,{"aria-label":`Overflow menu for ${t}`,className:W(`${j}-overflow-menu-button-trigger`,`${j}-icon-button`,a,e,`cim-${t}-component`),children:x.jsx(yw,{"aria-hidden":"true"})}),x.jsx(vT,{children:x.jsx(ST,{className:W(`${j}-overflow-menu-list`,a,`cim-${t}-component`),children:x.jsx(Qb.Provider,{value:d,children:n})})})]})};function bw(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 Tw(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[lM,Vo]=Ho({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),ww=I.forwardRef((e,t)=>{const n=Vo(),r=cn(n.getControlProps(),e);return x.jsx(Fn.div,ge(M(M({},r),e),{ref:t}))});ww.displayName="CarouselControl";const xw=I.forwardRef((e,t)=>{const[n,r]=hu()(e,["readOnly","index"]),o=Vo(),a=cn(o.getIndicatorProps(n),r);return x.jsx(Fn.button,ge(M({},a),{ref:t}))});xw.displayName="CarouselIndicator";const _w=I.forwardRef((e,t)=>{const n=Vo(),r=cn(n.getIndicatorGroupProps(),e);return x.jsx(Fn.div,ge(M({},r),{ref:t}))});_w.displayName="CarouselIndicatorGroup";const Sw=I.forwardRef((e,t)=>{const[n,r]=hu()(e,["index","snapAlign"]),o=Vo(),a=cn(o.getItemProps(n),r);return x.jsx(Fn.div,ge(M({},a),{ref:t}))});Sw.displayName="CarouselItem";const vw=I.forwardRef((e,t)=>{const n=Vo(),r=cn(n.getItemGroupProps(),e);return x.jsx(Fn.div,ge(M({},r),{ref:t}))});vw.displayName="CarouselItemGroup";const Aw=I.forwardRef((e,t)=>{const n=Vo(),r=cn(n.getNextTriggerProps(),e);return x.jsx(Fn.button,ge(M({},r),{ref:t}))});Aw.displayName="CarouselNextTrigger";const Cw=I.forwardRef((e,t)=>{const n=Vo(),r=cn(n.getPrevTriggerProps(),e);return x.jsx(Fn.button,ge(M({},r),{ref:t}))});Cw.displayName="CarouselPrevTrigger";function cM(e){const t=Rs(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 dM(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function kw(e){let t=[];for(const n of e.children)t=t.concat(n,kw(n));return t}function Pw(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},o=t?kw(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(!dM(n,m,u))continue;const T=Rs(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 Nw(e){const t=e.getBoundingClientRect(),n=cM(e),r=Pw(e),o={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:Ow([...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(Iw(0,o.x))),y:Ow([...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(Iw(0,o.y)))}}function fM(e,t,n){const r=Pw(e),o=[...r[t].start,...r[t].center,...r[t].end];for(const a of o)if(n(a.node))return a.position}var Ow=e=>[...new Set(e)],Iw=(e,t)=>n=>Math.max(e,Math.min(t,n)),hM=zo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),vi=hM.build(),pM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},mM=(e,t)=>{var n,r,o;return(o=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?o:`carousel:${e.id}:item:${t}`},Ac=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},gM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},EM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},yM=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Rw=(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}`},Qn=e=>e.getById(Ac(e)),Lw=e=>z5(Qn(e),"[data-part=item]"),bM=(e,t)=>e.getById(Rw(e,t)),Dw=e=>{const t=Qn(e);if(!t)return;const n=Ls(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function TM(e,t){const{state:n,context:r,computed:o,send:a,scope:u,prop: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(M({},vi.root.attrs),{id:pM(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(M({},vi.itemGroup.attrs),{id:Ac(u),"data-orientation":l("orientation"),"data-dragging":Ps(f),dir:l("dir"),"aria-live":d?"off":"polite",onFocus(C){Ns(C.currentTarget,Lr(C))&&a({type:"VIEWPORT.FOCUS"})},onBlur(C){Ns(C.currentTarget,C.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(C){if(C.defaultPrevented||!l("allowMouseDrag")||!cT(C))return;const A=Lr(C);ei(A)&&A!==C.currentTarget||(C.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:zL(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(M({},vi.item.attrs),{id:mM(u,C.index),dir:l("dir"),role:"group","data-index":C.index,"data-inview":Ps(A),"aria-roledescription":"slide","data-orientation":l("orientation"),"aria-label":_.item(C.index,l("slideCount")),"aria-hidden":iT(!A),style:{scrollSnapAlign:(()=>{var te;const H=(te=C.snapAlign)!=null?te:"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(M({},vi.control.attrs),{"data-orientation":l("orientation")}))},getPrevTriggerProps(){return t.button(ge(M({},vi.prevTrigger.attrs),{id:EM(u),type:"button",disabled:!m,dir:l("dir"),"aria-label":_.prevTrigger,"data-orientation":l("orientation"),"aria-controls":Ac(u),onClick(C){C.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ge(M({},vi.nextTrigger.attrs),{dir:l("dir"),id:gM(u),type:"button","aria-label":_.nextTrigger,"data-orientation":l("orientation"),"aria-controls":Ac(u),disabled:!p,onClick(C){C.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ge(M({},vi.indicatorGroup.attrs),{dir:l("dir"),id:yM(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=S5(C,{dir:l("dir"),orientation:l("orientation")}),L=H[U];L==null||L(C)}}))},getIndicatorProps(C){return t.button(ge(M({},vi.indicator.attrs),{dir:l("dir"),id:Rw(u,C.index),type:"button","data-orientation":l("orientation"),"data-index":C.index,"data-readonly":Ps(C.readOnly),"data-current":Ps(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(M({},vi.autoplayTrigger.attrs),{type:"button","data-orientation":l("orientation"),"data-pressed":Ps(d),"aria-label":d?_.autoplayStop:_.autoplayStart,onClick(C){C.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var wM={props({props:e}){return WL(e,["slideCount"],"carousel"),ge(M({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:M({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:xM(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 NL(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(Qn(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=Qn(e);if(!n)return;const r=e.getWin(),o=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Dw(e)});return Dw(e),o.observe(n,{childList:!0,subtree:!0}),()=>o.disconnect()},trackSlideResize({scope:e,send:t}){if(!Qn(e))return;const r=e.getWin(),o=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};Qt(()=>{o(),Qt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(o);return Lw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Qn(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?vL(d,m):AL(d,m)},n.get("slidesInView"));n.set("slidesInView",CL(l))},{root:r,threshold:t("inViewThreshold")});return Lw(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Qn(n);return r?ln(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 ln(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return B5(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 ln(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=nT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),l=Qn(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=Qn(t);if(!r)return;const o=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-o)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=Zb(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),o=kL(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",o)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const o=Qn(r);if(!o)return;const a=fM(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=nT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Qn(n);if(!r)return;const o=Nw(r);e.set("pageSnapPoints",t("isHorizontal")?o.x:o.y)},disableScrollSnap({scope:e}){const t=Qn(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=Qn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Qn(e);if(!r)return;const o=r.scrollLeft,a=r.scrollTop,u=Nw(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]);Qt(()=>{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=bM(n,e.get("page"));r&&Qt(()=>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 xM(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}Fs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Fs()(["index","readOnly"]),Fs()(["index","snapAlign"]);const _M=e=>{const t=I.useId(),{getRootNode:n}=vc(),{dir:r}=Cp(),o=M({id:t,dir:r,getRootNode:n},e),a=fc(wM,o);return TM(a,ap)},Mw=I.forwardRef((e,t)=>{const[n,r]=hu()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),o=_M(n),a=cn(o.getRootProps(),r);return x.jsx(lM,{value:o,children:x.jsx(Fn.div,ge(M({},a),{ref:t}))})});Mw.displayName="CarouselRoot";function SM(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 vM(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 AM=180,CM=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},kM=({globalClassName:e,className:t,itemMinWidth:n=AM,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:I.isValidElement(q)&&q.key!=null?q.key:`carousel-item-${re}`})),y=T.length,w=I.useRef(null),[v,P]=I.useState(0),{width:_}=Sk();I.useLayoutEffect(()=>{w.current&&P(w.current.getBoundingClientRect().width)},[_,y]);const C=CM(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),te=L?Math.max(1,H):U,he=d==="circle-arrow";return x.jsxs(Mw,{ref:w,className:W(e,t,`${j}-carousel`,{[`${j}-carousel--circle-arrow-navigation`]:he}),slidesPerPage:te,slidesPerMove:U,spacing:r,loop:o,allowMouseDrag:a,slideCount:y,onPageChange:f,"aria-label":p,children:[x.jsx(vw,{className:W(e,`${j}-carousel__item-group`,{"carousel-row-container":!L}),children:T.map(({node:q,key:re},de)=>x.jsx(Sw,{index:de,className:W(e,`${j}-carousel__item`),children:q},re))}),l&&L&&x.jsxs(ww,{className:W(e,`${j}-carousel__control`),children:[x.jsx(Cw,{className:W(e,`${j}-carousel__prev-trigger`),"aria-label":"Previous slide",children:he?x.jsx(SM,{"aria-hidden":"true",size:"16px"}):x.jsx(iM,{"aria-hidden":"true",size:"16px"})}),x.jsx(Aw,{className:W(e,`${j}-carousel__next-trigger`),"aria-label":"Next slide",children:he?x.jsx(vM,{"aria-hidden":"true",size:"16px"}):x.jsx(oM,{"aria-hidden":"true",size:"16px"})})]}),u&&L&&x.jsx(_w,{className:W(e,`${j}-carousel__indicator-group`),children:Array.from({length:z},(q,re)=>x.jsx(xw,{index:re,className:W(e,`${j}-carousel__indicator`),"aria-label":`Go to slide group ${re+1}`},re))})]})},[PM,NM]=Ho({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),OM=e=>hu()(e,["lazyMount","unmountOnExit"]),[IM,Cc]=Ho({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Fw=I.forwardRef((e,t)=>{const n=Cc(),r=NM(),o=cp(ge(M({},r),{present:n.open})),a=cn(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:x.jsx(Fn.div,ge(M({},a),{ref:hc(o.ref,t)}))});Fw.displayName="DialogBackdrop";const Pp=I.forwardRef((e,t)=>{const n=Cc(),r=fu(),o=cn(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:x.jsx(Fn.div,ge(M({},o),{ref:hc(r.ref,t)}))});Pp.displayName="DialogContent";const Np=I.forwardRef((e,t)=>{const n=Cc(),r=cn(n.getPositionerProps(),e);return fu().unmounted?null:x.jsx(Fn.div,ge(M({},r),{ref:t}))});Np.displayName="DialogPositioner";var RM=zo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),qo=RM.build(),Bw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Uw=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`},Hw=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`},zw=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},kc=e=>e.getById(Op(e)),LM=e=>e.getById(Bw(e)),DM=e=>e.getById(Uw(e)),MM=e=>e.getById(Hw(e)),FM=e=>e.getById(Ip(e)),BM=e=>e.getById(Rp(e)),UM=e=>e.getById(zw(e));function HM(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(M({},qo.trigger.attrs),{dir:a("dir"),id:Hw(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(M({},qo.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Uw(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ge(M({},qo.positioner.attrs),{dir:a("dir"),id:Bw(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(ge(M({},qo.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(M({},qo.title.attrs),{dir:a("dir"),id:Ip(u)}))},getDescriptionProps(){return t.element(ge(M({},qo.description.attrs),{dir:a("dir"),id:Rp(u)}))},getCloseTriggerProps(){return t.button(ge(M({},qo.closeTrigger.attrs),{dir:a("dir"),id:zw(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var zM={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>UM(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return M({role:"dialog",modal:o,trapFocus:o,preventScroll:o,closeOnInteractOutside:!n,closeOnEscape:!0,restoreFocus:!0,initialFocusEl:r},e)},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{rendered:e(()=>({defaultValue:{title:!0,description:!0}}))}},watch({track:e,action:t,prop:n}){e([()=>n("open")],()=>{t(["toggleVisibility"])})},states:{open:{entry:["checkRenderedElements","syncZIndex"],effects:["trackDismissableElement","trapFocus","preventScroll","hideContentBelow"],on:{"CONTROLLED.CLOSE":{target:"closed"},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}]}},closed:{on:{"CONTROLLED.OPEN":{target:"open"},OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen"]}]}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackDismissableElement({scope:e,send:t,prop:n}){return sw(()=>kc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[MM(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 dw(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?lw(()=>kc(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")?QT(()=>[kc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){Qt(()=>{e.set("rendered",{title:!!FM(t),description:!!BM(t)})})},syncZIndex({scope:e}){Qt(()=>{const t=kc(e);if(!t)return;const n=Rs(t);[LM(e),DM(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})}}}};Fs()(["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 jM=e=>{const t=I.useId(),{getRootNode:n}=vc(),{dir:r}=Cp(),o=M({id:t,getRootNode:n,dir:r},e),a=fc(zM,o);return HM(a,ap)},jw=e=>{const[t,l]=AT(e),d=l,{children:n}=d,r=wn(d,["children"]),[o]=OM(t),a=jM(r),u=cp(cn({present:a.open},t));return x.jsx(IM,{value:a,children:x.jsx(PM,{value:o,children:x.jsx(_T,{value:u,children:n})})})},$w=I.forwardRef((e,t)=>{const n=Cc(),r=cn(n.getTitleProps(),e);return x.jsx(Fn.h2,ge(M({},r),{ref:t}))});$w.displayName="DialogTitle";const $M=({children:e})=>{const t=I.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[o,a]=I.useState(!1),u=I.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=I.useMemo(()=>({isOpen:o,panelId:n,triggerId:r}),[o,n,r]);return x.jsx(Wh.Provider,{value:u,children:x.jsx(Kb.Provider,{value:l,children:e})})},Vw=()=>I.useContext(Kb),qw=()=>{const e=I.useContext(Wh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},VM=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:o}=Vw(),{closeMenu:a}=qw(),{globalClassName:u}=et(),l=Or(),d=I.useRef(null);return I.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},qM=({componentType:e,className:t})=>{const{toggleMenu:n}=qw(),{isOpen:r,panelId:o,triggerId:a}=Vw(),{globalClassName:u}=et(),l=Or();return x.jsx("button",{type:"button",id:a,"aria-controls":r?o:void 0,"aria-label":EP(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(yw,{"aria-hidden":"true"})})},Lp=()=>{const{status:e,entryType:t}=ir(),{messages:n}=Yn(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},YM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=et(),{previousComponentType:r}=ir(),o=Fo(),a=()=>{Nl(r||"dialog"),o()};return t?x.jsx(Ti,{className:W(n,`${j}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:x.jsx(bw,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(bw,{"aria-hidden":"true"}),"Show ",r||"dialog"]})},WM=({componentType:e,globalClassName:t,controls:n,additionalControls:r,showClose:o,closeButtonAriaLabel:a,onClose:u,showOverflowMenu:l,showPrimaryToggle:d})=>{const f=e==="modal"?YM:Ww;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(qM,{componentType:e}),d&&x.jsx(f,{componentType:e,isIcon:!0}),o&&x.jsx(Jf,{className:W(t,`cim-${e}-component`),label:a,onClick:u})]})]})},GM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=et(),{isModalFullscreen:r}=ir(),o=Fo(),a=Or(),u=()=>{zf(!r),o()},l=r?$P:VP,d=a.controls.toggleFullscreen;return t?x.jsx(Ti,{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]})},XM=({componentType:e,isIcon:t})=>{const{globalClassName:n}=et(),{dialogPosition:r}=ir(),o=Fo(),a=Or(),u=r==="bottom-left",l=()=>{jf(u?"bottom-right":"bottom-left"),o()},d=u?rM:nM,f=u?a.controls.moveRight:a.controls.moveLeft;return t?x.jsx(Ti,{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]})},KM=({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"?GM:XM;return x.jsxs(VM,{componentType:e,children:[r&&x.jsx(m,{componentType:e}),o&&x.jsx(tF,{componentType:e}),a&&x.jsx(Jb,{componentType:e,onClearChat:d}),u&&f&&x.jsx(JM,{componentType:e,onEndConversation:f}),l&&p&&x.jsx(QM,{componentType:e,onDownloadTranscript:p})]})},Yw=({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}=et(),{mode:v}=ir(),P=v==="standalone",_=e==="modal",C=ye=>n===void 0||n[ye],A=(ye,ee=!0)=>t.includes(ye)&&C(ye)&&ee,H=C("toggleExpanded"),U=A(_?"toggleFullscreen":"toggleDialogPosition"),L=A("minimize"),z=A("clearChat"),te=C("close"),he=A("endConversation",!!d),q=A("downloadTranscript",!!p),re=U||L||z||he||q,de=I.useMemo(()=>{if(!m)return{};const ye=BP(m);if(!(w!=null&&w[`${rt}-header-text-font-size`]))return ye;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(([,oe])=>oe!=null&&oe!=="").map(([oe])=>[`${rt}-${oe}`,ye[`${rt}-${oe}`]]))},[m,w]);return x.jsx($M,{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($w,{className:W(T,`${j}-${e}-title`,{standalone:P,embedded:!P}),children:u!=null?u:m==null?void 0:m.headerText}),x.jsx(WM,{componentType:e,globalClassName:T,controls:r,additionalControls:o,showClose:te,closeButtonAriaLabel:m==null?void 0:m.closeButtonAriaLabel,onClose:f,showOverflowMenu:re,showPrimaryToggle:H})]}),x.jsx(KM,{componentType:e,controls:r,showOverflowMenu:re,showSecondaryToggle:U,showMinimize:L,showClearChat:z,showEndConversation:he,showDownloadTranscript:q,onClearChat:l,onEndConversation:d,onDownloadTranscript:p})]})})},QM=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=et(),r=Fo(),[o,a]=I.useState(!1),u=Or(),l=()=>Ze(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(xL,{"aria-hidden":"true"}),u.controls.downloadTranscript]})},JM=({onEndConversation:e,componentType:t})=>{const n=Fo(),r=()=>{e(),n()};return x.jsxs("button",{className:W(`${j}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[x.jsx(qP,{"aria-hidden":"true"}),"End conversation"]})},ZM={sparkle:kp,plus:sM,"paper-plane":aM},Dp=({icon:e,className:t})=>{const n=ZM[e];return n?x.jsx(n,{className:t,"aria-hidden":"true"}):null},eF=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:o,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=et(),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(Rl,{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))})},tF=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=et(),o=Or();if(!r)return null;const a=()=>{yi(!1),Da(!0),Qf()};return t?x.jsx(Ti,{className:W(n,`${j}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:o.controls.toggleMinimizeAriaLabel,title:o.controls.minimize,onClick:a,icon:x.jsx(mE,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-minimize-button`,`cim-${e}-component`),onClick:a,children:[x.jsx(mE,{"aria-hidden":"true"}),o.controls.minimize]})},Ww=({componentType:e,isIcon:t})=>{const{globalClassName:n}=et(),r=Fo(),o=()=>{Nl("modal"),r()};return t?x.jsx(Ti,{className:W(n,`${j}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:o,icon:x.jsx(Tw,{})}):x.jsxs("button",{className:W(n,`${j}-overflow-menu-button`,`${j}-toggle-modal-button`,`cim-${e}-component`),onClick:o,children:[x.jsx(Tw,{"aria-hidden":"true"}),"Show modal"]})},nF=({isWidgetStandalone:e})=>{var P,_;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:o,staticQuestions:a,staticQuestionsStrategy:u}=et(),{askCimPrompts:l,messages:d}=Yn(),{isLoading:f,handleAskCim:p}=Xr(),m=o==null?void 0:o.icon,T=(P=o==null?void 0:o.iconPosition)!=null?P:"left",y=I.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=I.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(Rl,{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 rF(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function iF(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||!rF(e)||e.defaultPrevented)return;const o=t||e.currentTarget.href;!o||!iF(o)||r(o,e)}const oF=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o,onNavigate:a}=et();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})})]})]})},sF=({isWidgetStandalone:e,message:t})=>{var l;const{configModule:n,globalClassName:r,themeVariants:o,themeTokens:a}=et(),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(kM,{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(oF,{isWidgetStandalone:e,product:d},`${f}`)})})]}):null},aF=({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(HP,{"aria-hidden":"true"})," ",t.message||"An error occurred while processing your request."]})}),uF=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:o})=>{var w;const{isLoading:a}=Xr(),{messages:u}=Yn(),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?Yv(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(eF,{suggestions:n.suggestions.map(v=>v.displayText),disabled:T,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function Gw(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 lF(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function cF(e,t,n){const o=Vl((n||{}).ignore||[]),a=dF(t);let u=-1;for(;++u<a.length;)Py(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 dF(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([fF(o[0]),hF(o[1])])}return t}function fF(e){return typeof e=="string"?new RegExp(lF(e),"g"):e}function hF(e){return typeof e=="function"?e:function(){return e}}const Fp="phrasing",Bp=["autolink","link","image","label"];function pF(){return{transforms:[wF],enter:{literalAutolink:gF,literalAutolinkEmail:Up,literalAutolinkHttp:Up,literalAutolinkWww:Up},exit:{literalAutolink:TF,literalAutolinkEmail:bF,literalAutolinkHttp:EF,literalAutolinkWww:yF}}}function mF(){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 gF(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Up(e){this.config.enter.autolinkProtocol.call(this,e)}function EF(e){this.config.exit.autolinkProtocol.call(this,e)}function yF(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 bF(e){this.config.exit.autolinkEmail.call(this,e)}function TF(e){this.exit(e)}function wF(e){cF(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,xF],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),_F]],{ignore:["link","linkReference"]})}function xF(e,t,n,r,o){let a="";if(!Xw(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!SF(n)))return!1;const u=vF(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 _F(e,t,n,r){return!Xw(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function SF(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 vF(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=Gw(e,"(");let a=Gw(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 Xw(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||No(n)||Fl(n))&&(!t||n!==47)}Kw.peek=LF;function AF(){this.buffer()}function CF(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function kF(){this.buffer()}function PF(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function NF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),n.label=t}function OF(e){this.exit(e)}function IF(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Ir(this.sliceSerialize(e)).toLowerCase(),n.label=t}function RF(e){this.exit(e)}function LF(){return"["}function Kw(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 DF(){return{enter:{gfmFootnoteCallString:AF,gfmFootnoteCall:CF,gfmFootnoteDefinitionLabelString:kF,gfmFootnoteDefinition:PF},exit:{gfmFootnoteCallString:NF,gfmFootnoteCall:OF,gfmFootnoteDefinitionLabelString:IF,gfmFootnoteDefinition:RF}}}function MF(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:Kw},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?Qw:FF))),f(),d}}function FF(e,t,n){return t===0?e:Qw(e,t,n)}function Qw(e,t,n){return(n?"":" ")+e}const BF=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];Jw.peek=$F;function UF(){return{canContainEols:["delete"],enter:{strikethrough:zF},exit:{strikethrough:jF}}}function HF(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:BF}],handlers:{delete:Jw}}}function zF(e){this.enter({type:"delete",children:[]},e)}function jF(e){this.exit(e)}function Jw(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,ge(M({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function $F(){return"~"}function VF(e){return e.length}function qF(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||VF,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=YF(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]=Zw(r[m]);else{const v=Zw(r);for(;++m<f;)a[m]=v}m=-1;const T=[],y=[];for(;++m<f;){const v=a[m];let 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(`
|
|
33
|
+
`)}function YF(e){return e==null?"":String(e)}function Zw(e){const t=typeof e=="string"?e.codePointAt(0):0;return t===67||t===99?99:t===76||t===108?108:t===82||t===114?114:0}function WF(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()),GF);return o(),u}function GF(e,t,n){return">"+(n?"":" ")+e}function XF(e,t){return ex(e,t.inConstruct,!0)&&!ex(e,t.notInConstruct,!1)}function ex(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 tx(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
|
|
34
|
+
`&&XF(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
+
`}function KF(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 QF(e,t){return!!(t.options.fences===!1&&e.value&&!e.lang&&/[^ \r\n]/.test(e.value)&&!/^[\t ]*(?:[\r\n]|$)|(?:^|[\r\n])[\t ]*$/.test(e.value))}function JF(e){const t=e.options.fence||"`";if(t!=="`"&&t!=="~")throw new Error("Cannot serialize code with `"+t+"` for `options.fence`, expected `` ` `` or `~`");return t}function ZF(e,t,n,r){const o=JF(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(QF(e,n)){const m=n.enter("codeIndented"),T=n.indentLines(a,e9);return m(),T}const l=n.createTracker(r),d=o.repeat(Math.max(KF(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,M({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,M({before:p,after:`
|
|
36
36
|
`,encode:["`"]},l.current()))),m()}return p+=l.move(`
|
|
37
37
|
`),a&&(p+=l.move(a+`
|
|
38
|
-
`)),p+=l.move(d),f(),p}function
|
|
39
|
-
`},d.current())))),l(),e.title&&(l=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,
|
|
38
|
+
`)),p+=l.move(d),f(),p}function e9(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 t9(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),M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({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,M({before:f,after:o},d.current()))),f+=d.move(o),l()),u(),f}function n9(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 bu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function Pc(e,t,n){const r=xs(e),o=xs(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}}nx.peek=r9;function nx(e,t,n,r){const o=n9(n),a=n.enter("emphasis"),u=n.createTracker(r),l=u.move(o);let d=u.move(n.containerPhrasing(e,M({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=Pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=bu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=Pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+bu(m));const y=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function r9(e,t,n){return n.options.emphasis||"*"}function i9(e,t){let n=!1;return Yl(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 o9(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(i9(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),T=n.containerPhrasing(e,ge(M({},a.current()),{before:`
|
|
40
40
|
`,after:`
|
|
41
41
|
`}));return m(),p(),T+`
|
|
42
42
|
`+(o===1?"=":"-").repeat(T.length-(Math.max(T.lastIndexOf("\r"),T.lastIndexOf(`
|
|
43
|
-
`))+1))}const u="#".repeat(o),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,
|
|
44
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=
|
|
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,
|
|
46
|
-
`))}function d(y,w,v,N){const x=v.enter("tableCell"),C=v.enter("phrasing"),A=v.containerPhrasing(y,me(B({},N),{before:a,after:a}));return C(),x(),A}function f(y,w){return DF(y,{align:w,alignDelimiters:r,padding:n,stringLength:o})}function p(y,w,v){const N=y.children;let x=-1;const C=[],A=w.enter("table");for(;++x<N.length;)C[x]=m(N[x],w,v);return A(),C}function m(y,w,v){const N=y.children;let x=-1;const C=[],A=w.enter("tableRow");for(;++x<N.length;)C[x]=d(N[x],y,w,v);return A(),C}function T(y,w,v){let N=e_.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(N=N.replace(/\|/g,"\\$&")),N}}function _9(){return{exit:{taskListCheckValueChecked:n_,taskListCheckValueUnchecked:n_,paragraph:S9}}}function x9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:v9}}}function n_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function S9(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const l=o[a];if(l.type==="paragraph"){u=l;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function v9(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",l=n.createTracker(r);a&&l.move(u);let d=e_.listItem(e,t,n,B(B({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function A9(){return[iF(),vF(),NF(),m9(),_9()]}function C9(e){return{extensions:[oF(),AF(e),PF(),w9(e),x9()]}}const k9={tokenize:L9,partial:!0},r_={tokenize:D9,partial:!0},i_={tokenize:M9,partial:!0},o_={tokenize:F9,partial:!0},N9={tokenize:B9,partial:!0},s_={name:"wwwAutolink",tokenize:I9,previous:u_},a_={name:"protocolAutolink",tokenize:R9,previous:l_},di={name:"emailAutolink",tokenize:O9,previous:c_},Vr={};function P9(){return{text:Vr}}let Po=48;for(;Po<123;)Vr[Po]=di,Po++,Po===58?Po=65:Po===91&&(Po=97);Vr[43]=di,Vr[45]=di,Vr[46]=di,Vr[95]=di,Vr[72]=[di,a_],Vr[104]=[di,a_],Vr[87]=[di,s_],Vr[119]=[di,s_];function O9(e,t,n){const r=this;let o,a;return u;function u(m){return!Np(m)||!c_.call(r,r.previous)||Pp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),l(m))}function l(m){return Np(m)?(e.consume(m),l):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(N9,p,f)(m):m===45||m===95||Tn(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),o=!0,d}function p(m){return a&&o&&Nn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function I9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!u_.call(r,r.previous)||Pp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(k9,e.attempt(r_,e.attempt(i_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function R9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&l_.call(r,r.previous)&&!Pp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(m),e.consume(m),l):n(m)}function l(m){if(Nn(m)&&o.length<5)return o+=String.fromCodePoint(m),e.consume(m),l;if(m===58){const T=o.toLowerCase();if(T==="http"||T==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||Sl(m)||mt(m)||po(m)||vl(m)?n(m):e.attempt(r_,e.attempt(i_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function L9(e,t,n){let r=0;return o;function o(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),o):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function D9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(o_,d,l)(f):f===null||mt(f)||po(f)||f!==45&&vl(f)?d(f):(a=!0,e.consume(f),u)}function l(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function M9(e,t){let n=0,r=0;return o;function o(u){return u===40?(n++,e.consume(u),o):u===41&&r<n?a(u):u===33||u===34||u===38||u===39||u===41||u===42||u===44||u===46||u===58||u===59||u===60||u===63||u===93||u===95||u===126?e.check(o_,t,a)(u):u===null||mt(u)||po(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function F9(e,t,n){return r;function r(l){return l===33||l===34||l===39||l===41||l===42||l===44||l===46||l===58||l===59||l===63||l===95||l===126?(e.consume(l),r):l===38?(e.consume(l),a):l===93?(e.consume(l),o):l===60||l===null||mt(l)||po(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||po(l)?t(l):r(l)}function a(l){return Nn(l)?u(l):n(l)}function u(l){return l===59?(e.consume(l),r):Nn(l)?(e.consume(l),u):n(l)}}function B9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return Tn(a)?n(a):t(a)}}function u_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function l_(e){return!Nn(e)}function c_(e){return!(e===47||Np(e))}function Np(e){return e===43||e===45||e===46||e===95||Tn(e)}function Pp(e){let t=e.length,n=!1;for(;t--;){const r=e[t][1];if((r.type==="labelLink"||r.type==="labelImage")&&!r._balanced){n=!0;break}if(r._gfmAutolinkLiteralWalkedInto){n=!1;break}}return e.length>0&&!n&&(e[e.length-1][1]._gfmAutolinkLiteralWalkedInto=!0),n}const U9={tokenize:W9,partial:!0};function H9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:V9,continuation:{tokenize:q9},exit:Y9}},text:{91:{name:"gfmFootnoteCall",tokenize:$9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:z9,resolveTo:j9}}}}function z9(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return l;function l(d){if(!u||!u._balanced)return n(d);const f=yr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function j9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function $9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return l;function l(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||mt(m))return n(m);if(m===93){e.exit("chunkString");const T=e.exit("gfmFootnoteCallString");return o.includes(yr(r.sliceSerialize(T)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return mt(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function V9(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,l;return d;function d(w){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(w){return w===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(w)}function p(w){if(u>999||w===93&&!l||w===null||w===91||mt(w))return n(w);if(w===93){e.exit("chunkString");const v=e.exit("gfmFootnoteDefinitionLabelString");return a=yr(r.sliceSerialize(v)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(w),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),T}return mt(w)||(l=!0),u++,e.consume(w),w===92?m:p}function m(w){return w===91||w===92||w===93?(e.consume(w),u++,p):p(w)}function T(w){return w===58?(e.enter("definitionMarker"),e.consume(w),e.exit("definitionMarker"),o.includes(a)||o.push(a),it(e,y,"gfmFootnoteDefinitionWhitespace")):n(w)}function y(w){return t(w)}}function q9(e,t,n){return e.check(Ia,t,e.attempt(U9,t,n))}function Y9(e){e.exit("gfmFootnoteDefinition")}function W9(e,t,n){const r=this;return it(e,o,"gfmFootnoteDefinitionIndent",5);function o(a){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(a):n(a)}}function G9(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,l){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},T=[["enter",p,l],["enter",u[f][1],l],["exit",u[f][1],l],["enter",m,l]],y=l.parser.constructs.insideSpan.null;y&&Xn(T,T.length,0,Al(y,u.slice(f+1,d),l)),Xn(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),Xn(u,f-1,d-f+3,T),d=f+T.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,l,d){const f=this.previous,p=this.events;let m=0;return T;function T(w){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(w):(u.enter("strikethroughSequenceTemporary"),y(w))}function y(w){const v=ss(f);if(w===126)return m>1?d(w):(u.consume(w),m++,y);if(m<2&&!n)return d(w);const N=u.exit("strikethroughSequenceTemporary"),x=ss(w);return N._open=!x||x===2&&!!v,N._close=!v||v===2&&!!x,l(w)}}}class X9{constructor(){this.map=[]}add(t,n,r){K9(this,t,n,r)}consume(t){if(this.map.sort(function(a,u){return a[0]-u[0]}),this.map.length===0)return;let n=this.map.length;const r=[];for(;n>0;)n-=1,r.push(t.slice(this.map[n][0]+this.map[n][1]),this.map[n][2]),t.length=this.map[n][0];r.push(t.slice()),t.length=0;let o=r.pop();for(;o;){for(const a of o)t.push(a);o=r.pop()}this.map.length=0}}function K9(e,t,n,r){let o=0;if(!(n===0&&r.length===0)){for(;o<e.map.length;){if(e.map[o][0]===t){e.map[o][1]+=n,e.map[o][2].push(...r);return}o+=1}e.map.push([t,n,r])}}function Q9(e,t){let n=!1;const r=[];for(;t<e.length;){const o=e[t];if(n){if(o[0]==="enter")o[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(o[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(o[1].type==="tableDelimiterRow")break}else o[0]==="enter"&&o[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function J9(){return{flow:{null:{name:"table",tokenize:Z9,resolveAll:e7}}}}function Z9(e,t,n){const r=this;let o=0,a=0,u;return l;function l(V){let ie=r.events.length-1;for(;ie>-1;){const re=r.events[ie][1].type;if(re==="lineEnding"||re==="linePrefix")ie--;else break}const fe=ie>-1?r.events[ie][1].type:null,we=fe==="tableHead"||fe==="tableRow"?R:d;return we===R&&r.parser.lazy[r.now().line]?n(V):we(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):ze(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?it(e,p,"whitespace")(V):(a+=1,u&&(u=!1,o+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||mt(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?T:m)}function T(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?it(e,w,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):w(V))}function w(V){return V===45||V===58?N(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),v):Y(V)}function v(V){return Ze(V)?it(e,N,"whitespace")(V):N(V)}function N(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),x):V===45?(a+=1,x(V)):V===null||ze(V)?U(V):Y(V)}function x(V){return V===45?(e.enter("tableDelimiterFiller"),C(V)):Y(V)}function C(V){return V===45?(e.consume(V),C):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),A):(e.exit("tableDelimiterFiller"),A(V))}function A(V){return Ze(V)?it(e,U,"whitespace")(V):U(V)}function U(V){return V===124?w(V):V===null||ze(V)?!u||o!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function R(V){return e.enter("tableRow"),$(V)}function $(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),$):V===null||ze(V)?(e.exit("tableRow"),t(V)):Ze(V)?it(e,$,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||mt(V)?(e.exit("data"),$(V)):(e.consume(V),V===92?de:ne)}function de(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function e7(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],l=!1,d=0,f,p,m;const T=new X9;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(d_(T,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",f,t]])):w.type==="tableRow"||w.type==="tableDelimiterRow"?(r=!0,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],l&&(l=!1,p={type:"tableBody",start:Object.assign({},w.start),end:Object.assign({},w.end)},T.add(n,0,[["enter",p,t]])),o=w.type==="tableDelimiterRow"?2:p?3:1):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m),a=[0,0,0,0]),u[2]=n)):w.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=yc(T,t,a,o,void 0,m)),a=u,u=[a[1],n,0,0])):w.type==="tableHead"?(l=!0,d=n):w.type==="tableRow"||w.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=yc(T,t,a,o,n,m)):u[1]!==0&&(m=yc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&d_(T,t,d,f,p),T.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=Q9(t.events,n))}return e}function yc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Ps(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ps(t.events,n[1]);if(a={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",a,t]]),n[2]!==0){const f=Ps(t.events,n[2]),p=Ps(t.events,n[3]),m={type:l,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const T=t.events[n[2]],y=t.events[n[3]];if(T[1].end=Object.assign({},y[1].end),T[1].type="chunkText",T[1].contentType="text",n[3]>n[2]+1){const w=n[2]+1,v=n[3]-n[2]-1;e.add(w,v,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return o!==void 0&&(a.end=Object.assign({},Ps(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function d_(e,t,n,r,o){const a=[],u=Ps(t.events,n);o&&(o.end=Object.assign({},u),a.push(["exit",o,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ps(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const t7={name:"tasklistCheck",tokenize:r7};function n7(){return{text:{91:t7}}}function r7(e,t,n){const r=this;return o;function o(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),a)}function a(d){return mt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),l):n(d)}function l(d){return ze(d)?t(d):Ze(d)?e.check({tokenize:i7},t,n)(d):n(d)}}function i7(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function o7(e){return FE([P9(),H9(),G9(e),J9(),n7()])}const s7={};function a7(e){const t=this,n=e||s7,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(o7(n)),a.push(A9()),u.push(C9(n))}const bc=()=>_.jsx("span",{className:`${z}-blinking-cursor`,children:_.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:_.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function u7(e){return/^tel:/i.test(e)?e:Ny(e)}const Op=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>_.jsx("div",{className:W(e,`${z}-markdown`),children:_.jsx(ky,{remarkPlugins:[a7],rehypePlugins:[Pb],urlTransform:u7,components:{h1:({children:a})=>_.jsx("h1",{className:W(e,`${z}-header h1`),children:a}),h2:({children:a})=>_.jsx("h2",{className:W(e,`${z}-header h2`),children:a}),h3:({children:a})=>_.jsx("h3",{className:W(e,`${z}-header h3`),children:a}),ul:({children:a})=>_.jsx("ul",{className:W(e,`${z}-ul`),children:a}),ol:({children:a})=>_.jsx("ol",{className:W(e,`${z}-ol`),children:a}),li:({children:a})=>_.jsx("li",{className:W(e,`${z}-li`),children:a}),a:({href:a,children:u})=>_.jsx(Fb,{globalClassName:e,openLinksInNewTab:t,href:a,onClick:o,children:u}),table:({children:a})=>_.jsx("div",{className:W(e,`${z}-table-container`),children:_.jsx("table",{className:W(e,`${z}-table`),children:a})}),thead:({children:a})=>_.jsx("thead",{className:W(e,`${z}-thead`),children:a}),tbody:({children:a})=>_.jsx("tbody",{className:W(e,`${z}-tbody`),children:a}),tr:({children:a})=>_.jsx("tr",{className:W(e,`${z}-tr`),children:a}),th:({children:a})=>_.jsx("th",{className:W(e,`${z}-th`),children:a}),td:({children:a})=>_.jsx("td",{className:W(e,`${z}-td`),children:a}),span:({className:a,children:u})=>a===`${z}-blinking-cursor`?_.jsx(bc,{}):_.jsx("span",{children:u})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")})}),l7=({globalClassName:e,message:t})=>{const[n,r]=D.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,l=()=>{r(d=>!d)};return _.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-progress-message`,"standalone"),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","standalone"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&_.jsxs(_.Fragment,{children:[_.jsx(wl,{className:W(e,`${z}-thought-context-button`),onClick:l,children:n?_.jsxs(_.Fragment,{children:["Hide ",_.jsx(ON,{"aria-hidden":"true"})]}):_.jsxs(_.Fragment,{children:["Context ",_.jsx(IN,{"aria-hidden":"true"})]})}),n&&_.jsx("div",{className:W(e,`${z}-thought-container`),children:a&&_.jsx("p",{className:W(e,`${z}-progress-thought`),children:t.thought})})]})]})},c7=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?_.jsx(l7,{globalClassName:e,message:t}):_.jsxs("div",{className:W(e,`${z}-progress-message`,"embedded"),title:t.message,children:[_.jsx("span",{className:W(e,`${z}-message-icon`,"progress-icon","embedded"),children:_.jsx(nE,{"aria-hidden":"true"})}),_.jsx("i",{className:W(e,`${z}-progress-text`,"embedded"),children:t.message})]}),d7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return _.jsxs("div",{className:W(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&_.jsxs("div",{className:W(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[_.jsx("span",{className:W(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),_.jsx(Op,{text:t.message})]})},f_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),l=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:l}},Tc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>_.jsx("span",{className:W(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),h_=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(l=>{var f;const d=((f=o[l])==null?void 0:f.join(", "))||"";return _.jsxs("div",{className:W(e,`${z}-facets`),children:[_.jsx("p",{className:W(e,`${z}-facet-category`),children:l}),_.jsx("p",{className:W(e,`${z}-facet-values`),children:d})]},l)})},su=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>_.jsx("span",{className:W(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),f7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=f_(t),l=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?_.jsxs("div",{className:W(e,`${z}-user-message standalone`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon standalone`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:a,message:t}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!0})]}):_.jsxs("div",{className:W(e,`${z}-user-message embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-message-row embedded`),children:[d?_.jsx("img",{className:W(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-message-icon embedded`),children:_.jsx(iE,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:u})]}),_.jsx(su,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},h7=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:l,imageData:d})=>_.jsxs("div",{className:W(e,`${z}-user-search standalone`),children:[_.jsxs("div",{children:[_.jsxs("div",{className:W(e,`${z}-user-search-query standalone`),children:[d?_.jsx("img",{className:W(e,`${z}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon standalone`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),_.jsx(h_,{globalClassName:e,facetFiltersList:u,message:a})]}),_.jsx(su,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),p7=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=f_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:T}=D.useMemo(()=>{var v,N,x;const w=typeof((v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel)=="string"?(N=r==null?void 0:r.clientContext)==null?void 0:N.cimLabel:r==null?void 0:r.label;switch(o){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(x=r==null?void 0:r.browseParams)==null?void 0:x.categoryId,queryLabel:w||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:w||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return m?n?_.jsx(h7,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:T,facetFiltersList:u,filterCount:l}):_.jsxs("div",{className:W(e,`${z}-user-search embedded`),children:[_.jsxs("div",{className:W(e,`${z}-user-search-query embedded`),children:[f?_.jsx("img",{className:W(e,`${z}-user-search-image embedded`),src:f,alt:T||m,loading:"lazy"}):_.jsx("span",{className:W(e,`${z}-message-icon user-search-icon embedded`),children:_.jsx(ns,{"aria-hidden":"true"})}),_.jsx("p",{className:W(e,`${z}-text bold embedded`),children:T||m}),u.length>0&&_.jsx(Tc,{isWidgetStandalone:!1,filterCount:l})]}),_.jsx(su,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},p_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Rr(),{onNavigate:f}=tt(),p=v=>_p({event:v,openLinksInNewTab:n,onNavigate:f}),m=l&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const T=e.name,y=!!((w=e.request)!=null&&w.userPrompt);switch(T){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return y?_.jsx(f7,{globalClassName:t,isWidgetStandalone:a,message:e}):_.jsx(p7,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return _.jsx(d7,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return _.jsx(JM,{globalClassName:t,entryType:o,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return _.jsx(Op,{globalClassName:t,openLinksInNewTab:n,showIsLoading:m,text:e.message,onLinkClick:p});case"error":return _.jsx(QM,{message:e,isWidgetStandalone:a});case"display_products":return _.jsx(KM,{message:e,isWidgetStandalone:a});case"progress":return _.jsx(c7,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return o==="ask_cim"?null:_.jsxs(_.Fragment,{children:[_.jsx("p",{className:W(t,`${z}-reset-message`),children:"This conversation has been reset."}),_.jsx("p",{className:W(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},m7=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=tt(),{groupedMessages:a}=Wn(),{entryType:u}=Yn();return _.jsxs(_.Fragment,{children:[u==="ask_cim"&&_.jsx(YM,{isWidgetStandalone:e}),a.map(l=>{if(l.messages&&l.type==="group"){let d=new Date(l.createdAt).toLocaleString();const f=l.messages[l.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),_.jsxs("div",{className:W(n,`${z}-message-group`,e?"standalone":"embedded"),children:[l.messages.length>0&&l.messages.map(p=>_.jsx("div",{className:`${z}-message-group-child`,children:_.jsx(p_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),_.jsx(su,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${l.eventSourceId}`)}else if(l.type==="individual"&&l.message)return _.jsx("div",{className:W(n,`${z}-message`,e?"standalone":"embedded",{error:l.message.name.includes("error")}),children:_.jsx(p_,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},g7=4e3,E7=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,g7),y7=({message:e,announcementKey:t})=>{const[n,r]=D.useState("");return D.useEffect(()=>{if(r(""),!e)return;const o=setTimeout(()=>r(e),100),a=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(o),clearTimeout(a)}},[e,t]),_.jsx("span",{className:`${z}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},b7=()=>{const{groupedMessages:e}=Wn(),n=e.flatMap(r=>{var o;return r.type==="group"?(o=r.messages)!=null?o:[]:r.message?[r.message]:[]}).reverse().find(r=>r.name==="inquiry"&&!r.bypassHandlers);return _.jsx(y7,{message:n?E7(n.message):"",announcementKey:n==null?void 0:n.id})},T7=({isOpen:e}={})=>{const{messages:t}=Rr(),{autoScroll:n}=tt(),r=D.useRef(null);return D.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),D.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},w7={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Ip=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=T7({isOpen:e});return _.jsxs(_.Fragment,{children:[_.jsx(m7,{isWidgetStandalone:t,handleSuggestionClick:r}),_.jsx(b7,{}),n&&_.jsx("div",{style:B(B({},w7),o),children:_.jsx(bc,{})}),_.jsx("div",{ref:a})]})},m_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=tt(),{copilot:o,isLoading:a,handleUserInput:u,handleSuggestion:l,resetConversation:d}=Rr();return Tp()?o?_.jsxs("div",{className:W(t,`${z}-container`,`${z}-embedded-chat`,e),style:n,children:[_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:!1,isLoading:a,handleSuggestionClick:l})}),_.jsx(Ih,{componentType:"chat",className:"embedded-chat",isLoading:a,onSubmit:u}),_.jsx("div",{className:W(`${z}-embedded-chat-menu`),children:_.jsxs(J8,{componentType:"chat",children:[_.jsx(Dw,{componentType:"chat"}),_.jsx(Hb,{componentType:"chat",onClearChat:d})]})})]}):_.jsx("div",{children:"Loading Copilot..."}):null},g_=e=>{var d;const{children:t,disabled:n}=e,[r,o]=D.useState((d=e.container)==null?void 0:d.current),a=D.useSyncExternalStore(x7,()=>!1,()=>!0),{getRootNode:u}=hc();if(D.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return _.jsx(_.Fragment,{children:t});const l=r!=null?r:_7(u);return _.jsx(_.Fragment,{children:D.Children.map(t,f=>co.createPortal(f,l))})},_7=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return _o(n)?n:Fr(t).body},x7=()=>()=>{},S7=["toggleDialogPosition","minimize","clearChat"],v7=["toggleFullscreen","minimize","clearChat"],E_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=Yn(),{copilot:p,isLoading:m,handleUserInput:T,handleSuggestion:y,resetConversation:w}=Rr(),v=Tp(),{isOpen:N}=u||{},x=a==="standalone",C=()=>{ri(!1),Ff()};return p?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:v,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsx(gp,{className:W(t,`${z}-dialog-positioner`),style:n,children:_.jsxs(mp,{className:W(t,`${z}-container`,`${z}-dialog`,`${z}-dialog-content`,e,l,d&&"full-height",{standalone:x,embedded:!x}),style:f?{width:f}:void 0,children:[_.jsx(Lw,{componentType:"dialog",overflowActions:S7,onClearChat:w,onClose:C}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:x,embedded:!x}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:x,isLoading:m,isOpen:N,handleSuggestionClick:y})}),_.jsx(Ih,{componentType:"dialog",isLoading:m,onSubmit:T})]})})})}):_.jsx("div",{children:"Loading Copilot..."})},y_=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=tt(),{mode:a,status:u,isModalFullscreen:l}=Yn(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:T}=Rr(),{isOpen:y}=u||{},w=a==="standalone",v=Tp(),N=({open:C})=>{if(C){ri(!0);return}x()},x=()=>{ri(!1),Ff()};return v?d?_.jsx(Pw,{lazyMount:!0,unmountOnExit:!0,open:v,"aria-label":o==null?void 0:o.headerText,onOpenChange:N,initialFocusEl:Mf,children:_.jsx(g_,{children:_.jsxs("div",{className:W(t,`${z}-modal-container`),style:n,children:[_.jsx(vw,{className:W(t,`${z}-modal-backdrop`)}),_.jsx(gp,{className:W(t,`${z}-container`,`${z}-modal`,e,{fullscreen:l,standalone:w,embedded:!w}),children:_.jsxs(mp,{className:W(t,`${z}-modal-content`,{standalone:w,embedded:!w}),children:[_.jsx(Lw,{componentType:"modal",overflowActions:v7,onClearChat:T,onClose:x}),_.jsx("div",{className:W(t,`${z}-message-container`,`container-${r}`,{standalone:w,embedded:!w}),role:"region","aria-label":"Conversation",children:_.jsx(Ip,{isWidgetStandalone:w,isLoading:f,isOpen:y,handleSuggestionClick:m,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),_.jsx(Ih,{componentType:"modal",isLoading:f,onSubmit:p})]})})]})})}):_.jsx("div",{children:"Loading Copilot..."}):null},A7=()=>{const e=Yn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?_.jsx(CN,{}):t==="dialog"?_.jsx(E_,{}):t==="modal"?_.jsx(y_,{}):_.jsx(m_,{})},C7=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=If();D.useEffect(()=>{const a=u=>{const{property:l,value:d}=u.detail||{};!l||d===void 0||(l==="isOpen"&&e(d),l==="isInline"&&t(d),l==="elementId"&&n(d),l==="entryType"&&r(d),l==="params"&&o(d))};return Lk(a),()=>{Dk(a)}},[e,t,n,r,o])},k7=()=>{const{copilot:e}=Wn(),{entryType:t,activePromptsId:n,params:r}=ii(),{setIsInitialized:o,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:l,setIsResponseLoading:d}=If(),{getCopilotSuggestions:f}=V1();C7();const p=D.useCallback(w=>{if(!t||!w)return;f(w,t,N=>{a(N.id)})},[t,f,a]);D.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=D.useCallback(w=>{w.eventSourceId===n&&(u(w),a(w.id),o(!0))},[n,u,a,o]),T=D.useCallback(w=>{(w==null?void 0:w.eventSourceId)===n&&(l(w),d(!1))},[n,l,d]),y=D.useCallback(()=>{o(!0),d(!1)},[o,d]);return D.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",T),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",T),e.off("error",y)}},[e,m,T,y]),null},b_={copilot:"Ask Copilot",messaging:"Ask a question"},N7=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:o,isResponseLoading:a}=ii(),u=o||b_[r],[l,d]=D.useState(""),f=t||a,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return _.jsxs("form",{className:W(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[_.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:_.jsx(pp,{"aria-hidden":"true",className:W(n,`${z}-prompts-input-icon`)})}),_.jsx("input",{id:`${z}-prompts-input`,className:W(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text","aria-disabled":f||void 0,value:l,onBeforeInput:m,onPaste:m,onChange:T=>{f||d(T.target.value)}}),_.jsx(oi,{className:W(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:_.jsx(ns,{}),disabled:f})]})},P7=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ii(),r=n||b_[t];return _.jsxs("div",{className:W(e,`${z}-prompts-header`),children:[_.jsx(pp,{className:W(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),_.jsx("span",{className:W(e,`${z}-prompts-header-text`),children:r})]})},T_=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=tt(),a=o==null?void 0:o.icon,u=(l=o==null?void 0:o.iconPosition)!=null?l:"left";return _.jsxs("button",{className:W(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&_.jsx(wp,{icon:a,className:`${z}-suggestion-button-icon`}),_.jsx("span",{children:e})]})},O7="Ask me something else",I7=({label:e,disabled:t=!1})=>_.jsx(T_,{label:e||O7,disabled:t,onClick:()=>ri(!0)}),R7=({sendCopilotPrompt:e})=>{var N,x;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=ii(),p=o?(x=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(C=>C.displayText.trim()).filter(Boolean))!=null?x:[]:[],m=o?W0(p,l,d):[],T=!o,w=m.length>0&&!a&&!f,v=C=>()=>{const A=C.trim();A&&e(A)};return _.jsxs("div",{className:W(t,`${z}-prompts-button-group`),children:[T&&_.jsx(bc,{}),m.map(C=>_.jsx(T_,{label:C,disabled:r,onClick:v(C)},C)),w&&_.jsx(I7,{label:u,disabled:r})]})},L7=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ii();return!n||!t?null:_.jsx("div",{className:W(e,`${z}-prompts-user-message-container`),children:_.jsx("p",{className:W(e,`${z}-prompts-user-message`),children:n})})},D7=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=tt(),{isInline:r,responseMessage:o,isResponseLoading:a}=ii();if(!r||!o&&!a)return null;if(a)return _.jsx(bc,{});if(!o)return null;const u=l=>_p({event:l,openLinksInNewTab:t,onNavigate:n});return _.jsx("div",{className:W(e,`${z}-prompts-response-container`,`${z}-message-container`),children:_.jsx(Op,{globalClassName:e,openLinksInNewTab:t,text:o.message,onLinkClick:u})})},M7=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=Wn(),{handleCopilotRequestAck:o}=ts(),{status:{isOpen:a}}=Yn(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=ii(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:N,setIsResponseLoading:x}=If(),[C,A]=D.useState(null);D.useEffect(()=>{if(!d||C)return;const Y=document.getElementById(d);Y&&A(Y)},[d,C]);const U=D.useCallback(Y=>{if(!r||!f||!p)return;const R=ne=>{l?(N(null),v(Y),w(ne.id),x(!0)):(a||ri(!0),o(ne))},$={userPrompt:Y,clientContext:B({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim($,R);break;case"search":r.search(B({searchParams:p},$),R);break;case"browse":r.browse(B({browseParams:p},$),R);break;case"pdp":r.productView(B(B({},p),$),R);break}},[r,l,f,p,a,w,N,v,x,o]);return!n||!u||!C||!f?null:co.createPortal(_.jsxs("div",{className:W(e,`${z}-prompts-extension-container`),style:t,children:[T&&_.jsx(N7,{onSubmit:U}),!T&&_.jsx(P7,{}),y&&_.jsx(R7,{sendCopilotPrompt:U}),_.jsxs("div",{className:W(e,`${z}-prompts-extension-messages-container`),children:[_.jsx(L7,{}),_.jsx(D7,{})]})]}),C)},F7=()=>_.jsxs(_.Fragment,{children:[_.jsx(k7,{}),_.jsx(M7,{})]}),w_=e=>_.jsxs(q1,me(B({},e),{children:[_.jsx(A7,{}),_.jsx(F7,{})]}));var wc={},__;function B7(){if(__)return wc;__=1;var e=K1();return wc.createRoot=e.createRoot,wc.hydrateRoot=e.hydrateRoot,wc}var U7=B7();const x_=new WeakMap,S_=(e,t)=>{let n=x_.get(e);n||(n=U7.createRoot(e),x_.set(e,n)),n.render(_.jsx(w_,B({},t)))},H7=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=mn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(es(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),S_(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),es(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l},z7=r=>{var o=r,{timeout:e,elementId:t}=o,n=mn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){es(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){es(!0,"warn","Container element not found for id:",t),es(!0,"warn","Beginning observation for element"),H7(B({elementId:t,timeout:e},n));return}S_(a,n)},j7={search:Wk,browse:Nk,pdp:{setPdpContext:P1,updatePdpProductId:Ok,updatePdpLink:Ik},components:{setEntryType:Ta,toggleWidgetOpen:ri,toggleWidgetMinimized:wa,toggleModalFullscreen:kf,setWidgetType:yl,setWidgetDialogPosition:Nf,togglePromptsExtensionOpen:O1,togglePromptsExtensionInline:I1,loadPromptsComponent:Hk,getAskCimPrompts:Mk,getSearchPrompts:Fk,getBrowsePrompts:Bk,getProductViewPrompts:Uk},session:zk},$7=()=>Object.freeze({search:Object.freeze(xt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(Er.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType});Fe.CopilotDialog=E_,Fe.CopilotEmbed=m_,Fe.CopilotModal=y_,Fe.CopilotWidget=w_,Fe.CopilotWidgetProvider=q1,Fe.eventHandlers=j7,Fe.injectCopilotWidget=z7,Fe.resolveTheme=pg,Fe.state=$7,Fe.themes=Vv,Fe.useCopilot=Rr,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
|
|
43
|
+
`))+1))}const u="#".repeat(o),l=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,M({before:"# ",after:`
|
|
44
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=bu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),l(),f}rx.peek=s9;function rx(e){return e.value||""}function s9(){return"<"}ix.peek=a9;function ix(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,M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(l=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({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,M({before:f,after:o},d.current()))),f+=d.move(o),l()),f+=d.move(")"),u(),f}function a9(){return"!"}ox.peek=u9;function ox(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,M({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),M({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 u9(){return"!"}sx.peek=l9;function sx(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 l9(){return"`"}function ax(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))}ux.peek=c9;function ux(e,t,n,r){const o=Hp(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let l,d;if(ax(e,n)){const p=n.stack;n.stack=[],l=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,M({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,M({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,M({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+o),f+=u.move(n.safe(e.title,M({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),l(),f}function c9(e,t,n){return ax(e,n)?"<":"["}lx.peek=d9;function lx(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,M({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),M({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 d9(){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 f9(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 h9(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 cx(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 p9(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?h9(n):zp(n);const l=e.ordered?u==="."?")":".":f9(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),cx(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 m9(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 g9(e,t,n,r){const o=m9(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 E9(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const y9=Vl(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function b9(e,t,n,r){return(e.children.some(function(u){return y9(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function T9(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}dx.peek=w9;function dx(e,t,n,r){const o=T9(n),a=n.enter("strong"),u=n.createTracker(r),l=u.move(o+o);let d=u.move(n.containerPhrasing(e,M({after:o,before:l},u.current())));const f=d.charCodeAt(0),p=Pc(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=bu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),T=Pc(r.after.charCodeAt(0),m,o);T.inside&&(d=d.slice(0,-1)+bu(m));const y=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:T.outside,before:p.outside},l+d+y}function w9(e,t,n){return n.options.strong||"*"}function x9(e,t,n,r){return n.safe(e.value,r)}function _9(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 S9(e,t,n){const r=(cx(n)+(n.options.ruleSpaces?" ":"")).repeat(_9(n));return n.options.ruleSpaces?r.slice(0,-1):r}const fx={blockquote:WF,break:tx,code:ZF,definition:t9,emphasis:nx,hardBreak:tx,heading:o9,html:rx,image:ix,imageReference:ox,inlineCode:sx,link:ux,linkReference:lx,list:p9,listItem:g9,paragraph:E9,root:b9,strong:dx,text:x9,thematicBreak:S9};function v9(){return{enter:{table:A9,tableData:hx,tableHeader:hx,tableRow:k9},exit:{codeText:P9,table:C9,tableData:jp,tableHeader:jp,tableRow:jp}}}function A9(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 C9(e){this.exit(e),this.data.inTable=void 0}function k9(e){this.enter({type:"tableRow",children:[]},e)}function jp(e){this.exit(e)}function hx(e){this.enter({type:"tableCell",children:[]},e)}function P9(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,N9));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function N9(e,t){return t==="|"?t:e}function O9(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(M({},P),{before:a,after:a}));return C(),_(),A}function f(y,w){return qF(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=fx.inlineCode(y,w,v);return v.stack.includes("tableCell")&&(P=P.replace(/\|/g,"\\$&")),P}}function I9(){return{exit:{taskListCheckValueChecked:px,taskListCheckValueUnchecked:px,paragraph:L9}}}function R9(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:D9}}}function px(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function L9(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 D9(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=fx.listItem(e,t,n,M(M({},r),l.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function M9(){return[pF(),DF(),UF(),v9(),I9()]}function F9(e){return{extensions:[mF(),MF(e),HF(),O9(e),R9()]}}const B9={tokenize:V9,partial:!0},mx={tokenize:q9,partial:!0},gx={tokenize:Y9,partial:!0},Ex={tokenize:W9,partial:!0},U9={tokenize:G9,partial:!0},yx={name:"wwwAutolink",tokenize:j9,previous:Tx},bx={name:"protocolAutolink",tokenize:$9,previous:wx},Ai={name:"emailAutolink",tokenize:z9,previous:xx},si={};function H9(){return{text:si}}let Yo=48;for(;Yo<123;)si[Yo]=Ai,Yo++,Yo===58?Yo=65:Yo===91&&(Yo=97);si[43]=Ai,si[45]=Ai,si[46]=Ai,si[95]=Ai,si[72]=[Ai,bx],si[104]=[Ai,bx],si[87]=[Ai,yx],si[119]=[Ai,yx];function z9(e,t,n){const r=this;let o,a;return u;function u(m){return!$p(m)||!xx.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(U9,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&&Mn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function j9(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Tx.call(r,r.previous)||Vp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(B9,e.attempt(mx,e.attempt(gx,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function $9(e,t,n){const r=this;let o="",a=!1;return u;function u(m){return(m===72||m===104)&&wx.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||Ml(m)||mt(m)||No(m)||Fl(m)?n(m):e.attempt(mx,e.attempt(gx,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function V9(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 q9(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(Ex,d,l)(f):f===null||mt(f)||No(f)||f!==45&&Fl(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 Y9(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(Ex,t,a)(u):u===null||mt(u)||No(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function W9(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)||No(l)?t(l):n(l)}function o(l){return l===null||l===40||l===91||mt(l)||No(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 G9(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return vn(a)?n(a):t(a)}}function Tx(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||mt(e)}function wx(e){return!Mn(e)}function xx(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 X9={tokenize:rB,partial:!0};function K9(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:eB,continuation:{tokenize:tB},exit:nB}},text:{91:{name:"gfmFootnoteCall",tokenize:Z9},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:Q9,resolveTo:J9}}}}function Q9(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=Ir(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function J9(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},l=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...l),e}function Z9(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(Ir(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 eB(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=Ir(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 tB(e,t,n){return e.check(Ya,t,e.attempt(X9,t,n))}function nB(e){e.exit("gfmFootnoteDefinition")}function rB(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 iB(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&&sr(T,T.length,0,Bl(y,u.slice(f+1,d),l)),sr(T,T.length,0,[["exit",m,l],["enter",u[d][1],l],["exit",u[d][1],l],["exit",p,l]]),sr(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=xs(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"),_=xs(w);return P._open=!_||_===2&&!!v,P._close=!v||v===2&&!!_,l(w)}}}class oB{constructor(){this.map=[]}add(t,n,r){sB(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 sB(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 aB(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 uB(){return{flow:{null:{name:"table",tokenize:lB,resolveAll:cB}}}}function lB(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 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):Je(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,Je(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 Je(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 Je(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)):Je(q)?it(e,z,"whitespace")(q):(e.enter("data"),te(q))}function te(q){return q===null||q===124||mt(q)?(e.exit("data"),z(q)):(e.consume(q),q===92?he:te)}function he(q){return q===92||q===124?(e.consume(q),te):te(q)}}function cB(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 oB;for(;++n<e.length;){const y=e[n],w=y[1];y[0]==="enter"?w.type==="tableHead"?(l=!1,d!==0&&(_x(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=Nc(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=Nc(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=Nc(T,t,a,o,n,m)):u[1]!==0&&(m=Nc(T,t,u,o,n,m)),o=0):o&&(w.type==="data"||w.type==="tableDelimiterMarker"||w.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&_x(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=aB(t.events,n))}return e}function Nc(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",l="tableContent";n[0]!==0&&(a.end=Object.assign({},Ys(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ys(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=Ys(t.events,n[2]),p=Ys(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({},Ys(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function _x(e,t,n,r,o){const a=[],u=Ys(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 Ys(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const dB={name:"tasklistCheck",tokenize:hB};function fB(){return{text:{91:dB}}}function hB(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):Je(d)?e.check({tokenize:pB},t,n)(d):n(d)}}function pB(e,t,n){return it(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function mB(e){return XE([H9(),K9(),iB(e),uB(),fB()])}const gB={};function EB(e){const t=this,n=e||gB,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(mB(n)),a.push(M9()),u.push(F9(n))}const Oc=()=>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 yB(e){return/^tel:/i.test(e)?e:zy(e)}const qp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:o})=>x.jsx("div",{className:W(e,`${j}-markdown`),children:x.jsx(Hy,{remarkPlugins:[EB],rehypePlugins:[jb],urlTransform:yB,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(Xb,{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(Oc,{}):x.jsx("span",{children:u})},children:r+(n?`<span className='${j}-blinking-cursor'></span>`:"")})}),bB=({globalClassName:e,message:t})=>{const[n,r]=I.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(pE,{"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(Rl,{className:W(e,`${j}-thought-context-button`),onClick:l,children:n?x.jsxs(x.Fragment,{children:["Hide ",x.jsx(zP,{"aria-hidden":"true"})]}):x.jsxs(x.Fragment,{children:["Context ",x.jsx(jP,{"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})})]})]})},TB=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?x.jsx(bB,{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(pE,{"aria-hidden":"true"})}),x.jsx("i",{className:W(e,`${j}-progress-text`,"embedded"),children:t.message})]}),wB=({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(ys,{"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})]})},Sx=e=>{var d,f;const{configModule:t}=et(),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}},Ic=({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":""}`}),vx=({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)})},Tu=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>x.jsx("span",{className:W(e,`${j}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),xB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=Sx(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(gE,{"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(Ic,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),x.jsx(vx,{globalClassName:e,facetFiltersList:a,message:t}),x.jsx(Tu,{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(gE,{"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(Ic,{isWidgetStandalone:!1,filterCount:u})]}),x.jsx(Tu,{globalClassName:e,timestamp:l,isWidgetStandalone:!1})]})},_B=({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(ys,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&x.jsx(Ic,{isWidgetStandalone:!0,globalClassName:e,filterCount:l})]}),x.jsx(vx,{globalClassName:e,facetFiltersList:u,message:a})]}),x.jsx(Tu,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),SB=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:l}=Sx(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}=I.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(_B,{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(ys,{"aria-hidden":"true"})}),x.jsx("p",{className:W(e,`${j}-text bold embedded`),children:T||m}),u.length>0&&x.jsx(Ic,{isWidgetStandalone:!1,filterCount:l})]}),x.jsx(Tu,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},Ax=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:o,isWidgetStandalone:a,handleSuggestionClick:u})=>{var w;const{isLoading:l,isResponseLoading:d}=Xr(),{onNavigate:f}=et(),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(xB,{globalClassName:t,isWidgetStandalone:a,message:e}):x.jsx(SB,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return x.jsx(wB,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return x.jsx(uF,{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(aF,{message:e,isWidgetStandalone:a});case"display_products":return x.jsx(sF,{message:e,isWidgetStandalone:a});case"progress":return x.jsx(TB,{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}},vB=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:o}=et(),{groupedMessages:a}=Yn(),{entryType:u}=ir();return x.jsxs(x.Fragment,{children:[u==="ask_cim"&&x.jsx(nF,{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(Ax,{id:p.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),x.jsx(Tu,{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(Ax,{id:l.message.id,openLinksInNewTab:r,resetConversationMessage:o,entryType:u,globalClassName:n,isWidgetStandalone:e,message:l.message,handleSuggestionClick:t})},l.message.id);return null})]})},AB=4e3,CB=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,AB),kB=({message:e,announcementKey:t})=>{const[n,r]=I.useState("");return I.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})},PB=()=>{const{groupedMessages:e}=Yn(),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(kB,{message:n?CB(n.message):"",announcementKey:n==null?void 0:n.id})},NB=({isOpen:e}={})=>{const{messages:t}=Xr(),{autoScroll:n}=et(),r=I.useRef(null);return I.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),I.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},OB={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Yp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:o})=>{const a=NB({isOpen:e});return x.jsxs(x.Fragment,{children:[x.jsx(vB,{isWidgetStandalone:t,handleSuggestionClick:r}),x.jsx(PB,{}),n&&x.jsx("div",{style:M(M({},OB),o),children:x.jsx(Oc,{})}),x.jsx("div",{ref:a})]})},Cx=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r}=et(),{copilot:o,isLoading:a,isConnecting:u,isConnectionSlow:l,pendingInput:d,inputError:f,handleUserInput:p,prepareUserInput:m,handleSuggestion:T,resetConversation:y}=Xr();return Lp()?o?x.jsxs("div",{className:W(t,`${j}-container`,`${j}-embedded-chat`,e),style:n,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(uM,{componentType:"chat",children:[x.jsx(Ww,{componentType:"chat"}),x.jsx(Jb,{componentType:"chat",onClearChat:y})]})})]}):x.jsx("div",{children:"Loading Copilot..."}):null},kx=e=>{var d;const{children:t,disabled:n}=e,[r,o]=I.useState((d=e.container)==null?void 0:d.current),a=I.useSyncExternalStore(RB,()=>!1,()=>!0),{getRootNode:u}=vc();if(I.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:IB(u);return x.jsx(x.Fragment,{children:I.Children.map(t,f=>Co.createPortal(f,l))})},IB=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return Bo(n)?n:Zr(t).body},RB=()=>()=>{},LB=["toggleDialogPosition","minimize","clearChat"],DB=["toggleFullscreen","minimize","clearChat"],Px=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=et(),{mode:a,status:u,dialogPosition:l,isDialogFullHeight:d,dialogWidth:f}=ir(),{copilot:p,isLoading:m,isConnecting:T,isConnectionSlow:y,pendingInput:w,inputError:v,handleUserInput:P,prepareUserInput:_,handleSuggestion:C,resetConversation:A}=Xr(),H=Lp(),{isOpen:U}=u||{},L=a==="standalone",z=()=>{yi(!1),Qf()};return p?x.jsx(jw,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:H,"aria-label":o==null?void 0:o.headerText,initialFocusEl:Kf,children:x.jsx(kx,{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:L,embedded:!L}),style:f?{width:f}:void 0,children:[x.jsx(Yw,{componentType:"dialog",overflowActions:LB,onClearChat:A,onClose:z}),x.jsx("div",{className:W(t,`${j}-message-container`,`container-${r}`,{standalone:L,embedded:!L}),role:"region","aria-label":"Conversation",children:x.jsx(Yp,{isWidgetStandalone:L,isLoading:m,isOpen:U,handleSuggestionClick:C})}),x.jsx(Yh,{componentType:"dialog",isLoading:m,isConnecting:T,isConnectionSlow:y,pendingInput:w,inputError:v,onSubmit:P,prepareSubmit:_})]})})})}):x.jsx("div",{children:"Loading Copilot..."})},Nx=()=>{const{themeClassName:e,globalClassName:t,themeVariables:n,messageAlignment:r,headerConfig:o}=et(),{mode:a,status:u,isModalFullscreen:l}=ir(),{copilot:d,isLoading:f,isConnecting:p,isConnectionSlow:m,pendingInput:T,inputError:y,handleUserInput:w,prepareUserInput:v,handleSuggestion:P,resetConversation:_}=Xr(),{isOpen:C}=u||{},A=a==="standalone",H=Lp(),U=({open:z})=>{if(z){yi(!0);return}L()},L=()=>{yi(!1),Qf()};return H?d?x.jsx(jw,{lazyMount:!0,unmountOnExit:!0,open:H,"aria-label":o==null?void 0:o.headerText,onOpenChange:U,initialFocusEl:Kf,children:x.jsx(kx,{children:x.jsxs("div",{className:W(t,`${j}-modal-container`),style:n,children:[x.jsx(Fw,{className:W(t,`${j}-modal-backdrop`)}),x.jsx(Np,{className:W(t,`${j}-container`,`${j}-modal`,e,{fullscreen:l,standalone:A,embedded:!A}),children:x.jsxs(Pp,{className:W(t,`${j}-modal-content`,{standalone:A,embedded:!A}),children:[x.jsx(Yw,{componentType:"modal",overflowActions:DB,onClearChat:_,onClose:L}),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},MB=()=>{const e=ir(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?x.jsx(FP,{}):t==="dialog"?x.jsx(Px,{}):t==="modal"?x.jsx(Nx,{}):x.jsx(Cx,{})},FB=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:o}=qf();I.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 Hk(a),()=>{zk(a)}},[e,t,n,r,o])},BB=()=>{const{copilot:e,connected:t}=Yn(),{entryType:n,activePromptsId:r,params:o}=bi(),{setIsInitialized:a,setActivePromptsId:u,setPromptsMessage:l,setResponseMessage:d,setIsResponseLoading:f}=qf(),{getCopilotSuggestions:p}=eE();FB();const m=I.useCallback(v=>{if(!n||!v)return;p(v,n,_=>{u(_.id)})},[n,p,u]);I.useEffect(()=>{!e||!t||!n||!o||m(o)},[e,t,n,o,m]);const T=I.useCallback(v=>{v.eventSourceId===r&&(l(v),u(v.id),a(!0))},[r,l,u,a]),y=I.useCallback(v=>{(v==null?void 0:v.eventSourceId)===r&&(d(v),f(!1))},[r,d,f]),w=I.useCallback(()=>{a(!0),f(!1)},[a,f]);return I.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},Ox={copilot:"Ask Copilot",messaging:"Ask a question"},UB=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=et(),{placeholder:o,isResponseLoading:a}=bi(),u=o||Ox[r],[l,d]=I.useState(""),f=t||a,p=T=>{if(T.preventDefault(),f)return;const y=l.trim();y&&(e(y),d(""))},m=T=>{f&&T.preventDefault()};return 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(Ti,{className:W(n,`${j}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:x.jsx(ys,{}),disabled:f})]})},HB=()=>{const{globalClassName:e,mode:t}=et(),{placeholder:n}=bi(),r=n||Ox[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:r})]})},Ix=({label:e,disabled:t=!1,onClick:n})=>{var l;const{globalClassName:r,suggestionButtonConfig:o}=et(),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})]})},zB="Ask me something else",jB=({label:e,disabled:t=!1})=>x.jsx(Ix,{label:e||zB,disabled:t,onClick:()=>yi(!0)}),$B=({sendCopilotPrompt:e})=>{var P,_;const{globalClassName:t}=et(),{promptsMessage:n,isResponseLoading:r,isInitialized:o,isInline:a,askElseButtonLabel:u,staticQuestions:l,staticQuestionsStrategy:d,disableAskElseButton:f}=bi(),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(Oc,{}),m.map(C=>x.jsx(Ix,{label:C,disabled:r,onClick:v(C)},C)),w&&x.jsx(jB,{label:u,disabled:r})]})},VB=()=>{const{globalClassName:e}=et(),{isInline:t,userPrompt:n}=bi();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})})},qB=()=>{const{globalClassName:e,openLinksInNewTab:t,onNavigate:n}=et(),{isInline:r,responseMessage:o,isResponseLoading:a}=bi();if(!r||!o&&!a)return null;if(a)return x.jsx(Oc,{});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})})},YB=()=>{const{globalClassName:e,themeVariables:t}=et(),{connected:n,copilot:r}=Yn(),{handleCopilotRequestAck:o}=Ao(),{status:{isOpen:a}}=ir(),{isOpen:u,isInline:l,elementId:d,entryType:f,params:p,promptsDisplay:m}=bi(),T=m!=="buttons",y=m!=="input",{setActivePromptsId:w,setUserPrompt:v,setResponseMessage:P,setIsResponseLoading:_}=qf(),[C,A]=I.useState(null);I.useEffect(()=>{if(!d||C)return;const U=document.getElementById(d);U&&A(U)},[d,C]);const H=I.useCallback(U=>{if(!r||!f||!p)return;const L=te=>{l?(P(null),v(U),w(te.id),_(!0)):(a||yi(!0),o(te))},z={userPrompt:U,clientContext:M({_cimEventSource:"prompts-extension"},l?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(z,L);break;case"search":r.search(M({searchParams:p},z),L);break;case"browse":r.browse(M({browseParams:p},z),L);break;case"pdp":r.productView(M(M({},p),z),L);break}},[r,l,f,p,a,w,P,v,_,o]);return!n||!u||!C||!f?null:Co.createPortal(x.jsxs("div",{className:W(e,`${j}-prompts-extension-container`),style:t,children:[T&&x.jsx(UB,{onSubmit:H}),!T&&x.jsx(HB,{}),y&&x.jsx($B,{sendCopilotPrompt:H}),x.jsxs("div",{className:W(e,`${j}-prompts-extension-messages-container`),children:[x.jsx(VB,{}),x.jsx(qB,{})]})]}),C)},WB=()=>x.jsxs(x.Fragment,{children:[x.jsx(BB,{}),x.jsx(YB,{})]}),Rx=e=>x.jsxs(rE,ge(M({},e),{children:[x.jsx(MB,{}),x.jsx(WB,{})]}));var Rc={},Lx;function GB(){if(Lx)return Rc;Lx=1;var e=uE();return Rc.createRoot=e.createRoot,Rc.hydrateRoot=e.hydrateRoot,Rc}var XB=GB();const Dx=new WeakMap,Mx=(e,t)=>{let n=Dx.get(e);n||(n=XB.createRoot(e),Dx.set(e,n)),n.render(x.jsx(Rx,M({},t)))},KB=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=wn(o,["elementId","timeout"]);let a;const u=(d,f)=>{for(const p of d)if(p.type==="childList"&&p.addedNodes.length)for(const m of p.addedNodes)m.nodeType===Node.ELEMENT_NODE&&m.id===e&&(Es(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),Mx(m,n))},l=new MutationObserver(u);return l.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{l.disconnect(),Es(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),l},QB=r=>{var o=r,{timeout:e,elementId:t}=o,n=wn(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Es(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Es(!0,"warn","Container element not found for id:",t),Es(!0,"warn","Beginning observation for element"),KB(M({elementId:t,timeout:e},n));return}Mx(a,n)},JB={search:Zk,browse:Dk,pdp:{setPdpContext:H1,updatePdpProductId:Fk,updatePdpLink:Bk},components:{setEntryType:La,toggleWidgetOpen:yi,toggleWidgetMinimized:Da,toggleModalFullscreen:zf,setWidgetType:Nl,setWidgetDialogPosition:jf,togglePromptsExtensionOpen:z1,togglePromptsExtensionInline:j1,loadPromptsComponent:Yk,getAskCimPrompts:jk,getSearchPrompts:$k,getBrowsePrompts:Vk,getProductViewPrompts:qk},session:Wk},ZB=()=>Object.freeze({search:Object.freeze(_t.state),browse:Object.freeze(ct.state),pdp:Object.freeze(Nr.state),isConnected:Qe.state.connected,isOpen:Qe.isOpen,entryType:Qe.entryType});Me.CopilotDialog=Px,Me.CopilotEmbed=Cx,Me.CopilotModal=Nx,Me.CopilotWidget=Rx,Me.CopilotWidgetProvider=rE,Me.eventHandlers=JB,Me.injectCopilotWidget=QB,Me.resolveTheme=S0,Me.state=ZB,Me.themes=Kv,Me.useCopilot=Xr,Object.defineProperty(Me,Symbol.toStringTag,{value:"Module"})}));
|