@cimulate/copilot-widget 1.1.0 → 1.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,43 +1,43 @@
1
- (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie["cimulate-copilot-widget"]={}))})(this,function(Ie){"use strict";var jF=Object.defineProperty,$F=Object.defineProperties;var VF=Object.getOwnPropertyDescriptors;var ed=Object.getOwnPropertySymbols;var I2=Object.prototype.hasOwnProperty,P2=Object.prototype.propertyIsEnumerable;var Lo=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),qF=Ie=>{throw TypeError(Ie)},td=Math.pow,Fm=(Ie,Fe,Ge)=>Fe in Ie?jF(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ge}):Ie[Fe]=Ge,U=(Ie,Fe)=>{for(var Ge in Fe||(Fe={}))I2.call(Fe,Ge)&&Fm(Ie,Ge,Fe[Ge]);if(ed)for(var Ge of ed(Fe))P2.call(Fe,Ge)&&Fm(Ie,Ge,Fe[Ge]);return Ie},be=(Ie,Fe)=>$F(Ie,VF(Fe));var en=(Ie,Fe)=>{var Ge={};for(var lt in Ie)I2.call(Ie,lt)&&Fe.indexOf(lt)<0&&(Ge[lt]=Ie[lt]);if(Ie!=null&&ed)for(var lt of ed(Ie))Fe.indexOf(lt)<0&&P2.call(Ie,lt)&&(Ge[lt]=Ie[lt]);return Ge};var ve=(Ie,Fe,Ge)=>Fm(Ie,typeof Fe!="symbol"?Fe+"":Fe,Ge);var nt=(Ie,Fe,Ge)=>new Promise((lt,vt)=>{var yt=It=>{try{jt(Ge.next(It))}catch(yn){vt(yn)}},Pe=It=>{try{jt(Ge.throw(It))}catch(yn){vt(yn)}},jt=It=>It.done?lt(It.value):Promise.resolve(It.value).then(yt,Pe);jt((Ge=Ge.apply(Ie,Fe)).next())}),Ur=function(Ie,Fe){this[0]=Ie,this[1]=Fe},nd=(Ie,Fe,Ge)=>{var lt=(Pe,jt,It,yn)=>{try{var Ss=Ge[Pe](jt),Do=(jt=Ss.value)instanceof Ur,rd=Ss.done;Promise.resolve(Do?jt[0]:jt).then(rr=>Do?lt(Pe==="return"?Pe:"next",jt[1]?{done:rr.done,value:rr.value}:rr,It,yn):It({value:rr,done:rd})).catch(rr=>lt("throw",rr,It,yn))}catch(rr){yn(rr)}},vt=Pe=>yt[Pe]=jt=>new Promise((It,yn)=>lt(Pe,jt,It,yn)),yt={};return Ge=Ge.apply(Ie,Fe),yt[Lo("asyncIterator")]=()=>yt,vt("next"),vt("throw"),vt("return"),yt},Bm=Ie=>{var Fe=Ie[Lo("asyncIterator")],Ge=!1,lt,vt={};return Fe==null?(Fe=Ie[Lo("iterator")](),lt=yt=>vt[yt]=Pe=>Fe[yt](Pe)):(Fe=Fe.call(Ie),lt=yt=>vt[yt]=Pe=>{if(Ge){if(Ge=!1,yt==="throw")throw Pe;return Pe}return Ge=!0,{done:!1,value:new Ur(new Promise(jt=>{var It=Fe[yt](Pe);It instanceof Object||qF("Object expected"),jt(It)}),1)}}),vt[Lo("iterator")]=()=>vt,lt("next"),"throw"in Fe?lt("throw"):vt.throw=yt=>{throw yt},"return"in Fe&&lt("return"),vt},R2=(Ie,Fe,Ge)=>(Fe=Ie[Lo("asyncIterator")])?Fe.call(Ie):(Ie=Ie[Lo("iterator")](),Fe={},Ge=(lt,vt)=>(vt=Ie[lt])&&(Fe[lt]=yt=>new Promise((Pe,jt,It)=>(yt=vt.call(Ie,yt),It=yt.done,Promise.resolve(yt.value).then(yn=>Pe({value:yn,done:It}),jt)))),Ge("next"),Ge("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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;background-color:var(--base-color);border-radius:4px;border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;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-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.modal{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{width:100%;height:-webkit-fill-available;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;gap:.5rem}.cim-widget-search-button-icon{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media (min-width: 576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;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);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;color:var(--cim-widget-primary-color)}.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;border-radius:8px;padding:.5rem 1rem;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{margin-right:.5rem}.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;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media (576px <= width <= 768px){.cim-widget-dialog{width:50%}}@media (max-width: 576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media (min-width: 576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media (max-width: 576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media (min-width: 576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
2
- /*$vite$:1*/`,document.head.appendChild(Fe);function Ge(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},vt={},yt={exports:{}},Pe={};var jt;function It(){if(jt)return Pe;jt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),m=Symbol.for("react.lazy"),E=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,S={};function w(R,K,O){this.props=R,this.context=K,this.refs=S,this.updater=O||T}w.prototype.isReactComponent={},w.prototype.setState=function(R,K){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,K,"setState")},w.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function N(){}N.prototype=w.prototype;function B(R,K,O){this.props=R,this.context=K,this.refs=S,this.updater=O||T}var D=B.prototype=new N;D.constructor=B,_(D,w.prototype),D.isPureReactComponent=!0;var Y=Array.isArray,W=Object.prototype.hasOwnProperty,F={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(R,K,O){var _e,Re={},Oe=null,We=null;if(K!=null)for(_e in K.ref!==void 0&&(We=K.ref),K.key!==void 0&&(Oe=""+K.key),K)W.call(K,_e)&&!te.hasOwnProperty(_e)&&(Re[_e]=K[_e]);var qe=arguments.length-2;if(qe===1)Re.children=O;else if(1<qe){for(var Ze=Array(qe),Nt=0;Nt<qe;Nt++)Ze[Nt]=arguments[Nt+2];Re.children=Ze}if(R&&R.defaultProps)for(_e in qe=R.defaultProps,qe)Re[_e]===void 0&&(Re[_e]=qe[_e]);return{$$typeof:e,type:R,key:Oe,ref:We,props:Re,_owner:F.current}}function Te(R,K){return{$$typeof:e,type:R.type,key:K,ref:R.ref,props:R.props,_owner:R._owner}}function H(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ne(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return K[O]})}var fe=/\/+/g;function de(R,K){return typeof R=="object"&&R!==null&&R.key!=null?ne(""+R.key):K.toString(36)}function ae(R,K,O,_e,Re){var Oe=typeof R;(Oe==="undefined"||Oe==="boolean")&&(R=null);var We=!1;if(R===null)We=!0;else switch(Oe){case"string":case"number":We=!0;break;case"object":switch(R.$$typeof){case e:case t:We=!0}}if(We)return We=R,Re=Re(We),R=_e===""?"."+de(We,0):_e,Y(Re)?(O="",R!=null&&(O=R.replace(fe,"$&/")+"/"),ae(Re,K,O,"",function(Nt){return Nt})):Re!=null&&(H(Re)&&(Re=Te(Re,O+(!Re.key||We&&We.key===Re.key?"":(""+Re.key).replace(fe,"$&/")+"/")+R)),K.push(Re)),1;if(We=0,_e=_e===""?".":_e+":",Y(R))for(var qe=0;qe<R.length;qe++){Oe=R[qe];var Ze=_e+de(Oe,qe);We+=ae(Oe,K,O,Ze,Re)}else if(Ze=b(R),typeof Ze=="function")for(R=Ze.call(R),qe=0;!(Oe=R.next()).done;)Oe=Oe.value,Ze=_e+de(Oe,qe++),We+=ae(Oe,K,O,Ze,Re);else if(Oe==="object")throw K=String(R),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return We}function ye(R,K,O){if(R==null)return R;var _e=[],Re=0;return ae(R,_e,"","",function(Oe){return K.call(O,Oe,Re++)}),_e}function we(R){if(R._status===-1){var K=R._result;K=K(),K.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=K)}if(R._status===1)return R._result.default;throw R._result}var ue={current:null},q={transition:null},re={ReactCurrentDispatcher:ue,ReactCurrentBatchConfig:q,ReactCurrentOwner:F};function A(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:ye,forEach:function(R,K,O){ye(R,function(){K.apply(this,arguments)},O)},count:function(R){var K=0;return ye(R,function(){K++}),K},toArray:function(R){return ye(R,function(K){return K})||[]},only:function(R){if(!H(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Pe.Component=w,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=B,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=re,Pe.act=A,Pe.cloneElement=function(R,K,O){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Re=R.key,Oe=R.ref,We=R._owner;if(K!=null){if(K.ref!==void 0&&(Oe=K.ref,We=F.current),K.key!==void 0&&(Re=""+K.key),R.type&&R.type.defaultProps)var qe=R.type.defaultProps;for(Ze in K)W.call(K,Ze)&&!te.hasOwnProperty(Ze)&&(_e[Ze]=K[Ze]===void 0&&qe!==void 0?qe[Ze]:K[Ze])}var Ze=arguments.length-2;if(Ze===1)_e.children=O;else if(1<Ze){qe=Array(Ze);for(var Nt=0;Nt<Ze;Nt++)qe[Nt]=arguments[Nt+2];_e.children=qe}return{$$typeof:e,type:R.type,key:Re,ref:Oe,props:_e,_owner:We}},Pe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Pe.createElement=ge,Pe.createFactory=function(R){var K=ge.bind(null,R);return K.type=R,K},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=H,Pe.lazy=function(R){return{$$typeof:m,_payload:{_status:-1,_result:R},_init:we}},Pe.memo=function(R,K){return{$$typeof:h,type:R,compare:K===void 0?null:K}},Pe.startTransition=function(R){var K=q.transition;q.transition={};try{R()}finally{q.transition=K}},Pe.unstable_act=A,Pe.useCallback=function(R,K){return ue.current.useCallback(R,K)},Pe.useContext=function(R){return ue.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return ue.current.useDeferredValue(R)},Pe.useEffect=function(R,K){return ue.current.useEffect(R,K)},Pe.useId=function(){return ue.current.useId()},Pe.useImperativeHandle=function(R,K,O){return ue.current.useImperativeHandle(R,K,O)},Pe.useInsertionEffect=function(R,K){return ue.current.useInsertionEffect(R,K)},Pe.useLayoutEffect=function(R,K){return ue.current.useLayoutEffect(R,K)},Pe.useMemo=function(R,K){return ue.current.useMemo(R,K)},Pe.useReducer=function(R,K,O){return ue.current.useReducer(R,K,O)},Pe.useRef=function(R){return ue.current.useRef(R)},Pe.useState=function(R){return ue.current.useState(R)},Pe.useSyncExternalStore=function(R,K,O){return ue.current.useSyncExternalStore(R,K,O)},Pe.useTransition=function(){return ue.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function Ss(){return yn||(yn=1,yt.exports=It()),yt.exports}var Do;function rd(){if(Do)return vt;Do=1;var e=Ss(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,h){var m,E={},b=null,T=null;h!==void 0&&(b=""+h),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(m in d)r.call(d,m)&&!a.hasOwnProperty(m)&&(E[m]=d[m]);if(c&&c.defaultProps)for(m in d=c.defaultProps,d)E[m]===void 0&&(E[m]=d[m]);return{$$typeof:t,type:c,key:b,ref:T,props:E,_owner:o.current}}return vt.Fragment=n,vt.jsx=u,vt.jsxs=u,vt}var rr;function F2(){return rr||(rr=1,lt.exports=rd()),lt.exports}var v=F2();const br=Object.create(null);br.open="0",br.close="1",br.ping="2",br.pong="3",br.message="4",br.upgrade="5",br.noop="6";const yu=Object.create(null);Object.keys(br).forEach(e=>{yu[br[e]]=e});const id={type:"error",data:"parser error"},Um=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",Hm=typeof ArrayBuffer=="function",zm=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,sd=({type:e,data:t},n,r)=>Um&&t instanceof Blob?n?r(t):jm(t,r):Hm&&(t instanceof ArrayBuffer||zm(t))?n?r(t):jm(new Blob([t]),r):r(br[e]+(t||"")),jm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function $m(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let od;function B2(e,t){if(Um&&e.data instanceof Blob)return e.data.arrayBuffer().then($m).then(t);if(Hm&&(e.data instanceof ArrayBuffer||zm(e.data)))return t($m(e.data));sd(e,!1,n=>{od||(od=new TextEncoder),t(od.encode(n))})}const Vm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Mo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Vm.length;e++)Mo[Vm.charCodeAt(e)]=e;const U2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const h=new ArrayBuffer(t),m=new Uint8Array(h);for(r=0;r<n;r+=4)a=Mo[e.charCodeAt(r)],u=Mo[e.charCodeAt(r+1)],c=Mo[e.charCodeAt(r+2)],d=Mo[e.charCodeAt(r+3)],m[o++]=a<<2|u>>4,m[o++]=(u&15)<<4|c>>2,m[o++]=(c&3)<<6|d&63;return h},H2=typeof ArrayBuffer=="function",ad=(e,t)=>{if(typeof e!="string")return{type:"message",data:qm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:z2(e.substring(1),t)}:yu[n]?e.length>1?{type:yu[n],data:e.substring(1)}:{type:yu[n]}:id},z2=(e,t)=>{if(H2){const n=U2(e);return qm(n,t)}else return{base64:!0,data:e}},qm=(e,t)=>{switch(t){case"blob":return e instanceof Blob?e:new Blob([e]);case"arraybuffer":default:return e instanceof ArrayBuffer?e:e.buffer}},Ym="",j2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{sd(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Ym))})})},$2=(e,t)=>{const n=e.split(Ym),r=[];for(let o=0;o<n.length;o++){const a=ad(n[o],t);if(r.push(a),a.type==="error")break}return r};function V2(){return new TransformStream({transform(e,t){B2(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 ud;function Tu(e){return e.reduce((t,n)=>t+n.length,0)}function bu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let o=0;o<t;o++)n[o]=e[0][r++],r===e[0].length&&(e.shift(),r=0);return e.length&&r<e[0].length&&(e[0]=e[0].slice(r)),n}function q2(e,t){ud||(ud=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Tu(n)<1)break;const d=bu(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(Tu(n)<2)break;const d=bu(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Tu(n)<8)break;const d=bu(n,8),h=new DataView(d.buffer,d.byteOffset,d.length),m=h.getUint32(0);if(m>Math.pow(2,21)-1){c.enqueue(id);break}o=m*Math.pow(2,32)+h.getUint32(4),r=3}else{if(Tu(n)<o)break;const d=bu(n,o);c.enqueue(ad(a?d:ud.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(id);break}}}})}const Wm=4;function Mt(e){if(e)return Y2(e)}function Y2(e){for(var t in Mt.prototype)e[t]=Mt.prototype[t];return e}Mt.prototype.on=Mt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mt.prototype.off=Mt.prototype.removeListener=Mt.prototype.removeAllListeners=Mt.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},Mt.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},Mt.prototype.emitReserved=Mt.prototype.emit,Mt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mt.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _u=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),W2="arraybuffer";function YF(){}function Gm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const G2=jn.setTimeout,K2=jn.clearTimeout;function xu(e,t){t.useNativeTimers?(e.setTimeoutFn=G2.bind(jn),e.clearTimeoutFn=K2.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const Q2=1.33;function X2(e){return typeof e=="string"?J2(e):Math.ceil((e.byteLength||e.size)*Q2)}function J2(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 Km(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function Z2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function eS(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 tS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class ld extends Mt{constructor(t){super(),this.writable=!1,xu(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 tS(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=ad(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=Z2(t);return n.length?"?"+n:""}}class nS extends ld{constructor(){super(...arguments),this._polling=!1}get name(){return"polling"}doOpen(){this._poll()}pause(t){this.readyState="pausing";const n=()=>{this.readyState="paused",t()};if(this._polling||!this.writable){let r=0;this._polling&&(r++,this.once("pollComplete",function(){--r||n()})),this.writable||(r++,this.once("drain",function(){--r||n()}))}else n()}_poll(){this._polling=!0,this.doPoll(),this.emitReserved("poll")}onData(t){const n=r=>{if(this.readyState==="opening"&&r.type==="open"&&this.onOpen(),r.type==="close")return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(r)};$2(t,this.socket.binaryType).forEach(n),this.readyState!=="closed"&&(this._polling=!1,this.emitReserved("pollComplete"),this.readyState==="open"&&this._poll())}doClose(){const t=()=>{this.write([{type:"close"}])};this.readyState==="open"?t():this.once("open",t)}write(t){this.writable=!1,j2(t,n=>{this.doWrite(n,()=>{this.writable=!0,this.emitReserved("drain")})})}uri(){const t=this.opts.secure?"https":"http",n=this.query||{};return this.opts.timestampRequests!==!1&&(n[this.opts.timestampParam]=Km()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Qm=!1;try{Qm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const rS=Qm;function iS(){}class sS extends nS{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 _r extends Mt{constructor(t,n,r){super(),this.createRequest=t,xu(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=Gm(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=_r.requestsCount++,_r.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=iS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.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(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Xm);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,Xm,!1)}}function Xm(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const oS=function(){const e=Jm({xdomain:!1});return e&&e.responseType!==null}();class aS extends sS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=oS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(Jm,this.uri(),t)}}function Jm(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||rS))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Zm=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class uS extends ld{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Zm?{}:Gm(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;sd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}o&&_u(()=>{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]=Km()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const cd=jn.WebSocket||jn.MozWebSocket;class lS extends uS{createSocket(t,n,r){return Zm?new cd(t,n,r):n?new cd(t,n):new cd(t)}doWrite(t,n){this.ws.send(n)}}class cS extends ld{get name(){return"webtransport"}doOpen(){try{this._transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name])}catch(t){return this.emitReserved("error",t)}this._transport.closed.then(()=>{this.onClose()}).catch(t=>{this.onError("webtransport error",t)}),this._transport.ready.then(()=>{this._transport.createBidirectionalStream().then(t=>{const n=q2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=V2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&_u(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const dS={websocket:lS,webtransport:cS,polling:aS},fS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,hS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function dd(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=fS.exec(e||""),a={},u=14;for(;u--;)a[hS[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=pS(a,a.path),a.queryKey=mS(a,a.query),a}function pS(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 mS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const fd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Su=[];fd&&addEventListener("offline",()=>{Su.forEach(e=>e())},!1);class ui extends Mt{constructor(t,n){if(super(),this.binaryType=W2,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=dd(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=dd(n.host).host);xu(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=eS(this.opts.query)),fd&&(this.opts.closeOnBeforeunload&&(this._beforeunloadEventListener=()=>{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this._beforeunloadEventListener,!1)),this.hostname!=="localhost"&&(this._offlineEventListener=()=>{this._onClose("transport close",{description:"network connection lost"})},Su.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Wm,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&&ui.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",ui.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+=X2(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,_u(()=>{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(ui.priorWebsocketSuccess=!1,this.opts.tryAllTransports&&this.transports.length>1&&this.readyState==="opening")return this.transports.shift(),this._open();this.emitReserved("error",t),this._onClose("transport error",t)}_onClose(t,n){if(this.readyState==="opening"||this.readyState==="open"||this.readyState==="closing"){if(this.clearTimeoutFn(this._pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),fd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Su.indexOf(this._offlineEventListener);r!==-1&&Su.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=Wm;class gS extends ui{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;ui.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(m(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,m(),n.close(),n=null)}const u=E=>{const b=new Error("probe error: "+E);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function h(E){n&&E.name!==n.name&&a()}const m=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",h)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",h),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 ES=class extends gS{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>dS[o]).filter(o=>!!o)),super(t,r)}};function yS(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=dd(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 TS=typeof ArrayBuffer=="function",bS=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,e0=Object.prototype.toString,_S=typeof Blob=="function"||typeof Blob!="undefined"&&e0.call(Blob)==="[object BlobConstructor]",xS=typeof File=="function"||typeof File!="undefined"&&e0.call(File)==="[object FileConstructor]";function hd(e){return TS&&(e instanceof ArrayBuffer||bS(e))||_S&&e instanceof Blob||xS&&e instanceof File}function wu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(wu(e[n]))return!0;return!1}if(hd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return wu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&wu(e[n]))return!0;return!1}function SS(e){const t=[],n=e.data,r=e;return r.data=pd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function pd(e,t){if(!e)return e;if(hd(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=pd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=pd(e[r],t));return n}return e}function wS(e,t){return e.data=md(e.data,t),delete e.attachments,e}function md(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]=md(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=md(e[n],t));return e}const AS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"],CS=5;var Xe;(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"})(Xe||(Xe={}));class vS{constructor(t){this.replacer=t}encode(t){return(t.type===Xe.EVENT||t.type===Xe.ACK)&&wu(t)?this.encodeAsBinary({type:t.type===Xe.EVENT?Xe.BINARY_EVENT:Xe.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Xe.BINARY_EVENT||t.type===Xe.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=SS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function t0(e){return Object.prototype.toString.call(e)==="[object Object]"}class gd extends Mt{constructor(t){super(),this.reviver=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===Xe.BINARY_EVENT;r||n.type===Xe.BINARY_ACK?(n.type=r?Xe.EVENT:Xe.ACK,this.reconstructor=new kS(n),n.attachments===0&&super.emitReserved("decoded",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(Xe[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Xe.BINARY_EVENT||r.type===Xe.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");r.attachments=Number(u)}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(gd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Xe.CONNECT:return t0(n);case Xe.DISCONNECT:return n===void 0;case Xe.CONNECT_ERROR:return typeof n=="string"||t0(n);case Xe.EVENT:case Xe.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&AS.indexOf(n[0])===-1);case Xe.ACK:case Xe.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kS{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=wS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const NS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:gd,Encoder:vS,get PacketType(){return Xe},protocol:CS},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const OS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class n0 extends Mt{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=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(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(OS.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:Xe.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const m=this.ids++,E=n.pop();this._registerAckCallback(m,E),u.id=m}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 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:Xe.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 Xe.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 Xe.EVENT:case Xe.BINARY_EVENT:this.onevent(t);break;case Xe.ACK:case Xe.BINARY_ACK:this.onack(t);break;case Xe.DISCONNECT:this.ondisconnect();break;case Xe.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:Xe.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.emitReserved("connect"),this._drainQueue(!0)}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:Xe.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 ws(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}ws.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},ws.prototype.reset=function(){this.attempts=0},ws.prototype.setMin=function(e){this.ms=e},ws.prototype.setMax=function(e){this.max=e},ws.prototype.setJitter=function(e){this.jitter=e};class Ed extends Mt{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,xu(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 ws({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||NS;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 ES(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(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){_u(()=>{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 n0(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 Fo={};function Au(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=yS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Fo[o]&&a in Fo[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Ed(r,t):(Fo[o]||(Fo[o]=new Ed(r,t)),d=Fo[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Au,{Manager:Ed,Socket:n0,io:Au,connect:Au});var IS=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===PS}(t)}(e)},PS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Bo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?As((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function RS(e,t,n){return e.concat(t).map(function(r){return Bo(r,n)})}function r0(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 i0(e,t){try{return t in e}catch(n){return!1}}function LS(e,t,n){var r={};return n.isMergeableObject(e)&&r0(e).forEach(function(o){r[o]=Bo(e[o],n)}),r0(t).forEach(function(o){(function(a,u){return i0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(i0(e,o)&&n.isMergeableObject(t[o])?r[o]=function(a,u){if(!u.customMerge)return As;var c=u.customMerge(a);return typeof c=="function"?c:As}(o,n)(e[o],t[o],n):r[o]=Bo(t[o],n))}),r}function As(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||RS,n.isMergeableObject=n.isMergeableObject||IS,n.cloneUnlessOtherwiseSpecified=Bo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):LS(e,t,n):Bo(t,n)}As.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(n,r){return As(n,r,t)},{})};var DS=As;class MS{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t}(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const FS=typeof ArrayBuffer=="function",s0=Object.prototype.toString,BS=typeof Blob=="function"||typeof Blob!="undefined"&&s0.call(Blob)==="[object BlobConstructor]",US=typeof File=="function"||typeof File!="undefined"&&s0.call(File)==="[object FileConstructor]";function yd(e){return FS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||BS&&e instanceof Blob||US&&e instanceof File}function Cu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Cu(e[n]))return!0;return!1}if(yd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Cu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Cu(e[n]))return!0;return!1}function HS(e){const t=[],n=e.data,r=e;return r.data=Td(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Td(e,t){if(!e)return e;if(yd(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]=Td(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]=Td(e[r],t));return n}return e}function zS(e,t){return e.data=bd(e.data,t),delete e.attachments,e}function bd(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]=bd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=bd(e[n],t));return e}const jS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var St;(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"})(St||(St={}));class $S{constructor(t){this.replacer=t}encode(t){return t.type!==St.EVENT&&t.type!==St.ACK||!Cu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===St.EVENT?St.BINARY_EVENT:St.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==St.BINARY_EVENT&&t.type!==St.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=HS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function o0(e){return Object.prototype.toString.call(e)==="[object Object]"}class _d extends hn{constructor(t){super(),this.reviver=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===St.BINARY_EVENT;r||n.type===St.BINARY_ACK?(n.type=r?St.EVENT:St.ACK,this.reconstructor=new VS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!yd(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(St[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===St.BINARY_EVENT||r.type===St.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");r.attachments=Number(u)}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(!_d.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case St.CONNECT:return o0(n);case St.DISCONNECT:return n===void 0;case St.CONNECT_ERROR:return typeof n=="string"||o0(n);case St.EVENT:case St.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&jS.indexOf(n[0])===-1);case St.ACK:case St.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VS{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=zS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const a0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],u0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map(([c,d])=>{const h=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(h.join(".")))?r(d,h):d]});return Array.isArray(o)?u.map(c=>c[1]):Object.fromEntries(u)},l0=e=>e.replace(/_([a-z])/g,(t,n)=>n.toUpperCase()),qS=u0(e=>e.replace(/([A-Z])/g,"_$1").toLowerCase(),e=>e,a0),c0=u0(l0,l0,a0),YS={Encoder:class extends $S{encode(e){var t,n;return super.encode(be(U({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],qS(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 _d{constructor(){super((e,t)=>e==""&&Array.isArray(t)?t.map(n=>Array.isArray(n)?n.map(r=>r instanceof Object?c0(r):r):n instanceof Object?c0(n):n):t)}}},WS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class GS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=h=>{console.log("[Copilot SDK] Connect Ack:",h),this.socket.auth={[this.sessionIdKey]:h.sessionId}},this.handleDisconnect=h=>{console.warn(`[Copilot SDK] Disconnected: ${h}`),h!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${h}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=h=>{console.error(`[Copilot SDK] Connect error: ${h.message}`);const m=h.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=m==null?void 0:m[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[WS,a,{parser:YS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=Au(u,DS.all(d))}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*td(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 nt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return nt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return nt(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 nt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return nt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return nt(this,null,function*(){return new Promise(n=>{this.socket.emit("session_info",r=>{t&&t(r),n(r)})})})}getConversationEvents(t,n){return nt(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 nt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=function(u){return nd(this,null,function*(){const c=[];let d=!1,h=null;const m=yield new Ur(u({emit:E=>{c.push(E),h&&(h(),h=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Ur(new Promise(E=>{h=E}));for(;c.length>0;)yield c.shift()}finally{yield new Ur(m==null?void 0:m())}})}(({emit:u,cancel:c})=>{const d=(h,m)=>{["done","error"].includes(m.name)&&c(),m.eventSourceId==o&&u(m)};return this.socket.onAny(d),()=>nt(this,null,function*(){this.socket.offAny(d)})});return{result:yield new Promise((u,c)=>this.socket.emit(t,n,d=>{d.name==="error"?c(new MS(d)):(o=d==null?void 0:d.id,u(d))})),events:a}})}}var $=Ss();const zi=Ge($);function d0(e,t){return function(){return e.apply(t,arguments)}}const{toString:KS}=Object.prototype,{getPrototypeOf:xd}=Object,{iterator:vu,toStringTag:f0}=Symbol,ku=(e=>t=>{const n=KS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>ku(t)===e),Nu=e=>t=>typeof t===e,{isArray:Cs}=Array,vs=Nu("undefined");function Uo(e){return e!==null&&!vs(e)&&e.constructor!==null&&!vs(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const h0=sr("ArrayBuffer");function QS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&h0(e.buffer),t}const XS=Nu("string"),Tn=Nu("function"),p0=Nu("number"),Ho=e=>e!==null&&typeof e=="object",JS=e=>e===!0||e===!1,Ou=e=>{if(ku(e)!=="object")return!1;const t=xd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(f0 in e)&&!(vu in e)},ZS=e=>{if(!Ho(e)||Uo(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},ew=sr("Date"),tw=sr("File"),nw=sr("Blob"),rw=sr("FileList"),iw=e=>Ho(e)&&Tn(e.pipe),sw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tn(e.append)&&((t=ku(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},ow=sr("URLSearchParams"),[aw,uw,lw,cw]=["ReadableStream","Request","Response","Headers"].map(sr),dw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function zo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),Cs(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Uo(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function m0(e,t){if(Uo(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 ji=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,g0=e=>!vs(e)&&e!==ji;function Sd(){const{caseless:e,skipUndefined:t}=g0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&m0(n,a)||a;Ou(n[u])&&Ou(o)?n[u]=Sd(n[u],o):Ou(o)?n[u]=Sd({},o):Cs(o)?n[u]=o.slice():(!t||!vs(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&zo(arguments[o],r);return n}const fw=(e,t,n,{allOwnKeys:r}={})=>(zo(t,(o,a)=>{n&&Tn(o)?Object.defineProperty(e,a,{value:d0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mw=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&xd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gw=(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},Ew=e=>{if(!e)return null;if(Cs(e))return e;let t=e.length;if(!p0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&xd(Uint8Array)),Tw=(e,t)=>{const r=(e&&e[vu]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},bw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},_w=sr("HTMLFormElement"),xw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),E0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Sw=sr("RegExp"),y0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};zo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},ww=e=>{y0(e,(t,n)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tn(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+"'")})}})},Aw=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return Cs(e)?r(e):r(String(e).split(t)),n},Cw=()=>{},vw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kw(e){return!!(e&&Tn(e.append)&&e[f0]==="FormData"&&e[vu])}const Nw=e=>{const t=new Array(10),n=(r,o)=>{if(Ho(r)){if(t.indexOf(r)>=0)return;if(Uo(r))return r;if(!("toJSON"in r)){t[o]=r;const a=Cs(r)?[]:{};return zo(r,(u,c)=>{const d=n(u,o+1);!vs(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},Ow=sr("AsyncFunction"),Iw=e=>e&&(Ho(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),T0=((e,t)=>e?setImmediate:t?((n,r)=>(ji.addEventListener("message",({source:o,data:a})=>{o===ji&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ji.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tn(ji.postMessage)),Pw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ji):typeof process!="undefined"&&process.nextTick||T0,Q={isArray:Cs,isArrayBuffer:h0,isBuffer:Uo,isFormData:sw,isArrayBufferView:QS,isString:XS,isNumber:p0,isBoolean:JS,isObject:Ho,isPlainObject:Ou,isEmptyObject:ZS,isReadableStream:aw,isRequest:uw,isResponse:lw,isHeaders:cw,isUndefined:vs,isDate:ew,isFile:tw,isBlob:nw,isRegExp:Sw,isFunction:Tn,isStream:iw,isURLSearchParams:ow,isTypedArray:yw,isFileList:rw,forEach:zo,merge:Sd,extend:fw,trim:dw,stripBOM:hw,inherits:pw,toFlatObject:mw,kindOf:ku,kindOfTest:sr,endsWith:gw,toArray:Ew,forEachEntry:Tw,matchAll:bw,isHTMLForm:_w,hasOwnProperty:E0,hasOwnProp:E0,reduceDescriptors:y0,freezeMethods:ww,toObjectSet:Aw,toCamelCase:xw,noop:Cw,toFiniteNumber:vw,findKey:m0,global:ji,isContextDefined:g0,isSpecCompliantForm:kw,toJSONObject:Nw,isAsyncFn:Ow,isThenable:Iw,setImmediate:T0,asap:Pw,isIterable:e=>e!=null&&Tn(e[vu])};let Ue=class L2 extends Error{static from(t,n,r,o,a,u){const c=new L2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),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(){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:Q.toJSONObject(this.config),code:this.code,status:this.status}}};Ue.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",Ue.ERR_BAD_OPTION="ERR_BAD_OPTION",Ue.ECONNABORTED="ECONNABORTED",Ue.ETIMEDOUT="ETIMEDOUT",Ue.ERR_NETWORK="ERR_NETWORK",Ue.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",Ue.ERR_DEPRECATED="ERR_DEPRECATED",Ue.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",Ue.ERR_BAD_REQUEST="ERR_BAD_REQUEST",Ue.ERR_CANCELED="ERR_CANCELED",Ue.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",Ue.ERR_INVALID_URL="ERR_INVALID_URL";const Rw=null;function wd(e){return Q.isPlainObject(e)||Q.isArray(e)}function b0(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function _0(e,t,n){return e?e.concat(t).map(function(o,a){return o=b0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Lw(e){return Q.isArray(e)&&!e.some(wd)}const Dw=Q.toFlatObject(Q,{},null,function(t){return/^is[A-Z]/.test(t)});function Iu(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(S,w){return!Q.isUndefined(w[S])});const r=n.metaTokens,o=n.visitor||m,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function h(_){if(_===null)return"";if(Q.isDate(_))return _.toISOString();if(Q.isBoolean(_))return _.toString();if(!d&&Q.isBlob(_))throw new Ue("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(_)||Q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function m(_,S,w){let N=_;if(_&&!w&&typeof _=="object"){if(Q.endsWith(S,"{}"))S=r?S:S.slice(0,-2),_=JSON.stringify(_);else if(Q.isArray(_)&&Lw(_)||(Q.isFileList(_)||Q.endsWith(S,"[]"))&&(N=Q.toArray(_)))return S=b0(S),N.forEach(function(D,Y){!(Q.isUndefined(D)||D===null)&&t.append(u===!0?_0([S],Y,a):u===null?S:S+"[]",h(D))}),!1}return wd(_)?!0:(t.append(_0(w,S,a),h(_)),!1)}const E=[],b=Object.assign(Dw,{defaultVisitor:m,convertValue:h,isVisitable:wd});function T(_,S){if(!Q.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+S.join("."));E.push(_),Q.forEach(_,function(N,B){(!(Q.isUndefined(N)||N===null)&&o.call(t,N,Q.isString(B)?B.trim():B,S,b))===!0&&T(N,S?S.concat(B):[B])}),E.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function x0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function Ad(e,t){this._pairs=[],e&&Iu(e,this,t)}const S0=Ad.prototype;S0.append=function(t,n){this._pairs.push([t,n])},S0.toString=function(t){const n=t?function(r){return t.call(this,r,x0)}:x0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function w0(e,t,n){if(!t)return e;const r=n&&n.encode||Mw,o=Q.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Q.isURLSearchParams(t)?t.toString():new Ad(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class A0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const Cd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Fw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:Ad,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},vd=typeof window!="undefined"&&typeof document!="undefined",kd=typeof navigator=="object"&&navigator||void 0,Bw=vd&&(!kd||["ReactNative","NativeScript","NS"].indexOf(kd.product)<0),Uw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hw=vd&&window.location.href||"http://localhost",tn=U(U({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:vd,hasStandardBrowserEnv:Bw,hasStandardBrowserWebWorkerEnv:Uw,navigator:kd,origin:Hw},Symbol.toStringTag,{value:"Module"}))),Fw);function zw(e,t){return Iu(e,new tn.classes.URLSearchParams,U({visitor:function(n,r,o,a){return tn.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function jw(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $w(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 C0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&Q.isArray(o)?o.length:u,d?(Q.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!Q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Q.isArray(o[u])&&(o[u]=$w(o[u])),!c)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(jw(r),o,n,0)}),n}return null}function Vw(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const jo={transitional:Cd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Q.isObject(t);if(a&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(C0(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zw(t,this.formSerializer).toString();if((c=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Iu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Vw(t)):t}],transformResponse:[function(t){const n=this.transitional||jo.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?Ue.from(c,Ue.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tn.classes.FormData,Blob:tn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{jo.headers[e]={}});const qw=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yw=e=>{const t={};let n,r,o;return e&&e.split(`
3
- `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&qw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},v0=Symbol("internals");function $o(e){return e&&String(e).trim().toLowerCase()}function Pu(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Pu):String(e)}function Ww(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 Gw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Nd(e,t,n,r,o){if(Q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function Kw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qw(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let bn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,h){const m=$o(d);if(!m)throw new Error("header name must be a non-empty string");const E=Q.findKey(o,m);(!E||o[E]===void 0||h===!0||h===void 0&&o[E]!==!1)&&(o[E||d]=Pu(c))}const u=(c,d)=>Q.forEach(c,(h,m)=>a(h,m,d));if(Q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Q.isString(t)&&(t=t.trim())&&!Gw(t))u(Yw(t),n);else if(Q.isObject(t)&&Q.isIterable(t)){let c={},d,h;for(const m of t){if(!Q.isArray(m))throw TypeError("Object iterator must return a key-value pair");c[h=m[0]]=(d=c[h])?Q.isArray(d)?[...d,m[1]]:[d,m[1]]:m[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=$o(t),t){const r=Q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ww(o);if(Q.isFunction(n))return n.call(this,o,r);if(Q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=$o(t),t){const r=Q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Nd(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=$o(u),u){const c=Q.findKey(r,u);c&&(!n||Nd(r,r[c],c,n))&&(delete r[c],o=!0)}}return Q.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||Nd(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Q.forEach(this,(o,a)=>{const u=Q.findKey(r,a);if(u){n[u]=Pu(o),delete n[a];return}const c=t?Kw(a):String(a).trim();c!==a&&delete n[a],n[c]=Pu(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
- `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[v0]=this[v0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=$o(u);r[c]||(Qw(o,u),r[c]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};bn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(bn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Q.freezeMethods(bn);function Od(e,t){const n=this||jo,r=t||n,o=bn.from(r.headers);let a=r.data;return Q.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function k0(e){return!!(e&&e.__CANCEL__)}let Vo=class extends Ue{constructor(t,n,r){super(t==null?"canceled":t,Ue.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function N0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new Ue("Request failed with status code "+n.status,[Ue.ERR_BAD_REQUEST,Ue.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Xw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Jw(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 h=Date.now(),m=r[a];u||(u=h),n[o]=d,r[o]=h;let E=a,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),h-u<t)return;const T=m&&h-m;return T?Math.round(b*1e3/T):void 0}}function Zw(e,t){let n=0,r=1e3/t,o,a;const u=(h,m=Date.now())=>{n=m,o=null,a&&(clearTimeout(a),a=null),e(...h)};return[(...h)=>{const m=Date.now(),E=m-n;E>=r?u(h,m):(o=h,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Ru=(e,t,n=3)=>{let r=0;const o=Jw(50,250);return Zw(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,h=o(d),m=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:h||void 0,estimated:h&&c&&m?(c-u)/h:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},O0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},I0=e=>(...t)=>Q.asap(()=>e(...t)),eA=tn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,tA=tn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&c.push(`path=${r}`),Q.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Q.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nA(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rA(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function P0(e,t,n){let r=!nA(t);return e&&(r||n==!1)?rA(e,t):t}const R0=e=>e instanceof bn?U({},e):e;function $i(e,t){t=t||{};const n={};function r(h,m,E,b){return Q.isPlainObject(h)&&Q.isPlainObject(m)?Q.merge.call({caseless:b},h,m):Q.isPlainObject(m)?Q.merge({},m):Q.isArray(m)?m.slice():m}function o(h,m,E,b){if(Q.isUndefined(m)){if(!Q.isUndefined(h))return r(void 0,h,E,b)}else return r(h,m,E,b)}function a(h,m){if(!Q.isUndefined(m))return r(void 0,m)}function u(h,m){if(Q.isUndefined(m)){if(!Q.isUndefined(h))return r(void 0,h)}else return r(void 0,m)}function c(h,m,E){if(E in t)return r(h,m);if(E in e)return r(void 0,h)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(h,m,E)=>o(R0(h),R0(m),E,!0)};return Q.forEach(Object.keys(U(U({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const E=Q.hasOwnProp(d,m)?d[m]:o,b=E(e[m],t[m],m);Q.isUndefined(b)&&E!==c||(n[m]=b)}),n}const L0=e=>{const t=$i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=bn.from(u),t.url=w0(P0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n)){if(tn.hasStandardBrowserEnv||tn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const d=n.getHeaders(),h=["content-type","content-length"];Object.entries(d).forEach(([m,E])=>{h.includes(m.toLowerCase())&&u.set(m,E)})}}if(tn.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&eA(t.url))){const d=o&&a&&tA.read(a);d&&u.set(o,d)}return t},iA=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=L0(e);let a=o.data;const u=bn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:h}=o,m,E,b,T,_;function S(){T&&T(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(m),o.signal&&o.signal.removeEventListener("abort",m)}let w=new XMLHttpRequest;w.open(o.method.toUpperCase(),o.url,!0),w.timeout=o.timeout;function N(){if(!w)return;const D=bn.from("getAllResponseHeaders"in w&&w.getAllResponseHeaders()),W={data:!c||c==="text"||c==="json"?w.responseText:w.response,status:w.status,statusText:w.statusText,headers:D,config:e,request:w};N0(function(te){n(te),S()},function(te){r(te),S()},W),w=null}"onloadend"in w?w.onloadend=N:w.onreadystatechange=function(){!w||w.readyState!==4||w.status===0&&!(w.responseURL&&w.responseURL.indexOf("file:")===0)||setTimeout(N)},w.onabort=function(){w&&(r(new Ue("Request aborted",Ue.ECONNABORTED,e,w)),w=null)},w.onerror=function(Y){const W=Y&&Y.message?Y.message:"Network Error",F=new Ue(W,Ue.ERR_NETWORK,e,w);F.event=Y||null,r(F),w=null},w.ontimeout=function(){let Y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const W=o.transitional||Cd;o.timeoutErrorMessage&&(Y=o.timeoutErrorMessage),r(new Ue(Y,W.clarifyTimeoutError?Ue.ETIMEDOUT:Ue.ECONNABORTED,e,w)),w=null},a===void 0&&u.setContentType(null),"setRequestHeader"in w&&Q.forEach(u.toJSON(),function(Y,W){w.setRequestHeader(W,Y)}),Q.isUndefined(o.withCredentials)||(w.withCredentials=!!o.withCredentials),c&&c!=="json"&&(w.responseType=o.responseType),h&&([b,_]=Ru(h,!0),w.addEventListener("progress",b)),d&&w.upload&&([E,T]=Ru(d),w.upload.addEventListener("progress",E),w.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(m=D=>{w&&(r(!D||D.type?new Vo(null,e,w):D),w.abort(),w=null)},o.cancelToken&&o.cancelToken.subscribe(m),o.signal&&(o.signal.aborted?m():o.signal.addEventListener("abort",m)));const B=Xw(o.url);if(B&&tn.protocols.indexOf(B)===-1){r(new Ue("Unsupported protocol "+B+":",Ue.ERR_BAD_REQUEST,e));return}w.send(a||null)})},sA=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(h){if(!o){o=!0,c();const m=h instanceof Error?h:this.reason;r.abort(m instanceof Ue?m:new Vo(m instanceof Error?m.message:m))}};let u=t&&setTimeout(()=>{u=null,a(new Ue(`timeout of ${t}ms exceeded`,Ue.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(h=>{h.unsubscribe?h.unsubscribe(a):h.removeEventListener("abort",a)}),e=null)};e.forEach(h=>h.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>Q.asap(c),d}},oA=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},aA=function(e,t){return nd(this,null,function*(){try{for(var n=R2(uA(e)),r,o,a;r=!(o=yield new Ur(n.next())).done;r=!1){const u=o.value;yield*Bm(oA(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Ur(o.call(n)))}finally{if(a)throw a[0]}}})},uA=function(e){return nd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Bm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ur(t.read());if(n)break;yield r}}finally{yield new Ur(t.cancel())}})},D0=(e,t,n,r)=>{const o=aA(e,t);let a=0,u,c=h=>{u||(u=!0,r&&r(h))};return new ReadableStream({pull(h){return nt(this,null,function*(){try{const{done:m,value:E}=yield o.next();if(m){c(),h.close();return}let b=E.byteLength;if(n){let T=a+=b;n(T)}h.enqueue(new Uint8Array(E))}catch(m){throw c(m),m}})},cancel(h){return c(h),o.return()}},{highWaterMark:2})},M0=64*1024,{isFunction:Lu}=Q,lA=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:F0,TextEncoder:B0}=Q.global,U0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},cA=e=>{e=Q.merge.call({skipUndefined:!0},lA,e);const{fetch:t,Request:n,Response:r}=e,o=t?Lu(t):typeof fetch=="function",a=Lu(n),u=Lu(r);if(!o)return!1;const c=o&&Lu(F0),d=o&&(typeof B0=="function"?(_=>S=>_.encode(S))(new B0):_=>nt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),h=a&&c&&U0(()=>{let _=!1;const S=new n(tn.origin,{body:new F0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!S}),m=u&&c&&U0(()=>Q.isReadableStream(new r("").body)),E={stream:m&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(S,w)=>{let N=S&&S[_];if(N)return N.call(S);throw new Ue(`Response type '${_}' is not supported`,Ue.ERR_NOT_SUPPORT,w)})});const b=_=>nt(null,null,function*(){if(_==null)return 0;if(Q.isBlob(_))return _.size;if(Q.isSpecCompliantForm(_))return(yield new n(tn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(_)||Q.isArrayBuffer(_))return _.byteLength;if(Q.isURLSearchParams(_)&&(_=_+""),Q.isString(_))return(yield d(_)).byteLength}),T=(_,S)=>nt(null,null,function*(){const w=Q.toFiniteNumber(_.getContentLength());return w==null?b(S):w});return _=>nt(null,null,function*(){let{url:S,method:w,data:N,signal:B,cancelToken:D,timeout:Y,onDownloadProgress:W,onUploadProgress:F,responseType:te,headers:ge,withCredentials:Te="same-origin",fetchOptions:H}=L0(_),ne=t||fetch;te=te?(te+"").toLowerCase():"text";let fe=sA([B,D&&D.toAbortSignal()],Y),de=null;const ae=fe&&fe.unsubscribe&&(()=>{fe.unsubscribe()});let ye;try{if(F&&h&&w!=="get"&&w!=="head"&&(ye=yield T(ge,N))!==0){let R=new n(S,{method:"POST",body:N,duplex:"half"}),K;if(Q.isFormData(N)&&(K=R.headers.get("content-type"))&&ge.setContentType(K),R.body){const[O,_e]=O0(ye,Ru(I0(F)));N=D0(R.body,M0,O,_e)}}Q.isString(Te)||(Te=Te?"include":"omit");const we=a&&"credentials"in n.prototype,ue=be(U({},H),{signal:fe,method:w.toUpperCase(),headers:ge.normalize().toJSON(),body:N,duplex:"half",credentials:we?Te:void 0});de=a&&new n(S,ue);let q=yield a?ne(de,H):ne(S,ue);const re=m&&(te==="stream"||te==="response");if(m&&(W||re&&ae)){const R={};["status","statusText","headers"].forEach(Re=>{R[Re]=q[Re]});const K=Q.toFiniteNumber(q.headers.get("content-length")),[O,_e]=W&&O0(K,Ru(I0(W),!0))||[];q=new r(D0(q.body,M0,O,()=>{_e&&_e(),ae&&ae()}),R)}te=te||"text";let A=yield E[Q.findKey(E,te)||"text"](q,_);return!re&&ae&&ae(),yield new Promise((R,K)=>{N0(R,K,{data:A,headers:bn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:de})})}catch(we){throw ae&&ae(),we&&we.name==="TypeError"&&/Load failed|fetch/i.test(we.message)?Object.assign(new Ue("Network Error",Ue.ERR_NETWORK,_,de,we&&we.response),{cause:we.cause||we}):Ue.from(we,we&&we.code,_,de,we&&we.response)}})},dA=new Map,H0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,h,m=dA;for(;c--;)d=a[c],h=m.get(d),h===void 0&&m.set(d,h=c?new Map:cA(t)),m=h;return h};H0();const Id={http:Rw,xhr:iA,fetch:{get:H0}};Q.forEach(Id,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const z0=e=>`- ${e}`,fA=e=>Q.isFunction(e)||e===null||e===!1;function hA(e,t){e=Q.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!fA(r)&&(o=Id[(c=String(r)).toLowerCase()],o===void 0))throw new Ue(`Unknown adapter '${c}'`);if(o&&(Q.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,h])=>`adapter ${d} `+(h===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
- `+u.map(z0).join(`
6
- `):" "+z0(u[0]):"as no adapter specified";throw new Ue("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const j0={getAdapter:hA,adapters:Id};function Pd(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new Vo(null,e)}function $0(e){return Pd(e),e.headers=bn.from(e.headers),e.data=Od.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),j0.getAdapter(e.adapter||jo.adapter,e)(e).then(function(r){return Pd(e),r.data=Od.call(e,e.transformResponse,r),r.headers=bn.from(r.headers),r},function(r){return k0(r)||(Pd(e),r&&r.response&&(r.response.data=Od.call(e,e.transformResponse,r.response),r.response.headers=bn.from(r.response.headers))),Promise.reject(r)})}const V0="1.13.5",Du={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Du[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const q0={};Du.transitional=function(t,n,r){function o(a,u){return"[Axios v"+V0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new Ue(o(u," has been removed"+(n?" in "+n:"")),Ue.ERR_DEPRECATED);return n&&!q0[u]&&(q0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Du.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function pA(e,t,n){if(typeof e!="object")throw new Ue("options must be an object",Ue.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new Ue("option "+a+" must be "+d,Ue.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new Ue("Unknown option "+a,Ue.ERR_BAD_OPTION)}}const Mu={assertOptions:pA,validators:Du},$n=Mu.validators;let Vi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new A0,response:new A0}}request(t,n){return nt(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
- `+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$i(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Mu.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:Mu.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),Mu.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[n.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=bn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(S){if(typeof S.runWhen=="function"&&S.runWhen(n)===!1)return;d=d&&S.synchronous;const w=n.transitional||Cd;w&&w.legacyInterceptorReqResOrdering?c.unshift(S.fulfilled,S.rejected):c.push(S.fulfilled,S.rejected)});const h=[];this.interceptors.response.forEach(function(S){h.push(S.fulfilled,S.rejected)});let m,E=0,b;if(!d){const _=[$0.bind(this),void 0];for(_.unshift(...c),_.push(...h),b=_.length,m=Promise.resolve(n);E<b;)m=m.then(_[E++],_[E++]);return m}b=c.length;let T=n;for(;E<b;){const _=c[E++],S=c[E++];try{T=_(T)}catch(w){S.call(this,w);break}}try{m=$0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=h.length;E<b;)m=m.then(h[E++],h[E++]);return m}getUri(t){t=$i(this.defaults,t);const n=P0(t.baseURL,t.url,t.allowAbsoluteUrls);return w0(n,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){Vi.prototype[t]=function(n,r){return this.request($i(r||{},{method:t,url:n,data:(r||{}).data}))}}),Q.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request($i(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Vi.prototype[t]=n(),Vi.prototype[t+"Form"]=n(!0)});let mA=class D2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new Vo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new D2(function(o){t=o}),cancel:t}}};function gA(e){return function(n){return e.apply(null,n)}}function EA(e){return Q.isObject(e)&&e.isAxiosError===!0}const Rd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Rd).forEach(([e,t])=>{Rd[t]=e});function Y0(e){const t=new Vi(e),n=d0(Vi.prototype.request,t);return Q.extend(n,Vi.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return Y0($i(e,o))},n}const Pt=Y0(jo);Pt.Axios=Vi,Pt.CanceledError=Vo,Pt.CancelToken=mA,Pt.isCancel=k0,Pt.VERSION=V0,Pt.toFormData=Iu,Pt.AxiosError=Ue,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=gA,Pt.isAxiosError=EA,Pt.mergeConfig=$i,Pt.AxiosHeaders=bn,Pt.formToJSON=e=>C0(Q.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=j0.getAdapter,Pt.HttpStatusCode=Rd,Pt.default=Pt;const{Axios:ZF,AxiosError:eB,CanceledError:tB,isCancel:nB,CancelToken:rB,VERSION:iB,all:sB,Cancel:oB,isAxiosError:aB,spread:uB,toFormData:lB,AxiosHeaders:cB,HttpStatusCode:dB,formToJSON:fB,getAdapter:hB,mergeConfig:pB}=Pt;class W0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>nt(this,null,function*(){try{const t=yield Pt.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}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const yA=$.createContext(void 0),TA=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=$.useMemo(()=>new W0(e,t,n),[e,t,n]);return v.jsx(yA.Provider,{value:o,children:r})};var G0=Symbol.for("immer-nothing"),K0=Symbol.for("immer-draftable"),st=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ks=Object.getPrototypeOf;function Ns(e){return!!e&&!!e[st]}function Hr(e){var t;return e?Q0(e)||Array.isArray(e)||!!e[K0]||!!((t=e.constructor)!=null&&t[K0])||Bu(e)||Uu(e):!1}var bA=Object.prototype.constructor.toString();function Q0(e){if(!e||typeof e!="object")return!1;const t=ks(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)===bA}function qo(e,t){Fu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Fu(e){const t=e[st];return t?t.type_:Array.isArray(e)?1:Bu(e)?2:Uu(e)?3:0}function Ld(e,t){return Fu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function X0(e,t,n){const r=Fu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _A(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Bu(e){return e instanceof Map}function Uu(e){return e instanceof Set}function $t(e){return e.copy_||e.base_}function Dd(e,t){if(Bu(e))return new Map(e);if(Uu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=Q0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[st];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(ks(e),r)}else{const r=ks(e);if(r!==null&&n)return U({},e);const o=Object.create(r);return Object.assign(o,e)}}function Md(e,t=!1){return Hu(e)||Ns(e)||!Hr(e)||(Fu(e)>1&&(e.set=e.add=e.clear=e.delete=xA),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Md(r,!0))),e}function xA(){Vn(2)}function Hu(e){return Object.isFrozen(e)}var Fd={};function qi(e){const t=Fd[e];return t||Vn(0,e),t}function SA(e,t){Fd[e]||(Fd[e]=t)}var Yo;function zu(){return Yo}function wA(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function J0(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Bd(e){Ud(e),e.drafts_.forEach(AA),e.drafts_=null}function Ud(e){e===Yo&&(Yo=e.parent_)}function Z0(e){return Yo=wA(Yo,e)}function AA(e){const t=e[st];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[st].modified_&&(Bd(t),Vn(4)),Hr(e)&&(e=ju(t,e),t.parent_||$u(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[st].base_,e,t.patches_,t.inversePatches_)):e=ju(t,n,[]),Bd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==G0?e:void 0}function ju(e,t,n){if(Hu(t))return t;const r=t[st];if(!r)return qo(t,(o,a)=>tg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return $u(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),qo(a,(c,d)=>tg(e,r,o,c,d,n,u)),$u(e,o,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function tg(e,t,n,r,o,a,u){if(Ns(o)){const c=a&&t&&t.type_!==3&&!Ld(t.assigned_,r)?a.concat(r):void 0,d=ju(e,o,c);if(X0(n,r,d),Ns(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Hr(o)&&!Hu(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;ju(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&$u(e,o)}}function $u(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Md(t,n)}function CA(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:zu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=Hd;n&&(o=[r],a=Wo);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var Hd={get(e,t){if(t===st)return e;const n=$t(e);if(!Ld(n,t))return vA(e,n,t);const r=n[t];return e.finalized_||!Hr(r)?r:r===zd(e.base_,t)?(jd(e),e.copy_[t]=Go(r,e)):r},has(e,t){return t in $t(e)},ownKeys(e){return Reflect.ownKeys($t(e))},set(e,t,n){const r=ng($t(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=zd($t(e),t),a=o==null?void 0:o[st];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(_A(n,o)&&(n!==void 0||Ld(e.base_,t)))return!0;jd(e),zr(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 zd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,jd(e),zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$t(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return ks(e.base_)},setPrototypeOf(){Vn(12)}},Wo={};qo(Hd,(e,t)=>{Wo[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Wo.deleteProperty=function(e,t){return Wo.set.call(this,e,t,void 0)},Wo.set=function(e,t,n){return Hd.set.call(this,e[0],t,n,e[0])};function zd(e,t){const n=e[st];return(n?$t(n):e)[t]}function vA(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=ks(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ks(n)}}function zr(e){e.modified_||(e.modified_=!0,e.parent_&&zr(e.parent_))}function jd(e){e.copy_||(e.copy_=Dd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kA=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,...h){return u.produce(d,m=>n.call(this,m,...h))}}typeof n!="function"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(Hr(t)){const a=Z0(this),u=Go(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Bd(a):Ud(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_&&Md(o,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Hr(e)||Vn(8),Ns(e)&&(e=NA(e));const t=Z0(this),n=Go(e,void 0);return n[st].isManual_=!0,Ud(t),n}finishDraft(e,t){const n=e&&e[st];(!n||!n.isManual_)&&Vn(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=qi("Patches").applyPatches_;return Ns(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Go(e,t){const n=Bu(e)?qi("MapSet").proxyMap_(e,t):Uu(e)?qi("MapSet").proxySet_(e,t):CA(e,t);return(t?t.scope_:zu()).drafts_.push(n),n}function NA(e){return Ns(e)||Vn(10,e),rg(e)}function rg(e){if(!Hr(e)||Hu(e))return e;const t=e[st];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Dd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Dd(e,!0);return qo(n,(r,o)=>{X0(n,r,rg(o))}),t&&(t.finalized_=!1),n}function OA(){class e extends Map{constructor(d,h){super(),this[st]={type_:2,parent_:h,scope_:h?h.scope_:zu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return $t(this[st]).size}has(d){return $t(this[st]).has(d)}set(d,h){const m=this[st];return u(m),(!$t(m).has(d)||$t(m).get(d)!==h)&&(n(m),zr(m),m.assigned_.set(d,!0),m.copy_.set(d,h),m.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const h=this[st];return u(h),n(h),zr(h),h.base_.has(d)?h.assigned_.set(d,!1):h.assigned_.delete(d),h.copy_.delete(d),!0}clear(){const d=this[st];u(d),$t(d).size&&(n(d),zr(d),d.assigned_=new Map,qo(d.base_,h=>{d.assigned_.set(h,!1)}),d.copy_.clear())}forEach(d,h){const m=this[st];$t(m).forEach((E,b,T)=>{d.call(h,this.get(b),b,this)})}get(d){const h=this[st];u(h);const m=$t(h).get(d);if(h.finalized_||!Hr(m)||m!==h.base_.get(d))return m;const E=Go(m,h);return n(h),h.copy_.set(d,E),E}keys(){return $t(this[st]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const h=d.next();return h.done?h:{done:!1,value:this.get(h.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const h=d.next();if(h.done)return h;const m=this.get(h.value);return{done:!1,value:[h.value,m]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,h){super(),this[st]={type_:3,parent_:h,scope_:h?h.scope_:zu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return $t(this[st]).size}has(d){const h=this[st];return u(h),h.copy_?!!(h.copy_.has(d)||h.drafts_.has(d)&&h.copy_.has(h.drafts_.get(d))):h.base_.has(d)}add(d){const h=this[st];return u(h),this.has(d)||(a(h),zr(h),h.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const h=this[st];return u(h),a(h),zr(h),h.copy_.delete(d)||(h.drafts_.has(d)?h.copy_.delete(h.drafts_.get(d)):!1)}clear(){const d=this[st];u(d),$t(d).size&&(a(d),zr(d),d.copy_.clear())}values(){const d=this[st];return u(d),a(d),d.copy_.values()}entries(){const d=this[st];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,h){const m=this.values();let E=m.next();for(;!E.done;)d.call(h,E.value,E.value,this),E=m.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Hr(d)){const h=Go(d,c);c.drafts_.set(d,h),c.copy_.add(h)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify($t(c)))}SA("MapSet",{proxyMap_:t,proxySet_:o})}var In=new kA,IA=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function PA(e,t,n){var r=$.useMemo(function(){return IA(e)},[e]);return $.useReducer(r,t,n)}const ig={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"},kt={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_IMAGE_FILE:"SET_IMAGE_FILE"},Vu={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},Ko="cimulate",$d=`${Ko}:pdp-update`,Vd=`${Ko}:browse-update`,qd=`${Ko}:search-update`,Yd=`${Ko}:ui-state-update`,Wd=`${Ko}:session-state`,xr=U({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},ig),RA={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},jr=U({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},ig),LA={"search-context":jr.SEARCH_CONTEXT_UPDATED,query:jr.QUERY_CHANGED,page:jr.PAGE_CHANGED,pageSize:jr.PAGE_SIZE_CHANGED,includeFacets:jr.FACET_FILTERS_CHANGED,facetFilters:jr.FACET_FILTERS_CHANGED,rangeFilters:jr.RANGE_FILTERS_CHANGED,catalogSegment:jr.CATALOG_SEGMENT_CHANGED,pricebooks:jr.PRICEBOOKS_CHANGED},X="cim-widget",Os=`--${X}`,Yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},DA=(e=Yi)=>({[`${Os}-primary-color`]:e.primaryColor||Yi.primaryColor,[`${Os}-secondary-color`]:e.secondaryColor||Yi.secondaryColor,[`${Os}-font-color`]:e.fontColor||Yi.fontColor,[`${Os}-font-family`]:e.fontFamily||Yi.fontFamily,[`${Os}-background-color`]:e.backgroundColor||Yi.backgroundColor,[`${Os}-border-color`]:e.borderColor||Yi.borderColor}),li={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},sg=$.createContext(null),og=$.createContext(null);class MA{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>nt(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 W0(t,n,r)}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 Is=(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 FA{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Is(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 ag=$.createContext(null),BA=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",openLinksInNewTab:r=!1,disclaimerText:o,disclaimerMarkdown:a,searchPlaceholder:u,searchButtonLabel:c,searchConfig:d,conversationHistory:h,resetConversationMessage:m="What products would you like to explore today?",apiKey:E,apiToken:b,theme:T,isDevelopment:_,__features:S,children:w})=>{const N=$.useMemo(()=>new MA(E,b,_),[E,b,_]),B=$.useMemo(()=>new FA(_),[_]);$.useEffect(()=>{N.config||N.getConfig()},[N]);const D=$.useMemo(()=>DA(T),[T]),Y=$.useMemo(()=>{const F=(d==null?void 0:d.placeholder)||u,te=(d==null?void 0:d.buttonLabel)||c;let ge="icon";return d!=null&&d.buttonType?ge=d.buttonType:c&&(ge="text"),be(U({},d||{}),{placeholder:F,buttonLabel:te,buttonType:ge})},[d,u,c]),W=$.useMemo(()=>({configModule:N,logoUrl:e,headerText:t,globalClassName:n,openLinksInNewTab:r,disclaimerText:o,disclaimerMarkdown:a,themeVariables:D,logger:B,searchConfig:Y,resetConversationMessage:m,conversationHistory:{sinceHours:typeof(h==null?void 0:h.sinceHours)=="number"?h.sinceHours:1,limit:h==null?void 0:h.limit},features:S}),[N,e,t,n,o,a,r,Y,m,B,D,h,S]);return v.jsx(ag.Provider,{value:W,children:w})},nn=()=>{const e=$.useContext(ag);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class UA{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},modal:{isFullscreen:!1}});ve(this,"connectedProxy");ve(this,"modeProxy");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 jA(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{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 type(){return this.statusProxy.type}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,status:{type:this.type,isOpen:this.isOpen},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const wt=new UA,Wi=()=>wt.connected,Qo=()=>wt.isOpen,HA=e=>{window.addEventListener(Yd,e)},zA=e=>{window.removeEventListener(Yd,e)},jA=(e,t)=>{const n=new CustomEvent(Yd,{detail:{property:e,value:t}});window.dispatchEvent(n)},$A=e=>{wt.connectedProxy.connected=e},qu=e=>{if(typeof e!="boolean"){wt.statusProxy.isOpen=!wt.statusProxy.isOpen;return}wt.statusProxy.isOpen=e},ug=e=>{wt.modalProxy.isFullscreen=e},Gd=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);wt.statusProxy.type=e,e==="dialog"||e==="chat"?wt.modeProxy.mode="embedded":wt.modeProxy.mode="standalone"},lg=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(", ")}.`);wt.dialogProxy.position=e},VA=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=nn(),o=$.useCallback(w=>{n({type:kt.SET_COPILOT,payload:w})},[n]),a=$.useCallback(w=>{$A(w),n({type:kt.SET_CONNECTED,payload:w})},[n]),u=$.useCallback(()=>{n({type:kt.RESET_COPILOT,payload:{}})},[n]),c=$.useCallback(()=>{n({type:kt.RESET_STATE,payload:{}})},[n]),d=$.useCallback(w=>{r==null||r.log(`${w.name} event received`,w),n({type:kt.ADD_MESSAGE,payload:w}),e==null||e(w)},[e,r,n]),h=$.useCallback(w=>{n({type:kt.ADD_LOADING_MESSAGE,payload:w})},[n]),m=$.useCallback(w=>{n({type:kt.REMOVE_LOADING_MESSAGE,payload:w})},[n]),E=$.useCallback(w=>{n({type:kt.SET_ACTIVE_CONVERSATION_ID,payload:w})},[n]),b=$.useCallback(w=>{n({type:kt.ADD_CONVERSATION_ID,payload:w})},[n]),T=$.useCallback(w=>{n({type:kt.SET_CONVERSATION_IDS,payload:w})},[n]),_=$.useCallback(w=>{n({type:kt.SET_IMAGE_FILE,payload:w})},[n]),S=$.useMemo(()=>({setCopilot:o,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:h,removeLoadingMessage:m,setActiveConversationId:E,addConversationId:b,setConversationIds:T,setImageFile:_}),[o,a,u,c,d,h,m,E,b,T,_]);return v.jsx(og.Provider,{value:S,children:t})};OA();const qA=(e,t)=>{const{type:n,payload:r}=t;if(n===kt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case kt.RESET_STATE:e.messages=Vu.messages,e.groupedMessages=Vu.groupedMessages,e.loadingMessages=Vu.loadingMessages;break;case kt.RESET_COPILOT:e.copilot=null;break;case kt.SET_COPILOT:e.copilot=r;break;case kt.SET_CONNECTED:e.connected=r;break;case kt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case kt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case kt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case kt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case kt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case kt.SET_IMAGE_FILE:e.imageFile=r;break}},YA=({onCopilotEvent:e,children:t})=>{const[n,r]=PA(qA,Vu);return v.jsx(sg.Provider,{value:n,children:v.jsx(VA,{onCopilotEvent:e,dispatch:r,children:t})})};function WA(){var e=$.useRef(!0);return e.current?(e.current=!1,!0):e.current}var GA=function(e){$.useEffect(e,[])},KA=function(e,t){return e===t};function QA(e,t){t===void 0&&(t=KA);var n=$.useRef(),r=$.useRef(e),o=WA();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class XA{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(rn.size).fill(1).forEach(()=>{const r=rn.first();r&&(t(r),rn.remove())})})}get size(){return this.items.length}}const rn=new XA,cg=e=>{window.addEventListener(qd,e)},dg=e=>{window.removeEventListener(qd,e)},JA=(e,t,n)=>{const r=new CustomEvent(qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},fg=e=>{window.addEventListener(Vd,e)},hg=e=>{window.removeEventListener(Vd,e)},ZA=(e,t,n)=>{const r=new CustomEvent(Vd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},pg=e=>{window.addEventListener($d,e)},mg=e=>{window.removeEventListener($d,e)},gg=(e,t,n)=>{const r=new CustomEvent($d,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},eC=e=>{window.addEventListener(Wd,e)},tC=e=>{window.removeEventListener(Wd,e)},Yu=(e,t,n)=>{const r=new CustomEvent(Wd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class nC{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=RA[n];return ZA(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 ot=new nC,Eg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},yg=(e,t,n)=>{var u,c;const r=U({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(h=>h!==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},Tg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},bg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},_g=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},xg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},rC=e=>{if(!Wi()||!Qo()){Wi()&&rn.clear(),rn.add({context:"browse",payload:be(U({},ot.state),{categoryId:e})});return}ot.categoryIdProxy.categoryId=e},Sg=e=>{Eg(e,ot)},iC=(e,t)=>{yg(e,t,ot)},wg=e=>{Tg(e,ot)},sC=({field:e,value:t})=>{bg({field:e,value:t},ot)},oC=e=>{_g(e,ot)},Ag=e=>{xg(e,ot)},Cg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Wi(),n=Qo();if(!t||!n){t&&rn.clear(),rn.add({context:"browse",payload:U({},e)});return}"facetFilters"in e&&Sg(e.facetFilters||{}),"rangeFilters"in e&&wg(e.rangeFilters||[]),"catalogSegment"in e&&(ot.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Ag(e.pricebooks||[]),"categoryName"in e&&(ot.categoryIdProxy.categoryName=e.categoryName||""),ot.categoryIdProxy.categoryId=e.categoryId},aC=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Cg,updateBrowseCategoryId:rC,updateCatalogSegment:oC,updateFacetFilter:iC,updateFacetFilters:Sg,updatePricebooks:Ag,updateRangeFilter:sC,updateRangeFilters:wg},Symbol.toStringTag,{value:"Module"}));class uC{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)=>(gg(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const or=new uC,vg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Wi(),n=Qo();if(!t||!n){t&&rn.clear(),rn.add({context:"pdp",payload:U({},e)});return}or.updateProxy(e),gg("pdp-context",e)},lC=e=>{or.proxy.productId=e,Wi()||rn.add({context:"pdp",payload:U({},or.state)})},cC=e=>{or.proxy.pdpLink=e},dC=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Yu("getConversationMessages",{payload:e,callback:t},li.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Yu("getSessionInformation",{callback:e},li.GET_SESSION_INFORMATION)},loadConversation:e=>{Yu("loadConversation",e,li.LOAD_CONVERSATION)},resetConversation:()=>{Yu("resetConversation",!0,li.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class fC{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=LA[n];return JA(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 pt=new fC,hC=e=>{const t=Qo(),n=Wi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:be(U({},pt.state),{query:e})});return}pt.queryProxy.query=e},kg=e=>{Eg(e,pt)},pC=(e,t)=>{yg(e,t,pt)},Ng=e=>{Tg(e,pt)},mC=({field:e,value:t})=>{bg({field:e,value:t},pt)},gC=e=>{_g(e,pt)},Og=e=>{xg(e,pt)},Ig=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Qo(),n=Wi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:U({},e)});return}"facetFilters"in e&&kg(e.facetFilters||{}),"rangeFilters"in e&&Ng(e.rangeFilters||[]),"catalogSegment"in e&&(pt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Og(e.pricebooks||[]),pt.queryProxy.query=e.query},EC=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Ig,updateCatalogSegment:gC,updateFacetFilter:pC,updateFacetFilters:kg,updatePricebooks:Og,updateRangeFilter:mC,updateRangeFilters:Ng,updateSearchQuery:hC},Symbol.toStringTag,{value:"Module"})),Pg=$.createContext({entryType:"search",setEntryType:()=>{}}),yC=({children:e})=>{const[t,n]=$.useState("search"),r=$.useMemo(()=>({entryType:t,setEntryType:n}),[t,n]);return v.jsx(Pg.Provider,{value:r,children:e})},TC=()=>{const e=$.useContext(Pg);if(!e)throw new Error("useEntry must be used within an EntryProvider");return e},bC={categoryId:ot.categoryId,categoryName:ot.categoryIdProxy.categoryName||"",facetFilters:ot.facetFilters,rangeFilters:ot.rangeFilters,catalogSegment:ot.catalogSegment,pricebooks:ot.pricebooks},Rg=$.createContext(bC),_C=({children:e})=>{const[t,n]=$.useState(ot.categoryId),[r,o]=$.useState(ot.categoryIdProxy.categoryName||""),[a,u]=$.useState(ot.facetFilters||{}),[c,d]=$.useState(ot.rangeFilters||[]),[h,m]=$.useState(ot.catalogSegment||null),[E,b]=$.useState(ot.pricebooks||null);$.useEffect(()=>{const _=({detail:S})=>{(S==null?void 0:S.property)==="categoryId"&&n(S.value),(S==null?void 0:S.property)==="categoryName"&&o(S.value),(S==null?void 0:S.property)==="facetFilters"&&u(S.value),(S==null?void 0:S.property)==="rangeFilters"&&d(S.value),(S==null?void 0:S.property)==="catalogSegment"&&m(S.value),(S==null?void 0:S.property)==="pricebooks"&&b(S.value)};return fg(_),()=>{hg(_)}},[]);const T=$.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:h,pricebooks:E}),[t,r,a,c,h,E]);return v.jsx(Rg.Provider,{value:T,children:e})},xC=()=>{const e=$.useContext(Rg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},SC={searchQuery:pt.query,facetFilters:pt.facetFilters,rangeFilters:pt.rangeFilters,catalogSegment:pt.catalogSegment,pricebooks:pt.pricebooks},Lg=$.createContext(SC),wC=({children:e})=>{const[t,n]=$.useState(pt.query),[r,o]=$.useState(pt.facetFilters),[a,u]=$.useState(pt.rangeFilters),[c,d]=$.useState(pt.catalogSegment),[h,m]=$.useState(pt.pricebooks);$.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&u(T.value),(T==null?void 0:T.property)==="catalogSegment"&&d(T.value),(T==null?void 0:T.property)==="pricebooks"&&m(T.value)};return cg(b),()=>{dg(b)}},[]);const E=$.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:h}),[t,r,a,c,h]);return v.jsx(Lg.Provider,{value:E,children:e})},AC=()=>{const e=$.useContext(Lg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},CC={productId:or.productId,pdpLink:or.pdpLink},Dg=$.createContext(CC),vC=({children:e})=>{const[t,n]=$.useState(or.productId),[r,o]=$.useState(or.pdpLink);$.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return pg(u),()=>{mg(u)}},[]);const a=$.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return v.jsx(Dg.Provider,{value:a,children:e})},kC=()=>{const e=$.useContext(Dg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},Mg=$.createContext({mode:wt.modeProxy.mode,status:wt.statusProxy,dialogPosition:wt.dialogProxy.position,isModalFullscreen:wt.modalProxy.isFullscreen,previousComponentType:wt.statusProxy.type}),NC=({componentType:e,children:t})=>{const[n,r]=$.useState(wt.modeProxy.mode),[o,a]=$.useState({type:e||wt.statusProxy.type,isOpen:wt.statusProxy.isOpen}),[u,c]=$.useState(wt.dialogProxy.position),[d,h]=$.useState(wt.modalProxy.isFullscreen),m=QA(o.type);$.useEffect(()=>{const b=T=>{const{property:_,value:S}=T.detail||{};if(!(!_||S===void 0)){if(_==="mode"){r(S);return}if(_==="isOpen"){a(w=>be(U({},w),{isOpen:S}));return}if(_==="type"){a(w=>be(U({},w),{type:S}));return}if(_==="position"){c(S);return}if(_==="isFullscreen"){h(S);return}}};return HA(b),()=>{zA(b)}},[]);const E=$.useMemo(()=>({mode:n,status:o,previousComponentType:m||"dialog",dialogPosition:u,isModalFullscreen:d}),[n,o,m,u,d]);return v.jsx(Mg.Provider,{value:E,children:t})},Ps=()=>{const e=$.useContext(Mg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},Wu=()=>{const e=$.useContext(og);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Kd=()=>{const e=$.useContext(sg);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},OC=({copilot:e})=>{const{logger:t,conversationHistory:n}=nn(),{addCopilotEvent:r}=Wu(),{activeConversationId:o}=Kd(),a=$.useCallback(c=>{e&&e.requestSessionInformation(d=>{t==null||t.log("Retrieved session information: ",d),c==null||c(d)})},[e,t]),u=$.useCallback((c,d)=>{e&&c.conversationId&&e.getConversationEvents(c,h=>{t==null||t.log("Retrieved conversation messages: ",h),d==null||d(h)})},[e,t]);return $.useEffect(()=>{if(!o||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const c=60*60*1e3*n.sinceHours,d=new Date(Date.now()-c).toISOString(),h={conversationId:o,since:d,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(h.limit=n.limit),u(h,m=>{m.forEach(E=>r(E))})},[o,u,r,n]),{getSessionInformation:a,getConversationMessages:u}},Fg=$.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),IC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=nn(),bi=AC(),{searchQuery:h}=bi,m=en(bi,["searchQuery"]),Jr=xC(),{categoryId:E}=Jr,b=en(Jr,["categoryId"]),{productId:T,pdpLink:_}=kC(),{entryType:S,setEntryType:w}=TC(),{setCopilot:N,setConnected:B,resetCopilot:D,resetCopilotState:Y,addCopilotEvent:W,addLoadingMessage:F,removeLoadingMessage:te,setActiveConversationId:ge,setConversationIds:Te}=Wu(),{connected:H,copilot:ne,messages:fe,groupedMessages:de,loadingMessages:ae}=Kd(),{status:ye}=Ps(),we=$.useRef(!1),ue=$.useRef(!1),{getConversationMessages:q,getSessionInformation:re}=OC({copilot:ne}),A=$.useMemo(()=>ae.size>0,[ae]),R=$.useCallback(Ae=>ae.has(Ae),[ae]),K=$.useCallback(Ae=>{W(Ae),F(Ae.id)},[W,F]),O=$.useCallback(({query:Ae,facetFilters:ze,rangeFilters:Qe,catalogSegment:at,pricebooks:mt,userPrompt:_t,imageFile:mn})=>{if(!ne){d==null||d.error("Copilot is not initialized");return}if(!Ae)return;const it={searchParams:{query:Ae}};_t&&(it.userPrompt=_t),mn&&(it.attachments={image:mn}),ze&&Object.keys(ze).length>0&&(it.searchParams.facetFilters=ze),Qe&&Qe.length>0&&(it.searchParams.rangeFilters=Qe),at&&(it.searchParams.catalogSegment=at),mt&&(it.searchParams.pricebooks=mt),w("search"),ne.search(it,ee=>{const he=U({},ee);we.current=!0,K(he)})},[d,w,K,ne]),_e=$.useCallback(({categoryId:Ae,categoryName:ze,facetFilters:Qe,rangeFilters:at,catalogSegment:mt,pricebooks:_t,userPrompt:mn,imageFile:it})=>{if(!ne){d==null||d.error("Copilot is not initialized");return}const ee=Qe&&Object.keys(Qe).length>0;if(Ae===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const he={browseParams:{categoryId:Ae||""}};mn&&(he.userPrompt=mn),it&&(he.attachments={image:it}),ee&&(he.browseParams.facetFilters=Qe),at&&at.length>0&&(he.browseParams.rangeFilters=at),mt&&(he.browseParams.catalogSegment=mt),Array.isArray(_t)&&_t.length>0&&(he.browseParams.pricebooks=_t),w("browse"),ne.browse(he,Be=>{const $e=U({},Be);ze&&$e.request&&($e.request.label=ze),ue.current=!0,K($e)})},[d,w,K,ne]),Re=$.useCallback(({productId:Ae,productName:ze,pdpLink:Qe,userPrompt:at,imageFile:mt})=>{if(!ne){d==null||d.error("Copilot is not initialized");return}if(!Ae)return;const _t={productId:Ae};at&&(_t.userPrompt=at),Qe&&(_t.pdpLink=Qe),mt&&(_t.attachments={image:mt}),w("pdp"),ne.productView(_t,mn=>{const it=U({},mn);ze&&it.request&&(it.request.label=ze),K(it)})},[d,w,ne,K]),Oe=$.useCallback(Ae=>{const ze=be(U({},Ae),{id:Ae.inquiryLinkId||Ae.id});W(ze)},[W]),We=$.useCallback(Ae=>{W(Ae),a==null||a(Ae)},[W,a]),qe=$.useCallback(Ae=>{W(Ae),u==null||u(Ae)},[W,u]),Ze=$.useCallback(Ae=>{o==null||o(Ae),B(!0)},[o,B]);$.useEffect(()=>{!ne||!H||!ye.isOpen||rn.size>0&&rn.processQueue(Ae=>{if(Ae.context==="search"){const ze=U({},Ae.payload);Ig(ze)}if(Ae.context==="browse"){const ze=U({},Ae.payload);Cg(ze)}if(Ae.context==="pdp"){const ze=U({},Ae.payload);vg(ze)}})},[ye.isOpen,ne,H]);const Nt=$.useCallback(Ae=>{Ae.on("connect_ack",Ze),Ae.on("follow_up",W),Ae.on("inquiry",Oe),Ae.on("partial_inquiry",Oe),Ae.on("display_products",W),Ae.on("progress",W),Ae.on("refined_search",We),Ae.on("refined_browse",qe),Ae.on("done",ze=>{te(ze.eventSourceId)}),Ae.on("error",ze=>{W(ze),te(ze.eventSourceId)}),Ae.onDisconnect(ze=>{const Qe=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",ze),!Qe.includes(ze)){B(!1);return}d==null||d.log("De-registering event listeners");const at=new Date().toISOString();W({name:"error",message:"Connection was lost. Please try again.",createdAt:at,id:`error-${at}`,sessionId:"session"}),Ae.off()})},[d,B,te,Oe,We,qe,W,Ze]);GA(()=>{let Ae;n?Ae=n:Ae=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const ze={baseUrl:Ae};e?ze.apiKey=e:t&&(ze.apiToken=t);const Qe=new GS(ze);return N(Qe),Nt(Qe),Qe.connect(),Qe.requestSessionInformation(at=>{d==null||d.log("Session Information: ",at);const{activeConversationId:mt,conversationIds:_t}=at.data||{};mt&&ge(mt),_t!=null&&_t.length&&Te(_t)}),()=>{Qe.disconnect(),Qe.off(),D()}});const Kn=$.useCallback(Ae=>{if(!ne)return;const ze={eventId:Ae,reason:"User cancelled the request"};ne.cancelRequest(ze,Qe=>{W(Qe),te(Ae)})},[W,te,ne]),as=$.useCallback(()=>{ne&&ne.conversationReset({},Ae=>{Y(),W(Ae),ne.requestSessionInformation(ze=>{d==null||d.log("Session Information: ",ze)})})},[ne,d,W,Y]),Xr=$.useCallback((Ae,ze)=>{if(!Ae)return;const Qe={userPrompt:Ae};switch(ze&&(Qe.imageFile=ze),S){case"search":O(U(U({query:h},m),Qe));return;case"browse":_e(U(U({categoryId:E},b),Qe));return;case"pdp":Re(U({productId:T,pdpLink:_||""},Qe));return}},[S,h,m,O,E,b,_e,Re,T,_]),Ti=$.useCallback((Ae,ze)=>{var _t,mn;const at=Ae.params.userPrompt||"";if(!at)return;const mt=fe.find(it=>it.id===ze);if(mt){if(mt.name==="copilot_search"){const{query:it}=((_t=mt.request)==null?void 0:_t.searchParams)||{};it&&O(be(U({query:it||h},m),{userPrompt:at}));return}if(mt.name==="copilot_browse"){const{categoryId:it}=((mn=mt.request)==null?void 0:mn.browseParams)||{};_e(be(U({categoryId:it||E||""},b),{userPrompt:at}));return}if(mt.name==="product_view"){const it=mt.request;it!=null&&it.productId&&Re(be(U({},it),{userPrompt:at}))}}},[h,m,E,b,fe,O,_e,Re]),us=$.useMemo(()=>({copilot:ne,messages:fe,groupedMessages:de,isLoading:A,isResponseLoading:R,handleSearch:O,handleBrowse:_e,handlePdp:Re,handleUserInput:Xr,handleSuggestion:Ti,handleCancel:Kn,resetConversation:as,getSessionInformation:re,getConversationMessages:q}),[ne,fe,de,A,R,O,_e,Re,Xr,Ti,Kn,as,re,q]);return v.jsx(Fg.Provider,{value:us,children:c})},$r=()=>{const e=$.useContext(Fg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},PC=()=>{const{resetCopilotState:e,addCopilotEvent:t}=Wu(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=$r(),h=$.useCallback(({query:b})=>{if(!n||!b)return;const{facetFilters:T}=pt.facetFiltersProxy,{rangeFilters:_}=pt.rangeFiltersProxy,{catalogSegment:S}=pt.catalogSegmentProxy,{pricebooks:w}=pt.pricebooksProxy,N={query:b};N.facetFilters=T||{},N.rangeFilters=_||[],N.catalogSegment=S||"",N.pricebooks=w||[],r(U({},N))},[n,r]),m=$.useCallback(({categoryId:b})=>{if(!n)return;const T=ot.categoryIdProxy.categoryName,{facetFilters:_}=ot.facetFiltersProxy,{rangeFilters:S}=ot.rangeFiltersProxy,{catalogSegment:w}=ot.catalogSegmentProxy,{pricebooks:N}=ot.pricebooksProxy,B={categoryId:b};B.categoryName=T||"",B.facetFilters=_||{},B.rangeFilters=S||[],B.catalogSegment=w||"",B.pricebooks=N||[],o(U({},B))},[n,o]),E=$.useCallback(({productId:b})=>{if(!n||!b)return;const T={productId:b,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(T)},[n,a]);return $.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&h({query:T.value})};return cg(b),()=>{dg(b)}},[h]),$.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value})};return pg(b),()=>{mg(b)}},[E]),$.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&m({categoryId:T.value})};return fg(b),()=>{hg(b)}},[m]),$.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==li.RESET_CONVERSATION&&u(),(T==null?void 0:T.event)==li.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==li.GET_CONVERSATION_MESSAGES){const{payload:_,callback:S}=T.value;if(!_.conversationId||typeof S!="function")return;d(_,S)}if((T==null?void 0:T.event)==li.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;d(_,w=>{e(),w.forEach(N=>{t(N)})})}};return eC(b),()=>{tC(b)}},[u,c,d,e,t]),null},RC=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onCopilotEvent:a,onRefinedSearch:u,onRefinedBrowse:c,children:d})=>v.jsx(YA,{onCopilotEvent:a,children:v.jsxs(IC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:u,onRefinedBrowse:c,children:[v.jsx(PC,{}),d]})}),Bg=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:h,disclaimerText:m,disclaimerMarkdown:E,searchPlaceholder:b,searchButtonLabel:T,searchConfig:_,resetConversationMessage:S,conversationHistory:w,onConnect:N,onCopilotEvent:B,onRefinedSearch:D,onRefinedBrowse:Y,__features:W,children:F})=>v.jsx(BA,{apiKey:e,logoUrl:r,headerText:o,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:b,searchButtonLabel:T,searchConfig:_,disclaimerMarkdown:E,disclaimerText:m,resetConversationMessage:S,conversationHistory:w,isDevelopment:d,__features:W,children:v.jsx(TA,{apiKey:e,apiToken:t,isDevelopment:d,children:v.jsx(yC,{children:v.jsx(vC,{children:v.jsx(_C,{children:v.jsx(wC,{children:v.jsx(NC,{componentType:h,children:v.jsx(RC,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,onConnect:N,onCopilotEvent:B,onRefinedSearch:D,onRefinedBrowse:Y,children:F})})})})})})})});function Ug(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=Ug(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Ug(e))&&(r&&(r+=" "),r+=t);return r}var Hg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},zg=zi.createContext&&zi.createContext(Hg),LC=["attr","size","title"];function DC(e,t){if(e==null)return{};var n=MC(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 MC(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 Gu(){return Gu=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},Gu.apply(this,arguments)}function jg(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 Ku(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?jg(Object(n),!0).forEach(function(r){FC(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):jg(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FC(e,t,n){return t=BC(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BC(e){var t=UC(e,"string");return typeof t=="symbol"?t:t+""}function UC(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 $g(e){return e&&e.map((t,n)=>zi.createElement(t.tag,Ku({key:n},t.attr),$g(t.child)))}function sn(e){return t=>zi.createElement(HC,Gu({attr:Ku({},e.attr)},t),$g(e.child))}function HC(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=DC(e,LC),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),zi.createElement("svg",Gu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Ku(Ku({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&zi.createElement("title",null,a),e.children)};return zg!==void 0?zi.createElement(zg.Consumer,null,n=>t(n)):t(Hg)}function Vg(e){return sn({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 Xo(e){return sn({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 zC(e){return sn({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 qg(e){return sn({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 jC(e){return sn({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 $C(e){return sn({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 VC(e){return sn({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 qC(e){return sn({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 YC(e){return sn({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 Qd=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>v.jsx("button",{"aria-label":t,className:Z(e,`${X}-close-button`),disabled:r,onClick:n,children:v.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:v.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"})})}),Xd=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>v.jsx("button",{className:Z(`${X}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Rs=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,disabled:a=!1,onClick:u})=>!n&&!t?null:v.jsx("button",{className:Z(e,`${X}-icon-button`),type:r,"aria-label":o,onClick:u,disabled:a,children:t?v.jsx("img",{className:Z(`${X}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),WC=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?v.jsx("img",{className:Z(`${X}-search-button-icon`,t),src:n,alt:"",loading:"lazy"}):v.jsx(Xo,{})},GC=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return v.jsx(Rs,{className:Z(e,n,r),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:v.jsx(Xo,{}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return v.jsxs(Xd,{className:Z(e,n,r,`${X}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&v.jsx(WC,{globalClassName:n,searchConfig:t}),t==null?void 0:t.buttonLabel]})};function TB(){}function bB(){}function Yg(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 Wg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const KC=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QC=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XC={};function Gg(e,t){return(XC.jsx?QC:KC).test(e)}const JC=/[ \t\n\f\r]/g;function ZC(e){return typeof e=="object"?e.type==="text"?Kg(e.value):!1:Kg(e)}function Kg(e){return e.replace(JC,"")===""}let Jo=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};Jo.prototype.normal={},Jo.prototype.property={},Jo.prototype.space=void 0;function Qg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new Jo(n,r,t)}function Zo(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let ev=0;const Ve=Gi(),Ft=Gi(),Jd=Gi(),pe=Gi(),dt=Gi(),Ls=Gi(),Pn=Gi();function Gi(){return td(2,++ev)}const Zd=Object.freeze(Object.defineProperty({__proto__:null,boolean:Ve,booleanish:Ft,commaOrSpaceSeparated:Pn,commaSeparated:Ls,number:pe,overloadedBoolean:Jd,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),ef=Object.keys(Zd);let tf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),Xg(this,"space",o),typeof r=="number")for(;++a<ef.length;){const u=ef[a];Xg(this,ef[a],(r&Zd[u])===Zd[u])}}};tf.prototype.defined=!0;function Xg(e,t,n){n&&(e[t]=n)}function Ds(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new tf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Zo(r)]=r,n[Zo(a.attribute)]=r}return new Jo(t,n,e.space)}const Jg=Ds({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:dt,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:pe,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:dt,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Ft,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function Zg(e,t){return t in e?e[t]:t}function e1(e,t){return Zg(e,t.toLowerCase())}const tv=Ds({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ls,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:Ve,allowPaymentRequest:Ve,allowUserMedia:Ve,alt:null,as:null,async:Ve,autoCapitalize:null,autoComplete:dt,autoFocus:Ve,autoPlay:Ve,blocking:dt,capture:null,charSet:null,checked:Ve,cite:null,className:dt,cols:pe,colSpan:null,content:null,contentEditable:Ft,controls:Ve,controlsList:dt,coords:pe|Ls,crossOrigin:null,data:null,dateTime:null,decoding:null,default:Ve,defer:Ve,dir:null,dirName:null,disabled:Ve,download:Jd,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:Ve,formTarget:null,headers:dt,height:pe,hidden:Jd,high:pe,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:Ve,inputMode:null,integrity:null,is:null,isMap:Ve,itemId:null,itemProp:dt,itemRef:dt,itemScope:Ve,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:Ve,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:Ve,muted:Ve,name:null,nonce:null,noModule:Ve,noValidate:Ve,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:Ve,optimum:pe,pattern:null,ping:dt,placeholder:null,playsInline:Ve,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:Ve,referrerPolicy:null,rel:dt,required:Ve,reversed:Ve,rows:pe,rowSpan:pe,sandbox:dt,scope:null,scoped:Ve,seamless:Ve,selected:Ve,shadowRootClonable:Ve,shadowRootDelegatesFocus:Ve,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:Ve,useMap:null,value:Ft,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:Ve,declare:Ve,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:Ve,noHref:Ve,noShade:Ve,noWrap:Ve,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:Ve,disableRemotePlayback:Ve,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:e1}),nv=Ds({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:dt,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:Ve,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Ls,g2:Ls,glyphName:Ls,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:Zg}),t1=Ds({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()}}),n1=Ds({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:e1}),r1=Ds({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rv={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"},iv=/[A-Z]/g,i1=/-[a-z]/g,sv=/^data[-\w.:]+$/i;function nf(e,t){const n=Zo(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(i1,av);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!i1.test(a)){let u=a.replace(iv,ov);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=tf}return new o(r,t)}function ov(e){return"-"+e.toLowerCase()}function av(e){return e.charAt(1).toUpperCase()}const Qu=Qg([Jg,tv,t1,n1,r1],"html"),Ms=Qg([Jg,nv,t1,n1,r1],"svg");function s1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function o1(e){return e.join(" ").trim()}var Fs={},rf,a1;function uv(){if(a1)return rf;a1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
8
- `,h="/",m="*",E="",b="comment",T="declaration";rf=function(S,w){if(typeof S!="string")throw new TypeError("First argument must be a string");if(!S)return[];w=w||{};var N=1,B=1;function D(de){var ae=de.match(t);ae&&(N+=ae.length);var ye=de.lastIndexOf(d);B=~ye?de.length-ye:B+de.length}function Y(){var de={line:N,column:B};return function(ae){return ae.position=new W(de),ge(),ae}}function W(de){this.start=de,this.end={line:N,column:B},this.source=w.source}W.prototype.content=S;function F(de){var ae=new Error(w.source+":"+N+":"+B+": "+de);if(ae.reason=de,ae.filename=w.source,ae.line=N,ae.column=B,ae.source=S,!w.silent)throw ae}function te(de){var ae=de.exec(S);if(ae){var ye=ae[0];return D(ye),S=S.slice(ye.length),ae}}function ge(){te(n)}function Te(de){var ae;for(de=de||[];ae=H();)ae!==!1&&de.push(ae);return de}function H(){var de=Y();if(!(h!=S.charAt(0)||m!=S.charAt(1))){for(var ae=2;E!=S.charAt(ae)&&(m!=S.charAt(ae)||h!=S.charAt(ae+1));)++ae;if(ae+=2,E===S.charAt(ae-1))return F("End of comment missing");var ye=S.slice(2,ae-2);return B+=2,D(ye),S=S.slice(ae),B+=2,de({type:b,comment:ye})}}function ne(){var de=Y(),ae=te(r);if(ae){if(H(),!te(o))return F("property missing ':'");var ye=te(a),we=de({type:T,property:_(ae[0].replace(e,E)),value:ye?_(ye[0].replace(e,E)):E});return te(u),we}}function fe(){var de=[];Te(de);for(var ae;ae=ne();)ae!==!1&&(de.push(ae),Te(de));return de}return ge(),fe()};function _(S){return S?S.replace(c,E):E}return rf}var u1;function lv(){if(u1)return Fs;u1=1;var e=Fs&&Fs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Fs,"__esModule",{value:!0}),Fs.default=n;var t=e(uv());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var h=d.property,m=d.value;c?o(h,m,d):m&&(a=a||{},a[h]=m)}}),a}return Fs}var ea={},l1;function cv(){if(l1)return ea;l1=1,Object.defineProperty(ea,"__esModule",{value:!0}),ea.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(h){return!h||n.test(h)||e.test(h)},u=function(h,m){return m.toUpperCase()},c=function(h,m){return"".concat(m,"-")},d=function(h,m){return m===void 0&&(m={}),a(h)?h:(h=h.toLowerCase(),m.reactCompat?h=h.replace(o,c):h=h.replace(r,c),h.replace(t,u))};return ea.camelCase=d,ea}var ta,c1;function dv(){if(c1)return ta;c1=1;var e=ta&&ta.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(lv()),n=cv();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ta=r,ta}var fv=dv();const hv=Ge(fv),Xu=d1("end"),Sr=d1("start");function d1(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 f1(e){const t=Sr(e),n=Xu(e);if(t&&n)return{start:t,end:n}}function na(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?h1(e.position):"start"in e||"end"in e?h1(e):"line"in e||"column"in e?sf(e):""}function sf(e){return p1(e&&e.line)+":"+p1(e&&e.column)}function h1(e){return sf(e&&e.start)+"-"+sf(e&&e.end)}function p1(e){return e&&typeof e=="number"?e:1}class on 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=U({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=na(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const of={}.hasOwnProperty,pv=new Map,mv=/[A-Z]/g,gv=new Set(["table","tbody","thead","tfoot","tr"]),Ev=new Set(["td","th"]),m1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yv(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=Cv(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=Av(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"?Ms:Qu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=g1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function g1(e,t,n){if(t.type==="element")return Tv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xv(e,t,n);if(t.type==="mdxjsEsm")return _v(e,t);if(t.type==="root")return Sv(e,t,n);if(t.type==="text")return wv(e,t)}function Tv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Ms,e.schema=o),e.ancestors.push(t);const a=y1(e,t.tagName,!1),u=vv(e,t);let c=uf(e,t);return gv.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!ZC(d):!0})),E1(e,u,a,t),af(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function bv(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)}ra(e,t.position)}function _v(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);ra(e,t.position)}function xv(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Ms,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:y1(e,t.name,!0),u=kv(e,t),c=uf(e,t);return E1(e,u,a,t),af(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Sv(e,t,n){const r={};return af(r,uf(e,t)),e.create(t,e.Fragment,r,n)}function wv(e,t){return t.value}function E1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function af(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Av(e,t,n){return r;function r(o,a,u,c){const h=Array.isArray(u.children)?n:t;return c?h(a,u,c):h(a,u)}}function Cv(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Sr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function vv(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&of.call(t.properties,o)){const a=Nv(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Ev.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function kv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else ra(e,t.position);else{const o=r.name;let a;if(r.value&&typeof r.value=="object")if(r.value.data&&r.value.data.estree&&e.evaluater){const c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else ra(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function uf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:pv;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 h=o.get(d)||0;u=d+"-"+h,o.set(d,h+1)}}const c=g1(e,a,u);c!==void 0&&n.push(c)}return n}function Nv(e,t,n){const r=nf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Wg(n):o1(n)),r.property==="style"){let o=typeof n=="object"?n:Ov(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Iv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?rv[r.property]||r.property:r.attribute,n]}}function Ov(e,t){try{return hv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("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=m1+"#cannot-parse-style-attribute",o}}function y1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=Gg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=Gg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return of.call(e.components,o)?e.components[o]:o}if(e.evaluater)return e.evaluater.evaluateExpression(r);ra(e)}function ra(e,t){const n=new on("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=m1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Iv(e){const t={};let n;for(n in e)of.call(e,n)&&(t[Pv(n)]=e[n]);return t}function Pv(e){let t=e.replace(mv,Rv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Rv(e){return"-"+e.toLowerCase()}const lf={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"]},Lv={};function cf(e,t){const n=Lv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return T1(e,r,o)}function T1(e,t,n){if(Dv(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 b1(e.children,t,n)}return Array.isArray(e)?b1(e,t,n):""}function b1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=T1(e[o],t,n);return r.join("")}function Dv(e){return!!(e&&typeof e=="object")}const _1=document.createElement("i");function df(e){const t="&"+e+";";_1.innerHTML=t;const n=_1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(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 qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const x1={}.hasOwnProperty;function S1(e){const t={};let n=-1;for(;++n<e.length;)Mv(t,e[n]);return t}function Mv(e,t){let n;for(n in t){const o=(x1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){x1.call(o,u)||(o[u]=[]);const c=a[u];Fv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function Fv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function w1(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 ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=ci(/[A-Za-z]/),an=ci(/[\dA-Za-z]/),Bv=ci(/[#-'*+\--9=?A-Z^-~]/);function Ju(e){return e!==null&&(e<32||e===127)}const ff=ci(/\d/),Uv=ci(/[\dA-Fa-f]/),Hv=ci(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function ct(e){return e!==null&&(e<0||e===32)}function Ke(e){return e===-2||e===-1||e===32}const Zu=ci(new RegExp("\\p{P}|\\p{S}","u")),Ki=ci(/\s/);function ci(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Bs(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Je(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ke(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ke(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const zv={tokenize:jv};function jv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Je(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const $v={tokenize:Vv},A1={tokenize:qv};function Vv(e){const t=this,n=[];let r=0,o,a,u;return c;function c(D){if(r<n.length){const Y=n[r];return t.containerState=Y[1],e.attempt(Y[0].continuation,d,h)(D)}return h(D)}function d(D){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&B();const Y=t.events.length;let W=Y,F;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){F=t.events[W][1].end;break}N(r);let te=Y;for(;te<t.events.length;)t.events[te][1].end=U({},F),te++;return Rn(t.events,W+1,0,t.events.slice(Y)),t.events.length=te,h(D)}return c(D)}function h(D){if(r===n.length){if(!o)return b(D);if(o.currentConstruct&&o.currentConstruct.concrete)return _(D);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(A1,m,E)(D)}function m(D){return o&&B(),N(r),b(D)}function E(D){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(D)}function b(D){return t.containerState={},e.attempt(A1,T,_)(D)}function T(D){return r++,n.push([t.currentConstruct,t.containerState]),b(D)}function _(D){if(D===null){o&&B(),N(0),e.consume(D);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),S(D)}function S(D){if(D===null){w(e.exit("chunkFlow"),!0),N(0),e.consume(D);return}return Le(D)?(e.consume(D),w(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(D),S)}function w(D,Y){const W=t.sliceStream(D);if(Y&&W.push(null),D.previous=a,a&&(a.next=D),a=D,o.defineSkip(D.start),o.write(W),t.parser.lazy[D.start.line]){let F=o.events.length;for(;F--;)if(o.events[F][1].start.offset<u&&(!o.events[F][1].end||o.events[F][1].end.offset>u))return;const te=t.events.length;let ge=te,Te,H;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(Te){H=t.events[ge][1].end;break}Te=!0}for(N(r),F=te;F<t.events.length;)t.events[F][1].end=U({},H),F++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=F}}function N(D){let Y=n.length;for(;Y-- >D;){const W=n[Y];t.containerState=W[1],W[0].exit.call(t,e)}n.length=D}function B(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function qv(e,t,n){return Je(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Us(e){if(e===null||ct(e)||Ki(e))return 1;if(Zu(e))return 2}function el(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 hf={name:"attention",resolveAll:Yv,tokenize:Wv};function Yv(e,t){let n=-1,r,o,a,u,c,d,h,m;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 E=U({},e[r][1].end),b=U({},e[n][1].start);C1(E,-d),C1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:U({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:U({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:U({},e[r][1].end),end:U({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:U({},u.start),end:U({},c.end)},e[r][1].end=U({},u.start),e[n][1].start=U({},c.end),h=[],e[r][1].end.offset-e[r][1].start.offset&&(h=qn(h,[["enter",e[r][1],t],["exit",e[r][1],t]])),h=qn(h,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),h=qn(h,el(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),h=qn(h,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(m=2,h=qn(h,[["enter",e[n][1],t],["exit",e[n][1],t]])):m=0,Rn(e,r-1,n-r+3,h),n=r+h.length-m-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function Wv(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Us(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const h=e.exit("attentionSequence"),m=Us(d),E=!m||m===2&&o||n.includes(d),b=!o||o===2&&m||n.includes(r);return h._open=!!(a===42?E:E&&(o||!b)),h._close=!!(a===42?b:b&&(m||!E)),t(d)}}function C1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Gv={name:"autolink",tokenize:Kv};function Kv(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(T){return pn(T)?(e.consume(T),u):T===64?n(T):h(T)}function u(T){return T===43||T===45||T===46||an(T)?(r=1,c(T)):h(T)}function c(T){return T===58?(e.consume(T),r=0,d):(T===43||T===45||T===46||an(T))&&r++<32?(e.consume(T),c):(r=0,h(T))}function d(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||Ju(T)?n(T):(e.consume(T),d)}function h(T){return T===64?(e.consume(T),m):Bv(T)?(e.consume(T),h):n(T)}function m(T){return an(T)?E(T):n(T)}function E(T){return T===46?(e.consume(T),r=0,m):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):b(T)}function b(T){if((T===45||an(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const ia={partial:!0,tokenize:Qv};function Qv(e,t,n){return r;function r(a){return Ke(a)?Je(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const v1={continuation:{tokenize:Jv},exit:Zv,name:"blockQuote",tokenize:Xv};function Xv(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ke(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Jv(e,t,n){const r=this;return o;function o(u){return Ke(u)?Je(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(v1,t,n)(u)}}function Zv(e){e.exit("blockQuote")}const k1={name:"characterEscape",tokenize:ek};function ek(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 Hv(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const N1={name:"characterReference",tokenize:tk};function tk(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),h):(e.enter("characterReferenceValue"),a=31,u=an,m(E))}function h(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Uv,m):(e.enter("characterReferenceValue"),a=7,u=ff,m(E))}function m(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return u===an&&!df(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),m):n(E)}}const O1={partial:!0,tokenize:rk},I1={concrete:!0,name:"codeFenced",tokenize:nk};function nk(e,t,n){const r=this,o={partial:!0,tokenize:W};let a=0,u=0,c;return d;function d(F){return h(F)}function h(F){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=F,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),m(F)}function m(F){return F===c?(u++,e.consume(F),m):u<3?n(F):(e.exit("codeFencedFenceSequence"),Ke(F)?Je(e,E,"whitespace")(F):E(F))}function E(F){return F===null||Le(F)?(e.exit("codeFencedFence"),r.interrupt?t(F):e.check(O1,S,Y)(F)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(F))}function b(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(F)):Ke(F)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Je(e,T,"whitespace")(F)):F===96&&F===c?n(F):(e.consume(F),b)}function T(F){return F===null||Le(F)?E(F):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(F))}function _(F){return F===null||Le(F)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(F)):F===96&&F===c?n(F):(e.consume(F),_)}function S(F){return e.attempt(o,Y,w)(F)}function w(F){return e.enter("lineEnding"),e.consume(F),e.exit("lineEnding"),N}function N(F){return a>0&&Ke(F)?Je(e,B,"linePrefix",a+1)(F):B(F)}function B(F){return F===null||Le(F)?e.check(O1,S,Y)(F):(e.enter("codeFlowValue"),D(F))}function D(F){return F===null||Le(F)?(e.exit("codeFlowValue"),B(F)):(e.consume(F),D)}function Y(F){return e.exit("codeFenced"),t(F)}function W(F,te,ge){let Te=0;return H;function H(ye){return F.enter("lineEnding"),F.consume(ye),F.exit("lineEnding"),ne}function ne(ye){return F.enter("codeFencedFence"),Ke(ye)?Je(F,fe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ye):fe(ye)}function fe(ye){return ye===c?(F.enter("codeFencedFenceSequence"),de(ye)):ge(ye)}function de(ye){return ye===c?(Te++,F.consume(ye),de):Te>=u?(F.exit("codeFencedFenceSequence"),Ke(ye)?Je(F,ae,"whitespace")(ye):ae(ye)):ge(ye)}function ae(ye){return ye===null||Le(ye)?(F.exit("codeFencedFence"),te(ye)):ge(ye)}}}function rk(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 pf={name:"codeIndented",tokenize:sk},ik={partial:!0,tokenize:ok};function sk(e,t,n){const r=this;return o;function o(h){return e.enter("codeIndented"),Je(e,a,"linePrefix",5)(h)}function a(h){const m=r.events[r.events.length-1];return m&&m[1].type==="linePrefix"&&m[2].sliceSerialize(m[1],!0).length>=4?u(h):n(h)}function u(h){return h===null?d(h):Le(h)?e.attempt(ik,u,d)(h):(e.enter("codeFlowValue"),c(h))}function c(h){return h===null||Le(h)?(e.exit("codeFlowValue"),u(h)):(e.consume(h),c)}function d(h){return e.exit("codeIndented"),t(h)}}function ok(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Je(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const ak={name:"codeText",previous:lk,resolve:uk,tokenize:ck};function uk(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 lk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ck(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,m(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),h(E))}function h(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),h)}function m(E){return E===96?(e.consume(E),o++,m):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",h(E))}}class dk{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&&sa(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),sa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),sa(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);sa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);sa(this.left,n.reverse())}}}function sa(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 P1(e){const t={};let n=-1,r,o,a,u,c,d,h;const m=new dk(e);for(;++n<m.length;){for(;n in t;)n=t[n];if(r=m.get(n),n&&r[1].type==="chunkFlow"&&m.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,fk(m,n)),n=t[n],h=!0);else if(r[1]._container){for(a=n,o=void 0;a--;)if(u=m.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(o&&(m.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=U({},m.get(o)[1].start),c=m.slice(o,n),c.unshift(r),m.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,m.slice(0)),!h}function fk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],h={};let m,E,b=-1,T=n,_=0,S=0;const w=[S];for(;T;){for(;e.get(++o)[1]!==T;);a.push(o),T._tokenizer||(m=r.sliceStream(T),T.next||m.push(null),E&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(m),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=T,T=T.next}for(T=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(S=b+1,w.push(S),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):w.pop(),b=w.length;b--;){const N=c.slice(w[b],w[b+1]),B=a.pop();d.push([B,B+N.length-1]),e.splice(B,2,N)}for(d.reverse(),b=-1;++b<d.length;)h[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return h}const hk={resolve:mk,tokenize:gk},pk={partial:!0,tokenize:Ek};function mk(e){return P1(e),e}function gk(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(pk,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Ek(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Je(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function R1(e,t,n,r,o,a,u,c,d){const h=d||Number.POSITIVE_INFINITY;let m=0;return E;function E(N){return N===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(N),e.exit(a),b):N===null||N===32||N===41||Ju(N)?n(N):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),S(N))}function b(N){return N===62?(e.enter(a),e.consume(N),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(N))}function T(N){return N===62?(e.exit("chunkString"),e.exit(c),b(N)):N===null||N===60||Le(N)?n(N):(e.consume(N),N===92?_:T)}function _(N){return N===60||N===62||N===92?(e.consume(N),T):T(N)}function S(N){return!m&&(N===null||N===41||ct(N))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(N)):m<h&&N===40?(e.consume(N),m++,S):N===41?(e.consume(N),m--,S):N===null||N===32||N===40||Ju(N)?n(N):(e.consume(N),N===92?w:S)}function w(N){return N===40||N===41||N===92?(e.consume(N),S):S(N)}}function L1(e,t,n,r,o,a){const u=this;let c=0,d;return h;function h(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(a),m}function m(T){return c>999||T===null||T===91||T===93&&!d||T===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),m):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Le(T)||c++>999?(e.exit("chunkString"),m(T)):(e.consume(T),d||(d=!Ke(T)),T===92?b:E)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,E):E(T)}}function D1(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),h(b))}function h(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Je(e,h,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===u||b===null||Le(b)?(e.exit("chunkString"),h(b)):(e.consume(b),b===92?E:m)}function E(b){return b===u||b===92?(e.consume(b),m):m(b)}}function oa(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Ke(o)?Je(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const yk={name:"definition",tokenize:bk},Tk={partial:!0,tokenize:_k};function bk(e,t,n){const r=this;let o;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return L1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),d):n(T)}function d(T){return ct(T)?oa(e,h)(T):h(T)}function h(T){return R1(e,m,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function m(T){return e.attempt(Tk,E,E)(T)}function E(T){return Ke(T)?Je(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Le(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function _k(e,t,n){return r;function r(c){return ct(c)?oa(e,o)(c):n(c)}function o(c){return D1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ke(c)?Je(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const xk={name:"hardBreakEscape",tokenize:Sk};function Sk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const wk={name:"headingAtx",resolve:Ak,tokenize:Ck};function Ak(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"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Ck(e,t,n){let r=0;return o;function o(m){return e.enter("atxHeading"),a(m)}function a(m){return e.enter("atxHeadingSequence"),u(m)}function u(m){return m===35&&r++<6?(e.consume(m),u):m===null||ct(m)?(e.exit("atxHeadingSequence"),c(m)):n(m)}function c(m){return m===35?(e.enter("atxHeadingSequence"),d(m)):m===null||Le(m)?(e.exit("atxHeading"),t(m)):Ke(m)?Je(e,c,"whitespace")(m):(e.enter("atxHeadingText"),h(m))}function d(m){return m===35?(e.consume(m),d):(e.exit("atxHeadingSequence"),c(m))}function h(m){return m===null||m===35||ct(m)?(e.exit("atxHeadingText"),c(m)):(e.consume(m),h)}}const vk=["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"],M1=["pre","script","style","textarea"],kk={concrete:!0,name:"htmlFlow",resolveTo:Ik,tokenize:Pk},Nk={partial:!0,tokenize:Lk},Ok={partial:!0,tokenize:Rk};function Ik(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 Pk(e,t,n){const r=this;let o,a,u,c,d;return h;function h(O){return m(O)}function m(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),E}function E(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,S):O===63?(e.consume(O),o=3,r.interrupt?t:A):pn(O)?(e.consume(O),u=String.fromCharCode(O),w):n(O)}function b(O){return O===45?(e.consume(O),o=2,T):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:A):n(O)}function T(O){return O===45?(e.consume(O),r.interrupt?t:A):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:fe:_):n(O)}function S(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),w):n(O)}function w(O){if(O===null||O===47||O===62||ct(O)){const _e=O===47,Re=u.toLowerCase();return!_e&&!a&&M1.includes(Re)?(o=1,r.interrupt?t(O):fe(O)):vk.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),N):r.interrupt?t(O):fe(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?B(O):D(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),w):n(O)}function N(O){return O===62?(e.consume(O),r.interrupt?t:fe):n(O)}function B(O){return Ke(O)?(e.consume(O),B):H(O)}function D(O){return O===47?(e.consume(O),H):O===58||O===95||pn(O)?(e.consume(O),Y):Ke(O)?(e.consume(O),D):H(O)}function Y(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),Y):W(O)}function W(O){return O===61?(e.consume(O),F):Ke(O)?(e.consume(O),W):D(O)}function F(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Ke(O)?(e.consume(O),F):ge(O)}function te(O){return O===d?(e.consume(O),d=null,Te):O===null||Le(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||ct(O)?W(O):(e.consume(O),ge)}function Te(O){return O===47||O===62||Ke(O)?D(O):n(O)}function H(O){return O===62?(e.consume(O),ne):n(O)}function ne(O){return O===null||Le(O)?fe(O):Ke(O)?(e.consume(O),ne):n(O)}function fe(O){return O===45&&o===2?(e.consume(O),we):O===60&&o===1?(e.consume(O),ue):O===62&&o===4?(e.consume(O),R):O===63&&o===3?(e.consume(O),A):O===93&&o===5?(e.consume(O),re):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Nk,K,de)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),de(O)):(e.consume(O),fe)}function de(O){return e.check(Ok,ae,K)(O)}function ae(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),ye}function ye(O){return O===null||Le(O)?de(O):(e.enter("htmlFlowData"),fe(O))}function we(O){return O===45?(e.consume(O),A):fe(O)}function ue(O){return O===47?(e.consume(O),u="",q):fe(O)}function q(O){if(O===62){const _e=u.toLowerCase();return M1.includes(_e)?(e.consume(O),R):fe(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):fe(O)}function re(O){return O===93?(e.consume(O),A):fe(O)}function A(O){return O===62?(e.consume(O),R):O===45&&o===2?(e.consume(O),A):fe(O)}function R(O){return O===null||Le(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),R)}function K(O){return e.exit("htmlFlow"),t(O)}}function Rk(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function Lk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(ia,t,n)}}const Dk={name:"htmlText",tokenize:Mk};function Mk(e,t,n){const r=this;let o,a,u;return c;function c(A){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(A),d}function d(A){return A===33?(e.consume(A),h):A===47?(e.consume(A),W):A===63?(e.consume(A),D):pn(A)?(e.consume(A),ge):n(A)}function h(A){return A===45?(e.consume(A),m):A===91?(e.consume(A),a=0,_):pn(A)?(e.consume(A),B):n(A)}function m(A){return A===45?(e.consume(A),T):n(A)}function E(A){return A===null?n(A):A===45?(e.consume(A),b):Le(A)?(u=E,ue(A)):(e.consume(A),E)}function b(A){return A===45?(e.consume(A),T):E(A)}function T(A){return A===62?we(A):A===45?b(A):E(A)}function _(A){const R="CDATA[";return A===R.charCodeAt(a++)?(e.consume(A),a===R.length?S:_):n(A)}function S(A){return A===null?n(A):A===93?(e.consume(A),w):Le(A)?(u=S,ue(A)):(e.consume(A),S)}function w(A){return A===93?(e.consume(A),N):S(A)}function N(A){return A===62?we(A):A===93?(e.consume(A),N):S(A)}function B(A){return A===null||A===62?we(A):Le(A)?(u=B,ue(A)):(e.consume(A),B)}function D(A){return A===null?n(A):A===63?(e.consume(A),Y):Le(A)?(u=D,ue(A)):(e.consume(A),D)}function Y(A){return A===62?we(A):D(A)}function W(A){return pn(A)?(e.consume(A),F):n(A)}function F(A){return A===45||an(A)?(e.consume(A),F):te(A)}function te(A){return Le(A)?(u=te,ue(A)):Ke(A)?(e.consume(A),te):we(A)}function ge(A){return A===45||an(A)?(e.consume(A),ge):A===47||A===62||ct(A)?Te(A):n(A)}function Te(A){return A===47?(e.consume(A),we):A===58||A===95||pn(A)?(e.consume(A),H):Le(A)?(u=Te,ue(A)):Ke(A)?(e.consume(A),Te):we(A)}function H(A){return A===45||A===46||A===58||A===95||an(A)?(e.consume(A),H):ne(A)}function ne(A){return A===61?(e.consume(A),fe):Le(A)?(u=ne,ue(A)):Ke(A)?(e.consume(A),ne):Te(A)}function fe(A){return A===null||A===60||A===61||A===62||A===96?n(A):A===34||A===39?(e.consume(A),o=A,de):Le(A)?(u=fe,ue(A)):Ke(A)?(e.consume(A),fe):(e.consume(A),ae)}function de(A){return A===o?(e.consume(A),o=void 0,ye):A===null?n(A):Le(A)?(u=de,ue(A)):(e.consume(A),de)}function ae(A){return A===null||A===34||A===39||A===60||A===61||A===96?n(A):A===47||A===62||ct(A)?Te(A):(e.consume(A),ae)}function ye(A){return A===47||A===62||ct(A)?Te(A):n(A)}function we(A){return A===62?(e.consume(A),e.exit("htmlTextData"),e.exit("htmlText"),t):n(A)}function ue(A){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),q}function q(A){return Ke(A)?Je(e,re,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(A):re(A)}function re(A){return e.enter("htmlTextData"),u(A)}}const mf={name:"labelEnd",resolveAll:Hk,resolveTo:zk,tokenize:jk},Fk={tokenize:$k},Bk={tokenize:Vk},Uk={tokenize:qk};function Hk(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&&Rn(e,0,e.length,n),e}function zk(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:U({},e[a][1].start),end:U({},e[e.length-1][1].end)},h={type:"label",start:U({},e[a][1].start),end:U({},e[u][1].end)},m={type:"labelText",start:U({},e[a+r+2][1].end),end:U({},e[u-2][1].start)};return c=[["enter",d,t],["enter",h,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",m,t]]),c=qn(c,el(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",m,t],e[u-2],e[u-1],["exit",h,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function jk(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?E(b):(u=r.parser.defined.includes(ar(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(Fk,m,u?m:E)(b):b===91?e.attempt(Bk,m,u?h:E)(b):u?m(b):E(b)}function h(b){return e.attempt(Uk,m,E)(b)}function m(b){return t(b)}function E(b){return a._balanced=!0,n(b)}}function $k(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return ct(E)?oa(e,a)(E):a(E)}function a(E){return E===41?m(E):R1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return ct(E)?oa(e,d)(E):m(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?D1(e,h,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):m(E)}function h(E){return ct(E)?oa(e,m)(E):m(E)}function m(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function Vk(e,t,n){const r=this;return o;function o(c){return L1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function qk(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 Yk={name:"labelStartImage",resolveAll:mf.resolveAll,tokenize:Wk};function Wk(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Gk={name:"labelStartLink",resolveAll:mf.resolveAll,tokenize:Kk};function Kk(e,t,n){const r=this;return o;function o(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),a}function a(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const gf={name:"lineEnding",tokenize:Qk};function Qk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Je(e,t,"linePrefix")}}const tl={name:"thematicBreak",tokenize:Xk};function Xk(e,t,n){let r=0,o;return a;function a(h){return e.enter("thematicBreak"),u(h)}function u(h){return o=h,c(h)}function c(h){return h===o?(e.enter("thematicBreakSequence"),d(h)):r>=3&&(h===null||Le(h))?(e.exit("thematicBreak"),t(h)):n(h)}function d(h){return h===o?(e.consume(h),r++,d):(e.exit("thematicBreakSequence"),Ke(h)?Je(e,c,"whitespace")(h):c(h))}}const xn={continuation:{tokenize:tN},exit:rN,name:"list",tokenize:eN},Jk={partial:!0,tokenize:iN},Zk={partial:!0,tokenize:nN};function eN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:ff(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(tl,n,h)(T):h(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(T)}return n(T)}function d(T){return ff(T)&&++u<10?(e.consume(T),d):(!r.interrupt||u<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),h(T)):n(T)}function h(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(ia,r.interrupt?n:m,e.attempt(Jk,b,E))}function m(T){return r.containerState.initialBlankLine=!0,a++,b(T)}function E(T){return Ke(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function tN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ia,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Je(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ke(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Je(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function nN(e,t,n){const r=this;return Je(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 rN(e){e.exit(this.containerState.type)}function iN(e,t,n){const r=this;return Je(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!Ke(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const F1={name:"setextUnderline",resolveTo:sN,tokenize:oN};function sN(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:U({},e[r][1].start),end:U({},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=U({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function oN(e,t,n){const r=this;let o;return a;function a(h){let m=r.events.length,E;for(;m--;)if(r.events[m][1].type!=="lineEnding"&&r.events[m][1].type!=="linePrefix"&&r.events[m][1].type!=="content"){E=r.events[m][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=h,u(h)):n(h)}function u(h){return e.enter("setextHeadingLineSequence"),c(h)}function c(h){return h===o?(e.consume(h),c):(e.exit("setextHeadingLineSequence"),Ke(h)?Je(e,d,"lineSuffix")(h):d(h))}function d(h){return h===null||Le(h)?(e.exit("setextHeadingLine"),t(h)):n(h)}}const aN={tokenize:uN};function uN(e){const t=this,n=e.attempt(ia,r,e.attempt(this.parser.constructs.flowInitial,o,Je(e,e.attempt(this.parser.constructs.flow,o,e.attempt(hk,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 lN={resolveAll:U1()},cN=B1("string"),dN=B1("text");function B1(e){return{resolveAll:U1(e==="text"?fN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(m){return h(m)?a(m):c(m)}function c(m){if(m===null){n.consume(m);return}return n.enter("data"),n.consume(m),d}function d(m){return h(m)?(n.exit("data"),a(m)):(n.consume(m),d)}function h(m){if(m===null)return!0;const E=o[m];let b=-1;if(E)for(;++b<E.length;){const T=E[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function U1(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 fN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const h=o[a];if(typeof h=="string"){for(u=h.length;h.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(h===-2)d=!0,c++;else if(h!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const h={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:U({},r.end)};r.end=U({},h.start),r.start.offset===r.end.offset?Object.assign(r,h):(e.splice(n,0,["enter",h,t],["exit",h,t]),n+=2)}n++}return e}const hN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:yk},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:v1},flow:{35:wk,42:tl,45:[F1,tl],60:kk,61:F1,95:tl,96:I1,126:I1},flowInitial:{[-2]:pf,[-1]:pf,32:pf},insideSpan:{null:[hf,lN]},string:{38:N1,92:k1},text:{[-5]:gf,[-4]:gf,[-3]:gf,33:Yk,38:N1,42:hf,60:[Gv,Dk],91:Gk,92:[xk,k1],93:mf,95:hf,96:ak}},Symbol.toStringTag,{value:"Module"}));function pN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(W),check:te(F),consume:B,enter:D,exit:Y,interrupt:te(F,{interrupt:!0})},h={code:null,containerState:{},defineSkip:S,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let m=t.tokenize.call(h,d);return t.resolveAll&&a.push(t),h;function E(ne){return u=qn(u,ne),w(),u[u.length-1]!==null?[]:(ge(t,0),h.events=el(a,h.events,h),h.events)}function b(ne,fe){return gN(T(ne),fe)}function T(ne){return mN(u,ne)}function _(){const{_bufferIndex:ne,_index:fe,line:de,column:ae,offset:ye}=r;return{_bufferIndex:ne,_index:fe,line:de,column:ae,offset:ye}}function S(ne){o[ne.line]=ne.column,H()}function w(){let ne;for(;r._index<u.length;){const fe=u[r._index];if(typeof fe=="string")for(ne=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ne&&r._bufferIndex<fe.length;)N(fe.charCodeAt(r._bufferIndex));else N(fe)}}function N(ne){m=m(ne)}function B(ne){Le(ne)?(r.line++,r.column=1,r.offset+=ne===-3?2:1,H()):ne!==-1&&(r.column++,r.offset++),r._bufferIndex<0?r._index++:(r._bufferIndex++,r._bufferIndex===u[r._index].length&&(r._bufferIndex=-1,r._index++)),h.previous=ne}function D(ne,fe){const de=fe||{};return de.type=ne,de.start=_(),h.events.push(["enter",de,h]),c.push(de),de}function Y(ne){const fe=c.pop();return fe.end=_(),h.events.push(["exit",fe,h]),fe}function W(ne,fe){ge(ne,fe.from)}function F(ne,fe){fe.restore()}function te(ne,fe){return de;function de(ae,ye,we){let ue,q,re,A;return Array.isArray(ae)?K(ae):"tokenize"in ae?K([ae]):R(ae);function R(Oe){return We;function We(qe){const Ze=qe!==null&&Oe[qe],Nt=qe!==null&&Oe.null,Kn=[...Array.isArray(Ze)?Ze:Ze?[Ze]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return K(Kn)(qe)}}function K(Oe){return ue=Oe,q=0,Oe.length===0?we:O(Oe[q])}function O(Oe){return We;function We(qe){return A=Te(),re=Oe,Oe.partial||(h.currentConstruct=Oe),Oe.name&&h.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(fe?Object.assign(Object.create(h),fe):h,d,_e,Re)(qe)}}function _e(Oe){return ne(re,A),ye}function Re(Oe){return A.restore(),++q<ue.length?O(ue[q]):we}}}function ge(ne,fe){ne.resolveAll&&!a.includes(ne)&&a.push(ne),ne.resolve&&Rn(h.events,fe,h.events.length-fe,ne.resolve(h.events.slice(fe),h)),ne.resolveTo&&(h.events=ne.resolveTo(h.events,h))}function Te(){const ne=_(),fe=h.previous,de=h.currentConstruct,ae=h.events.length,ye=Array.from(c);return{from:ae,restore:we};function we(){r=ne,h.previous=fe,h.currentConstruct=de,h.events.length=ae,c=ye,H()}}function H(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function mN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function gN(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=`
1
+ (function(Ie,Fe){typeof exports=="object"&&typeof module!="undefined"?Fe(exports):typeof define=="function"&&define.amd?define(["exports"],Fe):(Ie=typeof globalThis!="undefined"?globalThis:Ie||self,Fe(Ie["cimulate-copilot-widget"]={}))})(this,(function(Ie){"use strict";var jF=Object.defineProperty,$F=Object.defineProperties;var VF=Object.getOwnPropertyDescriptors;var nd=Object.getOwnPropertySymbols;var P2=Object.prototype.hasOwnProperty,R2=Object.prototype.propertyIsEnumerable;var Do=(Ie,Fe)=>(Fe=Symbol[Ie])?Fe:Symbol.for("Symbol."+Ie),qF=Ie=>{throw TypeError(Ie)},rd=Math.pow,Um=(Ie,Fe,Ke)=>Fe in Ie?jF(Ie,Fe,{enumerable:!0,configurable:!0,writable:!0,value:Ke}):Ie[Fe]=Ke,H=(Ie,Fe)=>{for(var Ke in Fe||(Fe={}))P2.call(Fe,Ke)&&Um(Ie,Ke,Fe[Ke]);if(nd)for(var Ke of nd(Fe))R2.call(Fe,Ke)&&Um(Ie,Ke,Fe[Ke]);return Ie},be=(Ie,Fe)=>$F(Ie,VF(Fe));var en=(Ie,Fe)=>{var Ke={};for(var lt in Ie)P2.call(Ie,lt)&&Fe.indexOf(lt)<0&&(Ke[lt]=Ie[lt]);if(Ie!=null&&nd)for(var lt of nd(Ie))Fe.indexOf(lt)<0&&R2.call(Ie,lt)&&(Ke[lt]=Ie[lt]);return Ke};var ve=(Ie,Fe,Ke)=>Um(Ie,typeof Fe!="symbol"?Fe+"":Fe,Ke);var rt=(Ie,Fe,Ke)=>new Promise((lt,kt)=>{var Tt=It=>{try{jt(Ke.next(It))}catch(yn){kt(yn)}},Pe=It=>{try{jt(Ke.throw(It))}catch(yn){kt(yn)}},jt=It=>It.done?lt(It.value):Promise.resolve(It.value).then(Tt,Pe);jt((Ke=Ke.apply(Ie,Fe)).next())}),Ur=function(Ie,Fe){this[0]=Ie,this[1]=Fe},id=(Ie,Fe,Ke)=>{var lt=(Pe,jt,It,yn)=>{try{var Ss=Ke[Pe](jt),Mo=(jt=Ss.value)instanceof Ur,sd=Ss.done;Promise.resolve(Mo?jt[0]:jt).then(rr=>Mo?lt(Pe==="return"?Pe:"next",jt[1]?{done:rr.done,value:rr.value}:rr,It,yn):It({value:rr,done:sd})).catch(rr=>lt("throw",rr,It,yn))}catch(rr){yn(rr)}},kt=Pe=>Tt[Pe]=jt=>new Promise((It,yn)=>lt(Pe,jt,It,yn)),Tt={};return Ke=Ke.apply(Ie,Fe),Tt[Do("asyncIterator")]=()=>Tt,kt("next"),kt("throw"),kt("return"),Tt},Hm=Ie=>{var Fe=Ie[Do("asyncIterator")],Ke=!1,lt,kt={};return Fe==null?(Fe=Ie[Do("iterator")](),lt=Tt=>kt[Tt]=Pe=>Fe[Tt](Pe)):(Fe=Fe.call(Ie),lt=Tt=>kt[Tt]=Pe=>{if(Ke){if(Ke=!1,Tt==="throw")throw Pe;return Pe}return Ke=!0,{done:!1,value:new Ur(new Promise(jt=>{var It=Fe[Tt](Pe);It instanceof Object||qF("Object expected"),jt(It)}),1)}}),kt[Do("iterator")]=()=>kt,lt("next"),"throw"in Fe?lt("throw"):kt.throw=Tt=>{throw Tt},"return"in Fe&&lt("return"),kt},L2=(Ie,Fe,Ke)=>(Fe=Ie[Do("asyncIterator")])?Fe.call(Ie):(Ie=Ie[Do("iterator")](),Fe={},Ke=(lt,kt)=>(kt=Ie[lt])&&(Fe[lt]=Tt=>new Promise((Pe,jt,It)=>(Tt=kt.call(Ie,Tt),It=Tt.done,Promise.resolve(Tt.value).then(yn=>Pe({value:yn,done:It}),jt)))),Ke("next"),Ke("return"),Fe);var Fe=document.createElement("style");Fe.textContent=`.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;border-radius:4px;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;background-color:var(--base-color);border-radius:4px;border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;background-color:transparent;border:1px solid transparent;border-radius:4px;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-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.modal{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{width:100%;height:-webkit-fill-available;padding:0 8px;background-color:transparent;border:1px solid #00000040;border-radius:4px}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;gap:.5rem}.cim-widget-search-button-icon{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:130px;background:#fff;padding:.25rem 0;border-radius:.5rem;border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;background-color:#fff;border:1px solid transparent;border-radius:4px;padding:6px;cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;svg{font-size:.75rem}}.cim-widget-clear-chat-icon-button{min-height:32px}.cim-widget-toggle-modal-button.dialog{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.dialog{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border-radius:4px;box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:15dvw;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;overflow-x:hidden}.cim-widget-product-list{flex:1;display:inline-flex;gap:.5rem;padding:.5rem .5rem .5rem 0;overflow-x:auto}.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-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:4px;background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;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);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table{width:100%;margin-top:1rem;margin-bottom:1rem;border-radius:.5rem;border:1px solid #8a8a8a;border-collapse:collapse}.cim-widget-thead{background-color:#f0f0f0;border-bottom-width:2px;border-color:#8a8a8a}.cim-widget-tr{border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:#8a8a8a}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:#8a8a8a}.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;border-radius:8px;padding:.5rem 1rem;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;border-radius:8px;padding:.5rem 1rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:1rem;margin-bottom:1rem;border-radius:8px;&.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:8px;border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.chat{border:1px solid var(--cim-widget-border-color)}.cim-widget-dialog{position:fixed;width:35dvw;height:55dvh;border-radius:.5rem;border:1px solid var(--cim-widget-border-color);font-size:.875rem;&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-right{bottom:.5rem;right:.5rem}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:.5rem;gap:8px}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{margin-top:0;margin-bottom:0}@media(576px<=width<=768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100%;border-radius:0;&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw}.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:.5rem;border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:1rem 1rem 0;margin-bottom:1rem;gap:8px}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{margin-top:0;margin-bottom:0}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{flex:1;overflow-y:auto;padding:1rem}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}
2
+ /*$vite$:1*/`,document.head.appendChild(Fe);function Ke(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var lt={exports:{}},kt={},Tt={exports:{}},Pe={};var jt;function It(){if(jt)return Pe;jt=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),E=Symbol.iterator;function b(R){return R===null||typeof R!="object"?null:(R=E&&R[E]||R["@@iterator"],typeof R=="function"?R:null)}var T={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,x={};function C(R,K,O){this.props=R,this.context=K,this.refs=x,this.updater=O||T}C.prototype.isReactComponent={},C.prototype.setState=function(R,K){if(typeof R!="object"&&typeof R!="function"&&R!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,R,K,"setState")},C.prototype.forceUpdate=function(R){this.updater.enqueueForceUpdate(this,R,"forceUpdate")};function v(){}v.prototype=C.prototype;function U(R,K,O){this.props=R,this.context=K,this.refs=x,this.updater=O||T}var L=U.prototype=new v;L.constructor=U,_(L,C.prototype),L.isPureReactComponent=!0;var Y=Array.isArray,X=Object.prototype.hasOwnProperty,B={current:null},te={key:!0,ref:!0,__self:!0,__source:!0};function ge(R,K,O){var _e,Re={},Oe=null,Ge=null;if(K!=null)for(_e in K.ref!==void 0&&(Ge=K.ref),K.key!==void 0&&(Oe=""+K.key),K)X.call(K,_e)&&!te.hasOwnProperty(_e)&&(Re[_e]=K[_e]);var Ye=arguments.length-2;if(Ye===1)Re.children=O;else if(1<Ye){for(var et=Array(Ye),Nt=0;Nt<Ye;Nt++)et[Nt]=arguments[Nt+2];Re.children=et}if(R&&R.defaultProps)for(_e in Ye=R.defaultProps,Ye)Re[_e]===void 0&&(Re[_e]=Ye[_e]);return{$$typeof:e,type:R,key:Oe,ref:Ge,props:Re,_owner:B.current}}function ye(R,K){return{$$typeof:e,type:R.type,key:K,ref:R.ref,props:R.props,_owner:R._owner}}function M(R){return typeof R=="object"&&R!==null&&R.$$typeof===e}function ae(R){var K={"=":"=0",":":"=2"};return"$"+R.replace(/[=:]/g,function(O){return K[O]})}var he=/\/+/g;function ue(R,K){return typeof R=="object"&&R!==null&&R.key!=null?ae(""+R.key):K.toString(36)}function de(R,K,O,_e,Re){var Oe=typeof R;(Oe==="undefined"||Oe==="boolean")&&(R=null);var Ge=!1;if(R===null)Ge=!0;else switch(Oe){case"string":case"number":Ge=!0;break;case"object":switch(R.$$typeof){case e:case t:Ge=!0}}if(Ge)return Ge=R,Re=Re(Ge),R=_e===""?"."+ue(Ge,0):_e,Y(Re)?(O="",R!=null&&(O=R.replace(he,"$&/")+"/"),de(Re,K,O,"",function(Nt){return Nt})):Re!=null&&(M(Re)&&(Re=ye(Re,O+(!Re.key||Ge&&Ge.key===Re.key?"":(""+Re.key).replace(he,"$&/")+"/")+R)),K.push(Re)),1;if(Ge=0,_e=_e===""?".":_e+":",Y(R))for(var Ye=0;Ye<R.length;Ye++){Oe=R[Ye];var et=_e+ue(Oe,Ye);Ge+=de(Oe,K,O,et,Re)}else if(et=b(R),typeof et=="function")for(R=et.call(R),Ye=0;!(Oe=R.next()).done;)Oe=Oe.value,et=_e+ue(Oe,Ye++),Ge+=de(Oe,K,O,et,Re);else if(Oe==="object")throw K=String(R),Error("Objects are not valid as a React child (found: "+(K==="[object Object]"?"object with keys {"+Object.keys(R).join(", ")+"}":K)+"). If you meant to render a collection of children, use an array instead.");return Ge}function Te(R,K,O){if(R==null)return R;var _e=[],Re=0;return de(R,_e,"","",function(Oe){return K.call(O,Oe,Re++)}),_e}function Ce(R){if(R._status===-1){var K=R._result;K=K(),K.then(function(O){(R._status===0||R._status===-1)&&(R._status=1,R._result=O)},function(O){(R._status===0||R._status===-1)&&(R._status=2,R._result=O)}),R._status===-1&&(R._status=0,R._result=K)}if(R._status===1)return R._result.default;throw R._result}var oe={current:null},q={transition:null},ne={ReactCurrentDispatcher:oe,ReactCurrentBatchConfig:q,ReactCurrentOwner:B};function w(){throw Error("act(...) is not supported in production builds of React.")}return Pe.Children={map:Te,forEach:function(R,K,O){Te(R,function(){K.apply(this,arguments)},O)},count:function(R){var K=0;return Te(R,function(){K++}),K},toArray:function(R){return Te(R,function(K){return K})||[]},only:function(R){if(!M(R))throw Error("React.Children.only expected to receive a single React element child.");return R}},Pe.Component=C,Pe.Fragment=n,Pe.Profiler=o,Pe.PureComponent=U,Pe.StrictMode=r,Pe.Suspense=d,Pe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ne,Pe.act=w,Pe.cloneElement=function(R,K,O){if(R==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+R+".");var _e=_({},R.props),Re=R.key,Oe=R.ref,Ge=R._owner;if(K!=null){if(K.ref!==void 0&&(Oe=K.ref,Ge=B.current),K.key!==void 0&&(Re=""+K.key),R.type&&R.type.defaultProps)var Ye=R.type.defaultProps;for(et in K)X.call(K,et)&&!te.hasOwnProperty(et)&&(_e[et]=K[et]===void 0&&Ye!==void 0?Ye[et]:K[et])}var et=arguments.length-2;if(et===1)_e.children=O;else if(1<et){Ye=Array(et);for(var Nt=0;Nt<et;Nt++)Ye[Nt]=arguments[Nt+2];_e.children=Ye}return{$$typeof:e,type:R.type,key:Re,ref:Oe,props:_e,_owner:Ge}},Pe.createContext=function(R){return R={$$typeof:u,_currentValue:R,_currentValue2:R,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},R.Provider={$$typeof:a,_context:R},R.Consumer=R},Pe.createElement=ge,Pe.createFactory=function(R){var K=ge.bind(null,R);return K.type=R,K},Pe.createRef=function(){return{current:null}},Pe.forwardRef=function(R){return{$$typeof:c,render:R}},Pe.isValidElement=M,Pe.lazy=function(R){return{$$typeof:p,_payload:{_status:-1,_result:R},_init:Ce}},Pe.memo=function(R,K){return{$$typeof:f,type:R,compare:K===void 0?null:K}},Pe.startTransition=function(R){var K=q.transition;q.transition={};try{R()}finally{q.transition=K}},Pe.unstable_act=w,Pe.useCallback=function(R,K){return oe.current.useCallback(R,K)},Pe.useContext=function(R){return oe.current.useContext(R)},Pe.useDebugValue=function(){},Pe.useDeferredValue=function(R){return oe.current.useDeferredValue(R)},Pe.useEffect=function(R,K){return oe.current.useEffect(R,K)},Pe.useId=function(){return oe.current.useId()},Pe.useImperativeHandle=function(R,K,O){return oe.current.useImperativeHandle(R,K,O)},Pe.useInsertionEffect=function(R,K){return oe.current.useInsertionEffect(R,K)},Pe.useLayoutEffect=function(R,K){return oe.current.useLayoutEffect(R,K)},Pe.useMemo=function(R,K){return oe.current.useMemo(R,K)},Pe.useReducer=function(R,K,O){return oe.current.useReducer(R,K,O)},Pe.useRef=function(R){return oe.current.useRef(R)},Pe.useState=function(R){return oe.current.useState(R)},Pe.useSyncExternalStore=function(R,K,O){return oe.current.useSyncExternalStore(R,K,O)},Pe.useTransition=function(){return oe.current.useTransition()},Pe.version="18.3.1",Pe}var yn;function Ss(){return yn||(yn=1,Tt.exports=It()),Tt.exports}var Mo;function sd(){if(Mo)return kt;Mo=1;var e=Ss(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,o=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,E={},b=null,T=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(T=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(E[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)E[p]===void 0&&(E[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:T,props:E,_owner:o.current}}return kt.Fragment=n,kt.jsx=u,kt.jsxs=u,kt}var rr;function B2(){return rr||(rr=1,lt.exports=sd()),lt.exports}var k=B2();const br=Object.create(null);br.open="0",br.close="1",br.ping="2",br.pong="3",br.message="4",br.upgrade="5",br.noop="6";const _u=Object.create(null);Object.keys(br).forEach(e=>{_u[br[e]]=e});const od={type:"error",data:"parser error"},zm=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",jm=typeof ArrayBuffer=="function",$m=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,ad=({type:e,data:t},n,r)=>zm&&t instanceof Blob?n?r(t):Vm(t,r):jm&&(t instanceof ArrayBuffer||$m(t))?n?r(t):Vm(new Blob([t]),r):r(br[e]+(t||"")),Vm=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function qm(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let ud;function U2(e,t){if(zm&&e.data instanceof Blob)return e.data.arrayBuffer().then(qm).then(t);if(jm&&(e.data instanceof ArrayBuffer||$m(e.data)))return t(qm(e.data));ad(e,!1,n=>{ud||(ud=new TextEncoder),t(ud.encode(n))})}const Ym="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Fo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<Ym.length;e++)Fo[Ym.charCodeAt(e)]=e;const H2=e=>{let t=e.length*.75,n=e.length,r,o=0,a,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),p=new Uint8Array(f);for(r=0;r<n;r+=4)a=Fo[e.charCodeAt(r)],u=Fo[e.charCodeAt(r+1)],c=Fo[e.charCodeAt(r+2)],d=Fo[e.charCodeAt(r+3)],p[o++]=a<<2|u>>4,p[o++]=(u&15)<<4|c>>2,p[o++]=(c&3)<<6|d&63;return f},z2=typeof ArrayBuffer=="function",ld=(e,t)=>{if(typeof e!="string")return{type:"message",data:Wm(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:j2(e.substring(1),t)}:_u[n]?e.length>1?{type:_u[n],data:e.substring(1)}:{type:_u[n]}:od},j2=(e,t)=>{if(z2){const n=H2(e);return Wm(n,t)}else return{base64:!0,data:e}},Wm=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,Gm="",$2=(e,t)=>{const n=e.length,r=new Array(n);let o=0;e.forEach((a,u)=>{ad(a,!1,c=>{r[u]=c,++o===n&&t(r.join(Gm))})})},V2=(e,t)=>{const n=e.split(Gm),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 q2(){return new TransformStream({transform(e,t){U2(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 cd;function xu(e){return e.reduce((t,n)=>t+n.length,0)}function Su(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 Y2(e,t){cd||(cd=new TextDecoder);const n=[];let r=0,o=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(xu(n)<1)break;const d=Su(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(xu(n)<2)break;const d=Su(n,2);o=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(xu(n)<8)break;const d=Su(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(od);break}o=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(xu(n)<o)break;const d=Su(n,o);c.enqueue(ld(a?d:cd.decode(d),t)),r=0}if(o===0||o>e){c.enqueue(od);break}}}})}const Km=4;function Mt(e){if(e)return W2(e)}function W2(e){for(var t in Mt.prototype)e[t]=Mt.prototype[t];return e}Mt.prototype.on=Mt.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},Mt.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},Mt.prototype.off=Mt.prototype.removeListener=Mt.prototype.removeAllListeners=Mt.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},Mt.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},Mt.prototype.emitReserved=Mt.prototype.emit,Mt.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},Mt.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),jn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),G2="arraybuffer";function YF(){}function Qm(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const K2=jn.setTimeout,Q2=jn.clearTimeout;function Cu(e,t){t.useNativeTimers?(e.setTimeoutFn=K2.bind(jn),e.clearTimeoutFn=Q2.bind(jn)):(e.setTimeoutFn=jn.setTimeout.bind(jn),e.clearTimeoutFn=jn.clearTimeout.bind(jn))}const X2=1.33;function J2(e){return typeof e=="string"?Z2(e):Math.ceil((e.byteLength||e.size)*X2)}function Z2(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 Xm(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function eS(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function tS(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 nS extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class dd extends Mt{constructor(t){super(),this.writable=!1,Cu(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 nS(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&&+(this.opts.port!==443)||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=eS(t);return n.length?"?"+n:""}}class rS extends dd{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)};V2(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,$2(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]=Xm()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let Jm=!1;try{Jm=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const iS=Jm;function sS(){}class oS extends rS{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 _r extends Mt{constructor(t,n,r){super(),this.createRequest=t,Cu(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=Qm(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=_r.requestsCount++,_r.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=sS,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete _r.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(_r.requestsCount=0,_r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",Zm);else if(typeof addEventListener=="function"){const e="onpagehide"in jn?"pagehide":"unload";addEventListener(e,Zm,!1)}}function Zm(){for(let e in _r.requests)_r.requests.hasOwnProperty(e)&&_r.requests[e].abort()}const aS=(function(){const e=e0({xdomain:!1});return e&&e.responseType!==null})();class uS extends oS{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=aS&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new _r(e0,this.uri(),t)}}function e0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||iS))return new XMLHttpRequest}catch(n){}if(!t)try{return new jn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const t0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class lS extends dd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=t0?{}:Qm(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;ad(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]=Xm()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const fd=jn.WebSocket||jn.MozWebSocket;class cS extends lS{createSocket(t,n,r){return t0?new fd(t,n,r):n?new fd(t,n):new fd(t)}doWrite(t,n){this.ws.send(n)}}class dS extends dd{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=Y2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),o=q2();o.readable.pipeTo(t.writable),this._writer=o.writable.getWriter();const a=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),a())}).catch(c=>{})};a();const u={type:"open"};this.query.sid&&(u.data=`{"sid":"${this.query.sid}"}`),this._writer.write(u).then(()=>this.onOpen())})})}write(t){this.writable=!1;for(let n=0;n<t.length;n++){const r=t[n],o=n===t.length-1;this._writer.write(r).then(()=>{o&&wu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const fS={websocket:cS,webtransport:dS,polling:uS},hS=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,pS=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function hd(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=hS.exec(e||""),a={},u=14;for(;u--;)a[pS[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=mS(a,a.path),a.queryKey=gS(a,a.query),a}function mS(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 gS(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,o,a){o&&(n[o]=a)}),n}const pd=typeof addEventListener=="function"&&typeof removeEventListener=="function",Au=[];pd&&addEventListener("offline",()=>{Au.forEach(e=>e())},!1);class ui extends Mt{constructor(t,n){if(super(),this.binaryType=G2,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=hd(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=hd(n.host).host);Cu(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=tS(this.opts.query)),pd&&(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"})},Au.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=Km,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&&ui.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",ui.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+=J2(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(ui.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(),pd&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Au.indexOf(this._offlineEventListener);r!==-1&&Au.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}ui.protocol=Km;class ES extends ui{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;ui.priorWebsocketSuccess=!1;const o=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",E=>{if(!r)if(E.type==="pong"&&E.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;ui.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 b=new Error("probe error");b.transport=n.name,this.emitReserved("upgradeError",b)}}))};function a(){r||(r=!0,p(),n.close(),n=null)}const u=E=>{const b=new Error("probe error: "+E);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(E){n&&E.name!==n.name&&a()}const p=()=>{n.removeListener("open",o),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",o),n.once("error",u),n.once("close",c),this.once("close",d),this.once("upgrading",f),this._upgrades.indexOf("webtransport")!==-1&&t!=="webtransport"?this.setTimeoutFn(()=>{r||n.open()},200):n.open()}onHandshake(t){this._upgrades=this._filterUpgrades(t.upgrades),super.onHandshake(t)}_filterUpgrades(t){const n=[];for(let r=0;r<t.length;r++)~this.transports.indexOf(t[r])&&n.push(t[r]);return n}}let yS=class extends ES{constructor(t,n={}){const r=typeof t=="object"?t:n;(!r.transports||r.transports&&typeof r.transports[0]=="string")&&(r.transports=(r.transports||["polling","websocket","webtransport"]).map(o=>fS[o]).filter(o=>!!o)),super(t,r)}};function TS(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=hd(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 bS=typeof ArrayBuffer=="function",_S=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,n0=Object.prototype.toString,xS=typeof Blob=="function"||typeof Blob!="undefined"&&n0.call(Blob)==="[object BlobConstructor]",SS=typeof File=="function"||typeof File!="undefined"&&n0.call(File)==="[object FileConstructor]";function md(e){return bS&&(e instanceof ArrayBuffer||_S(e))||xS&&e instanceof Blob||SS&&e instanceof File}function vu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(vu(e[n]))return!0;return!1}if(md(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return vu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&vu(e[n]))return!0;return!1}function wS(e){const t=[],n=e.data,r=e;return r.data=gd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function gd(e,t){if(!e)return e;if(md(e)){const n={_placeholder:!0,num:t.length};return t.push(e),n}else if(Array.isArray(e)){const n=new Array(e.length);for(let r=0;r<e.length;r++)n[r]=gd(e[r],t);return n}else if(typeof e=="object"&&!(e instanceof Date)){const n={};for(const r in e)Object.prototype.hasOwnProperty.call(e,r)&&(n[r]=gd(e[r],t));return n}return e}function CS(e,t){return e.data=Ed(e.data,t),delete e.attachments,e}function Ed(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]=Ed(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Ed(e[n],t));return e}const AS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Je;(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"})(Je||(Je={}));class vS{constructor(t){this.replacer=t}encode(t){return(t.type===Je.EVENT||t.type===Je.ACK)&&vu(t)?this.encodeAsBinary({type:t.type===Je.EVENT?Je.BINARY_EVENT:Je.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===Je.BINARY_EVENT||t.type===Je.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=wS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function r0(e){return Object.prototype.toString.call(e)==="[object Object]"}class yd extends Mt{constructor(t){super(),this.reviver=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===Je.BINARY_EVENT;r||n.type===Je.BINARY_ACK?(n.type=r?Je.EVENT:Je.ACK,this.reconstructor=new kS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else if(md(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(Je[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Je.BINARY_EVENT||r.type===Je.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");r.attachments=Number(u)}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const o=t.charAt(n+1);if(o!==""&&Number(o)==o){const a=n+1;for(;++n;){const u=t.charAt(n);if(u==null||Number(u)!=u){--n;break}if(n===t.length)break}r.id=Number(t.substring(a,n+1))}if(t.charAt(++n)){const a=this.tryParse(t.substr(n));if(yd.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Je.CONNECT:return r0(n);case Je.DISCONNECT:return n===void 0;case Je.CONNECT_ERROR:return typeof n=="string"||r0(n);case Je.EVENT:case Je.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&AS.indexOf(n[0])===-1);case Je.ACK:case Je.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class kS{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=CS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const NS=Object.freeze(Object.defineProperty({__proto__:null,Decoder:yd,Encoder:vS,get PacketType(){return Je}},Symbol.toStringTag,{value:"Module"}));function ir(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const OS=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class i0 extends Mt{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=[ir(t,"open",this.onopen.bind(this)),ir(t,"packet",this.onpacket.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(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(OS.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:Je.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,E=n.pop();this._registerAckCallback(p,E),u.id=p}const c=(o=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||o===void 0?void 0:o.writable,d=this.connected&&!(!((a=this.io.engine)===null||a===void 0)&&a._hasPingExpired());return this.flags.volatile&&!c||(d?(this.notifyOutgoingListeners(u),this.packet(u)):this.sendBuffer.push(u)),this.flags={},this}_registerAckCallback(t,n){var r;const o=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(o===void 0){this.acks[t]=n;return}const a=this.io.setTimeoutFn(()=>{delete this.acks[t];for(let c=0;c<this.sendBuffer.length;c++)this.sendBuffer[c].id===t&&this.sendBuffer.splice(c,1);n.call(this,new Error("operation has timed out"))},o),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,o)=>{const a=(u,c)=>u?o(u):r(c);a.withError=!0,n.push(a),this.emit(t,...n)})}_addToQueue(t){let n;typeof t[t.length-1]=="function"&&(n=t.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:t,flags:Object.assign({fromQueue:!0},this.flags)};t.push((o,...a)=>r!==this._queue[0]?void 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:Je.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 Je.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 Je.EVENT:case Je.BINARY_EVENT:this.onevent(t);break;case Je.ACK:case Je.BINARY_ACK:this.onack(t);break;case Je.DISCONNECT:this.ondisconnect();break;case Je.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:Je.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.emitReserved("connect"),this._drainQueue(!0)}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:Je.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 ws(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}ws.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},ws.prototype.reset=function(){this.attempts=0},ws.prototype.setMin=function(e){this.ms=e},ws.prototype.setMax=function(e){this.max=e},ws.prototype.setJitter=function(e){this.jitter=e};class Td extends Mt{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,Cu(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 ws({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||NS;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 yS(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const o=ir(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=ir(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{o(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(o),this.subs.push(u),this}connect(t){return this.open(t)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const t=this.engine;this.subs.push(ir(t,"ping",this.onping.bind(this)),ir(t,"data",this.ondata.bind(this)),ir(t,"error",this.onerror.bind(this)),ir(t,"close",this.onclose.bind(this)),ir(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 i0(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 Bo={};function ku(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=TS(e,t.path||"/socket.io"),r=n.source,o=n.id,a=n.path,u=Bo[o]&&a in Bo[o].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Td(r,t):(Bo[o]||(Bo[o]=new Td(r,t)),d=Bo[o]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(ku,{Manager:Td,Socket:i0,io:ku,connect:ku});var IS=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===PS})(t)})(e)},PS=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function Uo(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Cs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function RS(e,t,n){return e.concat(t).map((function(r){return Uo(r,n)}))}function s0(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 o0(e,t){try{return t in e}catch(n){return!1}}function LS(e,t,n){var r={};return n.isMergeableObject(e)&&s0(e).forEach((function(o){r[o]=Uo(e[o],n)})),s0(t).forEach((function(o){(function(a,u){return o0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,o)||(o0(e,o)&&n.isMergeableObject(t[o])?r[o]=(function(a,u){if(!u.customMerge)return Cs;var c=u.customMerge(a);return typeof c=="function"?c:Cs})(o,n)(e[o],t[o],n):r[o]=Uo(t[o],n))})),r}function Cs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||RS,n.isMergeableObject=n.isMergeableObject||IS,n.cloneUnlessOtherwiseSpecified=Uo;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):LS(e,t,n):Uo(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 DS=Cs;class MS{constructor(t){Object.assign(this,t)}}function hn(e){if(e)return(function(t){for(var n in hn.prototype)t[n]=hn.prototype[n];return t})(e)}hn.prototype.on=hn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},hn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},hn.prototype.off=hn.prototype.removeListener=hn.prototype.removeAllListeners=hn.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},hn.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},hn.prototype.emitReserved=hn.prototype.emit,hn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},hn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const FS=typeof ArrayBuffer=="function",a0=Object.prototype.toString,BS=typeof Blob=="function"||typeof Blob!="undefined"&&a0.call(Blob)==="[object BlobConstructor]",US=typeof File=="function"||typeof File!="undefined"&&a0.call(File)==="[object FileConstructor]";function bd(e){return FS&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||BS&&e instanceof Blob||US&&e instanceof File}function Nu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Nu(e[n]))return!0;return!1}if(bd(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Nu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Nu(e[n]))return!0;return!1}function HS(e){const t=[],n=e.data,r=e;return r.data=_d(n,t),r.attachments=t.length,{packet:r,buffers:t}}function _d(e,t){if(!e)return e;if(bd(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]=_d(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]=_d(e[r],t));return n}return e}function zS(e,t){return e.data=xd(e.data,t),delete e.attachments,e}function xd(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]=xd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=xd(e[n],t));return e}const jS=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var Ct;(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"})(Ct||(Ct={}));class $S{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Nu(t)?[this.encodeAsString(t)]:this.encodeAsBinary({type:t.type===Ct.EVENT?Ct.BINARY_EVENT:Ct.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id})}encodeAsString(t){let n=""+t.type;return t.type!==Ct.BINARY_EVENT&&t.type!==Ct.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=HS(t),r=this.encodeAsString(n.packet),o=n.buffers;return o.unshift(r),o}}function u0(e){return Object.prototype.toString.call(e)==="[object Object]"}class Sd extends hn{constructor(t){super(),this.reviver=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===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new VS(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!bd(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(Ct[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===Ct.BINARY_EVENT||r.type===Ct.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");r.attachments=Number(u)}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(!Sd.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return u0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||u0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&jS.indexOf(n[0])===-1);case Ct.ACK:case Ct.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VS{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=zS(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const l0=["searchParams.facetFilters","browseParams.facetFilters","hits","products"],c0=(e,t,n)=>function r(o,a=[]){const u=Object.entries(o).map((([c,d])=>{const f=[...a,t(c)];return[e(c),d instanceof Object&&!(n!=null&&n.includes(f.join(".")))?r(d,f):d]}));return Array.isArray(o)?u.map((c=>c[1])):Object.fromEntries(u)},d0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),qS=c0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),l0),f0=c0(d0,d0,l0),YS={Encoder:class extends $S{encode(e){var t,n;return super.encode(be(H({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],qS(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 Sd{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?f0(r):r)):n instanceof Object?f0(n):n)):t))}}},WS={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class GS{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:o="/copilot",socketOptions:a={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=f=>{console.log("[Copilot SDK] Connect Ack:",f),this.socket.auth={[this.sessionIdKey]:f.sessionId}},this.handleDisconnect=f=>{console.warn(`[Copilot SDK] Disconnected: ${f}`),f!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${f}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=f=>{console.error(`[Copilot SDK] Connect error: ${f.message}`);const p=f.message.match(/['"]error['"]:\s*['"](\w+)['"]/),E=p==null?void 0:p[1];E&&["InvalidApiKey","InvalidToken","BadRequest"].includes(E)?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 u=`${r}${o}`,c={};t?c["x-cimulate-api-key"]=t:n&&(c.Authorization=`Bearer ${n}`);const d=[WS,a,{parser:YS,withCredentials:!0,transportOptions:{polling:{extraHeaders:c}}}];this.socket=ku(u,DS.all(d))}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*rd(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 rt(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}search(t,n){return rt(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}facetedNavigation(t,n){return rt(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 rt(this,null,function*(){return this.asyncResponse("product_view",t,n)})}askCim(t,n){return rt(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}requestSessionInformation(t){return rt(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return rt(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 rt(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let o="";const a=(function(u){return id(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Ur(u({emit:E=>{c.push(E),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Ur(new Promise((E=>{f=E})));for(;c.length>0;)yield c.shift()}finally{yield new Ur(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==o&&u(p)};return this.socket.onAny(d),()=>rt(this,null,function*(){this.socket.offAny(d)})}));return{result:yield new Promise(((u,c)=>this.socket.emit(t,n,(d=>{d.name==="error"?c(new MS(d)):(o=d==null?void 0:d.id,u(d))})))),events:a}})}}var $=Ss();const zi=Ke($);function h0(e,t){return function(){return e.apply(t,arguments)}}const{toString:KS}=Object.prototype,{getPrototypeOf:wd}=Object,{iterator:Ou,toStringTag:p0}=Symbol,Iu=(e=>t=>{const n=KS.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),sr=e=>(e=e.toLowerCase(),t=>Iu(t)===e),Pu=e=>t=>typeof t===e,{isArray:As}=Array,vs=Pu("undefined");function Ho(e){return e!==null&&!vs(e)&&e.constructor!==null&&!vs(e.constructor)&&Tn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const m0=sr("ArrayBuffer");function QS(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&m0(e.buffer),t}const XS=Pu("string"),Tn=Pu("function"),g0=Pu("number"),zo=e=>e!==null&&typeof e=="object",JS=e=>e===!0||e===!1,Ru=e=>{if(Iu(e)!=="object")return!1;const t=wd(e);return(t===null||t===Object.prototype||Object.getPrototypeOf(t)===null)&&!(p0 in e)&&!(Ou in e)},ZS=e=>{if(!zo(e)||Ho(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},ew=sr("Date"),tw=sr("File"),nw=sr("Blob"),rw=sr("FileList"),iw=e=>zo(e)&&Tn(e.pipe),sw=e=>{let t;return e&&(typeof FormData=="function"&&e instanceof FormData||Tn(e.append)&&((t=Iu(e))==="formdata"||t==="object"&&Tn(e.toString)&&e.toString()==="[object FormData]"))},ow=sr("URLSearchParams"),[aw,uw,lw,cw]=["ReadableStream","Request","Response","Headers"].map(sr),dw=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function jo(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,o;if(typeof e!="object"&&(e=[e]),As(e))for(r=0,o=e.length;r<o;r++)t.call(null,e[r],r,e);else{if(Ho(e))return;const a=n?Object.getOwnPropertyNames(e):Object.keys(e),u=a.length;let c;for(r=0;r<u;r++)c=a[r],t.call(null,e[c],c,e)}}function E0(e,t){if(Ho(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 ji=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,y0=e=>!vs(e)&&e!==ji;function Cd(){const{caseless:e,skipUndefined:t}=y0(this)&&this||{},n={},r=(o,a)=>{if(a==="__proto__"||a==="constructor"||a==="prototype")return;const u=e&&E0(n,a)||a;Ru(n[u])&&Ru(o)?n[u]=Cd(n[u],o):Ru(o)?n[u]=Cd({},o):As(o)?n[u]=o.slice():(!t||!vs(o))&&(n[u]=o)};for(let o=0,a=arguments.length;o<a;o++)arguments[o]&&jo(arguments[o],r);return n}const fw=(e,t,n,{allOwnKeys:r}={})=>(jo(t,(o,a)=>{n&&Tn(o)?Object.defineProperty(e,a,{value:h0(o,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{value:o,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),hw=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),pw=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{value:t.prototype}),n&&Object.assign(e.prototype,n)},mw=(e,t,n,r)=>{let o,a,u;const c={};if(t=t||{},e==null)return t;do{for(o=Object.getOwnPropertyNames(e),a=o.length;a-- >0;)u=o[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&wd(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},gw=(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},Ew=e=>{if(!e)return null;if(As(e))return e;let t=e.length;if(!g0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},yw=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&wd(Uint8Array)),Tw=(e,t)=>{const r=(e&&e[Ou]).call(e);let o;for(;(o=r.next())&&!o.done;){const a=o.value;t.call(e,a[0],a[1])}},bw=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},_w=sr("HTMLFormElement"),xw=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,o){return r.toUpperCase()+o}),T0=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),Sw=sr("RegExp"),b0=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};jo(n,(o,a)=>{let u;(u=t(o,a,e))!==!1&&(r[a]=u||o)}),Object.defineProperties(e,r)},ww=e=>{b0(e,(t,n)=>{if(Tn(e)&&["arguments","caller","callee"].indexOf(n)!==-1)return!1;const r=e[n];if(Tn(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+"'")})}})},Cw=(e,t)=>{const n={},r=o=>{o.forEach(a=>{n[a]=!0})};return As(e)?r(e):r(String(e).split(t)),n},Aw=()=>{},vw=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function kw(e){return!!(e&&Tn(e.append)&&e[p0]==="FormData"&&e[Ou])}const Nw=e=>{const t=new Array(10),n=(r,o)=>{if(zo(r)){if(t.indexOf(r)>=0)return;if(Ho(r))return r;if(!("toJSON"in r)){t[o]=r;const a=As(r)?[]:{};return jo(r,(u,c)=>{const d=n(u,o+1);!vs(d)&&(a[c]=d)}),t[o]=void 0,a}}return r};return n(e,0)},Ow=sr("AsyncFunction"),Iw=e=>e&&(zo(e)||Tn(e))&&Tn(e.then)&&Tn(e.catch),_0=((e,t)=>e?setImmediate:t?((n,r)=>(ji.addEventListener("message",({source:o,data:a})=>{o===ji&&a===n&&r.length&&r.shift()()},!1),o=>{r.push(o),ji.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Tn(ji.postMessage)),Pw=typeof queueMicrotask!="undefined"?queueMicrotask.bind(ji):typeof process!="undefined"&&process.nextTick||_0,Q={isArray:As,isArrayBuffer:m0,isBuffer:Ho,isFormData:sw,isArrayBufferView:QS,isString:XS,isNumber:g0,isBoolean:JS,isObject:zo,isPlainObject:Ru,isEmptyObject:ZS,isReadableStream:aw,isRequest:uw,isResponse:lw,isHeaders:cw,isUndefined:vs,isDate:ew,isFile:tw,isBlob:nw,isRegExp:Sw,isFunction:Tn,isStream:iw,isURLSearchParams:ow,isTypedArray:yw,isFileList:rw,forEach:jo,merge:Cd,extend:fw,trim:dw,stripBOM:hw,inherits:pw,toFlatObject:mw,kindOf:Iu,kindOfTest:sr,endsWith:gw,toArray:Ew,forEachEntry:Tw,matchAll:bw,isHTMLForm:_w,hasOwnProperty:T0,hasOwnProp:T0,reduceDescriptors:b0,freezeMethods:ww,toObjectSet:Cw,toCamelCase:xw,noop:Aw,toFiniteNumber:vw,findKey:E0,global:ji,isContextDefined:y0,isSpecCompliantForm:kw,toJSONObject:Nw,isAsyncFn:Ow,isThenable:Iw,setImmediate:_0,asap:Pw,isIterable:e=>e!=null&&Tn(e[Ou])};let He=class D2 extends Error{static from(t,n,r,o,a,u){const c=new D2(t.message,n||t.code,r,o,a);return c.cause=t,c.name=t.name,u&&Object.assign(c,u),c}constructor(t,n,r,o,a){super(t),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(){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:Q.toJSONObject(this.config),code:this.code,status:this.status}}};He.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",He.ERR_BAD_OPTION="ERR_BAD_OPTION",He.ECONNABORTED="ECONNABORTED",He.ETIMEDOUT="ETIMEDOUT",He.ERR_NETWORK="ERR_NETWORK",He.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",He.ERR_DEPRECATED="ERR_DEPRECATED",He.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",He.ERR_BAD_REQUEST="ERR_BAD_REQUEST",He.ERR_CANCELED="ERR_CANCELED",He.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",He.ERR_INVALID_URL="ERR_INVALID_URL";const Rw=null;function Ad(e){return Q.isPlainObject(e)||Q.isArray(e)}function x0(e){return Q.endsWith(e,"[]")?e.slice(0,-2):e}function S0(e,t,n){return e?e.concat(t).map(function(o,a){return o=x0(o),!n&&a?"["+o+"]":o}).join(n?".":""):t}function Lw(e){return Q.isArray(e)&&!e.some(Ad)}const Dw=Q.toFlatObject(Q,{},null,function(t){return/^is[A-Z]/.test(t)});function Lu(e,t,n){if(!Q.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=Q.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(x,C){return!Q.isUndefined(C[x])});const r=n.metaTokens,o=n.visitor||p,a=n.dots,u=n.indexes,d=(n.Blob||typeof Blob!="undefined"&&Blob)&&Q.isSpecCompliantForm(t);if(!Q.isFunction(o))throw new TypeError("visitor must be a function");function f(_){if(_===null)return"";if(Q.isDate(_))return _.toISOString();if(Q.isBoolean(_))return _.toString();if(!d&&Q.isBlob(_))throw new He("Blob is not supported. Use a Buffer instead.");return Q.isArrayBuffer(_)||Q.isTypedArray(_)?d&&typeof Blob=="function"?new Blob([_]):Buffer.from(_):_}function p(_,x,C){let v=_;if(_&&!C&&typeof _=="object"){if(Q.endsWith(x,"{}"))x=r?x:x.slice(0,-2),_=JSON.stringify(_);else if(Q.isArray(_)&&Lw(_)||(Q.isFileList(_)||Q.endsWith(x,"[]"))&&(v=Q.toArray(_)))return x=x0(x),v.forEach(function(L,Y){!(Q.isUndefined(L)||L===null)&&t.append(u===!0?S0([x],Y,a):u===null?x:x+"[]",f(L))}),!1}return Ad(_)?!0:(t.append(S0(C,x,a),f(_)),!1)}const E=[],b=Object.assign(Dw,{defaultVisitor:p,convertValue:f,isVisitable:Ad});function T(_,x){if(!Q.isUndefined(_)){if(E.indexOf(_)!==-1)throw Error("Circular reference detected in "+x.join("."));E.push(_),Q.forEach(_,function(v,U){(!(Q.isUndefined(v)||v===null)&&o.call(t,v,Q.isString(U)?U.trim():U,x,b))===!0&&T(v,x?x.concat(U):[U])}),E.pop()}}if(!Q.isObject(e))throw new TypeError("data must be an object");return T(e),t}function w0(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};return encodeURIComponent(e).replace(/[!'()~]|%20|%00/g,function(r){return t[r]})}function vd(e,t){this._pairs=[],e&&Lu(e,this,t)}const C0=vd.prototype;C0.append=function(t,n){this._pairs.push([t,n])},C0.toString=function(t){const n=t?function(r){return t.call(this,r,w0)}:w0;return this._pairs.map(function(o){return n(o[0])+"="+n(o[1])},"").join("&")};function Mw(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function A0(e,t,n){if(!t)return e;const r=n&&n.encode||Mw,o=Q.isFunction(n)?{serialize:n}:n,a=o&&o.serialize;let u;if(a?u=a(t,o):u=Q.isURLSearchParams(t)?t.toString():new vd(t,o).toString(r),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class v0{constructor(){this.handlers=[]}use(t,n,r){return this.handlers.push({fulfilled:t,rejected:n,synchronous:r?r.synchronous:!1,runWhen:r?r.runWhen:null}),this.handlers.length-1}eject(t){this.handlers[t]&&(this.handlers[t]=null)}clear(){this.handlers&&(this.handlers=[])}forEach(t){Q.forEach(this.handlers,function(r){r!==null&&t(r)})}}const kd={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0},Fw={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:vd,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},Nd=typeof window!="undefined"&&typeof document!="undefined",Od=typeof navigator=="object"&&navigator||void 0,Bw=Nd&&(!Od||["ReactNative","NativeScript","NS"].indexOf(Od.product)<0),Uw=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",Hw=Nd&&window.location.href||"http://localhost",tn=H(H({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:Nd,hasStandardBrowserEnv:Bw,hasStandardBrowserWebWorkerEnv:Uw,navigator:Od,origin:Hw},Symbol.toStringTag,{value:"Module"}))),Fw);function zw(e,t){return Lu(e,new tn.classes.URLSearchParams,H({visitor:function(n,r,o,a){return tn.isNode&&Q.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}function jw(e){return Q.matchAll(/\w+|\[(\w*)]/g,e).map(t=>t[0]==="[]"?"":t[1]||t[0])}function $w(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 k0(e){function t(n,r,o,a){let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&Q.isArray(o)?o.length:u,d?(Q.hasOwnProp(o,u)?o[u]=[o[u],r]:o[u]=r,!c):((!o[u]||!Q.isObject(o[u]))&&(o[u]=[]),t(n,r,o[u],a)&&Q.isArray(o[u])&&(o[u]=$w(o[u])),!c)}if(Q.isFormData(e)&&Q.isFunction(e.entries)){const n={};return Q.forEachEntry(e,(r,o)=>{t(jw(r),o,n,0)}),n}return null}function Vw(e,t,n){if(Q.isString(e))try{return(t||JSON.parse)(e),Q.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const $o={transitional:kd,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",o=r.indexOf("application/json")>-1,a=Q.isObject(t);if(a&&Q.isHTMLForm(t)&&(t=new FormData(t)),Q.isFormData(t))return o?JSON.stringify(k0(t)):t;if(Q.isArrayBuffer(t)||Q.isBuffer(t)||Q.isStream(t)||Q.isFile(t)||Q.isBlob(t)||Q.isReadableStream(t))return t;if(Q.isArrayBufferView(t))return t.buffer;if(Q.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){if(r.indexOf("application/x-www-form-urlencoded")>-1)return zw(t,this.formSerializer).toString();if((c=Q.isFileList(t))||r.indexOf("multipart/form-data")>-1){const d=this.env&&this.env.FormData;return Lu(c?{"files[]":t}:t,d&&new d,this.formSerializer)}}return a||o?(n.setContentType("application/json",!1),Vw(t)):t}],transformResponse:[function(t){const n=this.transitional||$o.transitional,r=n&&n.forcedJSONParsing,o=this.responseType==="json";if(Q.isResponse(t)||Q.isReadableStream(t))return t;if(t&&Q.isString(t)&&(r&&!this.responseType||o)){const u=!(n&&n.silentJSONParsing)&&o;try{return JSON.parse(t,this.parseReviver)}catch(c){if(u)throw c.name==="SyntaxError"?He.from(c,He.ERR_BAD_RESPONSE,this,null,this.response):c}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:tn.classes.FormData,Blob:tn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};Q.forEach(["delete","get","head","post","put","patch"],e=>{$o.headers[e]={}});const qw=Q.toObjectSet(["age","authorization","content-length","content-type","etag","expires","from","host","if-modified-since","if-unmodified-since","last-modified","location","max-forwards","proxy-authorization","referer","retry-after","user-agent"]),Yw=e=>{const t={};let n,r,o;return e&&e.split(`
3
+ `).forEach(function(u){o=u.indexOf(":"),n=u.substring(0,o).trim().toLowerCase(),r=u.substring(o+1).trim(),!(!n||t[n]&&qw[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t},N0=Symbol("internals");function Vo(e){return e&&String(e).trim().toLowerCase()}function Du(e){return e===!1||e==null?e:Q.isArray(e)?e.map(Du):String(e)}function Ww(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 Gw=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function Id(e,t,n,r,o){if(Q.isFunction(r))return r.call(this,t,n);if(o&&(t=n),!!Q.isString(t)){if(Q.isString(r))return t.indexOf(r)!==-1;if(Q.isRegExp(r))return r.test(t)}}function Kw(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function Qw(e,t){const n=Q.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{value:function(o,a,u){return this[r].call(this,t,o,a,u)},configurable:!0})})}let bn=class{constructor(t){t&&this.set(t)}set(t,n,r){const o=this;function a(c,d,f){const p=Vo(d);if(!p)throw new Error("header name must be a non-empty string");const E=Q.findKey(o,p);(!E||o[E]===void 0||f===!0||f===void 0&&o[E]!==!1)&&(o[E||d]=Du(c))}const u=(c,d)=>Q.forEach(c,(f,p)=>a(f,p,d));if(Q.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if(Q.isString(t)&&(t=t.trim())&&!Gw(t))u(Yw(t),n);else if(Q.isObject(t)&&Q.isIterable(t)){let c={},d,f;for(const p of t){if(!Q.isArray(p))throw TypeError("Object iterator must return a key-value pair");c[f=p[0]]=(d=c[f])?Q.isArray(d)?[...d,p[1]]:[d,p[1]]:p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=Vo(t),t){const r=Q.findKey(this,t);if(r){const o=this[r];if(!n)return o;if(n===!0)return Ww(o);if(Q.isFunction(n))return n.call(this,o,r);if(Q.isRegExp(n))return n.exec(o);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=Vo(t),t){const r=Q.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||Id(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let o=!1;function a(u){if(u=Vo(u),u){const c=Q.findKey(r,u);c&&(!n||Id(r,r[c],c,n))&&(delete r[c],o=!0)}}return Q.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||Id(this,this[a],a,t,!0))&&(delete this[a],o=!0)}return o}normalize(t){const n=this,r={};return Q.forEach(this,(o,a)=>{const u=Q.findKey(r,a);if(u){n[u]=Du(o),delete n[a];return}const c=t?Kw(a):String(a).trim();c!==a&&delete n[a],n[c]=Du(o),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return Q.forEach(this,(r,o)=>{r!=null&&r!==!1&&(n[o]=t&&Q.isArray(r)?r.join(", "):r)}),n}[Symbol.iterator](){return Object.entries(this.toJSON())[Symbol.iterator]()}toString(){return Object.entries(this.toJSON()).map(([t,n])=>t+": "+n).join(`
4
+ `)}getSetCookie(){return this.get("set-cookie")||[]}get[Symbol.toStringTag](){return"AxiosHeaders"}static from(t){return t instanceof this?t:new this(t)}static concat(t,...n){const r=new this(t);return n.forEach(o=>r.set(o)),r}static accessor(t){const r=(this[N0]=this[N0]={accessors:{}}).accessors,o=this.prototype;function a(u){const c=Vo(u);r[c]||(Qw(o,u),r[c]=!0)}return Q.isArray(t)?t.forEach(a):a(t),this}};bn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),Q.reduceDescriptors(bn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),Q.freezeMethods(bn);function Pd(e,t){const n=this||$o,r=t||n,o=bn.from(r.headers);let a=r.data;return Q.forEach(e,function(c){a=c.call(n,a,o.normalize(),t?t.status:void 0)}),o.normalize(),a}function O0(e){return!!(e&&e.__CANCEL__)}let qo=class extends He{constructor(t,n,r){super(t==null?"canceled":t,He.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function I0(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new He("Request failed with status code "+n.status,[He.ERR_BAD_REQUEST,He.ERR_BAD_RESPONSE][Math.floor(n.status/100)-4],n.config,n.request,n))}function Xw(e){const t=/^([-+\w]{1,25})(:?\/\/|:)/.exec(e);return t&&t[1]||""}function Jw(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 E=a,b=0;for(;E!==o;)b+=n[E++],E=E%e;if(o=(o+1)%e,o===a&&(a=(a+1)%e),f-u<t)return;const T=p&&f-p;return T?Math.round(b*1e3/T):void 0}}function Zw(e,t){let n=0,r=1e3/t,o,a;const u=(f,p=Date.now())=>{n=p,o=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),E=p-n;E>=r?u(f,p):(o=f,a||(a=setTimeout(()=>{a=null,u(o)},r-E)))},()=>o&&u(o)]}const Mu=(e,t,n=3)=>{let r=0;const o=Jw(50,250);return Zw(a=>{const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=u-r,f=o(d),p=u<=c;r=u;const E={loaded:u,total:c,progress:c?u/c:void 0,bytes:d,rate:f||void 0,estimated:f&&c&&p?(c-u)/f:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(E)},n)},P0=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},R0=e=>(...t)=>Q.asap(()=>e(...t)),eC=tn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,tn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(tn.origin),tn.navigator&&/(msie|trident)/i.test(tn.navigator.userAgent)):()=>!0,tC=tn.hasStandardBrowserEnv?{write(e,t,n,r,o,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];Q.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),Q.isString(r)&&c.push(`path=${r}`),Q.isString(o)&&c.push(`domain=${o}`),a===!0&&c.push("secure"),Q.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.match(new RegExp("(?:^|; )"+e+"=([^;]*)"));return t?decodeURIComponent(t[1]):null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function nC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function rC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}function L0(e,t,n){let r=!nC(t);return e&&(r||n==!1)?rC(e,t):t}const D0=e=>e instanceof bn?H({},e):e;function $i(e,t){t=t||{};const n={};function r(f,p,E,b){return Q.isPlainObject(f)&&Q.isPlainObject(p)?Q.merge.call({caseless:b},f,p):Q.isPlainObject(p)?Q.merge({},p):Q.isArray(p)?p.slice():p}function o(f,p,E,b){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f,E,b)}else return r(f,p,E,b)}function a(f,p){if(!Q.isUndefined(p))return r(void 0,p)}function u(f,p){if(Q.isUndefined(p)){if(!Q.isUndefined(f))return r(void 0,f)}else return r(void 0,p)}function c(f,p,E){if(E in t)return r(f,p);if(E in e)return r(void 0,f)}const d={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,responseEncoding:u,validateStatus:c,headers:(f,p,E)=>o(D0(f),D0(p),E,!0)};return Q.forEach(Object.keys(H(H({},e),t)),function(p){if(p==="__proto__"||p==="constructor"||p==="prototype")return;const E=Q.hasOwnProp(d,p)?d[p]:o,b=E(e[p],t[p],p);Q.isUndefined(b)&&E!==c||(n[p]=b)}),n}const M0=e=>{const t=$i({},e);let{data:n,withXSRFToken:r,xsrfHeaderName:o,xsrfCookieName:a,headers:u,auth:c}=t;if(t.headers=u=bn.from(u),t.url=A0(L0(t.baseURL,t.url,t.allowAbsoluteUrls),e.params,e.paramsSerializer),c&&u.set("Authorization","Basic "+btoa((c.username||"")+":"+(c.password?unescape(encodeURIComponent(c.password)):""))),Q.isFormData(n)){if(tn.hasStandardBrowserEnv||tn.hasStandardBrowserWebWorkerEnv)u.setContentType(void 0);else if(Q.isFunction(n.getHeaders)){const d=n.getHeaders(),f=["content-type","content-length"];Object.entries(d).forEach(([p,E])=>{f.includes(p.toLowerCase())&&u.set(p,E)})}}if(tn.hasStandardBrowserEnv&&(r&&Q.isFunction(r)&&(r=r(t)),r||r!==!1&&eC(t.url))){const d=o&&a&&tC.read(a);d&&u.set(o,d)}return t},iC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const o=M0(e);let a=o.data;const u=bn.from(o.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=o,p,E,b,T,_;function x(){T&&T(),_&&_(),o.cancelToken&&o.cancelToken.unsubscribe(p),o.signal&&o.signal.removeEventListener("abort",p)}let C=new XMLHttpRequest;C.open(o.method.toUpperCase(),o.url,!0),C.timeout=o.timeout;function v(){if(!C)return;const L=bn.from("getAllResponseHeaders"in C&&C.getAllResponseHeaders()),X={data:!c||c==="text"||c==="json"?C.responseText:C.response,status:C.status,statusText:C.statusText,headers:L,config:e,request:C};I0(function(te){n(te),x()},function(te){r(te),x()},X),C=null}"onloadend"in C?C.onloadend=v:C.onreadystatechange=function(){!C||C.readyState!==4||C.status===0&&!(C.responseURL&&C.responseURL.indexOf("file:")===0)||setTimeout(v)},C.onabort=function(){C&&(r(new He("Request aborted",He.ECONNABORTED,e,C)),C=null)},C.onerror=function(Y){const X=Y&&Y.message?Y.message:"Network Error",B=new He(X,He.ERR_NETWORK,e,C);B.event=Y||null,r(B),C=null},C.ontimeout=function(){let Y=o.timeout?"timeout of "+o.timeout+"ms exceeded":"timeout exceeded";const X=o.transitional||kd;o.timeoutErrorMessage&&(Y=o.timeoutErrorMessage),r(new He(Y,X.clarifyTimeoutError?He.ETIMEDOUT:He.ECONNABORTED,e,C)),C=null},a===void 0&&u.setContentType(null),"setRequestHeader"in C&&Q.forEach(u.toJSON(),function(Y,X){C.setRequestHeader(X,Y)}),Q.isUndefined(o.withCredentials)||(C.withCredentials=!!o.withCredentials),c&&c!=="json"&&(C.responseType=o.responseType),f&&([b,_]=Mu(f,!0),C.addEventListener("progress",b)),d&&C.upload&&([E,T]=Mu(d),C.upload.addEventListener("progress",E),C.upload.addEventListener("loadend",T)),(o.cancelToken||o.signal)&&(p=L=>{C&&(r(!L||L.type?new qo(null,e,C):L),C.abort(),C=null)},o.cancelToken&&o.cancelToken.subscribe(p),o.signal&&(o.signal.aborted?p():o.signal.addEventListener("abort",p)));const U=Xw(o.url);if(U&&tn.protocols.indexOf(U)===-1){r(new He("Unsupported protocol "+U+":",He.ERR_BAD_REQUEST,e));return}C.send(a||null)})},sC=(e,t)=>{const{length:n}=e=e?e.filter(Boolean):[];if(t||n){let r=new AbortController,o;const a=function(f){if(!o){o=!0,c();const p=f instanceof Error?f:this.reason;r.abort(p instanceof He?p:new qo(p instanceof Error?p.message:p))}};let u=t&&setTimeout(()=>{u=null,a(new He(`timeout of ${t}ms exceeded`,He.ETIMEDOUT))},t);const c=()=>{e&&(u&&clearTimeout(u),u=null,e.forEach(f=>{f.unsubscribe?f.unsubscribe(a):f.removeEventListener("abort",a)}),e=null)};e.forEach(f=>f.addEventListener("abort",a));const{signal:d}=r;return d.unsubscribe=()=>Q.asap(c),d}},oC=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},aC=function(e,t){return id(this,null,function*(){try{for(var n=L2(uC(e)),r,o,a;r=!(o=yield new Ur(n.next())).done;r=!1){const u=o.value;yield*Hm(oC(u,t))}}catch(o){a=[o]}finally{try{r&&(o=n.return)&&(yield new Ur(o.call(n)))}finally{if(a)throw a[0]}}})},uC=function(e){return id(this,null,function*(){if(e[Symbol.asyncIterator]){yield*Hm(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Ur(t.read());if(n)break;yield r}}finally{yield new Ur(t.cancel())}})},F0=(e,t,n,r)=>{const o=aC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return rt(this,null,function*(){try{const{done:p,value:E}=yield o.next();if(p){c(),f.close();return}let b=E.byteLength;if(n){let T=a+=b;n(T)}f.enqueue(new Uint8Array(E))}catch(p){throw c(p),p}})},cancel(f){return c(f),o.return()}},{highWaterMark:2})},B0=64*1024,{isFunction:Fu}=Q,lC=(({Request:e,Response:t})=>({Request:e,Response:t}))(Q.global),{ReadableStream:U0,TextEncoder:H0}=Q.global,z0=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},cC=e=>{e=Q.merge.call({skipUndefined:!0},lC,e);const{fetch:t,Request:n,Response:r}=e,o=t?Fu(t):typeof fetch=="function",a=Fu(n),u=Fu(r);if(!o)return!1;const c=o&&Fu(U0),d=o&&(typeof H0=="function"?(_=>x=>_.encode(x))(new H0):_=>rt(null,null,function*(){return new Uint8Array(yield new n(_).arrayBuffer())})),f=a&&c&&z0(()=>{let _=!1;const x=new n(tn.origin,{body:new U0,method:"POST",get duplex(){return _=!0,"half"}}).headers.has("Content-Type");return _&&!x}),p=u&&c&&z0(()=>Q.isReadableStream(new r("").body)),E={stream:p&&(_=>_.body)};o&&["text","arrayBuffer","blob","formData","stream"].forEach(_=>{!E[_]&&(E[_]=(x,C)=>{let v=x&&x[_];if(v)return v.call(x);throw new He(`Response type '${_}' is not supported`,He.ERR_NOT_SUPPORT,C)})});const b=_=>rt(null,null,function*(){if(_==null)return 0;if(Q.isBlob(_))return _.size;if(Q.isSpecCompliantForm(_))return(yield new n(tn.origin,{method:"POST",body:_}).arrayBuffer()).byteLength;if(Q.isArrayBufferView(_)||Q.isArrayBuffer(_))return _.byteLength;if(Q.isURLSearchParams(_)&&(_=_+""),Q.isString(_))return(yield d(_)).byteLength}),T=(_,x)=>rt(null,null,function*(){const C=Q.toFiniteNumber(_.getContentLength());return C==null?b(x):C});return _=>rt(null,null,function*(){let{url:x,method:C,data:v,signal:U,cancelToken:L,timeout:Y,onDownloadProgress:X,onUploadProgress:B,responseType:te,headers:ge,withCredentials:ye="same-origin",fetchOptions:M}=M0(_),ae=t||fetch;te=te?(te+"").toLowerCase():"text";let he=sC([U,L&&L.toAbortSignal()],Y),ue=null;const de=he&&he.unsubscribe&&(()=>{he.unsubscribe()});let Te;try{if(B&&f&&C!=="get"&&C!=="head"&&(Te=yield T(ge,v))!==0){let R=new n(x,{method:"POST",body:v,duplex:"half"}),K;if(Q.isFormData(v)&&(K=R.headers.get("content-type"))&&ge.setContentType(K),R.body){const[O,_e]=P0(Te,Mu(R0(B)));v=F0(R.body,B0,O,_e)}}Q.isString(ye)||(ye=ye?"include":"omit");const Ce=a&&"credentials"in n.prototype,oe=be(H({},M),{signal:he,method:C.toUpperCase(),headers:ge.normalize().toJSON(),body:v,duplex:"half",credentials:Ce?ye:void 0});ue=a&&new n(x,oe);let q=yield a?ae(ue,M):ae(x,oe);const ne=p&&(te==="stream"||te==="response");if(p&&(X||ne&&de)){const R={};["status","statusText","headers"].forEach(Re=>{R[Re]=q[Re]});const K=Q.toFiniteNumber(q.headers.get("content-length")),[O,_e]=X&&P0(K,Mu(R0(X),!0))||[];q=new r(F0(q.body,B0,O,()=>{_e&&_e(),de&&de()}),R)}te=te||"text";let w=yield E[Q.findKey(E,te)||"text"](q,_);return!ne&&de&&de(),yield new Promise((R,K)=>{I0(R,K,{data:w,headers:bn.from(q.headers),status:q.status,statusText:q.statusText,config:_,request:ue})})}catch(Ce){throw de&&de(),Ce&&Ce.name==="TypeError"&&/Load failed|fetch/i.test(Ce.message)?Object.assign(new He("Network Error",He.ERR_NETWORK,_,ue,Ce&&Ce.response),{cause:Ce.cause||Ce}):He.from(Ce,Ce&&Ce.code,_,ue,Ce&&Ce.response)}})},dC=new Map,j0=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:o}=t,a=[r,o,n];let u=a.length,c=u,d,f,p=dC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:cC(t)),p=f;return f};j0();const Rd={http:Rw,xhr:iC,fetch:{get:j0}};Q.forEach(Rd,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{value:t})}catch(n){}Object.defineProperty(e,"adapterName",{value:t})}});const $0=e=>`- ${e}`,fC=e=>Q.isFunction(e)||e===null||e===!1;function hC(e,t){e=Q.isArray(e)?e:[e];const{length:n}=e;let r,o;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(o=r,!fC(r)&&(o=Rd[(c=String(r)).toLowerCase()],o===void 0))throw new He(`Unknown adapter '${c}'`);if(o&&(Q.isFunction(o)||(o=o.get(t))))break;a[c||"#"+u]=o}if(!o){const u=Object.entries(a).map(([d,f])=>`adapter ${d} `+(f===!1?"is not supported by the environment":"is not available in the build"));let c=n?u.length>1?`since :
5
+ `+u.map($0).join(`
6
+ `):" "+$0(u[0]):"as no adapter specified";throw new He("There is no suitable adapter to dispatch the request "+c,"ERR_NOT_SUPPORT")}return o}const V0={getAdapter:hC,adapters:Rd};function Ld(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new qo(null,e)}function q0(e){return Ld(e),e.headers=bn.from(e.headers),e.data=Pd.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),V0.getAdapter(e.adapter||$o.adapter,e)(e).then(function(r){return Ld(e),r.data=Pd.call(e,e.transformResponse,r),r.headers=bn.from(r.headers),r},function(r){return O0(r)||(Ld(e),r&&r.response&&(r.response.data=Pd.call(e,e.transformResponse,r.response),r.response.headers=bn.from(r.response.headers))),Promise.reject(r)})}const Y0="1.13.5",Bu={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{Bu[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const W0={};Bu.transitional=function(t,n,r){function o(a,u){return"[Axios v"+Y0+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new He(o(u," has been removed"+(n?" in "+n:"")),He.ERR_DEPRECATED);return n&&!W0[u]&&(W0[u]=!0,console.warn(o(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},Bu.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function pC(e,t,n){if(typeof e!="object")throw new He("options must be an object",He.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let o=r.length;for(;o-- >0;){const a=r[o],u=t[a];if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new He("option "+a+" must be "+d,He.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new He("Unknown option "+a,He.ERR_BAD_OPTION)}}const Uu={assertOptions:pC,validators:Bu},$n=Uu.validators;let Vi=class{constructor(t){this.defaults=t||{},this.interceptors={request:new v0,response:new v0}}request(t,n){return rt(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let o={};Error.captureStackTrace?Error.captureStackTrace(o):o=new Error;const a=o.stack?o.stack.replace(/^.+\n/,""):"";try{r.stack?a&&!String(r.stack).endsWith(a.replace(/^.+\n.+\n/,""))&&(r.stack+=`
7
+ `+a):r.stack=a}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=$i(this.defaults,n);const{transitional:r,paramsSerializer:o,headers:a}=n;r!==void 0&&Uu.assertOptions(r,{silentJSONParsing:$n.transitional($n.boolean),forcedJSONParsing:$n.transitional($n.boolean),clarifyTimeoutError:$n.transitional($n.boolean),legacyInterceptorReqResOrdering:$n.transitional($n.boolean)},!1),o!=null&&(Q.isFunction(o)?n.paramsSerializer={serialize:o}:Uu.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),Uu.assertOptions(n,{baseUrl:$n.spelling("baseURL"),withXsrfToken:$n.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&Q.merge(a.common,a[n.method]);a&&Q.forEach(["delete","get","head","post","put","patch","common"],_=>{delete a[_]}),n.headers=bn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(x){if(typeof x.runWhen=="function"&&x.runWhen(n)===!1)return;d=d&&x.synchronous;const C=n.transitional||kd;C&&C.legacyInterceptorReqResOrdering?c.unshift(x.fulfilled,x.rejected):c.push(x.fulfilled,x.rejected)});const f=[];this.interceptors.response.forEach(function(x){f.push(x.fulfilled,x.rejected)});let p,E=0,b;if(!d){const _=[q0.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);E<b;)p=p.then(_[E++],_[E++]);return p}b=c.length;let T=n;for(;E<b;){const _=c[E++],x=c[E++];try{T=_(T)}catch(C){x.call(this,C);break}}try{p=q0.call(this,T)}catch(_){return Promise.reject(_)}for(E=0,b=f.length;E<b;)p=p.then(f[E++],f[E++]);return p}getUri(t){t=$i(this.defaults,t);const n=L0(t.baseURL,t.url,t.allowAbsoluteUrls);return A0(n,t.params,t.paramsSerializer)}};Q.forEach(["delete","get","head","options"],function(t){Vi.prototype[t]=function(n,r){return this.request($i(r||{},{method:t,url:n,data:(r||{}).data}))}}),Q.forEach(["post","put","patch"],function(t){function n(r){return function(a,u,c){return this.request($i(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}Vi.prototype[t]=n(),Vi.prototype[t+"Form"]=n(!0)});let mC=class M2{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(a){n=a});const r=this;this.promise.then(o=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](o);r._listeners=null}),this.promise.then=o=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(o);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new qo(a,u,c),n(r.reason))})}throwIfRequested(){if(this.reason)throw this.reason}subscribe(t){if(this.reason){t(this.reason);return}this._listeners?this._listeners.push(t):this._listeners=[t]}unsubscribe(t){if(!this._listeners)return;const n=this._listeners.indexOf(t);n!==-1&&this._listeners.splice(n,1)}toAbortSignal(){const t=new AbortController,n=r=>{t.abort(r)};return this.subscribe(n),t.signal.unsubscribe=()=>this.unsubscribe(n),t.signal}static source(){let t;return{token:new M2(function(o){t=o}),cancel:t}}};function gC(e){return function(n){return e.apply(null,n)}}function EC(e){return Q.isObject(e)&&e.isAxiosError===!0}const Dd={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Dd).forEach(([e,t])=>{Dd[t]=e});function G0(e){const t=new Vi(e),n=h0(Vi.prototype.request,t);return Q.extend(n,Vi.prototype,t,{allOwnKeys:!0}),Q.extend(n,t,null,{allOwnKeys:!0}),n.create=function(o){return G0($i(e,o))},n}const Pt=G0($o);Pt.Axios=Vi,Pt.CanceledError=qo,Pt.CancelToken=mC,Pt.isCancel=O0,Pt.VERSION=Y0,Pt.toFormData=Lu,Pt.AxiosError=He,Pt.Cancel=Pt.CanceledError,Pt.all=function(t){return Promise.all(t)},Pt.spread=gC,Pt.isAxiosError=EC,Pt.mergeConfig=$i,Pt.AxiosHeaders=bn,Pt.formToJSON=e=>k0(Q.isHTMLForm(e)?new FormData(e):e),Pt.getAdapter=V0.getAdapter,Pt.HttpStatusCode=Dd,Pt.default=Pt;const{Axios:ZF,AxiosError:eB,CanceledError:tB,isCancel:nB,CancelToken:rB,VERSION:iB,all:sB,Cancel:oB,isAxiosError:aB,spread:uB,toFormData:lB,AxiosHeaders:cB,HttpStatusCode:dB,formToJSON:fB,getAdapter:hB,mergeConfig:pB}=Pt;class K0{constructor(t,n,r=!1){ve(this,"CIMULATE_API_HEADER","x-cimulate-api-key");ve(this,"CIMULATE_SEARCH_API_PATH","api/v1");ve(this,"baseApiUrl");ve(this,"headers",{});ve(this,"fetchConfig",()=>rt(this,null,function*(){try{const t=yield Pt.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}}));if(t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");t?this.headers[this.CIMULATE_API_HEADER]=t:n&&(this.headers.Authorization=`Bearer ${n}`),this.baseApiUrl=r?"https://staging.search.cimulate.ai":"https://prod.search.cimulate.ai"}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}const yC=$.createContext(void 0),TC=({apiKey:e,apiToken:t,isDevelopment:n=!1,children:r})=>{const o=$.useMemo(()=>new K0(e,t,n),[e,t,n]);return k.jsx(yC.Provider,{value:o,children:r})};var Q0=Symbol.for("immer-nothing"),X0=Symbol.for("immer-draftable"),ot=Symbol.for("immer-state");function Vn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ks=Object.getPrototypeOf;function Ns(e){return!!e&&!!e[ot]}function Hr(e){var t;return e?J0(e)||Array.isArray(e)||!!e[X0]||!!((t=e.constructor)!=null&&t[X0])||zu(e)||ju(e):!1}var bC=Object.prototype.constructor.toString();function J0(e){if(!e||typeof e!="object")return!1;const t=ks(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)===bC}function Yo(e,t){Hu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Hu(e){const t=e[ot];return t?t.type_:Array.isArray(e)?1:zu(e)?2:ju(e)?3:0}function Md(e,t){return Hu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function Z0(e,t,n){const r=Hu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function _C(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function zu(e){return e instanceof Map}function ju(e){return e instanceof Set}function $t(e){return e.copy_||e.base_}function Fd(e,t){if(zu(e))return new Map(e);if(ju(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=J0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[ot];let o=Reflect.ownKeys(r);for(let a=0;a<o.length;a++){const u=o[a],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(ks(e),r)}else{const r=ks(e);if(r!==null&&n)return H({},e);const o=Object.create(r);return Object.assign(o,e)}}function Bd(e,t=!1){return $u(e)||Ns(e)||!Hr(e)||(Hu(e)>1&&(e.set=e.add=e.clear=e.delete=xC),Object.freeze(e),t&&Object.entries(e).forEach(([n,r])=>Bd(r,!0))),e}function xC(){Vn(2)}function $u(e){return Object.isFrozen(e)}var Ud={};function qi(e){const t=Ud[e];return t||Vn(0,e),t}function SC(e,t){Ud[e]||(Ud[e]=t)}var Wo;function Vu(){return Wo}function wC(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function eg(e,t){t&&(qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Hd(e){zd(e),e.drafts_.forEach(CC),e.drafts_=null}function zd(e){e===Wo&&(Wo=e.parent_)}function tg(e){return Wo=wC(Wo,e)}function CC(e){const t=e[ot];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function ng(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[ot].modified_&&(Hd(t),Vn(4)),Hr(e)&&(e=qu(t,e),t.parent_||Yu(t,e)),t.patches_&&qi("Patches").generateReplacementPatches_(n[ot].base_,e,t.patches_,t.inversePatches_)):e=qu(t,n,[]),Hd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==Q0?e:void 0}function qu(e,t,n){if($u(t))return t;const r=t[ot];if(!r)return Yo(t,(o,a)=>rg(e,r,t,o,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Yu(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),Yo(a,(c,d)=>rg(e,r,o,c,d,n,u)),Yu(e,o,!1),n&&e.patches_&&qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function rg(e,t,n,r,o,a,u){if(Ns(o)){const c=a&&t&&t.type_!==3&&!Md(t.assigned_,r)?a.concat(r):void 0,d=qu(e,o,c);if(Z0(n,r,d),Ns(d))e.canAutoFreeze_=!1;else return}else u&&n.add(o);if(Hr(o)&&!$u(o)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;qu(e,o),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&Object.prototype.propertyIsEnumerable.call(n,r)&&Yu(e,o)}}function Yu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&Bd(t,n)}function AC(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Vu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let o=r,a=jd;n&&(o=[r],a=Go);const{revoke:u,proxy:c}=Proxy.revocable(o,a);return r.draft_=c,r.revoke_=u,c}var jd={get(e,t){if(t===ot)return e;const n=$t(e);if(!Md(n,t))return vC(e,n,t);const r=n[t];return e.finalized_||!Hr(r)?r:r===$d(e.base_,t)?(Vd(e),e.copy_[t]=Ko(r,e)):r},has(e,t){return t in $t(e)},ownKeys(e){return Reflect.ownKeys($t(e))},set(e,t,n){const r=ig($t(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const o=$d($t(e),t),a=o==null?void 0:o[ot];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(_C(n,o)&&(n!==void 0||Md(e.base_,t)))return!0;Vd(e),zr(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 $d(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Vd(e),zr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=$t(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Vn(11)},getPrototypeOf(e){return ks(e.base_)},setPrototypeOf(){Vn(12)}},Go={};Yo(jd,(e,t)=>{Go[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Go.deleteProperty=function(e,t){return Go.set.call(this,e,t,void 0)},Go.set=function(e,t,n){return jd.set.call(this,e[0],t,n,e[0])};function $d(e,t){const n=e[ot];return(n?$t(n):e)[t]}function vC(e,t,n){var o;const r=ig(t,n);return r?"value"in r?r.value:(o=r.get)==null?void 0:o.call(e.draft_):void 0}function ig(e,t){if(!(t in e))return;let n=ks(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ks(n)}}function zr(e){e.modified_||(e.modified_=!0,e.parent_&&zr(e.parent_))}function Vd(e){e.copy_||(e.copy_=Fd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var kC=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"&&Vn(6),r!==void 0&&typeof r!="function"&&Vn(7);let o;if(Hr(t)){const a=tg(this),u=Ko(t,void 0);let c=!0;try{o=n(u),c=!1}finally{c?Hd(a):zd(a)}return eg(a,r),ng(o,a)}else if(!t||typeof t!="object"){if(o=n(t),o===void 0&&(o=t),o===Q0&&(o=void 0),this.autoFreeze_&&Bd(o,!0),r){const a=[],u=[];qi("Patches").generateReplacementPatches_(t,o,a,u),r(a,u)}return o}else Vn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,o;return[this.produce(t,n,(u,c)=>{r=u,o=c}),r,o]},typeof(e==null?void 0:e.autoFreeze)=="boolean"&&this.setAutoFreeze(e.autoFreeze),typeof(e==null?void 0:e.useStrictShallowCopy)=="boolean"&&this.setUseStrictShallowCopy(e.useStrictShallowCopy)}createDraft(e){Hr(e)||Vn(8),Ns(e)&&(e=NC(e));const t=tg(this),n=Ko(e,void 0);return n[ot].isManual_=!0,zd(t),n}finishDraft(e,t){const n=e&&e[ot];(!n||!n.isManual_)&&Vn(9);const{scope_:r}=n;return eg(r,t),ng(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=qi("Patches").applyPatches_;return Ns(e)?r(e,t):this.produce(e,o=>r(o,t))}};function Ko(e,t){const n=zu(e)?qi("MapSet").proxyMap_(e,t):ju(e)?qi("MapSet").proxySet_(e,t):AC(e,t);return(t?t.scope_:Vu()).drafts_.push(n),n}function NC(e){return Ns(e)||Vn(10,e),sg(e)}function sg(e){if(!Hr(e)||$u(e))return e;const t=e[ot];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Fd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Fd(e,!0);return Yo(n,(r,o)=>{Z0(n,r,sg(o))}),t&&(t.finalized_=!1),n}function OC(){class e extends Map{constructor(d,f){super(),this[ot]={type_:2,parent_:f,scope_:f?f.scope_:Vu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return $t(this[ot]).size}has(d){return $t(this[ot]).has(d)}set(d,f){const p=this[ot];return u(p),(!$t(p).has(d)||$t(p).get(d)!==f)&&(n(p),zr(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[ot];return u(f),n(f),zr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[ot];u(d),$t(d).size&&(n(d),zr(d),d.assigned_=new Map,Yo(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[ot];$t(p).forEach((E,b,T)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[ot];u(f);const p=$t(f).get(d);if(f.finalized_||!Hr(p)||p!==f.base_.get(d))return p;const E=Ko(p,f);return n(f),f.copy_.set(d,E),E}keys(){return $t(this[ot]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[ot]={type_:3,parent_:f,scope_:f?f.scope_:Vu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return $t(this[ot]).size}has(d){const f=this[ot];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[ot];return u(f),this.has(d)||(a(f),zr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[ot];return u(f),a(f),zr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[ot];u(d),$t(d).size&&(a(d),zr(d),d.copy_.clear())}values(){const d=this[ot];return u(d),a(d),d.copy_.values()}entries(){const d=this[ot];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 E=p.next();for(;!E.done;)d.call(f,E.value,E.value,this),E=p.next()}}function o(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Hr(d)){const f=Ko(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Vn(3,JSON.stringify($t(c)))}SC("MapSet",{proxyMap_:t,proxySet_:o})}var In=new kC,IC=In.produce;In.produceWithPatches.bind(In),In.setAutoFreeze.bind(In),In.setUseStrictShallowCopy.bind(In),In.applyPatches.bind(In),In.createDraft.bind(In),In.finishDraft.bind(In);function PC(e,t,n){var r=$.useMemo(function(){return IC(e)},[e]);return $.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"},bt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",SET_ENTRY_TYPE:"SET_ENTRY_TYPE",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_IMAGE_FILE:"SET_IMAGE_FILE"},Os={copilot:null,connected:!1,entryType:"search",messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],imageFile:null},RC=e=>{if(e.length===0)return null;const t=["copilot_search","copilot_browse","product_view","ask_cim"];return[...e].reverse().find(o=>t.some(a=>o.name.includes(a)))||null},LC=e=>{switch(!0){case e.includes("search"):return"search";case e.includes("browse"):return"browse";case e==="product_view":return"pdp";case e==="ask_cim":return"ask_cim";default:return"search"}},Qo="cimulate",qd=`${Qo}:pdp-update`,Yd=`${Qo}:browse-update`,Wd=`${Qo}:search-update`,Gd=`${Qo}:ui-state-update`,Kd=`${Qo}:session-state`,xr=H({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},og),DC={"browse-context":xr.CONTEXT_UPDATED,categoryId:xr.CATEGORY_ID_CHANGED,categoryName:xr.CATEGORY_NAME_CHANGED,page:xr.PAGE_CHANGED,pageSize:xr.PAGE_SIZE_CHANGED,includeFacets:xr.FACET_FILTERS_CHANGED,facetFilters:xr.FACET_FILTERS_CHANGED,rangeFilters:xr.RANGE_FILTERS_CHANGED,catalogSegment:xr.CATALOG_SEGMENT_CHANGED,pricebooks:xr.PRICEBOOKS_CHANGED},jr=H({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},og),MC={"search-context":jr.SEARCH_CONTEXT_UPDATED,query:jr.QUERY_CHANGED,page:jr.PAGE_CHANGED,pageSize:jr.PAGE_SIZE_CHANGED,includeFacets:jr.FACET_FILTERS_CHANGED,facetFilters:jr.FACET_FILTERS_CHANGED,rangeFilters:jr.RANGE_FILTERS_CHANGED,catalogSegment:jr.CATALOG_SEGMENT_CHANGED,pricebooks:jr.PRICEBOOKS_CHANGED},G="cim-widget",Is=`--${G}`,Yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd"},FC=(e=Yi)=>({[`${Is}-primary-color`]:e.primaryColor||Yi.primaryColor,[`${Is}-secondary-color`]:e.secondaryColor||Yi.secondaryColor,[`${Is}-font-color`]:e.fontColor||Yi.fontColor,[`${Is}-font-family`]:e.fontFamily||Yi.fontFamily,[`${Is}-background-color`]:e.backgroundColor||Yi.backgroundColor,[`${Is}-border-color`]:e.borderColor||Yi.borderColor}),li={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},ag=$.createContext(null),ug=$.createContext(null);class BC{constructor(t,n,r=!1){ve(this,"apiService");ve(this,"config",null);ve(this,"getConfig",()=>rt(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 K0(t,n,r)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ps=(e,t,n,...r)=>{if(!e)return;const o=["background: linear-gradient(90deg,rgba(253, 99, 99, 1) 0%, rgba(245, 139, 35, 1) 65%)","font-weight: bold","color: transparent","background-clip: text","text-fill-color: transparent"].join(";");console[t]("%c[cimulate-widget]",o,n,...r)};class UC{constructor(t=!1){ve(this,"isDevelopment");ve(this,"_log",(t,n,...r)=>{Ps(this.isDevelopment,t,n,...r)});this.isDevelopment=t}log(t,...n){this._log("log",t,...n)}warn(t,...n){this._log("warn",t,...n)}error(t,...n){this._log("error",t,...n)}info(t,...n){this._log("info",t,...n)}debug(t,...n){this._log("debug",t,...n)}}const lg=$.createContext(null),HC=({logoUrl:e,headerText:t="Your Search Assistant",globalClassName:n="",entryMessage:r,openLinksInNewTab:o=!1,disclaimerText:a,disclaimerMarkdown:u,searchPlaceholder:c,searchButtonLabel:d,searchConfig:f,conversationHistory:p,resetConversationMessage:E="What products would you like to explore today?",apiKey:b,apiToken:T,theme:_,isDevelopment:x,__features:C,children:v})=>{const U=$.useMemo(()=>new BC(b,T,x),[b,T,x]),L=$.useMemo(()=>new UC(x),[x]);$.useEffect(()=>{U.config||U.getConfig()},[U]);const Y=$.useMemo(()=>FC(_),[_]),X=$.useMemo(()=>{const te=(f==null?void 0:f.placeholder)||c,ge=(f==null?void 0:f.buttonLabel)||d;let ye="icon";return f!=null&&f.buttonType?ye=f.buttonType:d&&(ye="text"),be(H({},f||{}),{placeholder:te,buttonLabel:ge,buttonType:ye})},[f,c,d]),B=$.useMemo(()=>({configModule:U,logoUrl:e,headerText:t,entryMessage:r,globalClassName:n,openLinksInNewTab:o,disclaimerText:a,disclaimerMarkdown:u,themeVariables:Y,logger:L,searchConfig:X,resetConversationMessage:E,conversationHistory:{sinceHours:typeof(p==null?void 0:p.sinceHours)=="number"?p.sinceHours:1,limit:p==null?void 0:p.limit},features:C}),[U,e,t,r,n,a,u,o,X,E,L,Y,p,C]);return k.jsx(lg.Provider,{value:B,children:v})},nn=()=>{const e=$.useContext(lg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class zC{constructor(){ve(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1},dialog:{position:"bottom-left"},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 VC(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},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position},{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 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},dialog:{position:this.position},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const mt=new zC,Wi=()=>mt.connected,Xo=()=>mt.isOpen,jC=e=>{window.addEventListener(Gd,e)},$C=e=>{window.removeEventListener(Gd,e)},VC=(e,t)=>{const n=new CustomEvent(Gd,{detail:{property:e,value:t}});window.dispatchEvent(n)},qC=e=>{mt.connectedProxy.connected=e},Wu=e=>{if(!["ask_cim","search","browse","pdp"].includes(e))throw new Error(`Invalid entryType: "${e}". Must be 'ask_cim', 'search', 'browse', or 'pdp'.`);mt.entryTypeProxy.entryType=e},Gu=e=>{if(typeof e!="boolean"){mt.statusProxy.isOpen=!mt.statusProxy.isOpen;return}mt.statusProxy.isOpen=e},cg=e=>{mt.modalProxy.isFullscreen=e},Qd=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);mt.statusProxy.type=e,e==="dialog"||e==="chat"?mt.modeProxy.mode="embedded":mt.modeProxy.mode="standalone"},dg=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(", ")}.`);mt.dialogProxy.position=e},YC=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=nn(),o=$.useCallback(v=>{n({type:bt.SET_COPILOT,payload:v})},[n]),a=$.useCallback(v=>{qC(v),n({type:bt.SET_CONNECTED,payload:v})},[n]),u=$.useCallback(v=>{n({type:bt.SET_ENTRY_TYPE,payload:v})},[n]),c=$.useCallback(()=>{n({type:bt.RESET_COPILOT,payload:{}})},[n]),d=$.useCallback(()=>{n({type:bt.RESET_STATE,payload:{}})},[n]),f=$.useCallback(v=>{r==null||r.log(`${v.name} event received`,v),n({type:bt.ADD_MESSAGE,payload:v}),v.bypassHandlers||e==null||e(v)},[e,r,n]),p=$.useCallback(v=>{n({type:bt.ADD_LOADING_MESSAGE,payload:v})},[n]),E=$.useCallback(v=>{n({type:bt.REMOVE_LOADING_MESSAGE,payload:v})},[n]),b=$.useCallback(v=>{n({type:bt.SET_ACTIVE_CONVERSATION_ID,payload:v})},[n]),T=$.useCallback(v=>{n({type:bt.ADD_CONVERSATION_ID,payload:v})},[n]),_=$.useCallback(v=>{n({type:bt.SET_CONVERSATION_IDS,payload:v})},[n]),x=$.useCallback(v=>{n({type:bt.SET_IMAGE_FILE,payload:v})},[n]),C=$.useMemo(()=>({setCopilot:o,setConnected:a,setEntryType:u,resetCopilot:c,resetCopilotState:d,addCopilotEvent:f,addLoadingMessage:p,removeLoadingMessage:E,setActiveConversationId:b,addConversationId:T,setConversationIds:_,setImageFile:x}),[o,a,u,c,d,f,p,E,b,T,_,x]);return k.jsx(ug.Provider,{value:C,children:t})};OC();const WC=(e,t)=>{const{type:n,payload:r}=t;if(n===bt.ADD_MESSAGE){const o=r;if(e.messages.push(o),o.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===o.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===o.id);if(c!==-1){u[c]=o;return}u.push(o);return}else{e.groupedMessages.push({type:"group",eventSourceId:o.eventSourceId,messages:[o],createdAt:new Date(o.createdAt)});return}}e.groupedMessages.push({type:"individual",message:o,createdAt:new Date(o.createdAt)});return}switch(n){case bt.RESET_STATE:e.messages=Os.messages,e.groupedMessages=Os.groupedMessages,e.loadingMessages=Os.loadingMessages,e.entryType=Os.entryType;break;case bt.RESET_COPILOT:e.copilot=null;break;case bt.SET_COPILOT:e.copilot=r;break;case bt.SET_CONNECTED:e.connected=r;break;case bt.SET_ENTRY_TYPE:e.entryType=r;break;case bt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case bt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case bt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case bt.ADD_CONVERSATION_ID:{const o=r;e.conversationIds.includes(o)||e.conversationIds.push(o)}break;case bt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case bt.SET_IMAGE_FILE:e.imageFile=r;break}},GC=({entryType:e,onCopilotEvent:t,children:n})=>{const r=e?be(H({},Os),{entryType:e}):Os,[o,a]=PC(WC,r);return k.jsx(ag.Provider,{value:o,children:k.jsx(YC,{onCopilotEvent:t,dispatch:a,children:n})})};function KC(){var e=$.useRef(!0);return e.current?(e.current=!1,!0):e.current}var QC=function(e){$.useEffect(e,[])},XC=function(e,t){return e===t};function JC(e,t){t===void 0&&(t=XC);var n=$.useRef(),r=$.useRef(e),o=KC();return!o&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}class ZC{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(rn.size).fill(1).forEach(()=>{const r=rn.first();r&&(t(r),rn.remove())})})}get size(){return this.items.length}}const rn=new ZC,fg=e=>{window.addEventListener(Wd,e)},hg=e=>{window.removeEventListener(Wd,e)},eA=(e,t,n)=>{const r=new CustomEvent(Wd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},pg=e=>{window.addEventListener(Yd,e)},mg=e=>{window.removeEventListener(Yd,e)},tA=(e,t,n)=>{const r=new CustomEvent(Yd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},gg=e=>{window.addEventListener(qd,e)},Eg=e=>{window.removeEventListener(qd,e)},yg=(e,t,n)=>{const r=new CustomEvent(qd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},nA=e=>{window.addEventListener(Kd,e)},rA=e=>{window.removeEventListener(Kd,e)},Ku=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class iA{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=DC[n];return tA(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 at=new iA,Tg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},bg=(e,t,n)=>{var u,c;const r=H({},((u=n.facetFiltersProxy)==null?void 0:u.facetFilters)||{});if(!!((c=r[e])!=null&&c.includes(t))){const d=r[e].filter(f=>f!==t);d.length>0?r[e]=d:delete r[e]}else r[e]=r[e]?[...r[e],t]:[t];const a=n.updateFacetFiltersProxy(r);n.facetFiltersProxy.facetFilters=a.facetFilters},_g=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},xg=({field:e,value:t},n)=>{const[r,o]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof o=="undefined")throw new Error("Range values must be an array with two numbers for min and max");const a=[...n.rangeFiltersProxy.rangeFilters||[]],u=a.findIndex(d=>d.field===e);if(u!==-1){a[u]={field:e,min:r,max:o},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:o});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Sg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},wg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},sA=e=>{if(!Wi()||!Xo()){Wi()&&rn.clear(),rn.add({context:"browse",payload:be(H({},at.state),{categoryId:e})});return}at.categoryIdProxy.categoryId=e},Cg=e=>{Tg(e,at)},oA=(e,t)=>{bg(e,t,at)},Ag=e=>{_g(e,at)},aA=({field:e,value:t})=>{xg({field:e,value:t},at)},uA=e=>{Sg(e,at)},vg=e=>{wg(e,at)},kg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=Wi(),n=Xo();if(!t||!n){t&&rn.clear(),rn.add({context:"browse",payload:H({},e)});return}"facetFilters"in e&&Cg(e.facetFilters||{}),"rangeFilters"in e&&Ag(e.rangeFilters||[]),"catalogSegment"in e&&(at.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&vg(e.pricebooks||[]),"categoryName"in e&&(at.categoryIdProxy.categoryName=e.categoryName||""),at.categoryIdProxy.categoryId=e.categoryId},lA=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:kg,updateBrowseCategoryId:sA,updateCatalogSegment:uA,updateFacetFilter:oA,updateFacetFilters:Cg,updatePricebooks:vg,updateRangeFilter:aA,updateRangeFilters:Ag},Symbol.toStringTag,{value:"Module"}));class cA{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)=>(yg(n,r),Reflect.set(t,n,r)));ve(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const or=new cA,Ng=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=Wi(),n=Xo();if(!t||!n){t&&rn.clear(),rn.add({context:"pdp",payload:H({},e)});return}or.updateProxy(e),yg("pdp-context",e)},dA=e=>{or.proxy.productId=e,Wi()||rn.add({context:"pdp",payload:H({},or.state)})},fA=e=>{or.proxy.pdpLink=e},hA=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{Ku("getConversationMessages",{payload:e,callback:t},li.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{Ku("getSessionInformation",{callback:e},li.GET_SESSION_INFORMATION)},loadConversation:e=>{Ku("loadConversation",e,li.LOAD_CONVERSATION)},resetConversation:()=>{Ku("resetConversation",!0,li.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class pA{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=MC[n];return eA(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 gt=new pA,mA=e=>{const t=Xo(),n=Wi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:be(H({},gt.state),{query:e})});return}gt.queryProxy.query=e},Og=e=>{Tg(e,gt)},gA=(e,t)=>{bg(e,t,gt)},Ig=e=>{_g(e,gt)},EA=({field:e,value:t})=>{xg({field:e,value:t},gt)},yA=e=>{Sg(e,gt)},Pg=e=>{wg(e,gt)},Rg=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=Xo(),n=Wi();if(!n||!t){n&&rn.clear(),rn.add({context:"search",payload:H({},e)});return}"facetFilters"in e&&Og(e.facetFilters||{}),"rangeFilters"in e&&Ig(e.rangeFilters||[]),"catalogSegment"in e&&(gt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Pg(e.pricebooks||[]),gt.queryProxy.query=e.query},TA=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:Rg,updateCatalogSegment:yA,updateFacetFilter:gA,updateFacetFilters:Og,updatePricebooks:Pg,updateRangeFilter:EA,updateRangeFilters:Ig,updateSearchQuery:mA},Symbol.toStringTag,{value:"Module"})),bA={categoryId:at.categoryId,categoryName:at.categoryIdProxy.categoryName||"",facetFilters:at.facetFilters,rangeFilters:at.rangeFilters,catalogSegment:at.catalogSegment,pricebooks:at.pricebooks},Lg=$.createContext(bA),_A=({children:e})=>{const[t,n]=$.useState(at.categoryId),[r,o]=$.useState(at.categoryIdProxy.categoryName||""),[a,u]=$.useState(at.facetFilters||{}),[c,d]=$.useState(at.rangeFilters||[]),[f,p]=$.useState(at.catalogSegment||null),[E,b]=$.useState(at.pricebooks||null);$.useEffect(()=>{const _=({detail:x})=>{(x==null?void 0:x.property)==="categoryId"&&n(x.value),(x==null?void 0:x.property)==="categoryName"&&o(x.value),(x==null?void 0:x.property)==="facetFilters"&&u(x.value),(x==null?void 0:x.property)==="rangeFilters"&&d(x.value),(x==null?void 0:x.property)==="catalogSegment"&&p(x.value),(x==null?void 0:x.property)==="pricebooks"&&b(x.value)};return pg(_),()=>{mg(_)}},[]);const T=$.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:E}),[t,r,a,c,f,E]);return k.jsx(Lg.Provider,{value:T,children:e})},xA=()=>{const e=$.useContext(Lg);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},SA={searchQuery:gt.query,facetFilters:gt.facetFilters,rangeFilters:gt.rangeFilters,catalogSegment:gt.catalogSegment,pricebooks:gt.pricebooks},Dg=$.createContext(SA),wA=({children:e})=>{const[t,n]=$.useState(gt.query),[r,o]=$.useState(gt.facetFilters),[a,u]=$.useState(gt.rangeFilters),[c,d]=$.useState(gt.catalogSegment),[f,p]=$.useState(gt.pricebooks);$.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&n(T.value),(T==null?void 0:T.property)==="facetFilters"&&o(T.value),(T==null?void 0:T.property)==="rangeFilters"&&u(T.value),(T==null?void 0:T.property)==="catalogSegment"&&d(T.value),(T==null?void 0:T.property)==="pricebooks"&&p(T.value)};return fg(b),()=>{hg(b)}},[]);const E=$.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return k.jsx(Dg.Provider,{value:E,children:e})},CA=()=>{const e=$.useContext(Dg);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},AA={productId:or.productId,pdpLink:or.pdpLink},Mg=$.createContext(AA),vA=({children:e})=>{const[t,n]=$.useState(or.productId),[r,o]=$.useState(or.pdpLink);$.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),o(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&o(c.value)};return gg(u),()=>{Eg(u)}},[]);const a=$.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return k.jsx(Mg.Provider,{value:a,children:e})},kA=()=>{const e=$.useContext(Mg);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},Jo=()=>{const e=$.useContext(ug);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},Zo=()=>{const e=$.useContext(ag);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},$r=()=>{const e=$.useContext(Bg);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},Xd=()=>{const{status:e}=Rs(),{entryType:t,messages:n}=Zo(),r=t==="ask_cim",o=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&o},Fg=$.createContext({mode:mt.modeProxy.mode,status:mt.statusProxy,dialogPosition:mt.dialogProxy.position,isModalFullscreen:mt.modalProxy.isFullscreen,previousComponentType:mt.statusProxy.type}),NA=({componentType:e,children:t})=>{const{setEntryType:n}=Jo(),[r,o]=$.useState(mt.modeProxy.mode),[a,u]=$.useState({type:e||mt.statusProxy.type,isOpen:mt.statusProxy.isOpen}),[c,d]=$.useState(mt.dialogProxy.position),[f,p]=$.useState(mt.modalProxy.isFullscreen),E=JC(a.type);$.useEffect(()=>{const T=_=>{const{property:x,value:C}=_.detail||{};if(!(!x||C===void 0)){if(x==="mode"){o(C);return}if(x==="entryType"){n(C);return}if(x==="isOpen"){u(v=>be(H({},v),{isOpen:C}));return}if(x==="type"){u(v=>be(H({},v),{type:C}));return}if(x==="position"){d(C);return}if(x==="isFullscreen"){p(C);return}}};return jC(T),()=>{$C(T)}},[n]);const b=$.useMemo(()=>({mode:r,status:a,previousComponentType:E||"dialog",dialogPosition:c,isModalFullscreen:f}),[r,a,E,c,f]);return k.jsx(Fg.Provider,{value:b,children:t})},Rs=()=>{const e=$.useContext(Fg);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},OA=({copilot:e})=>{const{logger:t,conversationHistory:n}=nn(),{addCopilotEvent:r,setEntryType:o}=Jo(),{activeConversationId:a}=Zo(),u=$.useCallback(d=>{e&&e.requestSessionInformation(f=>{t==null||t.log("Retrieved session information: ",f),d==null||d(f)})},[e,t]),c=$.useCallback((d,f)=>{e&&d.conversationId&&e.getConversationEvents(d,p=>{t==null||t.log("Retrieved conversation messages: ",p),f==null||f(p)})},[e,t]);return $.useEffect(()=>{if(!a||n.sinceHours===0||(n==null?void 0:n.limit)===0)return;const d=3600*1e3*n.sinceHours,f=new Date(Date.now()-d).toISOString(),p={conversationId:a,since:f,excludeEvents:["done","error","connection_error","refined_browse","refined_search"]};typeof n.limit=="number"&&(p.limit=n.limit),c(p,E=>{E.forEach(T=>{T.bypassHandlers=!0,r(T)});const b=RC(E);if(b!=null&&b.name){const T=LC(b.name);o(T)}})},[t,a,c,r,o,n]),{getSessionInformation:u,getConversationMessages:c}},Bg=$.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),IA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>{const{logger:d}=nn(),bi=CA(),{searchQuery:f}=bi,p=en(bi,["searchQuery"]),Jr=xA(),{categoryId:E}=Jr,b=en(Jr,["categoryId"]),{productId:T,pdpLink:_}=kA(),{setCopilot:x,setConnected:C,resetCopilot:v,resetCopilotState:U,addCopilotEvent:L,addLoadingMessage:Y,removeLoadingMessage:X,setActiveConversationId:B,setConversationIds:te}=Jo(),{connected:ge,entryType:ye,copilot:M,messages:ae,groupedMessages:he,loadingMessages:ue}=Zo(),{status:de}=Rs(),Te=$.useRef(!1),Ce=$.useRef(!1),{getConversationMessages:oe,getSessionInformation:q}=OA({copilot:M}),ne=$.useMemo(()=>ue.size>0,[ue]),w=$.useCallback(Se=>ue.has(Se),[ue]),R=$.useCallback(Se=>{L(Se),Y(Se.id)},[L,Y]),K=$.useCallback(({query:Se,facetFilters:Ue,rangeFilters:je,catalogSegment:Xe,pricebooks:ct,userPrompt:St,imageFile:mn})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!Se)return;const st={searchParams:{query:Se}};St&&(st.userPrompt=St),mn&&(st.attachments={image:mn}),Ue&&Object.keys(Ue).length>0&&(st.searchParams.facetFilters=Ue),je&&je.length>0&&(st.searchParams.rangeFilters=je),Xe&&(st.searchParams.catalogSegment=Xe),ct&&(st.searchParams.pricebooks=ct),Wu("search"),M.search(st,ee=>{const fe=H({},ee);Te.current=!0,R(fe)})},[d,R,M]),O=$.useCallback(({categoryId:Se,categoryName:Ue,facetFilters:je,rangeFilters:Xe,catalogSegment:ct,pricebooks:St,userPrompt:mn,imageFile:st})=>{if(!M){d==null||d.error("Copilot is not initialized");return}const ee=je&&Object.keys(je).length>0;if(Se===""&&!ee){d==null||d.error("Browse event must include facetFilters when categoryId is empty");return}const fe={browseParams:{categoryId:Se||""}};mn&&(fe.userPrompt=mn),st&&(fe.attachments={image:st}),ee&&(fe.browseParams.facetFilters=je),Xe&&Xe.length>0&&(fe.browseParams.rangeFilters=Xe),ct&&(fe.browseParams.catalogSegment=ct),Array.isArray(St)&&St.length>0&&(fe.browseParams.pricebooks=St),Wu("browse"),M.browse(fe,Be=>{const Ve=H({},Be);Ue&&Ve.request&&(Ve.request.label=Ue),Ce.current=!0,R(Ve)})},[d,R,M]),_e=$.useCallback(({productId:Se,productName:Ue,pdpLink:je,userPrompt:Xe,imageFile:ct})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!Se)return;const St={productId:Se};Xe&&(St.userPrompt=Xe),je&&(St.pdpLink=je),ct&&(St.attachments={image:ct}),Wu("pdp"),M.productView(St,mn=>{const st=H({},mn);Ue&&st.request&&(st.request.label=Ue),R(st)})},[d,M,R]),Re=$.useCallback(({userPrompt:Se,imageFile:Ue})=>{if(!M){d==null||d.error("Copilot is not initialized");return}if(!Se)return;const je={userPrompt:Se};Ue&&(je.attachments={image:Ue}),M.askCim(je,Xe=>{const ct=H({},Xe);R(ct)})},[d,M,R]),Oe=$.useCallback(Se=>{const Ue=be(H({},Se),{id:Se.inquiryLinkId||Se.id});L(Ue)},[L]),Ge=$.useCallback(Se=>{L(Se),a==null||a(Se)},[L,a]),Ye=$.useCallback(Se=>{L(Se),u==null||u(Se)},[L,u]),et=$.useCallback(Se=>{o==null||o(Se),C(!0)},[o,C]);$.useEffect(()=>{!M||!ge||!de.isOpen||rn.size>0&&rn.processQueue(Se=>{if(Se.context==="search"){const Ue=H({},Se.payload);Rg(Ue)}if(Se.context==="browse"){const Ue=H({},Se.payload);kg(Ue)}if(Se.context==="pdp"){const Ue=H({},Se.payload);Ng(Ue)}})},[de.isOpen,M,ge]);const Nt=$.useCallback(Se=>{Se.on("connect_ack",et),Se.on("follow_up",L),Se.on("inquiry",Oe),Se.on("partial_inquiry",Oe),Se.on("display_products",L),Se.on("progress",L),Se.on("refined_search",Ge),Se.on("refined_browse",Ye),Se.on("done",Ue=>{X(Ue.eventSourceId)}),Se.on("error",Ue=>{L(Ue),X(Ue.eventSourceId)}),Se.onDisconnect(Ue=>{const je=["io server disconnect","transport error","server shutting down"];if(d==null||d.log("Connection disconnected with reason: ",Ue),!je.includes(Ue)){C(!1);return}d==null||d.log("De-registering event listeners");const Xe=new Date().toISOString();L({name:"error",message:"Connection was lost. Please try again.",createdAt:Xe,id:`error-${Xe}`,sessionId:"session"}),Se.off()})},[d,C,X,Oe,Ge,Ye,L,et]);QC(()=>{let Se;n?Se=n:Se=r?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Ue={baseUrl:Se};e?Ue.apiKey=e:t&&(Ue.apiToken=t);const je=new GS(Ue);return x(je),Nt(je),je.connect(),je.requestSessionInformation(Xe=>{d==null||d.log("Session Information: ",Xe);const{activeConversationId:ct,conversationIds:St}=Xe.data||{};ct&&B(ct),St!=null&&St.length&&te(St)}),()=>{je.disconnect(),je.off(),v()}});const Kn=$.useCallback(Se=>{if(!M)return;const Ue={eventId:Se,reason:"User cancelled the request"};M.cancelRequest(Ue,je=>{L(je),X(Se)})},[L,X,M]),as=$.useCallback(()=>{M&&M.conversationReset({},Se=>{U(),L(Se),M.requestSessionInformation(Ue=>{d==null||d.log("Session Information: ",Ue);const{activeConversationId:je,conversationIds:Xe}=Ue.data||{};je&&B(je),Xe!=null&&Xe.length&&te(Xe)})})},[M,d,L,U,B,te]),Xr=$.useCallback((Se,Ue)=>{if(!Se)return;const je={userPrompt:Se};switch(Ue&&(je.imageFile=Ue),ye){case"ask_cim":Re(je);return;case"search":K(H(H({query:f},p),je));return;case"browse":O(H(H({categoryId:E},b),je));return;case"pdp":_e(H({productId:T,pdpLink:_||""},je));return}},[ye,f,p,K,Re,E,b,O,_e,T,_]),Ti=$.useCallback((Se,Ue)=>{var St,mn;const Xe=Se.params.userPrompt||"";if(!Xe)return;const ct=ae.find(st=>st.id===Ue);if(ct){if(ct.name==="ask_cim"){Re({userPrompt:Xe});return}if(ct.name==="copilot_search"){const{query:st}=((St=ct.request)==null?void 0:St.searchParams)||{};st&&K(be(H({query:st||f},p),{userPrompt:Xe}));return}if(ct.name==="copilot_browse"){const{categoryId:st}=((mn=ct.request)==null?void 0:mn.browseParams)||{};O(be(H({categoryId:st||E||""},b),{userPrompt:Xe}));return}if(ct.name==="product_view"){const st=ct.request;st!=null&&st.productId&&_e(be(H({},st),{userPrompt:Xe}))}}},[f,p,E,b,ae,K,Re,O,_e]),us=$.useMemo(()=>({copilot:M,messages:ae,groupedMessages:he,isLoading:ne,isResponseLoading:w,handleAskCim:Re,handleSearch:K,handleBrowse:O,handlePdp:_e,handleUserInput:Xr,handleSuggestion:Ti,handleCancel:Kn,resetConversation:as,getSessionInformation:q,getConversationMessages:oe}),[M,ae,he,ne,w,Re,K,O,_e,Xr,Ti,Kn,as,q,oe]);return k.jsx(Bg.Provider,{value:us,children:c})},PA=()=>{const{resetCopilotState:e,addCopilotEvent:t}=Jo(),{copilot:n,handleSearch:r,handleBrowse:o,handlePdp:a,resetConversation:u,getSessionInformation:c,getConversationMessages:d}=$r(),f=$.useCallback(({query:b})=>{if(!n||!b)return;const{facetFilters:T}=gt.facetFiltersProxy,{rangeFilters:_}=gt.rangeFiltersProxy,{catalogSegment:x}=gt.catalogSegmentProxy,{pricebooks:C}=gt.pricebooksProxy,v={query:b};v.facetFilters=T||{},v.rangeFilters=_||[],v.catalogSegment=x||"",v.pricebooks=C||[],r(H({},v))},[n,r]),p=$.useCallback(({categoryId:b})=>{if(!n)return;const T=at.categoryIdProxy.categoryName,{facetFilters:_}=at.facetFiltersProxy,{rangeFilters:x}=at.rangeFiltersProxy,{catalogSegment:C}=at.catalogSegmentProxy,{pricebooks:v}=at.pricebooksProxy,U={categoryId:b};U.categoryName=T||"",U.facetFilters=_||{},U.rangeFilters=x||[],U.catalogSegment=C||"",U.pricebooks=v||[],o(H({},U))},[n,o]),E=$.useCallback(({productId:b})=>{if(!n||!b)return;const T={productId:b,pdpLink:or.pdpLink,productName:or.proxy.productName||""};a(T)},[n,a]);return $.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="query"&&f({query:T.value})};return fg(b),()=>{hg(b)}},[f]),$.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.property)==="pdp-context"){const _=T.value;E({productId:_.productId});return}(T==null?void 0:T.property)==="productId"&&E({productId:T.value})};return gg(b),()=>{Eg(b)}},[E]),$.useEffect(()=>{const b=({detail:T})=>{(T==null?void 0:T.property)==="categoryId"&&p({categoryId:T.value})};return pg(b),()=>{mg(b)}},[p]),$.useEffect(()=>{const b=({detail:T})=>{if((T==null?void 0:T.event)==li.RESET_CONVERSATION&&u(),(T==null?void 0:T.event)==li.GET_SESSION_INFORMATION){const _=T.value.callback;c(_)}if((T==null?void 0:T.event)==li.GET_CONVERSATION_MESSAGES){const{payload:_,callback:x}=T.value;if(!_.conversationId||typeof x!="function")return;d(_,x)}if((T==null?void 0:T.event)==li.LOAD_CONVERSATION){const _=T.value;if(!_.conversationId)return;d(_,C=>{e(),C.forEach(v=>{t(v)})})}};return nA(b),()=>{rA(b)}},[u,c,d,e,t]),null},RA=({apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:c})=>k.jsxs(IA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:r,onConnect:o,onRefinedSearch:a,onRefinedBrowse:u,children:[k.jsx(PA,{}),c]}),Ug=({apiKey:e,apiToken:t,baseUrl:n,logoUrl:r,headerText:o,theme:a,openLinksInNewTab:u,globalClassName:c,isDevelopment:d=!1,componentType:f,entryType:p,entryMessage:E,disclaimerText:b,disclaimerMarkdown:T,searchPlaceholder:_,searchButtonLabel:x,searchConfig:C,resetConversationMessage:v,conversationHistory:U,onConnect:L,onCopilotEvent:Y,onRefinedSearch:X,onRefinedBrowse:B,__features:te,children:ge})=>k.jsx(HC,{apiKey:e,logoUrl:r,headerText:o,entryMessage:E,theme:a,globalClassName:c,openLinksInNewTab:u,searchPlaceholder:_,searchButtonLabel:x,searchConfig:C,disclaimerMarkdown:T,disclaimerText:b,resetConversationMessage:v,conversationHistory:U,isDevelopment:d,__features:te,children:k.jsx(TC,{apiKey:e,apiToken:t,isDevelopment:d,children:k.jsx(GC,{entryType:p,onCopilotEvent:Y,children:k.jsx(vA,{children:k.jsx(_A,{children:k.jsx(wA,{children:k.jsx(NA,{componentType:f,children:k.jsx(RA,{apiKey:e,apiToken:t,baseUrl:n,isDevelopment:d,entryType:p,onConnect:L,onCopilotEvent:Y,onRefinedSearch:X,onRefinedBrowse:B,children:ge})})})})})})})});function Hg(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=Hg(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function Z(){for(var e,t,n=0,r="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=Hg(e))&&(r&&(r+=" "),r+=t);return r}var zg={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},jg=zi.createContext&&zi.createContext(zg),LA=["attr","size","title"];function DA(e,t){if(e==null)return{};var n=MA(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 MA(e,t){if(e==null)return{};var n={};for(var r in e)if(Object.prototype.hasOwnProperty.call(e,r)){if(t.indexOf(r)>=0)continue;n[r]=e[r]}return n}function Qu(){return Qu=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},Qu.apply(this,arguments)}function $g(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 Xu(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?$g(Object(n),!0).forEach(function(r){FA(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):$g(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function FA(e,t,n){return t=BA(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function BA(e){var t=UA(e,"string");return typeof t=="symbol"?t:t+""}function UA(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 Vg(e){return e&&e.map((t,n)=>zi.createElement(t.tag,Xu({key:n},t.attr),Vg(t.child)))}function sn(e){return t=>zi.createElement(HA,Qu({attr:Xu({},e.attr)},t),Vg(e.child))}function HA(e){var t=n=>{var{attr:r,size:o,title:a}=e,u=DA(e,LA),c=o||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),zi.createElement("svg",Qu({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:Xu(Xu({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&zi.createElement("title",null,a),e.children)};return jg!==void 0?zi.createElement(jg.Consumer,null,n=>t(n)):t(zg)}function qg(e){return sn({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 ea(e){return sn({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 zA(e){return sn({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 Yg(e){return sn({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 jA(e){return sn({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 $A(e){return sn({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 VA(e){return sn({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 qA(e){return sn({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 YA(e){return sn({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 Jd=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>k.jsx("button",{"aria-label":t,className:Z(e,`${G}-close-button`),disabled:r,onClick:n,children:k.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:k.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"})})}),Zd=({className:e,children:t,type:n,disabled:r=!1,onClick:o})=>k.jsx("button",{className:Z(`${G}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:o,children:t}),Ls=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:o,disabled:a=!1,onClick:u})=>!n&&!t?null:k.jsx("button",{className:Z(e,`${G}-icon-button`),type:r,"aria-label":o,onClick:u,disabled:a,children:t?k.jsx("img",{className:Z(`${G}-icon-image`),src:t,alt:o,loading:"lazy"}):n}),WA=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?k.jsx("img",{className:Z(`${G}-search-button-icon`,t),src:n,alt:"",loading:"lazy"}):k.jsx(ea,{})},GA=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:o})=>{if((t==null?void 0:t.buttonType)==="icon")return k.jsx(Ls,{className:Z(e,n,r),type:"submit",disabled:o,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:k.jsx(ea,{}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return k.jsxs(Zd,{className:Z(e,n,r,`${G}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:o,children:[a&&k.jsx(WA,{globalClassName:n,searchConfig:t}),t==null?void 0:t.buttonLabel]})};function TB(){}function bB(){}function Wg(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 Gg(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const KA=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,QA=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,XA={};function Kg(e,t){return(XA.jsx?QA:KA).test(e)}const JA=/[ \t\n\f\r]/g;function ZA(e){return typeof e=="object"?e.type==="text"?Qg(e.value):!1:Qg(e)}function Qg(e){return e.replace(JA,"")===""}let ta=class{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}};ta.prototype.normal={},ta.prototype.property={},ta.prototype.space=void 0;function Xg(e,t){const n={},r={};for(const o of e)Object.assign(n,o.property),Object.assign(r,o.normal);return new ta(n,r,t)}function na(e){return e.toLowerCase()}let _n=class{constructor(t,n){this.attribute=n,this.property=t}};_n.prototype.attribute="",_n.prototype.booleanish=!1,_n.prototype.boolean=!1,_n.prototype.commaOrSpaceSeparated=!1,_n.prototype.commaSeparated=!1,_n.prototype.defined=!1,_n.prototype.mustUseProperty=!1,_n.prototype.number=!1,_n.prototype.overloadedBoolean=!1,_n.prototype.property="",_n.prototype.spaceSeparated=!1,_n.prototype.space=void 0;let ev=0;const qe=Gi(),Ft=Gi(),ef=Gi(),pe=Gi(),ft=Gi(),Ds=Gi(),Pn=Gi();function Gi(){return rd(2,++ev)}const tf=Object.freeze(Object.defineProperty({__proto__:null,boolean:qe,booleanish:Ft,commaOrSpaceSeparated:Pn,commaSeparated:Ds,number:pe,overloadedBoolean:ef,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),nf=Object.keys(tf);let rf=class extends _n{constructor(t,n,r,o){let a=-1;if(super(t,n),Jg(this,"space",o),typeof r=="number")for(;++a<nf.length;){const u=nf[a];Jg(this,nf[a],(r&tf[u])===tf[u])}}};rf.prototype.defined=!0;function Jg(e,t,n){n&&(e[t]=n)}function Ms(e){const t={},n={};for(const[r,o]of Object.entries(e.properties)){const a=new rf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[na(r)]=r,n[na(a.attribute)]=r}return new ta(t,n,e.space)}const Zg=Ms({properties:{ariaActiveDescendant:null,ariaAtomic:Ft,ariaAutoComplete:null,ariaBusy:Ft,ariaChecked:Ft,ariaColCount:pe,ariaColIndex:pe,ariaColSpan:pe,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Ft,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Ft,ariaFlowTo:ft,ariaGrabbed:Ft,ariaHasPopup:null,ariaHidden:Ft,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:pe,ariaLive:null,ariaModal:Ft,ariaMultiLine:Ft,ariaMultiSelectable:Ft,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:pe,ariaPressed:Ft,ariaReadOnly:Ft,ariaRelevant:null,ariaRequired:Ft,ariaRoleDescription:ft,ariaRowCount:pe,ariaRowIndex:pe,ariaRowSpan:pe,ariaSelected:Ft,ariaSetSize:pe,ariaSort:null,ariaValueMax:pe,ariaValueMin:pe,ariaValueNow:pe,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function e1(e,t){return t in e?e[t]:t}function t1(e,t){return e1(e,t.toLowerCase())}const tv=Ms({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Ds,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:qe,allowPaymentRequest:qe,allowUserMedia:qe,alt:null,as:null,async:qe,autoCapitalize:null,autoComplete:ft,autoFocus:qe,autoPlay:qe,blocking:ft,capture:null,charSet:null,checked:qe,cite:null,className:ft,cols:pe,colSpan:null,content:null,contentEditable:Ft,controls:qe,controlsList:ft,coords:pe|Ds,crossOrigin:null,data:null,dateTime:null,decoding:null,default:qe,defer:qe,dir:null,dirName:null,disabled:qe,download:ef,draggable:Ft,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:qe,formTarget:null,headers:ft,height:pe,hidden:ef,high:pe,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:qe,inputMode:null,integrity:null,is:null,isMap:qe,itemId:null,itemProp:ft,itemRef:ft,itemScope:qe,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:qe,low:pe,manifest:null,max:null,maxLength:pe,media:null,method:null,min:null,minLength:pe,multiple:qe,muted:qe,name:null,nonce:null,noModule:qe,noValidate:qe,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:qe,optimum:pe,pattern:null,ping:ft,placeholder:null,playsInline:qe,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:qe,referrerPolicy:null,rel:ft,required:qe,reversed:qe,rows:pe,rowSpan:pe,sandbox:ft,scope:null,scoped:qe,seamless:qe,selected:qe,shadowRootClonable:qe,shadowRootDelegatesFocus:qe,shadowRootMode:null,shape:null,size:pe,sizes:null,slot:null,span:pe,spellCheck:Ft,src:null,srcDoc:null,srcLang:null,srcSet:null,start:pe,step:null,style:null,tabIndex:pe,target:null,title:null,translate:null,type:null,typeMustMatch:qe,useMap:null,value:Ft,width:pe,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:pe,borderColor:null,bottomMargin:pe,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:qe,declare:qe,event:null,face:null,frame:null,frameBorder:null,hSpace:pe,leftMargin:pe,link:null,longDesc:null,lowSrc:null,marginHeight:pe,marginWidth:pe,noResize:qe,noHref:qe,noShade:qe,noWrap:qe,object:null,profile:null,prompt:null,rev:null,rightMargin:pe,rules:null,scheme:null,scrolling:Ft,standby:null,summary:null,text:null,topMargin:pe,valueType:null,version:null,vAlign:null,vLink:null,vSpace:pe,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:qe,disableRemotePlayback:qe,prefix:null,property:null,results:pe,security:null,unselectable:null},space:"html",transform:t1}),nv=Ms({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",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:Pn,accentHeight:pe,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:pe,amplitude:pe,arabicForm:null,ascent:pe,attributeName:null,attributeType:null,azimuth:pe,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:pe,by:null,calcMode:null,capHeight:pe,className:ft,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:pe,diffuseConstant:pe,direction:null,display:null,dur:null,divisor:pe,dominantBaseline:null,download:qe,dx:null,dy:null,edgeMode:null,editable:null,elevation:pe,enableBackground:null,end:null,event:null,exponent:pe,externalResourcesRequired:null,fill:null,fillOpacity:pe,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:Ds,g2:Ds,glyphName:Ds,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:pe,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:pe,horizOriginX:pe,horizOriginY:pe,id:null,ideographic:pe,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:pe,k:pe,k1:pe,k2:pe,k3:pe,k4:pe,kernelMatrix:Pn,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:pe,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:pe,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:pe,overlineThickness:pe,paintOrder:null,panose1:null,path:null,pathLength:pe,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:pe,pointsAtY:pe,pointsAtZ:pe,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Pn,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Pn,rev:Pn,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Pn,requiredFeatures:Pn,requiredFonts:Pn,requiredFormats:Pn,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:pe,specularExponent:pe,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:pe,strikethroughThickness:pe,string:null,stroke:null,strokeDashArray:Pn,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:pe,strokeOpacity:pe,strokeWidth:null,style:null,surfaceScale:pe,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Pn,tabIndex:pe,tableValues:null,target:null,targetX:pe,targetY:pe,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Pn,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:pe,underlineThickness:pe,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:pe,values:null,vAlphabetic:pe,vMathematical:pe,vectorEffect:null,vHanging:pe,vIdeographic:pe,version:null,vertAdvY:pe,vertOriginX:pe,vertOriginY:pe,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:pe,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:e1}),n1=Ms({properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null},space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()}}),r1=Ms({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:t1}),i1=Ms({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),rv={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"},iv=/[A-Z]/g,s1=/-[a-z]/g,sv=/^data[-\w.:]+$/i;function sf(e,t){const n=na(t);let r=t,o=_n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&sv.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(s1,av);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!s1.test(a)){let u=a.replace(iv,ov);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=rf}return new o(r,t)}function ov(e){return"-"+e.toLowerCase()}function av(e){return e.charAt(1).toUpperCase()}const Ju=Xg([Zg,tv,n1,r1,i1],"html"),Fs=Xg([Zg,nv,n1,r1,i1],"svg");function o1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function a1(e){return e.join(" ").trim()}var Bs={},of,u1;function uv(){if(u1)return of;u1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,o=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
8
+ `,f="/",p="*",E="",b="comment",T="declaration";of=function(x,C){if(typeof x!="string")throw new TypeError("First argument must be a string");if(!x)return[];C=C||{};var v=1,U=1;function L(ue){var de=ue.match(t);de&&(v+=de.length);var Te=ue.lastIndexOf(d);U=~Te?ue.length-Te:U+ue.length}function Y(){var ue={line:v,column:U};return function(de){return de.position=new X(ue),ge(),de}}function X(ue){this.start=ue,this.end={line:v,column:U},this.source=C.source}X.prototype.content=x;function B(ue){var de=new Error(C.source+":"+v+":"+U+": "+ue);if(de.reason=ue,de.filename=C.source,de.line=v,de.column=U,de.source=x,!C.silent)throw de}function te(ue){var de=ue.exec(x);if(de){var Te=de[0];return L(Te),x=x.slice(Te.length),de}}function ge(){te(n)}function ye(ue){var de;for(ue=ue||[];de=M();)de!==!1&&ue.push(de);return ue}function M(){var ue=Y();if(!(f!=x.charAt(0)||p!=x.charAt(1))){for(var de=2;E!=x.charAt(de)&&(p!=x.charAt(de)||f!=x.charAt(de+1));)++de;if(de+=2,E===x.charAt(de-1))return B("End of comment missing");var Te=x.slice(2,de-2);return U+=2,L(Te),x=x.slice(de),U+=2,ue({type:b,comment:Te})}}function ae(){var ue=Y(),de=te(r);if(de){if(M(),!te(o))return B("property missing ':'");var Te=te(a),Ce=ue({type:T,property:_(de[0].replace(e,E)),value:Te?_(Te[0].replace(e,E)):E});return te(u),Ce}}function he(){var ue=[];ye(ue);for(var de;de=ae();)de!==!1&&(ue.push(de),ye(ue));return ue}return ge(),he()};function _(x){return x?x.replace(c,E):E}return of}var l1;function lv(){if(l1)return Bs;l1=1;var e=Bs&&Bs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Bs,"__esModule",{value:!0}),Bs.default=n;var t=e(uv());function n(r,o){var a=null;if(!r||typeof r!="string")return a;var u=(0,t.default)(r),c=typeof o=="function";return u.forEach(function(d){if(d.type==="declaration"){var f=d.property,p=d.value;c?o(f,p,d):p&&(a=a||{},a[f]=p)}}),a}return Bs}var ra={},c1;function cv(){if(c1)return ra;c1=1,Object.defineProperty(ra,"__esModule",{value:!0}),ra.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,o=/^-(ms)-/,a=function(f){return!f||n.test(f)||e.test(f)},u=function(f,p){return p.toUpperCase()},c=function(f,p){return"".concat(p,"-")},d=function(f,p){return p===void 0&&(p={}),a(f)?f:(f=f.toLowerCase(),p.reactCompat?f=f.replace(o,c):f=f.replace(r,c),f.replace(t,u))};return ra.camelCase=d,ra}var ia,d1;function dv(){if(d1)return ia;d1=1;var e=ia&&ia.__importDefault||function(o){return o&&o.__esModule?o:{default:o}},t=e(lv()),n=cv();function r(o,a){var u={};return!o||typeof o!="string"||(0,t.default)(o,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ia=r,ia}var fv=dv();const hv=Ke(fv),Zu=f1("end"),Sr=f1("start");function f1(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 h1(e){const t=Sr(e),n=Zu(e);if(t&&n)return{start:t,end:n}}function sa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?p1(e.position):"start"in e||"end"in e?p1(e):"line"in e||"column"in e?af(e):""}function af(e){return m1(e&&e.line)+":"+m1(e&&e.column)}function p1(e){return af(e&&e.start)+"-"+af(e&&e.end)}function m1(e){return e&&typeof e=="number"?e:1}class on 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=H({},n)),typeof t=="string"?o=t:!a.cause&&t&&(u=!0,o=t.message,a.cause=t),!a.ruleId&&!a.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?a.ruleId=r:(a.source=r.slice(0,d),a.ruleId=r.slice(d+1))}if(!a.place&&a.ancestors&&a.ancestors){const d=a.ancestors[a.ancestors.length-1];d&&(a.place=d.position)}const c=a.place&&"start"in a.place?a.place.start:a.place;this.ancestors=a.ancestors||void 0,this.cause=a.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file,this.message=o,this.line=c?c.line:void 0,this.name=sa(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual,this.expected,this.note,this.url}}on.prototype.file="",on.prototype.name="",on.prototype.reason="",on.prototype.message="",on.prototype.stack="",on.prototype.column=void 0,on.prototype.line=void 0,on.prototype.ancestors=void 0,on.prototype.cause=void 0,on.prototype.fatal=void 0,on.prototype.place=void 0,on.prototype.ruleId=void 0,on.prototype.source=void 0;const uf={}.hasOwnProperty,pv=new Map,mv=/[A-Z]/g,gv=new Set(["table","tbody","thead","tfoot","tr"]),Ev=new Set(["td","th"]),g1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function yv(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=Av(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=Cv(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"?Fs:Ju,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=E1(o,e,void 0);return a&&typeof a!="string"?a:o.create(e,o.Fragment,{children:a||void 0},void 0)}function E1(e,t,n){if(t.type==="element")return Tv(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return bv(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return xv(e,t,n);if(t.type==="mdxjsEsm")return _v(e,t);if(t.type==="root")return Sv(e,t,n);if(t.type==="text")return wv(e,t)}function Tv(e,t,n){const r=e.schema;let o=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(o=Fs,e.schema=o),e.ancestors.push(t);const a=T1(e,t.tagName,!1),u=vv(e,t);let c=cf(e,t);return gv.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!ZA(d):!0})),y1(e,u,a,t),lf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function bv(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 _v(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);oa(e,t.position)}function xv(e,t,n){const r=e.schema;let o=r;t.name==="svg"&&r.space==="html"&&(o=Fs,e.schema=o),e.ancestors.push(t);const a=t.name===null?e.Fragment:T1(e,t.name,!0),u=kv(e,t),c=cf(e,t);return y1(e,u,a,t),lf(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Sv(e,t,n){const r={};return lf(r,cf(e,t)),e.create(t,e.Fragment,r,n)}function wv(e,t){return t.value}function y1(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function lf(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Cv(e,t,n){return r;function r(o,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function Av(e,t){return n;function n(r,o,a,u){const c=Array.isArray(a.children),d=Sr(r);return t(o,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function vv(e,t){const n={};let r,o;for(o in t.properties)if(o!=="children"&&uf.call(t.properties,o)){const a=Nv(e,o,t.properties[o]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&Ev.has(t.tagName)?r=c:n[u]=c}}if(r){const a=n.style||(n.style={});a[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function kv(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const a=r.data.estree.body[0];a.type;const u=a.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else 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 c=r.value.data.estree.body[0];c.type,a=e.evaluater.evaluateExpression(c.expression)}else oa(e,t.position);else a=r.value===null?!0:r.value;n[o]=a}return n}function cf(e,t){const n=[];let r=-1;const o=e.passKeys?new Map:pv;for(;++r<t.children.length;){const a=t.children[r];let u;if(e.passKeys){const d=a.type==="element"?a.tagName:a.type==="mdxJsxFlowElement"||a.type==="mdxJsxTextElement"?a.name:void 0;if(d){const f=o.get(d)||0;u=d+"-"+f,o.set(d,f+1)}}const c=E1(e,a,u);c!==void 0&&n.push(c)}return n}function Nv(e,t,n){const r=sf(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?Gg(n):a1(n)),r.property==="style"){let o=typeof n=="object"?n:Ov(e,String(n));return e.stylePropertyNameCase==="css"&&(o=Iv(o)),["style",o]}return[e.elementAttributeNameCase==="react"&&r.space?rv[r.property]||r.property:r.attribute,n]}}function Ov(e,t){try{return hv(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,o=new on("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=g1+"#cannot-parse-style-attribute",o}}function T1(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const o=t.split(".");let a=-1,u;for(;++a<o.length;){const c=Kg(o[a])?{type:"Identifier",name:o[a]}:{type:"Literal",value:o[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=Kg(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const o=r.value;return uf.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 on("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=g1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Iv(e){const t={};let n;for(n in e)uf.call(e,n)&&(t[Pv(n)]=e[n]);return t}function Pv(e){let t=e.replace(mv,Rv);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Rv(e){return"-"+e.toLowerCase()}const df={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"]},Lv={};function ff(e,t){const n=Lv,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,o=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return b1(e,r,o)}function b1(e,t,n){if(Dv(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 _1(e.children,t,n)}return Array.isArray(e)?_1(e,t,n):""}function _1(e,t,n){const r=[];let o=-1;for(;++o<e.length;)r[o]=b1(e[o],t,n);return r.join("")}function Dv(e){return!!(e&&typeof e=="object")}const x1=document.createElement("i");function hf(e){const t="&"+e+";";x1.innerHTML=t;const n=x1.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Rn(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 qn(e,t){return e.length>0?(Rn(e,e.length,0,t),e):t}const S1={}.hasOwnProperty;function w1(e){const t={};let n=-1;for(;++n<e.length;)Mv(t,e[n]);return t}function Mv(e,t){let n;for(n in t){const o=(S1.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){S1.call(o,u)||(o[u]=[]);const c=a[u];Fv(o[u],Array.isArray(c)?c:c?[c]:[])}}}function Fv(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Rn(e,0,0,r)}function C1(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 ar(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const pn=ci(/[A-Za-z]/),an=ci(/[\dA-Za-z]/),Bv=ci(/[#-'*+\--9=?A-Z^-~]/);function el(e){return e!==null&&(e<32||e===127)}const pf=ci(/\d/),Uv=ci(/[\dA-Fa-f]/),Hv=ci(/[!-/:-@[-`{-~]/);function Le(e){return e!==null&&e<-2}function dt(e){return e!==null&&(e<0||e===32)}function Qe(e){return e===-2||e===-1||e===32}const tl=ci(new RegExp("\\p{P}|\\p{S}","u")),Ki=ci(/\s/);function ci(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Us(e){const t=[];let n=-1,r=0,o=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&an(e.charCodeAt(n+1))&&an(e.charCodeAt(n+2)))o=2;else if(a<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(a))||(u=String.fromCharCode(a));else if(a>55295&&a<57344){const c=e.charCodeAt(n+1);a<56320&&c>56319&&c<57344?(u=String.fromCharCode(a,c),o=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+o+1,u=""),o&&(n+=o,o=0)}return t.join("")+e.slice(r)}function Ze(e,t,n,r){const o=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Qe(d)?(e.enter(n),c(d)):t(d)}function c(d){return Qe(d)&&a++<o?(e.consume(d),c):(e.exit(n),t(d))}}const zv={tokenize:jv};function jv(e){const t=e.attempt(this.parser.constructs.contentInitial,r,o);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Ze(e,t,"linePrefix")}function o(c){return e.enter("paragraph"),a(c)}function a(c){const d=e.enter("chunkText",{contentType:"text",previous:n});return n&&(n.next=d),n=d,u(c)}function u(c){if(c===null){e.exit("chunkText"),e.exit("paragraph"),e.consume(c);return}return Le(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const $v={tokenize:Vv},A1={tokenize:qv};function Vv(e){const t=this,n=[];let r=0,o,a,u;return c;function c(L){if(r<n.length){const Y=n[r];return t.containerState=Y[1],e.attempt(Y[0].continuation,d,f)(L)}return f(L)}function d(L){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,o&&U();const Y=t.events.length;let X=Y,B;for(;X--;)if(t.events[X][0]==="exit"&&t.events[X][1].type==="chunkFlow"){B=t.events[X][1].end;break}v(r);let te=Y;for(;te<t.events.length;)t.events[te][1].end=H({},B),te++;return Rn(t.events,X+1,0,t.events.slice(Y)),t.events.length=te,f(L)}return c(L)}function f(L){if(r===n.length){if(!o)return b(L);if(o.currentConstruct&&o.currentConstruct.concrete)return _(L);t.interrupt=!!(o.currentConstruct&&!o._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(A1,p,E)(L)}function p(L){return o&&U(),v(r),b(L)}function E(L){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(L)}function b(L){return t.containerState={},e.attempt(A1,T,_)(L)}function T(L){return r++,n.push([t.currentConstruct,t.containerState]),b(L)}function _(L){if(L===null){o&&U(),v(0),e.consume(L);return}return o=o||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:o,contentType:"flow",previous:a}),x(L)}function x(L){if(L===null){C(e.exit("chunkFlow"),!0),v(0),e.consume(L);return}return Le(L)?(e.consume(L),C(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(L),x)}function C(L,Y){const X=t.sliceStream(L);if(Y&&X.push(null),L.previous=a,a&&(a.next=L),a=L,o.defineSkip(L.start),o.write(X),t.parser.lazy[L.start.line]){let B=o.events.length;for(;B--;)if(o.events[B][1].start.offset<u&&(!o.events[B][1].end||o.events[B][1].end.offset>u))return;const te=t.events.length;let ge=te,ye,M;for(;ge--;)if(t.events[ge][0]==="exit"&&t.events[ge][1].type==="chunkFlow"){if(ye){M=t.events[ge][1].end;break}ye=!0}for(v(r),B=te;B<t.events.length;)t.events[B][1].end=H({},M),B++;Rn(t.events,ge+1,0,t.events.slice(te)),t.events.length=B}}function v(L){let Y=n.length;for(;Y-- >L;){const X=n[Y];t.containerState=X[1],X[0].exit.call(t,e)}n.length=L}function U(){o.write([null]),a=void 0,o=void 0,t.containerState._closeFlow=void 0}}function qv(e,t,n){return Ze(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Hs(e){if(e===null||dt(e)||Ki(e))return 1;if(tl(e))return 2}function nl(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 mf={name:"attention",resolveAll:Yv,tokenize:Wv};function Yv(e,t){let n=-1,r,o,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const E=H({},e[r][1].end),b=H({},e[n][1].start);v1(E,-d),v1(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:E,end:H({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:H({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:H({},e[r][1].end),end:H({},e[n][1].start)},o={type:d>1?"strong":"emphasis",start:H({},u.start),end:H({},c.end)},e[r][1].end=H({},u.start),e[n][1].start=H({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=qn(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=qn(f,[["enter",o,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=qn(f,nl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=qn(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",o,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=qn(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Rn(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 Wv(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,o=Hs(r);let a;return u;function u(d){return a=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===a)return e.consume(d),c;const f=e.exit("attentionSequence"),p=Hs(d),E=!p||p===2&&o||n.includes(d),b=!o||o===2&&p||n.includes(r);return f._open=!!(a===42?E:E&&(o||!b)),f._close=!!(a===42?b:b&&(p||!E)),t(d)}}function v1(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const Gv={name:"autolink",tokenize:Kv};function Kv(e,t,n){let r=0;return o;function o(T){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(T){return pn(T)?(e.consume(T),u):T===64?n(T):f(T)}function u(T){return T===43||T===45||T===46||an(T)?(r=1,c(T)):f(T)}function c(T){return T===58?(e.consume(T),r=0,d):(T===43||T===45||T===46||an(T))&&r++<32?(e.consume(T),c):(r=0,f(T))}function d(T){return T===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):T===null||T===32||T===60||el(T)?n(T):(e.consume(T),d)}function f(T){return T===64?(e.consume(T),p):Bv(T)?(e.consume(T),f):n(T)}function p(T){return an(T)?E(T):n(T)}function E(T){return T===46?(e.consume(T),r=0,p):T===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(T),e.exit("autolinkMarker"),e.exit("autolink"),t):b(T)}function b(T){if((T===45||an(T))&&r++<63){const _=T===45?b:E;return e.consume(T),_}return n(T)}}const aa={partial:!0,tokenize:Qv};function Qv(e,t,n){return r;function r(a){return Qe(a)?Ze(e,o,"linePrefix")(a):o(a)}function o(a){return a===null||Le(a)?t(a):n(a)}}const k1={continuation:{tokenize:Jv},exit:Zv,name:"blockQuote",tokenize:Xv};function Xv(e,t,n){const r=this;return o;function o(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Qe(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Jv(e,t,n){const r=this;return o;function o(u){return Qe(u)?Ze(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(k1,t,n)(u)}}function Zv(e){e.exit("blockQuote")}const N1={name:"characterEscape",tokenize:ek};function ek(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 Hv(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const O1={name:"characterReference",tokenize:tk};function tk(e,t,n){const r=this;let o=0,a,u;return c;function c(E){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),d}function d(E){return E===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(E),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=an,p(E))}function f(E){return E===88||E===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(E),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Uv,p):(e.enter("characterReferenceValue"),a=7,u=pf,p(E))}function p(E){if(E===59&&o){const b=e.exit("characterReferenceValue");return u===an&&!hf(r.sliceSerialize(b))?n(E):(e.enter("characterReferenceMarker"),e.consume(E),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(E)&&o++<a?(e.consume(E),p):n(E)}}const I1={partial:!0,tokenize:rk},P1={concrete:!0,name:"codeFenced",tokenize:nk};function nk(e,t,n){const r=this,o={partial:!0,tokenize:X};let a=0,u=0,c;return d;function d(B){return f(B)}function f(B){const te=r.events[r.events.length-1];return a=te&&te[1].type==="linePrefix"?te[2].sliceSerialize(te[1],!0).length:0,c=B,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(B)}function p(B){return B===c?(u++,e.consume(B),p):u<3?n(B):(e.exit("codeFencedFenceSequence"),Qe(B)?Ze(e,E,"whitespace")(B):E(B))}function E(B){return B===null||Le(B)?(e.exit("codeFencedFence"),r.interrupt?t(B):e.check(I1,x,Y)(B)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(B))}function b(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),E(B)):Qe(B)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Ze(e,T,"whitespace")(B)):B===96&&B===c?n(B):(e.consume(B),b)}function T(B){return B===null||Le(B)?E(B):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(B))}function _(B){return B===null||Le(B)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),E(B)):B===96&&B===c?n(B):(e.consume(B),_)}function x(B){return e.attempt(o,Y,C)(B)}function C(B){return e.enter("lineEnding"),e.consume(B),e.exit("lineEnding"),v}function v(B){return a>0&&Qe(B)?Ze(e,U,"linePrefix",a+1)(B):U(B)}function U(B){return B===null||Le(B)?e.check(I1,x,Y)(B):(e.enter("codeFlowValue"),L(B))}function L(B){return B===null||Le(B)?(e.exit("codeFlowValue"),U(B)):(e.consume(B),L)}function Y(B){return e.exit("codeFenced"),t(B)}function X(B,te,ge){let ye=0;return M;function M(Te){return B.enter("lineEnding"),B.consume(Te),B.exit("lineEnding"),ae}function ae(Te){return B.enter("codeFencedFence"),Qe(Te)?Ze(B,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(Te):he(Te)}function he(Te){return Te===c?(B.enter("codeFencedFenceSequence"),ue(Te)):ge(Te)}function ue(Te){return Te===c?(ye++,B.consume(Te),ue):ye>=u?(B.exit("codeFencedFenceSequence"),Qe(Te)?Ze(B,de,"whitespace")(Te):de(Te)):ge(Te)}function de(Te){return Te===null||Le(Te)?(B.exit("codeFencedFence"),te(Te)):ge(Te)}}}function rk(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 gf={name:"codeIndented",tokenize:sk},ik={partial:!0,tokenize:ok};function sk(e,t,n){const r=this;return o;function o(f){return e.enter("codeIndented"),Ze(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):Le(f)?e.attempt(ik,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Le(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function ok(e,t,n){const r=this;return o;function o(u){return r.parser.lazy[r.now().line]?n(u):Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),o):Ze(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Le(u)?o(u):n(u)}}const ak={name:"codeText",previous:lk,resolve:uk,tokenize:ck};function uk(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 lk(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function ck(e,t,n){let r=0,o,a;return u;function u(E){return e.enter("codeText"),e.enter("codeTextSequence"),c(E)}function c(E){return E===96?(e.consume(E),r++,c):(e.exit("codeTextSequence"),d(E))}function d(E){return E===null?n(E):E===32?(e.enter("space"),e.consume(E),e.exit("space"),d):E===96?(a=e.enter("codeTextSequence"),o=0,p(E)):Le(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(E))}function f(E){return E===null||E===32||E===96||Le(E)?(e.exit("codeTextData"),d(E)):(e.consume(E),f)}function p(E){return E===96?(e.consume(E),o++,p):o===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(E)):(a.type="codeTextData",f(E))}}class dk{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&&ua(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),ua(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),ua(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);ua(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);ua(this.left,n.reverse())}}}function ua(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 R1(e){const t={};let n=-1,r,o,a,u,c,d,f;const p=new dk(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,fk(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=H({},p.get(o)[1].start),c=p.slice(o,n),c.unshift(r),p.splice(o,n-o+1,c))}}return Rn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function fk(e,t){const n=e.get(t)[1],r=e.get(t)[2];let o=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,E,b=-1,T=n,_=0,x=0;const C=[x];for(;T;){for(;e.get(++o)[1]!==T;);a.push(o),T._tokenizer||(p=r.sliceStream(T),T.next||p.push(null),E&&u.defineSkip(T.start),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),T._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),E=T,T=T.next}for(T=n;++b<c.length;)c[b][0]==="exit"&&c[b-1][0]==="enter"&&c[b][1].type===c[b-1][1].type&&c[b][1].start.line!==c[b][1].end.line&&(x=b+1,C.push(x),T._tokenizer=void 0,T.previous=void 0,T=T.next);for(u.events=[],T?(T._tokenizer=void 0,T.previous=void 0):C.pop(),b=C.length;b--;){const v=c.slice(C[b],C[b+1]),U=a.pop();d.push([U,U+v.length-1]),e.splice(U,2,v)}for(d.reverse(),b=-1;++b<d.length;)f[_+d[b][0]]=_+d[b][1],_+=d[b][1]-d[b][0]-1;return f}const hk={resolve:mk,tokenize:gk},pk={partial:!0,tokenize:Ek};function mk(e){return R1(e),e}function gk(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),o(c)}function o(c){return c===null?a(c):Le(c)?e.check(pk,u,a)(c):(e.consume(c),o)}function a(c){return e.exit("chunkContent"),e.exit("content"),t(c)}function u(c){return e.consume(c),e.exit("chunkContent"),n.next=e.enter("chunkContent",{contentType:"content",previous:n}),n=n.next,o}}function Ek(e,t,n){const r=this;return o;function o(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Ze(e,a,"linePrefix")}function a(u){if(u===null||Le(u))return n(u);const c=r.events[r.events.length-1];return!r.parser.constructs.disable.null.includes("codeIndented")&&c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):e.interrupt(r.parser.constructs.flow,n,t)(u)}}function L1(e,t,n,r,o,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return E;function E(v){return v===60?(e.enter(r),e.enter(o),e.enter(a),e.consume(v),e.exit(a),b):v===null||v===32||v===41||el(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),x(v))}function b(v){return v===62?(e.enter(a),e.consume(v),e.exit(a),e.exit(o),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),T(v))}function T(v){return v===62?(e.exit("chunkString"),e.exit(c),b(v)):v===null||v===60||Le(v)?n(v):(e.consume(v),v===92?_:T)}function _(v){return v===60||v===62||v===92?(e.consume(v),T):T(v)}function x(v){return!p&&(v===null||v===41||dt(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):p<f&&v===40?(e.consume(v),p++,x):v===41?(e.consume(v),p--,x):v===null||v===32||v===40||el(v)?n(v):(e.consume(v),v===92?C:x)}function C(v){return v===40||v===41||v===92?(e.consume(v),x):x(v)}}function D1(e,t,n,r,o,a){const u=this;let c=0,d;return f;function f(T){return e.enter(r),e.enter(o),e.consume(T),e.exit(o),e.enter(a),p}function p(T){return c>999||T===null||T===91||T===93&&!d||T===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(T):T===93?(e.exit(a),e.enter(o),e.consume(T),e.exit(o),e.exit(r),t):Le(T)?(e.enter("lineEnding"),e.consume(T),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),E(T))}function E(T){return T===null||T===91||T===93||Le(T)||c++>999?(e.exit("chunkString"),p(T)):(e.consume(T),d||(d=!Qe(T)),T===92?b:E)}function b(T){return T===91||T===92||T===93?(e.consume(T),c++,E):E(T)}}function M1(e,t,n,r,o,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(o),e.consume(b),e.exit(o),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(o),e.consume(b),e.exit(o),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Le(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),Ze(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Le(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?E:p)}function E(b){return b===u||b===92?(e.consume(b),p):p(b)}}function la(e,t){let n;return r;function r(o){return Le(o)?(e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),n=!0,r):Qe(o)?Ze(e,r,n?"linePrefix":"lineSuffix")(o):t(o)}}const yk={name:"definition",tokenize:bk},Tk={partial:!0,tokenize:_k};function bk(e,t,n){const r=this;let o;return a;function a(T){return e.enter("definition"),u(T)}function u(T){return D1.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(T)}function c(T){return o=ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),d):n(T)}function d(T){return dt(T)?la(e,f)(T):f(T)}function f(T){return L1(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(T)}function p(T){return e.attempt(Tk,E,E)(T)}function E(T){return Qe(T)?Ze(e,b,"whitespace")(T):b(T)}function b(T){return T===null||Le(T)?(e.exit("definition"),r.parser.defined.push(o),t(T)):n(T)}}function _k(e,t,n){return r;function r(c){return dt(c)?la(e,o)(c):n(c)}function o(c){return M1(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Qe(c)?Ze(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Le(c)?t(c):n(c)}}const xk={name:"hardBreakEscape",tokenize:Sk};function Sk(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),o}function o(a){return Le(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const wk={name:"headingAtx",resolve:Ck,tokenize:Ak};function Ck(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"},Rn(e,r,n-r+1,[["enter",o,t],["enter",a,t],["exit",a,t],["exit",o,t]])),e}function Ak(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||dt(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Le(p)?(e.exit("atxHeading"),t(p)):Qe(p)?Ze(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||dt(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const vk=["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"],F1=["pre","script","style","textarea"],kk={concrete:!0,name:"htmlFlow",resolveTo:Ik,tokenize:Pk},Nk={partial:!0,tokenize:Lk},Ok={partial:!0,tokenize:Rk};function Ik(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 Pk(e,t,n){const r=this;let o,a,u,c,d;return f;function f(O){return p(O)}function p(O){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(O),E}function E(O){return O===33?(e.consume(O),b):O===47?(e.consume(O),a=!0,x):O===63?(e.consume(O),o=3,r.interrupt?t:w):pn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function b(O){return O===45?(e.consume(O),o=2,T):O===91?(e.consume(O),o=5,c=0,_):pn(O)?(e.consume(O),o=4,r.interrupt?t:w):n(O)}function T(O){return O===45?(e.consume(O),r.interrupt?t:w):n(O)}function _(O){const _e="CDATA[";return O===_e.charCodeAt(c++)?(e.consume(O),c===_e.length?r.interrupt?t:he:_):n(O)}function x(O){return pn(O)?(e.consume(O),u=String.fromCharCode(O),C):n(O)}function C(O){if(O===null||O===47||O===62||dt(O)){const _e=O===47,Re=u.toLowerCase();return!_e&&!a&&F1.includes(Re)?(o=1,r.interrupt?t(O):he(O)):vk.includes(u.toLowerCase())?(o=6,_e?(e.consume(O),v):r.interrupt?t(O):he(O)):(o=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(O):a?U(O):L(O))}return O===45||an(O)?(e.consume(O),u+=String.fromCharCode(O),C):n(O)}function v(O){return O===62?(e.consume(O),r.interrupt?t:he):n(O)}function U(O){return Qe(O)?(e.consume(O),U):M(O)}function L(O){return O===47?(e.consume(O),M):O===58||O===95||pn(O)?(e.consume(O),Y):Qe(O)?(e.consume(O),L):M(O)}function Y(O){return O===45||O===46||O===58||O===95||an(O)?(e.consume(O),Y):X(O)}function X(O){return O===61?(e.consume(O),B):Qe(O)?(e.consume(O),X):L(O)}function B(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),d=O,te):Qe(O)?(e.consume(O),B):ge(O)}function te(O){return O===d?(e.consume(O),d=null,ye):O===null||Le(O)?n(O):(e.consume(O),te)}function ge(O){return O===null||O===34||O===39||O===47||O===60||O===61||O===62||O===96||dt(O)?X(O):(e.consume(O),ge)}function ye(O){return O===47||O===62||Qe(O)?L(O):n(O)}function M(O){return O===62?(e.consume(O),ae):n(O)}function ae(O){return O===null||Le(O)?he(O):Qe(O)?(e.consume(O),ae):n(O)}function he(O){return O===45&&o===2?(e.consume(O),Ce):O===60&&o===1?(e.consume(O),oe):O===62&&o===4?(e.consume(O),R):O===63&&o===3?(e.consume(O),w):O===93&&o===5?(e.consume(O),ne):Le(O)&&(o===6||o===7)?(e.exit("htmlFlowData"),e.check(Nk,K,ue)(O)):O===null||Le(O)?(e.exit("htmlFlowData"),ue(O)):(e.consume(O),he)}function ue(O){return e.check(Ok,de,K)(O)}function de(O){return e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),Te}function Te(O){return O===null||Le(O)?ue(O):(e.enter("htmlFlowData"),he(O))}function Ce(O){return O===45?(e.consume(O),w):he(O)}function oe(O){return O===47?(e.consume(O),u="",q):he(O)}function q(O){if(O===62){const _e=u.toLowerCase();return F1.includes(_e)?(e.consume(O),R):he(O)}return pn(O)&&u.length<8?(e.consume(O),u+=String.fromCharCode(O),q):he(O)}function ne(O){return O===93?(e.consume(O),w):he(O)}function w(O){return O===62?(e.consume(O),R):O===45&&o===2?(e.consume(O),w):he(O)}function R(O){return O===null||Le(O)?(e.exit("htmlFlowData"),K(O)):(e.consume(O),R)}function K(O){return e.exit("htmlFlow"),t(O)}}function Rk(e,t,n){const r=this;return o;function o(u){return Le(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),a):n(u)}function a(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function Lk(e,t,n){return r;function r(o){return e.enter("lineEnding"),e.consume(o),e.exit("lineEnding"),e.attempt(aa,t,n)}}const Dk={name:"htmlText",tokenize:Mk};function Mk(e,t,n){const r=this;let o,a,u;return c;function c(w){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(w),d}function d(w){return w===33?(e.consume(w),f):w===47?(e.consume(w),X):w===63?(e.consume(w),L):pn(w)?(e.consume(w),ge):n(w)}function f(w){return w===45?(e.consume(w),p):w===91?(e.consume(w),a=0,_):pn(w)?(e.consume(w),U):n(w)}function p(w){return w===45?(e.consume(w),T):n(w)}function E(w){return w===null?n(w):w===45?(e.consume(w),b):Le(w)?(u=E,oe(w)):(e.consume(w),E)}function b(w){return w===45?(e.consume(w),T):E(w)}function T(w){return w===62?Ce(w):w===45?b(w):E(w)}function _(w){const R="CDATA[";return w===R.charCodeAt(a++)?(e.consume(w),a===R.length?x:_):n(w)}function x(w){return w===null?n(w):w===93?(e.consume(w),C):Le(w)?(u=x,oe(w)):(e.consume(w),x)}function C(w){return w===93?(e.consume(w),v):x(w)}function v(w){return w===62?Ce(w):w===93?(e.consume(w),v):x(w)}function U(w){return w===null||w===62?Ce(w):Le(w)?(u=U,oe(w)):(e.consume(w),U)}function L(w){return w===null?n(w):w===63?(e.consume(w),Y):Le(w)?(u=L,oe(w)):(e.consume(w),L)}function Y(w){return w===62?Ce(w):L(w)}function X(w){return pn(w)?(e.consume(w),B):n(w)}function B(w){return w===45||an(w)?(e.consume(w),B):te(w)}function te(w){return Le(w)?(u=te,oe(w)):Qe(w)?(e.consume(w),te):Ce(w)}function ge(w){return w===45||an(w)?(e.consume(w),ge):w===47||w===62||dt(w)?ye(w):n(w)}function ye(w){return w===47?(e.consume(w),Ce):w===58||w===95||pn(w)?(e.consume(w),M):Le(w)?(u=ye,oe(w)):Qe(w)?(e.consume(w),ye):Ce(w)}function M(w){return w===45||w===46||w===58||w===95||an(w)?(e.consume(w),M):ae(w)}function ae(w){return w===61?(e.consume(w),he):Le(w)?(u=ae,oe(w)):Qe(w)?(e.consume(w),ae):ye(w)}function he(w){return w===null||w===60||w===61||w===62||w===96?n(w):w===34||w===39?(e.consume(w),o=w,ue):Le(w)?(u=he,oe(w)):Qe(w)?(e.consume(w),he):(e.consume(w),de)}function ue(w){return w===o?(e.consume(w),o=void 0,Te):w===null?n(w):Le(w)?(u=ue,oe(w)):(e.consume(w),ue)}function de(w){return w===null||w===34||w===39||w===60||w===61||w===96?n(w):w===47||w===62||dt(w)?ye(w):(e.consume(w),de)}function Te(w){return w===47||w===62||dt(w)?ye(w):n(w)}function Ce(w){return w===62?(e.consume(w),e.exit("htmlTextData"),e.exit("htmlText"),t):n(w)}function oe(w){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(w),e.exit("lineEnding"),q}function q(w){return Qe(w)?Ze(e,ne,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(w):ne(w)}function ne(w){return e.enter("htmlTextData"),u(w)}}const Ef={name:"labelEnd",resolveAll:Hk,resolveTo:zk,tokenize:jk},Fk={tokenize:$k},Bk={tokenize:Vk},Uk={tokenize:qk};function Hk(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&&Rn(e,0,e.length,n),e}function zk(e,t){let n=e.length,r=0,o,a,u,c;for(;n--;)if(o=e[n][1],a){if(o.type==="link"||o.type==="labelLink"&&o._inactive)break;e[n][0]==="enter"&&o.type==="labelLink"&&(o._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(o.type==="labelImage"||o.type==="labelLink")&&!o._balanced&&(a=n,o.type!=="labelLink")){r=2;break}}else o.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:H({},e[a][1].start),end:H({},e[e.length-1][1].end)},f={type:"label",start:H({},e[a][1].start),end:H({},e[u][1].end)},p={type:"labelText",start:H({},e[a+r+2][1].end),end:H({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=qn(c,e.slice(a+1,a+r+3)),c=qn(c,[["enter",p,t]]),c=qn(c,nl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=qn(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=qn(c,e.slice(u+1)),c=qn(c,[["exit",d,t]]),Rn(e,a,e.length,c),e}function jk(e,t,n){const r=this;let o=r.events.length,a,u;for(;o--;)if((r.events[o][1].type==="labelImage"||r.events[o][1].type==="labelLink")&&!r.events[o][1]._balanced){a=r.events[o][1];break}return c;function c(b){return a?a._inactive?E(b):(u=r.parser.defined.includes(ar(r.sliceSerialize({start:a.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(b),e.exit("labelMarker"),e.exit("labelEnd"),d):n(b)}function d(b){return b===40?e.attempt(Fk,p,u?p:E)(b):b===91?e.attempt(Bk,p,u?f:E)(b):u?p(b):E(b)}function f(b){return e.attempt(Uk,p,E)(b)}function p(b){return t(b)}function E(b){return a._balanced=!0,n(b)}}function $k(e,t,n){return r;function r(E){return e.enter("resource"),e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),o}function o(E){return dt(E)?la(e,a)(E):a(E)}function a(E){return E===41?p(E):L1(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(E)}function u(E){return dt(E)?la(e,d)(E):p(E)}function c(E){return n(E)}function d(E){return E===34||E===39||E===40?M1(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(E):p(E)}function f(E){return dt(E)?la(e,p)(E):p(E)}function p(E){return E===41?(e.enter("resourceMarker"),e.consume(E),e.exit("resourceMarker"),e.exit("resource"),t):n(E)}}function Vk(e,t,n){const r=this;return o;function o(c){return D1.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(ar(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function qk(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 Yk={name:"labelStartImage",resolveAll:Ef.resolveAll,tokenize:Wk};function Wk(e,t,n){const r=this;return o;function o(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),a}function a(c){return c===91?(e.enter("labelMarker"),e.consume(c),e.exit("labelMarker"),e.exit("labelImage"),u):n(c)}function u(c){return c===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(c):t(c)}}const Gk={name:"labelStartLink",resolveAll:Ef.resolveAll,tokenize:Kk};function Kk(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 yf={name:"lineEnding",tokenize:Qk};function Qk(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Ze(e,t,"linePrefix")}}const rl={name:"thematicBreak",tokenize:Xk};function Xk(e,t,n){let r=0,o;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return o=f,c(f)}function c(f){return f===o?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Le(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===o?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Qe(f)?Ze(e,c,"whitespace")(f):c(f))}}const xn={continuation:{tokenize:tN},exit:rN,name:"list",tokenize:eN},Jk={partial:!0,tokenize:iN},Zk={partial:!0,tokenize:nN};function eN(e,t,n){const r=this,o=r.events[r.events.length-1];let a=o&&o[1].type==="linePrefix"?o[2].sliceSerialize(o[1],!0).length:0,u=0;return c;function c(T){const _=r.containerState.type||(T===42||T===43||T===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||T===r.containerState.marker:pf(T)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),T===42||T===45?e.check(rl,n,f)(T):f(T);if(!r.interrupt||T===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(T)}return n(T)}function d(T){return pf(T)&&++u<10?(e.consume(T),d):(!r.interrupt||u<2)&&(r.containerState.marker?T===r.containerState.marker:T===41||T===46)?(e.exit("listItemValue"),f(T)):n(T)}function f(T){return e.enter("listItemMarker"),e.consume(T),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||T,e.check(aa,r.interrupt?n:p,e.attempt(Jk,b,E))}function p(T){return r.containerState.initialBlankLine=!0,a++,b(T)}function E(T){return Qe(T)?(e.enter("listItemPrefixWhitespace"),e.consume(T),e.exit("listItemPrefixWhitespace"),b):n(T)}function b(T){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(T)}}function tN(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(aa,o,a);function o(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Ze(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Qe(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(Zk,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Ze(e,e.attempt(xn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function nN(e,t,n){const r=this;return Ze(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 rN(e){e.exit(this.containerState.type)}function iN(e,t,n){const r=this;return Ze(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!Qe(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const B1={name:"setextUnderline",resolveTo:sN,tokenize:oN};function sN(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:H({},e[r][1].start),end:H({},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=H({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function oN(e,t,n){const r=this;let o;return a;function a(f){let p=r.events.length,E;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){E=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||E)?(e.enter("setextHeadingLine"),o=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===o?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Qe(f)?Ze(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Le(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const aN={tokenize:uN};function uN(e){const t=this,n=e.attempt(aa,r,e.attempt(this.parser.constructs.flowInitial,o,Ze(e,e.attempt(this.parser.constructs.flow,o,e.attempt(hk,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 lN={resolveAll:H1()},cN=U1("string"),dN=U1("text");function U1(e){return{resolveAll:H1(e==="text"?fN:void 0),tokenize:t};function t(n){const r=this,o=this.parser.constructs[e],a=n.attempt(o,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const E=o[p];let b=-1;if(E)for(;++b<E.length;){const T=E[b];if(!T.previous||T.previous.call(r,r.previous))return!0}return!1}}}function H1(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 fN(e,t){let n=0;for(;++n<=e.length;)if((n===e.length||e[n][1].type==="lineEnding")&&e[n-1][1].type==="data"){const r=e[n-1][1],o=t.sliceStream(r);let a=o.length,u=-1,c=0,d;for(;a--;){const f=o[a];if(typeof f=="string"){for(u=f.length;f.charCodeAt(u-1)===32;)c++,u--;if(u)break;u=-1}else if(f===-2)d=!0,c++;else if(f!==-1){a++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:a?u:r.start._bufferIndex+u,_index:r.start._index+a,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:H({},r.end)};r.end=H({},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 hN=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:yk},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:k1},flow:{35:wk,42:rl,45:[B1,rl],60:kk,61:B1,95:rl,96:P1,126:P1},flowInitial:{[-2]:gf,[-1]:gf,32:gf},insideSpan:{null:[mf,lN]},string:{38:O1,92:N1},text:{[-5]:yf,[-4]:yf,[-3]:yf,33:Yk,38:O1,42:mf,60:[Gv,Dk],91:Gk,92:[xk,N1],93:Ef,95:mf,96:ak}},Symbol.toStringTag,{value:"Module"}));function pN(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const o={},a=[];let u=[],c=[];const d={attempt:te(X),check:te(B),consume:U,enter:L,exit:Y,interrupt:te(B,{interrupt:!0})},f={code:null,containerState:{},defineSkip:x,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:T,write:E};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function E(ae){return u=qn(u,ae),C(),u[u.length-1]!==null?[]:(ge(t,0),f.events=nl(a,f.events,f),f.events)}function b(ae,he){return gN(T(ae),he)}function T(ae){return mN(u,ae)}function _(){const{_bufferIndex:ae,_index:he,line:ue,column:de,offset:Te}=r;return{_bufferIndex:ae,_index:he,line:ue,column:de,offset:Te}}function x(ae){o[ae.line]=ae.column,M()}function C(){let ae;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(ae=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ae&&r._bufferIndex<he.length;)v(he.charCodeAt(r._bufferIndex));else v(he)}}function v(ae){p=p(ae)}function U(ae){Le(ae)?(r.line++,r.column=1,r.offset+=ae===-3?2:1,M()):ae!==-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=ae}function L(ae,he){const ue=he||{};return ue.type=ae,ue.start=_(),f.events.push(["enter",ue,f]),c.push(ue),ue}function Y(ae){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function X(ae,he){ge(ae,he.from)}function B(ae,he){he.restore()}function te(ae,he){return ue;function ue(de,Te,Ce){let oe,q,ne,w;return Array.isArray(de)?K(de):"tokenize"in de?K([de]):R(de);function R(Oe){return Ge;function Ge(Ye){const et=Ye!==null&&Oe[Ye],Nt=Ye!==null&&Oe.null,Kn=[...Array.isArray(et)?et:et?[et]:[],...Array.isArray(Nt)?Nt:Nt?[Nt]:[]];return K(Kn)(Ye)}}function K(Oe){return oe=Oe,q=0,Oe.length===0?Ce:O(Oe[q])}function O(Oe){return Ge;function Ge(Ye){return w=ye(),ne=Oe,Oe.partial||(f.currentConstruct=Oe),Oe.name&&f.parser.constructs.disable.null.includes(Oe.name)?Re():Oe.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Re)(Ye)}}function _e(Oe){return ae(ne,w),Te}function Re(Oe){return w.restore(),++q<oe.length?O(oe[q]):Ce}}}function ge(ae,he){ae.resolveAll&&!a.includes(ae)&&a.push(ae),ae.resolve&&Rn(f.events,he,f.events.length-he,ae.resolve(f.events.slice(he),f)),ae.resolveTo&&(f.events=ae.resolveTo(f.events,f))}function ye(){const ae=_(),he=f.previous,ue=f.currentConstruct,de=f.events.length,Te=Array.from(c);return{from:de,restore:Ce};function Ce(){r=ae,f.previous=he,f.currentConstruct=ue,f.events.length=de,c=Te,M()}}function M(){r.line in o&&r.column<2&&(r.column=o[r.line],r.offset+=o[r.line]-1)}}function mN(e,t){const n=t.start._index,r=t.start._bufferIndex,o=t.end._index,a=t.end._bufferIndex;let u;if(n===o)u=[e[n].slice(r,a)];else{if(u=e.slice(n,o),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[o].slice(0,a))}return u}function gN(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=`
9
9
  `;break}case-3:{u=`\r
10
- `;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 EN(e){const r={constructs:S1([hN,...(e||{}).extensions||[]]),content:o(zv),defined:[],document:o($v),flow:o(aN),lazy:{},string:o(cN),text:o(dN)};return r;function o(a){return u;function u(c){return pN(r,a,c)}}}function yN(e){for(;!P1(e););return e}const H1=/[\0\t\n\r]/g;function TN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let h,m,E,b,T;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(H1.lastIndex=E,h=H1.exec(a),b=h&&h.index!==void 0?h.index:a.length,T=a.charCodeAt(b),!h){t=a.slice(E);break}if(T===10&&E===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<b&&(d.push(a.slice(E,b)),e+=b-E),T){case 0:{d.push(65533),e++;break}case 9:{for(m=Math.ceil(e/4)*4,d.push(-2);e++<m;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}E=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const bN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _N(e){return e.replace(bN,xN)}function xN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return w1(n.slice(a?2:1),a?16:10)}return df(n)||e}const z1={}.hasOwnProperty;function SN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),wN(n)(yN(EN(n).document().write(TN()(e,t,!0))))}function wN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(ze),autolinkProtocol:Te,autolinkEmail:Te,atxHeading:a(us),blockQuote:a(Nt),characterEscape:Te,characterReference:Te,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(as,u),codeTextData:Te,data:Te,codeFlowValue:Te,definition:a(Xr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ti),hardBreakEscape:a(bi),hardBreakTrailing:a(bi),htmlFlow:a(Jr,u),htmlFlowData:Te,htmlText:a(Jr,u),htmlTextData:Te,image:a(Ae),label:u,link:a(ze),listItem:a(at),listItemValue:b,listOrdered:a(Qe,E),listUnordered:a(Qe),paragraph:a(mt),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(us),strong:a(_t),thematicBreak:a(it)},exit:{atxHeading:d(),atxHeadingSequence:W,autolink:d(),autolinkEmail:Ze,autolinkProtocol:qe,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:We,codeFenced:d(w),codeFencedFence:S,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:H,codeIndented:d(N),codeText:d(ye),codeTextData:H,data:H,definition:d(),definitionDestinationString:Y,definitionLabelString:B,definitionTitleString:D,emphasis:d(),hardBreakEscape:d(fe),hardBreakTrailing:d(fe),htmlFlow:d(de),htmlFlowData:H,htmlText:d(ae),htmlTextData:H,image:d(ue),label:re,labelText:q,lineEnding:ne,link:d(we),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:A,resourceTitleString:R,resource:K,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:F,strong:d(),thematicBreak:d()}};j1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let he={type:"root",children:[]};const Be={stack:[he],tokenStack:[],config:t,enter:c,exit:h,buffer:u,resume:m,data:n},$e=[];let et=-1;for(;++et<ee.length;)if(ee[et][1].type==="listOrdered"||ee[et][1].type==="listUnordered")if(ee[et][0]==="enter")$e.push(et);else{const Qt=$e.pop();et=o(ee,Qt,et)}for(et=-1;++et<ee.length;){const Qt=t[ee[et][0]];z1.call(Qt,ee[et][1].type)&&Qt[ee[et][1].type].call(Object.assign({sliceSerialize:ee[et][2].sliceSerialize},Be),ee[et][1])}if(Be.tokenStack.length>0){const Qt=Be.tokenStack[Be.tokenStack.length-1];(Qt[1]||$1).call(Be,void 0,Qt[0])}for(he.position={start:di(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:di(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)he=t.transforms[et](he)||he;return he}function o(ee,he,Be){let $e=he-1,et=-1,Qt=!1,Zr,Qn,_i,ls;for(;++$e<=Be;){const Xt=ee[$e];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?et++:et--,ls=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Zr&&!ls&&!et&&!_i&&(_i=$e),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!et&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||et===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Zr){let Rr=$e;for(Qn=void 0;Rr--;){const Fn=ee[Rr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",Qt=!0),Fn[1].type="lineEnding",Qn=Rr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}_i&&(!Qn||_i<Qn)&&(Zr._spread=!0),Zr.end=Object.assign({},Qn?ee[Qn][1].start:Xt[1].end),ee.splice(Qn||$e,0,["exit",Zr,Xt[2]]),$e++,Be++}if(Xt[1].type==="listItemPrefix"){const Rr={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Zr=Rr,ee.splice($e,0,["enter",Rr,Xt[2]]),$e++,Be++,_i=void 0,ls=!0}}}return ee[he][1]._spread=Qt,Be}function a(ee,he){return Be;function Be($e){c.call(this,ee($e),$e),he&&he.call(this,$e)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,he,Be){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([he,Be||void 0]),ee.position={start:di(he.start),end:void 0}}function d(ee){return he;function he(Be){ee&&ee.call(this,Be),h.call(this,Be)}}function h(ee,he){const Be=this.stack.pop(),$e=this.tokenStack.pop();if($e)$e[0].type!==ee.type&&(he?he.call(this,ee,$e[0]):($e[1]||$1).call(this,ee,$e[0]));else throw new Error("Cannot close `"+ee.type+"` ("+na({start:ee.start,end:ee.end})+"): it’s not open");Be.position.end=di(ee.end)}function m(){return cf(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(ee){if(this.data.expectingFirstListItemValue){const he=this.stack[this.stack.length-2];he.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function T(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.lang=ee}function _(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.meta=ee}function S(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function w(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function N(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.value=ee.replace(/(\r?\n|\r)$/g,"")}function B(ee){const he=this.resume(),Be=this.stack[this.stack.length-1];Be.label=he,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase()}function D(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.title=ee}function Y(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.url=ee}function W(ee){const he=this.stack[this.stack.length-1];if(!he.depth){const Be=this.sliceSerialize(ee).length;he.depth=Be}}function F(){this.data.setextHeadingSlurpLineEnding=!0}function te(ee){const he=this.stack[this.stack.length-1];he.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function Te(ee){const Be=this.stack[this.stack.length-1].children;let $e=Be[Be.length-1];(!$e||$e.type!=="text")&&($e=mn(),$e.position={start:di(ee.start),end:void 0},Be.push($e)),this.stack.push($e)}function H(ee){const he=this.stack.pop();he.value+=this.sliceSerialize(ee),he.position.end=di(ee.end)}function ne(ee){const he=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=he.children[he.children.length-1];Be.position.end=di(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(he.type)&&(Te.call(this,ee),H.call(this,ee))}function fe(){this.data.atHardBreak=!0}function de(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.value=ee}function ae(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.value=ee}function ye(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.value=ee}function we(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=he,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function ue(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const he=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=he,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function q(ee){const he=this.sliceSerialize(ee),Be=this.stack[this.stack.length-2];Be.label=_N(he),Be.identifier=ar(he).toLowerCase()}function re(){const ee=this.stack[this.stack.length-1],he=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const $e=ee.children;Be.children=$e}else Be.alt=he}function A(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.url=ee}function R(){const ee=this.resume(),he=this.stack[this.stack.length-1];he.title=ee}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ee){const he=this.resume(),Be=this.stack[this.stack.length-1];Be.label=he,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Re(ee){this.data.characterReferenceType=ee.type}function Oe(ee){const he=this.sliceSerialize(ee),Be=this.data.characterReferenceType;let $e;Be?($e=w1(he,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):$e=df(he);const et=this.stack[this.stack.length-1];et.value+=$e}function We(ee){const he=this.stack.pop();he.position.end=di(ee.end)}function qe(ee){H.call(this,ee);const he=this.stack[this.stack.length-1];he.url=this.sliceSerialize(ee)}function Ze(ee){H.call(this,ee);const he=this.stack[this.stack.length-1];he.url="mailto:"+this.sliceSerialize(ee)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function as(){return{type:"inlineCode",value:""}}function Xr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function us(){return{type:"heading",depth:0,children:[]}}function bi(){return{type:"break"}}function Jr(){return{type:"html",value:""}}function Ae(){return{type:"image",title:null,url:"",alt:null}}function ze(){return{type:"link",title:null,url:"",children:[]}}function Qe(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function at(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function mt(){return{type:"paragraph",children:[]}}function _t(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function it(){return{type:"thematicBreak"}}}function di(e){return{line:e.line,column:e.column,offset:e.offset}}function j1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?j1(e,r):AN(e,r)}}function AN(e,t){let n;for(n in t)if(z1.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 $1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+na({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+na({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+na({start:t.start,end:t.end})+") is still open")}function CN(e){const t=this;t.parser=n;function n(r){return SN(r,be(U(U({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function vN(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 kN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
10
+ `;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 EN(e){const r={constructs:w1([hN,...(e||{}).extensions||[]]),content:o(zv),defined:[],document:o($v),flow:o(aN),lazy:{},string:o(cN),text:o(dN)};return r;function o(a){return u;function u(c){return pN(r,a,c)}}}function yN(e){for(;!R1(e););return e}const z1=/[\0\t\n\r]/g;function TN(){let e=1,t="",n=!0,r;return o;function o(a,u,c){const d=[];let f,p,E,b,T;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),E=0,t="",n&&(a.charCodeAt(0)===65279&&E++,n=void 0);E<a.length;){if(z1.lastIndex=E,f=z1.exec(a),b=f&&f.index!==void 0?f.index:a.length,T=a.charCodeAt(b),!f){t=a.slice(E);break}if(T===10&&E===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),E<b&&(d.push(a.slice(E,b)),e+=b-E),T){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}E=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const bN=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function _N(e){return e.replace(bN,xN)}function xN(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const o=n.charCodeAt(1),a=o===120||o===88;return C1(n.slice(a?2:1),a?16:10)}return hf(n)||e}const j1={}.hasOwnProperty;function SN(e,t,n){return typeof t!="string"&&(n=t,t=void 0),wN(n)(yN(EN(n).document().write(TN()(e,t,!0))))}function wN(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(Ue),autolinkProtocol:ye,autolinkEmail:ye,atxHeading:a(us),blockQuote:a(Nt),characterEscape:ye,characterReference:ye,codeFenced:a(Kn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Kn,u),codeText:a(as,u),codeTextData:ye,data:ye,codeFlowValue:ye,definition:a(Xr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(Ti),hardBreakEscape:a(bi),hardBreakTrailing:a(bi),htmlFlow:a(Jr,u),htmlFlowData:ye,htmlText:a(Jr,u),htmlTextData:ye,image:a(Se),label:u,link:a(Ue),listItem:a(Xe),listItemValue:b,listOrdered:a(je,E),listUnordered:a(je),paragraph:a(ct),reference:O,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(us),strong:a(St),thematicBreak:a(st)},exit:{atxHeading:d(),atxHeadingSequence:X,autolink:d(),autolinkEmail:et,autolinkProtocol:Ye,blockQuote:d(),characterEscapeValue:M,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:Oe,characterReference:Ge,codeFenced:d(C),codeFencedFence:x,codeFencedFenceInfo:T,codeFencedFenceMeta:_,codeFlowValue:M,codeIndented:d(v),codeText:d(Te),codeTextData:M,data:M,definition:d(),definitionDestinationString:Y,definitionLabelString:U,definitionTitleString:L,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ue),htmlFlowData:M,htmlText:d(de),htmlTextData:M,image:d(oe),label:ne,labelText:q,lineEnding:ae,link:d(Ce),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:w,resourceTitleString:R,resource:K,setextHeading:d(ge),setextHeadingLineSequence:te,setextHeadingText:B,strong:d(),thematicBreak:d()}};$1(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(ee){let fe={type:"root",children:[]};const Be={stack:[fe],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let tt=-1;for(;++tt<ee.length;)if(ee[tt][1].type==="listOrdered"||ee[tt][1].type==="listUnordered")if(ee[tt][0]==="enter")Ve.push(tt);else{const Qt=Ve.pop();tt=o(ee,Qt,tt)}for(tt=-1;++tt<ee.length;){const Qt=t[ee[tt][0]];j1.call(Qt,ee[tt][1].type)&&Qt[ee[tt][1].type].call(Object.assign({sliceSerialize:ee[tt][2].sliceSerialize},Be),ee[tt][1])}if(Be.tokenStack.length>0){const Qt=Be.tokenStack[Be.tokenStack.length-1];(Qt[1]||V1).call(Be,void 0,Qt[0])}for(fe.position={start:di(ee.length>0?ee[0][1].start:{line:1,column:1,offset:0}),end:di(ee.length>0?ee[ee.length-2][1].end:{line:1,column:1,offset:0})},tt=-1;++tt<t.transforms.length;)fe=t.transforms[tt](fe)||fe;return fe}function o(ee,fe,Be){let Ve=fe-1,tt=-1,Qt=!1,Zr,Qn,_i,ls;for(;++Ve<=Be;){const Xt=ee[Ve];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?tt++:tt--,ls=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Zr&&!ls&&!tt&&!_i&&(_i=Ve),ls=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:ls=void 0}if(!tt&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||tt===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Zr){let Rr=Ve;for(Qn=void 0;Rr--;){const Fn=ee[Rr];if(Fn[1].type==="lineEnding"||Fn[1].type==="lineEndingBlank"){if(Fn[0]==="exit")continue;Qn&&(ee[Qn][1].type="lineEndingBlank",Qt=!0),Fn[1].type="lineEnding",Qn=Rr}else if(!(Fn[1].type==="linePrefix"||Fn[1].type==="blockQuotePrefix"||Fn[1].type==="blockQuotePrefixWhitespace"||Fn[1].type==="blockQuoteMarker"||Fn[1].type==="listItemIndent"))break}_i&&(!Qn||_i<Qn)&&(Zr._spread=!0),Zr.end=Object.assign({},Qn?ee[Qn][1].start:Xt[1].end),ee.splice(Qn||Ve,0,["exit",Zr,Xt[2]]),Ve++,Be++}if(Xt[1].type==="listItemPrefix"){const Rr={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Zr=Rr,ee.splice(Ve,0,["enter",Rr,Xt[2]]),Ve++,Be++,_i=void 0,ls=!0}}}return ee[fe][1]._spread=Qt,Be}function a(ee,fe){return Be;function Be(Ve){c.call(this,ee(Ve),Ve),fe&&fe.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(ee,fe,Be){this.stack[this.stack.length-1].children.push(ee),this.stack.push(ee),this.tokenStack.push([fe,Be||void 0]),ee.position={start:di(fe.start),end:void 0}}function d(ee){return fe;function fe(Be){ee&&ee.call(this,Be),f.call(this,Be)}}function f(ee,fe){const Be=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==ee.type&&(fe?fe.call(this,ee,Ve[0]):(Ve[1]||V1).call(this,ee,Ve[0]));else throw new Error("Cannot close `"+ee.type+"` ("+sa({start:ee.start,end:ee.end})+"): it’s not open");Be.position.end=di(ee.end)}function p(){return ff(this.stack.pop())}function E(){this.data.expectingFirstListItemValue=!0}function b(ee){if(this.data.expectingFirstListItemValue){const fe=this.stack[this.stack.length-2];fe.start=Number.parseInt(this.sliceSerialize(ee),10),this.data.expectingFirstListItemValue=void 0}}function T(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.lang=ee}function _(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.meta=ee}function x(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function C(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee.replace(/(\r?\n|\r)$/g,"")}function U(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase()}function L(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function Y(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function X(ee){const fe=this.stack[this.stack.length-1];if(!fe.depth){const Be=this.sliceSerialize(ee).length;fe.depth=Be}}function B(){this.data.setextHeadingSlurpLineEnding=!0}function te(ee){const fe=this.stack[this.stack.length-1];fe.depth=this.sliceSerialize(ee).codePointAt(0)===61?1:2}function ge(){this.data.setextHeadingSlurpLineEnding=void 0}function ye(ee){const Be=this.stack[this.stack.length-1].children;let Ve=Be[Be.length-1];(!Ve||Ve.type!=="text")&&(Ve=mn(),Ve.position={start:di(ee.start),end:void 0},Be.push(Ve)),this.stack.push(Ve)}function M(ee){const fe=this.stack.pop();fe.value+=this.sliceSerialize(ee),fe.position.end=di(ee.end)}function ae(ee){const fe=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Be=fe.children[fe.children.length-1];Be.position.end=di(ee.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(fe.type)&&(ye.call(this,ee),M.call(this,ee))}function he(){this.data.atHardBreak=!0}function ue(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function de(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function Te(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.value=ee}function Ce(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function oe(){const ee=this.stack[this.stack.length-1];if(this.data.inReference){const fe=this.data.referenceType||"shortcut";ee.type+="Reference",ee.referenceType=fe,delete ee.url,delete ee.title}else delete ee.identifier,delete ee.label;this.data.referenceType=void 0}function q(ee){const fe=this.sliceSerialize(ee),Be=this.stack[this.stack.length-2];Be.label=_N(fe),Be.identifier=ar(fe).toLowerCase()}function ne(){const ee=this.stack[this.stack.length-1],fe=this.resume(),Be=this.stack[this.stack.length-1];if(this.data.inReference=!0,Be.type==="link"){const Ve=ee.children;Be.children=Ve}else Be.alt=fe}function w(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.url=ee}function R(){const ee=this.resume(),fe=this.stack[this.stack.length-1];fe.title=ee}function K(){this.data.inReference=void 0}function O(){this.data.referenceType="collapsed"}function _e(ee){const fe=this.resume(),Be=this.stack[this.stack.length-1];Be.label=fe,Be.identifier=ar(this.sliceSerialize(ee)).toLowerCase(),this.data.referenceType="full"}function Re(ee){this.data.characterReferenceType=ee.type}function Oe(ee){const fe=this.sliceSerialize(ee),Be=this.data.characterReferenceType;let Ve;Be?(Ve=C1(fe,Be==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=hf(fe);const tt=this.stack[this.stack.length-1];tt.value+=Ve}function Ge(ee){const fe=this.stack.pop();fe.position.end=di(ee.end)}function Ye(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url=this.sliceSerialize(ee)}function et(ee){M.call(this,ee);const fe=this.stack[this.stack.length-1];fe.url="mailto:"+this.sliceSerialize(ee)}function Nt(){return{type:"blockquote",children:[]}}function Kn(){return{type:"code",lang:null,meta:null,value:""}}function as(){return{type:"inlineCode",value:""}}function Xr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function Ti(){return{type:"emphasis",children:[]}}function us(){return{type:"heading",depth:0,children:[]}}function bi(){return{type:"break"}}function Jr(){return{type:"html",value:""}}function Se(){return{type:"image",title:null,url:"",alt:null}}function Ue(){return{type:"link",title:null,url:"",children:[]}}function je(ee){return{type:"list",ordered:ee.type==="listOrdered",start:null,spread:ee._spread,children:[]}}function Xe(ee){return{type:"listItem",spread:ee._spread,checked:null,children:[]}}function ct(){return{type:"paragraph",children:[]}}function St(){return{type:"strong",children:[]}}function mn(){return{type:"text",value:""}}function st(){return{type:"thematicBreak"}}}function di(e){return{line:e.line,column:e.column,offset:e.offset}}function $1(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?$1(e,r):CN(e,r)}}function CN(e,t){let n;for(n in t)if(j1.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 V1(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+sa({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+sa({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+sa({start:t.start,end:t.end})+") is still open")}function AN(e){const t=this;t.parser=n;function n(r){return SN(r,be(H(H({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function vN(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 kN(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
11
11
  `}]}function NN(e,t){const n=t.value?t.value+`
12
- `:"",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 ON(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Bs(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const h={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,h),e.applyData(t,h)}function RN(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 LN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function V1(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 DN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V1(e,t);const o={src:Bs(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 MN(e,t){const n={src:Bs(t.url)};t.alt!==null&&t.alt!==void 0&&(n.alt=t.alt),t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"img",properties:n,children:[]};return e.patch(t,r),e.applyData(t,r)}function FN(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 BN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return V1(e,t);const o={href:Bs(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 UN(e,t){const n={href:Bs(t.url)};t.title!==null&&t.title!==void 0&&(n.title=t.title);const r={type:"element",tagName:"a",properties:n,children:e.all(t)};return e.patch(t,r),e.applyData(t,r)}function HN(e,t,n){const r=e.all(t),o=n?zN(n):q1(t),a={},u=[];if(typeof t.checked=="boolean"){const m=r[0];let E;m&&m.type==="element"&&m.tagName==="p"?E=m:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const m=r[c];(o||c!==0||m.type!=="element"||m.tagName!=="p")&&u.push({type:"text",value:`
13
- `}),m.type==="element"&&m.tagName==="p"&&!o?u.push(...m.children):u.push(m)}const d=r[r.length-1];d&&(o||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
14
- `});const h={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,h),e.applyData(t,h)}function zN(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=q1(n[r])}return t}function q1(e){const t=e.spread;return t==null?e.children.length>1:t}function jN(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 $N(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YN(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Sr(t.children[1]),d=Xu(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function WN(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const h=[];for(;++d<c;){const E=t.children[d],b={},T=u?u[d]:void 0;T&&(b.align=T);let _={type:"element",tagName:a,properties:b,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),h.push(_)}const m={type:"element",tagName:"tr",properties:{},children:e.wrap(h,!0)};return e.patch(t,m),e.applyData(t,m)}function GN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const Y1=9,W1=32;function KN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(G1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(G1(t.slice(o),o>0,!1)),a.join("")}function G1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===Y1||a===W1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===Y1||a===W1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function QN(e,t){const n={type:"text",value:KN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function XN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const JN={blockquote:vN,break:kN,code:NN,delete:ON,emphasis:IN,footnoteReference:PN,heading:RN,html:LN,imageReference:DN,image:MN,inlineCode:FN,linkReference:BN,link:UN,listItem:HN,list:jN,paragraph:$N,root:VN,strong:qN,table:YN,tableCell:GN,tableRow:WN,text:QN,thematicBreak:XN,toml:nl,yaml:nl,definition:nl,footnoteDefinition:nl};function nl(){}const K1=-1,rl=0,aa=1,il=2,Ef=3,yf=4,Tf=5,bf=6,Q1=7,X1=8,J1=typeof self=="object"?self:globalThis,ZN=(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 rl:case K1:return n(u,o);case aa:{const c=n([],o);for(const d of u)c.push(r(d));return c}case il:{const c=n({},o);for(const[d,h]of u)c[r(d)]=r(h);return c}case Ef:return n(new Date(u),o);case yf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case Tf:{const c=n(new Map,o);for(const[d,h]of u)c.set(r(d),r(h));return c}case bf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case Q1:{const{name:c,message:d}=u;return n(new J1[c](d),o)}case X1:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new J1[a](u),o)};return r},Z1=e=>ZN(new Map,e)(0),Hs="",{toString:eO}={},{keys:tO}=Object,ua=e=>{const t=typeof e;if(t!=="object"||!e)return[rl,t];const n=eO.call(e).slice(8,-1);switch(n){case"Array":return[aa,Hs];case"Object":return[il,Hs];case"Date":return[Ef,Hs];case"RegExp":return[yf,Hs];case"Map":return[Tf,Hs];case"Set":return[bf,Hs];case"DataView":return[aa,n]}return n.includes("Array")?[aa,n]:n.includes("Error")?[Q1,n]:[il,n]},sl=([e,t])=>e===rl&&(t==="function"||t==="symbol"),nO=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=ua(u);switch(c){case rl:{let m=u;switch(d){case"bigint":c=X1,m=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);m=null;break;case"undefined":return o([K1],u)}return o([c,m],u)}case aa:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),o([d,[...b]],u)}const m=[],E=o([c,m],u);for(const b of u)m.push(a(b));return E}case il:{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 m=[],E=o([c,m],u);for(const b of tO(u))(e||!sl(ua(u[b])))&&m.push([a(b),a(u[b])]);return E}case Ef:return o([c,u.toISOString()],u);case yf:{const{source:m,flags:E}=u;return o([c,{source:m,flags:E}],u)}case Tf:{const m=[],E=o([c,m],u);for(const[b,T]of u)(e||!(sl(ua(b))||sl(ua(T))))&&m.push([a(b),a(T)]);return E}case bf:{const m=[],E=o([c,m],u);for(const b of u)(e||!sl(ua(b)))&&m.push(a(b));return E}}const{message:h}=u;return o([c,{name:d,message:h}],u)};return a},eE=(e,{json:t,lossy:n}={})=>{const r=[];return nO(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Z1(eE(e,t)):structuredClone(e):(e,t)=>Z1(eE(e,t));function rO(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 iO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rO,r=e.options.footnoteBackLabel||iO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const h=e.footnoteById.get(e.footnoteOrder[d]);if(!h)continue;const m=e.all(h),E=String(h.identifier).toUpperCase(),b=Bs(E.toLowerCase());let T=0;const _=[],S=e.footnoteCounts.get(E);for(;S!==void 0&&++T<=S;){_.length>0&&_.push({type:"text",value:" "});let B=typeof n=="string"?n:n(d,T);typeof B=="string"&&(B={type:"text",value:B}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,T),className:["data-footnote-backref"]},children:Array.isArray(B)?B:[B]})}const w=m[m.length-1];if(w&&w.type==="element"&&w.tagName==="p"){const B=w.children[w.children.length-1];B&&B.type==="text"?B.value+=" ":w.children.push({type:"text",value:" "}),w.children.push(..._)}else m.push(..._);const N={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(m,!0)};e.patch(h,N),c.push(N)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:be(U({},Qi(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
12
+ `:"",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 ON(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function IN(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function PN(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),o=Us(r.toLowerCase()),a=e.footnoteOrder.indexOf(r);let u,c=e.footnoteCounts.get(r);c===void 0?(c=0,e.footnoteOrder.push(r),u=e.footnoteOrder.length):u=a+1,c+=1,e.footnoteCounts.set(r,c);const d={type:"element",tagName:"a",properties:{href:"#"+n+"fn-"+o,id:n+"fnref-"+o+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function RN(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 LN(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function q1(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 DN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return q1(e,t);const o={src:Us(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 MN(e,t){const n={src:Us(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 FN(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 BN(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return q1(e,t);const o={href:Us(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 UN(e,t){const n={href:Us(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 HN(e,t,n){const r=e.all(t),o=n?zN(n):Y1(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let E;p&&p.type==="element"&&p.tagName==="p"?E=p:(E={type:"element",tagName:"p",properties:{},children:[]},r.unshift(E)),E.children.length>0&&E.children.unshift({type:"text",value:" "}),E.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(o||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
13
+ `}),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:`
14
+ `});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function zN(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=Y1(n[r])}return t}function Y1(e){const t=e.spread;return t==null?e.children.length>1:t}function jN(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 $N(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function VN(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function qN(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function YN(e,t){const n=e.all(t),r=n.shift(),o=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),o.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Sr(t.children[1]),d=Zu(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),o.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(o,!0)};return e.patch(t,a),e.applyData(t,a)}function WN(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const E=t.children[d],b={},T=u?u[d]:void 0;T&&(b.align=T);let _={type:"element",tagName:a,properties:b,children:[]};E&&(_.children=e.all(E),e.patch(E,_),_=e.applyData(E,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function GN(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const W1=9,G1=32;function KN(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),o=0;const a=[];for(;r;)a.push(K1(t.slice(o,r.index),o>0,!0),r[0]),o=r.index+r[0].length,r=n.exec(t);return a.push(K1(t.slice(o),o>0,!1)),a.join("")}function K1(e,t,n){let r=0,o=e.length;if(t){let a=e.codePointAt(r);for(;a===W1||a===G1;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(o-1);for(;a===W1||a===G1;)o--,a=e.codePointAt(o-1)}return o>r?e.slice(r,o):""}function QN(e,t){const n={type:"text",value:KN(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function XN(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const JN={blockquote:vN,break:kN,code:NN,delete:ON,emphasis:IN,footnoteReference:PN,heading:RN,html:LN,imageReference:DN,image:MN,inlineCode:FN,linkReference:BN,link:UN,listItem:HN,list:jN,paragraph:$N,root:VN,strong:qN,table:YN,tableCell:GN,tableRow:WN,text:QN,thematicBreak:XN,toml:il,yaml:il,definition:il,footnoteDefinition:il};function il(){}const Q1=-1,sl=0,ca=1,ol=2,Tf=3,bf=4,_f=5,xf=6,X1=7,J1=8,Z1=typeof self=="object"?self:globalThis,ZN=(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 sl:case Q1:return n(u,o);case ca:{const c=n([],o);for(const d of u)c.push(r(d));return c}case ol:{const c=n({},o);for(const[d,f]of u)c[r(d)]=r(f);return c}case Tf:return n(new Date(u),o);case bf:{const{source:c,flags:d}=u;return n(new RegExp(c,d),o)}case _f:{const c=n(new Map,o);for(const[d,f]of u)c.set(r(d),r(f));return c}case xf:{const c=n(new Set,o);for(const d of u)c.add(r(d));return c}case X1:{const{name:c,message:d}=u;return n(new Z1[c](d),o)}case J1:return n(BigInt(u),o);case"BigInt":return n(Object(BigInt(u)),o);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}}return n(new Z1[a](u),o)};return r},eE=e=>ZN(new Map,e)(0),zs="",{toString:eO}={},{keys:tO}=Object,da=e=>{const t=typeof e;if(t!=="object"||!e)return[sl,t];const n=eO.call(e).slice(8,-1);switch(n){case"Array":return[ca,zs];case"Object":return[ol,zs];case"Date":return[Tf,zs];case"RegExp":return[bf,zs];case"Map":return[_f,zs];case"Set":return[xf,zs];case"DataView":return[ca,n]}return n.includes("Array")?[ca,n]:n.includes("Error")?[X1,n]:[ol,n]},al=([e,t])=>e===sl&&(t==="function"||t==="symbol"),nO=(e,t,n,r)=>{const o=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=da(u);switch(c){case sl:{let p=u;switch(d){case"bigint":c=J1,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return o([Q1],u)}return o([c,p],u)}case ca:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),o([d,[...b]],u)}const p=[],E=o([c,p],u);for(const b of u)p.push(a(b));return E}case ol:{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=[],E=o([c,p],u);for(const b of tO(u))(e||!al(da(u[b])))&&p.push([a(b),a(u[b])]);return E}case Tf:return o([c,u.toISOString()],u);case bf:{const{source:p,flags:E}=u;return o([c,{source:p,flags:E}],u)}case _f:{const p=[],E=o([c,p],u);for(const[b,T]of u)(e||!(al(da(b))||al(da(T))))&&p.push([a(b),a(T)]);return E}case xf:{const p=[],E=o([c,p],u);for(const b of u)(e||!al(da(b)))&&p.push(a(b));return E}}const{message:f}=u;return o([c,{name:d,message:f}],u)};return a},tE=(e,{json:t,lossy:n}={})=>{const r=[];return nO(!(t||n),!!t,new Map,r)(e),r},Qi=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?eE(tE(e,t)):structuredClone(e):(e,t)=>eE(tE(e,t));function rO(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 iO(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function sO(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||rO,r=e.options.footnoteBackLabel||iO,o=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),E=String(f.identifier).toUpperCase(),b=Us(E.toLowerCase());let T=0;const _=[],x=e.footnoteCounts.get(E);for(;x!==void 0&&++T<=x;){_.length>0&&_.push({type:"text",value:" "});let U=typeof n=="string"?n:n(d,T);typeof U=="string"&&(U={type:"text",value:U}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(T>1?"-"+T:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,T),className:["data-footnote-backref"]},children:Array.isArray(U)?U:[U]})}const C=p[p.length-1];if(C&&C.type==="element"&&C.tagName==="p"){const U=C.children[C.children.length-1];U&&U.type==="text"?U.value+=" ":C.children.push({type:"text",value:" "}),C.children.push(..._)}else p.push(..._);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:be(H({},Qi(u)),{id:"footnote-label"}),children:[{type:"text",value:o}]},{type:"text",value:`
15
15
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
16
- `}]}}const ol=function(e){if(e==null)return lO;if(typeof e=="function")return al(e);if(typeof e=="object")return Array.isArray(e)?oO(e):aO(e);if(typeof e=="string")return uO(e);throw new Error("Expected function, string, or object as test")};function oO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ol(e[n]);return al(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function aO(e){const t=e;return al(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function uO(e){return al(t);function t(n){return n&&n.type===e}}function al(e){return t;function t(n,r,o){return!!(cO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function lO(){return!0}function cO(e){return e!==null&&typeof e=="object"&&"type"in e}function OB(e){return e}const tE=[],dO=!0,_f=!1,fO="skip";function nE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=ol(o),u=r?-1:1;c(e,void 0,[])();function c(d,h,m){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const T=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(T?"<"+T+">":""))+")"})}return b;function b(){let T=tE,_,S,w;if((!t||a(d,h,m[m.length-1]||void 0))&&(T=hO(n(d,m)),T[0]===_f))return T;if("children"in d&&d.children){const N=d;if(N.children&&T[0]!==fO)for(S=(r?N.children.length:-1)+u,w=m.concat(N);S>-1&&S<N.children.length;){const B=N.children[S];if(_=c(B,S,w)(),_[0]===_f)return _;S=typeof _[1]=="number"?_[1]:S+u}}return T}}}function hO(e){return Array.isArray(e)?e:typeof e=="number"?[dO,e]:e==null?tE:[e]}function ul(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),nE(e,a,c,o);function c(d,h){const m=h[h.length-1],E=m?m.children.indexOf(d):void 0;return u(d,E,m)}}const xf={}.hasOwnProperty,pO={};function mO(e,t){const n=t||pO,r=new Map,o=new Map,a=new Map,u=U(U({},JN),n.handlers),c={all:h,applyData:EO,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:gO,wrap:TO};return ul(e,function(m){if(m.type==="definition"||m.type==="footnoteDefinition"){const E=m.type==="definition"?r:o,b=String(m.identifier).toUpperCase();E.has(b)||E.set(b,m)}}),c;function d(m,E){const b=m.type,T=c.handlers[b];if(xf.call(c.handlers,b)&&T)return T(c,m,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in m){const S=m,{children:w}=S,N=en(S,["children"]),B=Qi(N);return B.children=c.all(m),B}return Qi(m)}return(c.options.unknownHandler||yO)(c,m,E)}function h(m){const E=[];if("children"in m){const b=m.children;let T=-1;for(;++T<b.length;){const _=c.one(b[T],m);if(_){if(T&&b[T-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=rE(_.value)),!Array.isArray(_)&&_.type==="element")){const S=_.children[0];S&&S.type==="text"&&(S.value=rE(S.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function gO(e,t){e.position&&(t.position=f1(e))}function EO(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,Qi(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function yO(e,t){const n=t.data||{},r="value"in t&&!(xf.call(n,"hProperties")||xf.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 TO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
16
+ `}]}}const ul=(function(e){if(e==null)return lO;if(typeof e=="function")return ll(e);if(typeof e=="object")return Array.isArray(e)?oO(e):aO(e);if(typeof e=="string")return uO(e);throw new Error("Expected function, string, or object as test")});function oO(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=ul(e[n]);return ll(r);function r(...o){let a=-1;for(;++a<t.length;)if(t[a].apply(this,o))return!0;return!1}}function aO(e){const t=e;return ll(n);function n(r){const o=r;let a;for(a in e)if(o[a]!==t[a])return!1;return!0}}function uO(e){return ll(t);function t(n){return n&&n.type===e}}function ll(e){return t;function t(n,r,o){return!!(cO(n)&&e.call(this,n,typeof r=="number"?r:void 0,o||void 0))}}function lO(){return!0}function cO(e){return e!==null&&typeof e=="object"&&"type"in e}function OB(e){return e}const nE=[],dO=!0,Sf=!1,fO="skip";function rE(e,t,n,r){let o;typeof t=="function"&&typeof n!="function"?(r=n,n=t):o=t;const a=ul(o),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const E=d&&typeof d=="object"?d:{};if(typeof E.type=="string"){const T=typeof E.tagName=="string"?E.tagName:typeof E.name=="string"?E.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(T?"<"+T+">":""))+")"})}return b;function b(){let T=nE,_,x,C;if((!t||a(d,f,p[p.length-1]||void 0))&&(T=hO(n(d,p)),T[0]===Sf))return T;if("children"in d&&d.children){const v=d;if(v.children&&T[0]!==fO)for(x=(r?v.children.length:-1)+u,C=p.concat(v);x>-1&&x<v.children.length;){const U=v.children[x];if(_=c(U,x,C)(),_[0]===Sf)return _;x=typeof _[1]=="number"?_[1]:x+u}}return T}}}function hO(e){return Array.isArray(e)?e:typeof e=="number"?[dO,e]:e==null?nE:[e]}function cl(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),rE(e,a,c,o);function c(d,f){const p=f[f.length-1],E=p?p.children.indexOf(d):void 0;return u(d,E,p)}}const wf={}.hasOwnProperty,pO={};function mO(e,t){const n=t||pO,r=new Map,o=new Map,a=new Map,u=H(H({},JN),n.handlers),c={all:f,applyData:EO,definitionById:r,footnoteById:o,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:gO,wrap:TO};return cl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const E=p.type==="definition"?r:o,b=String(p.identifier).toUpperCase();E.has(b)||E.set(b,p)}}),c;function d(p,E){const b=p.type,T=c.handlers[b];if(wf.call(c.handlers,b)&&T)return T(c,p,E);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const x=p,{children:C}=x,v=en(x,["children"]),U=Qi(v);return U.children=c.all(p),U}return Qi(p)}return(c.options.unknownHandler||yO)(c,p,E)}function f(p){const E=[];if("children"in p){const b=p.children;let T=-1;for(;++T<b.length;){const _=c.one(b[T],p);if(_){if(T&&b[T-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=iE(_.value)),!Array.isArray(_)&&_.type==="element")){const x=_.children[0];x&&x.type==="text"&&(x.value=iE(x.value))}Array.isArray(_)?E.push(..._):E.push(_)}}}return E}}function gO(e,t){e.position&&(t.position=h1(e))}function EO(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,Qi(a)),"children"in n&&n.children&&o!==null&&o!==void 0&&(n.children=o)}return n}function yO(e,t){const n=t.data||{},r="value"in t&&!(wf.call(n,"hProperties")||wf.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 TO(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
17
17
  `});++r<e.length;)r&&n.push({type:"text",value:`
18
18
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
19
- `}),n}function rE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function iE(e,t){const n=mO(e,t),r=n.one(e,void 0),o=sO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
20
- `},o),a}function bO(e,t){return e&&"run"in e?function(n,r){return nt(this,null,function*(){const o=iE(n,U({file:r},t));yield e.run(o,r)})}:function(n,r){return iE(n,U({file:r},e||t))}}function sE(e){if(e)throw e}var Sf,oE;function _O(){if(oE)return Sf;oE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,o=function(h){return typeof Array.isArray=="function"?Array.isArray(h):t.call(h)==="[object Array]"},a=function(h){if(!h||t.call(h)!=="[object Object]")return!1;var m=e.call(h,"constructor"),E=h.constructor&&h.constructor.prototype&&e.call(h.constructor.prototype,"isPrototypeOf");if(h.constructor&&!m&&!E)return!1;var b;for(b in h);return typeof b=="undefined"||e.call(h,b)},u=function(h,m){n&&m.name==="__proto__"?n(h,m.name,{enumerable:!0,configurable:!0,value:m.newValue,writable:!0}):h[m.name]=m.newValue},c=function(h,m){if(m==="__proto__")if(e.call(h,m)){if(r)return r(h,m).value}else return;return h[m]};return Sf=function d(){var h,m,E,b,T,_,S=arguments[0],w=1,N=arguments.length,B=!1;for(typeof S=="boolean"&&(B=S,S=arguments[1]||{},w=2),(S==null||typeof S!="object"&&typeof S!="function")&&(S={});w<N;++w)if(h=arguments[w],h!=null)for(m in h)E=c(S,m),b=c(h,m),S!==b&&(B&&b&&(a(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(S,{name:m,newValue:d(B,_,b)})):typeof b!="undefined"&&u(S,{name:m,newValue:b}));return S},Sf}var xO=_O();const wf=Ge(xO);function Af(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 SO(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...h){const m=e[++a];let E=-1;if(d){u(d);return}for(;++E<o.length;)(h[E]===null||h[E]===void 0)&&(h[E]=o[E]);o=h,m?wO(m,c)(...h):u(null,...h)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function wO(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(h){const m=h;if(c&&n)throw m;return o(m)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const wr={basename:AO,dirname:CO,extname:vO,join:kO,sep:"/"};function AO(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');la(e);let n=0,r=-1,o=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else r<0&&(a=!0,r=o+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function CO(e){if(la(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 vO(e){la(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function kO(...e){let t=-1,n;for(;++t<e.length;)la(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":NO(n)}function NO(e){la(e);const t=e.codePointAt(0)===47;let n=OO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function OO(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function la(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IO={cwd:PO};function PO(){return"/"}function Cf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RO(e){if(typeof e=="string")e=new URL(e);else if(!Cf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return LO(e)}function LO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const vf=["history","path","basename","stem","extname","dirname"];class aE{constructor(t){let n;t?Cf(t)?n={path:t}:typeof t=="string"||DO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<vf.length;){const a=vf[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)vf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(t){Nf(t,"basename"),kf(t,"basename"),this.path=wr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(t){uE(this.basename,"dirname"),this.path=wr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(t){if(kf(t,"extname"),uE(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=wr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Cf(t)&&(t=RO(t)),Nf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(t){Nf(t,"stem"),kf(t,"stem"),this.path=wr.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 on(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 kf(e,t){if(e&&e.includes(wr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wr.sep+"`")}function Nf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function uE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MO=function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a},FO={}.hasOwnProperty;class Of extends MO{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=SO()}copy(){const t=new Of;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(wf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Rf("data",this.frozen),this.namespace[t]=n,this):FO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Rf("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=ll(t),r=this.parser||this.Parser;return If("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),If("process",this.parser||this.Parser),Pf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=ll(t),d=r.parse(c);r.run(d,c,function(m,E,b){if(m||!E||!b)return h(m);const T=E,_=r.stringify(T,b);HO(_)?b.value=_:b.result=_,h(m,b)});function h(m,E){m||!E?u(m):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),If("processSync",this.parser||this.Parser),Pf("processSync",this.compiler||this.Compiler),this.process(t,o),cE("processSync","process",n),r;function o(a,u){n=!0,sE(a),r=u}}run(t,n,r){lE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=ll(n);o.run(t,d,h);function h(m,E,b){const T=E||t;m?c(m):u?u(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),cE("runSync","run",r),o;function a(u,c){sE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=ll(n),o=this.compiler||this.Compiler;return Pf("stringify",o),lE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Rf("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(h){if(typeof h=="function")d(h,[]);else if(typeof h=="object")if(Array.isArray(h)){const[m,...E]=h;d(m,E)}else u(h);else throw new TypeError("Expected usable value, not `"+h+"`")}function u(h){if(!("plugins"in h)&&!("settings"in h))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(h.plugins),h.settings&&(o.settings=wf(!0,o.settings,h.settings))}function c(h){let m=-1;if(h!=null)if(Array.isArray(h))for(;++m<h.length;){const E=h[m];a(E)}else throw new TypeError("Expected a list of plugins, not `"+h+"`")}function d(h,m){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===h){b=E;break}if(b===-1)r.push([h,...m]);else if(m.length>0){let[T,..._]=m;const S=r[b][1];Af(S)&&Af(T)&&(T=wf(!0,S,T)),r[b]=[h,T,..._]}}}}const BO=new Of().freeze();function If(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Pf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Rf(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 lE(e){if(!Af(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function cE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function ll(e){return UO(e)?e:new aE(e)}function UO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HO(e){return typeof e=="string"||zO(e)}function zO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",dE=[],fE={allowDangerousHtml:!0},$O=/^(https?|ircs?|mailto|xmpp)$/i,VO=[{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 hE(e){const t=qO(e),n=YO(e);return WO(t.runSync(t.parse(n),n),e)}function qO(e){const t=e.rehypePlugins||dE,n=e.remarkPlugins||dE,r=e.remarkRehypeOptions?U(U({},e.remarkRehypeOptions),fE):fE;return BO().use(CN).use(n).use(bO,r).use(t)}function YO(e){const t=e.children||"",n=new aE;return typeof t=="string"&&(n.value=t),n}function WO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||GO;for(const m of VO)Object.hasOwn(t,m.from)&&(""+m.from+(m.to?"use `"+m.to+"` instead":"remove it")+jO+m.id,void 0);return ul(e,h),yv(e,{Fragment:v.Fragment,components:o,ignoreInvalidStyle:!0,jsx:v.jsx,jsxs:v.jsxs,passKeys:!0,passNode:!0});function h(m,E,b){if(m.type==="raw"&&b&&typeof E=="number")return u?b.children.splice(E,1):b.children[E]={type:"text",value:m.value},E;if(m.type==="element"){let T;for(T in lf)if(Object.hasOwn(lf,T)&&Object.hasOwn(m.properties,T)){const _=m.properties[T],S=lf[T];(S===null||S.includes(m.tagName))&&(m.properties[T]=d(String(_||""),T,m))}}if(m.type==="element"){let T=n?!n.includes(m.tagName):a?a.includes(m.tagName):!1;if(!T&&r&&typeof E=="number"&&(T=!r(m,E,b)),T&&b&&typeof E=="number")return c&&m.children?b.children.splice(E,1,...m.children):b.children.splice(E,1),E}}}function GO(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||$O.test(e.slice(0,t))?e:""}const pE=/[#.]/g;function KO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){pE.lastIndex=o;const c=pE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function mE(e,t,n){const r=n?ZO(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const h=u;c.unshift(h)}else{d=KO(a,t);const h=d.tagName.toLowerCase(),m=r?r.get(h):void 0;if(d.tagName=m||h,QO(u))c.unshift(u);else for(const[E,b]of Object.entries(u))XO(e,d.properties,E,b)}for(const h of c)Lf(d.children,h);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function QO(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 XO(e,t,n,r){const o=nf(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=s1(r):o.commaSeparated?a=Yg(r):o.commaOrSpaceSeparated?a=s1(Yg(r).join(" ")):a=gE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?JO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(gE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Lf(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)Lf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Lf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function gE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Zo(n)===Zo(t)))return!0}return n}function JO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ZO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const e3=["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"],t3=mE(Qu,"div"),n3=mE(Ms,"g",e3);function r3(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=EE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=EE(t,c),h=d===-1?t.length+1:d+1;if(c===h)break;n.push(h)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function EE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
21
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xi={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/"},yE={}.hasOwnProperty,i3=Object.prototype;function s3(e,t){const n=t||{};return Df({file:n.file||void 0,location:!1,schema:n.space==="svg"?Ms:Qu,verbose:n.verbose||!1},e)}function Df(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},cl(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:TE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=r3(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},cl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},cl(e,r,n),n}default:return n=o3(e,t),n}}function TE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Df(e,t[n]);r.push(o)}return r}function o3(e,t){const n=e.schema;e.schema=t.namespaceURI===Xi.svg?Ms:Qu;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;yE.call(i3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?n3:t3)(t.tagName,o,TE(e,t.childNodes));if(cl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,h=d&&d.startTag&&zs(d.startTag),m=d&&d.endTag&&zs(d.endTag),E=Df(e,c.content);h&&m&&e.file&&(E.position={start:h.end,end:m.start}),u.content=E}return e.schema=n,u}function cl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=a3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function a3(e,t,n){const r=zs(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)yE.call(n.attrs,u)&&(a[nf(e.schema,u).property]=zs(n.attrs[u]));n.startTag;const c=zs(n.startTag),d=n.endTag?zs(n.endTag):void 0,h={opening:c};d&&(h.closing=d),h.properties=a,t.data={position:h}}}return r}function zs(e){const t=bE({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=bE({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function bE(e){return e.line&&e.column?e:void 0}class ca{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ca.prototype.property={},ca.prototype.normal={},ca.prototype.space=null;function _E(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ca(n,r,t)}function Mf(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let u3=0;const je=Ji(),Bt=Ji(),xE=Ji(),me=Ji(),ft=Ji(),js=Ji(),Ln=Ji();function Ji(){return td(2,++u3)}const Ff=Object.freeze(Object.defineProperty({__proto__:null,boolean:je,booleanish:Bt,commaOrSpaceSeparated:Ln,commaSeparated:js,number:me,overloadedBoolean:xE,spaceSeparated:ft},Symbol.toStringTag,{value:"Module"})),Bf=Object.keys(Ff);class Uf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),SE(this,"space",o),typeof r=="number")for(;++a<Bf.length;){const u=Bf[a];SE(this,Bf[a],(r&Ff[u])===Ff[u])}}}Uf.prototype.defined=!0;function SE(e,t,n){n&&(e[t]=n)}const l3={}.hasOwnProperty;function $s(e){const t={},n={};let r;for(r in e.properties)if(l3.call(e.properties,r)){const o=e.properties[r],a=new Uf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Mf(r)]=r,n[Mf(a.attribute)]=r}return new ca(t,n,e.space)}const wE=$s({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),AE=$s({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function CE(e,t){return t in e?e[t]:t}function vE(e,t){return CE(e,t.toLowerCase())}const kE=$s({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:vE,properties:{xmlns:null,xmlnsXLink:null}}),NE=$s({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ft,ariaCurrent:null,ariaDescribedBy:ft,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ft,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ft,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ft,ariaLevel:me,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ft,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ft,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Bt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),c3=$s({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:vE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:js,acceptCharset:ft,accessKey:ft,action:null,allow:null,allowFullScreen:je,allowPaymentRequest:je,allowUserMedia:je,alt:null,as:null,async:je,autoCapitalize:null,autoComplete:ft,autoFocus:je,autoPlay:je,blocking:ft,capture:null,charSet:null,checked:je,cite:null,className:ft,cols:me,colSpan:null,content:null,contentEditable:Bt,controls:je,controlsList:ft,coords:me|js,crossOrigin:null,data:null,dateTime:null,decoding:null,default:je,defer:je,dir:null,dirName:null,disabled:je,download:xE,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:je,formTarget:null,headers:ft,height:me,hidden:je,high:me,href:null,hrefLang:null,htmlFor:ft,httpEquiv:ft,id:null,imageSizes:null,imageSrcSet:null,inert:je,inputMode:null,integrity:null,is:null,isMap:je,itemId:null,itemProp:ft,itemRef:ft,itemScope:je,itemType:ft,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:je,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:je,muted:je,name:null,nonce:null,noModule:je,noValidate:je,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:je,optimum:me,pattern:null,ping:ft,placeholder:null,playsInline:je,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:je,referrerPolicy:null,rel:ft,required:je,reversed:je,rows:me,rowSpan:me,sandbox:ft,scope:null,scoped:je,seamless:je,selected:je,shadowRootClonable:je,shadowRootDelegatesFocus:je,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:je,useMap:null,value:Bt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ft,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:je,declare:je,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:je,noHref:je,noShade:je,noWrap:je,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:je,disableRemotePlayback:je,prefix:null,property:null,results:me,security:null,unselectable:null}}),d3=$s({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:CE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:ft,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:je,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:js,g2:js,glyphName:js,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ft,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),f3=/^data[-\w.:]+$/i,OE=/-[a-z]/g,h3=/[A-Z]/g;function p3(e,t){const n=Mf(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&f3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(OE,g3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!OE.test(a)){let u=a.replace(h3,m3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=Uf}return new o(r,t)}function m3(e){return"-"+e.toLowerCase()}function g3(e){return e.charAt(1).toUpperCase()}const E3=_E([AE,wE,kE,NE,c3],"html"),IE=_E([AE,wE,kE,NE,d3],"svg"),PE={}.hasOwnProperty;function RE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&PE.call(o,e)){const d=String(o[e]);u=PE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const y3={},T3={}.hasOwnProperty,LE=RE("type",{handlers:{root:_3,element:C3,text:w3,comment:A3,doctype:S3}});function b3(e,t){const r=(t||y3).space;return LE(e,r==="svg"?IE:E3)}function _3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Hf(e.children,n,t),Vs(e,n),n}function x3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Hf(e.children,n,t),Vs(e,n),n}function S3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Vs(e,t),t}function w3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Vs(e,t),t}function A3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Vs(e,t),t}function C3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=IE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&T3.call(e.properties,a)){const d=v3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Xi[u],childNodes:[],parentNode:null};return c.childNodes=Hf(e.children,c,r),Vs(e,c),e.tagName==="template"&&e.content&&(c.content=x3(e.content,r)),c}function v3(e,t,n){const r=p3(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?Wg(n):o1(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=Xi[r.space]}return o}function Hf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=LE(e[r],n);a.parentNode=t,o.push(a)}return o}function Vs(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 k3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],N3=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]),Tt="�";var C;(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"})(C||(C={}));const Sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function DE(e){return e>=55296&&e<=57343}function O3(e){return e>=56320&&e<=57343}function I3(e,t){return(e-55296)*1024+9216+t}function ME(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function FE(e){return e>=64976&&e<=65007||N3.has(e)}var J;(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"})(J||(J={}));const P3=65536;class R3{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=P3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(O3(n))return this.pos++,this._addGap(),I3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,C.EOF;return this._err(J.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,C.EOF;const r=this.html.charCodeAt(n);return r===C.CARRIAGE_RETURN?C.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,C.EOF;let t=this.html.charCodeAt(this.pos);return t===C.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,C.LINE_FEED):t===C.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,DE(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===C.LINE_FEED||t===C.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ME(t)?this._err(J.controlCharacterInInputStream):FE(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Ye;(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"})(Ye||(Ye={}));function BE(e,t){for(let n=e.attrs.length-1;n>=0;n--)if(e.attrs[n].name===t)return e.attrs[n].value;return null}const L3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),D3=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 M3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=D3.get(e))!==null&&t!==void 0?t:e}var Vt;(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"})(Vt||(Vt={}));const F3=32;var fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(fi||(fi={}));function zf(e){return e>=Vt.ZERO&&e<=Vt.NINE}function B3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function U3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||zf(e)}function H3(e){return e===Vt.EQUALS||U3(e)}var qt;(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"})(qt||(qt={}));var Vr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Vr||(Vr={}));class z3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vr.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|F3)===Vt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.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(zf(o)||B3(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(zf(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===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===Vr.Strict)return 0;return this.emitCodePoint(M3(this.result),this.consumed),this.errors&&(t!==Vt.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&fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=j3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Vr.Attribute&&(a===0||H3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&fi.VALUE_LENGTH)>>14,a!==0){if(u===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Vr.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]&fi.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]&~fi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==Vr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function j3(e,t,n,r){const o=(t&fi.BRANCH_LENGTH)>>7,a=t&fi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,h=e[d];if(h<r)u=d+1;else if(h>r)c=d-1;else return e[d+o]}return-1}var se;(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/"})(se||(se={}));var Zi;(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"})(Zi||(Zi={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));var p;(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"})(p||(p={}));const $3=new Map([[j.A,p.A],[j.ADDRESS,p.ADDRESS],[j.ANNOTATION_XML,p.ANNOTATION_XML],[j.APPLET,p.APPLET],[j.AREA,p.AREA],[j.ARTICLE,p.ARTICLE],[j.ASIDE,p.ASIDE],[j.B,p.B],[j.BASE,p.BASE],[j.BASEFONT,p.BASEFONT],[j.BGSOUND,p.BGSOUND],[j.BIG,p.BIG],[j.BLOCKQUOTE,p.BLOCKQUOTE],[j.BODY,p.BODY],[j.BR,p.BR],[j.BUTTON,p.BUTTON],[j.CAPTION,p.CAPTION],[j.CENTER,p.CENTER],[j.CODE,p.CODE],[j.COL,p.COL],[j.COLGROUP,p.COLGROUP],[j.DD,p.DD],[j.DESC,p.DESC],[j.DETAILS,p.DETAILS],[j.DIALOG,p.DIALOG],[j.DIR,p.DIR],[j.DIV,p.DIV],[j.DL,p.DL],[j.DT,p.DT],[j.EM,p.EM],[j.EMBED,p.EMBED],[j.FIELDSET,p.FIELDSET],[j.FIGCAPTION,p.FIGCAPTION],[j.FIGURE,p.FIGURE],[j.FONT,p.FONT],[j.FOOTER,p.FOOTER],[j.FOREIGN_OBJECT,p.FOREIGN_OBJECT],[j.FORM,p.FORM],[j.FRAME,p.FRAME],[j.FRAMESET,p.FRAMESET],[j.H1,p.H1],[j.H2,p.H2],[j.H3,p.H3],[j.H4,p.H4],[j.H5,p.H5],[j.H6,p.H6],[j.HEAD,p.HEAD],[j.HEADER,p.HEADER],[j.HGROUP,p.HGROUP],[j.HR,p.HR],[j.HTML,p.HTML],[j.I,p.I],[j.IMG,p.IMG],[j.IMAGE,p.IMAGE],[j.INPUT,p.INPUT],[j.IFRAME,p.IFRAME],[j.KEYGEN,p.KEYGEN],[j.LABEL,p.LABEL],[j.LI,p.LI],[j.LINK,p.LINK],[j.LISTING,p.LISTING],[j.MAIN,p.MAIN],[j.MALIGNMARK,p.MALIGNMARK],[j.MARQUEE,p.MARQUEE],[j.MATH,p.MATH],[j.MENU,p.MENU],[j.META,p.META],[j.MGLYPH,p.MGLYPH],[j.MI,p.MI],[j.MO,p.MO],[j.MN,p.MN],[j.MS,p.MS],[j.MTEXT,p.MTEXT],[j.NAV,p.NAV],[j.NOBR,p.NOBR],[j.NOFRAMES,p.NOFRAMES],[j.NOEMBED,p.NOEMBED],[j.NOSCRIPT,p.NOSCRIPT],[j.OBJECT,p.OBJECT],[j.OL,p.OL],[j.OPTGROUP,p.OPTGROUP],[j.OPTION,p.OPTION],[j.P,p.P],[j.PARAM,p.PARAM],[j.PLAINTEXT,p.PLAINTEXT],[j.PRE,p.PRE],[j.RB,p.RB],[j.RP,p.RP],[j.RT,p.RT],[j.RTC,p.RTC],[j.RUBY,p.RUBY],[j.S,p.S],[j.SCRIPT,p.SCRIPT],[j.SEARCH,p.SEARCH],[j.SECTION,p.SECTION],[j.SELECT,p.SELECT],[j.SOURCE,p.SOURCE],[j.SMALL,p.SMALL],[j.SPAN,p.SPAN],[j.STRIKE,p.STRIKE],[j.STRONG,p.STRONG],[j.STYLE,p.STYLE],[j.SUB,p.SUB],[j.SUMMARY,p.SUMMARY],[j.SUP,p.SUP],[j.TABLE,p.TABLE],[j.TBODY,p.TBODY],[j.TEMPLATE,p.TEMPLATE],[j.TEXTAREA,p.TEXTAREA],[j.TFOOT,p.TFOOT],[j.TD,p.TD],[j.TH,p.TH],[j.THEAD,p.THEAD],[j.TITLE,p.TITLE],[j.TR,p.TR],[j.TRACK,p.TRACK],[j.TT,p.TT],[j.U,p.U],[j.UL,p.UL],[j.SVG,p.SVG],[j.VAR,p.VAR],[j.WBR,p.WBR],[j.XMP,p.XMP]]);function qs(e){var t;return(t=$3.get(e))!==null&&t!==void 0?t:p.UNKNOWN}const le=p,V3={[se.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[se.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[se.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[se.XLINK]:new Set,[se.XML]:new Set,[se.XMLNS]:new Set},jf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var k;(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"})(k||(k={}));const Rt={DATA:k.DATA,RCDATA:k.RCDATA,RAWTEXT:k.RAWTEXT,SCRIPT_DATA:k.SCRIPT_DATA,PLAINTEXT:k.PLAINTEXT,CDATA_SECTION:k.CDATA_SECTION};function q3(e){return e>=C.DIGIT_0&&e<=C.DIGIT_9}function da(e){return e>=C.LATIN_CAPITAL_A&&e<=C.LATIN_CAPITAL_Z}function Y3(e){return e>=C.LATIN_SMALL_A&&e<=C.LATIN_SMALL_Z}function hi(e){return Y3(e)||da(e)}function UE(e){return hi(e)||q3(e)}function dl(e){return e+32}function HE(e){return e===C.SPACE||e===C.LINE_FEED||e===C.TABULATION||e===C.FORM_FEED}function zE(e){return HE(e)||e===C.SOLIDUS||e===C.GREATER_THAN_SIGN}function W3(e){return e===C.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:DE(e)?J.surrogateCharacterReference:FE(e)?J.noncharacterCharacterReference:ME(e)||e===C.CARRIAGE_RETURN?J.controlCharacterReference:null}class G3{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=k.DATA,this.returnState=k.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new R3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new z3(L3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=W3(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:Ye.START_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Ye.END_TAG,tagName:"",tagID:p.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Ye.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Ye.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(BE(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const 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(J.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=qs(t.tagName),t.type===Ye.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.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 Ye.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Ye.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Ye.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:Ye.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=HE(t)?Ye.WHITESPACE_CHARACTER:t===C.NULL?Ye.NULL_CHARACTER:Ye.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Ye.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=k.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Vr.Attribute:Vr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===k.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===k.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case k.DATA:{this._stateData(t);break}case k.RCDATA:{this._stateRcdata(t);break}case k.RAWTEXT:{this._stateRawtext(t);break}case k.SCRIPT_DATA:{this._stateScriptData(t);break}case k.PLAINTEXT:{this._statePlaintext(t);break}case k.TAG_OPEN:{this._stateTagOpen(t);break}case k.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case k.TAG_NAME:{this._stateTagName(t);break}case k.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case k.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case k.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case k.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case k.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case k.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case k.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case k.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case k.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case k.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case k.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case k.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case k.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case k.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case k.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case k.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case k.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case k.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case k.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case k.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case k.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case k.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case k.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case k.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case k.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case k.BOGUS_COMMENT:{this._stateBogusComment(t);break}case k.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case k.COMMENT_START:{this._stateCommentStart(t);break}case k.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case k.COMMENT:{this._stateComment(t);break}case k.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case k.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case k.COMMENT_END:{this._stateCommentEnd(t);break}case k.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case k.DOCTYPE:{this._stateDoctype(t);break}case k.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case k.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case k.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case k.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case k.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case k.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case k.CDATA_SECTION:{this._stateCdataSection(t);break}case k.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case k.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case k.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case k.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=k.TAG_OPEN;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case C.AMPERSAND:{this._startCharacterReference();break}case C.LESS_THAN_SIGN:{this.state=k.RCDATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case C.LESS_THAN_SIGN:{this.state=k.RAWTEXT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(hi(t))this._createStartTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case C.EXCLAMATION_MARK:{this.state=k.MARKUP_DECLARATION_OPEN;break}case C.SOLIDUS:{this.state=k.END_TAG_OPEN;break}case C.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t);break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=k.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(hi(t))this._createEndTagToken(),this.state=k.TAG_NAME,this._stateTagName(t);else switch(t){case C.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=k.DATA;break}case C.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=Tt;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(da(t)?dl(t):t)}}_stateRcdataLessThanSign(t){t===C.SOLIDUS?this.state=k.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){hi(t)?(this.state=k.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=k.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=k.BEFORE_ATTRIBUTE_NAME,!1;case C.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=k.SELF_CLOSING_START_TAG,!1;case C.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=k.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===C.SOLIDUS?this.state=k.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){hi(t)?(this.state=k.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case C.SOLIDUS:{this.state=k.SCRIPT_DATA_END_TAG_OPEN;break}case C.EXCLAMATION_MARK:{this.state=k.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=k.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){hi(t)?(this.state=k.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===C.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===C.HYPHEN_MINUS?(this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=k.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case C.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_ESCAPED,this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===C.SOLIDUS?this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:hi(t)?(this._emitChars("<"),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){hi(t)?(this.state=k.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&zE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case C.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case C.HYPHEN_MINUS:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case C.HYPHEN_MINUS:{this._emitChars("-");break}case C.LESS_THAN_SIGN:{this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case C.GREATER_THAN_SIGN:{this.state=k.SCRIPT_DATA,this._emitChars(">");break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Tt);break}case C.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===C.SOLIDUS?(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&zE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=k.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=k.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=k.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:case C.SOLIDUS:case C.GREATER_THAN_SIGN:case C.EOF:{this._leaveAttrName(),this.state=k.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case C.EQUALS_SIGN:{this._leaveAttrName(),this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=Tt;break}default:this.currentAttr.name+=String.fromCodePoint(da(t)?dl(t):t)}}_stateAfterAttributeName(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.SOLIDUS:{this.state=k.SELF_CLOSING_START_TAG;break}case C.EQUALS_SIGN:{this.state=k.BEFORE_ATTRIBUTE_VALUE;break}case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=k.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{this.state=k.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this.state=k.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=k.DATA,this.emitCurrentTagToken();break}default:this.state=k.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case C.QUOTATION_MARK:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case C.APOSTROPHE:{this.state=k.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case C.AMPERSAND:{this._startCharacterReference();break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=Tt;break}case C.QUOTATION_MARK:case C.APOSTROPHE:case C.LESS_THAN_SIGN:case C.EQUALS_SIGN:case C.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this._leaveAttrValue(),this.state=k.BEFORE_ATTRIBUTE_NAME;break}case C.SOLIDUS:{this._leaveAttrValue(),this.state=k.SELF_CLOSING_START_TAG;break}case C.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=k.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case C.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=k.DATA,this.emitCurrentTagToken();break}case C.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=k.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case C.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Tt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Sn.DASH_DASH,!0)?(this._createCommentToken(Sn.DASH_DASH.length+1),this.state=k.COMMENT_START):this._consumeSequenceIfMatch(Sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Sn.DOCTYPE.length+1),this.state=k.DOCTYPE):this._consumeSequenceIfMatch(Sn.CDATA_START,!0)?this.inForeignNode?this.state=k.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(Sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=k.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=k.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case C.HYPHEN_MINUS:{this.state=k.COMMENT_START_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=k.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=k.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=k.COMMENT_END_DASH;break}case C.LESS_THAN_SIGN:{n.data+="<",this.state=k.COMMENT_LESS_THAN_SIGN;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.data+=Tt;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case C.EXCLAMATION_MARK:{n.data+="!",this.state=k.COMMENT_LESS_THAN_SIGN_BANG;break}case C.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=k.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===C.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=k.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===C.HYPHEN_MINUS?this.state=k.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=k.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==C.GREATER_THAN_SIGN&&t!==C.EOF&&this._err(J.nestedComment),this.state=k.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{this.state=k.COMMENT_END;break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentComment(n);break}case C.EXCLAMATION_MARK:{this.state=k.COMMENT_END_BANG;break}case C.HYPHEN_MINUS:{n.data+="-";break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=k.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case C.HYPHEN_MINUS:{n.data+="--!",this.state=k.COMMENT_END_DASH;break}case C.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=k.DATA,this.emitCurrentComment(n);break}case C.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=k.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case C.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=k.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(da(t))this._createDoctypeToken(String.fromCharCode(dl(t))),this.state=k.DOCTYPE_NAME;else switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(Tt),this.state=k.DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.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=k.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.AFTER_DOCTYPE_NAME;break}case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.name+=Tt;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(da(t)?dl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Sn.PUBLIC,!1)?this.state=k.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Sn.SYSTEM,!1)?this.state=k.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.publicId="",this.state=k.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Tt;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=Tt;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case C.GREATER_THAN_SIGN:{this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:{this.state=k.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.QUOTATION_MARK:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case C.APOSTROPHE:{n.systemId="",this.state=k.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case C.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.DATA,this.emitCurrentDoctype(n);break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case C.QUOTATION_MARK:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Tt;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.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 C.APOSTROPHE:{this.state=k.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case C.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=Tt;break}case C.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.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 C.SPACE:case C.LINE_FEED:case C.TABULATION:case C.FORM_FEED:break;case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=k.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case C.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=k.DATA;break}case C.NULL:{this._err(J.unexpectedNullCharacter);break}case C.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case C.RIGHT_SQUARE_BRACKET:{this.state=k.CDATA_SECTION_BRACKET;break}case C.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===C.RIGHT_SQUARE_BRACKET?this.state=k.CDATA_SECTION_END:(this._emitChars("]"),this.state=k.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case C.GREATER_THAN_SIGN:{this.state=k.DATA;break}case C.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=k.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(C.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&UE(this.preprocessor.peek(1))?k.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){UE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===C.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const jE=new Set([p.DD,p.DT,p.LI,p.OPTGROUP,p.OPTION,p.P,p.RB,p.RP,p.RT,p.RTC]),$E=new Set([...jE,p.CAPTION,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]),fl=new Set([p.APPLET,p.CAPTION,p.HTML,p.MARQUEE,p.OBJECT,p.TABLE,p.TD,p.TEMPLATE,p.TH]),K3=new Set([...fl,p.OL,p.UL]),Q3=new Set([...fl,p.BUTTON]),VE=new Set([p.ANNOTATION_XML,p.MI,p.MN,p.MO,p.MS,p.MTEXT]),qE=new Set([p.DESC,p.FOREIGN_OBJECT,p.TITLE]),X3=new Set([p.TR,p.TEMPLATE,p.HTML]),J3=new Set([p.TBODY,p.TFOOT,p.THEAD,p.TEMPLATE,p.HTML]),Z3=new Set([p.TABLE,p.TEMPLATE,p.HTML]),eI=new Set([p.TD,p.TH]);class tI{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=p.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===p.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===se.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])!==se.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(jf,se.HTML)}popUntilTableCellPopped(){this.popUntilPopped(eI,se.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(Z3,se.HTML)}clearBackToTableBodyContext(){this.clearBackTo(J3,se.HTML)}clearBackToTableRowContext(){this.clearBackTo(X3,se.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]===p.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]===p.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 se.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case se.SVG:{if(qE.has(o))return!1;break}case se.MATHML:{if(VE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,fl)}hasInListItemScope(t){return this.hasInDynamicScope(t,K3)}hasInButtonScope(t){return this.hasInDynamicScope(t,Q3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case se.HTML:{if(jf.has(n))return!0;if(fl.has(n))return!1;break}case se.SVG:{if(qE.has(n))return!1;break}case se.MATHML:{if(VE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===se.HTML)switch(this.tagIDs[n]){case t:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===se.HTML)switch(this.tagIDs[t]){case p.TBODY:case p.THEAD:case p.TFOOT:return!0;case p.TABLE:case p.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===se.HTML)switch(this.tagIDs[n]){case t:return!0;case p.OPTION:case p.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&jE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&$E.has(this.currentTagId);)this.pop()}}const $f=3;var Ar;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Ar||(Ar={}));const YE={type:Ar.Marker};class nI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Ar.Marker)break;const{element:h}=d;if(this.treeAdapter.getTagName(h)===a&&this.treeAdapter.getNamespaceURI(h)===u){const m=this.treeAdapter.getAttrList(h);m.length===o&&r.push({idx:c,attrs:m})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<$f)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<$f)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=$f&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(YE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Ar.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Ar.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(YE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Ar.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Ar.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Ar.Element&&n.element===t)}}const pi={createDocument(){return{nodeName:"#document",mode:Wn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pi.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(pi.isTextNode(n)){n.value+=t;return}}pi.appendChild(e,pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pi.isTextNode(r)?r.value+=t:pi.insertBefore(e,pi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=U(U({},e.sourceCodeLocation),t)}},WE="html",rI="about:legacy-compat",iI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",GE=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],sI=[...GE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),KE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aI=[...KE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function QE(e,t){return t.some(n=>e.startsWith(n))}function uI(e){return e.name===WE&&e.publicId===null&&(e.systemId===null||e.systemId===rI)}function lI(e){if(e.name!==WE)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===iI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),oI.has(n))return Wn.QUIRKS;let r=t===null?sI:GE;if(QE(n,r))return Wn.QUIRKS;if(r=t===null?KE:aI,QE(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const XE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cI="definitionurl",dI="definitionURL",fI=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])),hI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:se.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:se.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:se.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:se.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:se.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:se.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:se.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:se.XML}],["xml:space",{prefix:"xml",name:"space",namespace:se.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:se.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:se.XMLNS}]]),pI=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])),mI=new Set([p.B,p.BIG,p.BLOCKQUOTE,p.BODY,p.BR,p.CENTER,p.CODE,p.DD,p.DIV,p.DL,p.DT,p.EM,p.EMBED,p.H1,p.H2,p.H3,p.H4,p.H5,p.H6,p.HEAD,p.HR,p.I,p.IMG,p.LI,p.LISTING,p.MENU,p.META,p.NOBR,p.OL,p.P,p.PRE,p.RUBY,p.S,p.SMALL,p.SPAN,p.STRONG,p.STRIKE,p.SUB,p.SUP,p.TABLE,p.TT,p.U,p.UL,p.VAR]);function gI(e){const t=e.tagID;return t===p.FONT&&e.attrs.some(({name:r})=>r===Zi.COLOR||r===Zi.SIZE||r===Zi.FACE)||mI.has(t)}function JE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cI){e.attrs[t].name=dI;break}}function ZE(e){for(let t=0;t<e.attrs.length;t++){const n=fI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Vf(e){for(let t=0;t<e.attrs.length;t++){const n=hI.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 EI(e){const t=pI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=qs(e.tagName))}function yI(e,t){return t===se.MATHML&&(e===p.MI||e===p.MO||e===p.MN||e===p.MS||e===p.MTEXT)}function TI(e,t,n){if(t===se.MATHML&&e===p.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Zi.ENCODING){const o=n[r].value.toLowerCase();return o===XE.TEXT_HTML||o===XE.APPLICATION_XML}}return t===se.SVG&&(e===p.FOREIGN_OBJECT||e===p.DESC||e===p.TITLE)}function bI(e,t,n,r){return(!r||r===se.HTML)&&TI(e,t,n)||(!r||r===se.MATHML)&&yI(e,t)}const _I="hidden",xI=8,SI=3;var P;(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"})(P||(P={}));const wI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ey=new Set([p.TABLE,p.TBODY,p.TFOOT,p.THEAD,p.TR]),ty={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pi,onParseError:null};class ny{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=U(U({},ty),t),this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=n!=null?n:this.treeAdapter.createDocument(),this.tokenizer=new G3(this.options,this),this.activeFormattingElements=new nI(this.treeAdapter),this.fragmentContextID=r?qs(this.treeAdapter.getTagName(r)):p.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new tI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=U(U({},ty),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,se.HTML,[]));const o=r.treeAdapter.createElement("documentmock",se.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===p.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:wI,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)===se.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,se.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Rt.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)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==se.HTML))switch(this.fragmentContextID){case p.TITLE:case p.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case p.STYLE:case p.XMP:case p.IFRAME:case p.NOEMBED:case p.NOFRAMES:case p.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case p.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case p.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&be(U({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,se.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,se.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(j.HTML,se.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,p.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:h,endOffset:m}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:h,endOffset:m})}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===Ye.END_TAG&&o===n.tagName?{endTag:U({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===p.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===se.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===p.MGLYPH||t.tagID===p.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,se.HTML)}_processToken(t){switch(t.type){case Ye.CHARACTER:{this.onCharacter(t);break}case Ye.NULL_CHARACTER:{this.onNullCharacter(t);break}case Ye.COMMENT:{this.onComment(t);break}case Ye.DOCTYPE:{this.onDoctype(t);break}case Ye.START_TAG:{this._processStartTag(t);break}case Ye.END_TAG:{this.onEndTag(t);break}case Ye.EOF:{this.onEof(t);break}case Ye.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return bI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Ar.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=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(p.P),this.openElements.popUntilTagNamePopped(p.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case p.TR:{this.insertionMode=P.IN_ROW;return}case p.TBODY:case p.THEAD:case p.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case p.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case p.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case p.TABLE:{this.insertionMode=P.IN_TABLE;return}case p.BODY:{this.insertionMode=P.IN_BODY;return}case p.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case p.SELECT:{this._resetInsertionModeForSelect(t);return}case p.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case p.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case p.TD:case p.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case p.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===p.TEMPLATE)break;if(r===p.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return ey.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case p.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===se.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case p.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 V3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eR(this,t);return}switch(this.insertionMode){case P.INITIAL:{fa(this,t);break}case P.BEFORE_HTML:{ha(this,t);break}case P.BEFORE_HEAD:{pa(this,t);break}case P.IN_HEAD:{ma(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ga(this,t);break}case P.AFTER_HEAD:{Ea(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{iy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Gf(this,t);break}case P.IN_TABLE_TEXT:{fy(this,t);break}case P.IN_COLUMN_GROUP:{ml(this,t);break}case P.AFTER_BODY:{yl(this,t);break}case P.AFTER_AFTER_BODY:{Tl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ZP(this,t);return}switch(this.insertionMode){case P.INITIAL:{fa(this,t);break}case P.BEFORE_HTML:{ha(this,t);break}case P.BEFORE_HEAD:{pa(this,t);break}case P.IN_HEAD:{ma(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ga(this,t);break}case P.AFTER_HEAD:{Ea(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Gf(this,t);break}case P.IN_COLUMN_GROUP:{ml(this,t);break}case P.AFTER_BODY:{yl(this,t);break}case P.AFTER_AFTER_BODY:{Tl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Yf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Yf(this,t);break}case P.IN_TABLE_TEXT:{ba(this,t);break}case P.AFTER_BODY:{II(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{PI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{RI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case P.IN_TABLE_TEXT:{ba(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?tR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{fa(this,t);break}case P.BEFORE_HTML:{LI(this,t);break}case P.BEFORE_HEAD:{MI(this,t);break}case P.IN_HEAD:{ur(this,t);break}case P.IN_HEAD_NO_SCRIPT:{UI(this,t);break}case P.AFTER_HEAD:{zI(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ys(this,t);break}case P.IN_TABLE_TEXT:{ba(this,t);break}case P.IN_CAPTION:{FP(this,t);break}case P.IN_COLUMN_GROUP:{Kf(this,t);break}case P.IN_TABLE_BODY:{gl(this,t);break}case P.IN_ROW:{El(this,t);break}case P.IN_CELL:{HP(this,t);break}case P.IN_SELECT:{my(this,t);break}case P.IN_SELECT_IN_TABLE:{jP(this,t);break}case P.IN_TEMPLATE:{VP(this,t);break}case P.AFTER_BODY:{YP(this,t);break}case P.IN_FRAMESET:{WP(this,t);break}case P.AFTER_FRAMESET:{KP(this,t);break}case P.AFTER_AFTER_BODY:{XP(this,t);break}case P.AFTER_AFTER_FRAMESET:{JP(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{fa(this,t);break}case P.BEFORE_HTML:{DI(this,t);break}case P.BEFORE_HEAD:{FI(this,t);break}case P.IN_HEAD:{BI(this,t);break}case P.IN_HEAD_NO_SCRIPT:{HI(this,t);break}case P.AFTER_HEAD:{jI(this,t);break}case P.IN_BODY:{pl(this,t);break}case P.TEXT:{vP(this,t);break}case P.IN_TABLE:{ya(this,t);break}case P.IN_TABLE_TEXT:{ba(this,t);break}case P.IN_CAPTION:{BP(this,t);break}case P.IN_COLUMN_GROUP:{UP(this,t);break}case P.IN_TABLE_BODY:{Qf(this,t);break}case P.IN_ROW:{py(this,t);break}case P.IN_CELL:{zP(this,t);break}case P.IN_SELECT:{gy(this,t);break}case P.IN_SELECT_IN_TABLE:{$P(this,t);break}case P.IN_TEMPLATE:{qP(this,t);break}case P.AFTER_BODY:{yy(this,t);break}case P.IN_FRAMESET:{GP(this,t);break}case P.AFTER_FRAMESET:{QP(this,t);break}case P.AFTER_AFTER_BODY:{Tl(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{fa(this,t);break}case P.BEFORE_HTML:{ha(this,t);break}case P.BEFORE_HEAD:{pa(this,t);break}case P.IN_HEAD:{ma(this,t);break}case P.IN_HEAD_NO_SCRIPT:{ga(this,t);break}case P.AFTER_HEAD:{Ea(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{cy(this,t);break}case P.TEXT:{kP(this,t);break}case P.IN_TABLE_TEXT:{ba(this,t);break}case P.IN_TEMPLATE:{Ey(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Wf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===C.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{ry(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Gf(this,t);break}case P.IN_TABLE_TEXT:{dy(this,t);break}}}}function AI(e,t){let n=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return n?e.openElements.contains(n.element)?e.openElements.hasInScope(t.tagID)||(n=null):(e.activeFormattingElements.removeEntry(n),n=null):ly(e,t),n}function CI(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 vI(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=SI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=kI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function kI(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 NI(e,t,n){const r=e.treeAdapter.getTagName(t),o=qs(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===p.TEMPLATE&&a===se.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function OI(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 qf(e,t){for(let n=0;n<xI;n++){const r=AI(e,t);if(!r)break;const o=CI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=vI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&NI(e,u,a),OI(e,o,r)}}function Yf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function II(e,t){e._appendCommentNode(t,e.openElements.items[0])}function PI(e,t){e._appendCommentNode(t,e.document)}function Wf(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 RI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:lI(t);uI(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function fa(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function LI(e,t){t.tagID===p.HTML?(e._insertElement(t,se.HTML),e.insertionMode=P.BEFORE_HEAD):ha(e,t)}function DI(e,t){const n=t.tagID;(n===p.HTML||n===p.HEAD||n===p.BODY||n===p.BR)&&ha(e,t)}function ha(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function MI(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.HEAD:{e._insertElement(t,se.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:pa(e,t)}}function FI(e,t){const n=t.tagID;n===p.HEAD||n===p.BODY||n===p.HTML||n===p.BR?pa(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function pa(e,t){e._insertFakeElement(j.HEAD,p.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function ur(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case p.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,se.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case p.NOFRAMES:case p.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case p.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case p.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case p.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:ma(e,t)}}function BI(e,t){switch(t.tagID){case p.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case p.BODY:case p.BR:case p.HTML:{ma(e,t);break}case p.TEMPLATE:{es(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function es(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==p.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function ma(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function UI(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BASEFONT:case p.BGSOUND:case p.HEAD:case p.LINK:case p.META:case p.NOFRAMES:case p.STYLE:{ur(e,t);break}case p.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:ga(e,t)}}function HI(e,t){switch(t.tagID){case p.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case p.BR:{ga(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function ga(e,t){const n=t.type===Ye.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function zI(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.BODY:{e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case p.FRAMESET:{e._insertElement(t,se.HTML),e.insertionMode=P.IN_FRAMESET;break}case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,p.HEAD),ur(e,t),e.openElements.remove(e.headElement);break}case p.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:Ea(e,t)}}function jI(e,t){switch(t.tagID){case p.BODY:case p.HTML:case p.BR:{Ea(e,t);break}case p.TEMPLATE:{es(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Ea(e,t){e._insertFakeElement(j.BODY,p.BODY),e.insertionMode=P.IN_BODY,hl(e,t)}function hl(e,t){switch(t.type){case Ye.CHARACTER:{iy(e,t);break}case Ye.WHITESPACE_CHARACTER:{ry(e,t);break}case Ye.COMMENT:{Yf(e,t);break}case Ye.START_TAG:{un(e,t);break}case Ye.END_TAG:{pl(e,t);break}case Ye.EOF:{cy(e,t);break}}}function ry(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $I(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function VI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function qI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_FRAMESET)}function YI(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML)}function WI(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&jf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,se.HTML)}function GI(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function KI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),n||(e.formElement=e.openElements.current))}function QI(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===p.LI&&o===p.LI||(n===p.DD||n===p.DT)&&(o===p.DD||o===p.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==p.ADDRESS&&o!==p.DIV&&o!==p.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML)}function XI(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.tokenizer.state=Rt.PLAINTEXT}function JI(e,t){e.openElements.hasInScope(p.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.framesetOk=!1}function ZI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(qf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function eP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(p.NOBR)&&(qf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,se.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function rP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function sy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function oy(e){const t=BE(e,Zi.TYPE);return t!=null&&t.toLowerCase()===_I}function iP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,se.HTML),oy(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function sP(e,t){e._appendElement(t,se.HTML),t.ackSelfClosing=!0}function oP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._appendElement(t,se.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aP(e,t){t.tagName=j.IMG,t.tagID=p.IMG,sy(e,t)}function uP(e,t){e._insertElement(t,se.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function lP(e,t){e.openElements.hasInButtonScope(p.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function cP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function ay(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function dP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function fP(e,t){e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function hP(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,se.HTML)}function pP(e,t){e.openElements.hasInScope(p.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(p.RTC),e._insertElement(t,se.HTML)}function mP(e,t){e._reconstructActiveFormattingElements(),JE(t),Vf(t),t.selfClosing?e._appendElement(t,se.MATHML):e._insertElement(t,se.MATHML),t.ackSelfClosing=!0}function gP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Vf(t),t.selfClosing?e._appendElement(t,se.SVG):e._insertElement(t,se.SVG),t.ackSelfClosing=!0}function uy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,se.HTML)}function un(e,t){switch(t.tagID){case p.I:case p.S:case p.B:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.SMALL:case p.STRIKE:case p.STRONG:{eP(e,t);break}case p.A:{ZI(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{WI(e,t);break}case p.P:case p.DL:case p.OL:case p.UL:case p.DIV:case p.DIR:case p.NAV:case p.MAIN:case p.MENU:case p.ASIDE:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.DETAILS:case p.ADDRESS:case p.ARTICLE:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{YI(e,t);break}case p.LI:case p.DD:case p.DT:{QI(e,t);break}case p.BR:case p.IMG:case p.WBR:case p.AREA:case p.EMBED:case p.KEYGEN:{sy(e,t);break}case p.HR:{oP(e,t);break}case p.RB:case p.RTC:{hP(e,t);break}case p.RT:case p.RP:{pP(e,t);break}case p.PRE:case p.LISTING:{GI(e,t);break}case p.XMP:{lP(e,t);break}case p.SVG:{gP(e,t);break}case p.HTML:{$I(e,t);break}case p.BASE:case p.LINK:case p.META:case p.STYLE:case p.TITLE:case p.SCRIPT:case p.BGSOUND:case p.BASEFONT:case p.TEMPLATE:{ur(e,t);break}case p.BODY:{VI(e,t);break}case p.FORM:{KI(e,t);break}case p.NOBR:{tP(e,t);break}case p.MATH:{mP(e,t);break}case p.TABLE:{rP(e,t);break}case p.INPUT:{iP(e,t);break}case p.PARAM:case p.TRACK:case p.SOURCE:{sP(e,t);break}case p.IMAGE:{aP(e,t);break}case p.BUTTON:{JI(e,t);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{nP(e,t);break}case p.IFRAME:{cP(e,t);break}case p.SELECT:{dP(e,t);break}case p.OPTION:case p.OPTGROUP:{fP(e,t);break}case p.NOEMBED:case p.NOFRAMES:{ay(e,t);break}case p.FRAMESET:{qI(e,t);break}case p.TEXTAREA:{uP(e,t);break}case p.NOSCRIPT:{e.options.scriptingEnabled?ay(e,t):uy(e,t);break}case p.PLAINTEXT:{XI(e,t);break}case p.COL:case p.TH:case p.TD:case p.TR:case p.HEAD:case p.FRAME:case p.TBODY:case p.TFOOT:case p.THEAD:case p.CAPTION:case p.COLGROUP:break;default:uy(e,t)}}function EP(e,t){if(e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function yP(e,t){e.openElements.hasInScope(p.BODY)&&(e.insertionMode=P.AFTER_BODY,yy(e,t))}function TP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function bP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(p.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(p.FORM):n&&e.openElements.remove(n))}function _P(e){e.openElements.hasInButtonScope(p.P)||e._insertFakeElement(j.P,p.P),e._closePElement()}function xP(e){e.openElements.hasInListItemScope(p.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(p.LI),e.openElements.popUntilTagNamePopped(p.LI))}function SP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function wP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function AP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function CP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,p.BR),e.openElements.pop(),e.framesetOk=!1}function ly(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!==p.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 pl(e,t){switch(t.tagID){case p.A:case p.B:case p.I:case p.S:case p.U:case p.EM:case p.TT:case p.BIG:case p.CODE:case p.FONT:case p.NOBR:case p.SMALL:case p.STRIKE:case p.STRONG:{qf(e,t);break}case p.P:{_P(e);break}case p.DL:case p.UL:case p.OL:case p.DIR:case p.DIV:case p.NAV:case p.PRE:case p.MAIN:case p.MENU:case p.ASIDE:case p.BUTTON:case p.CENTER:case p.FIGURE:case p.FOOTER:case p.HEADER:case p.HGROUP:case p.DIALOG:case p.ADDRESS:case p.ARTICLE:case p.DETAILS:case p.SEARCH:case p.SECTION:case p.SUMMARY:case p.LISTING:case p.FIELDSET:case p.BLOCKQUOTE:case p.FIGCAPTION:{TP(e,t);break}case p.LI:{xP(e);break}case p.DD:case p.DT:{SP(e,t);break}case p.H1:case p.H2:case p.H3:case p.H4:case p.H5:case p.H6:{wP(e);break}case p.BR:{CP(e);break}case p.BODY:{EP(e,t);break}case p.HTML:{yP(e,t);break}case p.FORM:{bP(e);break}case p.APPLET:case p.OBJECT:case p.MARQUEE:{AP(e,t);break}case p.TEMPLATE:{es(e,t);break}default:ly(e,t)}}function cy(e,t){e.tmplInsertionModeStack.length>0?Ey(e,t):Wf(e,t)}function vP(e,t){var n;t.tagID===p.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function kP(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Gf(e,t){if(e.openElements.currentTagId!==void 0&&ey.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case Ye.CHARACTER:{fy(e,t);break}case Ye.WHITESPACE_CHARACTER:{dy(e,t);break}}else Ta(e,t)}function NP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_CAPTION}function OP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function IP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,p.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Kf(e,t)}function PP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_TABLE_BODY}function RP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,p.TBODY),e.insertionMode=P.IN_TABLE_BODY,gl(e,t)}function LP(e,t){e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function DP(e,t){oy(t)?e._appendElement(t,se.HTML):Ta(e,t),t.ackSelfClosing=!0}function MP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,se.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ys(e,t){switch(t.tagID){case p.TD:case p.TH:case p.TR:{RP(e,t);break}case p.STYLE:case p.SCRIPT:case p.TEMPLATE:{ur(e,t);break}case p.COL:{IP(e,t);break}case p.FORM:{MP(e,t);break}case p.TABLE:{LP(e,t);break}case p.TBODY:case p.TFOOT:case p.THEAD:{PP(e,t);break}case p.INPUT:{DP(e,t);break}case p.CAPTION:{NP(e,t);break}case p.COLGROUP:{OP(e,t);break}default:Ta(e,t)}}function ya(e,t){switch(t.tagID){case p.TABLE:{e.openElements.hasInTableScope(p.TABLE)&&(e.openElements.popUntilTagNamePopped(p.TABLE),e._resetInsertionMode());break}case p.TEMPLATE:{es(e,t);break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:Ta(e,t)}}function Ta(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,hl(e,t),e.fosterParentingEnabled=n}function dy(e,t){e.pendingCharacterTokens.push(t)}function fy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ba(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ta(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const hy=new Set([p.CAPTION,p.COL,p.COLGROUP,p.TBODY,p.TD,p.TFOOT,p.TH,p.THEAD,p.TR]);function FP(e,t){const n=t.tagID;hy.has(n)?e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ys(e,t)):un(e,t)}function BP(e,t){const n=t.tagID;switch(n){case p.CAPTION:case p.TABLE:{e.openElements.hasInTableScope(p.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(p.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===p.TABLE&&ya(e,t));break}case p.BODY:case p.COL:case p.COLGROUP:case p.HTML:case p.TBODY:case p.TD:case p.TFOOT:case p.TH:case p.THEAD:case p.TR:break;default:pl(e,t)}}function Kf(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.COL:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.TEMPLATE:{ur(e,t);break}default:ml(e,t)}}function UP(e,t){switch(t.tagID){case p.COLGROUP:{e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TEMPLATE:{es(e,t);break}case p.COL:break;default:ml(e,t)}}function ml(e,t){e.openElements.currentTagId===p.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function gl(e,t){switch(t.tagID){case p.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_ROW;break}case p.TH:case p.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,p.TR),e.insertionMode=P.IN_ROW,El(e,t);break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ys(e,t));break}default:Ys(e,t)}}function Qf(e,t){const n=t.tagID;switch(t.tagID){case p.TBODY:case p.TFOOT:case p.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case p.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,ya(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:case p.TR:break;default:ya(e,t)}}function El(e,t){switch(t.tagID){case p.TH:case p.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,se.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case p.CAPTION:case p.COL:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,gl(e,t));break}default:Ys(e,t)}}function py(e,t){switch(t.tagID){case p.TR:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case p.TABLE:{e.openElements.hasInTableScope(p.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Qf(e,t));break}case p.TBODY:case p.TFOOT:case p.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(p.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Qf(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:case p.TD:case p.TH:break;default:ya(e,t)}}function HP(e,t){const n=t.tagID;hy.has(n)?(e.openElements.hasInTableScope(p.TD)||e.openElements.hasInTableScope(p.TH))&&(e._closeTableCell(),El(e,t)):un(e,t)}function zP(e,t){const n=t.tagID;switch(n){case p.TD:case p.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case p.TABLE:case p.TBODY:case p.TFOOT:case p.THEAD:case p.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),py(e,t));break}case p.BODY:case p.CAPTION:case p.COL:case p.COLGROUP:case p.HTML:break;default:pl(e,t)}}function my(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case p.OPTGROUP:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._insertElement(t,se.HTML);break}case p.HR:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop(),e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.INPUT:case p.KEYGEN:case p.TEXTAREA:case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),t.tagID!==p.SELECT&&e._processStartTag(t));break}case p.SCRIPT:case p.TEMPLATE:{ur(e,t);break}}}function gy(e,t){switch(t.tagID){case p.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===p.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===p.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===p.OPTGROUP&&e.openElements.pop();break}case p.OPTION:{e.openElements.currentTagId===p.OPTION&&e.openElements.pop();break}case p.SELECT:{e.openElements.hasInSelectScope(p.SELECT)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode());break}case p.TEMPLATE:{es(e,t);break}}}function jP(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e._processStartTag(t)):my(e,t)}function $P(e,t){const n=t.tagID;n===p.CAPTION||n===p.TABLE||n===p.TBODY||n===p.TFOOT||n===p.THEAD||n===p.TR||n===p.TD||n===p.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(p.SELECT),e._resetInsertionMode(),e.onEndTag(t)):gy(e,t)}function VP(e,t){switch(t.tagID){case p.BASE:case p.BASEFONT:case p.BGSOUND:case p.LINK:case p.META:case p.NOFRAMES:case p.SCRIPT:case p.STYLE:case p.TEMPLATE:case p.TITLE:{ur(e,t);break}case p.CAPTION:case p.COLGROUP:case p.TBODY:case p.TFOOT:case p.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ys(e,t);break}case p.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Kf(e,t);break}case p.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,gl(e,t);break}case p.TD:case p.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,El(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function qP(e,t){t.tagID===p.TEMPLATE&&es(e,t)}function Ey(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(p.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Wf(e,t)}function YP(e,t){t.tagID===p.HTML?un(e,t):yl(e,t)}function yy(e,t){var n;if(t.tagID===p.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===p.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 yl(e,t)}function yl(e,t){e.insertionMode=P.IN_BODY,hl(e,t)}function WP(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.FRAMESET:{e._insertElement(t,se.HTML);break}case p.FRAME:{e._appendElement(t,se.HTML),t.ackSelfClosing=!0;break}case p.NOFRAMES:{ur(e,t);break}}}function GP(e,t){t.tagID===p.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==p.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function KP(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.NOFRAMES:{ur(e,t);break}}}function QP(e,t){t.tagID===p.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function XP(e,t){t.tagID===p.HTML?un(e,t):Tl(e,t)}function Tl(e,t){e.insertionMode=P.IN_BODY,hl(e,t)}function JP(e,t){switch(t.tagID){case p.HTML:{un(e,t);break}case p.NOFRAMES:{ur(e,t);break}}}function ZP(e,t){t.chars=Tt,e._insertCharacters(t)}function eR(e,t){e._insertCharacters(t),e.framesetOk=!1}function Ty(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==se.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function tR(e,t){if(gI(t))Ty(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===se.MATHML?JE(t):r===se.SVG&&(EI(t),ZE(t)),Vf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function nR(e,t){if(t.tagID===p.P||t.tagID===p.BR){Ty(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===se.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const rR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,iR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),by={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function _y(e,t){const n=pR(e),r=RE("type",{handlers:{root:sR,element:oR,text:aR,comment:Sy,doctype:uR,raw:cR},unknown:dR}),o={parser:n?new ny(by):ny.getFragmentParser(void 0,by),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Ws(o,Sr());const a=n?o.parser.document:o.parser.getFragment(),u=s3(a,{file:o.options.file});return o.stitches&&ul(u,"comment",function(c,d,h){const m=c;if(m.value.stitch&&h&&d!==void 0){const E=h.children;return E[d]=m.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function sR(e,t){xy(e.children,t)}function oR(e,t){fR(e,t),xy(e.children,t),hR(e,t)}function aR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Ye.CHARACTER,chars:e.value,location:_a(e)};Ws(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uR(e,t){const n={type:Ye.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:_a(e)};Ws(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lR(e,t){t.stitches=!0;const n=mR(e);if("children"in e&&"children"in n){const r=_y({type:"root",children:e.children},t.options);n.children=r.children}Sy({type:"comment",value:{stitch:n}},t)}function Sy(e,t){const n=e.value,r={type:Ye.COMMENT,data:n,location:_a(e)};Ws(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function cR(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,wy(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function dR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lR(n,t);else{let r="";throw iR.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 Ws(e,t){wy(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=Rt.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 wy(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 fR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Xi.html;o===Xi.html&&n==="svg"&&(o=Xi.svg);const a=b3(be(U({},e),{children:[]}),{space:o===Xi.svg?"svg":"html"}),u={type:Ye.START_TAG,tagName:n,tagID:qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:_a(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function hR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&k3.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;Ws(t,Xu(e));const r={type:Ye.END_TAG,tagName:n,tagID:qs(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:_a(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function pR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function _a(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=Xu(e)||{line:void 0,column:void 0,offset:void 0};return{startLine:t.line,startCol:t.column,startOffset:t.offset,endLine:n.line,endCol:n.column,endOffset:n.offset}}function mR(e){return"children"in e?Qi(be(U({},e),{children:[]})):Qi(e)}function Ay(e){return function(t,n){return _y(t,be(U({},e),{file:n}))}}const ts=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Cy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ts,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ts],h2:[["className","sr-only"]],img:[...ts,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ts,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ts],table:[...ts],ul:[...ts,["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"]},mi={}.hasOwnProperty;function gR(e,t){let n={type:"root",children:[]};const r={schema:t?U(U({},Cy),t):Cy,stack:[]},o=vy(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function vy(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return ER(e,n);case"doctype":return yR(e,n);case"element":return TR(e,n);case"root":return bR(e,n);case"text":return _R(e,n)}}}function ER(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 yR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return xa(n,t),n}}function TR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=ky(e,t.children),o=xR(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&&mi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return xa(u,t),u}function bR(e,t){const r={type:"root",children:ky(e,t.children)};return xa(r,t),r}function _R(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return xa(r,t),r}function ky(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=vy(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function xR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&mi.call(r,n)?r[n]:void 0,u=r&&mi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let h;for(h in c)if(mi.call(c,h)){const m=c[h];let E=Ny(e,Iy(a,h),h,m);E==null&&(E=Ny(e,Iy(u,h),h,m)),E!=null&&(d[h]=E)}if(o&&mi.call(o,n)){const m=o[n];for(h in m)mi.call(m,h)&&!mi.call(d,h)&&(d[h]=m[h])}return d}function Ny(e,t,n,r){return t?Array.isArray(r)?SR(e,t,n,r):Oy(e,t,n,r):void 0}function SR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Oy(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Oy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&wR(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 wR(e,t,n){const r=e.schema.protocols&&mi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let h=-1;for(;++h<r.length;){const m=r[h];if(a===m.length&&o.slice(0,m.length)===m)return!0}return!1}function xa(e,t){const n=f1(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function Iy(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 AR(e){return function(t){return gR(t,e)}}const Py=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return v.jsx("a",be(U(U({className:Z(e,`${X}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},CR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=nn();return!e&&!t?null:v.jsx("div",{className:Z(n,`${X}-disclaimer`),children:t?v.jsx(hE,{rehypePlugins:[Ay,AR],components:{ul:({children:o})=>v.jsx("ul",{className:Z(n,`${X}-ul`),children:o}),ol:({children:o})=>v.jsx("ol",{className:Z(n,`${X}-ol`),children:o}),li:({children:o})=>v.jsx("li",{className:Z(n,`${X}-li`),children:o}),a:({href:o,title:a,children:u})=>v.jsx(Py,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>v.jsx("img",{className:Z(n,`${X}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>v.jsx("p",{className:Z(n,`${X}-disclaimer-text`),children:o}),span:({children:o})=>v.jsx("span",{className:Z(n,`${X}-disclaimer-text-span`),children:o})},children:t}):v.jsx("p",{className:Z(n,`${X}-disclaimer-text`),children:e})})},Xf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Kd(),{setImageFile:u}=Wu(),{logger:c,globalClassName:d,searchConfig:h,features:m}=nn(),E=$.useRef(null),b=$.useRef(null),T=!!(m!=null&&m.enableImageUpload),_=(a==null?void 0:a.name)||"",S=!!o||!1,w=S?"connected":"disconnected",N=t||!S,B=()=>a?new Promise((F,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>F(ge.result),ge.onerror=Te=>te(Te)}):Promise.resolve(""),D=F=>nt(null,null,function*(){var Te;if(N)return;const te=10*1024*1024,ge=(Te=F.target.files)==null?void 0:Te[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),Y=()=>{u(null),b.current&&(b.current.value="")},W=F=>nt(null,null,function*(){var Te;F.preventDefault();const te=(((Te=E.current)==null?void 0:Te.value)||"").trim();let ge="";try{ge=yield B()}catch(H){c==null||c.error("Error converting file to base64:",H),alert("There was an error processing the file. Please try again.");return}te&&(Y(),E.current.value="",r(te,ge))});return v.jsxs("div",{className:Z(d,e,n,a&&"with-attachments",`${X}-search-bar-wrapper`),children:[a&&v.jsxs("div",{className:Z(d,n,`${X}-image-file-preview`),children:[v.jsx("img",{className:Z(d,n,`${X}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),v.jsx("span",{className:Z(d,n,`${X}-image-file-name`),title:_,children:_}),v.jsx(Qd,{className:Z(n,"clear-attachment"),label:"Remove image",onClick:Y})]}),v.jsxs("form",{className:Z(d,e,n,`${X}-search-bar`),name:`${X}-search-form`,onSubmit:W,children:[v.jsx("span",{role:"status",className:Z(`${X}-connection-status-icon`,w)}),v.jsx("input",{className:Z(d,e,n,`${X}-search-input`),type:"text",ref:E,placeholder:h==null?void 0:h.placeholder,name:`${X}-user-input`}),T&&v.jsxs("div",{role:"button",className:Z(d,e,n,N&&"disabled",`${X}-image-upload-button`),"aria-disabled":N,tabIndex:0,children:[v.jsx("label",{className:Z(d,e,n,N&&"disabled",`${X}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:v.jsx(YC,{})}),v.jsx("input",{className:Z(d,e,n,`${X}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${X}-file-input`,disabled:N,onInput:D})]}),v.jsx(GC,{className:e,globalClassName:d,searchConfig:h,componentType:n,isLoading:N})]}),v.jsx(CR,{})]})};function vR(e){return e==null?[]:Array.isArray(e)?e:[e]}var kR=e=>e!=null&&typeof e=="object",bl=e=>typeof e=="string",Gs=e=>typeof e=="function",NR=e=>e==null,OR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),IR=e=>Object.prototype.toString.call(e),Ry=Function.prototype.toString,PR=Ry.call(Object),RR=e=>{if(!kR(e)||IR(e)!="[object Object]"||MR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=OR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ry.call(n)==PR},LR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,DR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,MR=e=>LR(e)||DR(e),FR=e=>e(),BR=()=>{},Jf=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function Zf(e){if(!RR(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]=Zf(o))}return n}function eh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function UR(e,t){if(e==null)throw new Error(t())}var HR=Object.defineProperty,zR=(e,t,n)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,th=(e,t,n)=>zR(e,typeof t!="symbol"?t+"":t,n),Ly=()=>{},_l=e=>typeof e=="object"&&e!==null,jR=e=>e?"":void 0,$R=e=>e?"true":void 0,VR=1,qR=9,YR=11,Yt=e=>_l(e)&&e.nodeType===VR&&typeof e.nodeName=="string",xl=e=>_l(e)&&e.nodeType===qR,WR=e=>_l(e)&&e===e.window,Dy=e=>Yt(e)?e.localName||"":"#document";function GR(e){return["html","body","#document"].includes(Dy(e))}var KR=e=>_l(e)&&e.nodeType!==void 0,ns=e=>KR(e)&&e.nodeType===YR&&"host"in e,QR=e=>Yt(e)&&e.localName==="input",XR=e=>Yt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Sa(e){if(!e)return!1;const t=e.getRootNode();return Qs(t)===e}var JR=/(textarea|select)/;function ZR(e){if(e==null||!Yt(e))return!1;try{return QR(e)&&e.selectionStart!=null||JR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Sl(e,t){var r;if(!e||!t||!Yt(e)||!Yt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ns(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Cr(e){var t;return xl(e)?e:WR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function eL(e){return Cr(e).documentElement}function Ks(e){var t,n,r;return ns(e)?Ks(e.host):xl(e)?(t=e.defaultView)!=null?t:window:Yt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Qs(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 tL(e){if(Dy(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ns(e)&&e.host||eL(e);return ns(t)?t.host:t}function nh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),xl(t)||ns(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var rh=new WeakMap;function wl(e){return rh.has(e)||rh.set(e,Ks(e).getComputedStyle(e)),rh.get(e)}var ih=new Set(["menu","listbox","dialog","grid","tree","region"]),nL=e=>ih.has(e),My=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Fy(e,t){const n=new Set,r=nh(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=My(c);for(const h of d){if(!h||n.has(h))continue;n.add(h);const m=r.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";if(E&&nL(E)&&!b&&(m===t||m.contains(t)||o(m)))return!0}}}return!1};return o(e)}function By(e,t){const n=nh(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=My(c);for(const h of d){if(!h||r.has(h))continue;r.add(h);const m=n.getElementById(h);if(m){const E=m.getAttribute("role"),b=m.getAttribute("aria-modal")==="true";E&&ih.has(E)&&!b&&(t(m),o(m))}}}};o(e)}function rL(e){const t=new Set;return By(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function iL(e){const t=e.getAttribute("role");return!!(t&&ih.has(t))}function sL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function oL(e){var t;return sL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function aL(e){if(!e.id)return!1;const t=nh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&iL(e))}var sh=()=>typeof document!="undefined";function uL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var oh=e=>sh()&&e.test(uL()),lL=e=>sh()&&e.test(navigator.vendor),Uy=()=>sh()&&!!navigator.maxTouchPoints,cL=()=>oh(/^iPhone/i),dL=()=>oh(/^iPad/i)||ah()&&navigator.maxTouchPoints>1,Hy=()=>cL()||dL(),fL=()=>ah()||Hy(),ah=()=>oh(/^Mac/i),hL=()=>fL()&&lL(/apple/i);function pL(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 qr(e){var n;const t=pL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var mL=e=>e.button===0,gL=e=>e.button===2||ah()&&e.ctrlKey&&e.button===0,lr=(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)}},zy=e=>Yt(e)&&e.tagName==="IFRAME",EL=/^(audio|video|details)$/;function jy(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var yL=e=>!Number.isNaN(jy(e)),TL=e=>jy(e)<0;function bL(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 $y(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,h)=>u.set(d,h));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const h=bL(d,t);if(h){const m=Array.from(h.querySelectorAll(Al)).filter(n),E=u.get(d);if(E!==void 0){const b=E+1;r.splice(b,0,...m),m.forEach((T,_)=>{u.set(T,b+_)});for(let T=b+m.length;T<r.length;T++)u.set(r[T],T)}else{const b=r.length;r.push(...m),m.forEach((T,_)=>{u.set(T,b+_)})}o.push(...m)}}return r}var Al="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",Vy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Al));(n==!0||n=="if-empty"&&o.length===0)&&Yt(e)&&Yr(e)&&o.unshift(e);const u=[];for(const c of o)if(Yr(c)){if(zy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...Vy(d,{getShadowRoot:r}));continue}u.push(c)}return r?$y(u,r,Yr):u};function Yr(e){return!Yt(e)||e.closest("[inert]")?!1:e.matches(Al)&&XR(e)}function wa(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(Al));n&&rs(e)&&o.unshift(e);const a=[];for(const u of o)if(rs(u)){if(zy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...wa(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=$y(a,r,rs);return!u.length&&n?o:u}return!a.length&&n?o:a}function rs(e){return Yt(e)&&e.tabIndex>0?!0:Yr(e)&&!TL(e)}function _L(e,t={}){const n=wa(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function xL(e,t={}){const{current:n,getShadowRoot:r}=t,o=wa(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Qs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function Aa(e){return e.tabIndex<0&&(EL.test(e.localName)||ZR(e))&&!yL(e)?0:e.tabIndex}function qy(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=wa(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var SL=class M2{constructor(){th(this,"id",null),th(this,"fn_cleanup"),th(this,"cleanup",()=>{this.cancel()})}static create(){return new M2}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 wn(e){const t=SL.create();return t.request(e),t.cleanup}function wL(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 uh(e){const t=tL(e);return GR(t)?Cr(t).body:Yt(t)&&vL(t)?t:uh(t)}var AL=/auto|scroll|overlay|hidden|clip/,CL=new Set(["inline","contents"]);function vL(e){const t=Ks(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return AL.test(n+o+r)&&!CL.has(a)}function kL(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(h){if(h.key!=="Tab")return;let m=null;const[E,b]=_L(e,{includeContainer:!0,getShadowRoot:a}),T=xL(c,{current:n,getShadowRoot:a}),_=!E&&!b;h.shiftKey&&Sa(T)?(o==null||o(),m=b):h.shiftKey&&(Sa(E)||_)?m=n:!h.shiftKey&&Sa(n)?(o==null||o(),m=E):!h.shiftKey&&(Sa(b)||_)&&(m=T),m&&(h.preventDefault(),typeof r=="function"?r(m):m.focus())}return lr(u,"keydown",d,!0)}function NL(e,t){const c=t,{defer:n,triggerElement:r}=c,o=en(c,["defer","triggerElement"]),a=n?wn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof r=="function"?r():r;u.push(kL(d,U({triggerElement:h},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function Cl(e,t){if(!e)return Ly;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 OL(e,t,n){if(!e)return Ly;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 IL(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(h=>{r.aborted||(clearTimeout(d),u(h))}).catch(h=>{r.aborted||(clearTimeout(d),c(h))})}),()=>t.abort()]}function PL(e,t){const{timeout:n,rootNode:r}=t,o=Ks(r),a=Cr(r),u=new o.AbortController;return IL(new Promise(c=>{const d=e();if(d){c(d);return}const h=new o.MutationObserver(()=>{const m=e();m&&m.isConnected&&(h.disconnect(),c(m))});h.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var RL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),LL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Yy=e=>{const t={};let n;for(;n=LL.exec(e);)t[n[1]]=n[2];return t},DL=(e,t)=>{if(bl(e)){if(bl(t))return`${e};${t}`;e=Yy(e)}else bl(t)&&(t=Yy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cr(...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]=Jf(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=RL(t[o],n[o]);continue}if(o==="style"){t[o]=DL(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 IB(e){return e}var Xs=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Xs||{}),lh="__init__";function ML(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Cr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Qs(t()),a=u=>t().getElementById(u);return be(U({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Sa,getById:a})}var ch={exports:{}},An={},dh={exports:{}},fh={};var Wy;function FL(){return Wy||(Wy=1,function(e){function t(q,re){var A=q.length;q.push(re);e:for(;0<A;){var R=A-1>>>1,K=q[R];if(0<o(K,re))q[R]=re,q[A]=K,A=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var re=q[0],A=q.pop();if(A!==re){q[0]=A;e:for(var R=0,K=q.length,O=K>>>1;R<O;){var _e=2*(R+1)-1,Re=q[_e],Oe=_e+1,We=q[Oe];if(0>o(Re,A))Oe<K&&0>o(We,Re)?(q[R]=We,q[Oe]=A,R=Oe):(q[R]=Re,q[_e]=A,R=_e);else if(Oe<K&&0>o(We,A))q[R]=We,q[Oe]=A,R=Oe;else break e}}return re}function o(q,re){var A=q.sortIndex-re.sortIndex;return A!==0?A:q.id-re.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],h=[],m=1,E=null,b=3,T=!1,_=!1,S=!1,w=typeof setTimeout=="function"?setTimeout:null,N=typeof clearTimeout=="function"?clearTimeout:null,B=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function D(q){for(var re=n(h);re!==null;){if(re.callback===null)r(h);else if(re.startTime<=q)r(h),re.sortIndex=re.expirationTime,t(d,re);else break;re=n(h)}}function Y(q){if(S=!1,D(q),!_)if(n(d)!==null)_=!0,we(W);else{var re=n(h);re!==null&&ue(Y,re.startTime-q)}}function W(q,re){_=!1,S&&(S=!1,N(ge),ge=-1),T=!0;var A=b;try{for(D(re),E=n(d);E!==null&&(!(E.expirationTime>re)||q&&!ne());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var K=R(E.expirationTime<=re);re=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(d)&&r(d),D(re)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(h);_e!==null&&ue(Y,_e.startTime-re),O=!1}return O}finally{E=null,b=A,T=!1}}var F=!1,te=null,ge=-1,Te=5,H=-1;function ne(){return!(e.unstable_now()-H<Te)}function fe(){if(te!==null){var q=e.unstable_now();H=q;var re=!0;try{re=te(!0,q)}finally{re?de():(F=!1,te=null)}}else F=!1}var de;if(typeof B=="function")de=function(){B(fe)};else if(typeof MessageChannel!="undefined"){var ae=new MessageChannel,ye=ae.port2;ae.port1.onmessage=fe,de=function(){ye.postMessage(null)}}else de=function(){w(fe,0)};function we(q){te=q,F||(F=!0,de())}function ue(q,re){ge=w(function(){q(e.unstable_now())},re)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,we(W))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):Te=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var re=3;break;default:re=b}var A=b;b=re;try{return q()}finally{b=A}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,re){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var A=b;b=q;try{return re()}finally{b=A}},e.unstable_scheduleCallback=function(q,re,A){var R=e.unstable_now();switch(typeof A=="object"&&A!==null?(A=A.delay,A=typeof A=="number"&&0<A?R+A:R):A=R,q){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=A+K,q={id:m++,callback:re,priorityLevel:q,startTime:A,expirationTime:K,sortIndex:-1},A>R?(q.sortIndex=A,t(h,q),n(d)===null&&q===n(h)&&(S?(N(ge),ge=-1):S=!0,ue(Y,A-R))):(q.sortIndex=K,t(d,q),_||T||(_=!0,we(W))),q},e.unstable_shouldYield=ne,e.unstable_wrapCallback=function(q){var re=b;return function(){var A=b;b=re;try{return q.apply(this,arguments)}finally{b=A}}}}(fh)),fh}var Gy;function BL(){return Gy||(Gy=1,dh.exports=FL()),dh.exports}var Ky;function UL(){if(Ky)return An;Ky=1;var e=Ss(),t=BL();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,h=/^[: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]*$/,m={},E={};function b(i){return d.call(E,i)?!0:d.call(m,i)?!1:h.test(i)?E[i]=!0:(m[i]=!0,!1)}function T(i,s,l,f){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return f?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,f){if(s===null||typeof s=="undefined"||T(i,s,l,f))return!0;if(f)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function S(i,s,l,f,g,y,x){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=f,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=x}var w={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){w[i]=new S(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];w[s]=new S(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){w[i]=new S(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){w[i]=new S(i,2,!1,i,null,!1,!1)}),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(i){w[i]=new S(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){w[i]=new S(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){w[i]=new S(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){w[i]=new S(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){w[i]=new S(i,5,!1,i.toLowerCase(),null,!1,!1)});var N=/[\-:]([a-z])/g;function B(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(N,B);w[s]=new S(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(N,B);w[s]=new S(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(N,B);w[s]=new S(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){w[i]=new S(i,1,!1,i.toLowerCase(),null,!1,!1)}),w.xlinkHref=new S("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){w[i]=new S(i,1,!1,i.toLowerCase(),null,!0,!0)});function D(i,s,l,f){var g=w.hasOwnProperty(s)?w[s]:null;(g!==null?g.type!==0:f||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,f)&&(l=null),f||g===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,f=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,f?i.setAttributeNS(f,s,l):i.setAttribute(s,l))))}var Y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,W=Symbol.for("react.element"),F=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),Te=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ne=Symbol.for("react.context"),fe=Symbol.for("react.forward_ref"),de=Symbol.for("react.suspense"),ae=Symbol.for("react.suspense_list"),ye=Symbol.for("react.memo"),we=Symbol.for("react.lazy"),ue=Symbol.for("react.offscreen"),q=Symbol.iterator;function re(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var A=Object.assign,R;function K(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
22
- `+R+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(G){var f=G}Reflect.construct(i,[],s)}else{try{s.call()}catch(G){f=G}i.call(s.prototype)}else{try{throw Error()}catch(G){f=G}i()}}catch(G){if(G&&f&&typeof G.stack=="string"){for(var g=G.stack.split(`
23
- `),y=f.stack.split(`
24
- `),x=g.length-1,I=y.length-1;1<=x&&0<=I&&g[x]!==y[I];)I--;for(;1<=x&&0<=I;x--,I--)if(g[x]!==y[I]){if(x!==1||I!==1)do if(x--,I--,0>I||g[x]!==y[I]){var L=`
25
- `+g[x].replace(" at new "," at ");return i.displayName&&L.includes("<anonymous>")&&(L=L.replace("<anonymous>",i.displayName)),L}while(1<=x&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Re(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=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(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 te:return"Fragment";case F:return"Portal";case Te:return"Profiler";case ge:return"StrictMode";case de:return"Suspense";case ae:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ne:return(i.displayName||"Context")+".Consumer";case H: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 ye:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case we:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function We(i){var s=i.type;switch(i.tag){case 24:return"Cache";case 9:return(s.displayName||"Context")+".Consumer";case 10:return(s._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=s.render,i=i.displayName||i.name||"",s.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return s;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return Oe(s);case 8:return s===ge?"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 qe(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ze(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=Ze(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),f=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(x){f=""+x,y.call(this,x)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return f},setValue:function(x){f=""+x},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function as(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),f="";return i&&(f=Ze(i)?i.checked?"true":"false":i.value),i=f,i!==l?(s.setValue(i),!0):!1}function Xr(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 Ti(i,s){var l=s.checked;return A({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function us(i,s){var l=s.defaultValue==null?"":s.defaultValue,f=s.checked!=null?s.checked:s.defaultChecked;l=qe(s.value!=null?s.value:l),i._wrapperState={initialChecked:f,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function bi(i,s){s=s.checked,s!=null&&D(i,"checked",s,!1)}function Jr(i,s){bi(i,s);var l=qe(s.value),f=s.type;if(l!=null)f==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(f==="submit"||f==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?ze(i,s.type,l):s.hasOwnProperty("defaultValue")&&ze(i,s.type,qe(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Ae(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var f=s.type;if(!(f!=="submit"&&f!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function ze(i,s,l){(s!=="number"||Xr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Qe=Array.isArray;function at(i,s,l,f){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&f&&(i[l].defaultSelected=!0)}else{for(l=""+qe(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,f&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function mt(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return A({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function _t(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(Qe(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:qe(l)}}function mn(i,s){var l=qe(s.value),f=qe(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),f!=null&&(i.defaultValue=""+f)}function it(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(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 he(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,$e=function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,f,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,f,g)})}:i}(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function et(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Qt={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},Zr=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(i){Zr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Qt[s]=Qt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Qt.hasOwnProperty(i)&&Qt[i]?(""+s).trim():s+"px"}function _i(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var f=l.indexOf("--")===0,g=Qn(l,s[l],f);l==="float"&&(l="cssFloat"),f?i.setProperty(l,g):i[l]=g}}var ls=A({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 Xt(i,s){if(s){if(ls[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 Rr(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 Fn=null;function Jh(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var Zh=null,lo=null,co=null;function Gb(i){if(i=ru(i)){if(typeof Zh!="function")throw Error(n(280));var s=i.stateNode;s&&(s=mc(s),Zh(i.stateNode,i.type,s))}}function Kb(i){lo?co?co.push(i):co=[i]:lo=i}function Qb(){if(lo){var i=lo,s=co;if(co=lo=null,Gb(i),s)for(i=0;i<s.length;i++)Gb(s[i])}}function Xb(i,s){return i(s)}function Jb(){}var ep=!1;function Zb(i,s,l){if(ep)return i(s,l);ep=!0;try{return Xb(i,s,l)}finally{ep=!1,(lo!==null||co!==null)&&(Jb(),Qb())}}function Ma(i,s){var l=i.stateNode;if(l===null)return null;var f=mc(l);if(f===null)return null;l=f[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":(f=!f.disabled)||(i=i.type,f=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!f;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var tp=!1;if(c)try{var Fa={};Object.defineProperty(Fa,"passive",{get:function(){tp=!0}}),window.addEventListener("test",Fa,Fa),window.removeEventListener("test",Fa,Fa)}catch(i){tp=!1}function G8(i,s,l,f,g,y,x,I,L){var G=Array.prototype.slice.call(arguments,3);try{s.apply(l,G)}catch(oe){this.onError(oe)}}var Ba=!1,Wl=null,Gl=!1,np=null,K8={onError:function(i){Ba=!0,Wl=i}};function Q8(i,s,l,f,g,y,x,I,L){Ba=!1,Wl=null,G8.apply(K8,arguments)}function X8(i,s,l,f,g,y,x,I,L){if(Q8.apply(this,arguments),Ba){if(Ba){var G=Wl;Ba=!1,Wl=null}else throw Error(n(198));Gl||(Gl=!0,np=G)}}function cs(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function e_(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 t_(i){if(cs(i)!==i)throw Error(n(188))}function J8(i){var s=i.alternate;if(!s){if(s=cs(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,f=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(f=g.return,f!==null){l=f;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return t_(g),i;if(y===f)return t_(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==f.return)l=g,f=y;else{for(var x=!1,I=g.child;I;){if(I===l){x=!0,l=g,f=y;break}if(I===f){x=!0,f=g,l=y;break}I=I.sibling}if(!x){for(I=y.child;I;){if(I===l){x=!0,l=y,f=g;break}if(I===f){x=!0,f=y,l=g;break}I=I.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==f)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function n_(i){return i=J8(i),i!==null?r_(i):null}function r_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=r_(i);if(s!==null)return s;i=i.sibling}return null}var i_=t.unstable_scheduleCallback,s_=t.unstable_cancelCallback,Z8=t.unstable_shouldYield,eM=t.unstable_requestPaint,Lt=t.unstable_now,tM=t.unstable_getCurrentPriorityLevel,rp=t.unstable_ImmediatePriority,o_=t.unstable_UserBlockingPriority,Kl=t.unstable_NormalPriority,nM=t.unstable_LowPriority,a_=t.unstable_IdlePriority,Ql=null,Lr=null;function rM(i){if(Lr&&typeof Lr.onCommitFiberRoot=="function")try{Lr.onCommitFiberRoot(Ql,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:oM,iM=Math.log,sM=Math.LN2;function oM(i){return i>>>=0,i===0?32:31-(iM(i)/sM|0)|0}var Xl=64,Jl=4194304;function Ua(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 Zl(i,s){var l=i.pendingLanes;if(l===0)return 0;var f=0,g=i.suspendedLanes,y=i.pingedLanes,x=l&268435455;if(x!==0){var I=x&~g;I!==0?f=Ua(I):(y&=x,y!==0&&(f=Ua(y)))}else x=l&~g,x!==0?f=Ua(x):y!==0&&(f=Ua(y));if(f===0)return 0;if(s!==0&&s!==f&&(s&g)===0&&(g=f&-f,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((f&4)!==0&&(f|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=f;0<s;)l=31-hr(s),g=1<<l,f|=i[l],s&=~g;return f}function aM(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 uM(i,s){for(var l=i.suspendedLanes,f=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var x=31-hr(y),I=1<<x,L=g[x];L===-1?((I&l)===0||(I&f)!==0)&&(g[x]=aM(I,s)):L<=s&&(i.expiredLanes|=I),y&=~I}}function ip(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function u_(){var i=Xl;return Xl<<=1,(Xl&4194240)===0&&(Xl=64),i}function sp(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function Ha(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function lM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var f=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,f[g]=-1,i[g]=-1,l&=~y}}function op(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var f=31-hr(l),g=1<<f;g&s|i[f]&s&&(i[f]|=s),l&=~g}}var ut=0;function l_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var c_,ap,d_,f_,h_,up=!1,ec=[],xi=null,Si=null,wi=null,za=new Map,ja=new Map,Ai=[],cM="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 p_(i,s){switch(i){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":za.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":ja.delete(s.pointerId)}}function $a(i,s,l,f,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:f,nativeEvent:y,targetContainers:[g]},s!==null&&(s=ru(s),s!==null&&ap(s)),i):(i.eventSystemFlags|=f,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function dM(i,s,l,f,g){switch(s){case"focusin":return xi=$a(xi,i,s,l,f,g),!0;case"dragenter":return Si=$a(Si,i,s,l,f,g),!0;case"mouseover":return wi=$a(wi,i,s,l,f,g),!0;case"pointerover":var y=g.pointerId;return za.set(y,$a(za.get(y)||null,i,s,l,f,g)),!0;case"gotpointercapture":return y=g.pointerId,ja.set(y,$a(ja.get(y)||null,i,s,l,f,g)),!0}return!1}function m_(i){var s=ds(i.target);if(s!==null){var l=cs(s);if(l!==null){if(s=l.tag,s===13){if(s=e_(l),s!==null){i.blockedOn=s,h_(i.priority,function(){d_(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function tc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=cp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var f=new l.constructor(l.type,l);Fn=f,l.target.dispatchEvent(f),Fn=null}else return s=ru(l),s!==null&&ap(s),i.blockedOn=l,!1;s.shift()}return!0}function g_(i,s,l){tc(i)&&l.delete(s)}function fM(){up=!1,xi!==null&&tc(xi)&&(xi=null),Si!==null&&tc(Si)&&(Si=null),wi!==null&&tc(wi)&&(wi=null),za.forEach(g_),ja.forEach(g_)}function Va(i,s){i.blockedOn===s&&(i.blockedOn=null,up||(up=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,fM)))}function qa(i){function s(g){return Va(g,i)}if(0<ec.length){Va(ec[0],i);for(var l=1;l<ec.length;l++){var f=ec[l];f.blockedOn===i&&(f.blockedOn=null)}}for(xi!==null&&Va(xi,i),Si!==null&&Va(Si,i),wi!==null&&Va(wi,i),za.forEach(s),ja.forEach(s),l=0;l<Ai.length;l++)f=Ai[l],f.blockedOn===i&&(f.blockedOn=null);for(;0<Ai.length&&(l=Ai[0],l.blockedOn===null);)m_(l),l.blockedOn===null&&Ai.shift()}var fo=Y.ReactCurrentBatchConfig,nc=!0;function hM(i,s,l,f){var g=ut,y=fo.transition;fo.transition=null;try{ut=1,lp(i,s,l,f)}finally{ut=g,fo.transition=y}}function pM(i,s,l,f){var g=ut,y=fo.transition;fo.transition=null;try{ut=4,lp(i,s,l,f)}finally{ut=g,fo.transition=y}}function lp(i,s,l,f){if(nc){var g=cp(i,s,l,f);if(g===null)vp(i,s,f,rc,l),p_(i,f);else if(dM(g,i,s,l,f))f.stopPropagation();else if(p_(i,f),s&4&&-1<cM.indexOf(i)){for(;g!==null;){var y=ru(g);if(y!==null&&c_(y),y=cp(i,s,l,f),y===null&&vp(i,s,f,rc,l),y===g)break;g=y}g!==null&&f.stopPropagation()}else vp(i,s,f,null,l)}}var rc=null;function cp(i,s,l,f){if(rc=null,i=Jh(f),i=ds(i),i!==null)if(s=cs(i),s===null)i=null;else if(l=s.tag,l===13){if(i=e_(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return rc=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(tM()){case rp:return 1;case o_:return 4;case Kl:case nM:return 16;case a_:return 536870912;default:return 16}default:return 16}}var Ci=null,dp=null,ic=null;function y_(){if(ic)return ic;var i,s=dp,l=s.length,f,g="value"in Ci?Ci.value:Ci.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var x=l-i;for(f=1;f<=x&&s[l-f]===g[y-f];f++);return ic=g.slice(i,1<f?1-f:void 0)}function sc(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 oc(){return!0}function T_(){return!1}function Bn(i){function s(l,f,g,y,x){this._reactName=l,this._targetInst=g,this.type=f,this.nativeEvent=y,this.target=x,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?oc:T_,this.isPropagationStopped=T_,this}return A(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=oc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=oc)},persist:function(){},isPersistent:oc}),s}var ho={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},fp=Bn(ho),Ya=A({},ho,{view:0,detail:0}),mM=Bn(Ya),hp,pp,Wa,ac=A({},Ya,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:gp,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!==Wa&&(Wa&&i.type==="mousemove"?(hp=i.screenX-Wa.screenX,pp=i.screenY-Wa.screenY):pp=hp=0,Wa=i),hp)},movementY:function(i){return"movementY"in i?i.movementY:pp}}),b_=Bn(ac),gM=A({},ac,{dataTransfer:0}),EM=Bn(gM),yM=A({},Ya,{relatedTarget:0}),mp=Bn(yM),TM=A({},ho,{animationName:0,elapsedTime:0,pseudoElement:0}),bM=Bn(TM),_M=A({},ho,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),xM=Bn(_M),SM=A({},ho,{data:0}),__=Bn(SM),wM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},AM={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"},CM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=CM[i])?!!s[i]:!1}function gp(){return vM}var kM=A({},Ya,{key:function(i){if(i.key){var s=wM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=sc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?AM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:gp,charCode:function(i){return i.type==="keypress"?sc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?sc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),NM=Bn(kM),OM=A({},ac,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),x_=Bn(OM),IM=A({},Ya,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:gp}),PM=Bn(IM),RM=A({},ho,{propertyName:0,elapsedTime:0,pseudoElement:0}),LM=Bn(RM),DM=A({},ac,{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}),MM=Bn(DM),FM=[9,13,27,32],Ep=c&&"CompositionEvent"in window,Ga=null;c&&"documentMode"in document&&(Ga=document.documentMode);var BM=c&&"TextEvent"in window&&!Ga,S_=c&&(!Ep||Ga&&8<Ga&&11>=Ga),w_=" ",A_=!1;function C_(i,s){switch(i){case"keyup":return FM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function v_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var po=!1;function UM(i,s){switch(i){case"compositionend":return v_(s);case"keypress":return s.which!==32?null:(A_=!0,w_);case"textInput":return i=s.data,i===w_&&A_?null:i;default:return null}}function HM(i,s){if(po)return i==="compositionend"||!Ep&&C_(i,s)?(i=y_(),ic=dp=Ci=null,po=!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 zM={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 k_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!zM[i.type]:s==="textarea"}function N_(i,s,l,f){Kb(f),s=fc(s,"onChange"),0<s.length&&(l=new fp("onChange","change",null,l,f),i.push({event:l,listeners:s}))}var Ka=null,Qa=null;function jM(i){W_(i,0)}function uc(i){var s=To(i);if(as(s))return i}function $M(i,s){if(i==="change")return s}var O_=!1;if(c){var yp;if(c){var Tp="oninput"in document;if(!Tp){var I_=document.createElement("div");I_.setAttribute("oninput","return;"),Tp=typeof I_.oninput=="function"}yp=Tp}else yp=!1;O_=yp&&(!document.documentMode||9<document.documentMode)}function P_(){Ka&&(Ka.detachEvent("onpropertychange",R_),Qa=Ka=null)}function R_(i){if(i.propertyName==="value"&&uc(Qa)){var s=[];N_(s,Qa,i,Jh(i)),Zb(jM,s)}}function VM(i,s,l){i==="focusin"?(P_(),Ka=s,Qa=l,Ka.attachEvent("onpropertychange",R_)):i==="focusout"&&P_()}function qM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return uc(Qa)}function YM(i,s){if(i==="click")return uc(s)}function WM(i,s){if(i==="input"||i==="change")return uc(s)}function GM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:GM;function Xa(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),f=Object.keys(s);if(l.length!==f.length)return!1;for(f=0;f<l.length;f++){var g=l[f];if(!d.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function L_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function D_(i,s){var l=L_(i);i=0;for(var f;l;){if(l.nodeType===3){if(f=i+l.textContent.length,i<=s&&f>=s)return{node:l,offset:s-i};i=f}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=L_(l)}}function M_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?M_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function F_(){for(var i=window,s=Xr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(f){l=!1}if(l)i=s.contentWindow;else break;s=Xr(i.document)}return s}function bp(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 KM(i){var s=F_(),l=i.focusedElem,f=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&M_(l.ownerDocument.documentElement,l)){if(f!==null&&bp(l)){if(s=f.start,i=f.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(f.start,g);f=f.end===void 0?y:Math.min(f.end,g),!i.extend&&y>f&&(g=f,f=y,y=g),g=D_(l,y);var x=D_(l,f);g&&x&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>f?(i.addRange(s),i.extend(x.node,x.offset)):(s.setEnd(x.node,x.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var QM=c&&"documentMode"in document&&11>=document.documentMode,mo=null,_p=null,Ja=null,xp=!1;function B_(i,s,l){var f=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;xp||mo==null||mo!==Xr(f)||(f=mo,"selectionStart"in f&&bp(f)?f={start:f.selectionStart,end:f.selectionEnd}:(f=(f.ownerDocument&&f.ownerDocument.defaultView||window).getSelection(),f={anchorNode:f.anchorNode,anchorOffset:f.anchorOffset,focusNode:f.focusNode,focusOffset:f.focusOffset}),Ja&&Xa(Ja,f)||(Ja=f,f=fc(_p,"onSelect"),0<f.length&&(s=new fp("onSelect","select",null,s,l),i.push({event:s,listeners:f}),s.target=mo)))}function lc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var go={animationend:lc("Animation","AnimationEnd"),animationiteration:lc("Animation","AnimationIteration"),animationstart:lc("Animation","AnimationStart"),transitionend:lc("Transition","TransitionEnd")},Sp={},U_={};c&&(U_=document.createElement("div").style,"AnimationEvent"in window||(delete go.animationend.animation,delete go.animationiteration.animation,delete go.animationstart.animation),"TransitionEvent"in window||delete go.transitionend.transition);function cc(i){if(Sp[i])return Sp[i];if(!go[i])return i;var s=go[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in U_)return Sp[i]=s[l];return i}var H_=cc("animationend"),z_=cc("animationiteration"),j_=cc("animationstart"),$_=cc("transitionend"),V_=new Map,q_="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 vi(i,s){V_.set(i,s),a(s,[i])}for(var wp=0;wp<q_.length;wp++){var Ap=q_[wp],XM=Ap.toLowerCase(),JM=Ap[0].toUpperCase()+Ap.slice(1);vi(XM,"on"+JM)}vi(H_,"onAnimationEnd"),vi(z_,"onAnimationIteration"),vi(j_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi($_,"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 Za="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(" "),ZM=new Set("cancel close invalid load scroll toggle".split(" ").concat(Za));function Y_(i,s,l){var f=i.type||"unknown-event";i.currentTarget=l,X8(f,s,void 0,i),i.currentTarget=null}function W_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var f=i[l],g=f.event;f=f.listeners;e:{var y=void 0;if(s)for(var x=f.length-1;0<=x;x--){var I=f[x],L=I.instance,G=I.currentTarget;if(I=I.listener,L!==y&&g.isPropagationStopped())break e;Y_(g,I,G),y=L}else for(x=0;x<f.length;x++){if(I=f[x],L=I.instance,G=I.currentTarget,I=I.listener,L!==y&&g.isPropagationStopped())break e;Y_(g,I,G),y=L}}}if(Gl)throw i=np,Gl=!1,np=null,i}function gt(i,s){var l=s[Rp];l===void 0&&(l=s[Rp]=new Set);var f=i+"__bubble";l.has(f)||(G_(s,i,2,!1),l.add(f))}function Cp(i,s,l){var f=0;s&&(f|=4),G_(l,i,f,s)}var dc="_reactListening"+Math.random().toString(36).slice(2);function eu(i){if(!i[dc]){i[dc]=!0,r.forEach(function(l){l!=="selectionchange"&&(ZM.has(l)||Cp(l,!1,i),Cp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[dc]||(s[dc]=!0,Cp("selectionchange",!1,s))}}function G_(i,s,l,f){switch(E_(s)){case 1:var g=hM;break;case 4:g=pM;break;default:g=lp}l=g.bind(null,s,l,i),g=void 0,!tp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),f?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function vp(i,s,l,f,g){var y=f;if((s&1)===0&&(s&2)===0&&f!==null)e:for(;;){if(f===null)return;var x=f.tag;if(x===3||x===4){var I=f.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(x===4)for(x=f.return;x!==null;){var L=x.tag;if((L===3||L===4)&&(L=x.stateNode.containerInfo,L===g||L.nodeType===8&&L.parentNode===g))return;x=x.return}for(;I!==null;){if(x=ds(I),x===null)return;if(L=x.tag,L===5||L===6){f=y=x;continue e}I=I.parentNode}}f=f.return}Zb(function(){var G=y,oe=Jh(l),ce=[];e:{var ie=V_.get(i);if(ie!==void 0){var xe=fp,Ce=i;switch(i){case"keypress":if(sc(l)===0)break e;case"keydown":case"keyup":xe=NM;break;case"focusin":Ce="focus",xe=mp;break;case"focusout":Ce="blur",xe=mp;break;case"beforeblur":case"afterblur":xe=mp;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=b_;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=EM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=PM;break;case H_:case z_:case j_:xe=bM;break;case $_:xe=LM;break;case"scroll":xe=mM;break;case"wheel":xe=MM;break;case"copy":case"cut":case"paste":xe=xM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=x_}var ke=(s&4)!==0,Dt=!ke&&i==="scroll",z=ke?ie!==null?ie+"Capture":null:ie;ke=[];for(var M=G,V;M!==null;){V=M;var Ee=V.stateNode;if(V.tag===5&&Ee!==null&&(V=Ee,z!==null&&(Ee=Ma(M,z),Ee!=null&&ke.push(tu(M,Ee,V)))),Dt)break;M=M.return}0<ke.length&&(ie=new xe(ie,Ce,null,l,oe),ce.push({event:ie,listeners:ke}))}}if((s&7)===0){e:{if(ie=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",ie&&l!==Fn&&(Ce=l.relatedTarget||l.fromElement)&&(ds(Ce)||Ce[ei]))break e;if((xe||ie)&&(ie=oe.window===oe?oe:(ie=oe.ownerDocument)?ie.defaultView||ie.parentWindow:window,xe?(Ce=l.relatedTarget||l.toElement,xe=G,Ce=Ce?ds(Ce):null,Ce!==null&&(Dt=cs(Ce),Ce!==Dt||Ce.tag!==5&&Ce.tag!==6)&&(Ce=null)):(xe=null,Ce=G),xe!==Ce)){if(ke=b_,Ee="onMouseLeave",z="onMouseEnter",M="mouse",(i==="pointerout"||i==="pointerover")&&(ke=x_,Ee="onPointerLeave",z="onPointerEnter",M="pointer"),Dt=xe==null?ie:To(xe),V=Ce==null?ie:To(Ce),ie=new ke(Ee,M+"leave",xe,l,oe),ie.target=Dt,ie.relatedTarget=V,Ee=null,ds(oe)===G&&(ke=new ke(z,M+"enter",Ce,l,oe),ke.target=V,ke.relatedTarget=Dt,Ee=ke),Dt=Ee,xe&&Ce)t:{for(ke=xe,z=Ce,M=0,V=ke;V;V=Eo(V))M++;for(V=0,Ee=z;Ee;Ee=Eo(Ee))V++;for(;0<M-V;)ke=Eo(ke),M--;for(;0<V-M;)z=Eo(z),V--;for(;M--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=Eo(ke),z=Eo(z)}ke=null}else ke=null;xe!==null&&K_(ce,ie,xe,ke,!1),Ce!==null&&Dt!==null&&K_(ce,Dt,Ce,ke,!0)}}e:{if(ie=G?To(G):window,xe=ie.nodeName&&ie.nodeName.toLowerCase(),xe==="select"||xe==="input"&&ie.type==="file")var Ne=$M;else if(k_(ie))if(O_)Ne=WM;else{Ne=qM;var De=VM}else(xe=ie.nodeName)&&xe.toLowerCase()==="input"&&(ie.type==="checkbox"||ie.type==="radio")&&(Ne=YM);if(Ne&&(Ne=Ne(i,G))){N_(ce,Ne,l,oe);break e}De&&De(i,ie,G),i==="focusout"&&(De=ie._wrapperState)&&De.controlled&&ie.type==="number"&&ze(ie,"number",ie.value)}switch(De=G?To(G):window,i){case"focusin":(k_(De)||De.contentEditable==="true")&&(mo=De,_p=G,Ja=null);break;case"focusout":Ja=_p=mo=null;break;case"mousedown":xp=!0;break;case"contextmenu":case"mouseup":case"dragend":xp=!1,B_(ce,l,oe);break;case"selectionchange":if(QM)break;case"keydown":case"keyup":B_(ce,l,oe)}var Me;if(Ep)e:{switch(i){case"compositionstart":var He="onCompositionStart";break e;case"compositionend":He="onCompositionEnd";break e;case"compositionupdate":He="onCompositionUpdate";break e}He=void 0}else po?C_(i,l)&&(He="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(He="onCompositionStart");He&&(S_&&l.locale!=="ko"&&(po||He!=="onCompositionStart"?He==="onCompositionEnd"&&po&&(Me=y_()):(Ci=oe,dp="value"in Ci?Ci.value:Ci.textContent,po=!0)),De=fc(G,He),0<De.length&&(He=new __(He,i,null,l,oe),ce.push({event:He,listeners:De}),Me?He.data=Me:(Me=v_(l),Me!==null&&(He.data=Me)))),(Me=BM?UM(i,l):HM(i,l))&&(G=fc(G,"onBeforeInput"),0<G.length&&(oe=new __("onBeforeInput","beforeinput",null,l,oe),ce.push({event:oe,listeners:G}),oe.data=Me))}W_(ce,s)})}function tu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function fc(i,s){for(var l=s+"Capture",f=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ma(i,l),y!=null&&f.unshift(tu(i,y,g)),y=Ma(i,s),y!=null&&f.push(tu(i,y,g))),i=i.return}return f}function Eo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function K_(i,s,l,f,g){for(var y=s._reactName,x=[];l!==null&&l!==f;){var I=l,L=I.alternate,G=I.stateNode;if(L!==null&&L===f)break;I.tag===5&&G!==null&&(I=G,g?(L=Ma(l,y),L!=null&&x.unshift(tu(l,L,I))):g||(L=Ma(l,y),L!=null&&x.push(tu(l,L,I)))),l=l.return}x.length!==0&&i.push({event:s,listeners:x})}var eF=/\r\n?/g,tF=/\u0000|\uFFFD/g;function Q_(i){return(typeof i=="string"?i:""+i).replace(eF,`
26
- `).replace(tF,"")}function hc(i,s,l){if(s=Q_(s),Q_(i)!==s&&l)throw Error(n(425))}function pc(){}var kp=null,Np=null;function Op(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 Ip=typeof setTimeout=="function"?setTimeout:void 0,nF=typeof clearTimeout=="function"?clearTimeout:void 0,X_=typeof Promise=="function"?Promise:void 0,rF=typeof queueMicrotask=="function"?queueMicrotask:typeof X_!="undefined"?function(i){return X_.resolve(null).then(i).catch(iF)}:Ip;function iF(i){setTimeout(function(){throw i})}function Pp(i,s){var l=s,f=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(f===0){i.removeChild(g),qa(s);return}f--}else l!=="$"&&l!=="$?"&&l!=="$!"||f++;l=g}while(l);qa(s)}function ki(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 J_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var yo=Math.random().toString(36).slice(2),Dr="__reactFiber$"+yo,nu="__reactProps$"+yo,ei="__reactContainer$"+yo,Rp="__reactEvents$"+yo,sF="__reactListeners$"+yo,oF="__reactHandles$"+yo;function ds(i){var s=i[Dr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ei]||l[Dr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=J_(i);i!==null;){if(l=i[Dr])return l;i=J_(i)}return s}i=l,l=i.parentNode}return null}function ru(i){return i=i[Dr]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function To(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function mc(i){return i[nu]||null}var Lp=[],bo=-1;function Ni(i){return{current:i}}function Et(i){0>bo||(i.current=Lp[bo],Lp[bo]=null,bo--)}function ht(i,s){bo++,Lp[bo]=i.current,i.current=s}var Oi={},ln=Ni(Oi),Cn=Ni(!1),fs=Oi;function _o(i,s){var l=i.type.contextTypes;if(!l)return Oi;var f=i.stateNode;if(f&&f.__reactInternalMemoizedUnmaskedChildContext===s)return f.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function gc(){Et(Cn),Et(ln)}function Z_(i,s,l){if(ln.current!==Oi)throw Error(n(168));ht(ln,s),ht(Cn,l)}function ex(i,s,l){var f=i.stateNode;if(s=s.childContextTypes,typeof f.getChildContext!="function")return l;f=f.getChildContext();for(var g in f)if(!(g in s))throw Error(n(108,We(i)||"Unknown",g));return A({},l,f)}function Ec(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Oi,fs=ln.current,ht(ln,i),ht(Cn,Cn.current),!0}function tx(i,s,l){var f=i.stateNode;if(!f)throw Error(n(169));l?(i=ex(i,s,fs),f.__reactInternalMemoizedMergedChildContext=i,Et(Cn),Et(ln),ht(ln,i)):Et(Cn),ht(Cn,l)}var ti=null,yc=!1,Dp=!1;function nx(i){ti===null?ti=[i]:ti.push(i)}function aF(i){yc=!0,nx(i)}function Ii(){if(!Dp&&ti!==null){Dp=!0;var i=0,s=ut;try{var l=ti;for(ut=1;i<l.length;i++){var f=l[i];do f=f(!0);while(f!==null)}ti=null,yc=!1}catch(g){throw ti!==null&&(ti=ti.slice(i+1)),i_(rp,Ii),g}finally{ut=s,Dp=!1}}return null}var xo=[],So=0,Tc=null,bc=0,Xn=[],Jn=0,hs=null,ni=1,ri="";function ps(i,s){xo[So++]=bc,xo[So++]=Tc,Tc=i,bc=s}function rx(i,s,l){Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=hs,hs=i;var f=ni;i=ri;var g=32-hr(f)-1;f&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var x=g-g%5;y=(f&(1<<x)-1).toString(32),f>>=x,g-=x,ni=1<<32-hr(s)+g|l<<g|f,ri=y+i}else ni=1<<y|l<<g|f,ri=i}function Mp(i){i.return!==null&&(ps(i,1),rx(i,1,0))}function Fp(i){for(;i===Tc;)Tc=xo[--So],xo[So]=null,bc=xo[--So],xo[So]=null;for(;i===hs;)hs=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null,ni=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,xt=!1,mr=null;function ix(i,s){var l=nr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function sx(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Un=i,Hn=ki(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=hs!==null?{id:ni,overflow:ri}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Bp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function Up(i){if(xt){var s=Hn;if(s){var l=s;if(!sx(i,s)){if(Bp(i))throw Error(n(418));s=ki(l.nextSibling);var f=Un;s&&sx(i,s)?ix(f,l):(i.flags=i.flags&-4097|2,xt=!1,Un=i)}}else{if(Bp(i))throw Error(n(418));i.flags=i.flags&-4097|2,xt=!1,Un=i}}}function ox(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function _c(i){if(i!==Un)return!1;if(!xt)return ox(i),xt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Op(i.type,i.memoizedProps)),s&&(s=Hn)){if(Bp(i))throw ax(),Error(n(418));for(;s;)ix(i,s),s=ki(s.nextSibling)}if(ox(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Hn=ki(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?ki(i.stateNode.nextSibling):null;return!0}function ax(){for(var i=Hn;i;)i=ki(i.nextSibling)}function wo(){Hn=Un=null,xt=!1}function Hp(i){mr===null?mr=[i]:mr.push(i)}var uF=Y.ReactCurrentBatchConfig;function iu(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var f=l.stateNode}if(!f)throw Error(n(147,i));var g=f,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(x){var I=g.refs;x===null?delete I[y]:I[y]=x},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function xc(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 lx(i){function s(z,M){if(i){var V=z.deletions;V===null?(z.deletions=[M],z.flags|=16):V.push(M)}}function l(z,M){if(!i)return null;for(;M!==null;)s(z,M),M=M.sibling;return null}function f(z,M){for(z=new Map;M!==null;)M.key!==null?z.set(M.key,M):z.set(M.index,M),M=M.sibling;return z}function g(z,M){return z=Ui(z,M),z.index=0,z.sibling=null,z}function y(z,M,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<M?(z.flags|=2,M):V):(z.flags|=2,M)):(z.flags|=1048576,M)}function x(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,M,V,Ee){return M===null||M.tag!==6?(M=Im(V,z.mode,Ee),M.return=z,M):(M=g(M,V),M.return=z,M)}function L(z,M,V,Ee){var Ne=V.type;return Ne===te?oe(z,M,V.props.children,Ee,V.key):M!==null&&(M.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&ux(Ne)===M.type)?(Ee=g(M,V.props),Ee.ref=iu(z,M,V),Ee.return=z,Ee):(Ee=Yc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=iu(z,M,V),Ee.return=z,Ee)}function G(z,M,V,Ee){return M===null||M.tag!==4||M.stateNode.containerInfo!==V.containerInfo||M.stateNode.implementation!==V.implementation?(M=Pm(V,z.mode,Ee),M.return=z,M):(M=g(M,V.children||[]),M.return=z,M)}function oe(z,M,V,Ee,Ne){return M===null||M.tag!==7?(M=xs(V,z.mode,Ee,Ne),M.return=z,M):(M=g(M,V),M.return=z,M)}function ce(z,M,V){if(typeof M=="string"&&M!==""||typeof M=="number")return M=Im(""+M,z.mode,V),M.return=z,M;if(typeof M=="object"&&M!==null){switch(M.$$typeof){case W:return V=Yc(M.type,M.key,M.props,null,z.mode,V),V.ref=iu(z,null,M),V.return=z,V;case F:return M=Pm(M,z.mode,V),M.return=z,M;case we:var Ee=M._init;return ce(z,Ee(M._payload),V)}if(Qe(M)||re(M))return M=xs(M,z.mode,V,null),M.return=z,M;xc(z,M)}return null}function ie(z,M,V,Ee){var Ne=M!==null?M.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:I(z,M,""+V,Ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case W:return V.key===Ne?L(z,M,V,Ee):null;case F:return V.key===Ne?G(z,M,V,Ee):null;case we:return Ne=V._init,ie(z,M,Ne(V._payload),Ee)}if(Qe(V)||re(V))return Ne!==null?null:oe(z,M,V,Ee,null);xc(z,V)}return null}function xe(z,M,V,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get(V)||null,I(M,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case W:return z=z.get(Ee.key===null?V:Ee.key)||null,L(M,z,Ee,Ne);case F:return z=z.get(Ee.key===null?V:Ee.key)||null,G(M,z,Ee,Ne);case we:var De=Ee._init;return xe(z,M,V,De(Ee._payload),Ne)}if(Qe(Ee)||re(Ee))return z=z.get(V)||null,oe(M,z,Ee,Ne,null);xc(M,Ee)}return null}function Ce(z,M,V,Ee){for(var Ne=null,De=null,Me=M,He=M=0,Kt=null;Me!==null&&He<V.length;He++){Me.index>He?(Kt=Me,Me=null):Kt=Me.sibling;var rt=ie(z,Me,V[He],Ee);if(rt===null){Me===null&&(Me=Kt);break}i&&Me&&rt.alternate===null&&s(z,Me),M=y(rt,M,He),De===null?Ne=rt:De.sibling=rt,De=rt,Me=Kt}if(He===V.length)return l(z,Me),xt&&ps(z,He),Ne;if(Me===null){for(;He<V.length;He++)Me=ce(z,V[He],Ee),Me!==null&&(M=y(Me,M,He),De===null?Ne=Me:De.sibling=Me,De=Me);return xt&&ps(z,He),Ne}for(Me=f(z,Me);He<V.length;He++)Kt=xe(Me,z,He,V[He],Ee),Kt!==null&&(i&&Kt.alternate!==null&&Me.delete(Kt.key===null?He:Kt.key),M=y(Kt,M,He),De===null?Ne=Kt:De.sibling=Kt,De=Kt);return i&&Me.forEach(function(Hi){return s(z,Hi)}),xt&&ps(z,He),Ne}function ke(z,M,V,Ee){var Ne=re(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=M,He=M=0,Kt=null,rt=V.next();Me!==null&&!rt.done;He++,rt=V.next()){Me.index>He?(Kt=Me,Me=null):Kt=Me.sibling;var Hi=ie(z,Me,rt.value,Ee);if(Hi===null){Me===null&&(Me=Kt);break}i&&Me&&Hi.alternate===null&&s(z,Me),M=y(Hi,M,He),De===null?Ne=Hi:De.sibling=Hi,De=Hi,Me=Kt}if(rt.done)return l(z,Me),xt&&ps(z,He),Ne;if(Me===null){for(;!rt.done;He++,rt=V.next())rt=ce(z,rt.value,Ee),rt!==null&&(M=y(rt,M,He),De===null?Ne=rt:De.sibling=rt,De=rt);return xt&&ps(z,He),Ne}for(Me=f(z,Me);!rt.done;He++,rt=V.next())rt=xe(Me,z,He,rt.value,Ee),rt!==null&&(i&&rt.alternate!==null&&Me.delete(rt.key===null?He:rt.key),M=y(rt,M,He),De===null?Ne=rt:De.sibling=rt,De=rt);return i&&Me.forEach(function(zF){return s(z,zF)}),xt&&ps(z,He),Ne}function Dt(z,M,V,Ee){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case W:e:{for(var Ne=V.key,De=M;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),M=g(De,V.props.children),M.return=z,z=M;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===we&&ux(Ne)===De.type){l(z,De.sibling),M=g(De,V.props),M.ref=iu(z,De,V),M.return=z,z=M;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(M=xs(V.props.children,z.mode,Ee,V.key),M.return=z,z=M):(Ee=Yc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=iu(z,M,V),Ee.return=z,z=Ee)}return x(z);case F:e:{for(De=V.key;M!==null;){if(M.key===De)if(M.tag===4&&M.stateNode.containerInfo===V.containerInfo&&M.stateNode.implementation===V.implementation){l(z,M.sibling),M=g(M,V.children||[]),M.return=z,z=M;break e}else{l(z,M);break}else s(z,M);M=M.sibling}M=Pm(V,z.mode,Ee),M.return=z,z=M}return x(z);case we:return De=V._init,Dt(z,M,De(V._payload),Ee)}if(Qe(V))return Ce(z,M,V,Ee);if(re(V))return ke(z,M,V,Ee);xc(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,M!==null&&M.tag===6?(l(z,M.sibling),M=g(M,V),M.return=z,z=M):(l(z,M),M=Im(V,z.mode,Ee),M.return=z,z=M),x(z)):l(z,M)}return Dt}var Ao=lx(!0),cx=lx(!1),Sc=Ni(null),wc=null,Co=null,zp=null;function jp(){zp=Co=wc=null}function $p(i){var s=Sc.current;Et(Sc),i._currentValue=s}function Vp(i,s,l){for(;i!==null;){var f=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,f!==null&&(f.childLanes|=s)):f!==null&&(f.childLanes&s)!==s&&(f.childLanes|=s),i===l)break;i=i.return}}function vo(i,s){wc=i,zp=Co=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if(zp!==i)if(i={context:i,memoizedValue:s,next:null},Co===null){if(wc===null)throw Error(n(308));Co=i,wc.dependencies={lanes:0,firstContext:i}}else Co=Co.next=i;return s}var ms=null;function qp(i){ms===null?ms=[i]:ms.push(i)}function dx(i,s,l,f){var g=s.interleaved;return g===null?(l.next=l,qp(s)):(l.next=g.next,g.next=l),s.interleaved=l,ii(i,f)}function ii(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Pi=!1;function Yp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function fx(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 si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ri(i,s,l){var f=i.updateQueue;if(f===null)return null;if(f=f.shared,(tt&2)!==0){var g=f.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),f.pending=s,ii(i,l)}return g=f.interleaved,g===null?(s.next=s,qp(f)):(s.next=g.next,g.next=s),f.interleaved=s,ii(i,l)}function Ac(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,op(i,l)}}function hx(i,s){var l=i.updateQueue,f=i.alternate;if(f!==null&&(f=f.updateQueue,l===f)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var x={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=x:y=y.next=x,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:f.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:f.shared,effects:f.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function Cc(i,s,l,f){var g=i.updateQueue;Pi=!1;var y=g.firstBaseUpdate,x=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var L=I,G=L.next;L.next=null,x===null?y=G:x.next=G,x=L;var oe=i.alternate;oe!==null&&(oe=oe.updateQueue,I=oe.lastBaseUpdate,I!==x&&(I===null?oe.firstBaseUpdate=G:I.next=G,oe.lastBaseUpdate=L))}if(y!==null){var ce=g.baseState;x=0,oe=G=L=null,I=y;do{var ie=I.lane,xe=I.eventTime;if((f&ie)===ie){oe!==null&&(oe=oe.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ce=i,ke=I;switch(ie=s,xe=l,ke.tag){case 1:if(Ce=ke.payload,typeof Ce=="function"){ce=Ce.call(xe,ce,ie);break e}ce=Ce;break e;case 3:Ce.flags=Ce.flags&-65537|128;case 0:if(Ce=ke.payload,ie=typeof Ce=="function"?Ce.call(xe,ce,ie):Ce,ie==null)break e;ce=A({},ce,ie);break e;case 2:Pi=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,ie=g.effects,ie===null?g.effects=[I]:ie.push(I))}else xe={eventTime:xe,lane:ie,tag:I.tag,payload:I.payload,callback:I.callback,next:null},oe===null?(G=oe=xe,L=ce):oe=oe.next=xe,x|=ie;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;ie=I,I=ie.next,ie.next=null,g.lastBaseUpdate=ie,g.shared.pending=null}}while(!0);if(oe===null&&(L=ce),g.baseState=L,g.firstBaseUpdate=G,g.lastBaseUpdate=oe,s=g.shared.interleaved,s!==null){g=s;do x|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);ys|=x,i.lanes=x,i.memoizedState=ce}}function px(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var f=i[s],g=f.callback;if(g!==null){if(f.callback=null,f=l,typeof g!="function")throw Error(n(191,g));g.call(f)}}}var su={},Mr=Ni(su),ou=Ni(su),au=Ni(su);function gs(i){if(i===su)throw Error(n(174));return i}function Wp(i,s){switch(ht(au,s),ht(ou,i),ht(Mr,su),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:he(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=he(s,i)}Et(Mr),ht(Mr,s)}function ko(){Et(Mr),Et(ou),Et(au)}function mx(i){gs(au.current);var s=gs(Mr.current),l=he(s,i.type);s!==l&&(ht(ou,i),ht(Mr,l))}function Gp(i){ou.current===i&&(Et(Mr),Et(ou))}var At=Ni(0);function vc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Kp=[];function Qp(){for(var i=0;i<Kp.length;i++)Kp[i]._workInProgressVersionPrimary=null;Kp.length=0}var kc=Y.ReactCurrentDispatcher,Xp=Y.ReactCurrentBatchConfig,Es=0,Ct=null,Ht=null,Wt=null,Nc=!1,uu=!1,lu=0,lF=0;function cn(){throw Error(n(321))}function Jp(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function Zp(i,s,l,f,g,y){if(Es=y,Ct=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,kc.current=i===null||i.memoizedState===null?hF:pF,i=l(f,g),uu){y=0;do{if(uu=!1,lu=0,25<=y)throw Error(n(301));y+=1,Wt=Ht=null,s.updateQueue=null,kc.current=mF,i=l(f,g)}while(uu)}if(kc.current=Pc,s=Ht!==null&&Ht.next!==null,Es=0,Wt=Ht=Ct=null,Nc=!1,s)throw Error(n(300));return i}function em(){var i=lu!==0;return lu=0,i}function Fr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?Ct.memoizedState=Wt=i:Wt=Wt.next=i,Wt}function er(){if(Ht===null){var i=Ct.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var s=Wt===null?Ct.memoizedState:Wt.next;if(s!==null)Wt=s,Ht=i;else{if(i===null)throw Error(n(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Wt===null?Ct.memoizedState=Wt=i:Wt=Wt.next=i}return Wt}function cu(i,s){return typeof s=="function"?s(i):s}function tm(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=Ht,g=f.baseQueue,y=l.pending;if(y!==null){if(g!==null){var x=g.next;g.next=y.next,y.next=x}f.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,f=f.baseState;var I=x=null,L=null,G=y;do{var oe=G.lane;if((Es&oe)===oe)L!==null&&(L=L.next={lane:0,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null}),f=G.hasEagerState?G.eagerState:i(f,G.action);else{var ce={lane:oe,action:G.action,hasEagerState:G.hasEagerState,eagerState:G.eagerState,next:null};L===null?(I=L=ce,x=f):L=L.next=ce,Ct.lanes|=oe,ys|=oe}G=G.next}while(G!==null&&G!==y);L===null?x=f:L.next=I,pr(f,s.memoizedState)||(kn=!0),s.memoizedState=f,s.baseState=x,s.baseQueue=L,l.lastRenderedState=f}if(i=l.interleaved,i!==null){g=i;do y=g.lane,Ct.lanes|=y,ys|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function nm(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var f=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var x=g=g.next;do y=i(y,x.action),x=x.next;while(x!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,f]}function gx(){}function Ex(i,s){var l=Ct,f=er(),g=s(),y=!pr(f.memoizedState,g);if(y&&(f.memoizedState=g,kn=!0),f=f.queue,rm(bx.bind(null,l,f,i),[i]),f.getSnapshot!==s||y||Wt!==null&&Wt.memoizedState.tag&1){if(l.flags|=2048,du(9,Tx.bind(null,l,f,g,s),void 0,null),Gt===null)throw Error(n(349));(Es&30)!==0||yx(l,s,g)}return g}function yx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function Tx(i,s,l,f){s.value=l,s.getSnapshot=f,_x(s)&&xx(i)}function bx(i,s,l){return l(function(){_x(s)&&xx(i)})}function _x(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(f){return!0}}function xx(i){var s=ii(i,1);s!==null&&Tr(s,i,1,-1)}function Sx(i){var s=Fr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:cu,lastRenderedState:i},s.queue=i,i=i.dispatch=fF.bind(null,Ct,i),[s.memoizedState,i]}function du(i,s,l,f){return i={tag:i,create:s,destroy:l,deps:f,next:null},s=Ct.updateQueue,s===null?(s={lastEffect:null,stores:null},Ct.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(f=l.next,l.next=i,i.next=f,s.lastEffect=i)),i}function wx(){return er().memoizedState}function Oc(i,s,l,f){var g=Fr();Ct.flags|=i,g.memoizedState=du(1|s,l,void 0,f===void 0?null:f)}function Ic(i,s,l,f){var g=er();f=f===void 0?null:f;var y=void 0;if(Ht!==null){var x=Ht.memoizedState;if(y=x.destroy,f!==null&&Jp(f,x.deps)){g.memoizedState=du(s,l,y,f);return}}Ct.flags|=i,g.memoizedState=du(1|s,l,y,f)}function Ax(i,s){return Oc(8390656,8,i,s)}function rm(i,s){return Ic(2048,8,i,s)}function Cx(i,s){return Ic(4,2,i,s)}function vx(i,s){return Ic(4,4,i,s)}function kx(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 Nx(i,s,l){return l=l!=null?l.concat([i]):null,Ic(4,4,kx.bind(null,s,i),l)}function im(){}function Ox(i,s){var l=er();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Jp(s,f[1])?f[0]:(l.memoizedState=[i,s],i)}function Ix(i,s){var l=er();s=s===void 0?null:s;var f=l.memoizedState;return f!==null&&s!==null&&Jp(s,f[1])?f[0]:(i=i(),l.memoizedState=[i,s],i)}function Px(i,s,l){return(Es&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=u_(),Ct.lanes|=l,ys|=l,i.baseState=!0),s)}function cF(i,s){var l=ut;ut=l!==0&&4>l?l:4,i(!0);var f=Xp.transition;Xp.transition={};try{i(!1),s()}finally{ut=l,Xp.transition=f}}function Rx(){return er().memoizedState}function dF(i,s,l){var f=Fi(i);if(l={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null},Lx(i))Dx(s,l);else if(l=dx(i,s,l,f),l!==null){var g=En();Tr(l,i,f,g),Mx(l,s,f)}}function fF(i,s,l){var f=Fi(i),g={lane:f,action:l,hasEagerState:!1,eagerState:null,next:null};if(Lx(i))Dx(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var x=s.lastRenderedState,I=y(x,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,x)){var L=s.interleaved;L===null?(g.next=g,qp(s)):(g.next=L.next,L.next=g),s.interleaved=g;return}}catch(G){}finally{}l=dx(i,s,g,f),l!==null&&(g=En(),Tr(l,i,f,g),Mx(l,s,f))}}function Lx(i){var s=i.alternate;return i===Ct||s!==null&&s===Ct}function Dx(i,s){uu=Nc=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Mx(i,s,l){if((l&4194240)!==0){var f=s.lanes;f&=i.pendingLanes,l|=f,s.lanes=l,op(i,l)}}var Pc={readContext:Zn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},hF={readContext:Zn,useCallback:function(i,s){return Fr().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:Ax,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Oc(4194308,4,kx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Oc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Oc(4,2,i,s)},useMemo:function(i,s){var l=Fr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var f=Fr();return s=l!==void 0?l(s):s,f.memoizedState=f.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},f.queue=i,i=i.dispatch=dF.bind(null,Ct,i),[f.memoizedState,i]},useRef:function(i){var s=Fr();return i={current:i},s.memoizedState=i},useState:Sx,useDebugValue:im,useDeferredValue:function(i){return Fr().memoizedState=i},useTransition:function(){var i=Sx(!1),s=i[0];return i=cF.bind(null,i[1]),Fr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var f=Ct,g=Fr();if(xt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Gt===null)throw Error(n(349));(Es&30)!==0||yx(f,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,Ax(bx.bind(null,f,y,i),[i]),f.flags|=2048,du(9,Tx.bind(null,f,y,l,s),void 0,null),l},useId:function(){var i=Fr(),s=Gt.identifierPrefix;if(xt){var l=ri,f=ni;l=(f&~(1<<32-hr(f)-1)).toString(32)+l,s=":"+s+"R"+l,l=lu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=lF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},pF={readContext:Zn,useCallback:Ox,useContext:Zn,useEffect:rm,useImperativeHandle:Nx,useInsertionEffect:Cx,useLayoutEffect:vx,useMemo:Ix,useReducer:tm,useRef:wx,useState:function(){return tm(cu)},useDebugValue:im,useDeferredValue:function(i){var s=er();return Px(s,Ht.memoizedState,i)},useTransition:function(){var i=tm(cu)[0],s=er().memoizedState;return[i,s]},useMutableSource:gx,useSyncExternalStore:Ex,useId:Rx,unstable_isNewReconciler:!1},mF={readContext:Zn,useCallback:Ox,useContext:Zn,useEffect:rm,useImperativeHandle:Nx,useInsertionEffect:Cx,useLayoutEffect:vx,useMemo:Ix,useReducer:nm,useRef:wx,useState:function(){return nm(cu)},useDebugValue:im,useDeferredValue:function(i){var s=er();return Ht===null?s.memoizedState=i:Px(s,Ht.memoizedState,i)},useTransition:function(){var i=nm(cu)[0],s=er().memoizedState;return[i,s]},useMutableSource:gx,useSyncExternalStore:Ex,useId:Rx,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=A({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function sm(i,s,l,f){s=i.memoizedState,l=l(f,s),l=l==null?s:A({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Rc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var f=En(),g=Fi(i),y=si(f,g);y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(Tr(s,i,g,f),Ac(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var f=En(),g=Fi(i),y=si(f,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(Tr(s,i,g,f),Ac(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),f=Fi(i),g=si(l,f);g.tag=2,s!=null&&(g.callback=s),s=Ri(i,g,f),s!==null&&(Tr(s,i,f,l),Ac(s,i,f))}};function Fx(i,s,l,f,g,y,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(f,y,x):s.prototype&&s.prototype.isPureReactComponent?!Xa(l,f)||!Xa(g,y):!0}function Bx(i,s,l){var f=!1,g=Oi,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?fs:ln.current,f=s.contextTypes,y=(f=f!=null)?_o(i,g):Oi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Rc,i.stateNode=s,s._reactInternals=i,f&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function Ux(i,s,l,f){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,f),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,f),s.state!==i&&Rc.enqueueReplaceState(s,s.state,null)}function om(i,s,l,f){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Yp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?fs:ln.current,g.context=_o(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(sm(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Rc.enqueueReplaceState(g,g.state,null),Cc(i,l,g,f),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function No(i,s){try{var l="",f=s;do l+=Re(f),f=f.return;while(f);var g=l}catch(y){g=`
19
+ `}),n}function iE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function sE(e,t){const n=mO(e,t),r=n.one(e,void 0),o=sO(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return o&&a.children.push({type:"text",value:`
20
+ `},o),a}function bO(e,t){return e&&"run"in e?function(n,r){return rt(this,null,function*(){const o=sE(n,H({file:r},t));yield e.run(o,r)})}:function(n,r){return sE(n,H({file:r},e||t))}}function oE(e){if(e)throw e}var Cf,aE;function _O(){if(aE)return Cf;aE=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"),E=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!E)return!1;var b;for(b in f);return typeof b=="undefined"||e.call(f,b)},u=function(f,p){n&&p.name==="__proto__"?n(f,p.name,{enumerable:!0,configurable:!0,value:p.newValue,writable:!0}):f[p.name]=p.newValue},c=function(f,p){if(p==="__proto__")if(e.call(f,p)){if(r)return r(f,p).value}else return;return f[p]};return Cf=function d(){var f,p,E,b,T,_,x=arguments[0],C=1,v=arguments.length,U=!1;for(typeof x=="boolean"&&(U=x,x=arguments[1]||{},C=2),(x==null||typeof x!="object"&&typeof x!="function")&&(x={});C<v;++C)if(f=arguments[C],f!=null)for(p in f)E=c(x,p),b=c(f,p),x!==b&&(U&&b&&(a(b)||(T=o(b)))?(T?(T=!1,_=E&&o(E)?E:[]):_=E&&a(E)?E:{},u(x,{name:p,newValue:d(U,_,b)})):typeof b!="undefined"&&u(x,{name:p,newValue:b}));return x},Cf}var xO=_O();const Af=Ke(xO);function vf(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 SO(){const e=[],t={run:n,use:r};return t;function n(...o){let a=-1;const u=o.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...o);function c(d,...f){const p=e[++a];let E=-1;if(d){u(d);return}for(;++E<o.length;)(f[E]===null||f[E]===void 0)&&(f[E]=o[E]);o=f,p?wO(p,c)(...f):u(null,...f)}}function r(o){if(typeof o!="function")throw new TypeError("Expected `middelware` to be a function, not "+o);return e.push(o),t}}function wO(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(o);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return o(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,o):d instanceof Error?o(d):a(d))}function o(u,...c){n||(n=!0,t(u,...c))}function a(u){o(null,u)}}const wr={basename:CO,dirname:AO,extname:vO,join:kO,sep:"/"};function CO(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,c=t.length-1;for(;o--;)if(e.codePointAt(o)===47){if(a){n=o+1;break}}else u<0&&(a=!0,u=o+1),c>-1&&(e.codePointAt(o)===t.codePointAt(c--)?c<0&&(r=o):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function AO(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 vO(e){fa(e);let t=e.length,n=-1,r=0,o=-1,a=0,u;for(;t--;){const c=e.codePointAt(t);if(c===47){if(u){r=t+1;break}continue}n<0&&(u=!0,n=t+1),c===46?o<0?o=t:a!==1&&(a=1):o>-1&&(a=-1)}return o<0||n<0||a===0||a===1&&o===n-1&&o===r+1?"":e.slice(o,n)}function kO(...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?".":NO(n)}function NO(e){fa(e);const t=e.codePointAt(0)===47;let n=OO(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function OO(e,t){let n="",r=0,o=-1,a=0,u=-1,c,d;for(;++u<=e.length;){if(u<e.length)c=e.codePointAt(u);else{if(c===47)break;c=47}if(c===47){if(!(o===u-1||a===1))if(o!==u-1&&a===2){if(n.length<2||r!==2||n.codePointAt(n.length-1)!==46||n.codePointAt(n.length-2)!==46){if(n.length>2){if(d=n.lastIndexOf("/"),d!==n.length-1){d<0?(n="",r=0):(n=n.slice(0,d),r=n.length-1-n.lastIndexOf("/")),o=u,a=0;continue}}else if(n.length>0){n="",r=0,o=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(o+1,u):n=e.slice(o+1,u),r=u-o-1;o=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function fa(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const IO={cwd:PO};function PO(){return"/"}function kf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function RO(e){if(typeof e=="string")e=new URL(e);else if(!kf(e)){const t=new TypeError('The "path" argument must be of type string or an instance of URL. Received `'+e+"`");throw t.code="ERR_INVALID_ARG_TYPE",t}if(e.protocol!=="file:"){const t=new TypeError("The URL must be of scheme file");throw t.code="ERR_INVALID_URL_SCHEME",t}return LO(e)}function LO(e){if(e.hostname!==""){const r=new TypeError('File URL host must be "localhost" or empty on darwin');throw r.code="ERR_INVALID_FILE_URL_HOST",r}const t=e.pathname;let n=-1;for(;++n<t.length;)if(t.codePointAt(n)===37&&t.codePointAt(n+1)===50){const r=t.codePointAt(n+2);if(r===70||r===102){const o=new TypeError("File URL path must not include encoded / characters");throw o.code="ERR_INVALID_FILE_URL_PATH",o}}return decodeURIComponent(t)}const Nf=["history","path","basename","stem","extname","dirname"];class uE{constructor(t){let n;t?kf(t)?n={path:t}:typeof t=="string"||DO(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":IO.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Nf.length;){const a=Nf[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)Nf.includes(o)||(this[o]=n[o])}get basename(){return typeof this.path=="string"?wr.basename(this.path):void 0}set basename(t){If(t,"basename"),Of(t,"basename"),this.path=wr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?wr.dirname(this.path):void 0}set dirname(t){lE(this.basename,"dirname"),this.path=wr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?wr.extname(this.path):void 0}set extname(t){if(Of(t,"extname"),lE(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=wr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){kf(t)&&(t=RO(t)),If(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?wr.basename(this.path,this.extname):void 0}set stem(t){If(t,"stem"),Of(t,"stem"),this.path=wr.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 on(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 Of(e,t){if(e&&e.includes(wr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+wr.sep+"`")}function If(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function lE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function DO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const MO=(function(e){const r=this.constructor.prototype,o=r[e],a=function(){return o.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),FO={}.hasOwnProperty;class Pf extends MO{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=SO()}copy(){const t=new Pf;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Af(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Df("data",this.frozen),this.namespace[t]=n,this):FO.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Df("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 Rf("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),Rf("process",this.parser||this.Parser),Lf("process",this.compiler||this.Compiler),n?o(void 0,n):new Promise(o);function o(a,u){const c=dl(t),d=r.parse(c);r.run(d,c,function(p,E,b){if(p||!E||!b)return f(p);const T=E,_=r.stringify(T,b);HO(_)?b.value=_:b.result=_,f(p,b)});function f(p,E){p||!E?u(p):a?a(E):n(void 0,E)}}}processSync(t){let n=!1,r;return this.freeze(),Rf("processSync",this.parser||this.Parser),Lf("processSync",this.compiler||this.Compiler),this.process(t,o),dE("processSync","process",n),r;function o(a,u){n=!0,oE(a),r=u}}run(t,n,r){cE(t),this.freeze();const o=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?a(void 0,r):new Promise(a);function a(u,c){const d=dl(n);o.run(t,d,f);function f(p,E,b){const T=E||t;p?c(p):u?u(T):r(void 0,T,b)}}}runSync(t,n){let r=!1,o;return this.run(t,n,a),dE("runSync","run",r),o;function a(u,c){oE(u),o=c,r=!0}}stringify(t,n){this.freeze();const r=dl(n),o=this.compiler||this.Compiler;return Lf("stringify",o),cE(t),o(t,r)}use(t,...n){const r=this.attachers,o=this.namespace;if(Df("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...E]=f;d(p,E)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(o.settings=Af(!0,o.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const E=f[p];a(E)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let E=-1,b=-1;for(;++E<r.length;)if(r[E][0]===f){b=E;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[T,..._]=p;const x=r[b][1];vf(x)&&vf(T)&&(T=Af(!0,x,T)),r[b]=[f,T,..._]}}}}const BO=new Pf().freeze();function Rf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function Lf(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Df(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 cE(e){if(!vf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function dE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function dl(e){return UO(e)?e:new uE(e)}function UO(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function HO(e){return typeof e=="string"||zO(e)}function zO(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const jO="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",fE=[],hE={allowDangerousHtml:!0},$O=/^(https?|ircs?|mailto|xmpp)$/i,VO=[{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 pE(e){const t=qO(e),n=YO(e);return WO(t.runSync(t.parse(n),n),e)}function qO(e){const t=e.rehypePlugins||fE,n=e.remarkPlugins||fE,r=e.remarkRehypeOptions?H(H({},e.remarkRehypeOptions),hE):hE;return BO().use(AN).use(n).use(bO,r).use(t)}function YO(e){const t=e.children||"",n=new uE;return typeof t=="string"&&(n.value=t),n}function WO(e,t){const n=t.allowedElements,r=t.allowElement,o=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||GO;for(const p of VO)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+jO+p.id,void 0);return cl(e,f),yv(e,{Fragment:k.Fragment,components:o,ignoreInvalidStyle:!0,jsx:k.jsx,jsxs:k.jsxs,passKeys:!0,passNode:!0});function f(p,E,b){if(p.type==="raw"&&b&&typeof E=="number")return u?b.children.splice(E,1):b.children[E]={type:"text",value:p.value},E;if(p.type==="element"){let T;for(T in df)if(Object.hasOwn(df,T)&&Object.hasOwn(p.properties,T)){const _=p.properties[T],x=df[T];(x===null||x.includes(p.tagName))&&(p.properties[T]=d(String(_||""),T,p))}}if(p.type==="element"){let T=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!T&&r&&typeof E=="number"&&(T=!r(p,E,b)),T&&b&&typeof E=="number")return c&&p.children?b.children.splice(E,1,...p.children):b.children.splice(E,1),E}}}function GO(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||$O.test(e.slice(0,t))?e:""}const mE=/[#.]/g;function KO(e,t){const n=e||"",r={};let o=0,a,u;for(;o<n.length;){mE.lastIndex=o;const c=mE.exec(n),d=n.slice(o,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,o+=d.length),c&&(a=c[0],o++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function gE(e,t,n){const r=n?ZO(n):void 0;function o(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=KO(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,QO(u))c.unshift(u);else for(const[E,b]of Object.entries(u))XO(e,d.properties,E,b)}for(const f of c)Mf(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return o}function QO(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 XO(e,t,n,r){const o=sf(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=o1(r):o.commaSeparated?a=Wg(r):o.commaOrSpaceSeparated?a=o1(Wg(r).join(" ")):a=EE(o,o.property,r):Array.isArray(r)?a=[...r]:a=o.property==="style"?JO(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(EE(o,o.property,c));a=u}o.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[o.property]=a}}function Mf(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)Mf(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?Mf(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function EE(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||na(n)===na(t)))return!0}return n}function JO(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function ZO(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const e3=["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"],t3=gE(Ju,"div"),n3=gE(Fs,"g",e3);function r3(e){const t=String(e),n=[];return{toOffset:o,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=yE(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function o(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=yE(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function yE(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
21
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Xi={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/"},TE={}.hasOwnProperty,i3=Object.prototype;function s3(e,t){const n=t||{};return Ff({file:n.file||void 0,location:!1,schema:n.space==="svg"?Fs:Ju,verbose:n.verbose||!1},e)}function Ff(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},fl(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:bE(e,t.childNodes),data:{quirksMode:o}},e.file&&e.location){const a=String(e.file),u=r3(a),c=u.toPoint(0),d=u.toPoint(a.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},fl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},fl(e,r,n),n}default:return n=o3(e,t),n}}function bE(e,t){let n=-1;const r=[];for(;++n<t.length;){const o=Ff(e,t[n]);r.push(o)}return r}function o3(e,t){const n=e.schema;e.schema=t.namespaceURI===Xi.svg?Fs:Ju;let r=-1;const o={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;TE.call(i3,d)||(o[d]=c.value)}const u=(e.schema.space==="svg"?n3:t3)(t.tagName,o,bE(e,t.childNodes));if(fl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&js(d.startTag),p=d&&d.endTag&&js(d.endTag),E=Ff(e,c.content);f&&p&&e.file&&(E.position={start:f.end,end:p.start}),u.content=E}return e.schema=n,u}function fl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=a3(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function a3(e,t,n){const r=js(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)TE.call(n.attrs,u)&&(a[sf(e.schema,u).property]=js(n.attrs[u]));n.startTag;const c=js(n.startTag),d=n.endTag?js(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function js(e){const t=_E({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=_E({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function _E(e){return e.line&&e.column?e:void 0}class ha{constructor(t,n,r){this.property=t,this.normal=n,r&&(this.space=r)}}ha.prototype.property={},ha.prototype.normal={},ha.prototype.space=null;function xE(e,t){const n={},r={};let o=-1;for(;++o<e.length;)Object.assign(n,e[o].property),Object.assign(r,e[o].normal);return new ha(n,r,t)}function Bf(e){return e.toLowerCase()}class Yn{constructor(t,n){this.property=t,this.attribute=n}}Yn.prototype.space=null,Yn.prototype.boolean=!1,Yn.prototype.booleanish=!1,Yn.prototype.overloadedBoolean=!1,Yn.prototype.number=!1,Yn.prototype.commaSeparated=!1,Yn.prototype.spaceSeparated=!1,Yn.prototype.commaOrSpaceSeparated=!1,Yn.prototype.mustUseProperty=!1,Yn.prototype.defined=!1;let u3=0;const $e=Ji(),Bt=Ji(),SE=Ji(),me=Ji(),ht=Ji(),$s=Ji(),Ln=Ji();function Ji(){return rd(2,++u3)}const Uf=Object.freeze(Object.defineProperty({__proto__:null,boolean:$e,booleanish:Bt,commaOrSpaceSeparated:Ln,commaSeparated:$s,number:me,overloadedBoolean:SE,spaceSeparated:ht},Symbol.toStringTag,{value:"Module"})),Hf=Object.keys(Uf);class zf extends Yn{constructor(t,n,r,o){let a=-1;if(super(t,n),wE(this,"space",o),typeof r=="number")for(;++a<Hf.length;){const u=Hf[a];wE(this,Hf[a],(r&Uf[u])===Uf[u])}}}zf.prototype.defined=!0;function wE(e,t,n){n&&(e[t]=n)}const l3={}.hasOwnProperty;function Vs(e){const t={},n={};let r;for(r in e.properties)if(l3.call(e.properties,r)){const o=e.properties[r],a=new zf(r,e.transform(e.attributes||{},r),o,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Bf(r)]=r,n[Bf(a.attribute)]=r}return new ha(t,n,e.space)}const CE=Vs({space:"xlink",transform(e,t){return"xlink:"+t.slice(5).toLowerCase()},properties:{xLinkActuate:null,xLinkArcRole:null,xLinkHref:null,xLinkRole:null,xLinkShow:null,xLinkTitle:null,xLinkType:null}}),AE=Vs({space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()},properties:{xmlLang:null,xmlBase:null,xmlSpace:null}});function vE(e,t){return t in e?e[t]:t}function kE(e,t){return vE(e,t.toLowerCase())}const NE=Vs({space:"xmlns",attributes:{xmlnsxlink:"xmlns:xlink"},transform:kE,properties:{xmlns:null,xmlnsXLink:null}}),OE=Vs({transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()},properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:me,ariaColIndex:me,ariaColSpan:me,ariaControls:ht,ariaCurrent:null,ariaDescribedBy:ht,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:ht,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:ht,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:ht,ariaLevel:me,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:ht,ariaPlaceholder:null,ariaPosInSet:me,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:ht,ariaRowCount:me,ariaRowIndex:me,ariaRowSpan:me,ariaSelected:Bt,ariaSetSize:me,ariaSort:null,ariaValueMax:me,ariaValueMin:me,ariaValueNow:me,ariaValueText:null,role:null}}),c3=Vs({space:"html",attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},transform:kE,mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:$s,acceptCharset:ht,accessKey:ht,action:null,allow:null,allowFullScreen:$e,allowPaymentRequest:$e,allowUserMedia:$e,alt:null,as:null,async:$e,autoCapitalize:null,autoComplete:ht,autoFocus:$e,autoPlay:$e,blocking:ht,capture:null,charSet:null,checked:$e,cite:null,className:ht,cols:me,colSpan:null,content:null,contentEditable:Bt,controls:$e,controlsList:ht,coords:me|$s,crossOrigin:null,data:null,dateTime:null,decoding:null,default:$e,defer:$e,dir:null,dirName:null,disabled:$e,download:SE,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:$e,formTarget:null,headers:ht,height:me,hidden:$e,high:me,href:null,hrefLang:null,htmlFor:ht,httpEquiv:ht,id:null,imageSizes:null,imageSrcSet:null,inert:$e,inputMode:null,integrity:null,is:null,isMap:$e,itemId:null,itemProp:ht,itemRef:ht,itemScope:$e,itemType:ht,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:$e,low:me,manifest:null,max:null,maxLength:me,media:null,method:null,min:null,minLength:me,multiple:$e,muted:$e,name:null,nonce:null,noModule:$e,noValidate:$e,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:$e,optimum:me,pattern:null,ping:ht,placeholder:null,playsInline:$e,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:$e,referrerPolicy:null,rel:ht,required:$e,reversed:$e,rows:me,rowSpan:me,sandbox:ht,scope:null,scoped:$e,seamless:$e,selected:$e,shadowRootClonable:$e,shadowRootDelegatesFocus:$e,shadowRootMode:null,shape:null,size:me,sizes:null,slot:null,span:me,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:me,step:null,style:null,tabIndex:me,target:null,title:null,translate:null,type:null,typeMustMatch:$e,useMap:null,value:Bt,width:me,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:ht,axis:null,background:null,bgColor:null,border:me,borderColor:null,bottomMargin:me,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:$e,declare:$e,event:null,face:null,frame:null,frameBorder:null,hSpace:me,leftMargin:me,link:null,longDesc:null,lowSrc:null,marginHeight:me,marginWidth:me,noResize:$e,noHref:$e,noShade:$e,noWrap:$e,object:null,profile:null,prompt:null,rev:null,rightMargin:me,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:me,valueType:null,version:null,vAlign:null,vLink:null,vSpace:me,allowTransparency:null,autoCorrect:null,autoSave:null,disablePictureInPicture:$e,disableRemotePlayback:$e,prefix:null,property:null,results:me,security:null,unselectable:null}}),d3=Vs({space:"svg",attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},transform:vE,properties:{about:Ln,accentHeight:me,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:me,amplitude:me,arabicForm:null,ascent:me,attributeName:null,attributeType:null,azimuth:me,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:me,by:null,calcMode:null,capHeight:me,className:ht,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:me,diffuseConstant:me,direction:null,display:null,dur:null,divisor:me,dominantBaseline:null,download:$e,dx:null,dy:null,edgeMode:null,editable:null,elevation:me,enableBackground:null,end:null,event:null,exponent:me,externalResourcesRequired:null,fill:null,fillOpacity:me,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:$s,g2:$s,glyphName:$s,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:me,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:me,horizOriginX:me,horizOriginY:me,id:null,ideographic:me,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:me,k:me,k1:me,k2:me,k3:me,k4:me,kernelMatrix:Ln,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:me,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:me,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:me,overlineThickness:me,paintOrder:null,panose1:null,path:null,pathLength:me,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:ht,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:me,pointsAtY:me,pointsAtZ:me,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:Ln,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:Ln,rev:Ln,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:Ln,requiredFeatures:Ln,requiredFonts:Ln,requiredFormats:Ln,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:me,specularExponent:me,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:me,strikethroughThickness:me,string:null,stroke:null,strokeDashArray:Ln,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:me,strokeOpacity:me,strokeWidth:null,style:null,surfaceScale:me,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:Ln,tabIndex:me,tableValues:null,target:null,targetX:me,targetY:me,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:Ln,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:me,underlineThickness:me,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:me,values:null,vAlphabetic:me,vMathematical:me,vectorEffect:null,vHanging:me,vIdeographic:me,version:null,vertAdvY:me,vertOriginX:me,vertOriginY:me,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:me,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null}}),f3=/^data[-\w.:]+$/i,IE=/-[a-z]/g,h3=/[A-Z]/g;function p3(e,t){const n=Bf(t);let r=t,o=Yn;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&f3.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(IE,g3);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!IE.test(a)){let u=a.replace(h3,m3);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}o=zf}return new o(r,t)}function m3(e){return"-"+e.toLowerCase()}function g3(e){return e.charAt(1).toUpperCase()}const E3=xE([AE,CE,NE,OE,c3],"html"),PE=xE([AE,CE,NE,OE,d3],"svg"),RE={}.hasOwnProperty;function LE(e,t){const n=t||{};function r(o,...a){let u=r.invalid;const c=r.handlers;if(o&&RE.call(o,e)){const d=String(o[e]);u=RE.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,o,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const y3={},T3={}.hasOwnProperty,DE=LE("type",{handlers:{root:_3,element:A3,text:w3,comment:C3,doctype:S3}});function b3(e,t){const r=(t||y3).space;return DE(e,r==="svg"?PE:E3)}function _3(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=jf(e.children,n,t),qs(e,n),n}function x3(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=jf(e.children,n,t),qs(e,n),n}function S3(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return qs(e,t),t}function w3(e){const t={nodeName:"#text",value:e.value,parentNode:null};return qs(e,t),t}function C3(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return qs(e,t),t}function A3(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=PE);const o=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&T3.call(e.properties,a)){const d=v3(r,a,e.properties[a]);d&&o.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:o,namespaceURI:Xi[u],childNodes:[],parentNode:null};return c.childNodes=jf(e.children,c,r),qs(e,c),e.tagName==="template"&&e.content&&(c.content=x3(e.content,r)),c}function v3(e,t,n){const r=p3(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?Gg(n):a1(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=Xi[r.space]}return o}function jf(e,t,n){let r=-1;const o=[];if(e)for(;++r<e.length;){const a=DE(e[r],n);a.parentNode=t,o.push(a)}return o}function qs(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 k3=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],N3=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]),_t="�";var A;(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"})(A||(A={}));const Sn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ME(e){return e>=55296&&e<=57343}function O3(e){return e>=56320&&e<=57343}function I3(e,t){return(e-55296)*1024+9216+t}function FE(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function BE(e){return e>=64976&&e<=65007||N3.has(e)}var J;(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"})(J||(J={}));const P3=65536;class R3{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=P3,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,n){const{line:r,col:o,offset:a}=this,u=o+n,c=a+n;return{code:t,startLine:r,endLine:r,startCol:u,endCol:u,startOffset:c,endOffset:c}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){const n=this.html.charCodeAt(this.pos+1);if(O3(n))return this.pos++,this._addGap(),I3(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,A.EOF;return this._err(J.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,A.EOF;const r=this.html.charCodeAt(n);return r===A.CARRIAGE_RETURN?A.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,A.EOF;let t=this.html.charCodeAt(this.pos);return t===A.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,A.LINE_FEED):t===A.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ME(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===A.LINE_FEED||t===A.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){FE(t)?this._err(J.controlCharacterInInputStream):BE(t)&&this._err(J.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var We;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(We||(We={}));function UE(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 L3=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),D3=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 M3(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=D3.get(e))!==null&&t!==void 0?t:e}var Vt;(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"})(Vt||(Vt={}));const F3=32;var fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(fi||(fi={}));function $f(e){return e>=Vt.ZERO&&e<=Vt.NINE}function B3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_F||e>=Vt.LOWER_A&&e<=Vt.LOWER_F}function U3(e){return e>=Vt.UPPER_A&&e<=Vt.UPPER_Z||e>=Vt.LOWER_A&&e<=Vt.LOWER_Z||$f(e)}function H3(e){return e===Vt.EQUALS||U3(e)}var qt;(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"})(qt||(qt={}));var Vr;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Vr||(Vr={}));class z3{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=qt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Vr.Strict}startEntity(t){this.decodeMode=t,this.state=qt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case qt.EntityStart:return t.charCodeAt(n)===Vt.NUM?(this.state=qt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=qt.NamedEntity,this.stateNamedEntity(t,n));case qt.NumericStart:return this.stateNumericStart(t,n);case qt.NumericDecimal:return this.stateNumericDecimal(t,n);case qt.NumericHex:return this.stateNumericHex(t,n);case qt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|F3)===Vt.LOWER_X?(this.state=qt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=qt.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($f(o)||B3(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($f(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===Vt.SEMI)this.consumed+=1;else if(this.decodeMode===Vr.Strict)return 0;return this.emitCodePoint(M3(this.result),this.consumed),this.errors&&(t!==Vt.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&fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=j3(r,o,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===Vr.Attribute&&(a===0||H3(u))?0:this.emitNotTerminatedNamedEntity();if(o=r[this.treeIndex],a=(o&fi.VALUE_LENGTH)>>14,a!==0){if(u===Vt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Vr.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]&fi.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]&~fi.VALUE_LENGTH:o[t+1],r),n===3&&this.emitCodePoint(o[t+2],r),r}end(){var t;switch(this.state){case qt.NamedEntity:return this.result!==0&&(this.decodeMode!==Vr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case qt.NumericDecimal:return this.emitNumericEntity(0,2);case qt.NumericHex:return this.emitNumericEntity(0,3);case qt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case qt.EntityStart:return 0}}}function j3(e,t,n,r){const o=(t&fi.BRANCH_LENGTH)>>7,a=t&fi.JUMP_TABLE;if(o===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=o?-1:e[n+d]-1}let u=n,c=u+o-1;for(;u<=c;){const d=u+c>>>1,f=e[d];if(f<r)u=d+1;else if(f>r)c=d-1;else return e[d+o]}return-1}var ie;(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/"})(ie||(ie={}));var Zi;(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"})(Zi||(Zi={}));var Wn;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(Wn||(Wn={}));var j;(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"})(j||(j={}));var m;(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"})(m||(m={}));const $3=new Map([[j.A,m.A],[j.ADDRESS,m.ADDRESS],[j.ANNOTATION_XML,m.ANNOTATION_XML],[j.APPLET,m.APPLET],[j.AREA,m.AREA],[j.ARTICLE,m.ARTICLE],[j.ASIDE,m.ASIDE],[j.B,m.B],[j.BASE,m.BASE],[j.BASEFONT,m.BASEFONT],[j.BGSOUND,m.BGSOUND],[j.BIG,m.BIG],[j.BLOCKQUOTE,m.BLOCKQUOTE],[j.BODY,m.BODY],[j.BR,m.BR],[j.BUTTON,m.BUTTON],[j.CAPTION,m.CAPTION],[j.CENTER,m.CENTER],[j.CODE,m.CODE],[j.COL,m.COL],[j.COLGROUP,m.COLGROUP],[j.DD,m.DD],[j.DESC,m.DESC],[j.DETAILS,m.DETAILS],[j.DIALOG,m.DIALOG],[j.DIR,m.DIR],[j.DIV,m.DIV],[j.DL,m.DL],[j.DT,m.DT],[j.EM,m.EM],[j.EMBED,m.EMBED],[j.FIELDSET,m.FIELDSET],[j.FIGCAPTION,m.FIGCAPTION],[j.FIGURE,m.FIGURE],[j.FONT,m.FONT],[j.FOOTER,m.FOOTER],[j.FOREIGN_OBJECT,m.FOREIGN_OBJECT],[j.FORM,m.FORM],[j.FRAME,m.FRAME],[j.FRAMESET,m.FRAMESET],[j.H1,m.H1],[j.H2,m.H2],[j.H3,m.H3],[j.H4,m.H4],[j.H5,m.H5],[j.H6,m.H6],[j.HEAD,m.HEAD],[j.HEADER,m.HEADER],[j.HGROUP,m.HGROUP],[j.HR,m.HR],[j.HTML,m.HTML],[j.I,m.I],[j.IMG,m.IMG],[j.IMAGE,m.IMAGE],[j.INPUT,m.INPUT],[j.IFRAME,m.IFRAME],[j.KEYGEN,m.KEYGEN],[j.LABEL,m.LABEL],[j.LI,m.LI],[j.LINK,m.LINK],[j.LISTING,m.LISTING],[j.MAIN,m.MAIN],[j.MALIGNMARK,m.MALIGNMARK],[j.MARQUEE,m.MARQUEE],[j.MATH,m.MATH],[j.MENU,m.MENU],[j.META,m.META],[j.MGLYPH,m.MGLYPH],[j.MI,m.MI],[j.MO,m.MO],[j.MN,m.MN],[j.MS,m.MS],[j.MTEXT,m.MTEXT],[j.NAV,m.NAV],[j.NOBR,m.NOBR],[j.NOFRAMES,m.NOFRAMES],[j.NOEMBED,m.NOEMBED],[j.NOSCRIPT,m.NOSCRIPT],[j.OBJECT,m.OBJECT],[j.OL,m.OL],[j.OPTGROUP,m.OPTGROUP],[j.OPTION,m.OPTION],[j.P,m.P],[j.PARAM,m.PARAM],[j.PLAINTEXT,m.PLAINTEXT],[j.PRE,m.PRE],[j.RB,m.RB],[j.RP,m.RP],[j.RT,m.RT],[j.RTC,m.RTC],[j.RUBY,m.RUBY],[j.S,m.S],[j.SCRIPT,m.SCRIPT],[j.SEARCH,m.SEARCH],[j.SECTION,m.SECTION],[j.SELECT,m.SELECT],[j.SOURCE,m.SOURCE],[j.SMALL,m.SMALL],[j.SPAN,m.SPAN],[j.STRIKE,m.STRIKE],[j.STRONG,m.STRONG],[j.STYLE,m.STYLE],[j.SUB,m.SUB],[j.SUMMARY,m.SUMMARY],[j.SUP,m.SUP],[j.TABLE,m.TABLE],[j.TBODY,m.TBODY],[j.TEMPLATE,m.TEMPLATE],[j.TEXTAREA,m.TEXTAREA],[j.TFOOT,m.TFOOT],[j.TD,m.TD],[j.TH,m.TH],[j.THEAD,m.THEAD],[j.TITLE,m.TITLE],[j.TR,m.TR],[j.TRACK,m.TRACK],[j.TT,m.TT],[j.U,m.U],[j.UL,m.UL],[j.SVG,m.SVG],[j.VAR,m.VAR],[j.WBR,m.WBR],[j.XMP,m.XMP]]);function Ys(e){var t;return(t=$3.get(e))!==null&&t!==void 0?t:m.UNKNOWN}const le=m,V3={[ie.HTML]:new Set([le.ADDRESS,le.APPLET,le.AREA,le.ARTICLE,le.ASIDE,le.BASE,le.BASEFONT,le.BGSOUND,le.BLOCKQUOTE,le.BODY,le.BR,le.BUTTON,le.CAPTION,le.CENTER,le.COL,le.COLGROUP,le.DD,le.DETAILS,le.DIR,le.DIV,le.DL,le.DT,le.EMBED,le.FIELDSET,le.FIGCAPTION,le.FIGURE,le.FOOTER,le.FORM,le.FRAME,le.FRAMESET,le.H1,le.H2,le.H3,le.H4,le.H5,le.H6,le.HEAD,le.HEADER,le.HGROUP,le.HR,le.HTML,le.IFRAME,le.IMG,le.INPUT,le.LI,le.LINK,le.LISTING,le.MAIN,le.MARQUEE,le.MENU,le.META,le.NAV,le.NOEMBED,le.NOFRAMES,le.NOSCRIPT,le.OBJECT,le.OL,le.P,le.PARAM,le.PLAINTEXT,le.PRE,le.SCRIPT,le.SECTION,le.SELECT,le.SOURCE,le.STYLE,le.SUMMARY,le.TABLE,le.TBODY,le.TD,le.TEMPLATE,le.TEXTAREA,le.TFOOT,le.TH,le.THEAD,le.TITLE,le.TR,le.TRACK,le.UL,le.WBR,le.XMP]),[ie.MATHML]:new Set([le.MI,le.MO,le.MN,le.MS,le.MTEXT,le.ANNOTATION_XML]),[ie.SVG]:new Set([le.TITLE,le.FOREIGN_OBJECT,le.DESC]),[ie.XLINK]:new Set,[ie.XML]:new Set,[ie.XMLNS]:new Set},Vf=new Set([le.H1,le.H2,le.H3,le.H4,le.H5,le.H6]);j.STYLE,j.SCRIPT,j.XMP,j.IFRAME,j.NOEMBED,j.NOFRAMES,j.PLAINTEXT;var N;(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"})(N||(N={}));const Rt={DATA:N.DATA,RCDATA:N.RCDATA,RAWTEXT:N.RAWTEXT,SCRIPT_DATA:N.SCRIPT_DATA,PLAINTEXT:N.PLAINTEXT,CDATA_SECTION:N.CDATA_SECTION};function q3(e){return e>=A.DIGIT_0&&e<=A.DIGIT_9}function pa(e){return e>=A.LATIN_CAPITAL_A&&e<=A.LATIN_CAPITAL_Z}function Y3(e){return e>=A.LATIN_SMALL_A&&e<=A.LATIN_SMALL_Z}function hi(e){return Y3(e)||pa(e)}function HE(e){return hi(e)||q3(e)}function hl(e){return e+32}function zE(e){return e===A.SPACE||e===A.LINE_FEED||e===A.TABULATION||e===A.FORM_FEED}function jE(e){return zE(e)||e===A.SOLIDUS||e===A.GREATER_THAN_SIGN}function W3(e){return e===A.NULL?J.nullCharacterReference:e>1114111?J.characterReferenceOutsideUnicodeRange:ME(e)?J.surrogateCharacterReference:BE(e)?J.noncharacterCharacterReference:FE(e)||e===A.CARRIAGE_RETURN?J.controlCharacterReference:null}class G3{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=N.DATA,this.returnState=N.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new R3(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new z3(L3,(r,o)=>{this.preprocessor.pos=this.entityStartPos+o-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(J.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(J.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const o=W3(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:We.START_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:We.END_TAG,tagName:"",tagID:m.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:We.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:We.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(UE(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(J.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=Ys(t.tagName),t.type===We.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(J.endTagWithAttributes),t.selfClosing&&this._err(J.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case We.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case We.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case We.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:We.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=zE(t)?We.WHITESPACE_CHARACTER:t===A.NULL?We.NULL_CHARACTER:We.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(We.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=N.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Vr.Attribute:Vr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===N.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===N.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case N.DATA:{this._stateData(t);break}case N.RCDATA:{this._stateRcdata(t);break}case N.RAWTEXT:{this._stateRawtext(t);break}case N.SCRIPT_DATA:{this._stateScriptData(t);break}case N.PLAINTEXT:{this._statePlaintext(t);break}case N.TAG_OPEN:{this._stateTagOpen(t);break}case N.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case N.TAG_NAME:{this._stateTagName(t);break}case N.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case N.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case N.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case N.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case N.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case N.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case N.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case N.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case N.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case N.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case N.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case N.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case N.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case N.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case N.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case N.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case N.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case N.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case N.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case N.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case N.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case N.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case N.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case N.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case N.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case N.BOGUS_COMMENT:{this._stateBogusComment(t);break}case N.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case N.COMMENT_START:{this._stateCommentStart(t);break}case N.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case N.COMMENT:{this._stateComment(t);break}case N.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case N.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case N.COMMENT_END:{this._stateCommentEnd(t);break}case N.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case N.DOCTYPE:{this._stateDoctype(t);break}case N.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case N.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case N.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case N.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case N.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case N.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case N.CDATA_SECTION:{this._stateCdataSection(t);break}case N.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case N.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case N.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case N.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.TAG_OPEN;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitCodePoint(t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case A.AMPERSAND:{this._startCharacterReference();break}case A.LESS_THAN_SIGN:{this.state=N.RCDATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.RAWTEXT_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(hi(t))this._createStartTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.EXCLAMATION_MARK:{this.state=N.MARKUP_DECLARATION_OPEN;break}case A.SOLIDUS:{this.state=N.END_TAG_OPEN;break}case A.QUESTION_MARK:{this._err(J.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t);break}case A.EOF:{this._err(J.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=N.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(hi(t))this._createEndTagToken(),this.state=N.TAG_NAME,this._stateTagName(t);else switch(t){case A.GREATER_THAN_SIGN:{this._err(J.missingEndTagName),this.state=N.DATA;break}case A.EOF:{this._err(J.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(J.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.tagName+=_t;break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(pa(t)?hl(t):t)}}_stateRcdataLessThanSign(t){t===A.SOLIDUS?this.state=N.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){hi(t)?(this.state=N.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=N.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=N.BEFORE_ATTRIBUTE_NAME,!1;case A.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=N.SELF_CLOSING_START_TAG,!1;case A.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=N.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===A.SOLIDUS?this.state=N.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){hi(t)?(this.state=N.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case A.SOLIDUS:{this.state=N.SCRIPT_DATA_END_TAG_OPEN;break}case A.EXCLAMATION_MARK:{this.state=N.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=N.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){hi(t)?(this.state=N.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===A.HYPHEN_MINUS?(this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=N.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===A.SOLIDUS?this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:hi(t)?(this._emitChars("<"),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){hi(t)?(this.state=N.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&jE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(J.unexpectedNullCharacter),this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case A.HYPHEN_MINUS:{this._emitChars("-");break}case A.LESS_THAN_SIGN:{this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case A.GREATER_THAN_SIGN:{this.state=N.SCRIPT_DATA,this._emitChars(">");break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(_t);break}case A.EOF:{this._err(J.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===A.SOLIDUS?(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Sn.SCRIPT,!1)&&jE(this.preprocessor.peek(Sn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Sn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=N.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=N.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._err(J.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=N.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:case A.SOLIDUS:case A.GREATER_THAN_SIGN:case A.EOF:{this._leaveAttrName(),this.state=N.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case A.EQUALS_SIGN:{this._leaveAttrName(),this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:{this._err(J.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.name+=_t;break}default:this.currentAttr.name+=String.fromCodePoint(pa(t)?hl(t):t)}}_stateAfterAttributeName(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.SOLIDUS:{this.state=N.SELF_CLOSING_START_TAG;break}case A.EQUALS_SIGN:{this.state=N.BEFORE_ATTRIBUTE_VALUE;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=N.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{this.state=N.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this.state=N.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(J.missingAttributeValue),this.state=N.DATA,this.emitCurrentTagToken();break}default:this.state=N.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case A.APOSTROPHE:{this.state=N.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.AMPERSAND:{this._startCharacterReference();break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.NULL:{this._err(J.unexpectedNullCharacter),this.currentAttr.value+=_t;break}case A.QUOTATION_MARK:case A.APOSTROPHE:case A.LESS_THAN_SIGN:case A.EQUALS_SIGN:case A.GRAVE_ACCENT:{this._err(J.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this._leaveAttrValue(),this.state=N.BEFORE_ATTRIBUTE_NAME;break}case A.SOLIDUS:{this._leaveAttrValue(),this.state=N.SELF_CLOSING_START_TAG;break}case A.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBetweenAttributes),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case A.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=N.DATA,this.emitCurrentTagToken();break}case A.EOF:{this._err(J.eofInTag),this._emitEOFToken();break}default:this._err(J.unexpectedSolidusInTag),this.state=N.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.data+=_t;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Sn.DASH_DASH,!0)?(this._createCommentToken(Sn.DASH_DASH.length+1),this.state=N.COMMENT_START):this._consumeSequenceIfMatch(Sn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Sn.DOCTYPE.length+1),this.state=N.DOCTYPE):this._consumeSequenceIfMatch(Sn.CDATA_START,!0)?this.inForeignNode?this.state=N.CDATA_SECTION:(this._err(J.cdataInHtmlContent),this._createCommentToken(Sn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=N.BOGUS_COMMENT):this._ensureHibernation()||(this._err(J.incorrectlyOpenedComment),this._createCommentToken(2),this.state=N.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_START_DASH;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptClosingOfEmptyComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END_DASH;break}case A.LESS_THAN_SIGN:{n.data+="<",this.state=N.COMMENT_LESS_THAN_SIGN;break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.data+=_t;break}case A.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case A.EXCLAMATION_MARK:{n.data+="!",this.state=N.COMMENT_LESS_THAN_SIGN_BANG;break}case A.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=N.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=N.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===A.HYPHEN_MINUS?this.state=N.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=N.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==A.GREATER_THAN_SIGN&&t!==A.EOF&&this._err(J.nestedComment),this.state=N.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{this.state=N.COMMENT_END;break}case A.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentComment(n);break}case A.EXCLAMATION_MARK:{this.state=N.COMMENT_END_BANG;break}case A.HYPHEN_MINUS:{n.data+="-";break}case A.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=N.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case A.HYPHEN_MINUS:{n.data+="--!",this.state=N.COMMENT_END_DASH;break}case A.GREATER_THAN_SIGN:{this._err(J.incorrectlyClosedComment),this.state=N.DATA,this.emitCurrentComment(n);break}case A.EOF:{this._err(J.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=N.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case A.EOF:{this._err(J.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingWhitespaceBeforeDoctypeName),this.state=N.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(pa(t))this._createDoctypeToken(String.fromCharCode(hl(t))),this.state=N.DOCTYPE_NAME;else switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.NULL:{this._err(J.unexpectedNullCharacter),this._createDoctypeToken(_t),this.state=N.DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this._err(J.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.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=N.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.AFTER_DOCTYPE_NAME;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.name+=_t;break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(pa(t)?hl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Sn.PUBLIC,!1)?this.state=N.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Sn.SYSTEM,!1)?this.state=N.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(J.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.publicId="",this.state=N.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(J.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.publicId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case A.GREATER_THAN_SIGN:{this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.QUOTATION_MARK:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(J.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:{this.state=N.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.QUOTATION_MARK:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{this._err(J.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.QUOTATION_MARK:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case A.APOSTROPHE:{n.systemId="",this.state=N.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case A.GREATER_THAN_SIGN:{this._err(J.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.DATA,this.emitCurrentDoctype(n);break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case A.QUOTATION_MARK:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.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 A.APOSTROPHE:{this.state=N.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case A.NULL:{this._err(J.unexpectedNullCharacter),n.systemId+=_t;break}case A.GREATER_THAN_SIGN:{this._err(J.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.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 A.SPACE:case A.LINE_FEED:case A.TABULATION:case A.FORM_FEED:break;case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.EOF:{this._err(J.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(J.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=N.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case A.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=N.DATA;break}case A.NULL:{this._err(J.unexpectedNullCharacter);break}case A.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case A.RIGHT_SQUARE_BRACKET:{this.state=N.CDATA_SECTION_BRACKET;break}case A.EOF:{this._err(J.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===A.RIGHT_SQUARE_BRACKET?this.state=N.CDATA_SECTION_END:(this._emitChars("]"),this.state=N.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case A.GREATER_THAN_SIGN:{this.state=N.DATA;break}case A.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=N.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(A.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&HE(this.preprocessor.peek(1))?N.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){HE(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===A.SEMICOLON&&this._err(J.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const $E=new Set([m.DD,m.DT,m.LI,m.OPTGROUP,m.OPTION,m.P,m.RB,m.RP,m.RT,m.RTC]),VE=new Set([...$E,m.CAPTION,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]),pl=new Set([m.APPLET,m.CAPTION,m.HTML,m.MARQUEE,m.OBJECT,m.TABLE,m.TD,m.TEMPLATE,m.TH]),K3=new Set([...pl,m.OL,m.UL]),Q3=new Set([...pl,m.BUTTON]),qE=new Set([m.ANNOTATION_XML,m.MI,m.MN,m.MO,m.MS,m.MTEXT]),YE=new Set([m.DESC,m.FOREIGN_OBJECT,m.TITLE]),X3=new Set([m.TR,m.TEMPLATE,m.HTML]),J3=new Set([m.TBODY,m.TFOOT,m.THEAD,m.TEMPLATE,m.HTML]),Z3=new Set([m.TABLE,m.TEMPLATE,m.HTML]),eI=new Set([m.TD,m.TH]);class tI{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=m.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===m.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ie.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])!==ie.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(Vf,ie.HTML)}popUntilTableCellPopped(){this.popUntilPopped(eI,ie.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(Z3,ie.HTML)}clearBackToTableBodyContext(){this.clearBackTo(J3,ie.HTML)}clearBackToTableRowContext(){this.clearBackTo(X3,ie.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]===m.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]===m.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 ie.HTML:{if(o===t)return!0;if(n.has(o))return!1;break}case ie.SVG:{if(YE.has(o))return!1;break}case ie.MATHML:{if(qE.has(o))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,pl)}hasInListItemScope(t){return this.hasInDynamicScope(t,K3)}hasInButtonScope(t){return this.hasInDynamicScope(t,Q3)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ie.HTML:{if(Vf.has(n))return!0;if(pl.has(n))return!1;break}case ie.SVG:{if(YE.has(n))return!1;break}case ie.MATHML:{if(qE.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ie.HTML)switch(this.tagIDs[t]){case m.TBODY:case m.THEAD:case m.TFOOT:return!0;case m.TABLE:case m.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===ie.HTML)switch(this.tagIDs[n]){case t:return!0;case m.OPTION:case m.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&$E.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&VE.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&VE.has(this.currentTagId);)this.pop()}}const qf=3;var Cr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Cr||(Cr={}));const WE={type:Cr.Marker};class nI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],o=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Cr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===o&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<qf)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<qf)return;const o=new Map(n.map(u=>[u.name,u.value]));let a=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>o.get(d.name)===d.value)&&(a+=1,a>=qf&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(WE)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Cr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Cr.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(WE);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Cr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Cr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Cr.Element&&n.element===t)}}const pi={createDocument(){return{nodeName:"#document",mode:Wn.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,n){return{nodeName:e,tagName:e,attrs:n,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,n){const r=e.childNodes.indexOf(n);e.childNodes.splice(r,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,n,r){const o=e.childNodes.find(a=>a.nodeName==="#documentType");if(o)o.name=t,o.publicId=n,o.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};pi.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){const t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){const n=e.childNodes[e.childNodes.length-1];if(pi.isTextNode(n)){n.value+=t;return}}pi.appendChild(e,pi.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&pi.isTextNode(r)?r.value+=t:pi.insertBefore(e,pi.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=H(H({},e.sourceCodeLocation),t)}},GE="html",rI="about:legacy-compat",iI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",KE=["+//silmaril//dtd html pro v0r11 19970101//","-//as//dtd html 3.0 aswedit + extensions//","-//advasoft ltd//dtd html 3.0 aswedit + extensions//","-//ietf//dtd html 2.0 level 1//","-//ietf//dtd html 2.0 level 2//","-//ietf//dtd html 2.0 strict level 1//","-//ietf//dtd html 2.0 strict level 2//","-//ietf//dtd html 2.0 strict//","-//ietf//dtd html 2.0//","-//ietf//dtd html 2.1e//","-//ietf//dtd html 3.0//","-//ietf//dtd html 3.2 final//","-//ietf//dtd html 3.2//","-//ietf//dtd html 3//","-//ietf//dtd html level 0//","-//ietf//dtd html level 1//","-//ietf//dtd html level 2//","-//ietf//dtd html level 3//","-//ietf//dtd html strict level 0//","-//ietf//dtd html strict level 1//","-//ietf//dtd html strict level 2//","-//ietf//dtd html strict level 3//","-//ietf//dtd html strict//","-//ietf//dtd html//","-//metrius//dtd metrius presentational//","-//microsoft//dtd internet explorer 2.0 html strict//","-//microsoft//dtd internet explorer 2.0 html//","-//microsoft//dtd internet explorer 2.0 tables//","-//microsoft//dtd internet explorer 3.0 html strict//","-//microsoft//dtd internet explorer 3.0 html//","-//microsoft//dtd internet explorer 3.0 tables//","-//netscape comm. corp.//dtd html//","-//netscape comm. corp.//dtd strict html//","-//o'reilly and associates//dtd html 2.0//","-//o'reilly and associates//dtd html extended 1.0//","-//o'reilly and associates//dtd html extended relaxed 1.0//","-//sq//dtd html 2.0 hotmetal + extensions//","-//softquad software//dtd hotmetal pro 6.0::19990601::extensions to html 4.0//","-//softquad//dtd hotmetal pro 4.0::19971010::extensions to html 4.0//","-//spyglass//dtd html 2.0 extended//","-//sun microsystems corp.//dtd hotjava html//","-//sun microsystems corp.//dtd hotjava strict html//","-//w3c//dtd html 3 1995-03-24//","-//w3c//dtd html 3.2 draft//","-//w3c//dtd html 3.2 final//","-//w3c//dtd html 3.2//","-//w3c//dtd html 3.2s draft//","-//w3c//dtd html 4.0 frameset//","-//w3c//dtd html 4.0 transitional//","-//w3c//dtd html experimental 19960712//","-//w3c//dtd html experimental 970421//","-//w3c//dtd w3 html//","-//w3o//dtd w3 html 3.0//","-//webtechs//dtd mozilla html 2.0//","-//webtechs//dtd mozilla html//"],sI=[...KE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],oI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),QE=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],aI=[...QE,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function XE(e,t){return t.some(n=>e.startsWith(n))}function uI(e){return e.name===GE&&e.publicId===null&&(e.systemId===null||e.systemId===rI)}function lI(e){if(e.name!==GE)return Wn.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===iI)return Wn.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),oI.has(n))return Wn.QUIRKS;let r=t===null?sI:KE;if(XE(n,r))return Wn.QUIRKS;if(r=t===null?QE:aI,XE(n,r))return Wn.LIMITED_QUIRKS}return Wn.NO_QUIRKS}const JE={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},cI="definitionurl",dI="definitionURL",fI=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])),hI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ie.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ie.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ie.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ie.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ie.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ie.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ie.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ie.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ie.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ie.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ie.XMLNS}]]),pI=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])),mI=new Set([m.B,m.BIG,m.BLOCKQUOTE,m.BODY,m.BR,m.CENTER,m.CODE,m.DD,m.DIV,m.DL,m.DT,m.EM,m.EMBED,m.H1,m.H2,m.H3,m.H4,m.H5,m.H6,m.HEAD,m.HR,m.I,m.IMG,m.LI,m.LISTING,m.MENU,m.META,m.NOBR,m.OL,m.P,m.PRE,m.RUBY,m.S,m.SMALL,m.SPAN,m.STRONG,m.STRIKE,m.SUB,m.SUP,m.TABLE,m.TT,m.U,m.UL,m.VAR]);function gI(e){const t=e.tagID;return t===m.FONT&&e.attrs.some(({name:r})=>r===Zi.COLOR||r===Zi.SIZE||r===Zi.FACE)||mI.has(t)}function ZE(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===cI){e.attrs[t].name=dI;break}}function ey(e){for(let t=0;t<e.attrs.length;t++){const n=fI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Yf(e){for(let t=0;t<e.attrs.length;t++){const n=hI.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 EI(e){const t=pI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ys(e.tagName))}function yI(e,t){return t===ie.MATHML&&(e===m.MI||e===m.MO||e===m.MN||e===m.MS||e===m.MTEXT)}function TI(e,t,n){if(t===ie.MATHML&&e===m.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Zi.ENCODING){const o=n[r].value.toLowerCase();return o===JE.TEXT_HTML||o===JE.APPLICATION_XML}}return t===ie.SVG&&(e===m.FOREIGN_OBJECT||e===m.DESC||e===m.TITLE)}function bI(e,t,n,r){return(!r||r===ie.HTML)&&TI(e,t,n)||(!r||r===ie.MATHML)&&yI(e,t)}const _I="hidden",xI=8,SI=3;var P;(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"})(P||(P={}));const wI={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},ty=new Set([m.TABLE,m.TBODY,m.TFOOT,m.THEAD,m.TR]),ny={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:pi,onParseError:null};class ry{constructor(t,n,r=null,o=null){this.fragmentContext=r,this.scriptHandler=o,this.currentToken=null,this.stopped=!1,this.insertionMode=P.INITIAL,this.originalInsertionMode=P.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=H(H({},ny),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 G3(this.options,this),this.activeFormattingElements=new nI(this.treeAdapter),this.fragmentContextID=r?Ys(this.treeAdapter.getTagName(r)):m.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new tI(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=H(H({},ny),n);t!=null||(t=r.treeAdapter.createElement(j.TEMPLATE,ie.HTML,[]));const o=r.treeAdapter.createElement("documentmock",ie.HTML,[]),a=new this(r,o,t);return a.fragmentContextID===m.TEMPLATE&&a.tmplInsertionModeStack.unshift(P.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:wI,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)===ie.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,ie.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=P.TEXT}switchToPlaintextParsing(){this.insertionMode=P.TEXT,this.originalInsertionMode=P.IN_BODY,this.tokenizer.state=Rt.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)===j.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ie.HTML))switch(this.fragmentContextID){case m.TITLE:case m.TEXTAREA:{this.tokenizer.state=Rt.RCDATA;break}case m.STYLE:case m.XMP:case m.IFRAME:case m.NOEMBED:case m.NOFRAMES:case m.NOSCRIPT:{this.tokenizer.state=Rt.RAWTEXT;break}case m.SCRIPT:{this.tokenizer.state=Rt.SCRIPT_DATA;break}case m.PLAINTEXT:{this.tokenizer.state=Rt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",o=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,o),t.location){const u=this.treeAdapter.getChildNodes(this.document).find(c=>this.treeAdapter.isDocumentTypeNode(c));u&&this.treeAdapter.setNodeSourceCodeLocation(u,t.location)}}_attachElementToTree(t,n){if(this.options.sourceCodeLocationInfo){const r=n&&be(H({},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,ie.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,ie.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(j.HTML,ie.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,m.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===We.END_TAG&&o===n.tagName?{endTag:H({},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===m.SVG&&this.treeAdapter.getTagName(n)===j.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===ie.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===m.MGLYPH||t.tagID===m.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,ie.HTML)}_processToken(t){switch(t.type){case We.CHARACTER:{this.onCharacter(t);break}case We.NULL_CHARACTER:{this.onNullCharacter(t);break}case We.COMMENT:{this.onComment(t);break}case We.DOCTYPE:{this.onDoctype(t);break}case We.START_TAG:{this._processStartTag(t);break}case We.END_TAG:{this.onEndTag(t);break}case We.EOF:{this.onEof(t);break}case We.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const o=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return bI(t,o,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(o=>o.type===Cr.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=P.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(m.P),this.openElements.popUntilTagNamePopped(m.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case m.TR:{this.insertionMode=P.IN_ROW;return}case m.TBODY:case m.THEAD:case m.TFOOT:{this.insertionMode=P.IN_TABLE_BODY;return}case m.CAPTION:{this.insertionMode=P.IN_CAPTION;return}case m.COLGROUP:{this.insertionMode=P.IN_COLUMN_GROUP;return}case m.TABLE:{this.insertionMode=P.IN_TABLE;return}case m.BODY:{this.insertionMode=P.IN_BODY;return}case m.FRAMESET:{this.insertionMode=P.IN_FRAMESET;return}case m.SELECT:{this._resetInsertionModeForSelect(t);return}case m.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case m.HTML:{this.insertionMode=this.headElement?P.AFTER_HEAD:P.BEFORE_HEAD;return}case m.TD:case m.TH:{if(t>0){this.insertionMode=P.IN_CELL;return}break}case m.HEAD:{if(t>0){this.insertionMode=P.IN_HEAD;return}break}}this.insertionMode=P.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===m.TEMPLATE)break;if(r===m.TABLE){this.insertionMode=P.IN_SELECT_IN_TABLE;return}}this.insertionMode=P.IN_SELECT}_isElementCausesFosterParenting(t){return ty.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 m.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===ie.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case m.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 V3[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){eR(this,t);return}switch(this.insertionMode){case P.INITIAL:{ma(this,t);break}case P.BEFORE_HTML:{ga(this,t);break}case P.BEFORE_HEAD:{Ea(this,t);break}case P.IN_HEAD:{ya(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{ba(this,t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:{sy(this,t);break}case P.TEXT:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Qf(this,t);break}case P.IN_TABLE_TEXT:{hy(this,t);break}case P.IN_COLUMN_GROUP:{El(this,t);break}case P.AFTER_BODY:{bl(this,t);break}case P.AFTER_AFTER_BODY:{_l(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){ZP(this,t);return}switch(this.insertionMode){case P.INITIAL:{ma(this,t);break}case P.BEFORE_HTML:{ga(this,t);break}case P.BEFORE_HEAD:{Ea(this,t);break}case P.IN_HEAD:{ya(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{ba(this,t);break}case P.TEXT:{this._insertCharacters(t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Qf(this,t);break}case P.IN_COLUMN_GROUP:{El(this,t);break}case P.AFTER_BODY:{bl(this,t);break}case P.AFTER_AFTER_BODY:{_l(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Gf(this,t);return}switch(this.insertionMode){case P.INITIAL:case P.BEFORE_HTML:case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_TEMPLATE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{Gf(this,t);break}case P.IN_TABLE_TEXT:{Sa(this,t);break}case P.AFTER_BODY:{II(this,t);break}case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{PI(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case P.INITIAL:{RI(this,t);break}case P.BEFORE_HEAD:case P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:{this._err(t,J.misplacedDoctype);break}case P.IN_TABLE_TEXT:{Sa(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,J.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?tR(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{ma(this,t);break}case P.BEFORE_HTML:{LI(this,t);break}case P.BEFORE_HEAD:{MI(this,t);break}case P.IN_HEAD:{ur(this,t);break}case P.IN_HEAD_NO_SCRIPT:{UI(this,t);break}case P.AFTER_HEAD:{zI(this,t);break}case P.IN_BODY:{un(this,t);break}case P.IN_TABLE:{Ws(this,t);break}case P.IN_TABLE_TEXT:{Sa(this,t);break}case P.IN_CAPTION:{FP(this,t);break}case P.IN_COLUMN_GROUP:{Xf(this,t);break}case P.IN_TABLE_BODY:{yl(this,t);break}case P.IN_ROW:{Tl(this,t);break}case P.IN_CELL:{HP(this,t);break}case P.IN_SELECT:{gy(this,t);break}case P.IN_SELECT_IN_TABLE:{jP(this,t);break}case P.IN_TEMPLATE:{VP(this,t);break}case P.AFTER_BODY:{YP(this,t);break}case P.IN_FRAMESET:{WP(this,t);break}case P.AFTER_FRAMESET:{KP(this,t);break}case P.AFTER_AFTER_BODY:{XP(this,t);break}case P.AFTER_AFTER_FRAMESET:{JP(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?nR(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case P.INITIAL:{ma(this,t);break}case P.BEFORE_HTML:{DI(this,t);break}case P.BEFORE_HEAD:{FI(this,t);break}case P.IN_HEAD:{BI(this,t);break}case P.IN_HEAD_NO_SCRIPT:{HI(this,t);break}case P.AFTER_HEAD:{jI(this,t);break}case P.IN_BODY:{gl(this,t);break}case P.TEXT:{vP(this,t);break}case P.IN_TABLE:{_a(this,t);break}case P.IN_TABLE_TEXT:{Sa(this,t);break}case P.IN_CAPTION:{BP(this,t);break}case P.IN_COLUMN_GROUP:{UP(this,t);break}case P.IN_TABLE_BODY:{Jf(this,t);break}case P.IN_ROW:{my(this,t);break}case P.IN_CELL:{zP(this,t);break}case P.IN_SELECT:{Ey(this,t);break}case P.IN_SELECT_IN_TABLE:{$P(this,t);break}case P.IN_TEMPLATE:{qP(this,t);break}case P.AFTER_BODY:{Ty(this,t);break}case P.IN_FRAMESET:{GP(this,t);break}case P.AFTER_FRAMESET:{QP(this,t);break}case P.AFTER_AFTER_BODY:{_l(this,t);break}}}onEof(t){switch(this.insertionMode){case P.INITIAL:{ma(this,t);break}case P.BEFORE_HTML:{ga(this,t);break}case P.BEFORE_HEAD:{Ea(this,t);break}case P.IN_HEAD:{ya(this,t);break}case P.IN_HEAD_NO_SCRIPT:{Ta(this,t);break}case P.AFTER_HEAD:{ba(this,t);break}case P.IN_BODY:case P.IN_TABLE:case P.IN_CAPTION:case P.IN_COLUMN_GROUP:case P.IN_TABLE_BODY:case P.IN_ROW:case P.IN_CELL:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:{dy(this,t);break}case P.TEXT:{kP(this,t);break}case P.IN_TABLE_TEXT:{Sa(this,t);break}case P.IN_TEMPLATE:{yy(this,t);break}case P.AFTER_BODY:case P.IN_FRAMESET:case P.AFTER_FRAMESET:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{Kf(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===A.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 P.IN_HEAD:case P.IN_HEAD_NO_SCRIPT:case P.AFTER_HEAD:case P.TEXT:case P.IN_COLUMN_GROUP:case P.IN_SELECT:case P.IN_SELECT_IN_TABLE:case P.IN_FRAMESET:case P.AFTER_FRAMESET:{this._insertCharacters(t);break}case P.IN_BODY:case P.IN_CAPTION:case P.IN_CELL:case P.IN_TEMPLATE:case P.AFTER_BODY:case P.AFTER_AFTER_BODY:case P.AFTER_AFTER_FRAMESET:{iy(this,t);break}case P.IN_TABLE:case P.IN_TABLE_BODY:case P.IN_ROW:{Qf(this,t);break}case P.IN_TABLE_TEXT:{fy(this,t);break}}}}function CI(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):cy(e,t),n}function AI(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 vI(e,t,n){let r=t,o=e.openElements.getCommonAncestor(t);for(let a=0,u=o;u!==n;a++,u=o){o=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=SI;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=kI(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function kI(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 NI(e,t,n){const r=e.treeAdapter.getTagName(t),o=Ys(r);if(e._isElementCausesFosterParenting(o))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);o===m.TEMPLATE&&a===ie.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function OI(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 Wf(e,t){for(let n=0;n<xI;n++){const r=CI(e,t);if(!r)break;const o=AI(e,r);if(!o)break;e.activeFormattingElements.bookmark=r;const a=vI(e,o,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&NI(e,u,a),OI(e,o,r)}}function Gf(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function II(e,t){e._appendCommentNode(t,e.openElements.items[0])}function PI(e,t){e._appendCommentNode(t,e.document)}function Kf(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 RI(e,t){e._setDocumentType(t);const n=t.forceQuirks?Wn.QUIRKS:lI(t);uI(t)||e._err(t,J.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=P.BEFORE_HTML}function ma(e,t){e._err(t,J.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,Wn.QUIRKS),e.insertionMode=P.BEFORE_HTML,e._processToken(t)}function LI(e,t){t.tagID===m.HTML?(e._insertElement(t,ie.HTML),e.insertionMode=P.BEFORE_HEAD):ga(e,t)}function DI(e,t){const n=t.tagID;(n===m.HTML||n===m.HEAD||n===m.BODY||n===m.BR)&&ga(e,t)}function ga(e,t){e._insertFakeRootElement(),e.insertionMode=P.BEFORE_HEAD,e._processToken(t)}function MI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.HEAD:{e._insertElement(t,ie.HTML),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD;break}default:Ea(e,t)}}function FI(e,t){const n=t.tagID;n===m.HEAD||n===m.BODY||n===m.HTML||n===m.BR?Ea(e,t):e._err(t,J.endTagWithoutMatchingOpenElement)}function Ea(e,t){e._insertFakeElement(j.HEAD,m.HEAD),e.headElement=e.openElements.current,e.insertionMode=P.IN_HEAD,e._processToken(t)}function ur(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TITLE:{e._switchToTextParsing(t,Rt.RCDATA);break}case m.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rt.RAWTEXT):(e._insertElement(t,ie.HTML),e.insertionMode=P.IN_HEAD_NO_SCRIPT);break}case m.NOFRAMES:case m.STYLE:{e._switchToTextParsing(t,Rt.RAWTEXT);break}case m.SCRIPT:{e._switchToTextParsing(t,Rt.SCRIPT_DATA);break}case m.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=P.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(P.IN_TEMPLATE);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:ya(e,t)}}function BI(e,t){switch(t.tagID){case m.HEAD:{e.openElements.pop(),e.insertionMode=P.AFTER_HEAD;break}case m.BODY:case m.BR:case m.HTML:{ya(e,t);break}case m.TEMPLATE:{es(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function es(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==m.TEMPLATE&&e._err(t,J.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,J.endTagWithoutMatchingOpenElement)}function ya(e,t){e.openElements.pop(),e.insertionMode=P.AFTER_HEAD,e._processToken(t)}function UI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BASEFONT:case m.BGSOUND:case m.HEAD:case m.LINK:case m.META:case m.NOFRAMES:case m.STYLE:{ur(e,t);break}case m.NOSCRIPT:{e._err(t,J.nestedNoscriptInHead);break}default:Ta(e,t)}}function HI(e,t){switch(t.tagID){case m.NOSCRIPT:{e.openElements.pop(),e.insertionMode=P.IN_HEAD;break}case m.BR:{Ta(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function Ta(e,t){const n=t.type===We.EOF?J.openElementsLeftAfterEof:J.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=P.IN_HEAD,e._processToken(t)}function zI(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.BODY:{e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_BODY;break}case m.FRAMESET:{e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET;break}case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{e._err(t,J.abandonedHeadElementChild),e.openElements.push(e.headElement,m.HEAD),ur(e,t),e.openElements.remove(e.headElement);break}case m.HEAD:{e._err(t,J.misplacedStartTagForHeadElement);break}default:ba(e,t)}}function jI(e,t){switch(t.tagID){case m.BODY:case m.HTML:case m.BR:{ba(e,t);break}case m.TEMPLATE:{es(e,t);break}default:e._err(t,J.endTagWithoutMatchingOpenElement)}}function ba(e,t){e._insertFakeElement(j.BODY,m.BODY),e.insertionMode=P.IN_BODY,ml(e,t)}function ml(e,t){switch(t.type){case We.CHARACTER:{sy(e,t);break}case We.WHITESPACE_CHARACTER:{iy(e,t);break}case We.COMMENT:{Gf(e,t);break}case We.START_TAG:{un(e,t);break}case We.END_TAG:{gl(e,t);break}case We.EOF:{dy(e,t);break}}}function iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function sy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function $I(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function VI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function qI(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_FRAMESET)}function YI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function WI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&Vf.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ie.HTML)}function GI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function KI(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),n||(e.formElement=e.openElements.current))}function QI(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===m.LI&&o===m.LI||(n===m.DD||n===m.DT)&&(o===m.DD||o===m.DT)){e.openElements.generateImpliedEndTagsWithExclusion(o),e.openElements.popUntilTagNamePopped(o);break}if(o!==m.ADDRESS&&o!==m.DIV&&o!==m.P&&e._isSpecialElement(e.openElements.items[r],o))break}e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML)}function XI(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.tokenizer.state=Rt.PLAINTEXT}function JI(e,t){e.openElements.hasInScope(m.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1}function ZI(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(j.A);n&&(Wf(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function eP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function tP(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(m.NOBR)&&(Wf(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ie.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function nP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function rP(e,t){e.treeAdapter.getDocumentMode(e.document)!==Wn.QUIRKS&&e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=P.IN_TABLE}function oy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function ay(e){const t=UE(e,Zi.TYPE);return t!=null&&t.toLowerCase()===_I}function iP(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ie.HTML),ay(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function sP(e,t){e._appendElement(t,ie.HTML),t.ackSelfClosing=!0}function oP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._appendElement(t,ie.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function aP(e,t){t.tagName=j.IMG,t.tagID=m.IMG,oy(e,t)}function uP(e,t){e._insertElement(t,ie.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=P.TEXT}function lP(e,t){e.openElements.hasInButtonScope(m.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function cP(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rt.RAWTEXT)}function uy(e,t){e._switchToTextParsing(t,Rt.RAWTEXT)}function dP(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===P.IN_TABLE||e.insertionMode===P.IN_CAPTION||e.insertionMode===P.IN_TABLE_BODY||e.insertionMode===P.IN_ROW||e.insertionMode===P.IN_CELL?P.IN_SELECT_IN_TABLE:P.IN_SELECT}function fP(e,t){e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function hP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ie.HTML)}function pP(e,t){e.openElements.hasInScope(m.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(m.RTC),e._insertElement(t,ie.HTML)}function mP(e,t){e._reconstructActiveFormattingElements(),ZE(t),Yf(t),t.selfClosing?e._appendElement(t,ie.MATHML):e._insertElement(t,ie.MATHML),t.ackSelfClosing=!0}function gP(e,t){e._reconstructActiveFormattingElements(),ey(t),Yf(t),t.selfClosing?e._appendElement(t,ie.SVG):e._insertElement(t,ie.SVG),t.ackSelfClosing=!0}function ly(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ie.HTML)}function un(e,t){switch(t.tagID){case m.I:case m.S:case m.B:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.SMALL:case m.STRIKE:case m.STRONG:{eP(e,t);break}case m.A:{ZI(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{WI(e,t);break}case m.P:case m.DL:case m.OL:case m.UL:case m.DIV:case m.DIR:case m.NAV:case m.MAIN:case m.MENU:case m.ASIDE:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.DETAILS:case m.ADDRESS:case m.ARTICLE:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{YI(e,t);break}case m.LI:case m.DD:case m.DT:{QI(e,t);break}case m.BR:case m.IMG:case m.WBR:case m.AREA:case m.EMBED:case m.KEYGEN:{oy(e,t);break}case m.HR:{oP(e,t);break}case m.RB:case m.RTC:{hP(e,t);break}case m.RT:case m.RP:{pP(e,t);break}case m.PRE:case m.LISTING:{GI(e,t);break}case m.XMP:{lP(e,t);break}case m.SVG:{gP(e,t);break}case m.HTML:{$I(e,t);break}case m.BASE:case m.LINK:case m.META:case m.STYLE:case m.TITLE:case m.SCRIPT:case m.BGSOUND:case m.BASEFONT:case m.TEMPLATE:{ur(e,t);break}case m.BODY:{VI(e,t);break}case m.FORM:{KI(e,t);break}case m.NOBR:{tP(e,t);break}case m.MATH:{mP(e,t);break}case m.TABLE:{rP(e,t);break}case m.INPUT:{iP(e,t);break}case m.PARAM:case m.TRACK:case m.SOURCE:{sP(e,t);break}case m.IMAGE:{aP(e,t);break}case m.BUTTON:{JI(e,t);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{nP(e,t);break}case m.IFRAME:{cP(e,t);break}case m.SELECT:{dP(e,t);break}case m.OPTION:case m.OPTGROUP:{fP(e,t);break}case m.NOEMBED:case m.NOFRAMES:{uy(e,t);break}case m.FRAMESET:{qI(e,t);break}case m.TEXTAREA:{uP(e,t);break}case m.NOSCRIPT:{e.options.scriptingEnabled?uy(e,t):ly(e,t);break}case m.PLAINTEXT:{XI(e,t);break}case m.COL:case m.TH:case m.TD:case m.TR:case m.HEAD:case m.FRAME:case m.TBODY:case m.TFOOT:case m.THEAD:case m.CAPTION:case m.COLGROUP:break;default:ly(e,t)}}function EP(e,t){if(e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function yP(e,t){e.openElements.hasInScope(m.BODY)&&(e.insertionMode=P.AFTER_BODY,Ty(e,t))}function TP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function bP(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(m.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(m.FORM):n&&e.openElements.remove(n))}function _P(e){e.openElements.hasInButtonScope(m.P)||e._insertFakeElement(j.P,m.P),e._closePElement()}function xP(e){e.openElements.hasInListItemScope(m.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(m.LI),e.openElements.popUntilTagNamePopped(m.LI))}function SP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function wP(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function CP(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function AP(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(j.BR,m.BR),e.openElements.pop(),e.framesetOk=!1}function cy(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!==m.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 gl(e,t){switch(t.tagID){case m.A:case m.B:case m.I:case m.S:case m.U:case m.EM:case m.TT:case m.BIG:case m.CODE:case m.FONT:case m.NOBR:case m.SMALL:case m.STRIKE:case m.STRONG:{Wf(e,t);break}case m.P:{_P(e);break}case m.DL:case m.UL:case m.OL:case m.DIR:case m.DIV:case m.NAV:case m.PRE:case m.MAIN:case m.MENU:case m.ASIDE:case m.BUTTON:case m.CENTER:case m.FIGURE:case m.FOOTER:case m.HEADER:case m.HGROUP:case m.DIALOG:case m.ADDRESS:case m.ARTICLE:case m.DETAILS:case m.SEARCH:case m.SECTION:case m.SUMMARY:case m.LISTING:case m.FIELDSET:case m.BLOCKQUOTE:case m.FIGCAPTION:{TP(e,t);break}case m.LI:{xP(e);break}case m.DD:case m.DT:{SP(e,t);break}case m.H1:case m.H2:case m.H3:case m.H4:case m.H5:case m.H6:{wP(e);break}case m.BR:{AP(e);break}case m.BODY:{EP(e,t);break}case m.HTML:{yP(e,t);break}case m.FORM:{bP(e);break}case m.APPLET:case m.OBJECT:case m.MARQUEE:{CP(e,t);break}case m.TEMPLATE:{es(e,t);break}default:cy(e,t)}}function dy(e,t){e.tmplInsertionModeStack.length>0?yy(e,t):Kf(e,t)}function vP(e,t){var n;t.tagID===m.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function kP(e,t){e._err(t,J.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Qf(e,t){if(e.openElements.currentTagId!==void 0&&ty.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=P.IN_TABLE_TEXT,t.type){case We.CHARACTER:{hy(e,t);break}case We.WHITESPACE_CHARACTER:{fy(e,t);break}}else xa(e,t)}function NP(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CAPTION}function OP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_COLUMN_GROUP}function IP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.COLGROUP,m.COLGROUP),e.insertionMode=P.IN_COLUMN_GROUP,Xf(e,t)}function PP(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_TABLE_BODY}function RP(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(j.TBODY,m.TBODY),e.insertionMode=P.IN_TABLE_BODY,yl(e,t)}function LP(e,t){e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function DP(e,t){ay(t)?e._appendElement(t,ie.HTML):xa(e,t),t.ackSelfClosing=!0}function MP(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ie.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Ws(e,t){switch(t.tagID){case m.TD:case m.TH:case m.TR:{RP(e,t);break}case m.STYLE:case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}case m.COL:{IP(e,t);break}case m.FORM:{MP(e,t);break}case m.TABLE:{LP(e,t);break}case m.TBODY:case m.TFOOT:case m.THEAD:{PP(e,t);break}case m.INPUT:{DP(e,t);break}case m.CAPTION:{NP(e,t);break}case m.COLGROUP:{OP(e,t);break}default:xa(e,t)}}function _a(e,t){switch(t.tagID){case m.TABLE:{e.openElements.hasInTableScope(m.TABLE)&&(e.openElements.popUntilTagNamePopped(m.TABLE),e._resetInsertionMode());break}case m.TEMPLATE:{es(e,t);break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:xa(e,t)}}function xa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ml(e,t),e.fosterParentingEnabled=n}function fy(e,t){e.pendingCharacterTokens.push(t)}function hy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Sa(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)xa(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const py=new Set([m.CAPTION,m.COL,m.COLGROUP,m.TBODY,m.TD,m.TFOOT,m.TH,m.THEAD,m.TR]);function FP(e,t){const n=t.tagID;py.has(n)?e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,Ws(e,t)):un(e,t)}function BP(e,t){const n=t.tagID;switch(n){case m.CAPTION:case m.TABLE:{e.openElements.hasInTableScope(m.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(m.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_TABLE,n===m.TABLE&&_a(e,t));break}case m.BODY:case m.COL:case m.COLGROUP:case m.HTML:case m.TBODY:case m.TD:case m.TFOOT:case m.TH:case m.THEAD:case m.TR:break;default:gl(e,t)}}function Xf(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.COL:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.TEMPLATE:{ur(e,t);break}default:El(e,t)}}function UP(e,t){switch(t.tagID){case m.COLGROUP:{e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TEMPLATE:{es(e,t);break}case m.COL:break;default:El(e,t)}}function El(e,t){e.openElements.currentTagId===m.COLGROUP&&(e.openElements.pop(),e.insertionMode=P.IN_TABLE,e._processToken(t))}function yl(e,t){switch(t.tagID){case m.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_ROW;break}case m.TH:case m.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(j.TR,m.TR),e.insertionMode=P.IN_ROW,Tl(e,t);break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,Ws(e,t));break}default:Ws(e,t)}}function Jf(e,t){const n=t.tagID;switch(t.tagID){case m.TBODY:case m.TFOOT:case m.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE);break}case m.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE,_a(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:case m.TR:break;default:_a(e,t)}}function Tl(e,t){switch(t.tagID){case m.TH:case m.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,ie.HTML),e.insertionMode=P.IN_CELL,e.activeFormattingElements.insertMarker();break}case m.CAPTION:case m.COL:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,yl(e,t));break}default:Ws(e,t)}}function my(e,t){switch(t.tagID){case m.TR:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY);break}case m.TABLE:{e.openElements.hasInTableScope(m.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Jf(e,t));break}case m.TBODY:case m.TFOOT:case m.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(m.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=P.IN_TABLE_BODY,Jf(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:case m.TD:case m.TH:break;default:_a(e,t)}}function HP(e,t){const n=t.tagID;py.has(n)?(e.openElements.hasInTableScope(m.TD)||e.openElements.hasInTableScope(m.TH))&&(e._closeTableCell(),Tl(e,t)):un(e,t)}function zP(e,t){const n=t.tagID;switch(n){case m.TD:case m.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=P.IN_ROW);break}case m.TABLE:case m.TBODY:case m.TFOOT:case m.THEAD:case m.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),my(e,t));break}case m.BODY:case m.CAPTION:case m.COL:case m.COLGROUP:case m.HTML:break;default:gl(e,t)}}function gy(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.OPTGROUP:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._insertElement(t,ie.HTML);break}case m.HR:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop(),e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.INPUT:case m.KEYGEN:case m.TEXTAREA:case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),t.tagID!==m.SELECT&&e._processStartTag(t));break}case m.SCRIPT:case m.TEMPLATE:{ur(e,t);break}}}function Ey(e,t){switch(t.tagID){case m.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===m.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===m.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===m.OPTGROUP&&e.openElements.pop();break}case m.OPTION:{e.openElements.currentTagId===m.OPTION&&e.openElements.pop();break}case m.SELECT:{e.openElements.hasInSelectScope(m.SELECT)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode());break}case m.TEMPLATE:{es(e,t);break}}}function jP(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e._processStartTag(t)):gy(e,t)}function $P(e,t){const n=t.tagID;n===m.CAPTION||n===m.TABLE||n===m.TBODY||n===m.TFOOT||n===m.THEAD||n===m.TR||n===m.TD||n===m.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(m.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Ey(e,t)}function VP(e,t){switch(t.tagID){case m.BASE:case m.BASEFONT:case m.BGSOUND:case m.LINK:case m.META:case m.NOFRAMES:case m.SCRIPT:case m.STYLE:case m.TEMPLATE:case m.TITLE:{ur(e,t);break}case m.CAPTION:case m.COLGROUP:case m.TBODY:case m.TFOOT:case m.THEAD:{e.tmplInsertionModeStack[0]=P.IN_TABLE,e.insertionMode=P.IN_TABLE,Ws(e,t);break}case m.COL:{e.tmplInsertionModeStack[0]=P.IN_COLUMN_GROUP,e.insertionMode=P.IN_COLUMN_GROUP,Xf(e,t);break}case m.TR:{e.tmplInsertionModeStack[0]=P.IN_TABLE_BODY,e.insertionMode=P.IN_TABLE_BODY,yl(e,t);break}case m.TD:case m.TH:{e.tmplInsertionModeStack[0]=P.IN_ROW,e.insertionMode=P.IN_ROW,Tl(e,t);break}default:e.tmplInsertionModeStack[0]=P.IN_BODY,e.insertionMode=P.IN_BODY,un(e,t)}}function qP(e,t){t.tagID===m.TEMPLATE&&es(e,t)}function yy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(m.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Kf(e,t)}function YP(e,t){t.tagID===m.HTML?un(e,t):bl(e,t)}function Ty(e,t){var n;if(t.tagID===m.HTML){if(e.fragmentContext||(e.insertionMode=P.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===m.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 bl(e,t)}function bl(e,t){e.insertionMode=P.IN_BODY,ml(e,t)}function WP(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.FRAMESET:{e._insertElement(t,ie.HTML);break}case m.FRAME:{e._appendElement(t,ie.HTML),t.ackSelfClosing=!0;break}case m.NOFRAMES:{ur(e,t);break}}}function GP(e,t){t.tagID===m.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==m.FRAMESET&&(e.insertionMode=P.AFTER_FRAMESET))}function KP(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function QP(e,t){t.tagID===m.HTML&&(e.insertionMode=P.AFTER_AFTER_FRAMESET)}function XP(e,t){t.tagID===m.HTML?un(e,t):_l(e,t)}function _l(e,t){e.insertionMode=P.IN_BODY,ml(e,t)}function JP(e,t){switch(t.tagID){case m.HTML:{un(e,t);break}case m.NOFRAMES:{ur(e,t);break}}}function ZP(e,t){t.chars=_t,e._insertCharacters(t)}function eR(e,t){e._insertCharacters(t),e.framesetOk=!1}function by(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ie.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function tR(e,t){if(gI(t))by(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===ie.MATHML?ZE(t):r===ie.SVG&&(EI(t),ey(t)),Yf(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function nR(e,t){if(t.tagID===m.P||t.tagID===m.BR){by(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)===ie.HTML){e._endTagOutsideForeignContent(t);break}const o=e.treeAdapter.getTagName(r);if(o.toLowerCase()===t.tagName){t.tagName=o,e.openElements.shortenToLength(n);break}}}j.AREA,j.BASE,j.BASEFONT,j.BGSOUND,j.BR,j.COL,j.EMBED,j.FRAME,j.HR,j.IMG,j.INPUT,j.KEYGEN,j.LINK,j.META,j.PARAM,j.SOURCE,j.TRACK,j.WBR;const rR=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,iR=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),_y={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function xy(e,t){const n=pR(e),r=LE("type",{handlers:{root:sR,element:oR,text:aR,comment:wy,doctype:uR,raw:cR},unknown:dR}),o={parser:n?new ry(_y):ry.getFragmentParser(void 0,_y),handle(c){r(c,o)},stitches:!1,options:t||{}};r(e,o),Gs(o,Sr());const a=n?o.parser.document:o.parser.getFragment(),u=s3(a,{file:o.options.file});return o.stitches&&cl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const E=f.children;return E[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Sy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function sR(e,t){Sy(e.children,t)}function oR(e,t){fR(e,t),Sy(e.children,t),hR(e,t)}function aR(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:We.CHARACTER,chars:e.value,location:wa(e)};Gs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function uR(e,t){const n={type:We.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:wa(e)};Gs(t,Sr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function lR(e,t){t.stitches=!0;const n=mR(e);if("children"in e&&"children"in n){const r=xy({type:"root",children:e.children},t.options);n.children=r.children}wy({type:"comment",value:{stitch:n}},t)}function wy(e,t){const n=e.value,r={type:We.COMMENT,data:n,location:wa(e)};Gs(t,Sr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function cR(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,Cy(t,Sr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(rR,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function dR(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))lR(n,t);else{let r="";throw iR.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 Gs(e,t){Cy(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=Rt.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 Cy(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 fR(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Rt.PLAINTEXT)return;Gs(t,Sr(e));const r=t.parser.openElements.current;let o="namespaceURI"in r?r.namespaceURI:Xi.html;o===Xi.html&&n==="svg"&&(o=Xi.svg);const a=b3(be(H({},e),{children:[]}),{space:o===Xi.svg?"svg":"html"}),u={type:We.START_TAG,tagName:n,tagID:Ys(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:wa(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function hR(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&k3.includes(n)||t.parser.tokenizer.state===Rt.PLAINTEXT)return;Gs(t,Zu(e));const r={type:We.END_TAG,tagName:n,tagID:Ys(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:wa(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Rt.RCDATA||t.parser.tokenizer.state===Rt.RAWTEXT||t.parser.tokenizer.state===Rt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Rt.DATA)}function pR(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function wa(e){const t=Sr(e)||{line:void 0,column:void 0,offset:void 0},n=Zu(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 mR(e){return"children"in e?Qi(be(H({},e),{children:[]})):Qi(e)}function Ay(e){return function(t,n){return xy(t,be(H({},e),{file:n}))}}const ts=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],vy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...ts,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...ts],h2:[["className","sr-only"]],img:[...ts,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...ts,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...ts],table:[...ts],ul:[...ts,["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"]},mi={}.hasOwnProperty;function gR(e,t){let n={type:"root",children:[]};const r={schema:t?H(H({},vy),t):vy,stack:[]},o=ky(r,e);return o&&(Array.isArray(o)?o.length===1?n=o[0]:n.children=o:n=o),n}function ky(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return ER(e,n);case"doctype":return yR(e,n);case"element":return TR(e,n);case"root":return bR(e,n);case"text":return _R(e,n)}}}function ER(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 Ca(a,t),a}}function yR(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ca(n,t),n}}function TR(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=Ny(e,t.children),o=xR(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&&mi.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(a=!1;++d<c.length;)e.stack.includes(c[d])&&(a=!0)}if(!a)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:o,children:r};return Ca(u,t),u}function bR(e,t){const r={type:"root",children:Ny(e,t.children)};return Ca(r,t),r}function _R(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ca(r,t),r}function Ny(e,t){const n=[];if(Array.isArray(t)){const r=t;let o=-1;for(;++o<r.length;){const a=ky(e,r[o]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function xR(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,o=e.schema.required,a=r&&mi.call(r,n)?r[n]:void 0,u=r&&mi.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(mi.call(c,f)){const p=c[f];let E=Oy(e,Py(a,f),f,p);E==null&&(E=Oy(e,Py(u,f),f,p)),E!=null&&(d[f]=E)}if(o&&mi.call(o,n)){const p=o[n];for(f in p)mi.call(p,f)&&!mi.call(d,f)&&(d[f]=p[f])}return d}function Oy(e,t,n,r){return t?Array.isArray(r)?SR(e,t,n,r):Iy(e,t,n,r):void 0}function SR(e,t,n,r){let o=-1;const a=[];for(;++o<r.length;){const u=Iy(e,t,n,r[o]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function Iy(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&wR(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 wR(e,t,n){const r=e.schema.protocols&&mi.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const o=String(n),a=o.indexOf(":"),u=o.indexOf("?"),c=o.indexOf("#"),d=o.indexOf("/");if(a<0||d>-1&&a>d||u>-1&&a>u||c>-1&&a>c)return!0;let f=-1;for(;++f<r.length;){const p=r[f];if(a===p.length&&o.slice(0,p.length)===p)return!0}return!1}function Ca(e,t){const n=h1(t);t.data&&(e.data=Qi(t.data)),n&&(e.position=n)}function Py(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 CR(e){return function(t){return gR(t,e)}}const Ry=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:o})=>{const a=n?t?"_blank":"_self":void 0;return k.jsx("a",be(H(H({className:Z(e,`${G}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:o}))},AR=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n,openLinksInNewTab:r}=nn();return!e&&!t?null:k.jsx("div",{className:Z(n,`${G}-disclaimer`),children:t?k.jsx(pE,{rehypePlugins:[Ay,CR],components:{ul:({children:o})=>k.jsx("ul",{className:Z(n,`${G}-ul`),children:o}),ol:({children:o})=>k.jsx("ol",{className:Z(n,`${G}-ol`),children:o}),li:({children:o})=>k.jsx("li",{className:Z(n,`${G}-li`),children:o}),a:({href:o,title:a,children:u})=>k.jsx(Ry,{globalClassName:n,openLinksInNewTab:r,href:o,title:a,children:u}),img:({src:o,alt:a})=>k.jsx("img",{className:Z(n,`${G}-disclaimer-image`),src:o,alt:a}),p:({children:o})=>k.jsx("p",{className:Z(n,`${G}-disclaimer-text`),children:o}),span:({children:o})=>k.jsx("span",{className:Z(n,`${G}-disclaimer-text-span`),children:o})},children:t}):k.jsx("p",{className:Z(n,`${G}-disclaimer-text`),children:e})})},Zf=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:o,imageFile:a}=Zo(),{setImageFile:u}=Jo(),{logger:c,globalClassName:d,searchConfig:f,features:p}=nn(),E=$.useRef(null),b=$.useRef(null),T=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",x=!!o||!1,C=x?"connected":"disconnected",v=t||!x,U=()=>a?new Promise((B,te)=>{const ge=new FileReader;ge.readAsDataURL(a),ge.onload=()=>B(ge.result),ge.onerror=ye=>te(ye)}):Promise.resolve(""),L=B=>rt(null,null,function*(){var ye;if(v)return;const te=10*1024*1024,ge=(ye=B.target.files)==null?void 0:ye[0];if(ge){if(ge.size>te){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ge)}}),Y=()=>{u(null),b.current&&(b.current.value="")},X=B=>rt(null,null,function*(){var ye;B.preventDefault();const te=(((ye=E.current)==null?void 0:ye.value)||"").trim();let ge="";try{ge=yield U()}catch(M){c==null||c.error("Error converting file to base64:",M),alert("There was an error processing the file. Please try again.");return}te&&(Y(),E.current.value="",r(te,ge))});return k.jsxs("div",{className:Z(d,e,n,a&&"with-attachments",`${G}-search-bar-wrapper`),children:[a&&k.jsxs("div",{className:Z(d,n,`${G}-image-file-preview`),children:[k.jsx("img",{className:Z(d,n,`${G}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),k.jsx("span",{className:Z(d,n,`${G}-image-file-name`),title:_,children:_}),k.jsx(Jd,{className:Z(n,"clear-attachment"),label:"Remove image",onClick:Y})]}),k.jsxs("form",{className:Z(d,e,n,`${G}-search-bar`),name:`${G}-search-form`,onSubmit:X,children:[k.jsx("span",{role:"status",className:Z(`${G}-connection-status-icon`,C)}),k.jsx("input",{className:Z(d,e,n,`${G}-search-input`),type:"text",ref:E,placeholder:f==null?void 0:f.placeholder,name:`${G}-user-input`}),T&&k.jsxs("div",{role:"button",className:Z(d,e,n,v&&"disabled",`${G}-image-upload-button`),"aria-disabled":v,tabIndex:0,children:[k.jsx("label",{className:Z(d,e,n,v&&"disabled",`${G}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:k.jsx(YA,{})}),k.jsx("input",{className:Z(d,e,n,`${G}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${G}-file-input`,disabled:v,onInput:L})]}),k.jsx(GA,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:v})]}),k.jsx(AR,{})]})};function vR(e){return e==null?[]:Array.isArray(e)?e:[e]}var kR=e=>e!=null&&typeof e=="object",xl=e=>typeof e=="string",Ks=e=>typeof e=="function",NR=e=>e==null,OR=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),IR=e=>Object.prototype.toString.call(e),Ly=Function.prototype.toString,PR=Ly.call(Object),RR=e=>{if(!kR(e)||IR(e)!="[object Object]"||MR(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=OR(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&Ly.call(n)==PR},LR=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,DR=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,MR=e=>LR(e)||DR(e),FR=e=>e(),BR=()=>{},eh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function th(e){if(!RR(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]=th(o))}return n}function nh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function UR(e,t){if(e==null)throw new Error(t())}var HR=Object.defineProperty,zR=(e,t,n)=>t in e?HR(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,rh=(e,t,n)=>zR(e,typeof t!="symbol"?t+"":t,n),Dy=()=>{},Sl=e=>typeof e=="object"&&e!==null,jR=e=>e?"":void 0,$R=e=>e?"true":void 0,VR=1,qR=9,YR=11,Yt=e=>Sl(e)&&e.nodeType===VR&&typeof e.nodeName=="string",wl=e=>Sl(e)&&e.nodeType===qR,WR=e=>Sl(e)&&e===e.window,My=e=>Yt(e)?e.localName||"":"#document";function GR(e){return["html","body","#document"].includes(My(e))}var KR=e=>Sl(e)&&e.nodeType!==void 0,ns=e=>KR(e)&&e.nodeType===YR&&"host"in e,QR=e=>Yt(e)&&e.localName==="input",XR=e=>Yt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function Aa(e){if(!e)return!1;const t=e.getRootNode();return Xs(t)===e}var JR=/(textarea|select)/;function ZR(e){if(e==null||!Yt(e))return!1;try{return QR(e)&&e.selectionStart!=null||JR.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Cl(e,t){var r;if(!e||!t||!Yt(e)||!Yt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&ns(n)){let o=t;for(;o;){if(e===o)return!0;o=o.parentNode||o.host}}return!1}function Ar(e){var t;return wl(e)?e:WR(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function eL(e){return Ar(e).documentElement}function Qs(e){var t,n,r;return ns(e)?Qs(e.host):wl(e)?(t=e.defaultView)!=null?t:window:Yt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function Xs(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 tL(e){if(My(e)==="html")return e;const t=e.assignedSlot||e.parentNode||ns(e)&&e.host||eL(e);return ns(t)?t.host:t}function ih(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),wl(t)||ns(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var sh=new WeakMap;function Al(e){return sh.has(e)||sh.set(e,Qs(e).getComputedStyle(e)),sh.get(e)}var oh=new Set(["menu","listbox","dialog","grid","tree","region"]),nL=e=>oh.has(e),Fy=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function By(e,t){const n=new Set,r=ih(e),o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Fy(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(E&&nL(E)&&!b&&(p===t||p.contains(t)||o(p)))return!0}}}return!1};return o(e)}function Uy(e,t){const n=ih(e),r=new Set,o=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Fy(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const E=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";E&&oh.has(E)&&!b&&(t(p),o(p))}}}};o(e)}function rL(e){const t=new Set;return Uy(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function iL(e){const t=e.getAttribute("role");return!!(t&&oh.has(t))}function sL(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function oL(e){var t;return sL(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function aL(e){if(!e.id)return!1;const t=ih(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&iL(e))}var ah=()=>typeof document!="undefined";function uL(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var uh=e=>ah()&&e.test(uL()),lL=e=>ah()&&e.test(navigator.vendor),Hy=()=>ah()&&!!navigator.maxTouchPoints,cL=()=>uh(/^iPhone/i),dL=()=>uh(/^iPad/i)||lh()&&navigator.maxTouchPoints>1,zy=()=>cL()||dL(),fL=()=>lh()||zy(),lh=()=>uh(/^Mac/i),hL=()=>fL()&&lL(/apple/i);function pL(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 qr(e){var n;const t=pL(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var mL=e=>e.button===0,gL=e=>e.button===2||lh()&&e.ctrlKey&&e.button===0,lr=(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)}},jy=e=>Yt(e)&&e.tagName==="IFRAME",EL=/^(audio|video|details)$/;function $y(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var yL=e=>!Number.isNaN($y(e)),TL=e=>$y(e)<0;function bL(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 Vy(e,t,n){const r=[...e],o=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<o.length;){const d=o[c++];if(!d||a.has(d))continue;a.add(d);const f=bL(d,t);if(f){const p=Array.from(f.querySelectorAll(vl)).filter(n),E=u.get(d);if(E!==void 0){const b=E+1;r.splice(b,0,...p),p.forEach((T,_)=>{u.set(T,b+_)});for(let T=b+p.length;T<r.length;T++)u.set(r[T],T)}else{const b=r.length;r.push(...p),p.forEach((T,_)=>{u.set(T,b+_)})}o.push(...p)}}return r}var vl="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",qy=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));(n==!0||n=="if-empty"&&o.length===0)&&Yt(e)&&Yr(e)&&o.unshift(e);const u=[];for(const c of o)if(Yr(c)){if(jy(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...qy(d,{getShadowRoot:r}));continue}u.push(c)}return r?Vy(u,r,Yr):u};function Yr(e){return!Yt(e)||e.closest("[inert]")?!1:e.matches(vl)&&XR(e)}function va(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,o=Array.from(e.querySelectorAll(vl));n&&rs(e)&&o.unshift(e);const a=[];for(const u of o)if(rs(u)){if(jy(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...va(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=Vy(a,r,rs);return!u.length&&n?o:u}return!a.length&&n?o:a}function rs(e){return Yt(e)&&e.tabIndex>0?!0:Yr(e)&&!TL(e)}function _L(e,t={}){const n=va(e,t),r=n[0]||null,o=n[n.length-1]||null;return[r,o]}function xL(e,t={}){const{current:n,getShadowRoot:r}=t,o=va(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:Xs(a);if(!u)return null;const c=o.indexOf(u);return o[c+1]||null}function ka(e){return e.tabIndex<0&&(EL.test(e.localName)||ZR(e))&&!yL(e)?0:e.tabIndex}function Yy(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=va(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var SL=class F2{constructor(){rh(this,"id",null),rh(this,"fn_cleanup"),rh(this,"cleanup",()=>{this.cancel()})}static create(){return new F2}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 wn(e){const t=SL.create();return t.request(e),t.cleanup}function wL(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 ch(e){const t=tL(e);return GR(t)?Ar(t).body:Yt(t)&&vL(t)?t:ch(t)}var CL=/auto|scroll|overlay|hidden|clip/,AL=new Set(["inline","contents"]);function vL(e){const t=Qs(e),{overflow:n,overflowX:r,overflowY:o,display:a}=t.getComputedStyle(e);return CL.test(n+o+r)&&!AL.has(a)}function kL(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:o,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[E,b]=_L(e,{includeContainer:!0,getShadowRoot:a}),T=xL(c,{current:n,getShadowRoot:a}),_=!E&&!b;f.shiftKey&&Aa(T)?(o==null||o(),p=b):f.shiftKey&&(Aa(E)||_)?p=n:!f.shiftKey&&Aa(n)?(o==null||o(),p=E):!f.shiftKey&&(Aa(b)||_)&&(p=T),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return lr(u,"keydown",d,!0)}function NL(e,t){const c=t,{defer:n,triggerElement:r}=c,o=en(c,["defer","triggerElement"]),a=n?wn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(kL(d,H({triggerElement:f},o)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function kl(e,t){if(!e)return Dy;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 OL(e,t,n){if(!e)return Dy;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 IL(e,t,n){const{signal:r}=t;return[new Promise((u,c)=>{const d=setTimeout(()=>{c(new Error(`Timeout of ${n}ms exceeded`))},n);r.addEventListener("abort",()=>{clearTimeout(d),c(new Error("Promise aborted"))}),e.then(f=>{r.aborted||(clearTimeout(d),u(f))}).catch(f=>{r.aborted||(clearTimeout(d),c(f))})}),()=>t.abort()]}function PL(e,t){const{timeout:n,rootNode:r}=t,o=Qs(r),a=Ar(r),u=new o.AbortController;return IL(new Promise(c=>{const d=e();if(d){c(d);return}const f=new o.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var RL=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),LL=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,Wy=e=>{const t={};let n;for(;n=LL.exec(e);)t[n[1]]=n[2];return t},DL=(e,t)=>{if(xl(e)){if(xl(t))return`${e};${t}`;e=Wy(e)}else xl(t)&&(t=Wy(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function cr(...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]=eh(n[o],t[o]);continue}if(o==="className"||o==="class"){t[o]=RL(t[o],n[o]);continue}if(o==="style"){t[o]=DL(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 IB(e){return e}var Js=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Js||{}),dh="__init__";function ML(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Ar(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},o=()=>Xs(t()),a=u=>t().getElementById(u);return be(H({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:o,isActiveElement:Aa,getById:a})}var fh={exports:{}},Cn={},hh={exports:{}},ph={};var Gy;function FL(){return Gy||(Gy=1,(function(e){function t(q,ne){var w=q.length;q.push(ne);e:for(;0<w;){var R=w-1>>>1,K=q[R];if(0<o(K,ne))q[R]=ne,q[w]=K,w=R;else break e}}function n(q){return q.length===0?null:q[0]}function r(q){if(q.length===0)return null;var ne=q[0],w=q.pop();if(w!==ne){q[0]=w;e:for(var R=0,K=q.length,O=K>>>1;R<O;){var _e=2*(R+1)-1,Re=q[_e],Oe=_e+1,Ge=q[Oe];if(0>o(Re,w))Oe<K&&0>o(Ge,Re)?(q[R]=Ge,q[Oe]=w,R=Oe):(q[R]=Re,q[_e]=w,R=_e);else if(Oe<K&&0>o(Ge,w))q[R]=Ge,q[Oe]=w,R=Oe;else break e}}return ne}function o(q,ne){var w=q.sortIndex-ne.sortIndex;return w!==0?w:q.id-ne.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,E=null,b=3,T=!1,_=!1,x=!1,C=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,U=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function L(q){for(var ne=n(f);ne!==null;){if(ne.callback===null)r(f);else if(ne.startTime<=q)r(f),ne.sortIndex=ne.expirationTime,t(d,ne);else break;ne=n(f)}}function Y(q){if(x=!1,L(q),!_)if(n(d)!==null)_=!0,Ce(X);else{var ne=n(f);ne!==null&&oe(Y,ne.startTime-q)}}function X(q,ne){_=!1,x&&(x=!1,v(ge),ge=-1),T=!0;var w=b;try{for(L(ne),E=n(d);E!==null&&(!(E.expirationTime>ne)||q&&!ae());){var R=E.callback;if(typeof R=="function"){E.callback=null,b=E.priorityLevel;var K=R(E.expirationTime<=ne);ne=e.unstable_now(),typeof K=="function"?E.callback=K:E===n(d)&&r(d),L(ne)}else r(d);E=n(d)}if(E!==null)var O=!0;else{var _e=n(f);_e!==null&&oe(Y,_e.startTime-ne),O=!1}return O}finally{E=null,b=w,T=!1}}var B=!1,te=null,ge=-1,ye=5,M=-1;function ae(){return!(e.unstable_now()-M<ye)}function he(){if(te!==null){var q=e.unstable_now();M=q;var ne=!0;try{ne=te(!0,q)}finally{ne?ue():(B=!1,te=null)}}else B=!1}var ue;if(typeof U=="function")ue=function(){U(he)};else if(typeof MessageChannel!="undefined"){var de=new MessageChannel,Te=de.port2;de.port1.onmessage=he,ue=function(){Te.postMessage(null)}}else ue=function(){C(he,0)};function Ce(q){te=q,B||(B=!0,ue())}function oe(q,ne){ge=C(function(){q(e.unstable_now())},ne)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(q){q.callback=null},e.unstable_continueExecution=function(){_||T||(_=!0,Ce(X))},e.unstable_forceFrameRate=function(q){0>q||125<q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):ye=0<q?Math.floor(1e3/q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(q){switch(b){case 1:case 2:case 3:var ne=3;break;default:ne=b}var w=b;b=ne;try{return q()}finally{b=w}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(q,ne){switch(q){case 1:case 2:case 3:case 4:case 5:break;default:q=3}var w=b;b=q;try{return ne()}finally{b=w}},e.unstable_scheduleCallback=function(q,ne,w){var R=e.unstable_now();switch(typeof w=="object"&&w!==null?(w=w.delay,w=typeof w=="number"&&0<w?R+w:R):w=R,q){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=w+K,q={id:p++,callback:ne,priorityLevel:q,startTime:w,expirationTime:K,sortIndex:-1},w>R?(q.sortIndex=w,t(f,q),n(d)===null&&q===n(f)&&(x?(v(ge),ge=-1):x=!0,oe(Y,w-R))):(q.sortIndex=K,t(d,q),_||T||(_=!0,Ce(X))),q},e.unstable_shouldYield=ae,e.unstable_wrapCallback=function(q){var ne=b;return function(){var w=b;b=ne;try{return q.apply(this,arguments)}finally{b=w}}}})(ph)),ph}var Ky;function BL(){return Ky||(Ky=1,hh.exports=FL()),hh.exports}var Qy;function UL(){if(Qy)return Cn;Qy=1;var e=Ss(),t=BL();function n(i){for(var s="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)s+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+s+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,o={};function a(i,s){u(i,s),u(i+"Capture",s)}function u(i,s){for(o[i]=s,i=0;i<s.length;i++)r.add(s[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},E={};function b(i){return d.call(E,i)?!0:d.call(p,i)?!1:f.test(i)?E[i]=!0:(p[i]=!0,!1)}function T(i,s,l,h){if(l!==null&&l.type===0)return!1;switch(typeof s){case"function":case"symbol":return!0;case"boolean":return h?!1:l!==null?!l.acceptsBooleans:(i=i.toLowerCase().slice(0,5),i!=="data-"&&i!=="aria-");default:return!1}}function _(i,s,l,h){if(s===null||typeof s=="undefined"||T(i,s,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!s;case 4:return s===!1;case 5:return isNaN(s);case 6:return isNaN(s)||1>s}return!1}function x(i,s,l,h,g,y,S){this.acceptsBooleans=s===2||s===3||s===4,this.attributeName=h,this.attributeNamespace=g,this.mustUseProperty=l,this.propertyName=i,this.type=s,this.sanitizeURL=y,this.removeEmptyString=S}var C={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){C[i]=new x(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var s=i[0];C[s]=new x(s,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){C[i]=new x(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){C[i]=new x(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){C[i]=new x(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){C[i]=new x(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){C[i]=new x(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){C[i]=new x(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){C[i]=new x(i,5,!1,i.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function U(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var s=i.replace(v,U);C[s]=new x(s,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var s=i.replace(v,U);C[s]=new x(s,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var s=i.replace(v,U);C[s]=new x(s,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){C[i]=new x(i,1,!1,i.toLowerCase(),null,!1,!1)}),C.xlinkHref=new x("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){C[i]=new x(i,1,!1,i.toLowerCase(),null,!0,!0)});function L(i,s,l,h){var g=C.hasOwnProperty(s)?C[s]:null;(g!==null?g.type!==0:h||!(2<s.length)||s[0]!=="o"&&s[0]!=="O"||s[1]!=="n"&&s[1]!=="N")&&(_(s,l,g,h)&&(l=null),h||g===null?b(s)&&(l===null?i.removeAttribute(s):i.setAttribute(s,""+l)):g.mustUseProperty?i[g.propertyName]=l===null?g.type===3?!1:"":l:(s=g.attributeName,h=g.attributeNamespace,l===null?i.removeAttribute(s):(g=g.type,l=g===3||g===4&&l===!0?"":""+l,h?i.setAttributeNS(h,s,l):i.setAttribute(s,l))))}var Y=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,X=Symbol.for("react.element"),B=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),ge=Symbol.for("react.strict_mode"),ye=Symbol.for("react.profiler"),M=Symbol.for("react.provider"),ae=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ue=Symbol.for("react.suspense"),de=Symbol.for("react.suspense_list"),Te=Symbol.for("react.memo"),Ce=Symbol.for("react.lazy"),oe=Symbol.for("react.offscreen"),q=Symbol.iterator;function ne(i){return i===null||typeof i!="object"?null:(i=q&&i[q]||i["@@iterator"],typeof i=="function"?i:null)}var w=Object.assign,R;function K(i){if(R===void 0)try{throw Error()}catch(l){var s=l.stack.trim().match(/\n( *(at )?)/);R=s&&s[1]||""}return`
22
+ `+R+i}var O=!1;function _e(i,s){if(!i||O)return"";O=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(s)if(s=function(){throw Error()},Object.defineProperty(s.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(s,[])}catch(W){var h=W}Reflect.construct(i,[],s)}else{try{s.call()}catch(W){h=W}i.call(s.prototype)}else{try{throw Error()}catch(W){h=W}i()}}catch(W){if(W&&h&&typeof W.stack=="string"){for(var g=W.stack.split(`
23
+ `),y=h.stack.split(`
24
+ `),S=g.length-1,I=y.length-1;1<=S&&0<=I&&g[S]!==y[I];)I--;for(;1<=S&&0<=I;S--,I--)if(g[S]!==y[I]){if(S!==1||I!==1)do if(S--,I--,0>I||g[S]!==y[I]){var D=`
25
+ `+g[S].replace(" at new "," at ");return i.displayName&&D.includes("<anonymous>")&&(D=D.replace("<anonymous>",i.displayName)),D}while(1<=S&&0<=I);break}}}finally{O=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?K(i):""}function Re(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=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function Oe(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 te:return"Fragment";case B:return"Portal";case ye:return"Profiler";case ge:return"StrictMode";case ue:return"Suspense";case de:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case ae:return(i.displayName||"Context")+".Consumer";case M:return(i._context.displayName||"Context")+".Provider";case he:var s=i.render;return i=i.displayName,i||(i=s.displayName||s.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case Te:return s=i.displayName||null,s!==null?s:Oe(i.type)||"Memo";case Ce:s=i._payload,i=i._init;try{return Oe(i(s))}catch(l){}}return null}function Ge(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 Oe(s);case 8:return s===ge?"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 Ye(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function et(i){var s=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(s==="checkbox"||s==="radio")}function Nt(i){var s=et(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,s),h=""+i[s];if(!i.hasOwnProperty(s)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var g=l.get,y=l.set;return Object.defineProperty(i,s,{configurable:!0,get:function(){return g.call(this)},set:function(S){h=""+S,y.call(this,S)}}),Object.defineProperty(i,s,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(S){h=""+S},stopTracking:function(){i._valueTracker=null,delete i[s]}}}}function Kn(i){i._valueTracker||(i._valueTracker=Nt(i))}function as(i){if(!i)return!1;var s=i._valueTracker;if(!s)return!0;var l=s.getValue(),h="";return i&&(h=et(i)?i.checked?"true":"false":i.value),i=h,i!==l?(s.setValue(i),!0):!1}function Xr(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 Ti(i,s){var l=s.checked;return w({},s,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function us(i,s){var l=s.defaultValue==null?"":s.defaultValue,h=s.checked!=null?s.checked:s.defaultChecked;l=Ye(s.value!=null?s.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:s.type==="checkbox"||s.type==="radio"?s.checked!=null:s.value!=null}}function bi(i,s){s=s.checked,s!=null&&L(i,"checked",s,!1)}function Jr(i,s){bi(i,s);var l=Ye(s.value),h=s.type;if(l!=null)h==="number"?(l===0&&i.value===""||i.value!=l)&&(i.value=""+l):i.value!==""+l&&(i.value=""+l);else if(h==="submit"||h==="reset"){i.removeAttribute("value");return}s.hasOwnProperty("value")?Ue(i,s.type,l):s.hasOwnProperty("defaultValue")&&Ue(i,s.type,Ye(s.defaultValue)),s.checked==null&&s.defaultChecked!=null&&(i.defaultChecked=!!s.defaultChecked)}function Se(i,s,l){if(s.hasOwnProperty("value")||s.hasOwnProperty("defaultValue")){var h=s.type;if(!(h!=="submit"&&h!=="reset"||s.value!==void 0&&s.value!==null))return;s=""+i._wrapperState.initialValue,l||s===i.value||(i.value=s),i.defaultValue=s}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function Ue(i,s,l){(s!=="number"||Xr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var je=Array.isArray;function Xe(i,s,l,h){if(i=i.options,s){s={};for(var g=0;g<l.length;g++)s["$"+l[g]]=!0;for(l=0;l<i.length;l++)g=s.hasOwnProperty("$"+i[l].value),i[l].selected!==g&&(i[l].selected=g),g&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ye(l),s=null,g=0;g<i.length;g++){if(i[g].value===l){i[g].selected=!0,h&&(i[g].defaultSelected=!0);return}s!==null||i[g].disabled||(s=i[g])}s!==null&&(s.selected=!0)}}function ct(i,s){if(s.dangerouslySetInnerHTML!=null)throw Error(n(91));return w({},s,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function St(i,s){var l=s.value;if(l==null){if(l=s.children,s=s.defaultValue,l!=null){if(s!=null)throw Error(n(92));if(je(l)){if(1<l.length)throw Error(n(93));l=l[0]}s=l}s==null&&(s=""),l=s}i._wrapperState={initialValue:Ye(l)}}function mn(i,s){var l=Ye(s.value),h=Ye(s.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),s.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function st(i){var s=i.textContent;s===i._wrapperState.initialValue&&s!==""&&s!==null&&(i.value=s)}function ee(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 fe(i,s){return i==null||i==="http://www.w3.org/1999/xhtml"?ee(s):i==="http://www.w3.org/2000/svg"&&s==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Be,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(s,l,h,g){MSApp.execUnsafeLocalFunction(function(){return i(s,l,h,g)})}:i})(function(i,s){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=s;else{for(Be=Be||document.createElement("div"),Be.innerHTML="<svg>"+s.valueOf().toString()+"</svg>",s=Be.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;s.firstChild;)i.appendChild(s.firstChild)}});function tt(i,s){if(s){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=s;return}}i.textContent=s}var Qt={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},Zr=["Webkit","ms","Moz","O"];Object.keys(Qt).forEach(function(i){Zr.forEach(function(s){s=s+i.charAt(0).toUpperCase()+i.substring(1),Qt[s]=Qt[i]})});function Qn(i,s,l){return s==null||typeof s=="boolean"||s===""?"":l||typeof s!="number"||s===0||Qt.hasOwnProperty(i)&&Qt[i]?(""+s).trim():s+"px"}function _i(i,s){i=i.style;for(var l in s)if(s.hasOwnProperty(l)){var h=l.indexOf("--")===0,g=Qn(l,s[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,g):i[l]=g}}var ls=w({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xt(i,s){if(s){if(ls[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 Rr(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 Fn=null;function ep(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var tp=null,co=null,fo=null;function Kb(i){if(i=ou(i)){if(typeof tp!="function")throw Error(n(280));var s=i.stateNode;s&&(s=Ec(s),tp(i.stateNode,i.type,s))}}function Qb(i){co?fo?fo.push(i):fo=[i]:co=i}function Xb(){if(co){var i=co,s=fo;if(fo=co=null,Kb(i),s)for(i=0;i<s.length;i++)Kb(s[i])}}function Jb(i,s){return i(s)}function Zb(){}var np=!1;function e_(i,s,l){if(np)return i(s,l);np=!0;try{return Jb(i,s,l)}finally{np=!1,(co!==null||fo!==null)&&(Zb(),Xb())}}function Ua(i,s){var l=i.stateNode;if(l===null)return null;var h=Ec(l);if(h===null)return null;l=h[s];e:switch(s){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(h=!h.disabled)||(i=i.type,h=!(i==="button"||i==="input"||i==="select"||i==="textarea")),i=!h;break e;default:i=!1}if(i)return null;if(l&&typeof l!="function")throw Error(n(231,s,typeof l));return l}var rp=!1;if(c)try{var Ha={};Object.defineProperty(Ha,"passive",{get:function(){rp=!0}}),window.addEventListener("test",Ha,Ha),window.removeEventListener("test",Ha,Ha)}catch(i){rp=!1}function G8(i,s,l,h,g,y,S,I,D){var W=Array.prototype.slice.call(arguments,3);try{s.apply(l,W)}catch(se){this.onError(se)}}var za=!1,Kl=null,Ql=!1,ip=null,K8={onError:function(i){za=!0,Kl=i}};function Q8(i,s,l,h,g,y,S,I,D){za=!1,Kl=null,G8.apply(K8,arguments)}function X8(i,s,l,h,g,y,S,I,D){if(Q8.apply(this,arguments),za){if(za){var W=Kl;za=!1,Kl=null}else throw Error(n(198));Ql||(Ql=!0,ip=W)}}function cs(i){var s=i,l=i;if(i.alternate)for(;s.return;)s=s.return;else{i=s;do s=i,(s.flags&4098)!==0&&(l=s.return),i=s.return;while(i)}return s.tag===3?l:null}function t_(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 n_(i){if(cs(i)!==i)throw Error(n(188))}function J8(i){var s=i.alternate;if(!s){if(s=cs(i),s===null)throw Error(n(188));return s!==i?null:i}for(var l=i,h=s;;){var g=l.return;if(g===null)break;var y=g.alternate;if(y===null){if(h=g.return,h!==null){l=h;continue}break}if(g.child===y.child){for(y=g.child;y;){if(y===l)return n_(g),i;if(y===h)return n_(g),s;y=y.sibling}throw Error(n(188))}if(l.return!==h.return)l=g,h=y;else{for(var S=!1,I=g.child;I;){if(I===l){S=!0,l=g,h=y;break}if(I===h){S=!0,h=g,l=y;break}I=I.sibling}if(!S){for(I=y.child;I;){if(I===l){S=!0,l=y,h=g;break}if(I===h){S=!0,h=y,l=g;break}I=I.sibling}if(!S)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:s}function r_(i){return i=J8(i),i!==null?i_(i):null}function i_(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var s=i_(i);if(s!==null)return s;i=i.sibling}return null}var s_=t.unstable_scheduleCallback,o_=t.unstable_cancelCallback,Z8=t.unstable_shouldYield,eM=t.unstable_requestPaint,Lt=t.unstable_now,tM=t.unstable_getCurrentPriorityLevel,sp=t.unstable_ImmediatePriority,a_=t.unstable_UserBlockingPriority,Xl=t.unstable_NormalPriority,nM=t.unstable_LowPriority,u_=t.unstable_IdlePriority,Jl=null,Lr=null;function rM(i){if(Lr&&typeof Lr.onCommitFiberRoot=="function")try{Lr.onCommitFiberRoot(Jl,i,void 0,(i.current.flags&128)===128)}catch(s){}}var hr=Math.clz32?Math.clz32:oM,iM=Math.log,sM=Math.LN2;function oM(i){return i>>>=0,i===0?32:31-(iM(i)/sM|0)|0}var Zl=64,ec=4194304;function ja(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 tc(i,s){var l=i.pendingLanes;if(l===0)return 0;var h=0,g=i.suspendedLanes,y=i.pingedLanes,S=l&268435455;if(S!==0){var I=S&~g;I!==0?h=ja(I):(y&=S,y!==0&&(h=ja(y)))}else S=l&~g,S!==0?h=ja(S):y!==0&&(h=ja(y));if(h===0)return 0;if(s!==0&&s!==h&&(s&g)===0&&(g=h&-h,y=s&-s,g>=y||g===16&&(y&4194240)!==0))return s;if((h&4)!==0&&(h|=l&16),s=i.entangledLanes,s!==0)for(i=i.entanglements,s&=h;0<s;)l=31-hr(s),g=1<<l,h|=i[l],s&=~g;return h}function aM(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 uM(i,s){for(var l=i.suspendedLanes,h=i.pingedLanes,g=i.expirationTimes,y=i.pendingLanes;0<y;){var S=31-hr(y),I=1<<S,D=g[S];D===-1?((I&l)===0||(I&h)!==0)&&(g[S]=aM(I,s)):D<=s&&(i.expiredLanes|=I),y&=~I}}function op(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function l_(){var i=Zl;return Zl<<=1,(Zl&4194240)===0&&(Zl=64),i}function ap(i){for(var s=[],l=0;31>l;l++)s.push(i);return s}function $a(i,s,l){i.pendingLanes|=s,s!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,s=31-hr(s),i[s]=l}function lM(i,s){var l=i.pendingLanes&~s;i.pendingLanes=s,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=s,i.mutableReadLanes&=s,i.entangledLanes&=s,s=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var g=31-hr(l),y=1<<g;s[g]=0,h[g]=-1,i[g]=-1,l&=~y}}function up(i,s){var l=i.entangledLanes|=s;for(i=i.entanglements;l;){var h=31-hr(l),g=1<<h;g&s|i[h]&s&&(i[h]|=s),l&=~g}}var ut=0;function c_(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var d_,lp,f_,h_,p_,cp=!1,nc=[],xi=null,Si=null,wi=null,Va=new Map,qa=new Map,Ci=[],cM="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 m_(i,s){switch(i){case"focusin":case"focusout":xi=null;break;case"dragenter":case"dragleave":Si=null;break;case"mouseover":case"mouseout":wi=null;break;case"pointerover":case"pointerout":Va.delete(s.pointerId);break;case"gotpointercapture":case"lostpointercapture":qa.delete(s.pointerId)}}function Ya(i,s,l,h,g,y){return i===null||i.nativeEvent!==y?(i={blockedOn:s,domEventName:l,eventSystemFlags:h,nativeEvent:y,targetContainers:[g]},s!==null&&(s=ou(s),s!==null&&lp(s)),i):(i.eventSystemFlags|=h,s=i.targetContainers,g!==null&&s.indexOf(g)===-1&&s.push(g),i)}function dM(i,s,l,h,g){switch(s){case"focusin":return xi=Ya(xi,i,s,l,h,g),!0;case"dragenter":return Si=Ya(Si,i,s,l,h,g),!0;case"mouseover":return wi=Ya(wi,i,s,l,h,g),!0;case"pointerover":var y=g.pointerId;return Va.set(y,Ya(Va.get(y)||null,i,s,l,h,g)),!0;case"gotpointercapture":return y=g.pointerId,qa.set(y,Ya(qa.get(y)||null,i,s,l,h,g)),!0}return!1}function g_(i){var s=ds(i.target);if(s!==null){var l=cs(s);if(l!==null){if(s=l.tag,s===13){if(s=t_(l),s!==null){i.blockedOn=s,p_(i.priority,function(){f_(l)});return}}else if(s===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function rc(i){if(i.blockedOn!==null)return!1;for(var s=i.targetContainers;0<s.length;){var l=fp(i.domEventName,i.eventSystemFlags,s[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Fn=h,l.target.dispatchEvent(h),Fn=null}else return s=ou(l),s!==null&&lp(s),i.blockedOn=l,!1;s.shift()}return!0}function E_(i,s,l){rc(i)&&l.delete(s)}function fM(){cp=!1,xi!==null&&rc(xi)&&(xi=null),Si!==null&&rc(Si)&&(Si=null),wi!==null&&rc(wi)&&(wi=null),Va.forEach(E_),qa.forEach(E_)}function Wa(i,s){i.blockedOn===s&&(i.blockedOn=null,cp||(cp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,fM)))}function Ga(i){function s(g){return Wa(g,i)}if(0<nc.length){Wa(nc[0],i);for(var l=1;l<nc.length;l++){var h=nc[l];h.blockedOn===i&&(h.blockedOn=null)}}for(xi!==null&&Wa(xi,i),Si!==null&&Wa(Si,i),wi!==null&&Wa(wi,i),Va.forEach(s),qa.forEach(s),l=0;l<Ci.length;l++)h=Ci[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ci.length&&(l=Ci[0],l.blockedOn===null);)g_(l),l.blockedOn===null&&Ci.shift()}var ho=Y.ReactCurrentBatchConfig,ic=!0;function hM(i,s,l,h){var g=ut,y=ho.transition;ho.transition=null;try{ut=1,dp(i,s,l,h)}finally{ut=g,ho.transition=y}}function pM(i,s,l,h){var g=ut,y=ho.transition;ho.transition=null;try{ut=4,dp(i,s,l,h)}finally{ut=g,ho.transition=y}}function dp(i,s,l,h){if(ic){var g=fp(i,s,l,h);if(g===null)Np(i,s,h,sc,l),m_(i,h);else if(dM(g,i,s,l,h))h.stopPropagation();else if(m_(i,h),s&4&&-1<cM.indexOf(i)){for(;g!==null;){var y=ou(g);if(y!==null&&d_(y),y=fp(i,s,l,h),y===null&&Np(i,s,h,sc,l),y===g)break;g=y}g!==null&&h.stopPropagation()}else Np(i,s,h,null,l)}}var sc=null;function fp(i,s,l,h){if(sc=null,i=ep(h),i=ds(i),i!==null)if(s=cs(i),s===null)i=null;else if(l=s.tag,l===13){if(i=t_(s),i!==null)return i;i=null}else if(l===3){if(s.stateNode.current.memoizedState.isDehydrated)return s.tag===3?s.stateNode.containerInfo:null;i=null}else s!==i&&(i=null);return sc=i,null}function y_(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(tM()){case sp:return 1;case a_:return 4;case Xl:case nM:return 16;case u_:return 536870912;default:return 16}default:return 16}}var Ai=null,hp=null,oc=null;function T_(){if(oc)return oc;var i,s=hp,l=s.length,h,g="value"in Ai?Ai.value:Ai.textContent,y=g.length;for(i=0;i<l&&s[i]===g[i];i++);var S=l-i;for(h=1;h<=S&&s[l-h]===g[y-h];h++);return oc=g.slice(i,1<h?1-h:void 0)}function ac(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 uc(){return!0}function b_(){return!1}function Bn(i){function s(l,h,g,y,S){this._reactName=l,this._targetInst=g,this.type=h,this.nativeEvent=y,this.target=S,this.currentTarget=null;for(var I in i)i.hasOwnProperty(I)&&(l=i[I],this[I]=l?l(y):y[I]);return this.isDefaultPrevented=(y.defaultPrevented!=null?y.defaultPrevented:y.returnValue===!1)?uc:b_,this.isPropagationStopped=b_,this}return w(s.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=uc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=uc)},persist:function(){},isPersistent:uc}),s}var po={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},pp=Bn(po),Ka=w({},po,{view:0,detail:0}),mM=Bn(Ka),mp,gp,Qa,lc=w({},Ka,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:yp,button:0,buttons:0,relatedTarget:function(i){return i.relatedTarget===void 0?i.fromElement===i.srcElement?i.toElement:i.fromElement:i.relatedTarget},movementX:function(i){return"movementX"in i?i.movementX:(i!==Qa&&(Qa&&i.type==="mousemove"?(mp=i.screenX-Qa.screenX,gp=i.screenY-Qa.screenY):gp=mp=0,Qa=i),mp)},movementY:function(i){return"movementY"in i?i.movementY:gp}}),__=Bn(lc),gM=w({},lc,{dataTransfer:0}),EM=Bn(gM),yM=w({},Ka,{relatedTarget:0}),Ep=Bn(yM),TM=w({},po,{animationName:0,elapsedTime:0,pseudoElement:0}),bM=Bn(TM),_M=w({},po,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),xM=Bn(_M),SM=w({},po,{data:0}),x_=Bn(SM),wM={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},CM={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"},AM={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function vM(i){var s=this.nativeEvent;return s.getModifierState?s.getModifierState(i):(i=AM[i])?!!s[i]:!1}function yp(){return vM}var kM=w({},Ka,{key:function(i){if(i.key){var s=wM[i.key]||i.key;if(s!=="Unidentified")return s}return i.type==="keypress"?(i=ac(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?CM[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:yp,charCode:function(i){return i.type==="keypress"?ac(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?ac(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),NM=Bn(kM),OM=w({},lc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),S_=Bn(OM),IM=w({},Ka,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:yp}),PM=Bn(IM),RM=w({},po,{propertyName:0,elapsedTime:0,pseudoElement:0}),LM=Bn(RM),DM=w({},lc,{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}),MM=Bn(DM),FM=[9,13,27,32],Tp=c&&"CompositionEvent"in window,Xa=null;c&&"documentMode"in document&&(Xa=document.documentMode);var BM=c&&"TextEvent"in window&&!Xa,w_=c&&(!Tp||Xa&&8<Xa&&11>=Xa),C_=" ",A_=!1;function v_(i,s){switch(i){case"keyup":return FM.indexOf(s.keyCode)!==-1;case"keydown":return s.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function k_(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var mo=!1;function UM(i,s){switch(i){case"compositionend":return k_(s);case"keypress":return s.which!==32?null:(A_=!0,C_);case"textInput":return i=s.data,i===C_&&A_?null:i;default:return null}}function HM(i,s){if(mo)return i==="compositionend"||!Tp&&v_(i,s)?(i=T_(),oc=hp=Ai=null,mo=!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 w_&&s.locale!=="ko"?null:s.data;default:return null}}var zM={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 N_(i){var s=i&&i.nodeName&&i.nodeName.toLowerCase();return s==="input"?!!zM[i.type]:s==="textarea"}function O_(i,s,l,h){Qb(h),s=pc(s,"onChange"),0<s.length&&(l=new pp("onChange","change",null,l,h),i.push({event:l,listeners:s}))}var Ja=null,Za=null;function jM(i){G_(i,0)}function cc(i){var s=bo(i);if(as(s))return i}function $M(i,s){if(i==="change")return s}var I_=!1;if(c){var bp;if(c){var _p="oninput"in document;if(!_p){var P_=document.createElement("div");P_.setAttribute("oninput","return;"),_p=typeof P_.oninput=="function"}bp=_p}else bp=!1;I_=bp&&(!document.documentMode||9<document.documentMode)}function R_(){Ja&&(Ja.detachEvent("onpropertychange",L_),Za=Ja=null)}function L_(i){if(i.propertyName==="value"&&cc(Za)){var s=[];O_(s,Za,i,ep(i)),e_(jM,s)}}function VM(i,s,l){i==="focusin"?(R_(),Ja=s,Za=l,Ja.attachEvent("onpropertychange",L_)):i==="focusout"&&R_()}function qM(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return cc(Za)}function YM(i,s){if(i==="click")return cc(s)}function WM(i,s){if(i==="input"||i==="change")return cc(s)}function GM(i,s){return i===s&&(i!==0||1/i===1/s)||i!==i&&s!==s}var pr=typeof Object.is=="function"?Object.is:GM;function eu(i,s){if(pr(i,s))return!0;if(typeof i!="object"||i===null||typeof s!="object"||s===null)return!1;var l=Object.keys(i),h=Object.keys(s);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var g=l[h];if(!d.call(s,g)||!pr(i[g],s[g]))return!1}return!0}function D_(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function M_(i,s){var l=D_(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=s&&h>=s)return{node:l,offset:s-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=D_(l)}}function F_(i,s){return i&&s?i===s?!0:i&&i.nodeType===3?!1:s&&s.nodeType===3?F_(i,s.parentNode):"contains"in i?i.contains(s):i.compareDocumentPosition?!!(i.compareDocumentPosition(s)&16):!1:!1}function B_(){for(var i=window,s=Xr();s instanceof i.HTMLIFrameElement;){try{var l=typeof s.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=s.contentWindow;else break;s=Xr(i.document)}return s}function xp(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 KM(i){var s=B_(),l=i.focusedElem,h=i.selectionRange;if(s!==l&&l&&l.ownerDocument&&F_(l.ownerDocument.documentElement,l)){if(h!==null&&xp(l)){if(s=h.start,i=h.end,i===void 0&&(i=s),"selectionStart"in l)l.selectionStart=s,l.selectionEnd=Math.min(i,l.value.length);else if(i=(s=l.ownerDocument||document)&&s.defaultView||window,i.getSelection){i=i.getSelection();var g=l.textContent.length,y=Math.min(h.start,g);h=h.end===void 0?y:Math.min(h.end,g),!i.extend&&y>h&&(g=h,h=y,y=g),g=M_(l,y);var S=M_(l,h);g&&S&&(i.rangeCount!==1||i.anchorNode!==g.node||i.anchorOffset!==g.offset||i.focusNode!==S.node||i.focusOffset!==S.offset)&&(s=s.createRange(),s.setStart(g.node,g.offset),i.removeAllRanges(),y>h?(i.addRange(s),i.extend(S.node,S.offset)):(s.setEnd(S.node,S.offset),i.addRange(s)))}}for(s=[],i=l;i=i.parentNode;)i.nodeType===1&&s.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<s.length;l++)i=s[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var QM=c&&"documentMode"in document&&11>=document.documentMode,go=null,Sp=null,tu=null,wp=!1;function U_(i,s,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;wp||go==null||go!==Xr(h)||(h=go,"selectionStart"in h&&xp(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}),tu&&eu(tu,h)||(tu=h,h=pc(Sp,"onSelect"),0<h.length&&(s=new pp("onSelect","select",null,s,l),i.push({event:s,listeners:h}),s.target=go)))}function dc(i,s){var l={};return l[i.toLowerCase()]=s.toLowerCase(),l["Webkit"+i]="webkit"+s,l["Moz"+i]="moz"+s,l}var Eo={animationend:dc("Animation","AnimationEnd"),animationiteration:dc("Animation","AnimationIteration"),animationstart:dc("Animation","AnimationStart"),transitionend:dc("Transition","TransitionEnd")},Cp={},H_={};c&&(H_=document.createElement("div").style,"AnimationEvent"in window||(delete Eo.animationend.animation,delete Eo.animationiteration.animation,delete Eo.animationstart.animation),"TransitionEvent"in window||delete Eo.transitionend.transition);function fc(i){if(Cp[i])return Cp[i];if(!Eo[i])return i;var s=Eo[i],l;for(l in s)if(s.hasOwnProperty(l)&&l in H_)return Cp[i]=s[l];return i}var z_=fc("animationend"),j_=fc("animationiteration"),$_=fc("animationstart"),V_=fc("transitionend"),q_=new Map,Y_="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 vi(i,s){q_.set(i,s),a(s,[i])}for(var Ap=0;Ap<Y_.length;Ap++){var vp=Y_[Ap],XM=vp.toLowerCase(),JM=vp[0].toUpperCase()+vp.slice(1);vi(XM,"on"+JM)}vi(z_,"onAnimationEnd"),vi(j_,"onAnimationIteration"),vi($_,"onAnimationStart"),vi("dblclick","onDoubleClick"),vi("focusin","onFocus"),vi("focusout","onBlur"),vi(V_,"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 nu="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(" "),ZM=new Set("cancel close invalid load scroll toggle".split(" ").concat(nu));function W_(i,s,l){var h=i.type||"unknown-event";i.currentTarget=l,X8(h,s,void 0,i),i.currentTarget=null}function G_(i,s){s=(s&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],g=h.event;h=h.listeners;e:{var y=void 0;if(s)for(var S=h.length-1;0<=S;S--){var I=h[S],D=I.instance,W=I.currentTarget;if(I=I.listener,D!==y&&g.isPropagationStopped())break e;W_(g,I,W),y=D}else for(S=0;S<h.length;S++){if(I=h[S],D=I.instance,W=I.currentTarget,I=I.listener,D!==y&&g.isPropagationStopped())break e;W_(g,I,W),y=D}}}if(Ql)throw i=ip,Ql=!1,ip=null,i}function Et(i,s){var l=s[Dp];l===void 0&&(l=s[Dp]=new Set);var h=i+"__bubble";l.has(h)||(K_(s,i,2,!1),l.add(h))}function kp(i,s,l){var h=0;s&&(h|=4),K_(l,i,h,s)}var hc="_reactListening"+Math.random().toString(36).slice(2);function ru(i){if(!i[hc]){i[hc]=!0,r.forEach(function(l){l!=="selectionchange"&&(ZM.has(l)||kp(l,!1,i),kp(l,!0,i))});var s=i.nodeType===9?i:i.ownerDocument;s===null||s[hc]||(s[hc]=!0,kp("selectionchange",!1,s))}}function K_(i,s,l,h){switch(y_(s)){case 1:var g=hM;break;case 4:g=pM;break;default:g=dp}l=g.bind(null,s,l,i),g=void 0,!rp||s!=="touchstart"&&s!=="touchmove"&&s!=="wheel"||(g=!0),h?g!==void 0?i.addEventListener(s,l,{capture:!0,passive:g}):i.addEventListener(s,l,!0):g!==void 0?i.addEventListener(s,l,{passive:g}):i.addEventListener(s,l,!1)}function Np(i,s,l,h,g){var y=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 I=h.stateNode.containerInfo;if(I===g||I.nodeType===8&&I.parentNode===g)break;if(S===4)for(S=h.return;S!==null;){var D=S.tag;if((D===3||D===4)&&(D=S.stateNode.containerInfo,D===g||D.nodeType===8&&D.parentNode===g))return;S=S.return}for(;I!==null;){if(S=ds(I),S===null)return;if(D=S.tag,D===5||D===6){h=y=S;continue e}I=I.parentNode}}h=h.return}e_(function(){var W=y,se=ep(l),ce=[];e:{var re=q_.get(i);if(re!==void 0){var xe=pp,Ae=i;switch(i){case"keypress":if(ac(l)===0)break e;case"keydown":case"keyup":xe=NM;break;case"focusin":Ae="focus",xe=Ep;break;case"focusout":Ae="blur",xe=Ep;break;case"beforeblur":case"afterblur":xe=Ep;break;case"click":if(l.button===2)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":xe=__;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":xe=EM;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":xe=PM;break;case z_:case j_:case $_:xe=bM;break;case V_:xe=LM;break;case"scroll":xe=mM;break;case"wheel":xe=MM;break;case"copy":case"cut":case"paste":xe=xM;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":xe=S_}var ke=(s&4)!==0,Dt=!ke&&i==="scroll",z=ke?re!==null?re+"Capture":null:re;ke=[];for(var F=W,V;F!==null;){V=F;var Ee=V.stateNode;if(V.tag===5&&Ee!==null&&(V=Ee,z!==null&&(Ee=Ua(F,z),Ee!=null&&ke.push(iu(F,Ee,V)))),Dt)break;F=F.return}0<ke.length&&(re=new xe(re,Ae,null,l,se),ce.push({event:re,listeners:ke}))}}if((s&7)===0){e:{if(re=i==="mouseover"||i==="pointerover",xe=i==="mouseout"||i==="pointerout",re&&l!==Fn&&(Ae=l.relatedTarget||l.fromElement)&&(ds(Ae)||Ae[ei]))break e;if((xe||re)&&(re=se.window===se?se:(re=se.ownerDocument)?re.defaultView||re.parentWindow:window,xe?(Ae=l.relatedTarget||l.toElement,xe=W,Ae=Ae?ds(Ae):null,Ae!==null&&(Dt=cs(Ae),Ae!==Dt||Ae.tag!==5&&Ae.tag!==6)&&(Ae=null)):(xe=null,Ae=W),xe!==Ae)){if(ke=__,Ee="onMouseLeave",z="onMouseEnter",F="mouse",(i==="pointerout"||i==="pointerover")&&(ke=S_,Ee="onPointerLeave",z="onPointerEnter",F="pointer"),Dt=xe==null?re:bo(xe),V=Ae==null?re:bo(Ae),re=new ke(Ee,F+"leave",xe,l,se),re.target=Dt,re.relatedTarget=V,Ee=null,ds(se)===W&&(ke=new ke(z,F+"enter",Ae,l,se),ke.target=V,ke.relatedTarget=Dt,Ee=ke),Dt=Ee,xe&&Ae)t:{for(ke=xe,z=Ae,F=0,V=ke;V;V=yo(V))F++;for(V=0,Ee=z;Ee;Ee=yo(Ee))V++;for(;0<F-V;)ke=yo(ke),F--;for(;0<V-F;)z=yo(z),V--;for(;F--;){if(ke===z||z!==null&&ke===z.alternate)break t;ke=yo(ke),z=yo(z)}ke=null}else ke=null;xe!==null&&Q_(ce,re,xe,ke,!1),Ae!==null&&Dt!==null&&Q_(ce,Dt,Ae,ke,!0)}}e:{if(re=W?bo(W):window,xe=re.nodeName&&re.nodeName.toLowerCase(),xe==="select"||xe==="input"&&re.type==="file")var Ne=$M;else if(N_(re))if(I_)Ne=WM;else{Ne=qM;var De=VM}else(xe=re.nodeName)&&xe.toLowerCase()==="input"&&(re.type==="checkbox"||re.type==="radio")&&(Ne=YM);if(Ne&&(Ne=Ne(i,W))){O_(ce,Ne,l,se);break e}De&&De(i,re,W),i==="focusout"&&(De=re._wrapperState)&&De.controlled&&re.type==="number"&&Ue(re,"number",re.value)}switch(De=W?bo(W):window,i){case"focusin":(N_(De)||De.contentEditable==="true")&&(go=De,Sp=W,tu=null);break;case"focusout":tu=Sp=go=null;break;case"mousedown":wp=!0;break;case"contextmenu":case"mouseup":case"dragend":wp=!1,U_(ce,l,se);break;case"selectionchange":if(QM)break;case"keydown":case"keyup":U_(ce,l,se)}var Me;if(Tp)e:{switch(i){case"compositionstart":var ze="onCompositionStart";break e;case"compositionend":ze="onCompositionEnd";break e;case"compositionupdate":ze="onCompositionUpdate";break e}ze=void 0}else mo?v_(i,l)&&(ze="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(ze="onCompositionStart");ze&&(w_&&l.locale!=="ko"&&(mo||ze!=="onCompositionStart"?ze==="onCompositionEnd"&&mo&&(Me=T_()):(Ai=se,hp="value"in Ai?Ai.value:Ai.textContent,mo=!0)),De=pc(W,ze),0<De.length&&(ze=new x_(ze,i,null,l,se),ce.push({event:ze,listeners:De}),Me?ze.data=Me:(Me=k_(l),Me!==null&&(ze.data=Me)))),(Me=BM?UM(i,l):HM(i,l))&&(W=pc(W,"onBeforeInput"),0<W.length&&(se=new x_("onBeforeInput","beforeinput",null,l,se),ce.push({event:se,listeners:W}),se.data=Me))}G_(ce,s)})}function iu(i,s,l){return{instance:i,listener:s,currentTarget:l}}function pc(i,s){for(var l=s+"Capture",h=[];i!==null;){var g=i,y=g.stateNode;g.tag===5&&y!==null&&(g=y,y=Ua(i,l),y!=null&&h.unshift(iu(i,y,g)),y=Ua(i,s),y!=null&&h.push(iu(i,y,g))),i=i.return}return h}function yo(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function Q_(i,s,l,h,g){for(var y=s._reactName,S=[];l!==null&&l!==h;){var I=l,D=I.alternate,W=I.stateNode;if(D!==null&&D===h)break;I.tag===5&&W!==null&&(I=W,g?(D=Ua(l,y),D!=null&&S.unshift(iu(l,D,I))):g||(D=Ua(l,y),D!=null&&S.push(iu(l,D,I)))),l=l.return}S.length!==0&&i.push({event:s,listeners:S})}var eF=/\r\n?/g,tF=/\u0000|\uFFFD/g;function X_(i){return(typeof i=="string"?i:""+i).replace(eF,`
26
+ `).replace(tF,"")}function mc(i,s,l){if(s=X_(s),X_(i)!==s&&l)throw Error(n(425))}function gc(){}var Op=null,Ip=null;function Pp(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 Rp=typeof setTimeout=="function"?setTimeout:void 0,nF=typeof clearTimeout=="function"?clearTimeout:void 0,J_=typeof Promise=="function"?Promise:void 0,rF=typeof queueMicrotask=="function"?queueMicrotask:typeof J_!="undefined"?function(i){return J_.resolve(null).then(i).catch(iF)}:Rp;function iF(i){setTimeout(function(){throw i})}function Lp(i,s){var l=s,h=0;do{var g=l.nextSibling;if(i.removeChild(l),g&&g.nodeType===8)if(l=g.data,l==="/$"){if(h===0){i.removeChild(g),Ga(s);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=g}while(l);Ga(s)}function ki(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 Z_(i){i=i.previousSibling;for(var s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(s===0)return i;s--}else l==="/$"&&s++}i=i.previousSibling}return null}var To=Math.random().toString(36).slice(2),Dr="__reactFiber$"+To,su="__reactProps$"+To,ei="__reactContainer$"+To,Dp="__reactEvents$"+To,sF="__reactListeners$"+To,oF="__reactHandles$"+To;function ds(i){var s=i[Dr];if(s)return s;for(var l=i.parentNode;l;){if(s=l[ei]||l[Dr]){if(l=s.alternate,s.child!==null||l!==null&&l.child!==null)for(i=Z_(i);i!==null;){if(l=i[Dr])return l;i=Z_(i)}return s}i=l,l=i.parentNode}return null}function ou(i){return i=i[Dr]||i[ei],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function bo(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Ec(i){return i[su]||null}var Mp=[],_o=-1;function Ni(i){return{current:i}}function yt(i){0>_o||(i.current=Mp[_o],Mp[_o]=null,_o--)}function pt(i,s){_o++,Mp[_o]=i.current,i.current=s}var Oi={},ln=Ni(Oi),An=Ni(!1),fs=Oi;function xo(i,s){var l=i.type.contextTypes;if(!l)return Oi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===s)return h.__reactInternalMemoizedMaskedChildContext;var g={},y;for(y in l)g[y]=s[y];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=s,i.__reactInternalMemoizedMaskedChildContext=g),g}function vn(i){return i=i.childContextTypes,i!=null}function yc(){yt(An),yt(ln)}function ex(i,s,l){if(ln.current!==Oi)throw Error(n(168));pt(ln,s),pt(An,l)}function tx(i,s,l){var h=i.stateNode;if(s=s.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var g in h)if(!(g in s))throw Error(n(108,Ge(i)||"Unknown",g));return w({},l,h)}function Tc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Oi,fs=ln.current,pt(ln,i),pt(An,An.current),!0}function nx(i,s,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=tx(i,s,fs),h.__reactInternalMemoizedMergedChildContext=i,yt(An),yt(ln),pt(ln,i)):yt(An),pt(An,l)}var ti=null,bc=!1,Fp=!1;function rx(i){ti===null?ti=[i]:ti.push(i)}function aF(i){bc=!0,rx(i)}function Ii(){if(!Fp&&ti!==null){Fp=!0;var i=0,s=ut;try{var l=ti;for(ut=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ti=null,bc=!1}catch(g){throw ti!==null&&(ti=ti.slice(i+1)),s_(sp,Ii),g}finally{ut=s,Fp=!1}}return null}var So=[],wo=0,_c=null,xc=0,Xn=[],Jn=0,hs=null,ni=1,ri="";function ps(i,s){So[wo++]=xc,So[wo++]=_c,_c=i,xc=s}function ix(i,s,l){Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=hs,hs=i;var h=ni;i=ri;var g=32-hr(h)-1;h&=~(1<<g),l+=1;var y=32-hr(s)+g;if(30<y){var S=g-g%5;y=(h&(1<<S)-1).toString(32),h>>=S,g-=S,ni=1<<32-hr(s)+g|l<<g|h,ri=y+i}else ni=1<<y|l<<g|h,ri=i}function Bp(i){i.return!==null&&(ps(i,1),ix(i,1,0))}function Up(i){for(;i===_c;)_c=So[--wo],So[wo]=null,xc=So[--wo],So[wo]=null;for(;i===hs;)hs=Xn[--Jn],Xn[Jn]=null,ri=Xn[--Jn],Xn[Jn]=null,ni=Xn[--Jn],Xn[Jn]=null}var Un=null,Hn=null,wt=!1,mr=null;function sx(i,s){var l=nr(5,null,null,0);l.elementType="DELETED",l.stateNode=s,l.return=i,s=i.deletions,s===null?(i.deletions=[l],i.flags|=16):s.push(l)}function ox(i,s){switch(i.tag){case 5:var l=i.type;return s=s.nodeType!==1||l.toLowerCase()!==s.nodeName.toLowerCase()?null:s,s!==null?(i.stateNode=s,Un=i,Hn=ki(s.firstChild),!0):!1;case 6:return s=i.pendingProps===""||s.nodeType!==3?null:s,s!==null?(i.stateNode=s,Un=i,Hn=null,!0):!1;case 13:return s=s.nodeType!==8?null:s,s!==null?(l=hs!==null?{id:ni,overflow:ri}:null,i.memoizedState={dehydrated:s,treeContext:l,retryLane:1073741824},l=nr(18,null,null,0),l.stateNode=s,l.return=i,i.child=l,Un=i,Hn=null,!0):!1;default:return!1}}function Hp(i){return(i.mode&1)!==0&&(i.flags&128)===0}function zp(i){if(wt){var s=Hn;if(s){var l=s;if(!ox(i,s)){if(Hp(i))throw Error(n(418));s=ki(l.nextSibling);var h=Un;s&&ox(i,s)?sx(h,l):(i.flags=i.flags&-4097|2,wt=!1,Un=i)}}else{if(Hp(i))throw Error(n(418));i.flags=i.flags&-4097|2,wt=!1,Un=i}}}function ax(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Un=i}function Sc(i){if(i!==Un)return!1;if(!wt)return ax(i),wt=!0,!1;var s;if((s=i.tag!==3)&&!(s=i.tag!==5)&&(s=i.type,s=s!=="head"&&s!=="body"&&!Pp(i.type,i.memoizedProps)),s&&(s=Hn)){if(Hp(i))throw ux(),Error(n(418));for(;s;)sx(i,s),s=ki(s.nextSibling)}if(ax(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,s=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(s===0){Hn=ki(i.nextSibling);break e}s--}else l!=="$"&&l!=="$!"&&l!=="$?"||s++}i=i.nextSibling}Hn=null}}else Hn=Un?ki(i.stateNode.nextSibling):null;return!0}function ux(){for(var i=Hn;i;)i=ki(i.nextSibling)}function Co(){Hn=Un=null,wt=!1}function jp(i){mr===null?mr=[i]:mr.push(i)}var uF=Y.ReactCurrentBatchConfig;function au(i,s,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var g=h,y=""+i;return s!==null&&s.ref!==null&&typeof s.ref=="function"&&s.ref._stringRef===y?s.ref:(s=function(S){var I=g.refs;S===null?delete I[y]:I[y]=S},s._stringRef=y,s)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function wc(i,s){throw i=Object.prototype.toString.call(s),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(s).join(", ")+"}":i))}function lx(i){var s=i._init;return s(i._payload)}function cx(i){function s(z,F){if(i){var V=z.deletions;V===null?(z.deletions=[F],z.flags|=16):V.push(F)}}function l(z,F){if(!i)return null;for(;F!==null;)s(z,F),F=F.sibling;return null}function h(z,F){for(z=new Map;F!==null;)F.key!==null?z.set(F.key,F):z.set(F.index,F),F=F.sibling;return z}function g(z,F){return z=Ui(z,F),z.index=0,z.sibling=null,z}function y(z,F,V){return z.index=V,i?(V=z.alternate,V!==null?(V=V.index,V<F?(z.flags|=2,F):V):(z.flags|=2,F)):(z.flags|=1048576,F)}function S(z){return i&&z.alternate===null&&(z.flags|=2),z}function I(z,F,V,Ee){return F===null||F.tag!==6?(F=Rm(V,z.mode,Ee),F.return=z,F):(F=g(F,V),F.return=z,F)}function D(z,F,V,Ee){var Ne=V.type;return Ne===te?se(z,F,V.props.children,Ee,V.key):F!==null&&(F.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&lx(Ne)===F.type)?(Ee=g(F,V.props),Ee.ref=au(z,F,V),Ee.return=z,Ee):(Ee=Gc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=au(z,F,V),Ee.return=z,Ee)}function W(z,F,V,Ee){return F===null||F.tag!==4||F.stateNode.containerInfo!==V.containerInfo||F.stateNode.implementation!==V.implementation?(F=Lm(V,z.mode,Ee),F.return=z,F):(F=g(F,V.children||[]),F.return=z,F)}function se(z,F,V,Ee,Ne){return F===null||F.tag!==7?(F=xs(V,z.mode,Ee,Ne),F.return=z,F):(F=g(F,V),F.return=z,F)}function ce(z,F,V){if(typeof F=="string"&&F!==""||typeof F=="number")return F=Rm(""+F,z.mode,V),F.return=z,F;if(typeof F=="object"&&F!==null){switch(F.$$typeof){case X:return V=Gc(F.type,F.key,F.props,null,z.mode,V),V.ref=au(z,null,F),V.return=z,V;case B:return F=Lm(F,z.mode,V),F.return=z,F;case Ce:var Ee=F._init;return ce(z,Ee(F._payload),V)}if(je(F)||ne(F))return F=xs(F,z.mode,V,null),F.return=z,F;wc(z,F)}return null}function re(z,F,V,Ee){var Ne=F!==null?F.key:null;if(typeof V=="string"&&V!==""||typeof V=="number")return Ne!==null?null:I(z,F,""+V,Ee);if(typeof V=="object"&&V!==null){switch(V.$$typeof){case X:return V.key===Ne?D(z,F,V,Ee):null;case B:return V.key===Ne?W(z,F,V,Ee):null;case Ce:return Ne=V._init,re(z,F,Ne(V._payload),Ee)}if(je(V)||ne(V))return Ne!==null?null:se(z,F,V,Ee,null);wc(z,V)}return null}function xe(z,F,V,Ee,Ne){if(typeof Ee=="string"&&Ee!==""||typeof Ee=="number")return z=z.get(V)||null,I(F,z,""+Ee,Ne);if(typeof Ee=="object"&&Ee!==null){switch(Ee.$$typeof){case X:return z=z.get(Ee.key===null?V:Ee.key)||null,D(F,z,Ee,Ne);case B:return z=z.get(Ee.key===null?V:Ee.key)||null,W(F,z,Ee,Ne);case Ce:var De=Ee._init;return xe(z,F,V,De(Ee._payload),Ne)}if(je(Ee)||ne(Ee))return z=z.get(V)||null,se(F,z,Ee,Ne,null);wc(F,Ee)}return null}function Ae(z,F,V,Ee){for(var Ne=null,De=null,Me=F,ze=F=0,Kt=null;Me!==null&&ze<V.length;ze++){Me.index>ze?(Kt=Me,Me=null):Kt=Me.sibling;var it=re(z,Me,V[ze],Ee);if(it===null){Me===null&&(Me=Kt);break}i&&Me&&it.alternate===null&&s(z,Me),F=y(it,F,ze),De===null?Ne=it:De.sibling=it,De=it,Me=Kt}if(ze===V.length)return l(z,Me),wt&&ps(z,ze),Ne;if(Me===null){for(;ze<V.length;ze++)Me=ce(z,V[ze],Ee),Me!==null&&(F=y(Me,F,ze),De===null?Ne=Me:De.sibling=Me,De=Me);return wt&&ps(z,ze),Ne}for(Me=h(z,Me);ze<V.length;ze++)Kt=xe(Me,z,ze,V[ze],Ee),Kt!==null&&(i&&Kt.alternate!==null&&Me.delete(Kt.key===null?ze:Kt.key),F=y(Kt,F,ze),De===null?Ne=Kt:De.sibling=Kt,De=Kt);return i&&Me.forEach(function(Hi){return s(z,Hi)}),wt&&ps(z,ze),Ne}function ke(z,F,V,Ee){var Ne=ne(V);if(typeof Ne!="function")throw Error(n(150));if(V=Ne.call(V),V==null)throw Error(n(151));for(var De=Ne=null,Me=F,ze=F=0,Kt=null,it=V.next();Me!==null&&!it.done;ze++,it=V.next()){Me.index>ze?(Kt=Me,Me=null):Kt=Me.sibling;var Hi=re(z,Me,it.value,Ee);if(Hi===null){Me===null&&(Me=Kt);break}i&&Me&&Hi.alternate===null&&s(z,Me),F=y(Hi,F,ze),De===null?Ne=Hi:De.sibling=Hi,De=Hi,Me=Kt}if(it.done)return l(z,Me),wt&&ps(z,ze),Ne;if(Me===null){for(;!it.done;ze++,it=V.next())it=ce(z,it.value,Ee),it!==null&&(F=y(it,F,ze),De===null?Ne=it:De.sibling=it,De=it);return wt&&ps(z,ze),Ne}for(Me=h(z,Me);!it.done;ze++,it=V.next())it=xe(Me,z,ze,it.value,Ee),it!==null&&(i&&it.alternate!==null&&Me.delete(it.key===null?ze:it.key),F=y(it,F,ze),De===null?Ne=it:De.sibling=it,De=it);return i&&Me.forEach(function(zF){return s(z,zF)}),wt&&ps(z,ze),Ne}function Dt(z,F,V,Ee){if(typeof V=="object"&&V!==null&&V.type===te&&V.key===null&&(V=V.props.children),typeof V=="object"&&V!==null){switch(V.$$typeof){case X:e:{for(var Ne=V.key,De=F;De!==null;){if(De.key===Ne){if(Ne=V.type,Ne===te){if(De.tag===7){l(z,De.sibling),F=g(De,V.props.children),F.return=z,z=F;break e}}else if(De.elementType===Ne||typeof Ne=="object"&&Ne!==null&&Ne.$$typeof===Ce&&lx(Ne)===De.type){l(z,De.sibling),F=g(De,V.props),F.ref=au(z,De,V),F.return=z,z=F;break e}l(z,De);break}else s(z,De);De=De.sibling}V.type===te?(F=xs(V.props.children,z.mode,Ee,V.key),F.return=z,z=F):(Ee=Gc(V.type,V.key,V.props,null,z.mode,Ee),Ee.ref=au(z,F,V),Ee.return=z,z=Ee)}return S(z);case B:e:{for(De=V.key;F!==null;){if(F.key===De)if(F.tag===4&&F.stateNode.containerInfo===V.containerInfo&&F.stateNode.implementation===V.implementation){l(z,F.sibling),F=g(F,V.children||[]),F.return=z,z=F;break e}else{l(z,F);break}else s(z,F);F=F.sibling}F=Lm(V,z.mode,Ee),F.return=z,z=F}return S(z);case Ce:return De=V._init,Dt(z,F,De(V._payload),Ee)}if(je(V))return Ae(z,F,V,Ee);if(ne(V))return ke(z,F,V,Ee);wc(z,V)}return typeof V=="string"&&V!==""||typeof V=="number"?(V=""+V,F!==null&&F.tag===6?(l(z,F.sibling),F=g(F,V),F.return=z,z=F):(l(z,F),F=Rm(V,z.mode,Ee),F.return=z,z=F),S(z)):l(z,F)}return Dt}var Ao=cx(!0),dx=cx(!1),Cc=Ni(null),Ac=null,vo=null,$p=null;function Vp(){$p=vo=Ac=null}function qp(i){var s=Cc.current;yt(Cc),i._currentValue=s}function Yp(i,s,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&s)!==s?(i.childLanes|=s,h!==null&&(h.childLanes|=s)):h!==null&&(h.childLanes&s)!==s&&(h.childLanes|=s),i===l)break;i=i.return}}function ko(i,s){Ac=i,$p=vo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&s)!==0&&(kn=!0),i.firstContext=null)}function Zn(i){var s=i._currentValue;if($p!==i)if(i={context:i,memoizedValue:s,next:null},vo===null){if(Ac===null)throw Error(n(308));vo=i,Ac.dependencies={lanes:0,firstContext:i}}else vo=vo.next=i;return s}var ms=null;function Wp(i){ms===null?ms=[i]:ms.push(i)}function fx(i,s,l,h){var g=s.interleaved;return g===null?(l.next=l,Wp(s)):(l.next=g.next,g.next=l),s.interleaved=l,ii(i,h)}function ii(i,s){i.lanes|=s;var l=i.alternate;for(l!==null&&(l.lanes|=s),l=i,i=i.return;i!==null;)i.childLanes|=s,l=i.alternate,l!==null&&(l.childLanes|=s),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Pi=!1;function Gp(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function hx(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 si(i,s){return{eventTime:i,lane:s,tag:0,payload:null,callback:null,next:null}}function Ri(i,s,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(nt&2)!==0){var g=h.pending;return g===null?s.next=s:(s.next=g.next,g.next=s),h.pending=s,ii(i,l)}return g=h.interleaved,g===null?(s.next=s,Wp(h)):(s.next=g.next,g.next=s),h.interleaved=s,ii(i,l)}function vc(i,s,l){if(s=s.updateQueue,s!==null&&(s=s.shared,(l&4194240)!==0)){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,up(i,l)}}function px(i,s){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var g=null,y=null;if(l=l.firstBaseUpdate,l!==null){do{var S={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};y===null?g=y=S:y=y.next=S,l=l.next}while(l!==null);y===null?g=y=s:y=y.next=s}else g=y=s;l={baseState:h.baseState,firstBaseUpdate:g,lastBaseUpdate:y,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=s:i.next=s,l.lastBaseUpdate=s}function kc(i,s,l,h){var g=i.updateQueue;Pi=!1;var y=g.firstBaseUpdate,S=g.lastBaseUpdate,I=g.shared.pending;if(I!==null){g.shared.pending=null;var D=I,W=D.next;D.next=null,S===null?y=W:S.next=W,S=D;var se=i.alternate;se!==null&&(se=se.updateQueue,I=se.lastBaseUpdate,I!==S&&(I===null?se.firstBaseUpdate=W:I.next=W,se.lastBaseUpdate=D))}if(y!==null){var ce=g.baseState;S=0,se=W=D=null,I=y;do{var re=I.lane,xe=I.eventTime;if((h&re)===re){se!==null&&(se=se.next={eventTime:xe,lane:0,tag:I.tag,payload:I.payload,callback:I.callback,next:null});e:{var Ae=i,ke=I;switch(re=s,xe=l,ke.tag){case 1:if(Ae=ke.payload,typeof Ae=="function"){ce=Ae.call(xe,ce,re);break e}ce=Ae;break e;case 3:Ae.flags=Ae.flags&-65537|128;case 0:if(Ae=ke.payload,re=typeof Ae=="function"?Ae.call(xe,ce,re):Ae,re==null)break e;ce=w({},ce,re);break e;case 2:Pi=!0}}I.callback!==null&&I.lane!==0&&(i.flags|=64,re=g.effects,re===null?g.effects=[I]:re.push(I))}else xe={eventTime:xe,lane:re,tag:I.tag,payload:I.payload,callback:I.callback,next:null},se===null?(W=se=xe,D=ce):se=se.next=xe,S|=re;if(I=I.next,I===null){if(I=g.shared.pending,I===null)break;re=I,I=re.next,re.next=null,g.lastBaseUpdate=re,g.shared.pending=null}}while(!0);if(se===null&&(D=ce),g.baseState=D,g.firstBaseUpdate=W,g.lastBaseUpdate=se,s=g.shared.interleaved,s!==null){g=s;do S|=g.lane,g=g.next;while(g!==s)}else y===null&&(g.shared.lanes=0);ys|=S,i.lanes=S,i.memoizedState=ce}}function mx(i,s,l){if(i=s.effects,s.effects=null,i!==null)for(s=0;s<i.length;s++){var h=i[s],g=h.callback;if(g!==null){if(h.callback=null,h=l,typeof g!="function")throw Error(n(191,g));g.call(h)}}}var uu={},Mr=Ni(uu),lu=Ni(uu),cu=Ni(uu);function gs(i){if(i===uu)throw Error(n(174));return i}function Kp(i,s){switch(pt(cu,s),pt(lu,i),pt(Mr,uu),i=s.nodeType,i){case 9:case 11:s=(s=s.documentElement)?s.namespaceURI:fe(null,"");break;default:i=i===8?s.parentNode:s,s=i.namespaceURI||null,i=i.tagName,s=fe(s,i)}yt(Mr),pt(Mr,s)}function No(){yt(Mr),yt(lu),yt(cu)}function gx(i){gs(cu.current);var s=gs(Mr.current),l=fe(s,i.type);s!==l&&(pt(lu,i),pt(Mr,l))}function Qp(i){lu.current===i&&(yt(Mr),yt(lu))}var At=Ni(0);function Nc(i){for(var s=i;s!==null;){if(s.tag===13){var l=s.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return s}else if(s.tag===19&&s.memoizedProps.revealOrder!==void 0){if((s.flags&128)!==0)return s}else if(s.child!==null){s.child.return=s,s=s.child;continue}if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return null;s=s.return}s.sibling.return=s.return,s=s.sibling}return null}var Xp=[];function Jp(){for(var i=0;i<Xp.length;i++)Xp[i]._workInProgressVersionPrimary=null;Xp.length=0}var Oc=Y.ReactCurrentDispatcher,Zp=Y.ReactCurrentBatchConfig,Es=0,vt=null,Ht=null,Wt=null,Ic=!1,du=!1,fu=0,lF=0;function cn(){throw Error(n(321))}function em(i,s){if(s===null)return!1;for(var l=0;l<s.length&&l<i.length;l++)if(!pr(i[l],s[l]))return!1;return!0}function tm(i,s,l,h,g,y){if(Es=y,vt=s,s.memoizedState=null,s.updateQueue=null,s.lanes=0,Oc.current=i===null||i.memoizedState===null?hF:pF,i=l(h,g),du){y=0;do{if(du=!1,fu=0,25<=y)throw Error(n(301));y+=1,Wt=Ht=null,s.updateQueue=null,Oc.current=mF,i=l(h,g)}while(du)}if(Oc.current=Lc,s=Ht!==null&&Ht.next!==null,Es=0,Wt=Ht=vt=null,Ic=!1,s)throw Error(n(300));return i}function nm(){var i=fu!==0;return fu=0,i}function Fr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Wt===null?vt.memoizedState=Wt=i:Wt=Wt.next=i,Wt}function er(){if(Ht===null){var i=vt.alternate;i=i!==null?i.memoizedState:null}else i=Ht.next;var s=Wt===null?vt.memoizedState:Wt.next;if(s!==null)Wt=s,Ht=i;else{if(i===null)throw Error(n(310));Ht=i,i={memoizedState:Ht.memoizedState,baseState:Ht.baseState,baseQueue:Ht.baseQueue,queue:Ht.queue,next:null},Wt===null?vt.memoizedState=Wt=i:Wt=Wt.next=i}return Wt}function hu(i,s){return typeof s=="function"?s(i):s}function rm(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Ht,g=h.baseQueue,y=l.pending;if(y!==null){if(g!==null){var S=g.next;g.next=y.next,y.next=S}h.baseQueue=g=y,l.pending=null}if(g!==null){y=g.next,h=h.baseState;var I=S=null,D=null,W=y;do{var se=W.lane;if((Es&se)===se)D!==null&&(D=D.next={lane:0,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null}),h=W.hasEagerState?W.eagerState:i(h,W.action);else{var ce={lane:se,action:W.action,hasEagerState:W.hasEagerState,eagerState:W.eagerState,next:null};D===null?(I=D=ce,S=h):D=D.next=ce,vt.lanes|=se,ys|=se}W=W.next}while(W!==null&&W!==y);D===null?S=h:D.next=I,pr(h,s.memoizedState)||(kn=!0),s.memoizedState=h,s.baseState=S,s.baseQueue=D,l.lastRenderedState=h}if(i=l.interleaved,i!==null){g=i;do y=g.lane,vt.lanes|=y,ys|=y,g=g.next;while(g!==i)}else g===null&&(l.lanes=0);return[s.memoizedState,l.dispatch]}function im(i){var s=er(),l=s.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,g=l.pending,y=s.memoizedState;if(g!==null){l.pending=null;var S=g=g.next;do y=i(y,S.action),S=S.next;while(S!==g);pr(y,s.memoizedState)||(kn=!0),s.memoizedState=y,s.baseQueue===null&&(s.baseState=y),l.lastRenderedState=y}return[y,h]}function Ex(){}function yx(i,s){var l=vt,h=er(),g=s(),y=!pr(h.memoizedState,g);if(y&&(h.memoizedState=g,kn=!0),h=h.queue,sm(_x.bind(null,l,h,i),[i]),h.getSnapshot!==s||y||Wt!==null&&Wt.memoizedState.tag&1){if(l.flags|=2048,pu(9,bx.bind(null,l,h,g,s),void 0,null),Gt===null)throw Error(n(349));(Es&30)!==0||Tx(l,s,g)}return g}function Tx(i,s,l){i.flags|=16384,i={getSnapshot:s,value:l},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.stores=[i]):(l=s.stores,l===null?s.stores=[i]:l.push(i))}function bx(i,s,l,h){s.value=l,s.getSnapshot=h,xx(s)&&Sx(i)}function _x(i,s,l){return l(function(){xx(s)&&Sx(i)})}function xx(i){var s=i.getSnapshot;i=i.value;try{var l=s();return!pr(i,l)}catch(h){return!0}}function Sx(i){var s=ii(i,1);s!==null&&Tr(s,i,1,-1)}function wx(i){var s=Fr();return typeof i=="function"&&(i=i()),s.memoizedState=s.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:hu,lastRenderedState:i},s.queue=i,i=i.dispatch=fF.bind(null,vt,i),[s.memoizedState,i]}function pu(i,s,l,h){return i={tag:i,create:s,destroy:l,deps:h,next:null},s=vt.updateQueue,s===null?(s={lastEffect:null,stores:null},vt.updateQueue=s,s.lastEffect=i.next=i):(l=s.lastEffect,l===null?s.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,s.lastEffect=i)),i}function Cx(){return er().memoizedState}function Pc(i,s,l,h){var g=Fr();vt.flags|=i,g.memoizedState=pu(1|s,l,void 0,h===void 0?null:h)}function Rc(i,s,l,h){var g=er();h=h===void 0?null:h;var y=void 0;if(Ht!==null){var S=Ht.memoizedState;if(y=S.destroy,h!==null&&em(h,S.deps)){g.memoizedState=pu(s,l,y,h);return}}vt.flags|=i,g.memoizedState=pu(1|s,l,y,h)}function Ax(i,s){return Pc(8390656,8,i,s)}function sm(i,s){return Rc(2048,8,i,s)}function vx(i,s){return Rc(4,2,i,s)}function kx(i,s){return Rc(4,4,i,s)}function Nx(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 Ox(i,s,l){return l=l!=null?l.concat([i]):null,Rc(4,4,Nx.bind(null,s,i),l)}function om(){}function Ix(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&em(s,h[1])?h[0]:(l.memoizedState=[i,s],i)}function Px(i,s){var l=er();s=s===void 0?null:s;var h=l.memoizedState;return h!==null&&s!==null&&em(s,h[1])?h[0]:(i=i(),l.memoizedState=[i,s],i)}function Rx(i,s,l){return(Es&21)===0?(i.baseState&&(i.baseState=!1,kn=!0),i.memoizedState=l):(pr(l,s)||(l=l_(),vt.lanes|=l,ys|=l,i.baseState=!0),s)}function cF(i,s){var l=ut;ut=l!==0&&4>l?l:4,i(!0);var h=Zp.transition;Zp.transition={};try{i(!1),s()}finally{ut=l,Zp.transition=h}}function Lx(){return er().memoizedState}function dF(i,s,l){var h=Fi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Dx(i))Mx(s,l);else if(l=fx(i,s,l,h),l!==null){var g=En();Tr(l,i,h,g),Fx(l,s,h)}}function fF(i,s,l){var h=Fi(i),g={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Dx(i))Mx(s,g);else{var y=i.alternate;if(i.lanes===0&&(y===null||y.lanes===0)&&(y=s.lastRenderedReducer,y!==null))try{var S=s.lastRenderedState,I=y(S,l);if(g.hasEagerState=!0,g.eagerState=I,pr(I,S)){var D=s.interleaved;D===null?(g.next=g,Wp(s)):(g.next=D.next,D.next=g),s.interleaved=g;return}}catch(W){}l=fx(i,s,g,h),l!==null&&(g=En(),Tr(l,i,h,g),Fx(l,s,h))}}function Dx(i){var s=i.alternate;return i===vt||s!==null&&s===vt}function Mx(i,s){du=Ic=!0;var l=i.pending;l===null?s.next=s:(s.next=l.next,l.next=s),i.pending=s}function Fx(i,s,l){if((l&4194240)!==0){var h=s.lanes;h&=i.pendingLanes,l|=h,s.lanes=l,up(i,l)}}var Lc={readContext:Zn,useCallback:cn,useContext:cn,useEffect:cn,useImperativeHandle:cn,useInsertionEffect:cn,useLayoutEffect:cn,useMemo:cn,useReducer:cn,useRef:cn,useState:cn,useDebugValue:cn,useDeferredValue:cn,useTransition:cn,useMutableSource:cn,useSyncExternalStore:cn,useId:cn,unstable_isNewReconciler:!1},hF={readContext:Zn,useCallback:function(i,s){return Fr().memoizedState=[i,s===void 0?null:s],i},useContext:Zn,useEffect:Ax,useImperativeHandle:function(i,s,l){return l=l!=null?l.concat([i]):null,Pc(4194308,4,Nx.bind(null,s,i),l)},useLayoutEffect:function(i,s){return Pc(4194308,4,i,s)},useInsertionEffect:function(i,s){return Pc(4,2,i,s)},useMemo:function(i,s){var l=Fr();return s=s===void 0?null:s,i=i(),l.memoizedState=[i,s],i},useReducer:function(i,s,l){var h=Fr();return s=l!==void 0?l(s):s,h.memoizedState=h.baseState=s,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:s},h.queue=i,i=i.dispatch=dF.bind(null,vt,i),[h.memoizedState,i]},useRef:function(i){var s=Fr();return i={current:i},s.memoizedState=i},useState:wx,useDebugValue:om,useDeferredValue:function(i){return Fr().memoizedState=i},useTransition:function(){var i=wx(!1),s=i[0];return i=cF.bind(null,i[1]),Fr().memoizedState=i,[s,i]},useMutableSource:function(){},useSyncExternalStore:function(i,s,l){var h=vt,g=Fr();if(wt){if(l===void 0)throw Error(n(407));l=l()}else{if(l=s(),Gt===null)throw Error(n(349));(Es&30)!==0||Tx(h,s,l)}g.memoizedState=l;var y={value:l,getSnapshot:s};return g.queue=y,Ax(_x.bind(null,h,y,i),[i]),h.flags|=2048,pu(9,bx.bind(null,h,y,l,s),void 0,null),l},useId:function(){var i=Fr(),s=Gt.identifierPrefix;if(wt){var l=ri,h=ni;l=(h&~(1<<32-hr(h)-1)).toString(32)+l,s=":"+s+"R"+l,l=fu++,0<l&&(s+="H"+l.toString(32)),s+=":"}else l=lF++,s=":"+s+"r"+l.toString(32)+":";return i.memoizedState=s},unstable_isNewReconciler:!1},pF={readContext:Zn,useCallback:Ix,useContext:Zn,useEffect:sm,useImperativeHandle:Ox,useInsertionEffect:vx,useLayoutEffect:kx,useMemo:Px,useReducer:rm,useRef:Cx,useState:function(){return rm(hu)},useDebugValue:om,useDeferredValue:function(i){var s=er();return Rx(s,Ht.memoizedState,i)},useTransition:function(){var i=rm(hu)[0],s=er().memoizedState;return[i,s]},useMutableSource:Ex,useSyncExternalStore:yx,useId:Lx,unstable_isNewReconciler:!1},mF={readContext:Zn,useCallback:Ix,useContext:Zn,useEffect:sm,useImperativeHandle:Ox,useInsertionEffect:vx,useLayoutEffect:kx,useMemo:Px,useReducer:im,useRef:Cx,useState:function(){return im(hu)},useDebugValue:om,useDeferredValue:function(i){var s=er();return Ht===null?s.memoizedState=i:Rx(s,Ht.memoizedState,i)},useTransition:function(){var i=im(hu)[0],s=er().memoizedState;return[i,s]},useMutableSource:Ex,useSyncExternalStore:yx,useId:Lx,unstable_isNewReconciler:!1};function gr(i,s){if(i&&i.defaultProps){s=w({},s),i=i.defaultProps;for(var l in i)s[l]===void 0&&(s[l]=i[l]);return s}return s}function am(i,s,l,h){s=i.memoizedState,l=l(h,s),l=l==null?s:w({},s,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var Dc={isMounted:function(i){return(i=i._reactInternals)?cs(i)===i:!1},enqueueSetState:function(i,s,l){i=i._reactInternals;var h=En(),g=Fi(i),y=si(h,g);y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(Tr(s,i,g,h),vc(s,i,g))},enqueueReplaceState:function(i,s,l){i=i._reactInternals;var h=En(),g=Fi(i),y=si(h,g);y.tag=1,y.payload=s,l!=null&&(y.callback=l),s=Ri(i,y,g),s!==null&&(Tr(s,i,g,h),vc(s,i,g))},enqueueForceUpdate:function(i,s){i=i._reactInternals;var l=En(),h=Fi(i),g=si(l,h);g.tag=2,s!=null&&(g.callback=s),s=Ri(i,g,h),s!==null&&(Tr(s,i,h,l),vc(s,i,h))}};function Bx(i,s,l,h,g,y,S){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,y,S):s.prototype&&s.prototype.isPureReactComponent?!eu(l,h)||!eu(g,y):!0}function Ux(i,s,l){var h=!1,g=Oi,y=s.contextType;return typeof y=="object"&&y!==null?y=Zn(y):(g=vn(s)?fs:ln.current,h=s.contextTypes,y=(h=h!=null)?xo(i,g):Oi),s=new s(l,y),i.memoizedState=s.state!==null&&s.state!==void 0?s.state:null,s.updater=Dc,i.stateNode=s,s._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=g,i.__reactInternalMemoizedMaskedChildContext=y),s}function Hx(i,s,l,h){i=s.state,typeof s.componentWillReceiveProps=="function"&&s.componentWillReceiveProps(l,h),typeof s.UNSAFE_componentWillReceiveProps=="function"&&s.UNSAFE_componentWillReceiveProps(l,h),s.state!==i&&Dc.enqueueReplaceState(s,s.state,null)}function um(i,s,l,h){var g=i.stateNode;g.props=l,g.state=i.memoizedState,g.refs={},Gp(i);var y=s.contextType;typeof y=="object"&&y!==null?g.context=Zn(y):(y=vn(s)?fs:ln.current,g.context=xo(i,y)),g.state=i.memoizedState,y=s.getDerivedStateFromProps,typeof y=="function"&&(am(i,s,y,l),g.state=i.memoizedState),typeof s.getDerivedStateFromProps=="function"||typeof g.getSnapshotBeforeUpdate=="function"||typeof g.UNSAFE_componentWillMount!="function"&&typeof g.componentWillMount!="function"||(s=g.state,typeof g.componentWillMount=="function"&&g.componentWillMount(),typeof g.UNSAFE_componentWillMount=="function"&&g.UNSAFE_componentWillMount(),s!==g.state&&Dc.enqueueReplaceState(g,g.state,null),kc(i,l,g,h),g.state=i.memoizedState),typeof g.componentDidMount=="function"&&(i.flags|=4194308)}function Oo(i,s){try{var l="",h=s;do l+=Re(h),h=h.return;while(h);var g=l}catch(y){g=`
27
27
  Error generating stack: `+y.message+`
28
- `+y.stack}return{value:i,source:s,stack:g,digest:null}}function am(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function um(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var gF=typeof WeakMap=="function"?WeakMap:Map;function Hx(i,s,l){l=si(-1,l),l.tag=3,l.payload={element:null};var f=s.value;return l.callback=function(){Hc||(Hc=!0,Sm=f),um(i,s)},l}function zx(i,s,l){l=si(-1,l),l.tag=3;var f=i.type.getDerivedStateFromError;if(typeof f=="function"){var g=s.value;l.payload=function(){return f(g)},l.callback=function(){um(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){um(i,s),typeof f!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var x=s.stack;this.componentDidCatch(s.value,{componentStack:x!==null?x:""})}),l}function jx(i,s,l){var f=i.pingCache;if(f===null){f=i.pingCache=new gF;var g=new Set;f.set(s,g)}else g=f.get(s),g===void 0&&(g=new Set,f.set(s,g));g.has(l)||(g.add(l),i=OF.bind(null,i,s,l),s.then(i,i))}function $x(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 Vx(i,s,l,f,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=si(-1,1),s.tag=2,Ri(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var EF=Y.ReactCurrentOwner,kn=!1;function gn(i,s,l,f){s.child=i===null?cx(s,null,l,f):Ao(s,i.child,l,f)}function qx(i,s,l,f,g){l=l.render;var y=s.ref;return vo(s,g),f=Zp(i,s,l,f,y,g),l=em(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(xt&&l&&Mp(s),s.flags|=1,gn(i,s,f,g),s.child)}function Yx(i,s,l,f,g){if(i===null){var y=l.type;return typeof y=="function"&&!Om(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Wx(i,s,y,f,g)):(i=Yc(l.type,null,f,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var x=y.memoizedProps;if(l=l.compare,l=l!==null?l:Xa,l(x,f)&&i.ref===s.ref)return oi(i,s,g)}return s.flags|=1,i=Ui(y,f),i.ref=s.ref,i.return=s,s.child=i}function Wx(i,s,l,f,g){if(i!==null){var y=i.memoizedProps;if(Xa(y,f)&&i.ref===s.ref)if(kn=!1,s.pendingProps=f=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,oi(i,s,g)}return lm(i,s,l,f,g)}function Gx(i,s,l){var f=s.pendingProps,g=f.children,y=i!==null?i.memoizedState:null;if(f.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},ht(Io,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,ht(Io,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},f=y!==null?y.baseLanes:l,ht(Io,zn),zn|=f}else y!==null?(f=y.baseLanes|l,s.memoizedState=null):f=l,ht(Io,zn),zn|=f;return gn(i,s,g,l),s.child}function Kx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function lm(i,s,l,f,g){var y=vn(l)?fs:ln.current;return y=_o(s,y),vo(s,g),l=Zp(i,s,l,f,y,g),f=em(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(xt&&f&&Mp(s),s.flags|=1,gn(i,s,l,g),s.child)}function Qx(i,s,l,f,g){if(vn(l)){var y=!0;Ec(s)}else y=!1;if(vo(s,g),s.stateNode===null)Dc(i,s),Bx(s,l,f),om(s,l,f,g),f=!0;else if(i===null){var x=s.stateNode,I=s.memoizedProps;x.props=I;var L=x.context,G=l.contextType;typeof G=="object"&&G!==null?G=Zn(G):(G=vn(l)?fs:ln.current,G=_o(s,G));var oe=l.getDerivedStateFromProps,ce=typeof oe=="function"||typeof x.getSnapshotBeforeUpdate=="function";ce||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==f||L!==G)&&Ux(s,x,f,G),Pi=!1;var ie=s.memoizedState;x.state=ie,Cc(s,f,x,g),L=s.memoizedState,I!==f||ie!==L||Cn.current||Pi?(typeof oe=="function"&&(sm(s,l,oe,f),L=s.memoizedState),(I=Pi||Fx(s,l,I,f,ie,L,G))?(ce||typeof x.UNSAFE_componentWillMount!="function"&&typeof x.componentWillMount!="function"||(typeof x.componentWillMount=="function"&&x.componentWillMount(),typeof x.UNSAFE_componentWillMount=="function"&&x.UNSAFE_componentWillMount()),typeof x.componentDidMount=="function"&&(s.flags|=4194308)):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),s.memoizedProps=f,s.memoizedState=L),x.props=f,x.state=L,x.context=G,f=I):(typeof x.componentDidMount=="function"&&(s.flags|=4194308),f=!1)}else{x=s.stateNode,fx(i,s),I=s.memoizedProps,G=s.type===s.elementType?I:gr(s.type,I),x.props=G,ce=s.pendingProps,ie=x.context,L=l.contextType,typeof L=="object"&&L!==null?L=Zn(L):(L=vn(l)?fs:ln.current,L=_o(s,L));var xe=l.getDerivedStateFromProps;(oe=typeof xe=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(I!==ce||ie!==L)&&Ux(s,x,f,L),Pi=!1,ie=s.memoizedState,x.state=ie,Cc(s,f,x,g);var Ce=s.memoizedState;I!==ce||ie!==Ce||Cn.current||Pi?(typeof xe=="function"&&(sm(s,l,xe,f),Ce=s.memoizedState),(G=Pi||Fx(s,l,G,f,ie,Ce,L)||!1)?(oe||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(f,Ce,L),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(f,Ce,L)),typeof x.componentDidUpdate=="function"&&(s.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=1024),s.memoizedProps=f,s.memoizedState=Ce),x.props=f,x.state=Ce,x.context=L,f=G):(typeof x.componentDidUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&ie===i.memoizedState||(s.flags|=1024),f=!1)}return cm(i,s,l,f,y,g)}function cm(i,s,l,f,g,y){Kx(i,s);var x=(s.flags&128)!==0;if(!f&&!x)return g&&tx(s,l,!1),oi(i,s,y);f=s.stateNode,EF.current=s;var I=x&&typeof l.getDerivedStateFromError!="function"?null:f.render();return s.flags|=1,i!==null&&x?(s.child=Ao(s,i.child,null,y),s.child=Ao(s,null,I,y)):gn(i,s,I,y),s.memoizedState=f.state,g&&tx(s,l,!0),s.child}function Xx(i){var s=i.stateNode;s.pendingContext?Z_(i,s.pendingContext,s.pendingContext!==s.context):s.context&&Z_(i,s.context,!1),Wp(i,s.containerInfo)}function Jx(i,s,l,f,g){return wo(),Hp(g),s.flags|=256,gn(i,s,l,f),s.child}var dm={dehydrated:null,treeContext:null,retryLane:0};function fm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Zx(i,s,l){var f=s.pendingProps,g=At.current,y=!1,x=(s.flags&128)!==0,I;if((I=x)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),ht(At,g&1),i===null)return Up(s),i=s.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((s.mode&1)===0?s.lanes=1:i.data==="$!"?s.lanes=8:s.lanes=1073741824,null):(x=f.children,i=f.fallback,y?(f=s.mode,y=s.child,x={mode:"hidden",children:x},(f&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=x):y=Wc(x,f,0,null),i=xs(i,f,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=fm(l),s.memoizedState=dm,i):hm(s,x));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return yF(i,s,x,f,I,g,l);if(y){y=f.fallback,x=s.mode,g=i.child,I=g.sibling;var L={mode:"hidden",children:f.children};return(x&1)===0&&s.child!==g?(f=s.child,f.childLanes=0,f.pendingProps=L,s.deletions=null):(f=Ui(g,L),f.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=Ui(I,y):(y=xs(y,x,l,null),y.flags|=2),y.return=s,f.return=s,f.sibling=y,s.child=f,f=y,y=s.child,x=i.child.memoizedState,x=x===null?fm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},y.memoizedState=x,y.childLanes=i.childLanes&~l,s.memoizedState=dm,f}return y=i.child,i=y.sibling,f=Ui(y,{mode:"visible",children:f.children}),(s.mode&1)===0&&(f.lanes=l),f.return=s,f.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=f,s.memoizedState=null,f}function hm(i,s){return s=Wc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Lc(i,s,l,f){return f!==null&&Hp(f),Ao(s,i.child,null,l),i=hm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function yF(i,s,l,f,g,y,x){if(l)return s.flags&256?(s.flags&=-257,f=am(Error(n(422))),Lc(i,s,x,f)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=f.fallback,g=s.mode,f=Wc({mode:"visible",children:f.children},g,0,null),y=xs(y,g,x,null),y.flags|=2,f.return=s,y.return=s,f.sibling=y,s.child=f,(s.mode&1)!==0&&Ao(s,i.child,null,x),s.child.memoizedState=fm(x),s.memoizedState=dm,y);if((s.mode&1)===0)return Lc(i,s,x,null);if(g.data==="$!"){if(f=g.nextSibling&&g.nextSibling.dataset,f)var I=f.dgst;return f=I,y=Error(n(419)),f=am(y,f,void 0),Lc(i,s,x,f)}if(I=(x&i.childLanes)!==0,kn||I){if(f=Gt,f!==null){switch(x&-x){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(f.suspendedLanes|x))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,ii(i,g),Tr(f,i,g,-1))}return Nm(),f=am(Error(n(421))),Lc(i,s,x,f)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=IF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=ki(g.nextSibling),Un=s,xt=!0,mr=null,i!==null&&(Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=hs,ni=i.id,ri=i.overflow,hs=s),s=hm(s,f.children),s.flags|=4096,s)}function e2(i,s,l){i.lanes|=s;var f=i.alternate;f!==null&&(f.lanes|=s),Vp(i.return,s,l)}function pm(i,s,l,f,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:f,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=f,y.tail=l,y.tailMode=g)}function t2(i,s,l){var f=s.pendingProps,g=f.revealOrder,y=f.tail;if(gn(i,s,f.children,l),f=At.current,(f&2)!==0)f=f&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&&e2(i,l,s);else if(i.tag===19)e2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}f&=1}if(ht(At,f),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&vc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),pm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&vc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}pm(s,!0,l,null,y);break;case"together":pm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Dc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function oi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ys|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ui(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ui(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function TF(i,s,l){switch(s.tag){case 3:Xx(s),wo();break;case 5:mx(s);break;case 1:vn(s.type)&&Ec(s);break;case 4:Wp(s,s.stateNode.containerInfo);break;case 10:var f=s.type._context,g=s.memoizedProps.value;ht(Sc,f._currentValue),f._currentValue=g;break;case 13:if(f=s.memoizedState,f!==null)return f.dehydrated!==null?(ht(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?Zx(i,s,l):(ht(At,At.current&1),i=oi(i,s,l),i!==null?i.sibling:null);ht(At,At.current&1);break;case 19:if(f=(l&s.childLanes)!==0,(i.flags&128)!==0){if(f)return t2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),ht(At,At.current),f)break;return null;case 22:case 23:return s.lanes=0,Gx(i,s,l)}return oi(i,s,l)}var n2,mm,r2,i2;n2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},mm=function(){},r2=function(i,s,l,f){var g=i.memoizedProps;if(g!==f){i=s.stateNode,gs(Mr.current);var y=null;switch(l){case"input":g=Ti(i,g),f=Ti(i,f),y=[];break;case"select":g=A({},g,{value:void 0}),f=A({},f,{value:void 0}),y=[];break;case"textarea":g=mt(i,g),f=mt(i,f),y=[];break;default:typeof g.onClick!="function"&&typeof f.onClick=="function"&&(i.onclick=pc)}Xt(l,f);var x;l=null;for(G in g)if(!f.hasOwnProperty(G)&&g.hasOwnProperty(G)&&g[G]!=null)if(G==="style"){var I=g[G];for(x in I)I.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else G!=="dangerouslySetInnerHTML"&&G!=="children"&&G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&G!=="autoFocus"&&(o.hasOwnProperty(G)?y||(y=[]):(y=y||[]).push(G,null));for(G in f){var L=f[G];if(I=g!=null?g[G]:void 0,f.hasOwnProperty(G)&&L!==I&&(L!=null||I!=null))if(G==="style")if(I){for(x in I)!I.hasOwnProperty(x)||L&&L.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in L)L.hasOwnProperty(x)&&I[x]!==L[x]&&(l||(l={}),l[x]=L[x])}else l||(y||(y=[]),y.push(G,l)),l=L;else G==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,I=I?I.__html:void 0,L!=null&&I!==L&&(y=y||[]).push(G,L)):G==="children"?typeof L!="string"&&typeof L!="number"||(y=y||[]).push(G,""+L):G!=="suppressContentEditableWarning"&&G!=="suppressHydrationWarning"&&(o.hasOwnProperty(G)?(L!=null&&G==="onScroll"&&gt("scroll",i),y||I===L||(y=[])):(y=y||[]).push(G,L))}l&&(y=y||[]).push("style",l);var G=y;(s.updateQueue=G)&&(s.flags|=4)}},i2=function(i,s,l,f){l!==f&&(s.flags|=4)};function fu(i,s){if(!xt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var f=null;l!==null;)l.alternate!==null&&(f=l),l=l.sibling;f===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:f.sibling=null}}function dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,f=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,f|=g.subtreeFlags&14680064,f|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,f|=g.subtreeFlags,f|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=f,i.childLanes=l,s}function bF(i,s,l){var f=s.pendingProps;switch(Fp(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&gc(),dn(s),null;case 3:return f=s.stateNode,ko(),Et(Cn),Et(ln),Qp(),f.pendingContext&&(f.context=f.pendingContext,f.pendingContext=null),(i===null||i.child===null)&&(_c(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(Cm(mr),mr=null))),mm(i,s),dn(s),null;case 5:Gp(s);var g=gs(au.current);if(l=s.type,i!==null&&s.stateNode!=null)r2(i,s,l,f,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!f){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=gs(Mr.current),_c(s)){f=s.stateNode,l=s.type;var y=s.memoizedProps;switch(f[Dr]=s,f[nu]=y,i=(s.mode&1)!==0,l){case"dialog":gt("cancel",f),gt("close",f);break;case"iframe":case"object":case"embed":gt("load",f);break;case"video":case"audio":for(g=0;g<Za.length;g++)gt(Za[g],f);break;case"source":gt("error",f);break;case"img":case"image":case"link":gt("error",f),gt("load",f);break;case"details":gt("toggle",f);break;case"input":us(f,y),gt("invalid",f);break;case"select":f._wrapperState={wasMultiple:!!y.multiple},gt("invalid",f);break;case"textarea":_t(f,y),gt("invalid",f)}Xt(l,y),g=null;for(var x in y)if(y.hasOwnProperty(x)){var I=y[x];x==="children"?typeof I=="string"?f.textContent!==I&&(y.suppressHydrationWarning!==!0&&hc(f.textContent,I,i),g=["children",I]):typeof I=="number"&&f.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&hc(f.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(x)&&I!=null&&x==="onScroll"&&gt("scroll",f)}switch(l){case"input":Kn(f),Ae(f,y,!0);break;case"textarea":Kn(f),it(f);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(f.onclick=pc)}f=g,s.updateQueue=f,f!==null&&(s.flags|=4)}else{x=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof f.is=="string"?i=x.createElement(l,{is:f.is}):(i=x.createElement(l),l==="select"&&(x=i,f.multiple?x.multiple=!0:f.size&&(x.size=f.size))):i=x.createElementNS(i,l),i[Dr]=s,i[nu]=f,n2(i,s,!1,!1),s.stateNode=i;e:{switch(x=Rr(l,f),l){case"dialog":gt("cancel",i),gt("close",i),g=f;break;case"iframe":case"object":case"embed":gt("load",i),g=f;break;case"video":case"audio":for(g=0;g<Za.length;g++)gt(Za[g],i);g=f;break;case"source":gt("error",i),g=f;break;case"img":case"image":case"link":gt("error",i),gt("load",i),g=f;break;case"details":gt("toggle",i),g=f;break;case"input":us(i,f),g=Ti(i,f),gt("invalid",i);break;case"option":g=f;break;case"select":i._wrapperState={wasMultiple:!!f.multiple},g=A({},f,{value:void 0}),gt("invalid",i);break;case"textarea":_t(i,f),g=mt(i,f),gt("invalid",i);break;default:g=f}Xt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var L=I[y];y==="style"?_i(i,L):y==="dangerouslySetInnerHTML"?(L=L?L.__html:void 0,L!=null&&$e(i,L)):y==="children"?typeof L=="string"?(l!=="textarea"||L!=="")&&et(i,L):typeof L=="number"&&et(i,""+L):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?L!=null&&y==="onScroll"&&gt("scroll",i):L!=null&&D(i,y,L,x))}switch(l){case"input":Kn(i),Ae(i,f,!1);break;case"textarea":Kn(i),it(i);break;case"option":f.value!=null&&i.setAttribute("value",""+qe(f.value));break;case"select":i.multiple=!!f.multiple,y=f.value,y!=null?at(i,!!f.multiple,y,!1):f.defaultValue!=null&&at(i,!!f.multiple,f.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=pc)}switch(l){case"button":case"input":case"select":case"textarea":f=!!f.autoFocus;break e;case"img":f=!0;break e;default:f=!1}}f&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dn(s),null;case 6:if(i&&s.stateNode!=null)i2(i,s,i.memoizedProps,f);else{if(typeof f!="string"&&s.stateNode===null)throw Error(n(166));if(l=gs(au.current),gs(Mr.current),_c(s)){if(f=s.stateNode,l=s.memoizedProps,f[Dr]=s,(y=f.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:hc(f.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&hc(f.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else f=(l.nodeType===9?l:l.ownerDocument).createTextNode(f),f[Dr]=s,s.stateNode=f}return dn(s),null;case 13:if(Et(At),f=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(xt&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)ax(),wo(),s.flags|=98560,y=!1;else if(y=_c(s),f!==null&&f.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Dr]=s}else wo(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else mr!==null&&(Cm(mr),mr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(f=f!==null,f!==(i!==null&&i.memoizedState!==null)&&f&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(At.current&1)!==0?zt===0&&(zt=3):Nm())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return ko(),mm(i,s),i===null&&eu(s.stateNode.containerInfo),dn(s),null;case 10:return $p(s.type._context),dn(s),null;case 17:return vn(s.type)&&gc(),dn(s),null;case 19:if(Et(At),y=s.memoizedState,y===null)return dn(s),null;if(f=(s.flags&128)!==0,x=y.rendering,x===null)if(f)fu(y,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(x=vc(i),x!==null){for(s.flags|=128,fu(y,!1),f=x.updateQueue,f!==null&&(s.updateQueue=f,s.flags|=4),s.subtreeFlags=0,f=l,l=s.child;l!==null;)y=l,i=f,y.flags&=14680066,x=y.alternate,x===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=x.childLanes,y.lanes=x.lanes,y.child=x.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=x.memoizedProps,y.memoizedState=x.memoizedState,y.updateQueue=x.updateQueue,y.type=x.type,i=x.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return ht(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Lt()>Po&&(s.flags|=128,f=!0,fu(y,!1),s.lanes=4194304)}else{if(!f)if(i=vc(x),i!==null){if(s.flags|=128,f=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),fu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!x.alternate&&!xt)return dn(s),null}else 2*Lt()-y.renderingStartTime>Po&&l!==1073741824&&(s.flags|=128,f=!0,fu(y,!1),s.lanes=4194304);y.isBackwards?(x.sibling=s.child,s.child=x):(l=y.last,l!==null?l.sibling=x:s.child=x,y.last=x)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Lt(),s.sibling=null,l=At.current,ht(At,f?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return km(),f=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==f&&(s.flags|=8192),f&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function _F(i,s){switch(Fp(s),s.tag){case 1:return vn(s.type)&&gc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return ko(),Et(Cn),Et(ln),Qp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Gp(s),null;case 13:if(Et(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));wo()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return Et(At),null;case 4:return ko(),null;case 10:return $p(s.type._context),null;case 22:case 23:return km(),null;case 24:return null;default:return null}}var Mc=!1,fn=!1,xF=typeof WeakSet=="function"?WeakSet:Set,Se=null;function Oo(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(f){Ot(i,s,f)}else l.current=null}function gm(i,s,l){try{l()}catch(f){Ot(i,s,f)}}var s2=!1;function SF(i,s){if(kp=nc,i=F_(),bp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var f=l.getSelection&&l.getSelection();if(f&&f.rangeCount!==0){l=f.anchorNode;var g=f.anchorOffset,y=f.focusNode;f=f.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var x=0,I=-1,L=-1,G=0,oe=0,ce=i,ie=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(I=x+g),ce!==y||f!==0&&ce.nodeType!==3||(L=x+f),ce.nodeType===3&&(x+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)ie=ce,ce=xe;for(;;){if(ce===i)break t;if(ie===l&&++G===g&&(I=x),ie===y&&++oe===f&&(L=x),(xe=ce.nextSibling)!==null)break;ce=ie,ie=ce.parentNode}ce=xe}l=I===-1||L===-1?null:{start:I,end:L}}else l=null}l=l||{start:0,end:0}}else l=null;for(Np={focusedElem:i,selectionRange:l},nc=!1,Se=s;Se!==null;)if(s=Se,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,Se=i;else for(;Se!==null;){s=Se;try{var Ce=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ce!==null){var ke=Ce.memoizedProps,Dt=Ce.memoizedState,z=s.stateNode,M=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Dt);z.__reactInternalSnapshotBeforeUpdate=M}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,Se=i;break}Se=s.return}return Ce=s2,s2=!1,Ce}function hu(i,s,l){var f=s.updateQueue;if(f=f!==null?f.lastEffect:null,f!==null){var g=f=f.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&gm(s,l,y)}g=g.next}while(g!==f)}}function Fc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var f=l.create;l.destroy=f()}l=l.next}while(l!==s)}}function Em(i){var s=i.ref;if(s!==null){var l=i.stateNode;switch(i.tag){case 5:i=l;break;default:i=l}typeof s=="function"?s(i):s.current=i}}function o2(i){var s=i.alternate;s!==null&&(i.alternate=null,o2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Dr],delete s[nu],delete s[Rp],delete s[sF],delete s[oF])),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 a2(i){return i.tag===5||i.tag===3||i.tag===4}function u2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||a2(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 ym(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=pc));else if(f!==4&&(i=i.child,i!==null))for(ym(i,s,l),i=i.sibling;i!==null;)ym(i,s,l),i=i.sibling}function Tm(i,s,l){var f=i.tag;if(f===5||f===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(f!==4&&(i=i.child,i!==null))for(Tm(i,s,l),i=i.sibling;i!==null;)Tm(i,s,l),i=i.sibling}var Jt=null,Er=!1;function Li(i,s,l){for(l=l.child;l!==null;)l2(i,s,l),l=l.sibling}function l2(i,s,l){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Ql,l)}catch(I){}switch(l.tag){case 5:fn||Oo(l,s);case 6:var f=Jt,g=Er;Jt=null,Li(i,s,l),Jt=f,Er=g,Jt!==null&&(Er?(i=Jt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Jt.removeChild(l.stateNode));break;case 18:Jt!==null&&(Er?(i=Jt,l=l.stateNode,i.nodeType===8?Pp(i.parentNode,l):i.nodeType===1&&Pp(i,l),qa(i)):Pp(Jt,l.stateNode));break;case 4:f=Jt,g=Er,Jt=l.stateNode.containerInfo,Er=!0,Li(i,s,l),Jt=f,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(f=l.updateQueue,f!==null&&(f=f.lastEffect,f!==null))){g=f=f.next;do{var y=g,x=y.destroy;y=y.tag,x!==void 0&&((y&2)!==0||(y&4)!==0)&&gm(l,s,x),g=g.next}while(g!==f)}Li(i,s,l);break;case 1:if(!fn&&(Oo(l,s),f=l.stateNode,typeof f.componentWillUnmount=="function"))try{f.props=l.memoizedProps,f.state=l.memoizedState,f.componentWillUnmount()}catch(I){Ot(l,s,I)}Li(i,s,l);break;case 21:Li(i,s,l);break;case 22:l.mode&1?(fn=(f=fn)||l.memoizedState!==null,Li(i,s,l),fn=f):Li(i,s,l);break;default:Li(i,s,l)}}function c2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new xF),s.forEach(function(f){var g=PF.bind(null,i,f);l.has(f)||(l.add(f),f.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var f=0;f<l.length;f++){var g=l[f];try{var y=i,x=s,I=x;e:for(;I!==null;){switch(I.tag){case 5:Jt=I.stateNode,Er=!1;break e;case 3:Jt=I.stateNode.containerInfo,Er=!0;break e;case 4:Jt=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(Jt===null)throw Error(n(160));l2(y,x,g),Jt=null,Er=!1;var L=g.alternate;L!==null&&(L.return=null),g.return=null}catch(G){Ot(g,s,G)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)d2(s,i),s=s.sibling}function d2(i,s){var l=i.alternate,f=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Br(i),f&4){try{hu(3,i,i.return),Fc(3,i)}catch(ke){Ot(i,i.return,ke)}try{hu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:yr(s,i),Br(i),f&512&&l!==null&&Oo(l,l.return);break;case 5:if(yr(s,i),Br(i),f&512&&l!==null&&Oo(l,l.return),i.flags&32){var g=i.stateNode;try{et(g,"")}catch(ke){Ot(i,i.return,ke)}}if(f&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,x=l!==null?l.memoizedProps:y,I=i.type,L=i.updateQueue;if(i.updateQueue=null,L!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&bi(g,y),Rr(I,x);var G=Rr(I,y);for(x=0;x<L.length;x+=2){var oe=L[x],ce=L[x+1];oe==="style"?_i(g,ce):oe==="dangerouslySetInnerHTML"?$e(g,ce):oe==="children"?et(g,ce):D(g,oe,ce,G)}switch(I){case"input":Jr(g,y);break;case"textarea":mn(g,y);break;case"select":var ie=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?at(g,!!y.multiple,xe,!1):ie!==!!y.multiple&&(y.defaultValue!=null?at(g,!!y.multiple,y.defaultValue,!0):at(g,!!y.multiple,y.multiple?[]:"",!1))}g[nu]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(yr(s,i),Br(i),f&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(yr(s,i),Br(i),f&4&&l!==null&&l.memoizedState.isDehydrated)try{qa(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:yr(s,i),Br(i);break;case 13:yr(s,i),Br(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(xm=Lt())),f&4&&c2(i);break;case 22:if(oe=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(G=fn)||oe,yr(s,i),fn=G):yr(s,i),Br(i),f&8192){if(G=i.memoizedState!==null,(i.stateNode.isHidden=G)&&!oe&&(i.mode&1)!==0)for(Se=i,oe=i.child;oe!==null;){for(ce=Se=oe;Se!==null;){switch(ie=Se,xe=ie.child,ie.tag){case 0:case 11:case 14:case 15:hu(4,ie,ie.return);break;case 1:Oo(ie,ie.return);var Ce=ie.stateNode;if(typeof Ce.componentWillUnmount=="function"){f=ie,l=ie.return;try{s=f,Ce.props=s.memoizedProps,Ce.state=s.memoizedState,Ce.componentWillUnmount()}catch(ke){Ot(f,l,ke)}}break;case 5:Oo(ie,ie.return);break;case 22:if(ie.memoizedState!==null){p2(ce);continue}}xe!==null?(xe.return=ie,Se=xe):p2(ce)}oe=oe.sibling}e:for(oe=null,ce=i;;){if(ce.tag===5){if(oe===null){oe=ce;try{g=ce.stateNode,G?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,L=ce.memoizedProps.style,x=L!=null&&L.hasOwnProperty("display")?L.display:null,I.style.display=Qn("display",x))}catch(ke){Ot(i,i.return,ke)}}}else if(ce.tag===6){if(oe===null)try{ce.stateNode.nodeValue=G?"":ce.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;oe===ce&&(oe=null),ce=ce.return}oe===ce&&(oe=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Br(i),f&4&&c2(i);break;case 21:break;default:yr(s,i),Br(i)}}function Br(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(a2(l)){var f=l;break e}l=l.return}throw Error(n(160))}switch(f.tag){case 5:var g=f.stateNode;f.flags&32&&(et(g,""),f.flags&=-33);var y=u2(i);Tm(i,y,g);break;case 3:case 4:var x=f.stateNode.containerInfo,I=u2(i);ym(i,I,x);break;default:throw Error(n(161))}}catch(L){Ot(i,i.return,L)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function wF(i,s,l){Se=i,f2(i)}function f2(i,s,l){for(var f=(i.mode&1)!==0;Se!==null;){var g=Se,y=g.child;if(g.tag===22&&f){var x=g.memoizedState!==null||Mc;if(!x){var I=g.alternate,L=I!==null&&I.memoizedState!==null||fn;I=Mc;var G=fn;if(Mc=x,(fn=L)&&!G)for(Se=g;Se!==null;)x=Se,L=x.child,x.tag===22&&x.memoizedState!==null?m2(g):L!==null?(L.return=x,Se=L):m2(g);for(;y!==null;)Se=y,f2(y),y=y.sibling;Se=g,Mc=I,fn=G}h2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,Se=y):h2(i)}}function h2(i){for(;Se!==null;){var s=Se;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||Fc(5,s);break;case 1:var f=s.stateNode;if(s.flags&4&&!fn)if(l===null)f.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);f.componentDidUpdate(g,l.memoizedState,f.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&px(s,y,f);break;case 3:var x=s.updateQueue;if(x!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}px(s,x,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var L=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":L.autoFocus&&l.focus();break;case"img":L.src&&(l.src=L.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var G=s.alternate;if(G!==null){var oe=G.memoizedState;if(oe!==null){var ce=oe.dehydrated;ce!==null&&qa(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&Em(s)}catch(ie){Ot(s,s.return,ie)}}if(s===i){Se=null;break}if(l=s.sibling,l!==null){l.return=s.return,Se=l;break}Se=s.return}}function p2(i){for(;Se!==null;){var s=Se;if(s===i){Se=null;break}var l=s.sibling;if(l!==null){l.return=s.return,Se=l;break}Se=s.return}}function m2(i){for(;Se!==null;){var s=Se;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Fc(4,s)}catch(L){Ot(s,l,L)}break;case 1:var f=s.stateNode;if(typeof f.componentDidMount=="function"){var g=s.return;try{f.componentDidMount()}catch(L){Ot(s,g,L)}}var y=s.return;try{Em(s)}catch(L){Ot(s,y,L)}break;case 5:var x=s.return;try{Em(s)}catch(L){Ot(s,x,L)}}}catch(L){Ot(s,s.return,L)}if(s===i){Se=null;break}var I=s.sibling;if(I!==null){I.return=s.return,Se=I;break}Se=s.return}}var AF=Math.ceil,Bc=Y.ReactCurrentDispatcher,bm=Y.ReactCurrentOwner,tr=Y.ReactCurrentBatchConfig,tt=0,Gt=null,Ut=null,Zt=0,zn=0,Io=Ni(0),zt=0,pu=null,ys=0,Uc=0,_m=0,mu=null,Nn=null,xm=0,Po=1/0,ai=null,Hc=!1,Sm=null,Di=null,zc=!1,Mi=null,jc=0,gu=0,wm=null,$c=-1,Vc=0;function En(){return(tt&6)!==0?Lt():$c!==-1?$c:$c=Lt()}function Fi(i){return(i.mode&1)===0?1:(tt&2)!==0&&Zt!==0?Zt&-Zt:uF.transition!==null?(Vc===0&&(Vc=u_()),Vc):(i=ut,i!==0||(i=window.event,i=i===void 0?16:E_(i.type)),i)}function Tr(i,s,l,f){if(50<gu)throw gu=0,wm=null,Error(n(185));Ha(i,l,f),((tt&2)===0||i!==Gt)&&(i===Gt&&((tt&2)===0&&(Uc|=l),zt===4&&Bi(i,Zt)),On(i,f),l===1&&tt===0&&(s.mode&1)===0&&(Po=Lt()+500,yc&&Ii()))}function On(i,s){var l=i.callbackNode;uM(i,s);var f=Zl(i,i===Gt?Zt:0);if(f===0)l!==null&&s_(l),i.callbackNode=null,i.callbackPriority=0;else if(s=f&-f,i.callbackPriority!==s){if(l!=null&&s_(l),s===1)i.tag===0?aF(E2.bind(null,i)):nx(E2.bind(null,i)),rF(function(){(tt&6)===0&&Ii()}),l=null;else{switch(l_(f)){case 1:l=rp;break;case 4:l=o_;break;case 16:l=Kl;break;case 536870912:l=a_;break;default:l=Kl}l=A2(l,g2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function g2(i,s){if($c=-1,Vc=0,(tt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Ro()&&i.callbackNode!==l)return null;var f=Zl(i,i===Gt?Zt:0);if(f===0)return null;if((f&30)!==0||(f&i.expiredLanes)!==0||s)s=qc(i,f);else{s=f;var g=tt;tt|=2;var y=T2();(Gt!==i||Zt!==s)&&(ai=null,Po=Lt()+500,bs(i,s));do try{kF();break}catch(I){y2(i,I)}while(!0);jp(),Bc.current=y,tt=g,Ut!==null?s=0:(Gt=null,Zt=0,s=zt)}if(s!==0){if(s===2&&(g=ip(i),g!==0&&(f=g,s=Am(i,g))),s===1)throw l=pu,bs(i,0),Bi(i,f),On(i,Lt()),l;if(s===6)Bi(i,f);else{if(g=i.current.alternate,(f&30)===0&&!CF(g)&&(s=qc(i,f),s===2&&(y=ip(i),y!==0&&(f=y,s=Am(i,y))),s===1))throw l=pu,bs(i,0),Bi(i,f),On(i,Lt()),l;switch(i.finishedWork=g,i.finishedLanes=f,s){case 0:case 1:throw Error(n(345));case 2:_s(i,Nn,ai);break;case 3:if(Bi(i,f),(f&130023424)===f&&(s=xm+500-Lt(),10<s)){if(Zl(i,0)!==0)break;if(g=i.suspendedLanes,(g&f)!==f){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Ip(_s.bind(null,i,Nn,ai),s);break}_s(i,Nn,ai);break;case 4:if(Bi(i,f),(f&4194240)===f)break;for(s=i.eventTimes,g=-1;0<f;){var x=31-hr(f);y=1<<x,x=s[x],x>g&&(g=x),f&=~y}if(f=g,f=Lt()-f,f=(120>f?120:480>f?480:1080>f?1080:1920>f?1920:3e3>f?3e3:4320>f?4320:1960*AF(f/1960))-f,10<f){i.timeoutHandle=Ip(_s.bind(null,i,Nn,ai),f);break}_s(i,Nn,ai);break;case 5:_s(i,Nn,ai);break;default:throw Error(n(329))}}}return On(i,Lt()),i.callbackNode===l?g2.bind(null,i):null}function Am(i,s){var l=mu;return i.current.memoizedState.isDehydrated&&(bs(i,s).flags|=256),i=qc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&Cm(s)),i}function Cm(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function CF(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var f=0;f<l.length;f++){var g=l[f],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(x){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Bi(i,s){for(s&=~_m,s&=~Uc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),f=1<<l;i[l]=-1,s&=~f}}function E2(i){if((tt&6)!==0)throw Error(n(327));Ro();var s=Zl(i,0);if((s&1)===0)return On(i,Lt()),null;var l=qc(i,s);if(i.tag!==0&&l===2){var f=ip(i);f!==0&&(s=f,l=Am(i,f))}if(l===1)throw l=pu,bs(i,0),Bi(i,s),On(i,Lt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,_s(i,Nn,ai),On(i,Lt()),null}function vm(i,s){var l=tt;tt|=1;try{return i(s)}finally{tt=l,tt===0&&(Po=Lt()+500,yc&&Ii())}}function Ts(i){Mi!==null&&Mi.tag===0&&(tt&6)===0&&Ro();var s=tt;tt|=1;var l=tr.transition,f=ut;try{if(tr.transition=null,ut=1,i)return i()}finally{ut=f,tr.transition=l,tt=s,(tt&6)===0&&Ii()}}function km(){zn=Io.current,Et(Io)}function bs(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,nF(l)),Ut!==null)for(l=Ut.return;l!==null;){var f=l;switch(Fp(f),f.tag){case 1:f=f.type.childContextTypes,f!=null&&gc();break;case 3:ko(),Et(Cn),Et(ln),Qp();break;case 5:Gp(f);break;case 4:ko();break;case 13:Et(At);break;case 19:Et(At);break;case 10:$p(f.type._context);break;case 22:case 23:km()}l=l.return}if(Gt=i,Ut=i=Ui(i.current,null),Zt=zn=s,zt=0,pu=null,_m=Uc=ys=0,Nn=mu=null,ms!==null){for(s=0;s<ms.length;s++)if(l=ms[s],f=l.interleaved,f!==null){l.interleaved=null;var g=f.next,y=l.pending;if(y!==null){var x=y.next;y.next=g,f.next=x}l.pending=f}ms=null}return i}function y2(i,s){do{var l=Ut;try{if(jp(),kc.current=Pc,Nc){for(var f=Ct.memoizedState;f!==null;){var g=f.queue;g!==null&&(g.pending=null),f=f.next}Nc=!1}if(Es=0,Wt=Ht=Ct=null,uu=!1,lu=0,bm.current=null,l===null||l.return===null){zt=1,pu=s,Ut=null;break}e:{var y=i,x=l.return,I=l,L=s;if(s=Zt,I.flags|=32768,L!==null&&typeof L=="object"&&typeof L.then=="function"){var G=L,oe=I,ce=oe.tag;if((oe.mode&1)===0&&(ce===0||ce===11||ce===15)){var ie=oe.alternate;ie?(oe.updateQueue=ie.updateQueue,oe.memoizedState=ie.memoizedState,oe.lanes=ie.lanes):(oe.updateQueue=null,oe.memoizedState=null)}var xe=$x(x);if(xe!==null){xe.flags&=-257,Vx(xe,x,I,y,s),xe.mode&1&&jx(y,G,s),s=xe,L=G;var Ce=s.updateQueue;if(Ce===null){var ke=new Set;ke.add(L),s.updateQueue=ke}else Ce.add(L);break e}else{if((s&1)===0){jx(y,G,s),Nm();break e}L=Error(n(426))}}else if(xt&&I.mode&1){var Dt=$x(x);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),Vx(Dt,x,I,y,s),Hp(No(L,I));break e}}y=L=No(L,I),zt!==4&&(zt=2),mu===null?mu=[y]:mu.push(y),y=x;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=Hx(y,L,s);hx(y,z);break e;case 1:I=L;var M=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof M.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Di===null||!Di.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=zx(y,I,s);hx(y,Ee);break e}}y=y.return}while(y!==null)}_2(l)}catch(Ne){s=Ne,Ut===l&&l!==null&&(Ut=l=l.return);continue}break}while(!0)}function T2(){var i=Bc.current;return Bc.current=Pc,i===null?Pc:i}function Nm(){(zt===0||zt===3||zt===2)&&(zt=4),Gt===null||(ys&268435455)===0&&(Uc&268435455)===0||Bi(Gt,Zt)}function qc(i,s){var l=tt;tt|=2;var f=T2();(Gt!==i||Zt!==s)&&(ai=null,bs(i,s));do try{vF();break}catch(g){y2(i,g)}while(!0);if(jp(),tt=l,Bc.current=f,Ut!==null)throw Error(n(261));return Gt=null,Zt=0,zt}function vF(){for(;Ut!==null;)b2(Ut)}function kF(){for(;Ut!==null&&!Z8();)b2(Ut)}function b2(i){var s=w2(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?_2(i):Ut=s,bm.current=null}function _2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=bF(l,s,zn),l!==null){Ut=l;return}}else{if(l=_F(l,s),l!==null){l.flags&=32767,Ut=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{zt=6,Ut=null;return}}if(s=s.sibling,s!==null){Ut=s;return}Ut=s=i}while(s!==null);zt===0&&(zt=5)}function _s(i,s,l){var f=ut,g=tr.transition;try{tr.transition=null,ut=1,NF(i,s,l,f)}finally{tr.transition=g,ut=f}return null}function NF(i,s,l,f){do Ro();while(Mi!==null);if((tt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(lM(i,y),i===Gt&&(Ut=Gt=null,Zt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||zc||(zc=!0,A2(Kl,function(){return Ro(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var x=ut;ut=1;var I=tt;tt|=4,bm.current=null,SF(i,l),d2(l,i),KM(Np),nc=!!kp,Np=kp=null,i.current=l,wF(l),eM(),tt=I,ut=x,tr.transition=y}else i.current=l;if(zc&&(zc=!1,Mi=i,jc=g),y=i.pendingLanes,y===0&&(Di=null),rM(l.stateNode),On(i,Lt()),s!==null)for(f=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],f(g.value,{componentStack:g.stack,digest:g.digest});if(Hc)throw Hc=!1,i=Sm,Sm=null,i;return(jc&1)!==0&&i.tag!==0&&Ro(),y=i.pendingLanes,(y&1)!==0?i===wm?gu++:(gu=0,wm=i):gu=0,Ii(),null}function Ro(){if(Mi!==null){var i=l_(jc),s=tr.transition,l=ut;try{if(tr.transition=null,ut=16>i?16:i,Mi===null)var f=!1;else{if(i=Mi,Mi=null,jc=0,(tt&6)!==0)throw Error(n(331));var g=tt;for(tt|=4,Se=i.current;Se!==null;){var y=Se,x=y.child;if((Se.flags&16)!==0){var I=y.deletions;if(I!==null){for(var L=0;L<I.length;L++){var G=I[L];for(Se=G;Se!==null;){var oe=Se;switch(oe.tag){case 0:case 11:case 15:hu(8,oe,y)}var ce=oe.child;if(ce!==null)ce.return=oe,Se=ce;else for(;Se!==null;){oe=Se;var ie=oe.sibling,xe=oe.return;if(o2(oe),oe===G){Se=null;break}if(ie!==null){ie.return=xe,Se=ie;break}Se=xe}}}var Ce=y.alternate;if(Ce!==null){var ke=Ce.child;if(ke!==null){Ce.child=null;do{var Dt=ke.sibling;ke.sibling=null,ke=Dt}while(ke!==null)}}Se=y}}if((y.subtreeFlags&2064)!==0&&x!==null)x.return=y,Se=x;else e:for(;Se!==null;){if(y=Se,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:hu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,Se=z;break e}Se=y.return}}var M=i.current;for(Se=M;Se!==null;){x=Se;var V=x.child;if((x.subtreeFlags&2064)!==0&&V!==null)V.return=x,Se=V;else e:for(x=M;Se!==null;){if(I=Se,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Fc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===x){Se=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,Se=Ee;break e}Se=I.return}}if(tt=g,Ii(),Lr&&typeof Lr.onPostCommitFiberRoot=="function")try{Lr.onPostCommitFiberRoot(Ql,i)}catch(Ne){}f=!0}return f}finally{ut=l,tr.transition=s}}return!1}function x2(i,s,l){s=No(l,s),s=Hx(i,s,1),i=Ri(i,s,1),s=En(),i!==null&&(Ha(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)x2(i,i,l);else for(;s!==null;){if(s.tag===3){x2(s,i,l);break}else if(s.tag===1){var f=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof f.componentDidCatch=="function"&&(Di===null||!Di.has(f))){i=No(l,i),i=zx(s,i,1),s=Ri(s,i,1),i=En(),s!==null&&(Ha(s,1,i),On(s,i));break}}s=s.return}}function OF(i,s,l){var f=i.pingCache;f!==null&&f.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Gt===i&&(Zt&l)===l&&(zt===4||zt===3&&(Zt&130023424)===Zt&&500>Lt()-xm?bs(i,0):_m|=l),On(i,s)}function S2(i,s){s===0&&((i.mode&1)===0?s=1:(s=Jl,Jl<<=1,(Jl&130023424)===0&&(Jl=4194304)));var l=En();i=ii(i,s),i!==null&&(Ha(i,s,l),On(i,l))}function IF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),S2(i,l)}function PF(i,s){var l=0;switch(i.tag){case 13:var f=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:f=i.stateNode;break;default:throw Error(n(314))}f!==null&&f.delete(s),S2(i,l)}var w2;w2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||Cn.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,TF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,xt&&(s.flags&1048576)!==0&&rx(s,bc,s.index);switch(s.lanes=0,s.tag){case 2:var f=s.type;Dc(i,s),i=s.pendingProps;var g=_o(s,ln.current);vo(s,l),g=Zp(null,s,f,i,g,l);var y=em();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(f)?(y=!0,Ec(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Yp(s),g.updater=Rc,s.stateNode=g,g._reactInternals=s,om(s,f,i,l),s=cm(null,s,f,!0,y,l)):(s.tag=0,xt&&y&&Mp(s),gn(null,s,g,l),s=s.child),s;case 16:f=s.elementType;e:{switch(Dc(i,s),i=s.pendingProps,g=f._init,f=g(f._payload),s.type=f,g=s.tag=LF(f),i=gr(f,i),g){case 0:s=lm(null,s,f,i,l);break e;case 1:s=Qx(null,s,f,i,l);break e;case 11:s=qx(null,s,f,i,l);break e;case 14:s=Yx(null,s,f,gr(f.type,i),l);break e}throw Error(n(306,f,""))}return s;case 0:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:gr(f,g),lm(i,s,f,g,l);case 1:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:gr(f,g),Qx(i,s,f,g,l);case 3:e:{if(Xx(s),i===null)throw Error(n(387));f=s.pendingProps,y=s.memoizedState,g=y.element,fx(i,s),Cc(s,f,null,l);var x=s.memoizedState;if(f=x.element,y.isDehydrated)if(y={element:f,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=No(Error(n(423)),s),s=Jx(i,s,f,l,g);break e}else if(f!==g){g=No(Error(n(424)),s),s=Jx(i,s,f,l,g);break e}else for(Hn=ki(s.stateNode.containerInfo.firstChild),Un=s,xt=!0,mr=null,l=cx(s,null,f,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(wo(),f===g){s=oi(i,s,l);break e}gn(i,s,f,l)}s=s.child}return s;case 5:return mx(s),i===null&&Up(s),f=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,x=g.children,Op(f,g)?x=null:y!==null&&Op(f,y)&&(s.flags|=32),Kx(i,s),gn(i,s,x,l),s.child;case 6:return i===null&&Up(s),null;case 13:return Zx(i,s,l);case 4:return Wp(s,s.stateNode.containerInfo),f=s.pendingProps,i===null?s.child=Ao(s,null,f,l):gn(i,s,f,l),s.child;case 11:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:gr(f,g),qx(i,s,f,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(f=s.type._context,g=s.pendingProps,y=s.memoizedProps,x=g.value,ht(Sc,f._currentValue),f._currentValue=x,y!==null)if(pr(y.value,x)){if(y.children===g.children&&!Cn.current){s=oi(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){x=y.child;for(var L=I.firstContext;L!==null;){if(L.context===f){if(y.tag===1){L=si(-1,l&-l),L.tag=2;var G=y.updateQueue;if(G!==null){G=G.shared;var oe=G.pending;oe===null?L.next=L:(L.next=oe.next,oe.next=L),G.pending=L}}y.lanes|=l,L=y.alternate,L!==null&&(L.lanes|=l),Vp(y.return,l,s),I.lanes|=l;break}L=L.next}}else if(y.tag===10)x=y.type===s.type?null:y.child;else if(y.tag===18){if(x=y.return,x===null)throw Error(n(341));x.lanes|=l,I=x.alternate,I!==null&&(I.lanes|=l),Vp(x,l,s),x=y.sibling}else x=y.child;if(x!==null)x.return=y;else for(x=y;x!==null;){if(x===s){x=null;break}if(y=x.sibling,y!==null){y.return=x.return,x=y;break}x=x.return}y=x}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,f=s.pendingProps.children,vo(s,l),g=Zn(g),f=f(g),s.flags|=1,gn(i,s,f,l),s.child;case 14:return f=s.type,g=gr(f,s.pendingProps),g=gr(f.type,g),Yx(i,s,f,g,l);case 15:return Wx(i,s,s.type,s.pendingProps,l);case 17:return f=s.type,g=s.pendingProps,g=s.elementType===f?g:gr(f,g),Dc(i,s),s.tag=1,vn(f)?(i=!0,Ec(s)):i=!1,vo(s,l),Bx(s,f,g),om(s,f,g,l),cm(null,s,f,!0,i,l);case 19:return t2(i,s,l);case 22:return Gx(i,s,l)}throw Error(n(156,s.tag))};function A2(i,s){return i_(i,s)}function RF(i,s,l,f){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=f,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,s,l,f){return new RF(i,s,l,f)}function Om(i){return i=i.prototype,!(!i||!i.isReactComponent)}function LF(i){if(typeof i=="function")return Om(i)?1:0;if(i!=null){if(i=i.$$typeof,i===fe)return 11;if(i===ye)return 14}return 2}function Ui(i,s){var l=i.alternate;return l===null?(l=nr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Yc(i,s,l,f,g,y){var x=2;if(f=i,typeof i=="function")Om(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case te:return xs(l.children,g,y,s);case ge:x=8,g|=8;break;case Te:return i=nr(12,l,s,g|2),i.elementType=Te,i.lanes=y,i;case de:return i=nr(13,l,s,g),i.elementType=de,i.lanes=y,i;case ae:return i=nr(19,l,s,g),i.elementType=ae,i.lanes=y,i;case ue:return Wc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case H:x=10;break e;case ne:x=9;break e;case fe:x=11;break e;case ye:x=14;break e;case we:x=16,f=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(x,l,s,g),s.elementType=i,s.type=f,s.lanes=y,s}function xs(i,s,l,f){return i=nr(7,i,f,s),i.lanes=l,i}function Wc(i,s,l,f){return i=nr(22,i,f,s),i.elementType=ue,i.lanes=l,i.stateNode={isHidden:!1},i}function Im(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function Pm(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function DF(i,s,l,f,g){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=sp(0),this.expirationTimes=sp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=sp(0),this.identifierPrefix=f,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Rm(i,s,l,f,g,y,x,I,L){return i=new DF(i,s,l,I,L),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:f,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Yp(y),i}function MF(i,s,l){var f=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:F,key:f==null?null:""+f,children:i,containerInfo:s,implementation:l}}function C2(i){if(!i)return Oi;i=i._reactInternals;e:{if(cs(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(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return ex(i,l,s)}return s}function v2(i,s,l,f,g,y,x,I,L){return i=Rm(l,f,!0,i,g,y,x,I,L),i.context=C2(null),l=i.current,f=En(),g=Fi(l),y=si(f,g),y.callback=s!=null?s:null,Ri(l,y,g),i.current.lanes=g,Ha(i,g,f),On(i,f),i}function Gc(i,s,l,f){var g=s.current,y=En(),x=Fi(g);return l=C2(l),s.context===null?s.context=l:s.pendingContext=l,s=si(y,x),s.payload={element:i},f=f===void 0?null:f,f!==null&&(s.callback=f),i=Ri(g,s,x),i!==null&&(Tr(i,g,x,y),Ac(i,g,x)),x}function Kc(i){if(i=i.current,!i.child)return null;switch(i.child.tag){case 5:return i.child.stateNode;default:return i.child.stateNode}}function k2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Lm(i,s){k2(i,s),(i=i.alternate)&&k2(i,s)}function FF(){return null}var N2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Dm(i){this._internalRoot=i}Qc.prototype.render=Dm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Gc(i,s,null,null)},Qc.prototype.unmount=Dm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ts(function(){Gc(null,i,null,null)}),s[ei]=null}};function Qc(i){this._internalRoot=i}Qc.prototype.unstable_scheduleHydration=function(i){if(i){var s=f_();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Ai.length&&s!==0&&s<Ai[l].priority;l++);Ai.splice(l,0,i),l===0&&m_(i)}};function Mm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Xc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function O2(){}function BF(i,s,l,f,g){if(g){if(typeof f=="function"){var y=f;f=function(){var G=Kc(x);y.call(G)}}var x=v2(s,f,i,0,null,!1,!1,"",O2);return i._reactRootContainer=x,i[ei]=x.current,eu(i.nodeType===8?i.parentNode:i),Ts(),x}for(;g=i.lastChild;)i.removeChild(g);if(typeof f=="function"){var I=f;f=function(){var G=Kc(L);I.call(G)}}var L=Rm(i,0,!1,null,null,!1,!1,"",O2);return i._reactRootContainer=L,i[ei]=L.current,eu(i.nodeType===8?i.parentNode:i),Ts(function(){Gc(s,L,l,f)}),L}function Jc(i,s,l,f,g){var y=l._reactRootContainer;if(y){var x=y;if(typeof g=="function"){var I=g;g=function(){var L=Kc(x);I.call(L)}}Gc(s,x,i,g)}else x=BF(l,s,i,g,f);return Kc(x)}c_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=Ua(s.pendingLanes);l!==0&&(op(s,l|1),On(s,Lt()),(tt&6)===0&&(Po=Lt()+500,Ii()))}break;case 13:Ts(function(){var f=ii(i,1);if(f!==null){var g=En();Tr(f,i,1,g)}}),Lm(i,1)}},ap=function(i){if(i.tag===13){var s=ii(i,134217728);if(s!==null){var l=En();Tr(s,i,134217728,l)}Lm(i,134217728)}},d_=function(i){if(i.tag===13){var s=Fi(i),l=ii(i,s);if(l!==null){var f=En();Tr(l,i,s,f)}Lm(i,s)}},f_=function(){return ut},h_=function(i,s){var l=ut;try{return ut=i,s()}finally{ut=l}},Zh=function(i,s,l){switch(s){case"input":if(Jr(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var f=l[s];if(f!==i&&f.form===i.form){var g=mc(f);if(!g)throw Error(n(90));as(f),Jr(f,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&at(i,!!l.multiple,s,!1)}},Xb=vm,Jb=Ts;var UF={usingClientEntryPoint:!1,Events:[ru,To,mc,Kb,Qb,vm]},Eu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HF={bundleType:Eu.bundleType,version:Eu.version,rendererPackageName:Eu.rendererPackageName,rendererConfig:Eu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=n_(i),i===null?null:i.stateNode},findFiberByHostInstance:Eu.findFiberByHostInstance||FF,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 Zc=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!Zc.isDisabled&&Zc.supportsFiber)try{Ql=Zc.inject(HF),Lr=Zc}catch(i){}}return An.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UF,An.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Mm(s))throw Error(n(200));return MF(i,s,null,l)},An.createRoot=function(i,s){if(!Mm(i))throw Error(n(299));var l=!1,f="",g=N2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(f=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Rm(i,1,!1,null,null,l,!1,f,g),i[ei]=s.current,eu(i.nodeType===8?i.parentNode:i),new Dm(s)},An.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=n_(s),i=i===null?null:i.stateNode,i},An.flushSync=function(i){return Ts(i)},An.hydrate=function(i,s,l){if(!Xc(s))throw Error(n(200));return Jc(null,i,s,!0,l)},An.hydrateRoot=function(i,s,l){if(!Mm(i))throw Error(n(405));var f=l!=null&&l.hydratedSources||null,g=!1,y="",x=N2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),s=v2(s,null,i,1,l!=null?l:null,g,!1,y,x),i[ei]=s.current,eu(i),f)for(i=0;i<f.length;i++)l=f[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new Qc(s)},An.render=function(i,s,l){if(!Xc(s))throw Error(n(200));return Jc(null,i,s,!1,l)},An.unmountComponentAtNode=function(i){if(!Xc(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){Jc(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},An.unstable_batchedUpdates=vm,An.unstable_renderSubtreeIntoContainer=function(i,s,l,f){if(!Xc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Jc(i,s,l,!1,f)},An.version="18.3.1-next-f1338f8080-20240426",An}var Qy;function Xy(){if(Qy)return ch.exports;Qy=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(),ch.exports=UL(),ch.exports}var vl=Xy();function HL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var hh=()=>e=>Array.from(new Set(e)),Jy=typeof globalThis.document!="undefined"?$.useLayoutEffect:$.useEffect;function kl(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=$.useState(t),[o,a]=$.useState(r),u=e().value!==void 0,c=$.useRef(o);c.current=u?e().value:o;const d=$.useRef(c.current);Jy(()=>{d.current=c.current},[o,e().value]);const h=T=>{var w,N;const _=d.current,S=Gs(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:S,prev:_}),u||a(S),n(S,_)||(N=(w=e()).onChange)==null||N.call(w,S,_)};function m(){return u?e().value:o}return{initial:r,ref:c,get:m,set(T){(e().sync?vl.flushSync:FR)(()=>h(T))},invoke(T,_){var S,w;(w=(S=e()).onChange)==null||w.call(S,T,_)},hash(T){var _,S,w;return(w=(S=(_=e()).hash)==null?void 0:S.call(_,T))!=null?w:String(T)}}}kl.cleanup=e=>{$.useEffect(()=>e,[])},kl.ref=e=>{const t=$.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function zL(e){const t=$.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var jL=(e,t)=>{const n=$.useRef(!1),r=$.useRef(!1);$.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),$.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function ph(e,t={}){var ne,fe,de,ae,ye,we;const n=$.useMemo(()=>{const{id:ue,ids:q,getRootNode:re}=t;return ML({id:ue,ids:q,getRootNode:re})},[t]),r=(...ue)=>{e.debug&&console.log(...ue)},o=(fe=(ne=e.props)==null?void 0:ne.call(e,{props:Zf(t),scope:n}))!=null?fe:t,a=$L(o),u=(de=e.context)==null?void 0:de.call(e,{prop:a,bindable:kl,scope:n,flush:eT,getContext(){return d},getComputed(){return W},getRefs(){return S},getEvent(){return T()}}),c=Zy(u),d={get(ue){var q;return(q=c.current)==null?void 0:q[ue].ref.current},set(ue,q){var re;(re=c.current)==null||re[ue].set(q)},initial(ue){var q;return(q=c.current)==null?void 0:q[ue].initial},hash(ue){var re,A;const q=(re=c.current)==null?void 0:re[ue].get();return(A=c.current)==null?void 0:A[ue].hash(q)}},h=$.useRef(new Map),m=$.useRef(null),E=$.useRef(null),b=$.useRef({type:""}),T=()=>be(U({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>be(U({},F),{matches(...ue){return ue.includes(F.ref.current)},hasTag(ue){var q,re;return!!((re=(q=e.states[F.ref.current])==null?void 0:q.tags)!=null&&re.includes(ue))}}),S=zL((ye=(ae=e.refs)==null?void 0:ae.call(e,{prop:a,context:d}))!=null?ye:{}),w=()=>({state:_(),context:d,event:T(),prop:a,send:H,action:N,guard:B,track:jL,refs:S,computed:W,flush:eT,scope:n,choose:Y}),N=ue=>{const q=Gs(ue)?ue(w()):ue;if(!q)return;const re=q.map(A=>{var K,O;const R=(O=(K=e.implementations)==null?void 0:K.actions)==null?void 0:O[A];return R||eh(`[zag-js] No implementation found for action "${JSON.stringify(A)}"`),R});for(const A of re)A==null||A(w())},B=ue=>{var q,re;return Gs(ue)?ue(w()):(re=(q=e.implementations)==null?void 0:q.guards)==null?void 0:re[ue](w())},D=ue=>{const q=Gs(ue)?ue(w()):ue;if(!q)return;const re=q.map(R=>{var O,_e;const K=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[R];return K||eh(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),K}),A=[];for(const R of re){const K=R==null?void 0:R(w());K&&A.push(K)}return()=>A.forEach(R=>R==null?void 0:R())},Y=ue=>vR(ue).find(q=>{let re=!q.guard;return bl(q.guard)?re=!!B(q.guard):Gs(q.guard)&&(re=q.guard(w())),re}),W=ue=>{UR(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[ue];return q({context:d,event:T(),prop:a,refs:S,scope:n,computed:W})},F=kl(()=>({defaultValue:e.initialState({prop:a}),onChange(ue,q){var A,R,K,O;if(q){const _e=h.current.get(q);_e==null||_e(),h.current.delete(q)}q&&N((A=e.states[q])==null?void 0:A.exit),N((R=m.current)==null?void 0:R.actions);const re=D((K=e.states[ue])==null?void 0:K.effects);if(re&&h.current.set(ue,re),q===lh){N(e.entry);const _e=D(e.effects);_e&&h.current.set(lh,_e)}N((O=e.states[ue])==null?void 0:O.entry)}})),te=$.useRef(void 0),ge=$.useRef(Xs.NotStarted);Jy(()=>{queueMicrotask(()=>{var R;const re=ge.current===Xs.Started;ge.current=Xs.Started,r(re?"rehydrating...":"initializing...");const A=(R=te.current)!=null?R:F.initial;F.invoke(A,re?F.get():lh)});const ue=h.current,q=F.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=Xs.Stopped,ue.forEach(re=>re==null?void 0:re()),h.current=new Map,m.current=null,queueMicrotask(()=>{N(e.exit)})}},[]);const Te=()=>"ref"in F?F.ref.current:F.get(),H=ue=>{queueMicrotask(()=>{var O,_e,Re,Oe,We;if(ge.current!==Xs.Started)return;E.current=b.current,b.current=ue;let q=Te();const re=(Re=(O=e.states[q].on)==null?void 0:O[ue.type])!=null?Re:(_e=e.on)==null?void 0:_e[ue.type],A=Y(re);if(!A)return;m.current=A;const R=(Oe=A.target)!=null?Oe:q;r("transition",ue.type,A.target||q,`(${A.actions})`);const K=R!==q;K?vl.flushSync(()=>F.set(R)):A.reenter&&!K?F.invoke(q,q):N((We=A.actions)!=null?We:[])})};return(we=e.watch)==null||we.call(e,w()),{state:_(),send:H,context:d,prop:a,scope:n,refs:S,computed:W,event:T(),getStatus:()=>ge.current}}function Zy(e){const t=$.useRef(e);return t.current=e,t}function $L(e){const t=Zy(e);return function(r){return t.current[r]}}function eT(e){queueMicrotask(()=>{vl.flushSync(()=>e())})}var tT=HL(e=>e);function Nl(...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 VL(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 mh=e=>{const t=$.memo($.forwardRef((n,r)=>{const h=n,{asChild:o,children:a}=h,u=en(h,["asChild","children"]);if(!o)return $.createElement(e,be(U({},u),{ref:r}),a);if(!$.isValidElement(a))return null;const c=$.Children.only(a),d=VL(c);return $.cloneElement(c,be(U({},cr(u,c.props)),{ref:r?Nl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gi=(()=>{const e=new Map;return new Proxy(mh,{apply(t,n,r){return mh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,mh(r)),e.get(r)}})})();function qL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Js(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=$.createContext(u);c.displayName=t;function d(){var m;const h=$.useContext(c);if(!h&&n){const E=new Error(a!=null?a:qL(r,o));throw E.name="ContextError",(m=Error.captureStackTrace)==null||m.call(Error,E,d),E}return h}return[c.Provider,d,c]}const[YL,gh]=Js({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[nT,Ca]=Js({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),rT=$.forwardRef((e,t)=>{const n=gh(),r=Ca(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:v.jsx(gi.div,be(U({},o),{ref:Nl(r.ref,t)}))});rT.displayName="PopoverContent";const iT=$.forwardRef((e,t)=>{const n=gh(),r=Ca(),o=cr(n.getPositionerProps(),e);return r.unmounted?null:v.jsx(gi.div,be(U({},o),{ref:t}))});iT.displayName="PopoverPositioner";const sT=()=>(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]},[{},U({},e)]),oT=e=>sT()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function WL(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 GL={props({props:e}){return be(U({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",wl(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"});wn(()=>{var c,d;const u=Ol(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{wn(()=>{e.set("prevAnimationName",Ol(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 m,E,b;((b=(E=(m=d.composedPath)==null?void 0:m.call(d))==null?void 0:E[0])!=null?b:d.target)===o&&e.set("prevAnimationName",Ol(t.get("styles")))},u=d=>{const h=Ol(t.get("styles"));qr(d)===o&&h===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=Cl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),wL(()=>c())}}}}};function Ol(e){return(e==null?void 0:e.animationName)||"none"}hh()(["onExitComplete","present","immediate"]);function KL(e,t={}){const{sync:n=!1}=t,r=QL(e);return $.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 QL(e){const t=$.useRef(e);return t.current=e,t}const Eh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=en(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=$.useRef(!1),c=be(U({},a),{present:r,onExitComplete:KL(e.onExitComplete)}),d=ph(GL,c),h=WL(d);h.present&&(u.current=!0);const m=!h.present&&!u.current&&t||n&&!h.present&&u.current,E=()=>({"data-state":h.skip&&o?void 0:r?"open":"closed",hidden:!h.present});return{ref:h.setNode,getPresenceProps:E,present:h.present,unmounted:m}};var Zs=(e,t=[])=>({parts:(...n)=>{if(XL(t))return Zs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>Zs(e,[...t,...n]),omit:(...n)=>Zs(e,t.filter(r=>!n.includes(r))),rename:n=>Zs(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${eo(e)}"][data-part="${eo(r)}"]`,`& [data-scope="${eo(e)}"][data-part="${eo(r)}"]`].join(", "),attrs:{"data-scope":eo(e),"data-part":eo(r)}}}),{})}),eo=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),XL=e=>e.length===0;const JL=["top","right","bottom","left"],Ei=Math.min,Dn=Math.max,Il=Math.round,Pl=Math.floor,vr=e=>({x:e,y:e}),ZL={left:"right",right:"left",bottom:"top",top:"bottom"},e6={start:"end",end:"start"};function yh(e,t,n){return Dn(e,Ei(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function to(e){return e.split("-")[1]}function Th(e){return e==="x"?"y":"x"}function bh(e){return e==="y"?"height":"width"}const t6=new Set(["top","bottom"]);function kr(e){return t6.has(Gr(e))?"y":"x"}function _h(e){return Th(kr(e))}function n6(e,t,n){n===void 0&&(n=!1);const r=to(e),o=_h(e),a=bh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Rl(u)),[u,Rl(u)]}function r6(e){const t=Rl(e);return[xh(e),t,xh(t)]}function xh(e){return e.replace(/start|end/g,t=>e6[t])}const aT=["left","right"],uT=["right","left"],i6=["top","bottom"],s6=["bottom","top"];function o6(e,t,n){switch(e){case"top":case"bottom":return n?t?uT:aT:t?aT:uT;case"left":case"right":return t?i6:s6;default:return[]}}function a6(e,t,n,r){const o=to(e);let a=o6(Gr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(xh)))),a}function Rl(e){return e.replace(/left|right|bottom|top/g,t=>ZL[t])}function u6(e){return U({top:0,right:0,bottom:0,left:0},e)}function lT(e){return typeof e!="number"?u6(e):{top:e,right:e,bottom:e,left:e}}function Ll(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 cT(e,t,n){let{reference:r,floating:o}=e;const a=kr(t),u=_h(t),c=bh(u),d=Gr(t),h=a==="y",m=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let T;switch(d){case"top":T={x:m,y:r.y-o.height};break;case"bottom":T={x:m,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:E};break;case"left":T={x:r.x-o.width,y:E};break;default:T={x:r.x,y:r.y}}switch(to(t)){case"start":T[u]-=b*(n&&h?-1:1);break;case"end":T[u]+=b*(n&&h?-1:1);break}return T}const l6=(e,t,n)=>nt(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let h=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:m,y:E}=cT(h,r,d),b=r,T={},_=0;for(let S=0;S<c.length;S++){const{name:w,fn:N}=c[S],{x:B,y:D,data:Y,reset:W}=yield N({x:m,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:h,platform:u,elements:{reference:e,floating:t}});m=B!=null?B:m,E=D!=null?D:E,T=be(U({},T),{[w]:U(U({},T[w]),Y)}),W&&_<=50&&(_++,typeof W=="object"&&(W.placement&&(b=W.placement),W.rects&&(h=W.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):W.rects),{x:m,y:E}=cT(h,b,d)),S=-1)}return{x:m,y:E,placement:b,strategy:o,middlewareData:T}});function va(e,t){return nt(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:h="clippingAncestors",rootBoundary:m="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Wr(t,e),_=lT(T),w=c[b?E==="floating"?"reference":"floating":E],N=Ll(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(w))==null||n?w:w.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:h,rootBoundary:m,strategy:d})),B=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,D=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),Y=(yield a.isElement==null?void 0:a.isElement(D))?(yield a.getScale==null?void 0:a.getScale(D))||{x:1,y:1}:{x:1,y:1},W=Ll(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:B,offsetParent:D,strategy:d}):B);return{top:(N.top-W.top+_.top)/Y.y,bottom:(W.bottom-N.bottom+_.bottom)/Y.y,left:(N.left-W.left+_.left)/Y.x,right:(W.right-N.right+_.right)/Y.x}})}const c6=e=>({name:"arrow",options:e,fn(n){return nt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:h}=n,{element:m,padding:E=0}=Wr(e,n)||{};if(m==null)return{};const b=lT(E),T={x:r,y:o},_=_h(a),S=bh(_),w=yield c.getDimensions(m),N=_==="y",B=N?"top":"left",D=N?"bottom":"right",Y=N?"clientHeight":"clientWidth",W=u.reference[S]+u.reference[_]-T[_]-u.floating[S],F=T[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(m);let ge=te?te[Y]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[Y]||u.floating[S]);const Te=W/2-F/2,H=ge/2-w[S]/2-1,ne=Ei(b[B],H),fe=Ei(b[D],H),de=ne,ae=ge-w[S]-fe,ye=ge/2-w[S]/2+Te,we=yh(de,ye,ae),ue=!h.arrow&&to(a)!=null&&ye!==we&&u.reference[S]/2-(ye<de?ne:fe)-w[S]/2<0,q=ue?ye<de?ye-de:ye-ae:0;return{[_]:T[_]+q,data:U({[_]:we,centerOffset:ye-we-q},ue&&{alignmentOffset:q}),reset:ue}})}}),d6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return nt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:h,elements:m}=n,ye=Wr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:S="none",flipAlignment:w=!0}=ye,N=en(ye,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const B=Gr(a),D=kr(d),Y=Gr(d)===d,W=yield h.isRTL==null?void 0:h.isRTL(m.floating),F=T||(Y||!w?[Rl(d)]:r6(d)),te=S!=="none";!T&&te&&F.push(...a6(d,w,S,W));const ge=[d,...F],Te=yield va(n,N),H=[];let ne=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&H.push(Te[B]),b){const we=n6(a,c,W);H.push(Te[we[0]],Te[we[1]])}if(ne=[...ne,{placement:a,overflows:H}],!H.every(we=>we<=0)){var fe,de;const we=(((fe=u.flip)==null?void 0:fe.index)||0)+1,ue=ge[we];if(ue&&(!(b==="alignment"?D!==kr(ue):!1)||ne.every(A=>kr(A.placement)===D?A.overflows[0]>0:!0)))return{data:{index:we,overflows:ne},reset:{placement:ue}};let q=(de=ne.filter(re=>re.overflows[0]<=0).sort((re,A)=>re.overflows[1]-A.overflows[1])[0])==null?void 0:de.placement;if(!q)switch(_){case"bestFit":{var ae;const re=(ae=ne.filter(A=>{if(te){const R=kr(A.placement);return R===D||R==="y"}return!0}).map(A=>[A.placement,A.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((A,R)=>A[1]-R[1])[0])==null?void 0:ae[0];re&&(q=re);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function dT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function fT(e){return JL.some(t=>e[t]>=0)}const f6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return nt(this,null,function*(){const{rects:r}=n,u=Wr(e,n),{strategy:o="referenceHidden"}=u,a=en(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield va(n,be(U({},a),{elementContext:"reference"})),d=dT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:fT(d)}}}case"escaped":{const c=yield va(n,be(U({},a),{altBoundary:!0})),d=dT(c,r.floating);return{data:{escapedOffsets:d,escaped:fT(d)}}}default:return{}}})}}},hT=new Set(["left","top"]);function h6(e,t){return nt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Gr(n),c=to(n),d=kr(n)==="y",h=hT.has(u)?-1:1,m=a&&d?-1:1,E=Wr(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(T=c==="end"?_*-1:_),d?{x:T*m,y:b*h}:{x:b*h,y:T*m}})}const p6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return nt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,h=yield h6(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+h.x,y:u+h.y,data:be(U({},h),{placement:c})}})}}},m6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return nt(this,null,function*(){const{x:r,y:o,placement:a}=n,N=Wr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:B=>{let{x:D,y:Y}=B;return{x:D,y:Y}}}}=N,h=en(N,["mainAxis","crossAxis","limiter"]),m={x:r,y:o},E=yield va(n,h),b=kr(Gr(a)),T=Th(b);let _=m[T],S=m[b];if(u){const B=T==="y"?"top":"left",D=T==="y"?"bottom":"right",Y=_+E[B],W=_-E[D];_=yh(Y,_,W)}if(c){const B=b==="y"?"top":"left",D=b==="y"?"bottom":"right",Y=S+E[B],W=S-E[D];S=yh(Y,S,W)}const w=d.fn(be(U({},n),{[T]:_,[b]:S}));return be(U({},w),{data:{x:w.x-r,y:w.y-o,enabled:{[T]:u,[b]:c}}})})}}},g6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:h=!0}=Wr(e,t),m={x:n,y:r},E=kr(o),b=Th(E);let T=m[b],_=m[E];const S=Wr(c,t),w=typeof S=="number"?{mainAxis:S,crossAxis:0}:U({mainAxis:0,crossAxis:0},S);if(d){const D=b==="y"?"height":"width",Y=a.reference[b]-a.floating[D]+w.mainAxis,W=a.reference[b]+a.reference[D]-w.mainAxis;T<Y?T=Y:T>W&&(T=W)}if(h){var N,B;const D=b==="y"?"width":"height",Y=hT.has(Gr(o)),W=a.reference[E]-a.floating[D]+(Y&&((N=u.offset)==null?void 0:N[E])||0)+(Y?0:w.crossAxis),F=a.reference[E]+a.reference[D]+(Y?0:((B=u.offset)==null?void 0:B[E])||0)-(Y?w.crossAxis:0);_<W?_=W:_>F&&(_=F)}return{[b]:T,[E]:_}}}},E6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return nt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ne=Wr(e,n),{apply:h=()=>{}}=ne,m=en(ne,["apply"]),E=yield va(n,m),b=Gr(a),T=to(a),_=kr(a)==="y",{width:S,height:w}=u.floating;let N,B;b==="top"||b==="bottom"?(N=b,B=T===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(B=b,N=T==="end"?"top":"bottom");const D=w-E.top-E.bottom,Y=S-E.left-E.right,W=Ei(w-E[N],D),F=Ei(S-E[B],Y),te=!n.middlewareData.shift;let ge=W,Te=F;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(Te=Y),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=D),te&&!T){const fe=Dn(E.left,0),de=Dn(E.right,0),ae=Dn(E.top,0),ye=Dn(E.bottom,0);_?Te=S-2*(fe!==0||de!==0?fe+de:Dn(E.left,E.right)):ge=w-2*(ae!==0||ye!==0?ae+ye:Dn(E.top,E.bottom))}yield h(be(U({},n),{availableWidth:Te,availableHeight:ge}));const H=yield c.getDimensions(d.floating);return S!==H.width||w!==H.height?{reset:{rects:!0}}:{}})}}};function Dl(){return typeof window!="undefined"}function no(e){return pT(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(pT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function pT(e){return Dl()?e instanceof Node||e instanceof Mn(e).Node:!1}function dr(e){return Dl()?e instanceof Element||e instanceof Mn(e).Element:!1}function Or(e){return Dl()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function mT(e){return!Dl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const y6=new Set(["inline","contents"]);function ka(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!y6.has(o)}const T6=new Set(["table","td","th"]);function b6(e){return T6.has(no(e))}const _6=[":popover-open",":modal"];function Ml(e){return _6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const x6=["transform","translate","scale","rotate","perspective"],S6=["transform","translate","scale","rotate","perspective","filter"],w6=["paint","layout","strict","content"];function Sh(e){const t=wh(),n=dr(e)?fr(e):e;return x6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||S6.some(r=>(n.willChange||"").includes(r))||w6.some(r=>(n.contain||"").includes(r))}function A6(e){let t=yi(e);for(;Or(t)&&!ro(t);){if(Sh(t))return t;if(Ml(t))return null;t=yi(t)}return null}function wh(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const C6=new Set(["html","body","#document"]);function ro(e){return C6.has(no(e))}function fr(e){return Mn(e).getComputedStyle(e)}function Fl(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yi(e){if(no(e)==="html")return e;const t=e.assignedSlot||e.parentNode||mT(e)&&e.host||Nr(e);return mT(t)?t.host:t}function gT(e){const t=yi(e);return ro(t)?e.ownerDocument?e.ownerDocument.body:e.body:Or(t)&&ka(t)?t:gT(t)}function Na(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=gT(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=Ah(u);return t.concat(u,u.visualViewport||[],ka(o)?o:[],c&&n?Na(c):[])}return t.concat(o,Na(o,[],n))}function Ah(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function ET(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Or(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Il(n)!==a||Il(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Ch(e){return dr(e)?e:e.contextElement}function io(e){const t=Ch(e);if(!Or(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=ET(t);let u=(a?Il(n.width):n.width)/r,c=(a?Il(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const v6=vr(0);function yT(e){const t=Mn(e);return!wh()||!t.visualViewport?v6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function is(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=Ch(e);let u=vr(1);t&&(r?dr(r)&&(u=io(r)):u=io(e));const c=k6(a,n,r)?yT(a):vr(0);let d=(o.left+c.x)/u.x,h=(o.top+c.y)/u.y,m=o.width/u.x,E=o.height/u.y;if(a){const b=Mn(a),T=r&&dr(r)?Mn(r):r;let _=b,S=Ah(_);for(;S&&r&&T!==_;){const w=io(S),N=S.getBoundingClientRect(),B=fr(S),D=N.left+(S.clientLeft+parseFloat(B.paddingLeft))*w.x,Y=N.top+(S.clientTop+parseFloat(B.paddingTop))*w.y;d*=w.x,h*=w.y,m*=w.x,E*=w.y,d+=D,h+=Y,_=Mn(S),S=Ah(_)}}return Ll({width:m,height:E,x:d,y:h})}function Bl(e,t){const n=Fl(e).scrollLeft;return t?t.left+n:is(Nr(e)).left+n}function TT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Bl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function N6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Nr(r),c=t?Ml(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},h=vr(1);const m=vr(0),E=Or(r);if((E||!E&&!a)&&((no(r)!=="body"||ka(u))&&(d=Fl(r)),Or(r))){const T=is(r);h=io(r),m.x=T.x+r.clientLeft,m.y=T.y+r.clientTop}const b=u&&!E&&!a?TT(u,d):vr(0);return{width:n.width*h.x,height:n.height*h.y,x:n.x*h.x-d.scrollLeft*h.x+m.x+b.x,y:n.y*h.y-d.scrollTop*h.y+m.y+b.y}}function O6(e){return Array.from(e.getClientRects())}function I6(e){const t=Nr(e),n=Fl(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Bl(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const bT=25;function P6(e,t){const n=Mn(e),r=Nr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const m=wh();(!m||m&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const h=Bl(r);if(h<=0){const m=r.ownerDocument,E=m.body,b=getComputedStyle(E),T=m.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-T);_<=bT&&(a-=_)}else h<=bT&&(a+=h);return{width:a,height:u,x:c,y:d}}const R6=new Set(["absolute","fixed"]);function L6(e,t){const n=is(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Or(e)?io(e):vr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,h=r*a.y;return{width:u,height:c,x:d,y:h}}function _T(e,t,n){let r;if(t==="viewport")r=P6(e,n);else if(t==="document")r=I6(Nr(e));else if(dr(t))r=L6(t,n);else{const o=yT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ll(r)}function xT(e,t){const n=yi(e);return n===t||!dr(n)||ro(n)?!1:fr(n).position==="fixed"||xT(n,t)}function D6(e,t){const n=t.get(e);if(n)return n;let r=Na(e,[],!1).filter(c=>dr(c)&&no(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?yi(e):e;for(;dr(u)&&!ro(u);){const c=fr(u),d=Sh(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&R6.has(o.position)||ka(u)&&!d&&xT(e,u))?r=r.filter(m=>m!==u):o=c,u=yi(u)}return t.set(e,r),r}function M6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Ml(t)?[]:D6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((h,m)=>{const E=_T(t,m,o);return h.top=Dn(E.top,h.top),h.right=Ei(E.right,h.right),h.bottom=Ei(E.bottom,h.bottom),h.left=Dn(E.left,h.left),h},_T(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function F6(e){const{width:t,height:n}=ET(e);return{width:t,height:n}}function B6(e,t,n){const r=Or(t),o=Nr(t),a=n==="fixed",u=is(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=vr(0);function h(){d.x=Bl(o)}if(r||!r&&!a)if((no(t)!=="body"||ka(o))&&(c=Fl(t)),r){const T=is(t,!0,a,t);d.x=T.x+t.clientLeft,d.y=T.y+t.clientTop}else o&&h();a&&!r&&o&&h();const m=o&&!r&&!a?TT(o,c):vr(0),E=u.left+c.scrollLeft-d.x-m.x,b=u.top+c.scrollTop-d.y-m.y;return{x:E,y:b,width:u.width,height:u.height}}function vh(e){return fr(e).position==="static"}function ST(e,t){if(!Or(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function wT(e,t){const n=Mn(e);if(Ml(e))return n;if(!Or(e)){let o=yi(e);for(;o&&!ro(o);){if(dr(o)&&!vh(o))return o;o=yi(o)}return n}let r=ST(e,t);for(;r&&b6(r)&&vh(r);)r=ST(r,t);return r&&ro(r)&&vh(r)&&!Sh(r)?n:r||A6(e)||n}const U6=function(e){return nt(this,null,function*(){const t=this.getOffsetParent||wT,n=this.getDimensions,r=yield n(e.floating);return{reference:B6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function H6(e){return fr(e).direction==="rtl"}const z6={convertOffsetParentRelativeRectToViewportRelativeRect:N6,getDocumentElement:Nr,getClippingRect:M6,getOffsetParent:wT,getElementRects:U6,getClientRects:O6,getDimensions:F6,getScale:io,isElement:dr,isRTL:H6};function AT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function j6(e,t){let n=null,r;const o=Nr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const h=e.getBoundingClientRect(),{left:m,top:E,width:b,height:T}=h;if(c||t(),!b||!T)return;const _=Pl(E),S=Pl(o.clientWidth-(m+b)),w=Pl(o.clientHeight-(E+T)),N=Pl(m),D={rootMargin:-_+"px "+-S+"px "+-w+"px "+-N+"px",threshold:Dn(0,Ei(1,d))||1};let Y=!0;function W(F){const te=F[0].intersectionRatio;if(te!==d){if(!Y)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!AT(h,e.getBoundingClientRect())&&u(),Y=!1}try{n=new IntersectionObserver(W,be(U({},D),{root:o.ownerDocument}))}catch(F){n=new IntersectionObserver(W,D)}n.observe(e)}return u(!0),a}function $6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,h=Ch(e),m=o||a?[...h?Na(h):[],...Na(t)]:[];m.forEach(N=>{o&&N.addEventListener("scroll",n,{passive:!0}),a&&N.addEventListener("resize",n)});const E=h&&c?j6(h,n):null;let b=-1,T=null;u&&(T=new ResizeObserver(N=>{let[B]=N;B&&B.target===h&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var D;(D=T)==null||D.observe(t)})),n()}),h&&!d&&T.observe(h),T.observe(t));let _,S=d?is(e):null;d&&w();function w(){const N=is(e);S&&!AT(S,N)&&n(),S=N,_=requestAnimationFrame(w)}return n(),()=>{var N;m.forEach(B=>{o&&B.removeEventListener("scroll",n),a&&B.removeEventListener("resize",n)}),E==null||E(),(N=T)==null||N.disconnect(),T=null,d&&cancelAnimationFrame(_)}}const V6=p6,q6=m6,Y6=d6,W6=E6,G6=f6,K6=c6,Q6=g6,X6=(e,t,n)=>{const r=new Map,o=U({platform:z6},n),a=be(U({},o.platform),{_c:r});return l6(e,t,be(U({},o),{platform:a}))};function CT(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 be(U({},o),{toJSON:()=>o})}function J6(e){if(!e)return CT();const{x:t,y:n,width:r,height:o}=e;return CT(t,n,r,o)}function Z6(e,t){return{contextElement:Yt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?J6(r):n.getBoundingClientRect()}}}var Oa=e=>({variable:e,reference:`var(${e})`}),Kr={arrowSize:Oa("--arrow-size"),arrowSizeHalf:Oa("--arrow-size-half"),arrowBg:Oa("--arrow-background"),transformOrigin:Oa("--transform-origin"),arrowOffset:Oa("--arrow-offset")},eD=e=>e==="top"||e==="bottom"?"y":"x";function tD(e,t){return{name:"transformOrigin",fn(n){var Te,H,ne,fe,de;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],h=eD(d),m=((Te=o.arrow)==null?void 0:Te.x)||0,E=((H=o.arrow)==null?void 0:H.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=m+b/2,S=E+T/2,w=Math.abs(((ne=o.shift)==null?void 0:ne.y)||0),N=u.reference.height/2,B=T/2,D=(de=(fe=e.offset)==null?void 0:fe.mainAxis)!=null?de:e.gutter,Y=typeof D=="number"?D+B:D!=null?D:B,W=w>Y,F={top:`${_}px calc(100% + ${Y}px)`,bottom:`${_}px ${-Y}px`,left:`calc(100% + ${Y}px) ${S}px`,right:`${-Y}px ${S}px`}[d],te=`${_}px ${u.reference.y+N-c}px`,ge=!!e.overlap&&h==="y"&&W;return r.floating.style.setProperty(Kr.transformOrigin.variable,ge?te:F),{data:{transformOrigin:ge?te:F}}}}}var nD={name:"rects",fn({rects:e}){return{data:e}}},rD=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% + ${Kr.arrowOffset.reference})`}),{}}}};function iD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var sD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function vT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function kh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function oD(e,t,n){const r=e||t.createElement("div");return K6({element:r,padding:n.arrowPadding})}function aD(e,t){var n;if(!NR((n=t.offset)!=null?n:t.gutter))return V6(({placement:r})=>{var m,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(m=t.offset)==null?void 0:m.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=iD(r),d=c?void 0:t.shift,h=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:d;return Zf({crossAxis:h,mainAxis:u,alignmentAxis:t.shift})})}function uD(e){if(!e.flip)return;const t=kh(e.boundary);return Y6(be(U({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function lD(e){if(!e.slide&&!e.overlap)return;const t=kh(e.boundary);return q6(be(U({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Q6()}))}function cD(e){return W6({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function dD(e){var t;if(e.hideWhenDetached)return G6({strategy:"referenceHidden",boundary:(t=kh(e.boundary))!=null?t:"clippingAncestors"})}function fD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function hD(e,t,n={}){const r=Z6(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},sD,n),a=t.querySelector("[data-part=arrow]"),u=[aD(a,o),uD(o),lD(o),oD(a,t.ownerDocument,o),rD(a),tD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),cD(o),dD(o),nD],{placement:c,strategy:d,onComplete:h,onPositioned:m}=o,E=()=>nt(null,null,function*(){var Y;if(!r||!t)return;const S=yield X6(r,t,{placement:c,middleware:u,strategy:d});h==null||h(S),m==null||m({placed:!0});const w=Ks(t),N=vT(w,S.x),B=vT(w,S.y);t.style.setProperty("--x",`${N}px`),t.style.setProperty("--y",`${B}px`),o.hideWhenDetached&&(((Y=S.middlewareData.hide)==null?void 0:Y.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const D=t.firstElementChild;if(D){const W=wl(D);t.style.setProperty("--z-index",W.zIndex)}}),b=()=>nt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),m==null||m({placed:!0})):yield E()}),T=fD(o.listeners),_=o.listeners?$6(r,t,b,T):BR;return b(),()=>{_==null||_(),m==null||m({placed:!1})}}function kT(e,t,n={}){const c=n,{defer:r}=c,o=en(c,["defer"]),a=r?wn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,h=typeof t=="function"?t():t;u.push(hD(d,h,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var pD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function mD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Kr.arrowSize.reference,height:Kr.arrowSize.reference,[Kr.arrowSizeHalf.variable]:`calc(${Kr.arrowSize.reference} / 2)`,[Kr.arrowOffset.variable]:`calc(${Kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?pD[t.split("-")[0]]:void 0,background:Kr.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 so=new WeakMap,Ul=new WeakMap,Hl={},Nh=0,NT=e=>e&&(e.host||NT(e.parentNode)),gD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=NT(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),ED=new Set(["script","output","status","next-route-announcer"]),yD=e=>ED.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),TD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=gD(n,Array.isArray(e)?e:[e]);Hl[r]||(Hl[r]=new WeakMap);const c=Hl[r],d=[],h=new Set,m=new Set(u),E=T=>{!T||h.has(T)||(h.add(T),E(T.parentNode))};u.forEach(T=>{E(T),a&&Yt(T)&&By(T,_=>{E(_)})});const b=T=>{!T||m.has(T)||Array.prototype.forEach.call(T.children,_=>{if(h.has(_))b(_);else try{if(yD(_))return;const w=_.getAttribute(o)==="true",N=(so.get(_)||0)+1,B=(c.get(_)||0)+1;so.set(_,N),c.set(_,B),d.push(_),N===1&&w&&Ul.set(_,!0),B===1&&_.setAttribute(r,""),w||_.setAttribute(o,"true")}catch(S){console.error("[zag-js > ariaHidden] cannot operate on ",_,S)}})};return b(n),h.clear(),Nh++,()=>{d.forEach(T=>{const _=so.get(T)-1,S=c.get(T)-1;so.set(T,_),c.set(T,S),_||(Ul.has(T)||T.removeAttribute(o),Ul.delete(T)),S||T.removeAttribute(r)}),Nh--,Nh||(so=new WeakMap,so=new WeakMap,Ul=new WeakMap,Hl={})}},bD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,_D=(e,t=bD(e),n="data-aria-hidden",r=!0)=>{if(t)return TD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},xD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function OT(e,t={}){const{defer:n=!0}=t,r=n?xD:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(_D(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function SD(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 wD(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 IT="pointerdown.outside",PT="focus.outside";function AD(e){for(const t of e)if(Yt(t)&&Yr(t))return!0;return!1}var RT=e=>"clientY"in e;function CD(e,t){if(!RT(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 vD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function LT(e,t){if(!t||!RT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return vD(u,c)?r||a:!1}function kD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Cr(e),h=Ks(e),m=SD(h),E=wD(h);function b(D,Y){if(!Yt(Y)||!Y.isConnected||Sl(e,Y)||CD(e,D)||c&&Fy(e,Y))return!1;const W=d.querySelector(`[aria-controls="${e.id}"]`);if(W){const te=uh(W);if(LT(D,te))return!1}const F=uh(e);return LT(D,F)?!1:!(n!=null&&n(Y))}const T=new Set,_=ns(e==null?void 0:e.getRootNode());function S(D){function Y(W){var Te,H;const F=u&&!Uy()?wn:ne=>ne(),te=W!=null?W:D,ge=(H=(Te=te==null?void 0:te.composedPath)==null?void 0:Te.call(te))!=null?H:[te==null?void 0:te.target];F(()=>{const ne=_?ge[0]:qr(D);if(!(!e||!b(D,ne))){if(o||a){const fe=Jf(o,a);e.addEventListener(IT,fe,{once:!0})}DT(e,IT,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:gL(te),focusable:AD(ge),target:ne}})}})}D.pointerType==="touch"?(T.forEach(W=>W()),T.add(lr(d,"click",Y,{once:!0})),T.add(E.addEventListener("click",Y,{once:!0})),T.add(m.addEventListener("click",Y,{once:!0}))):Y()}const w=new Set,N=setTimeout(()=>{w.add(lr(d,"pointerdown",S,!0)),w.add(E.addEventListener("pointerdown",S,!0)),w.add(m.addEventListener("pointerdown",S,!0))},0);function B(D){(u?wn:W=>W())(()=>{var te,ge;const W=(ge=(te=D==null?void 0:D.composedPath)==null?void 0:te.call(D))!=null?ge:[D==null?void 0:D.target],F=_?W[0]:qr(D);if(!(!e||!b(D,F))){if(r||a){const Te=Jf(r,a);e.addEventListener(PT,Te,{once:!0})}DT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:D,contextmenu:!1,focusable:Yr(F),target:F}})}})}return Uy()||(w.add(lr(d,"focusin",B,!0)),w.add(E.addEventListener("focusin",B,!0)),w.add(m.addEventListener("focusin",B,!0))),()=>{clearTimeout(N),T.forEach(D=>D()),w.forEach(D=>D())}}function ND(e,t){const{defer:n}=t,r=n?wn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(kD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function DT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function OD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return lr(Cr(e),"keydown",n,{capture:!0})}var MT="layer:request-dismiss",Gn={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=>Sl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Sl(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=>Gn.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];PD(e,MT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),ID(e,MT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ID(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 PD(e,t,n){e.addEventListener(t,n,{once:!0})}var FT;function BT(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function RD(e){e.style.pointerEvents=""}function LD(e,t){const n=Cr(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(FT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=PL(()=>{const c=o();return Yt(c)?c:null},{timeout:1e3});a.then(c=>r.push(Cl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=FT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function DD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){eh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,h={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Gn.add(h),BT();function m(S){var N,B;const w=qr(S.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(w)||((N=t.onPointerDownOutside)==null||N.call(t,S),(B=t.onInteractOutside)==null||B.call(t,S),!S.defaultPrevented&&(c&&console.log("onPointerDownOutside:",S.detail.originalEvent),r==null||r()))}function E(S){var N,B;const w=qr(S.detail.originalEvent);Gn.isInBranch(w)||((N=t.onFocusOutside)==null||N.call(t,S),(B=t.onInteractOutside)==null||B.call(t,S),!S.defaultPrevented&&(c&&console.log("onFocusOutside:",S.detail.originalEvent),r==null||r()))}function b(S){var w;Gn.isTopMost(e)&&((w=t.onEscapeKeyDown)==null||w.call(t,S),!S.defaultPrevented&&r&&(S.preventDefault(),r()))}function T(S){var D;if(!e)return!1;const w=typeof u=="function"?u():u,N=Array.isArray(w)?w:[w],B=(D=t.persistentElements)==null?void 0:D.map(Y=>Y()).filter(Yt);return B&&N.push(...B),N.some(Y=>Sl(Y,S))||Gn.isInNestedLayer(e,S)}const _=[a?LD(e,t.persistentElements):void 0,OD(e,b),ND(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:m,defer:t.defer})];return()=>{Gn.remove(e),BT(),RD(e),_.forEach(S=>S==null?void 0:S())}}function UT(e,t){const{defer:n}=t,r=n?wn:a=>a(),o=[];return o.push(r(()=>{const a=Gs(e)?e():e;o.push(DD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var MD=Object.defineProperty,FD=(e,t,n)=>t in e?MD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,bt=(e,t,n)=>FD(e,typeof t!="symbol"?t+"":t,n),HT={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()}},BD=[],UD=class{constructor(e,t){bt(this,"trapStack"),bt(this,"config"),bt(this,"doc"),bt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),bt(this,"portalContainers",new Set),bt(this,"listenerCleanups",[]),bt(this,"handleFocus",r=>{const o=qr(r),a=this.findContainerIndex(o,r)>=0;if(a||xl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(Aa(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:h}=this.state.containerGroups[d];if(h.length>0){const m=h.findIndex(E=>E===this.state.mostRecentlyFocusedNode);m>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?m+1<h.length&&(u=h[m+1],c=!1):m-1>=0&&(u=h[m-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(h=>Aa(h)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),bt(this,"handlePointerDown",r=>{const o=qr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Pa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Pa(this.config.allowOutsideClick,r)||r.preventDefault()}}),bt(this,"handleClick",r=>{const o=qr(r);this.findContainerIndex(o,r)>=0||Pa(this.config.clickOutsideDeactivates,r)||Pa(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),bt(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;Ia(r)&&r.preventDefault(),this.tryFocus(a)}}),bt(this,"handleEscapeKey",r=>{HD(r)&&Pa(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),bt(this,"_mutationObserver"),bt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(h=>h===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const h=d;return oL(h)?!0:h.id&&!this.state.containers.some(m=>m.contains(h))?aL(h):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),bt(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)}))}),bt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Yr(r)){const o=Qs(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}),bt(this,"tryFocus",r=>{if(r!==!1&&r!==Qs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,zD(r)&&r.select()}}),bt(this,"deactivate",r=>{if(!this.state.active)return this;const o=U({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),HT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const h=()=>{zT(()=>{if(d){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(m)}u==null||u()})};if(d&&c){const m=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(m).then(h,h),this}return h(),this}),bt(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}),bt(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}),bt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),bt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),bt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),bt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),bt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||qr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),h=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let m=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||Yr(u)&&!rs(u)&&!(h!=null&&h.nextTabbableNode(u,!1)))&&(m=d),m>=0){const E=m===0?this.state.tabbableGroups.length-1:m-1,b=this.state.tabbableGroups[E];c=Aa(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Ia(o)||(c=h==null?void 0:h.nextTabbableNode(u,!1))}else{let m=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(m<0&&((h==null?void 0:h.container)===u||Yr(u)&&!rs(u)&&!(h!=null&&h.nextTabbableNode(u)))&&(m=d),m>=0){const E=m===this.state.tabbableGroups.length-1?0:m+1,b=this.state.tabbableGroups[E];c=Aa(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Ia(o)||(c=h==null?void 0:h.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||BD;const n=U({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Ia(r)&&!r.shiftKey},isKeyBackward(r){return Ia(r)&&r.shiftKey}},t);this.doc=n.document||Cr(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=>{rL(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?Fy(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=wa(e,{getShadowRoot:this.config.getShadowRoot}),n=Vy(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let h=0;h<t.length;h++)if(Aa(t[h])>0){c=!0;break}function d(h,m=!0){const E=t.indexOf(h);if(E>=0)return t[E+(m?1:-1)];const b=n.indexOf(h);if(!(b<0)){if(m){for(let T=b+1;T<n.length;T++)if(rs(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(rs(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return HT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?zT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(lr(this.doc,"focusin",this.handleFocus,!0),lr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),lr(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=Qs(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)}},Ia=e=>e.key==="Tab",Pa=(e,...t)=>typeof e=="function"?e(...t):e,HD=e=>!e.isComposing&&e.key==="Escape",zT=e=>setTimeout(e,0),zD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function jT(e,t={}){let n;const r=wn(()=>{const o=typeof e=="function"?e():e;if(o){n=new UD(o,be(U({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Cr(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Oh="data-scroll-lock";function jD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function $T(e){const t=wl(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function VT(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Oh))return;const u=$T(r)||$T(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Oh,"");const d=()=>OL(r,"--scrollbar-width",`${c}px`),h=jD(r),m=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[h]=`${c}px`),Cl(o,_)},E=()=>{var W,F;const{scrollX:_,scrollY:S,visualViewport:w}=n,N=(W=w==null?void 0:w.offsetLeft)!=null?W:0,B=(F=w==null?void 0:w.offsetTop)!=null?F:0,D={position:"fixed",overflow:"hidden",top:`${-(S-Math.floor(B))}px`,left:`${-(_-Math.floor(N))}px`,right:"0"};!u&&c>0&&(D[h]=`${c}px`);const Y=Cl(o,D);return()=>{Y==null||Y(),n.scrollTo({left:_,top:S,behavior:"instant"})}},b=[d(),Hy()?E():m()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Oh)}}var $D=Zs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Ir=$D.build(),qT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},YT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Ih=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},WT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},VD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Ph=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},qD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},GT=e=>e.getById(qT(e)),oo=e=>e.getById(YT(e)),ao=e=>e.getById(Ih(e)),KT=e=>e.getById(WT(e)),YD=e=>e.getById(Ph(e)),WD=e=>e.getById(Rh(e));function GD(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),h=r.get("currentPlacement"),m=a("currentPortalled"),E=r.get("renderedElements"),b=mD(be(U({},u("positioning")),{placement:h}));return{portalled:m,open:d,setOpen(T){n.matches("open")!==T&&o({type:T?"OPEN":"CLOSE"})},reposition(T={}){o({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(be(U({id:VD(c)},Ir.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(be(U({},Ir.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(be(U({},Ir.anchor.attrs),{dir:u("dir"),id:qT(c)}))},getTriggerProps(){return t.button(be(U({},Ir.trigger.attrs),{dir:u("dir"),type:"button","data-placement":h,id:YT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Ih(c),onPointerDown(T){mL(T)&&hL()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(be(U({},Ir.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(U({id:WT(c)},Ir.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(be(U({},Ir.content.attrs),{dir:u("dir"),id:Ih(c),tabIndex:-1,role:"dialog","aria-modal":$R(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":jR(d),"aria-labelledby":E.title?Ph(c):void 0,"aria-describedby":E.description?Rh(c):void 0,"data-placement":h}))},getTitleProps(){return t.element(be(U({},Ir.title.attrs),{id:Ph(c),dir:u("dir")}))},getDescriptionProps(){return t.element(be(U({},Ir.description.attrs),{id:Rh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(be(U({},Ir.closeTrigger.attrs),{dir:u("dir"),id:qD(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var KD={props({props:e}){return be(U({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:U({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=GT(n))!=null?a:oo(n);return kT(r,()=>KT(n),be(U({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>ao(n);let o=!0;return UT(r,{type:"popover",pointerBlocking:t("modal"),exclude:oo(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:NL(()=>ao(t),{triggerElement:oo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?OT(()=>[ao(t),oo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return VT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?jT(()=>ao(t),{initialFocus:()=>qy({root:ao(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=GT(n))!=null?u:oo(n);kT(o,()=>KT(n),be(U(U({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){wn(()=>{Object.assign(e.get("renderedElements"),{title:!!YD(t),description:!!WD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||wn(()=>{const n=qy({root:ao(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||wn(()=>{const a=oo(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})}}}};hh()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[RB,Lh]=Js({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[LB,QT]=Js({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),QD=e=>{const t=$.useId(),{getRootNode:n}=Lh(),{dir:r}=QT(),o=U({id:t,dir:r,getRootNode:n},e),a=ph(KD,o);return GD(a,tT)},XD=e=>{const[t,u]=oT(e),c=u,{children:n}=c,r=en(c,["children"]),o=QD(r),a=Eh(cr({present:o.open},t));return v.jsx(YL,{value:o,children:v.jsx(nT,{value:a,children:n})})},XT=$.forwardRef((e,t)=>{const n=gh(),r=Ca(),o=cr(be(U({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return v.jsx(gi.button,be(U({},o),{ref:t}))});XT.displayName="PopoverTrigger";function JD(e){return sn({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 ZD(e){return sn({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 e4(e){return sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function JT(e){return sn({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 t4=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=$r(),r=()=>{n(),e()};return v.jsxs("button",{className:Z(`${X}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[v.jsx(JT,{}),"Clear chat"]})},n4=({className:e,componentType:t,children:n})=>{const[r,o]=$.useState(!1),{globalClassName:a}=nn(),u=()=>{o(!1)},c=d=>{o(d.open)};return v.jsxs(XD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[v.jsx(XT,{"aria-label":`Overflow menu for ${t}`,className:Z(`${X}-overflow-menu-button-trigger`,a,e,t),children:v.jsx(e4,{})}),v.jsx(iT,{children:v.jsxs(rT,{className:Z(`${X}-overflow-menu-list`,a,t),children:[n,v.jsx(t4,{componentType:t,onClearChat:u})]})})]})};function r4(e){return sn({attr:{viewBox:"0 0 24 24",fill:"currentColor"},child:[{tag:"path",attr:{d:"M15 4.00008H13V11.0001H20V9.00008H16.4142L20.7071 4.70718L19.2929 3.29297L15 7.58586V4.00008ZM4.00008 15H7.58586L3.29297 19.2929L4.70718 20.7071L9.00008 16.4142V20H11.0001V13H4.00008V15Z"},child:[]}]})(e)}function ZT(e){return sn({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 eb=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=en(o,["onClearChat","componentType"]);const{globalClassName:a}=nn(),{resetConversation:u}=$r(),c=()=>{u(),e==null||e()};return v.jsx(Rs,U({icon:v.jsx(JT,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:Z(a,`${X}-clear-chat-icon-button`,t),onClick:c},n))},tb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nn(),r=()=>{Gd("modal")};return t?v.jsx(Rs,{className:Z(n,`${X}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:v.jsx(ZT,{})}):v.jsxs("button",{className:Z(n,`${X}-overflow-menu-button`,`${X}-toggle-modal-button`,e),onClick:r,children:[v.jsx(ZT,{}),"Show modal"]})},i4=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=nn();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),h=n.getPdp(t),m=n.getImage(t),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:h;return v.jsxs("div",{className:Z(r,`${X}-product-tile`,{embedded:!e,standalone:e}),children:[v.jsx("img",{className:Z(r,`${X}-product-tile-image`,{embedded:!e,standalone:e}),src:`${m}`,alt:`${a}`,loading:"lazy"}),v.jsxs("div",{className:Z(r,`${X}-product-tile-details`,{embedded:!e,standalone:e}),children:[v.jsxs("div",{className:Z(r,`${X}-product-tile-content`),children:[u&&v.jsx("p",{className:`${X}-product-tile-brand`,children:u}),E?v.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:Z(r,`${X}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",v.jsx("span",{className:Z(r,`${X}-product-tile-pdp-arrow`),children:"→"})]}):v.jsx("p",{className:Z(r,`${X}-product-tile-name`),title:a,children:a})]}),v.jsx("div",{className:Z(r,`${X}-product-tile-footer`),children:v.jsx("p",{className:Z(r,`${X}-product-tile-price`),children:c})})]})]})},s4=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=nn(),o=t;return n?v.jsxs("div",{className:Z(r,`${X}-display-products widget-message`),children:[v.jsx("p",{children:o.message}),o.products&&o.products.length>0&&v.jsx("div",{className:Z(r,`${X}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return v.jsx(i4,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},o4=({globalClassName:e,message:t,isWidgetStandalone:n})=>v.jsx("div",{className:Z(e,`${X}-error-message`,{standalone:n,embedded:!n}),children:v.jsxs("p",{className:Z(e,`${X}-error-message-text`,{standalone:n,embedded:!n}),children:[v.jsx(zC,{})," ",t.message||"An error occurred while processing your request."]})});function a4(e){return sn({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const u4=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>v.jsx("div",{className:Z(e,`${X}-suggestion-container standalone`),children:o.map(u=>v.jsxs(Xd,{disabled:r,className:Z(e,`${X}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[v.jsx(a4,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),l4=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=$r();return v.jsxs("div",{className:Z(e,`${X}-follow-up`),children:[v.jsx("p",{className:Z(e,`${X}-text`),children:t.message}),n&&v.jsx(u4,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&v.jsx("div",{className:Z(e,`${X}-suggestion-container embedded`),children:t.suggestions.map(a=>v.jsx("button",{disabled:o,className:Z(e,`${X}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function nb(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 c4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function d4(e,t,n){const o=ol((n||{}).ignore||[]),a=f4(t);let u=-1;for(;++u<a.length;)nE(e,"text",c);function c(h,m){let E=-1,b;for(;++E<m.length;){const T=m[E],_=b?b.children:void 0;if(o(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return d(h,m)}function d(h,m){const E=m[m.length-1],b=a[u][0],T=a[u][1];let _=0;const w=E.children.indexOf(h);let N=!1,B=[];b.lastIndex=0;let D=b.exec(h.value);for(;D;){const Y=D.index,W={index:D.index,input:D.input,stack:[...m,h]};let F=T(...D,W);if(typeof F=="string"&&(F=F.length>0?{type:"text",value:F}:void 0),F===!1?b.lastIndex=Y+1:(_!==Y&&B.push({type:"text",value:h.value.slice(_,Y)}),Array.isArray(F)?B.push(...F):F&&B.push(F),_=Y+D[0].length,N=!0),!b.global)break;D=b.exec(h.value)}return N?(_<h.value.length&&B.push({type:"text",value:h.value.slice(_)}),E.children.splice(w,1,...B)):B=[h],w+B.length}}function f4(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([h4(o[0]),p4(o[1])])}return t}function h4(e){return typeof e=="string"?new RegExp(c4(e),"g"):e}function p4(e){return typeof e=="function"?e:function(){return e}}const Dh="phrasing",Mh=["autolink","link","image","label"];function m4(){return{transforms:[x4],enter:{literalAutolink:E4,literalAutolinkEmail:Fh,literalAutolinkHttp:Fh,literalAutolinkWww:Fh},exit:{literalAutolink:_4,literalAutolinkEmail:b4,literalAutolinkHttp:y4,literalAutolinkWww:T4}}}function g4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Mh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Dh,notInConstruct:Mh},{character:":",before:"[ps]",after:"\\/",inConstruct:Dh,notInConstruct:Mh}]}}function E4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Fh(e){this.config.enter.autolinkProtocol.call(this,e)}function y4(e){this.config.exit.autolinkProtocol.call(this,e)}function T4(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 b4(e){this.config.exit.autolinkEmail.call(this,e)}function _4(e){this.exit(e)}function x4(e){d4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w4]],{ignore:["link","linkReference"]})}function S4(e,t,n,r,o){let a="";if(!rb(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!A4(n)))return!1;const u=C4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function w4(e,t,n,r){return!rb(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function A4(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 C4(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=nb(e,"(");let a=nb(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 rb(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||Zu(n))&&(!t||n!==47)}ib.peek=D4;function v4(){this.buffer()}function k4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N4(){this.buffer()}function O4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function I4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P4(e){this.exit(e)}function R4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L4(e){this.exit(e)}function D4(){return"["}function ib(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function M4(){return{enter:{gfmFootnoteCallString:v4,gfmFootnoteCall:k4,gfmFootnoteDefinitionLabelString:N4,gfmFootnoteDefinition:O4},exit:{gfmFootnoteCallString:I4,gfmFootnoteCall:P4,gfmFootnoteDefinitionLabelString:R4,gfmFootnoteDefinition:L4}}}function F4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:ib},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const h=a.enter("footnoteDefinition"),m=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),m(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
29
- `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?sb:B4))),h(),d}}function B4(e,t,n){return t===0?e:sb(e,t,n)}function sb(e,t,n){return(n?"":" ")+e}const U4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ob.peek=V4;function H4(){return{canContainEols:["delete"],enter:{strikethrough:j4},exit:{strikethrough:$4}}}function z4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U4}],handlers:{delete:ob}}}function j4(e){this.enter({type:"delete",children:[]},e)}function $4(e){this.exit(e)}function ob(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,be(U({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function V4(){return"~"}function q4(e){return e.length}function Y4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||q4,a=[],u=[],c=[],d=[];let h=0,m=-1;for(;++m<e.length;){const S=[],w=[];let N=-1;for(e[m].length>h&&(h=e[m].length);++N<e[m].length;){const B=W4(e[m][N]);if(n.alignDelimiters!==!1){const D=o(B);w[N]=D,(d[N]===void 0||D>d[N])&&(d[N]=D)}S.push(B)}u[m]=S,c[m]=w}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<h;)a[E]=ab(r[E]);else{const S=ab(r);for(;++E<h;)a[E]=S}E=-1;const b=[],T=[];for(;++E<h;){const S=a[E];let w="",N="";S===99?(w=":",N=":"):S===108?w=":":S===114&&(N=":");let B=n.alignDelimiters===!1?1:Math.max(1,d[E]-w.length-N.length);const D=w+"-".repeat(B)+N;n.alignDelimiters!==!1&&(B=w.length+B+N.length,B>d[E]&&(d[E]=B),T[E]=B),b[E]=D}u.splice(1,0,b),c.splice(1,0,T),m=-1;const _=[];for(;++m<u.length;){const S=u[m],w=c[m];E=-1;const N=[];for(;++E<h;){const B=S[E]||"";let D="",Y="";if(n.alignDelimiters!==!1){const W=d[E]-(w[E]||0),F=a[E];F===114?D=" ".repeat(W):F===99?W%2?(D=" ".repeat(W/2+.5),Y=" ".repeat(W/2-.5)):(D=" ".repeat(W/2),Y=D):Y=" ".repeat(W)}n.delimiterStart!==!1&&!E&&N.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&B==="")&&(n.delimiterStart!==!1||E)&&N.push(" "),n.alignDelimiters!==!1&&N.push(D),N.push(B),n.alignDelimiters!==!1&&N.push(Y),n.padding!==!1&&N.push(" "),(n.delimiterEnd!==!1||E!==h-1)&&N.push("|")}_.push(n.delimiterEnd===!1?N.join("").replace(/ +$/,""):N.join(""))}return _.join(`
30
- `)}function W4(e){return e==null?"":String(e)}function ab(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 G4(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()),K4);return o(),u}function K4(e,t,n){return">"+(n?"":" ")+e}function Q4(e,t){return ub(e,t.inConstruct,!0)&&!ub(e,t.notInConstruct,!1)}function ub(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 lb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
28
+ `+y.stack}return{value:i,source:s,stack:g,digest:null}}function lm(i,s,l){return{value:i,source:null,stack:l!=null?l:null,digest:s!=null?s:null}}function cm(i,s){try{console.error(s.value)}catch(l){setTimeout(function(){throw l})}}var gF=typeof WeakMap=="function"?WeakMap:Map;function zx(i,s,l){l=si(-1,l),l.tag=3,l.payload={element:null};var h=s.value;return l.callback=function(){jc||(jc=!0,Cm=h),cm(i,s)},l}function jx(i,s,l){l=si(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var g=s.value;l.payload=function(){return h(g)},l.callback=function(){cm(i,s)}}var y=i.stateNode;return y!==null&&typeof y.componentDidCatch=="function"&&(l.callback=function(){cm(i,s),typeof h!="function"&&(Di===null?Di=new Set([this]):Di.add(this));var S=s.stack;this.componentDidCatch(s.value,{componentStack:S!==null?S:""})}),l}function $x(i,s,l){var h=i.pingCache;if(h===null){h=i.pingCache=new gF;var g=new Set;h.set(s,g)}else g=h.get(s),g===void 0&&(g=new Set,h.set(s,g));g.has(l)||(g.add(l),i=OF.bind(null,i,s,l),s.then(i,i))}function Vx(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 qx(i,s,l,h,g){return(i.mode&1)===0?(i===s?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(s=si(-1,1),s.tag=2,Ri(l,s,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=g,i)}var EF=Y.ReactCurrentOwner,kn=!1;function gn(i,s,l,h){s.child=i===null?dx(s,null,l,h):Ao(s,i.child,l,h)}function Yx(i,s,l,h,g){l=l.render;var y=s.ref;return ko(s,g),h=tm(i,s,l,h,y,g),l=nm(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(wt&&l&&Bp(s),s.flags|=1,gn(i,s,h,g),s.child)}function Wx(i,s,l,h,g){if(i===null){var y=l.type;return typeof y=="function"&&!Pm(y)&&y.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(s.tag=15,s.type=y,Gx(i,s,y,h,g)):(i=Gc(l.type,null,h,s,s.mode,g),i.ref=s.ref,i.return=s,s.child=i)}if(y=i.child,(i.lanes&g)===0){var S=y.memoizedProps;if(l=l.compare,l=l!==null?l:eu,l(S,h)&&i.ref===s.ref)return oi(i,s,g)}return s.flags|=1,i=Ui(y,h),i.ref=s.ref,i.return=s,s.child=i}function Gx(i,s,l,h,g){if(i!==null){var y=i.memoizedProps;if(eu(y,h)&&i.ref===s.ref)if(kn=!1,s.pendingProps=h=y,(i.lanes&g)!==0)(i.flags&131072)!==0&&(kn=!0);else return s.lanes=i.lanes,oi(i,s,g)}return dm(i,s,l,h,g)}function Kx(i,s,l){var h=s.pendingProps,g=h.children,y=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((s.mode&1)===0)s.memoizedState={baseLanes:0,cachePool:null,transitions:null},pt(Po,zn),zn|=l;else{if((l&1073741824)===0)return i=y!==null?y.baseLanes|l:l,s.lanes=s.childLanes=1073741824,s.memoizedState={baseLanes:i,cachePool:null,transitions:null},s.updateQueue=null,pt(Po,zn),zn|=i,null;s.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=y!==null?y.baseLanes:l,pt(Po,zn),zn|=h}else y!==null?(h=y.baseLanes|l,s.memoizedState=null):h=l,pt(Po,zn),zn|=h;return gn(i,s,g,l),s.child}function Qx(i,s){var l=s.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(s.flags|=512,s.flags|=2097152)}function dm(i,s,l,h,g){var y=vn(l)?fs:ln.current;return y=xo(s,y),ko(s,g),l=tm(i,s,l,h,y,g),h=nm(),i!==null&&!kn?(s.updateQueue=i.updateQueue,s.flags&=-2053,i.lanes&=~g,oi(i,s,g)):(wt&&h&&Bp(s),s.flags|=1,gn(i,s,l,g),s.child)}function Xx(i,s,l,h,g){if(vn(l)){var y=!0;Tc(s)}else y=!1;if(ko(s,g),s.stateNode===null)Fc(i,s),Ux(s,l,h),um(s,l,h,g),h=!0;else if(i===null){var S=s.stateNode,I=s.memoizedProps;S.props=I;var D=S.context,W=l.contextType;typeof W=="object"&&W!==null?W=Zn(W):(W=vn(l)?fs:ln.current,W=xo(s,W));var se=l.getDerivedStateFromProps,ce=typeof se=="function"||typeof S.getSnapshotBeforeUpdate=="function";ce||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(I!==h||D!==W)&&Hx(s,S,h,W),Pi=!1;var re=s.memoizedState;S.state=re,kc(s,h,S,g),D=s.memoizedState,I!==h||re!==D||An.current||Pi?(typeof se=="function"&&(am(s,l,se,h),D=s.memoizedState),(I=Pi||Bx(s,l,I,h,re,D,W))?(ce||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=D),S.props=h,S.state=D,S.context=W,h=I):(typeof S.componentDidMount=="function"&&(s.flags|=4194308),h=!1)}else{S=s.stateNode,hx(i,s),I=s.memoizedProps,W=s.type===s.elementType?I:gr(s.type,I),S.props=W,ce=s.pendingProps,re=S.context,D=l.contextType,typeof D=="object"&&D!==null?D=Zn(D):(D=vn(l)?fs:ln.current,D=xo(s,D));var xe=l.getDerivedStateFromProps;(se=typeof xe=="function"||typeof S.getSnapshotBeforeUpdate=="function")||typeof S.UNSAFE_componentWillReceiveProps!="function"&&typeof S.componentWillReceiveProps!="function"||(I!==ce||re!==D)&&Hx(s,S,h,D),Pi=!1,re=s.memoizedState,S.state=re,kc(s,h,S,g);var Ae=s.memoizedState;I!==ce||re!==Ae||An.current||Pi?(typeof xe=="function"&&(am(s,l,xe,h),Ae=s.memoizedState),(W=Pi||Bx(s,l,W,h,re,Ae,D)||!1)?(se||typeof S.UNSAFE_componentWillUpdate!="function"&&typeof S.componentWillUpdate!="function"||(typeof S.componentWillUpdate=="function"&&S.componentWillUpdate(h,Ae,D),typeof S.UNSAFE_componentWillUpdate=="function"&&S.UNSAFE_componentWillUpdate(h,Ae,D)),typeof S.componentDidUpdate=="function"&&(s.flags|=4),typeof S.getSnapshotBeforeUpdate=="function"&&(s.flags|=1024)):(typeof S.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),s.memoizedProps=h,s.memoizedState=Ae),S.props=h,S.state=Ae,S.context=D,h=W):(typeof S.componentDidUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=4),typeof S.getSnapshotBeforeUpdate!="function"||I===i.memoizedProps&&re===i.memoizedState||(s.flags|=1024),h=!1)}return fm(i,s,l,h,y,g)}function fm(i,s,l,h,g,y){Qx(i,s);var S=(s.flags&128)!==0;if(!h&&!S)return g&&nx(s,l,!1),oi(i,s,y);h=s.stateNode,EF.current=s;var I=S&&typeof l.getDerivedStateFromError!="function"?null:h.render();return s.flags|=1,i!==null&&S?(s.child=Ao(s,i.child,null,y),s.child=Ao(s,null,I,y)):gn(i,s,I,y),s.memoizedState=h.state,g&&nx(s,l,!0),s.child}function Jx(i){var s=i.stateNode;s.pendingContext?ex(i,s.pendingContext,s.pendingContext!==s.context):s.context&&ex(i,s.context,!1),Kp(i,s.containerInfo)}function Zx(i,s,l,h,g){return Co(),jp(g),s.flags|=256,gn(i,s,l,h),s.child}var hm={dehydrated:null,treeContext:null,retryLane:0};function pm(i){return{baseLanes:i,cachePool:null,transitions:null}}function e2(i,s,l){var h=s.pendingProps,g=At.current,y=!1,S=(s.flags&128)!==0,I;if((I=S)||(I=i!==null&&i.memoizedState===null?!1:(g&2)!==0),I?(y=!0,s.flags&=-129):(i===null||i.memoizedState!==null)&&(g|=1),pt(At,g&1),i===null)return zp(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,y?(h=s.mode,y=s.child,S={mode:"hidden",children:S},(h&1)===0&&y!==null?(y.childLanes=0,y.pendingProps=S):y=Kc(S,h,0,null),i=xs(i,h,l,null),y.return=s,i.return=s,y.sibling=i,s.child=y,s.child.memoizedState=pm(l),s.memoizedState=hm,i):mm(s,S));if(g=i.memoizedState,g!==null&&(I=g.dehydrated,I!==null))return yF(i,s,S,h,I,g,l);if(y){y=h.fallback,S=s.mode,g=i.child,I=g.sibling;var D={mode:"hidden",children:h.children};return(S&1)===0&&s.child!==g?(h=s.child,h.childLanes=0,h.pendingProps=D,s.deletions=null):(h=Ui(g,D),h.subtreeFlags=g.subtreeFlags&14680064),I!==null?y=Ui(I,y):(y=xs(y,S,l,null),y.flags|=2),y.return=s,h.return=s,h.sibling=y,s.child=h,h=y,y=s.child,S=i.child.memoizedState,S=S===null?pm(l):{baseLanes:S.baseLanes|l,cachePool:null,transitions:S.transitions},y.memoizedState=S,y.childLanes=i.childLanes&~l,s.memoizedState=hm,h}return y=i.child,i=y.sibling,h=Ui(y,{mode:"visible",children:h.children}),(s.mode&1)===0&&(h.lanes=l),h.return=s,h.sibling=null,i!==null&&(l=s.deletions,l===null?(s.deletions=[i],s.flags|=16):l.push(i)),s.child=h,s.memoizedState=null,h}function mm(i,s){return s=Kc({mode:"visible",children:s},i.mode,0,null),s.return=i,i.child=s}function Mc(i,s,l,h){return h!==null&&jp(h),Ao(s,i.child,null,l),i=mm(s,s.pendingProps.children),i.flags|=2,s.memoizedState=null,i}function yF(i,s,l,h,g,y,S){if(l)return s.flags&256?(s.flags&=-257,h=lm(Error(n(422))),Mc(i,s,S,h)):s.memoizedState!==null?(s.child=i.child,s.flags|=128,null):(y=h.fallback,g=s.mode,h=Kc({mode:"visible",children:h.children},g,0,null),y=xs(y,g,S,null),y.flags|=2,h.return=s,y.return=s,h.sibling=y,s.child=h,(s.mode&1)!==0&&Ao(s,i.child,null,S),s.child.memoizedState=pm(S),s.memoizedState=hm,y);if((s.mode&1)===0)return Mc(i,s,S,null);if(g.data==="$!"){if(h=g.nextSibling&&g.nextSibling.dataset,h)var I=h.dgst;return h=I,y=Error(n(419)),h=lm(y,h,void 0),Mc(i,s,S,h)}if(I=(S&i.childLanes)!==0,kn||I){if(h=Gt,h!==null){switch(S&-S){case 4:g=2;break;case 16:g=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:g=32;break;case 536870912:g=268435456;break;default:g=0}g=(g&(h.suspendedLanes|S))!==0?0:g,g!==0&&g!==y.retryLane&&(y.retryLane=g,ii(i,g),Tr(h,i,g,-1))}return Im(),h=lm(Error(n(421))),Mc(i,s,S,h)}return g.data==="$?"?(s.flags|=128,s.child=i.child,s=IF.bind(null,i),g._reactRetry=s,null):(i=y.treeContext,Hn=ki(g.nextSibling),Un=s,wt=!0,mr=null,i!==null&&(Xn[Jn++]=ni,Xn[Jn++]=ri,Xn[Jn++]=hs,ni=i.id,ri=i.overflow,hs=s),s=mm(s,h.children),s.flags|=4096,s)}function t2(i,s,l){i.lanes|=s;var h=i.alternate;h!==null&&(h.lanes|=s),Yp(i.return,s,l)}function gm(i,s,l,h,g){var y=i.memoizedState;y===null?i.memoizedState={isBackwards:s,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:g}:(y.isBackwards=s,y.rendering=null,y.renderingStartTime=0,y.last=h,y.tail=l,y.tailMode=g)}function n2(i,s,l){var h=s.pendingProps,g=h.revealOrder,y=h.tail;if(gn(i,s,h.children,l),h=At.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&&t2(i,l,s);else if(i.tag===19)t2(i,l,s);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===s)break e;for(;i.sibling===null;){if(i.return===null||i.return===s)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(pt(At,h),(s.mode&1)===0)s.memoizedState=null;else switch(g){case"forwards":for(l=s.child,g=null;l!==null;)i=l.alternate,i!==null&&Nc(i)===null&&(g=l),l=l.sibling;l=g,l===null?(g=s.child,s.child=null):(g=l.sibling,l.sibling=null),gm(s,!1,g,l,y);break;case"backwards":for(l=null,g=s.child,s.child=null;g!==null;){if(i=g.alternate,i!==null&&Nc(i)===null){s.child=g;break}i=g.sibling,g.sibling=l,l=g,g=i}gm(s,!0,l,null,y);break;case"together":gm(s,!1,null,null,void 0);break;default:s.memoizedState=null}return s.child}function Fc(i,s){(s.mode&1)===0&&i!==null&&(i.alternate=null,s.alternate=null,s.flags|=2)}function oi(i,s,l){if(i!==null&&(s.dependencies=i.dependencies),ys|=s.lanes,(l&s.childLanes)===0)return null;if(i!==null&&s.child!==i.child)throw Error(n(153));if(s.child!==null){for(i=s.child,l=Ui(i,i.pendingProps),s.child=l,l.return=s;i.sibling!==null;)i=i.sibling,l=l.sibling=Ui(i,i.pendingProps),l.return=s;l.sibling=null}return s.child}function TF(i,s,l){switch(s.tag){case 3:Jx(s),Co();break;case 5:gx(s);break;case 1:vn(s.type)&&Tc(s);break;case 4:Kp(s,s.stateNode.containerInfo);break;case 10:var h=s.type._context,g=s.memoizedProps.value;pt(Cc,h._currentValue),h._currentValue=g;break;case 13:if(h=s.memoizedState,h!==null)return h.dehydrated!==null?(pt(At,At.current&1),s.flags|=128,null):(l&s.child.childLanes)!==0?e2(i,s,l):(pt(At,At.current&1),i=oi(i,s,l),i!==null?i.sibling:null);pt(At,At.current&1);break;case 19:if(h=(l&s.childLanes)!==0,(i.flags&128)!==0){if(h)return n2(i,s,l);s.flags|=128}if(g=s.memoizedState,g!==null&&(g.rendering=null,g.tail=null,g.lastEffect=null),pt(At,At.current),h)break;return null;case 22:case 23:return s.lanes=0,Kx(i,s,l)}return oi(i,s,l)}var r2,Em,i2,s2;r2=function(i,s){for(var l=s.child;l!==null;){if(l.tag===5||l.tag===6)i.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===s)break;for(;l.sibling===null;){if(l.return===null||l.return===s)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Em=function(){},i2=function(i,s,l,h){var g=i.memoizedProps;if(g!==h){i=s.stateNode,gs(Mr.current);var y=null;switch(l){case"input":g=Ti(i,g),h=Ti(i,h),y=[];break;case"select":g=w({},g,{value:void 0}),h=w({},h,{value:void 0}),y=[];break;case"textarea":g=ct(i,g),h=ct(i,h),y=[];break;default:typeof g.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=gc)}Xt(l,h);var S;l=null;for(W in g)if(!h.hasOwnProperty(W)&&g.hasOwnProperty(W)&&g[W]!=null)if(W==="style"){var I=g[W];for(S in I)I.hasOwnProperty(S)&&(l||(l={}),l[S]="")}else W!=="dangerouslySetInnerHTML"&&W!=="children"&&W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&W!=="autoFocus"&&(o.hasOwnProperty(W)?y||(y=[]):(y=y||[]).push(W,null));for(W in h){var D=h[W];if(I=g!=null?g[W]:void 0,h.hasOwnProperty(W)&&D!==I&&(D!=null||I!=null))if(W==="style")if(I){for(S in I)!I.hasOwnProperty(S)||D&&D.hasOwnProperty(S)||(l||(l={}),l[S]="");for(S in D)D.hasOwnProperty(S)&&I[S]!==D[S]&&(l||(l={}),l[S]=D[S])}else l||(y||(y=[]),y.push(W,l)),l=D;else W==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,I=I?I.__html:void 0,D!=null&&I!==D&&(y=y||[]).push(W,D)):W==="children"?typeof D!="string"&&typeof D!="number"||(y=y||[]).push(W,""+D):W!=="suppressContentEditableWarning"&&W!=="suppressHydrationWarning"&&(o.hasOwnProperty(W)?(D!=null&&W==="onScroll"&&Et("scroll",i),y||I===D||(y=[])):(y=y||[]).push(W,D))}l&&(y=y||[]).push("style",l);var W=y;(s.updateQueue=W)&&(s.flags|=4)}},s2=function(i,s,l,h){l!==h&&(s.flags|=4)};function mu(i,s){if(!wt)switch(i.tailMode){case"hidden":s=i.tail;for(var l=null;s!==null;)s.alternate!==null&&(l=s),s=s.sibling;l===null?i.tail=null:l.sibling=null;break;case"collapsed":l=i.tail;for(var h=null;l!==null;)l.alternate!==null&&(h=l),l=l.sibling;h===null?s||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function dn(i){var s=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(s)for(var g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags&14680064,h|=g.flags&14680064,g.return=i,g=g.sibling;else for(g=i.child;g!==null;)l|=g.lanes|g.childLanes,h|=g.subtreeFlags,h|=g.flags,g.return=i,g=g.sibling;return i.subtreeFlags|=h,i.childLanes=l,s}function bF(i,s,l){var h=s.pendingProps;switch(Up(s),s.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return dn(s),null;case 1:return vn(s.type)&&yc(),dn(s),null;case 3:return h=s.stateNode,No(),yt(An),yt(ln),Jp(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(Sc(s)?s.flags|=4:i===null||i.memoizedState.isDehydrated&&(s.flags&256)===0||(s.flags|=1024,mr!==null&&(km(mr),mr=null))),Em(i,s),dn(s),null;case 5:Qp(s);var g=gs(cu.current);if(l=s.type,i!==null&&s.stateNode!=null)i2(i,s,l,h,g),i.ref!==s.ref&&(s.flags|=512,s.flags|=2097152);else{if(!h){if(s.stateNode===null)throw Error(n(166));return dn(s),null}if(i=gs(Mr.current),Sc(s)){h=s.stateNode,l=s.type;var y=s.memoizedProps;switch(h[Dr]=s,h[su]=y,i=(s.mode&1)!==0,l){case"dialog":Et("cancel",h),Et("close",h);break;case"iframe":case"object":case"embed":Et("load",h);break;case"video":case"audio":for(g=0;g<nu.length;g++)Et(nu[g],h);break;case"source":Et("error",h);break;case"img":case"image":case"link":Et("error",h),Et("load",h);break;case"details":Et("toggle",h);break;case"input":us(h,y),Et("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!y.multiple},Et("invalid",h);break;case"textarea":St(h,y),Et("invalid",h)}Xt(l,y),g=null;for(var S in y)if(y.hasOwnProperty(S)){var I=y[S];S==="children"?typeof I=="string"?h.textContent!==I&&(y.suppressHydrationWarning!==!0&&mc(h.textContent,I,i),g=["children",I]):typeof I=="number"&&h.textContent!==""+I&&(y.suppressHydrationWarning!==!0&&mc(h.textContent,I,i),g=["children",""+I]):o.hasOwnProperty(S)&&I!=null&&S==="onScroll"&&Et("scroll",h)}switch(l){case"input":Kn(h),Se(h,y,!0);break;case"textarea":Kn(h),st(h);break;case"select":case"option":break;default:typeof y.onClick=="function"&&(h.onclick=gc)}h=g,s.updateQueue=h,h!==null&&(s.flags|=4)}else{S=g.nodeType===9?g:g.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=ee(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=S.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=S.createElement(l,{is:h.is}):(i=S.createElement(l),l==="select"&&(S=i,h.multiple?S.multiple=!0:h.size&&(S.size=h.size))):i=S.createElementNS(i,l),i[Dr]=s,i[su]=h,r2(i,s,!1,!1),s.stateNode=i;e:{switch(S=Rr(l,h),l){case"dialog":Et("cancel",i),Et("close",i),g=h;break;case"iframe":case"object":case"embed":Et("load",i),g=h;break;case"video":case"audio":for(g=0;g<nu.length;g++)Et(nu[g],i);g=h;break;case"source":Et("error",i),g=h;break;case"img":case"image":case"link":Et("error",i),Et("load",i),g=h;break;case"details":Et("toggle",i),g=h;break;case"input":us(i,h),g=Ti(i,h),Et("invalid",i);break;case"option":g=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},g=w({},h,{value:void 0}),Et("invalid",i);break;case"textarea":St(i,h),g=ct(i,h),Et("invalid",i);break;default:g=h}Xt(l,g),I=g;for(y in I)if(I.hasOwnProperty(y)){var D=I[y];y==="style"?_i(i,D):y==="dangerouslySetInnerHTML"?(D=D?D.__html:void 0,D!=null&&Ve(i,D)):y==="children"?typeof D=="string"?(l!=="textarea"||D!=="")&&tt(i,D):typeof D=="number"&&tt(i,""+D):y!=="suppressContentEditableWarning"&&y!=="suppressHydrationWarning"&&y!=="autoFocus"&&(o.hasOwnProperty(y)?D!=null&&y==="onScroll"&&Et("scroll",i):D!=null&&L(i,y,D,S))}switch(l){case"input":Kn(i),Se(i,h,!1);break;case"textarea":Kn(i),st(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ye(h.value));break;case"select":i.multiple=!!h.multiple,y=h.value,y!=null?Xe(i,!!h.multiple,y,!1):h.defaultValue!=null&&Xe(i,!!h.multiple,h.defaultValue,!0);break;default:typeof g.onClick=="function"&&(i.onclick=gc)}switch(l){case"button":case"input":case"select":case"textarea":h=!!h.autoFocus;break e;case"img":h=!0;break e;default:h=!1}}h&&(s.flags|=4)}s.ref!==null&&(s.flags|=512,s.flags|=2097152)}return dn(s),null;case 6:if(i&&s.stateNode!=null)s2(i,s,i.memoizedProps,h);else{if(typeof h!="string"&&s.stateNode===null)throw Error(n(166));if(l=gs(cu.current),gs(Mr.current),Sc(s)){if(h=s.stateNode,l=s.memoizedProps,h[Dr]=s,(y=h.nodeValue!==l)&&(i=Un,i!==null))switch(i.tag){case 3:mc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&mc(h.nodeValue,l,(i.mode&1)!==0)}y&&(s.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Dr]=s,s.stateNode=h}return dn(s),null;case 13:if(yt(At),h=s.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(wt&&Hn!==null&&(s.mode&1)!==0&&(s.flags&128)===0)ux(),Co(),s.flags|=98560,y=!1;else if(y=Sc(s),h!==null&&h.dehydrated!==null){if(i===null){if(!y)throw Error(n(318));if(y=s.memoizedState,y=y!==null?y.dehydrated:null,!y)throw Error(n(317));y[Dr]=s}else Co(),(s.flags&128)===0&&(s.memoizedState=null),s.flags|=4;dn(s),y=!1}else mr!==null&&(km(mr),mr=null),y=!0;if(!y)return s.flags&65536?s:null}return(s.flags&128)!==0?(s.lanes=l,s):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(s.child.flags|=8192,(s.mode&1)!==0&&(i===null||(At.current&1)!==0?zt===0&&(zt=3):Im())),s.updateQueue!==null&&(s.flags|=4),dn(s),null);case 4:return No(),Em(i,s),i===null&&ru(s.stateNode.containerInfo),dn(s),null;case 10:return qp(s.type._context),dn(s),null;case 17:return vn(s.type)&&yc(),dn(s),null;case 19:if(yt(At),y=s.memoizedState,y===null)return dn(s),null;if(h=(s.flags&128)!==0,S=y.rendering,S===null)if(h)mu(y,!1);else{if(zt!==0||i!==null&&(i.flags&128)!==0)for(i=s.child;i!==null;){if(S=Nc(i),S!==null){for(s.flags|=128,mu(y,!1),h=S.updateQueue,h!==null&&(s.updateQueue=h,s.flags|=4),s.subtreeFlags=0,h=l,l=s.child;l!==null;)y=l,i=h,y.flags&=14680066,S=y.alternate,S===null?(y.childLanes=0,y.lanes=i,y.child=null,y.subtreeFlags=0,y.memoizedProps=null,y.memoizedState=null,y.updateQueue=null,y.dependencies=null,y.stateNode=null):(y.childLanes=S.childLanes,y.lanes=S.lanes,y.child=S.child,y.subtreeFlags=0,y.deletions=null,y.memoizedProps=S.memoizedProps,y.memoizedState=S.memoizedState,y.updateQueue=S.updateQueue,y.type=S.type,i=S.dependencies,y.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return pt(At,At.current&1|2),s.child}i=i.sibling}y.tail!==null&&Lt()>Ro&&(s.flags|=128,h=!0,mu(y,!1),s.lanes=4194304)}else{if(!h)if(i=Nc(S),i!==null){if(s.flags|=128,h=!0,l=i.updateQueue,l!==null&&(s.updateQueue=l,s.flags|=4),mu(y,!0),y.tail===null&&y.tailMode==="hidden"&&!S.alternate&&!wt)return dn(s),null}else 2*Lt()-y.renderingStartTime>Ro&&l!==1073741824&&(s.flags|=128,h=!0,mu(y,!1),s.lanes=4194304);y.isBackwards?(S.sibling=s.child,s.child=S):(l=y.last,l!==null?l.sibling=S:s.child=S,y.last=S)}return y.tail!==null?(s=y.tail,y.rendering=s,y.tail=s.sibling,y.renderingStartTime=Lt(),s.sibling=null,l=At.current,pt(At,h?l&1|2:l&1),s):(dn(s),null);case 22:case 23:return Om(),h=s.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(s.flags|=8192),h&&(s.mode&1)!==0?(zn&1073741824)!==0&&(dn(s),s.subtreeFlags&6&&(s.flags|=8192)):dn(s),null;case 24:return null;case 25:return null}throw Error(n(156,s.tag))}function _F(i,s){switch(Up(s),s.tag){case 1:return vn(s.type)&&yc(),i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 3:return No(),yt(An),yt(ln),Jp(),i=s.flags,(i&65536)!==0&&(i&128)===0?(s.flags=i&-65537|128,s):null;case 5:return Qp(s),null;case 13:if(yt(At),i=s.memoizedState,i!==null&&i.dehydrated!==null){if(s.alternate===null)throw Error(n(340));Co()}return i=s.flags,i&65536?(s.flags=i&-65537|128,s):null;case 19:return yt(At),null;case 4:return No(),null;case 10:return qp(s.type._context),null;case 22:case 23:return Om(),null;case 24:return null;default:return null}}var Bc=!1,fn=!1,xF=typeof WeakSet=="function"?WeakSet:Set,we=null;function Io(i,s){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Ot(i,s,h)}else l.current=null}function ym(i,s,l){try{l()}catch(h){Ot(i,s,h)}}var o2=!1;function SF(i,s){if(Op=ic,i=B_(),xp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var g=h.anchorOffset,y=h.focusNode;h=h.focusOffset;try{l.nodeType,y.nodeType}catch(Ee){l=null;break e}var S=0,I=-1,D=-1,W=0,se=0,ce=i,re=null;t:for(;;){for(var xe;ce!==l||g!==0&&ce.nodeType!==3||(I=S+g),ce!==y||h!==0&&ce.nodeType!==3||(D=S+h),ce.nodeType===3&&(S+=ce.nodeValue.length),(xe=ce.firstChild)!==null;)re=ce,ce=xe;for(;;){if(ce===i)break t;if(re===l&&++W===g&&(I=S),re===y&&++se===h&&(D=S),(xe=ce.nextSibling)!==null)break;ce=re,re=ce.parentNode}ce=xe}l=I===-1||D===-1?null:{start:I,end:D}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ip={focusedElem:i,selectionRange:l},ic=!1,we=s;we!==null;)if(s=we,i=s.child,(s.subtreeFlags&1028)!==0&&i!==null)i.return=s,we=i;else for(;we!==null;){s=we;try{var Ae=s.alternate;if((s.flags&1024)!==0)switch(s.tag){case 0:case 11:case 15:break;case 1:if(Ae!==null){var ke=Ae.memoizedProps,Dt=Ae.memoizedState,z=s.stateNode,F=z.getSnapshotBeforeUpdate(s.elementType===s.type?ke:gr(s.type,ke),Dt);z.__reactInternalSnapshotBeforeUpdate=F}break;case 3:var V=s.stateNode.containerInfo;V.nodeType===1?V.textContent="":V.nodeType===9&&V.documentElement&&V.removeChild(V.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ee){Ot(s,s.return,Ee)}if(i=s.sibling,i!==null){i.return=s.return,we=i;break}we=s.return}return Ae=o2,o2=!1,Ae}function gu(i,s,l){var h=s.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var g=h=h.next;do{if((g.tag&i)===i){var y=g.destroy;g.destroy=void 0,y!==void 0&&ym(s,l,y)}g=g.next}while(g!==h)}}function Uc(i,s){if(s=s.updateQueue,s=s!==null?s.lastEffect:null,s!==null){var l=s=s.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==s)}}function Tm(i){var s=i.ref;if(s!==null){var l=i.stateNode;i.tag,i=l,typeof s=="function"?s(i):s.current=i}}function a2(i){var s=i.alternate;s!==null&&(i.alternate=null,a2(s)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(s=i.stateNode,s!==null&&(delete s[Dr],delete s[su],delete s[Dp],delete s[sF],delete s[oF])),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 u2(i){return i.tag===5||i.tag===3||i.tag===4}function l2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||u2(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 bm(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.nodeType===8?l.parentNode.insertBefore(i,s):l.insertBefore(i,s):(l.nodeType===8?(s=l.parentNode,s.insertBefore(i,l)):(s=l,s.appendChild(i)),l=l._reactRootContainer,l!=null||s.onclick!==null||(s.onclick=gc));else if(h!==4&&(i=i.child,i!==null))for(bm(i,s,l),i=i.sibling;i!==null;)bm(i,s,l),i=i.sibling}function _m(i,s,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,s?l.insertBefore(i,s):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(_m(i,s,l),i=i.sibling;i!==null;)_m(i,s,l),i=i.sibling}var Jt=null,Er=!1;function Li(i,s,l){for(l=l.child;l!==null;)c2(i,s,l),l=l.sibling}function c2(i,s,l){if(Lr&&typeof Lr.onCommitFiberUnmount=="function")try{Lr.onCommitFiberUnmount(Jl,l)}catch(I){}switch(l.tag){case 5:fn||Io(l,s);case 6:var h=Jt,g=Er;Jt=null,Li(i,s,l),Jt=h,Er=g,Jt!==null&&(Er?(i=Jt,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):Jt.removeChild(l.stateNode));break;case 18:Jt!==null&&(Er?(i=Jt,l=l.stateNode,i.nodeType===8?Lp(i.parentNode,l):i.nodeType===1&&Lp(i,l),Ga(i)):Lp(Jt,l.stateNode));break;case 4:h=Jt,g=Er,Jt=l.stateNode.containerInfo,Er=!0,Li(i,s,l),Jt=h,Er=g;break;case 0:case 11:case 14:case 15:if(!fn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){g=h=h.next;do{var y=g,S=y.destroy;y=y.tag,S!==void 0&&((y&2)!==0||(y&4)!==0)&&ym(l,s,S),g=g.next}while(g!==h)}Li(i,s,l);break;case 1:if(!fn&&(Io(l,s),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(I){Ot(l,s,I)}Li(i,s,l);break;case 21:Li(i,s,l);break;case 22:l.mode&1?(fn=(h=fn)||l.memoizedState!==null,Li(i,s,l),fn=h):Li(i,s,l);break;default:Li(i,s,l)}}function d2(i){var s=i.updateQueue;if(s!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new xF),s.forEach(function(h){var g=PF.bind(null,i,h);l.has(h)||(l.add(h),h.then(g,g))})}}function yr(i,s){var l=s.deletions;if(l!==null)for(var h=0;h<l.length;h++){var g=l[h];try{var y=i,S=s,I=S;e:for(;I!==null;){switch(I.tag){case 5:Jt=I.stateNode,Er=!1;break e;case 3:Jt=I.stateNode.containerInfo,Er=!0;break e;case 4:Jt=I.stateNode.containerInfo,Er=!0;break e}I=I.return}if(Jt===null)throw Error(n(160));c2(y,S,g),Jt=null,Er=!1;var D=g.alternate;D!==null&&(D.return=null),g.return=null}catch(W){Ot(g,s,W)}}if(s.subtreeFlags&12854)for(s=s.child;s!==null;)f2(s,i),s=s.sibling}function f2(i,s){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(yr(s,i),Br(i),h&4){try{gu(3,i,i.return),Uc(3,i)}catch(ke){Ot(i,i.return,ke)}try{gu(5,i,i.return)}catch(ke){Ot(i,i.return,ke)}}break;case 1:yr(s,i),Br(i),h&512&&l!==null&&Io(l,l.return);break;case 5:if(yr(s,i),Br(i),h&512&&l!==null&&Io(l,l.return),i.flags&32){var g=i.stateNode;try{tt(g,"")}catch(ke){Ot(i,i.return,ke)}}if(h&4&&(g=i.stateNode,g!=null)){var y=i.memoizedProps,S=l!==null?l.memoizedProps:y,I=i.type,D=i.updateQueue;if(i.updateQueue=null,D!==null)try{I==="input"&&y.type==="radio"&&y.name!=null&&bi(g,y),Rr(I,S);var W=Rr(I,y);for(S=0;S<D.length;S+=2){var se=D[S],ce=D[S+1];se==="style"?_i(g,ce):se==="dangerouslySetInnerHTML"?Ve(g,ce):se==="children"?tt(g,ce):L(g,se,ce,W)}switch(I){case"input":Jr(g,y);break;case"textarea":mn(g,y);break;case"select":var re=g._wrapperState.wasMultiple;g._wrapperState.wasMultiple=!!y.multiple;var xe=y.value;xe!=null?Xe(g,!!y.multiple,xe,!1):re!==!!y.multiple&&(y.defaultValue!=null?Xe(g,!!y.multiple,y.defaultValue,!0):Xe(g,!!y.multiple,y.multiple?[]:"",!1))}g[su]=y}catch(ke){Ot(i,i.return,ke)}}break;case 6:if(yr(s,i),Br(i),h&4){if(i.stateNode===null)throw Error(n(162));g=i.stateNode,y=i.memoizedProps;try{g.nodeValue=y}catch(ke){Ot(i,i.return,ke)}}break;case 3:if(yr(s,i),Br(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{Ga(s.containerInfo)}catch(ke){Ot(i,i.return,ke)}break;case 4:yr(s,i),Br(i);break;case 13:yr(s,i),Br(i),g=i.child,g.flags&8192&&(y=g.memoizedState!==null,g.stateNode.isHidden=y,!y||g.alternate!==null&&g.alternate.memoizedState!==null||(wm=Lt())),h&4&&d2(i);break;case 22:if(se=l!==null&&l.memoizedState!==null,i.mode&1?(fn=(W=fn)||se,yr(s,i),fn=W):yr(s,i),Br(i),h&8192){if(W=i.memoizedState!==null,(i.stateNode.isHidden=W)&&!se&&(i.mode&1)!==0)for(we=i,se=i.child;se!==null;){for(ce=we=se;we!==null;){switch(re=we,xe=re.child,re.tag){case 0:case 11:case 14:case 15:gu(4,re,re.return);break;case 1:Io(re,re.return);var Ae=re.stateNode;if(typeof Ae.componentWillUnmount=="function"){h=re,l=re.return;try{s=h,Ae.props=s.memoizedProps,Ae.state=s.memoizedState,Ae.componentWillUnmount()}catch(ke){Ot(h,l,ke)}}break;case 5:Io(re,re.return);break;case 22:if(re.memoizedState!==null){m2(ce);continue}}xe!==null?(xe.return=re,we=xe):m2(ce)}se=se.sibling}e:for(se=null,ce=i;;){if(ce.tag===5){if(se===null){se=ce;try{g=ce.stateNode,W?(y=g.style,typeof y.setProperty=="function"?y.setProperty("display","none","important"):y.display="none"):(I=ce.stateNode,D=ce.memoizedProps.style,S=D!=null&&D.hasOwnProperty("display")?D.display:null,I.style.display=Qn("display",S))}catch(ke){Ot(i,i.return,ke)}}}else if(ce.tag===6){if(se===null)try{ce.stateNode.nodeValue=W?"":ce.memoizedProps}catch(ke){Ot(i,i.return,ke)}}else if((ce.tag!==22&&ce.tag!==23||ce.memoizedState===null||ce===i)&&ce.child!==null){ce.child.return=ce,ce=ce.child;continue}if(ce===i)break e;for(;ce.sibling===null;){if(ce.return===null||ce.return===i)break e;se===ce&&(se=null),ce=ce.return}se===ce&&(se=null),ce.sibling.return=ce.return,ce=ce.sibling}}break;case 19:yr(s,i),Br(i),h&4&&d2(i);break;case 21:break;default:yr(s,i),Br(i)}}function Br(i){var s=i.flags;if(s&2){try{e:{for(var l=i.return;l!==null;){if(u2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var g=h.stateNode;h.flags&32&&(tt(g,""),h.flags&=-33);var y=l2(i);_m(i,y,g);break;case 3:case 4:var S=h.stateNode.containerInfo,I=l2(i);bm(i,I,S);break;default:throw Error(n(161))}}catch(D){Ot(i,i.return,D)}i.flags&=-3}s&4096&&(i.flags&=-4097)}function wF(i,s,l){we=i,h2(i)}function h2(i,s,l){for(var h=(i.mode&1)!==0;we!==null;){var g=we,y=g.child;if(g.tag===22&&h){var S=g.memoizedState!==null||Bc;if(!S){var I=g.alternate,D=I!==null&&I.memoizedState!==null||fn;I=Bc;var W=fn;if(Bc=S,(fn=D)&&!W)for(we=g;we!==null;)S=we,D=S.child,S.tag===22&&S.memoizedState!==null?g2(g):D!==null?(D.return=S,we=D):g2(g);for(;y!==null;)we=y,h2(y),y=y.sibling;we=g,Bc=I,fn=W}p2(i)}else(g.subtreeFlags&8772)!==0&&y!==null?(y.return=g,we=y):p2(i)}}function p2(i){for(;we!==null;){var s=we;if((s.flags&8772)!==0){var l=s.alternate;try{if((s.flags&8772)!==0)switch(s.tag){case 0:case 11:case 15:fn||Uc(5,s);break;case 1:var h=s.stateNode;if(s.flags&4&&!fn)if(l===null)h.componentDidMount();else{var g=s.elementType===s.type?l.memoizedProps:gr(s.type,l.memoizedProps);h.componentDidUpdate(g,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var y=s.updateQueue;y!==null&&mx(s,y,h);break;case 3:var S=s.updateQueue;if(S!==null){if(l=null,s.child!==null)switch(s.child.tag){case 5:l=s.child.stateNode;break;case 1:l=s.child.stateNode}mx(s,S,l)}break;case 5:var I=s.stateNode;if(l===null&&s.flags&4){l=I;var D=s.memoizedProps;switch(s.type){case"button":case"input":case"select":case"textarea":D.autoFocus&&l.focus();break;case"img":D.src&&(l.src=D.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(s.memoizedState===null){var W=s.alternate;if(W!==null){var se=W.memoizedState;if(se!==null){var ce=se.dehydrated;ce!==null&&Ga(ce)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}fn||s.flags&512&&Tm(s)}catch(re){Ot(s,s.return,re)}}if(s===i){we=null;break}if(l=s.sibling,l!==null){l.return=s.return,we=l;break}we=s.return}}function m2(i){for(;we!==null;){var s=we;if(s===i){we=null;break}var l=s.sibling;if(l!==null){l.return=s.return,we=l;break}we=s.return}}function g2(i){for(;we!==null;){var s=we;try{switch(s.tag){case 0:case 11:case 15:var l=s.return;try{Uc(4,s)}catch(D){Ot(s,l,D)}break;case 1:var h=s.stateNode;if(typeof h.componentDidMount=="function"){var g=s.return;try{h.componentDidMount()}catch(D){Ot(s,g,D)}}var y=s.return;try{Tm(s)}catch(D){Ot(s,y,D)}break;case 5:var S=s.return;try{Tm(s)}catch(D){Ot(s,S,D)}}}catch(D){Ot(s,s.return,D)}if(s===i){we=null;break}var I=s.sibling;if(I!==null){I.return=s.return,we=I;break}we=s.return}}var CF=Math.ceil,Hc=Y.ReactCurrentDispatcher,xm=Y.ReactCurrentOwner,tr=Y.ReactCurrentBatchConfig,nt=0,Gt=null,Ut=null,Zt=0,zn=0,Po=Ni(0),zt=0,Eu=null,ys=0,zc=0,Sm=0,yu=null,Nn=null,wm=0,Ro=1/0,ai=null,jc=!1,Cm=null,Di=null,$c=!1,Mi=null,Vc=0,Tu=0,Am=null,qc=-1,Yc=0;function En(){return(nt&6)!==0?Lt():qc!==-1?qc:qc=Lt()}function Fi(i){return(i.mode&1)===0?1:(nt&2)!==0&&Zt!==0?Zt&-Zt:uF.transition!==null?(Yc===0&&(Yc=l_()),Yc):(i=ut,i!==0||(i=window.event,i=i===void 0?16:y_(i.type)),i)}function Tr(i,s,l,h){if(50<Tu)throw Tu=0,Am=null,Error(n(185));$a(i,l,h),((nt&2)===0||i!==Gt)&&(i===Gt&&((nt&2)===0&&(zc|=l),zt===4&&Bi(i,Zt)),On(i,h),l===1&&nt===0&&(s.mode&1)===0&&(Ro=Lt()+500,bc&&Ii()))}function On(i,s){var l=i.callbackNode;uM(i,s);var h=tc(i,i===Gt?Zt:0);if(h===0)l!==null&&o_(l),i.callbackNode=null,i.callbackPriority=0;else if(s=h&-h,i.callbackPriority!==s){if(l!=null&&o_(l),s===1)i.tag===0?aF(y2.bind(null,i)):rx(y2.bind(null,i)),rF(function(){(nt&6)===0&&Ii()}),l=null;else{switch(c_(h)){case 1:l=sp;break;case 4:l=a_;break;case 16:l=Xl;break;case 536870912:l=u_;break;default:l=Xl}l=A2(l,E2.bind(null,i))}i.callbackPriority=s,i.callbackNode=l}}function E2(i,s){if(qc=-1,Yc=0,(nt&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Lo()&&i.callbackNode!==l)return null;var h=tc(i,i===Gt?Zt:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||s)s=Wc(i,h);else{s=h;var g=nt;nt|=2;var y=b2();(Gt!==i||Zt!==s)&&(ai=null,Ro=Lt()+500,bs(i,s));do try{kF();break}catch(I){T2(i,I)}while(!0);Vp(),Hc.current=y,nt=g,Ut!==null?s=0:(Gt=null,Zt=0,s=zt)}if(s!==0){if(s===2&&(g=op(i),g!==0&&(h=g,s=vm(i,g))),s===1)throw l=Eu,bs(i,0),Bi(i,h),On(i,Lt()),l;if(s===6)Bi(i,h);else{if(g=i.current.alternate,(h&30)===0&&!AF(g)&&(s=Wc(i,h),s===2&&(y=op(i),y!==0&&(h=y,s=vm(i,y))),s===1))throw l=Eu,bs(i,0),Bi(i,h),On(i,Lt()),l;switch(i.finishedWork=g,i.finishedLanes=h,s){case 0:case 1:throw Error(n(345));case 2:_s(i,Nn,ai);break;case 3:if(Bi(i,h),(h&130023424)===h&&(s=wm+500-Lt(),10<s)){if(tc(i,0)!==0)break;if(g=i.suspendedLanes,(g&h)!==h){En(),i.pingedLanes|=i.suspendedLanes&g;break}i.timeoutHandle=Rp(_s.bind(null,i,Nn,ai),s);break}_s(i,Nn,ai);break;case 4:if(Bi(i,h),(h&4194240)===h)break;for(s=i.eventTimes,g=-1;0<h;){var S=31-hr(h);y=1<<S,S=s[S],S>g&&(g=S),h&=~y}if(h=g,h=Lt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*CF(h/1960))-h,10<h){i.timeoutHandle=Rp(_s.bind(null,i,Nn,ai),h);break}_s(i,Nn,ai);break;case 5:_s(i,Nn,ai);break;default:throw Error(n(329))}}}return On(i,Lt()),i.callbackNode===l?E2.bind(null,i):null}function vm(i,s){var l=yu;return i.current.memoizedState.isDehydrated&&(bs(i,s).flags|=256),i=Wc(i,s),i!==2&&(s=Nn,Nn=l,s!==null&&km(s)),i}function km(i){Nn===null?Nn=i:Nn.push.apply(Nn,i)}function AF(i){for(var s=i;;){if(s.flags&16384){var l=s.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var g=l[h],y=g.getSnapshot;g=g.value;try{if(!pr(y(),g))return!1}catch(S){return!1}}}if(l=s.child,s.subtreeFlags&16384&&l!==null)l.return=s,s=l;else{if(s===i)break;for(;s.sibling===null;){if(s.return===null||s.return===i)return!0;s=s.return}s.sibling.return=s.return,s=s.sibling}}return!0}function Bi(i,s){for(s&=~Sm,s&=~zc,i.suspendedLanes|=s,i.pingedLanes&=~s,i=i.expirationTimes;0<s;){var l=31-hr(s),h=1<<l;i[l]=-1,s&=~h}}function y2(i){if((nt&6)!==0)throw Error(n(327));Lo();var s=tc(i,0);if((s&1)===0)return On(i,Lt()),null;var l=Wc(i,s);if(i.tag!==0&&l===2){var h=op(i);h!==0&&(s=h,l=vm(i,h))}if(l===1)throw l=Eu,bs(i,0),Bi(i,s),On(i,Lt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=s,_s(i,Nn,ai),On(i,Lt()),null}function Nm(i,s){var l=nt;nt|=1;try{return i(s)}finally{nt=l,nt===0&&(Ro=Lt()+500,bc&&Ii())}}function Ts(i){Mi!==null&&Mi.tag===0&&(nt&6)===0&&Lo();var s=nt;nt|=1;var l=tr.transition,h=ut;try{if(tr.transition=null,ut=1,i)return i()}finally{ut=h,tr.transition=l,nt=s,(nt&6)===0&&Ii()}}function Om(){zn=Po.current,yt(Po)}function bs(i,s){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,nF(l)),Ut!==null)for(l=Ut.return;l!==null;){var h=l;switch(Up(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&yc();break;case 3:No(),yt(An),yt(ln),Jp();break;case 5:Qp(h);break;case 4:No();break;case 13:yt(At);break;case 19:yt(At);break;case 10:qp(h.type._context);break;case 22:case 23:Om()}l=l.return}if(Gt=i,Ut=i=Ui(i.current,null),Zt=zn=s,zt=0,Eu=null,Sm=zc=ys=0,Nn=yu=null,ms!==null){for(s=0;s<ms.length;s++)if(l=ms[s],h=l.interleaved,h!==null){l.interleaved=null;var g=h.next,y=l.pending;if(y!==null){var S=y.next;y.next=g,h.next=S}l.pending=h}ms=null}return i}function T2(i,s){do{var l=Ut;try{if(Vp(),Oc.current=Lc,Ic){for(var h=vt.memoizedState;h!==null;){var g=h.queue;g!==null&&(g.pending=null),h=h.next}Ic=!1}if(Es=0,Wt=Ht=vt=null,du=!1,fu=0,xm.current=null,l===null||l.return===null){zt=1,Eu=s,Ut=null;break}e:{var y=i,S=l.return,I=l,D=s;if(s=Zt,I.flags|=32768,D!==null&&typeof D=="object"&&typeof D.then=="function"){var W=D,se=I,ce=se.tag;if((se.mode&1)===0&&(ce===0||ce===11||ce===15)){var re=se.alternate;re?(se.updateQueue=re.updateQueue,se.memoizedState=re.memoizedState,se.lanes=re.lanes):(se.updateQueue=null,se.memoizedState=null)}var xe=Vx(S);if(xe!==null){xe.flags&=-257,qx(xe,S,I,y,s),xe.mode&1&&$x(y,W,s),s=xe,D=W;var Ae=s.updateQueue;if(Ae===null){var ke=new Set;ke.add(D),s.updateQueue=ke}else Ae.add(D);break e}else{if((s&1)===0){$x(y,W,s),Im();break e}D=Error(n(426))}}else if(wt&&I.mode&1){var Dt=Vx(S);if(Dt!==null){(Dt.flags&65536)===0&&(Dt.flags|=256),qx(Dt,S,I,y,s),jp(Oo(D,I));break e}}y=D=Oo(D,I),zt!==4&&(zt=2),yu===null?yu=[y]:yu.push(y),y=S;do{switch(y.tag){case 3:y.flags|=65536,s&=-s,y.lanes|=s;var z=zx(y,D,s);px(y,z);break e;case 1:I=D;var F=y.type,V=y.stateNode;if((y.flags&128)===0&&(typeof F.getDerivedStateFromError=="function"||V!==null&&typeof V.componentDidCatch=="function"&&(Di===null||!Di.has(V)))){y.flags|=65536,s&=-s,y.lanes|=s;var Ee=jx(y,I,s);px(y,Ee);break e}}y=y.return}while(y!==null)}x2(l)}catch(Ne){s=Ne,Ut===l&&l!==null&&(Ut=l=l.return);continue}break}while(!0)}function b2(){var i=Hc.current;return Hc.current=Lc,i===null?Lc:i}function Im(){(zt===0||zt===3||zt===2)&&(zt=4),Gt===null||(ys&268435455)===0&&(zc&268435455)===0||Bi(Gt,Zt)}function Wc(i,s){var l=nt;nt|=2;var h=b2();(Gt!==i||Zt!==s)&&(ai=null,bs(i,s));do try{vF();break}catch(g){T2(i,g)}while(!0);if(Vp(),nt=l,Hc.current=h,Ut!==null)throw Error(n(261));return Gt=null,Zt=0,zt}function vF(){for(;Ut!==null;)_2(Ut)}function kF(){for(;Ut!==null&&!Z8();)_2(Ut)}function _2(i){var s=C2(i.alternate,i,zn);i.memoizedProps=i.pendingProps,s===null?x2(i):Ut=s,xm.current=null}function x2(i){var s=i;do{var l=s.alternate;if(i=s.return,(s.flags&32768)===0){if(l=bF(l,s,zn),l!==null){Ut=l;return}}else{if(l=_F(l,s),l!==null){l.flags&=32767,Ut=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{zt=6,Ut=null;return}}if(s=s.sibling,s!==null){Ut=s;return}Ut=s=i}while(s!==null);zt===0&&(zt=5)}function _s(i,s,l){var h=ut,g=tr.transition;try{tr.transition=null,ut=1,NF(i,s,l,h)}finally{tr.transition=g,ut=h}return null}function NF(i,s,l,h){do Lo();while(Mi!==null);if((nt&6)!==0)throw Error(n(327));l=i.finishedWork;var g=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var y=l.lanes|l.childLanes;if(lM(i,y),i===Gt&&(Ut=Gt=null,Zt=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||$c||($c=!0,A2(Xl,function(){return Lo(),null})),y=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||y){y=tr.transition,tr.transition=null;var S=ut;ut=1;var I=nt;nt|=4,xm.current=null,SF(i,l),f2(l,i),KM(Ip),ic=!!Op,Ip=Op=null,i.current=l,wF(l),eM(),nt=I,ut=S,tr.transition=y}else i.current=l;if($c&&($c=!1,Mi=i,Vc=g),y=i.pendingLanes,y===0&&(Di=null),rM(l.stateNode),On(i,Lt()),s!==null)for(h=i.onRecoverableError,l=0;l<s.length;l++)g=s[l],h(g.value,{componentStack:g.stack,digest:g.digest});if(jc)throw jc=!1,i=Cm,Cm=null,i;return(Vc&1)!==0&&i.tag!==0&&Lo(),y=i.pendingLanes,(y&1)!==0?i===Am?Tu++:(Tu=0,Am=i):Tu=0,Ii(),null}function Lo(){if(Mi!==null){var i=c_(Vc),s=tr.transition,l=ut;try{if(tr.transition=null,ut=16>i?16:i,Mi===null)var h=!1;else{if(i=Mi,Mi=null,Vc=0,(nt&6)!==0)throw Error(n(331));var g=nt;for(nt|=4,we=i.current;we!==null;){var y=we,S=y.child;if((we.flags&16)!==0){var I=y.deletions;if(I!==null){for(var D=0;D<I.length;D++){var W=I[D];for(we=W;we!==null;){var se=we;switch(se.tag){case 0:case 11:case 15:gu(8,se,y)}var ce=se.child;if(ce!==null)ce.return=se,we=ce;else for(;we!==null;){se=we;var re=se.sibling,xe=se.return;if(a2(se),se===W){we=null;break}if(re!==null){re.return=xe,we=re;break}we=xe}}}var Ae=y.alternate;if(Ae!==null){var ke=Ae.child;if(ke!==null){Ae.child=null;do{var Dt=ke.sibling;ke.sibling=null,ke=Dt}while(ke!==null)}}we=y}}if((y.subtreeFlags&2064)!==0&&S!==null)S.return=y,we=S;else e:for(;we!==null;){if(y=we,(y.flags&2048)!==0)switch(y.tag){case 0:case 11:case 15:gu(9,y,y.return)}var z=y.sibling;if(z!==null){z.return=y.return,we=z;break e}we=y.return}}var F=i.current;for(we=F;we!==null;){S=we;var V=S.child;if((S.subtreeFlags&2064)!==0&&V!==null)V.return=S,we=V;else e:for(S=F;we!==null;){if(I=we,(I.flags&2048)!==0)try{switch(I.tag){case 0:case 11:case 15:Uc(9,I)}}catch(Ne){Ot(I,I.return,Ne)}if(I===S){we=null;break e}var Ee=I.sibling;if(Ee!==null){Ee.return=I.return,we=Ee;break e}we=I.return}}if(nt=g,Ii(),Lr&&typeof Lr.onPostCommitFiberRoot=="function")try{Lr.onPostCommitFiberRoot(Jl,i)}catch(Ne){}h=!0}return h}finally{ut=l,tr.transition=s}}return!1}function S2(i,s,l){s=Oo(l,s),s=zx(i,s,1),i=Ri(i,s,1),s=En(),i!==null&&($a(i,1,s),On(i,s))}function Ot(i,s,l){if(i.tag===3)S2(i,i,l);else for(;s!==null;){if(s.tag===3){S2(s,i,l);break}else if(s.tag===1){var h=s.stateNode;if(typeof s.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&(Di===null||!Di.has(h))){i=Oo(l,i),i=jx(s,i,1),s=Ri(s,i,1),i=En(),s!==null&&($a(s,1,i),On(s,i));break}}s=s.return}}function OF(i,s,l){var h=i.pingCache;h!==null&&h.delete(s),s=En(),i.pingedLanes|=i.suspendedLanes&l,Gt===i&&(Zt&l)===l&&(zt===4||zt===3&&(Zt&130023424)===Zt&&500>Lt()-wm?bs(i,0):Sm|=l),On(i,s)}function w2(i,s){s===0&&((i.mode&1)===0?s=1:(s=ec,ec<<=1,(ec&130023424)===0&&(ec=4194304)));var l=En();i=ii(i,s),i!==null&&($a(i,s,l),On(i,l))}function IF(i){var s=i.memoizedState,l=0;s!==null&&(l=s.retryLane),w2(i,l)}function PF(i,s){var l=0;switch(i.tag){case 13:var h=i.stateNode,g=i.memoizedState;g!==null&&(l=g.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(s),w2(i,l)}var C2;C2=function(i,s,l){if(i!==null)if(i.memoizedProps!==s.pendingProps||An.current)kn=!0;else{if((i.lanes&l)===0&&(s.flags&128)===0)return kn=!1,TF(i,s,l);kn=(i.flags&131072)!==0}else kn=!1,wt&&(s.flags&1048576)!==0&&ix(s,xc,s.index);switch(s.lanes=0,s.tag){case 2:var h=s.type;Fc(i,s),i=s.pendingProps;var g=xo(s,ln.current);ko(s,l),g=tm(null,s,h,i,g,l);var y=nm();return s.flags|=1,typeof g=="object"&&g!==null&&typeof g.render=="function"&&g.$$typeof===void 0?(s.tag=1,s.memoizedState=null,s.updateQueue=null,vn(h)?(y=!0,Tc(s)):y=!1,s.memoizedState=g.state!==null&&g.state!==void 0?g.state:null,Gp(s),g.updater=Dc,s.stateNode=g,g._reactInternals=s,um(s,h,i,l),s=fm(null,s,h,!0,y,l)):(s.tag=0,wt&&y&&Bp(s),gn(null,s,g,l),s=s.child),s;case 16:h=s.elementType;e:{switch(Fc(i,s),i=s.pendingProps,g=h._init,h=g(h._payload),s.type=h,g=s.tag=LF(h),i=gr(h,i),g){case 0:s=dm(null,s,h,i,l);break e;case 1:s=Xx(null,s,h,i,l);break e;case 11:s=Yx(null,s,h,i,l);break e;case 14:s=Wx(null,s,h,gr(h.type,i),l);break e}throw Error(n(306,h,""))}return s;case 0:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),dm(i,s,h,g,l);case 1:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Xx(i,s,h,g,l);case 3:e:{if(Jx(s),i===null)throw Error(n(387));h=s.pendingProps,y=s.memoizedState,g=y.element,hx(i,s),kc(s,h,null,l);var S=s.memoizedState;if(h=S.element,y.isDehydrated)if(y={element:h,isDehydrated:!1,cache:S.cache,pendingSuspenseBoundaries:S.pendingSuspenseBoundaries,transitions:S.transitions},s.updateQueue.baseState=y,s.memoizedState=y,s.flags&256){g=Oo(Error(n(423)),s),s=Zx(i,s,h,l,g);break e}else if(h!==g){g=Oo(Error(n(424)),s),s=Zx(i,s,h,l,g);break e}else for(Hn=ki(s.stateNode.containerInfo.firstChild),Un=s,wt=!0,mr=null,l=dx(s,null,h,l),s.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Co(),h===g){s=oi(i,s,l);break e}gn(i,s,h,l)}s=s.child}return s;case 5:return gx(s),i===null&&zp(s),h=s.type,g=s.pendingProps,y=i!==null?i.memoizedProps:null,S=g.children,Pp(h,g)?S=null:y!==null&&Pp(h,y)&&(s.flags|=32),Qx(i,s),gn(i,s,S,l),s.child;case 6:return i===null&&zp(s),null;case 13:return e2(i,s,l);case 4:return Kp(s,s.stateNode.containerInfo),h=s.pendingProps,i===null?s.child=Ao(s,null,h,l):gn(i,s,h,l),s.child;case 11:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Yx(i,s,h,g,l);case 7:return gn(i,s,s.pendingProps,l),s.child;case 8:return gn(i,s,s.pendingProps.children,l),s.child;case 12:return gn(i,s,s.pendingProps.children,l),s.child;case 10:e:{if(h=s.type._context,g=s.pendingProps,y=s.memoizedProps,S=g.value,pt(Cc,h._currentValue),h._currentValue=S,y!==null)if(pr(y.value,S)){if(y.children===g.children&&!An.current){s=oi(i,s,l);break e}}else for(y=s.child,y!==null&&(y.return=s);y!==null;){var I=y.dependencies;if(I!==null){S=y.child;for(var D=I.firstContext;D!==null;){if(D.context===h){if(y.tag===1){D=si(-1,l&-l),D.tag=2;var W=y.updateQueue;if(W!==null){W=W.shared;var se=W.pending;se===null?D.next=D:(D.next=se.next,se.next=D),W.pending=D}}y.lanes|=l,D=y.alternate,D!==null&&(D.lanes|=l),Yp(y.return,l,s),I.lanes|=l;break}D=D.next}}else if(y.tag===10)S=y.type===s.type?null:y.child;else if(y.tag===18){if(S=y.return,S===null)throw Error(n(341));S.lanes|=l,I=S.alternate,I!==null&&(I.lanes|=l),Yp(S,l,s),S=y.sibling}else S=y.child;if(S!==null)S.return=y;else for(S=y;S!==null;){if(S===s){S=null;break}if(y=S.sibling,y!==null){y.return=S.return,S=y;break}S=S.return}y=S}gn(i,s,g.children,l),s=s.child}return s;case 9:return g=s.type,h=s.pendingProps.children,ko(s,l),g=Zn(g),h=h(g),s.flags|=1,gn(i,s,h,l),s.child;case 14:return h=s.type,g=gr(h,s.pendingProps),g=gr(h.type,g),Wx(i,s,h,g,l);case 15:return Gx(i,s,s.type,s.pendingProps,l);case 17:return h=s.type,g=s.pendingProps,g=s.elementType===h?g:gr(h,g),Fc(i,s),s.tag=1,vn(h)?(i=!0,Tc(s)):i=!1,ko(s,l),Ux(s,h,g),um(s,h,g,l),fm(null,s,h,!0,i,l);case 19:return n2(i,s,l);case 22:return Kx(i,s,l)}throw Error(n(156,s.tag))};function A2(i,s){return s_(i,s)}function RF(i,s,l,h){this.tag=i,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=s,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function nr(i,s,l,h){return new RF(i,s,l,h)}function Pm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function LF(i){if(typeof i=="function")return Pm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===Te)return 14}return 2}function Ui(i,s){var l=i.alternate;return l===null?(l=nr(i.tag,s,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=s,l.type=i.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=i.flags&14680064,l.childLanes=i.childLanes,l.lanes=i.lanes,l.child=i.child,l.memoizedProps=i.memoizedProps,l.memoizedState=i.memoizedState,l.updateQueue=i.updateQueue,s=i.dependencies,l.dependencies=s===null?null:{lanes:s.lanes,firstContext:s.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function Gc(i,s,l,h,g,y){var S=2;if(h=i,typeof i=="function")Pm(i)&&(S=1);else if(typeof i=="string")S=5;else e:switch(i){case te:return xs(l.children,g,y,s);case ge:S=8,g|=8;break;case ye:return i=nr(12,l,s,g|2),i.elementType=ye,i.lanes=y,i;case ue:return i=nr(13,l,s,g),i.elementType=ue,i.lanes=y,i;case de:return i=nr(19,l,s,g),i.elementType=de,i.lanes=y,i;case oe:return Kc(l,g,y,s);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case M:S=10;break e;case ae:S=9;break e;case he:S=11;break e;case Te:S=14;break e;case Ce:S=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return s=nr(S,l,s,g),s.elementType=i,s.type=h,s.lanes=y,s}function xs(i,s,l,h){return i=nr(7,i,h,s),i.lanes=l,i}function Kc(i,s,l,h){return i=nr(22,i,h,s),i.elementType=oe,i.lanes=l,i.stateNode={isHidden:!1},i}function Rm(i,s,l){return i=nr(6,i,null,s),i.lanes=l,i}function Lm(i,s,l){return s=nr(4,i.children!==null?i.children:[],i.key,s),s.lanes=l,s.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},s}function DF(i,s,l,h,g){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=ap(0),this.expirationTimes=ap(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ap(0),this.identifierPrefix=h,this.onRecoverableError=g,this.mutableSourceEagerHydrationData=null}function Dm(i,s,l,h,g,y,S,I,D){return i=new DF(i,s,l,I,D),s===1?(s=1,y===!0&&(s|=8)):s=0,y=nr(3,null,null,s),i.current=y,y.stateNode=i,y.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},Gp(y),i}function MF(i,s,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:B,key:h==null?null:""+h,children:i,containerInfo:s,implementation:l}}function v2(i){if(!i)return Oi;i=i._reactInternals;e:{if(cs(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(vn(s.type)){s=s.stateNode.__reactInternalMemoizedMergedChildContext;break e}}s=s.return}while(s!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(vn(l))return tx(i,l,s)}return s}function k2(i,s,l,h,g,y,S,I,D){return i=Dm(l,h,!0,i,g,y,S,I,D),i.context=v2(null),l=i.current,h=En(),g=Fi(l),y=si(h,g),y.callback=s!=null?s:null,Ri(l,y,g),i.current.lanes=g,$a(i,g,h),On(i,h),i}function Qc(i,s,l,h){var g=s.current,y=En(),S=Fi(g);return l=v2(l),s.context===null?s.context=l:s.pendingContext=l,s=si(y,S),s.payload={element:i},h=h===void 0?null:h,h!==null&&(s.callback=h),i=Ri(g,s,S),i!==null&&(Tr(i,g,S,y),vc(i,g,S)),S}function Xc(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function N2(i,s){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<s?l:s}}function Mm(i,s){N2(i,s),(i=i.alternate)&&N2(i,s)}function FF(){return null}var O2=typeof reportError=="function"?reportError:function(i){console.error(i)};function Fm(i){this._internalRoot=i}Jc.prototype.render=Fm.prototype.render=function(i){var s=this._internalRoot;if(s===null)throw Error(n(409));Qc(i,s,null,null)},Jc.prototype.unmount=Fm.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var s=i.containerInfo;Ts(function(){Qc(null,i,null,null)}),s[ei]=null}};function Jc(i){this._internalRoot=i}Jc.prototype.unstable_scheduleHydration=function(i){if(i){var s=h_();i={blockedOn:null,target:i,priority:s};for(var l=0;l<Ci.length&&s!==0&&s<Ci[l].priority;l++);Ci.splice(l,0,i),l===0&&g_(i)}};function Bm(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function Zc(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function I2(){}function BF(i,s,l,h,g){if(g){if(typeof h=="function"){var y=h;h=function(){var W=Xc(S);y.call(W)}}var S=k2(s,h,i,0,null,!1,!1,"",I2);return i._reactRootContainer=S,i[ei]=S.current,ru(i.nodeType===8?i.parentNode:i),Ts(),S}for(;g=i.lastChild;)i.removeChild(g);if(typeof h=="function"){var I=h;h=function(){var W=Xc(D);I.call(W)}}var D=Dm(i,0,!1,null,null,!1,!1,"",I2);return i._reactRootContainer=D,i[ei]=D.current,ru(i.nodeType===8?i.parentNode:i),Ts(function(){Qc(s,D,l,h)}),D}function ed(i,s,l,h,g){var y=l._reactRootContainer;if(y){var S=y;if(typeof g=="function"){var I=g;g=function(){var D=Xc(S);I.call(D)}}Qc(s,S,i,g)}else S=BF(l,s,i,g,h);return Xc(S)}d_=function(i){switch(i.tag){case 3:var s=i.stateNode;if(s.current.memoizedState.isDehydrated){var l=ja(s.pendingLanes);l!==0&&(up(s,l|1),On(s,Lt()),(nt&6)===0&&(Ro=Lt()+500,Ii()))}break;case 13:Ts(function(){var h=ii(i,1);if(h!==null){var g=En();Tr(h,i,1,g)}}),Mm(i,1)}},lp=function(i){if(i.tag===13){var s=ii(i,134217728);if(s!==null){var l=En();Tr(s,i,134217728,l)}Mm(i,134217728)}},f_=function(i){if(i.tag===13){var s=Fi(i),l=ii(i,s);if(l!==null){var h=En();Tr(l,i,s,h)}Mm(i,s)}},h_=function(){return ut},p_=function(i,s){var l=ut;try{return ut=i,s()}finally{ut=l}},tp=function(i,s,l){switch(s){case"input":if(Jr(i,l),s=l.name,l.type==="radio"&&s!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+s)+'][type="radio"]'),s=0;s<l.length;s++){var h=l[s];if(h!==i&&h.form===i.form){var g=Ec(h);if(!g)throw Error(n(90));as(h),Jr(h,g)}}}break;case"textarea":mn(i,l);break;case"select":s=l.value,s!=null&&Xe(i,!!l.multiple,s,!1)}},Jb=Nm,Zb=Ts;var UF={usingClientEntryPoint:!1,Events:[ou,bo,Ec,Qb,Xb,Nm]},bu={findFiberByHostInstance:ds,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},HF={bundleType:bu.bundleType,version:bu.version,rendererPackageName:bu.rendererPackageName,rendererConfig:bu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:Y.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=r_(i),i===null?null:i.stateNode},findFiberByHostInstance:bu.findFiberByHostInstance||FF,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 td=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!td.isDisabled&&td.supportsFiber)try{Jl=td.inject(HF),Lr=td}catch(i){}}return Cn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=UF,Cn.createPortal=function(i,s){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!Bm(s))throw Error(n(200));return MF(i,s,null,l)},Cn.createRoot=function(i,s){if(!Bm(i))throw Error(n(299));var l=!1,h="",g=O2;return s!=null&&(s.unstable_strictMode===!0&&(l=!0),s.identifierPrefix!==void 0&&(h=s.identifierPrefix),s.onRecoverableError!==void 0&&(g=s.onRecoverableError)),s=Dm(i,1,!1,null,null,l,!1,h,g),i[ei]=s.current,ru(i.nodeType===8?i.parentNode:i),new Fm(s)},Cn.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},Cn.flushSync=function(i){return Ts(i)},Cn.hydrate=function(i,s,l){if(!Zc(s))throw Error(n(200));return ed(null,i,s,!0,l)},Cn.hydrateRoot=function(i,s,l){if(!Bm(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,g=!1,y="",S=O2;if(l!=null&&(l.unstable_strictMode===!0&&(g=!0),l.identifierPrefix!==void 0&&(y=l.identifierPrefix),l.onRecoverableError!==void 0&&(S=l.onRecoverableError)),s=k2(s,null,i,1,l!=null?l:null,g,!1,y,S),i[ei]=s.current,ru(i),h)for(i=0;i<h.length;i++)l=h[i],g=l._getVersion,g=g(l._source),s.mutableSourceEagerHydrationData==null?s.mutableSourceEagerHydrationData=[l,g]:s.mutableSourceEagerHydrationData.push(l,g);return new Jc(s)},Cn.render=function(i,s,l){if(!Zc(s))throw Error(n(200));return ed(null,i,s,!1,l)},Cn.unmountComponentAtNode=function(i){if(!Zc(i))throw Error(n(40));return i._reactRootContainer?(Ts(function(){ed(null,null,i,!1,function(){i._reactRootContainer=null,i[ei]=null})}),!0):!1},Cn.unstable_batchedUpdates=Nm,Cn.unstable_renderSubtreeIntoContainer=function(i,s,l,h){if(!Zc(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return ed(i,s,l,!1,h)},Cn.version="18.3.1-next-f1338f8080-20240426",Cn}var Xy;function Jy(){if(Xy)return fh.exports;Xy=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(),fh.exports=UL(),fh.exports}var Nl=Jy();function HL(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var mh=()=>e=>Array.from(new Set(e)),Zy=typeof globalThis.document!="undefined"?$.useLayoutEffect:$.useEffect;function Ol(e){var E,b;const t=(E=e().value)!=null?E:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=$.useState(t),[o,a]=$.useState(r),u=e().value!==void 0,c=$.useRef(o);c.current=u?e().value:o;const d=$.useRef(c.current);Zy(()=>{d.current=c.current},[o,e().value]);const f=T=>{var C,v;const _=d.current,x=Ks(T)?T(_):T;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:x,prev:_}),u||a(x),n(x,_)||(v=(C=e()).onChange)==null||v.call(C,x,_)};function p(){return u?e().value:o}return{initial:r,ref:c,get:p,set(T){(e().sync?Nl.flushSync:FR)(()=>f(T))},invoke(T,_){var x,C;(C=(x=e()).onChange)==null||C.call(x,T,_)},hash(T){var _,x,C;return(C=(x=(_=e()).hash)==null?void 0:x.call(_,T))!=null?C:String(T)}}}Ol.cleanup=e=>{$.useEffect(()=>e,[])},Ol.ref=e=>{const t=$.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function zL(e){const t=$.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var jL=(e,t)=>{const n=$.useRef(!1),r=$.useRef(!1);$.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(o=>typeof o=="function"?o():o)]),$.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function gh(e,t={}){var ae,he,ue,de,Te,Ce;const n=$.useMemo(()=>{const{id:oe,ids:q,getRootNode:ne}=t;return ML({id:oe,ids:q,getRootNode:ne})},[t]),r=(...oe)=>{e.debug&&console.log(...oe)},o=(he=(ae=e.props)==null?void 0:ae.call(e,{props:th(t),scope:n}))!=null?he:t,a=$L(o),u=(ue=e.context)==null?void 0:ue.call(e,{prop:a,bindable:Ol,scope:n,flush:tT,getContext(){return d},getComputed(){return X},getRefs(){return x},getEvent(){return T()}}),c=eT(u),d={get(oe){var q;return(q=c.current)==null?void 0:q[oe].ref.current},set(oe,q){var ne;(ne=c.current)==null||ne[oe].set(q)},initial(oe){var q;return(q=c.current)==null?void 0:q[oe].initial},hash(oe){var ne,w;const q=(ne=c.current)==null?void 0:ne[oe].get();return(w=c.current)==null?void 0:w[oe].hash(q)}},f=$.useRef(new Map),p=$.useRef(null),E=$.useRef(null),b=$.useRef({type:""}),T=()=>be(H({},b.current),{current(){return b.current},previous(){return E.current}}),_=()=>be(H({},B),{matches(...oe){return oe.includes(B.ref.current)},hasTag(oe){var q,ne;return!!((ne=(q=e.states[B.ref.current])==null?void 0:q.tags)!=null&&ne.includes(oe))}}),x=zL((Te=(de=e.refs)==null?void 0:de.call(e,{prop:a,context:d}))!=null?Te:{}),C=()=>({state:_(),context:d,event:T(),prop:a,send:M,action:v,guard:U,track:jL,refs:x,computed:X,flush:tT,scope:n,choose:Y}),v=oe=>{const q=Ks(oe)?oe(C()):oe;if(!q)return;const ne=q.map(w=>{var K,O;const R=(O=(K=e.implementations)==null?void 0:K.actions)==null?void 0:O[w];return R||nh(`[zag-js] No implementation found for action "${JSON.stringify(w)}"`),R});for(const w of ne)w==null||w(C())},U=oe=>{var q,ne;return Ks(oe)?oe(C()):(ne=(q=e.implementations)==null?void 0:q.guards)==null?void 0:ne[oe](C())},L=oe=>{const q=Ks(oe)?oe(C()):oe;if(!q)return;const ne=q.map(R=>{var O,_e;const K=(_e=(O=e.implementations)==null?void 0:O.effects)==null?void 0:_e[R];return K||nh(`[zag-js] No implementation found for effect "${JSON.stringify(R)}"`),K}),w=[];for(const R of ne){const K=R==null?void 0:R(C());K&&w.push(K)}return()=>w.forEach(R=>R==null?void 0:R())},Y=oe=>vR(oe).find(q=>{let ne=!q.guard;return xl(q.guard)?ne=!!U(q.guard):Ks(q.guard)&&(ne=q.guard(C())),ne}),X=oe=>{UR(e.computed,()=>"[zag-js] No computed object found on machine");const q=e.computed[oe];return q({context:d,event:T(),prop:a,refs:x,scope:n,computed:X})},B=Ol(()=>({defaultValue:e.initialState({prop:a}),onChange(oe,q){var w,R,K,O;if(q){const _e=f.current.get(q);_e==null||_e(),f.current.delete(q)}q&&v((w=e.states[q])==null?void 0:w.exit),v((R=p.current)==null?void 0:R.actions);const ne=L((K=e.states[oe])==null?void 0:K.effects);if(ne&&f.current.set(oe,ne),q===dh){v(e.entry);const _e=L(e.effects);_e&&f.current.set(dh,_e)}v((O=e.states[oe])==null?void 0:O.entry)}})),te=$.useRef(void 0),ge=$.useRef(Js.NotStarted);Zy(()=>{queueMicrotask(()=>{var R;const ne=ge.current===Js.Started;ge.current=Js.Started,r(ne?"rehydrating...":"initializing...");const w=(R=te.current)!=null?R:B.initial;B.invoke(w,ne?B.get():dh)});const oe=f.current,q=B.ref.current;return()=>{r("unmounting..."),te.current=q,ge.current=Js.Stopped,oe.forEach(ne=>ne==null?void 0:ne()),f.current=new Map,p.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const ye=()=>"ref"in B?B.ref.current:B.get(),M=oe=>{queueMicrotask(()=>{var O,_e,Re,Oe,Ge;if(ge.current!==Js.Started)return;E.current=b.current,b.current=oe;let q=ye();const ne=(Re=(O=e.states[q].on)==null?void 0:O[oe.type])!=null?Re:(_e=e.on)==null?void 0:_e[oe.type],w=Y(ne);if(!w)return;p.current=w;const R=(Oe=w.target)!=null?Oe:q;r("transition",oe.type,w.target||q,`(${w.actions})`);const K=R!==q;K?Nl.flushSync(()=>B.set(R)):w.reenter&&!K?B.invoke(q,q):v((Ge=w.actions)!=null?Ge:[])})};return(Ce=e.watch)==null||Ce.call(e,C()),{state:_(),send:M,context:d,prop:a,scope:n,refs:x,computed:X,event:T(),getStatus:()=>ge.current}}function eT(e){const t=$.useRef(e);return t.current=e,t}function $L(e){const t=eT(e);return function(r){return t.current[r]}}function tT(e){queueMicrotask(()=>{Nl.flushSync(()=>e())})}var nT=HL(e=>e);function Il(...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 VL(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 Eh=e=>{const t=$.memo($.forwardRef((n,r)=>{const f=n,{asChild:o,children:a}=f,u=en(f,["asChild","children"]);if(!o)return $.createElement(e,be(H({},u),{ref:r}),a);if(!$.isValidElement(a))return null;const c=$.Children.only(a),d=VL(c);return $.cloneElement(c,be(H({},cr(u,c.props)),{ref:r?Il(r,d):d}))}));return t.displayName=e.displayName||e.name,t},gi=(()=>{const e=new Map;return new Proxy(Eh,{apply(t,n,r){return Eh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Eh(r)),e.get(r)}})})();function qL(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function Zs(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:o="Provider",errorMessage:a,defaultValue:u}=e,c=$.createContext(u);c.displayName=t;function d(){var p;const f=$.useContext(c);if(!f&&n){const E=new Error(a!=null?a:qL(r,o));throw E.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,E,d),E}return f}return[c.Provider,d,c]}const[YL,yh]=Zs({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[rT,Na]=Zs({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),iT=$.forwardRef((e,t)=>{const n=yh(),r=Na(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:k.jsx(gi.div,be(H({},o),{ref:Il(r.ref,t)}))});iT.displayName="PopoverContent";const sT=$.forwardRef((e,t)=>{const n=yh(),r=Na(),o=cr(n.getPositionerProps(),e);return r.unmounted?null:k.jsx(gi.div,be(H({},o),{ref:t}))});sT.displayName="PopoverPositioner";const oT=()=>(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]},[{},H({},e)]),aT=e=>oT()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function WL(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 GL={props({props:e}){return be(H({},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",Al(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"});wn(()=>{var c,d;const u=Pl(t.get("styles"));e.set("unmountAnimationName",u),u==="none"||u===e.get("prevAnimationName")||((c=t.get("styles"))==null?void 0:c.display)==="none"||((d=t.get("styles"))==null?void 0:d.animationDuration)==="0s"?n({type:"UNMOUNT",src:"presence.changed"}):n({type:"UNMOUNT.SUSPEND"})})},setPrevAnimationName:({context:e,refs:t})=>{wn(()=>{e.set("prevAnimationName",Pl(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,E,b;((b=(E=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:E[0])!=null?b:d.target)===o&&e.set("prevAnimationName",Pl(t.get("styles")))},u=d=>{const f=Pl(t.get("styles"));qr(d)===o&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};o.addEventListener("animationstart",a),o.addEventListener("animationcancel",u),o.addEventListener("animationend",u);const c=kl(o,{animationFillMode:"forwards"});return()=>{o.removeEventListener("animationstart",a),o.removeEventListener("animationcancel",u),o.removeEventListener("animationend",u),wL(()=>c())}}}}};function Pl(e){return(e==null?void 0:e.animationName)||"none"}mh()(["onExitComplete","present","immediate"]);function KL(e,t={}){const{sync:n=!1}=t,r=QL(e);return $.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 QL(e){const t=$.useRef(e);return t.current=e,t}const Th=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:o=!1}=b,a=en(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=$.useRef(!1),c=be(H({},a),{present:r,onExitComplete:KL(e.onExitComplete)}),d=gh(GL,c),f=WL(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,E=()=>({"data-state":f.skip&&o?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:E,present:f.present,unmounted:p}};var eo=(e,t=[])=>({parts:(...n)=>{if(XL(t))return eo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>eo(e,[...t,...n]),omit:(...n)=>eo(e,t.filter(r=>!n.includes(r))),rename:n=>eo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${to(e)}"][data-part="${to(r)}"]`,`& [data-scope="${to(e)}"][data-part="${to(r)}"]`].join(", "),attrs:{"data-scope":to(e),"data-part":to(r)}}}),{})}),to=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),XL=e=>e.length===0;const JL=["top","right","bottom","left"],Ei=Math.min,Dn=Math.max,Rl=Math.round,Ll=Math.floor,vr=e=>({x:e,y:e}),ZL={left:"right",right:"left",bottom:"top",top:"bottom"},e6={start:"end",end:"start"};function bh(e,t,n){return Dn(e,Ei(t,n))}function Wr(e,t){return typeof e=="function"?e(t):e}function Gr(e){return e.split("-")[0]}function no(e){return e.split("-")[1]}function _h(e){return e==="x"?"y":"x"}function xh(e){return e==="y"?"height":"width"}const t6=new Set(["top","bottom"]);function kr(e){return t6.has(Gr(e))?"y":"x"}function Sh(e){return _h(kr(e))}function n6(e,t,n){n===void 0&&(n=!1);const r=no(e),o=Sh(e),a=xh(o);let u=o==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Dl(u)),[u,Dl(u)]}function r6(e){const t=Dl(e);return[wh(e),t,wh(t)]}function wh(e){return e.replace(/start|end/g,t=>e6[t])}const uT=["left","right"],lT=["right","left"],i6=["top","bottom"],s6=["bottom","top"];function o6(e,t,n){switch(e){case"top":case"bottom":return n?t?lT:uT:t?uT:lT;case"left":case"right":return t?i6:s6;default:return[]}}function a6(e,t,n,r){const o=no(e);let a=o6(Gr(e),n==="start",r);return o&&(a=a.map(u=>u+"-"+o),t&&(a=a.concat(a.map(wh)))),a}function Dl(e){return e.replace(/left|right|bottom|top/g,t=>ZL[t])}function u6(e){return H({top:0,right:0,bottom:0,left:0},e)}function cT(e){return typeof e!="number"?u6(e):{top:e,right:e,bottom:e,left:e}}function Ml(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 dT(e,t,n){let{reference:r,floating:o}=e;const a=kr(t),u=Sh(t),c=xh(u),d=Gr(t),f=a==="y",p=r.x+r.width/2-o.width/2,E=r.y+r.height/2-o.height/2,b=r[c]/2-o[c]/2;let T;switch(d){case"top":T={x:p,y:r.y-o.height};break;case"bottom":T={x:p,y:r.y+r.height};break;case"right":T={x:r.x+r.width,y:E};break;case"left":T={x:r.x-o.width,y:E};break;default:T={x:r.x,y:r.y}}switch(no(t)){case"start":T[u]-=b*(n&&f?-1:1);break;case"end":T[u]+=b*(n&&f?-1:1);break}return T}const l6=(e,t,n)=>rt(null,null,function*(){const{placement:r="bottom",strategy:o="absolute",middleware:a=[],platform:u}=n,c=a.filter(Boolean),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:o}),{x:p,y:E}=dT(f,r,d),b=r,T={},_=0;for(let x=0;x<c.length;x++){const{name:C,fn:v}=c[x],{x:U,y:L,data:Y,reset:X}=yield v({x:p,y:E,initialPlacement:r,placement:b,strategy:o,middlewareData:T,rects:f,platform:u,elements:{reference:e,floating:t}});p=U!=null?U:p,E=L!=null?L:E,T=be(H({},T),{[C]:H(H({},T[C]),Y)}),X&&_<=50&&(_++,typeof X=="object"&&(X.placement&&(b=X.placement),X.rects&&(f=X.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:o}):X.rects),{x:p,y:E}=dT(f,b,d)),x=-1)}return{x:p,y:E,placement:b,strategy:o,middlewareData:T}});function Oa(e,t){return rt(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:o,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:E="floating",altBoundary:b=!1,padding:T=0}=Wr(t,e),_=cT(T),C=c[b?E==="floating"?"reference":"floating":E],v=Ml(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(C))==null||n?C:C.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),U=E==="floating"?{x:r,y:o,width:u.floating.width,height:u.floating.height}:u.reference,L=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),Y=(yield a.isElement==null?void 0:a.isElement(L))?(yield a.getScale==null?void 0:a.getScale(L))||{x:1,y:1}:{x:1,y:1},X=Ml(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:U,offsetParent:L,strategy:d}):U);return{top:(v.top-X.top+_.top)/Y.y,bottom:(X.bottom-v.bottom+_.bottom)/Y.y,left:(v.left-X.left+_.left)/Y.x,right:(X.right-v.right+_.right)/Y.x}})}const c6=e=>({name:"arrow",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:E=0}=Wr(e,n)||{};if(p==null)return{};const b=cT(E),T={x:r,y:o},_=Sh(a),x=xh(_),C=yield c.getDimensions(p),v=_==="y",U=v?"top":"left",L=v?"bottom":"right",Y=v?"clientHeight":"clientWidth",X=u.reference[x]+u.reference[_]-T[_]-u.floating[x],B=T[_]-u.reference[_],te=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ge=te?te[Y]:0;(!ge||!(yield c.isElement==null?void 0:c.isElement(te)))&&(ge=d.floating[Y]||u.floating[x]);const ye=X/2-B/2,M=ge/2-C[x]/2-1,ae=Ei(b[U],M),he=Ei(b[L],M),ue=ae,de=ge-C[x]-he,Te=ge/2-C[x]/2+ye,Ce=bh(ue,Te,de),oe=!f.arrow&&no(a)!=null&&Te!==Ce&&u.reference[x]/2-(Te<ue?ae:he)-C[x]/2<0,q=oe?Te<ue?Te-ue:Te-de:0;return{[_]:T[_]+q,data:H({[_]:Ce,centerOffset:Te-Ce-q},oe&&{alignmentOffset:q}),reset:oe}})}}),d6=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,Te=Wr(e,n),{mainAxis:E=!0,crossAxis:b=!0,fallbackPlacements:T,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:x="none",flipAlignment:C=!0}=Te,v=en(Te,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const U=Gr(a),L=kr(d),Y=Gr(d)===d,X=yield f.isRTL==null?void 0:f.isRTL(p.floating),B=T||(Y||!C?[Dl(d)]:r6(d)),te=x!=="none";!T&&te&&B.push(...a6(d,C,x,X));const ge=[d,...B],ye=yield Oa(n,v),M=[];let ae=((o=u.flip)==null?void 0:o.overflows)||[];if(E&&M.push(ye[U]),b){const Ce=n6(a,c,X);M.push(ye[Ce[0]],ye[Ce[1]])}if(ae=[...ae,{placement:a,overflows:M}],!M.every(Ce=>Ce<=0)){var he,ue;const Ce=(((he=u.flip)==null?void 0:he.index)||0)+1,oe=ge[Ce];if(oe&&(!(b==="alignment"?L!==kr(oe):!1)||ae.every(w=>kr(w.placement)===L?w.overflows[0]>0:!0)))return{data:{index:Ce,overflows:ae},reset:{placement:oe}};let q=(ue=ae.filter(ne=>ne.overflows[0]<=0).sort((ne,w)=>ne.overflows[1]-w.overflows[1])[0])==null?void 0:ue.placement;if(!q)switch(_){case"bestFit":{var de;const ne=(de=ae.filter(w=>{if(te){const R=kr(w.placement);return R===L||R==="y"}return!0}).map(w=>[w.placement,w.overflows.filter(R=>R>0).reduce((R,K)=>R+K,0)]).sort((w,R)=>w[1]-R[1])[0])==null?void 0:de[0];ne&&(q=ne);break}case"initialPlacement":q=d;break}if(a!==q)return{reset:{placement:q}}}return{}})}}};function fT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function hT(e){return JL.some(t=>e[t]>=0)}const f6=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return rt(this,null,function*(){const{rects:r}=n,u=Wr(e,n),{strategy:o="referenceHidden"}=u,a=en(u,["strategy"]);switch(o){case"referenceHidden":{const c=yield Oa(n,be(H({},a),{elementContext:"reference"})),d=fT(c,r.reference);return{data:{referenceHiddenOffsets:d,referenceHidden:hT(d)}}}case"escaped":{const c=yield Oa(n,be(H({},a),{altBoundary:!0})),d=fT(c,r.floating);return{data:{escapedOffsets:d,escaped:hT(d)}}}default:return{}}})}}},pT=new Set(["left","top"]);function h6(e,t){return rt(this,null,function*(){const{placement:n,platform:r,elements:o}=e,a=yield r.isRTL==null?void 0:r.isRTL(o.floating),u=Gr(n),c=no(n),d=kr(n)==="y",f=pT.has(u)?-1:1,p=a&&d?-1:1,E=Wr(t,e);let{mainAxis:b,crossAxis:T,alignmentAxis:_}=typeof E=="number"?{mainAxis:E,crossAxis:0,alignmentAxis:null}:{mainAxis:E.mainAxis||0,crossAxis:E.crossAxis||0,alignmentAxis:E.alignmentAxis};return c&&typeof _=="number"&&(T=c==="end"?_*-1:_),d?{x:T*p,y:b*f}:{x:b*f,y:T*p}})}const p6=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return rt(this,null,function*(){var r,o;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield h6(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(o=d.arrow)!=null&&o.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:be(H({},f),{placement:c})}})}}},m6=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return rt(this,null,function*(){const{x:r,y:o,placement:a}=n,v=Wr(e,n),{mainAxis:u=!0,crossAxis:c=!1,limiter:d={fn:U=>{let{x:L,y:Y}=U;return{x:L,y:Y}}}}=v,f=en(v,["mainAxis","crossAxis","limiter"]),p={x:r,y:o},E=yield Oa(n,f),b=kr(Gr(a)),T=_h(b);let _=p[T],x=p[b];if(u){const U=T==="y"?"top":"left",L=T==="y"?"bottom":"right",Y=_+E[U],X=_-E[L];_=bh(Y,_,X)}if(c){const U=b==="y"?"top":"left",L=b==="y"?"bottom":"right",Y=x+E[U],X=x-E[L];x=bh(Y,x,X)}const C=d.fn(be(H({},n),{[T]:_,[b]:x}));return be(H({},C),{data:{x:C.x-r,y:C.y-o,enabled:{[T]:u,[b]:c}}})})}}},g6=function(e){return e===void 0&&(e={}),{options:e,fn(t){const{x:n,y:r,placement:o,rects:a,middlewareData:u}=t,{offset:c=0,mainAxis:d=!0,crossAxis:f=!0}=Wr(e,t),p={x:n,y:r},E=kr(o),b=_h(E);let T=p[b],_=p[E];const x=Wr(c,t),C=typeof x=="number"?{mainAxis:x,crossAxis:0}:H({mainAxis:0,crossAxis:0},x);if(d){const L=b==="y"?"height":"width",Y=a.reference[b]-a.floating[L]+C.mainAxis,X=a.reference[b]+a.reference[L]-C.mainAxis;T<Y?T=Y:T>X&&(T=X)}if(f){var v,U;const L=b==="y"?"width":"height",Y=pT.has(Gr(o)),X=a.reference[E]-a.floating[L]+(Y&&((v=u.offset)==null?void 0:v[E])||0)+(Y?0:C.crossAxis),B=a.reference[E]+a.reference[L]+(Y?0:((U=u.offset)==null?void 0:U[E])||0)-(Y?C.crossAxis:0);_<X?_=X:_>B&&(_=B)}return{[b]:T,[E]:_}}}},E6=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return rt(this,null,function*(){var r,o;const{placement:a,rects:u,platform:c,elements:d}=n,ae=Wr(e,n),{apply:f=()=>{}}=ae,p=en(ae,["apply"]),E=yield Oa(n,p),b=Gr(a),T=no(a),_=kr(a)==="y",{width:x,height:C}=u.floating;let v,U;b==="top"||b==="bottom"?(v=b,U=T===((yield c.isRTL==null?void 0:c.isRTL(d.floating))?"start":"end")?"left":"right"):(U=b,v=T==="end"?"top":"bottom");const L=C-E.top-E.bottom,Y=x-E.left-E.right,X=Ei(C-E[v],L),B=Ei(x-E[U],Y),te=!n.middlewareData.shift;let ge=X,ye=B;if((r=n.middlewareData.shift)!=null&&r.enabled.x&&(ye=Y),(o=n.middlewareData.shift)!=null&&o.enabled.y&&(ge=L),te&&!T){const he=Dn(E.left,0),ue=Dn(E.right,0),de=Dn(E.top,0),Te=Dn(E.bottom,0);_?ye=x-2*(he!==0||ue!==0?he+ue:Dn(E.left,E.right)):ge=C-2*(de!==0||Te!==0?de+Te:Dn(E.top,E.bottom))}yield f(be(H({},n),{availableWidth:ye,availableHeight:ge}));const M=yield c.getDimensions(d.floating);return x!==M.width||C!==M.height?{reset:{rects:!0}}:{}})}}};function Fl(){return typeof window!="undefined"}function ro(e){return mT(e)?(e.nodeName||"").toLowerCase():"#document"}function Mn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Nr(e){var t;return(t=(mT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function mT(e){return Fl()?e instanceof Node||e instanceof Mn(e).Node:!1}function dr(e){return Fl()?e instanceof Element||e instanceof Mn(e).Element:!1}function Or(e){return Fl()?e instanceof HTMLElement||e instanceof Mn(e).HTMLElement:!1}function gT(e){return!Fl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof Mn(e).ShadowRoot}const y6=new Set(["inline","contents"]);function Ia(e){const{overflow:t,overflowX:n,overflowY:r,display:o}=fr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!y6.has(o)}const T6=new Set(["table","td","th"]);function b6(e){return T6.has(ro(e))}const _6=[":popover-open",":modal"];function Bl(e){return _6.some(t=>{try{return e.matches(t)}catch(n){return!1}})}const x6=["transform","translate","scale","rotate","perspective"],S6=["transform","translate","scale","rotate","perspective","filter"],w6=["paint","layout","strict","content"];function Ch(e){const t=Ah(),n=dr(e)?fr(e):e;return x6.some(r=>n[r]?n[r]!=="none":!1)||(n.containerType?n.containerType!=="normal":!1)||!t&&(n.backdropFilter?n.backdropFilter!=="none":!1)||!t&&(n.filter?n.filter!=="none":!1)||S6.some(r=>(n.willChange||"").includes(r))||w6.some(r=>(n.contain||"").includes(r))}function C6(e){let t=yi(e);for(;Or(t)&&!io(t);){if(Ch(t))return t;if(Bl(t))return null;t=yi(t)}return null}function Ah(){return typeof CSS=="undefined"||!CSS.supports?!1:CSS.supports("-webkit-backdrop-filter","none")}const A6=new Set(["html","body","#document"]);function io(e){return A6.has(ro(e))}function fr(e){return Mn(e).getComputedStyle(e)}function Ul(e){return dr(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function yi(e){if(ro(e)==="html")return e;const t=e.assignedSlot||e.parentNode||gT(e)&&e.host||Nr(e);return gT(t)?t.host:t}function ET(e){const t=yi(e);return io(t)?e.ownerDocument?e.ownerDocument.body:e.body:Or(t)&&Ia(t)?t:ET(t)}function Pa(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const o=ET(e),a=o===((r=e.ownerDocument)==null?void 0:r.body),u=Mn(o);if(a){const c=vh(u);return t.concat(u,u.visualViewport||[],Ia(o)?o:[],c&&n?Pa(c):[])}return t.concat(o,Pa(o,[],n))}function vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function yT(e){const t=fr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const o=Or(e),a=o?e.offsetWidth:n,u=o?e.offsetHeight:r,c=Rl(n)!==a||Rl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function kh(e){return dr(e)?e:e.contextElement}function so(e){const t=kh(e);if(!Or(t))return vr(1);const n=t.getBoundingClientRect(),{width:r,height:o,$:a}=yT(t);let u=(a?Rl(n.width):n.width)/r,c=(a?Rl(n.height):n.height)/o;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const v6=vr(0);function TT(e){const t=Mn(e);return!Ah()||!t.visualViewport?v6:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function k6(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==Mn(e)?!1:t}function is(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const o=e.getBoundingClientRect(),a=kh(e);let u=vr(1);t&&(r?dr(r)&&(u=so(r)):u=so(e));const c=k6(a,n,r)?TT(a):vr(0);let d=(o.left+c.x)/u.x,f=(o.top+c.y)/u.y,p=o.width/u.x,E=o.height/u.y;if(a){const b=Mn(a),T=r&&dr(r)?Mn(r):r;let _=b,x=vh(_);for(;x&&r&&T!==_;){const C=so(x),v=x.getBoundingClientRect(),U=fr(x),L=v.left+(x.clientLeft+parseFloat(U.paddingLeft))*C.x,Y=v.top+(x.clientTop+parseFloat(U.paddingTop))*C.y;d*=C.x,f*=C.y,p*=C.x,E*=C.y,d+=L,f+=Y,_=Mn(x),x=vh(_)}}return Ml({width:p,height:E,x:d,y:f})}function Hl(e,t){const n=Ul(e).scrollLeft;return t?t.left+n:is(Nr(e)).left+n}function bT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Hl(e,n),o=n.top+t.scrollTop;return{x:r,y:o}}function N6(e){let{elements:t,rect:n,offsetParent:r,strategy:o}=e;const a=o==="fixed",u=Nr(r),c=t?Bl(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=vr(1);const p=vr(0),E=Or(r);if((E||!E&&!a)&&((ro(r)!=="body"||Ia(u))&&(d=Ul(r)),Or(r))){const T=is(r);f=so(r),p.x=T.x+r.clientLeft,p.y=T.y+r.clientTop}const b=u&&!E&&!a?bT(u,d):vr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function O6(e){return Array.from(e.getClientRects())}function I6(e){const t=Nr(e),n=Ul(e),r=e.ownerDocument.body,o=Dn(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=Dn(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Hl(e);const c=-n.scrollTop;return fr(r).direction==="rtl"&&(u+=Dn(t.clientWidth,r.clientWidth)-o),{width:o,height:a,x:u,y:c}}const _T=25;function P6(e,t){const n=Mn(e),r=Nr(e),o=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(o){a=o.width,u=o.height;const p=Ah();(!p||p&&t==="fixed")&&(c=o.offsetLeft,d=o.offsetTop)}const f=Hl(r);if(f<=0){const p=r.ownerDocument,E=p.body,b=getComputedStyle(E),T=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-E.clientWidth-T);_<=_T&&(a-=_)}else f<=_T&&(a+=f);return{width:a,height:u,x:c,y:d}}const R6=new Set(["absolute","fixed"]);function L6(e,t){const n=is(e,!0,t==="fixed"),r=n.top+e.clientTop,o=n.left+e.clientLeft,a=Or(e)?so(e):vr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=o*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function xT(e,t,n){let r;if(t==="viewport")r=P6(e,n);else if(t==="document")r=I6(Nr(e));else if(dr(t))r=L6(t,n);else{const o=TT(e);r={x:t.x-o.x,y:t.y-o.y,width:t.width,height:t.height}}return Ml(r)}function ST(e,t){const n=yi(e);return n===t||!dr(n)||io(n)?!1:fr(n).position==="fixed"||ST(n,t)}function D6(e,t){const n=t.get(e);if(n)return n;let r=Pa(e,[],!1).filter(c=>dr(c)&&ro(c)!=="body"),o=null;const a=fr(e).position==="fixed";let u=a?yi(e):e;for(;dr(u)&&!io(u);){const c=fr(u),d=Ch(u);!d&&c.position==="fixed"&&(o=null),(a?!d&&!o:!d&&c.position==="static"&&!!o&&R6.has(o.position)||Ia(u)&&!d&&ST(e,u))?r=r.filter(p=>p!==u):o=c,u=yi(u)}return t.set(e,r),r}function M6(e){let{element:t,boundary:n,rootBoundary:r,strategy:o}=e;const u=[...n==="clippingAncestors"?Bl(t)?[]:D6(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const E=xT(t,p,o);return f.top=Dn(E.top,f.top),f.right=Ei(E.right,f.right),f.bottom=Ei(E.bottom,f.bottom),f.left=Dn(E.left,f.left),f},xT(t,c,o));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function F6(e){const{width:t,height:n}=yT(e);return{width:t,height:n}}function B6(e,t,n){const r=Or(t),o=Nr(t),a=n==="fixed",u=is(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=vr(0);function f(){d.x=Hl(o)}if(r||!r&&!a)if((ro(t)!=="body"||Ia(o))&&(c=Ul(t)),r){const T=is(t,!0,a,t);d.x=T.x+t.clientLeft,d.y=T.y+t.clientTop}else o&&f();a&&!r&&o&&f();const p=o&&!r&&!a?bT(o,c):vr(0),E=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:E,y:b,width:u.width,height:u.height}}function Nh(e){return fr(e).position==="static"}function wT(e,t){if(!Or(e)||fr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Nr(e)===n&&(n=n.ownerDocument.body),n}function CT(e,t){const n=Mn(e);if(Bl(e))return n;if(!Or(e)){let o=yi(e);for(;o&&!io(o);){if(dr(o)&&!Nh(o))return o;o=yi(o)}return n}let r=wT(e,t);for(;r&&b6(r)&&Nh(r);)r=wT(r,t);return r&&io(r)&&Nh(r)&&!Ch(r)?n:r||C6(e)||n}const U6=function(e){return rt(this,null,function*(){const t=this.getOffsetParent||CT,n=this.getDimensions,r=yield n(e.floating);return{reference:B6(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function H6(e){return fr(e).direction==="rtl"}const z6={convertOffsetParentRelativeRectToViewportRelativeRect:N6,getDocumentElement:Nr,getClippingRect:M6,getOffsetParent:CT,getElementRects:U6,getClientRects:O6,getDimensions:F6,getScale:so,isElement:dr,isRTL:H6};function AT(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function j6(e,t){let n=null,r;const o=Nr(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:E,width:b,height:T}=f;if(c||t(),!b||!T)return;const _=Ll(E),x=Ll(o.clientWidth-(p+b)),C=Ll(o.clientHeight-(E+T)),v=Ll(p),L={rootMargin:-_+"px "+-x+"px "+-C+"px "+-v+"px",threshold:Dn(0,Ei(1,d))||1};let Y=!0;function X(B){const te=B[0].intersectionRatio;if(te!==d){if(!Y)return u();te?u(!1,te):r=setTimeout(()=>{u(!1,1e-7)},1e3)}te===1&&!AT(f,e.getBoundingClientRect())&&u(),Y=!1}try{n=new IntersectionObserver(X,be(H({},L),{root:o.ownerDocument}))}catch(B){n=new IntersectionObserver(X,L)}n.observe(e)}return u(!0),a}function $6(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:o=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=kh(e),p=o||a?[...f?Pa(f):[],...Pa(t)]:[];p.forEach(v=>{o&&v.addEventListener("scroll",n,{passive:!0}),a&&v.addEventListener("resize",n)});const E=f&&c?j6(f,n):null;let b=-1,T=null;u&&(T=new ResizeObserver(v=>{let[U]=v;U&&U.target===f&&T&&(T.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var L;(L=T)==null||L.observe(t)})),n()}),f&&!d&&T.observe(f),T.observe(t));let _,x=d?is(e):null;d&&C();function C(){const v=is(e);x&&!AT(x,v)&&n(),x=v,_=requestAnimationFrame(C)}return n(),()=>{var v;p.forEach(U=>{o&&U.removeEventListener("scroll",n),a&&U.removeEventListener("resize",n)}),E==null||E(),(v=T)==null||v.disconnect(),T=null,d&&cancelAnimationFrame(_)}}const V6=p6,q6=m6,Y6=d6,W6=E6,G6=f6,K6=c6,Q6=g6,X6=(e,t,n)=>{const r=new Map,o=H({platform:z6},n),a=be(H({},o.platform),{_c:r});return l6(e,t,be(H({},o),{platform:a}))};function vT(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 be(H({},o),{toJSON:()=>o})}function J6(e){if(!e)return vT();const{x:t,y:n,width:r,height:o}=e;return vT(t,n,r,o)}function Z6(e,t){return{contextElement:Yt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?J6(r):n.getBoundingClientRect()}}}var Ra=e=>({variable:e,reference:`var(${e})`}),Kr={arrowSize:Ra("--arrow-size"),arrowSizeHalf:Ra("--arrow-size-half"),arrowBg:Ra("--arrow-background"),transformOrigin:Ra("--transform-origin"),arrowOffset:Ra("--arrow-offset")},eD=e=>e==="top"||e==="bottom"?"y":"x";function tD(e,t){return{name:"transformOrigin",fn(n){var ye,M,ae,he,ue;const{elements:r,middlewareData:o,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=eD(d),p=((ye=o.arrow)==null?void 0:ye.x)||0,E=((M=o.arrow)==null?void 0:M.y)||0,b=(t==null?void 0:t.clientWidth)||0,T=(t==null?void 0:t.clientHeight)||0,_=p+b/2,x=E+T/2,C=Math.abs(((ae=o.shift)==null?void 0:ae.y)||0),v=u.reference.height/2,U=T/2,L=(ue=(he=e.offset)==null?void 0:he.mainAxis)!=null?ue:e.gutter,Y=typeof L=="number"?L+U:L!=null?L:U,X=C>Y,B={top:`${_}px calc(100% + ${Y}px)`,bottom:`${_}px ${-Y}px`,left:`calc(100% + ${Y}px) ${x}px`,right:`${-Y}px ${x}px`}[d],te=`${_}px ${u.reference.y+v-c}px`,ge=!!e.overlap&&f==="y"&&X;return r.floating.style.setProperty(Kr.transformOrigin.variable,ge?te:B),{data:{transformOrigin:ge?te:B}}}}}var nD={name:"rects",fn({rects:e}){return{data:e}}},rD=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% + ${Kr.arrowOffset.reference})`}),{}}}};function iD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var sD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function kT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Oh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function oD(e,t,n){const r=e||t.createElement("div");return K6({element:r,padding:n.arrowPadding})}function aD(e,t){var n;if(!NR((n=t.offset)!=null?n:t.gutter))return V6(({placement:r})=>{var p,E,b,T;const o=((e==null?void 0:e.clientHeight)||0)/2,a=(E=(p=t.offset)==null?void 0:p.mainAxis)!=null?E:t.gutter,u=typeof a=="number"?a+o:a!=null?a:o,{hasAlign:c}=iD(r),d=c?void 0:t.shift,f=(T=(b=t.offset)==null?void 0:b.crossAxis)!=null?T:d;return th({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function uD(e){if(!e.flip)return;const t=Oh(e.boundary);return Y6(be(H({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function lD(e){if(!e.slide&&!e.overlap)return;const t=Oh(e.boundary);return q6(be(H({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:Q6()}))}function cD(e){return W6({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:o}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);o=Math.floor(o),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${o}px`),a.style.setProperty("--available-height",`${r}px`)}})}function dD(e){var t;if(e.hideWhenDetached)return G6({strategy:"referenceHidden",boundary:(t=Oh(e.boundary))!=null?t:"clippingAncestors"})}function fD(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function hD(e,t,n={}){const r=Z6(e,n.getAnchorRect);if(!t||!r)return;const o=Object.assign({},sD,n),a=t.querySelector("[data-part=arrow]"),u=[aD(a,o),uD(o),lD(o),oD(a,t.ownerDocument,o),rD(a),tD({gutter:o.gutter,offset:o.offset,overlap:o.overlap},a),cD(o),dD(o),nD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=o,E=()=>rt(null,null,function*(){var Y;if(!r||!t)return;const x=yield X6(r,t,{placement:c,middleware:u,strategy:d});f==null||f(x),p==null||p({placed:!0});const C=Qs(t),v=kT(C,x.x),U=kT(C,x.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${U}px`),o.hideWhenDetached&&(((Y=x.middlewareData.hide)==null?void 0:Y.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const L=t.firstElementChild;if(L){const X=Al(L);t.style.setProperty("--z-index",X.zIndex)}}),b=()=>rt(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:E,floatingElement:t}),p==null||p({placed:!0})):yield E()}),T=fD(o.listeners),_=o.listeners?$6(r,t,b,T):BR;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function NT(e,t,n={}){const c=n,{defer:r}=c,o=en(c,["defer"]),a=r?wn:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(hD(d,f,o))})),()=>{u.forEach(d=>d==null?void 0:d())}}var pD={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function mD(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:o="absolute"}=e;return{arrow:{position:"absolute",width:Kr.arrowSize.reference,height:Kr.arrowSize.reference,[Kr.arrowSizeHalf.variable]:`calc(${Kr.arrowSize.reference} / 2)`,[Kr.arrowOffset.variable]:`calc(${Kr.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?pD[t.split("-")[0]]:void 0,background:Kr.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 oo=new WeakMap,zl=new WeakMap,jl={},Ih=0,OT=e=>e&&(e.host||OT(e.parentNode)),gD=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=OT(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),ED=new Set(["script","output","status","next-route-announcer"]),yD=e=>ED.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),TD=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:o,followControlledElements:a=!0}=t,u=gD(n,Array.isArray(e)?e:[e]);jl[r]||(jl[r]=new WeakMap);const c=jl[r],d=[],f=new Set,p=new Set(u),E=T=>{!T||f.has(T)||(f.add(T),E(T.parentNode))};u.forEach(T=>{E(T),a&&Yt(T)&&Uy(T,_=>{E(_)})});const b=T=>{!T||p.has(T)||Array.prototype.forEach.call(T.children,_=>{if(f.has(_))b(_);else try{if(yD(_))return;const C=_.getAttribute(o)==="true",v=(oo.get(_)||0)+1,U=(c.get(_)||0)+1;oo.set(_,v),c.set(_,U),d.push(_),v===1&&C&&zl.set(_,!0),U===1&&_.setAttribute(r,""),C||_.setAttribute(o,"true")}catch(x){console.error("[zag-js > ariaHidden] cannot operate on ",_,x)}})};return b(n),f.clear(),Ih++,()=>{d.forEach(T=>{const _=oo.get(T)-1,x=c.get(T)-1;oo.set(T,_),c.set(T,x),_||(zl.has(T)||T.removeAttribute(o),zl.delete(T)),x||T.removeAttribute(r)}),Ih--,Ih||(oo=new WeakMap,oo=new WeakMap,zl=new WeakMap,jl={})}},bD=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,_D=(e,t=bD(e),n="data-aria-hidden",r=!0)=>{if(t)return TD(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},xD=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function IT(e,t={}){const{defer:n=!0}=t,r=n?xD:a=>a(),o=[];return o.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&o.push(_D(u))})),()=>{o.forEach(a=>a==null?void 0:a())}}function SD(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 wD(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 PT="pointerdown.outside",RT="focus.outside";function CD(e){for(const t of e)if(Yt(t)&&Yr(t))return!0;return!1}var LT=e=>"clientY"in e;function AD(e,t){if(!LT(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 vD(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function DT(e,t){if(!t||!LT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,o=t.scrollWidth>t.clientWidth,a=o&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(o?16:0)},c={x:e.clientX,y:e.clientY};return vD(u,c)?r||a:!1}function kD(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:o,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Ar(e),f=Qs(e),p=SD(f),E=wD(f);function b(L,Y){if(!Yt(Y)||!Y.isConnected||Cl(e,Y)||AD(e,L)||c&&By(e,Y))return!1;const X=d.querySelector(`[aria-controls="${e.id}"]`);if(X){const te=ch(X);if(DT(L,te))return!1}const B=ch(e);return DT(L,B)?!1:!(n!=null&&n(Y))}const T=new Set,_=ns(e==null?void 0:e.getRootNode());function x(L){function Y(X){var ye,M;const B=u&&!Hy()?wn:ae=>ae(),te=X!=null?X:L,ge=(M=(ye=te==null?void 0:te.composedPath)==null?void 0:ye.call(te))!=null?M:[te==null?void 0:te.target];B(()=>{const ae=_?ge[0]:qr(L);if(!(!e||!b(L,ae))){if(o||a){const he=eh(o,a);e.addEventListener(PT,he,{once:!0})}MT(e,PT,{bubbles:!1,cancelable:!0,detail:{originalEvent:te,contextmenu:gL(te),focusable:CD(ge),target:ae}})}})}L.pointerType==="touch"?(T.forEach(X=>X()),T.add(lr(d,"click",Y,{once:!0})),T.add(E.addEventListener("click",Y,{once:!0})),T.add(p.addEventListener("click",Y,{once:!0}))):Y()}const C=new Set,v=setTimeout(()=>{C.add(lr(d,"pointerdown",x,!0)),C.add(E.addEventListener("pointerdown",x,!0)),C.add(p.addEventListener("pointerdown",x,!0))},0);function U(L){(u?wn:X=>X())(()=>{var te,ge;const X=(ge=(te=L==null?void 0:L.composedPath)==null?void 0:te.call(L))!=null?ge:[L==null?void 0:L.target],B=_?X[0]:qr(L);if(!(!e||!b(L,B))){if(r||a){const ye=eh(r,a);e.addEventListener(RT,ye,{once:!0})}MT(e,RT,{bubbles:!1,cancelable:!0,detail:{originalEvent:L,contextmenu:!1,focusable:Yr(B),target:B}})}})}return Hy()||(C.add(lr(d,"focusin",U,!0)),C.add(E.addEventListener("focusin",U,!0)),C.add(p.addEventListener("focusin",U,!0))),()=>{clearTimeout(v),T.forEach(L=>L()),C.forEach(L=>L())}}function ND(e,t){const{defer:n}=t,r=n?wn:a=>a(),o=[];return o.push(r(()=>{const a=typeof e=="function"?e():e;o.push(kD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}function MT(e,t,n){const r=e.ownerDocument.defaultView||window,o=new r.CustomEvent(t,n);return e.dispatchEvent(o)}function OD(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return lr(Ar(e),"keydown",n,{capture:!0})}var FT="layer:request-dismiss",Gn={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=>Cl(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Cl(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=>Gn.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];PD(e,FT,o=>{var a;(a=r.requestDismiss)==null||a.call(r,o),o.defaultPrevented||r==null||r.dismiss()}),ID(e,FT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function ID(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 PD(e,t,n){e.addEventListener(t,n,{once:!0})}var BT;function UT(){Gn.layers.forEach(({node:e})=>{e.style.pointerEvents=Gn.isBelowPointerBlockingLayer(e)?"none":"auto"})}function RD(e){e.style.pointerEvents=""}function LD(e,t){const n=Ar(e),r=[];return Gn.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(BT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(o=>{const[a,u]=PL(()=>{const c=o();return Yt(c)?c:null},{timeout:1e3});a.then(c=>r.push(kl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{Gn.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=BT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(o=>o()))}}function DD(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){nh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:o,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:o};Gn.add(f),UT();function p(x){var v,U;const C=qr(x.detail.originalEvent);Gn.isBelowPointerBlockingLayer(e)||Gn.isInBranch(C)||((v=t.onPointerDownOutside)==null||v.call(t,x),(U=t.onInteractOutside)==null||U.call(t,x),!x.defaultPrevented&&(c&&console.log("onPointerDownOutside:",x.detail.originalEvent),r==null||r()))}function E(x){var v,U;const C=qr(x.detail.originalEvent);Gn.isInBranch(C)||((v=t.onFocusOutside)==null||v.call(t,x),(U=t.onInteractOutside)==null||U.call(t,x),!x.defaultPrevented&&(c&&console.log("onFocusOutside:",x.detail.originalEvent),r==null||r()))}function b(x){var C;Gn.isTopMost(e)&&((C=t.onEscapeKeyDown)==null||C.call(t,x),!x.defaultPrevented&&r&&(x.preventDefault(),r()))}function T(x){var L;if(!e)return!1;const C=typeof u=="function"?u():u,v=Array.isArray(C)?C:[C],U=(L=t.persistentElements)==null?void 0:L.map(Y=>Y()).filter(Yt);return U&&v.push(...U),v.some(Y=>Cl(Y,x))||Gn.isInNestedLayer(e,x)}const _=[a?LD(e,t.persistentElements):void 0,OD(e,b),ND(e,{exclude:T,onFocusOutside:E,onPointerDownOutside:p,defer:t.defer})];return()=>{Gn.remove(e),UT(),RD(e),_.forEach(x=>x==null?void 0:x())}}function HT(e,t){const{defer:n}=t,r=n?wn:a=>a(),o=[];return o.push(r(()=>{const a=Ks(e)?e():e;o.push(DD(a,t))})),()=>{o.forEach(a=>a==null?void 0:a())}}var MD=Object.defineProperty,FD=(e,t,n)=>t in e?MD(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xt=(e,t,n)=>FD(e,typeof t!="symbol"?t+"":t,n),zT={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()}},BD=[],UD=class{constructor(e,t){xt(this,"trapStack"),xt(this,"config"),xt(this,"doc"),xt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),xt(this,"portalContainers",new Set),xt(this,"listenerCleanups",[]),xt(this,"handleFocus",r=>{const o=qr(r),a=this.findContainerIndex(o,r)>=0;if(a||wl(o))a&&(this.state.mostRecentlyFocusedNode=o);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ka(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(E=>E===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>ka(f)>0))||(c=!1);else c=!1;c&&(u=this.findNextNavNode({target:this.state.mostRecentlyFocusedNode,isBackward:this.config.isKeyBackward(this.state.recentNavEvent)})),u?this.tryFocus(u):this.tryFocus(this.state.mostRecentlyFocusedNode||this.getInitialFocusNode())}this.state.recentNavEvent=void 0}),xt(this,"handlePointerDown",r=>{const o=qr(r);if(!(this.findContainerIndex(o,r)>=0)){if(Da(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Da(this.config.allowOutsideClick,r)||r.preventDefault()}}),xt(this,"handleClick",r=>{const o=qr(r);this.findContainerIndex(o,r)>=0||Da(this.config.clickOutsideDeactivates,r)||Da(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),xt(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;La(r)&&r.preventDefault(),this.tryFocus(a)}}),xt(this,"handleEscapeKey",r=>{HD(r)&&Da(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),xt(this,"_mutationObserver"),xt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(o=>{o.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),o.some(c=>c.type==="attributes"&&(c.attributeName==="aria-controls"||c.attributeName==="aria-expanded")?!0:c.type==="childList"&&c.addedNodes.length>0?Array.from(c.addedNodes).some(d=>{if(d.nodeType!==Node.ELEMENT_NODE)return!1;const f=d;return oL(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?aL(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),xt(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)}))}),xt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Yr(r)){const o=Xs(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}),xt(this,"tryFocus",r=>{if(r!==!1&&r!==Xs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,zD(r)&&r.select()}}),xt(this,"deactivate",r=>{if(!this.state.active)return this;const o=H({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(),zT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(o,"onDeactivate"),u=this.getOption(o,"onPostDeactivate"),c=this.getOption(o,"checkCanReturnFocus"),d=this.getOption(o,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{jT(()=>{if(d){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(p)}u==null||u()})};if(d&&c){const p=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(p).then(f,f),this}return f(),this}),xt(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}),xt(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}),xt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),xt(this,"getReturnFocusNode",r=>{const o=this.getNodeForOption("setReturnFocus",{params:[r]});return o||(o===!1?!1:r)}),xt(this,"getOption",(r,o,a)=>r&&r[o]!==void 0?r[o]:this.config[a||o]),xt(this,"getNodeForOption",(r,{hasFallback:o=!1,params:a=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...a)),u===!0&&(u=void 0),!u){if(u===void 0||u===!1)return u;throw new Error(`\`${r}\` was specified but was not a node, or did not return a node`)}let c=u;if(typeof u=="string"){try{c=this.doc.querySelector(u)}catch(d){throw new Error(`\`${r}\` appears to be an invalid selector; error="${d.message}"`)}if(!c&&!o)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),xt(this,"findNextNavNode",r=>{const{event:o,isBackward:a=!1}=r,u=r.target||qr(o);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,o),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Yr(u)&&!rs(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const E=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[E];c=ka(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else La(o)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:E})=>u===E);if(p<0&&((f==null?void 0:f.container)===u||Yr(u)&&!rs(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const E=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[E];c=ka(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else La(o)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||BD;const n=H({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return La(r)&&!r.shiftKey},isKeyBackward(r){return La(r)&&r.shiftKey}},t);this.doc=n.document||Ar(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=>{rL(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?By(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=va(e,{getShadowRoot:this.config.getShadowRoot}),n=qy(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],o=t[t.length-1],a=r,u=o;let c=!1;for(let f=0;f<t.length;f++)if(ka(t[f])>0){c=!0;break}function d(f,p=!0){const E=t.indexOf(f);if(E>=0)return t[E+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let T=b+1;T<n.length;T++)if(rs(n[T]))return n[T]}else for(let T=b-1;T>=0;T--)if(rs(n[T]))return n[T]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:o,firstDomTabbableNode:a,lastDomTabbableNode:u,nextTabbableNode:d}}),this.state.tabbableGroups=this.state.containerGroups.filter(e=>e.tabbableNodes.length>0),this.state.tabbableGroups.length<=0&&!this.getNodeForOption("fallbackFocus"))throw new Error("Your focus-trap must have at least one container with at least one tabbable node in it at all times");if(this.state.containerGroups.find(e=>e.posTabIndexesFound)&&this.state.containerGroups.length>1)throw new Error("At least one node with a positive tabindex was found in one of your focus-trap's multiple containers. Positive tabindexes are only supported in single-container focus-traps.")}addListeners(){if(this.state.active)return zT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?jT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(lr(this.doc,"focusin",this.handleFocus,!0),lr(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),lr(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),lr(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),lr(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=Xs(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)}},La=e=>e.key==="Tab",Da=(e,...t)=>typeof e=="function"?e(...t):e,HD=e=>!e.isComposing&&e.key==="Escape",jT=e=>setTimeout(e,0),zD=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function $T(e,t={}){let n;const r=wn(()=>{const o=typeof e=="function"?e():e;if(o){n=new UD(o,be(H({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:o},t),{document:Ar(o)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Ph="data-scroll-lock";function jD(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function VT(e){const t=Al(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function qT(e){var T;const t=e!=null?e:document,n=(T=t.defaultView)!=null?T:window,{documentElement:r,body:o}=t;if(o.hasAttribute(Ph))return;const u=VT(r)||VT(o),c=n.innerWidth-r.clientWidth;o.setAttribute(Ph,"");const d=()=>OL(r,"--scrollbar-width",`${c}px`),f=jD(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),kl(o,_)},E=()=>{var X,B;const{scrollX:_,scrollY:x,visualViewport:C}=n,v=(X=C==null?void 0:C.offsetLeft)!=null?X:0,U=(B=C==null?void 0:C.offsetTop)!=null?B:0,L={position:"fixed",overflow:"hidden",top:`${-(x-Math.floor(U))}px`,left:`${-(_-Math.floor(v))}px`,right:"0"};!u&&c>0&&(L[f]=`${c}px`);const Y=kl(o,L);return()=>{Y==null||Y(),n.scrollTo({left:_,top:x,behavior:"instant"})}},b=[d(),zy()?E():p()];return()=>{b.forEach(_=>_==null?void 0:_()),o.removeAttribute(Ph)}}var $D=eo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),Ir=$D.build(),YT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},WT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Rh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},GT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},VD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Lh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Dh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},qD=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},KT=e=>e.getById(YT(e)),ao=e=>e.getById(WT(e)),uo=e=>e.getById(Rh(e)),QT=e=>e.getById(GT(e)),YD=e=>e.getById(Lh(e)),WD=e=>e.getById(Dh(e));function GD(e,t){const{state:n,context:r,send:o,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),E=r.get("renderedElements"),b=mD(be(H({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(T){n.matches("open")!==T&&o({type:T?"OPEN":"CLOSE"})},reposition(T={}){o({type:"POSITIONING.SET",options:T})},getArrowProps(){return t.element(be(H({id:VD(c)},Ir.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(be(H({},Ir.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(be(H({},Ir.anchor.attrs),{dir:u("dir"),id:YT(c)}))},getTriggerProps(){return t.button(be(H({},Ir.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:WT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Rh(c),onPointerDown(T){mL(T)&&hL()&&T.currentTarget.focus()},onClick(T){T.defaultPrevented||o({type:"TOGGLE"})},onBlur(T){o({type:"TRIGGER_BLUR",target:T.relatedTarget})}}))},getIndicatorProps(){return t.element(be(H({},Ir.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(H({id:GT(c)},Ir.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(be(H({},Ir.content.attrs),{dir:u("dir"),id:Rh(c),tabIndex:-1,role:"dialog","aria-modal":$R(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":jR(d),"aria-labelledby":E.title?Lh(c):void 0,"aria-describedby":E.description?Dh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(be(H({},Ir.title.attrs),{id:Lh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(be(H({},Ir.description.attrs),{id:Dh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(be(H({},Ir.closeTrigger.attrs),{dir:u("dir"),id:qD(c),type:"button","aria-label":"close",onClick(T){T.defaultPrevented||(T.stopPropagation(),o({type:"CLOSE"}))}}))}}}var KD={props({props:e}){return be(H({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:H({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=KT(n))!=null?a:ao(n);return NT(r,()=>QT(n),be(H({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>uo(n);let o=!0;return HT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ao(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:NL(()=>uo(t),{triggerElement:ao(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?IT(()=>[uo(t),ao(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return qT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?$T(()=>uo(t),{initialFocus:()=>Yy({root:uo(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=KT(n))!=null?u:ao(n);NT(o,()=>QT(n),be(H(H({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){wn(()=>{Object.assign(e.get("renderedElements"),{title:!!YD(t),description:!!WD(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||wn(()=>{const n=Yy({root:uo(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||wn(()=>{const a=ao(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})}}}};mh()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[RB,Mh]=Zs({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[LB,XT]=Zs({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),QD=e=>{const t=$.useId(),{getRootNode:n}=Mh(),{dir:r}=XT(),o=H({id:t,dir:r,getRootNode:n},e),a=gh(KD,o);return GD(a,nT)},XD=e=>{const[t,u]=aT(e),c=u,{children:n}=c,r=en(c,["children"]),o=QD(r),a=Th(cr({present:o.open},t));return k.jsx(YL,{value:o,children:k.jsx(rT,{value:a,children:n})})},JT=$.forwardRef((e,t)=>{const n=yh(),r=Na(),o=cr(be(H({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return k.jsx(gi.button,be(H({},o),{ref:t}))});JT.displayName="PopoverTrigger";function JD(e){return sn({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 ZD(e){return sn({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 e4(e){return sn({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M3 9.5a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3m5 0a1.5 1.5 0 1 1 0-3 1.5 1.5 0 0 1 0 3"},child:[]}]})(e)}function ZT(e){return sn({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 t4=({onClearChat:e,componentType:t})=>{const{resetConversation:n}=$r(),r=()=>{n(),e()};return k.jsxs("button",{className:Z(`${G}-overflow-menu-button`,"clear-chat-button",t),onClick:r,children:[k.jsx(ZT,{}),"Clear chat"]})},n4=({className:e,componentType:t,children:n})=>{const[r,o]=$.useState(!1),{globalClassName:a}=nn(),u=()=>{o(!1)},c=d=>{o(d.open)};return k.jsxs(XD,{open:r,onOpenChange:c,positioning:{placement:"bottom-end"},children:[k.jsx(JT,{"aria-label":`Overflow menu for ${t}`,className:Z(`${G}-overflow-menu-button-trigger`,a,e,t),children:k.jsx(e4,{})}),k.jsx(sT,{children:k.jsxs(iT,{className:Z(`${G}-overflow-menu-list`,a,t),children:[n,k.jsx(t4,{componentType:t,onClearChat:u})]})})]})};function r4(e){return sn({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 eb(e){return sn({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 tb=r=>{var o=r,{onClearChat:e,componentType:t}=o,n=en(o,["onClearChat","componentType"]);const{globalClassName:a}=nn(),{resetConversation:u}=$r(),c=()=>{u(),e==null||e()};return k.jsx(Ls,H({icon:k.jsx(ZT,{size:"0.875rem"}),ariaLabel:"Clear Chat",className:Z(a,`${G}-clear-chat-icon-button`,t),onClick:c},n))},nb=({componentType:e,isIcon:t})=>{const{globalClassName:n}=nn(),r=()=>{Qd("modal")};return t?k.jsx(Ls,{className:Z(n,`${G}-toggle-modal-button`,e),ariaLabel:"Toggle Modal",onClick:r,icon:k.jsx(eb,{})}):k.jsxs("button",{className:Z(n,`${G}-overflow-menu-button`,`${G}-toggle-modal-button`,e),onClick:r,children:[k.jsx(eb,{}),"Show modal"]})},i4=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:o}=nn();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),E=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return k.jsxs("div",{className:Z(r,`${G}-product-tile`,{embedded:!e,standalone:e}),children:[k.jsx("img",{className:Z(r,`${G}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),k.jsxs("div",{className:Z(r,`${G}-product-tile-details`,{embedded:!e,standalone:e}),children:[k.jsxs("div",{className:Z(r,`${G}-product-tile-content`),children:[u&&k.jsx("p",{className:`${G}-product-tile-brand`,children:u}),E?k.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:Z(r,`${G}-product-tile-pdp`),href:`${E}`,target:o?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",k.jsx("span",{className:Z(r,`${G}-product-tile-pdp-arrow`),children:"→"})]}):k.jsx("p",{className:Z(r,`${G}-product-tile-name`),title:a,children:a})]}),k.jsx("div",{className:Z(r,`${G}-product-tile-footer`),children:k.jsx("p",{className:Z(r,`${G}-product-tile-price`),children:c})})]})]})},s4=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=nn(),o=t;return n?k.jsxs("div",{className:Z(r,`${G}-display-products widget-message`),children:[k.jsx("p",{children:o.message}),o.products&&o.products.length>0&&k.jsx("div",{className:Z(r,`${G}-product-list`,{embedded:!e,standalone:e}),children:o.products.map(a=>{const u=n.getPid(a);return k.jsx(i4,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},o4=({globalClassName:e,message:t,isWidgetStandalone:n})=>k.jsx("div",{className:Z(e,`${G}-error-message`,{standalone:n,embedded:!n}),children:k.jsxs("p",{className:Z(e,`${G}-error-message-text`,{standalone:n,embedded:!n}),children:[k.jsx(zA,{})," ",t.message||"An error occurred while processing your request."]})});function a4(e){return sn({attr:{viewBox:"0 0 20 20",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{d:"M10.75 6.75a.75.75 0 0 0-1.5 0v2.5h-2.5a.75.75 0 0 0 0 1.5h2.5v2.5a.75.75 0 0 0 1.5 0v-2.5h2.5a.75.75 0 0 0 0-1.5h-2.5v-2.5Z"},child:[]}]})(e)}const u4=({globalClassName:e,messageId:t,messageEventSourceId:n,isLoading:r,suggestions:o,handleSuggestionClick:a})=>k.jsx("div",{className:Z(e,`${G}-suggestion-container standalone`),children:o.map(u=>k.jsxs(Zd,{disabled:r,className:Z(e,`${G}-suggestion-button standalone`),onClick:()=>a(u,n||t),children:[k.jsx(a4,{size:"1.5rem",style:{minHeight:"1.5rem",minWidth:"1.5rem"}})," ",u.displayText]},u.displayText))}),l4=({globalClassName:e,message:t,isWidgetStandalone:n,handleSuggestionClick:r})=>{const{isLoading:o}=$r();return k.jsxs("div",{className:Z(e,`${G}-follow-up`),children:[k.jsx("p",{className:Z(e,`${G}-text`),children:t.message}),n&&k.jsx(u4,{globalClassName:e,isLoading:o,messageId:t.id,messageEventSourceId:t.eventSourceId,suggestions:t.suggestions,handleSuggestionClick:r}),!n&&k.jsx("div",{className:Z(e,`${G}-suggestion-container embedded`),children:t.suggestions.map(a=>k.jsx("button",{disabled:o,className:Z(e,`${G}-suggestion-button embedded`),onClick:()=>r(a,t.eventSourceId||t.id),children:a.displayText},a.displayText))})]})};function rb(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 c4(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function d4(e,t,n){const o=ul((n||{}).ignore||[]),a=f4(t);let u=-1;for(;++u<a.length;)rE(e,"text",c);function c(f,p){let E=-1,b;for(;++E<p.length;){const T=p[E],_=b?b.children:void 0;if(o(T,_?_.indexOf(T):void 0,b))return;b=T}if(b)return d(f,p)}function d(f,p){const E=p[p.length-1],b=a[u][0],T=a[u][1];let _=0;const C=E.children.indexOf(f);let v=!1,U=[];b.lastIndex=0;let L=b.exec(f.value);for(;L;){const Y=L.index,X={index:L.index,input:L.input,stack:[...p,f]};let B=T(...L,X);if(typeof B=="string"&&(B=B.length>0?{type:"text",value:B}:void 0),B===!1?b.lastIndex=Y+1:(_!==Y&&U.push({type:"text",value:f.value.slice(_,Y)}),Array.isArray(B)?U.push(...B):B&&U.push(B),_=Y+L[0].length,v=!0),!b.global)break;L=b.exec(f.value)}return v?(_<f.value.length&&U.push({type:"text",value:f.value.slice(_)}),E.children.splice(C,1,...U)):U=[f],C+U.length}}function f4(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([h4(o[0]),p4(o[1])])}return t}function h4(e){return typeof e=="string"?new RegExp(c4(e),"g"):e}function p4(e){return typeof e=="function"?e:function(){return e}}const Fh="phrasing",Bh=["autolink","link","image","label"];function m4(){return{transforms:[x4],enter:{literalAutolink:E4,literalAutolinkEmail:Uh,literalAutolinkHttp:Uh,literalAutolinkWww:Uh},exit:{literalAutolink:_4,literalAutolinkEmail:b4,literalAutolinkHttp:y4,literalAutolinkWww:T4}}}function g4(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:Fh,notInConstruct:Bh},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:Fh,notInConstruct:Bh},{character:":",before:"[ps]",after:"\\/",inConstruct:Fh,notInConstruct:Bh}]}}function E4(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function Uh(e){this.config.enter.autolinkProtocol.call(this,e)}function y4(e){this.config.exit.autolinkProtocol.call(this,e)}function T4(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 b4(e){this.config.exit.autolinkEmail.call(this,e)}function _4(e){this.exit(e)}function x4(e){d4(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,S4],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),w4]],{ignore:["link","linkReference"]})}function S4(e,t,n,r,o){let a="";if(!ib(o)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!C4(n)))return!1;const u=A4(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:a+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function w4(e,t,n,r){return!ib(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function C4(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 A4(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=rb(e,"(");let a=rb(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 ib(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Ki(n)||tl(n))&&(!t||n!==47)}sb.peek=D4;function v4(){this.buffer()}function k4(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function N4(){this.buffer()}function O4(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function I4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function P4(e){this.exit(e)}function R4(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=ar(this.sliceSerialize(e)).toLowerCase(),n.label=t}function L4(e){this.exit(e)}function D4(){return"["}function sb(e,t,n,r){const o=n.createTracker(r);let a=o.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=o.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=o.move("]"),a}function M4(){return{enter:{gfmFootnoteCallString:v4,gfmFootnoteCall:k4,gfmFootnoteDefinitionLabelString:N4,gfmFootnoteDefinition:O4},exit:{gfmFootnoteCallString:I4,gfmFootnoteCall:P4,gfmFootnoteDefinitionLabelString:R4,gfmFootnoteDefinition:L4}}}function F4(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:sb},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,o,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
29
+ `:" ")+a.indentLines(a.containerFlow(r,c.current()),t?ob:B4))),f(),d}}function B4(e,t,n){return t===0?e:ob(e,t,n)}function ob(e,t,n){return(n?"":" ")+e}const U4=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];ab.peek=V4;function H4(){return{canContainEols:["delete"],enter:{strikethrough:j4},exit:{strikethrough:$4}}}function z4(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:U4}],handlers:{delete:ab}}}function j4(e){this.enter({type:"delete",children:[]},e)}function $4(e){this.exit(e)}function ab(e,t,n,r){const o=n.createTracker(r),a=n.enter("strikethrough");let u=o.move("~~");return u+=n.containerPhrasing(e,be(H({},o.current()),{before:u,after:"~"})),u+=o.move("~~"),a(),u}function V4(){return"~"}function q4(e){return e.length}function Y4(e,t){const n=t||{},r=(n.align||[]).concat(),o=n.stringLength||q4,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const x=[],C=[];let v=-1;for(e[p].length>f&&(f=e[p].length);++v<e[p].length;){const U=W4(e[p][v]);if(n.alignDelimiters!==!1){const L=o(U);C[v]=L,(d[v]===void 0||L>d[v])&&(d[v]=L)}x.push(U)}u[p]=x,c[p]=C}let E=-1;if(typeof r=="object"&&"length"in r)for(;++E<f;)a[E]=ub(r[E]);else{const x=ub(r);for(;++E<f;)a[E]=x}E=-1;const b=[],T=[];for(;++E<f;){const x=a[E];let C="",v="";x===99?(C=":",v=":"):x===108?C=":":x===114&&(v=":");let U=n.alignDelimiters===!1?1:Math.max(1,d[E]-C.length-v.length);const L=C+"-".repeat(U)+v;n.alignDelimiters!==!1&&(U=C.length+U+v.length,U>d[E]&&(d[E]=U),T[E]=U),b[E]=L}u.splice(1,0,b),c.splice(1,0,T),p=-1;const _=[];for(;++p<u.length;){const x=u[p],C=c[p];E=-1;const v=[];for(;++E<f;){const U=x[E]||"";let L="",Y="";if(n.alignDelimiters!==!1){const X=d[E]-(C[E]||0),B=a[E];B===114?L=" ".repeat(X):B===99?X%2?(L=" ".repeat(X/2+.5),Y=" ".repeat(X/2-.5)):(L=" ".repeat(X/2),Y=L):Y=" ".repeat(X)}n.delimiterStart!==!1&&!E&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&U==="")&&(n.delimiterStart!==!1||E)&&v.push(" "),n.alignDelimiters!==!1&&v.push(L),v.push(U),n.alignDelimiters!==!1&&v.push(Y),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||E!==f-1)&&v.push("|")}_.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return _.join(`
30
+ `)}function W4(e){return e==null?"":String(e)}function ub(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 G4(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()),K4);return o(),u}function K4(e,t,n){return">"+(n?"":" ")+e}function Q4(e,t){return lb(e,t.inConstruct,!0)&&!lb(e,t.notInConstruct,!1)}function lb(e,t,n){if(typeof t=="string"&&(t=[t]),!t||t.length===0)return n;let r=-1;for(;++r<t.length;)if(e.includes(t[r]))return!0;return!1}function cb(e,t,n,r){let o=-1;for(;++o<n.unsafe.length;)if(n.unsafe[o].character===`
31
31
  `&&Q4(n.stack,n.unsafe[o]))return/[ \t]/.test(r.before)?"":" ";return`\\
32
- `}function X4(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 J4(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 Z4(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 e5(e,t,n,r){const o=Z4(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(J4(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(a,t5);return E(),b}const c=n.createTracker(r),d=o.repeat(Math.max(X4(a,o)+1,3)),h=n.enter("codeFenced");let m=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);m+=c.move(n.safe(e.lang,U({before:m,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);m+=c.move(" "),m+=c.move(n.safe(e.meta,U({before:m,after:`
33
- `,encode:["`"]},c.current()))),E()}return m+=c.move(`
34
- `),a&&(m+=c.move(a+`
35
- `)),m+=c.move(d),h(),m}function t5(e,t,n){return(n?"":" ")+e}function Bh(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 n5(e,t,n,r){const o=Bh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("[");return h+=d.move(n.safe(n.associationId(e),U({before:h,after:"]"},d.current()))),h+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,U({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,U({before:h,after:e.title?" ":`
36
- `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,U({before:h,after:o},d.current()))),h+=d.move(o),c()),u(),h}function r5(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 Ra(e){return"&#x"+e.toString(16).toUpperCase()+";"}function zl(e,t,n){const r=Us(e),o=Us(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}}cb.peek=i5;function cb(e,t,n,r){const o=r5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=d.charCodeAt(0),m=zl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(d=Ra(h)+d.slice(1));const E=d.charCodeAt(d.length-1),b=zl(r.after.charCodeAt(0),E,o);b.inside&&(d=d.slice(0,-1)+Ra(E));const T=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+T}function i5(e,t,n){return n.options.emphasis||"*"}function s5(e,t){let n=!1;return ul(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,_f}),!!((!e.depth||e.depth<3)&&cf(e)&&(t.options.setext||n))}function o5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(s5(e,n)){const m=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,be(U({},a.current()),{before:`
32
+ `}function X4(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 J4(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 Z4(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 e5(e,t,n,r){const o=Z4(n),a=e.value||"",u=o==="`"?"GraveAccent":"Tilde";if(J4(e,n)){const E=n.enter("codeIndented"),b=n.indentLines(a,t5);return E(),b}const c=n.createTracker(r),d=o.repeat(Math.max(X4(a,o)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const E=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,H({before:p,after:" ",encode:["`"]},c.current()))),E()}if(e.lang&&e.meta){const E=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,H({before:p,after:`
33
+ `,encode:["`"]},c.current()))),E()}return p+=c.move(`
34
+ `),a&&(p+=c.move(a+`
35
+ `)),p+=c.move(d),f(),p}function t5(e,t,n){return(n?"":" ")+e}function Hh(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 n5(e,t,n,r){const o=Hh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("definition");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("[");return f+=d.move(n.safe(n.associationId(e),H({before:f,after:"]"},d.current()))),f+=d.move("]: "),c(),!e.url||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":`
36
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),u(),f}function r5(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 Ma(e){return"&#x"+e.toString(16).toUpperCase()+";"}function $l(e,t,n){const r=Hs(e),o=Hs(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}}db.peek=i5;function db(e,t,n,r){const o=r5(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ma(f)+d.slice(1));const E=d.charCodeAt(d.length-1),b=$l(r.after.charCodeAt(0),E,o);b.inside&&(d=d.slice(0,-1)+Ma(E));const T=u.move(o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+T}function i5(e,t,n){return n.options.emphasis||"*"}function s5(e,t){let n=!1;return cl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Sf}),!!((!e.depth||e.depth<3)&&ff(e)&&(t.options.setext||n))}function o5(e,t,n,r){const o=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(s5(e,n)){const p=n.enter("headingSetext"),E=n.enter("phrasing"),b=n.containerPhrasing(e,be(H({},a.current()),{before:`
37
37
  `,after:`
38
- `}));return E(),m(),b+`
38
+ `}));return E(),p(),b+`
39
39
  `+(o===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
40
- `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let h=n.containerPhrasing(e,U({before:"# ",after:`
41
- `},a.current()));return/^[\t ]/.test(h)&&(h=Ra(h.charCodeAt(0))+h.slice(1)),h=h?u+" "+h:u,n.options.closeAtx&&(h+=" "+u),d(),c(),h}db.peek=a5;function db(e){return e.value||""}function a5(){return"<"}fb.peek=u5;function fb(e,t,n,r){const o=Bh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let h=d.move("![");return h+=d.move(n.safe(e.alt,U({before:h,after:"]"},d.current()))),h+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),h+=d.move("<"),h+=d.move(n.safe(e.url,U({before:h,after:">"},d.current()))),h+=d.move(">")):(c=n.enter("destinationRaw"),h+=d.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),h+=d.move(" "+o),h+=d.move(n.safe(e.title,U({before:h,after:o},d.current()))),h+=d.move(o),c()),h+=d.move(")"),u(),h}function u5(){return"!"}hb.peek=l5;function hb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const h=n.safe(e.alt,U({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:d,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function l5(){return"!"}pb.peek=c5;function pb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let h=d.index;r.charCodeAt(h)===10&&r.charCodeAt(h-1)===13&&h--,r=r.slice(0,h)+" "+r.slice(d.index+1)}}return o+r+o}function c5(){return"`"}function mb(e,t){const n=cf(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))}gb.peek=d5;function gb(e,t,n,r){const o=Bh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(mb(e,n)){const m=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,U({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=m,E}c=n.enter("link"),d=n.enter("label");let h=u.move("[");return h+=u.move(n.containerPhrasing(e,U({before:h,after:"]("},u.current()))),h+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),h+=u.move("<"),h+=u.move(n.safe(e.url,U({before:h,after:">"},u.current()))),h+=u.move(">")):(d=n.enter("destinationRaw"),h+=u.move(n.safe(e.url,U({before:h,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),h+=u.move(" "+o),h+=u.move(n.safe(e.title,U({before:h,after:o},u.current()))),h+=u.move(o),d()),h+=u.move(")"),c(),h}function d5(e,t,n){return mb(e,n)?"<":"["}Eb.peek=f5;function Eb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const h=n.containerPhrasing(e,U({before:d,after:"]"},c.current()));d+=c.move(h+"]["),u();const m=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),U({before:d,after:"]"},c.current()));return u(),n.stack=m,a(),o==="full"||!h||h!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function f5(){return"["}function Uh(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 h5(e){const t=Uh(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 p5(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 yb(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 m5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?p5(n):Uh(n);const c=e.ordered?u==="."?")":".":h5(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const m=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&m&&(!m.children||!m.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),yb(n)===u&&m){let E=-1;for(;++E<e.children.length;){const b=e.children[E];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const h=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),h}function g5(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 E5(e,t,n,r){const o=g5(n);let a=n.bulletCurrent||Uh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),h=n.indentLines(n.containerFlow(e,c.current()),m);return d(),h;function m(E,b,T){return b?(T?"":" ".repeat(u))+E:(T?a:a+" ".repeat(u-a.length))+E}}function y5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const T5=ol(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function b5(e,t,n,r){return(e.children.some(function(u){return T5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}Tb.peek=x5;function Tb(e,t,n,r){const o=_5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,U({after:o,before:c},u.current())));const h=d.charCodeAt(0),m=zl(r.before.charCodeAt(r.before.length-1),h,o);m.inside&&(d=Ra(h)+d.slice(1));const E=d.charCodeAt(d.length-1),b=zl(r.after.charCodeAt(0),E,o);b.inside&&(d=d.slice(0,-1)+Ra(E));const T=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:m.outside},c+d+T}function x5(e,t,n){return n.options.strong||"*"}function S5(e,t,n,r){return n.safe(e.value,r)}function w5(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 A5(e,t,n){const r=(yb(n)+(n.options.ruleSpaces?" ":"")).repeat(w5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const bb={blockquote:G4,break:lb,code:e5,definition:n5,emphasis:cb,hardBreak:lb,heading:o5,html:db,image:fb,imageReference:hb,inlineCode:pb,link:gb,linkReference:Eb,list:m5,listItem:E5,paragraph:y5,root:b5,strong:Tb,text:S5,thematicBreak:A5};function C5(){return{enter:{table:v5,tableData:_b,tableHeader:_b,tableRow:N5},exit:{codeText:O5,table:k5,tableData:Hh,tableHeader:Hh,tableRow:Hh}}}function v5(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 k5(e){this.exit(e),this.data.inTable=void 0}function N5(e){this.enter({type:"tableRow",children:[]},e)}function Hh(e){this.exit(e)}function _b(e){this.enter({type:"tableCell",children:[]},e)}function O5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,I5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function I5(e,t){return t==="|"?t:e}function P5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
- `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(T,_,S,w){return h(m(T,S,w),T.align)}function c(T,_,S,w){const N=E(T,S,w),B=h([N]);return B.slice(0,B.indexOf(`
43
- `))}function d(T,_,S,w){const N=S.enter("tableCell"),B=S.enter("phrasing"),D=S.containerPhrasing(T,be(U({},w),{before:a,after:a}));return B(),N(),D}function h(T,_){return Y4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function m(T,_,S){const w=T.children;let N=-1;const B=[],D=_.enter("table");for(;++N<w.length;)B[N]=E(w[N],_,S);return D(),B}function E(T,_,S){const w=T.children;let N=-1;const B=[],D=_.enter("tableRow");for(;++N<w.length;)B[N]=d(w[N],T,_,S);return D(),B}function b(T,_,S){let w=bb.inlineCode(T,_,S);return S.stack.includes("tableCell")&&(w=w.replace(/\|/g,"\\$&")),w}}function R5(){return{exit:{taskListCheckValueChecked:xb,taskListCheckValueUnchecked:xb,paragraph:D5}}}function L5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:M5}}}function xb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function D5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function M5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=bb.listItem(e,t,n,U(U({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,h)),d;function h(m){return m+u}}function F5(){return[m4(),M4(),H4(),C5(),R5()]}function B5(e){return{extensions:[g4(),F4(e),z4(),P5(e),L5()]}}const U5={tokenize:q5,partial:!0},Sb={tokenize:Y5,partial:!0},wb={tokenize:W5,partial:!0},Ab={tokenize:G5,partial:!0},H5={tokenize:K5,partial:!0},Cb={name:"wwwAutolink",tokenize:$5,previous:kb},vb={name:"protocolAutolink",tokenize:V5,previous:Nb},Qr={name:"emailAutolink",tokenize:j5,previous:Ob},Pr={};function z5(){return{text:Pr}}let ss=48;for(;ss<123;)Pr[ss]=Qr,ss++,ss===58?ss=65:ss===91&&(ss=97);Pr[43]=Qr,Pr[45]=Qr,Pr[46]=Qr,Pr[95]=Qr,Pr[72]=[Qr,vb],Pr[104]=[Qr,vb],Pr[87]=[Qr,Cb],Pr[119]=[Qr,Cb];function j5(e,t,n){const r=this;let o,a;return u;function u(E){return!zh(E)||!Ob.call(r,r.previous)||jh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return zh(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(H5,m,h)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):m(E)}function h(E){return e.consume(E),o=!0,d}function m(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function $5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!kb.call(r,r.previous)||jh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(U5,e.attempt(Sb,e.attempt(wb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function V5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&Nb.call(r,r.previous)&&!jh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?h:(a=!0,d)):n(E)}function h(E){return E===null||Ju(E)||ct(E)||Ki(E)||Zu(E)?n(E):e.attempt(Sb,e.attempt(wb,m),n)(E)}function m(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function q5(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 Y5(e,t,n){let r,o,a;return u;function u(h){return h===46||h===95?e.check(Ab,d,c)(h):h===null||ct(h)||Ki(h)||h!==45&&Zu(h)?d(h):(a=!0,e.consume(h),u)}function c(h){return h===95?r=!0:(o=r,r=void 0),e.consume(h),u}function d(h){return o||r||!a?n(h):t(h)}}function W5(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(Ab,t,a)(u):u===null||ct(u)||Ki(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function G5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||ct(c)||Ki(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||ct(c)||Ki(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function K5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function kb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ct(e)}function Nb(e){return!pn(e)}function Ob(e){return!(e===47||zh(e))}function zh(e){return e===43||e===45||e===46||e===95||an(e)}function jh(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 Q5={tokenize:i8,partial:!0};function X5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:t8,continuation:{tokenize:n8},exit:r8}},text:{91:{name:"gfmFootnoteCall",tokenize:e8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:J5,resolveTo:Z5}}}}function J5(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const h=ar(r.sliceSerialize({start:u.end,end:r.now()}));return h.codePointAt(0)!==94||!a.includes(h.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function Z5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function e8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",h)}function h(E){if(a>999||E===93&&!u||E===null||E===91||ct(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return ct(E)||(u=!0),a++,e.consume(E),E===92?m:h}function m(E){return E===91||E===92||E===93?(e.consume(E),a++,h):h(E)}}function t8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),h}function h(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",m):n(_)}function m(_){if(u>999||_===93&&!c||_===null||_===91||ct(_))return n(_);if(_===93){e.exit("chunkString");const S=e.exit("gfmFootnoteDefinitionLabelString");return a=ar(r.sliceSerialize(S)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ct(_)||(c=!0),u++,e.consume(_),_===92?E:m}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,m):m(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Je(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function n8(e,t,n){return e.check(ia,t,e.attempt(Q5,t,n))}function r8(e){e.exit("gfmFootnoteDefinition")}function i8(e,t,n){const r=this;return Je(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 s8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let h=d;for(;h--;)if(u[h][0]==="exit"&&u[h][1].type==="strikethroughSequenceTemporary"&&u[h][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[h][1].end.offset-u[h][1].start.offset){u[d][1].type="strikethroughSequence",u[h][1].type="strikethroughSequence";const m={type:"strikethrough",start:Object.assign({},u[h][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[h][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",m,c],["enter",u[h][1],c],["exit",u[h][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Rn(b,b.length,0,el(T,u.slice(h+1,d),c)),Rn(b,b.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",m,c]]),Rn(u,h-1,d-h+3,b),d=h+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const h=this.previous,m=this.events;let E=0;return b;function b(_){return h===126&&m[m.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const S=Us(h);if(_===126)return E>1?d(_):(u.consume(_),E++,T);if(E<2&&!n)return d(_);const w=u.exit("strikethroughSequenceTemporary"),N=Us(_);return w._open=!N||N===2&&!!S,w._close=!S||S===2&&!!N,c(_)}}}class o8{constructor(){this.map=[]}add(t,n,r){a8(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 a8(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 u8(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 l8(){return{flow:{null:{name:"table",tokenize:c8,resolveAll:d8}}}}function c8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(H){let ne=r.events.length-1;for(;ne>-1;){const ae=r.events[ne][1].type;if(ae==="lineEnding"||ae==="linePrefix")ne--;else break}const fe=ne>-1?r.events[ne][1].type:null,de=fe==="tableHead"||fe==="tableRow"?F:d;return de===F&&r.parser.lazy[r.now().line]?n(H):de(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),h(H)}function h(H){return H===124||(u=!0,a+=1),m(H)}function m(H){return H===null?n(H):Le(H)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),T):n(H):Ke(H)?Je(e,m,"whitespace")(H):(a+=1,u&&(u=!1,o+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,m):(e.enter("data"),E(H)))}function E(H){return H===null||H===124||ct(H)?(e.exit("data"),m(H)):(e.consume(H),H===92?b:E)}function b(H){return H===92||H===124?(e.consume(H),E):E(H)}function T(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),u=!1,Ke(H)?Je(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):_(H))}function _(H){return H===45||H===58?w(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),S):W(H)}function S(H){return Ke(H)?Je(e,w,"whitespace")(H):w(H)}function w(H){return H===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),N):H===45?(a+=1,N(H)):H===null||Le(H)?Y(H):W(H)}function N(H){return H===45?(e.enter("tableDelimiterFiller"),B(H)):W(H)}function B(H){return H===45?(e.consume(H),B):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),D):(e.exit("tableDelimiterFiller"),D(H))}function D(H){return Ke(H)?Je(e,Y,"whitespace")(H):Y(H)}function Y(H){return H===124?_(H):H===null||Le(H)?!u||o!==a?W(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):W(H)}function W(H){return n(H)}function F(H){return e.enter("tableRow"),te(H)}function te(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),te):H===null||Le(H)?(e.exit("tableRow"),t(H)):Ke(H)?Je(e,te,"whitespace")(H):(e.enter("data"),ge(H))}function ge(H){return H===null||H===124||ct(H)?(e.exit("data"),te(H)):(e.consume(H),H===92?Te:ge)}function Te(H){return H===92||H===124?(e.consume(H),ge):ge(H)}}function d8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,h,m,E;const b=new o8;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(Ib(b,t,d,h,m),m=void 0,d=0),h={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",h,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,m={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",m,t]])),o=_.type==="tableDelimiterRow"?2:m?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=jl(b,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=jl(b,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],E=jl(b,t,a,o,n,E)):u[1]!==0&&(E=jl(b,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Ib(b,t,d,h,m),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=u8(t.events,n))}return e}function jl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},uo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=uo(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 h=uo(t.events,n[2]),m=uo(t.events,n[3]),E={type:c,start:Object.assign({},h),end:Object.assign({},m)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,S=n[3]-n[2]-1;e.add(_,S,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},uo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Ib(e,t,n,r,o){const a=[],u=uo(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 uo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const f8={name:"tasklistCheck",tokenize:p8};function h8(){return{text:{91:f8}}}function p8(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 ct(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Ke(d)?e.check({tokenize:m8},t,n)(d):n(d)}}function m8(e,t,n){return Je(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function g8(e){return S1([z5(),X5(),s8(e),l8(),h8()])}const E8={};function y8(e){const t=this,n=e||E8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(g8(n)),a.push(F5()),u.push(B5(n))}const $l=()=>v.jsx("span",{className:`${X}-blinking-cursor`,children:v.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:v.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Pb=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=$r(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return v.jsx(hE,{remarkPlugins:[y8],rehypePlugins:[Ay],components:{h1:({children:u})=>v.jsx("h1",{className:Z(e,`${X}-header h1`),children:u}),h2:({children:u})=>v.jsx("h2",{className:Z(e,`${X}-header h2`),children:u}),h3:({children:u})=>v.jsx("h3",{className:Z(e,`${X}-header h3`),children:u}),ul:({children:u})=>v.jsx("ul",{className:Z(e,`${X}-ul`),children:u}),ol:({children:u})=>v.jsx("ol",{className:Z(e,`${X}-ol`),children:u}),li:({children:u})=>v.jsx("li",{className:Z(e,`${X}-li`),children:u}),a:({href:u,children:c})=>v.jsx(Py,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>v.jsx("table",{className:Z(e,`${X}-table`),children:u}),thead:({children:u})=>v.jsx("thead",{className:Z(e,`${X}-thead`),children:u}),tbody:({children:u})=>v.jsx("tbody",{className:Z(e,`${X}-tbody`),children:u}),tr:({children:u})=>v.jsx("tr",{className:Z(e,`${X}-tr`),children:u}),th:({children:u})=>v.jsx("th",{className:Z(e,`${X}-th`),children:u}),td:({children:u})=>v.jsx("td",{className:Z(e,`${X}-td`),children:u}),span:({className:u,children:c})=>u===`${X}-blinking-cursor`?v.jsx($l,{}):v.jsx("span",{children:c})},children:n.message+(a?`<span className='${X}-blinking-cursor'></span>`:"")})},T8=({globalClassName:e,message:t})=>{const[n,r]=$.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return v.jsxs("div",{children:[v.jsxs("div",{className:Z(e,`${X}-progress-message`,"standalone"),children:[v.jsx("span",{className:Z(e,`${X}-message-icon`,"progress-icon","standalone"),children:v.jsx(Vg,{})}),v.jsx("p",{className:Z(e,`${X}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&v.jsxs(v.Fragment,{children:[v.jsx(Xd,{className:Z(e,`${X}-thought-context-button`),onClick:c,children:n?v.jsxs(v.Fragment,{children:["Hide ",v.jsx(jC,{})]}):v.jsxs(v.Fragment,{children:["Context ",v.jsx($C,{})]})}),n&&v.jsx("div",{className:Z(e,`${X}-thought-container`),children:a&&v.jsx("p",{className:Z(e,`${X}-progress-thought`),children:t.thought})})]})]})},b8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?v.jsx(T8,{globalClassName:e,message:t}):v.jsxs("div",{className:Z(e,`${X}-progress-message`,"embedded"),title:t.message,children:[v.jsx("span",{className:Z(e,`${X}-message-icon`,"progress-icon","embedded"),children:v.jsx(Vg,{})}),v.jsx("i",{className:Z(e,`${X}-progress-text`,"embedded"),children:t.message})]}),_8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return v.jsxs("div",{className:Z(e,`${X}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&v.jsxs("div",{className:Z(e,`${X}-refined-event-query`,{embedded:!n,standalone:n}),children:[v.jsx("span",{className:Z(e,`${X}-message-icon`,`${X}-refined-event-icon`,{embedded:!n,standalone:n}),children:v.jsx(Xo,{role:"img"})}),v.jsx("p",{className:Z(e,`${X}-text`,"bold"),children:r})]}),v.jsx(Pb,{message:t})]})},Rb=e=>{var d,h;const{configModule:t}=nn(),n=((d=e.request)==null?void 0:d.searchParams)||((h=e.request)==null?void 0:h.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([m])=>!r.includes(m))),u=Object.keys(a),c=Object.values(a).reduce((m,E)=>m+E.length,0);return{facetFiltersList:u,filterCount:c}},Vl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>v.jsx("span",{className:Z(t,`${X}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),Lb=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var h;const d=((h=o[c])==null?void 0:h.join(", "))||"";return v.jsxs("div",{className:Z(e,`${X}-facets`),children:[v.jsx("p",{className:Z(e,`${X}-facet-category`),children:c}),v.jsx("p",{className:Z(e,`${X}-facet-values`),children:d})]},c)})},La=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>v.jsx("span",{className:Z(e,`${X}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),x8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var h,m;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=Rb(t),c=new Date(o).toLocaleString(),d=(h=r==null?void 0:r.attachments)==null?void 0:h.image;return n?v.jsxs("div",{className:Z(e,`${X}-user-message standalone`),children:[v.jsxs("div",{className:Z(e,`${X}-user-message-row standalone`),children:[d?v.jsx("img",{className:Z(e,`${X}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):v.jsx("span",{className:Z(e,`${X}-message-icon user-message-icon standalone`),children:v.jsx(qg,{})}),v.jsx("p",{className:Z(e,`${X}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&v.jsx(Vl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),v.jsx(Lb,{globalClassName:e,facetFiltersList:a,message:t}),v.jsx(La,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):v.jsxs("div",{className:Z(e,`${X}-user-message embedded`),children:[v.jsxs("div",{className:Z(e,`${X}-user-message-row embedded`),children:[d?v.jsx("img",{className:Z(e,`${X}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):v.jsx("span",{className:Z(e,`${X}-message-icon user-message-icon embedded`),children:v.jsx(qg,{})}),v.jsx("p",{className:Z(e,`${X}-user-message-text embedded`),children:(m=t.request)==null?void 0:m.userPrompt}),a.length>0&&v.jsx(Vl,{isWidgetStandalone:!1,filterCount:u})]}),v.jsx(La,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},S8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>v.jsxs("div",{className:Z(e,`${X}-user-search standalone`),children:[v.jsxs("div",{children:[v.jsxs("div",{className:Z(e,`${X}-user-search-query standalone`),children:[d?v.jsx("img",{className:Z(e,`${X}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):v.jsx("span",{className:Z(e,`${X}-message-icon user-search-icon standalone`),children:v.jsx(Xo,{})}),v.jsx("p",{className:Z(e,`${X}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&v.jsx(Vl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),v.jsx(Lb,{globalClassName:e,facetFiltersList:u,message:a})]}),v.jsx(La,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var T;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=Rb(t),d=new Date(a).toLocaleString(),h=(T=r==null?void 0:r.attachments)==null?void 0:T.image,{actionLabel:m,query:E,queryLabel:b}=$.useMemo(()=>{var _;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:(r==null?void 0:r.label)||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:(r==null?void 0:r.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return E?n?v.jsx(S8,{globalClassName:e,timestamp:d,message:t,actionLabel:m,query:E,queryLabel:b,facetFiltersList:u,filterCount:c}):v.jsxs("div",{className:Z(e,`${X}-user-search embedded`),children:[v.jsxs("div",{className:Z(e,`${X}-user-search-query embedded`),children:[h?v.jsx("img",{className:Z(e,`${X}-user-search-image embedded`),src:h,alt:b||E,loading:"lazy"}):v.jsx("span",{className:Z(e,`${X}-message-icon user-search-icon embedded`),children:v.jsx(Xo,{})}),v.jsx("p",{children:b||E}),u.length>0&&v.jsx(Vl,{isWidgetStandalone:!1,filterCount:c})]}),v.jsx(La,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},Db=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"copilot_search":case"copilot_browse":case"product_view":return c?v.jsx(x8,{globalClassName:t,isWidgetStandalone:o,message:e}):v.jsx(w8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return v.jsx(_8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return v.jsx(l4,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return v.jsx(Pb,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return v.jsx(o4,{message:e,isWidgetStandalone:o});case"display_products":return v.jsx(s4,{message:e,isWidgetStandalone:o});case"progress":return v.jsx(b8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return v.jsxs(v.Fragment,{children:[v.jsx("p",{className:Z(t,`${X}-reset-message`),children:"This conversation has been reset."}),v.jsx("p",{className:Z(t,`${X}-start-search-message`),children:r})]});default:return null}},$h=({isWidgetStandalone:e,messages:t,handleSuggestionClick:n})=>{const{globalClassName:r,openLinksInNewTab:o,resetConversationMessage:a}=nn();return t.map(u=>{if(u.messages&&u.type==="group"){let c=new Date(u.createdAt).toLocaleString();const d=u.messages[u.messages.length-1];return d&&(c=new Date(d.createdAt).toLocaleString()),v.jsxs("div",{className:Z(r,`${X}-message-group`,e?"standalone":"embedded"),children:[u.messages.length>0&&u.messages.map(h=>v.jsx("div",{className:`${X}-message-group-child`,children:v.jsx(Db,{id:h.id,openLinksInNewTab:o,globalClassName:r,isWidgetStandalone:e,message:h,resetConversationMessage:a,handleSuggestionClick:n})},h.id)),v.jsx(La,{globalClassName:r,timestamp:c,isWidgetStandalone:e})]},`group-${u.eventSourceId}`)}else if(u.type==="individual"&&u.message)return v.jsx("div",{className:Z(r,`${X}-message`,e?"standalone":"embedded",{error:u.message.name.includes("error")}),children:v.jsx(Db,{id:u.message.id,openLinksInNewTab:o,globalClassName:r,isWidgetStandalone:e,message:u.message,resetConversationMessage:a,handleSuggestionClick:n})},u.message.id);return null})},Mb=()=>{const{globalClassName:e,themeVariables:t}=nn(),{status:n}=Ps(),{copilot:r,messages:o,groupedMessages:a,isLoading:u,handleUserInput:c,handleSuggestion:d}=$r(),{isOpen:h}=n||{},m=$.useRef(null);return $.useEffect(()=>{m.current&&m.current.scrollIntoView({behavior:"smooth",block:"end"})},[o]),r?!h||a.length===0?null:v.jsxs("div",{className:Z(e,`${X}-container`,`${X}-embedded-chat`),style:t,children:[v.jsxs("div",{className:Z(e,`${X}-message-container`,"embedded"),children:[v.jsx($h,{isWidgetStandalone:!1,messages:a,handleSuggestionClick:d}),u&&v.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:v.jsx($l,{})}),v.jsx("div",{ref:m})]}),v.jsx(Xf,{componentType:"chat",className:"embedded-chat",isLoading:u,onSubmit:c}),v.jsx("div",{className:Z(`${X}-embedded-chat-menu`),children:v.jsx(n4,{componentType:"chat",children:v.jsx(tb,{componentType:"chat"})})})]}):v.jsx("div",{children:"Loading Copilot..."})},[A8,C8]=Js({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),v8=e=>sT()(e,["lazyMount","unmountOnExit"]),[k8,Da]=Js({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Fb=$.forwardRef((e,t)=>{const n=Da(),r=C8(),o=Eh(be(U({},r),{present:n.open})),a=cr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:v.jsx(gi.div,be(U({},a),{ref:Nl(o.ref,t)}))});Fb.displayName="DialogBackdrop";const Vh=$.forwardRef((e,t)=>{const n=Da(),r=Ca(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:v.jsx(gi.div,be(U({},o),{ref:Nl(r.ref,t)}))});Vh.displayName="DialogContent";const qh=$.forwardRef((e,t)=>{const n=Da(),r=cr(n.getDescriptionProps(),e);return v.jsx(gi.div,be(U({},r),{ref:t}))});qh.displayName="DialogDescription";const Yh=$.forwardRef((e,t)=>{const n=Da(),r=cr(n.getPositionerProps(),e);return Ca().unmounted?null:v.jsx(gi.div,be(U({},r),{ref:t}))});Yh.displayName="DialogPositioner";var N8=Zs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),os=N8.build(),Bb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Ub=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Wh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Gh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},ql=e=>e.getById(Wh(e)),O8=e=>e.getById(Bb(e)),I8=e=>e.getById(Ub(e)),P8=e=>e.getById(Hb(e)),R8=e=>e.getById(Gh(e)),L8=e=>e.getById(Kh(e)),D8=e=>e.getById(zb(e));function M8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(h){n.matches("open")!==h&&r({type:h?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(be(U({},os.trigger.attrs),{dir:a("dir"),id:Hb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Wh(u),onClick(h){h.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(be(U({},os.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Ub(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(U({},os.positioner.attrs),{dir:a("dir"),id:Bb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const h=o.get("rendered");return t.element(be(U({},os.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Wh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!h.title?void 0:Gh(u),"aria-describedby":h.description?Kh(u):void 0}))},getTitleProps(){return t.element(be(U({},os.title.attrs),{dir:a("dir"),id:Gh(u)}))},getDescriptionProps(){return t.element(be(U({},os.description.attrs),{dir:a("dir"),id:Kh(u)}))},getCloseTriggerProps(){return t.button(be(U({},os.closeTrigger.attrs),{dir:a("dir"),id:zb(u),type:"button",onClick(h){h.defaultPrevented||(h.stopPropagation(),r({type:"CLOSE"}))}}))}}}var F8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>D8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return U({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 UT(()=>ql(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[P8(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 VT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?jT(()=>ql(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")?OT(()=>[ql(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){wn(()=>{e.set("rendered",{title:!!R8(t),description:!!L8(t)})})},syncZIndex({scope:e}){wn(()=>{const t=ql(e);if(!t)return;const n=wl(t);[O8(e),I8(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})}}}};hh()(["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 B8=e=>{const t=$.useId(),{getRootNode:n}=Lh(),{dir:r}=QT(),o=U({id:t,getRootNode:n,dir:r},e),a=ph(F8,o);return M8(a,tT)},jb=e=>{const[t,c]=oT(e),d=c,{children:n}=d,r=en(d,["children"]),[o]=v8(t),a=B8(r),u=Eh(cr({present:a.open},t));return v.jsx(k8,{value:a,children:v.jsx(A8,{value:o,children:v.jsx(nT,{value:u,children:n})})})},Qh=$.forwardRef((e,t)=>{const n=Da(),r=cr(n.getTitleProps(),e);return v.jsx(gi.h2,be(U({},r),{ref:t}))});Qh.displayName="DialogTitle";const $b=e=>{var d;const{children:t,disabled:n}=e,[r,o]=$.useState((d=e.container)==null?void 0:d.current),a=$.useSyncExternalStore(H8,()=>!1,()=>!0),{getRootNode:u}=Lh();if($.useEffect(()=>{o(()=>{var h;return(h=e.container)==null?void 0:h.current})},[e.container]),a||n)return v.jsx(v.Fragment,{children:t});const c=r!=null?r:U8(u);return v.jsx(v.Fragment,{children:$.Children.map(t,h=>vl.createPortal(h,c))})},U8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ns(n)?n:Cr(t).body},H8=()=>()=>{},z8=()=>{const{globalClassName:e}=nn(),{dialogPosition:t}=Ps(),n=t==="bottom-left",r=()=>{lg(n?"bottom-right":"bottom-left")},o=n?ZD:JD,a=n?"Move right":"Move left";return v.jsx(Rs,{className:Z(e,`${X}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:v.jsx(o,{})})},Vb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=nn(),{mode:o,status:a,dialogPosition:u}=Ps(),{copilot:c,messages:d,groupedMessages:h,isLoading:m,handleUserInput:E,handleSuggestion:b}=$r(),T=$.useRef(null),{isOpen:_}=a||{},S=o==="standalone";$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const w=()=>{qu(!1)};return!_||h.length===0?null:c?v.jsx(jb,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:v.jsx($b,{children:v.jsx(Yh,{className:Z(n,`${X}-container`,`${X}-dialog`,u),style:r,children:v.jsxs(Vh,{className:Z(n,`${X}-dialog-content`,{standalone:S,embedded:!S}),children:[v.jsxs("div",{className:Z(n,`${X}-dialog-header`,{standalone:S,embedded:!S}),children:[e&&v.jsx("img",{alt:"",role:"img",className:Z(n,`${X}-dialog-logo`,{standalone:S,embedded:!S}),src:e}),v.jsx(Qh,{className:Z(n,`${X}-dialog-title`,{standalone:S,embedded:!S}),children:t}),v.jsxs("div",{className:Z(n,`${X}-dialog-controls`),children:[v.jsx(tb,{componentType:"dialog",isIcon:!0}),v.jsx(z8,{}),v.jsx(eb,{componentType:"dialog"}),v.jsx(Qd,{className:`dialog ${n}`,onClick:w})]})]}),v.jsxs(qh,{className:Z(n,`${X}-message-container`,{standalone:S,embedded:!S}),children:[v.jsx($h,{isWidgetStandalone:S,messages:h,handleSuggestionClick:b}),m&&v.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:v.jsx($l,{})}),v.jsx("div",{ref:T})]}),v.jsx(Xf,{componentType:"dialog",isLoading:m,onSubmit:E})]})})})}):v.jsx("div",{children:"Loading Copilot..."})},qb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=nn(),{mode:o,status:a,isModalFullscreen:u,previousComponentType:c}=Ps(),{copilot:d,messages:h,groupedMessages:m,isLoading:E,handleUserInput:b,handleSuggestion:T}=$r(),_=$.useRef(null),{isOpen:S}=a||{},w=o==="standalone";$.useEffect(()=>{_.current&&_.current.scrollIntoView({behavior:"smooth",block:"end"})},[h]);const N=({open:W})=>{qu(W)},B=()=>{ug(!u)},D=()=>{Gd(c||"dialog")},Y=()=>{qu(!1)};return!S||m.length===0?null:d?v.jsx(jb,{lazyMount:!0,open:S,onOpenChange:N,children:v.jsx($b,{children:v.jsxs("div",{className:Z(n,`${X}-modal-container`),style:r,children:[v.jsx(Fb,{className:Z(n,`${X}-modal-backdrop`)}),v.jsx(Yh,{className:Z(n,`${X}-container`,`${X}-modal`,{fullscreen:u,standalone:w,embedded:!w}),children:v.jsxs(Vh,{className:Z(n,`${X}-modal-content`,{standalone:w,embedded:!w}),children:[v.jsxs("div",{className:Z(n,`${X}-modal-header`,{standalone:w,embedded:!w}),children:[e&&v.jsx("img",{alt:"",role:"img",className:Z(n,`${X}-modal-logo`,{standalone:w,embedded:!w}),src:e}),v.jsx(Qh,{className:Z(n,`${X}-modal-title`,{standalone:w,embedded:!w}),children:t}),v.jsxs("div",{className:Z(n,`${X}-modal-controls`),children:[v.jsx(Rs,{ariaLabel:"Toggle Fullscreen",className:Z(n,`${X}-modal-fullscreen-button`),icon:u?v.jsx(VC,{}):v.jsx(qC,{}),onClick:B}),v.jsx(Rs,{ariaLabel:"Toggle Dialog",className:Z(n,`${X}-modal-toggle-dialog-button`),onClick:D,icon:v.jsx(r4,{})}),v.jsx(eb,{componentType:"modal"}),v.jsx(Qd,{className:`modal ${n}`,onClick:Y})]})]}),v.jsxs(qh,{className:Z(n,`${X}-message-container`,{standalone:w,embedded:!w}),children:[v.jsx($h,{isWidgetStandalone:w,messages:m,handleSuggestionClick:T}),E&&v.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:v.jsx($l,{})}),v.jsx("div",{ref:_})]}),v.jsx(Xf,{componentType:"modal",isLoading:E,onSubmit:b})]})})]})})}):v.jsx("div",{children:"Loading Copilot..."})},j8=()=>{const e=Ps(),{status:{type:t}}=e||{status:{}};return t==="dialog"?v.jsx(Vb,{}):t==="modal"?v.jsx(qb,{}):v.jsx(Mb,{})},Xh=e=>v.jsx(Bg,be(U({},e),{children:v.jsx(j8,{})}));var Yl={},Yb;function $8(){if(Yb)return Yl;Yb=1;var e=Xy();return Yl.createRoot=e.createRoot,Yl.hydrateRoot=e.hydrateRoot,Yl}var Wb=$8();const V8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=en(o,["elementId","timeout"]);let a;const u=(d,h)=>{var m;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Is(!0,"log","Target element found, rendering Copilot Widget"),h.disconnect(),clearTimeout(a),(m=Wb.createRoot(b))==null||m.render(v.jsx(Xh,U({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Is(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},q8=r=>{var o=r,{timeout:e,elementId:t}=o,n=en(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Is(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Is(!0,"warn","Container element not found for id:",t),Is(!0,"warn","Beginning observation for element"),V8(U({elementId:t,timeout:e},n));return}Wb.createRoot(a).render(v.jsx(Xh,U({},n)))},Y8={search:EC,browse:aC,pdp:{setPdpContext:vg,updatePdpProductId:lC,updatePdpLink:cC},components:{toggleWidgetOpen:qu,toggleModalFullscreen:ug,setWidgetType:Gd,setWidgetDialogPosition:lg},session:dC},W8=()=>Object.freeze({search:Object.freeze(pt.state),browse:Object.freeze(ot.state),pdp:Object.freeze(or.state),isConnected:wt.state.connected,isOpen:wt.isOpen});Ie.CopilotDialog=Vb,Ie.CopilotEmbed=Mb,Ie.CopilotModal=qb,Ie.CopilotWidget=Xh,Ie.WidgetProvider=Bg,Ie.eventHandlers=Y8,Ie.injectCopilotWidget=q8,Ie.state=W8,Ie.useCopilot=$r,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})});
40
+ `))+1))}const u="#".repeat(o),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,H({before:"# ",after:`
41
+ `},a.current()));return/^[\t ]/.test(f)&&(f=Ma(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}fb.peek=a5;function fb(e){return e.value||""}function a5(){return"<"}hb.peek=u5;function hb(e,t,n,r){const o=Hh(n),a=o==='"'?"Quote":"Apostrophe",u=n.enter("image");let c=n.enter("label");const d=n.createTracker(r);let f=d.move("![");return f+=d.move(n.safe(e.alt,H({before:f,after:"]"},d.current()))),f+=d.move("]("),c(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(c=n.enter("destinationLiteral"),f+=d.move("<"),f+=d.move(n.safe(e.url,H({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,H({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+o),f+=d.move(n.safe(e.title,H({before:f,after:o},d.current()))),f+=d.move(o),c()),f+=d.move(")"),u(),f}function u5(){return"!"}pb.peek=l5;function pb(e,t,n,r){const o=e.referenceType,a=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function l5(){return"!"}mb.peek=c5;function mb(e,t,n){let r=e.value||"",o="`",a=-1;for(;new RegExp("(^|[^`])"+o+"([^`]|$)").test(r);)o+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++a<n.unsafe.length;){const u=n.unsafe[a],c=n.compilePattern(u);let d;if(u.atBreak)for(;d=c.exec(r);){let f=d.index;r.charCodeAt(f)===10&&r.charCodeAt(f-1)===13&&f--,r=r.slice(0,f)+" "+r.slice(d.index+1)}}return o+r+o}function c5(){return"`"}function gb(e,t){const n=ff(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))}Eb.peek=d5;function Eb(e,t,n,r){const o=Hh(n),a=o==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(gb(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let E=u.move("<");return E+=u.move(n.containerPhrasing(e,H({before:E,after:">"},u.current()))),E+=u.move(">"),c(),n.stack=p,E}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,H({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,H({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,H({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,H({before:f,after:o},u.current()))),f+=u.move(o),d()),f+=u.move(")"),c(),f}function d5(e,t,n){return gb(e,n)?"<":"["}yb.peek=f5;function yb(e,t,n,r){const o=e.referenceType,a=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,H({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const E=n.safe(n.associationId(e),H({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),o==="full"||!f||f!==E?d+=c.move(E+"]"):o==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function f5(){return"["}function zh(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 h5(e){const t=zh(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 p5(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 Tb(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 m5(e,t,n,r){const o=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?p5(n):zh(n);const c=e.ordered?u==="."?")":".":h5(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),Tb(n)===u&&p){let E=-1;for(;++E<e.children.length;){const b=e.children[E];if(b&&b.type==="listItem"&&b.children&&b.children[0]&&b.children[0].type==="thematicBreak"){d=!0;break}}}}d&&(u=c),n.bulletCurrent=u;const f=n.containerFlow(e,r);return n.bulletLastUsed=u,n.bulletCurrent=a,o(),f}function g5(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 E5(e,t,n,r){const o=g5(n);let a=n.bulletCurrent||zh(n);t&&t.type==="list"&&t.ordered&&(a=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+a);let u=a.length+1;(o==="tab"||o==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(E,b,T){return b?(T?"":" ".repeat(u))+E:(T?a:a+" ".repeat(u-a.length))+E}}function y5(e,t,n,r){const o=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),o(),u}const T5=ul(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function b5(e,t,n,r){return(e.children.some(function(u){return T5(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function _5(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}bb.peek=x5;function bb(e,t,n,r){const o=_5(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(o+o);let d=u.move(n.containerPhrasing(e,H({after:o,before:c},u.current())));const f=d.charCodeAt(0),p=$l(r.before.charCodeAt(r.before.length-1),f,o);p.inside&&(d=Ma(f)+d.slice(1));const E=d.charCodeAt(d.length-1),b=$l(r.after.charCodeAt(0),E,o);b.inside&&(d=d.slice(0,-1)+Ma(E));const T=u.move(o+o);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+T}function x5(e,t,n){return n.options.strong||"*"}function S5(e,t,n,r){return n.safe(e.value,r)}function w5(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 C5(e,t,n){const r=(Tb(n)+(n.options.ruleSpaces?" ":"")).repeat(w5(n));return n.options.ruleSpaces?r.slice(0,-1):r}const _b={blockquote:G4,break:cb,code:e5,definition:n5,emphasis:db,hardBreak:cb,heading:o5,html:fb,image:hb,imageReference:pb,inlineCode:mb,link:Eb,linkReference:yb,list:m5,listItem:E5,paragraph:y5,root:b5,strong:bb,text:S5,thematicBreak:C5};function A5(){return{enter:{table:v5,tableData:xb,tableHeader:xb,tableRow:N5},exit:{codeText:O5,table:k5,tableData:jh,tableHeader:jh,tableRow:jh}}}function v5(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 k5(e){this.exit(e),this.data.inTable=void 0}function N5(e){this.enter({type:"tableRow",children:[]},e)}function jh(e){this.exit(e)}function xb(e){this.enter({type:"tableCell",children:[]},e)}function O5(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,I5));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function I5(e,t){return t==="|"?t:e}function P5(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,o=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
42
+ `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(T,_,x,C){return f(p(T,x,C),T.align)}function c(T,_,x,C){const v=E(T,x,C),U=f([v]);return U.slice(0,U.indexOf(`
43
+ `))}function d(T,_,x,C){const v=x.enter("tableCell"),U=x.enter("phrasing"),L=x.containerPhrasing(T,be(H({},C),{before:a,after:a}));return U(),v(),L}function f(T,_){return Y4(T,{align:_,alignDelimiters:r,padding:n,stringLength:o})}function p(T,_,x){const C=T.children;let v=-1;const U=[],L=_.enter("table");for(;++v<C.length;)U[v]=E(C[v],_,x);return L(),U}function E(T,_,x){const C=T.children;let v=-1;const U=[],L=_.enter("tableRow");for(;++v<C.length;)U[v]=d(C[v],T,_,x);return L(),U}function b(T,_,x){let C=_b.inlineCode(T,_,x);return x.stack.includes("tableCell")&&(C=C.replace(/\|/g,"\\$&")),C}}function R5(){return{exit:{taskListCheckValueChecked:Sb,taskListCheckValueUnchecked:Sb,paragraph:D5}}}function L5(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:M5}}}function Sb(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function D5(e){const t=this.stack[this.stack.length-2];if(t&&t.type==="listItem"&&typeof t.checked=="boolean"){const n=this.stack[this.stack.length-1];n.type;const r=n.children[0];if(r&&r.type==="text"){const o=t.children;let a=-1,u;for(;++a<o.length;){const c=o[a];if(c.type==="paragraph"){u=c;break}}u===n&&(r.value=r.value.slice(1),r.value.length===0?n.children.shift():n.position&&r.position&&typeof r.position.start.offset=="number"&&(r.position.start.column++,r.position.start.offset++,n.position.start=Object.assign({},r.position.start)))}}this.exit(e)}function M5(e,t,n,r){const o=e.children[0],a=typeof e.checked=="boolean"&&o&&o.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=_b.listItem(e,t,n,H(H({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function F5(){return[m4(),M4(),H4(),A5(),R5()]}function B5(e){return{extensions:[g4(),F4(e),z4(),P5(e),L5()]}}const U5={tokenize:q5,partial:!0},wb={tokenize:Y5,partial:!0},Cb={tokenize:W5,partial:!0},Ab={tokenize:G5,partial:!0},H5={tokenize:K5,partial:!0},vb={name:"wwwAutolink",tokenize:$5,previous:Nb},kb={name:"protocolAutolink",tokenize:V5,previous:Ob},Qr={name:"emailAutolink",tokenize:j5,previous:Ib},Pr={};function z5(){return{text:Pr}}let ss=48;for(;ss<123;)Pr[ss]=Qr,ss++,ss===58?ss=65:ss===91&&(ss=97);Pr[43]=Qr,Pr[45]=Qr,Pr[46]=Qr,Pr[95]=Qr,Pr[72]=[Qr,kb],Pr[104]=[Qr,kb],Pr[87]=[Qr,vb],Pr[119]=[Qr,vb];function j5(e,t,n){const r=this;let o,a;return u;function u(E){return!$h(E)||!Ib.call(r,r.previous)||Vh(r.events)?n(E):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(E))}function c(E){return $h(E)?(e.consume(E),c):E===64?(e.consume(E),d):n(E)}function d(E){return E===46?e.check(H5,p,f)(E):E===45||E===95||an(E)?(a=!0,e.consume(E),d):p(E)}function f(E){return e.consume(E),o=!0,d}function p(E){return a&&o&&pn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(E)):n(E)}}function $5(e,t,n){const r=this;return o;function o(u){return u!==87&&u!==119||!Nb.call(r,r.previous)||Vh(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(U5,e.attempt(wb,e.attempt(Cb,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function V5(e,t,n){const r=this;let o="",a=!1;return u;function u(E){return(E===72||E===104)&&Ob.call(r,r.previous)&&!Vh(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),o+=String.fromCodePoint(E),e.consume(E),c):n(E)}function c(E){if(pn(E)&&o.length<5)return o+=String.fromCodePoint(E),e.consume(E),c;if(E===58){const b=o.toLowerCase();if(b==="http"||b==="https")return e.consume(E),d}return n(E)}function d(E){return E===47?(e.consume(E),a?f:(a=!0,d)):n(E)}function f(E){return E===null||el(E)||dt(E)||Ki(E)||tl(E)?n(E):e.attempt(wb,e.attempt(Cb,p),n)(E)}function p(E){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(E)}}function q5(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 Y5(e,t,n){let r,o,a;return u;function u(f){return f===46||f===95?e.check(Ab,d,c)(f):f===null||dt(f)||Ki(f)||f!==45&&tl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(o=r,r=void 0),e.consume(f),u}function d(f){return o||r||!a?n(f):t(f)}}function W5(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(Ab,t,a)(u):u===null||dt(u)||Ki(u)?t(u):(e.consume(u),o)}function a(u){return u===41&&r++,e.consume(u),o}}function G5(e,t,n){return r;function r(c){return c===33||c===34||c===39||c===41||c===42||c===44||c===46||c===58||c===59||c===63||c===95||c===126?(e.consume(c),r):c===38?(e.consume(c),a):c===93?(e.consume(c),o):c===60||c===null||dt(c)||Ki(c)?t(c):n(c)}function o(c){return c===null||c===40||c===91||dt(c)||Ki(c)?t(c):r(c)}function a(c){return pn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):pn(c)?(e.consume(c),u):n(c)}}function K5(e,t,n){return r;function r(a){return e.consume(a),o}function o(a){return an(a)?n(a):t(a)}}function Nb(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||dt(e)}function Ob(e){return!pn(e)}function Ib(e){return!(e===47||$h(e))}function $h(e){return e===43||e===45||e===46||e===95||an(e)}function Vh(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 Q5={tokenize:i8,partial:!0};function X5(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:t8,continuation:{tokenize:n8},exit:r8}},text:{91:{name:"gfmFootnoteCall",tokenize:e8},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:J5,resolveTo:Z5}}}}function J5(e,t,n){const r=this;let o=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;o--;){const d=r.events[o][1];if(d.type==="labelImage"){u=d;break}if(d.type==="gfmFootnoteCall"||d.type==="labelLink"||d.type==="label"||d.type==="image"||d.type==="link")break}return c;function c(d){if(!u||!u._balanced)return n(d);const f=ar(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 Z5(e,t){let n=e.length;for(;n--;)if(e[n][1].type==="labelImage"&&e[n][0]==="enter"){e[n][1];break}e[n+1][1].type="data",e[n+3][1].type="gfmFootnoteCallLabelMarker";const r={type:"gfmFootnoteCall",start:Object.assign({},e[n+3][1].start),end:Object.assign({},e[e.length-1][1].end)},o={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};o.end.column++,o.end.offset++,o.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},o.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},a.start),end:Object.assign({},a.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",o,t],["exit",o,t],["enter",a,t],["enter",u,t],["exit",u,t],["exit",a,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function e8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(E){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),d}function d(E){return E!==94?n(E):(e.enter("gfmFootnoteCallMarker"),e.consume(E),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(E){if(a>999||E===93&&!u||E===null||E===91||dt(E))return n(E);if(E===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return o.includes(ar(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(E),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(E)}return dt(E)||(u=!0),a++,e.consume(E),E===92?p:f}function p(E){return E===91||E===92||E===93?(e.consume(E),a++,f):f(E)}}function t8(e,t,n){const r=this,o=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a,u=0,c;return d;function d(_){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(_){return _===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",p):n(_)}function p(_){if(u>999||_===93&&!c||_===null||_===91||dt(_))return n(_);if(_===93){e.exit("chunkString");const x=e.exit("gfmFootnoteDefinitionLabelString");return a=ar(r.sliceSerialize(x)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return dt(_)||(c=!0),u++,e.consume(_),_===92?E:p}function E(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),o.includes(a)||o.push(a),Ze(e,T,"gfmFootnoteDefinitionWhitespace")):n(_)}function T(_){return t(_)}}function n8(e,t,n){return e.check(aa,t,e.attempt(Q5,t,n))}function r8(e){e.exit("gfmFootnoteDefinition")}function i8(e,t,n){const r=this;return Ze(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 s8(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:o};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function o(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},E={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",E,c]],T=c.parser.constructs.insideSpan.null;T&&Rn(b,b.length,0,nl(T,u.slice(f+1,d),c)),Rn(b,b.length,0,[["exit",E,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Rn(u,f-1,d-f+3,b),d=f+b.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function a(u,c,d){const f=this.previous,p=this.events;let E=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),T(_))}function T(_){const x=Hs(f);if(_===126)return E>1?d(_):(u.consume(_),E++,T);if(E<2&&!n)return d(_);const C=u.exit("strikethroughSequenceTemporary"),v=Hs(_);return C._open=!v||v===2&&!!x,C._close=!x||x===2&&!!v,c(_)}}}class o8{constructor(){this.map=[]}add(t,n,r){a8(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 a8(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 u8(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 l8(){return{flow:{null:{name:"table",tokenize:c8,resolveAll:d8}}}}function c8(e,t,n){const r=this;let o=0,a=0,u;return c;function c(M){let ae=r.events.length-1;for(;ae>-1;){const de=r.events[ae][1].type;if(de==="lineEnding"||de==="linePrefix")ae--;else break}const he=ae>-1?r.events[ae][1].type:null,ue=he==="tableHead"||he==="tableRow"?B:d;return ue===B&&r.parser.lazy[r.now().line]?n(M):ue(M)}function d(M){return e.enter("tableHead"),e.enter("tableRow"),f(M)}function f(M){return M===124||(u=!0,a+=1),p(M)}function p(M){return M===null?n(M):Le(M)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(M),e.exit("lineEnding"),T):n(M):Qe(M)?Ze(e,p,"whitespace")(M):(a+=1,u&&(u=!1,o+=1),M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),E(M)))}function E(M){return M===null||M===124||dt(M)?(e.exit("data"),p(M)):(e.consume(M),M===92?b:E)}function b(M){return M===92||M===124?(e.consume(M),E):E(M)}function T(M){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(M):(e.enter("tableDelimiterRow"),u=!1,Qe(M)?Ze(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(M):_(M))}function _(M){return M===45||M===58?C(M):M===124?(u=!0,e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),x):X(M)}function x(M){return Qe(M)?Ze(e,C,"whitespace")(M):C(M)}function C(M){return M===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),v):M===45?(a+=1,v(M)):M===null||Le(M)?Y(M):X(M)}function v(M){return M===45?(e.enter("tableDelimiterFiller"),U(M)):X(M)}function U(M){return M===45?(e.consume(M),U):M===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(M),e.exit("tableDelimiterMarker"),L):(e.exit("tableDelimiterFiller"),L(M))}function L(M){return Qe(M)?Ze(e,Y,"whitespace")(M):Y(M)}function Y(M){return M===124?_(M):M===null||Le(M)?!u||o!==a?X(M):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(M)):X(M)}function X(M){return n(M)}function B(M){return e.enter("tableRow"),te(M)}function te(M){return M===124?(e.enter("tableCellDivider"),e.consume(M),e.exit("tableCellDivider"),te):M===null||Le(M)?(e.exit("tableRow"),t(M)):Qe(M)?Ze(e,te,"whitespace")(M):(e.enter("data"),ge(M))}function ge(M){return M===null||M===124||dt(M)?(e.exit("data"),te(M)):(e.consume(M),M===92?ye:ge)}function ye(M){return M===92||M===124?(e.consume(M),ge):ge(M)}}function d8(e,t){let n=-1,r=!0,o=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,E;const b=new o8;for(;++n<e.length;){const T=e[n],_=T[1];T[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(Pb(b,t,d,f,p),p=void 0,d=0),f={type:"table",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",f,t]])):_.type==="tableRow"||_.type==="tableDelimiterRow"?(r=!0,E=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),o=_.type==="tableDelimiterRow"?2:p?3:1):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],E=Vl(b,t,a,o,void 0,E),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],E=Vl(b,t,a,o,void 0,E)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],E=Vl(b,t,a,o,n,E)):u[1]!==0&&(E=Vl(b,t,u,o,n,E)),o=0):o&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&Pb(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const T=t.events[n];T[0]==="enter"&&T[1].type==="table"&&(T[1]._align=u8(t.events,n))}return e}function Vl(e,t,n,r,o,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},lo(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=lo(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=lo(t.events,n[2]),p=lo(t.events,n[3]),E={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",E,t]]),r!==2){const b=t.events[n[2]],T=t.events[n[3]];if(b[1].end=Object.assign({},T[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,x=n[3]-n[2]-1;e.add(_,x,[])}}e.add(n[3]+1,0,[["exit",E,t]])}return o!==void 0&&(a.end=Object.assign({},lo(t.events,o)),e.add(o,0,[["exit",a,t]]),a=void 0),a}function Pb(e,t,n,r,o){const a=[],u=lo(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 lo(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const f8={name:"tasklistCheck",tokenize:p8};function h8(){return{text:{91:f8}}}function p8(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 dt(d)?(e.enter("taskListCheckValueUnchecked"),e.consume(d),e.exit("taskListCheckValueUnchecked"),u):d===88||d===120?(e.enter("taskListCheckValueChecked"),e.consume(d),e.exit("taskListCheckValueChecked"),u):n(d)}function u(d){return d===93?(e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),e.exit("taskListCheck"),c):n(d)}function c(d){return Le(d)?t(d):Qe(d)?e.check({tokenize:m8},t,n)(d):n(d)}}function m8(e,t,n){return Ze(e,r,"whitespace");function r(o){return o===null?n(o):t(o)}}function g8(e){return w1([z5(),X5(),s8(e),l8(),h8()])}const E8={};function y8(e){const t=this,n=e||E8,r=t.data(),o=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);o.push(g8(n)),a.push(F5()),u.push(B5(n))}const ql=()=>k.jsx("span",{className:`${G}-blinking-cursor`,children:k.jsx("svg",{height:"1rem",width:"1rem",xmlns:"http://www.w3.org/2000/svg",children:k.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Rb=({globalClassName:e,openLinksInNewTab:t,message:n})=>{const{isLoading:r,isResponseLoading:o}=$r(),a=r&&o((n==null?void 0:n.eventSourceId)||"")&&n.name==="partial_inquiry";return k.jsx(pE,{remarkPlugins:[y8],rehypePlugins:[Ay],components:{h1:({children:u})=>k.jsx("h1",{className:Z(e,`${G}-header h1`),children:u}),h2:({children:u})=>k.jsx("h2",{className:Z(e,`${G}-header h2`),children:u}),h3:({children:u})=>k.jsx("h3",{className:Z(e,`${G}-header h3`),children:u}),ul:({children:u})=>k.jsx("ul",{className:Z(e,`${G}-ul`),children:u}),ol:({children:u})=>k.jsx("ol",{className:Z(e,`${G}-ol`),children:u}),li:({children:u})=>k.jsx("li",{className:Z(e,`${G}-li`),children:u}),a:({href:u,children:c})=>k.jsx(Ry,{globalClassName:e,openLinksInNewTab:t,href:u,children:c}),table:({children:u})=>k.jsx("table",{className:Z(e,`${G}-table`),children:u}),thead:({children:u})=>k.jsx("thead",{className:Z(e,`${G}-thead`),children:u}),tbody:({children:u})=>k.jsx("tbody",{className:Z(e,`${G}-tbody`),children:u}),tr:({children:u})=>k.jsx("tr",{className:Z(e,`${G}-tr`),children:u}),th:({children:u})=>k.jsx("th",{className:Z(e,`${G}-th`),children:u}),td:({children:u})=>k.jsx("td",{className:Z(e,`${G}-td`),children:u}),span:({className:u,children:c})=>u===`${G}-blinking-cursor`?k.jsx(ql,{}):k.jsx("span",{children:c})},children:n.message+(a?`<span className='${G}-blinking-cursor'></span>`:"")})},T8=({globalClassName:e,message:t})=>{const[n,r]=$.useState(!1),o=t.tool_name||t.toolName,a=!!t.thought,u=!!o,c=()=>{r(d=>!d)};return k.jsxs("div",{children:[k.jsxs("div",{className:Z(e,`${G}-progress-message`,"standalone"),children:[k.jsx("span",{className:Z(e,`${G}-message-icon`,"progress-icon","standalone"),children:k.jsx(qg,{})}),k.jsx("p",{className:Z(e,`${G}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&k.jsxs(k.Fragment,{children:[k.jsx(Zd,{className:Z(e,`${G}-thought-context-button`),onClick:c,children:n?k.jsxs(k.Fragment,{children:["Hide ",k.jsx(jA,{})]}):k.jsxs(k.Fragment,{children:["Context ",k.jsx($A,{})]})}),n&&k.jsx("div",{className:Z(e,`${G}-thought-container`),children:a&&k.jsx("p",{className:Z(e,`${G}-progress-thought`),children:t.thought})})]})]})},b8=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?k.jsx(T8,{globalClassName:e,message:t}):k.jsxs("div",{className:Z(e,`${G}-progress-message`,"embedded"),title:t.message,children:[k.jsx("span",{className:Z(e,`${G}-message-icon`,"progress-icon","embedded"),children:k.jsx(qg,{})}),k.jsx("i",{className:Z(e,`${G}-progress-text`,"embedded"),children:t.message})]}),_8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var o;const r=(o=t.searchParams)==null?void 0:o.query;return k.jsxs("div",{className:Z(e,`${G}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&k.jsxs("div",{className:Z(e,`${G}-refined-event-query`,{embedded:!n,standalone:n}),children:[k.jsx("span",{className:Z(e,`${G}-message-icon`,`${G}-refined-event-icon`,{embedded:!n,standalone:n}),children:k.jsx(ea,{role:"img"})}),k.jsx("p",{className:Z(e,`${G}-text`,`${G}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),k.jsx(Rb,{message:t})]})},Lb=e=>{var d,f;const{configModule:t}=nn(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:o={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(o).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,E)=>p+E.length,0);return{facetFiltersList:u,filterCount:c}},Yl=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>k.jsx("span",{className:Z(t,`${G}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filters`}),Db=({globalClassName:e,message:t,facetFiltersList:n})=>{var a,u;if(!n.length)return null;const r=((a=t.request)==null?void 0:a.searchParams)||((u=t.request)==null?void 0:u.browseParams),o=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=o[c])==null?void 0:f.join(", "))||"";return k.jsxs("div",{className:Z(e,`${G}-facets`),children:[k.jsx("p",{className:Z(e,`${G}-facet-category`),children:c}),k.jsx("p",{className:Z(e,`${G}-facet-values`),children:d})]},c)})},Fa=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>k.jsx("span",{className:Z(e,`${G}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),x8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:o}=t,{facetFiltersList:a,filterCount:u}=Lb(t),c=new Date(o).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?k.jsxs("div",{className:Z(e,`${G}-user-message standalone`),children:[k.jsxs("div",{className:Z(e,`${G}-user-message-row standalone`),children:[d?k.jsx("img",{className:Z(e,`${G}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):k.jsx("span",{className:Z(e,`${G}-message-icon user-message-icon standalone`),children:k.jsx(Yg,{})}),k.jsx("p",{className:Z(e,`${G}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&k.jsx(Yl,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),k.jsx(Db,{globalClassName:e,facetFiltersList:a,message:t}),k.jsx(Fa,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):k.jsxs("div",{className:Z(e,`${G}-user-message embedded`),children:[k.jsxs("div",{className:Z(e,`${G}-user-message-row embedded`),children:[d?k.jsx("img",{className:Z(e,`${G}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):k.jsx("span",{className:Z(e,`${G}-message-icon user-message-icon embedded`),children:k.jsx(Yg,{})}),k.jsx("p",{className:Z(e,`${G}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&k.jsx(Yl,{isWidgetStandalone:!1,filterCount:u})]}),k.jsx(Fa,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},S8=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:o,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>k.jsxs("div",{className:Z(e,`${G}-user-search standalone`),children:[k.jsxs("div",{children:[k.jsxs("div",{className:Z(e,`${G}-user-search-query standalone`),children:[d?k.jsx("img",{className:Z(e,`${G}-user-search-image standalone`),src:d,alt:o||r,loading:"lazy"}):k.jsx("span",{className:Z(e,`${G}-message-icon user-search-icon standalone`),children:k.jsx(ea,{})}),k.jsx("p",{className:Z(e,`${G}-text bold`),children:`${n}: ${o||r}`}),u.length>0&&k.jsx(Yl,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),k.jsx(Db,{globalClassName:e,facetFiltersList:u,message:a})]}),k.jsx(Fa,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),w8=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var T;const{request:r,name:o,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=Lb(t),d=new Date(a).toLocaleString(),f=(T=r==null?void 0:r.attachments)==null?void 0:T.image,{actionLabel:p,query:E,queryLabel:b}=$.useMemo(()=>{var _;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:(r==null?void 0:r.label)||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:(r==null?void 0:r.label)||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[o,r]);return E?n?k.jsx(S8,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:E,queryLabel:b,facetFiltersList:u,filterCount:c}):k.jsxs("div",{className:Z(e,`${G}-user-search embedded`),children:[k.jsxs("div",{className:Z(e,`${G}-user-search-query embedded`),children:[f?k.jsx("img",{className:Z(e,`${G}-user-search-image embedded`),src:f,alt:b||E,loading:"lazy"}):k.jsx("span",{className:Z(e,`${G}-message-icon user-search-icon embedded`),children:k.jsx(ea,{})}),k.jsx("p",{children:b||E}),u.length>0&&k.jsx(Yl,{isWidgetStandalone:!1,filterCount:c})]}),k.jsx(Fa,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},Mb=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,isWidgetStandalone:o,handleSuggestionClick:a})=>{var d;if(!e)return null;const u=e.name,c=!!((d=e.request)!=null&&d.userPrompt);switch(u){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return c?k.jsx(x8,{globalClassName:t,isWidgetStandalone:o,message:e}):k.jsx(w8,{globalClassName:t,message:e,isWidgetStandalone:o});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return k.jsx(_8,{globalClassName:t,message:e,isWidgetStandalone:o});case"follow_up":return k.jsx(l4,{globalClassName:t,isWidgetStandalone:o,message:e,handleSuggestionClick:a});case"inquiry":case"partial_inquiry":return k.jsx(Rb,{globalClassName:t,openLinksInNewTab:n,message:e});case"error":return k.jsx(o4,{message:e,isWidgetStandalone:o});case"display_products":return k.jsx(s4,{message:e,isWidgetStandalone:o});case"progress":return k.jsx(b8,{globalClassName:t,isWidgetStandalone:o,message:e});case"conversation_reset":return k.jsxs(k.Fragment,{children:[k.jsx("p",{className:Z(t,`${G}-reset-message`),children:"This conversation has been reset."}),k.jsx("p",{className:Z(t,`${G}-start-search-message`),children:r})]});default:return null}},qh=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,entryMessage:r,openLinksInNewTab:o,resetConversationMessage:a}=nn(),{groupedMessages:u,entryType:c}=Zo(),d=typeof r=="string"?r:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return k.jsxs(k.Fragment,{children:[c==="ask_cim"&&k.jsx("div",{className:Z(n,`${G}-ask-cim-entry-message`,`${G}-message-group`,e?"standalone":"embedded"),children:d}),u.map(f=>{if(f.messages&&f.type==="group"){let p=new Date(f.createdAt).toLocaleString();const E=f.messages[f.messages.length-1];return E&&(p=new Date(E.createdAt).toLocaleString()),k.jsxs("div",{className:Z(n,`${G}-message-group`,e?"standalone":"embedded"),children:[f.messages.length>0&&f.messages.map(b=>k.jsx("div",{className:`${G}-message-group-child`,children:k.jsx(Mb,{id:b.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:b,resetConversationMessage:a,handleSuggestionClick:t})},b.id)),k.jsx(Fa,{globalClassName:n,timestamp:p,isWidgetStandalone:e})]},`group-${f.eventSourceId}`)}else if(f.type==="individual"&&f.message)return k.jsx("div",{className:Z(n,`${G}-message`,e?"standalone":"embedded",{error:f.message.name.includes("error")}),children:k.jsx(Mb,{id:f.message.id,openLinksInNewTab:o,globalClassName:n,isWidgetStandalone:e,message:f.message,resetConversationMessage:a,handleSuggestionClick:t})},f.message.id);return null})]})},Fb=()=>{const{globalClassName:e,themeVariables:t}=nn(),{copilot:n,messages:r,isLoading:o,handleUserInput:a,handleSuggestion:u}=$r(),c=$.useRef(null),d=Xd();return $.useEffect(()=>{c.current&&c.current.scrollIntoView({behavior:"smooth",block:"end"})},[r]),d?n?k.jsxs("div",{className:Z(e,`${G}-container`,`${G}-embedded-chat`),style:t,children:[k.jsxs("div",{className:Z(e,`${G}-message-container`,"embedded"),children:[k.jsx(qh,{isWidgetStandalone:!1,handleSuggestionClick:u}),o&&k.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:k.jsx(ql,{})}),k.jsx("div",{ref:c})]}),k.jsx(Zf,{componentType:"chat",className:"embedded-chat",isLoading:o,onSubmit:a}),k.jsx("div",{className:Z(`${G}-embedded-chat-menu`),children:k.jsx(n4,{componentType:"chat",children:k.jsx(nb,{componentType:"chat"})})})]}):k.jsx("div",{children:"Loading Copilot..."}):null},[C8,A8]=Zs({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),v8=e=>oT()(e,["lazyMount","unmountOnExit"]),[k8,Ba]=Zs({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Bb=$.forwardRef((e,t)=>{const n=Ba(),r=A8(),o=Th(be(H({},r),{present:n.open})),a=cr(n.getBackdropProps(),o.getPresenceProps(),e);return o.unmounted?null:k.jsx(gi.div,be(H({},a),{ref:Il(o.ref,t)}))});Bb.displayName="DialogBackdrop";const Yh=$.forwardRef((e,t)=>{const n=Ba(),r=Na(),o=cr(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:k.jsx(gi.div,be(H({},o),{ref:Il(r.ref,t)}))});Yh.displayName="DialogContent";const Wh=$.forwardRef((e,t)=>{const n=Ba(),r=cr(n.getDescriptionProps(),e);return k.jsx(gi.div,be(H({},r),{ref:t}))});Wh.displayName="DialogDescription";const Gh=$.forwardRef((e,t)=>{const n=Ba(),r=cr(n.getPositionerProps(),e);return Na().unmounted?null:k.jsx(gi.div,be(H({},r),{ref:t}))});Gh.displayName="DialogPositioner";var N8=eo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),os=N8.build(),Ub=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Hb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},zb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},jb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},Wl=e=>e.getById(Kh(e)),O8=e=>e.getById(Ub(e)),I8=e=>e.getById(Hb(e)),P8=e=>e.getById(zb(e)),R8=e=>e.getById(Qh(e)),L8=e=>e.getById(Xh(e)),D8=e=>e.getById(jb(e));function M8(e,t){const{state:n,send:r,context:o,prop:a,scope:u}=e,c=a("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(be(H({},os.trigger.attrs),{dir:a("dir"),id:zb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Kh(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(be(H({},os.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Hb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(be(H({},os.positioner.attrs),{dir:a("dir"),id:Ub(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=o.get("rendered");return t.element(be(H({},os.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:Kh(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:Qh(u),"aria-describedby":f.description?Xh(u):void 0}))},getTitleProps(){return t.element(be(H({},os.title.attrs),{dir:a("dir"),id:Qh(u)}))},getDescriptionProps(){return t.element(be(H({},os.description.attrs),{dir:a("dir"),id:Xh(u)}))},getCloseTriggerProps(){return t.button(be(H({},os.closeTrigger.attrs),{dir:a("dir"),id:jb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var F8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>D8(t):void 0,o=typeof e.modal=="boolean"?e.modal:!0;return H({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 HT(()=>Wl(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[P8(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 qT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?$T(()=>Wl(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")?IT(()=>[Wl(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){wn(()=>{e.set("rendered",{title:!!R8(t),description:!!L8(t)})})},syncZIndex({scope:e}){wn(()=>{const t=Wl(e);if(!t)return;const n=Al(t);[O8(e),I8(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})}}}};mh()(["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 B8=e=>{const t=$.useId(),{getRootNode:n}=Mh(),{dir:r}=XT(),o=H({id:t,getRootNode:n,dir:r},e),a=gh(F8,o);return M8(a,nT)},$b=e=>{const[t,c]=aT(e),d=c,{children:n}=d,r=en(d,["children"]),[o]=v8(t),a=B8(r),u=Th(cr({present:a.open},t));return k.jsx(k8,{value:a,children:k.jsx(C8,{value:o,children:k.jsx(rT,{value:u,children:n})})})},Jh=$.forwardRef((e,t)=>{const n=Ba(),r=cr(n.getTitleProps(),e);return k.jsx(gi.h2,be(H({},r),{ref:t}))});Jh.displayName="DialogTitle";const Vb=e=>{var d;const{children:t,disabled:n}=e,[r,o]=$.useState((d=e.container)==null?void 0:d.current),a=$.useSyncExternalStore(H8,()=>!1,()=>!0),{getRootNode:u}=Mh();if($.useEffect(()=>{o(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return k.jsx(k.Fragment,{children:t});const c=r!=null?r:U8(u);return k.jsx(k.Fragment,{children:$.Children.map(t,f=>Nl.createPortal(f,c))})},U8=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return ns(n)?n:Ar(t).body},H8=()=>()=>{},z8=()=>{const{globalClassName:e}=nn(),{dialogPosition:t}=Rs(),n=t==="bottom-left",r=()=>{dg(n?"bottom-right":"bottom-left")},o=n?ZD:JD,a=n?"Move right":"Move left";return k.jsx(Ls,{className:Z(e,`${G}-left-right-toggle-button`,"dialog"),ariaLabel:a,onClick:r,icon:k.jsx(o,{})})},qb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=nn(),{mode:o,status:a,dialogPosition:u}=Rs(),{copilot:c,messages:d,isLoading:f,handleUserInput:p,handleSuggestion:E}=$r(),b=$.useRef(null),T=Xd(),{isOpen:_}=a||{},x=o==="standalone";$.useEffect(()=>{b.current&&b.current.scrollIntoView({behavior:"smooth",block:"end"})},[d]);const C=()=>{Gu(!1)};return T?c?k.jsx($b,{lazyMount:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:_,children:k.jsx(Vb,{children:k.jsx(Gh,{className:Z(n,`${G}-container`,`${G}-dialog`,u),style:r,children:k.jsxs(Yh,{className:Z(n,`${G}-dialog-content`,{standalone:x,embedded:!x}),children:[k.jsxs("div",{className:Z(n,`${G}-dialog-header`,{standalone:x,embedded:!x}),children:[e&&k.jsx("img",{alt:"",role:"img",className:Z(n,`${G}-dialog-logo`,{standalone:x,embedded:!x}),src:e}),k.jsx(Jh,{className:Z(n,`${G}-dialog-title`,{standalone:x,embedded:!x}),children:t}),k.jsxs("div",{className:Z(n,`${G}-dialog-controls`),children:[k.jsx(nb,{componentType:"dialog",isIcon:!0}),k.jsx(z8,{}),k.jsx(tb,{componentType:"dialog"}),k.jsx(Jd,{className:`dialog ${n}`,onClick:C})]})]}),k.jsxs(Wh,{className:Z(n,`${G}-message-container`,{standalone:x,embedded:!x}),children:[k.jsx(qh,{isWidgetStandalone:x,handleSuggestionClick:E}),f&&k.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},children:k.jsx(ql,{})}),k.jsx("div",{ref:b})]}),k.jsx(Zf,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):k.jsx("div",{children:"Loading Copilot..."}):null},Yb=()=>{const{logoUrl:e,headerText:t,globalClassName:n,themeVariables:r}=nn(),{mode:o,status:a,isModalFullscreen:u,previousComponentType:c}=Rs(),{copilot:d,messages:f,isLoading:p,handleUserInput:E,handleSuggestion:b}=$r(),T=$.useRef(null),{isOpen:_}=a||{},x=o==="standalone",C=Xd();$.useEffect(()=>{T.current&&T.current.scrollIntoView({behavior:"smooth",block:"end"})},[f]);const v=({open:X})=>{Gu(X)},U=()=>{cg(!u)},L=()=>{Qd(c||"dialog")},Y=()=>{Gu(!1)};return C?d?k.jsx($b,{lazyMount:!0,open:_,onOpenChange:v,children:k.jsx(Vb,{children:k.jsxs("div",{className:Z(n,`${G}-modal-container`),style:r,children:[k.jsx(Bb,{className:Z(n,`${G}-modal-backdrop`)}),k.jsx(Gh,{className:Z(n,`${G}-container`,`${G}-modal`,{fullscreen:u,standalone:x,embedded:!x}),children:k.jsxs(Yh,{className:Z(n,`${G}-modal-content`,{standalone:x,embedded:!x}),children:[k.jsxs("div",{className:Z(n,`${G}-modal-header`,{standalone:x,embedded:!x}),children:[e&&k.jsx("img",{alt:"",role:"img",className:Z(n,`${G}-modal-logo`,{standalone:x,embedded:!x}),src:e}),k.jsx(Jh,{className:Z(n,`${G}-modal-title`,{standalone:x,embedded:!x}),children:t}),k.jsxs("div",{className:Z(n,`${G}-modal-controls`),children:[k.jsx(Ls,{ariaLabel:"Toggle Fullscreen",className:Z(n,`${G}-modal-fullscreen-button`),icon:u?k.jsx(VA,{}):k.jsx(qA,{}),onClick:U}),k.jsx(Ls,{ariaLabel:"Toggle Dialog",className:Z(n,`${G}-modal-toggle-dialog-button`),onClick:L,icon:k.jsx(r4,{})}),k.jsx(tb,{componentType:"modal"}),k.jsx(Jd,{className:`modal ${n}`,onClick:Y})]})]}),k.jsxs(Wh,{className:Z(n,`${G}-message-container`,{standalone:x,embedded:!x}),children:[k.jsx(qh,{isWidgetStandalone:x,handleSuggestionClick:b}),p&&k.jsx("div",{style:{display:"flex",justifyContent:"flex-start",paddingLeft:"1rem",paddingBottom:"1rem"},children:k.jsx(ql,{})}),k.jsx("div",{ref:T})]}),k.jsx(Zf,{componentType:"modal",isLoading:p,onSubmit:E})]})})]})})}):k.jsx("div",{children:"Loading Copilot..."}):null},j8=()=>{const e=Rs(),{status:{type:t}}=e||{status:{}};return t==="dialog"?k.jsx(qb,{}):t==="modal"?k.jsx(Yb,{}):k.jsx(Fb,{})},Zh=e=>k.jsx(Ug,be(H({},e),{children:k.jsx(j8,{})}));var Gl={},Wb;function $8(){if(Wb)return Gl;Wb=1;var e=Jy();return Gl.createRoot=e.createRoot,Gl.hydrateRoot=e.hydrateRoot,Gl}var Gb=$8();const V8=r=>{var o=r,{elementId:e,timeout:t=5e3}=o,n=en(o,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const E of d)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ps(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=Gb.createRoot(b))==null||p.render(k.jsx(Zh,H({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ps(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c},q8=r=>{var o=r,{timeout:e,elementId:t}=o,n=en(o,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ps(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ps(!0,"warn","Container element not found for id:",t),Ps(!0,"warn","Beginning observation for element"),V8(H({elementId:t,timeout:e},n));return}Gb.createRoot(a).render(k.jsx(Zh,H({},n)))},Y8={search:TA,browse:lA,pdp:{setPdpContext:Ng,updatePdpProductId:dA,updatePdpLink:fA},components:{setEntryType:Wu,toggleWidgetOpen:Gu,toggleModalFullscreen:cg,setWidgetType:Qd,setWidgetDialogPosition:dg},session:hA},W8=()=>Object.freeze({search:Object.freeze(gt.state),browse:Object.freeze(at.state),pdp:Object.freeze(or.state),isConnected:mt.state.connected,isOpen:mt.isOpen,entryType:mt.entryType});Ie.CopilotDialog=qb,Ie.CopilotEmbed=Fb,Ie.CopilotModal=Yb,Ie.CopilotWidget=Zh,Ie.WidgetProvider=Ug,Ie.eventHandlers=Y8,Ie.injectCopilotWidget=q8,Ie.state=W8,Ie.useCopilot=$r,Object.defineProperty(Ie,Symbol.toStringTag,{value:"Module"})}));