@cimulate/copilot-widget 1.32.0 → 1.32.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/dist/cimulate-copilot-widget.es.js +5087 -5067
- package/dist/cimulate-copilot-widget.umd.js +29 -29
- package/dist/copilot.es.js +5085 -5065
- package/dist/copilot.umd.js +29 -29
- package/dist/messaging.es.js +7508 -7450
- package/dist/messaging.umd.js +34 -34
- package/package.json +1 -1
|
@@ -1,46 +1,46 @@
|
|
|
1
|
-
(function(qe,je){typeof exports=="object"&&typeof module!="undefined"?module.exports=je():typeof define=="function"&&define.amd?define(je):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=je())})(this,(function(){"use strict";var b7=Object.defineProperty,_7=Object.defineProperties;var S7=Object.getOwnPropertyDescriptors;var _d=Object.getOwnPropertySymbols;var k2=Object.prototype.hasOwnProperty,N2=Object.prototype.propertyIsEnumerable;var Ko=(qe,je)=>(je=Symbol[qe])?je:Symbol.for("Symbol."+qe),x7=qe=>{throw TypeError(qe)},Du=Math.pow,i0=(qe,je,Qe)=>je in qe?b7(qe,je,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[je]=Qe,F=(qe,je)=>{for(var Qe in je||(je={}))k2.call(je,Qe)&&i0(qe,Qe,je[Qe]);if(_d)for(var Qe of _d(je))N2.call(je,Qe)&&i0(qe,Qe,je[Qe]);return qe},de=(qe,je)=>_7(qe,S7(je));var cn=(qe,je)=>{var Qe={};for(var ot in qe)k2.call(qe,ot)&&je.indexOf(ot)<0&&(Qe[ot]=qe[ot]);if(qe!=null&&_d)for(var ot of _d(qe))je.indexOf(ot)<0&&N2.call(qe,ot)&&(Qe[ot]=qe[ot]);return Qe};var Se=(qe,je,Qe)=>i0(qe,typeof je!="symbol"?je+"":je,Qe);var Ke=(qe,je,Qe)=>new Promise((ot,Dt)=>{var Re=pt=>{try{dn(Qe.next(pt))}catch(fn){Dt(fn)}},tn=pt=>{try{dn(Qe.throw(pt))}catch(fn){Dt(fn)}},dn=pt=>pt.done?ot(pt.value):Promise.resolve(pt.value).then(Re,tn);dn((Qe=Qe.apply(qe,je)).next())}),Kr=function(qe,je){this[0]=qe,this[1]=je},Sd=(qe,je,Qe)=>{var ot=(dn,pt,fn,vr)=>{try{var Ds=Qe[dn](pt),Xi=(pt=Ds.value)instanceof Kr,Qo=Ds.done;Promise.resolve(Xi?pt[0]:pt).then(S=>Xi?ot(dn==="return"?dn:"next",pt[1]?{done:S.done,value:S.value}:S,fn,vr):fn({value:S,done:Qo})).catch(S=>ot("throw",S,fn,vr))}catch(S){vr(S)}},Dt=(dn,pt,fn,vr)=>tn[dn]=Ds=>(pt=new Promise((Xi,Qo,S)=>(S=()=>ot(dn,Ds,Xi,Qo),Re?Re.then(S):S())),vr=()=>Re===fn&&(Re=0),Re=fn=pt.then(vr,vr),pt),Re,tn={};return Qe=Qe.apply(qe,je),tn[Ko("asyncIterator")]=()=>tn,Dt("next"),Dt("throw"),Dt("return"),tn},s0=qe=>{var je=qe[Ko("asyncIterator")],Qe=!1,ot,Dt={};return je==null?(je=qe[Ko("iterator")](),ot=Re=>Dt[Re]=tn=>je[Re](tn)):(je=je.call(qe),ot=Re=>Dt[Re]=tn=>{if(Qe){if(Qe=!1,Re==="throw")throw tn;return tn}return Qe=!0,{done:!1,value:new Kr(new Promise(dn=>{var pt=je[Re](tn);pt instanceof Object||x7("Object expected"),dn(pt)}),1)}}),Dt[Ko("iterator")]=()=>Dt,ot("next"),"throw"in je?ot("throw"):Dt.throw=Re=>{throw Re},"return"in je&&ot("return"),Dt},P2=(qe,je,Qe)=>(je=qe[Ko("asyncIterator")])?je.call(qe):(qe=qe[Ko("iterator")](),je={},Qe=(ot,Dt)=>(Dt=qe[ot])&&(je[ot]=Re=>new Promise((tn,dn,pt)=>(Re=Dt.call(qe,Re),pt=Re.done,Promise.resolve(Re.value).then(fn=>tn({value:fn,done:pt}),dn)))),Qe("next"),Qe("return"),je);var qe=document.createElement("style");qe.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
|
|
2
|
-
/*$vite$:1*/`,document.head.appendChild(qe);function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},ot={},Dt={exports:{}},Re={};var tn;function dn(){if(tn)return Re;tn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function N(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}var C=N.prototype=new w;C.constructor=N,_(C,v.prototype),C.isPureReactComponent=!0;var U=Array.isArray,Y=Object.prototype.hasOwnProperty,R={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,ee,I){var _e,Be={},ye=null,Le=null;if(ee!=null)for(_e in ee.ref!==void 0&&(Le=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)Y.call(ee,_e)&&!q.hasOwnProperty(_e)&&(Be[_e]=ee[_e]);var Ue=arguments.length-2;if(Ue===1)Be.children=I;else if(1<Ue){for(var Ye=Array(Ue),Tt=0;Tt<Ue;Tt++)Ye[Tt]=arguments[Tt+2];Be.children=Ye}if(D&&D.defaultProps)for(_e in Ue=D.defaultProps,Ue)Be[_e]===void 0&&(Be[_e]=Ue[_e]);return{$$typeof:e,type:D,key:ye,ref:Le,props:Be,_owner:R.current}}function me(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(I){return ee[I]})}var he=/\/+/g;function ve(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):ee.toString(36)}function re(D,ee,I,_e,Be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Le=!1;if(D===null)Le=!0;else switch(ye){case"string":case"number":Le=!0;break;case"object":switch(D.$$typeof){case e:case t:Le=!0}}if(Le)return Le=D,Be=Be(Le),D=_e===""?"."+ve(Le,0):_e,U(Be)?(I="",D!=null&&(I=D.replace(he,"$&/")+"/"),re(Be,ee,I,"",function(Tt){return Tt})):Be!=null&&(V(Be)&&(Be=me(Be,I+(!Be.key||Le&&Le.key===Be.key?"":(""+Be.key).replace(he,"$&/")+"/")+D)),ee.push(Be)),1;if(Le=0,_e=_e===""?".":_e+":",U(D))for(var Ue=0;Ue<D.length;Ue++){ye=D[Ue];var Ye=_e+ve(ye,Ue);Le+=re(ye,ee,I,Ye,Be)}else if(Ye=b(D),typeof Ye=="function")for(D=Ye.call(D),Ue=0;!(ye=D.next()).done;)ye=ye.value,Ye=_e+ve(ye,Ue++),Le+=re(ye,ee,I,Ye,Be);else if(ye==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Le}function oe(D,ee,I){if(D==null)return D;var _e=[],Be=0;return re(D,_e,"","",function(ye){return ee.call(I,ye,Be++)}),_e}function xe(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(I){(D._status===0||D._status===-1)&&(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&&(D._status=2,D._result=I)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var ae={current:null},Q={transition:null},ie={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:R};function k(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:oe,forEach:function(D,ee,I){oe(D,function(){ee.apply(this,arguments)},I)},count:function(D){var ee=0;return oe(D,function(){ee++}),ee},toArray:function(D){return oe(D,function(ee){return ee})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Re.Component=v,Re.Fragment=n,Re.Profiler=s,Re.PureComponent=N,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Re.act=k,Re.cloneElement=function(D,ee,I){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),Be=D.key,ye=D.ref,Le=D._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,Le=R.current),ee.key!==void 0&&(Be=""+ee.key),D.type&&D.type.defaultProps)var Ue=D.type.defaultProps;for(Ye in ee)Y.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=ee[Ye]===void 0&&Ue!==void 0?Ue[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=I;else if(1<Ye){Ue=Array(Ye);for(var Tt=0;Tt<Ye;Tt++)Ue[Tt]=arguments[Tt+2];_e.children=Ue}return{$$typeof:e,type:D.type,key:Be,ref:ye,props:_e,_owner:Le}},Re.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Re.createElement=ne,Re.createFactory=function(D){var ee=ne.bind(null,D);return ee.type=D,ee},Re.createRef=function(){return{current:null}},Re.forwardRef=function(D){return{$$typeof:c,render:D}},Re.isValidElement=V,Re.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},Re.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Re.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Re.unstable_act=k,Re.useCallback=function(D,ee){return ae.current.useCallback(D,ee)},Re.useContext=function(D){return ae.current.useContext(D)},Re.useDebugValue=function(){},Re.useDeferredValue=function(D){return ae.current.useDeferredValue(D)},Re.useEffect=function(D,ee){return ae.current.useEffect(D,ee)},Re.useId=function(){return ae.current.useId()},Re.useImperativeHandle=function(D,ee,I){return ae.current.useImperativeHandle(D,ee,I)},Re.useInsertionEffect=function(D,ee){return ae.current.useInsertionEffect(D,ee)},Re.useLayoutEffect=function(D,ee){return ae.current.useLayoutEffect(D,ee)},Re.useMemo=function(D,ee){return ae.current.useMemo(D,ee)},Re.useReducer=function(D,ee,I){return ae.current.useReducer(D,ee,I)},Re.useRef=function(D){return ae.current.useRef(D)},Re.useState=function(D){return ae.current.useState(D)},Re.useSyncExternalStore=function(D,ee,I){return ae.current.useSyncExternalStore(D,ee,I)},Re.useTransition=function(){return ae.current.useTransition()},Re.version="18.3.1",Re}var pt;function fn(){return pt||(pt=1,Dt.exports=dn()),Dt.exports}var vr;function Ds(){if(vr)return ot;vr=1;var e=fn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return ot.Fragment=n,ot.jsx=u,ot.jsxs=u,ot}var Xi;function Qo(){return Xi||(Xi=1,Qe.exports=Ds()),Qe.exports}var S=Qo();const kr=Object.create(null);kr.open="0",kr.close="1",kr.ping="2",kr.pong="3",kr.message="4",kr.upgrade="5",kr.noop="6";const Mu=Object.create(null);Object.keys(kr).forEach(e=>{Mu[kr[e]]=e});const xd={type:"error",data:"parser error"},o0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",a0=typeof ArrayBuffer=="function",u0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,wd=({type:e,data:t},n,r)=>o0&&t instanceof Blob?n?r(t):l0(t,r):a0&&(t instanceof ArrayBuffer||u0(t))?n?r(t):l0(new Blob([t]),r):r(kr[e]+(t||"")),l0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function c0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ad;function L2(e,t){if(o0&&e.data instanceof Blob)return e.data.arrayBuffer().then(c0).then(t);if(a0&&(e.data instanceof ArrayBuffer||u0(e.data)))return t(c0(e.data));wd(e,!1,n=>{Ad||(Ad=new TextEncoder),t(Ad.encode(n))})}const d0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<d0.length;e++)Jo[d0.charCodeAt(e)]=e;const D2=e=>{let t=e.length*.75,n=e.length,r,s=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=Jo[e.charCodeAt(r)],u=Jo[e.charCodeAt(r+1)],c=Jo[e.charCodeAt(r+2)],d=Jo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},M2=typeof ArrayBuffer=="function",Cd=(e,t)=>{if(typeof e!="string")return{type:"message",data:f0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:F2(e.substring(1),t)}:Mu[n]?e.length>1?{type:Mu[n],data:e.substring(1)}:{type:Mu[n]}:xd},F2=(e,t)=>{if(M2){const n=D2(e);return f0(n,t)}else return{base64:!0,data:e}},f0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,h0="",B2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{wd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(h0))})})},U2=(e,t)=>{const n=e.split(h0),r=[];for(let s=0;s<n.length;s++){const a=Cd(n[s],t);if(r.push(a),a.type==="error")break}return r};function H2(){return new TransformStream({transform(e,t){L2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let vd;function Fu(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 s=0;s<t;s++)n[s]=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 z2(e,t){vd||(vd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Fu(n)<1)break;const d=Bu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Fu(n)<2)break;const d=Bu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Fu(n)<8)break;const d=Bu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(xd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Fu(n)<s)break;const d=Bu(n,s);c.enqueue(Cd(a?d:vd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(xd);break}}}})}const p0=4;function Mt(e){if(e)return j2(e)}function j2(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,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,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,s=n.length;r<s;++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 Uu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),$2="arraybuffer";function w7(){}function m0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const V2=Qn.setTimeout,q2=Qn.clearTimeout;function Hu(e,t){t.useNativeTimers?(e.setTimeoutFn=V2.bind(Qn),e.clearTimeoutFn=q2.bind(Qn)):(e.setTimeoutFn=Qn.setTimeout.bind(Qn),e.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const Y2=1.33;function G2(e){return typeof e=="string"?W2(e):Math.ceil((e.byteLength||e.size)*Y2)}function W2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;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 g0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function X2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function K2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class Q2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class kd extends Mt{constructor(t){super(),this.writable=!1,Hu(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 Q2(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=Cd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=X2(t);return n.length?"?"+n:""}}class J2 extends kd{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)};U2(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,B2(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]=g0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let E0=!1;try{E0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const Z2=E0;function ew(){}class tw extends J2{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",(s,a)=>{this.onError("xhr post error",s,a)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class Nr extends Mt{constructor(t,n,r){super(),this.createRequest=t,Hu(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=m0(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(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 s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=Nr.requestsCount++,Nr.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=ew,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete Nr.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if(Nr.requestsCount=0,Nr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",y0);else if(typeof addEventListener=="function"){const e="onpagehide"in Qn?"pagehide":"unload";addEventListener(e,y0,!1)}}function y0(){for(let e in Nr.requests)Nr.requests.hasOwnProperty(e)&&Nr.requests[e].abort()}const nw=(function(){const e=T0({xdomain:!1});return e&&e.responseType!==null})();class rw extends tw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=nw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new Nr(T0,this.uri(),t)}}function T0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||Z2))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const b0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class iw extends kd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=b0?{}:m0(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(s){return this.emitReserved("error",s)}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],s=n===t.length-1;wd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Uu(()=>{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]=g0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Nd=Qn.WebSocket||Qn.MozWebSocket;class sw extends iw{createSocket(t,n,r){return b0?new Nd(t,n,r):n?new Nd(t,n):new Nd(t)}doWrite(t,n){this.ws.send(n)}}class ow extends kd{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=z2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=H2();s.readable.pipeTo(t.writable),this._writer=s.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],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Uu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const aw={websocket:sw,webtransport:ow,polling:rw},uw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,lw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pd(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 s=uw.exec(e||""),a={},u=14;for(;u--;)a[lw[u]]=s[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=cw(a,a.path),a.queryKey=dw(a,a.query),a}function cw(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 dw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Od=typeof addEventListener=="function"&&typeof removeEventListener=="function",zu=[];Od&&addEventListener("offline",()=>{zu.forEach(e=>e())},!1);class Ei extends Mt{constructor(t,n){if(super(),this.binaryType=$2,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=Pd(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=Pd(n.host).host);Hu(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 s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=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=K2(this.opts.query)),Od&&(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"})},zu.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=p0,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&&Ei.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",Ei.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 s=this.writeBuffer[r].data;if(s&&(n+=G2(s)),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,Uu(()=>{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,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=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),s&&this.once("flush",s),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(Ei.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(),Od&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=zu.indexOf(this._offlineEventListener);r!==-1&&zu.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ei.protocol=p0;class fw extends Ei{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;Ei.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ei.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=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),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 hw=class extends fw{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>aw[a]).filter(a=>!!a)),super(r?s:t,s)}};function pw(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=Pd(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 mw=typeof ArrayBuffer=="function",gw=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,_0=Object.prototype.toString,Ew=typeof Blob=="function"||typeof Blob!="undefined"&&_0.call(Blob)==="[object BlobConstructor]",yw=typeof File=="function"||typeof File!="undefined"&&_0.call(File)==="[object FileConstructor]";function Id(e){return mw&&(e instanceof ArrayBuffer||gw(e))||Ew&&e instanceof Blob||yw&&e instanceof File}function ju(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(ju(e[n]))return!0;return!1}if(Id(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return ju(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&ju(e[n]))return!0;return!1}function Tw(e){const t=[],n=e.data,r=e;return r.data=$u(n,t),r.attachments=t.length,{packet:r,buffers:t}}function $u(e,t,n){if(!e)return e;if(Id(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=$u(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return $u(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=$u(e[s],t));return r}return e}function bw(e,t){return e.data=Rd(e.data,t),delete e.attachments,e}function Rd(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]=Rd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Rd(e[n],t));return e}const _w=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(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"})(et||(et={}));class Sw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&ju(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.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=Tw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ld extends Mt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new xw(n)):super.emitReserved("decoded",n)}else if(Id(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(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!ww(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(Ld.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return S0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||S0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&_w.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class xw{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=bw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const ww=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function S0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Aw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ld,Encoder:Sw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function dr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const Cw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class x0 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=[dr(t,"open",this.onopen.bind(this)),dr(t,"packet",this.onpacket.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(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,s,a;if(Cw.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:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.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 s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===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"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(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((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(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:et.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 et.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 et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.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(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.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 Ms(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}Ms.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},Ms.prototype.reset=function(){this.attempts=0},Ms.prototype.setMin=function(e){this.ms=e},Ms.prototype.setMax=function(e){this.max=e},Ms.prototype.setJitter=function(e){this.jitter=e};class Dd 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,Hu(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 Ms({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Aw;this.encoder=new s.Encoder,this.decoder=new s.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 hw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=dr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=dr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),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(dr(t,"ping",this.onping.bind(this)),dr(t,"data",this.ondata.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(t,"close",this.onclose.bind(this)),dr(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){Uu(()=>{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 x0(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(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):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 Zo={};function Vu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=pw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Zo[s]&&a in Zo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Dd(r,t):(Zo[s]||(Zo[s]=new Dd(r,t)),d=Zo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Vu,{Manager:Dd,Socket:x0,io:Vu,connect:Vu});var vw=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===kw})(t)})(e)},kw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Fs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Nw(e,t,n){return e.concat(t).map((function(r){return ea(r,n)}))}function w0(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 A0(e,t){try{return t in e}catch(n){return!1}}function Pw(e,t,n){var r={};return n.isMergeableObject(e)&&w0(e).forEach((function(s){r[s]=ea(e[s],n)})),w0(t).forEach((function(s){(function(a,u){return A0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(A0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Fs;var c=u.customMerge(a);return typeof c=="function"?c:Fs})(s,n)(e[s],t[s],n):r[s]=ea(t[s],n))})),r}function Fs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Nw,n.isMergeableObject=n.isMergeableObject||vw,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Pw(e,t,n):ea(t,n)}Fs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Fs(n,r,t)}),{})};var Ow=Fs;let Iw=class{constructor(t){Object.assign(this,t)}};function wn(e){if(e)return(function(t){for(var n in wn.prototype)t[n]=wn.prototype[n];return t})(e)}wn.prototype.on=wn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wn.prototype.off=wn.prototype.removeListener=wn.prototype.removeAllListeners=wn.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 s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},wn.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 s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},wn.prototype.emitReserved=wn.prototype.emit,wn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Rw=typeof ArrayBuffer=="function",C0=Object.prototype.toString,Lw=typeof Blob=="function"||typeof Blob!="undefined"&&C0.call(Blob)==="[object BlobConstructor]",Dw=typeof File=="function"||typeof File!="undefined"&&C0.call(File)==="[object FileConstructor]";function Md(e){return Rw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Lw&&e instanceof Blob||Dw&&e instanceof File}function qu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(qu(e[n]))return!0;return!1}if(Md(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return qu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&qu(e[n]))return!0;return!1}function Mw(e){const t=[],n=e.data,r=e;return r.data=Fd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fd(e,t){if(!e)return e;if(Md(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]=Fd(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]=Fd(e[r],t));return n}return e}function Fw(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 Bw=["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 Uw{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!qu(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=Mw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ud extends wn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new Hw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Md(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");const c=Number(u);if(!zw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(!Ud.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return v0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||v0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Bw.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 Hw{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=Fw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const zw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function v0(e){return Object.prototype.toString.call(e)==="[object Object]"}const k0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],N0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).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(s)?u.map((c=>c[1])):Object.fromEntries(u)},P0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),jw=N0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),k0),O0=N0(P0,P0,k0),$w={Encoder:class extends Uw{encode(e){var t,n;return super.encode(de(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],jw(e.data[1])]:((n=e.data)==null?void 0:n.length)==1?[e.data[0]]:typeof e.data=="object"&&e.data!=null?e.data:void 0}))}},Decoder:class extends Ud{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?O0(r):r)):n instanceof Object?O0(n):n)):t))}}},Vw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class qw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const b=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=b==null?void 0:b[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[Vw,c,{parser:$w,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=Vu(d,Ow.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Du(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 Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(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 Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}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 Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return Sd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Kr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Kr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(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 Iw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=fn();const Ki=je(B);var I0=Symbol.for("immer-nothing"),R0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Jn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bs=Object.getPrototypeOf;function Us(e){return!!e&&!!e[at]}function Qr(e){var t;return e?L0(e)||Array.isArray(e)||!!e[R0]||!!((t=e.constructor)!=null&&t[R0])||na(e)||Gu(e):!1}var Yw=Object.prototype.constructor.toString();function L0(e){if(!e||typeof e!="object")return!1;const t=Bs(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)===Yw}function ta(e,t){Yu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Yu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Gu(e)?3:0}function Hd(e,t){return Yu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function D0(e,t,n){const r=Yu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Gw(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Gu(e){return e instanceof Set}function Yt(e){return e.copy_||e.base_}function zd(e,t){if(na(e))return new Map(e);if(Gu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=L0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[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(Bs(e),r)}else{const r=Bs(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function jd(e,t=!1){return Xu(e)||Us(e)||!Qr(e)||(Yu(e)>1&&Object.defineProperties(e,{set:{value:Wu},add:{value:Wu},clear:{value:Wu},delete:{value:Wu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>jd(n,!0))),e}function Wu(){Jn(2)}function Xu(e){return Object.isFrozen(e)}var $d={};function Qi(e){const t=$d[e];return t||Jn(0,e),t}function Ww(e,t){$d[e]||($d[e]=t)}var ra;function Ku(){return ra}function Xw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function M0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vd(e){qd(e),e.drafts_.forEach(Kw),e.drafts_=null}function qd(e){e===ra&&(ra=e.parent_)}function F0(e){return ra=Xw(ra,e)}function Kw(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function B0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Vd(t),Jn(4)),Qr(e)&&(e=Qu(t,e),t.parent_||Ju(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=Qu(t,n,[]),Vd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==I0?e:void 0}function Qu(e,t,n){if(Xu(t))return t;const r=t[at];if(!r)return ta(t,(s,a)=>U0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Ju(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),ta(a,(c,d)=>U0(e,r,s,c,d,n,u)),Ju(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function U0(e,t,n,r,s,a,u){if(Us(s)){const c=a&&t&&t.type_!==3&&!Hd(t.assigned_,r)?a.concat(r):void 0,d=Qu(e,s,c);if(D0(n,r,d),Us(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Qr(s)&&!Xu(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Qu(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Ju(e,s)}}function Ju(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jd(t,n)}function Qw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Ku(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Yd;n&&(s=[r],a=ia);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Yd={get(e,t){if(t===at)return e;const n=Yt(e);if(!Hd(n,t))return Jw(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Gd(e.base_,t)?(Wd(e),e.copy_[t]=sa(r,e)):r},has(e,t){return t in Yt(e)},ownKeys(e){return Reflect.ownKeys(Yt(e))},set(e,t,n){const r=H0(Yt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd(Yt(e),t),a=s==null?void 0:s[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Gw(n,s)&&(n!==void 0||Hd(e.base_,t)))return!0;Wd(e),Jr(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Yt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Jn(11)},getPrototypeOf(e){return Bs(e.base_)},setPrototypeOf(){Jn(12)}},ia={};ta(Yd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Yd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[at];return(n?Yt(n):e)[t]}function Jw(e,t,n){var s;const r=H0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function H0(e,t){if(!(t in e))return;let n=Bs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Bs(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Wd(e){e.copy_||(e.copy_=zd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var Zw=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&Jn(6),r!==void 0&&typeof r!="function"&&Jn(7);let s;if(Qr(t)){const a=F0(this),u=sa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Vd(a):qd(a)}return M0(a,r),B0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===I0&&(s=void 0),this.autoFreeze_&&jd(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Jn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},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){Qr(e)||Jn(8),Us(e)&&(e=eA(e));const t=F0(this),n=sa(e,void 0);return n[at].isManual_=!0,qd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Jn(9);const{scope_:r}=n;return M0(r,t),B0(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 s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,s=>r(s,t))}};function sa(e,t){const n=na(e)?Qi("MapSet").proxyMap_(e,t):Gu(e)?Qi("MapSet").proxySet_(e,t):Qw(e,t);return(t?t.scope_:Ku()).drafts_.push(n),n}function eA(e){return Us(e)||Jn(10,e),z0(e)}function z0(e){if(!Qr(e)||Xu(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=zd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=zd(e,!0);return ta(n,(r,s)=>{D0(n,r,z0(s))}),t&&(t.finalized_=!1),n}function tA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:Ku(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Yt(this[at]).size}has(d){return Yt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Yt(p).has(d)||Yt(p).get(d)!==f)&&(n(p),Jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Yt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Yt(p).forEach((m,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[at];u(f);const p=Yt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=sa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Yt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:Ku(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Yt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Yt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Qr(d)){const f=sa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Jn(3,JSON.stringify(Yt(c)))}Ww("MapSet",{proxyMap_:t,proxySet_:s})}var nA=new Zw,rA=nA.produce;function j0(e,t,n){var r=B.useMemo(function(){return rA(e)},[e]);return B.useReducer(r,t,n)}const $0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Ji={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},V0=["ask_cim","search","browse","pdp"],iA=e=>V0.includes(e),q0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(q0));const sA=new Map(Object.entries(q0).map(([e,t])=>[t,e])),oA=e=>{var t;return(t=sA.get(e))!=null?t:null},Hs="cimulate",Xd=`${Hs}:pdp-update`,Kd=`${Hs}:browse-update`,Qd=`${Hs}:search-update`,Jd=`${Hs}:ui-state-update`,Zd=`${Hs}:prompts-state-update`,ef=`${Hs}:session-state`,Pr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},$0),aA={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},$0),uA={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},z="cim-widget",jn=`--${z}`,yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},lA=(e=yi)=>({[`${jn}-primary-color`]:e.primaryColor||yi.primaryColor,[`${jn}-secondary-color`]:e.secondaryColor||yi.secondaryColor,[`${jn}-font-color`]:e.fontColor||yi.fontColor,[`${jn}-font-family`]:e.fontFamily||yi.fontFamily,[`${jn}-background-color`]:e.backgroundColor||yi.backgroundColor,[`${jn}-border-color`]:e.borderColor||yi.borderColor,[`${jn}-border-radius`]:e.borderRadius||yi.borderRadius}),Ti={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},Y0=B.createContext(null),G0=B.createContext(null);function W0(e,t){return function(){return e.apply(t,arguments)}}const{toString:cA}=Object.prototype,{getPrototypeOf:zs}=Object,{iterator:oa,toStringTag:X0}=Symbol,Zu=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aa=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),Zu(n,t))return!0;n=zs(n)}return!1},dA=(e,t)=>e!=null&&aa(e,t)?e[t]:void 0,tf=(e=>t=>{const n=cA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fr=e=>(e=e.toLowerCase(),t=>tf(t)===e),el=e=>t=>typeof t===e,{isArray:Zi}=Array,js=el("undefined");function $s(e){return e!==null&&!js(e)&&e.constructor!==null&&!js(e.constructor)&&Pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const K0=fr("ArrayBuffer");function fA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&K0(e.buffer),t}const hA=el("string"),Pn=el("function"),Q0=el("number"),Vs=e=>e!==null&&typeof e=="object",pA=e=>e===!0||e===!1,tl=e=>{if(!Vs(e))return!1;const t=zs(e);return(t===null||t===Object.prototype||zs(t)===null)&&!aa(e,X0)&&!aa(e,oa)},mA=e=>{if(!Vs(e)||$s(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},gA=fr("Date"),EA=fr("File"),yA=e=>!!(e&&typeof e.uri!="undefined"),TA=e=>e&&typeof e.getParts!="undefined",bA=fr("Blob"),_A=fr("FileList"),SA=e=>Vs(e)&&Pn(e.pipe);function xA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const J0=xA(),Z0=typeof J0.FormData!="undefined"?J0.FormData:void 0,wA=e=>{if(!e)return!1;if(Z0&&e instanceof Z0)return!0;const t=zs(e);if(!t||t===Object.prototype||!Pn(e.append))return!1;const n=tf(e);return n==="formdata"||n==="object"&&Pn(e.toString)&&e.toString()==="[object FormData]"},AA=fr("URLSearchParams"),[CA,vA,kA,NA]=["ReadableStream","Request","Response","Headers"].map(fr),PA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ua(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Zi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if($s(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 eg(e,t){if($s(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const es=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,tg=e=>!js(e)&&e!==es;function nf(...e){const{caseless:t,skipUndefined:n}=tg(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&eg(r,u)||u,d=Zu(r,c)?r[c]:void 0;tl(d)&&tl(a)?r[c]=nf(d,a):tl(a)?r[c]=nf({},a):Zi(a)?r[c]=a.slice():(!n||!js(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||$s(c)||(ua(c,s),typeof c!="object"||Zi(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];jA.call(c,p)&&s(c[p],p)}}return r}const OA=(e,t,n,{allOwnKeys:r}={})=>(ua(t,(s,a)=>{n&&Pn(s)?Object.defineProperty(e,a,{__proto__:null,value:W0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),IA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),RA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},LA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&zs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},DA=(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},MA=e=>{if(!e)return null;if(Zi(e))return e;let t=e.length;if(!Q0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},FA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&zs(Uint8Array)),BA=(e,t)=>{const r=(e&&e[oa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},UA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},HA=fr("HTMLFormElement"),zA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:jA}=Object.prototype,$A=fr("RegExp"),ng=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ua(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},VA=e=>{ng(e,(t,n)=>{if(Pn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Pn(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+"'")})}})},qA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Zi(e)?r(e):r(String(e).split(t)),n},YA=()=>{},GA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function WA(e){return!!(e&&Pn(e.append)&&e[X0]==="FormData"&&e[oa])}const XA=e=>{const t=new WeakSet,n=r=>{if(Vs(r)){if(t.has(r))return;if($s(r))return r;if(!("toJSON"in r)){t.add(r);const s=Zi(r)?[]:{};return ua(r,(a,u)=>{const c=n(a);!js(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},KA=fr("AsyncFunction"),QA=e=>e&&(Vs(e)||Pn(e))&&Pn(e.then)&&Pn(e.catch),rg=((e,t)=>e?setImmediate:t?((n,r)=>(es.addEventListener("message",({source:s,data:a})=>{s===es&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),es.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pn(es.postMessage)),JA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(es):typeof process!="undefined"&&process.nextTick||rg,ig=e=>e!=null&&Pn(e[oa]),$={isArray:Zi,isArrayBuffer:K0,isBuffer:$s,isFormData:wA,isArrayBufferView:fA,isString:hA,isNumber:Q0,isBoolean:pA,isObject:Vs,isPlainObject:tl,isEmptyObject:mA,isReadableStream:CA,isRequest:vA,isResponse:kA,isHeaders:NA,isUndefined:js,isDate:gA,isFile:EA,isReactNativeBlob:yA,isReactNative:TA,isBlob:bA,isRegExp:$A,isFunction:Pn,isStream:SA,isURLSearchParams:AA,isTypedArray:FA,isFileList:_A,forEach:ua,merge:nf,extend:OA,trim:PA,stripBOM:IA,inherits:RA,toFlatObject:LA,kindOf:tf,kindOfTest:fr,endsWith:DA,toArray:MA,forEachEntry:BA,matchAll:UA,isHTMLForm:HA,hasOwnProperty:Zu,hasOwnProp:Zu,hasOwnInPrototypeChain:aa,getSafeProp:dA,reduceDescriptors:ng,freezeMethods:VA,toObjectSet:qA,toCamelCase:zA,noop:YA,toFiniteNumber:GA,findKey:eg,global:es,isContextDefined:tg,isSpecCompliantForm:WA,toJSONObject:XA,isAsyncFn:KA,isThenable:QA,setImmediate:rg,asap:JA,isIterable:ig,isSafeIterable:e=>e!=null&&aa(e,oa)&&ig(e)},ZA=$.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"]),eC=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
3
|
-
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&
|
|
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(s=>r.set(s)),r}static accessor(t){const r=(this[og]=this[og]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=la(u);r[c]||(lC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(hn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(hn);const cC="[REDACTED ****]";function dC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function fC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof hn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&dC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?cC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let be=class O2 extends Error{static from(t,n,r,s,a,u){const c=new O2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?fC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const hC=null,ag=100;function of(e){return $.isPlainObject(e)||$.isArray(e)}function ug(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function af(e,t,n){return e?e.concat(t).map(function(s,a){return s=ug(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function pC(e){return $.isArray(e)&&!e.some(of)}const mC=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function rl(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(N,C){return!$.isUndefined(C[N])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?ag:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if($.isDate(w))return w.toISOString();if($.isBoolean(w))return w.toString();if(!f&&$.isBlob(w))throw new be("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(w)||$.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new be("Object is too deeply nested ("+w+" levels). Max depth: "+d,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,N){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(Y,R){if(!$.isObject(R))return R;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(R),b(N+C.length-1),R})}function _(w,N,C){let U=w;if($.isReactNative(t)&&$.isReactNativeBlob(w))return t.append(af(C,N,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if($.endsWith(N,"{}"))N=r?N:N.slice(0,-2),w=y(w,1);else if($.isArray(w)&&pC(w)||($.isFileList(w)||$.endsWith(N,"[]"))&&(U=$.toArray(w)))return N=ug(N),U.forEach(function(R,q){!($.isUndefined(R)||R===null)&&t.append(u===!0?af([N],q,a):u===null?N:N+"[]",m(R))}),!1}return of(w)?!0:(t.append(af(C,N,a),m(w)),!1)}const A=Object.assign(mC,{defaultVisitor:_,convertValue:m,isVisitable:of});function v(w,N,C=0){if(!$.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+N.join("."));p.push(w),$.forEach(w,function(Y,R){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(R)?R.trim():R,N,A))===!0&&v(Y,N?N.concat(R):[R],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function lg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function uf(e,t){this._pairs=[],e&&rl(e,this,t)}const cg=uf.prototype;cg.append=function(t,n){this._pairs.push([t,n])},cg.toString=function(t){const n=t?r=>t.call(this,r,lg):lg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function gC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function dg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||gC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new uf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class fg{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){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const lf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},EC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:uf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},cf=typeof window!="undefined"&&typeof document!="undefined",df=typeof navigator=="object"&&navigator||void 0,yC=cf&&(!df||["ReactNative","NativeScript","NS"].indexOf(df.product)<0),TC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",bC=cf&&window.location.href||"http://localhost",nn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cf,hasStandardBrowserEnv:yC,hasStandardBrowserWebWorkerEnv:TC,navigator:df,origin:bC},Symbol.toStringTag,{value:"Module"}))),EC);function _C(e,t){return rl(e,new nn.classes.URLSearchParams,F({visitor:function(n,r,s,a){return nn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const hg=ag;function pg(e){if(e>hg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+hg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function SC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)pg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function xC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function mg(e){function t(n,r,s,a){pg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=xC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(SC(r),s,n,0)}),n}return null}const qs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function wC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ca={transitional:lf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(mg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=qs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return _C(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qs(this,"env"),p=f&&f.FormData;return rl(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),wC(t)):t}],transformResponse:[function(t){const n=qs(this,"transitional")||ca.transitional,r=n&&n.forcedJSONParsing,s=qs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,qs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{ca.headers[e]={}});function ff(e,t){const n=this||ca,r=t||n,s=hn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function gg(e){return!!(e&&e.__CANCEL__)}let da=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function Eg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}function AC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function CC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function vC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const il=(e,t,n=3)=>{let r=0;const s=CC(50,250);return vC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},yg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},Tg=e=>(...t)=>$.asap(()=>e(...t)),kC=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,NC=nn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function PC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function OC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const IC=/^https?:(?!\/\/)/i,RC=/[\t\n\r]/g;function LC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function DC(e){return LC(e).replace(RC,"")}function bg(e,t){if(typeof e=="string"&&IC.test(DC(e)))throw new be('Invalid URL: missing "//" after protocol',be.ERR_INVALID_URL,t)}function _g(e,t,n,r){bg(t,r);let s=!PC(t);return e&&(s||n===!1)?(bg(e,r),OC(e,t)):t}const Sg=e=>e instanceof hn?F({},e):e;function ts(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,b,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const b=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(b)&&$.hasOwnProp(b,p))return b[p]}function d(p,m,b){if($.hasOwnProp(t,b))return r(p,m);if($.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(Sg(p),Sg(m),b,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,A=b(y,_,m);$.isUndefined(A)&&b!==d||(n[m]=A)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const MC=["content-type","content-length"];function FC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{MC.includes(r.toLowerCase())&&e.set(r,s)})}const BC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function xg(e){const t=ts({},e),n=b=>$.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=hn.from(c),t.url=dg(_g(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?BC(y):"")))}catch(_){throw be.from(_,be.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&FC(c,r.getHeaders(),n("formDataHeaderPolicy"))),nn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&kC(t.url))){const y=a&&u&&NC.read(u);y&&c.set(a,y)}return t}const UC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=xg(e);let a=s.data;const u=hn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,_;function A(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=hn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};Eg(function(q){n(q),A()},function(q){r(q),A()},Y),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new be("Request aborted",be.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(U){const Y=U&&U.message?U.message:"Network Error",R=new be(Y,be.ERR_NETWORK,e,v);R.event=U||null,r(R),A(),v=null},v.ontimeout=function(){let U=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||lf;s.timeoutErrorMessage&&(U=s.timeoutErrorMessage),r(new be(U,Y.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(sg(u),function(U,Y){v.setRequestHeader(Y,U)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,_]=il(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=il(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new da(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const N=AC(s.url);if(N&&!nn.protocols.includes(N)){r(new be("Unsupported protocol "+N+":",be.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},HC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new da(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},zC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},jC=function(e,t){return Sd(this,null,function*(){try{for(var n=P2($C(e)),r,s,a;r=!(s=yield new Kr(n.next())).done;r=!1){const u=s.value;yield*s0(zC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Kr(s.call(n)))}finally{if(a)throw a[0]}}})},$C=function(e){return Sd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*s0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},wg=(e,t,n,r)=>{const s=jC(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},sl=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,VC=(e,t,n)=>t+2<n&&sl(e.charCodeAt(t+1))&&sl(e.charCodeAt(t+2));function qC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),A=r.charCodeAt(y+2);sl(_)&&sl(A)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&VC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const hf="1.18.1",Ag=64*1024,{isFunction:ol}=$,YC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),Cg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},vg=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},GC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},WC=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?ol(s):typeof fetch=="function",d=ol(a),f=ol(u);if(!c)return!1;const p=c&&ol(n),m=c&&(typeof r=="function"?(w=>N=>w.encode(N))(new r):w=>Ke(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&vg(()=>{let w=!1;const N=new a(nn.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=N.headers.has("Content-Type");return N.body!=null&&N.body.cancel(),w&&!C}),y=f&&p&&vg(()=>$.isReadableStream(new u("").body)),_={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!_[w]&&(_[w]=(N,C)=>{let U=N&&N[w];if(U)return U.call(N);throw new be(`Response type '${w}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const A=w=>Ke(null,null,function*(){if(w==null)return 0;if($.isBlob(w))return w.size;if($.isSpecCompliantForm(w))return(yield new a(nn.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if($.isArrayBufferView(w)||$.isArrayBuffer(w))return w.byteLength;if($.isURLSearchParams(w)&&(w=w+""),$.isString(w))return(yield m(w)).byteLength}),v=(w,N)=>Ke(null,null,function*(){const C=$.toFiniteNumber(w.getContentLength());return C==null?A(N):C});return w=>Ke(null,null,function*(){let{url:N,method:C,data:U,signal:Y,cancelToken:R,timeout:q,onDownloadProgress:ne,onUploadProgress:me,responseType:V,headers:se,withCredentials:he="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:oe}=xg(w);const xe=$.isNumber(re)&&re>-1,ae=$.isNumber(oe)&&oe>-1,Q=ye=>$.hasOwnProp(w,ye)?w[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let k=HC([Y,R&&R.toAbortSignal()],q),D=null;const ee=k&&k.unsubscribe&&(()=>{k.unsubscribe()});let I,_e=null;const Be=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,w,D);try{let ye;const Le=Q("auth");if(Le){const $e=$.getSafeProp(Le,"username")||"",vt=$.getSafeProp(Le,"password")||"";ye={username:$e,password:vt}}if(GC(N)){const $e=new URL(N,nn.origin);if(!ye&&($e.username||$e.password)){const vt=Cg($e.username),vn=Cg($e.password);ye={username:vt,password:vn}}($e.username||$e.password)&&($e.username="",$e.password="",N=$e.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(YC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof N=="string"&&N.startsWith("data:")&&qC(N)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);if(ae&&C!=="get"&&C!=="head"){const $e=yield A(U);if(typeof $e=="number"&&isFinite($e)&&(I=$e,$e>oe))throw Be()}const Ue=ae&&($.isReadableStream(U)||$.isStream(U)),Ye=($e,vt,vn)=>wg($e,Ag,sn=>{if(ae&&sn>oe)throw _e=Be();vt&&vt(sn)},vn);if(b&&C!=="get"&&C!=="head"&&(me||Ue)){if(I=I==null?yield v(se,U):I,I!==0||Ue){let $e=new a(N,{method:"POST",body:U,duplex:"half"}),vt;if($.isFormData(U)&&(vt=$e.headers.get("content-type"))&&se.setContentType(vt),$e.body){const[vn,sn]=me&&yg(I,il(Tg(me)))||[];U=Ye($e.body,vn,sn)}}}else if(Ue&&!d&&p&&C!=="get"&&C!=="head")U=Ye(U);else if(Ue&&d&&!b&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,w,D);$.isString(he)||(he=he?"include":"omit");const Tt=d&&"credentials"in a.prototype;if($.isFormData(U)){const $e=se.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&se.delete("content-type")}se.set("User-Agent","axios/"+hf,!1);const Cn=de(F({},ve),{signal:k,method:C.toUpperCase(),headers:sg(se.normalize()),body:U,duplex:"half",credentials:Tt?he:void 0});D=d&&new a(N,Cn);let rn=yield d?ie(D,ve):ie(N,Cn);const Tr=hn.from(rn.headers);if(xe){const $e=$.toFiniteNumber(Tr.getContentLength());if($e!=null&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}const ir=y&&(V==="stream"||V==="response");if(y&&rn.body&&(ne||xe||ir&&ee)){const $e={};["status","statusText","headers"].forEach(Pe=>{$e[Pe]=rn[Pe]});const vt=$.toFiniteNumber(Tr.getContentLength()),[vn,sn]=ne&&yg(vt,il(Tg(ne),!0))||[];let Mn=0;const we=Pe=>{if(xe&&(Mn=Pe,Mn>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);vn&&vn(Pe)};rn=new u(wg(rn.body,Ag,we,()=>{sn&&sn(),ee&&ee()}),$e)}V=V||"text";let Qt=yield _[$.findKey(_,V)||"text"](rn,w);if(xe&&!y&&!ir){let $e;if(Qt!=null&&(typeof Qt.byteLength=="number"?$e=Qt.byteLength:typeof Qt.size=="number"?$e=Qt.size:typeof Qt=="string"&&($e=typeof r=="function"?new r().encode(Qt).byteLength:Qt.length)),typeof $e=="number"&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}return!ir&&ee&&ee(),yield new Promise(($e,vt)=>{Eg($e,vt,{data:Qt,headers:hn.from(rn.headers),status:rn.status,statusText:rn.statusText,config:w,request:D})})}catch(ye){if(ee&&ee(),k&&k.aborted&&k.reason instanceof be){const Le=k.reason;throw Le.config=w,D&&(Le.request=D),ye!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Le}if(_e)throw D&&!_e.request&&(_e.request=D),_e;if(ye instanceof be)throw D&&!ye.request&&(ye.request=D),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Le=new be("Network Error",be.ERR_NETWORK,w,D,ye&&ye.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Le}throw be.from(ye,ye&&ye.code,w,D,ye&&ye.response)}})},XC=new Map,kg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=XC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:WC(t)),p=f;return f};kg();const pf={http:hC,xhr:UC,fetch:{get:kg}};$.forEach(pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Ng=e=>`- ${e}`,KC=e=>$.isFunction(e)||e===null||e===!1;function QC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!KC(r)&&(s=pf[(c=String(r)).toLowerCase()],s===void 0))throw new be(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){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(
|
|
6
|
-
`):" "+
|
|
1
|
+
(function(qe,je){typeof exports=="object"&&typeof module!="undefined"?module.exports=je():typeof define=="function"&&define.amd?define(je):(qe=typeof globalThis!="undefined"?globalThis:qe||self,qe["cimulate-copilot-widget"]=je())})(this,(function(){"use strict";var x7=Object.defineProperty,w7=Object.defineProperties;var A7=Object.getOwnPropertyDescriptors;var _d=Object.getOwnPropertySymbols;var k2=Object.prototype.hasOwnProperty,P2=Object.prototype.propertyIsEnumerable;var Ko=(qe,je)=>(je=Symbol[qe])?je:Symbol.for("Symbol."+qe),C7=qe=>{throw TypeError(qe)},Mu=Math.pow,s0=(qe,je,Qe)=>je in qe?x7(qe,je,{enumerable:!0,configurable:!0,writable:!0,value:Qe}):qe[je]=Qe,F=(qe,je)=>{for(var Qe in je||(je={}))k2.call(je,Qe)&&s0(qe,Qe,je[Qe]);if(_d)for(var Qe of _d(je))P2.call(je,Qe)&&s0(qe,Qe,je[Qe]);return qe},fe=(qe,je)=>w7(qe,A7(je));var cn=(qe,je)=>{var Qe={};for(var ot in qe)k2.call(qe,ot)&&je.indexOf(ot)<0&&(Qe[ot]=qe[ot]);if(qe!=null&&_d)for(var ot of _d(qe))je.indexOf(ot)<0&&P2.call(qe,ot)&&(Qe[ot]=qe[ot]);return Qe};var Se=(qe,je,Qe)=>s0(qe,typeof je!="symbol"?je+"":je,Qe);var Ke=(qe,je,Qe)=>new Promise((ot,Dt)=>{var Re=pt=>{try{dn(Qe.next(pt))}catch(fn){Dt(fn)}},tn=pt=>{try{dn(Qe.throw(pt))}catch(fn){Dt(fn)}},dn=pt=>pt.done?ot(pt.value):Promise.resolve(pt.value).then(Re,tn);dn((Qe=Qe.apply(qe,je)).next())}),Kr=function(qe,je){this[0]=qe,this[1]=je},Sd=(qe,je,Qe)=>{var ot=(dn,pt,fn,vr)=>{try{var Ds=Qe[dn](pt),Xi=(pt=Ds.value)instanceof Kr,Qo=Ds.done;Promise.resolve(Xi?pt[0]:pt).then(S=>Xi?ot(dn==="return"?dn:"next",pt[1]?{done:S.done,value:S.value}:S,fn,vr):fn({value:S,done:Qo})).catch(S=>ot("throw",S,fn,vr))}catch(S){vr(S)}},Dt=(dn,pt,fn,vr)=>tn[dn]=Ds=>(pt=new Promise((Xi,Qo,S)=>(S=()=>ot(dn,Ds,Xi,Qo),Re?Re.then(S):S())),vr=()=>Re===fn&&(Re=0),Re=fn=pt.then(vr,vr),pt),Re,tn={};return Qe=Qe.apply(qe,je),tn[Ko("asyncIterator")]=()=>tn,Dt("next"),Dt("throw"),Dt("return"),tn},o0=qe=>{var je=qe[Ko("asyncIterator")],Qe=!1,ot,Dt={};return je==null?(je=qe[Ko("iterator")](),ot=Re=>Dt[Re]=tn=>je[Re](tn)):(je=je.call(qe),ot=Re=>Dt[Re]=tn=>{if(Qe){if(Qe=!1,Re==="throw")throw tn;return tn}return Qe=!0,{done:!1,value:new Kr(new Promise(dn=>{var pt=je[Re](tn);pt instanceof Object||C7("Object expected"),dn(pt)}),1)}}),Dt[Ko("iterator")]=()=>Dt,ot("next"),"throw"in je?ot("throw"):Dt.throw=Re=>{throw Re},"return"in je&&ot("return"),Dt},O2=(qe,je,Qe)=>(je=qe[Ko("asyncIterator")])?je.call(qe):(qe=qe[Ko("iterator")](),je={},Qe=(ot,Dt)=>(Dt=qe[ot])&&(je[ot]=Re=>new Promise((tn,dn,pt)=>(Re=Dt.call(qe,Re),pt=Re.done,Promise.resolve(Re.value).then(fn=>tn({value:fn,done:pt}),dn)))),Qe("next"),Qe("return"),je);var qe=document.createElement("style");qe.textContent=`.cim-widget-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:32px;min-height:32px;height:auto;line-height:normal;background-color:transparent;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);padding:0;cursor:pointer;color:#333;font-size:18px;svg{padding:6px;height:100%;width:100%}&:hover{background-color:#f0f0f0}&:disabled,&[disabled]{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-icon-image{object-fit:contain;padding:6px;width:.875em;height:.875em}.cim-widget-minimized-container{--base-color: var(--cim-widget-primary-color, #3182ce);--base-color-darken: color-mix(in srgb, var(--base-color), black 20%);position:fixed;z-index:9999;bottom:1rem;right:1rem;display:flex;align-items:center;justify-content:center;.cim-widget-minimized-button{height:3rem;width:3rem;border-radius:2rem;padding:.25rem;color:#fff;box-shadow:0 4px 6px #00000040,0 1px 3px #00000050;background-color:var(--base-color);transition:background-color .1s ease-in-out;&:active{transform:translateY(1px);box-shadow:0 4px 6px #00000020,0 1px 3px #00000030}&:hover{background-color:var(--base-color-darken)}}.cim-widget-minimized-icon-img{object-fit:contain;width:stretch;height:stretch}}.cim-widget-close-button{display:flex;align-items:center;justify-content:center;padding:.5rem;height:auto;line-height:normal;border-radius:var(--cim-widget-border-radius);border:1px solid transparent;background-color:transparent;cursor:pointer;&:hover{background-color:#f0f0f0}}.cim-widget-button{--base-color: var(--cim-widget-primary-color, #3182ce);padding:.25rem .5rem;min-height:32px;height:auto;line-height:normal;background-color:var(--base-color);border-radius:var(--cim-widget-border-radius);border-color:var(--base-color);border-style:solid;color:#fff;font-family:var(--cim-widget-font-family, inherit);cursor:pointer;&:disabled,&[disabled]{cursor:not-allowed;opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}&:focus-visible{outline:2px solid color-mix(in srgb,var(--base-color),white 25%)}}.cim-widget-cancel-button{color:#8a8a8a}.cim-widget-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family)}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}input.cim-widget-search-input{width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){input.cim-widget-search-input{font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button{display:inline-flex;height:100%;border-radius:4px;cursor:pointer;&:hover{background-color:#f0f0f0}&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-image-upload-label{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin-bottom:0;cursor:pointer;&.disabled{cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex!important}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:8px;height:8px;border-radius:50%;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:background-color .2s ease,transform .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);transform:scale(1.25)}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-toggle-modal-button.cim-dialog-component{display:none}@media(min-width:576px){.cim-widget-toggle-modal-button.cim-dialog-component{display:inline-flex}}.cim-widget-product-tile{display:inline-flex;flex-direction:column;background-color:#fff;border-radius:var(--cim-widget-border-radius);box-shadow:0 1px 3px #0000001a}.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:10dvw;max-width:30dvw}.cim-widget-product-tile-image{object-fit:contain;width:100%;height:auto;max-height:25dvh;border-top-left-radius:4px;border-top-right-radius:4px}.cim-widget-product-tile-details{height:100%;display:flex;flex-direction:column;justify-content:space-between;padding:.5rem}.cim-widget-product-tile-brand{color:var(--cim-widget-primary-color)}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name,.cim-widget-product-tile-price,.cim-widget-product-tile-pid{display:inline-block;line-height:1.25rem;font-size:.875rem}.cim-widget-product-tile-name{font-weight:700}.cim-widget-product-tile-pdp{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,black);text-decoration:none;word-wrap:break-word;&:hover{text-decoration:underline}}.cim-widget-product-tile-pdp-arrow{display:inline-block;transform:rotate(-45deg)}.cim-widget-product-tile-footer{display:flex;justify-content:space-between;align-items:center;padding-top:.5rem;gap:.5rem}.cim-widget-product-tile-price{font-weight:700}@media(max-width:576px){.cim-widget-product-tile.embedded,.cim-widget-product-tile.standalone{min-width:30dvw;max-width:45dvw}.cim-widget-product-tile-pdp,.cim-widget-product-tile-name{display:-webkit-box;line-clamp:3;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-display-products{flex-direction:column}.cim-widget-error-message-text{display:inline-flex;align-items:center;gap:.5rem;color:#e53e3e;&.embedded svg{min-width:1.25rem;height:1.25rem}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cursor-blink 1.5s steps(2) infinite}@keyframes cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-progress-message.embedded,.cim-widget-progress-message.standalone{display:flex;align-items:center}.cim-widget-progress-text.embedded{font-size:.85rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);line-height:1rem;line-clamp:3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-progress-text.standalone{font-size:inherit;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 85%,white)}.cim-widget-thought-container{padding-left:.5rem;margin:.5rem;border-left:2px solid var(--cim-widget-primary-color)}p.cim-widget-progress-thought{margin-bottom:1rem;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 70%,white);line-height:1;font-size:.875rem}.cim-widget-thought-context-button{display:inline-flex;align-items:center;justify-content:space-between;padding:.25rem;min-width:84px;background-color:transparent;border-color:transparent;color:var(--cim-widget-primary-color);font-weight:700;cursor:pointer;&:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}}.cim-widget-message-icon.progress-icon.embedded{color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 50%,white)}.cim-widget-refined-event{display:flex;flex-direction:column}.cim-widget-refined-event-query{display:inline-flex;align-items:center;gap:4px;color:var(--cim-widget-primary-color)}.cim-widget-refined-event-query-text{line-height:normal}.cim-widget-message-icon.refined-event-icon{font-size:1.5rem;&.embedded,&.standalone{color:var(--cim-widget-primary-color)}}.cim-widget-facet-pill{display:inline-flex;align-items:center;margin-left:4px;padding:.25rem .5rem;color:var(--cim-widget-primary-color);border-radius:9999px;font-size:.75rem;font-weight:700;&.embedded{background-color:#ffffff90}&.standalone{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent)}}.cim-widget-facet-filters{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:.25rem}.cim-widget-facets{display:flex;flex-direction:column;padding:.25rem}.cim-widget-facets .cim-widget-facet-category{margin-bottom:0;font-size:.875rem;font-weight:700;word-wrap:break-word}.cim-widget-facets .cim-widget-facet-values{margin-top:0;font-size:.675rem}.cim-widget-message-timestamp.standalone{font-size:.75rem;color:#00000090}.cim-widget-message-timestamp.embedded{font-size:.65rem;color:#333333bf}.cim-widget-user-message{display:flex;flex-direction:column;gap:.5rem;.cim-widget-user-message-row{display:inline-flex;align-items:center;gap:.5rem}}.cim-widget-user-message.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%}.cim-widget-user-message.standalone{margin:.5rem 0}.cim-widget-user-message-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-message-text{font-weight:700}.cim-widget-user-message-text.standalone{font-size:1.125rem;margin:0}.cim-widget-user-message-text.embedded{margin:0}.cim-widget-message-icon.user-message-icon.embedded{color:var(--cim-widget-primary-color)}.cim-widget-user-search{display:flex;flex-direction:column}.cim-widget-user-search.embedded{display:inline-flex;align-self:flex-end;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 10%,transparent);max-width:80%;min-width:50%;gap:4px}.cim-widget-user-search.standalone{flex-direction:column;font-size:1.125rem;padding-top:.5rem;padding-bottom:.5rem}.cim-widget-user-search-image{object-fit:contain;border-radius:8px;&.embedded{max-height:2.5rem}&.standalone{max-height:3.5rem}}.cim-widget-user-search-query{display:inline-flex}.cim-widget-message-icon.user-search-icon.embedded,.cim-widget-message-icon.user-search-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.message{border-radius:.5rem}.widget-message{display:flex;align-self:flex-start}.user-message{display:flex;align-self:flex-end;padding:1rem}.cim-widget-reset-message{font-size:.75rem;font-style:italic;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 75%,white)}.cim-widget-start-search-message{font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color)}.cim-widget-message-group,.cim-widget-message{display:flex;flex-direction:column}.cim-widget-message-group{gap:.5rem;padding:.5rem 1rem;margin-bottom:1rem;border-radius:var(--cim-widget-border-radius);&.standalone{padding:0 1rem}.cim-widget-message-group-child{max-width:100%;margin-bottom:.25rem}}.cim-widget-message-group.embedded{max-width:80%;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent)}.cim-widget-message{margin-bottom:1rem}.cim-widget-message.standalone{border-radius:0;background-color:transparent;padding:0 1rem}.cim-widget-message.embedded{margin-bottom:1rem}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem;animation:cim-widget-dialog-slide-in-left .25s ease-out}&.bottom-right{bottom:.5rem;right:.5rem;animation:cim-widget-dialog-slide-in-right .25s ease-out}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column;height:100%}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw!important;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left,.cim-widget-dialog.bottom-right{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding:1rem;&.container-end{>:first-child{margin-top:auto}}}.cim-widget-message-icon{display:inline-flex;align-items:center;margin-right:.25rem}.cim-widget-message-icon.embedded{font-size:1rem;color:var(--cim-widget-secondary-color)}.cim-widget-message-icon.standalone{font-size:1.5rem;color:var(--cim-widget-primary-color)}.cim-widget-suggestion-container.embedded{display:inline-flex;flex-wrap:wrap;gap:.5rem}.cim-widget-suggestion-button.embedded{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:600;font-family:inherit;line-height:normal;text-transform:none;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-suggestion-button.embedded:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-container.standalone{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:.5rem;padding:.5rem 0}@media(max-width:768px){.cim-widget-suggestion-container.standalone{grid-template-columns:repeat(1,1fr)}}.cim-widget-suggestion-button.standalone{display:inline-flex;align-items:center;padding:.5rem 1rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 5%,transparent);font-weight:700;line-height:normal;color:var(--cim-widget-primary-color);text-align:left;white-space:normal;word-break:break-word}.cim-widget-suggestion-button.standalone:hover{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 15%,transparent);color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-suggestion-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-suggestion-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-suggestion-button-icon{flex-shrink:0}.cim-widget-suggestion-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-suggestion-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:.5rem;box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:4px;background-color:transparent;font-size:.875rem;font-weight:800;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:.5rem;border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:.5rem;background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}
|
|
2
|
+
/*$vite$:1*/`,document.head.appendChild(qe);function je(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Qe={exports:{}},ot={},Dt={exports:{}},Re={};var tn;function dn(){if(tn)return Re;tn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),a=Symbol.for("react.provider"),u=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),d=Symbol.for("react.suspense"),f=Symbol.for("react.memo"),p=Symbol.for("react.lazy"),m=Symbol.iterator;function b(D){return D===null||typeof D!="object"?null:(D=m&&D[m]||D["@@iterator"],typeof D=="function"?D:null)}var y={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},_=Object.assign,A={};function v(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}v.prototype.isReactComponent={},v.prototype.setState=function(D,ee){if(typeof D!="object"&&typeof D!="function"&&D!=null)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,D,ee,"setState")},v.prototype.forceUpdate=function(D){this.updater.enqueueForceUpdate(this,D,"forceUpdate")};function w(){}w.prototype=v.prototype;function k(D,ee,I){this.props=D,this.context=ee,this.refs=A,this.updater=I||y}var C=k.prototype=new w;C.constructor=k,_(C,v.prototype),C.isPureReactComponent=!0;var H=Array.isArray,Y=Object.prototype.hasOwnProperty,L={current:null},q={key:!0,ref:!0,__self:!0,__source:!0};function ne(D,ee,I){var _e,Be={},ye=null,Le=null;if(ee!=null)for(_e in ee.ref!==void 0&&(Le=ee.ref),ee.key!==void 0&&(ye=""+ee.key),ee)Y.call(ee,_e)&&!q.hasOwnProperty(_e)&&(Be[_e]=ee[_e]);var Ue=arguments.length-2;if(Ue===1)Be.children=I;else if(1<Ue){for(var Ye=Array(Ue),Tt=0;Tt<Ue;Tt++)Ye[Tt]=arguments[Tt+2];Be.children=Ye}if(D&&D.defaultProps)for(_e in Ue=D.defaultProps,Ue)Be[_e]===void 0&&(Be[_e]=Ue[_e]);return{$$typeof:e,type:D,key:ye,ref:Le,props:Be,_owner:L.current}}function de(D,ee){return{$$typeof:e,type:D.type,key:ee,ref:D.ref,props:D.props,_owner:D._owner}}function V(D){return typeof D=="object"&&D!==null&&D.$$typeof===e}function se(D){var ee={"=":"=0",":":"=2"};return"$"+D.replace(/[=:]/g,function(I){return ee[I]})}var pe=/\/+/g;function ve(D,ee){return typeof D=="object"&&D!==null&&D.key!=null?se(""+D.key):ee.toString(36)}function re(D,ee,I,_e,Be){var ye=typeof D;(ye==="undefined"||ye==="boolean")&&(D=null);var Le=!1;if(D===null)Le=!0;else switch(ye){case"string":case"number":Le=!0;break;case"object":switch(D.$$typeof){case e:case t:Le=!0}}if(Le)return Le=D,Be=Be(Le),D=_e===""?"."+ve(Le,0):_e,H(Be)?(I="",D!=null&&(I=D.replace(pe,"$&/")+"/"),re(Be,ee,I,"",function(Tt){return Tt})):Be!=null&&(V(Be)&&(Be=de(Be,I+(!Be.key||Le&&Le.key===Be.key?"":(""+Be.key).replace(pe,"$&/")+"/")+D)),ee.push(Be)),1;if(Le=0,_e=_e===""?".":_e+":",H(D))for(var Ue=0;Ue<D.length;Ue++){ye=D[Ue];var Ye=_e+ve(ye,Ue);Le+=re(ye,ee,I,Ye,Be)}else if(Ye=b(D),typeof Ye=="function")for(D=Ye.call(D),Ue=0;!(ye=D.next()).done;)ye=ye.value,Ye=_e+ve(ye,Ue++),Le+=re(ye,ee,I,Ye,Be);else if(ye==="object")throw ee=String(D),Error("Objects are not valid as a React child (found: "+(ee==="[object Object]"?"object with keys {"+Object.keys(D).join(", ")+"}":ee)+"). If you meant to render a collection of children, use an array instead.");return Le}function oe(D,ee,I){if(D==null)return D;var _e=[],Be=0;return re(D,_e,"","",function(ye){return ee.call(I,ye,Be++)}),_e}function xe(D){if(D._status===-1){var ee=D._result;ee=ee(),ee.then(function(I){(D._status===0||D._status===-1)&&(D._status=1,D._result=I)},function(I){(D._status===0||D._status===-1)&&(D._status=2,D._result=I)}),D._status===-1&&(D._status=0,D._result=ee)}if(D._status===1)return D._result.default;throw D._result}var ae={current:null},Q={transition:null},ie={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:Q,ReactCurrentOwner:L};function N(){throw Error("act(...) is not supported in production builds of React.")}return Re.Children={map:oe,forEach:function(D,ee,I){oe(D,function(){ee.apply(this,arguments)},I)},count:function(D){var ee=0;return oe(D,function(){ee++}),ee},toArray:function(D){return oe(D,function(ee){return ee})||[]},only:function(D){if(!V(D))throw Error("React.Children.only expected to receive a single React element child.");return D}},Re.Component=v,Re.Fragment=n,Re.Profiler=s,Re.PureComponent=k,Re.StrictMode=r,Re.Suspense=d,Re.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=ie,Re.act=N,Re.cloneElement=function(D,ee,I){if(D==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+D+".");var _e=_({},D.props),Be=D.key,ye=D.ref,Le=D._owner;if(ee!=null){if(ee.ref!==void 0&&(ye=ee.ref,Le=L.current),ee.key!==void 0&&(Be=""+ee.key),D.type&&D.type.defaultProps)var Ue=D.type.defaultProps;for(Ye in ee)Y.call(ee,Ye)&&!q.hasOwnProperty(Ye)&&(_e[Ye]=ee[Ye]===void 0&&Ue!==void 0?Ue[Ye]:ee[Ye])}var Ye=arguments.length-2;if(Ye===1)_e.children=I;else if(1<Ye){Ue=Array(Ye);for(var Tt=0;Tt<Ye;Tt++)Ue[Tt]=arguments[Tt+2];_e.children=Ue}return{$$typeof:e,type:D.type,key:Be,ref:ye,props:_e,_owner:Le}},Re.createContext=function(D){return D={$$typeof:u,_currentValue:D,_currentValue2:D,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},D.Provider={$$typeof:a,_context:D},D.Consumer=D},Re.createElement=ne,Re.createFactory=function(D){var ee=ne.bind(null,D);return ee.type=D,ee},Re.createRef=function(){return{current:null}},Re.forwardRef=function(D){return{$$typeof:c,render:D}},Re.isValidElement=V,Re.lazy=function(D){return{$$typeof:p,_payload:{_status:-1,_result:D},_init:xe}},Re.memo=function(D,ee){return{$$typeof:f,type:D,compare:ee===void 0?null:ee}},Re.startTransition=function(D){var ee=Q.transition;Q.transition={};try{D()}finally{Q.transition=ee}},Re.unstable_act=N,Re.useCallback=function(D,ee){return ae.current.useCallback(D,ee)},Re.useContext=function(D){return ae.current.useContext(D)},Re.useDebugValue=function(){},Re.useDeferredValue=function(D){return ae.current.useDeferredValue(D)},Re.useEffect=function(D,ee){return ae.current.useEffect(D,ee)},Re.useId=function(){return ae.current.useId()},Re.useImperativeHandle=function(D,ee,I){return ae.current.useImperativeHandle(D,ee,I)},Re.useInsertionEffect=function(D,ee){return ae.current.useInsertionEffect(D,ee)},Re.useLayoutEffect=function(D,ee){return ae.current.useLayoutEffect(D,ee)},Re.useMemo=function(D,ee){return ae.current.useMemo(D,ee)},Re.useReducer=function(D,ee,I){return ae.current.useReducer(D,ee,I)},Re.useRef=function(D){return ae.current.useRef(D)},Re.useState=function(D){return ae.current.useState(D)},Re.useSyncExternalStore=function(D,ee,I){return ae.current.useSyncExternalStore(D,ee,I)},Re.useTransition=function(){return ae.current.useTransition()},Re.version="18.3.1",Re}var pt;function fn(){return pt||(pt=1,Dt.exports=dn()),Dt.exports}var vr;function Ds(){if(vr)return ot;vr=1;var e=fn(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,a={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var p,m={},b=null,y=null;f!==void 0&&(b=""+f),d.key!==void 0&&(b=""+d.key),d.ref!==void 0&&(y=d.ref);for(p in d)r.call(d,p)&&!a.hasOwnProperty(p)&&(m[p]=d[p]);if(c&&c.defaultProps)for(p in d=c.defaultProps,d)m[p]===void 0&&(m[p]=d[p]);return{$$typeof:t,type:c,key:b,ref:y,props:m,_owner:s.current}}return ot.Fragment=n,ot.jsx=u,ot.jsxs=u,ot}var Xi;function Qo(){return Xi||(Xi=1,Qe.exports=Ds()),Qe.exports}var S=Qo();const Nr=Object.create(null);Nr.open="0",Nr.close="1",Nr.ping="2",Nr.pong="3",Nr.message="4",Nr.upgrade="5",Nr.noop="6";const Fu=Object.create(null);Object.keys(Nr).forEach(e=>{Fu[Nr[e]]=e});const xd={type:"error",data:"parser error"},a0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",u0=typeof ArrayBuffer=="function",l0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,wd=({type:e,data:t},n,r)=>a0&&t instanceof Blob?n?r(t):c0(t,r):u0&&(t instanceof ArrayBuffer||l0(t))?n?r(t):c0(new Blob([t]),r):r(Nr[e]+(t||"")),c0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function d0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Ad;function D2(e,t){if(a0&&e.data instanceof Blob)return e.data.arrayBuffer().then(d0).then(t);if(u0&&(e.data instanceof ArrayBuffer||l0(e.data)))return t(d0(e.data));wd(e,!1,n=>{Ad||(Ad=new TextEncoder),t(Ad.encode(n))})}const f0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Jo=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<f0.length;e++)Jo[f0.charCodeAt(e)]=e;const M2=e=>{let t=e.length*.75,n=e.length,r,s=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=Jo[e.charCodeAt(r)],u=Jo[e.charCodeAt(r+1)],c=Jo[e.charCodeAt(r+2)],d=Jo[e.charCodeAt(r+3)],p[s++]=a<<2|u>>4,p[s++]=(u&15)<<4|c>>2,p[s++]=(c&3)<<6|d&63;return f},F2=typeof ArrayBuffer=="function",Cd=(e,t)=>{if(typeof e!="string")return{type:"message",data:h0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:B2(e.substring(1),t)}:Fu[n]?e.length>1?{type:Fu[n],data:e.substring(1)}:{type:Fu[n]}:xd},B2=(e,t)=>{if(F2){const n=M2(e);return h0(n,t)}else return{base64:!0,data:e}},h0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,p0="",U2=(e,t)=>{const n=e.length,r=new Array(n);let s=0;e.forEach((a,u)=>{wd(a,!1,c=>{r[u]=c,++s===n&&t(r.join(p0))})})},H2=(e,t)=>{const n=e.split(p0),r=[];for(let s=0;s<n.length;s++){const a=Cd(n[s],t);if(r.push(a),a.type==="error")break}return r};function z2(){return new TransformStream({transform(e,t){D2(e,n=>{const r=n.length;let s;if(r<126)s=new Uint8Array(1),new DataView(s.buffer).setUint8(0,r);else if(r<65536){s=new Uint8Array(3);const a=new DataView(s.buffer);a.setUint8(0,126),a.setUint16(1,r)}else{s=new Uint8Array(9);const a=new DataView(s.buffer);a.setUint8(0,127),a.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(s[0]|=128),t.enqueue(s),t.enqueue(n)})}})}let vd;function Bu(e){return e.reduce((t,n)=>t+n.length,0)}function Uu(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let s=0;s<t;s++)n[s]=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 j2(e,t){vd||(vd=new TextDecoder);const n=[];let r=0,s=-1,a=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(Bu(n)<1)break;const d=Uu(n,1);a=(d[0]&128)===128,s=d[0]&127,s<126?r=3:s===126?r=1:r=2}else if(r===1){if(Bu(n)<2)break;const d=Uu(n,2);s=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(Bu(n)<8)break;const d=Uu(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),p=f.getUint32(0);if(p>Math.pow(2,21)-1){c.enqueue(xd);break}s=p*Math.pow(2,32)+f.getUint32(4),r=3}else{if(Bu(n)<s)break;const d=Uu(n,s);c.enqueue(Cd(a?d:vd.decode(d),t)),r=0}if(s===0||s>e){c.enqueue(xd);break}}}})}const m0=4;function Mt(e){if(e)return $2(e)}function $2(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,s=0;s<n.length;s++)if(r=n[s],r===t||r.fn===t){n.splice(s,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,s=n.length;r<s;++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 Hu=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),Qn=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),V2="arraybuffer";function v7(){}function g0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const q2=Qn.setTimeout,Y2=Qn.clearTimeout;function zu(e,t){t.useNativeTimers?(e.setTimeoutFn=q2.bind(Qn),e.clearTimeoutFn=Y2.bind(Qn)):(e.setTimeoutFn=Qn.setTimeout.bind(Qn),e.clearTimeoutFn=Qn.clearTimeout.bind(Qn))}const G2=1.33;function W2(e){return typeof e=="string"?X2(e):Math.ceil((e.byteLength||e.size)*G2)}function X2(e){let t=0,n=0;for(let r=0,s=e.length;r<s;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 E0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function K2(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function Q2(e){let t={},n=e.split("&");for(let r=0,s=n.length;r<s;r++){let a=n[r].split("=");t[decodeURIComponent(a[0])]=decodeURIComponent(a[1])}return t}class J2 extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Nd extends Mt{constructor(t){super(),this.writable=!1,zu(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 J2(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=Cd(t,this.socket.binaryType);this.onPacket(n)}onPacket(t){super.emitReserved("packet",t)}onClose(t){this.readyState="closed",super.emitReserved("close",t)}pause(t){}createUri(t,n={}){return t+"://"+this._hostname()+this._port()+this.opts.path+this._query(n)}_hostname(){const t=this.opts.hostname;return t.indexOf(":")===-1?t:"["+t+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(this.opts.port)!==443||!this.opts.secure&&Number(this.opts.port)!==80)?":"+this.opts.port:""}_query(t){const n=K2(t);return n.length?"?"+n:""}}class Z2 extends Nd{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)};H2(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,U2(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]=E0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let y0=!1;try{y0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const ew=y0;function tw(){}class nw extends Z2{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",(s,a)=>{this.onError("xhr post error",s,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 kr extends Mt{constructor(t,n,r){super(),this.createRequest=t,zu(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=g0(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 s in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(s)&&r.setRequestHeader(s,this._opts.extraHeaders[s])}}catch(s){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(s){}try{r.setRequestHeader("Accept","*/*")}catch(s){}(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 s;r.readyState===3&&((s=this._opts.cookieJar)===null||s===void 0||s.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(s){this.setTimeoutFn(()=>{this._onError(s)},0);return}typeof document!="undefined"&&(this._index=kr.requestsCount++,kr.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=tw,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete kr.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(kr.requestsCount=0,kr.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",T0);else if(typeof addEventListener=="function"){const e="onpagehide"in Qn?"pagehide":"unload";addEventListener(e,T0,!1)}}function T0(){for(let e in kr.requests)kr.requests.hasOwnProperty(e)&&kr.requests[e].abort()}const rw=(function(){const e=b0({xdomain:!1});return e&&e.responseType!==null})();class iw extends nw{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=rw&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new kr(b0,this.uri(),t)}}function b0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||ew))return new XMLHttpRequest}catch(n){}if(!t)try{return new Qn[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const _0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class sw extends Nd{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=_0?{}:g0(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(s){return this.emitReserved("error",s)}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],s=n===t.length-1;wd(r,this.supportsBinary,a=>{try{this.doWrite(r,a)}catch(u){}s&&Hu(()=>{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]=E0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const kd=Qn.WebSocket||Qn.MozWebSocket;class ow extends sw{createSocket(t,n,r){return _0?new kd(t,n,r):n?new kd(t,n):new kd(t)}doWrite(t,n){this.ws.send(n)}}class aw extends Nd{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=j2(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),s=z2();s.readable.pipeTo(t.writable),this._writer=s.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],s=n===t.length-1;this._writer.write(r).then(()=>{s&&Hu(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const uw={websocket:ow,webtransport:aw,polling:iw},lw=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,cw=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function Pd(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 s=lw.exec(e||""),a={},u=14;for(;u--;)a[cw[u]]=s[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=dw(a,a.path),a.queryKey=fw(a,a.query),a}function dw(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 fw(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,s,a){s&&(n[s]=a)}),n}const Od=typeof addEventListener=="function"&&typeof removeEventListener=="function",ju=[];Od&&addEventListener("offline",()=>{ju.forEach(e=>e())},!1);class Ei extends Mt{constructor(t,n){if(super(),this.binaryType=V2,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=Pd(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=Pd(n.host).host);zu(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 s=r.prototype.name;this.transports.push(s),this._transportsByName[s]=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=Q2(this.opts.query)),Od&&(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"})},ju.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=m0,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&&Ei.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",Ei.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 s=this.writeBuffer[r].data;if(s&&(n+=W2(s)),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,Hu(()=>{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,s){if(typeof n=="function"&&(s=n,n=void 0),typeof r=="function"&&(s=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),s&&this.once("flush",s),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(Ei.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(),Od&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=ju.indexOf(this._offlineEventListener);r!==-1&&ju.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Ei.protocol=m0;class hw extends Ei{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;Ei.priorWebsocketSuccess=!1;const s=()=>{r||(n.send([{type:"ping",data:"probe"}]),n.once("packet",m=>{if(!r)if(m.type==="pong"&&m.data==="probe"){if(this.upgrading=!0,this.emitReserved("upgrading",n),!n)return;Ei.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=m=>{const b=new Error("probe error: "+m);b.transport=n.name,a(),this.emitReserved("upgradeError",b)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&a()}const p=()=>{n.removeListener("open",s),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",s),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 pw=class extends hw{constructor(t,n={}){const r=typeof t=="object",s=r?F({},t):F({},n);(!s.transports||s.transports&&typeof s.transports[0]=="string")&&(s.transports=(s.transports||["polling","websocket","webtransport"]).map(a=>uw[a]).filter(a=>!!a)),super(r?s:t,s)}};function mw(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=Pd(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 gw=typeof ArrayBuffer=="function",Ew=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,S0=Object.prototype.toString,yw=typeof Blob=="function"||typeof Blob!="undefined"&&S0.call(Blob)==="[object BlobConstructor]",Tw=typeof File=="function"||typeof File!="undefined"&&S0.call(File)==="[object FileConstructor]";function Id(e){return gw&&(e instanceof ArrayBuffer||Ew(e))||yw&&e instanceof Blob||Tw&&e instanceof File}function $u(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if($u(e[n]))return!0;return!1}if(Id(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return $u(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&$u(e[n]))return!0;return!1}function bw(e){const t=[],n=e.data,r=e;return r.data=Vu(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Vu(e,t,n){if(!e)return e;if(Id(e)){const r={_placeholder:!0,num:t.length};return t.push(e),r}else if(Array.isArray(e)){const r=new Array(e.length);for(let s=0;s<e.length;s++)r[s]=Vu(e[s],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return Vu(e.toJSON(),t,!0);const r={};for(const s in e)Object.prototype.hasOwnProperty.call(e,s)&&(r[s]=Vu(e[s],t));return r}return e}function _w(e,t){return e.data=Rd(e.data,t),delete e.attachments,e}function Rd(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]=Rd(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=Rd(e[n],t));return e}const Sw=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var et;(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"})(et||(et={}));class xw{constructor(t){this.replacer=t}encode(t){return(t.type===et.EVENT||t.type===et.ACK)&&$u(t)?this.encodeAsBinary({type:t.type===et.EVENT?et.BINARY_EVENT:et.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===et.BINARY_EVENT||t.type===et.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=bw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ld extends Mt{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===et.BINARY_EVENT;r||n.type===et.BINARY_ACK?(n.type=r?et.EVENT:et.ACK,this.reconstructor=new ww(n)):super.emitReserved("decoded",n)}else if(Id(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(et[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===et.BINARY_EVENT||r.type===et.BINARY_ACK){const a=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(a,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!Aw(c)||c<1)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(Ld.isPayloadValid(r.type,a))r.data=a;else throw new Error("invalid payload")}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case et.CONNECT:return x0(n);case et.DISCONNECT:return n===void 0;case et.CONNECT_ERROR:return typeof n=="string"||x0(n);case et.EVENT:case et.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Sw.indexOf(n[0])===-1);case et.ACK:case et.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class ww{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=_w(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const Aw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function x0(e){return Object.prototype.toString.call(e)==="[object Object]"}const Cw=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Ld,Encoder:xw,get PacketType(){return et}},Symbol.toStringTag,{value:"Module"}));function dr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const vw=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class w0 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=[dr(t,"open",this.onopen.bind(this)),dr(t,"packet",this.onpacket.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(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,s,a;if(vw.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:et.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const p=this.ids++,m=n.pop();this._registerAckCallback(p,m),u.id=p}const c=(s=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||s===void 0?void 0:s.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 s=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(s===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"))},s),u=(...c)=>{this.io.clearTimeoutFn(a),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,s)=>{const a=(u,c)=>u?s(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((s,...a)=>(this._queue[0],s!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(s)):(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:et.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 et.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 et.EVENT:case et.BINARY_EVENT:this.onevent(t);break;case et.ACK:case et.BINARY_ACK:this.onack(t);break;case et.DISCONNECT:this.ondisconnect();break;case et.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(...s){r||(r=!0,n.packet({type:et.ACK,id:t,data:s}))}}onack(t){const n=this.acks[t.id];typeof n=="function"&&(delete this.acks[t.id],n.withError&&t.data.unshift(null),n.apply(this,t.data))}onconnect(t,n){this.id=t,this.recovered=n&&this._pid===n,this._pid=n,this.connected=!0,this.emitBuffered(),this._drainQueue(!0),this.emitReserved("connect")}emitBuffered(){this.receiveBuffer.forEach(t=>this.emitEvent(t)),this.receiveBuffer=[],this.sendBuffer.forEach(t=>{this.notifyOutgoingListeners(t),this.packet(t)}),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach(t=>t()),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:et.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 Ms(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}Ms.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},Ms.prototype.reset=function(){this.attempts=0},Ms.prototype.setMin=function(e){this.ms=e},Ms.prototype.setMax=function(e){this.max=e},Ms.prototype.setJitter=function(e){this.jitter=e};class Dd 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,zu(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 Ms({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const s=n.parser||Cw;this.encoder=new s.Encoder,this.decoder=new s.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 pw(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const s=dr(n,"open",function(){r.onopen(),t&&t()}),a=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=dr(n,"error",a);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{s(),a(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(s),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(dr(t,"ping",this.onping.bind(this)),dr(t,"data",this.ondata.bind(this)),dr(t,"error",this.onerror.bind(this)),dr(t,"close",this.onclose.bind(this)),dr(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){Hu(()=>{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 w0(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(s=>{s?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",s)):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 Zo={};function qu(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=mw(e,t.path||"/socket.io"),r=n.source,s=n.id,a=n.path,u=Zo[s]&&a in Zo[s].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Dd(r,t):(Zo[s]||(Zo[s]=new Dd(r,t)),d=Zo[s]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(qu,{Manager:Dd,Socket:w0,io:qu,connect:qu});var Nw=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===kw})(t)})(e)},kw=typeof Symbol=="function"&&Symbol.for?Symbol.for("react.element"):60103;function ea(e,t){return t.clone!==!1&&t.isMergeableObject(e)?Fs((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Pw(e,t,n){return e.concat(t).map((function(r){return ea(r,n)}))}function A0(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 C0(e,t){try{return t in e}catch(n){return!1}}function Ow(e,t,n){var r={};return n.isMergeableObject(e)&&A0(e).forEach((function(s){r[s]=ea(e[s],n)})),A0(t).forEach((function(s){(function(a,u){return C0(a,u)&&!(Object.hasOwnProperty.call(a,u)&&Object.propertyIsEnumerable.call(a,u))})(e,s)||(C0(e,s)&&n.isMergeableObject(t[s])?r[s]=(function(a,u){if(!u.customMerge)return Fs;var c=u.customMerge(a);return typeof c=="function"?c:Fs})(s,n)(e[s],t[s],n):r[s]=ea(t[s],n))})),r}function Fs(e,t,n){(n=n||{}).arrayMerge=n.arrayMerge||Pw,n.isMergeableObject=n.isMergeableObject||Nw,n.cloneUnlessOtherwiseSpecified=ea;var r=Array.isArray(t);return r===Array.isArray(e)?r?n.arrayMerge(e,t,n):Ow(e,t,n):ea(t,n)}Fs.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce((function(n,r){return Fs(n,r,t)}),{})};var Iw=Fs;let Rw=class{constructor(t){Object.assign(this,t)}};function wn(e){if(e)return(function(t){for(var n in wn.prototype)t[n]=wn.prototype[n];return t})(e)}wn.prototype.on=wn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},wn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},wn.prototype.off=wn.prototype.removeListener=wn.prototype.removeAllListeners=wn.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 s=0;s<r.length;s++)if((n=r[s])===t||n.fn===t){r.splice(s,1);break}return r.length===0&&delete this._callbacks["$"+e],this},wn.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 s=(n=n.slice(0)).length;r<s;++r)n[r].apply(this,t)}return this},wn.prototype.emitReserved=wn.prototype.emit,wn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},wn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const Lw=typeof ArrayBuffer=="function",v0=Object.prototype.toString,Dw=typeof Blob=="function"||typeof Blob!="undefined"&&v0.call(Blob)==="[object BlobConstructor]",Mw=typeof File=="function"||typeof File!="undefined"&&v0.call(File)==="[object FileConstructor]";function Md(e){return Lw&&(e instanceof ArrayBuffer||(t=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(t):t.buffer instanceof ArrayBuffer)(e))||Dw&&e instanceof Blob||Mw&&e instanceof File}function Yu(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Yu(e[n]))return!0;return!1}if(Md(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Yu(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Yu(e[n]))return!0;return!1}function Fw(e){const t=[],n=e.data,r=e;return r.data=Fd(n,t),r.attachments=t.length,{packet:r,buffers:t}}function Fd(e,t){if(!e)return e;if(Md(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]=Fd(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]=Fd(e[r],t));return n}return e}function Bw(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 Uw=["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 Hw{constructor(t){this.replacer=t}encode(t){return t.type!==Ct.EVENT&&t.type!==Ct.ACK||!Yu(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=Fw(t),r=this.encodeAsString(n.packet),s=n.buffers;return s.unshift(r),s}}class Ud extends wn{constructor(t){super(),this.opts=Object.assign({reviver:void 0,maxAttachments:10},typeof t=="function"?{reviver:t}:t)}add(t){let n;if(typeof t=="string"){if(this.reconstructor)throw new Error("got plaintext data when reconstructing a packet");n=this.decodeString(t);const r=n.type===Ct.BINARY_EVENT;r||n.type===Ct.BINARY_ACK?(n.type=r?Ct.EVENT:Ct.ACK,this.reconstructor=new zw(n),n.attachments===0&&super.emitReserved("decoded",n)):super.emitReserved("decoded",n)}else{if(!Md(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");const c=Number(u);if(!jw(c)||c<0)throw new Error("Illegal attachments");if(c>this.opts.maxAttachments)throw new Error("too many attachments");r.attachments=c}if(t.charAt(n+1)==="/"){const a=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(a,n)}else r.nsp="/";const s=t.charAt(n+1);if(s!==""&&Number(s)==s){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(!Ud.isPayloadValid(r.type,a))throw new Error("invalid payload");r.data=a}return r}tryParse(t){try{return JSON.parse(t,this.opts.reviver)}catch(n){return!1}}static isPayloadValid(t,n){switch(t){case Ct.CONNECT:return N0(n);case Ct.DISCONNECT:return n===void 0;case Ct.CONNECT_ERROR:return typeof n=="string"||N0(n);case Ct.EVENT:case Ct.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&Uw.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 zw{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=Bw(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const jw=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function N0(e){return Object.prototype.toString.call(e)==="[object Object]"}const k0=["searchParams.facetFilters","browseParams.facetFilters","baseCatalogParams.facetFilters","hits","products"],P0=(e,t,n)=>function r(s,a=[]){const u=Object.entries(s).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(s)?u.map((c=>c[1])):Object.fromEntries(u)},O0=e=>e.replace(/_([a-z])/g,((t,n)=>n.toUpperCase())),$w=P0((e=>e.replace(/([A-Z])/g,"_$1").toLowerCase()),(e=>e),k0),I0=P0(O0,O0,k0),Vw={Encoder:class extends Hw{encode(e){var t,n;return super.encode(fe(F({},e),{data:((t=e.data)==null?void 0:t.length)==2?[e.data[0],$w(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 Ud{constructor(){super(((e,t)=>e==""&&Array.isArray(t)?t.map((n=>Array.isArray(n)?n.map((r=>r instanceof Object?I0(r):r)):n instanceof Object?I0(n):n)):t))}}},qw={path:"/api/v1/socket.io",autoConnect:!1,transports:["polling","websocket"],upgrade:!0,timeout:1e4};class Yw{constructor({apiKey:t,apiToken:n,baseUrl:r,namespace:s="/copilot",customerId:a,tenantId:u,socketOptions:c={}}){if(this.sessionIdKey="x-cimulate-copilot-session-id",this.reconnectAttempts=0,this.maxReconnectAttempts=5,this.maxReconnectDelay=3e4,this.handleConnectAck=m=>{console.log("[Copilot SDK] Connect Ack:",m),this.socket.auth={[this.sessionIdKey]:m.sessionId}},this.handleDisconnect=m=>{console.warn(`[Copilot SDK] Disconnected: ${m}`),m!=="io client disconnect"&&(console.log(`[Copilot SDK] Disconnected due to ${m}. Attempting reconnect...`),this.retryConnect())},this.handleConnectError=m=>{console.error(`[Copilot SDK] Connect error: ${m.message}`);const b=m.message.match(/['"]error['"]:\s*['"](\w+)['"]/),y=b==null?void 0:b[1];y&&["InvalidApiKey","InvalidToken","BadRequest"].includes(y)?this.disconnect():this.socket.connected||this.socket.active||(console.log("[Copilot SDK] Retrying connect attempt..."),this.retryConnect())},this.offInternalHandlers=()=>{this.socket.off("connect_ack",this.handleConnectAck),this.socket.off("disconnect",this.handleDisconnect),this.off("connect_error",this.handleConnectError)},t&&n||!t&&!n)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");const d=`${r}${s}`,f={};t?f["x-cimulate-api-key"]=t:n&&(f.Authorization=`Bearer ${n}`),a&&(f["x-cimulate-customer-id"]=a),u&&(f["Tenant-ID"]=u);const p=[qw,c,{parser:Vw,withCredentials:!0,transportOptions:{polling:{extraHeaders:f}}}];this.socket=qu(d,Iw.all(p))}connect(){this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0,this.reconnectAttempts=0),this.offInternalHandlers(),this.on("connect_ack",this.handleConnectAck),this.socket.on("disconnect",this.handleDisconnect),this.on("connect_error",this.handleConnectError),this.socket.auth&&this.sessionIdKey in this.socket.auth&&(this.socket.auth={}),this.socket.connect()}retryConnect(){if(!(this.socket.connected||this.socket.active||this.reconnectAttempts>=this.maxReconnectAttempts))if(this.reconnectTimeout&&(clearTimeout(this.reconnectTimeout),this.reconnectTimeout=void 0),this.reconnectAttempts<this.maxReconnectAttempts){const t=Math.min(1e3*Mu(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 Ke(this,null,function*(){return this.asyncResponse("copilot_browse",t,n)})}browseSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_browse_suggestions",t,n)})}search(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search",t,n)})}searchSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("copilot_search_suggestions",t,n)})}facetedNavigation(t,n){return Ke(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 Ke(this,null,function*(){return this.asyncResponse("product_view",t,n)})}productViewSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("product_view_suggestions",t,n)})}askCim(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim",t,n)})}askCimSuggestions(t,n){return Ke(this,null,function*(){return this.asyncResponse("ask_cim_suggestions",t,n)})}requestSessionInformation(t){return Ke(this,null,function*(){return new Promise((n=>{this.socket.emit("session_info",(r=>{t&&t(r),n(r)}))}))})}getConversationEvents(t,n){return Ke(this,null,function*(){return new Promise((r=>{this.socket.emit("conversation_events",t,(s=>{n&&n(s),r(s)}))}))})}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 Ke(this,null,function*(){if(r)return void this.socket.emit(t,n,r);let s="";const a=(function(u){return Sd(this,null,function*(){const c=[];let d=!1,f=null;const p=yield new Kr(u({emit:m=>{c.push(m),f&&(f(),f=null)},cancel:()=>{d=!0}}));try{for(;!d;)c.length>0?yield c.shift():yield new Kr(new Promise((m=>{f=m})));for(;c.length>0;)yield c.shift()}finally{yield new Kr(p==null?void 0:p())}})})((({emit:u,cancel:c})=>{const d=(f,p)=>{["done","error"].includes(p.name)&&c(),p.eventSourceId==s&&u(p)};return this.socket.onAny(d),()=>Ke(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 Rw(d)):(s=d==null?void 0:d.id,u(d))})))),events:a}})}}var B=fn();const Ki=je(B);var R0=Symbol.for("immer-nothing"),L0=Symbol.for("immer-draftable"),at=Symbol.for("immer-state");function Jn(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var Bs=Object.getPrototypeOf;function Us(e){return!!e&&!!e[at]}function Qr(e){var t;return e?D0(e)||Array.isArray(e)||!!e[L0]||!!((t=e.constructor)!=null&&t[L0])||na(e)||Wu(e):!1}var Gw=Object.prototype.constructor.toString();function D0(e){if(!e||typeof e!="object")return!1;const t=Bs(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)===Gw}function ta(e,t){Gu(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Gu(e){const t=e[at];return t?t.type_:Array.isArray(e)?1:na(e)?2:Wu(e)?3:0}function Hd(e,t){return Gu(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function M0(e,t,n){const r=Gu(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function Ww(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function na(e){return e instanceof Map}function Wu(e){return e instanceof Set}function Yt(e){return e.copy_||e.base_}function zd(e,t){if(na(e))return new Map(e);if(Wu(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=D0(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[at];let s=Reflect.ownKeys(r);for(let a=0;a<s.length;a++){const u=s[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(Bs(e),r)}else{const r=Bs(e);if(r!==null&&n)return F({},e);const s=Object.create(r);return Object.assign(s,e)}}function jd(e,t=!1){return Ku(e)||Us(e)||!Qr(e)||(Gu(e)>1&&Object.defineProperties(e,{set:{value:Xu},add:{value:Xu},clear:{value:Xu},delete:{value:Xu}}),Object.freeze(e),t&&Object.values(e).forEach(n=>jd(n,!0))),e}function Xu(){Jn(2)}function Ku(e){return Object.isFrozen(e)}var $d={};function Qi(e){const t=$d[e];return t||Jn(0,e),t}function Xw(e,t){$d[e]||($d[e]=t)}var ra;function Qu(){return ra}function Kw(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function F0(e,t){t&&(Qi("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Vd(e){qd(e),e.drafts_.forEach(Qw),e.drafts_=null}function qd(e){e===ra&&(ra=e.parent_)}function B0(e){return ra=Kw(ra,e)}function Qw(e){const t=e[at];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function U0(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[at].modified_&&(Vd(t),Jn(4)),Qr(e)&&(e=Ju(t,e),t.parent_||Zu(t,e)),t.patches_&&Qi("Patches").generateReplacementPatches_(n[at].base_,e,t.patches_,t.inversePatches_)):e=Ju(t,n,[]),Vd(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==R0?e:void 0}function Ju(e,t,n){if(Ku(t))return t;const r=t[at];if(!r)return ta(t,(s,a)=>H0(e,r,t,s,a,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return Zu(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const s=r.copy_;let a=s,u=!1;r.type_===3&&(a=new Set(s),s.clear(),u=!0),ta(a,(c,d)=>H0(e,r,s,c,d,n,u)),Zu(e,s,!1),n&&e.patches_&&Qi("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function H0(e,t,n,r,s,a,u){if(Us(s)){const c=a&&t&&t.type_!==3&&!Hd(t.assigned_,r)?a.concat(r):void 0,d=Ju(e,s,c);if(M0(n,r,d),Us(d))e.canAutoFreeze_=!1;else return}else u&&n.add(s);if(Qr(s)&&!Ku(s)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;Ju(e,s),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(na(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&Zu(e,s)}}function Zu(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&jd(t,n)}function Jw(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:Qu(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let s=r,a=Yd;n&&(s=[r],a=ia);const{revoke:u,proxy:c}=Proxy.revocable(s,a);return r.draft_=c,r.revoke_=u,c}var Yd={get(e,t){if(t===at)return e;const n=Yt(e);if(!Hd(n,t))return Zw(e,n,t);const r=n[t];return e.finalized_||!Qr(r)?r:r===Gd(e.base_,t)?(Wd(e),e.copy_[t]=sa(r,e)):r},has(e,t){return t in Yt(e)},ownKeys(e){return Reflect.ownKeys(Yt(e))},set(e,t,n){const r=z0(Yt(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const s=Gd(Yt(e),t),a=s==null?void 0:s[at];if(a&&a.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(Ww(n,s)&&(n!==void 0||Hd(e.base_,t)))return!0;Wd(e),Jr(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 Gd(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Wd(e),Jr(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Yt(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Jn(11)},getPrototypeOf(e){return Bs(e.base_)},setPrototypeOf(){Jn(12)}},ia={};ta(Yd,(e,t)=>{ia[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),ia.deleteProperty=function(e,t){return ia.set.call(this,e,t,void 0)},ia.set=function(e,t,n){return Yd.set.call(this,e[0],t,n,e[0])};function Gd(e,t){const n=e[at];return(n?Yt(n):e)[t]}function Zw(e,t,n){var s;const r=z0(t,n);return r?"value"in r?r.value:(s=r.get)==null?void 0:s.call(e.draft_):void 0}function z0(e,t){if(!(t in e))return;let n=Bs(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=Bs(n)}}function Jr(e){e.modified_||(e.modified_=!0,e.parent_&&Jr(e.parent_))}function Wd(e){e.copy_||(e.copy_=zd(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var eA=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const a=n;n=t;const u=this;return function(d=a,...f){return u.produce(d,p=>n.call(this,p,...f))}}typeof n!="function"&&Jn(6),r!==void 0&&typeof r!="function"&&Jn(7);let s;if(Qr(t)){const a=B0(this),u=sa(t,void 0);let c=!0;try{s=n(u),c=!1}finally{c?Vd(a):qd(a)}return F0(a,r),U0(s,a)}else if(!t||typeof t!="object"){if(s=n(t),s===void 0&&(s=t),s===R0&&(s=void 0),this.autoFreeze_&&jd(s,!0),r){const a=[],u=[];Qi("Patches").generateReplacementPatches_(t,s,a,u),r(a,u)}return s}else Jn(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,s;return[this.produce(t,n,(u,c)=>{r=u,s=c}),r,s]},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){Qr(e)||Jn(8),Us(e)&&(e=tA(e));const t=B0(this),n=sa(e,void 0);return n[at].isManual_=!0,qd(t),n}finishDraft(e,t){const n=e&&e[at];(!n||!n.isManual_)&&Jn(9);const{scope_:r}=n;return F0(r,t),U0(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 s=t[n];if(s.path.length===0&&s.op==="replace"){e=s.value;break}}n>-1&&(t=t.slice(n+1));const r=Qi("Patches").applyPatches_;return Us(e)?r(e,t):this.produce(e,s=>r(s,t))}};function sa(e,t){const n=na(e)?Qi("MapSet").proxyMap_(e,t):Wu(e)?Qi("MapSet").proxySet_(e,t):Jw(e,t);return(t?t.scope_:Qu()).drafts_.push(n),n}function tA(e){return Us(e)||Jn(10,e),j0(e)}function j0(e){if(!Qr(e)||Ku(e))return e;const t=e[at];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=zd(e,t.scope_.immer_.useStrictShallowCopy_)}else n=zd(e,!0);return ta(n,(r,s)=>{M0(n,r,j0(s))}),t&&(t.finalized_=!1),n}function nA(){class e extends Map{constructor(d,f){super(),this[at]={type_:2,parent_:f,scope_:f?f.scope_:Qu(),modified_:!1,finalized_:!1,copy_:void 0,assigned_:void 0,base_:d,draft_:this,isManual_:!1,revoked_:!1}}get size(){return Yt(this[at]).size}has(d){return Yt(this[at]).has(d)}set(d,f){const p=this[at];return u(p),(!Yt(p).has(d)||Yt(p).get(d)!==f)&&(n(p),Jr(p),p.assigned_.set(d,!0),p.copy_.set(d,f),p.assigned_.set(d,!0)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),n(f),Jr(f),f.base_.has(d)?f.assigned_.set(d,!1):f.assigned_.delete(d),f.copy_.delete(d),!0}clear(){const d=this[at];u(d),Yt(d).size&&(n(d),Jr(d),d.assigned_=new Map,ta(d.base_,f=>{d.assigned_.set(f,!1)}),d.copy_.clear())}forEach(d,f){const p=this[at];Yt(p).forEach((m,b,y)=>{d.call(f,this.get(b),b,this)})}get(d){const f=this[at];u(f);const p=Yt(f).get(d);if(f.finalized_||!Qr(p)||p!==f.base_.get(d))return p;const m=sa(p,f);return n(f),f.copy_.set(d,m),m}keys(){return Yt(this[at]).keys()}values(){const d=this.keys();return{[Symbol.iterator]:()=>this.values(),next:()=>{const f=d.next();return f.done?f:{done:!1,value:this.get(f.value)}}}}entries(){const d=this.keys();return{[Symbol.iterator]:()=>this.entries(),next:()=>{const f=d.next();if(f.done)return f;const p=this.get(f.value);return{done:!1,value:[f.value,p]}}}}[Symbol.iterator](){return this.entries()}}function t(c,d){return new e(c,d)}function n(c){c.copy_||(c.assigned_=new Map,c.copy_=new Map(c.base_))}class r extends Set{constructor(d,f){super(),this[at]={type_:3,parent_:f,scope_:f?f.scope_:Qu(),modified_:!1,finalized_:!1,copy_:void 0,base_:d,draft_:this,drafts_:new Map,revoked_:!1,isManual_:!1}}get size(){return Yt(this[at]).size}has(d){const f=this[at];return u(f),f.copy_?!!(f.copy_.has(d)||f.drafts_.has(d)&&f.copy_.has(f.drafts_.get(d))):f.base_.has(d)}add(d){const f=this[at];return u(f),this.has(d)||(a(f),Jr(f),f.copy_.add(d)),this}delete(d){if(!this.has(d))return!1;const f=this[at];return u(f),a(f),Jr(f),f.copy_.delete(d)||(f.drafts_.has(d)?f.copy_.delete(f.drafts_.get(d)):!1)}clear(){const d=this[at];u(d),Yt(d).size&&(a(d),Jr(d),d.copy_.clear())}values(){const d=this[at];return u(d),a(d),d.copy_.values()}entries(){const d=this[at];return u(d),a(d),d.copy_.entries()}keys(){return this.values()}[Symbol.iterator](){return this.values()}forEach(d,f){const p=this.values();let m=p.next();for(;!m.done;)d.call(f,m.value,m.value,this),m=p.next()}}function s(c,d){return new r(c,d)}function a(c){c.copy_||(c.copy_=new Set,c.base_.forEach(d=>{if(Qr(d)){const f=sa(d,c);c.drafts_.set(d,f),c.copy_.add(f)}else c.copy_.add(d)}))}function u(c){c.revoked_&&Jn(3,JSON.stringify(Yt(c)))}Xw("MapSet",{proxyMap_:t,proxySet_:s})}var rA=new eA,iA=rA.produce;function $0(e,t,n){var r=B.useMemo(function(){return iA(e)},[e]);return B.useReducer(r,t,n)}const V0={PAGE_CHANGED:"page-changed",PAGE_SIZE_CHANGED:"page-size-changed",FACET_FILTERS_CHANGED:"facet-filters-changed",RANGE_FILTERS_CHANGED:"range-filters-changed",CATALOG_SEGMENT_CHANGED:"catalog-segment-changed",PRICEBOOKS_CHANGED:"pricebooks-changed"},mt={RESET_STATE:"RESET_STATE",RESET_COPILOT:"RESET_COPILOT",ADD_MESSAGE:"ADD_MESSAGE",SET_COPILOT:"SET_COPILOT",SET_CONNECTED:"SET_CONNECTED",ADD_LOADING_MESSAGE:"ADD_LOADING_MESSAGE",REMOVE_LOADING_MESSAGE:"REMOVE_LOADING_MESSAGE",SET_ACTIVE_CONVERSATION_ID:"SET_ACTIVE_CONVERSATION_ID",ADD_CONVERSATION_ID:"ADD_CONVERSATION_ID",SET_CONVERSATION_IDS:"SET_CONVERSATION_IDS",SET_CONVERSATION_HISTORY_LOADED:"SET_CONVERSATION_HISTORY_LOADED",SET_IMAGE_FILE:"SET_IMAGE_FILE",SET_ASK_CIM_PROMPTS:"SET_ASK_CIM_PROMPTS"},Ji={copilot:null,connected:!1,messages:[],groupedMessages:[],loadingMessages:new Set,activeConversationId:null,conversationIds:[],conversationHistoryLoaded:!1,imageFile:null,askCimPrompts:{requestId:null,message:null}},q0=["ask_cim","search","browse","pdp"],sA=e=>q0.includes(e),Y0={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(Y0));const oA=new Map(Object.entries(Y0).map(([e,t])=>[t,e])),aA=e=>{var t;return(t=oA.get(e))!=null?t:null},Hs="cimulate",Xd=`${Hs}:pdp-update`,Kd=`${Hs}:browse-update`,Qd=`${Hs}:search-update`,Jd=`${Hs}:ui-state-update`,Zd=`${Hs}:prompts-state-update`,ef=`${Hs}:session-state`,Pr=F({CONTEXT_UPDATED:"browse-context-updated",CATEGORY_ID_CHANGED:"category-id-changed",CATEGORY_NAME_CHANGED:"category-name-changed"},V0),uA={"browse-context":Pr.CONTEXT_UPDATED,categoryId:Pr.CATEGORY_ID_CHANGED,categoryName:Pr.CATEGORY_NAME_CHANGED,page:Pr.PAGE_CHANGED,pageSize:Pr.PAGE_SIZE_CHANGED,includeFacets:Pr.FACET_FILTERS_CHANGED,facetFilters:Pr.FACET_FILTERS_CHANGED,rangeFilters:Pr.RANGE_FILTERS_CHANGED,catalogSegment:Pr.CATALOG_SEGMENT_CHANGED,pricebooks:Pr.PRICEBOOKS_CHANGED},Zr=F({SEARCH_CONTEXT_UPDATED:"search-context-updated",QUERY_CHANGED:"query-changed"},V0),lA={"search-context":Zr.SEARCH_CONTEXT_UPDATED,query:Zr.QUERY_CHANGED,page:Zr.PAGE_CHANGED,pageSize:Zr.PAGE_SIZE_CHANGED,includeFacets:Zr.FACET_FILTERS_CHANGED,facetFilters:Zr.FACET_FILTERS_CHANGED,rangeFilters:Zr.RANGE_FILTERS_CHANGED,catalogSegment:Zr.CATALOG_SEGMENT_CHANGED,pricebooks:Zr.PRICEBOOKS_CHANGED},z="cim-widget",jn=`--${z}`,yi={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},cA=(e=yi)=>({[`${jn}-primary-color`]:e.primaryColor||yi.primaryColor,[`${jn}-secondary-color`]:e.secondaryColor||yi.secondaryColor,[`${jn}-font-color`]:e.fontColor||yi.fontColor,[`${jn}-font-family`]:e.fontFamily||yi.fontFamily,[`${jn}-background-color`]:e.backgroundColor||yi.backgroundColor,[`${jn}-border-color`]:e.borderColor||yi.borderColor,[`${jn}-border-radius`]:e.borderRadius||yi.borderRadius}),Ti={RESET_CONVERSATION:"reset-conversation",GET_SESSION_INFORMATION:"get-session-information",GET_CONVERSATION_MESSAGES:"get-conversation-messages",LOAD_CONVERSATION:"load-conversation"},G0=B.createContext(null),W0=B.createContext(null);function X0(e,t){return function(){return e.apply(t,arguments)}}const{toString:dA}=Object.prototype,{getPrototypeOf:zs}=Object,{iterator:oa,toStringTag:K0}=Symbol,el=(({hasOwnProperty:e})=>(t,n)=>e.call(t,n))(Object.prototype),aa=(e,t)=>{let n=e;const r=[];for(;n!=null&&n!==Object.prototype;){if(r.indexOf(n)!==-1)return!1;if(r.push(n),el(n,t))return!0;n=zs(n)}return!1},fA=(e,t)=>e!=null&&aa(e,t)?e[t]:void 0,tf=(e=>t=>{const n=dA.call(t);return e[n]||(e[n]=n.slice(8,-1).toLowerCase())})(Object.create(null)),fr=e=>(e=e.toLowerCase(),t=>tf(t)===e),tl=e=>t=>typeof t===e,{isArray:Zi}=Array,js=tl("undefined");function $s(e){return e!==null&&!js(e)&&e.constructor!==null&&!js(e.constructor)&&Pn(e.constructor.isBuffer)&&e.constructor.isBuffer(e)}const Q0=fr("ArrayBuffer");function hA(e){let t;return typeof ArrayBuffer!="undefined"&&ArrayBuffer.isView?t=ArrayBuffer.isView(e):t=e&&e.buffer&&Q0(e.buffer),t}const pA=tl("string"),Pn=tl("function"),J0=tl("number"),Vs=e=>e!==null&&typeof e=="object",mA=e=>e===!0||e===!1,nl=e=>{if(!Vs(e))return!1;const t=zs(e);return(t===null||t===Object.prototype||zs(t)===null)&&!aa(e,K0)&&!aa(e,oa)},gA=e=>{if(!Vs(e)||$s(e))return!1;try{return Object.keys(e).length===0&&Object.getPrototypeOf(e)===Object.prototype}catch(t){return!1}},EA=fr("Date"),yA=fr("File"),TA=e=>!!(e&&typeof e.uri!="undefined"),bA=e=>e&&typeof e.getParts!="undefined",_A=fr("Blob"),SA=fr("FileList"),xA=e=>Vs(e)&&Pn(e.pipe);function wA(){return typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:typeof global!="undefined"?global:{}}const Z0=wA(),eg=typeof Z0.FormData!="undefined"?Z0.FormData:void 0,AA=e=>{if(!e)return!1;if(eg&&e instanceof eg)return!0;const t=zs(e);if(!t||t===Object.prototype||!Pn(e.append))return!1;const n=tf(e);return n==="formdata"||n==="object"&&Pn(e.toString)&&e.toString()==="[object FormData]"},CA=fr("URLSearchParams"),[vA,NA,kA,PA]=["ReadableStream","Request","Response","Headers"].map(fr),OA=e=>e.trim?e.trim():e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"");function ua(e,t,{allOwnKeys:n=!1}={}){if(e===null||typeof e=="undefined")return;let r,s;if(typeof e!="object"&&(e=[e]),Zi(e))for(r=0,s=e.length;r<s;r++)t.call(null,e[r],r,e);else{if($s(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 tg(e,t){if($s(e))return null;t=t.toLowerCase();const n=Object.keys(e);let r=n.length,s;for(;r-- >0;)if(s=n[r],t===s.toLowerCase())return s;return null}const es=typeof globalThis!="undefined"?globalThis:typeof self!="undefined"?self:typeof window!="undefined"?window:global,ng=e=>!js(e)&&e!==es;function nf(...e){const{caseless:t,skipUndefined:n}=ng(this)&&this||{},r={},s=(a,u)=>{if(u==="__proto__"||u==="constructor"||u==="prototype")return;const c=t&&typeof u=="string"&&tg(r,u)||u,d=el(r,c)?r[c]:void 0;nl(d)&&nl(a)?r[c]=nf(d,a):nl(a)?r[c]=nf({},a):Zi(a)?r[c]=a.slice():(!n||!js(a))&&(r[c]=a)};for(let a=0,u=e.length;a<u;a++){const c=e[a];if(!c||$s(c)||(ua(c,s),typeof c!="object"||Zi(c)))continue;const d=Object.getOwnPropertySymbols(c);for(let f=0;f<d.length;f++){const p=d[f];$A.call(c,p)&&s(c[p],p)}}return r}const IA=(e,t,n,{allOwnKeys:r}={})=>(ua(t,(s,a)=>{n&&Pn(s)?Object.defineProperty(e,a,{__proto__:null,value:X0(s,n),writable:!0,enumerable:!0,configurable:!0}):Object.defineProperty(e,a,{__proto__:null,value:s,writable:!0,enumerable:!0,configurable:!0})},{allOwnKeys:r}),e),RA=e=>(e.charCodeAt(0)===65279&&(e=e.slice(1)),e),LA=(e,t,n,r)=>{e.prototype=Object.create(t.prototype,r),Object.defineProperty(e.prototype,"constructor",{__proto__:null,value:e,writable:!0,enumerable:!1,configurable:!0}),Object.defineProperty(e,"super",{__proto__:null,value:t.prototype}),n&&Object.assign(e.prototype,n)},DA=(e,t,n,r)=>{let s,a,u;const c={};if(t=t||{},e==null)return t;do{for(s=Object.getOwnPropertyNames(e),a=s.length;a-- >0;)u=s[a],(!r||r(u,e,t))&&!c[u]&&(t[u]=e[u],c[u]=!0);e=n!==!1&&zs(e)}while(e&&(!n||n(e,t))&&e!==Object.prototype);return t},MA=(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},FA=e=>{if(!e)return null;if(Zi(e))return e;let t=e.length;if(!J0(t))return null;const n=new Array(t);for(;t-- >0;)n[t]=e[t];return n},BA=(e=>t=>e&&t instanceof e)(typeof Uint8Array!="undefined"&&zs(Uint8Array)),UA=(e,t)=>{const r=(e&&e[oa]).call(e);let s;for(;(s=r.next())&&!s.done;){const a=s.value;t.call(e,a[0],a[1])}},HA=(e,t)=>{let n;const r=[];for(;(n=e.exec(t))!==null;)r.push(n);return r},zA=fr("HTMLFormElement"),jA=e=>e.toLowerCase().replace(/[-_\s]([a-z\d])(\w*)/g,function(n,r,s){return r.toUpperCase()+s}),{propertyIsEnumerable:$A}=Object.prototype,VA=fr("RegExp"),rg=(e,t)=>{const n=Object.getOwnPropertyDescriptors(e),r={};ua(n,(s,a)=>{let u;(u=t(s,a,e))!==!1&&(r[a]=u||s)}),Object.defineProperties(e,r)},qA=e=>{rg(e,(t,n)=>{if(Pn(e)&&["arguments","caller","callee"].includes(n))return!1;const r=e[n];if(Pn(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+"'")})}})},YA=(e,t)=>{const n={},r=s=>{s.forEach(a=>{n[a]=!0})};return Zi(e)?r(e):r(String(e).split(t)),n},GA=()=>{},WA=(e,t)=>e!=null&&Number.isFinite(e=+e)?e:t;function XA(e){return!!(e&&Pn(e.append)&&e[K0]==="FormData"&&e[oa])}const KA=e=>{const t=new WeakSet,n=r=>{if(Vs(r)){if(t.has(r))return;if($s(r))return r;if(!("toJSON"in r)){t.add(r);const s=Zi(r)?[]:{};return ua(r,(a,u)=>{const c=n(a);!js(c)&&(s[u]=c)}),t.delete(r),s}}return r};return n(e)},QA=fr("AsyncFunction"),JA=e=>e&&(Vs(e)||Pn(e))&&Pn(e.then)&&Pn(e.catch),ig=((e,t)=>e?setImmediate:t?((n,r)=>(es.addEventListener("message",({source:s,data:a})=>{s===es&&a===n&&r.length&&r.shift()()},!1),s=>{r.push(s),es.postMessage(n,"*")}))(`axios@${Math.random()}`,[]):n=>setTimeout(n))(typeof setImmediate=="function",Pn(es.postMessage)),ZA=typeof queueMicrotask!="undefined"?queueMicrotask.bind(es):typeof process!="undefined"&&process.nextTick||ig,sg=e=>e!=null&&Pn(e[oa]),$={isArray:Zi,isArrayBuffer:Q0,isBuffer:$s,isFormData:AA,isArrayBufferView:hA,isString:pA,isNumber:J0,isBoolean:mA,isObject:Vs,isPlainObject:nl,isEmptyObject:gA,isReadableStream:vA,isRequest:NA,isResponse:kA,isHeaders:PA,isUndefined:js,isDate:EA,isFile:yA,isReactNativeBlob:TA,isReactNative:bA,isBlob:_A,isRegExp:VA,isFunction:Pn,isStream:xA,isURLSearchParams:CA,isTypedArray:BA,isFileList:SA,forEach:ua,merge:nf,extend:IA,trim:OA,stripBOM:RA,inherits:LA,toFlatObject:DA,kindOf:tf,kindOfTest:fr,endsWith:MA,toArray:FA,forEachEntry:UA,matchAll:HA,isHTMLForm:zA,hasOwnProperty:el,hasOwnProp:el,hasOwnInPrototypeChain:aa,getSafeProp:fA,reduceDescriptors:rg,freezeMethods:qA,toObjectSet:YA,toCamelCase:jA,noop:GA,toFiniteNumber:WA,findKey:tg,global:es,isContextDefined:ng,isSpecCompliantForm:XA,toJSONObject:KA,isAsyncFn:QA,isThenable:JA,setImmediate:ig,asap:ZA,isIterable:sg,isSafeIterable:e=>e!=null&&aa(e,oa)&&sg(e)},eC=$.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"]),tC=e=>{const t={};let n,r,s;return e&&e.split(`
|
|
3
|
+
`).forEach(function(u){s=u.indexOf(":"),n=u.substring(0,s).trim().toLowerCase(),r=u.substring(s+1).trim(),!(!n||t[n]&&eC[n])&&(n==="set-cookie"?t[n]?t[n].push(r):t[n]=[r]:t[n]=t[n]?t[n]+", "+r:r)}),t};function nC(e){let t=0,n=e.length;for(;t<n;){const r=e.charCodeAt(t);if(r!==9&&r!==32)break;t+=1}for(;n>t;){const r=e.charCodeAt(n-1);if(r!==9&&r!==32)break;n-=1}return t===0&&n===e.length?e:e.slice(t,n)}const rC=new RegExp("[\\u0000-\\u0008\\u000a-\\u001f\\u007f]+","g"),iC=new RegExp("[^\\u0009\\u0020-\\u007e\\u0080-\\u00ff]+","g");function rf(e,t){return $.isArray(e)?e.map(n=>rf(n,t)):nC(String(e).replace(t,""))}const sC=e=>rf(e,rC),oC=e=>rf(e,iC);function og(e){const t=Object.create(null);return $.forEach(e.toJSON(),(n,r)=>{t[r]=oC(n)}),t}const ag=Symbol("internals");function la(e){return e&&String(e).trim().toLowerCase()}function rl(e){return e===!1||e==null?e:$.isArray(e)?e.map(rl):sC(String(e))}function aC(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 uC=e=>/^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(e.trim());function sf(e,t,n,r,s){if($.isFunction(r))return r.call(this,t,n);if(s&&(t=n),!!$.isString(t)){if($.isString(r))return t.indexOf(r)!==-1;if($.isRegExp(r))return r.test(t)}}function lC(e){return e.trim().toLowerCase().replace(/([a-z\d])(\w*)/g,(t,n,r)=>n.toUpperCase()+r)}function cC(e,t){const n=$.toCamelCase(" "+t);["get","set","has"].forEach(r=>{Object.defineProperty(e,r+n,{__proto__:null,value:function(s,a,u){return this[r].call(this,t,s,a,u)},configurable:!0})})}let hn=class{constructor(t){t&&this.set(t)}set(t,n,r){const s=this;function a(c,d,f){const p=la(d);if(!p)return;const m=$.findKey(s,p);(!m||s[m]===void 0||f===!0||f===void 0&&s[m]!==!1)&&(s[m||d]=rl(c))}const u=(c,d)=>$.forEach(c,(f,p)=>a(f,p,d));if($.isPlainObject(t)||t instanceof this.constructor)u(t,n);else if($.isString(t)&&(t=t.trim())&&!uC(t))u(tC(t),n);else if($.isObject(t)&&$.isSafeIterable(t)){let c=Object.create(null),d,f;for(const p of t){if(!$.isArray(p))throw new TypeError("Object iterator must return a key-value pair");f=p[0],$.hasOwnProp(c,f)?(d=c[f],c[f]=$.isArray(d)?[...d,p[1]]:[d,p[1]]):c[f]=p[1]}u(c,n)}else t!=null&&a(n,t,r);return this}get(t,n){if(t=la(t),t){const r=$.findKey(this,t);if(r){const s=this[r];if(!n)return s;if(n===!0)return aC(s);if($.isFunction(n))return n.call(this,s,r);if($.isRegExp(n))return n.exec(s);throw new TypeError("parser must be boolean|regexp|function")}}}has(t,n){if(t=la(t),t){const r=$.findKey(this,t);return!!(r&&this[r]!==void 0&&(!n||sf(this,this[r],r,n)))}return!1}delete(t,n){const r=this;let s=!1;function a(u){if(u=la(u),u){const c=$.findKey(r,u);c&&(!n||sf(r,r[c],c,n))&&(delete r[c],s=!0)}}return $.isArray(t)?t.forEach(a):a(t),s}clear(t){const n=Object.keys(this);let r=n.length,s=!1;for(;r--;){const a=n[r];(!t||sf(this,this[a],a,t,!0))&&(delete this[a],s=!0)}return s}normalize(t){const n=this,r={};return $.forEach(this,(s,a)=>{const u=$.findKey(r,a);if(u){n[u]=rl(s),delete n[a];return}const c=t?lC(a):String(a).trim();c!==a&&delete n[a],n[c]=rl(s),r[c]=!0}),this}concat(...t){return this.constructor.concat(this,...t)}toJSON(t){const n=Object.create(null);return $.forEach(this,(r,s)=>{r!=null&&r!==!1&&(n[s]=t&&$.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(s=>r.set(s)),r}static accessor(t){const r=(this[ag]=this[ag]={accessors:{}}).accessors,s=this.prototype;function a(u){const c=la(u);r[c]||(cC(s,u),r[c]=!0)}return $.isArray(t)?t.forEach(a):a(t),this}};hn.accessor(["Content-Type","Content-Length","Accept","Accept-Encoding","User-Agent","Authorization"]),$.reduceDescriptors(hn.prototype,({value:e},t)=>{let n=t[0].toUpperCase()+t.slice(1);return{get:()=>e,set(r){this[n]=r}}}),$.freezeMethods(hn);const dC="[REDACTED ****]";function fC(e){if($.hasOwnProp(e,"toJSON"))return!0;let t=Object.getPrototypeOf(e);for(;t&&t!==Object.prototype;){if($.hasOwnProp(t,"toJSON"))return!0;t=Object.getPrototypeOf(t)}return!1}function hC(e,t){const n=new Set(t.map(a=>String(a).toLowerCase())),r=[],s=a=>{if(a===null||typeof a!="object"||$.isBuffer(a))return a;if(r.indexOf(a)!==-1)return;a instanceof hn&&(a=a.toJSON()),r.push(a);let u;if($.isArray(a))u=[],a.forEach((c,d)=>{const f=s(c);$.isUndefined(f)||(u[d]=f)});else{if(!$.isPlainObject(a)&&fC(a))return r.pop(),a;u=Object.create(null);for(const[c,d]of Object.entries(a)){const f=n.has(c.toLowerCase())?dC:s(d);$.isUndefined(f)||(u[c]=f)}}return r.pop(),u};return s(e)}let be=class I2 extends Error{static from(t,n,r,s,a,u){const c=new I2(t.message,n||t.code,r,s,a);return Object.defineProperty(c,"cause",{__proto__:null,value:t,writable:!0,enumerable:!1,configurable:!0}),c.name=t.name,t.status!=null&&c.status==null&&(c.status=t.status),u&&Object.assign(c,u),c}constructor(t,n,r,s,a){super(t),Object.defineProperty(this,"message",{__proto__:null,value:t,enumerable:!0,writable:!0,configurable:!0}),this.name="AxiosError",this.isAxiosError=!0,n&&(this.code=n),r&&(this.config=r),s&&(this.request=s),a&&(this.response=a,this.status=a.status)}toJSON(){const t=this.config,n=t&&$.hasOwnProp(t,"redact")?t.redact:void 0,r=$.isArray(n)&&n.length>0?hC(t,n):$.toJSONObject(t);return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:r,code:this.code,status:this.status}}};be.ERR_BAD_OPTION_VALUE="ERR_BAD_OPTION_VALUE",be.ERR_BAD_OPTION="ERR_BAD_OPTION",be.ECONNABORTED="ECONNABORTED",be.ETIMEDOUT="ETIMEDOUT",be.ECONNREFUSED="ECONNREFUSED",be.ERR_NETWORK="ERR_NETWORK",be.ERR_FR_TOO_MANY_REDIRECTS="ERR_FR_TOO_MANY_REDIRECTS",be.ERR_DEPRECATED="ERR_DEPRECATED",be.ERR_BAD_RESPONSE="ERR_BAD_RESPONSE",be.ERR_BAD_REQUEST="ERR_BAD_REQUEST",be.ERR_CANCELED="ERR_CANCELED",be.ERR_NOT_SUPPORT="ERR_NOT_SUPPORT",be.ERR_INVALID_URL="ERR_INVALID_URL",be.ERR_FORM_DATA_DEPTH_EXCEEDED="ERR_FORM_DATA_DEPTH_EXCEEDED";const pC=null,ug=100;function of(e){return $.isPlainObject(e)||$.isArray(e)}function lg(e){return $.endsWith(e,"[]")?e.slice(0,-2):e}function af(e,t,n){return e?e.concat(t).map(function(s,a){return s=lg(s),!n&&a?"["+s+"]":s}).join(n?".":""):t}function mC(e){return $.isArray(e)&&!e.some(of)}const gC=$.toFlatObject($,{},null,function(t){return/^is[A-Z]/.test(t)});function il(e,t,n){if(!$.isObject(e))throw new TypeError("target must be an object");t=t||new FormData,n=$.toFlatObject(n,{metaTokens:!0,dots:!1,indexes:!1},!1,function(k,C){return!$.isUndefined(C[k])});const r=n.metaTokens,s=n.visitor||_,a=n.dots,u=n.indexes,c=n.Blob||typeof Blob!="undefined"&&Blob,d=n.maxDepth===void 0?ug:n.maxDepth,f=c&&$.isSpecCompliantForm(t),p=[];if(!$.isFunction(s))throw new TypeError("visitor must be a function");function m(w){if(w===null)return"";if($.isDate(w))return w.toISOString();if($.isBoolean(w))return w.toString();if(!f&&$.isBlob(w))throw new be("Blob is not supported. Use a Buffer instead.");if($.isArrayBuffer(w)||$.isTypedArray(w)){if(f&&typeof c=="function")return new c([w]);if(typeof Buffer!="undefined")return Buffer.from(w);throw new be("Blob is not supported. Use a Buffer instead.",be.ERR_NOT_SUPPORT)}return w}function b(w){if(w>d)throw new be("Object is too deeply nested ("+w+" levels). Max depth: "+d,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function y(w,k){if(d===1/0)return JSON.stringify(w);const C=[];return JSON.stringify(w,function(Y,L){if(!$.isObject(L))return L;for(;C.length&&C[C.length-1]!==this;)C.pop();return C.push(L),b(k+C.length-1),L})}function _(w,k,C){let H=w;if($.isReactNative(t)&&$.isReactNativeBlob(w))return t.append(af(C,k,a),m(w)),!1;if(w&&!C&&typeof w=="object"){if($.endsWith(k,"{}"))k=r?k:k.slice(0,-2),w=y(w,1);else if($.isArray(w)&&mC(w)||($.isFileList(w)||$.endsWith(k,"[]"))&&(H=$.toArray(w)))return k=lg(k),H.forEach(function(L,q){!($.isUndefined(L)||L===null)&&t.append(u===!0?af([k],q,a):u===null?k:k+"[]",m(L))}),!1}return of(w)?!0:(t.append(af(C,k,a),m(w)),!1)}const A=Object.assign(gC,{defaultVisitor:_,convertValue:m,isVisitable:of});function v(w,k,C=0){if(!$.isUndefined(w)){if(b(C),p.indexOf(w)!==-1)throw new Error("Circular reference detected in "+k.join("."));p.push(w),$.forEach(w,function(Y,L){(!($.isUndefined(Y)||Y===null)&&s.call(t,Y,$.isString(L)?L.trim():L,k,A))===!0&&v(Y,k?k.concat(L):[L],C+1)}),p.pop()}}if(!$.isObject(e))throw new TypeError("data must be an object");return v(e),t}function cg(e){const t={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+"};return encodeURIComponent(e).replace(/[!'()~]|%20/g,function(r){return t[r]})}function uf(e,t){this._pairs=[],e&&il(e,this,t)}const dg=uf.prototype;dg.append=function(t,n){this._pairs.push([t,n])},dg.toString=function(t){const n=t?r=>t.call(this,r,cg):cg;return this._pairs.map(function(s){return n(s[0])+"="+n(s[1])},"").join("&")};function EC(e){return encodeURIComponent(e).replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%20/g,"+")}function fg(e,t,n){if(!t)return e;e=e||"";const r=$.isFunction(n)?{serialize:n}:n,s=$.getSafeProp(r,"encode")||EC,a=$.getSafeProp(r,"serialize");let u;if(a?u=a(t,r):u=$.isURLSearchParams(t)?t.toString():new uf(t,r).toString(s),u){const c=e.indexOf("#");c!==-1&&(e=e.slice(0,c)),e+=(e.indexOf("?")===-1?"?":"&")+u}return e}class hg{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){$.forEach(this.handlers,function(r){r!==null&&t(r)})}}const lf={silentJSONParsing:!0,forcedJSONParsing:!0,clarifyTimeoutError:!1,legacyInterceptorReqResOrdering:!0,advertiseZstdAcceptEncoding:!1,validateStatusUndefinedResolves:!0},yC={isBrowser:!0,classes:{URLSearchParams:typeof URLSearchParams!="undefined"?URLSearchParams:uf,FormData:typeof FormData!="undefined"?FormData:null,Blob:typeof Blob!="undefined"?Blob:null},protocols:["http","https","file","blob","url","data"]},cf=typeof window!="undefined"&&typeof document!="undefined",df=typeof navigator=="object"&&navigator||void 0,TC=cf&&(!df||["ReactNative","NativeScript","NS"].indexOf(df.product)<0),bC=typeof WorkerGlobalScope!="undefined"&&self instanceof WorkerGlobalScope&&typeof self.importScripts=="function",_C=cf&&window.location.href||"http://localhost",nn=F(F({},Object.freeze(Object.defineProperty({__proto__:null,hasBrowserEnv:cf,hasStandardBrowserEnv:TC,hasStandardBrowserWebWorkerEnv:bC,navigator:df,origin:_C},Symbol.toStringTag,{value:"Module"}))),yC);function SC(e,t){return il(e,new nn.classes.URLSearchParams,F({visitor:function(n,r,s,a){return nn.isNode&&$.isBuffer(n)?(this.append(r,n.toString("base64")),!1):a.defaultVisitor.apply(this,arguments)}},t))}const pg=ug;function mg(e){if(e>pg)throw new be("FormData field is too deeply nested ("+e+" levels). Max depth: "+pg,be.ERR_FORM_DATA_DEPTH_EXCEEDED)}function xC(e){const t=[],n=/\w+|\[(\w*)]/g;let r;for(;(r=n.exec(e))!==null;)mg(t.length),t.push(r[0]==="[]"?"":r[1]||r[0]);return t}function wC(e){const t={},n=Object.keys(e);let r;const s=n.length;let a;for(r=0;r<s;r++)a=n[r],t[a]=e[a];return t}function gg(e){function t(n,r,s,a){mg(a);let u=n[a++];if(u==="__proto__")return!0;const c=Number.isFinite(+u),d=a>=n.length;return u=!u&&$.isArray(s)?s.length:u,d?($.hasOwnProp(s,u)?s[u]=$.isArray(s[u])?s[u].concat(r):[s[u],r]:s[u]=r,!c):((!$.hasOwnProp(s,u)||!$.isObject(s[u]))&&(s[u]=[]),t(n,r,s[u],a)&&$.isArray(s[u])&&(s[u]=wC(s[u])),!c)}if($.isFormData(e)&&$.isFunction(e.entries)){const n={};return $.forEachEntry(e,(r,s)=>{t(xC(r),s,n,0)}),n}return null}const qs=(e,t)=>e!=null&&$.hasOwnProp(e,t)?e[t]:void 0;function AC(e,t,n){if($.isString(e))try{return(t||JSON.parse)(e),$.trim(e)}catch(r){if(r.name!=="SyntaxError")throw r}return(n||JSON.stringify)(e)}const ca={transitional:lf,adapter:["xhr","http","fetch"],transformRequest:[function(t,n){const r=n.getContentType()||"",s=r.indexOf("application/json")>-1,a=$.isObject(t);if(a&&$.isHTMLForm(t)&&(t=new FormData(t)),$.isFormData(t))return s?JSON.stringify(gg(t)):t;if($.isArrayBuffer(t)||$.isBuffer(t)||$.isStream(t)||$.isFile(t)||$.isBlob(t)||$.isReadableStream(t))return t;if($.isArrayBufferView(t))return t.buffer;if($.isURLSearchParams(t))return n.setContentType("application/x-www-form-urlencoded;charset=utf-8",!1),t.toString();let c;if(a){const d=qs(this,"formSerializer");if(r.indexOf("application/x-www-form-urlencoded")>-1)return SC(t,d).toString();if((c=$.isFileList(t))||r.indexOf("multipart/form-data")>-1){const f=qs(this,"env"),p=f&&f.FormData;return il(c?{"files[]":t}:t,p&&new p,d)}}return a||s?(n.setContentType("application/json",!1),AC(t)):t}],transformResponse:[function(t){const n=qs(this,"transitional")||ca.transitional,r=n&&n.forcedJSONParsing,s=qs(this,"responseType"),a=s==="json";if($.isResponse(t)||$.isReadableStream(t))return t;if(t&&$.isString(t)&&(r&&!s||a)){const c=!(n&&n.silentJSONParsing)&&a;try{return JSON.parse(t,qs(this,"parseReviver"))}catch(d){if(c)throw d.name==="SyntaxError"?be.from(d,be.ERR_BAD_RESPONSE,this,null,qs(this,"response")):d}}return t}],timeout:0,xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",maxContentLength:-1,maxBodyLength:-1,env:{FormData:nn.classes.FormData,Blob:nn.classes.Blob},validateStatus:function(t){return t>=200&&t<300},headers:{common:{Accept:"application/json, text/plain, */*","Content-Type":void 0}}};$.forEach(["delete","get","head","post","put","patch","query"],e=>{ca.headers[e]={}});function ff(e,t){const n=this||ca,r=t||n,s=hn.from(r.headers);let a=r.data;return $.forEach(e,function(c){a=c.call(n,a,s.normalize(),t?t.status:void 0)}),s.normalize(),a}function Eg(e){return!!(e&&e.__CANCEL__)}let da=class extends be{constructor(t,n,r){super(t==null?"canceled":t,be.ERR_CANCELED,n,r),this.name="CanceledError",this.__CANCEL__=!0}};function yg(e,t,n){const r=n.config.validateStatus;!n.status||!r||r(n.status)?e(n):t(new be("Request failed with status code "+n.status,n.status>=400&&n.status<500?be.ERR_BAD_REQUEST:be.ERR_BAD_RESPONSE,n.config,n.request,n))}function CC(e){const t=/^([-+\w]{1,25}):(?:\/\/)?/.exec(e);return t&&t[1]||""}function vC(e,t){e=e||10;const n=new Array(e),r=new Array(e);let s=0,a=0,u;return t=t!==void 0?t:1e3,function(d){const f=Date.now(),p=r[a];u||(u=f),n[s]=d,r[s]=f;let m=a,b=0;for(;m!==s;)b+=n[m++],m=m%e;if(s=(s+1)%e,s===a&&(a=(a+1)%e),f-u<t)return;const y=p&&f-p;return y?Math.round(b*1e3/y):void 0}}function NC(e,t){let n=0,r=1e3/t,s,a;const u=(f,p=Date.now())=>{n=p,s=null,a&&(clearTimeout(a),a=null),e(...f)};return[(...f)=>{const p=Date.now(),m=p-n;m>=r?u(f,p):(s=f,a||(a=setTimeout(()=>{a=null,u(s)},r-m)))},()=>s&&u(s)]}const sl=(e,t,n=3)=>{let r=0;const s=vC(50,250);return NC(a=>{if(!a||typeof a.loaded!="number")return;const u=a.loaded,c=a.lengthComputable?a.total:void 0,d=c!=null?Math.min(u,c):u,f=Math.max(0,d-r),p=s(f);r=Math.max(r,d);const m={loaded:d,total:c,progress:c?d/c:void 0,bytes:f,rate:p||void 0,estimated:p&&c?(c-d)/p:void 0,event:a,lengthComputable:c!=null,[t?"download":"upload"]:!0};e(m)},n)},Tg=(e,t)=>{const n=e!=null;return[r=>t[0]({lengthComputable:n,total:e,loaded:r}),t[1]]},bg=e=>(...t)=>$.asap(()=>e(...t)),kC=nn.hasStandardBrowserEnv?((e,t)=>n=>(n=new URL(n,nn.origin),e.protocol===n.protocol&&e.host===n.host&&(t||e.port===n.port)))(new URL(nn.origin),nn.navigator&&/(msie|trident)/i.test(nn.navigator.userAgent)):()=>!0,PC=nn.hasStandardBrowserEnv?{write(e,t,n,r,s,a,u){if(typeof document=="undefined")return;const c=[`${e}=${encodeURIComponent(t)}`];$.isNumber(n)&&c.push(`expires=${new Date(n).toUTCString()}`),$.isString(r)&&c.push(`path=${r}`),$.isString(s)&&c.push(`domain=${s}`),a===!0&&c.push("secure"),$.isString(u)&&c.push(`SameSite=${u}`),document.cookie=c.join("; ")},read(e){if(typeof document=="undefined")return null;const t=document.cookie.split(";");for(let n=0;n<t.length;n++){const r=t[n].replace(/^\s+/,""),s=r.indexOf("=");if(s!==-1&&r.slice(0,s)===e)try{return decodeURIComponent(r.slice(s+1))}catch(a){return r.slice(s+1)}}return null},remove(e){this.write(e,"",Date.now()-864e5,"/")}}:{write(){},read(){return null},remove(){}};function OC(e){return typeof e!="string"?!1:/^([a-z][a-z\d+\-.]*:)?\/\//i.test(e)}function IC(e,t){return t?e.replace(/\/?\/$/,"")+"/"+t.replace(/^\/+/,""):e}const RC=/^https?:(?!\/\/)/i,LC=/[\t\n\r]/g;function DC(e){let t=0;for(;t<e.length&&e.charCodeAt(t)<=32;)t++;return e.slice(t)}function MC(e){return DC(e).replace(LC,"")}function _g(e,t){if(typeof e=="string"&&RC.test(MC(e)))throw new be('Invalid URL: missing "//" after protocol',be.ERR_INVALID_URL,t)}function Sg(e,t,n,r){_g(t,r);let s=!OC(t);return e&&(s||n===!1)?(_g(e,r),IC(e,t)):t}const xg=e=>e instanceof hn?F({},e):e;function ts(e,t){e=e||{},t=t||{};const n=Object.create(null);Object.defineProperty(n,"hasOwnProperty",{__proto__:null,value:Object.prototype.hasOwnProperty,enumerable:!1,writable:!0,configurable:!0});function r(p,m,b,y){return $.isPlainObject(p)&&$.isPlainObject(m)?$.merge.call({caseless:y},p,m):$.isPlainObject(m)?$.merge({},m):$.isArray(m)?m.slice():m}function s(p,m,b,y){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p,b,y)}else return r(p,m,b,y)}function a(p,m){if(!$.isUndefined(m))return r(void 0,m)}function u(p,m){if($.isUndefined(m)){if(!$.isUndefined(p))return r(void 0,p)}else return r(void 0,m)}function c(p){const m=$.hasOwnProp(t,"transitional")?t.transitional:void 0;if(!$.isUndefined(m))if($.isPlainObject(m)){if($.hasOwnProp(m,p))return m[p]}else return;const b=$.hasOwnProp(e,"transitional")?e.transitional:void 0;if($.isPlainObject(b)&&$.hasOwnProp(b,p))return b[p]}function d(p,m,b){if($.hasOwnProp(t,b))return r(p,m);if($.hasOwnProp(e,b))return r(void 0,p)}const f={url:a,method:a,data:a,baseURL:u,transformRequest:u,transformResponse:u,paramsSerializer:u,timeout:u,timeoutMessage:u,withCredentials:u,withXSRFToken:u,adapter:u,responseType:u,xsrfCookieName:u,xsrfHeaderName:u,onUploadProgress:u,onDownloadProgress:u,decompress:u,maxContentLength:u,maxBodyLength:u,beforeRedirect:u,transport:u,httpAgent:u,httpsAgent:u,cancelToken:u,socketPath:u,allowedSocketPaths:u,responseEncoding:u,validateStatus:d,headers:(p,m,b)=>s(xg(p),xg(m),b,!0)};return $.forEach(Object.keys(F(F({},e),t)),function(m){if(m==="__proto__"||m==="constructor"||m==="prototype")return;const b=$.hasOwnProp(f,m)?f[m]:s,y=$.hasOwnProp(e,m)?e[m]:void 0,_=$.hasOwnProp(t,m)?t[m]:void 0,A=b(y,_,m);$.isUndefined(A)&&b!==d||(n[m]=A)}),$.hasOwnProp(t,"validateStatus")&&$.isUndefined(t.validateStatus)&&c("validateStatusUndefinedResolves")===!1&&($.hasOwnProp(e,"validateStatus")?n.validateStatus=r(void 0,e.validateStatus):delete n.validateStatus),n}const FC=["content-type","content-length"];function BC(e,t,n){if(n!=="content-only"){e.set(t);return}Object.entries(t||{}).forEach(([r,s])=>{FC.includes(r.toLowerCase())&&e.set(r,s)})}const UC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16)));function wg(e){const t=ts({},e),n=b=>$.hasOwnProp(t,b)?t[b]:void 0,r=n("data");let s=n("withXSRFToken");const a=n("xsrfHeaderName"),u=n("xsrfCookieName");let c=n("headers");const d=n("auth"),f=n("baseURL"),p=n("allowAbsoluteUrls"),m=n("url");if(t.headers=c=hn.from(c),t.url=fg(Sg(f,m,p,t),n("params"),n("paramsSerializer")),d){const b=$.getSafeProp(d,"username")||"",y=$.getSafeProp(d,"password")||"";try{c.set("Authorization","Basic "+btoa(b+":"+(y?UC(y):"")))}catch(_){throw be.from(_,be.ERR_BAD_OPTION_VALUE,e)}}if($.isFormData(r)&&(nn.hasStandardBrowserEnv||nn.hasStandardBrowserWebWorkerEnv||$.isReactNative(r)?c.setContentType(void 0):$.isFunction(r.getHeaders)&&BC(c,r.getHeaders(),n("formDataHeaderPolicy"))),nn.hasStandardBrowserEnv&&($.isFunction(s)&&(s=s(t)),s===!0||s==null&&kC(t.url))){const y=a&&u&&PC.read(u);y&&c.set(a,y)}return t}const HC=typeof XMLHttpRequest!="undefined"&&function(e){return new Promise(function(n,r){const s=wg(e);let a=s.data;const u=hn.from(s.headers).normalize();let{responseType:c,onUploadProgress:d,onDownloadProgress:f}=s,p,m,b,y,_;function A(){y&&y(),_&&_(),s.cancelToken&&s.cancelToken.unsubscribe(p),s.signal&&s.signal.removeEventListener("abort",p)}let v=new XMLHttpRequest;v.open(s.method.toUpperCase(),s.url,!0),v.timeout=s.timeout;function w(){if(!v)return;const C=hn.from("getAllResponseHeaders"in v&&v.getAllResponseHeaders()),Y={data:!c||c==="text"||c==="json"?v.responseText:v.response,status:v.status,statusText:v.statusText,headers:C,config:e,request:v};yg(function(q){n(q),A()},function(q){r(q),A()},Y),v=null}"onloadend"in v?v.onloadend=w:v.onreadystatechange=function(){!v||v.readyState!==4||v.status===0&&!(v.responseURL&&v.responseURL.startsWith("file:"))||setTimeout(w)},v.onabort=function(){v&&(r(new be("Request aborted",be.ECONNABORTED,e,v)),A(),v=null)},v.onerror=function(H){const Y=H&&H.message?H.message:"Network Error",L=new be(Y,be.ERR_NETWORK,e,v);L.event=H||null,r(L),A(),v=null},v.ontimeout=function(){let H=s.timeout?"timeout of "+s.timeout+"ms exceeded":"timeout exceeded";const Y=s.transitional||lf;s.timeoutErrorMessage&&(H=s.timeoutErrorMessage),r(new be(H,Y.clarifyTimeoutError?be.ETIMEDOUT:be.ECONNABORTED,e,v)),A(),v=null},a===void 0&&u.setContentType(null),"setRequestHeader"in v&&$.forEach(og(u),function(H,Y){v.setRequestHeader(Y,H)}),$.isUndefined(s.withCredentials)||(v.withCredentials=!!s.withCredentials),c&&c!=="json"&&(v.responseType=s.responseType),f&&([b,_]=sl(f,!0),v.addEventListener("progress",b)),d&&v.upload&&([m,y]=sl(d),v.upload.addEventListener("progress",m),v.upload.addEventListener("loadend",y)),(s.cancelToken||s.signal)&&(p=C=>{v&&(r(!C||C.type?new da(null,e,v):C),v.abort(),A(),v=null)},s.cancelToken&&s.cancelToken.subscribe(p),s.signal&&(s.signal.aborted?p():s.signal.addEventListener("abort",p)));const k=CC(s.url);if(k&&!nn.protocols.includes(k)){r(new be("Unsupported protocol "+k+":",be.ERR_BAD_REQUEST,e)),A();return}v.send(a||null)})},zC=(e,t)=>{if(e=e?e.filter(Boolean):[],!t&&!e.length)return;const n=new AbortController;let r=!1;const s=function(d){if(!r){r=!0,u();const f=d instanceof Error?d:this.reason;n.abort(f instanceof be?f:new da(f instanceof Error?f.message:f))}};let a=t&&setTimeout(()=>{a=null,s(new be(`timeout of ${t}ms exceeded`,be.ETIMEDOUT))},t);const u=()=>{e&&(a&&clearTimeout(a),a=null,e.forEach(d=>{d.unsubscribe?d.unsubscribe(s):d.removeEventListener("abort",s)}),e=null)};e.forEach(d=>d.addEventListener("abort",s,{once:!0}));const{signal:c}=n;return c.unsubscribe=()=>$.asap(u),c},jC=function*(e,t){let n=e.byteLength;if(n<t){yield e;return}let r=0,s;for(;r<n;)s=r+t,yield e.slice(r,s),r=s},$C=function(e,t){return Sd(this,null,function*(){try{for(var n=O2(VC(e)),r,s,a;r=!(s=yield new Kr(n.next())).done;r=!1){const u=s.value;yield*o0(jC(u,t))}}catch(s){a=[s]}finally{try{r&&(s=n.return)&&(yield new Kr(s.call(n)))}finally{if(a)throw a[0]}}})},VC=function(e){return Sd(this,null,function*(){if(e[Symbol.asyncIterator]){yield*o0(e);return}const t=e.getReader();try{for(;;){const{done:n,value:r}=yield new Kr(t.read());if(n)break;yield r}}finally{yield new Kr(t.cancel())}})},Ag=(e,t,n,r)=>{const s=$C(e,t);let a=0,u,c=f=>{u||(u=!0,r&&r(f))};return new ReadableStream({pull(f){return Ke(this,null,function*(){try{const{done:p,value:m}=yield s.next();if(p){c(),f.close();return}let b=m.byteLength;if(n){let y=a+=b;n(y)}f.enqueue(new Uint8Array(m))}catch(p){throw c(p),p}})},cancel(f){return c(f),s.return()}},{highWaterMark:2})},ol=e=>e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102,qC=(e,t,n)=>t+2<n&&ol(e.charCodeAt(t+1))&&ol(e.charCodeAt(t+2));function YC(e){if(!e||typeof e!="string"||!e.startsWith("data:"))return 0;const t=e.indexOf(",");if(t<0)return 0;const n=e.slice(5,t),r=e.slice(t+1);if(/;base64/i.test(n)){let u=r.length;const c=r.length;for(let y=0;y<c;y++)if(r.charCodeAt(y)===37&&y+2<c){const _=r.charCodeAt(y+1),A=r.charCodeAt(y+2);ol(_)&&ol(A)&&(u-=2,y+=2)}let d=0,f=c-1;const p=y=>y>=2&&r.charCodeAt(y-2)===37&&r.charCodeAt(y-1)===51&&(r.charCodeAt(y)===68||r.charCodeAt(y)===100);f>=0&&(r.charCodeAt(f)===61?(d++,f--):p(f)&&(d++,f-=3)),d===1&&f>=0&&(r.charCodeAt(f)===61||p(f))&&d++;const b=Math.floor(u/4)*3-(d||0);return b>0?b:0}let a=0;for(let u=0,c=r.length;u<c;u++){const d=r.charCodeAt(u);if(d===37&&qC(r,u,c))a+=1,u+=2;else if(d<128)a+=1;else if(d<2048)a+=2;else if(d>=55296&&d<=56319&&u+1<c){const f=r.charCodeAt(u+1);f>=56320&&f<=57343?(a+=4,u++):a+=3}else a+=3}return a}const hf="1.18.1",Cg=64*1024,{isFunction:al}=$,GC=e=>encodeURIComponent(e).replace(/%([0-9A-F]{2})/gi,(t,n)=>String.fromCharCode(parseInt(n,16))),vg=e=>{if(!$.isString(e))return e;try{return decodeURIComponent(e)}catch(t){return e}},Ng=(e,...t)=>{try{return!!e(...t)}catch(n){return!1}},WC=e=>{const t=e.indexOf("://");let n=e;return t!==-1&&(n=n.slice(t+3)),n.includes("@")||n.includes(":")},XC=e=>{const t=$.global!==void 0&&$.global!==null?$.global:globalThis,{ReadableStream:n,TextEncoder:r}=t;e=$.merge.call({skipUndefined:!0},{Request:t.Request,Response:t.Response},e);const{fetch:s,Request:a,Response:u}=e,c=s?al(s):typeof fetch=="function",d=al(a),f=al(u);if(!c)return!1;const p=c&&al(n),m=c&&(typeof r=="function"?(w=>k=>w.encode(k))(new r):w=>Ke(null,null,function*(){return new Uint8Array(yield new a(w).arrayBuffer())})),b=d&&p&&Ng(()=>{let w=!1;const k=new a(nn.origin,{body:new n,method:"POST",get duplex(){return w=!0,"half"}}),C=k.headers.has("Content-Type");return k.body!=null&&k.body.cancel(),w&&!C}),y=f&&p&&Ng(()=>$.isReadableStream(new u("").body)),_={stream:y&&(w=>w.body)};c&&["text","arrayBuffer","blob","formData","stream"].forEach(w=>{!_[w]&&(_[w]=(k,C)=>{let H=k&&k[w];if(H)return H.call(k);throw new be(`Response type '${w}' is not supported`,be.ERR_NOT_SUPPORT,C)})});const A=w=>Ke(null,null,function*(){if(w==null)return 0;if($.isBlob(w))return w.size;if($.isSpecCompliantForm(w))return(yield new a(nn.origin,{method:"POST",body:w}).arrayBuffer()).byteLength;if($.isArrayBufferView(w)||$.isArrayBuffer(w))return w.byteLength;if($.isURLSearchParams(w)&&(w=w+""),$.isString(w))return(yield m(w)).byteLength}),v=(w,k)=>Ke(null,null,function*(){const C=$.toFiniteNumber(w.getContentLength());return C==null?A(k):C});return w=>Ke(null,null,function*(){let{url:k,method:C,data:H,signal:Y,cancelToken:L,timeout:q,onDownloadProgress:ne,onUploadProgress:de,responseType:V,headers:se,withCredentials:pe="same-origin",fetchOptions:ve,maxContentLength:re,maxBodyLength:oe}=wg(w);const xe=$.isNumber(re)&&re>-1,ae=$.isNumber(oe)&&oe>-1,Q=ye=>$.hasOwnProp(w,ye)?w[ye]:void 0;let ie=s||fetch;V=V?(V+"").toLowerCase():"text";let N=zC([Y,L&&L.toAbortSignal()],q),D=null;const ee=N&&N.unsubscribe&&(()=>{N.unsubscribe()});let I,_e=null;const Be=()=>new be("Request body larger than maxBodyLength limit",be.ERR_BAD_REQUEST,w,D);try{let ye;const Le=Q("auth");if(Le){const $e=$.getSafeProp(Le,"username")||"",vt=$.getSafeProp(Le,"password")||"";ye={username:$e,password:vt}}if(WC(k)){const $e=new URL(k,nn.origin);if(!ye&&($e.username||$e.password)){const vt=vg($e.username),vn=vg($e.password);ye={username:vt,password:vn}}($e.username||$e.password)&&($e.username="",$e.password="",k=$e.href)}if(ye&&(se.delete("authorization"),se.set("Authorization","Basic "+btoa(GC((ye.username||"")+":"+(ye.password||""))))),xe&&typeof k=="string"&&k.startsWith("data:")&&YC(k)>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);if(ae&&C!=="get"&&C!=="head"){const $e=yield A(H);if(typeof $e=="number"&&isFinite($e)&&(I=$e,$e>oe))throw Be()}const Ue=ae&&($.isReadableStream(H)||$.isStream(H)),Ye=($e,vt,vn)=>Ag($e,Cg,sn=>{if(ae&&sn>oe)throw _e=Be();vt&&vt(sn)},vn);if(b&&C!=="get"&&C!=="head"&&(de||Ue)){if(I=I==null?yield v(se,H):I,I!==0||Ue){let $e=new a(k,{method:"POST",body:H,duplex:"half"}),vt;if($.isFormData(H)&&(vt=$e.headers.get("content-type"))&&se.setContentType(vt),$e.body){const[vn,sn]=de&&Tg(I,sl(bg(de)))||[];H=Ye($e.body,vn,sn)}}}else if(Ue&&!d&&p&&C!=="get"&&C!=="head")H=Ye(H);else if(Ue&&d&&!b&&C!=="get"&&C!=="head")throw new be("Stream request bodies are not supported by the current fetch implementation",be.ERR_NOT_SUPPORT,w,D);$.isString(pe)||(pe=pe?"include":"omit");const Tt=d&&"credentials"in a.prototype;if($.isFormData(H)){const $e=se.getContentType();$e&&/^multipart\/form-data/i.test($e)&&!/boundary=/i.test($e)&&se.delete("content-type")}se.set("User-Agent","axios/"+hf,!1);const Cn=fe(F({},ve),{signal:N,method:C.toUpperCase(),headers:og(se.normalize()),body:H,duplex:"half",credentials:Tt?pe:void 0});D=d&&new a(k,Cn);let rn=yield d?ie(D,ve):ie(k,Cn);const Tr=hn.from(rn.headers);if(xe){const $e=$.toFiniteNumber(Tr.getContentLength());if($e!=null&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}const ir=y&&(V==="stream"||V==="response");if(y&&rn.body&&(ne||xe||ir&&ee)){const $e={};["status","statusText","headers"].forEach(Pe=>{$e[Pe]=rn[Pe]});const vt=$.toFiniteNumber(Tr.getContentLength()),[vn,sn]=ne&&Tg(vt,sl(bg(ne),!0))||[];let Mn=0;const we=Pe=>{if(xe&&(Mn=Pe,Mn>re))throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D);vn&&vn(Pe)};rn=new u(Ag(rn.body,Cg,we,()=>{sn&&sn(),ee&&ee()}),$e)}V=V||"text";let Qt=yield _[$.findKey(_,V)||"text"](rn,w);if(xe&&!y&&!ir){let $e;if(Qt!=null&&(typeof Qt.byteLength=="number"?$e=Qt.byteLength:typeof Qt.size=="number"?$e=Qt.size:typeof Qt=="string"&&($e=typeof r=="function"?new r().encode(Qt).byteLength:Qt.length)),typeof $e=="number"&&$e>re)throw new be("maxContentLength size of "+re+" exceeded",be.ERR_BAD_RESPONSE,w,D)}return!ir&&ee&&ee(),yield new Promise(($e,vt)=>{yg($e,vt,{data:Qt,headers:hn.from(rn.headers),status:rn.status,statusText:rn.statusText,config:w,request:D})})}catch(ye){if(ee&&ee(),N&&N.aborted&&N.reason instanceof be){const Le=N.reason;throw Le.config=w,D&&(Le.request=D),ye!==Le&&Object.defineProperty(Le,"cause",{__proto__:null,value:ye,writable:!0,enumerable:!1,configurable:!0}),Le}if(_e)throw D&&!_e.request&&(_e.request=D),_e;if(ye instanceof be)throw D&&!ye.request&&(ye.request=D),ye;if(ye&&ye.name==="TypeError"&&/Load failed|fetch/i.test(ye.message)){const Le=new be("Network Error",be.ERR_NETWORK,w,D,ye&&ye.response);throw Object.defineProperty(Le,"cause",{__proto__:null,value:ye.cause||ye,writable:!0,enumerable:!1,configurable:!0}),Le}throw be.from(ye,ye&&ye.code,w,D,ye&&ye.response)}})},KC=new Map,kg=e=>{let t=e&&e.env||{};const{fetch:n,Request:r,Response:s}=t,a=[r,s,n];let u=a.length,c=u,d,f,p=KC;for(;c--;)d=a[c],f=p.get(d),f===void 0&&p.set(d,f=c?new Map:XC(t)),p=f;return f};kg();const pf={http:pC,xhr:HC,fetch:{get:kg}};$.forEach(pf,(e,t)=>{if(e){try{Object.defineProperty(e,"name",{__proto__:null,value:t})}catch(n){}Object.defineProperty(e,"adapterName",{__proto__:null,value:t})}});const Pg=e=>`- ${e}`,QC=e=>$.isFunction(e)||e===null||e===!1;function JC(e,t){e=$.isArray(e)?e:[e];const{length:n}=e;let r,s;const a={};for(let u=0;u<n;u++){r=e[u];let c;if(s=r,!QC(r)&&(s=pf[(c=String(r)).toLowerCase()],s===void 0))throw new be(`Unknown adapter '${c}'`);if(s&&($.isFunction(s)||(s=s.get(t))))break;a[c||"#"+u]=s}if(!s){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(Pg).join(`
|
|
6
|
+
`):" "+Pg(u[0]):"as no adapter specified";throw new be("There is no suitable adapter to dispatch the request "+c,be.ERR_NOT_SUPPORT)}return s}const Og={getAdapter:JC,adapters:pf};function mf(e){if(e.cancelToken&&e.cancelToken.throwIfRequested(),e.signal&&e.signal.aborted)throw new da(null,e)}function Ig(e){return mf(e),e.headers=hn.from(e.headers),e.data=ff.call(e,e.transformRequest),["post","put","patch"].indexOf(e.method)!==-1&&e.headers.setContentType("application/x-www-form-urlencoded",!1),Og.getAdapter(e.adapter||ca.adapter,e)(e).then(function(r){mf(e),e.response=r;try{r.data=ff.call(e,e.transformResponse,r)}finally{delete e.response}return r.headers=hn.from(r.headers),r},function(r){if(!Eg(r)&&(mf(e),r&&r.response)){e.response=r.response;try{r.response.data=ff.call(e,e.transformResponse,r.response)}finally{delete e.response}r.response.headers=hn.from(r.response.headers)}return Promise.reject(r)})}const ul={};["object","boolean","number","function","string","symbol"].forEach((e,t)=>{ul[e]=function(r){return typeof r===e||"a"+(t<1?"n ":" ")+e}});const Rg={};ul.transitional=function(t,n,r){function s(a,u){return"[Axios v"+hf+"] Transitional option '"+a+"'"+u+(r?". "+r:"")}return(a,u,c)=>{if(t===!1)throw new be(s(u," has been removed"+(n?" in "+n:"")),be.ERR_DEPRECATED);return n&&!Rg[u]&&(Rg[u]=!0,console.warn(s(u," has been deprecated since v"+n+" and will be removed in the near future"))),t?t(a,u,c):!0}},ul.spelling=function(t){return(n,r)=>(console.warn(`${r} is likely a misspelling of ${t}`),!0)};function ZC(e,t,n){if(typeof e!="object"||e===null)throw new be("options must be an object",be.ERR_BAD_OPTION_VALUE);const r=Object.keys(e);let s=r.length;for(;s-- >0;){const a=r[s],u=Object.prototype.hasOwnProperty.call(t,a)?t[a]:void 0;if(u){const c=e[a],d=c===void 0||u(c,a,e);if(d!==!0)throw new be("option "+a+" must be "+d,be.ERR_BAD_OPTION_VALUE);continue}if(n!==!0)throw new be("Unknown option "+a,be.ERR_BAD_OPTION)}}const ll={assertOptions:ZC,validators:ul},pn=ll.validators;let ns=class{constructor(t){this.defaults=t||{},this.interceptors={request:new hg,response:new hg}}request(t,n){return Ke(this,null,function*(){try{return yield this._request(t,n)}catch(r){if(r instanceof Error){let s={};Error.captureStackTrace?Error.captureStackTrace(s):s=new Error;const a=(()=>{if(!s.stack)return"";const u=s.stack.indexOf(`
|
|
7
7
|
`);return u===-1?"":s.stack.slice(u+1)})();try{if(!r.stack)r.stack=a;else if(a){const u=a.indexOf(`
|
|
8
8
|
`),c=u===-1?-1:a.indexOf(`
|
|
9
9
|
`,u+1),d=c===-1?"":a.slice(c+1);String(r.stack).endsWith(d)||(r.stack+=`
|
|
10
|
-
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ts(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ul.assertOptions(r,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean),legacyInterceptorReqResOrdering:pn.transitional(pn.boolean),advertiseZstdAcceptEncoding:pn.transitional(pn.boolean),validateStatusUndefinedResolves:pn.transitional(pn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:ul.assertOptions(s,{encode:pn.function,serialize:pn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ul.assertOptions(n,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=hn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||lf;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const _=[Og.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);m<b;)p=p.then(_[m++],_[m++]);return p}b=c.length;let y=n;for(;m<b;){const _=c[m++],A=c[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=Og.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ts(this.defaults,t);const n=_g(t.baseURL,t.url,t.allowAbsoluteUrls,t);return dg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){ns.prototype[t]=function(n,r){return this.request(ts(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ts(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ns.prototype[t]=n(),t!=="query"&&(ns.prototype[t+"Form"]=n(!0))});let ZC=class I2{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(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new da(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 I2(function(s){t=s}),cancel:t}}};function ev(e){return function(n){return e.apply(null,n)}}function tv(e){return $.isObject(e)&&e.isAxiosError===!0}const gf={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(gf).forEach(([e,t])=>{gf[t]=e});function Rg(e){const t=new ns(e),n=W0(ns.prototype.request,t);return $.extend(n,ns.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Rg(ts(e,s))},n}const Ot=Rg(ca);Ot.Axios=ns,Ot.CanceledError=da,Ot.CancelToken=ZC,Ot.isCancel=gg,Ot.VERSION=hf,Ot.toFormData=rl,Ot.AxiosError=be,Ot.Cancel=Ot.CanceledError,Ot.all=function(t){return Promise.all(t)},Ot.spread=ev,Ot.isAxiosError=tv,Ot.mergeConfig=ts,Ot.AxiosHeaders=hn,Ot.formToJSON=e=>mg($.isHTMLForm(e)?new FormData(e):e),Ot.getAdapter=Pg.getAdapter,Ot.HttpStatusCode=gf,Ot.default=Ot;const{Axios:O7,AxiosError:I7,CanceledError:R7,isCancel:L7,CancelToken:D7,VERSION:M7,all:F7,Cancel:B7,isAxiosError:U7,spread:H7,toFormData:z7,AxiosHeaders:j7,HttpStatusCode:$7,formToJSON:V7,getAdapter:q7,mergeConfig:Y7,create:G7}=Ot;class nv{constructor(t,n,r,s=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>Ke(this,null,function*(){try{const t=yield Ot.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class rv{constructor(t,n,r,s=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new nv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ys=(e,t,n,...r)=>{if(!e)return;const s=["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]",s,n,...r)};class iv{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Ys(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 sv={copilot:"Your Search Assistant",messaging:"Commerce Client"},Lg=B.createContext(null),ov=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:N=!1,componentConfig:C,conversationHistory:U,resetConversationMessage:Y="",apiKey:R,apiToken:q,baseUrl:ne,customerId:me,tenantId:V,theme:se,isDevelopment:he,__features:ve,routingAttributes:re,enableDownloadTranscript:oe=!0,enableEscalationToAgent:xe=!1,showProductCaptions:ae=!1,children:Q})=>{const ie=e==="messaging",k=B.useMemo(()=>{const Le=re==null?void 0:re.isCartMgmtSupported;return Le===!0||Le==="true"},[re]),D=B.useMemo(()=>ie?{config:null}:new rv(ne,R,q,he,me,V),[ie,ne,R,q,he,me,V]),ee=B.useMemo(()=>new iv(he),[he]);B.useEffect(()=>{ie||!D||D.config||D.getConfig()},[D,ie]);const I=B.useMemo(()=>lA(se),[se]),_e=B.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,Ue=(y==null?void 0:y.buttonLabel)||b;let Ye="icon";return y!=null&&y.buttonType?Ye=y.buttonType:b&&(Ye="text"),de(F({},y||{}),{placeholder:Le,buttonLabel:Ue,buttonType:Ye})},[y,m,b]),Be=B.useMemo(()=>de(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||sv[e!=null?e:"copilot"]}),[r,t,n,e]),ye=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Be,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:I,logger:ee,searchConfig:_e,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!N,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:oe,enableEscalationToAgent:xe,showProductCaptions:!!ae,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(U==null?void 0:U.sinceHours)=="number"?U.sinceHours:1,limit:U==null?void 0:U.limit},features:ve,isCartMgmtSupported:k}),[D,e,Be,a,s,f,p,c,d,u,_e,_,v,w,N,C,oe,xe,ae,Y,ee,I,U,ve,k]);return S.jsx(Lg.Provider,{value:ye,children:Q})},tt=()=>{const e=B.useContext(Lg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class av{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return cv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new av,rs=()=>Je.connected,fa=()=>Je.isOpen,uv=e=>{window.addEventListener(Jd,e)},lv=e=>{window.removeEventListener(Jd,e)},cv=(e,t)=>{const n=new CustomEvent(Jd,{detail:{property:e,value:t}});window.dispatchEvent(n)},dv=e=>{Je.connectedProxy.connected=e},ha=e=>{if(!iA(e)){const t=V0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ei=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1)},ll=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},Ef=e=>{Je.modalProxy.isFullscreen=e},cl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},yf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},fv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},hv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=B.useCallback(C=>{n({type:mt.SET_COPILOT,payload:C})},[n]),a=B.useCallback(C=>{dv(C),n({type:mt.SET_CONNECTED,payload:C})},[n]),u=B.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:mt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=B.useCallback(C=>{n({type:mt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=B.useCallback(C=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=B.useCallback(C=>{d(C),f(C.id)},[d,f]),b=B.useCallback(C=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=B.useCallback(C=>{n({type:mt.ADD_CONVERSATION_ID,payload:C})},[n]),_=B.useCallback(C=>{n({type:mt.SET_CONVERSATION_IDS,payload:C})},[n]),A=B.useCallback(C=>{n({type:mt.SET_IMAGE_FILE,payload:C})},[n]),v=B.useCallback(C=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),w=B.useCallback(C=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),N=B.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:A,setAskCimPrompts:v,setConversationHistoryLoaded:w}),[s,a,u,c,d,f,p,m,b,y,_,A,v,w]);return S.jsx(G0.Provider,{value:N,children:t})};tA();const pv=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=Ji.messages,e.groupedMessages=Ji.groupedMessages,e.loadingMessages=Ji.loadingMessages,e.imageFile=Ji.imageFile,e.askCimPrompts=Ji.askCimPrompts,e.conversationHistoryLoaded=Ji.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},mv=({onCopilotEvent:e,children:t})=>{const[n,r]=j0(pv,Ji);return S.jsx(Y0.Provider,{value:n,children:S.jsx(hv,{onCopilotEvent:e,dispatch:r,children:t})})};function gv(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function Ev(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function yv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var Tf=typeof window!="undefined",pa=function(e){B.useEffect(e,[])},Tv=function(e){var t=B.useRef(e);t.current=e,pa(function(){return function(){return t.current()}})},bv=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return Tv(function(){cancelAnimationFrame(t.current)}),[r,a]},_v=function(e,t){return e===t};function Sv(e,t){t===void 0&&(t=_v);var n=B.useRef(),r=B.useRef(e),s=gv();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var xv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=bv({width:Tf?window.innerWidth:r,height:Tf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(Tf){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return Ev(window,"resize",p),function(){yv(window,"resize",p)}}},[]),d};class wv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(mn.size).fill(1).forEach(()=>{const r=mn.first();r&&(t(r),mn.remove())})})}get size(){return this.items.length}}const mn=new wv,Dg=e=>{window.addEventListener(Qd,e)},Mg=e=>{window.removeEventListener(Qd,e)},Av=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Fg=e=>{window.addEventListener(Kd,e)},Bg=e=>{window.removeEventListener(Kd,e)},Cv=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Ug=e=>{window.addEventListener(Xd,e)},Hg=e=>{window.removeEventListener(Xd,e)},zg=(e,t,n)=>{const r=new CustomEvent(Xd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},vv=e=>{window.addEventListener(ef,e)},kv=e=>{window.removeEventListener(ef,e)},dl=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Nv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=aA[n];return Cv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new Nv,jg=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},$g=(e,t,n)=>{var u,c;const r=F({},((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},Vg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},qg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="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:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Yg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Gg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Pv=e=>{if(!rs()||!fa()){rs()&&mn.clear(),mn.add({context:"browse",payload:de(F({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Wg=e=>{jg(e,ut)},Ov=(e,t)=>{$g(e,t,ut)},Xg=e=>{Vg(e,ut)},Iv=({field:e,value:t})=>{qg({field:e,value:t},ut)},Rv=e=>{Yg(e,ut)},Kg=e=>{Gg(e,ut)},Qg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=rs(),n=fa();if(!t||!n){t&&mn.clear(),mn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Wg(e.facetFilters||{}),"rangeFilters"in e&&Xg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Kg(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Lv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Qg,updateBrowseCategoryId:Pv,updateCatalogSegment:Rv,updateFacetFilter:Ov,updateFacetFilters:Wg,updatePricebooks:Kg,updateRangeFilter:Iv,updateRangeFilters:Xg},Symbol.toStringTag,{value:"Module"}));class Dv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(zg(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const hr=new Dv,Jg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=rs(),n=fa();if(!t||!n){t&&mn.clear(),mn.add({context:"pdp",payload:F({},e)});return}hr.updateProxy(e),zg("pdp-context",e)},Mv=e=>{hr.proxy.productId=e,rs()||mn.add({context:"pdp",payload:F({},hr.state)})},Fv=e=>{hr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},Zg={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};class Bv{constructor(){Se(this,"initialState",Zg);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ma(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ft=new Bv,Uv=e=>{window.addEventListener(Zd,e)},Hv=e=>{window.removeEventListener(Zd,e)},ma=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},e1=e=>{const t=Ft.isOpen,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isOpen=n},t1=e=>{const t=Ft.isInline,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isInline=n},zv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ma("params",e),Ft.promptsStateProxy.entryType="ask_cim"},jv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ma("params",e),Ft.promptsStateProxy.entryType="search"},$v=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ma("params",e),Ft.promptsStateProxy.entryType="browse"},Vv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ma("params",e),Ft.promptsStateProxy.entryType="pdp"},qv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ft.promptsStateProxy.elementId=e,t&&(Ft.promptsStateProxy.entryType=t),typeof r=="boolean"&&t1(r),n&&Ft.updatePromptsParamsProxy(n),Ft.isOpen||e1(!0)},Yv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{dl("getConversationMessages",{payload:e,callback:t},Ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{dl("getSessionInformation",{callback:e},Ti.GET_SESSION_INFORMATION)},loadConversation:e=>{dl("loadConversation",e,Ti.LOAD_CONVERSATION)},resetConversation:()=>{dl("resetConversation",!0,Ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Gv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=uA[n];return Av(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const yt=new Gv,Wv=e=>{const t=fa(),n=rs();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:de(F({},yt.state),{query:e})});return}yt.queryProxy.query=e},n1=e=>{jg(e,yt)},Xv=(e,t)=>{$g(e,t,yt)},r1=e=>{Vg(e,yt)},Kv=({field:e,value:t})=>{qg({field:e,value:t},yt)},Qv=e=>{Yg(e,yt)},i1=e=>{Gg(e,yt)},s1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=fa(),n=rs();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&n1(e.facetFilters||{}),"rangeFilters"in e&&r1(e.rangeFilters||[]),"catalogSegment"in e&&(yt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&i1(e.pricebooks||[]),yt.queryProxy.query=e.query},Jv=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:s1,updateCatalogSegment:Qv,updateFacetFilter:Xv,updateFacetFilters:n1,updatePricebooks:i1,updateRangeFilter:Kv,updateRangeFilters:r1,updateSearchQuery:Wv},Symbol.toStringTag,{value:"Module"})),Zv={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},o1=B.createContext(Zv),ek=({children:e})=>{const[t,n]=B.useState(ut.categoryId),[r,s]=B.useState(ut.categoryIdProxy.categoryName||""),[a,u]=B.useState(ut.facetFilters||{}),[c,d]=B.useState(ut.rangeFilters||[]),[f,p]=B.useState(ut.catalogSegment||null),[m,b]=B.useState(ut.pricebooks||null);B.useEffect(()=>{const _=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&n(A.value),(A==null?void 0:A.property)==="categoryName"&&s(A.value),(A==null?void 0:A.property)==="facetFilters"&&u(A.value),(A==null?void 0:A.property)==="rangeFilters"&&d(A.value),(A==null?void 0:A.property)==="catalogSegment"&&p(A.value),(A==null?void 0:A.property)==="pricebooks"&&b(A.value)};return Fg(_),()=>{Bg(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return S.jsx(o1.Provider,{value:y,children:e})},tk=()=>{const e=B.useContext(o1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},nk={searchQuery:yt.query,facetFilters:yt.facetFilters,rangeFilters:yt.rangeFilters,catalogSegment:yt.catalogSegment,pricebooks:yt.pricebooks},a1=B.createContext(nk),rk=({children:e})=>{const[t,n]=B.useState(yt.query),[r,s]=B.useState(yt.facetFilters),[a,u]=B.useState(yt.rangeFilters),[c,d]=B.useState(yt.catalogSegment),[f,p]=B.useState(yt.pricebooks);B.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Dg(b),()=>{Mg(b)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(a1.Provider,{value:m,children:e})},ik=()=>{const e=B.useContext(a1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},sk={productId:hr.productId,pdpLink:hr.pdpLink},u1=B.createContext(sk),ok=({children:e})=>{const[t,n]=B.useState(hr.productId),[r,s]=B.useState(hr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return Ug(u),()=>{Hg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(u1.Provider,{value:a,children:e})},ak=()=>{const e=B.useContext(u1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},l1=B.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),uk=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=B.useState(Je.modeProxy.mode),[d,f]=B.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=B.useState(Je.dialogProxy.position),[b,y]=B.useState(Je.dialogProxy.isFullHeight),[_,A]=B.useState(Je.dialogProxy.width),[v,w]=B.useState(Je.modalProxy.isFullscreen),N=Sv(d.type);B.useEffect(()=>{const U=Y=>{const{property:R,value:q}=Y.detail||{};if(!(!R||q===void 0)){if(R==="mode"){c(q);return}if(R==="entryType"){a(q);return}if(R==="isMinimized"){f(ne=>de(F({},ne),{isMinimized:q}));return}if(R==="isOpen"){f(ne=>de(F({},ne),{isOpen:q}));return}if(R==="type"){f(ne=>de(F({},ne),{type:q}));return}if(R==="position"){m(q);return}if(R==="isFullHeight"){y(q);return}if(R==="width"){A(q);return}if(R==="isFullscreen"){w(q);return}}};return uv(U),()=>{lv(U)}},[]),pa(()=>{e&&ha(e)}),pa(()=>{const U=n||(t==null?void 0:t.type);U&&cl(U),t&&"isOpen"in t&&ei(!!t.isOpen),t&&"isMinimized"in t&&ll(!!t.isMinimized)}),pa(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:U}=t.options;U&&yf(U),"dialogFullHeight"in t.options&&fv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&Ef(!!t.options.isModalFullscreen)});const C=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:N||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:v}),[u,s,d,N,p,b,_,v]);return S.jsx(l1.Provider,{value:C,children:r})},Zn=()=>{const e=B.useContext(l1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},c1=B.createContext(null),d1=B.createContext(null),bf=()=>{const e=B.useContext(d1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ti=()=>{const e=B.useContext(c1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Gs=()=>{const e=B.useContext(G0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},er=()=>{const e=B.useContext(Y0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},lk=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ti(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Gs(),{activeConversationId:u}=er(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return B.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,b=>{const y=[];[...b.reverse()||[]].forEach(A=>{var w;const v=b.find(N=>N.id===A.eventSourceId);(w=v==null?void 0:v.name)!=null&&w.endsWith("_suggestions")||(A.bypassHandlers=!0,y.unshift(A))}),y.forEach(A=>{s(A)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},f1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),ck=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:b}=tt(),sn=ik(),{searchQuery:y}=sn,_=cn(sn,["searchQuery"]),Mn=tk(),{categoryId:A}=Mn,v=cn(Mn,["categoryId"]),{productId:w,pdpLink:N}=ak(),{setCopilot:C,setConnected:U,resetCopilot:Y,resetCopilotState:R,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:me,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:he}=Gs(),{connected:ve,copilot:re,messages:oe,groupedMessages:xe,loadingMessages:ae,askCimPrompts:Q}=er(),{status:ie,entryType:k}=Zn(),{isInline:D}=ti(),{getConversationMessages:ee,getSessionInformation:I}=lk({copilot:re}),_e=B.useMemo(()=>ae.size>0,[ae]),Be=B.useCallback(we=>ae.has(we),[ae]),ye=B.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:ht,userPrompt:J,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),ht&&(Ce.searchParams.pricebooks=ht),m&&(Ce.clientContext=m),ha("search"),re.search(Ce,Ve=>{const Ie=F({},Ve);me(Ie)})},[p,me,re,m]),Le=B.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:ht,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ve=Me&&Object.keys(Me).length>0;if(we===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),Ve&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),ht&&(Ie.browseParams.catalogSegment=ht),Array.isArray(J)&&J.length>0&&(Ie.browseParams.pricebooks=J),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=F({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),ha("browse"),re.browse(Ie,lt=>{var $r;const $t=F({},lt),Ut=(($r=$t.request)==null?void 0:$r.clientContext)||{},on=(Ut==null?void 0:Ut.cimLabel)||Pe;on&&$t.request&&($t.request.label=on),me($t)})},[p,me,re,m]),Ue=B.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:ht})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Me&&(J.pdpLink=Me),ht&&(J.attachments={image:ht}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Pe&&(J.clientContext.cimLabel=Pe)),b&&(J.baseCatalogParams=b),ha("pdp"),re.productView(J,ge=>{var lt;const Ce=F({},ge),Ve=((lt=Ce.request)==null?void 0:lt.clientContext)||{},Ie=(Ve==null?void 0:Ve.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),me(Ce)})},[p,re,me,m,b]),Ye=B.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),b&&(Me.baseCatalogParams=b),re.askCim(Me,rt=>{const ht=F({},rt);me(ht)})},[p,re,me,m,b]),Tt=B.useCallback(we=>{q(we),c==null||c(we)},[q,c]),Cn=B.useCallback(we=>{q(we),d==null||d(we)},[q,d]),rn=B.useCallback(we=>{u==null||u(we),U(!0)},[u,U]);B.useEffect(()=>{!re||!ve||!ie.isOpen||mn.size>0&&mn.processQueue(we=>{if(we.context==="search"){const Pe=F({},we.payload);s1(Pe)}if(we.context==="browse"){const Pe=F({},we.payload);Qg(Pe)}if(we.context==="pdp"){const Pe=F({},we.payload);Jg(Pe)}})},[ie.isOpen,re,ve]);const Tr=B.useCallback(we=>{const Pe=Me=>{const rt=de(F({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",rn),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",Tt),we.on("refined_browse",Cn),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){U(!1);return}p==null||p.log("De-registering event listeners");const ht=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:ht,id:`error-${ht}`,sessionId:"session"}),we.off()})},[p,U,ne,Tt,Cn,q,rn]);B.useEffect(()=>{if(!re)return;const we=Pe=>{if(!D){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){he({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,oe,Q.requestId,D,q,he]),B.useEffect(()=>{if(!re)return;const we=Pe=>{if(D)return;const Me=de(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,D,q]),pa(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new qw(Pe);return C(Me),Tr(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:ht,conversationIds:J}=rt.data||{};ht&&V(ht),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const ir=B.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Qt=B.useCallback(()=>{re&&re.conversationReset({},we=>{R(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,R,V,se]),$e=B.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),k){case"ask_cim":Ye(Me);return;case"search":y?ye(F(F({query:y},_),Me)):Ye(Me);return;case"browse":Le(F(F({categoryId:A},v),Me));return;case"pdp":w?Ue(F({productId:w,pdpLink:N||""},Me)):Ye(Me);return}},[k,y,_,ye,Ye,A,v,Le,Ue,w,N]),vt=B.useCallback((we,Pe)=>{var ge,Ce,Ve;const rt=we.params.userPrompt||"";if(!rt)return;const ht=oe.find(Ie=>Ie.id===Pe);if(!ht)return;const J=ht.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((ge=ht.request)==null?void 0:ge.searchParams)||{},$t=Ie.query===y;ye(de(F({query:Ie.query||y},$t?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=ht.request,lt=Ie.browseParams||{},Ut=lt.categoryId===A,on=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Le(de(F({categoryId:lt.categoryId||A||""},Ut?v:{}),{categoryName:on,userPrompt:rt}));return}if(J==="product_view"){const Ie=ht.request||{},lt=Ie.productId,$t=lt===w,Ut=((Ve=Ie.clientContext)==null?void 0:Ve.cimLabel)||"";let on="";$t?on=N||"":on=Ie.pdpLink||"",Ue({productId:lt||w,pdpLink:on,productName:Ut,userPrompt:rt})}},[oe,y,_,ye,Ye,A,v,Le,Ue,w,N]),vn=B.useMemo(()=>({copilot:re,messages:oe,groupedMessages:xe,isLoading:_e,isResponseLoading:Be,handleAskCim:Ye,handleSearch:ye,handleBrowse:Le,handlePdp:Ue,handleUserInput:$e,handleSuggestion:vt,handleCancel:ir,resetConversation:Qt,getSessionInformation:I,getConversationMessages:ee}),[re,oe,xe,_e,Be,Ye,ye,Le,Ue,$e,vt,ir,Qt,I,ee]);return S.jsx(f1.Provider,{value:vn,children:f})},h1=()=>{const{copilot:e}=er(),{addCopilotEvent:t}=Gs();return{getCopilotSuggestions:B.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Or=()=>{const e=B.useContext(f1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},dk=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=er(),{entryType:s}=Zn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Gs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:b,getConversationMessages:y}=Or(),{getCopilotSuggestions:_}=h1();B.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,N=>{c({requestId:N.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const A=B.useCallback(({query:N})=>{if(!e||!N)return;const{facetFilters:C}=yt.facetFiltersProxy,{rangeFilters:U}=yt.rangeFiltersProxy,{catalogSegment:Y}=yt.catalogSegmentProxy,{pricebooks:R}=yt.pricebooksProxy,q={query:N};q.facetFilters=C||{},q.rangeFilters=U||[],q.catalogSegment=Y||"",q.pricebooks=R||[],d(F({},q))},[e,d]),v=B.useCallback(({categoryId:N})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:U}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:R}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,ne={categoryId:N};ne.categoryName=C||"",ne.facetFilters=U||{},ne.rangeFilters=Y||[],ne.catalogSegment=R||"",ne.pricebooks=q||[],f(F({},ne))},[e,f]),w=B.useCallback(({productId:N})=>{if(!e||!N)return;const C={productId:N,pdpLink:hr.pdpLink,productName:hr.proxy.productName||""};p(C)},[e,p]);return B.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="query"&&A({query:C.value})};return Dg(N),()=>{Mg(N)}},[A]),B.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const U=C.value;w({productId:U.productId});return}(C==null?void 0:C.property)==="productId"&&w({productId:C.value})};return Ug(N),()=>{Hg(N)}},[w]),B.useEffect(()=>{const N=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return Fg(N),()=>{Bg(N)}},[v]),B.useEffect(()=>{const N=({detail:C})=>{if((C==null?void 0:C.event)==Ti.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==Ti.GET_SESSION_INFORMATION){const U=C.value.callback;b(U)}if((C==null?void 0:C.event)==Ti.GET_CONVERSATION_MESSAGES){const{payload:U,callback:Y}=C.value;if(!U.conversationId||typeof Y!="function")return;y(U,Y)}if((C==null?void 0:C.event)==Ti.LOAD_CONVERSATION){const U=C.value;if(!U.conversationId)return;y(U,R=>{a(),R.forEach(q=>{u(q)})})}};return vv(N),()=>{kv(N)}},[m,b,y,a,u]),null},fk=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs(ck,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(dk,{}),f]}),hk=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),pk=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return S.jsx(d1.Provider,{value:y,children:e})},mk=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},gk=({promptsConfig:e,children:t})=>{const[n,r]=j0(mk,de(F(F({},Zg),e||{}),{staticQuestions:hk((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(c1.Provider,{value:n,children:S.jsx(pk,{dispatch:r,children:t})})},p1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:b=!1,componentType:y,componentConfig:_,entryType:A,entryMessage:v,disclaimerText:w,disclaimerMarkdown:N,clientContext:C,baseCatalogParams:U,searchPlaceholder:Y,searchButtonLabel:R,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:me,autoScroll:V,promptsConfig:se,resetConversationMessage:he,conversationHistory:ve,onConnect:re,onCopilotEvent:oe,onRefinedSearch:xe,onRefinedBrowse:ae,__features:Q,children:ie})=>S.jsx(ov,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:v,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:R,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:me,autoScroll:V,componentConfig:_,clientContext:C,baseCatalogParams:U,disclaimerMarkdown:N,disclaimerText:w,resetConversationMessage:he,conversationHistory:ve,isDevelopment:b,__features:Q,children:S.jsx(uk,{entryType:A,componentConfig:_,componentType:y,children:S.jsx(mv,{onCopilotEvent:oe,children:S.jsx(ok,{children:S.jsx(ek,{children:S.jsx(rk,{children:S.jsx(gk,{promptsConfig:se,children:S.jsx(fk,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:b,entryType:A,onConnect:re,onRefinedSearch:xe,onRefinedBrowse:ae,onCopilotEvent:oe,children:ie})})})})})})})});var _f={exports:{}},On={},Sf={exports:{}},xf={};var m1;function Ek(){return m1||(m1=1,(function(e){function t(Q,ie){var k=Q.length;Q.push(ie);e:for(;0<k;){var D=k-1>>>1,ee=Q[D];if(0<s(ee,ie))Q[D]=ie,Q[k]=ee,k=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],k=Q.pop();if(k!==ie){Q[0]=k;e:for(var D=0,ee=Q.length,I=ee>>>1;D<I;){var _e=2*(D+1)-1,Be=Q[_e],ye=_e+1,Le=Q[ye];if(0>s(Be,k))ye<ee&&0>s(Le,Be)?(Q[D]=Le,Q[ye]=k,D=ye):(Q[D]=Be,Q[_e]=k,D=_e);else if(ye<ee&&0>s(Le,k))Q[D]=Le,Q[ye]=k,D=ye;else break e}}return ie}function s(Q,ie){var k=Q.sortIndex-ie.sortIndex;return k!==0?k:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,b=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,N=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function U(Q){if(A=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&ae(U,ie.startTime-Q)}}function Y(Q,ie){_=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var k=b;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var ee=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var _e=n(f);_e!==null&&ae(U,_e.startTime-ie),I=!1}return I}finally{m=null,b=k,y=!1}}var R=!1,q=null,ne=-1,me=5,V=-1;function se(){return!(e.unstable_now()-V<me)}function he(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(R=!1,q=null)}}else R=!1}var ve;if(typeof N=="function")ve=function(){N(he)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=he,ve=function(){oe.postMessage(null)}}else ve=function(){v(he,0)};function xe(Q){q=Q,R||(R=!0,ve())}function ae(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},e.unstable_forceFrameRate=function(Q){0>Q||125<Q?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):me=0<Q?Math.floor(1e3/Q):5},e.unstable_getCurrentPriorityLevel=function(){return b},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(Q){switch(b){case 1:case 2:case 3:var ie=3;break;default:ie=b}var k=b;b=ie;try{return Q()}finally{b=k}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var k=b;b=Q;try{return ie()}finally{b=k}},e.unstable_scheduleCallback=function(Q,ie,k){var D=e.unstable_now();switch(typeof k=="object"&&k!==null?(k=k.delay,k=typeof k=="number"&&0<k?D+k:D):k=D,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=k+ee,Q={id:p++,callback:ie,priorityLevel:Q,startTime:k,expirationTime:ee,sortIndex:-1},k>D?(Q.sortIndex=k,t(f,Q),n(d)===null&&Q===n(f)&&(A?(w(ne),ne=-1):A=!0,ae(U,k-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=b;return function(){var k=b;b=ie;try{return Q.apply(this,arguments)}finally{b=k}}}})(xf)),xf}var g1;function yk(){return g1||(g1=1,Sf.exports=Ek()),Sf.exports}var E1;function Tk(){if(E1)return On;E1=1;var e=fn(),t=yk();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){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,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(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){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function N(i){return i[1].toUpperCase()}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,N);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),R=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),me=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),he=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var k=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
|
|
10
|
+
`+a)}}catch(u){}}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=ts(this.defaults,n);const{transitional:r,paramsSerializer:s,headers:a}=n;r!==void 0&&ll.assertOptions(r,{silentJSONParsing:pn.transitional(pn.boolean),forcedJSONParsing:pn.transitional(pn.boolean),clarifyTimeoutError:pn.transitional(pn.boolean),legacyInterceptorReqResOrdering:pn.transitional(pn.boolean),advertiseZstdAcceptEncoding:pn.transitional(pn.boolean),validateStatusUndefinedResolves:pn.transitional(pn.boolean)},!1),s!=null&&($.isFunction(s)?n.paramsSerializer={serialize:s}:ll.assertOptions(s,{encode:pn.function,serialize:pn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),ll.assertOptions(n,{baseUrl:pn.spelling("baseURL"),withXsrfToken:pn.spelling("withXSRFToken")},!0),n.method=(n.method||this.defaults.method||"get").toLowerCase();let u=a&&$.merge(a.common,a[n.method]);a&&$.forEach(["delete","get","head","post","put","patch","query","common"],_=>{delete a[_]}),n.headers=hn.concat(u,a);const c=[];let d=!0;this.interceptors.request.forEach(function(A){if(typeof A.runWhen=="function"&&A.runWhen(n)===!1)return;d=d&&A.synchronous;const v=n.transitional||lf;v&&v.legacyInterceptorReqResOrdering?c.unshift(A.fulfilled,A.rejected):c.push(A.fulfilled,A.rejected)});const f=[];this.interceptors.response.forEach(function(A){f.push(A.fulfilled,A.rejected)});let p,m=0,b;if(!d){const _=[Ig.bind(this),void 0];for(_.unshift(...c),_.push(...f),b=_.length,p=Promise.resolve(n);m<b;)p=p.then(_[m++],_[m++]);return p}b=c.length;let y=n;for(;m<b;){const _=c[m++],A=c[m++];try{y=_(y)}catch(v){A.call(this,v);break}}try{p=Ig.call(this,y)}catch(_){return Promise.reject(_)}for(m=0,b=f.length;m<b;)p=p.then(f[m++],f[m++]);return p}getUri(t){t=ts(this.defaults,t);const n=Sg(t.baseURL,t.url,t.allowAbsoluteUrls,t);return fg(n,t.params,t.paramsSerializer)}};$.forEach(["delete","get","head","options"],function(t){ns.prototype[t]=function(n,r){return this.request(ts(r||{},{method:t,url:n,data:r&&$.hasOwnProp(r,"data")?r.data:void 0}))}}),$.forEach(["post","put","patch","query"],function(t){function n(r){return function(a,u,c){return this.request(ts(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:a,data:u}))}}ns.prototype[t]=n(),t!=="query"&&(ns.prototype[t+"Form"]=n(!0))});let ev=class R2{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(s=>{if(!r._listeners)return;let a=r._listeners.length;for(;a-- >0;)r._listeners[a](s);r._listeners=null}),this.promise.then=s=>{let a;const u=new Promise(c=>{r.subscribe(c),a=c}).then(s);return u.cancel=function(){r.unsubscribe(a)},u},t(function(a,u,c){r.reason||(r.reason=new da(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 R2(function(s){t=s}),cancel:t}}};function tv(e){return function(n){return e.apply(null,n)}}function nv(e){return $.isObject(e)&&e.isAxiosError===!0}const gf={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(gf).forEach(([e,t])=>{gf[t]=e});function Lg(e){const t=new ns(e),n=X0(ns.prototype.request,t);return $.extend(n,ns.prototype,t,{allOwnKeys:!0}),$.extend(n,t,null,{allOwnKeys:!0}),n.create=function(s){return Lg(ts(e,s))},n}const Ot=Lg(ca);Ot.Axios=ns,Ot.CanceledError=da,Ot.CancelToken=ev,Ot.isCancel=Eg,Ot.VERSION=hf,Ot.toFormData=il,Ot.AxiosError=be,Ot.Cancel=Ot.CanceledError,Ot.all=function(t){return Promise.all(t)},Ot.spread=tv,Ot.isAxiosError=nv,Ot.mergeConfig=ts,Ot.AxiosHeaders=hn,Ot.formToJSON=e=>gg($.isHTMLForm(e)?new FormData(e):e),Ot.getAdapter=Og.getAdapter,Ot.HttpStatusCode=gf,Ot.default=Ot;const{Axios:L7,AxiosError:D7,CanceledError:M7,isCancel:F7,CancelToken:B7,VERSION:U7,all:H7,Cancel:z7,isAxiosError:j7,spread:$7,toFormData:V7,AxiosHeaders:q7,HttpStatusCode:Y7,formToJSON:G7,getAdapter:W7,mergeConfig:X7,create:K7}=Ot;class rv{constructor(t,n,r,s=!1,a,u){Se(this,"CIMULATE_API_HEADER","x-cimulate-api-key");Se(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");Se(this,"CIMULATE_SEARCH_API_PATH","api/v1");Se(this,"baseApiUrl");Se(this,"headers",{});Se(this,"fetchConfig",()=>Ke(this,null,function*(){try{const t=yield Ot.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));Se(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const s=new URL(t);return s.hostname=s.hostname.replace(/^copilot\./,"api."),s.origin}return n?`https://staging.${this.CIMULATE_SEARCH_API_HOST}.ai`:`https://prod.${this.CIMULATE_SEARCH_API_HOST}.ai`});if(n&&r||!n&&!r)throw new Error("Provide exactly one authentication method: either 'apiKey' or 'apiToken', but not both.");n?this.headers[this.CIMULATE_API_HEADER]=n:r&&(this.headers.Authorization=`Bearer ${r}`),a&&(this.headers["x-cimulate-customer-id"]=a),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,s)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class iv{constructor(t,n,r,s=!1,a,u){Se(this,"apiService");Se(this,"config",null);Se(this,"getConfig",()=>Ke(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));Se(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));Se(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));Se(this,"getDescription",t=>this.getProductFieldValue(t,"description"));Se(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));Se(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));Se(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));Se(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));Se(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));Se(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});Se(this,"getProductField",t=>this.config?this.config[t]:"");Se(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new rv(t,n,r,s,a,u)}getPriceDisplay(t){const n=this.getPrice(t);return n?typeof n=="string"?n.includes("$")?n:`$${n}`:typeof n=="number"?new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(n):n:""}}const Ys=(e,t,n,...r)=>{if(!e)return;const s=["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]",s,n,...r)};class sv{constructor(t=!1){Se(this,"isDevelopment");Se(this,"_log",(t,n,...r)=>{Ys(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 ov={copilot:"Your Search Assistant",messaging:"Commerce Client"},Dg=B.createContext(null),av=({mode:e,logoUrl:t,headerText:n,headerConfig:r,globalClassName:s="",entryMessage:a,openLinksInNewTab:u=!1,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,searchPlaceholder:m,searchButtonLabel:b,searchConfig:y,suggestionButtonConfig:_,progressStepsLimit:A=3,messageAlignment:v="start",autoScroll:w=!0,showProductDescription:k=!1,componentConfig:C,conversationHistory:H,resetConversationMessage:Y="",apiKey:L,apiToken:q,baseUrl:ne,customerId:de,tenantId:V,theme:se,isDevelopment:pe,__features:ve,routingAttributes:re,enableDownloadTranscript:oe=!0,enableEscalationToAgent:xe=!1,showProductCaptions:ae=!1,children:Q})=>{const ie=e==="messaging",N=B.useMemo(()=>{const Le=re==null?void 0:re.isCartMgmtSupported;return Le===!0||Le==="true"},[re]),D=B.useMemo(()=>ie?{config:null}:new iv(ne,L,q,pe,de,V),[ie,ne,L,q,pe,de,V]),ee=B.useMemo(()=>new sv(pe),[pe]);B.useEffect(()=>{ie||!D||D.config||D.getConfig()},[D,ie]);const I=B.useMemo(()=>cA(se),[se]),_e=B.useMemo(()=>{const Le=(y==null?void 0:y.placeholder)||m,Ue=(y==null?void 0:y.buttonLabel)||b;let Ye="icon";return y!=null&&y.buttonType?Ye=y.buttonType:b&&(Ye="text"),fe(F({},y||{}),{placeholder:Le,buttonLabel:Ue,buttonType:Ye})},[y,m,b]),Be=B.useMemo(()=>fe(F({},r||{}),{logoUrl:t||(r==null?void 0:r.logoUrl),headerText:(r==null?void 0:r.headerText)||n||ov[e!=null?e:"copilot"]}),[r,t,n,e]),ye=B.useMemo(()=>({configModule:D,mode:e!=null?e:"copilot",headerConfig:Be,entryMessage:a,globalClassName:s,openLinksInNewTab:u,disclaimerText:c,disclaimerMarkdown:d,clientContext:f,baseCatalogParams:p,themeVariables:I,logger:ee,searchConfig:_e,suggestionButtonConfig:_,progressStepsLimit:A,messageAlignment:v,autoScroll:w,showProductDescription:!!k,enableMinimize:!!(C!=null&&C.enableMinimize),enableDownloadTranscript:oe,enableEscalationToAgent:xe,showProductCaptions:!!ae,resetConversationMessage:Y,conversationHistory:{sinceHours:typeof(H==null?void 0:H.sinceHours)=="number"?H.sinceHours:1,limit:H==null?void 0:H.limit},features:ve,isCartMgmtSupported:N}),[D,e,Be,a,s,f,p,c,d,u,_e,_,v,w,k,C,oe,xe,ae,Y,ee,I,H,ve,N]);return S.jsx(Dg.Provider,{value:ye,children:Q})},tt=()=>{const e=B.useContext(Dg);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e};class uv{constructor(){Se(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});Se(this,"connectedProxy");Se(this,"modeProxy");Se(this,"entryTypeProxy");Se(this,"statusProxy");Se(this,"dialogProxy");Se(this,"modalProxy",{isFullscreen:!1});Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return hv(n,r),Reflect.set(t,n,r)});this.connectedProxy=new Proxy({connected:this.initialState.connected},{get:this._fullGet,set:this._fullSet}),this.modeProxy=new Proxy({mode:this.initialState.mode},{get:this._fullGet,set:this._fullSet}),this.entryTypeProxy=new Proxy({entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.statusProxy=new Proxy({type:this.initialState.status.type,isOpen:this.initialState.status.isOpen,isMinimized:this.initialState.status.isMinimized},{get:this._fullGet,set:this._fullSet}),this.dialogProxy=new Proxy({position:this.initialState.dialog.position,isFullHeight:this.initialState.dialog.isFullHeight,width:this.initialState.dialog.width},{get:this._fullGet,set:this._fullSet}),this.modalProxy=new Proxy({isFullscreen:this.initialState.modal.isFullscreen},{get:this._fullGet,set:this._fullSet})}get connected(){return this.connectedProxy.connected}get mode(){return this.modeProxy.mode}get isOpen(){return!!this.statusProxy.isOpen}get isMinimized(){return!!this.statusProxy.isMinimized}get type(){return this.statusProxy.type}get entryType(){return this.entryTypeProxy.entryType}get position(){return this.dialogProxy.position}get state(){return{connected:this.connected,mode:this.mode,entryType:this.entryType,status:{type:this.type,isOpen:this.isOpen,isMinimized:this.isMinimized},dialog:{position:this.position,isFullHeight:this.dialogProxy.isFullHeight,width:this.dialogProxy.width},modal:{isFullscreen:this.modalProxy.isFullscreen}}}}const Je=new uv,rs=()=>Je.connected,fa=()=>Je.isOpen,Ef="cimulate.widget.minimizedOnNav";function lv(){try{const e=sessionStorage.getItem(Ef)==="1";return sessionStorage.removeItem(Ef),e}catch(e){return!1}}function cv(){try{sessionStorage.removeItem(Ef)}catch(e){return}}const dv=e=>{window.addEventListener(Jd,e)},fv=e=>{window.removeEventListener(Jd,e)},hv=(e,t)=>{const n=new CustomEvent(Jd,{detail:{property:e,value:t}});window.dispatchEvent(n)},pv=e=>{Je.connectedProxy.connected=e},ha=e=>{if(!sA(e)){const t=q0.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}Je.entryTypeProxy.entryType=e},ei=e=>{const t=Je.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;Je.statusProxy.isOpen=n,n&&(Je.statusProxy.isMinimized=!1,cv())},pa=e=>{const t=Je.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;Je.statusProxy.isMinimized=n,n&&(Je.statusProxy.isOpen=!1)},yf=e=>{Je.modalProxy.isFullscreen=e},cl=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);Je.statusProxy.type=e,e==="dialog"||e==="chat"?Je.modeProxy.mode="embedded":Je.modeProxy.mode="standalone"},Tf=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);Je.dialogProxy.position=e},mv=e=>{const t=Je.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;Je.dialogProxy.isFullHeight=n},gv=({onCopilotEvent:e,children:t,dispatch:n})=>{const{logger:r}=tt(),s=B.useCallback(C=>{n({type:mt.SET_COPILOT,payload:C})},[n]),a=B.useCallback(C=>{pv(C),n({type:mt.SET_CONNECTED,payload:C})},[n]),u=B.useCallback(()=>{n({type:mt.RESET_COPILOT,payload:{}})},[n]),c=B.useCallback(()=>{n({type:mt.RESET_STATE,payload:{}})},[n]),d=B.useCallback(C=>{r==null||r.log(`${C.name} event received`,C),n({type:mt.ADD_MESSAGE,payload:C}),C.bypassHandlers||e==null||e(C)},[e,r,n]),f=B.useCallback(C=>{n({type:mt.ADD_LOADING_MESSAGE,payload:C})},[n]),p=B.useCallback(C=>{n({type:mt.REMOVE_LOADING_MESSAGE,payload:C})},[n]),m=B.useCallback(C=>{d(C),f(C.id)},[d,f]),b=B.useCallback(C=>{n({type:mt.SET_ACTIVE_CONVERSATION_ID,payload:C})},[n]),y=B.useCallback(C=>{n({type:mt.ADD_CONVERSATION_ID,payload:C})},[n]),_=B.useCallback(C=>{n({type:mt.SET_CONVERSATION_IDS,payload:C})},[n]),A=B.useCallback(C=>{n({type:mt.SET_IMAGE_FILE,payload:C})},[n]),v=B.useCallback(C=>{n({type:mt.SET_ASK_CIM_PROMPTS,payload:C})},[n]),w=B.useCallback(C=>{n({type:mt.SET_CONVERSATION_HISTORY_LOADED,payload:C})},[n]),k=B.useMemo(()=>({setCopilot:s,setConnected:a,resetCopilot:u,resetCopilotState:c,addCopilotEvent:d,addLoadingMessage:f,removeLoadingMessage:p,handleCopilotRequestAck:m,setActiveConversationId:b,addConversationId:y,setConversationIds:_,setImageFile:A,setAskCimPrompts:v,setConversationHistoryLoaded:w}),[s,a,u,c,d,f,p,m,b,y,_,A,v,w]);return S.jsx(W0.Provider,{value:k,children:t})};nA();const Ev=(e,t)=>{const{type:n,payload:r}=t;if(n===mt.ADD_MESSAGE){const s=r;if(e.messages.push(s),s.eventSourceId){const a=e.groupedMessages.findIndex(u=>u.eventSourceId===s.eventSourceId);if(a!==-1){let u=e.groupedMessages[a].messages;u||(u=[]);const c=u.findIndex(d=>d.id===s.id);if(c!==-1){u[c]=s;return}u.push(s);return}else{e.groupedMessages.push({type:"group",eventSourceId:s.eventSourceId,messages:[s],createdAt:new Date(s.createdAt)});return}}e.groupedMessages.push({type:"individual",message:s,createdAt:new Date(s.createdAt)});return}switch(n){case mt.RESET_STATE:e.messages=Ji.messages,e.groupedMessages=Ji.groupedMessages,e.loadingMessages=Ji.loadingMessages,e.imageFile=Ji.imageFile,e.askCimPrompts=Ji.askCimPrompts,e.conversationHistoryLoaded=Ji.conversationHistoryLoaded;break;case mt.RESET_COPILOT:e.copilot=null;break;case mt.SET_COPILOT:e.copilot=r;break;case mt.SET_CONNECTED:e.connected=r;break;case mt.ADD_LOADING_MESSAGE:e.loadingMessages.add(r);break;case mt.REMOVE_LOADING_MESSAGE:e.loadingMessages.delete(r);break;case mt.SET_ACTIVE_CONVERSATION_ID:e.activeConversationId=r;break;case mt.ADD_CONVERSATION_ID:{const s=r;e.conversationIds.includes(s)||e.conversationIds.push(s)}break;case mt.SET_CONVERSATION_IDS:e.conversationIds=r;break;case mt.SET_IMAGE_FILE:e.imageFile=r;break;case mt.SET_ASK_CIM_PROMPTS:e.askCimPrompts.requestId=(r==null?void 0:r.requestId)||null,e.askCimPrompts.message=(r==null?void 0:r.message)||null;break;case mt.SET_CONVERSATION_HISTORY_LOADED:e.conversationHistoryLoaded=r;break}},yv=({onCopilotEvent:e,children:t})=>{const[n,r]=$0(Ev,Ji);return S.jsx(G0.Provider,{value:n,children:S.jsx(gv,{onCopilotEvent:e,dispatch:r,children:t})})};function Tv(){var e=B.useRef(!0);return e.current?(e.current=!1,!0):e.current}function bv(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.addEventListener&&e.addEventListener.apply(e,t)}function _v(e){for(var t=[],n=1;n<arguments.length;n++)t[n-1]=arguments[n];e&&e.removeEventListener&&e.removeEventListener.apply(e,t)}var bf=typeof window!="undefined",ma=function(e){B.useEffect(e,[])},Sv=function(e){var t=B.useRef(e);t.current=e,ma(function(){return function(){return t.current()}})},xv=function(e){var t=B.useRef(0),n=B.useState(e),r=n[0],s=n[1],a=B.useCallback(function(u){cancelAnimationFrame(t.current),t.current=requestAnimationFrame(function(){s(u)})},[]);return Sv(function(){cancelAnimationFrame(t.current)}),[r,a]},wv=function(e,t){return e===t};function Av(e,t){t===void 0&&(t=wv);var n=B.useRef(),r=B.useRef(e),s=Tv();return!s&&!t(r.current,e)&&(n.current=r.current,r.current=e),n.current}var Cv=function(e){var t={},n=t.initialWidth,r=n===void 0?1/0:n,s=t.initialHeight,a=s===void 0?1/0:s,u=t.onChange,c=xv({width:bf?window.innerWidth:r,height:bf?window.innerHeight:a}),d=c[0],f=c[1];return B.useEffect(function(){if(bf){var p=function(){var m=window.innerWidth,b=window.innerHeight;f({width:m,height:b}),u&&u(m,b)};return bv(window,"resize",p),function(){_v(window,"resize",p)}}},[]),d};class vv{constructor(){Se(this,"items",[]);Se(this,"add",t=>{const n=this.first();n&&n.context===t.context&&this.remove(),this.items.push(t)});Se(this,"remove",()=>this.items.shift());Se(this,"first",()=>this.items.length>0?this.items[0]:null);Se(this,"clear",()=>{this.items.length=0});Se(this,"processQueue",t=>{new Array(mn.size).fill(1).forEach(()=>{const r=mn.first();r&&(t(r),mn.remove())})})}get size(){return this.items.length}}const mn=new vv,Mg=e=>{window.addEventListener(Qd,e)},Fg=e=>{window.removeEventListener(Qd,e)},Nv=(e,t,n)=>{const r=new CustomEvent(Qd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Bg=e=>{window.addEventListener(Kd,e)},Ug=e=>{window.removeEventListener(Kd,e)},kv=(e,t,n)=>{const r=new CustomEvent(Kd,{detail:{event:e,property:t,value:n}});window.dispatchEvent(r)},Hg=e=>{window.addEventListener(Xd,e)},zg=e=>{window.removeEventListener(Xd,e)},jg=(e,t,n)=>{const r=new CustomEvent(Xd,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},Pv=e=>{window.addEventListener(ef,e)},Ov=e=>{window.removeEventListener(ef,e)},dl=(e,t,n)=>{const r=new CustomEvent(ef,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)};class Iv{constructor(){Se(this,"initialParams",{categoryId:"",categoryName:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"categoryIdProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=uA[n];return kv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.categoryIdProxy=new Proxy({categoryId:this.initialParams.categoryId,categoryName:this.initialParams.categoryName},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get categoryId(){return this.categoryIdProxy.categoryId||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{categoryId:this.categoryId,categoryName:this.categoryIdProxy.categoryName,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const ut=new Iv,$g=(e,t)=>{const n=t.updateFacetFiltersProxy(e);t.facetFiltersProxy.facetFilters=n.facetFilters},Vg=(e,t,n)=>{var u,c;const r=F({},((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},qg=(e,t)=>{const n=t.updateRangeFiltersProxy(e);t.rangeFiltersProxy.rangeFilters=n.rangeFilters},Yg=({field:e,value:t},n)=>{const[r,s]=Array.isArray(t)?t:[];if(typeof r=="undefined"||typeof s=="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:s},n.rangeFiltersProxy.rangeFilters=a;return}a.push({field:e,min:r,max:s});const c=n.updateRangeFiltersProxy(a);n.rangeFiltersProxy.rangeFilters=c.rangeFilters},Gg=(e,t)=>{t.catalogSegmentProxy.catalogSegment=e},Wg=(e,t)=>{const n=t.updatePricebooksProxy(e);t.pricebooksProxy.pricebooks=n.pricebooks},Rv=e=>{if(!rs()||!fa()){rs()&&mn.clear(),mn.add({context:"browse",payload:fe(F({},ut.state),{categoryId:e})});return}ut.categoryIdProxy.categoryId=e},Xg=e=>{$g(e,ut)},Lv=(e,t)=>{Vg(e,t,ut)},Kg=e=>{qg(e,ut)},Dv=({field:e,value:t})=>{Yg({field:e,value:t},ut)},Mv=e=>{Gg(e,ut)},Qg=e=>{Wg(e,ut)},Jg=e=>{if(!e||!("categoryId"in e))throw new Error("Browse context must include a categoryId");const t=rs(),n=fa();if(!t||!n){t&&mn.clear(),mn.add({context:"browse",payload:F({},e)});return}"facetFilters"in e&&Xg(e.facetFilters||{}),"rangeFilters"in e&&Kg(e.rangeFilters||[]),"catalogSegment"in e&&(ut.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&Qg(e.pricebooks||[]),"categoryName"in e&&(ut.categoryIdProxy.categoryName=e.categoryName||""),ut.categoryIdProxy.categoryId=e.categoryId},Fv=Object.freeze(Object.defineProperty({__proto__:null,setBrowseContext:Jg,updateBrowseCategoryId:Rv,updateCatalogSegment:Mv,updateFacetFilter:Lv,updateFacetFilters:Xg,updatePricebooks:Qg,updateRangeFilter:Dv,updateRangeFilters:Kg},Symbol.toStringTag,{value:"Module"}));class Bv{constructor(){Se(this,"initialParams",{productId:"",productName:"",pdpLink:""});Se(this,"proxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>(jg(n,r),Reflect.set(t,n,r)));Se(this,"updateProxy",t=>{t.productId&&(this.proxy=new Proxy({productId:t.productId,productName:t.productName||"",pdpLink:t.pdpLink||""},{get:this._fullGet,set:this._fullSet}))});this.proxy=new Proxy({productId:this.initialParams.productId,productName:this.initialParams.productName,pdpLink:this.initialParams.pdpLink},{get:this._fullGet,set:this._fullSet})}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return{productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink}}}const hr=new Bv,Zg=e=>{if(!e||!e.productId)throw new Error("PDP context must include a productId");const t=rs(),n=fa();if(!t||!n){t&&mn.clear(),mn.add({context:"pdp",payload:F({},e)});return}hr.updateProxy(e),jg("pdp-context",e)},Uv=e=>{hr.proxy.productId=e,rs()||mn.add({context:"pdp",payload:F({},hr.state)})},Hv=e=>{hr.proxy.pdpLink=e},gt={SET_PROMPTS_EXTENSION_INITIALIZED:"SET_PROMPTS_EXTENSION_INITIALIZED",SET_PROMPTS_EXTENSION_OPEN:"SET_PROMPTS_EXTENSION_OPEN",SET_PROMPTS_EXTENSION_INLINE:"SET_PROMPTS_EXTENSION_INLINE",SET_PROMPTS_EXTENSION_ELEMENT_ID:"SET_PROMPTS_EXTENSION_ELEMENT_ID",SET_PROMPTS_EXTENSION_ENTRY_TYPE:"SET_PROMPTS_EXTENSION_ENTRY_TYPE",SET_PROMPTS_EXTENSION_PARAMS:"SET_PROMPTS_EXTENSION_PARAMS",RESET_PROMPTS_EXTENSION_PARAMS:"RESET_PROMPTS_EXTENSION_PARAMS",SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:"RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID",SET_PROMPTS_EXTENSION_USER_PROMPT:"SET_PROMPTS_EXTENSION_USER_PROMPT",SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:"RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:"RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE",SET_PROMPTS_EXTENSION_RESPONSE_LOADING:"SET_PROMPTS_EXTENSION_RESPONSE_LOADING"},e1={isInitialized:!1,isOpen:!1,isInline:!1,elementId:null,placeholder:null,askElseButtonLabel:null,entryType:null,params:null,activePromptsId:null,userPrompt:null,promptsMessage:null,isResponseLoading:!1,responseMessage:null,promptsDisplay:"both",staticQuestions:[],staticQuestionsStrategy:"append",disableAskElseButton:!1};class zv{constructor(){Se(this,"initialState",e1);Se(this,"promptsStateProxy");Se(this,"promptsParamsProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return ga(n,r),Reflect.set(t,n,r)});Se(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));Se(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));Se(this,"updatePromptsParamsProxy",t=>new Proxy(F({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Ft=new zv,jv=e=>{window.addEventListener(Zd,e)},$v=e=>{window.removeEventListener(Zd,e)},ga=(e,t)=>{const n=new CustomEvent(Zd,{detail:{property:e,value:t}});window.dispatchEvent(n)},t1=e=>{const t=Ft.isOpen,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isOpen=n},n1=e=>{const t=Ft.isInline,n=typeof e=="boolean"?e:!t;Ft.promptsStateProxy.isInline=n},Vv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ga("params",e),Ft.promptsStateProxy.entryType="ask_cim"},qv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ga("params",e),Ft.promptsStateProxy.entryType="search"},Yv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ga("params",e),Ft.promptsStateProxy.entryType="browse"},Gv=e=>{Ft.promptsParamsProxy=Ft.updatePromptsParamsProxy(e),ga("params",e),Ft.promptsStateProxy.entryType="pdp"},Wv=({elementId:e,entryType:t,params:n,isInline:r})=>{Ft.promptsStateProxy.elementId=e,t&&(Ft.promptsStateProxy.entryType=t),typeof r=="boolean"&&n1(r),n&&Ft.updatePromptsParamsProxy(n),Ft.isOpen||t1(!0)},Xv=Object.freeze(Object.defineProperty({__proto__:null,getConversationMessages:({payload:e,callback:t})=>{dl("getConversationMessages",{payload:e,callback:t},Ti.GET_CONVERSATION_MESSAGES)},getSessionInformation:e=>{dl("getSessionInformation",{callback:e},Ti.GET_SESSION_INFORMATION)},loadConversation:e=>{dl("loadConversation",e,Ti.LOAD_CONVERSATION)},resetConversation:()=>{dl("resetConversation",!0,Ti.RESET_CONVERSATION)}},Symbol.toStringTag,{value:"Module"}));class Kv{constructor(){Se(this,"initialParams",{query:"",page:null,pageSize:null,includeFacets:!0,facetFilters:{},rangeFilters:[],catalogSegment:null,pricebooks:null});Se(this,"queryProxy");Se(this,"facetFiltersProxy");Se(this,"rangeFiltersProxy");Se(this,"catalogSegmentProxy");Se(this,"pricebooksProxy");Se(this,"_fullGet",(t,n)=>Reflect.get(t,n));Se(this,"_fullSet",(t,n,r)=>{const s=lA[n];return Nv(s,n,r),Reflect.set(t,n,r)});Se(this,"updateFacetFiltersProxy",t=>new Proxy({facetFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updateRangeFiltersProxy",t=>new Proxy({rangeFilters:t},{get:this._fullGet,set:this._fullSet}));Se(this,"updatePricebooksProxy",t=>new Proxy({pricebooks:t},{get:this._fullGet,set:this._fullSet}));this.queryProxy=new Proxy({query:this.initialParams.query},{get:this._fullGet,set:this._fullSet}),this.facetFiltersProxy=this.updateFacetFiltersProxy(this.initialParams.facetFilters||{}),this.rangeFiltersProxy=this.updateRangeFiltersProxy(this.initialParams.rangeFilters||[]),this.catalogSegmentProxy=new Proxy({catalogSegment:this.initialParams.catalogSegment},{get:this._fullGet,set:this._fullSet}),this.pricebooksProxy=this.updatePricebooksProxy(this.initialParams.pricebooks||null)}get query(){return this.queryProxy.query||""}get facetFilters(){return this.facetFiltersProxy.facetFilters||{}}get rangeFilters(){return this.rangeFiltersProxy.rangeFilters||[]}get catalogSegment(){return this.catalogSegmentProxy.catalogSegment||null}get pricebooks(){return this.pricebooksProxy.pricebooks||null}get state(){return{query:this.query,facetFilters:this.facetFilters,rangeFilters:this.rangeFilters,catalogSegment:this.catalogSegment,pricebooks:this.pricebooks,page:this.initialParams.page,pageSize:this.initialParams.pageSize,includeFacets:this.initialParams.includeFacets}}}const yt=new Kv,Qv=e=>{const t=fa(),n=rs();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:fe(F({},yt.state),{query:e})});return}yt.queryProxy.query=e},r1=e=>{$g(e,yt)},Jv=(e,t)=>{Vg(e,t,yt)},i1=e=>{qg(e,yt)},Zv=({field:e,value:t})=>{Yg({field:e,value:t},yt)},eN=e=>{Gg(e,yt)},s1=e=>{Wg(e,yt)},o1=e=>{if(!e||!e.query)throw new Error("Search context must include a query");const t=fa(),n=rs();if(!n||!t){n&&mn.clear(),mn.add({context:"search",payload:F({},e)});return}"facetFilters"in e&&r1(e.facetFilters||{}),"rangeFilters"in e&&i1(e.rangeFilters||[]),"catalogSegment"in e&&(yt.catalogSegmentProxy.catalogSegment=e.catalogSegment||null),"pricebooks"in e&&s1(e.pricebooks||[]),yt.queryProxy.query=e.query},tN=Object.freeze(Object.defineProperty({__proto__:null,setSearchContext:o1,updateCatalogSegment:eN,updateFacetFilter:Jv,updateFacetFilters:r1,updatePricebooks:s1,updateRangeFilter:Zv,updateRangeFilters:i1,updateSearchQuery:Qv},Symbol.toStringTag,{value:"Module"})),nN={categoryId:ut.categoryId,categoryName:ut.categoryIdProxy.categoryName||"",facetFilters:ut.facetFilters,rangeFilters:ut.rangeFilters,catalogSegment:ut.catalogSegment,pricebooks:ut.pricebooks},a1=B.createContext(nN),rN=({children:e})=>{const[t,n]=B.useState(ut.categoryId),[r,s]=B.useState(ut.categoryIdProxy.categoryName||""),[a,u]=B.useState(ut.facetFilters||{}),[c,d]=B.useState(ut.rangeFilters||[]),[f,p]=B.useState(ut.catalogSegment||null),[m,b]=B.useState(ut.pricebooks||null);B.useEffect(()=>{const _=({detail:A})=>{(A==null?void 0:A.property)==="categoryId"&&n(A.value),(A==null?void 0:A.property)==="categoryName"&&s(A.value),(A==null?void 0:A.property)==="facetFilters"&&u(A.value),(A==null?void 0:A.property)==="rangeFilters"&&d(A.value),(A==null?void 0:A.property)==="catalogSegment"&&p(A.value),(A==null?void 0:A.property)==="pricebooks"&&b(A.value)};return Bg(_),()=>{Ug(_)}},[]);const y=B.useMemo(()=>({categoryId:t,categoryName:r,facetFilters:a,rangeFilters:c,catalogSegment:f,pricebooks:m}),[t,r,a,c,f,m]);return S.jsx(a1.Provider,{value:y,children:e})},iN=()=>{const e=B.useContext(a1);if(!e)throw new Error("useBrowse must be used within a BrowseProvider");return e},sN={searchQuery:yt.query,facetFilters:yt.facetFilters,rangeFilters:yt.rangeFilters,catalogSegment:yt.catalogSegment,pricebooks:yt.pricebooks},u1=B.createContext(sN),oN=({children:e})=>{const[t,n]=B.useState(yt.query),[r,s]=B.useState(yt.facetFilters),[a,u]=B.useState(yt.rangeFilters),[c,d]=B.useState(yt.catalogSegment),[f,p]=B.useState(yt.pricebooks);B.useEffect(()=>{const b=({detail:y})=>{(y==null?void 0:y.property)==="query"&&n(y.value),(y==null?void 0:y.property)==="facetFilters"&&s(y.value),(y==null?void 0:y.property)==="rangeFilters"&&u(y.value),(y==null?void 0:y.property)==="catalogSegment"&&d(y.value),(y==null?void 0:y.property)==="pricebooks"&&p(y.value)};return Mg(b),()=>{Fg(b)}},[]);const m=B.useMemo(()=>({searchQuery:t,facetFilters:r,rangeFilters:a,catalogSegment:c,pricebooks:f}),[t,r,a,c,f]);return S.jsx(u1.Provider,{value:m,children:e})},aN=()=>{const e=B.useContext(u1);if(!e)throw new Error("useSearch must be used within a SearchProvider");return e},uN={productId:hr.productId,pdpLink:hr.pdpLink},l1=B.createContext(uN),lN=({children:e})=>{const[t,n]=B.useState(hr.productId),[r,s]=B.useState(hr.pdpLink);B.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),s(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&s(c.value)};return Hg(u),()=>{zg(u)}},[]);const a=B.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return S.jsx(l1.Provider,{value:a,children:e})},cN=()=>{const e=B.useContext(l1);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},c1=B.createContext({mode:Je.modeProxy.mode,entryType:Je.entryType,status:Je.statusProxy,dialogPosition:Je.dialogProxy.position,isDialogFullHeight:Je.dialogProxy.isFullHeight,dialogWidth:Je.dialogProxy.width,isModalFullscreen:Je.modalProxy.isFullscreen,previousComponentType:Je.statusProxy.type}),dN=({entryType:e,componentConfig:t,componentType:n,children:r})=>{const[s,a]=B.useState(e!=null?e:Je.entryTypeProxy.entryType),[u,c]=B.useState(Je.modeProxy.mode),[d,f]=B.useState({type:n||Je.statusProxy.type,isOpen:t&&"isOpen"in t?!!t.isOpen:Je.statusProxy.isOpen,isMinimized:t&&"isMinimized"in t?!!t.isMinimized:Je.statusProxy.isMinimized}),[p,m]=B.useState(Je.dialogProxy.position),[b,y]=B.useState(Je.dialogProxy.isFullHeight),[_,A]=B.useState(Je.dialogProxy.width),[v,w]=B.useState(Je.modalProxy.isFullscreen),k=B.useRef(!1),C=Av(d.type);B.useEffect(()=>{const Y=L=>{const{property:q,value:ne}=L.detail||{};if(!(!q||ne===void 0)){if(q==="mode"){c(ne);return}if(q==="entryType"){a(ne);return}if(q==="isMinimized"){f(de=>fe(F({},de),{isMinimized:ne}));return}if(q==="isOpen"){f(de=>fe(F({},de),{isOpen:ne}));return}if(q==="type"){f(de=>fe(F({},de),{type:ne}));return}if(q==="position"){m(ne);return}if(q==="isFullHeight"){y(ne);return}if(q==="width"){A(ne);return}if(q==="isFullscreen"){w(ne);return}}};return dv(Y),()=>{fv(Y)}},[]),ma(()=>{e&&ha(e)}),ma(()=>{if(k.current)return;k.current=!0;const Y=n||(t==null?void 0:t.type);Y&&cl(Y);const L=lv();t&&"isOpen"in t&&ei(!!t.isOpen),t&&"isMinimized"in t&&pa(!!t.isMinimized),L&&pa(!0)}),ma(()=>{if(!(t!=null&&t.options))return;const{dialogPosition:Y}=t.options;Y&&Tf(Y),"dialogFullHeight"in t.options&&mv(!!t.options.dialogFullHeight),"dialogWidth"in t.options&&t.options.dialogWidth&&A(t.options.dialogWidth),"isModalFullscreen"in t.options&&yf(!!t.options.isModalFullscreen)});const H=B.useMemo(()=>({mode:u,entryType:s,status:d,previousComponentType:C||"dialog",dialogPosition:p,isDialogFullHeight:b,dialogWidth:_,isModalFullscreen:v}),[u,s,d,C,p,b,_,v]);return S.jsx(c1.Provider,{value:H,children:r})},Zn=()=>{const e=B.useContext(c1);if(!e)throw new Error("useUIState must be used within a UIStateProvider");return e},d1=B.createContext(null),f1=B.createContext(null),_f=()=>{const e=B.useContext(f1);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},ti=()=>{const e=B.useContext(d1);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},Gs=()=>{const e=B.useContext(W0);if(!e)throw new Error("useCopilotDispatch must be used within a CopilotProvider");return e},er=()=>{const e=B.useContext(G0);if(!e)throw new Error("useCopilotState must be used within a CopilotProvider");return e},fN=({copilot:e})=>{const{logger:t,conversationHistory:n}=tt(),{isInline:r}=ti(),{addCopilotEvent:s,setConversationHistoryLoaded:a}=Gs(),{activeConversationId:u}=er(),c=B.useCallback(f=>{e&&e.requestSessionInformation(p=>{t==null||t.log("Retrieved session information: ",p),f==null||f(p)})},[e,t]),d=B.useCallback((f,p)=>{e&&f.conversationId&&e.getConversationEvents(f,m=>{t==null||t.log("Retrieved conversation messages: ",m),p==null||p(m)})},[e,t]);return B.useEffect(()=>{if(r||!u)return;if(n.sinceHours===0||(n==null?void 0:n.limit)===0){a(!0);return}const f=3600*1e3*n.sinceHours,p=new Date(Date.now()-f).toISOString(),m={conversationId:u,since:p,excludeEvents:["done","error","connection_error","refined_browse","refined_search","conversation_reset"]};typeof n.limit=="number"&&(m.limit=n.limit),d(m,b=>{const y=[];[...b.reverse()||[]].forEach(A=>{var w;const v=b.find(k=>k.id===A.eventSourceId);(w=v==null?void 0:v.name)!=null&&w.endsWith("_suggestions")||(A.bypassHandlers=!0,y.unshift(A))}),y.forEach(A=>{s(A)}),a(!0)})},[t,r,u,d,s,a,n]),{getSessionInformation:c,getConversationMessages:d}},h1=B.createContext({copilot:null,messages:[],groupedMessages:[],isLoading:!1,isResponseLoading:()=>!1,handleAskCim:()=>{},handleSearch:()=>{},handleBrowse:()=>{},handlePdp:()=>{},handleSuggestion:()=>{},handleUserInput:()=>{},handleCancel:()=>{},resetConversation:()=>{},getSessionInformation:()=>{},getConversationMessages:()=>{}}),hN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>{const{logger:p,clientContext:m,baseCatalogParams:b}=tt(),sn=aN(),{searchQuery:y}=sn,_=cn(sn,["searchQuery"]),Mn=iN(),{categoryId:A}=Mn,v=cn(Mn,["categoryId"]),{productId:w,pdpLink:k}=cN(),{setCopilot:C,setConnected:H,resetCopilot:Y,resetCopilotState:L,addCopilotEvent:q,removeLoadingMessage:ne,handleCopilotRequestAck:de,setActiveConversationId:V,setConversationIds:se,setAskCimPrompts:pe}=Gs(),{connected:ve,copilot:re,messages:oe,groupedMessages:xe,loadingMessages:ae,askCimPrompts:Q}=er(),{status:ie,entryType:N}=Zn(),{isInline:D}=ti(),{getConversationMessages:ee,getSessionInformation:I}=fN({copilot:re}),_e=B.useMemo(()=>ae.size>0,[ae]),Be=B.useCallback(we=>ae.has(we),[ae]),ye=B.useCallback(({query:we,facetFilters:Pe,rangeFilters:Me,catalogSegment:rt,pricebooks:ht,userPrompt:J,imageFile:ge})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Ce={searchParams:{query:we}};J&&(Ce.userPrompt=J),ge&&(Ce.attachments={image:ge}),Pe&&Object.keys(Pe).length>0&&(Ce.searchParams.facetFilters=Pe),Me&&Me.length>0&&(Ce.searchParams.rangeFilters=Me),rt&&(Ce.searchParams.catalogSegment=rt),ht&&(Ce.searchParams.pricebooks=ht),m&&(Ce.clientContext=m),ha("search"),re.search(Ce,Ve=>{const Ie=F({},Ve);de(Ie)})},[p,de,re,m]),Le=B.useCallback(({categoryId:we,categoryName:Pe,facetFilters:Me,rangeFilters:rt,catalogSegment:ht,pricebooks:J,userPrompt:ge,imageFile:Ce})=>{if(!re){p==null||p.error("Copilot is not initialized");return}const Ve=Me&&Object.keys(Me).length>0;if(we===""&&!Ve){p==null||p.error("Browse event must include facetFilters when categoryId is empty");return}const Ie={browseParams:{categoryId:we||""}};ge&&(Ie.userPrompt=ge),Ce&&(Ie.attachments={image:Ce}),Ve&&(Ie.browseParams.facetFilters=Me),rt&&rt.length>0&&(Ie.browseParams.rangeFilters=rt),ht&&(Ie.browseParams.catalogSegment=ht),Array.isArray(J)&&J.length>0&&(Ie.browseParams.pricebooks=J),(m||Pe)&&(Ie.clientContext={},m&&(Ie.clientContext=F({},m)),Pe&&(Ie.clientContext.cimLabel=Pe)),ha("browse"),re.browse(Ie,lt=>{var $r;const $t=F({},lt),Ut=(($r=$t.request)==null?void 0:$r.clientContext)||{},on=(Ut==null?void 0:Ut.cimLabel)||Pe;on&&$t.request&&($t.request.label=on),de($t)})},[p,de,re,m]),Ue=B.useCallback(({productId:we,productName:Pe,pdpLink:Me,userPrompt:rt,imageFile:ht})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const J={productId:we};rt&&(J.userPrompt=rt),Me&&(J.pdpLink=Me),ht&&(J.attachments={image:ht}),(m||Pe)&&(J.clientContext={},m&&(J.clientContext=F({},m)),Pe&&(J.clientContext.cimLabel=Pe)),b&&(J.baseCatalogParams=b),ha("pdp"),re.productView(J,ge=>{var lt;const Ce=F({},ge),Ve=((lt=Ce.request)==null?void 0:lt.clientContext)||{},Ie=(Ve==null?void 0:Ve.cimLabel)||Pe;Ie&&Ce.request&&(Ce.request.label=Ie),de(Ce)})},[p,re,de,m,b]),Ye=B.useCallback(({userPrompt:we,imageFile:Pe})=>{if(!re){p==null||p.error("Copilot is not initialized");return}if(!we)return;const Me={userPrompt:we};Pe&&(Me.attachments={image:Pe}),m&&(Me.clientContext=m),b&&(Me.baseCatalogParams=b),re.askCim(Me,rt=>{const ht=F({},rt);de(ht)})},[p,re,de,m,b]),Tt=B.useCallback(we=>{q(we),c==null||c(we)},[q,c]),Cn=B.useCallback(we=>{q(we),d==null||d(we)},[q,d]),rn=B.useCallback(we=>{u==null||u(we),H(!0)},[u,H]);B.useEffect(()=>{!re||!ve||!ie.isOpen||mn.size>0&&mn.processQueue(we=>{if(we.context==="search"){const Pe=F({},we.payload);o1(Pe)}if(we.context==="browse"){const Pe=F({},we.payload);Jg(Pe)}if(we.context==="pdp"){const Pe=F({},we.payload);Zg(Pe)}})},[ie.isOpen,re,ve]);const Tr=B.useCallback(we=>{const Pe=Me=>{const rt=fe(F({},Me),{id:Me.inquiryLinkId||Me.id});q(rt)};we.on("connect_ack",rn),we.on("partial_inquiry",Pe),we.on("display_products",q),we.on("progress",q),we.on("refined_search",Tt),we.on("refined_browse",Cn),we.on("done",Me=>{ne(Me.eventSourceId)}),we.on("error",Me=>{q(Me),ne(Me.eventSourceId)}),we.onDisconnect(Me=>{const rt=["io server disconnect","transport error","server shutting down"];if(p==null||p.log("Connection disconnected with reason: ",Me),!rt.includes(Me)){H(!1);return}p==null||p.log("De-registering event listeners");const ht=new Date().toISOString();q({name:"error",message:"Connection was lost. Please try again.",createdAt:ht,id:`error-${ht}`,sessionId:"session"}),we.off()})},[p,H,ne,Tt,Cn,q,rn]);B.useEffect(()=>{if(!re)return;const we=Pe=>{if(!D){if(!Pe.message&&Pe.eventSourceId&&Pe.eventSourceId===Q.requestId){pe({requestId:Pe.eventSourceId,message:Pe});return}q(Pe)}};return re.on("follow_up",we),()=>{re.off("follow_up",we)}},[re,oe,Q.requestId,D,q,pe]),B.useEffect(()=>{if(!re)return;const we=Pe=>{if(D)return;const Me=fe(F({},Pe),{id:Pe.inquiryLinkId||Pe.id});q(Me)};return re.on("inquiry",we),()=>{re.off("inquiry",we)}},[re,D,q]),ma(()=>{let we;n?we=n:we=a?"https://staging.copilot.search.cimulate.ai":"https://prod.copilot.search.cimulate.ai";const Pe={baseUrl:we};e?Pe.apiKey=e:t&&(Pe.apiToken=t),r&&(Pe.customerId=r),s&&(Pe.tenantId=s);const Me=new Yw(Pe);return C(Me),Tr(Me),Me.connect(),Me.requestSessionInformation(rt=>{p==null||p.log("Session Information: ",rt);const{activeConversationId:ht,conversationIds:J}=rt.data||{};ht&&V(ht),J!=null&&J.length&&se(J)}),()=>{Me.disconnect(),Me.off(),Y()}});const ir=B.useCallback(we=>{if(!re)return;const Pe={eventId:we,reason:"User cancelled the request"};re.cancelRequest(Pe,Me=>{q(Me),ne(we)})},[q,ne,re]),Qt=B.useCallback(()=>{re&&re.conversationReset({},we=>{L(),q(we),re.requestSessionInformation(Pe=>{p==null||p.log("Session Information: ",Pe);const{activeConversationId:Me,conversationIds:rt}=Pe.data||{};Me&&V(Me),rt!=null&&rt.length&&se(rt)})})},[re,p,q,L,V,se]),$e=B.useCallback((we,Pe)=>{if(!we)return;const Me={userPrompt:we};switch(Pe&&(Me.imageFile=Pe),N){case"ask_cim":Ye(Me);return;case"search":y?ye(F(F({query:y},_),Me)):Ye(Me);return;case"browse":Le(F(F({categoryId:A},v),Me));return;case"pdp":w?Ue(F({productId:w,pdpLink:k||""},Me)):Ye(Me);return}},[N,y,_,ye,Ye,A,v,Le,Ue,w,k]),vt=B.useCallback((we,Pe)=>{var ge,Ce,Ve;const rt=we.params.userPrompt||"";if(!rt)return;const ht=oe.find(Ie=>Ie.id===Pe);if(!ht)return;const J=ht.name.replace("_suggestions","");if(J==="ask_cim"){Ye({userPrompt:rt});return}if(J==="copilot_search"){const Ie=((ge=ht.request)==null?void 0:ge.searchParams)||{},$t=Ie.query===y;ye(fe(F({query:Ie.query||y},$t?_:{}),{userPrompt:rt}));return}if(J==="copilot_browse"){const Ie=ht.request,lt=Ie.browseParams||{},Ut=lt.categoryId===A,on=((Ce=Ie.clientContext)==null?void 0:Ce.cimLabel)||"";Le(fe(F({categoryId:lt.categoryId||A||""},Ut?v:{}),{categoryName:on,userPrompt:rt}));return}if(J==="product_view"){const Ie=ht.request||{},lt=Ie.productId,$t=lt===w,Ut=((Ve=Ie.clientContext)==null?void 0:Ve.cimLabel)||"";let on="";$t?on=k||"":on=Ie.pdpLink||"",Ue({productId:lt||w,pdpLink:on,productName:Ut,userPrompt:rt})}},[oe,y,_,ye,Ye,A,v,Le,Ue,w,k]),vn=B.useMemo(()=>({copilot:re,messages:oe,groupedMessages:xe,isLoading:_e,isResponseLoading:Be,handleAskCim:Ye,handleSearch:ye,handleBrowse:Le,handlePdp:Ue,handleUserInput:$e,handleSuggestion:vt,handleCancel:ir,resetConversation:Qt,getSessionInformation:I,getConversationMessages:ee}),[re,oe,xe,_e,Be,Ye,ye,Le,Ue,$e,vt,ir,Qt,I,ee]);return S.jsx(h1.Provider,{value:vn,children:f})},p1=()=>{const{copilot:e}=er(),{addCopilotEvent:t}=Gs();return{getCopilotSuggestions:B.useCallback((r,s,a)=>{if(!e||!s||!r)return;const u=c=>{t(c),a(c)};switch(s){case"ask_cim":e.askCimSuggestions(r,u);break;case"search":e.searchSuggestions({searchParams:r},u);break;case"browse":e.browseSuggestions({browseParams:r},u);break;case"pdp":e.productViewSuggestions({productId:r.productId},u);break}},[e,t])}},Or=()=>{const e=B.useContext(h1);if(!e)throw new Error("useCopilot must be used within a CopilotProvider");return e},pN=()=>{const{copilot:e,activeConversationId:t,askCimPrompts:n,conversationHistoryLoaded:r}=er(),{entryType:s}=Zn(),{resetCopilotState:a,addCopilotEvent:u,setAskCimPrompts:c}=Gs(),{handleSearch:d,handleBrowse:f,handlePdp:p,resetConversation:m,getSessionInformation:b,getConversationMessages:y}=Or(),{getCopilotSuggestions:_}=p1();B.useEffect(()=>{!e||!s||!t||!r||n.requestId||s==="ask_cim"&&_({},s,k=>{c({requestId:k.id,message:null})})},[e,t,n.requestId,s,r,_,c]);const A=B.useCallback(({query:k})=>{if(!e||!k)return;const{facetFilters:C}=yt.facetFiltersProxy,{rangeFilters:H}=yt.rangeFiltersProxy,{catalogSegment:Y}=yt.catalogSegmentProxy,{pricebooks:L}=yt.pricebooksProxy,q={query:k};q.facetFilters=C||{},q.rangeFilters=H||[],q.catalogSegment=Y||"",q.pricebooks=L||[],d(F({},q))},[e,d]),v=B.useCallback(({categoryId:k})=>{if(!e)return;const C=ut.categoryIdProxy.categoryName,{facetFilters:H}=ut.facetFiltersProxy,{rangeFilters:Y}=ut.rangeFiltersProxy,{catalogSegment:L}=ut.catalogSegmentProxy,{pricebooks:q}=ut.pricebooksProxy,ne={categoryId:k};ne.categoryName=C||"",ne.facetFilters=H||{},ne.rangeFilters=Y||[],ne.catalogSegment=L||"",ne.pricebooks=q||[],f(F({},ne))},[e,f]),w=B.useCallback(({productId:k})=>{if(!e||!k)return;const C={productId:k,pdpLink:hr.pdpLink,productName:hr.proxy.productName||""};p(C)},[e,p]);return B.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="query"&&A({query:C.value})};return Mg(k),()=>{Fg(k)}},[A]),B.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.property)==="pdp-context"){const H=C.value;w({productId:H.productId});return}(C==null?void 0:C.property)==="productId"&&w({productId:C.value})};return Hg(k),()=>{zg(k)}},[w]),B.useEffect(()=>{const k=({detail:C})=>{(C==null?void 0:C.property)==="categoryId"&&v({categoryId:C.value})};return Bg(k),()=>{Ug(k)}},[v]),B.useEffect(()=>{const k=({detail:C})=>{if((C==null?void 0:C.event)==Ti.RESET_CONVERSATION&&m(),(C==null?void 0:C.event)==Ti.GET_SESSION_INFORMATION){const H=C.value.callback;b(H)}if((C==null?void 0:C.event)==Ti.GET_CONVERSATION_MESSAGES){const{payload:H,callback:Y}=C.value;if(!H.conversationId||typeof Y!="function")return;y(H,Y)}if((C==null?void 0:C.event)==Ti.LOAD_CONVERSATION){const H=C.value;if(!H.conversationId)return;y(H,L=>{a(),L.forEach(q=>{u(q)})})}};return Pv(k),()=>{Ov(k)}},[m,b,y,a,u]),null},mN=({apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:f})=>S.jsxs(hN,{apiKey:e,apiToken:t,baseUrl:n,customerId:r,tenantId:s,isDevelopment:a,onConnect:u,onRefinedSearch:c,onRefinedBrowse:d,children:[S.jsx(pN,{}),f]}),gN=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),EN=({children:e,dispatch:t})=>{const n=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INITIALIZED,payload:_})},[t]),r=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_OPEN,payload:_})},[t]),s=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_INLINE,payload:_})},[t]),a=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:_})},[t]),u=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:_})},[t]),c=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:_})},[t]),d=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:_})},[t]),f=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PARAMS,payload:_})},[t]),p=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:_})},[t]),m=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:_})},[t]),b=B.useCallback(_=>{t({type:gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:_})},[t]),y=B.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:s,setElementId:a,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:p,setResponseMessage:m,setIsResponseLoading:b}),[n,r,s,a,u,c,d,f,p,m,b]);return S.jsx(f1.Provider,{value:y,children:e})},yN=(e,t)=>{const{type:n,payload:r}=t;switch(n){case gt.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case gt.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case gt.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case gt.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case gt.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case gt.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case gt.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case gt.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case gt.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case gt.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case gt.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case gt.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case gt.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},TN=({promptsConfig:e,children:t})=>{const[n,r]=$0(yN,fe(F(F({},e1),e||{}),{staticQuestions:gN((e==null?void 0:e.staticQuestions)||[])}));return S.jsx(d1.Provider,{value:n,children:S.jsx(EN,{dispatch:r,children:t})})},m1=({mode:e,apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,theme:f,openLinksInNewTab:p,globalClassName:m,isDevelopment:b=!1,componentType:y,componentConfig:_,entryType:A,entryMessage:v,disclaimerText:w,disclaimerMarkdown:k,clientContext:C,baseCatalogParams:H,searchPlaceholder:Y,searchButtonLabel:L,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:de,autoScroll:V,promptsConfig:se,resetConversationMessage:pe,conversationHistory:ve,onConnect:re,onCopilotEvent:oe,onRefinedSearch:xe,onRefinedBrowse:ae,__features:Q,children:ie})=>S.jsx(av,{mode:e,baseUrl:r,apiKey:t,apiToken:n,customerId:s,tenantId:a,logoUrl:u,headerText:c,headerConfig:d,entryMessage:v,theme:f,globalClassName:m,openLinksInNewTab:p,searchPlaceholder:Y,searchButtonLabel:L,searchConfig:q,suggestionButtonConfig:ne,messageAlignment:de,autoScroll:V,componentConfig:_,clientContext:C,baseCatalogParams:H,disclaimerMarkdown:k,disclaimerText:w,resetConversationMessage:pe,conversationHistory:ve,isDevelopment:b,__features:Q,children:S.jsx(dN,{entryType:A,componentConfig:_,componentType:y,children:S.jsx(yv,{onCopilotEvent:oe,children:S.jsx(lN,{children:S.jsx(rN,{children:S.jsx(oN,{children:S.jsx(TN,{promptsConfig:se,children:S.jsx(mN,{apiKey:t,apiToken:n,baseUrl:r,customerId:s,tenantId:a,isDevelopment:b,entryType:A,onConnect:re,onRefinedSearch:xe,onRefinedBrowse:ae,onCopilotEvent:oe,children:ie})})})})})})})});var Sf={exports:{}},On={},xf={exports:{}},wf={};var g1;function bN(){return g1||(g1=1,(function(e){function t(Q,ie){var N=Q.length;Q.push(ie);e:for(;0<N;){var D=N-1>>>1,ee=Q[D];if(0<s(ee,ie))Q[D]=ie,Q[N]=ee,N=D;else break e}}function n(Q){return Q.length===0?null:Q[0]}function r(Q){if(Q.length===0)return null;var ie=Q[0],N=Q.pop();if(N!==ie){Q[0]=N;e:for(var D=0,ee=Q.length,I=ee>>>1;D<I;){var _e=2*(D+1)-1,Be=Q[_e],ye=_e+1,Le=Q[ye];if(0>s(Be,N))ye<ee&&0>s(Le,Be)?(Q[D]=Le,Q[ye]=N,D=ye):(Q[D]=Be,Q[_e]=N,D=_e);else if(ye<ee&&0>s(Le,N))Q[D]=Le,Q[ye]=N,D=ye;else break e}}return ie}function s(Q,ie){var N=Q.sortIndex-ie.sortIndex;return N!==0?N:Q.id-ie.id}if(typeof performance=="object"&&typeof performance.now=="function"){var a=performance;e.unstable_now=function(){return a.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],p=1,m=null,b=3,y=!1,_=!1,A=!1,v=typeof setTimeout=="function"?setTimeout:null,w=typeof clearTimeout=="function"?clearTimeout:null,k=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function C(Q){for(var ie=n(f);ie!==null;){if(ie.callback===null)r(f);else if(ie.startTime<=Q)r(f),ie.sortIndex=ie.expirationTime,t(d,ie);else break;ie=n(f)}}function H(Q){if(A=!1,C(Q),!_)if(n(d)!==null)_=!0,xe(Y);else{var ie=n(f);ie!==null&&ae(H,ie.startTime-Q)}}function Y(Q,ie){_=!1,A&&(A=!1,w(ne),ne=-1),y=!0;var N=b;try{for(C(ie),m=n(d);m!==null&&(!(m.expirationTime>ie)||Q&&!se());){var D=m.callback;if(typeof D=="function"){m.callback=null,b=m.priorityLevel;var ee=D(m.expirationTime<=ie);ie=e.unstable_now(),typeof ee=="function"?m.callback=ee:m===n(d)&&r(d),C(ie)}else r(d);m=n(d)}if(m!==null)var I=!0;else{var _e=n(f);_e!==null&&ae(H,_e.startTime-ie),I=!1}return I}finally{m=null,b=N,y=!1}}var L=!1,q=null,ne=-1,de=5,V=-1;function se(){return!(e.unstable_now()-V<de)}function pe(){if(q!==null){var Q=e.unstable_now();V=Q;var ie=!0;try{ie=q(!0,Q)}finally{ie?ve():(L=!1,q=null)}}else L=!1}var ve;if(typeof k=="function")ve=function(){k(pe)};else if(typeof MessageChannel!="undefined"){var re=new MessageChannel,oe=re.port2;re.port1.onmessage=pe,ve=function(){oe.postMessage(null)}}else ve=function(){v(pe,0)};function xe(Q){q=Q,L||(L=!0,ve())}function ae(Q,ie){ne=v(function(){Q(e.unstable_now())},ie)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(Q){Q.callback=null},e.unstable_continueExecution=function(){_||y||(_=!0,xe(Y))},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"):de=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 ie=3;break;default:ie=b}var N=b;b=ie;try{return Q()}finally{b=N}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(Q,ie){switch(Q){case 1:case 2:case 3:case 4:case 5:break;default:Q=3}var N=b;b=Q;try{return ie()}finally{b=N}},e.unstable_scheduleCallback=function(Q,ie,N){var D=e.unstable_now();switch(typeof N=="object"&&N!==null?(N=N.delay,N=typeof N=="number"&&0<N?D+N:D):N=D,Q){case 1:var ee=-1;break;case 2:ee=250;break;case 5:ee=1073741823;break;case 4:ee=1e4;break;default:ee=5e3}return ee=N+ee,Q={id:p++,callback:ie,priorityLevel:Q,startTime:N,expirationTime:ee,sortIndex:-1},N>D?(Q.sortIndex=N,t(f,Q),n(d)===null&&Q===n(f)&&(A?(w(ne),ne=-1):A=!0,ae(H,N-D))):(Q.sortIndex=ee,t(d,Q),_||y||(_=!0,xe(Y))),Q},e.unstable_shouldYield=se,e.unstable_wrapCallback=function(Q){var ie=b;return function(){var N=b;b=ie;try{return Q.apply(this,arguments)}finally{b=N}}}})(wf)),wf}var E1;function _N(){return E1||(E1=1,xf.exports=bN()),xf.exports}var y1;function SN(){if(y1)return On;y1=1;var e=fn(),t=_N();function n(i){for(var o="https://reactjs.org/docs/error-decoder.html?invariant="+i,l=1;l<arguments.length;l++)o+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+i+"; visit "+o+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,s={};function a(i,o){u(i,o),u(i+"Capture",o)}function u(i,o){for(s[i]=o,i=0;i<o.length;i++)r.add(o[i])}var c=!(typeof window=="undefined"||typeof window.document=="undefined"||typeof window.document.createElement=="undefined"),d=Object.prototype.hasOwnProperty,f=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,p={},m={};function b(i){return d.call(m,i)?!0:d.call(p,i)?!1:f.test(i)?m[i]=!0:(p[i]=!0,!1)}function y(i,o,l,h){if(l!==null&&l.type===0)return!1;switch(typeof o){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,o,l,h){if(o===null||typeof o=="undefined"||y(i,o,l,h))return!0;if(h)return!1;if(l!==null)switch(l.type){case 3:return!o;case 4:return o===!1;case 5:return isNaN(o);case 6:return isNaN(o)||1>o}return!1}function A(i,o,l,h,E,T,x){this.acceptsBooleans=o===2||o===3||o===4,this.attributeName=h,this.attributeNamespace=E,this.mustUseProperty=l,this.propertyName=i,this.type=o,this.sanitizeURL=T,this.removeEmptyString=x}var v={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(i){v[i]=new A(i,0,!1,i,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(i){var o=i[0];v[o]=new A(o,1,!1,i[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(i){v[i]=new A(i,2,!1,i.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(i){v[i]=new A(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){v[i]=new A(i,3,!1,i.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(i){v[i]=new A(i,3,!0,i,null,!1,!1)}),["capture","download"].forEach(function(i){v[i]=new A(i,4,!1,i,null,!1,!1)}),["cols","rows","size","span"].forEach(function(i){v[i]=new A(i,6,!1,i,null,!1,!1)}),["rowSpan","start"].forEach(function(i){v[i]=new A(i,5,!1,i.toLowerCase(),null,!1,!1)});var w=/[\-:]([a-z])/g;function k(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 o=i.replace(w,k);v[o]=new A(o,1,!1,i,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(i){var o=i.replace(w,k);v[o]=new A(o,1,!1,i,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!1,!1)}),v.xlinkHref=new A("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(i){v[i]=new A(i,1,!1,i.toLowerCase(),null,!0,!0)});function C(i,o,l,h){var E=v.hasOwnProperty(o)?v[o]:null;(E!==null?E.type!==0:h||!(2<o.length)||o[0]!=="o"&&o[0]!=="O"||o[1]!=="n"&&o[1]!=="N")&&(_(o,l,E,h)&&(l=null),h||E===null?b(o)&&(l===null?i.removeAttribute(o):i.setAttribute(o,""+l)):E.mustUseProperty?i[E.propertyName]=l===null?E.type===3?!1:"":l:(o=E.attributeName,h=E.attributeNamespace,l===null?i.removeAttribute(o):(E=E.type,l=E===3||E===4&&l===!0?"":""+l,h?i.setAttributeNS(h,o,l):i.setAttribute(o,l))))}var H=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,Y=Symbol.for("react.element"),L=Symbol.for("react.portal"),q=Symbol.for("react.fragment"),ne=Symbol.for("react.strict_mode"),de=Symbol.for("react.profiler"),V=Symbol.for("react.provider"),se=Symbol.for("react.context"),pe=Symbol.for("react.forward_ref"),ve=Symbol.for("react.suspense"),re=Symbol.for("react.suspense_list"),oe=Symbol.for("react.memo"),xe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),Q=Symbol.iterator;function ie(i){return i===null||typeof i!="object"?null:(i=Q&&i[Q]||i["@@iterator"],typeof i=="function"?i:null)}var N=Object.assign,D;function ee(i){if(D===void 0)try{throw Error()}catch(l){var o=l.stack.trim().match(/\n( *(at )?)/);D=o&&o[1]||""}return`
|
|
11
11
|
`+D+i}var I=!1;function _e(i,o){if(!i||I)return"";I=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(o)if(o=function(){throw Error()},Object.defineProperty(o.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(o,[])}catch(Z){var h=Z}Reflect.construct(i,[],o)}else{try{o.call()}catch(Z){h=Z}i.call(o.prototype)}else{try{throw Error()}catch(Z){h=Z}i()}}catch(Z){if(Z&&h&&typeof Z.stack=="string"){for(var E=Z.stack.split(`
|
|
12
12
|
`),T=h.stack.split(`
|
|
13
|
-
`),x=E.length-1,
|
|
14
|
-
`+E[x].replace(" at new "," at ");return i.displayName&&H.includes("<anonymous>")&&(H=H.replace("<anonymous>",i.displayName)),H}while(1<=x&&0<=L);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Be(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case R:return"Portal";case me:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case he:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ue(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Tt(i){var o=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,T.call(this,x)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Cn(i){i._valueTracker||(i._valueTracker=Tt(i))}function rn(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function Tr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function ir(i,o){var l=o.checked;return k({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Qt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Ue(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function $e(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function vt(i,o){$e(i,o);var l=Ue(o.value),h=o.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}o.hasOwnProperty("value")?sn(i,o.type,l):o.hasOwnProperty("defaultValue")&&sn(i,o.type,Ue(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function sn(i,o,l){(o!=="number"||Tr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Mn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ue(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return k({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Mn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Ue(l)}}function rt(i,o){var l=Ue(o.value),h=Ue(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function ht(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$t=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){$t.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),lt[o]=lt[i]})});function Ut(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||lt.hasOwnProperty(i)&<[i]?(""+o).trim():o+"px"}function on(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Ut(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var $r=k({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(i,o){if(o){if($r[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Vr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yn=null;function Tp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var bp=null,Co=null,vo=null;function q_(i){if(i=bu(i)){if(typeof bp!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Mc(o),bp(i.stateNode,i.type,o))}}function Y_(i){Co?vo?vo.push(i):vo=[i]:Co=i}function G_(){if(Co){var i=Co,o=vo;if(vo=Co=null,q_(i),o)for(i=0;i<o.length;i++)q_(o[i])}}function W_(i,o){return i(o)}function X_(){}var _p=!1;function K_(i,o,l){if(_p)return i(o,l);_p=!0;try{return W_(i,o,l)}finally{_p=!1,(Co!==null||vo!==null)&&(X_(),G_())}}function Za(i,o){var l=i.stateNode;if(l===null)return null;var h=Mc(l);if(h===null)return null;l=h[o];e:switch(o){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,o,typeof l));return l}var Sp=!1;if(c)try{var eu={};Object.defineProperty(eu,"passive",{get:function(){Sp=!0}}),window.addEventListener("test",eu,eu),window.removeEventListener("test",eu,eu)}catch(i){Sp=!1}function C9(i,o,l,h,E,T,x,L,H){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(ce){this.onError(ce)}}var tu=!1,pc=null,mc=!1,xp=null,v9={onError:function(i){tu=!0,pc=i}};function k9(i,o,l,h,E,T,x,L,H){tu=!1,pc=null,C9.apply(v9,arguments)}function N9(i,o,l,h,E,T,x,L,H){if(k9.apply(this,arguments),tu){if(tu){var Z=pc;tu=!1,pc=null}else throw Error(n(198));mc||(mc=!0,xp=Z)}}function Ss(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function Q_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function J_(i){if(Ss(i)!==i)throw Error(n(188))}function P9(i){var o=i.alternate;if(!o){if(o=Ss(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return J_(E),i;if(T===h)return J_(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,L=E.child;L;){if(L===l){x=!0,l=E,h=T;break}if(L===h){x=!0,h=E,l=T;break}L=L.sibling}if(!x){for(L=T.child;L;){if(L===l){x=!0,l=T,h=E;break}if(L===h){x=!0,h=T,l=E;break}L=L.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function Z_(i){return i=P9(i),i!==null?eS(i):null}function eS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=eS(i);if(o!==null)return o;i=i.sibling}return null}var tS=t.unstable_scheduleCallback,nS=t.unstable_cancelCallback,O9=t.unstable_shouldYield,I9=t.unstable_requestPaint,Rt=t.unstable_now,R9=t.unstable_getCurrentPriorityLevel,wp=t.unstable_ImmediatePriority,rS=t.unstable_UserBlockingPriority,gc=t.unstable_NormalPriority,L9=t.unstable_LowPriority,iS=t.unstable_IdlePriority,Ec=null,qr=null;function D9(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Ec,i,void 0,(i.current.flags&128)===128)}catch(o){}}var br=Math.clz32?Math.clz32:B9,M9=Math.log,F9=Math.LN2;function B9(i){return i>>>=0,i===0?32:31-(M9(i)/F9|0)|0}var yc=64,Tc=4194304;function nu(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 bc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,x=l&268435455;if(x!==0){var L=x&~E;L!==0?h=nu(L):(T&=x,T!==0&&(h=nu(T)))}else x=l&~E,x!==0?h=nu(x):T!==0&&(h=nu(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-br(o),E=1<<l,h|=i[l],o&=~E;return h}function U9(i,o){switch(i){case 1:case 2:case 4:return o+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 o+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 H9(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-br(T),L=1<<x,H=E[x];H===-1?((L&l)===0||(L&h)!==0)&&(E[x]=U9(L,o)):H<=o&&(i.expiredLanes|=L),T&=~L}}function Ap(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function sS(){var i=yc;return yc<<=1,(yc&4194240)===0&&(yc=64),i}function Cp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function ru(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-br(o),i[o]=l}function z9(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-br(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function vp(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-br(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function oS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var aS,kp,uS,lS,cS,Np=!1,_c=[],Pi=null,Oi=null,Ii=null,iu=new Map,su=new Map,Ri=[],j9="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 dS(i,o){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":iu.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":su.delete(o.pointerId)}}function ou(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=bu(o),o!==null&&kp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function $9(i,o,l,h,E){switch(o){case"focusin":return Pi=ou(Pi,i,o,l,h,E),!0;case"dragenter":return Oi=ou(Oi,i,o,l,h,E),!0;case"mouseover":return Ii=ou(Ii,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return iu.set(T,ou(iu.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,su.set(T,ou(su.get(T)||null,i,o,l,h,E)),!0}return!1}function fS(i){var o=xs(i.target);if(o!==null){var l=Ss(o);if(l!==null){if(o=l.tag,o===13){if(o=Q_(l),o!==null){i.blockedOn=o,cS(i.priority,function(){uS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Sc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Op(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Yn=h,l.target.dispatchEvent(h),Yn=null}else return o=bu(l),o!==null&&kp(o),i.blockedOn=l,!1;o.shift()}return!0}function hS(i,o,l){Sc(i)&&l.delete(o)}function V9(){Np=!1,Pi!==null&&Sc(Pi)&&(Pi=null),Oi!==null&&Sc(Oi)&&(Oi=null),Ii!==null&&Sc(Ii)&&(Ii=null),iu.forEach(hS),su.forEach(hS)}function au(i,o){i.blockedOn===o&&(i.blockedOn=null,Np||(Np=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,V9)))}function uu(i){function o(E){return au(E,i)}if(0<_c.length){au(_c[0],i);for(var l=1;l<_c.length;l++){var h=_c[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&au(Pi,i),Oi!==null&&au(Oi,i),Ii!==null&&au(Ii,i),iu.forEach(o),su.forEach(o),l=0;l<Ri.length;l++)h=Ri[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)fS(l),l.blockedOn===null&&Ri.shift()}var ko=U.ReactCurrentBatchConfig,xc=!0;function q9(i,o,l,h){var E=ct,T=ko.transition;ko.transition=null;try{ct=1,Pp(i,o,l,h)}finally{ct=E,ko.transition=T}}function Y9(i,o,l,h){var E=ct,T=ko.transition;ko.transition=null;try{ct=4,Pp(i,o,l,h)}finally{ct=E,ko.transition=T}}function Pp(i,o,l,h){if(xc){var E=Op(i,o,l,h);if(E===null)Wp(i,o,h,wc,l),dS(i,h);else if($9(E,i,o,l,h))h.stopPropagation();else if(dS(i,h),o&4&&-1<j9.indexOf(i)){for(;E!==null;){var T=bu(E);if(T!==null&&aS(T),T=Op(i,o,l,h),T===null&&Wp(i,o,h,wc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Wp(i,o,h,null,l)}}var wc=null;function Op(i,o,l,h){if(wc=null,i=Tp(h),i=xs(i),i!==null)if(o=Ss(i),o===null)i=null;else if(l=o.tag,l===13){if(i=Q_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return wc=i,null}function pS(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(R9()){case wp:return 1;case rS:return 4;case gc:case L9:return 16;case iS:return 536870912;default:return 16}default:return 16}}var Li=null,Ip=null,Ac=null;function mS(){if(Ac)return Ac;var i,o=Ip,l=o.length,h,E="value"in Li?Li.value:Li.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&o[l-h]===E[T-h];h++);return Ac=E.slice(i,1<h?1-h:void 0)}function Cc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function vc(){return!0}function gS(){return!1}function Gn(i){function o(l,h,E,T,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=x,this.currentTarget=null;for(var L in i)i.hasOwnProperty(L)&&(l=i[L],this[L]=l?l(T):T[L]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?vc:gS,this.isPropagationStopped=gS,this}return k(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vc)},persist:function(){},isPersistent:vc}),o}var No={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Rp=Gn(No),lu=k({},No,{view:0,detail:0}),G9=Gn(lu),Lp,Dp,cu,kc=k({},lu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Fp,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!==cu&&(cu&&i.type==="mousemove"?(Lp=i.screenX-cu.screenX,Dp=i.screenY-cu.screenY):Dp=Lp=0,cu=i),Lp)},movementY:function(i){return"movementY"in i?i.movementY:Dp}}),ES=Gn(kc),W9=k({},kc,{dataTransfer:0}),X9=Gn(W9),K9=k({},lu,{relatedTarget:0}),Mp=Gn(K9),Q9=k({},No,{animationName:0,elapsedTime:0,pseudoElement:0}),J9=Gn(Q9),Z9=k({},No,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),eB=Gn(Z9),tB=k({},No,{data:0}),yS=Gn(tB),nB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},rB={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"},iB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function sB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=iB[i])?!!o[i]:!1}function Fp(){return sB}var oB=k({},lu,{key:function(i){if(i.key){var o=nB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Cc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?rB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Fp,charCode:function(i){return i.type==="keypress"?Cc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Cc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),aB=Gn(oB),uB=k({},kc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),TS=Gn(uB),lB=k({},lu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Fp}),cB=Gn(lB),dB=k({},No,{propertyName:0,elapsedTime:0,pseudoElement:0}),fB=Gn(dB),hB=k({},kc,{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}),pB=Gn(hB),mB=[9,13,27,32],Bp=c&&"CompositionEvent"in window,du=null;c&&"documentMode"in document&&(du=document.documentMode);var gB=c&&"TextEvent"in window&&!du,bS=c&&(!Bp||du&&8<du&&11>=du),_S=" ",SS=!1;function xS(i,o){switch(i){case"keyup":return mB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function wS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Po=!1;function EB(i,o){switch(i){case"compositionend":return wS(o);case"keypress":return o.which!==32?null:(SS=!0,_S);case"textInput":return i=o.data,i===_S&&SS?null:i;default:return null}}function yB(i,o){if(Po)return i==="compositionend"||!Bp&&xS(i,o)?(i=mS(),Ac=Ip=Li=null,Po=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return bS&&o.locale!=="ko"?null:o.data;default:return null}}var TB={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 AS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!TB[i.type]:o==="textarea"}function CS(i,o,l,h){Y_(h),o=Rc(o,"onChange"),0<o.length&&(l=new Rp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var fu=null,hu=null;function bB(i){VS(i,0)}function Nc(i){var o=Do(i);if(rn(o))return i}function _B(i,o){if(i==="change")return o}var vS=!1;if(c){var Up;if(c){var Hp="oninput"in document;if(!Hp){var kS=document.createElement("div");kS.setAttribute("oninput","return;"),Hp=typeof kS.oninput=="function"}Up=Hp}else Up=!1;vS=Up&&(!document.documentMode||9<document.documentMode)}function NS(){fu&&(fu.detachEvent("onpropertychange",PS),hu=fu=null)}function PS(i){if(i.propertyName==="value"&&Nc(hu)){var o=[];CS(o,hu,i,Tp(i)),K_(bB,o)}}function SB(i,o,l){i==="focusin"?(NS(),fu=o,hu=l,fu.attachEvent("onpropertychange",PS)):i==="focusout"&&NS()}function xB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return Nc(hu)}function wB(i,o){if(i==="click")return Nc(o)}function AB(i,o){if(i==="input"||i==="change")return Nc(o)}function CB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _r=typeof Object.is=="function"?Object.is:CB;function pu(i,o){if(_r(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!_r(i[E],o[E]))return!1}return!0}function OS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function IS(i,o){var l=OS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=OS(l)}}function RS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?RS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function LS(){for(var i=window,o=Tr();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=Tr(i.document)}return o}function zp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function vB(i){var o=LS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&RS(l.ownerDocument.documentElement,l)){if(h!==null&&zp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=IS(l,T);var x=IS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var kB=c&&"documentMode"in document&&11>=document.documentMode,Oo=null,jp=null,mu=null,$p=!1;function DS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;$p||Oo==null||Oo!==Tr(h)||(h=Oo,"selectionStart"in h&&zp(h)?h={start:h.selectionStart,end:h.selectionEnd}:(h=(h.ownerDocument&&h.ownerDocument.defaultView||window).getSelection(),h={anchorNode:h.anchorNode,anchorOffset:h.anchorOffset,focusNode:h.focusNode,focusOffset:h.focusOffset}),mu&&pu(mu,h)||(mu=h,h=Rc(jp,"onSelect"),0<h.length&&(o=new Rp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Oo)))}function Pc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Io={animationend:Pc("Animation","AnimationEnd"),animationiteration:Pc("Animation","AnimationIteration"),animationstart:Pc("Animation","AnimationStart"),transitionend:Pc("Transition","TransitionEnd")},Vp={},MS={};c&&(MS=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Oc(i){if(Vp[i])return Vp[i];if(!Io[i])return i;var o=Io[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in MS)return Vp[i]=o[l];return i}var FS=Oc("animationend"),BS=Oc("animationiteration"),US=Oc("animationstart"),HS=Oc("transitionend"),zS=new Map,jS="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 Di(i,o){zS.set(i,o),a(o,[i])}for(var qp=0;qp<jS.length;qp++){var Yp=jS[qp],NB=Yp.toLowerCase(),PB=Yp[0].toUpperCase()+Yp.slice(1);Di(NB,"on"+PB)}Di(FS,"onAnimationEnd"),Di(BS,"onAnimationIteration"),Di(US,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(HS,"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 gu="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(" "),OB=new Set("cancel close invalid load scroll toggle".split(" ").concat(gu));function $S(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,N9(h,o,void 0,i),i.currentTarget=null}function VS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var x=h.length-1;0<=x;x--){var L=h[x],H=L.instance,Z=L.currentTarget;if(L=L.listener,H!==T&&E.isPropagationStopped())break e;$S(E,L,Z),T=H}else for(x=0;x<h.length;x++){if(L=h[x],H=L.instance,Z=L.currentTarget,L=L.listener,H!==T&&E.isPropagationStopped())break e;$S(E,L,Z),T=H}}}if(mc)throw i=xp,mc=!1,xp=null,i}function bt(i,o){var l=o[em];l===void 0&&(l=o[em]=new Set);var h=i+"__bubble";l.has(h)||(qS(o,i,2,!1),l.add(h))}function Gp(i,o,l){var h=0;o&&(h|=4),qS(l,i,h,o)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function Eu(i){if(!i[Ic]){i[Ic]=!0,r.forEach(function(l){l!=="selectionchange"&&(OB.has(l)||Gp(l,!1,i),Gp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Ic]||(o[Ic]=!0,Gp("selectionchange",!1,o))}}function qS(i,o,l,h){switch(pS(o)){case 1:var E=q9;break;case 4:E=Y9;break;default:E=Pp}l=E.bind(null,o,l,i),E=void 0,!Sp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Wp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var L=h.stateNode.containerInfo;if(L===E||L.nodeType===8&&L.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var H=x.tag;if((H===3||H===4)&&(H=x.stateNode.containerInfo,H===E||H.nodeType===8&&H.parentNode===E))return;x=x.return}for(;L!==null;){if(x=xs(L),x===null)return;if(H=x.tag,H===5||H===6){h=T=x;continue e}L=L.parentNode}}h=h.return}K_(function(){var Z=T,ce=Tp(l),pe=[];e:{var ue=zS.get(i);if(ue!==void 0){var Ae=Rp,Ne=i;switch(i){case"keypress":if(Cc(l)===0)break e;case"keydown":case"keyup":Ae=aB;break;case"focusin":Ne="focus",Ae=Mp;break;case"focusout":Ne="blur",Ae=Mp;break;case"beforeblur":case"afterblur":Ae=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":Ae=ES;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=X9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=cB;break;case FS:case BS:case US:Ae=J9;break;case HS:Ae=fB;break;case"scroll":Ae=G9;break;case"wheel":Ae=pB;break;case"copy":case"cut":case"paste":Ae=eB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=TS}var Oe=(o&4)!==0,Lt=!Oe&&i==="scroll",W=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var j=Z,K;j!==null;){K=j;var Te=K.stateNode;if(K.tag===5&&Te!==null&&(K=Te,W!==null&&(Te=Za(j,W),Te!=null&&Oe.push(yu(j,Te,K)))),Lt)break;j=j.return}0<Oe.length&&(ue=new Ae(ue,Ne,null,l,ce),pe.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&l!==Yn&&(Ne=l.relatedTarget||l.fromElement)&&(xs(Ne)||Ne[li]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(Ne=l.relatedTarget||l.toElement,Ae=Z,Ne=Ne?xs(Ne):null,Ne!==null&&(Lt=Ss(Ne),Ne!==Lt||Ne.tag!==5&&Ne.tag!==6)&&(Ne=null)):(Ae=null,Ne=Z),Ae!==Ne)){if(Oe=ES,Te="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=TS,Te="onPointerLeave",W="onPointerEnter",j="pointer"),Lt=Ae==null?ue:Do(Ae),K=Ne==null?ue:Do(Ne),ue=new Oe(Te,j+"leave",Ae,l,ce),ue.target=Lt,ue.relatedTarget=K,Te=null,xs(ce)===Z&&(Oe=new Oe(W,j+"enter",Ne,l,ce),Oe.target=K,Oe.relatedTarget=Lt,Te=Oe),Lt=Te,Ae&&Ne)t:{for(Oe=Ae,W=Ne,j=0,K=Oe;K;K=Ro(K))j++;for(K=0,Te=W;Te;Te=Ro(Te))K++;for(;0<j-K;)Oe=Ro(Oe),j--;for(;0<K-j;)W=Ro(W),K--;for(;j--;){if(Oe===W||W!==null&&Oe===W.alternate)break t;Oe=Ro(Oe),W=Ro(W)}Oe=null}else Oe=null;Ae!==null&&YS(pe,ue,Ae,Oe,!1),Ne!==null&&Lt!==null&&YS(pe,Lt,Ne,Oe,!0)}}e:{if(ue=Z?Do(Z):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var De=_B;else if(AS(ue))if(vS)De=AB;else{De=xB;var He=SB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=wB);if(De&&(De=De(i,Z))){CS(pe,De,l,ce);break e}He&&He(i,ue,Z),i==="focusout"&&(He=ue._wrapperState)&&He.controlled&&ue.type==="number"&&sn(ue,"number",ue.value)}switch(He=Z?Do(Z):window,i){case"focusin":(AS(He)||He.contentEditable==="true")&&(Oo=He,jp=Z,mu=null);break;case"focusout":mu=jp=Oo=null;break;case"mousedown":$p=!0;break;case"contextmenu":case"mouseup":case"dragend":$p=!1,DS(pe,l,ce);break;case"selectionchange":if(kB)break;case"keydown":case"keyup":DS(pe,l,ce)}var ze;if(Bp)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Po?xS(i,l)&&(Ge="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(bS&&l.locale!=="ko"&&(Po||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Po&&(ze=mS()):(Li=ce,Ip="value"in Li?Li.value:Li.textContent,Po=!0)),He=Rc(Z,Ge),0<He.length&&(Ge=new yS(Ge,i,null,l,ce),pe.push({event:Ge,listeners:He}),ze?Ge.data=ze:(ze=wS(l),ze!==null&&(Ge.data=ze)))),(ze=gB?EB(i,l):yB(i,l))&&(Z=Rc(Z,"onBeforeInput"),0<Z.length&&(ce=new yS("onBeforeInput","beforeinput",null,l,ce),pe.push({event:ce,listeners:Z}),ce.data=ze))}VS(pe,o)})}function yu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Rc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=Za(i,l),T!=null&&h.unshift(yu(i,T,E)),T=Za(i,o),T!=null&&h.push(yu(i,T,E))),i=i.return}return h}function Ro(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function YS(i,o,l,h,E){for(var T=o._reactName,x=[];l!==null&&l!==h;){var L=l,H=L.alternate,Z=L.stateNode;if(H!==null&&H===h)break;L.tag===5&&Z!==null&&(L=Z,E?(H=Za(l,T),H!=null&&x.unshift(yu(l,H,L))):E||(H=Za(l,T),H!=null&&x.push(yu(l,H,L)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var IB=/\r\n?/g,RB=/\u0000|\uFFFD/g;function GS(i){return(typeof i=="string"?i:""+i).replace(IB,`
|
|
15
|
-
`).replace(RB,"")}function Lc(i,o,l){if(o=GS(o),GS(i)!==o&&l)throw Error(n(425))}function Dc(){}var Xp=null,Kp=null;function Qp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Jp=typeof setTimeout=="function"?setTimeout:void 0,LB=typeof clearTimeout=="function"?clearTimeout:void 0,WS=typeof Promise=="function"?Promise:void 0,DB=typeof queueMicrotask=="function"?queueMicrotask:typeof WS!="undefined"?function(i){return WS.resolve(null).then(i).catch(MB)}:Jp;function MB(i){setTimeout(function(){throw i})}function Zp(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),uu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);uu(o)}function Mi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function XS(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Lo=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Lo,Tu="__reactProps$"+Lo,li="__reactContainer$"+Lo,em="__reactEvents$"+Lo,FB="__reactListeners$"+Lo,BB="__reactHandles$"+Lo;function xs(i){var o=i[Yr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[li]||l[Yr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=XS(i);i!==null;){if(l=i[Yr])return l;i=XS(i)}return o}i=l,l=i.parentNode}return null}function bu(i){return i=i[Yr]||i[li],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Do(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Mc(i){return i[Tu]||null}var tm=[],Mo=-1;function Fi(i){return{current:i}}function _t(i){0>Mo||(i.current=tm[Mo],tm[Mo]=null,Mo--)}function Et(i,o){Mo++,tm[Mo]=i.current,i.current=o}var Bi={},bn=Fi(Bi),Fn=Fi(!1),ws=Bi;function Fo(i,o){var l=i.type.contextTypes;if(!l)return Bi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Bn(i){return i=i.childContextTypes,i!=null}function Fc(){_t(Fn),_t(bn)}function KS(i,o,l){if(bn.current!==Bi)throw Error(n(168));Et(bn,o),Et(Fn,l)}function QS(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return k({},l,h)}function Bc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bi,ws=bn.current,Et(bn,i),Et(Fn,Fn.current),!0}function JS(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=QS(i,o,ws),h.__reactInternalMemoizedMergedChildContext=i,_t(Fn),_t(bn),Et(bn,i)):_t(Fn),Et(Fn,l)}var ci=null,Uc=!1,nm=!1;function ZS(i){ci===null?ci=[i]:ci.push(i)}function UB(i){Uc=!0,ZS(i)}function Ui(){if(!nm&&ci!==null){nm=!0;var i=0,o=ct;try{var l=ci;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ci=null,Uc=!1}catch(E){throw ci!==null&&(ci=ci.slice(i+1)),tS(wp,Ui),E}finally{ct=o,nm=!1}}return null}var Bo=[],Uo=0,Hc=null,zc=0,sr=[],or=0,As=null,di=1,fi="";function Cs(i,o){Bo[Uo++]=zc,Bo[Uo++]=Hc,Hc=i,zc=o}function ex(i,o,l){sr[or++]=di,sr[or++]=fi,sr[or++]=As,As=i;var h=di;i=fi;var E=32-br(h)-1;h&=~(1<<E),l+=1;var T=32-br(o)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,di=1<<32-br(o)+E|l<<E|h,fi=T+i}else di=1<<T|l<<E|h,fi=i}function rm(i){i.return!==null&&(Cs(i,1),ex(i,1,0))}function im(i){for(;i===Hc;)Hc=Bo[--Uo],Bo[Uo]=null,zc=Bo[--Uo],Bo[Uo]=null;for(;i===As;)As=sr[--or],sr[or]=null,fi=sr[--or],sr[or]=null,di=sr[--or],sr[or]=null}var Wn=null,Xn=null,At=!1,Sr=null;function tx(i,o){var l=cr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function nx(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Wn=i,Xn=Mi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Wn=i,Xn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=As!==null?{id:di,overflow:fi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=cr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Wn=i,Xn=null,!0):!1;default:return!1}}function sm(i){return(i.mode&1)!==0&&(i.flags&128)===0}function om(i){if(At){var o=Xn;if(o){var l=o;if(!nx(i,o)){if(sm(i))throw Error(n(418));o=Mi(l.nextSibling);var h=Wn;o&&nx(i,o)?tx(h,l):(i.flags=i.flags&-4097|2,At=!1,Wn=i)}}else{if(sm(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Wn=i}}}function rx(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Wn=i}function jc(i){if(i!==Wn)return!1;if(!At)return rx(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Qp(i.type,i.memoizedProps)),o&&(o=Xn)){if(sm(i))throw ix(),Error(n(418));for(;o;)tx(i,o),o=Mi(o.nextSibling)}if(rx(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Xn=Mi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Xn=null}}else Xn=Wn?Mi(i.stateNode.nextSibling):null;return!0}function ix(){for(var i=Xn;i;)i=Mi(i.nextSibling)}function Ho(){Xn=Wn=null,At=!1}function am(i){Sr===null?Sr=[i]:Sr.push(i)}var HB=U.ReactCurrentBatchConfig;function _u(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(x){var L=E.refs;x===null?delete L[T]:L[T]=x},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function $c(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function sx(i){var o=i._init;return o(i._payload)}function ox(i){function o(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)o(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Gi(W,j),W.index=0,W.sibling=null,W}function T(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function x(W){return i&&W.alternate===null&&(W.flags|=2),W}function L(W,j,K,Te){return j===null||j.tag!==6?(j=Jm(K,W.mode,Te),j.return=W,j):(j=E(j,K),j.return=W,j)}function H(W,j,K,Te){var De=K.type;return De===q?ce(W,j,K.props.children,Te,K.key):j!==null&&(j.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===xe&&sx(De)===j.type)?(Te=E(j,K.props),Te.ref=_u(W,j,K),Te.return=W,Te):(Te=hd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=_u(W,j,K),Te.return=W,Te)}function Z(W,j,K,Te){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=Zm(K,W.mode,Te),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function ce(W,j,K,Te,De){return j===null||j.tag!==7?(j=Ls(K,W.mode,Te,De),j.return=W,j):(j=E(j,K),j.return=W,j)}function pe(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Jm(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=hd(j.type,j.key,j.props,null,W.mode,K),K.ref=_u(W,null,j),K.return=W,K;case R:return j=Zm(j,W.mode,K),j.return=W,j;case xe:var Te=j._init;return pe(W,Te(j._payload),K)}if(Mn(j)||ie(j))return j=Ls(j,W.mode,K,null),j.return=W,j;$c(W,j)}return null}function ue(W,j,K,Te){var De=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return De!==null?null:L(W,j,""+K,Te);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===De?H(W,j,K,Te):null;case R:return K.key===De?Z(W,j,K,Te):null;case xe:return De=K._init,ue(W,j,De(K._payload),Te)}if(Mn(K)||ie(K))return De!==null?null:ce(W,j,K,Te,null);$c(W,K)}return null}function Ae(W,j,K,Te,De){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return W=W.get(K)||null,L(j,W,""+Te,De);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Y:return W=W.get(Te.key===null?K:Te.key)||null,H(j,W,Te,De);case R:return W=W.get(Te.key===null?K:Te.key)||null,Z(j,W,Te,De);case xe:var He=Te._init;return Ae(W,j,K,He(Te._payload),De)}if(Mn(Te)||ie(Te))return W=W.get(K)||null,ce(j,W,Te,De,null);$c(j,Te)}return null}function Ne(W,j,K,Te){for(var De=null,He=null,ze=j,Ge=j=0,en=null;ze!==null&&Ge<K.length;Ge++){ze.index>Ge?(en=ze,ze=null):en=ze.sibling;var st=ue(W,ze,K[Ge],Te);if(st===null){ze===null&&(ze=en);break}i&&ze&&st.alternate===null&&o(W,ze),j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st,ze=en}if(Ge===K.length)return l(W,ze),At&&Cs(W,Ge),De;if(ze===null){for(;Ge<K.length;Ge++)ze=pe(W,K[Ge],Te),ze!==null&&(j=T(ze,j,Ge),He===null?De=ze:He.sibling=ze,He=ze);return At&&Cs(W,Ge),De}for(ze=h(W,ze);Ge<K.length;Ge++)en=Ae(ze,W,Ge,K[Ge],Te),en!==null&&(i&&en.alternate!==null&&ze.delete(en.key===null?Ge:en.key),j=T(en,j,Ge),He===null?De=en:He.sibling=en,He=en);return i&&ze.forEach(function(Wi){return o(W,Wi)}),At&&Cs(W,Ge),De}function Oe(W,j,K,Te){var De=ie(K);if(typeof De!="function")throw Error(n(150));if(K=De.call(K),K==null)throw Error(n(151));for(var He=De=null,ze=j,Ge=j=0,en=null,st=K.next();ze!==null&&!st.done;Ge++,st=K.next()){ze.index>Ge?(en=ze,ze=null):en=ze.sibling;var Wi=ue(W,ze,st.value,Te);if(Wi===null){ze===null&&(ze=en);break}i&&ze&&Wi.alternate===null&&o(W,ze),j=T(Wi,j,Ge),He===null?De=Wi:He.sibling=Wi,He=Wi,ze=en}if(st.done)return l(W,ze),At&&Cs(W,Ge),De;if(ze===null){for(;!st.done;Ge++,st=K.next())st=pe(W,st.value,Te),st!==null&&(j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st);return At&&Cs(W,Ge),De}for(ze=h(W,ze);!st.done;Ge++,st=K.next())st=Ae(ze,W,Ge,st.value,Te),st!==null&&(i&&st.alternate!==null&&ze.delete(st.key===null?Ge:st.key),j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st);return i&&ze.forEach(function(T7){return o(W,T7)}),At&&Cs(W,Ge),De}function Lt(W,j,K,Te){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var De=K.key,He=j;He!==null;){if(He.key===De){if(De=K.type,De===q){if(He.tag===7){l(W,He.sibling),j=E(He,K.props.children),j.return=W,W=j;break e}}else if(He.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===xe&&sx(De)===He.type){l(W,He.sibling),j=E(He,K.props),j.ref=_u(W,He,K),j.return=W,W=j;break e}l(W,He);break}else o(W,He);He=He.sibling}K.type===q?(j=Ls(K.props.children,W.mode,Te,K.key),j.return=W,W=j):(Te=hd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=_u(W,j,K),Te.return=W,W=Te)}return x(W);case R:e:{for(He=K.key;j!==null;){if(j.key===He)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else o(W,j);j=j.sibling}j=Zm(K,W.mode,Te),j.return=W,W=j}return x(W);case xe:return He=K._init,Lt(W,j,He(K._payload),Te)}if(Mn(K))return Ne(W,j,K,Te);if(ie(K))return Oe(W,j,K,Te);$c(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=Jm(K,W.mode,Te),j.return=W,W=j),x(W)):l(W,j)}return Lt}var zo=ox(!0),ax=ox(!1),Vc=Fi(null),qc=null,jo=null,um=null;function lm(){um=jo=qc=null}function cm(i){var o=Vc.current;_t(Vc),i._currentValue=o}function dm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function $o(i,o){qc=i,um=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Un=!0),i.firstContext=null)}function ar(i){var o=i._currentValue;if(um!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if(qc===null)throw Error(n(308));jo=i,qc.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var vs=null;function fm(i){vs===null?vs=[i]:vs.push(i)}function ux(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,fm(o)):(l.next=E.next,E.next=l),o.interleaved=l,hi(i,h)}function hi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Hi=!1;function hm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function lx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function pi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function zi(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,hi(i,l)}return E=h.interleaved,E===null?(o.next=o,fm(h)):(o.next=E.next,E.next=o),h.interleaved=o,hi(i,l)}function Yc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,vp(i,l)}}function cx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=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};T===null?E=T=x:T=T.next=x,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Gc(i,o,l,h){var E=i.updateQueue;Hi=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,L=E.shared.pending;if(L!==null){E.shared.pending=null;var H=L,Z=H.next;H.next=null,x===null?T=Z:x.next=Z,x=H;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,L=ce.lastBaseUpdate,L!==x&&(L===null?ce.firstBaseUpdate=Z:L.next=Z,ce.lastBaseUpdate=H))}if(T!==null){var pe=E.baseState;x=0,ce=Z=H=null,L=T;do{var ue=L.lane,Ae=L.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:L.tag,payload:L.payload,callback:L.callback,next:null});e:{var Ne=i,Oe=L;switch(ue=o,Ae=l,Oe.tag){case 1:if(Ne=Oe.payload,typeof Ne=="function"){pe=Ne.call(Ae,pe,ue);break e}pe=Ne;break e;case 3:Ne.flags=Ne.flags&-65537|128;case 0:if(Ne=Oe.payload,ue=typeof Ne=="function"?Ne.call(Ae,pe,ue):Ne,ue==null)break e;pe=k({},pe,ue);break e;case 2:Hi=!0}}L.callback!==null&&L.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[L]:ue.push(L))}else Ae={eventTime:Ae,lane:ue,tag:L.tag,payload:L.payload,callback:L.callback,next:null},ce===null?(Z=ce=Ae,H=pe):ce=ce.next=Ae,x|=ue;if(L=L.next,L===null){if(L=E.shared.pending,L===null)break;ue=L,L=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(H=pe),E.baseState=H,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);Ps|=x,i.lanes=x,i.memoizedState=pe}}function dx(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var Su={},Gr=Fi(Su),xu=Fi(Su),wu=Fi(Su);function ks(i){if(i===Su)throw Error(n(174));return i}function pm(i,o){switch(Et(wu,o),Et(xu,i),Et(Gr,Su),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}_t(Gr),Et(Gr,o)}function Vo(){_t(Gr),_t(xu),_t(wu)}function fx(i){ks(wu.current);var o=ks(Gr.current),l=ge(o,i.type);o!==l&&(Et(xu,i),Et(Gr,l))}function mm(i){xu.current===i&&(_t(Gr),_t(xu))}var kt=Fi(0);function Wc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var gm=[];function Em(){for(var i=0;i<gm.length;i++)gm[i]._workInProgressVersionPrimary=null;gm.length=0}var Xc=U.ReactCurrentDispatcher,ym=U.ReactCurrentBatchConfig,Ns=0,Nt=null,Vt=null,Jt=null,Kc=!1,Au=!1,Cu=0,zB=0;function _n(){throw Error(n(321))}function Tm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!_r(i[l],o[l]))return!1;return!0}function bm(i,o,l,h,E,T){if(Ns=T,Nt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Xc.current=i===null||i.memoizedState===null?qB:YB,i=l(h,E),Au){T=0;do{if(Au=!1,Cu=0,25<=T)throw Error(n(301));T+=1,Jt=Vt=null,o.updateQueue=null,Xc.current=GB,i=l(h,E)}while(Au)}if(Xc.current=Zc,o=Vt!==null&&Vt.next!==null,Ns=0,Jt=Vt=Nt=null,Kc=!1,o)throw Error(n(300));return i}function _m(){var i=Cu!==0;return Cu=0,i}function Wr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?Nt.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function ur(){if(Vt===null){var i=Nt.alternate;i=i!==null?i.memoizedState:null}else i=Vt.next;var o=Jt===null?Nt.memoizedState:Jt.next;if(o!==null)Jt=o,Vt=i;else{if(i===null)throw Error(n(310));Vt=i,i={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},Jt===null?Nt.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function vu(i,o){return typeof o=="function"?o(i):o}function Sm(i){var o=ur(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Vt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var x=E.next;E.next=T.next,T.next=x}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var L=x=null,H=null,Z=T;do{var ce=Z.lane;if((Ns&ce)===ce)H!==null&&(H=H.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var pe={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};H===null?(L=H=pe,x=h):H=H.next=pe,Nt.lanes|=ce,Ps|=ce}Z=Z.next}while(Z!==null&&Z!==T);H===null?x=h:H.next=L,_r(h,o.memoizedState)||(Un=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=H,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,Nt.lanes|=T,Ps|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function xm(i){var o=ur(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do T=i(T,x.action),x=x.next;while(x!==E);_r(T,o.memoizedState)||(Un=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function hx(){}function px(i,o){var l=Nt,h=ur(),E=o(),T=!_r(h.memoizedState,E);if(T&&(h.memoizedState=E,Un=!0),h=h.queue,wm(Ex.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Jt!==null&&Jt.memoizedState.tag&1){if(l.flags|=2048,ku(9,gx.bind(null,l,h,E,o),void 0,null),Zt===null)throw Error(n(349));(Ns&30)!==0||mx(l,o,E)}return E}function mx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function gx(i,o,l,h){o.value=l,o.getSnapshot=h,yx(o)&&Tx(i)}function Ex(i,o,l){return l(function(){yx(o)&&Tx(i)})}function yx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!_r(i,l)}catch(h){return!0}}function Tx(i){var o=hi(i,1);o!==null&&Cr(o,i,1,-1)}function bx(i){var o=Wr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:vu,lastRenderedState:i},o.queue=i,i=i.dispatch=VB.bind(null,Nt,i),[o.memoizedState,i]}function ku(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=Nt.updateQueue,o===null?(o={lastEffect:null,stores:null},Nt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function _x(){return ur().memoizedState}function Qc(i,o,l,h){var E=Wr();Nt.flags|=i,E.memoizedState=ku(1|o,l,void 0,h===void 0?null:h)}function Jc(i,o,l,h){var E=ur();h=h===void 0?null:h;var T=void 0;if(Vt!==null){var x=Vt.memoizedState;if(T=x.destroy,h!==null&&Tm(h,x.deps)){E.memoizedState=ku(o,l,T,h);return}}Nt.flags|=i,E.memoizedState=ku(1|o,l,T,h)}function Sx(i,o){return Qc(8390656,8,i,o)}function wm(i,o){return Jc(2048,8,i,o)}function xx(i,o){return Jc(4,2,i,o)}function wx(i,o){return Jc(4,4,i,o)}function Ax(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function Cx(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4,4,Ax.bind(null,o,i),l)}function Am(){}function vx(i,o){var l=ur();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Tm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function kx(i,o){var l=ur();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&Tm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Nx(i,o,l){return(Ns&21)===0?(i.baseState&&(i.baseState=!1,Un=!0),i.memoizedState=l):(_r(l,o)||(l=sS(),Nt.lanes|=l,Ps|=l,i.baseState=!0),o)}function jB(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=ym.transition;ym.transition={};try{i(!1),o()}finally{ct=l,ym.transition=h}}function Px(){return ur().memoizedState}function $B(i,o,l){var h=qi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Ox(i))Ix(o,l);else if(l=ux(i,o,l,h),l!==null){var E=Nn();Cr(l,i,h,E),Rx(l,o,h)}}function VB(i,o,l){var h=qi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ox(i))Ix(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var x=o.lastRenderedState,L=T(x,l);if(E.hasEagerState=!0,E.eagerState=L,_r(L,x)){var H=o.interleaved;H===null?(E.next=E,fm(o)):(E.next=H.next,H.next=E),o.interleaved=E;return}}catch(Z){}l=ux(i,o,E,h),l!==null&&(E=Nn(),Cr(l,i,h,E),Rx(l,o,h))}}function Ox(i){var o=i.alternate;return i===Nt||o!==null&&o===Nt}function Ix(i,o){Au=Kc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Rx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,vp(i,l)}}var Zc={readContext:ar,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useInsertionEffect:_n,useLayoutEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useMutableSource:_n,useSyncExternalStore:_n,useId:_n,unstable_isNewReconciler:!1},qB={readContext:ar,useCallback:function(i,o){return Wr().memoizedState=[i,o===void 0?null:o],i},useContext:ar,useEffect:Sx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Qc(4194308,4,Ax.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Qc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Qc(4,2,i,o)},useMemo:function(i,o){var l=Wr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Wr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=$B.bind(null,Nt,i),[h.memoizedState,i]},useRef:function(i){var o=Wr();return i={current:i},o.memoizedState=i},useState:bx,useDebugValue:Am,useDeferredValue:function(i){return Wr().memoizedState=i},useTransition:function(){var i=bx(!1),o=i[0];return i=jB.bind(null,i[1]),Wr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=Nt,E=Wr();if(At){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Zt===null)throw Error(n(349));(Ns&30)!==0||mx(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,Sx(Ex.bind(null,h,T,i),[i]),h.flags|=2048,ku(9,gx.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Wr(),o=Zt.identifierPrefix;if(At){var l=fi,h=di;l=(h&~(1<<32-br(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=Cu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=zB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},YB={readContext:ar,useCallback:vx,useContext:ar,useEffect:wm,useImperativeHandle:Cx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:kx,useReducer:Sm,useRef:_x,useState:function(){return Sm(vu)},useDebugValue:Am,useDeferredValue:function(i){var o=ur();return Nx(o,Vt.memoizedState,i)},useTransition:function(){var i=Sm(vu)[0],o=ur().memoizedState;return[i,o]},useMutableSource:hx,useSyncExternalStore:px,useId:Px,unstable_isNewReconciler:!1},GB={readContext:ar,useCallback:vx,useContext:ar,useEffect:wm,useImperativeHandle:Cx,useInsertionEffect:xx,useLayoutEffect:wx,useMemo:kx,useReducer:xm,useRef:_x,useState:function(){return xm(vu)},useDebugValue:Am,useDeferredValue:function(i){var o=ur();return Vt===null?o.memoizedState=i:Nx(o,Vt.memoizedState,i)},useTransition:function(){var i=xm(vu)[0],o=ur().memoizedState;return[i,o]},useMutableSource:hx,useSyncExternalStore:px,useId:Px,unstable_isNewReconciler:!1};function xr(i,o){if(i&&i.defaultProps){o=k({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function Cm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:k({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var ed={isMounted:function(i){return(i=i._reactInternals)?Ss(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=Nn(),E=qi(i),T=pi(h,E);T.payload=o,l!=null&&(T.callback=l),o=zi(i,T,E),o!==null&&(Cr(o,i,E,h),Yc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=Nn(),E=qi(i),T=pi(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=zi(i,T,E),o!==null&&(Cr(o,i,E,h),Yc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=Nn(),h=qi(i),E=pi(l,h);E.tag=2,o!=null&&(E.callback=o),o=zi(i,E,h),o!==null&&(Cr(o,i,h,l),Yc(o,i,h))}};function Lx(i,o,l,h,E,T,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,x):o.prototype&&o.prototype.isPureReactComponent?!pu(l,h)||!pu(E,T):!0}function Dx(i,o,l){var h=!1,E=Bi,T=o.contextType;return typeof T=="object"&&T!==null?T=ar(T):(E=Bn(o)?ws:bn.current,h=o.contextTypes,T=(h=h!=null)?Fo(i,E):Bi),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ed,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Mx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&ed.enqueueReplaceState(o,o.state,null)}function vm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},hm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=ar(T):(T=Bn(o)?ws:bn.current,E.context=Fo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(Cm(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&ed.enqueueReplaceState(E,E.state,null),Gc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qo(i,o){try{var l="",h=o;do l+=Be(h),h=h.return;while(h);var E=l}catch(T){E=`
|
|
13
|
+
`),x=E.length-1,R=T.length-1;1<=x&&0<=R&&E[x]!==T[R];)R--;for(;1<=x&&0<=R;x--,R--)if(E[x]!==T[R]){if(x!==1||R!==1)do if(x--,R--,0>R||E[x]!==T[R]){var U=`
|
|
14
|
+
`+E[x].replace(" at new "," at ");return i.displayName&&U.includes("<anonymous>")&&(U=U.replace("<anonymous>",i.displayName)),U}while(1<=x&&0<=R);break}}}finally{I=!1,Error.prepareStackTrace=l}return(i=i?i.displayName||i.name:"")?ee(i):""}function Be(i){switch(i.tag){case 5:return ee(i.type);case 16:return ee("Lazy");case 13:return ee("Suspense");case 19:return ee("SuspenseList");case 0:case 2:case 15:return i=_e(i.type,!1),i;case 11:return i=_e(i.type.render,!1),i;case 1:return i=_e(i.type,!0),i;default:return""}}function ye(i){if(i==null)return null;if(typeof i=="function")return i.displayName||i.name||null;if(typeof i=="string")return i;switch(i){case q:return"Fragment";case L:return"Portal";case de:return"Profiler";case ne:return"StrictMode";case ve:return"Suspense";case re:return"SuspenseList"}if(typeof i=="object")switch(i.$$typeof){case se:return(i.displayName||"Context")+".Consumer";case V:return(i._context.displayName||"Context")+".Provider";case pe:var o=i.render;return i=i.displayName,i||(i=o.displayName||o.name||"",i=i!==""?"ForwardRef("+i+")":"ForwardRef"),i;case oe:return o=i.displayName||null,o!==null?o:ye(i.type)||"Memo";case xe:o=i._payload,i=i._init;try{return ye(i(o))}catch(l){}}return null}function Le(i){var o=i.type;switch(i.tag){case 24:return"Cache";case 9:return(o.displayName||"Context")+".Consumer";case 10:return(o._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return i=o.render,i=i.displayName||i.name||"",o.displayName||(i!==""?"ForwardRef("+i+")":"ForwardRef");case 7:return"Fragment";case 5:return o;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ye(o);case 8:return o===ne?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o}return null}function Ue(i){switch(typeof i){case"boolean":case"number":case"string":case"undefined":return i;case"object":return i;default:return""}}function Ye(i){var o=i.type;return(i=i.nodeName)&&i.toLowerCase()==="input"&&(o==="checkbox"||o==="radio")}function Tt(i){var o=Ye(i)?"checked":"value",l=Object.getOwnPropertyDescriptor(i.constructor.prototype,o),h=""+i[o];if(!i.hasOwnProperty(o)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var E=l.get,T=l.set;return Object.defineProperty(i,o,{configurable:!0,get:function(){return E.call(this)},set:function(x){h=""+x,T.call(this,x)}}),Object.defineProperty(i,o,{enumerable:l.enumerable}),{getValue:function(){return h},setValue:function(x){h=""+x},stopTracking:function(){i._valueTracker=null,delete i[o]}}}}function Cn(i){i._valueTracker||(i._valueTracker=Tt(i))}function rn(i){if(!i)return!1;var o=i._valueTracker;if(!o)return!0;var l=o.getValue(),h="";return i&&(h=Ye(i)?i.checked?"true":"false":i.value),i=h,i!==l?(o.setValue(i),!0):!1}function Tr(i){if(i=i||(typeof document!="undefined"?document:void 0),typeof i=="undefined")return null;try{return i.activeElement||i.body}catch(o){return i.body}}function ir(i,o){var l=o.checked;return N({},o,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:i._wrapperState.initialChecked})}function Qt(i,o){var l=o.defaultValue==null?"":o.defaultValue,h=o.checked!=null?o.checked:o.defaultChecked;l=Ue(o.value!=null?o.value:l),i._wrapperState={initialChecked:h,initialValue:l,controlled:o.type==="checkbox"||o.type==="radio"?o.checked!=null:o.value!=null}}function $e(i,o){o=o.checked,o!=null&&C(i,"checked",o,!1)}function vt(i,o){$e(i,o);var l=Ue(o.value),h=o.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}o.hasOwnProperty("value")?sn(i,o.type,l):o.hasOwnProperty("defaultValue")&&sn(i,o.type,Ue(o.defaultValue)),o.checked==null&&o.defaultChecked!=null&&(i.defaultChecked=!!o.defaultChecked)}function vn(i,o,l){if(o.hasOwnProperty("value")||o.hasOwnProperty("defaultValue")){var h=o.type;if(!(h!=="submit"&&h!=="reset"||o.value!==void 0&&o.value!==null))return;o=""+i._wrapperState.initialValue,l||o===i.value||(i.value=o),i.defaultValue=o}l=i.name,l!==""&&(i.name=""),i.defaultChecked=!!i._wrapperState.initialChecked,l!==""&&(i.name=l)}function sn(i,o,l){(o!=="number"||Tr(i.ownerDocument)!==i)&&(l==null?i.defaultValue=""+i._wrapperState.initialValue:i.defaultValue!==""+l&&(i.defaultValue=""+l))}var Mn=Array.isArray;function we(i,o,l,h){if(i=i.options,o){o={};for(var E=0;E<l.length;E++)o["$"+l[E]]=!0;for(l=0;l<i.length;l++)E=o.hasOwnProperty("$"+i[l].value),i[l].selected!==E&&(i[l].selected=E),E&&h&&(i[l].defaultSelected=!0)}else{for(l=""+Ue(l),o=null,E=0;E<i.length;E++){if(i[E].value===l){i[E].selected=!0,h&&(i[E].defaultSelected=!0);return}o!==null||i[E].disabled||(o=i[E])}o!==null&&(o.selected=!0)}}function Pe(i,o){if(o.dangerouslySetInnerHTML!=null)throw Error(n(91));return N({},o,{value:void 0,defaultValue:void 0,children:""+i._wrapperState.initialValue})}function Me(i,o){var l=o.value;if(l==null){if(l=o.children,o=o.defaultValue,l!=null){if(o!=null)throw Error(n(92));if(Mn(l)){if(1<l.length)throw Error(n(93));l=l[0]}o=l}o==null&&(o=""),l=o}i._wrapperState={initialValue:Ue(l)}}function rt(i,o){var l=Ue(o.value),h=Ue(o.defaultValue);l!=null&&(l=""+l,l!==i.value&&(i.value=l),o.defaultValue==null&&i.defaultValue!==l&&(i.defaultValue=l)),h!=null&&(i.defaultValue=""+h)}function ht(i){var o=i.textContent;o===i._wrapperState.initialValue&&o!==""&&o!==null&&(i.value=o)}function J(i){switch(i){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function ge(i,o){return i==null||i==="http://www.w3.org/1999/xhtml"?J(o):i==="http://www.w3.org/2000/svg"&&o==="foreignObject"?"http://www.w3.org/1999/xhtml":i}var Ce,Ve=(function(i){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(o,l,h,E){MSApp.execUnsafeLocalFunction(function(){return i(o,l,h,E)})}:i})(function(i,o){if(i.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in i)i.innerHTML=o;else{for(Ce=Ce||document.createElement("div"),Ce.innerHTML="<svg>"+o.valueOf().toString()+"</svg>",o=Ce.firstChild;i.firstChild;)i.removeChild(i.firstChild);for(;o.firstChild;)i.appendChild(o.firstChild)}});function Ie(i,o){if(o){var l=i.firstChild;if(l&&l===i.lastChild&&l.nodeType===3){l.nodeValue=o;return}}i.textContent=o}var lt={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},$t=["Webkit","ms","Moz","O"];Object.keys(lt).forEach(function(i){$t.forEach(function(o){o=o+i.charAt(0).toUpperCase()+i.substring(1),lt[o]=lt[i]})});function Ut(i,o,l){return o==null||typeof o=="boolean"||o===""?"":l||typeof o!="number"||o===0||lt.hasOwnProperty(i)&<[i]?(""+o).trim():o+"px"}function on(i,o){i=i.style;for(var l in o)if(o.hasOwnProperty(l)){var h=l.indexOf("--")===0,E=Ut(l,o[l],h);l==="float"&&(l="cssFloat"),h?i.setProperty(l,E):i[l]=E}}var $r=N({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function an(i,o){if(o){if($r[i]&&(o.children!=null||o.dangerouslySetInnerHTML!=null))throw Error(n(137,i));if(o.dangerouslySetInnerHTML!=null){if(o.children!=null)throw Error(n(60));if(typeof o.dangerouslySetInnerHTML!="object"||!("__html"in o.dangerouslySetInnerHTML))throw Error(n(61))}if(o.style!=null&&typeof o.style!="object")throw Error(n(62))}}function Vr(i,o){if(i.indexOf("-")===-1)return typeof o.is=="string";switch(i){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var Yn=null;function bp(i){return i=i.target||i.srcElement||window,i.correspondingUseElement&&(i=i.correspondingUseElement),i.nodeType===3?i.parentNode:i}var _p=null,Co=null,vo=null;function Y_(i){if(i=_u(i)){if(typeof _p!="function")throw Error(n(280));var o=i.stateNode;o&&(o=Mc(o),_p(i.stateNode,i.type,o))}}function G_(i){Co?vo?vo.push(i):vo=[i]:Co=i}function W_(){if(Co){var i=Co,o=vo;if(vo=Co=null,Y_(i),o)for(i=0;i<o.length;i++)Y_(o[i])}}function X_(i,o){return i(o)}function K_(){}var Sp=!1;function Q_(i,o,l){if(Sp)return i(o,l);Sp=!0;try{return X_(i,o,l)}finally{Sp=!1,(Co!==null||vo!==null)&&(K_(),W_())}}function eu(i,o){var l=i.stateNode;if(l===null)return null;var h=Mc(l);if(h===null)return null;l=h[o];e:switch(o){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,o,typeof l));return l}var xp=!1;if(c)try{var tu={};Object.defineProperty(tu,"passive",{get:function(){xp=!0}}),window.addEventListener("test",tu,tu),window.removeEventListener("test",tu,tu)}catch(i){xp=!1}function k9(i,o,l,h,E,T,x,R,U){var Z=Array.prototype.slice.call(arguments,3);try{o.apply(l,Z)}catch(ce){this.onError(ce)}}var nu=!1,pc=null,mc=!1,wp=null,P9={onError:function(i){nu=!0,pc=i}};function O9(i,o,l,h,E,T,x,R,U){nu=!1,pc=null,k9.apply(P9,arguments)}function I9(i,o,l,h,E,T,x,R,U){if(O9.apply(this,arguments),nu){if(nu){var Z=pc;nu=!1,pc=null}else throw Error(n(198));mc||(mc=!0,wp=Z)}}function Ss(i){var o=i,l=i;if(i.alternate)for(;o.return;)o=o.return;else{i=o;do o=i,(o.flags&4098)!==0&&(l=o.return),i=o.return;while(i)}return o.tag===3?l:null}function J_(i){if(i.tag===13){var o=i.memoizedState;if(o===null&&(i=i.alternate,i!==null&&(o=i.memoizedState)),o!==null)return o.dehydrated}return null}function Z_(i){if(Ss(i)!==i)throw Error(n(188))}function R9(i){var o=i.alternate;if(!o){if(o=Ss(i),o===null)throw Error(n(188));return o!==i?null:i}for(var l=i,h=o;;){var E=l.return;if(E===null)break;var T=E.alternate;if(T===null){if(h=E.return,h!==null){l=h;continue}break}if(E.child===T.child){for(T=E.child;T;){if(T===l)return Z_(E),i;if(T===h)return Z_(E),o;T=T.sibling}throw Error(n(188))}if(l.return!==h.return)l=E,h=T;else{for(var x=!1,R=E.child;R;){if(R===l){x=!0,l=E,h=T;break}if(R===h){x=!0,h=E,l=T;break}R=R.sibling}if(!x){for(R=T.child;R;){if(R===l){x=!0,l=T,h=E;break}if(R===h){x=!0,h=T,l=E;break}R=R.sibling}if(!x)throw Error(n(189))}}if(l.alternate!==h)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?i:o}function eS(i){return i=R9(i),i!==null?tS(i):null}function tS(i){if(i.tag===5||i.tag===6)return i;for(i=i.child;i!==null;){var o=tS(i);if(o!==null)return o;i=i.sibling}return null}var nS=t.unstable_scheduleCallback,rS=t.unstable_cancelCallback,L9=t.unstable_shouldYield,D9=t.unstable_requestPaint,Rt=t.unstable_now,M9=t.unstable_getCurrentPriorityLevel,Ap=t.unstable_ImmediatePriority,iS=t.unstable_UserBlockingPriority,gc=t.unstable_NormalPriority,F9=t.unstable_LowPriority,sS=t.unstable_IdlePriority,Ec=null,qr=null;function B9(i){if(qr&&typeof qr.onCommitFiberRoot=="function")try{qr.onCommitFiberRoot(Ec,i,void 0,(i.current.flags&128)===128)}catch(o){}}var br=Math.clz32?Math.clz32:z9,U9=Math.log,H9=Math.LN2;function z9(i){return i>>>=0,i===0?32:31-(U9(i)/H9|0)|0}var yc=64,Tc=4194304;function ru(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 bc(i,o){var l=i.pendingLanes;if(l===0)return 0;var h=0,E=i.suspendedLanes,T=i.pingedLanes,x=l&268435455;if(x!==0){var R=x&~E;R!==0?h=ru(R):(T&=x,T!==0&&(h=ru(T)))}else x=l&~E,x!==0?h=ru(x):T!==0&&(h=ru(T));if(h===0)return 0;if(o!==0&&o!==h&&(o&E)===0&&(E=h&-h,T=o&-o,E>=T||E===16&&(T&4194240)!==0))return o;if((h&4)!==0&&(h|=l&16),o=i.entangledLanes,o!==0)for(i=i.entanglements,o&=h;0<o;)l=31-br(o),E=1<<l,h|=i[l],o&=~E;return h}function j9(i,o){switch(i){case 1:case 2:case 4:return o+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 o+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 $9(i,o){for(var l=i.suspendedLanes,h=i.pingedLanes,E=i.expirationTimes,T=i.pendingLanes;0<T;){var x=31-br(T),R=1<<x,U=E[x];U===-1?((R&l)===0||(R&h)!==0)&&(E[x]=j9(R,o)):U<=o&&(i.expiredLanes|=R),T&=~R}}function Cp(i){return i=i.pendingLanes&-1073741825,i!==0?i:i&1073741824?1073741824:0}function oS(){var i=yc;return yc<<=1,(yc&4194240)===0&&(yc=64),i}function vp(i){for(var o=[],l=0;31>l;l++)o.push(i);return o}function iu(i,o,l){i.pendingLanes|=o,o!==536870912&&(i.suspendedLanes=0,i.pingedLanes=0),i=i.eventTimes,o=31-br(o),i[o]=l}function V9(i,o){var l=i.pendingLanes&~o;i.pendingLanes=o,i.suspendedLanes=0,i.pingedLanes=0,i.expiredLanes&=o,i.mutableReadLanes&=o,i.entangledLanes&=o,o=i.entanglements;var h=i.eventTimes;for(i=i.expirationTimes;0<l;){var E=31-br(l),T=1<<E;o[E]=0,h[E]=-1,i[E]=-1,l&=~T}}function Np(i,o){var l=i.entangledLanes|=o;for(i=i.entanglements;l;){var h=31-br(l),E=1<<h;E&o|i[h]&o&&(i[h]|=o),l&=~E}}var ct=0;function aS(i){return i&=-i,1<i?4<i?(i&268435455)!==0?16:536870912:4:1}var uS,kp,lS,cS,dS,Pp=!1,_c=[],Pi=null,Oi=null,Ii=null,su=new Map,ou=new Map,Ri=[],q9="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function fS(i,o){switch(i){case"focusin":case"focusout":Pi=null;break;case"dragenter":case"dragleave":Oi=null;break;case"mouseover":case"mouseout":Ii=null;break;case"pointerover":case"pointerout":su.delete(o.pointerId);break;case"gotpointercapture":case"lostpointercapture":ou.delete(o.pointerId)}}function au(i,o,l,h,E,T){return i===null||i.nativeEvent!==T?(i={blockedOn:o,domEventName:l,eventSystemFlags:h,nativeEvent:T,targetContainers:[E]},o!==null&&(o=_u(o),o!==null&&kp(o)),i):(i.eventSystemFlags|=h,o=i.targetContainers,E!==null&&o.indexOf(E)===-1&&o.push(E),i)}function Y9(i,o,l,h,E){switch(o){case"focusin":return Pi=au(Pi,i,o,l,h,E),!0;case"dragenter":return Oi=au(Oi,i,o,l,h,E),!0;case"mouseover":return Ii=au(Ii,i,o,l,h,E),!0;case"pointerover":var T=E.pointerId;return su.set(T,au(su.get(T)||null,i,o,l,h,E)),!0;case"gotpointercapture":return T=E.pointerId,ou.set(T,au(ou.get(T)||null,i,o,l,h,E)),!0}return!1}function hS(i){var o=xs(i.target);if(o!==null){var l=Ss(o);if(l!==null){if(o=l.tag,o===13){if(o=J_(l),o!==null){i.blockedOn=o,dS(i.priority,function(){lS(l)});return}}else if(o===3&&l.stateNode.current.memoizedState.isDehydrated){i.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}i.blockedOn=null}function Sc(i){if(i.blockedOn!==null)return!1;for(var o=i.targetContainers;0<o.length;){var l=Ip(i.domEventName,i.eventSystemFlags,o[0],i.nativeEvent);if(l===null){l=i.nativeEvent;var h=new l.constructor(l.type,l);Yn=h,l.target.dispatchEvent(h),Yn=null}else return o=_u(l),o!==null&&kp(o),i.blockedOn=l,!1;o.shift()}return!0}function pS(i,o,l){Sc(i)&&l.delete(o)}function G9(){Pp=!1,Pi!==null&&Sc(Pi)&&(Pi=null),Oi!==null&&Sc(Oi)&&(Oi=null),Ii!==null&&Sc(Ii)&&(Ii=null),su.forEach(pS),ou.forEach(pS)}function uu(i,o){i.blockedOn===o&&(i.blockedOn=null,Pp||(Pp=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,G9)))}function lu(i){function o(E){return uu(E,i)}if(0<_c.length){uu(_c[0],i);for(var l=1;l<_c.length;l++){var h=_c[l];h.blockedOn===i&&(h.blockedOn=null)}}for(Pi!==null&&uu(Pi,i),Oi!==null&&uu(Oi,i),Ii!==null&&uu(Ii,i),su.forEach(o),ou.forEach(o),l=0;l<Ri.length;l++)h=Ri[l],h.blockedOn===i&&(h.blockedOn=null);for(;0<Ri.length&&(l=Ri[0],l.blockedOn===null);)hS(l),l.blockedOn===null&&Ri.shift()}var No=H.ReactCurrentBatchConfig,xc=!0;function W9(i,o,l,h){var E=ct,T=No.transition;No.transition=null;try{ct=1,Op(i,o,l,h)}finally{ct=E,No.transition=T}}function X9(i,o,l,h){var E=ct,T=No.transition;No.transition=null;try{ct=4,Op(i,o,l,h)}finally{ct=E,No.transition=T}}function Op(i,o,l,h){if(xc){var E=Ip(i,o,l,h);if(E===null)Xp(i,o,h,wc,l),fS(i,h);else if(Y9(E,i,o,l,h))h.stopPropagation();else if(fS(i,h),o&4&&-1<q9.indexOf(i)){for(;E!==null;){var T=_u(E);if(T!==null&&uS(T),T=Ip(i,o,l,h),T===null&&Xp(i,o,h,wc,l),T===E)break;E=T}E!==null&&h.stopPropagation()}else Xp(i,o,h,null,l)}}var wc=null;function Ip(i,o,l,h){if(wc=null,i=bp(h),i=xs(i),i!==null)if(o=Ss(i),o===null)i=null;else if(l=o.tag,l===13){if(i=J_(o),i!==null)return i;i=null}else if(l===3){if(o.stateNode.current.memoizedState.isDehydrated)return o.tag===3?o.stateNode.containerInfo:null;i=null}else o!==i&&(i=null);return wc=i,null}function mS(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(M9()){case Ap:return 1;case iS:return 4;case gc:case F9:return 16;case sS:return 536870912;default:return 16}default:return 16}}var Li=null,Rp=null,Ac=null;function gS(){if(Ac)return Ac;var i,o=Rp,l=o.length,h,E="value"in Li?Li.value:Li.textContent,T=E.length;for(i=0;i<l&&o[i]===E[i];i++);var x=l-i;for(h=1;h<=x&&o[l-h]===E[T-h];h++);return Ac=E.slice(i,1<h?1-h:void 0)}function Cc(i){var o=i.keyCode;return"charCode"in i?(i=i.charCode,i===0&&o===13&&(i=13)):i=o,i===10&&(i=13),32<=i||i===13?i:0}function vc(){return!0}function ES(){return!1}function Gn(i){function o(l,h,E,T,x){this._reactName=l,this._targetInst=E,this.type=h,this.nativeEvent=T,this.target=x,this.currentTarget=null;for(var R in i)i.hasOwnProperty(R)&&(l=i[R],this[R]=l?l(T):T[R]);return this.isDefaultPrevented=(T.defaultPrevented!=null?T.defaultPrevented:T.returnValue===!1)?vc:ES,this.isPropagationStopped=ES,this}return N(o.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=vc)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=vc)},persist:function(){},isPersistent:vc}),o}var ko={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(i){return i.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},Lp=Gn(ko),cu=N({},ko,{view:0,detail:0}),K9=Gn(cu),Dp,Mp,du,Nc=N({},cu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Bp,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!==du&&(du&&i.type==="mousemove"?(Dp=i.screenX-du.screenX,Mp=i.screenY-du.screenY):Mp=Dp=0,du=i),Dp)},movementY:function(i){return"movementY"in i?i.movementY:Mp}}),yS=Gn(Nc),Q9=N({},Nc,{dataTransfer:0}),J9=Gn(Q9),Z9=N({},cu,{relatedTarget:0}),Fp=Gn(Z9),eB=N({},ko,{animationName:0,elapsedTime:0,pseudoElement:0}),tB=Gn(eB),nB=N({},ko,{clipboardData:function(i){return"clipboardData"in i?i.clipboardData:window.clipboardData}}),rB=Gn(nB),iB=N({},ko,{data:0}),TS=Gn(iB),sB={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},oB={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"},aB={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function uB(i){var o=this.nativeEvent;return o.getModifierState?o.getModifierState(i):(i=aB[i])?!!o[i]:!1}function Bp(){return uB}var lB=N({},cu,{key:function(i){if(i.key){var o=sB[i.key]||i.key;if(o!=="Unidentified")return o}return i.type==="keypress"?(i=Cc(i),i===13?"Enter":String.fromCharCode(i)):i.type==="keydown"||i.type==="keyup"?oB[i.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Bp,charCode:function(i){return i.type==="keypress"?Cc(i):0},keyCode:function(i){return i.type==="keydown"||i.type==="keyup"?i.keyCode:0},which:function(i){return i.type==="keypress"?Cc(i):i.type==="keydown"||i.type==="keyup"?i.keyCode:0}}),cB=Gn(lB),dB=N({},Nc,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),bS=Gn(dB),fB=N({},cu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Bp}),hB=Gn(fB),pB=N({},ko,{propertyName:0,elapsedTime:0,pseudoElement:0}),mB=Gn(pB),gB=N({},Nc,{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}),EB=Gn(gB),yB=[9,13,27,32],Up=c&&"CompositionEvent"in window,fu=null;c&&"documentMode"in document&&(fu=document.documentMode);var TB=c&&"TextEvent"in window&&!fu,_S=c&&(!Up||fu&&8<fu&&11>=fu),SS=" ",xS=!1;function wS(i,o){switch(i){case"keyup":return yB.indexOf(o.keyCode)!==-1;case"keydown":return o.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function AS(i){return i=i.detail,typeof i=="object"&&"data"in i?i.data:null}var Po=!1;function bB(i,o){switch(i){case"compositionend":return AS(o);case"keypress":return o.which!==32?null:(xS=!0,SS);case"textInput":return i=o.data,i===SS&&xS?null:i;default:return null}}function _B(i,o){if(Po)return i==="compositionend"||!Up&&wS(i,o)?(i=gS(),Ac=Rp=Li=null,Po=!1,i):null;switch(i){case"paste":return null;case"keypress":if(!(o.ctrlKey||o.altKey||o.metaKey)||o.ctrlKey&&o.altKey){if(o.char&&1<o.char.length)return o.char;if(o.which)return String.fromCharCode(o.which)}return null;case"compositionend":return _S&&o.locale!=="ko"?null:o.data;default:return null}}var SB={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 CS(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o==="input"?!!SB[i.type]:o==="textarea"}function vS(i,o,l,h){G_(h),o=Rc(o,"onChange"),0<o.length&&(l=new Lp("onChange","change",null,l,h),i.push({event:l,listeners:o}))}var hu=null,pu=null;function xB(i){qS(i,0)}function kc(i){var o=Do(i);if(rn(o))return i}function wB(i,o){if(i==="change")return o}var NS=!1;if(c){var Hp;if(c){var zp="oninput"in document;if(!zp){var kS=document.createElement("div");kS.setAttribute("oninput","return;"),zp=typeof kS.oninput=="function"}Hp=zp}else Hp=!1;NS=Hp&&(!document.documentMode||9<document.documentMode)}function PS(){hu&&(hu.detachEvent("onpropertychange",OS),pu=hu=null)}function OS(i){if(i.propertyName==="value"&&kc(pu)){var o=[];vS(o,pu,i,bp(i)),Q_(xB,o)}}function AB(i,o,l){i==="focusin"?(PS(),hu=o,pu=l,hu.attachEvent("onpropertychange",OS)):i==="focusout"&&PS()}function CB(i){if(i==="selectionchange"||i==="keyup"||i==="keydown")return kc(pu)}function vB(i,o){if(i==="click")return kc(o)}function NB(i,o){if(i==="input"||i==="change")return kc(o)}function kB(i,o){return i===o&&(i!==0||1/i===1/o)||i!==i&&o!==o}var _r=typeof Object.is=="function"?Object.is:kB;function mu(i,o){if(_r(i,o))return!0;if(typeof i!="object"||i===null||typeof o!="object"||o===null)return!1;var l=Object.keys(i),h=Object.keys(o);if(l.length!==h.length)return!1;for(h=0;h<l.length;h++){var E=l[h];if(!d.call(o,E)||!_r(i[E],o[E]))return!1}return!0}function IS(i){for(;i&&i.firstChild;)i=i.firstChild;return i}function RS(i,o){var l=IS(i);i=0;for(var h;l;){if(l.nodeType===3){if(h=i+l.textContent.length,i<=o&&h>=o)return{node:l,offset:o-i};i=h}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=IS(l)}}function LS(i,o){return i&&o?i===o?!0:i&&i.nodeType===3?!1:o&&o.nodeType===3?LS(i,o.parentNode):"contains"in i?i.contains(o):i.compareDocumentPosition?!!(i.compareDocumentPosition(o)&16):!1:!1}function DS(){for(var i=window,o=Tr();o instanceof i.HTMLIFrameElement;){try{var l=typeof o.contentWindow.location.href=="string"}catch(h){l=!1}if(l)i=o.contentWindow;else break;o=Tr(i.document)}return o}function jp(i){var o=i&&i.nodeName&&i.nodeName.toLowerCase();return o&&(o==="input"&&(i.type==="text"||i.type==="search"||i.type==="tel"||i.type==="url"||i.type==="password")||o==="textarea"||i.contentEditable==="true")}function PB(i){var o=DS(),l=i.focusedElem,h=i.selectionRange;if(o!==l&&l&&l.ownerDocument&&LS(l.ownerDocument.documentElement,l)){if(h!==null&&jp(l)){if(o=h.start,i=h.end,i===void 0&&(i=o),"selectionStart"in l)l.selectionStart=o,l.selectionEnd=Math.min(i,l.value.length);else if(i=(o=l.ownerDocument||document)&&o.defaultView||window,i.getSelection){i=i.getSelection();var E=l.textContent.length,T=Math.min(h.start,E);h=h.end===void 0?T:Math.min(h.end,E),!i.extend&&T>h&&(E=h,h=T,T=E),E=RS(l,T);var x=RS(l,h);E&&x&&(i.rangeCount!==1||i.anchorNode!==E.node||i.anchorOffset!==E.offset||i.focusNode!==x.node||i.focusOffset!==x.offset)&&(o=o.createRange(),o.setStart(E.node,E.offset),i.removeAllRanges(),T>h?(i.addRange(o),i.extend(x.node,x.offset)):(o.setEnd(x.node,x.offset),i.addRange(o)))}}for(o=[],i=l;i=i.parentNode;)i.nodeType===1&&o.push({element:i,left:i.scrollLeft,top:i.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<o.length;l++)i=o[l],i.element.scrollLeft=i.left,i.element.scrollTop=i.top}}var OB=c&&"documentMode"in document&&11>=document.documentMode,Oo=null,$p=null,gu=null,Vp=!1;function MS(i,o,l){var h=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;Vp||Oo==null||Oo!==Tr(h)||(h=Oo,"selectionStart"in h&&jp(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}),gu&&mu(gu,h)||(gu=h,h=Rc($p,"onSelect"),0<h.length&&(o=new Lp("onSelect","select",null,o,l),i.push({event:o,listeners:h}),o.target=Oo)))}function Pc(i,o){var l={};return l[i.toLowerCase()]=o.toLowerCase(),l["Webkit"+i]="webkit"+o,l["Moz"+i]="moz"+o,l}var Io={animationend:Pc("Animation","AnimationEnd"),animationiteration:Pc("Animation","AnimationIteration"),animationstart:Pc("Animation","AnimationStart"),transitionend:Pc("Transition","TransitionEnd")},qp={},FS={};c&&(FS=document.createElement("div").style,"AnimationEvent"in window||(delete Io.animationend.animation,delete Io.animationiteration.animation,delete Io.animationstart.animation),"TransitionEvent"in window||delete Io.transitionend.transition);function Oc(i){if(qp[i])return qp[i];if(!Io[i])return i;var o=Io[i],l;for(l in o)if(o.hasOwnProperty(l)&&l in FS)return qp[i]=o[l];return i}var BS=Oc("animationend"),US=Oc("animationiteration"),HS=Oc("animationstart"),zS=Oc("transitionend"),jS=new Map,$S="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 Di(i,o){jS.set(i,o),a(o,[i])}for(var Yp=0;Yp<$S.length;Yp++){var Gp=$S[Yp],IB=Gp.toLowerCase(),RB=Gp[0].toUpperCase()+Gp.slice(1);Di(IB,"on"+RB)}Di(BS,"onAnimationEnd"),Di(US,"onAnimationIteration"),Di(HS,"onAnimationStart"),Di("dblclick","onDoubleClick"),Di("focusin","onFocus"),Di("focusout","onBlur"),Di(zS,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),a("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),a("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),a("onBeforeInput",["compositionend","keypress","textInput","paste"]),a("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),a("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var Eu="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(" "),LB=new Set("cancel close invalid load scroll toggle".split(" ").concat(Eu));function VS(i,o,l){var h=i.type||"unknown-event";i.currentTarget=l,I9(h,o,void 0,i),i.currentTarget=null}function qS(i,o){o=(o&4)!==0;for(var l=0;l<i.length;l++){var h=i[l],E=h.event;h=h.listeners;e:{var T=void 0;if(o)for(var x=h.length-1;0<=x;x--){var R=h[x],U=R.instance,Z=R.currentTarget;if(R=R.listener,U!==T&&E.isPropagationStopped())break e;VS(E,R,Z),T=U}else for(x=0;x<h.length;x++){if(R=h[x],U=R.instance,Z=R.currentTarget,R=R.listener,U!==T&&E.isPropagationStopped())break e;VS(E,R,Z),T=U}}}if(mc)throw i=wp,mc=!1,wp=null,i}function bt(i,o){var l=o[tm];l===void 0&&(l=o[tm]=new Set);var h=i+"__bubble";l.has(h)||(YS(o,i,2,!1),l.add(h))}function Wp(i,o,l){var h=0;o&&(h|=4),YS(l,i,h,o)}var Ic="_reactListening"+Math.random().toString(36).slice(2);function yu(i){if(!i[Ic]){i[Ic]=!0,r.forEach(function(l){l!=="selectionchange"&&(LB.has(l)||Wp(l,!1,i),Wp(l,!0,i))});var o=i.nodeType===9?i:i.ownerDocument;o===null||o[Ic]||(o[Ic]=!0,Wp("selectionchange",!1,o))}}function YS(i,o,l,h){switch(mS(o)){case 1:var E=W9;break;case 4:E=X9;break;default:E=Op}l=E.bind(null,o,l,i),E=void 0,!xp||o!=="touchstart"&&o!=="touchmove"&&o!=="wheel"||(E=!0),h?E!==void 0?i.addEventListener(o,l,{capture:!0,passive:E}):i.addEventListener(o,l,!0):E!==void 0?i.addEventListener(o,l,{passive:E}):i.addEventListener(o,l,!1)}function Xp(i,o,l,h,E){var T=h;if((o&1)===0&&(o&2)===0&&h!==null)e:for(;;){if(h===null)return;var x=h.tag;if(x===3||x===4){var R=h.stateNode.containerInfo;if(R===E||R.nodeType===8&&R.parentNode===E)break;if(x===4)for(x=h.return;x!==null;){var U=x.tag;if((U===3||U===4)&&(U=x.stateNode.containerInfo,U===E||U.nodeType===8&&U.parentNode===E))return;x=x.return}for(;R!==null;){if(x=xs(R),x===null)return;if(U=x.tag,U===5||U===6){h=T=x;continue e}R=R.parentNode}}h=h.return}Q_(function(){var Z=T,ce=bp(l),me=[];e:{var ue=jS.get(i);if(ue!==void 0){var Ae=Lp,ke=i;switch(i){case"keypress":if(Cc(l)===0)break e;case"keydown":case"keyup":Ae=cB;break;case"focusin":ke="focus",Ae=Fp;break;case"focusout":ke="blur",Ae=Fp;break;case"beforeblur":case"afterblur":Ae=Fp;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":Ae=yS;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Ae=J9;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Ae=hB;break;case BS:case US:case HS:Ae=tB;break;case zS:Ae=mB;break;case"scroll":Ae=K9;break;case"wheel":Ae=EB;break;case"copy":case"cut":case"paste":Ae=rB;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Ae=bS}var Oe=(o&4)!==0,Lt=!Oe&&i==="scroll",W=Oe?ue!==null?ue+"Capture":null:ue;Oe=[];for(var j=Z,K;j!==null;){K=j;var Te=K.stateNode;if(K.tag===5&&Te!==null&&(K=Te,W!==null&&(Te=eu(j,W),Te!=null&&Oe.push(Tu(j,Te,K)))),Lt)break;j=j.return}0<Oe.length&&(ue=new Ae(ue,ke,null,l,ce),me.push({event:ue,listeners:Oe}))}}if((o&7)===0){e:{if(ue=i==="mouseover"||i==="pointerover",Ae=i==="mouseout"||i==="pointerout",ue&&l!==Yn&&(ke=l.relatedTarget||l.fromElement)&&(xs(ke)||ke[li]))break e;if((Ae||ue)&&(ue=ce.window===ce?ce:(ue=ce.ownerDocument)?ue.defaultView||ue.parentWindow:window,Ae?(ke=l.relatedTarget||l.toElement,Ae=Z,ke=ke?xs(ke):null,ke!==null&&(Lt=Ss(ke),ke!==Lt||ke.tag!==5&&ke.tag!==6)&&(ke=null)):(Ae=null,ke=Z),Ae!==ke)){if(Oe=yS,Te="onMouseLeave",W="onMouseEnter",j="mouse",(i==="pointerout"||i==="pointerover")&&(Oe=bS,Te="onPointerLeave",W="onPointerEnter",j="pointer"),Lt=Ae==null?ue:Do(Ae),K=ke==null?ue:Do(ke),ue=new Oe(Te,j+"leave",Ae,l,ce),ue.target=Lt,ue.relatedTarget=K,Te=null,xs(ce)===Z&&(Oe=new Oe(W,j+"enter",ke,l,ce),Oe.target=K,Oe.relatedTarget=Lt,Te=Oe),Lt=Te,Ae&&ke)t:{for(Oe=Ae,W=ke,j=0,K=Oe;K;K=Ro(K))j++;for(K=0,Te=W;Te;Te=Ro(Te))K++;for(;0<j-K;)Oe=Ro(Oe),j--;for(;0<K-j;)W=Ro(W),K--;for(;j--;){if(Oe===W||W!==null&&Oe===W.alternate)break t;Oe=Ro(Oe),W=Ro(W)}Oe=null}else Oe=null;Ae!==null&&GS(me,ue,Ae,Oe,!1),ke!==null&&Lt!==null&&GS(me,Lt,ke,Oe,!0)}}e:{if(ue=Z?Do(Z):window,Ae=ue.nodeName&&ue.nodeName.toLowerCase(),Ae==="select"||Ae==="input"&&ue.type==="file")var De=wB;else if(CS(ue))if(NS)De=NB;else{De=CB;var He=AB}else(Ae=ue.nodeName)&&Ae.toLowerCase()==="input"&&(ue.type==="checkbox"||ue.type==="radio")&&(De=vB);if(De&&(De=De(i,Z))){vS(me,De,l,ce);break e}He&&He(i,ue,Z),i==="focusout"&&(He=ue._wrapperState)&&He.controlled&&ue.type==="number"&&sn(ue,"number",ue.value)}switch(He=Z?Do(Z):window,i){case"focusin":(CS(He)||He.contentEditable==="true")&&(Oo=He,$p=Z,gu=null);break;case"focusout":gu=$p=Oo=null;break;case"mousedown":Vp=!0;break;case"contextmenu":case"mouseup":case"dragend":Vp=!1,MS(me,l,ce);break;case"selectionchange":if(OB)break;case"keydown":case"keyup":MS(me,l,ce)}var ze;if(Up)e:{switch(i){case"compositionstart":var Ge="onCompositionStart";break e;case"compositionend":Ge="onCompositionEnd";break e;case"compositionupdate":Ge="onCompositionUpdate";break e}Ge=void 0}else Po?wS(i,l)&&(Ge="onCompositionEnd"):i==="keydown"&&l.keyCode===229&&(Ge="onCompositionStart");Ge&&(_S&&l.locale!=="ko"&&(Po||Ge!=="onCompositionStart"?Ge==="onCompositionEnd"&&Po&&(ze=gS()):(Li=ce,Rp="value"in Li?Li.value:Li.textContent,Po=!0)),He=Rc(Z,Ge),0<He.length&&(Ge=new TS(Ge,i,null,l,ce),me.push({event:Ge,listeners:He}),ze?Ge.data=ze:(ze=AS(l),ze!==null&&(Ge.data=ze)))),(ze=TB?bB(i,l):_B(i,l))&&(Z=Rc(Z,"onBeforeInput"),0<Z.length&&(ce=new TS("onBeforeInput","beforeinput",null,l,ce),me.push({event:ce,listeners:Z}),ce.data=ze))}qS(me,o)})}function Tu(i,o,l){return{instance:i,listener:o,currentTarget:l}}function Rc(i,o){for(var l=o+"Capture",h=[];i!==null;){var E=i,T=E.stateNode;E.tag===5&&T!==null&&(E=T,T=eu(i,l),T!=null&&h.unshift(Tu(i,T,E)),T=eu(i,o),T!=null&&h.push(Tu(i,T,E))),i=i.return}return h}function Ro(i){if(i===null)return null;do i=i.return;while(i&&i.tag!==5);return i||null}function GS(i,o,l,h,E){for(var T=o._reactName,x=[];l!==null&&l!==h;){var R=l,U=R.alternate,Z=R.stateNode;if(U!==null&&U===h)break;R.tag===5&&Z!==null&&(R=Z,E?(U=eu(l,T),U!=null&&x.unshift(Tu(l,U,R))):E||(U=eu(l,T),U!=null&&x.push(Tu(l,U,R)))),l=l.return}x.length!==0&&i.push({event:o,listeners:x})}var DB=/\r\n?/g,MB=/\u0000|\uFFFD/g;function WS(i){return(typeof i=="string"?i:""+i).replace(DB,`
|
|
15
|
+
`).replace(MB,"")}function Lc(i,o,l){if(o=WS(o),WS(i)!==o&&l)throw Error(n(425))}function Dc(){}var Kp=null,Qp=null;function Jp(i,o){return i==="textarea"||i==="noscript"||typeof o.children=="string"||typeof o.children=="number"||typeof o.dangerouslySetInnerHTML=="object"&&o.dangerouslySetInnerHTML!==null&&o.dangerouslySetInnerHTML.__html!=null}var Zp=typeof setTimeout=="function"?setTimeout:void 0,FB=typeof clearTimeout=="function"?clearTimeout:void 0,XS=typeof Promise=="function"?Promise:void 0,BB=typeof queueMicrotask=="function"?queueMicrotask:typeof XS!="undefined"?function(i){return XS.resolve(null).then(i).catch(UB)}:Zp;function UB(i){setTimeout(function(){throw i})}function em(i,o){var l=o,h=0;do{var E=l.nextSibling;if(i.removeChild(l),E&&E.nodeType===8)if(l=E.data,l==="/$"){if(h===0){i.removeChild(E),lu(o);return}h--}else l!=="$"&&l!=="$?"&&l!=="$!"||h++;l=E}while(l);lu(o)}function Mi(i){for(;i!=null;i=i.nextSibling){var o=i.nodeType;if(o===1||o===3)break;if(o===8){if(o=i.data,o==="$"||o==="$!"||o==="$?")break;if(o==="/$")return null}}return i}function KS(i){i=i.previousSibling;for(var o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="$"||l==="$!"||l==="$?"){if(o===0)return i;o--}else l==="/$"&&o++}i=i.previousSibling}return null}var Lo=Math.random().toString(36).slice(2),Yr="__reactFiber$"+Lo,bu="__reactProps$"+Lo,li="__reactContainer$"+Lo,tm="__reactEvents$"+Lo,HB="__reactListeners$"+Lo,zB="__reactHandles$"+Lo;function xs(i){var o=i[Yr];if(o)return o;for(var l=i.parentNode;l;){if(o=l[li]||l[Yr]){if(l=o.alternate,o.child!==null||l!==null&&l.child!==null)for(i=KS(i);i!==null;){if(l=i[Yr])return l;i=KS(i)}return o}i=l,l=i.parentNode}return null}function _u(i){return i=i[Yr]||i[li],!i||i.tag!==5&&i.tag!==6&&i.tag!==13&&i.tag!==3?null:i}function Do(i){if(i.tag===5||i.tag===6)return i.stateNode;throw Error(n(33))}function Mc(i){return i[bu]||null}var nm=[],Mo=-1;function Fi(i){return{current:i}}function _t(i){0>Mo||(i.current=nm[Mo],nm[Mo]=null,Mo--)}function Et(i,o){Mo++,nm[Mo]=i.current,i.current=o}var Bi={},bn=Fi(Bi),Fn=Fi(!1),ws=Bi;function Fo(i,o){var l=i.type.contextTypes;if(!l)return Bi;var h=i.stateNode;if(h&&h.__reactInternalMemoizedUnmaskedChildContext===o)return h.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in l)E[T]=o[T];return h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=o,i.__reactInternalMemoizedMaskedChildContext=E),E}function Bn(i){return i=i.childContextTypes,i!=null}function Fc(){_t(Fn),_t(bn)}function QS(i,o,l){if(bn.current!==Bi)throw Error(n(168));Et(bn,o),Et(Fn,l)}function JS(i,o,l){var h=i.stateNode;if(o=o.childContextTypes,typeof h.getChildContext!="function")return l;h=h.getChildContext();for(var E in h)if(!(E in o))throw Error(n(108,Le(i)||"Unknown",E));return N({},l,h)}function Bc(i){return i=(i=i.stateNode)&&i.__reactInternalMemoizedMergedChildContext||Bi,ws=bn.current,Et(bn,i),Et(Fn,Fn.current),!0}function ZS(i,o,l){var h=i.stateNode;if(!h)throw Error(n(169));l?(i=JS(i,o,ws),h.__reactInternalMemoizedMergedChildContext=i,_t(Fn),_t(bn),Et(bn,i)):_t(Fn),Et(Fn,l)}var ci=null,Uc=!1,rm=!1;function ex(i){ci===null?ci=[i]:ci.push(i)}function jB(i){Uc=!0,ex(i)}function Ui(){if(!rm&&ci!==null){rm=!0;var i=0,o=ct;try{var l=ci;for(ct=1;i<l.length;i++){var h=l[i];do h=h(!0);while(h!==null)}ci=null,Uc=!1}catch(E){throw ci!==null&&(ci=ci.slice(i+1)),nS(Ap,Ui),E}finally{ct=o,rm=!1}}return null}var Bo=[],Uo=0,Hc=null,zc=0,sr=[],or=0,As=null,di=1,fi="";function Cs(i,o){Bo[Uo++]=zc,Bo[Uo++]=Hc,Hc=i,zc=o}function tx(i,o,l){sr[or++]=di,sr[or++]=fi,sr[or++]=As,As=i;var h=di;i=fi;var E=32-br(h)-1;h&=~(1<<E),l+=1;var T=32-br(o)+E;if(30<T){var x=E-E%5;T=(h&(1<<x)-1).toString(32),h>>=x,E-=x,di=1<<32-br(o)+E|l<<E|h,fi=T+i}else di=1<<T|l<<E|h,fi=i}function im(i){i.return!==null&&(Cs(i,1),tx(i,1,0))}function sm(i){for(;i===Hc;)Hc=Bo[--Uo],Bo[Uo]=null,zc=Bo[--Uo],Bo[Uo]=null;for(;i===As;)As=sr[--or],sr[or]=null,fi=sr[--or],sr[or]=null,di=sr[--or],sr[or]=null}var Wn=null,Xn=null,At=!1,Sr=null;function nx(i,o){var l=cr(5,null,null,0);l.elementType="DELETED",l.stateNode=o,l.return=i,o=i.deletions,o===null?(i.deletions=[l],i.flags|=16):o.push(l)}function rx(i,o){switch(i.tag){case 5:var l=i.type;return o=o.nodeType!==1||l.toLowerCase()!==o.nodeName.toLowerCase()?null:o,o!==null?(i.stateNode=o,Wn=i,Xn=Mi(o.firstChild),!0):!1;case 6:return o=i.pendingProps===""||o.nodeType!==3?null:o,o!==null?(i.stateNode=o,Wn=i,Xn=null,!0):!1;case 13:return o=o.nodeType!==8?null:o,o!==null?(l=As!==null?{id:di,overflow:fi}:null,i.memoizedState={dehydrated:o,treeContext:l,retryLane:1073741824},l=cr(18,null,null,0),l.stateNode=o,l.return=i,i.child=l,Wn=i,Xn=null,!0):!1;default:return!1}}function om(i){return(i.mode&1)!==0&&(i.flags&128)===0}function am(i){if(At){var o=Xn;if(o){var l=o;if(!rx(i,o)){if(om(i))throw Error(n(418));o=Mi(l.nextSibling);var h=Wn;o&&rx(i,o)?nx(h,l):(i.flags=i.flags&-4097|2,At=!1,Wn=i)}}else{if(om(i))throw Error(n(418));i.flags=i.flags&-4097|2,At=!1,Wn=i}}}function ix(i){for(i=i.return;i!==null&&i.tag!==5&&i.tag!==3&&i.tag!==13;)i=i.return;Wn=i}function jc(i){if(i!==Wn)return!1;if(!At)return ix(i),At=!0,!1;var o;if((o=i.tag!==3)&&!(o=i.tag!==5)&&(o=i.type,o=o!=="head"&&o!=="body"&&!Jp(i.type,i.memoizedProps)),o&&(o=Xn)){if(om(i))throw sx(),Error(n(418));for(;o;)nx(i,o),o=Mi(o.nextSibling)}if(ix(i),i.tag===13){if(i=i.memoizedState,i=i!==null?i.dehydrated:null,!i)throw Error(n(317));e:{for(i=i.nextSibling,o=0;i;){if(i.nodeType===8){var l=i.data;if(l==="/$"){if(o===0){Xn=Mi(i.nextSibling);break e}o--}else l!=="$"&&l!=="$!"&&l!=="$?"||o++}i=i.nextSibling}Xn=null}}else Xn=Wn?Mi(i.stateNode.nextSibling):null;return!0}function sx(){for(var i=Xn;i;)i=Mi(i.nextSibling)}function Ho(){Xn=Wn=null,At=!1}function um(i){Sr===null?Sr=[i]:Sr.push(i)}var $B=H.ReactCurrentBatchConfig;function Su(i,o,l){if(i=l.ref,i!==null&&typeof i!="function"&&typeof i!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var h=l.stateNode}if(!h)throw Error(n(147,i));var E=h,T=""+i;return o!==null&&o.ref!==null&&typeof o.ref=="function"&&o.ref._stringRef===T?o.ref:(o=function(x){var R=E.refs;x===null?delete R[T]:R[T]=x},o._stringRef=T,o)}if(typeof i!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,i))}return i}function $c(i,o){throw i=Object.prototype.toString.call(o),Error(n(31,i==="[object Object]"?"object with keys {"+Object.keys(o).join(", ")+"}":i))}function ox(i){var o=i._init;return o(i._payload)}function ax(i){function o(W,j){if(i){var K=W.deletions;K===null?(W.deletions=[j],W.flags|=16):K.push(j)}}function l(W,j){if(!i)return null;for(;j!==null;)o(W,j),j=j.sibling;return null}function h(W,j){for(W=new Map;j!==null;)j.key!==null?W.set(j.key,j):W.set(j.index,j),j=j.sibling;return W}function E(W,j){return W=Gi(W,j),W.index=0,W.sibling=null,W}function T(W,j,K){return W.index=K,i?(K=W.alternate,K!==null?(K=K.index,K<j?(W.flags|=2,j):K):(W.flags|=2,j)):(W.flags|=1048576,j)}function x(W){return i&&W.alternate===null&&(W.flags|=2),W}function R(W,j,K,Te){return j===null||j.tag!==6?(j=Zm(K,W.mode,Te),j.return=W,j):(j=E(j,K),j.return=W,j)}function U(W,j,K,Te){var De=K.type;return De===q?ce(W,j,K.props.children,Te,K.key):j!==null&&(j.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===xe&&ox(De)===j.type)?(Te=E(j,K.props),Te.ref=Su(W,j,K),Te.return=W,Te):(Te=hd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=Su(W,j,K),Te.return=W,Te)}function Z(W,j,K,Te){return j===null||j.tag!==4||j.stateNode.containerInfo!==K.containerInfo||j.stateNode.implementation!==K.implementation?(j=e0(K,W.mode,Te),j.return=W,j):(j=E(j,K.children||[]),j.return=W,j)}function ce(W,j,K,Te,De){return j===null||j.tag!==7?(j=Ls(K,W.mode,Te,De),j.return=W,j):(j=E(j,K),j.return=W,j)}function me(W,j,K){if(typeof j=="string"&&j!==""||typeof j=="number")return j=Zm(""+j,W.mode,K),j.return=W,j;if(typeof j=="object"&&j!==null){switch(j.$$typeof){case Y:return K=hd(j.type,j.key,j.props,null,W.mode,K),K.ref=Su(W,null,j),K.return=W,K;case L:return j=e0(j,W.mode,K),j.return=W,j;case xe:var Te=j._init;return me(W,Te(j._payload),K)}if(Mn(j)||ie(j))return j=Ls(j,W.mode,K,null),j.return=W,j;$c(W,j)}return null}function ue(W,j,K,Te){var De=j!==null?j.key:null;if(typeof K=="string"&&K!==""||typeof K=="number")return De!==null?null:R(W,j,""+K,Te);if(typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:return K.key===De?U(W,j,K,Te):null;case L:return K.key===De?Z(W,j,K,Te):null;case xe:return De=K._init,ue(W,j,De(K._payload),Te)}if(Mn(K)||ie(K))return De!==null?null:ce(W,j,K,Te,null);$c(W,K)}return null}function Ae(W,j,K,Te,De){if(typeof Te=="string"&&Te!==""||typeof Te=="number")return W=W.get(K)||null,R(j,W,""+Te,De);if(typeof Te=="object"&&Te!==null){switch(Te.$$typeof){case Y:return W=W.get(Te.key===null?K:Te.key)||null,U(j,W,Te,De);case L:return W=W.get(Te.key===null?K:Te.key)||null,Z(j,W,Te,De);case xe:var He=Te._init;return Ae(W,j,K,He(Te._payload),De)}if(Mn(Te)||ie(Te))return W=W.get(K)||null,ce(j,W,Te,De,null);$c(j,Te)}return null}function ke(W,j,K,Te){for(var De=null,He=null,ze=j,Ge=j=0,en=null;ze!==null&&Ge<K.length;Ge++){ze.index>Ge?(en=ze,ze=null):en=ze.sibling;var st=ue(W,ze,K[Ge],Te);if(st===null){ze===null&&(ze=en);break}i&&ze&&st.alternate===null&&o(W,ze),j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st,ze=en}if(Ge===K.length)return l(W,ze),At&&Cs(W,Ge),De;if(ze===null){for(;Ge<K.length;Ge++)ze=me(W,K[Ge],Te),ze!==null&&(j=T(ze,j,Ge),He===null?De=ze:He.sibling=ze,He=ze);return At&&Cs(W,Ge),De}for(ze=h(W,ze);Ge<K.length;Ge++)en=Ae(ze,W,Ge,K[Ge],Te),en!==null&&(i&&en.alternate!==null&&ze.delete(en.key===null?Ge:en.key),j=T(en,j,Ge),He===null?De=en:He.sibling=en,He=en);return i&&ze.forEach(function(Wi){return o(W,Wi)}),At&&Cs(W,Ge),De}function Oe(W,j,K,Te){var De=ie(K);if(typeof De!="function")throw Error(n(150));if(K=De.call(K),K==null)throw Error(n(151));for(var He=De=null,ze=j,Ge=j=0,en=null,st=K.next();ze!==null&&!st.done;Ge++,st=K.next()){ze.index>Ge?(en=ze,ze=null):en=ze.sibling;var Wi=ue(W,ze,st.value,Te);if(Wi===null){ze===null&&(ze=en);break}i&&ze&&Wi.alternate===null&&o(W,ze),j=T(Wi,j,Ge),He===null?De=Wi:He.sibling=Wi,He=Wi,ze=en}if(st.done)return l(W,ze),At&&Cs(W,Ge),De;if(ze===null){for(;!st.done;Ge++,st=K.next())st=me(W,st.value,Te),st!==null&&(j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st);return At&&Cs(W,Ge),De}for(ze=h(W,ze);!st.done;Ge++,st=K.next())st=Ae(ze,W,Ge,st.value,Te),st!==null&&(i&&st.alternate!==null&&ze.delete(st.key===null?Ge:st.key),j=T(st,j,Ge),He===null?De=st:He.sibling=st,He=st);return i&&ze.forEach(function(S7){return o(W,S7)}),At&&Cs(W,Ge),De}function Lt(W,j,K,Te){if(typeof K=="object"&&K!==null&&K.type===q&&K.key===null&&(K=K.props.children),typeof K=="object"&&K!==null){switch(K.$$typeof){case Y:e:{for(var De=K.key,He=j;He!==null;){if(He.key===De){if(De=K.type,De===q){if(He.tag===7){l(W,He.sibling),j=E(He,K.props.children),j.return=W,W=j;break e}}else if(He.elementType===De||typeof De=="object"&&De!==null&&De.$$typeof===xe&&ox(De)===He.type){l(W,He.sibling),j=E(He,K.props),j.ref=Su(W,He,K),j.return=W,W=j;break e}l(W,He);break}else o(W,He);He=He.sibling}K.type===q?(j=Ls(K.props.children,W.mode,Te,K.key),j.return=W,W=j):(Te=hd(K.type,K.key,K.props,null,W.mode,Te),Te.ref=Su(W,j,K),Te.return=W,W=Te)}return x(W);case L:e:{for(He=K.key;j!==null;){if(j.key===He)if(j.tag===4&&j.stateNode.containerInfo===K.containerInfo&&j.stateNode.implementation===K.implementation){l(W,j.sibling),j=E(j,K.children||[]),j.return=W,W=j;break e}else{l(W,j);break}else o(W,j);j=j.sibling}j=e0(K,W.mode,Te),j.return=W,W=j}return x(W);case xe:return He=K._init,Lt(W,j,He(K._payload),Te)}if(Mn(K))return ke(W,j,K,Te);if(ie(K))return Oe(W,j,K,Te);$c(W,K)}return typeof K=="string"&&K!==""||typeof K=="number"?(K=""+K,j!==null&&j.tag===6?(l(W,j.sibling),j=E(j,K),j.return=W,W=j):(l(W,j),j=Zm(K,W.mode,Te),j.return=W,W=j),x(W)):l(W,j)}return Lt}var zo=ax(!0),ux=ax(!1),Vc=Fi(null),qc=null,jo=null,lm=null;function cm(){lm=jo=qc=null}function dm(i){var o=Vc.current;_t(Vc),i._currentValue=o}function fm(i,o,l){for(;i!==null;){var h=i.alternate;if((i.childLanes&o)!==o?(i.childLanes|=o,h!==null&&(h.childLanes|=o)):h!==null&&(h.childLanes&o)!==o&&(h.childLanes|=o),i===l)break;i=i.return}}function $o(i,o){qc=i,lm=jo=null,i=i.dependencies,i!==null&&i.firstContext!==null&&((i.lanes&o)!==0&&(Un=!0),i.firstContext=null)}function ar(i){var o=i._currentValue;if(lm!==i)if(i={context:i,memoizedValue:o,next:null},jo===null){if(qc===null)throw Error(n(308));jo=i,qc.dependencies={lanes:0,firstContext:i}}else jo=jo.next=i;return o}var vs=null;function hm(i){vs===null?vs=[i]:vs.push(i)}function lx(i,o,l,h){var E=o.interleaved;return E===null?(l.next=l,hm(o)):(l.next=E.next,E.next=l),o.interleaved=l,hi(i,h)}function hi(i,o){i.lanes|=o;var l=i.alternate;for(l!==null&&(l.lanes|=o),l=i,i=i.return;i!==null;)i.childLanes|=o,l=i.alternate,l!==null&&(l.childLanes|=o),l=i,i=i.return;return l.tag===3?l.stateNode:null}var Hi=!1;function pm(i){i.updateQueue={baseState:i.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function cx(i,o){i=i.updateQueue,o.updateQueue===i&&(o.updateQueue={baseState:i.baseState,firstBaseUpdate:i.firstBaseUpdate,lastBaseUpdate:i.lastBaseUpdate,shared:i.shared,effects:i.effects})}function pi(i,o){return{eventTime:i,lane:o,tag:0,payload:null,callback:null,next:null}}function zi(i,o,l){var h=i.updateQueue;if(h===null)return null;if(h=h.shared,(it&2)!==0){var E=h.pending;return E===null?o.next=o:(o.next=E.next,E.next=o),h.pending=o,hi(i,l)}return E=h.interleaved,E===null?(o.next=o,hm(h)):(o.next=E.next,E.next=o),h.interleaved=o,hi(i,l)}function Yc(i,o,l){if(o=o.updateQueue,o!==null&&(o=o.shared,(l&4194240)!==0)){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Np(i,l)}}function dx(i,o){var l=i.updateQueue,h=i.alternate;if(h!==null&&(h=h.updateQueue,l===h)){var E=null,T=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};T===null?E=T=x:T=T.next=x,l=l.next}while(l!==null);T===null?E=T=o:T=T.next=o}else E=T=o;l={baseState:h.baseState,firstBaseUpdate:E,lastBaseUpdate:T,shared:h.shared,effects:h.effects},i.updateQueue=l;return}i=l.lastBaseUpdate,i===null?l.firstBaseUpdate=o:i.next=o,l.lastBaseUpdate=o}function Gc(i,o,l,h){var E=i.updateQueue;Hi=!1;var T=E.firstBaseUpdate,x=E.lastBaseUpdate,R=E.shared.pending;if(R!==null){E.shared.pending=null;var U=R,Z=U.next;U.next=null,x===null?T=Z:x.next=Z,x=U;var ce=i.alternate;ce!==null&&(ce=ce.updateQueue,R=ce.lastBaseUpdate,R!==x&&(R===null?ce.firstBaseUpdate=Z:R.next=Z,ce.lastBaseUpdate=U))}if(T!==null){var me=E.baseState;x=0,ce=Z=U=null,R=T;do{var ue=R.lane,Ae=R.eventTime;if((h&ue)===ue){ce!==null&&(ce=ce.next={eventTime:Ae,lane:0,tag:R.tag,payload:R.payload,callback:R.callback,next:null});e:{var ke=i,Oe=R;switch(ue=o,Ae=l,Oe.tag){case 1:if(ke=Oe.payload,typeof ke=="function"){me=ke.call(Ae,me,ue);break e}me=ke;break e;case 3:ke.flags=ke.flags&-65537|128;case 0:if(ke=Oe.payload,ue=typeof ke=="function"?ke.call(Ae,me,ue):ke,ue==null)break e;me=N({},me,ue);break e;case 2:Hi=!0}}R.callback!==null&&R.lane!==0&&(i.flags|=64,ue=E.effects,ue===null?E.effects=[R]:ue.push(R))}else Ae={eventTime:Ae,lane:ue,tag:R.tag,payload:R.payload,callback:R.callback,next:null},ce===null?(Z=ce=Ae,U=me):ce=ce.next=Ae,x|=ue;if(R=R.next,R===null){if(R=E.shared.pending,R===null)break;ue=R,R=ue.next,ue.next=null,E.lastBaseUpdate=ue,E.shared.pending=null}}while(!0);if(ce===null&&(U=me),E.baseState=U,E.firstBaseUpdate=Z,E.lastBaseUpdate=ce,o=E.shared.interleaved,o!==null){E=o;do x|=E.lane,E=E.next;while(E!==o)}else T===null&&(E.shared.lanes=0);Ps|=x,i.lanes=x,i.memoizedState=me}}function fx(i,o,l){if(i=o.effects,o.effects=null,i!==null)for(o=0;o<i.length;o++){var h=i[o],E=h.callback;if(E!==null){if(h.callback=null,h=l,typeof E!="function")throw Error(n(191,E));E.call(h)}}}var xu={},Gr=Fi(xu),wu=Fi(xu),Au=Fi(xu);function Ns(i){if(i===xu)throw Error(n(174));return i}function mm(i,o){switch(Et(Au,o),Et(wu,i),Et(Gr,xu),i=o.nodeType,i){case 9:case 11:o=(o=o.documentElement)?o.namespaceURI:ge(null,"");break;default:i=i===8?o.parentNode:o,o=i.namespaceURI||null,i=i.tagName,o=ge(o,i)}_t(Gr),Et(Gr,o)}function Vo(){_t(Gr),_t(wu),_t(Au)}function hx(i){Ns(Au.current);var o=Ns(Gr.current),l=ge(o,i.type);o!==l&&(Et(wu,i),Et(Gr,l))}function gm(i){wu.current===i&&(_t(Gr),_t(wu))}var Nt=Fi(0);function Wc(i){for(var o=i;o!==null;){if(o.tag===13){var l=o.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return o}else if(o.tag===19&&o.memoizedProps.revealOrder!==void 0){if((o.flags&128)!==0)return o}else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return null;o=o.return}o.sibling.return=o.return,o=o.sibling}return null}var Em=[];function ym(){for(var i=0;i<Em.length;i++)Em[i]._workInProgressVersionPrimary=null;Em.length=0}var Xc=H.ReactCurrentDispatcher,Tm=H.ReactCurrentBatchConfig,ks=0,kt=null,Vt=null,Jt=null,Kc=!1,Cu=!1,vu=0,VB=0;function _n(){throw Error(n(321))}function bm(i,o){if(o===null)return!1;for(var l=0;l<o.length&&l<i.length;l++)if(!_r(i[l],o[l]))return!1;return!0}function _m(i,o,l,h,E,T){if(ks=T,kt=o,o.memoizedState=null,o.updateQueue=null,o.lanes=0,Xc.current=i===null||i.memoizedState===null?WB:XB,i=l(h,E),Cu){T=0;do{if(Cu=!1,vu=0,25<=T)throw Error(n(301));T+=1,Jt=Vt=null,o.updateQueue=null,Xc.current=KB,i=l(h,E)}while(Cu)}if(Xc.current=Zc,o=Vt!==null&&Vt.next!==null,ks=0,Jt=Vt=kt=null,Kc=!1,o)throw Error(n(300));return i}function Sm(){var i=vu!==0;return vu=0,i}function Wr(){var i={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return Jt===null?kt.memoizedState=Jt=i:Jt=Jt.next=i,Jt}function ur(){if(Vt===null){var i=kt.alternate;i=i!==null?i.memoizedState:null}else i=Vt.next;var o=Jt===null?kt.memoizedState:Jt.next;if(o!==null)Jt=o,Vt=i;else{if(i===null)throw Error(n(310));Vt=i,i={memoizedState:Vt.memoizedState,baseState:Vt.baseState,baseQueue:Vt.baseQueue,queue:Vt.queue,next:null},Jt===null?kt.memoizedState=Jt=i:Jt=Jt.next=i}return Jt}function Nu(i,o){return typeof o=="function"?o(i):o}function xm(i){var o=ur(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=Vt,E=h.baseQueue,T=l.pending;if(T!==null){if(E!==null){var x=E.next;E.next=T.next,T.next=x}h.baseQueue=E=T,l.pending=null}if(E!==null){T=E.next,h=h.baseState;var R=x=null,U=null,Z=T;do{var ce=Z.lane;if((ks&ce)===ce)U!==null&&(U=U.next={lane:0,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null}),h=Z.hasEagerState?Z.eagerState:i(h,Z.action);else{var me={lane:ce,action:Z.action,hasEagerState:Z.hasEagerState,eagerState:Z.eagerState,next:null};U===null?(R=U=me,x=h):U=U.next=me,kt.lanes|=ce,Ps|=ce}Z=Z.next}while(Z!==null&&Z!==T);U===null?x=h:U.next=R,_r(h,o.memoizedState)||(Un=!0),o.memoizedState=h,o.baseState=x,o.baseQueue=U,l.lastRenderedState=h}if(i=l.interleaved,i!==null){E=i;do T=E.lane,kt.lanes|=T,Ps|=T,E=E.next;while(E!==i)}else E===null&&(l.lanes=0);return[o.memoizedState,l.dispatch]}function wm(i){var o=ur(),l=o.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=i;var h=l.dispatch,E=l.pending,T=o.memoizedState;if(E!==null){l.pending=null;var x=E=E.next;do T=i(T,x.action),x=x.next;while(x!==E);_r(T,o.memoizedState)||(Un=!0),o.memoizedState=T,o.baseQueue===null&&(o.baseState=T),l.lastRenderedState=T}return[T,h]}function px(){}function mx(i,o){var l=kt,h=ur(),E=o(),T=!_r(h.memoizedState,E);if(T&&(h.memoizedState=E,Un=!0),h=h.queue,Am(yx.bind(null,l,h,i),[i]),h.getSnapshot!==o||T||Jt!==null&&Jt.memoizedState.tag&1){if(l.flags|=2048,ku(9,Ex.bind(null,l,h,E,o),void 0,null),Zt===null)throw Error(n(349));(ks&30)!==0||gx(l,o,E)}return E}function gx(i,o,l){i.flags|=16384,i={getSnapshot:o,value:l},o=kt.updateQueue,o===null?(o={lastEffect:null,stores:null},kt.updateQueue=o,o.stores=[i]):(l=o.stores,l===null?o.stores=[i]:l.push(i))}function Ex(i,o,l,h){o.value=l,o.getSnapshot=h,Tx(o)&&bx(i)}function yx(i,o,l){return l(function(){Tx(o)&&bx(i)})}function Tx(i){var o=i.getSnapshot;i=i.value;try{var l=o();return!_r(i,l)}catch(h){return!0}}function bx(i){var o=hi(i,1);o!==null&&Cr(o,i,1,-1)}function _x(i){var o=Wr();return typeof i=="function"&&(i=i()),o.memoizedState=o.baseState=i,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Nu,lastRenderedState:i},o.queue=i,i=i.dispatch=GB.bind(null,kt,i),[o.memoizedState,i]}function ku(i,o,l,h){return i={tag:i,create:o,destroy:l,deps:h,next:null},o=kt.updateQueue,o===null?(o={lastEffect:null,stores:null},kt.updateQueue=o,o.lastEffect=i.next=i):(l=o.lastEffect,l===null?o.lastEffect=i.next=i:(h=l.next,l.next=i,i.next=h,o.lastEffect=i)),i}function Sx(){return ur().memoizedState}function Qc(i,o,l,h){var E=Wr();kt.flags|=i,E.memoizedState=ku(1|o,l,void 0,h===void 0?null:h)}function Jc(i,o,l,h){var E=ur();h=h===void 0?null:h;var T=void 0;if(Vt!==null){var x=Vt.memoizedState;if(T=x.destroy,h!==null&&bm(h,x.deps)){E.memoizedState=ku(o,l,T,h);return}}kt.flags|=i,E.memoizedState=ku(1|o,l,T,h)}function xx(i,o){return Qc(8390656,8,i,o)}function Am(i,o){return Jc(2048,8,i,o)}function wx(i,o){return Jc(4,2,i,o)}function Ax(i,o){return Jc(4,4,i,o)}function Cx(i,o){if(typeof o=="function")return i=i(),o(i),function(){o(null)};if(o!=null)return i=i(),o.current=i,function(){o.current=null}}function vx(i,o,l){return l=l!=null?l.concat([i]):null,Jc(4,4,Cx.bind(null,o,i),l)}function Cm(){}function Nx(i,o){var l=ur();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(l.memoizedState=[i,o],i)}function kx(i,o){var l=ur();o=o===void 0?null:o;var h=l.memoizedState;return h!==null&&o!==null&&bm(o,h[1])?h[0]:(i=i(),l.memoizedState=[i,o],i)}function Px(i,o,l){return(ks&21)===0?(i.baseState&&(i.baseState=!1,Un=!0),i.memoizedState=l):(_r(l,o)||(l=oS(),kt.lanes|=l,Ps|=l,i.baseState=!0),o)}function qB(i,o){var l=ct;ct=l!==0&&4>l?l:4,i(!0);var h=Tm.transition;Tm.transition={};try{i(!1),o()}finally{ct=l,Tm.transition=h}}function Ox(){return ur().memoizedState}function YB(i,o,l){var h=qi(i);if(l={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null},Ix(i))Rx(o,l);else if(l=lx(i,o,l,h),l!==null){var E=kn();Cr(l,i,h,E),Lx(l,o,h)}}function GB(i,o,l){var h=qi(i),E={lane:h,action:l,hasEagerState:!1,eagerState:null,next:null};if(Ix(i))Rx(o,E);else{var T=i.alternate;if(i.lanes===0&&(T===null||T.lanes===0)&&(T=o.lastRenderedReducer,T!==null))try{var x=o.lastRenderedState,R=T(x,l);if(E.hasEagerState=!0,E.eagerState=R,_r(R,x)){var U=o.interleaved;U===null?(E.next=E,hm(o)):(E.next=U.next,U.next=E),o.interleaved=E;return}}catch(Z){}l=lx(i,o,E,h),l!==null&&(E=kn(),Cr(l,i,h,E),Lx(l,o,h))}}function Ix(i){var o=i.alternate;return i===kt||o!==null&&o===kt}function Rx(i,o){Cu=Kc=!0;var l=i.pending;l===null?o.next=o:(o.next=l.next,l.next=o),i.pending=o}function Lx(i,o,l){if((l&4194240)!==0){var h=o.lanes;h&=i.pendingLanes,l|=h,o.lanes=l,Np(i,l)}}var Zc={readContext:ar,useCallback:_n,useContext:_n,useEffect:_n,useImperativeHandle:_n,useInsertionEffect:_n,useLayoutEffect:_n,useMemo:_n,useReducer:_n,useRef:_n,useState:_n,useDebugValue:_n,useDeferredValue:_n,useTransition:_n,useMutableSource:_n,useSyncExternalStore:_n,useId:_n,unstable_isNewReconciler:!1},WB={readContext:ar,useCallback:function(i,o){return Wr().memoizedState=[i,o===void 0?null:o],i},useContext:ar,useEffect:xx,useImperativeHandle:function(i,o,l){return l=l!=null?l.concat([i]):null,Qc(4194308,4,Cx.bind(null,o,i),l)},useLayoutEffect:function(i,o){return Qc(4194308,4,i,o)},useInsertionEffect:function(i,o){return Qc(4,2,i,o)},useMemo:function(i,o){var l=Wr();return o=o===void 0?null:o,i=i(),l.memoizedState=[i,o],i},useReducer:function(i,o,l){var h=Wr();return o=l!==void 0?l(o):o,h.memoizedState=h.baseState=o,i={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:i,lastRenderedState:o},h.queue=i,i=i.dispatch=YB.bind(null,kt,i),[h.memoizedState,i]},useRef:function(i){var o=Wr();return i={current:i},o.memoizedState=i},useState:_x,useDebugValue:Cm,useDeferredValue:function(i){return Wr().memoizedState=i},useTransition:function(){var i=_x(!1),o=i[0];return i=qB.bind(null,i[1]),Wr().memoizedState=i,[o,i]},useMutableSource:function(){},useSyncExternalStore:function(i,o,l){var h=kt,E=Wr();if(At){if(l===void 0)throw Error(n(407));l=l()}else{if(l=o(),Zt===null)throw Error(n(349));(ks&30)!==0||gx(h,o,l)}E.memoizedState=l;var T={value:l,getSnapshot:o};return E.queue=T,xx(yx.bind(null,h,T,i),[i]),h.flags|=2048,ku(9,Ex.bind(null,h,T,l,o),void 0,null),l},useId:function(){var i=Wr(),o=Zt.identifierPrefix;if(At){var l=fi,h=di;l=(h&~(1<<32-br(h)-1)).toString(32)+l,o=":"+o+"R"+l,l=vu++,0<l&&(o+="H"+l.toString(32)),o+=":"}else l=VB++,o=":"+o+"r"+l.toString(32)+":";return i.memoizedState=o},unstable_isNewReconciler:!1},XB={readContext:ar,useCallback:Nx,useContext:ar,useEffect:Am,useImperativeHandle:vx,useInsertionEffect:wx,useLayoutEffect:Ax,useMemo:kx,useReducer:xm,useRef:Sx,useState:function(){return xm(Nu)},useDebugValue:Cm,useDeferredValue:function(i){var o=ur();return Px(o,Vt.memoizedState,i)},useTransition:function(){var i=xm(Nu)[0],o=ur().memoizedState;return[i,o]},useMutableSource:px,useSyncExternalStore:mx,useId:Ox,unstable_isNewReconciler:!1},KB={readContext:ar,useCallback:Nx,useContext:ar,useEffect:Am,useImperativeHandle:vx,useInsertionEffect:wx,useLayoutEffect:Ax,useMemo:kx,useReducer:wm,useRef:Sx,useState:function(){return wm(Nu)},useDebugValue:Cm,useDeferredValue:function(i){var o=ur();return Vt===null?o.memoizedState=i:Px(o,Vt.memoizedState,i)},useTransition:function(){var i=wm(Nu)[0],o=ur().memoizedState;return[i,o]},useMutableSource:px,useSyncExternalStore:mx,useId:Ox,unstable_isNewReconciler:!1};function xr(i,o){if(i&&i.defaultProps){o=N({},o),i=i.defaultProps;for(var l in i)o[l]===void 0&&(o[l]=i[l]);return o}return o}function vm(i,o,l,h){o=i.memoizedState,l=l(h,o),l=l==null?o:N({},o,l),i.memoizedState=l,i.lanes===0&&(i.updateQueue.baseState=l)}var ed={isMounted:function(i){return(i=i._reactInternals)?Ss(i)===i:!1},enqueueSetState:function(i,o,l){i=i._reactInternals;var h=kn(),E=qi(i),T=pi(h,E);T.payload=o,l!=null&&(T.callback=l),o=zi(i,T,E),o!==null&&(Cr(o,i,E,h),Yc(o,i,E))},enqueueReplaceState:function(i,o,l){i=i._reactInternals;var h=kn(),E=qi(i),T=pi(h,E);T.tag=1,T.payload=o,l!=null&&(T.callback=l),o=zi(i,T,E),o!==null&&(Cr(o,i,E,h),Yc(o,i,E))},enqueueForceUpdate:function(i,o){i=i._reactInternals;var l=kn(),h=qi(i),E=pi(l,h);E.tag=2,o!=null&&(E.callback=o),o=zi(i,E,h),o!==null&&(Cr(o,i,h,l),Yc(o,i,h))}};function Dx(i,o,l,h,E,T,x){return i=i.stateNode,typeof i.shouldComponentUpdate=="function"?i.shouldComponentUpdate(h,T,x):o.prototype&&o.prototype.isPureReactComponent?!mu(l,h)||!mu(E,T):!0}function Mx(i,o,l){var h=!1,E=Bi,T=o.contextType;return typeof T=="object"&&T!==null?T=ar(T):(E=Bn(o)?ws:bn.current,h=o.contextTypes,T=(h=h!=null)?Fo(i,E):Bi),o=new o(l,T),i.memoizedState=o.state!==null&&o.state!==void 0?o.state:null,o.updater=ed,i.stateNode=o,o._reactInternals=i,h&&(i=i.stateNode,i.__reactInternalMemoizedUnmaskedChildContext=E,i.__reactInternalMemoizedMaskedChildContext=T),o}function Fx(i,o,l,h){i=o.state,typeof o.componentWillReceiveProps=="function"&&o.componentWillReceiveProps(l,h),typeof o.UNSAFE_componentWillReceiveProps=="function"&&o.UNSAFE_componentWillReceiveProps(l,h),o.state!==i&&ed.enqueueReplaceState(o,o.state,null)}function Nm(i,o,l,h){var E=i.stateNode;E.props=l,E.state=i.memoizedState,E.refs={},pm(i);var T=o.contextType;typeof T=="object"&&T!==null?E.context=ar(T):(T=Bn(o)?ws:bn.current,E.context=Fo(i,T)),E.state=i.memoizedState,T=o.getDerivedStateFromProps,typeof T=="function"&&(vm(i,o,T,l),E.state=i.memoizedState),typeof o.getDerivedStateFromProps=="function"||typeof E.getSnapshotBeforeUpdate=="function"||typeof E.UNSAFE_componentWillMount!="function"&&typeof E.componentWillMount!="function"||(o=E.state,typeof E.componentWillMount=="function"&&E.componentWillMount(),typeof E.UNSAFE_componentWillMount=="function"&&E.UNSAFE_componentWillMount(),o!==E.state&&ed.enqueueReplaceState(E,E.state,null),Gc(i,l,E,h),E.state=i.memoizedState),typeof E.componentDidMount=="function"&&(i.flags|=4194308)}function qo(i,o){try{var l="",h=o;do l+=Be(h),h=h.return;while(h);var E=l}catch(T){E=`
|
|
16
16
|
Error generating stack: `+T.message+`
|
|
17
|
-
`+T.stack}return{value:i,source:o,stack:E,digest:null}}function km(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Nm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var WB=typeof WeakMap=="function"?WeakMap:Map;function Fx(i,o,l){l=pi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ad||(ad=!0,Vm=h),Nm(i,o)},l}function Bx(i,o,l){l=pi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Nm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Nm(i,o),typeof h!="function"&&($i===null?$i=new Set([this]):$i.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function Ux(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new WB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=u7.bind(null,i,o,l),o.then(i,i))}function Hx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function zx(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=pi(-1,1),o.tag=2,zi(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var XB=U.ReactCurrentOwner,Un=!1;function kn(i,o,l,h){o.child=i===null?ax(o,null,l,h):zo(o,i.child,l,h)}function jx(i,o,l,h,E){l=l.render;var T=o.ref;return $o(o,E),h=bm(i,o,l,h,T,E),l=_m(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,mi(i,o,E)):(At&&l&&rm(o),o.flags|=1,kn(i,o,h,E),o.child)}function $x(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Qm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,Vx(i,o,T,h,E)):(i=hd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var x=T.memoizedProps;if(l=l.compare,l=l!==null?l:pu,l(x,h)&&i.ref===o.ref)return mi(i,o,E)}return o.flags|=1,i=Gi(T,h),i.ref=o.ref,i.return=o,o.child=i}function Vx(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(pu(T,h)&&i.ref===o.ref)if(Un=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Un=!0);else return o.lanes=i.lanes,mi(i,o,E)}return Pm(i,o,l,h,E)}function qx(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Go,Kn),Kn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,Et(Go,Kn),Kn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,Et(Go,Kn),Kn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,Et(Go,Kn),Kn|=h;return kn(i,o,E,l),o.child}function Yx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Pm(i,o,l,h,E){var T=Bn(l)?ws:bn.current;return T=Fo(o,T),$o(o,E),l=bm(i,o,l,h,T,E),h=_m(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,mi(i,o,E)):(At&&h&&rm(o),o.flags|=1,kn(i,o,l,E),o.child)}function Gx(i,o,l,h,E){if(Bn(l)){var T=!0;Bc(o)}else T=!1;if($o(o,E),o.stateNode===null)nd(i,o),Dx(o,l,h),vm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,L=o.memoizedProps;x.props=L;var H=x.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ar(Z):(Z=Bn(l)?ws:bn.current,Z=Fo(o,Z));var ce=l.getDerivedStateFromProps,pe=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";pe||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==h||H!==Z)&&Mx(o,x,h,Z),Hi=!1;var ue=o.memoizedState;x.state=ue,Gc(o,h,x,E),H=o.memoizedState,L!==h||ue!==H||Fn.current||Hi?(typeof ce=="function"&&(Cm(o,l,ce,h),H=o.memoizedState),(L=Hi||Lx(o,l,L,h,ue,H,Z))?(pe||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"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=H),x.props=h,x.state=H,x.context=Z,h=L):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,lx(i,o),L=o.memoizedProps,Z=o.type===o.elementType?L:xr(o.type,L),x.props=Z,pe=o.pendingProps,ue=x.context,H=l.contextType,typeof H=="object"&&H!==null?H=ar(H):(H=Bn(l)?ws:bn.current,H=Fo(o,H));var Ae=l.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(L!==pe||ue!==H)&&Mx(o,x,h,H),Hi=!1,ue=o.memoizedState,x.state=ue,Gc(o,h,x,E);var Ne=o.memoizedState;L!==pe||ue!==Ne||Fn.current||Hi?(typeof Ae=="function"&&(Cm(o,l,Ae,h),Ne=o.memoizedState),(Z=Hi||Lx(o,l,Z,h,ue,Ne,H)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,Ne,H),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,Ne,H)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=Ne),x.props=h,x.state=Ne,x.context=H,h=Z):(typeof x.componentDidUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||L===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Om(i,o,l,h,T,E)}function Om(i,o,l,h,E,T){Yx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&JS(o,l,!1),mi(i,o,T);h=o.stateNode,XB.current=o;var L=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=zo(o,i.child,null,T),o.child=zo(o,null,L,T)):kn(i,o,L,T),o.memoizedState=h.state,E&&JS(o,l,!0),o.child}function Wx(i){var o=i.stateNode;o.pendingContext?KS(i,o.pendingContext,o.pendingContext!==o.context):o.context&&KS(i,o.context,!1),pm(i,o.containerInfo)}function Xx(i,o,l,h,E){return Ho(),am(E),o.flags|=256,kn(i,o,l,h),o.child}var Im={dehydrated:null,treeContext:null,retryLane:0};function Rm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Kx(i,o,l){var h=o.pendingProps,E=kt.current,T=!1,x=(o.flags&128)!==0,L;if((L=x)||(L=i!==null&&i.memoizedState===null?!1:(E&2)!==0),L?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Et(kt,E&1),i===null)return om(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=h.children,i=h.fallback,T?(h=o.mode,T=o.child,x={mode:"hidden",children:x},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=x):T=pd(x,h,0,null),i=Ls(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Rm(l),o.memoizedState=Im,i):Lm(o,x));if(E=i.memoizedState,E!==null&&(L=E.dehydrated,L!==null))return KB(i,o,x,h,L,E,l);if(T){T=h.fallback,x=o.mode,E=i.child,L=E.sibling;var H={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=H,o.deletions=null):(h=Gi(E,H),h.subtreeFlags=E.subtreeFlags&14680064),L!==null?T=Gi(L,T):(T=Ls(T,x,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,x=i.child.memoizedState,x=x===null?Rm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,o.memoizedState=Im,h}return T=i.child,i=T.sibling,h=Gi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Lm(i,o){return o=pd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function td(i,o,l,h){return h!==null&&am(h),zo(o,i.child,null,l),i=Lm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function KB(i,o,l,h,E,T,x){if(l)return o.flags&256?(o.flags&=-257,h=km(Error(n(422))),td(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=pd({mode:"visible",children:h.children},E,0,null),T=Ls(T,E,x,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&zo(o,i.child,null,x),o.child.memoizedState=Rm(x),o.memoizedState=Im,T);if((o.mode&1)===0)return td(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var L=h.dgst;return h=L,T=Error(n(419)),h=km(T,h,void 0),td(i,o,x,h)}if(L=(x&i.childLanes)!==0,Un||L){if(h=Zt,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,hi(i,E),Cr(h,i,E,-1))}return Km(),h=km(Error(n(421))),td(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=l7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Xn=Mi(E.nextSibling),Wn=o,At=!0,Sr=null,i!==null&&(sr[or++]=di,sr[or++]=fi,sr[or++]=As,di=i.id,fi=i.overflow,As=o),o=Lm(o,h.children),o.flags|=4096,o)}function Qx(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),dm(i.return,o,l)}function Dm(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function Jx(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(kn(i,o,h.children,l),h=kt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Qx(i,l,o);else if(i.tag===19)Qx(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Et(kt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Wc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Dm(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Wc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Dm(o,!0,l,null,T);break;case"together":Dm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function nd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function mi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Ps|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Gi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Gi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function QB(i,o,l){switch(o.tag){case 3:Wx(o),Ho();break;case 5:fx(o);break;case 1:Bn(o.type)&&Bc(o);break;case 4:pm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;Et(Vc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(Et(kt,kt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Kx(i,o,l):(Et(kt,kt.current&1),i=mi(i,o,l),i!==null?i.sibling:null);Et(kt,kt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Jx(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Et(kt,kt.current),h)break;return null;case 22:case 23:return o.lanes=0,qx(i,o,l)}return mi(i,o,l)}var Zx,Mm,e2,t2;Zx=function(i,o){for(var l=o.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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Mm=function(){},e2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,ks(Gr.current);var T=null;switch(l){case"input":E=ir(i,E),h=ir(i,h),T=[];break;case"select":E=k({},E,{value:void 0}),h=k({},h,{value:void 0}),T=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Dc)}an(l,h);var x;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var L=E[Z];for(x in L)L.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var H=h[Z];if(L=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&H!==L&&(H!=null||L!=null))if(Z==="style")if(L){for(x in L)!L.hasOwnProperty(x)||H&&H.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in H)H.hasOwnProperty(x)&&L[x]!==H[x]&&(l||(l={}),l[x]=H[x])}else l||(T||(T=[]),T.push(Z,l)),l=H;else Z==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,L=L?L.__html:void 0,H!=null&&L!==H&&(T=T||[]).push(Z,H)):Z==="children"?typeof H!="string"&&typeof H!="number"||(T=T||[]).push(Z,""+H):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(H!=null&&Z==="onScroll"&&bt("scroll",i),T||L===H||(T=[])):(T=T||[]).push(Z,H))}l&&(T=T||[]).push("style",l);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},t2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Nu(i,o){if(!At)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.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?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Sn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function JB(i,o,l){var h=o.pendingProps;switch(im(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sn(o),null;case 1:return Bn(o.type)&&Fc(),Sn(o),null;case 3:return h=o.stateNode,Vo(),_t(Fn),_t(bn),Em(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(jc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sr!==null&&(Gm(Sr),Sr=null))),Mm(i,o),Sn(o),null;case 5:mm(o);var E=ks(wu.current);if(l=o.type,i!==null&&o.stateNode!=null)e2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return Sn(o),null}if(i=ks(Gr.current),jc(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Yr]=o,h[Tu]=T,i=(o.mode&1)!==0,l){case"dialog":bt("cancel",h),bt("close",h);break;case"iframe":case"object":case"embed":bt("load",h);break;case"video":case"audio":for(E=0;E<gu.length;E++)bt(gu[E],h);break;case"source":bt("error",h);break;case"img":case"image":case"link":bt("error",h),bt("load",h);break;case"details":bt("toggle",h);break;case"input":Qt(h,T),bt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},bt("invalid",h);break;case"textarea":Me(h,T),bt("invalid",h)}an(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var L=T[x];x==="children"?typeof L=="string"?h.textContent!==L&&(T.suppressHydrationWarning!==!0&&Lc(h.textContent,L,i),E=["children",L]):typeof L=="number"&&h.textContent!==""+L&&(T.suppressHydrationWarning!==!0&&Lc(h.textContent,L,i),E=["children",""+L]):s.hasOwnProperty(x)&&L!=null&&x==="onScroll"&&bt("scroll",h)}switch(l){case"input":Cn(h),vn(h,T,!0);break;case"textarea":Cn(h),ht(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Dc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Yr]=o,i[Tu]=h,Zx(i,o,!1,!1),o.stateNode=i;e:{switch(x=Vr(l,h),l){case"dialog":bt("cancel",i),bt("close",i),E=h;break;case"iframe":case"object":case"embed":bt("load",i),E=h;break;case"video":case"audio":for(E=0;E<gu.length;E++)bt(gu[E],i);E=h;break;case"source":bt("error",i),E=h;break;case"img":case"image":case"link":bt("error",i),bt("load",i),E=h;break;case"details":bt("toggle",i),E=h;break;case"input":Qt(i,h),E=ir(i,h),bt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=k({},h,{value:void 0}),bt("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),bt("invalid",i);break;default:E=h}an(l,E),L=E;for(T in L)if(L.hasOwnProperty(T)){var H=L[T];T==="style"?on(i,H):T==="dangerouslySetInnerHTML"?(H=H?H.__html:void 0,H!=null&&Ve(i,H)):T==="children"?typeof H=="string"?(l!=="textarea"||H!=="")&&Ie(i,H):typeof H=="number"&&Ie(i,""+H):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?H!=null&&T==="onScroll"&&bt("scroll",i):H!=null&&C(i,T,H,x))}switch(l){case"input":Cn(i),vn(i,h,!1);break;case"textarea":Cn(i),ht(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ue(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?we(i,!!h.multiple,T,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Dc)}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&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Sn(o),null;case 6:if(i&&o.stateNode!=null)t2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=ks(wu.current),ks(Gr.current),jc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Yr]=o,(T=h.nodeValue!==l)&&(i=Wn,i!==null))switch(i.tag){case 3:Lc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Lc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Yr]=o,o.stateNode=h}return Sn(o),null;case 13:if(_t(kt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Xn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)ix(),Ho(),o.flags|=98560,T=!1;else if(T=jc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Yr]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Sn(o),T=!1}else Sr!==null&&(Gm(Sr),Sr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(kt.current&1)!==0?qt===0&&(qt=3):Km())),o.updateQueue!==null&&(o.flags|=4),Sn(o),null);case 4:return Vo(),Mm(i,o),i===null&&Eu(o.stateNode.containerInfo),Sn(o),null;case 10:return cm(o.type._context),Sn(o),null;case 17:return Bn(o.type)&&Fc(),Sn(o),null;case 19:if(_t(kt),T=o.memoizedState,T===null)return Sn(o),null;if(h=(o.flags&128)!==0,x=T.rendering,x===null)if(h)Nu(T,!1);else{if(qt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Wc(i),x!==null){for(o.flags|=128,Nu(T,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,x=T.alternate,x===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=x.childLanes,T.lanes=x.lanes,T.child=x.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=x.memoizedProps,T.memoizedState=x.memoizedState,T.updateQueue=x.updateQueue,T.type=x.type,i=x.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return Et(kt,kt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Rt()>Wo&&(o.flags|=128,h=!0,Nu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Wc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Nu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!At)return Sn(o),null}else 2*Rt()-T.renderingStartTime>Wo&&l!==1073741824&&(o.flags|=128,h=!0,Nu(T,!1),o.lanes=4194304);T.isBackwards?(x.sibling=o.child,o.child=x):(l=T.last,l!==null?l.sibling=x:o.child=x,T.last=x)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Rt(),o.sibling=null,l=kt.current,Et(kt,h?l&1|2:l&1),o):(Sn(o),null);case 22:case 23:return Xm(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Kn&1073741824)!==0&&(Sn(o),o.subtreeFlags&6&&(o.flags|=8192)):Sn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function ZB(i,o){switch(im(o),o.tag){case 1:return Bn(o.type)&&Fc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Vo(),_t(Fn),_t(bn),Em(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return mm(o),null;case 13:if(_t(kt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return _t(kt),null;case 4:return Vo(),null;case 10:return cm(o.type._context),null;case 22:case 23:return Xm(),null;case 24:return null;default:return null}}var rd=!1,xn=!1,e7=typeof WeakSet=="function"?WeakSet:Set,ke=null;function Yo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Pt(i,o,h)}else l.current=null}function Fm(i,o,l){try{l()}catch(h){Pt(i,o,h)}}var n2=!1;function t7(i,o){if(Xp=xc,i=LS(),zp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var x=0,L=-1,H=-1,Z=0,ce=0,pe=i,ue=null;t:for(;;){for(var Ae;pe!==l||E!==0&&pe.nodeType!==3||(L=x+E),pe!==T||h!==0&&pe.nodeType!==3||(H=x+h),pe.nodeType===3&&(x+=pe.nodeValue.length),(Ae=pe.firstChild)!==null;)ue=pe,pe=Ae;for(;;){if(pe===i)break t;if(ue===l&&++Z===E&&(L=x),ue===T&&++ce===h&&(H=x),(Ae=pe.nextSibling)!==null)break;pe=ue,ue=pe.parentNode}pe=Ae}l=L===-1||H===-1?null:{start:L,end:H}}else l=null}l=l||{start:0,end:0}}else l=null;for(Kp={focusedElem:i,selectionRange:l},xc=!1,ke=o;ke!==null;)if(o=ke,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,ke=i;else for(;ke!==null;){o=ke;try{var Ne=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(Ne!==null){var Oe=Ne.memoizedProps,Lt=Ne.memoizedState,W=o.stateNode,j=W.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:xr(o.type,Oe),Lt);W.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){Pt(o,o.return,Te)}if(i=o.sibling,i!==null){i.return=o.return,ke=i;break}ke=o.return}return Ne=n2,n2=!1,Ne}function Pu(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Fm(o,l,T)}E=E.next}while(E!==h)}}function id(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Bm(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function r2(i){var o=i.alternate;o!==null&&(i.alternate=null,r2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Yr],delete o[Tu],delete o[em],delete o[FB],delete o[BB])),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 i2(i){return i.tag===5||i.tag===3||i.tag===4}function s2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||i2(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 Um(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Dc));else if(h!==4&&(i=i.child,i!==null))for(Um(i,o,l),i=i.sibling;i!==null;)Um(i,o,l),i=i.sibling}function Hm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(Hm(i,o,l),i=i.sibling;i!==null;)Hm(i,o,l),i=i.sibling}var un=null,wr=!1;function ji(i,o,l){for(l=l.child;l!==null;)o2(i,o,l),l=l.sibling}function o2(i,o,l){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Ec,l)}catch(L){}switch(l.tag){case 5:xn||Yo(l,o);case 6:var h=un,E=wr;un=null,ji(i,o,l),un=h,wr=E,un!==null&&(wr?(i=un,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):un.removeChild(l.stateNode));break;case 18:un!==null&&(wr?(i=un,l=l.stateNode,i.nodeType===8?Zp(i.parentNode,l):i.nodeType===1&&Zp(i,l),uu(i)):Zp(un,l.stateNode));break;case 4:h=un,E=wr,un=l.stateNode.containerInfo,wr=!0,ji(i,o,l),un=h,wr=E;break;case 0:case 11:case 14:case 15:if(!xn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,x=T.destroy;T=T.tag,x!==void 0&&((T&2)!==0||(T&4)!==0)&&Fm(l,o,x),E=E.next}while(E!==h)}ji(i,o,l);break;case 1:if(!xn&&(Yo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(L){Pt(l,o,L)}ji(i,o,l);break;case 21:ji(i,o,l);break;case 22:l.mode&1?(xn=(h=xn)||l.memoizedState!==null,ji(i,o,l),xn=h):ji(i,o,l);break;default:ji(i,o,l)}}function a2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new e7),o.forEach(function(h){var E=c7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Ar(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,x=o,L=x;e:for(;L!==null;){switch(L.tag){case 5:un=L.stateNode,wr=!1;break e;case 3:un=L.stateNode.containerInfo,wr=!0;break e;case 4:un=L.stateNode.containerInfo,wr=!0;break e}L=L.return}if(un===null)throw Error(n(160));o2(T,x,E),un=null,wr=!1;var H=E.alternate;H!==null&&(H.return=null),E.return=null}catch(Z){Pt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)u2(o,i),o=o.sibling}function u2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ar(o,i),Xr(i),h&4){try{Pu(3,i,i.return),id(3,i)}catch(Oe){Pt(i,i.return,Oe)}try{Pu(5,i,i.return)}catch(Oe){Pt(i,i.return,Oe)}}break;case 1:Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return);break;case 5:if(Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){Pt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,L=i.type,H=i.updateQueue;if(i.updateQueue=null,H!==null)try{L==="input"&&T.type==="radio"&&T.name!=null&&$e(E,T),Vr(L,x);var Z=Vr(L,T);for(x=0;x<H.length;x+=2){var ce=H[x],pe=H[x+1];ce==="style"?on(E,pe):ce==="dangerouslySetInnerHTML"?Ve(E,pe):ce==="children"?Ie(E,pe):C(E,ce,pe,Z)}switch(L){case"input":vt(E,T);break;case"textarea":rt(E,T);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Ae=T.value;Ae!=null?we(E,!!T.multiple,Ae,!1):ue!==!!T.multiple&&(T.defaultValue!=null?we(E,!!T.multiple,T.defaultValue,!0):we(E,!!T.multiple,T.multiple?[]:"",!1))}E[Tu]=T}catch(Oe){Pt(i,i.return,Oe)}}break;case 6:if(Ar(o,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Oe){Pt(i,i.return,Oe)}}break;case 3:if(Ar(o,i),Xr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{uu(o.containerInfo)}catch(Oe){Pt(i,i.return,Oe)}break;case 4:Ar(o,i),Xr(i);break;case 13:Ar(o,i),Xr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||($m=Rt())),h&4&&a2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(xn=(Z=xn)||ce,Ar(o,i),xn=Z):Ar(o,i),Xr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(ke=i,ce=i.child;ce!==null;){for(pe=ke=ce;ke!==null;){switch(ue=ke,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Pu(4,ue,ue.return);break;case 1:Yo(ue,ue.return);var Ne=ue.stateNode;if(typeof Ne.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,Ne.props=o.memoizedProps,Ne.state=o.memoizedState,Ne.componentWillUnmount()}catch(Oe){Pt(h,l,Oe)}}break;case 5:Yo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){d2(pe);continue}}Ae!==null?(Ae.return=ue,ke=Ae):d2(pe)}ce=ce.sibling}e:for(ce=null,pe=i;;){if(pe.tag===5){if(ce===null){ce=pe;try{E=pe.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(L=pe.stateNode,H=pe.memoizedProps.style,x=H!=null&&H.hasOwnProperty("display")?H.display:null,L.style.display=Ut("display",x))}catch(Oe){Pt(i,i.return,Oe)}}}else if(pe.tag===6){if(ce===null)try{pe.stateNode.nodeValue=Z?"":pe.memoizedProps}catch(Oe){Pt(i,i.return,Oe)}}else if((pe.tag!==22&&pe.tag!==23||pe.memoizedState===null||pe===i)&&pe.child!==null){pe.child.return=pe,pe=pe.child;continue}if(pe===i)break e;for(;pe.sibling===null;){if(pe.return===null||pe.return===i)break e;ce===pe&&(ce=null),pe=pe.return}ce===pe&&(ce=null),pe.sibling.return=pe.return,pe=pe.sibling}}break;case 19:Ar(o,i),Xr(i),h&4&&a2(i);break;case 21:break;default:Ar(o,i),Xr(i)}}function Xr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(i2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var T=s2(i);Hm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,L=s2(i);Um(i,L,x);break;default:throw Error(n(161))}}catch(H){Pt(i,i.return,H)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function n7(i,o,l){ke=i,l2(i)}function l2(i,o,l){for(var h=(i.mode&1)!==0;ke!==null;){var E=ke,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||rd;if(!x){var L=E.alternate,H=L!==null&&L.memoizedState!==null||xn;L=rd;var Z=xn;if(rd=x,(xn=H)&&!Z)for(ke=E;ke!==null;)x=ke,H=x.child,x.tag===22&&x.memoizedState!==null?f2(E):H!==null?(H.return=x,ke=H):f2(E);for(;T!==null;)ke=T,l2(T),T=T.sibling;ke=E,rd=L,xn=Z}c2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,ke=T):c2(i)}}function c2(i){for(;ke!==null;){var o=ke;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||id(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:xr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&dx(o,T,h);break;case 3:var x=o.updateQueue;if(x!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}dx(o,x,l)}break;case 5:var L=o.stateNode;if(l===null&&o.flags&4){l=L;var H=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":H.autoFocus&&l.focus();break;case"img":H.src&&(l.src=H.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ce=Z.memoizedState;if(ce!==null){var pe=ce.dehydrated;pe!==null&&uu(pe)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&Bm(o)}catch(ue){Pt(o,o.return,ue)}}if(o===i){ke=null;break}if(l=o.sibling,l!==null){l.return=o.return,ke=l;break}ke=o.return}}function d2(i){for(;ke!==null;){var o=ke;if(o===i){ke=null;break}var l=o.sibling;if(l!==null){l.return=o.return,ke=l;break}ke=o.return}}function f2(i){for(;ke!==null;){var o=ke;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{id(4,o)}catch(H){Pt(o,l,H)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(H){Pt(o,E,H)}}var T=o.return;try{Bm(o)}catch(H){Pt(o,T,H)}break;case 5:var x=o.return;try{Bm(o)}catch(H){Pt(o,x,H)}}}catch(H){Pt(o,o.return,H)}if(o===i){ke=null;break}var L=o.sibling;if(L!==null){L.return=o.return,ke=L;break}ke=o.return}}var r7=Math.ceil,sd=U.ReactCurrentDispatcher,zm=U.ReactCurrentOwner,lr=U.ReactCurrentBatchConfig,it=0,Zt=null,Ht=null,ln=0,Kn=0,Go=Fi(0),qt=0,Ou=null,Ps=0,od=0,jm=0,Iu=null,Hn=null,$m=0,Wo=1/0,gi=null,ad=!1,Vm=null,$i=null,ud=!1,Vi=null,ld=0,Ru=0,qm=null,cd=-1,dd=0;function Nn(){return(it&6)!==0?Rt():cd!==-1?cd:cd=Rt()}function qi(i){return(i.mode&1)===0?1:(it&2)!==0&&ln!==0?ln&-ln:HB.transition!==null?(dd===0&&(dd=sS()),dd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:pS(i.type)),i)}function Cr(i,o,l,h){if(50<Ru)throw Ru=0,qm=null,Error(n(185));ru(i,l,h),((it&2)===0||i!==Zt)&&(i===Zt&&((it&2)===0&&(od|=l),qt===4&&Yi(i,ln)),zn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Wo=Rt()+500,Uc&&Ui()))}function zn(i,o){var l=i.callbackNode;H9(i,o);var h=bc(i,i===Zt?ln:0);if(h===0)l!==null&&nS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&nS(l),o===1)i.tag===0?UB(p2.bind(null,i)):ZS(p2.bind(null,i)),DB(function(){(it&6)===0&&Ui()}),l=null;else{switch(oS(h)){case 1:l=wp;break;case 4:l=rS;break;case 16:l=gc;break;case 536870912:l=iS;break;default:l=gc}l=S2(l,h2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function h2(i,o){if(cd=-1,dd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Xo()&&i.callbackNode!==l)return null;var h=bc(i,i===Zt?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=fd(i,h);else{o=h;var E=it;it|=2;var T=g2();(Zt!==i||ln!==o)&&(gi=null,Wo=Rt()+500,Is(i,o));do try{o7();break}catch(L){m2(i,L)}while(!0);lm(),sd.current=T,it=E,Ht!==null?o=0:(Zt=null,ln=0,o=qt)}if(o!==0){if(o===2&&(E=Ap(i),E!==0&&(h=E,o=Ym(i,E))),o===1)throw l=Ou,Is(i,0),Yi(i,h),zn(i,Rt()),l;if(o===6)Yi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!i7(E)&&(o=fd(i,h),o===2&&(T=Ap(i),T!==0&&(h=T,o=Ym(i,T))),o===1))throw l=Ou,Is(i,0),Yi(i,h),zn(i,Rt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Rs(i,Hn,gi);break;case 3:if(Yi(i,h),(h&130023424)===h&&(o=$m+500-Rt(),10<o)){if(bc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){Nn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Jp(Rs.bind(null,i,Hn,gi),o);break}Rs(i,Hn,gi);break;case 4:if(Yi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-br(h);T=1<<x,x=o[x],x>E&&(E=x),h&=~T}if(h=E,h=Rt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*r7(h/1960))-h,10<h){i.timeoutHandle=Jp(Rs.bind(null,i,Hn,gi),h);break}Rs(i,Hn,gi);break;case 5:Rs(i,Hn,gi);break;default:throw Error(n(329))}}}return zn(i,Rt()),i.callbackNode===l?h2.bind(null,i):null}function Ym(i,o){var l=Iu;return i.current.memoizedState.isDehydrated&&(Is(i,o).flags|=256),i=fd(i,o),i!==2&&(o=Hn,Hn=l,o!==null&&Gm(o)),i}function Gm(i){Hn===null?Hn=i:Hn.push.apply(Hn,i)}function i7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!_r(T(),E))return!1}catch(x){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Yi(i,o){for(o&=~jm,o&=~od,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-br(o),h=1<<l;i[l]=-1,o&=~h}}function p2(i){if((it&6)!==0)throw Error(n(327));Xo();var o=bc(i,0);if((o&1)===0)return zn(i,Rt()),null;var l=fd(i,o);if(i.tag!==0&&l===2){var h=Ap(i);h!==0&&(o=h,l=Ym(i,h))}if(l===1)throw l=Ou,Is(i,0),Yi(i,o),zn(i,Rt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Rs(i,Hn,gi),zn(i,Rt()),null}function Wm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Wo=Rt()+500,Uc&&Ui())}}function Os(i){Vi!==null&&Vi.tag===0&&(it&6)===0&&Xo();var o=it;it|=1;var l=lr.transition,h=ct;try{if(lr.transition=null,ct=1,i)return i()}finally{ct=h,lr.transition=l,it=o,(it&6)===0&&Ui()}}function Xm(){Kn=Go.current,_t(Go)}function Is(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,LB(l)),Ht!==null)for(l=Ht.return;l!==null;){var h=l;switch(im(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Fc();break;case 3:Vo(),_t(Fn),_t(bn),Em();break;case 5:mm(h);break;case 4:Vo();break;case 13:_t(kt);break;case 19:_t(kt);break;case 10:cm(h.type._context);break;case 22:case 23:Xm()}l=l.return}if(Zt=i,Ht=i=Gi(i.current,null),ln=Kn=o,qt=0,Ou=null,jm=od=Ps=0,Hn=Iu=null,vs!==null){for(o=0;o<vs.length;o++)if(l=vs[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var x=T.next;T.next=E,h.next=x}l.pending=h}vs=null}return i}function m2(i,o){do{var l=Ht;try{if(lm(),Xc.current=Zc,Kc){for(var h=Nt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Kc=!1}if(Ns=0,Jt=Vt=Nt=null,Au=!1,Cu=0,zm.current=null,l===null||l.return===null){qt=1,Ou=o,Ht=null;break}e:{var T=i,x=l.return,L=l,H=o;if(o=ln,L.flags|=32768,H!==null&&typeof H=="object"&&typeof H.then=="function"){var Z=H,ce=L,pe=ce.tag;if((ce.mode&1)===0&&(pe===0||pe===11||pe===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=Hx(x);if(Ae!==null){Ae.flags&=-257,zx(Ae,x,L,T,o),Ae.mode&1&&Ux(T,Z,o),o=Ae,H=Z;var Ne=o.updateQueue;if(Ne===null){var Oe=new Set;Oe.add(H),o.updateQueue=Oe}else Ne.add(H);break e}else{if((o&1)===0){Ux(T,Z,o),Km();break e}H=Error(n(426))}}else if(At&&L.mode&1){var Lt=Hx(x);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),zx(Lt,x,L,T,o),am(qo(H,L));break e}}T=H=qo(H,L),qt!==4&&(qt=2),Iu===null?Iu=[T]:Iu.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var W=Fx(T,H,o);cx(T,W);break e;case 1:L=H;var j=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&($i===null||!$i.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var Te=Bx(T,L,o);cx(T,Te);break e}}T=T.return}while(T!==null)}y2(l)}catch(De){o=De,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function g2(){var i=sd.current;return sd.current=Zc,i===null?Zc:i}function Km(){(qt===0||qt===3||qt===2)&&(qt=4),Zt===null||(Ps&268435455)===0&&(od&268435455)===0||Yi(Zt,ln)}function fd(i,o){var l=it;it|=2;var h=g2();(Zt!==i||ln!==o)&&(gi=null,Is(i,o));do try{s7();break}catch(E){m2(i,E)}while(!0);if(lm(),it=l,sd.current=h,Ht!==null)throw Error(n(261));return Zt=null,ln=0,qt}function s7(){for(;Ht!==null;)E2(Ht)}function o7(){for(;Ht!==null&&!O9();)E2(Ht)}function E2(i){var o=_2(i.alternate,i,Kn);i.memoizedProps=i.pendingProps,o===null?y2(i):Ht=o,zm.current=null}function y2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=JB(l,o,Kn),l!==null){Ht=l;return}}else{if(l=ZB(l,o),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{qt=6,Ht=null;return}}if(o=o.sibling,o!==null){Ht=o;return}Ht=o=i}while(o!==null);qt===0&&(qt=5)}function Rs(i,o,l){var h=ct,E=lr.transition;try{lr.transition=null,ct=1,a7(i,o,l,h)}finally{lr.transition=E,ct=h}return null}function a7(i,o,l,h){do Xo();while(Vi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(z9(i,T),i===Zt&&(Ht=Zt=null,ln=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ud||(ud=!0,S2(gc,function(){return Xo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=lr.transition,lr.transition=null;var x=ct;ct=1;var L=it;it|=4,zm.current=null,t7(i,l),u2(l,i),vB(Kp),xc=!!Xp,Kp=Xp=null,i.current=l,n7(l),I9(),it=L,ct=x,lr.transition=T}else i.current=l;if(ud&&(ud=!1,Vi=i,ld=E),T=i.pendingLanes,T===0&&($i=null),D9(l.stateNode),zn(i,Rt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ad)throw ad=!1,i=Vm,Vm=null,i;return(ld&1)!==0&&i.tag!==0&&Xo(),T=i.pendingLanes,(T&1)!==0?i===qm?Ru++:(Ru=0,qm=i):Ru=0,Ui(),null}function Xo(){if(Vi!==null){var i=oS(ld),o=lr.transition,l=ct;try{if(lr.transition=null,ct=16>i?16:i,Vi===null)var h=!1;else{if(i=Vi,Vi=null,ld=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,ke=i.current;ke!==null;){var T=ke,x=T.child;if((ke.flags&16)!==0){var L=T.deletions;if(L!==null){for(var H=0;H<L.length;H++){var Z=L[H];for(ke=Z;ke!==null;){var ce=ke;switch(ce.tag){case 0:case 11:case 15:Pu(8,ce,T)}var pe=ce.child;if(pe!==null)pe.return=ce,ke=pe;else for(;ke!==null;){ce=ke;var ue=ce.sibling,Ae=ce.return;if(r2(ce),ce===Z){ke=null;break}if(ue!==null){ue.return=Ae,ke=ue;break}ke=Ae}}}var Ne=T.alternate;if(Ne!==null){var Oe=Ne.child;if(Oe!==null){Ne.child=null;do{var Lt=Oe.sibling;Oe.sibling=null,Oe=Lt}while(Oe!==null)}}ke=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,ke=x;else e:for(;ke!==null;){if(T=ke,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Pu(9,T,T.return)}var W=T.sibling;if(W!==null){W.return=T.return,ke=W;break e}ke=T.return}}var j=i.current;for(ke=j;ke!==null;){x=ke;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,ke=K;else e:for(x=j;ke!==null;){if(L=ke,(L.flags&2048)!==0)try{switch(L.tag){case 0:case 11:case 15:id(9,L)}}catch(De){Pt(L,L.return,De)}if(L===x){ke=null;break e}var Te=L.sibling;if(Te!==null){Te.return=L.return,ke=Te;break e}ke=L.return}}if(it=E,Ui(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Ec,i)}catch(De){}h=!0}return h}finally{ct=l,lr.transition=o}}return!1}function T2(i,o,l){o=qo(l,o),o=Fx(i,o,1),i=zi(i,o,1),o=Nn(),i!==null&&(ru(i,1,o),zn(i,o))}function Pt(i,o,l){if(i.tag===3)T2(i,i,l);else for(;o!==null;){if(o.tag===3){T2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($i===null||!$i.has(h))){i=qo(l,i),i=Bx(o,i,1),o=zi(o,i,1),i=Nn(),o!==null&&(ru(o,1,i),zn(o,i));break}}o=o.return}}function u7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=Nn(),i.pingedLanes|=i.suspendedLanes&l,Zt===i&&(ln&l)===l&&(qt===4||qt===3&&(ln&130023424)===ln&&500>Rt()-$m?Is(i,0):jm|=l),zn(i,o)}function b2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Tc,Tc<<=1,(Tc&130023424)===0&&(Tc=4194304)));var l=Nn();i=hi(i,o),i!==null&&(ru(i,o,l),zn(i,l))}function l7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),b2(i,l)}function c7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),b2(i,l)}var _2;_2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Fn.current)Un=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Un=!1,QB(i,o,l);Un=(i.flags&131072)!==0}else Un=!1,At&&(o.flags&1048576)!==0&&ex(o,zc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;nd(i,o),i=o.pendingProps;var E=Fo(o,bn.current);$o(o,l),E=bm(null,o,h,i,E,l);var T=_m();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Bn(h)?(T=!0,Bc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,hm(o),E.updater=ed,o.stateNode=E,E._reactInternals=o,vm(o,h,i,l),o=Om(null,o,h,!0,T,l)):(o.tag=0,At&&T&&rm(o),kn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(nd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=f7(h),i=xr(h,i),E){case 0:o=Pm(null,o,h,i,l);break e;case 1:o=Gx(null,o,h,i,l);break e;case 11:o=jx(null,o,h,i,l);break e;case 14:o=$x(null,o,h,xr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Pm(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Gx(i,o,h,E,l);case 3:e:{if(Wx(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,lx(i,o),Gc(o,h,null,l);var x=o.memoizedState;if(h=x.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=qo(Error(n(423)),o),o=Xx(i,o,h,l,E);break e}else if(h!==E){E=qo(Error(n(424)),o),o=Xx(i,o,h,l,E);break e}else for(Xn=Mi(o.stateNode.containerInfo.firstChild),Wn=o,At=!0,Sr=null,l=ax(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ho(),h===E){o=mi(i,o,l);break e}kn(i,o,h,l)}o=o.child}return o;case 5:return fx(o),i===null&&om(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,Qp(h,E)?x=null:T!==null&&Qp(h,T)&&(o.flags|=32),Yx(i,o),kn(i,o,x,l),o.child;case 6:return i===null&&om(o),null;case 13:return Kx(i,o,l);case 4:return pm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=zo(o,null,h,l):kn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),jx(i,o,h,E,l);case 7:return kn(i,o,o.pendingProps,l),o.child;case 8:return kn(i,o,o.pendingProps.children,l),o.child;case 12:return kn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,x=E.value,Et(Vc,h._currentValue),h._currentValue=x,T!==null)if(_r(T.value,x)){if(T.children===E.children&&!Fn.current){o=mi(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var L=T.dependencies;if(L!==null){x=T.child;for(var H=L.firstContext;H!==null;){if(H.context===h){if(T.tag===1){H=pi(-1,l&-l),H.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?H.next=H:(H.next=ce.next,ce.next=H),Z.pending=H}}T.lanes|=l,H=T.alternate,H!==null&&(H.lanes|=l),dm(T.return,l,o),L.lanes|=l;break}H=H.next}}else if(T.tag===10)x=T.type===o.type?null:T.child;else if(T.tag===18){if(x=T.return,x===null)throw Error(n(341));x.lanes|=l,L=x.alternate,L!==null&&(L.lanes|=l),dm(x,l,o),x=T.sibling}else x=T.child;if(x!==null)x.return=T;else for(x=T;x!==null;){if(x===o){x=null;break}if(T=x.sibling,T!==null){T.return=x.return,x=T;break}x=x.return}T=x}kn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,$o(o,l),E=ar(E),h=h(E),o.flags|=1,kn(i,o,h,l),o.child;case 14:return h=o.type,E=xr(h,o.pendingProps),E=xr(h.type,E),$x(i,o,h,E,l);case 15:return Vx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),nd(i,o),o.tag=1,Bn(h)?(i=!0,Bc(o)):i=!1,$o(o,l),Dx(o,h,E),vm(o,h,E,l),Om(null,o,h,!0,i,l);case 19:return Jx(i,o,l);case 22:return qx(i,o,l)}throw Error(n(156,o.tag))};function S2(i,o){return tS(i,o)}function d7(i,o,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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cr(i,o,l,h){return new d7(i,o,l,h)}function Qm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function f7(i){if(typeof i=="function")return Qm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===he)return 11;if(i===oe)return 14}return 2}function Gi(i,o){var l=i.alternate;return l===null?(l=cr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,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,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function hd(i,o,l,h,E,T){var x=2;if(h=i,typeof i=="function")Qm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Ls(l.children,E,T,o);case ne:x=8,E|=8;break;case me:return i=cr(12,l,o,E|2),i.elementType=me,i.lanes=T,i;case ve:return i=cr(13,l,o,E),i.elementType=ve,i.lanes=T,i;case re:return i=cr(19,l,o,E),i.elementType=re,i.lanes=T,i;case ae:return pd(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:x=10;break e;case se:x=9;break e;case he:x=11;break e;case oe:x=14;break e;case xe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=cr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ls(i,o,l,h){return i=cr(7,i,h,o),i.lanes=l,i}function pd(i,o,l,h){return i=cr(22,i,h,o),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function Jm(i,o,l){return i=cr(6,i,null,o),i.lanes=l,i}function Zm(i,o,l){return o=cr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function h7(i,o,l,h,E){this.tag=o,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=Cp(0),this.expirationTimes=Cp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Cp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function e0(i,o,l,h,E,T,x,L,H){return i=new h7(i,o,l,L,H),o===1?(o=1,T===!0&&(o|=8)):o=0,T=cr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},hm(T),i}function p7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:R,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function x2(i){if(!i)return Bi;i=i._reactInternals;e:{if(Ss(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Bn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Bn(l))return QS(i,l,o)}return o}function w2(i,o,l,h,E,T,x,L,H){return i=e0(l,h,!0,i,E,T,x,L,H),i.context=x2(null),l=i.current,h=Nn(),E=qi(l),T=pi(h,E),T.callback=o!=null?o:null,zi(l,T,E),i.current.lanes=E,ru(i,E,h),zn(i,h),i}function md(i,o,l,h){var E=o.current,T=Nn(),x=qi(E);return l=x2(l),o.context===null?o.context=l:o.pendingContext=l,o=pi(T,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=zi(E,o,x),i!==null&&(Cr(i,E,x,T),Yc(i,E,x)),x}function gd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function A2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function t0(i,o){A2(i,o),(i=i.alternate)&&A2(i,o)}function m7(){return null}var C2=typeof reportError=="function"?reportError:function(i){console.error(i)};function n0(i){this._internalRoot=i}Ed.prototype.render=n0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));md(i,o,null,null)},Ed.prototype.unmount=n0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Os(function(){md(null,i,null,null)}),o[li]=null}};function Ed(i){this._internalRoot=i}Ed.prototype.unstable_scheduleHydration=function(i){if(i){var o=lS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ri.length&&o!==0&&o<Ri[l].priority;l++);Ri.splice(l,0,i),l===0&&fS(i)}};function r0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function yd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function v2(){}function g7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=gd(x);T.call(Z)}}var x=w2(o,h,i,0,null,!1,!1,"",v2);return i._reactRootContainer=x,i[li]=x.current,Eu(i.nodeType===8?i.parentNode:i),Os(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var L=h;h=function(){var Z=gd(H);L.call(Z)}}var H=e0(i,0,!1,null,null,!1,!1,"",v2);return i._reactRootContainer=H,i[li]=H.current,Eu(i.nodeType===8?i.parentNode:i),Os(function(){md(o,H,l,h)}),H}function Td(i,o,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var L=E;E=function(){var H=gd(x);L.call(H)}}md(o,x,i,E)}else x=g7(l,o,i,E,h);return gd(x)}aS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=nu(o.pendingLanes);l!==0&&(vp(o,l|1),zn(o,Rt()),(it&6)===0&&(Wo=Rt()+500,Ui()))}break;case 13:Os(function(){var h=hi(i,1);if(h!==null){var E=Nn();Cr(h,i,1,E)}}),t0(i,1)}},kp=function(i){if(i.tag===13){var o=hi(i,134217728);if(o!==null){var l=Nn();Cr(o,i,134217728,l)}t0(i,134217728)}},uS=function(i){if(i.tag===13){var o=qi(i),l=hi(i,o);if(l!==null){var h=Nn();Cr(l,i,o,h)}t0(i,o)}},lS=function(){return ct},cS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},bp=function(i,o,l){switch(o){case"input":if(vt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Mc(h);if(!E)throw Error(n(90));rn(h),vt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},W_=Wm,X_=Os;var E7={usingClientEntryPoint:!1,Events:[bu,Do,Mc,Y_,G_,Wm]},Lu={findFiberByHostInstance:xs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},y7={bundleType:Lu.bundleType,version:Lu.version,rendererPackageName:Lu.rendererPackageName,rendererConfig:Lu.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=Z_(i),i===null?null:i.stateNode},findFiberByHostInstance:Lu.findFiberByHostInstance||m7,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 bd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bd.isDisabled&&bd.supportsFiber)try{Ec=bd.inject(y7),qr=bd}catch(i){}}return On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=E7,On.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!r0(o))throw Error(n(200));return p7(i,o,null,l)},On.createRoot=function(i,o){if(!r0(i))throw Error(n(299));var l=!1,h="",E=C2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=e0(i,1,!1,null,null,l,!1,h,E),i[li]=o.current,Eu(i.nodeType===8?i.parentNode:i),new n0(o)},On.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=Z_(o),i=i===null?null:i.stateNode,i},On.flushSync=function(i){return Os(i)},On.hydrate=function(i,o,l){if(!yd(o))throw Error(n(200));return Td(null,i,o,!0,l)},On.hydrateRoot=function(i,o,l){if(!r0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=C2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=w2(o,null,i,1,l!=null?l:null,E,!1,T,x),i[li]=o.current,Eu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new Ed(o)},On.render=function(i,o,l){if(!yd(o))throw Error(n(200));return Td(null,i,o,!1,l)},On.unmountComponentAtNode=function(i){if(!yd(i))throw Error(n(40));return i._reactRootContainer?(Os(function(){Td(null,null,i,!1,function(){i._reactRootContainer=null,i[li]=null})}),!0):!1},On.unstable_batchedUpdates=Wm,On.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!yd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Td(i,o,l,!1,h)},On.version="18.3.1-next-f1338f8080-20240426",On}var y1;function T1(){if(y1)return _f.exports;y1=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(),_f.exports=Tk(),_f.exports}var Ws=T1();function b1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=b1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=b1(e))&&(r&&(r+=" "),r+=t);return r}var _1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},S1=Ki.createContext&&Ki.createContext(_1),bk=["attr","size","title"];function _k(e,t){if(e==null)return{};var n=Sk(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function Sk(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 fl(){return fl=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},fl.apply(this,arguments)}function x1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function hl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?x1(Object(n),!0).forEach(function(r){xk(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):x1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function xk(e,t,n){return t=wk(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function wk(e){var t=Ak(e,"string");return typeof t=="symbol"?t:t+""}function Ak(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 w1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,hl({key:n},t.attr),w1(t.child)))}function St(e){return t=>Ki.createElement(Ck,fl({attr:hl({},e.attr)},t),w1(e.child))}function Ck(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=_k(e,bk),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",fl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:hl(hl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return S1!==void 0?Ki.createElement(S1.Consumer,null,n=>t(n)):t(_1)}function vk(e){return St({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ni=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:S.jsx("button",{className:G(e,`${z}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),kk="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",Nk=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=tt(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?S.jsx(vk,{className:G(t,`${z}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||kk,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return S.jsx(ni,{className:G(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},Pk=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{ll(!1),ei(!0)};return Ws.createPortal(S.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:S.jsx(Nk,{onClick:n})}),document.body)};function A1(e){return St({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 C1(e){return St({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Xs(e){return St({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 Ok(e){return St({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 v1(e){return St({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 Ik(e){return St({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 Rk(e){return St({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 Lk(e){return St({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 Dk(e){return St({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 Mk(e){return St({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 Fk=e=>({[`${jn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${jn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${jn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${jn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${jn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${jn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),k1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-close-button`),disabled:r,onClick:n,children:S.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:S.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"})})}),pl=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>S.jsx("button",{className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),Bk=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Xs,{size:"16px"})},Uk=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ni,{className:G(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:S.jsx(Xs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(pl,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(Bk,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function Hk(e){return St({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const zk=()=>{const{messages:e}=er(),{handleCancel:t}=Or();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},jk=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=zk();return n!=null&&n.enableCancelSearch?S.jsx(ni,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx(Hk,{}),disabled:!e,onClick:r}):null};function J7(){}function Z7(){}function N1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function P1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const $k=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,Vk=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,qk={};function O1(e,t){return(qk.jsx?Vk:$k).test(e)}const Yk=/[ \t\n\f\r]/g;function Gk(e){return typeof e=="object"?e.type==="text"?I1(e.value):!1:I1(e)}function I1(e){return e.replace(Yk,"")===""}class ga{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}ga.prototype.normal={},ga.prototype.property={},ga.prototype.space=void 0;function R1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new ga(n,r,t)}function Ea(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="",In.prototype.booleanish=!1,In.prototype.boolean=!1,In.prototype.commaOrSpaceSeparated=!1,In.prototype.commaSeparated=!1,In.prototype.defined=!1,In.prototype.mustUseProperty=!1,In.prototype.number=!1,In.prototype.overloadedBoolean=!1,In.prototype.property="",In.prototype.spaceSeparated=!1,In.prototype.space=void 0;let Wk=0;const We=ss(),Bt=ss(),wf=ss(),Ee=ss(),dt=ss(),is=ss(),$n=ss();function ss(){return Du(2,++Wk)}const Af=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Bt,commaOrSpaceSeparated:$n,commaSeparated:is,number:Ee,overloadedBoolean:wf,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),Cf=Object.keys(Af);class vf extends In{constructor(t,n,r,s){let a=-1;if(super(t,n),L1(this,"space",s),typeof r=="number")for(;++a<Cf.length;){const u=Cf[a];L1(this,Cf[a],(r&Af[u])===Af[u])}}}vf.prototype.defined=!0;function L1(e,t,n){n&&(e[t]=n)}function Ks(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new vf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[Ea(r)]=r,n[Ea(a.attribute)]=r}return new ga(t,n,e.space)}const D1=Ks({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:dt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:Ee,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:dt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Bt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function M1(e,t){return t in e?e[t]:t}function F1(e,t){return M1(e,t.toLowerCase())}const Xk=Ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:dt,autoFocus:We,autoPlay:We,blocking:dt,capture:null,charSet:null,checked:We,cite:null,className:dt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Bt,controls:We,controlsList:dt,coords:Ee|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:wf,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:dt,height:Ee,hidden:wf,high:Ee,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:dt,itemRef:dt,itemScope:We,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:Ee,pattern:null,ping:dt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:dt,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:dt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Bt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:is,part:dt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:F1}),Kk=Ks({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className: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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:M1}),B1=Ks({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()}}),U1=Ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:F1}),H1=Ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),Qk={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"},Jk=/[A-Z]/g,z1=/-[a-z]/g,Zk=/^data[-\w.:]+$/i;function ml(e,t){const n=Ea(t);let r=t,s=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&Zk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(z1,tN);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!z1.test(a)){let u=a.replace(Jk,eN);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=vf}return new s(r,t)}function eN(e){return"-"+e.toLowerCase()}function tN(e){return e.charAt(1).toUpperCase()}const ya=R1([D1,Xk,B1,U1,H1],"html"),bi=R1([D1,Kk,B1,U1,H1],"svg");function j1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function $1(e){return e.join(" ").trim()}var Qs={},kf,V1;function nN(){if(V1)return kf;V1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
-
`,f="/",p="*",m="",b="comment",y="declaration";function _(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var N=1,C=1;function U(re){var oe=re.match(t);oe&&(N+=oe.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:N,column:C};return function(oe){return oe.position=new R(re),me(),oe}}function R(re){this.start=re,this.end={line:N,column:C},this.source=w.source}R.prototype.content=v;function q(re){var oe=new Error(w.source+":"+N+":"+C+": "+re);if(oe.reason=re,oe.filename=w.source,oe.line=N,oe.column=C,oe.source=v,!w.silent)throw oe}function ne(re){var oe=re.exec(v);if(oe){var xe=oe[0];return U(xe),v=v.slice(xe.length),oe}}function me(){ne(n)}function V(re){var oe;for(re=re||[];oe=se();)oe!==!1&&re.push(oe);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return q("End of comment missing");var xe=v.slice(2,oe-2);return C+=2,U(xe),v=v.slice(oe),C+=2,re({type:b,comment:xe})}}function he(){var re=Y(),oe=ne(r);if(oe){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),ae=re({type:y,property:A(oe[0].replace(e,m)),value:xe?A(xe[0].replace(e,m)):m});return ne(u),ae}}function ve(){var re=[];V(re);for(var oe;oe=he();)oe!==!1&&(re.push(oe),V(re));return re}return me(),ve()}function A(v){return v?v.replace(c,m):m}return kf=_,kf}var q1;function rN(){if(q1)return Qs;q1=1;var e=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.default=n;const t=e(nN());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Qs}var Ta={},Y1;function iN(){if(Y1)return Ta;Y1=1,Object.defineProperty(Ta,"__esModule",{value:!0}),Ta.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(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(s,c):f=f.replace(r,c),f.replace(t,u))};return Ta.camelCase=d,Ta}var ba,G1;function sN(){if(G1)return ba;G1=1;var e=ba&&ba.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(rN()),n=iN();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,ba=r,ba}var oN=sN();const aN=je(oN),gl=W1("end"),Ir=W1("start");function W1(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 X1(e){const t=Ir(e),n=gl(e);if(t&&n)return{start:t,end:n}}function _a(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?K1(e.position):"start"in e||"end"in e?K1(e):"line"in e||"column"in e?Nf(e):""}function Nf(e){return Q1(e&&e.line)+":"+Q1(e&&e.column)}function K1(e){return Nf(e&&e.start)+"-"+Nf(e&&e.end)}function Q1(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=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=s,this.line=c?c.line:void 0,this.name=_a(a.place)||"1:1",this.place=a.place||void 0,this.reason=this.message,this.ruleId=a.ruleId||void 0,this.source=a.source||void 0,this.stack=u&&a.cause&&typeof a.cause.stack=="string"?a.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="",gn.prototype.name="",gn.prototype.reason="",gn.prototype.message="",gn.prototype.stack="",gn.prototype.column=void 0,gn.prototype.line=void 0,gn.prototype.ancestors=void 0,gn.prototype.cause=void 0,gn.prototype.fatal=void 0,gn.prototype.place=void 0,gn.prototype.ruleId=void 0,gn.prototype.source=void 0;const Pf={}.hasOwnProperty,uN=new Map,lN=/[A-Z]/g,cN=new Set(["table","tbody","thead","tfoot","tr"]),dN=new Set(["td","th"]),J1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function fN(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=bN(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=TN(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?bi:ya,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=Z1(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function Z1(e,t,n){if(t.type==="element")return hN(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return pN(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return gN(e,t,n);if(t.type==="mdxjsEsm")return mN(e,t);if(t.type==="root")return EN(e,t,n);if(t.type==="text")return yN(e,t)}function hN(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=bi,e.schema=s),e.ancestors.push(t);const a=tE(e,t.tagName,!1),u=_N(e,t);let c=If(e,t);return cN.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!Gk(d):!0})),eE(e,u,a,t),Of(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function pN(e,t){if(t.data&&t.data.estree&&e.evaluater){const r=t.data.estree.body[0];return r.type,e.evaluater.evaluateExpression(r.expression)}Sa(e,t.position)}function mN(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);Sa(e,t.position)}function gN(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=bi,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:tE(e,t.name,!0),u=SN(e,t),c=If(e,t);return eE(e,u,a,t),Of(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function EN(e,t,n){const r={};return Of(r,If(e,t)),e.create(t,e.Fragment,r,n)}function yN(e,t){return t.value}function eE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Of(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function TN(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function bN(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Ir(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function _N(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Pf.call(t.properties,s)){const a=xN(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&dN.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 SN(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 Sa(e,t.position);else{const s=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 Sa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function If(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:uN;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=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=Z1(e,a,u);c!==void 0&&n.push(c)}return n}function xN(e,t,n){const r=ml(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?P1(n):$1(n)),r.property==="style"){let s=typeof n=="object"?n:wN(e,String(n));return e.stylePropertyNameCase==="css"&&(s=AN(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?Qk[r.property]||r.property:r.attribute,n]}}function wN(e,t){try{return aN(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=J1+"#cannot-parse-style-attribute",s}}function tE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=O1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=O1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Pf.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);Sa(e)}function Sa(e,t){const n=new gn("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=J1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function AN(e){const t={};let n;for(n in e)Pf.call(e,n)&&(t[CN(n)]=e[n]);return t}function CN(e){let t=e.replace(lN,vN);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function vN(e){return"-"+e.toLowerCase()}const Rf={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"]},kN={};function Lf(e,t){const n=kN,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return nE(e,r,s)}function nE(e,t,n){if(NN(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 rE(e.children,t,n)}return Array.isArray(e)?rE(e,t,n):""}function rE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=nE(e[s],t,n);return r.join("")}function NN(e){return!!(e&&typeof e=="object")}const iE=document.createElement("i");function Df(e){const t="&"+e+";";iE.innerHTML=t;const n=iE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Vn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function tr(e,t){return e.length>0?(Vn(e,e.length,0,t),e):t}const sE={}.hasOwnProperty;function oE(e){const t={};let n=-1;for(;++n<e.length;)PN(t,e[n]);return t}function PN(e,t){let n;for(n in t){const s=(sE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){sE.call(s,u)||(s[u]=[]);const c=a[u];ON(s[u],Array.isArray(c)?c:c?[c]:[])}}}function ON(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Vn(e,0,0,r)}function aE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=_i(/[A-Za-z]/),En=_i(/[\dA-Za-z]/),IN=_i(/[#-'*+\--9=?A-Z^-~]/);function El(e){return e!==null&&(e<32||e===127)}const Mf=_i(/\d/),RN=_i(/[\dA-Fa-f]/),LN=_i(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const yl=_i(new RegExp("\\p{P}|\\p{S}","u")),os=_i(/\s/);function _i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Js(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&En(e.charCodeAt(n+1))&&En(e.charCodeAt(n+2)))s=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),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const DN={tokenize:MN};function MN(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(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 Fe(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const FN={tokenize:BN},uE={tokenize:UN};function BN(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&N();const U=t.events.length;let Y=U,R;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){R=t.events[Y][1].end;break}w(r);let q=U;for(;q<t.events.length;)t.events[q][1].end=F({},R),q++;return Vn(t.events,Y+1,0,t.events.slice(U)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(uE,p,m)(C)}function p(C){return s&&N(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(uE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){s&&N(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return Fe(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,U){const Y=t.sliceStream(C);if(U&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let R=s.events.length;for(;R--;)if(s.events[R][1].start.offset<u&&(!s.events[R][1].end||s.events[R][1].end.offset>u))return;const q=t.events.length;let ne=q,me,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(me){V=t.events[ne][1].end;break}me=!0}for(w(r),R=q;R<t.events.length;)t.events[R][1].end=F({},V),R++;Vn(t.events,ne+1,0,t.events.slice(q)),t.events.length=R}}function w(C){let U=n.length;for(;U-- >C;){const Y=n[U];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function N(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function UN(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zs(e){if(e===null||ft(e)||os(e))return 1;if(yl(e))return 2}function Tl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Ff={name:"attention",resolveAll:HN,tokenize:zN};function HN(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=F({},e[r][1].end),b=F({},e[n][1].start);lE(m,-d),lE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=tr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=tr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=tr(f,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=tr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=tr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Vn(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 zN(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Zs(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=Zs(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function lE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const jN={name:"autolink",tokenize:$N};function $N(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return An(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||En(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||En(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||El(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):IN(y)?(e.consume(y),f):n(y)}function p(y){return En(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||En(y))&&r++<63){const _=y===45?b:m;return e.consume(y),_}return n(y)}}const xa={partial:!0,tokenize:VN};function VN(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Fe(a)?t(a):n(a)}}const cE={continuation:{tokenize:YN},exit:GN,name:"blockQuote",tokenize:qN};function qN(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function YN(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(cE,t,n)(u)}}function GN(e){e.exit("blockQuote")}const dE={name:"characterEscape",tokenize:WN};function WN(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return LN(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const fE={name:"characterReference",tokenize:XN};function XN(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=En,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=RN,p):(e.enter("characterReferenceValue"),a=7,u=Mf,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===En&&!Df(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const hE={partial:!0,tokenize:QN},pE={concrete:!0,name:"codeFenced",tokenize:KN};function KN(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(R){return f(R)}function f(R){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=R,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(R)}function p(R){return R===c?(u++,e.consume(R),p):u<3?n(R):(e.exit("codeFencedFenceSequence"),Ze(R)?nt(e,m,"whitespace")(R):m(R))}function m(R){return R===null||Fe(R)?(e.exit("codeFencedFence"),r.interrupt?t(R):e.check(hE,A,U)(R)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(R))}function b(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(R)):Ze(R)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(R)):R===96&&R===c?n(R):(e.consume(R),b)}function y(R){return R===null||Fe(R)?m(R):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(R))}function _(R){return R===null||Fe(R)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(R)):R===96&&R===c?n(R):(e.consume(R),_)}function A(R){return e.attempt(s,U,v)(R)}function v(R){return e.enter("lineEnding"),e.consume(R),e.exit("lineEnding"),w}function w(R){return a>0&&Ze(R)?nt(e,N,"linePrefix",a+1)(R):N(R)}function N(R){return R===null||Fe(R)?e.check(hE,A,U)(R):(e.enter("codeFlowValue"),C(R))}function C(R){return R===null||Fe(R)?(e.exit("codeFlowValue"),N(R)):(e.consume(R),C)}function U(R){return e.exit("codeFenced"),t(R)}function Y(R,q,ne){let me=0;return V;function V(oe){return R.enter("lineEnding"),R.consume(oe),R.exit("lineEnding"),se}function se(oe){return R.enter("codeFencedFence"),Ze(oe)?nt(R,he,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):he(oe)}function he(oe){return oe===c?(R.enter("codeFencedFenceSequence"),ve(oe)):ne(oe)}function ve(oe){return oe===c?(me++,R.consume(oe),ve):me>=u?(R.exit("codeFencedFenceSequence"),Ze(oe)?nt(R,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||Fe(oe)?(R.exit("codeFencedFence"),q(oe)):ne(oe)}}}function QN(e,t,n){const r=this;return s;function s(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 Bf={name:"codeIndented",tokenize:ZN},JN={partial:!0,tokenize:eP};function ZN(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Fe(f)?e.attempt(JN,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Fe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function eP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Fe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Fe(u)?s(u):n(u)}}const tP={name:"codeText",previous:rP,resolve:nP,tokenize:iP};function nP(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function rP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function iP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Fe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Fe(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class sP{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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&wa(this.left,r),a.reverse()}pop(){return this.setCursor(Number.POSITIVE_INFINITY),this.left.pop()}push(t){this.setCursor(Number.POSITIVE_INFINITY),this.left.push(t)}pushMany(t){this.setCursor(Number.POSITIVE_INFINITY),wa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),wa(this.right,t.reverse())}setCursor(t){if(!(t===this.left.length||t>this.left.length&&this.right.length===0||t<0&&this.left.length===0))if(t<this.left.length){const n=this.left.splice(t,Number.POSITIVE_INFINITY);wa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);wa(this.left,n.reverse())}}}function wa(e,t){let n=0;if(t.length<1e4)e.push(...t);else for(;n<t.length;)e.push(...t.slice(n,n+1e4)),n+=1e4}function mE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new sP(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,oP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=F({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Vn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function oP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,b=-1,y=n,_=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++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&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),N=a.pop();d.push([N,N+w.length-1]),e.splice(N,2,w)}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 aP={resolve:lP,tokenize:cP},uP={partial:!0,tokenize:dP};function lP(e){return mE(e),e}function cP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Fe(c)?e.check(uP,u,a)(c):(e.consume(c),s)}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,s}}function dP(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Fe(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 gE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||El(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||Fe(w)?n(w):(e.consume(w),w===92?_:y)}function _(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ft(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||El(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function EE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Fe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Fe(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function yE(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Fe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Fe(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function Aa(e,t){let n;return r;function r(s){return Fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const fP={name:"definition",tokenize:pP},hP={partial:!0,tokenize:mP};function pP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return EE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?Aa(e,f)(y):f(y)}function f(y){return gE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(hP,m,m)(y)}function m(y){return Ze(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Fe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function mP(e,t,n){return r;function r(c){return ft(c)?Aa(e,s)(c):n(c)}function s(c){return yE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Fe(c)?t(c):n(c)}}const gP={name:"hardBreakEscape",tokenize:EP};function EP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Fe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const yP={name:"headingAtx",resolve:TP,tokenize:bP};function TP(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Vn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function bP(e,t,n){let r=0;return s;function s(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||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Fe(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const _P=["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"],TE=["pre","script","style","textarea"],SP={concrete:!0,name:"htmlFlow",resolveTo:AP,tokenize:CP},xP={partial:!0,tokenize:kP},wP={partial:!0,tokenize:vP};function AP(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 CP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),a=!0,A):I===63?(e.consume(I),s=3,r.interrupt?t:k):An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function b(I){return I===45?(e.consume(I),s=2,y):I===91?(e.consume(I),s=5,c=0,_):An(I)?(e.consume(I),s=4,r.interrupt?t:k):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:k):n(I)}function _(I){const _e="CDATA[";return I===_e.charCodeAt(c++)?(e.consume(I),c===_e.length?r.interrupt?t:he:_):n(I)}function A(I){return An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||ft(I)){const _e=I===47,Be=u.toLowerCase();return!_e&&!a&&TE.includes(Be)?(s=1,r.interrupt?t(I):he(I)):_P.includes(u.toLowerCase())?(s=6,_e?(e.consume(I),w):r.interrupt?t(I):he(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?N(I):C(I))}return I===45||En(I)?(e.consume(I),u+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:he):n(I)}function N(I){return Ze(I)?(e.consume(I),N):V(I)}function C(I){return I===47?(e.consume(I),V):I===58||I===95||An(I)?(e.consume(I),U):Ze(I)?(e.consume(I),C):V(I)}function U(I){return I===45||I===46||I===58||I===95||En(I)?(e.consume(I),U):Y(I)}function Y(I){return I===61?(e.consume(I),R):Ze(I)?(e.consume(I),Y):C(I)}function R(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):Ze(I)?(e.consume(I),R):ne(I)}function q(I){return I===d?(e.consume(I),d=null,me):I===null||Fe(I)?n(I):(e.consume(I),q)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ft(I)?Y(I):(e.consume(I),ne)}function me(I){return I===47||I===62||Ze(I)?C(I):n(I)}function V(I){return I===62?(e.consume(I),se):n(I)}function se(I){return I===null||Fe(I)?he(I):Ze(I)?(e.consume(I),se):n(I)}function he(I){return I===45&&s===2?(e.consume(I),xe):I===60&&s===1?(e.consume(I),ae):I===62&&s===4?(e.consume(I),D):I===63&&s===3?(e.consume(I),k):I===93&&s===5?(e.consume(I),ie):Fe(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(xP,ee,ve)(I)):I===null||Fe(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),he)}function ve(I){return e.check(wP,re,ee)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||Fe(I)?ve(I):(e.enter("htmlFlowData"),he(I))}function xe(I){return I===45?(e.consume(I),k):he(I)}function ae(I){return I===47?(e.consume(I),u="",Q):he(I)}function Q(I){if(I===62){const _e=u.toLowerCase();return TE.includes(_e)?(e.consume(I),D):he(I)}return An(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):he(I)}function ie(I){return I===93?(e.consume(I),k):he(I)}function k(I){return I===62?(e.consume(I),D):I===45&&s===2?(e.consume(I),k):he(I)}function D(I){return I===null||Fe(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),D)}function ee(I){return e.exit("htmlFlow"),t(I)}}function vP(e,t,n){const r=this;return s;function s(u){return Fe(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 kP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(xa,t,n)}}const NP={name:"htmlText",tokenize:PP};function PP(e,t,n){const r=this;let s,a,u;return c;function c(k){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(k),d}function d(k){return k===33?(e.consume(k),f):k===47?(e.consume(k),Y):k===63?(e.consume(k),C):An(k)?(e.consume(k),ne):n(k)}function f(k){return k===45?(e.consume(k),p):k===91?(e.consume(k),a=0,_):An(k)?(e.consume(k),N):n(k)}function p(k){return k===45?(e.consume(k),y):n(k)}function m(k){return k===null?n(k):k===45?(e.consume(k),b):Fe(k)?(u=m,ae(k)):(e.consume(k),m)}function b(k){return k===45?(e.consume(k),y):m(k)}function y(k){return k===62?xe(k):k===45?b(k):m(k)}function _(k){const D="CDATA[";return k===D.charCodeAt(a++)?(e.consume(k),a===D.length?A:_):n(k)}function A(k){return k===null?n(k):k===93?(e.consume(k),v):Fe(k)?(u=A,ae(k)):(e.consume(k),A)}function v(k){return k===93?(e.consume(k),w):A(k)}function w(k){return k===62?xe(k):k===93?(e.consume(k),w):A(k)}function N(k){return k===null||k===62?xe(k):Fe(k)?(u=N,ae(k)):(e.consume(k),N)}function C(k){return k===null?n(k):k===63?(e.consume(k),U):Fe(k)?(u=C,ae(k)):(e.consume(k),C)}function U(k){return k===62?xe(k):C(k)}function Y(k){return An(k)?(e.consume(k),R):n(k)}function R(k){return k===45||En(k)?(e.consume(k),R):q(k)}function q(k){return Fe(k)?(u=q,ae(k)):Ze(k)?(e.consume(k),q):xe(k)}function ne(k){return k===45||En(k)?(e.consume(k),ne):k===47||k===62||ft(k)?me(k):n(k)}function me(k){return k===47?(e.consume(k),xe):k===58||k===95||An(k)?(e.consume(k),V):Fe(k)?(u=me,ae(k)):Ze(k)?(e.consume(k),me):xe(k)}function V(k){return k===45||k===46||k===58||k===95||En(k)?(e.consume(k),V):se(k)}function se(k){return k===61?(e.consume(k),he):Fe(k)?(u=se,ae(k)):Ze(k)?(e.consume(k),se):me(k)}function he(k){return k===null||k===60||k===61||k===62||k===96?n(k):k===34||k===39?(e.consume(k),s=k,ve):Fe(k)?(u=he,ae(k)):Ze(k)?(e.consume(k),he):(e.consume(k),re)}function ve(k){return k===s?(e.consume(k),s=void 0,oe):k===null?n(k):Fe(k)?(u=ve,ae(k)):(e.consume(k),ve)}function re(k){return k===null||k===34||k===39||k===60||k===61||k===96?n(k):k===47||k===62||ft(k)?me(k):(e.consume(k),re)}function oe(k){return k===47||k===62||ft(k)?me(k):n(k)}function xe(k){return k===62?(e.consume(k),e.exit("htmlTextData"),e.exit("htmlText"),t):n(k)}function ae(k){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(k),e.exit("lineEnding"),Q}function Q(k){return Ze(k)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(k):ie(k)}function ie(k){return e.enter("htmlTextData"),u(k)}}const Uf={name:"labelEnd",resolveAll:LP,resolveTo:DP,tokenize:MP},OP={tokenize:FP},IP={tokenize:BP},RP={tokenize:UP};function LP(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Vn(e,0,e.length,n),e}function DP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=tr(c,e.slice(a+1,a+r+3)),c=tr(c,[["enter",p,t]]),c=tr(c,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=tr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=tr(c,e.slice(u+1)),c=tr(c,[["exit",d,t]]),Vn(e,a,e.length,c),e}function MP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(pr(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(OP,p,u?p:m)(b):b===91?e.attempt(IP,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(RP,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function FP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ft(m)?Aa(e,a)(m):a(m)}function a(m){return m===41?p(m):gE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?Aa(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?yE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?Aa(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function BP(e,t,n){const r=this;return s;function s(c){return EE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function UP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const HP={name:"labelStartImage",resolveAll:Uf.resolveAll,tokenize:zP};function zP(e,t,n){const r=this;return s;function s(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 jP={name:"labelStartLink",resolveAll:Uf.resolveAll,tokenize:$P};function $P(e,t,n){const r=this;return s;function s(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 Hf={name:"lineEnding",tokenize:VP};function VP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const bl={name:"thematicBreak",tokenize:qP};function qP(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Fe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Rn={continuation:{tokenize:XP},exit:QP,name:"list",tokenize:WP},YP={partial:!0,tokenize:JP},GP={partial:!0,tokenize:KP};function WP(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Mf(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(bl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Mf(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(xa,r.interrupt?n:p,e.attempt(YP,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function XP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(xa,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(GP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Rn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function KP(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(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 QP(e){e.exit(this.containerState.type)}function JP(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const bE={name:"setextUnderline",resolveTo:ZP,tokenize:eO};function ZP(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function eO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Fe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const tO={tokenize:nO};function nO(e){const t=this,n=e.attempt(xa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(aP,s)),"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 s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const rO={resolveAll:SE()},iO=_E("string"),sO=_E("text");function _E(e){return{resolveAll:SE(e==="text"?oO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function SE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function oO(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],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[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:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const aO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:fP},disable:{null:[]},document:{42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:cE},flow:{35:yP,42:bl,45:[bE,bl],60:SP,61:bE,95:bl,96:pE,126:pE},flowInitial:{[-2]:Bf,[-1]:Bf,32:Bf},insideSpan:{null:[Ff,rO]},string:{38:fE,92:dE},text:{[-5]:Hf,[-4]:Hf,[-3]:Hf,33:HP,38:fE,42:Ff,60:[jN,NP],91:jP,92:[gP,dE],93:Uf,95:Ff,96:tP}},Symbol.toStringTag,{value:"Module"}));function uO(e,t,n){let r={_bufferIndex:-1,_index:0,line:n&&n.line||1,column:n&&n.column||1,offset:n&&n.offset||0};const s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(R),consume:N,enter:C,exit:U,interrupt:q(R,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=tr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Tl(a,f.events,f),f.events)}function b(se,he){return cO(y(se),he)}function y(se){return lO(u,se)}function _(){const{_bufferIndex:se,_index:he,line:ve,column:re,offset:oe}=r;return{_bufferIndex:se,_index:he,line:ve,column:re,offset:oe}}function A(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const he=u[r._index];if(typeof he=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<he.length;)w(he.charCodeAt(r._bufferIndex));else w(he)}}function w(se){p=p(se)}function N(se){Fe(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-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=se}function C(se,he){const ve=he||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function U(se){const he=c.pop();return he.end=_(),f.events.push(["exit",he,f]),he}function Y(se,he){ne(se,he.from)}function R(se,he){he.restore()}function q(se,he){return ve;function ve(re,oe,xe){let ae,Q,ie,k;return Array.isArray(re)?ee(re):"tokenize"in re?ee([re]):D(re);function D(ye){return Le;function Le(Ue){const Ye=Ue!==null&&ye[Ue],Tt=Ue!==null&&ye.null,Cn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(Tt)?Tt:Tt?[Tt]:[]];return ee(Cn)(Ue)}}function ee(ye){return ae=ye,Q=0,ye.length===0?xe:I(ye[Q])}function I(ye){return Le;function Le(Ue){return k=me(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Be():ye.tokenize.call(he?Object.assign(Object.create(f),he):f,d,_e,Be)(Ue)}}function _e(ye){return se(ie,k),oe}function Be(ye){return k.restore(),++Q<ae.length?I(ae[Q]):xe}}}function ne(se,he){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Vn(f.events,he,f.events.length-he,se.resolve(f.events.slice(he),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function me(){const se=_(),he=f.previous,ve=f.currentConstruct,re=f.events.length,oe=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=he,f.currentConstruct=ve,f.events.length=re,c=oe,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function lO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function cO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
17
|
+
`+T.stack}return{value:i,source:o,stack:E,digest:null}}function km(i,o,l){return{value:i,source:null,stack:l!=null?l:null,digest:o!=null?o:null}}function Pm(i,o){try{console.error(o.value)}catch(l){setTimeout(function(){throw l})}}var QB=typeof WeakMap=="function"?WeakMap:Map;function Bx(i,o,l){l=pi(-1,l),l.tag=3,l.payload={element:null};var h=o.value;return l.callback=function(){ad||(ad=!0,qm=h),Pm(i,o)},l}function Ux(i,o,l){l=pi(-1,l),l.tag=3;var h=i.type.getDerivedStateFromError;if(typeof h=="function"){var E=o.value;l.payload=function(){return h(E)},l.callback=function(){Pm(i,o)}}var T=i.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(l.callback=function(){Pm(i,o),typeof h!="function"&&($i===null?$i=new Set([this]):$i.add(this));var x=o.stack;this.componentDidCatch(o.value,{componentStack:x!==null?x:""})}),l}function Hx(i,o,l){var h=i.pingCache;if(h===null){h=i.pingCache=new QB;var E=new Set;h.set(o,E)}else E=h.get(o),E===void 0&&(E=new Set,h.set(o,E));E.has(l)||(E.add(l),i=d7.bind(null,i,o,l),o.then(i,i))}function zx(i){do{var o;if((o=i.tag===13)&&(o=i.memoizedState,o=o!==null?o.dehydrated!==null:!0),o)return i;i=i.return}while(i!==null);return null}function jx(i,o,l,h,E){return(i.mode&1)===0?(i===o?i.flags|=65536:(i.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(o=pi(-1,1),o.tag=2,zi(l,o,1))),l.lanes|=1),i):(i.flags|=65536,i.lanes=E,i)}var JB=H.ReactCurrentOwner,Un=!1;function Nn(i,o,l,h){o.child=i===null?ux(o,null,l,h):zo(o,i.child,l,h)}function $x(i,o,l,h,E){l=l.render;var T=o.ref;return $o(o,E),h=_m(i,o,l,h,T,E),l=Sm(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,mi(i,o,E)):(At&&l&&im(o),o.flags|=1,Nn(i,o,h,E),o.child)}function Vx(i,o,l,h,E){if(i===null){var T=l.type;return typeof T=="function"&&!Jm(T)&&T.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(o.tag=15,o.type=T,qx(i,o,T,h,E)):(i=hd(l.type,null,h,o,o.mode,E),i.ref=o.ref,i.return=o,o.child=i)}if(T=i.child,(i.lanes&E)===0){var x=T.memoizedProps;if(l=l.compare,l=l!==null?l:mu,l(x,h)&&i.ref===o.ref)return mi(i,o,E)}return o.flags|=1,i=Gi(T,h),i.ref=o.ref,i.return=o,o.child=i}function qx(i,o,l,h,E){if(i!==null){var T=i.memoizedProps;if(mu(T,h)&&i.ref===o.ref)if(Un=!1,o.pendingProps=h=T,(i.lanes&E)!==0)(i.flags&131072)!==0&&(Un=!0);else return o.lanes=i.lanes,mi(i,o,E)}return Om(i,o,l,h,E)}function Yx(i,o,l){var h=o.pendingProps,E=h.children,T=i!==null?i.memoizedState:null;if(h.mode==="hidden")if((o.mode&1)===0)o.memoizedState={baseLanes:0,cachePool:null,transitions:null},Et(Go,Kn),Kn|=l;else{if((l&1073741824)===0)return i=T!==null?T.baseLanes|l:l,o.lanes=o.childLanes=1073741824,o.memoizedState={baseLanes:i,cachePool:null,transitions:null},o.updateQueue=null,Et(Go,Kn),Kn|=i,null;o.memoizedState={baseLanes:0,cachePool:null,transitions:null},h=T!==null?T.baseLanes:l,Et(Go,Kn),Kn|=h}else T!==null?(h=T.baseLanes|l,o.memoizedState=null):h=l,Et(Go,Kn),Kn|=h;return Nn(i,o,E,l),o.child}function Gx(i,o){var l=o.ref;(i===null&&l!==null||i!==null&&i.ref!==l)&&(o.flags|=512,o.flags|=2097152)}function Om(i,o,l,h,E){var T=Bn(l)?ws:bn.current;return T=Fo(o,T),$o(o,E),l=_m(i,o,l,h,T,E),h=Sm(),i!==null&&!Un?(o.updateQueue=i.updateQueue,o.flags&=-2053,i.lanes&=~E,mi(i,o,E)):(At&&h&&im(o),o.flags|=1,Nn(i,o,l,E),o.child)}function Wx(i,o,l,h,E){if(Bn(l)){var T=!0;Bc(o)}else T=!1;if($o(o,E),o.stateNode===null)nd(i,o),Mx(o,l,h),Nm(o,l,h,E),h=!0;else if(i===null){var x=o.stateNode,R=o.memoizedProps;x.props=R;var U=x.context,Z=l.contextType;typeof Z=="object"&&Z!==null?Z=ar(Z):(Z=Bn(l)?ws:bn.current,Z=Fo(o,Z));var ce=l.getDerivedStateFromProps,me=typeof ce=="function"||typeof x.getSnapshotBeforeUpdate=="function";me||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==h||U!==Z)&&Fx(o,x,h,Z),Hi=!1;var ue=o.memoizedState;x.state=ue,Gc(o,h,x,E),U=o.memoizedState,R!==h||ue!==U||Fn.current||Hi?(typeof ce=="function"&&(vm(o,l,ce,h),U=o.memoizedState),(R=Hi||Dx(o,l,R,h,ue,U,Z))?(me||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"&&(o.flags|=4194308)):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),o.memoizedProps=h,o.memoizedState=U),x.props=h,x.state=U,x.context=Z,h=R):(typeof x.componentDidMount=="function"&&(o.flags|=4194308),h=!1)}else{x=o.stateNode,cx(i,o),R=o.memoizedProps,Z=o.type===o.elementType?R:xr(o.type,R),x.props=Z,me=o.pendingProps,ue=x.context,U=l.contextType,typeof U=="object"&&U!==null?U=ar(U):(U=Bn(l)?ws:bn.current,U=Fo(o,U));var Ae=l.getDerivedStateFromProps;(ce=typeof Ae=="function"||typeof x.getSnapshotBeforeUpdate=="function")||typeof x.UNSAFE_componentWillReceiveProps!="function"&&typeof x.componentWillReceiveProps!="function"||(R!==me||ue!==U)&&Fx(o,x,h,U),Hi=!1,ue=o.memoizedState,x.state=ue,Gc(o,h,x,E);var ke=o.memoizedState;R!==me||ue!==ke||Fn.current||Hi?(typeof Ae=="function"&&(vm(o,l,Ae,h),ke=o.memoizedState),(Z=Hi||Dx(o,l,Z,h,ue,ke,U)||!1)?(ce||typeof x.UNSAFE_componentWillUpdate!="function"&&typeof x.componentWillUpdate!="function"||(typeof x.componentWillUpdate=="function"&&x.componentWillUpdate(h,ke,U),typeof x.UNSAFE_componentWillUpdate=="function"&&x.UNSAFE_componentWillUpdate(h,ke,U)),typeof x.componentDidUpdate=="function"&&(o.flags|=4),typeof x.getSnapshotBeforeUpdate=="function"&&(o.flags|=1024)):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),o.memoizedProps=h,o.memoizedState=ke),x.props=h,x.state=ke,x.context=U,h=Z):(typeof x.componentDidUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=4),typeof x.getSnapshotBeforeUpdate!="function"||R===i.memoizedProps&&ue===i.memoizedState||(o.flags|=1024),h=!1)}return Im(i,o,l,h,T,E)}function Im(i,o,l,h,E,T){Gx(i,o);var x=(o.flags&128)!==0;if(!h&&!x)return E&&ZS(o,l,!1),mi(i,o,T);h=o.stateNode,JB.current=o;var R=x&&typeof l.getDerivedStateFromError!="function"?null:h.render();return o.flags|=1,i!==null&&x?(o.child=zo(o,i.child,null,T),o.child=zo(o,null,R,T)):Nn(i,o,R,T),o.memoizedState=h.state,E&&ZS(o,l,!0),o.child}function Xx(i){var o=i.stateNode;o.pendingContext?QS(i,o.pendingContext,o.pendingContext!==o.context):o.context&&QS(i,o.context,!1),mm(i,o.containerInfo)}function Kx(i,o,l,h,E){return Ho(),um(E),o.flags|=256,Nn(i,o,l,h),o.child}var Rm={dehydrated:null,treeContext:null,retryLane:0};function Lm(i){return{baseLanes:i,cachePool:null,transitions:null}}function Qx(i,o,l){var h=o.pendingProps,E=Nt.current,T=!1,x=(o.flags&128)!==0,R;if((R=x)||(R=i!==null&&i.memoizedState===null?!1:(E&2)!==0),R?(T=!0,o.flags&=-129):(i===null||i.memoizedState!==null)&&(E|=1),Et(Nt,E&1),i===null)return am(o),i=o.memoizedState,i!==null&&(i=i.dehydrated,i!==null)?((o.mode&1)===0?o.lanes=1:i.data==="$!"?o.lanes=8:o.lanes=1073741824,null):(x=h.children,i=h.fallback,T?(h=o.mode,T=o.child,x={mode:"hidden",children:x},(h&1)===0&&T!==null?(T.childLanes=0,T.pendingProps=x):T=pd(x,h,0,null),i=Ls(i,h,l,null),T.return=o,i.return=o,T.sibling=i,o.child=T,o.child.memoizedState=Lm(l),o.memoizedState=Rm,i):Dm(o,x));if(E=i.memoizedState,E!==null&&(R=E.dehydrated,R!==null))return ZB(i,o,x,h,R,E,l);if(T){T=h.fallback,x=o.mode,E=i.child,R=E.sibling;var U={mode:"hidden",children:h.children};return(x&1)===0&&o.child!==E?(h=o.child,h.childLanes=0,h.pendingProps=U,o.deletions=null):(h=Gi(E,U),h.subtreeFlags=E.subtreeFlags&14680064),R!==null?T=Gi(R,T):(T=Ls(T,x,l,null),T.flags|=2),T.return=o,h.return=o,h.sibling=T,o.child=h,h=T,T=o.child,x=i.child.memoizedState,x=x===null?Lm(l):{baseLanes:x.baseLanes|l,cachePool:null,transitions:x.transitions},T.memoizedState=x,T.childLanes=i.childLanes&~l,o.memoizedState=Rm,h}return T=i.child,i=T.sibling,h=Gi(T,{mode:"visible",children:h.children}),(o.mode&1)===0&&(h.lanes=l),h.return=o,h.sibling=null,i!==null&&(l=o.deletions,l===null?(o.deletions=[i],o.flags|=16):l.push(i)),o.child=h,o.memoizedState=null,h}function Dm(i,o){return o=pd({mode:"visible",children:o},i.mode,0,null),o.return=i,i.child=o}function td(i,o,l,h){return h!==null&&um(h),zo(o,i.child,null,l),i=Dm(o,o.pendingProps.children),i.flags|=2,o.memoizedState=null,i}function ZB(i,o,l,h,E,T,x){if(l)return o.flags&256?(o.flags&=-257,h=km(Error(n(422))),td(i,o,x,h)):o.memoizedState!==null?(o.child=i.child,o.flags|=128,null):(T=h.fallback,E=o.mode,h=pd({mode:"visible",children:h.children},E,0,null),T=Ls(T,E,x,null),T.flags|=2,h.return=o,T.return=o,h.sibling=T,o.child=h,(o.mode&1)!==0&&zo(o,i.child,null,x),o.child.memoizedState=Lm(x),o.memoizedState=Rm,T);if((o.mode&1)===0)return td(i,o,x,null);if(E.data==="$!"){if(h=E.nextSibling&&E.nextSibling.dataset,h)var R=h.dgst;return h=R,T=Error(n(419)),h=km(T,h,void 0),td(i,o,x,h)}if(R=(x&i.childLanes)!==0,Un||R){if(h=Zt,h!==null){switch(x&-x){case 4:E=2;break;case 16:E=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:E=32;break;case 536870912:E=268435456;break;default:E=0}E=(E&(h.suspendedLanes|x))!==0?0:E,E!==0&&E!==T.retryLane&&(T.retryLane=E,hi(i,E),Cr(h,i,E,-1))}return Qm(),h=km(Error(n(421))),td(i,o,x,h)}return E.data==="$?"?(o.flags|=128,o.child=i.child,o=f7.bind(null,i),E._reactRetry=o,null):(i=T.treeContext,Xn=Mi(E.nextSibling),Wn=o,At=!0,Sr=null,i!==null&&(sr[or++]=di,sr[or++]=fi,sr[or++]=As,di=i.id,fi=i.overflow,As=o),o=Dm(o,h.children),o.flags|=4096,o)}function Jx(i,o,l){i.lanes|=o;var h=i.alternate;h!==null&&(h.lanes|=o),fm(i.return,o,l)}function Mm(i,o,l,h,E){var T=i.memoizedState;T===null?i.memoizedState={isBackwards:o,rendering:null,renderingStartTime:0,last:h,tail:l,tailMode:E}:(T.isBackwards=o,T.rendering=null,T.renderingStartTime=0,T.last=h,T.tail=l,T.tailMode=E)}function Zx(i,o,l){var h=o.pendingProps,E=h.revealOrder,T=h.tail;if(Nn(i,o,h.children,l),h=Nt.current,(h&2)!==0)h=h&1|2,o.flags|=128;else{if(i!==null&&(i.flags&128)!==0)e:for(i=o.child;i!==null;){if(i.tag===13)i.memoizedState!==null&&Jx(i,l,o);else if(i.tag===19)Jx(i,l,o);else if(i.child!==null){i.child.return=i,i=i.child;continue}if(i===o)break e;for(;i.sibling===null;){if(i.return===null||i.return===o)break e;i=i.return}i.sibling.return=i.return,i=i.sibling}h&=1}if(Et(Nt,h),(o.mode&1)===0)o.memoizedState=null;else switch(E){case"forwards":for(l=o.child,E=null;l!==null;)i=l.alternate,i!==null&&Wc(i)===null&&(E=l),l=l.sibling;l=E,l===null?(E=o.child,o.child=null):(E=l.sibling,l.sibling=null),Mm(o,!1,E,l,T);break;case"backwards":for(l=null,E=o.child,o.child=null;E!==null;){if(i=E.alternate,i!==null&&Wc(i)===null){o.child=E;break}i=E.sibling,E.sibling=l,l=E,E=i}Mm(o,!0,l,null,T);break;case"together":Mm(o,!1,null,null,void 0);break;default:o.memoizedState=null}return o.child}function nd(i,o){(o.mode&1)===0&&i!==null&&(i.alternate=null,o.alternate=null,o.flags|=2)}function mi(i,o,l){if(i!==null&&(o.dependencies=i.dependencies),Ps|=o.lanes,(l&o.childLanes)===0)return null;if(i!==null&&o.child!==i.child)throw Error(n(153));if(o.child!==null){for(i=o.child,l=Gi(i,i.pendingProps),o.child=l,l.return=o;i.sibling!==null;)i=i.sibling,l=l.sibling=Gi(i,i.pendingProps),l.return=o;l.sibling=null}return o.child}function e7(i,o,l){switch(o.tag){case 3:Xx(o),Ho();break;case 5:hx(o);break;case 1:Bn(o.type)&&Bc(o);break;case 4:mm(o,o.stateNode.containerInfo);break;case 10:var h=o.type._context,E=o.memoizedProps.value;Et(Vc,h._currentValue),h._currentValue=E;break;case 13:if(h=o.memoizedState,h!==null)return h.dehydrated!==null?(Et(Nt,Nt.current&1),o.flags|=128,null):(l&o.child.childLanes)!==0?Qx(i,o,l):(Et(Nt,Nt.current&1),i=mi(i,o,l),i!==null?i.sibling:null);Et(Nt,Nt.current&1);break;case 19:if(h=(l&o.childLanes)!==0,(i.flags&128)!==0){if(h)return Zx(i,o,l);o.flags|=128}if(E=o.memoizedState,E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),Et(Nt,Nt.current),h)break;return null;case 22:case 23:return o.lanes=0,Yx(i,o,l)}return mi(i,o,l)}var e2,Fm,t2,n2;e2=function(i,o){for(var l=o.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===o)break;for(;l.sibling===null;){if(l.return===null||l.return===o)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},Fm=function(){},t2=function(i,o,l,h){var E=i.memoizedProps;if(E!==h){i=o.stateNode,Ns(Gr.current);var T=null;switch(l){case"input":E=ir(i,E),h=ir(i,h),T=[];break;case"select":E=N({},E,{value:void 0}),h=N({},h,{value:void 0}),T=[];break;case"textarea":E=Pe(i,E),h=Pe(i,h),T=[];break;default:typeof E.onClick!="function"&&typeof h.onClick=="function"&&(i.onclick=Dc)}an(l,h);var x;l=null;for(Z in E)if(!h.hasOwnProperty(Z)&&E.hasOwnProperty(Z)&&E[Z]!=null)if(Z==="style"){var R=E[Z];for(x in R)R.hasOwnProperty(x)&&(l||(l={}),l[x]="")}else Z!=="dangerouslySetInnerHTML"&&Z!=="children"&&Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&Z!=="autoFocus"&&(s.hasOwnProperty(Z)?T||(T=[]):(T=T||[]).push(Z,null));for(Z in h){var U=h[Z];if(R=E!=null?E[Z]:void 0,h.hasOwnProperty(Z)&&U!==R&&(U!=null||R!=null))if(Z==="style")if(R){for(x in R)!R.hasOwnProperty(x)||U&&U.hasOwnProperty(x)||(l||(l={}),l[x]="");for(x in U)U.hasOwnProperty(x)&&R[x]!==U[x]&&(l||(l={}),l[x]=U[x])}else l||(T||(T=[]),T.push(Z,l)),l=U;else Z==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,R=R?R.__html:void 0,U!=null&&R!==U&&(T=T||[]).push(Z,U)):Z==="children"?typeof U!="string"&&typeof U!="number"||(T=T||[]).push(Z,""+U):Z!=="suppressContentEditableWarning"&&Z!=="suppressHydrationWarning"&&(s.hasOwnProperty(Z)?(U!=null&&Z==="onScroll"&&bt("scroll",i),T||R===U||(T=[])):(T=T||[]).push(Z,U))}l&&(T=T||[]).push("style",l);var Z=T;(o.updateQueue=Z)&&(o.flags|=4)}},n2=function(i,o,l,h){l!==h&&(o.flags|=4)};function Pu(i,o){if(!At)switch(i.tailMode){case"hidden":o=i.tail;for(var l=null;o!==null;)o.alternate!==null&&(l=o),o=o.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?o||i.tail===null?i.tail=null:i.tail.sibling=null:h.sibling=null}}function Sn(i){var o=i.alternate!==null&&i.alternate.child===i.child,l=0,h=0;if(o)for(var E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags&14680064,h|=E.flags&14680064,E.return=i,E=E.sibling;else for(E=i.child;E!==null;)l|=E.lanes|E.childLanes,h|=E.subtreeFlags,h|=E.flags,E.return=i,E=E.sibling;return i.subtreeFlags|=h,i.childLanes=l,o}function t7(i,o,l){var h=o.pendingProps;switch(sm(o),o.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Sn(o),null;case 1:return Bn(o.type)&&Fc(),Sn(o),null;case 3:return h=o.stateNode,Vo(),_t(Fn),_t(bn),ym(),h.pendingContext&&(h.context=h.pendingContext,h.pendingContext=null),(i===null||i.child===null)&&(jc(o)?o.flags|=4:i===null||i.memoizedState.isDehydrated&&(o.flags&256)===0||(o.flags|=1024,Sr!==null&&(Wm(Sr),Sr=null))),Fm(i,o),Sn(o),null;case 5:gm(o);var E=Ns(Au.current);if(l=o.type,i!==null&&o.stateNode!=null)t2(i,o,l,h,E),i.ref!==o.ref&&(o.flags|=512,o.flags|=2097152);else{if(!h){if(o.stateNode===null)throw Error(n(166));return Sn(o),null}if(i=Ns(Gr.current),jc(o)){h=o.stateNode,l=o.type;var T=o.memoizedProps;switch(h[Yr]=o,h[bu]=T,i=(o.mode&1)!==0,l){case"dialog":bt("cancel",h),bt("close",h);break;case"iframe":case"object":case"embed":bt("load",h);break;case"video":case"audio":for(E=0;E<Eu.length;E++)bt(Eu[E],h);break;case"source":bt("error",h);break;case"img":case"image":case"link":bt("error",h),bt("load",h);break;case"details":bt("toggle",h);break;case"input":Qt(h,T),bt("invalid",h);break;case"select":h._wrapperState={wasMultiple:!!T.multiple},bt("invalid",h);break;case"textarea":Me(h,T),bt("invalid",h)}an(l,T),E=null;for(var x in T)if(T.hasOwnProperty(x)){var R=T[x];x==="children"?typeof R=="string"?h.textContent!==R&&(T.suppressHydrationWarning!==!0&&Lc(h.textContent,R,i),E=["children",R]):typeof R=="number"&&h.textContent!==""+R&&(T.suppressHydrationWarning!==!0&&Lc(h.textContent,R,i),E=["children",""+R]):s.hasOwnProperty(x)&&R!=null&&x==="onScroll"&&bt("scroll",h)}switch(l){case"input":Cn(h),vn(h,T,!0);break;case"textarea":Cn(h),ht(h);break;case"select":case"option":break;default:typeof T.onClick=="function"&&(h.onclick=Dc)}h=E,o.updateQueue=h,h!==null&&(o.flags|=4)}else{x=E.nodeType===9?E:E.ownerDocument,i==="http://www.w3.org/1999/xhtml"&&(i=J(l)),i==="http://www.w3.org/1999/xhtml"?l==="script"?(i=x.createElement("div"),i.innerHTML="<script><\/script>",i=i.removeChild(i.firstChild)):typeof h.is=="string"?i=x.createElement(l,{is:h.is}):(i=x.createElement(l),l==="select"&&(x=i,h.multiple?x.multiple=!0:h.size&&(x.size=h.size))):i=x.createElementNS(i,l),i[Yr]=o,i[bu]=h,e2(i,o,!1,!1),o.stateNode=i;e:{switch(x=Vr(l,h),l){case"dialog":bt("cancel",i),bt("close",i),E=h;break;case"iframe":case"object":case"embed":bt("load",i),E=h;break;case"video":case"audio":for(E=0;E<Eu.length;E++)bt(Eu[E],i);E=h;break;case"source":bt("error",i),E=h;break;case"img":case"image":case"link":bt("error",i),bt("load",i),E=h;break;case"details":bt("toggle",i),E=h;break;case"input":Qt(i,h),E=ir(i,h),bt("invalid",i);break;case"option":E=h;break;case"select":i._wrapperState={wasMultiple:!!h.multiple},E=N({},h,{value:void 0}),bt("invalid",i);break;case"textarea":Me(i,h),E=Pe(i,h),bt("invalid",i);break;default:E=h}an(l,E),R=E;for(T in R)if(R.hasOwnProperty(T)){var U=R[T];T==="style"?on(i,U):T==="dangerouslySetInnerHTML"?(U=U?U.__html:void 0,U!=null&&Ve(i,U)):T==="children"?typeof U=="string"?(l!=="textarea"||U!=="")&&Ie(i,U):typeof U=="number"&&Ie(i,""+U):T!=="suppressContentEditableWarning"&&T!=="suppressHydrationWarning"&&T!=="autoFocus"&&(s.hasOwnProperty(T)?U!=null&&T==="onScroll"&&bt("scroll",i):U!=null&&C(i,T,U,x))}switch(l){case"input":Cn(i),vn(i,h,!1);break;case"textarea":Cn(i),ht(i);break;case"option":h.value!=null&&i.setAttribute("value",""+Ue(h.value));break;case"select":i.multiple=!!h.multiple,T=h.value,T!=null?we(i,!!h.multiple,T,!1):h.defaultValue!=null&&we(i,!!h.multiple,h.defaultValue,!0);break;default:typeof E.onClick=="function"&&(i.onclick=Dc)}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&&(o.flags|=4)}o.ref!==null&&(o.flags|=512,o.flags|=2097152)}return Sn(o),null;case 6:if(i&&o.stateNode!=null)n2(i,o,i.memoizedProps,h);else{if(typeof h!="string"&&o.stateNode===null)throw Error(n(166));if(l=Ns(Au.current),Ns(Gr.current),jc(o)){if(h=o.stateNode,l=o.memoizedProps,h[Yr]=o,(T=h.nodeValue!==l)&&(i=Wn,i!==null))switch(i.tag){case 3:Lc(h.nodeValue,l,(i.mode&1)!==0);break;case 5:i.memoizedProps.suppressHydrationWarning!==!0&&Lc(h.nodeValue,l,(i.mode&1)!==0)}T&&(o.flags|=4)}else h=(l.nodeType===9?l:l.ownerDocument).createTextNode(h),h[Yr]=o,o.stateNode=h}return Sn(o),null;case 13:if(_t(Nt),h=o.memoizedState,i===null||i.memoizedState!==null&&i.memoizedState.dehydrated!==null){if(At&&Xn!==null&&(o.mode&1)!==0&&(o.flags&128)===0)sx(),Ho(),o.flags|=98560,T=!1;else if(T=jc(o),h!==null&&h.dehydrated!==null){if(i===null){if(!T)throw Error(n(318));if(T=o.memoizedState,T=T!==null?T.dehydrated:null,!T)throw Error(n(317));T[Yr]=o}else Ho(),(o.flags&128)===0&&(o.memoizedState=null),o.flags|=4;Sn(o),T=!1}else Sr!==null&&(Wm(Sr),Sr=null),T=!0;if(!T)return o.flags&65536?o:null}return(o.flags&128)!==0?(o.lanes=l,o):(h=h!==null,h!==(i!==null&&i.memoizedState!==null)&&h&&(o.child.flags|=8192,(o.mode&1)!==0&&(i===null||(Nt.current&1)!==0?qt===0&&(qt=3):Qm())),o.updateQueue!==null&&(o.flags|=4),Sn(o),null);case 4:return Vo(),Fm(i,o),i===null&&yu(o.stateNode.containerInfo),Sn(o),null;case 10:return dm(o.type._context),Sn(o),null;case 17:return Bn(o.type)&&Fc(),Sn(o),null;case 19:if(_t(Nt),T=o.memoizedState,T===null)return Sn(o),null;if(h=(o.flags&128)!==0,x=T.rendering,x===null)if(h)Pu(T,!1);else{if(qt!==0||i!==null&&(i.flags&128)!==0)for(i=o.child;i!==null;){if(x=Wc(i),x!==null){for(o.flags|=128,Pu(T,!1),h=x.updateQueue,h!==null&&(o.updateQueue=h,o.flags|=4),o.subtreeFlags=0,h=l,l=o.child;l!==null;)T=l,i=h,T.flags&=14680066,x=T.alternate,x===null?(T.childLanes=0,T.lanes=i,T.child=null,T.subtreeFlags=0,T.memoizedProps=null,T.memoizedState=null,T.updateQueue=null,T.dependencies=null,T.stateNode=null):(T.childLanes=x.childLanes,T.lanes=x.lanes,T.child=x.child,T.subtreeFlags=0,T.deletions=null,T.memoizedProps=x.memoizedProps,T.memoizedState=x.memoizedState,T.updateQueue=x.updateQueue,T.type=x.type,i=x.dependencies,T.dependencies=i===null?null:{lanes:i.lanes,firstContext:i.firstContext}),l=l.sibling;return Et(Nt,Nt.current&1|2),o.child}i=i.sibling}T.tail!==null&&Rt()>Wo&&(o.flags|=128,h=!0,Pu(T,!1),o.lanes=4194304)}else{if(!h)if(i=Wc(x),i!==null){if(o.flags|=128,h=!0,l=i.updateQueue,l!==null&&(o.updateQueue=l,o.flags|=4),Pu(T,!0),T.tail===null&&T.tailMode==="hidden"&&!x.alternate&&!At)return Sn(o),null}else 2*Rt()-T.renderingStartTime>Wo&&l!==1073741824&&(o.flags|=128,h=!0,Pu(T,!1),o.lanes=4194304);T.isBackwards?(x.sibling=o.child,o.child=x):(l=T.last,l!==null?l.sibling=x:o.child=x,T.last=x)}return T.tail!==null?(o=T.tail,T.rendering=o,T.tail=o.sibling,T.renderingStartTime=Rt(),o.sibling=null,l=Nt.current,Et(Nt,h?l&1|2:l&1),o):(Sn(o),null);case 22:case 23:return Km(),h=o.memoizedState!==null,i!==null&&i.memoizedState!==null!==h&&(o.flags|=8192),h&&(o.mode&1)!==0?(Kn&1073741824)!==0&&(Sn(o),o.subtreeFlags&6&&(o.flags|=8192)):Sn(o),null;case 24:return null;case 25:return null}throw Error(n(156,o.tag))}function n7(i,o){switch(sm(o),o.tag){case 1:return Bn(o.type)&&Fc(),i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 3:return Vo(),_t(Fn),_t(bn),ym(),i=o.flags,(i&65536)!==0&&(i&128)===0?(o.flags=i&-65537|128,o):null;case 5:return gm(o),null;case 13:if(_t(Nt),i=o.memoizedState,i!==null&&i.dehydrated!==null){if(o.alternate===null)throw Error(n(340));Ho()}return i=o.flags,i&65536?(o.flags=i&-65537|128,o):null;case 19:return _t(Nt),null;case 4:return Vo(),null;case 10:return dm(o.type._context),null;case 22:case 23:return Km(),null;case 24:return null;default:return null}}var rd=!1,xn=!1,r7=typeof WeakSet=="function"?WeakSet:Set,Ne=null;function Yo(i,o){var l=i.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(h){Pt(i,o,h)}else l.current=null}function Bm(i,o,l){try{l()}catch(h){Pt(i,o,h)}}var r2=!1;function i7(i,o){if(Kp=xc,i=DS(),jp(i)){if("selectionStart"in i)var l={start:i.selectionStart,end:i.selectionEnd};else e:{l=(l=i.ownerDocument)&&l.defaultView||window;var h=l.getSelection&&l.getSelection();if(h&&h.rangeCount!==0){l=h.anchorNode;var E=h.anchorOffset,T=h.focusNode;h=h.focusOffset;try{l.nodeType,T.nodeType}catch(Te){l=null;break e}var x=0,R=-1,U=-1,Z=0,ce=0,me=i,ue=null;t:for(;;){for(var Ae;me!==l||E!==0&&me.nodeType!==3||(R=x+E),me!==T||h!==0&&me.nodeType!==3||(U=x+h),me.nodeType===3&&(x+=me.nodeValue.length),(Ae=me.firstChild)!==null;)ue=me,me=Ae;for(;;){if(me===i)break t;if(ue===l&&++Z===E&&(R=x),ue===T&&++ce===h&&(U=x),(Ae=me.nextSibling)!==null)break;me=ue,ue=me.parentNode}me=Ae}l=R===-1||U===-1?null:{start:R,end:U}}else l=null}l=l||{start:0,end:0}}else l=null;for(Qp={focusedElem:i,selectionRange:l},xc=!1,Ne=o;Ne!==null;)if(o=Ne,i=o.child,(o.subtreeFlags&1028)!==0&&i!==null)i.return=o,Ne=i;else for(;Ne!==null;){o=Ne;try{var ke=o.alternate;if((o.flags&1024)!==0)switch(o.tag){case 0:case 11:case 15:break;case 1:if(ke!==null){var Oe=ke.memoizedProps,Lt=ke.memoizedState,W=o.stateNode,j=W.getSnapshotBeforeUpdate(o.elementType===o.type?Oe:xr(o.type,Oe),Lt);W.__reactInternalSnapshotBeforeUpdate=j}break;case 3:var K=o.stateNode.containerInfo;K.nodeType===1?K.textContent="":K.nodeType===9&&K.documentElement&&K.removeChild(K.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Te){Pt(o,o.return,Te)}if(i=o.sibling,i!==null){i.return=o.return,Ne=i;break}Ne=o.return}return ke=r2,r2=!1,ke}function Ou(i,o,l){var h=o.updateQueue;if(h=h!==null?h.lastEffect:null,h!==null){var E=h=h.next;do{if((E.tag&i)===i){var T=E.destroy;E.destroy=void 0,T!==void 0&&Bm(o,l,T)}E=E.next}while(E!==h)}}function id(i,o){if(o=o.updateQueue,o=o!==null?o.lastEffect:null,o!==null){var l=o=o.next;do{if((l.tag&i)===i){var h=l.create;l.destroy=h()}l=l.next}while(l!==o)}}function Um(i){var o=i.ref;if(o!==null){var l=i.stateNode;i.tag,i=l,typeof o=="function"?o(i):o.current=i}}function i2(i){var o=i.alternate;o!==null&&(i.alternate=null,i2(o)),i.child=null,i.deletions=null,i.sibling=null,i.tag===5&&(o=i.stateNode,o!==null&&(delete o[Yr],delete o[bu],delete o[tm],delete o[HB],delete o[zB])),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 s2(i){return i.tag===5||i.tag===3||i.tag===4}function o2(i){e:for(;;){for(;i.sibling===null;){if(i.return===null||s2(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 Hm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.nodeType===8?l.parentNode.insertBefore(i,o):l.insertBefore(i,o):(l.nodeType===8?(o=l.parentNode,o.insertBefore(i,l)):(o=l,o.appendChild(i)),l=l._reactRootContainer,l!=null||o.onclick!==null||(o.onclick=Dc));else if(h!==4&&(i=i.child,i!==null))for(Hm(i,o,l),i=i.sibling;i!==null;)Hm(i,o,l),i=i.sibling}function zm(i,o,l){var h=i.tag;if(h===5||h===6)i=i.stateNode,o?l.insertBefore(i,o):l.appendChild(i);else if(h!==4&&(i=i.child,i!==null))for(zm(i,o,l),i=i.sibling;i!==null;)zm(i,o,l),i=i.sibling}var un=null,wr=!1;function ji(i,o,l){for(l=l.child;l!==null;)a2(i,o,l),l=l.sibling}function a2(i,o,l){if(qr&&typeof qr.onCommitFiberUnmount=="function")try{qr.onCommitFiberUnmount(Ec,l)}catch(R){}switch(l.tag){case 5:xn||Yo(l,o);case 6:var h=un,E=wr;un=null,ji(i,o,l),un=h,wr=E,un!==null&&(wr?(i=un,l=l.stateNode,i.nodeType===8?i.parentNode.removeChild(l):i.removeChild(l)):un.removeChild(l.stateNode));break;case 18:un!==null&&(wr?(i=un,l=l.stateNode,i.nodeType===8?em(i.parentNode,l):i.nodeType===1&&em(i,l),lu(i)):em(un,l.stateNode));break;case 4:h=un,E=wr,un=l.stateNode.containerInfo,wr=!0,ji(i,o,l),un=h,wr=E;break;case 0:case 11:case 14:case 15:if(!xn&&(h=l.updateQueue,h!==null&&(h=h.lastEffect,h!==null))){E=h=h.next;do{var T=E,x=T.destroy;T=T.tag,x!==void 0&&((T&2)!==0||(T&4)!==0)&&Bm(l,o,x),E=E.next}while(E!==h)}ji(i,o,l);break;case 1:if(!xn&&(Yo(l,o),h=l.stateNode,typeof h.componentWillUnmount=="function"))try{h.props=l.memoizedProps,h.state=l.memoizedState,h.componentWillUnmount()}catch(R){Pt(l,o,R)}ji(i,o,l);break;case 21:ji(i,o,l);break;case 22:l.mode&1?(xn=(h=xn)||l.memoizedState!==null,ji(i,o,l),xn=h):ji(i,o,l);break;default:ji(i,o,l)}}function u2(i){var o=i.updateQueue;if(o!==null){i.updateQueue=null;var l=i.stateNode;l===null&&(l=i.stateNode=new r7),o.forEach(function(h){var E=h7.bind(null,i,h);l.has(h)||(l.add(h),h.then(E,E))})}}function Ar(i,o){var l=o.deletions;if(l!==null)for(var h=0;h<l.length;h++){var E=l[h];try{var T=i,x=o,R=x;e:for(;R!==null;){switch(R.tag){case 5:un=R.stateNode,wr=!1;break e;case 3:un=R.stateNode.containerInfo,wr=!0;break e;case 4:un=R.stateNode.containerInfo,wr=!0;break e}R=R.return}if(un===null)throw Error(n(160));a2(T,x,E),un=null,wr=!1;var U=E.alternate;U!==null&&(U.return=null),E.return=null}catch(Z){Pt(E,o,Z)}}if(o.subtreeFlags&12854)for(o=o.child;o!==null;)l2(o,i),o=o.sibling}function l2(i,o){var l=i.alternate,h=i.flags;switch(i.tag){case 0:case 11:case 14:case 15:if(Ar(o,i),Xr(i),h&4){try{Ou(3,i,i.return),id(3,i)}catch(Oe){Pt(i,i.return,Oe)}try{Ou(5,i,i.return)}catch(Oe){Pt(i,i.return,Oe)}}break;case 1:Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return);break;case 5:if(Ar(o,i),Xr(i),h&512&&l!==null&&Yo(l,l.return),i.flags&32){var E=i.stateNode;try{Ie(E,"")}catch(Oe){Pt(i,i.return,Oe)}}if(h&4&&(E=i.stateNode,E!=null)){var T=i.memoizedProps,x=l!==null?l.memoizedProps:T,R=i.type,U=i.updateQueue;if(i.updateQueue=null,U!==null)try{R==="input"&&T.type==="radio"&&T.name!=null&&$e(E,T),Vr(R,x);var Z=Vr(R,T);for(x=0;x<U.length;x+=2){var ce=U[x],me=U[x+1];ce==="style"?on(E,me):ce==="dangerouslySetInnerHTML"?Ve(E,me):ce==="children"?Ie(E,me):C(E,ce,me,Z)}switch(R){case"input":vt(E,T);break;case"textarea":rt(E,T);break;case"select":var ue=E._wrapperState.wasMultiple;E._wrapperState.wasMultiple=!!T.multiple;var Ae=T.value;Ae!=null?we(E,!!T.multiple,Ae,!1):ue!==!!T.multiple&&(T.defaultValue!=null?we(E,!!T.multiple,T.defaultValue,!0):we(E,!!T.multiple,T.multiple?[]:"",!1))}E[bu]=T}catch(Oe){Pt(i,i.return,Oe)}}break;case 6:if(Ar(o,i),Xr(i),h&4){if(i.stateNode===null)throw Error(n(162));E=i.stateNode,T=i.memoizedProps;try{E.nodeValue=T}catch(Oe){Pt(i,i.return,Oe)}}break;case 3:if(Ar(o,i),Xr(i),h&4&&l!==null&&l.memoizedState.isDehydrated)try{lu(o.containerInfo)}catch(Oe){Pt(i,i.return,Oe)}break;case 4:Ar(o,i),Xr(i);break;case 13:Ar(o,i),Xr(i),E=i.child,E.flags&8192&&(T=E.memoizedState!==null,E.stateNode.isHidden=T,!T||E.alternate!==null&&E.alternate.memoizedState!==null||(Vm=Rt())),h&4&&u2(i);break;case 22:if(ce=l!==null&&l.memoizedState!==null,i.mode&1?(xn=(Z=xn)||ce,Ar(o,i),xn=Z):Ar(o,i),Xr(i),h&8192){if(Z=i.memoizedState!==null,(i.stateNode.isHidden=Z)&&!ce&&(i.mode&1)!==0)for(Ne=i,ce=i.child;ce!==null;){for(me=Ne=ce;Ne!==null;){switch(ue=Ne,Ae=ue.child,ue.tag){case 0:case 11:case 14:case 15:Ou(4,ue,ue.return);break;case 1:Yo(ue,ue.return);var ke=ue.stateNode;if(typeof ke.componentWillUnmount=="function"){h=ue,l=ue.return;try{o=h,ke.props=o.memoizedProps,ke.state=o.memoizedState,ke.componentWillUnmount()}catch(Oe){Pt(h,l,Oe)}}break;case 5:Yo(ue,ue.return);break;case 22:if(ue.memoizedState!==null){f2(me);continue}}Ae!==null?(Ae.return=ue,Ne=Ae):f2(me)}ce=ce.sibling}e:for(ce=null,me=i;;){if(me.tag===5){if(ce===null){ce=me;try{E=me.stateNode,Z?(T=E.style,typeof T.setProperty=="function"?T.setProperty("display","none","important"):T.display="none"):(R=me.stateNode,U=me.memoizedProps.style,x=U!=null&&U.hasOwnProperty("display")?U.display:null,R.style.display=Ut("display",x))}catch(Oe){Pt(i,i.return,Oe)}}}else if(me.tag===6){if(ce===null)try{me.stateNode.nodeValue=Z?"":me.memoizedProps}catch(Oe){Pt(i,i.return,Oe)}}else if((me.tag!==22&&me.tag!==23||me.memoizedState===null||me===i)&&me.child!==null){me.child.return=me,me=me.child;continue}if(me===i)break e;for(;me.sibling===null;){if(me.return===null||me.return===i)break e;ce===me&&(ce=null),me=me.return}ce===me&&(ce=null),me.sibling.return=me.return,me=me.sibling}}break;case 19:Ar(o,i),Xr(i),h&4&&u2(i);break;case 21:break;default:Ar(o,i),Xr(i)}}function Xr(i){var o=i.flags;if(o&2){try{e:{for(var l=i.return;l!==null;){if(s2(l)){var h=l;break e}l=l.return}throw Error(n(160))}switch(h.tag){case 5:var E=h.stateNode;h.flags&32&&(Ie(E,""),h.flags&=-33);var T=o2(i);zm(i,T,E);break;case 3:case 4:var x=h.stateNode.containerInfo,R=o2(i);Hm(i,R,x);break;default:throw Error(n(161))}}catch(U){Pt(i,i.return,U)}i.flags&=-3}o&4096&&(i.flags&=-4097)}function s7(i,o,l){Ne=i,c2(i)}function c2(i,o,l){for(var h=(i.mode&1)!==0;Ne!==null;){var E=Ne,T=E.child;if(E.tag===22&&h){var x=E.memoizedState!==null||rd;if(!x){var R=E.alternate,U=R!==null&&R.memoizedState!==null||xn;R=rd;var Z=xn;if(rd=x,(xn=U)&&!Z)for(Ne=E;Ne!==null;)x=Ne,U=x.child,x.tag===22&&x.memoizedState!==null?h2(E):U!==null?(U.return=x,Ne=U):h2(E);for(;T!==null;)Ne=T,c2(T),T=T.sibling;Ne=E,rd=R,xn=Z}d2(i)}else(E.subtreeFlags&8772)!==0&&T!==null?(T.return=E,Ne=T):d2(i)}}function d2(i){for(;Ne!==null;){var o=Ne;if((o.flags&8772)!==0){var l=o.alternate;try{if((o.flags&8772)!==0)switch(o.tag){case 0:case 11:case 15:xn||id(5,o);break;case 1:var h=o.stateNode;if(o.flags&4&&!xn)if(l===null)h.componentDidMount();else{var E=o.elementType===o.type?l.memoizedProps:xr(o.type,l.memoizedProps);h.componentDidUpdate(E,l.memoizedState,h.__reactInternalSnapshotBeforeUpdate)}var T=o.updateQueue;T!==null&&fx(o,T,h);break;case 3:var x=o.updateQueue;if(x!==null){if(l=null,o.child!==null)switch(o.child.tag){case 5:l=o.child.stateNode;break;case 1:l=o.child.stateNode}fx(o,x,l)}break;case 5:var R=o.stateNode;if(l===null&&o.flags&4){l=R;var U=o.memoizedProps;switch(o.type){case"button":case"input":case"select":case"textarea":U.autoFocus&&l.focus();break;case"img":U.src&&(l.src=U.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(o.memoizedState===null){var Z=o.alternate;if(Z!==null){var ce=Z.memoizedState;if(ce!==null){var me=ce.dehydrated;me!==null&&lu(me)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}xn||o.flags&512&&Um(o)}catch(ue){Pt(o,o.return,ue)}}if(o===i){Ne=null;break}if(l=o.sibling,l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function f2(i){for(;Ne!==null;){var o=Ne;if(o===i){Ne=null;break}var l=o.sibling;if(l!==null){l.return=o.return,Ne=l;break}Ne=o.return}}function h2(i){for(;Ne!==null;){var o=Ne;try{switch(o.tag){case 0:case 11:case 15:var l=o.return;try{id(4,o)}catch(U){Pt(o,l,U)}break;case 1:var h=o.stateNode;if(typeof h.componentDidMount=="function"){var E=o.return;try{h.componentDidMount()}catch(U){Pt(o,E,U)}}var T=o.return;try{Um(o)}catch(U){Pt(o,T,U)}break;case 5:var x=o.return;try{Um(o)}catch(U){Pt(o,x,U)}}}catch(U){Pt(o,o.return,U)}if(o===i){Ne=null;break}var R=o.sibling;if(R!==null){R.return=o.return,Ne=R;break}Ne=o.return}}var o7=Math.ceil,sd=H.ReactCurrentDispatcher,jm=H.ReactCurrentOwner,lr=H.ReactCurrentBatchConfig,it=0,Zt=null,Ht=null,ln=0,Kn=0,Go=Fi(0),qt=0,Iu=null,Ps=0,od=0,$m=0,Ru=null,Hn=null,Vm=0,Wo=1/0,gi=null,ad=!1,qm=null,$i=null,ud=!1,Vi=null,ld=0,Lu=0,Ym=null,cd=-1,dd=0;function kn(){return(it&6)!==0?Rt():cd!==-1?cd:cd=Rt()}function qi(i){return(i.mode&1)===0?1:(it&2)!==0&&ln!==0?ln&-ln:$B.transition!==null?(dd===0&&(dd=oS()),dd):(i=ct,i!==0||(i=window.event,i=i===void 0?16:mS(i.type)),i)}function Cr(i,o,l,h){if(50<Lu)throw Lu=0,Ym=null,Error(n(185));iu(i,l,h),((it&2)===0||i!==Zt)&&(i===Zt&&((it&2)===0&&(od|=l),qt===4&&Yi(i,ln)),zn(i,h),l===1&&it===0&&(o.mode&1)===0&&(Wo=Rt()+500,Uc&&Ui()))}function zn(i,o){var l=i.callbackNode;$9(i,o);var h=bc(i,i===Zt?ln:0);if(h===0)l!==null&&rS(l),i.callbackNode=null,i.callbackPriority=0;else if(o=h&-h,i.callbackPriority!==o){if(l!=null&&rS(l),o===1)i.tag===0?jB(m2.bind(null,i)):ex(m2.bind(null,i)),BB(function(){(it&6)===0&&Ui()}),l=null;else{switch(aS(h)){case 1:l=Ap;break;case 4:l=iS;break;case 16:l=gc;break;case 536870912:l=sS;break;default:l=gc}l=x2(l,p2.bind(null,i))}i.callbackPriority=o,i.callbackNode=l}}function p2(i,o){if(cd=-1,dd=0,(it&6)!==0)throw Error(n(327));var l=i.callbackNode;if(Xo()&&i.callbackNode!==l)return null;var h=bc(i,i===Zt?ln:0);if(h===0)return null;if((h&30)!==0||(h&i.expiredLanes)!==0||o)o=fd(i,h);else{o=h;var E=it;it|=2;var T=E2();(Zt!==i||ln!==o)&&(gi=null,Wo=Rt()+500,Is(i,o));do try{l7();break}catch(R){g2(i,R)}while(!0);cm(),sd.current=T,it=E,Ht!==null?o=0:(Zt=null,ln=0,o=qt)}if(o!==0){if(o===2&&(E=Cp(i),E!==0&&(h=E,o=Gm(i,E))),o===1)throw l=Iu,Is(i,0),Yi(i,h),zn(i,Rt()),l;if(o===6)Yi(i,h);else{if(E=i.current.alternate,(h&30)===0&&!a7(E)&&(o=fd(i,h),o===2&&(T=Cp(i),T!==0&&(h=T,o=Gm(i,T))),o===1))throw l=Iu,Is(i,0),Yi(i,h),zn(i,Rt()),l;switch(i.finishedWork=E,i.finishedLanes=h,o){case 0:case 1:throw Error(n(345));case 2:Rs(i,Hn,gi);break;case 3:if(Yi(i,h),(h&130023424)===h&&(o=Vm+500-Rt(),10<o)){if(bc(i,0)!==0)break;if(E=i.suspendedLanes,(E&h)!==h){kn(),i.pingedLanes|=i.suspendedLanes&E;break}i.timeoutHandle=Zp(Rs.bind(null,i,Hn,gi),o);break}Rs(i,Hn,gi);break;case 4:if(Yi(i,h),(h&4194240)===h)break;for(o=i.eventTimes,E=-1;0<h;){var x=31-br(h);T=1<<x,x=o[x],x>E&&(E=x),h&=~T}if(h=E,h=Rt()-h,h=(120>h?120:480>h?480:1080>h?1080:1920>h?1920:3e3>h?3e3:4320>h?4320:1960*o7(h/1960))-h,10<h){i.timeoutHandle=Zp(Rs.bind(null,i,Hn,gi),h);break}Rs(i,Hn,gi);break;case 5:Rs(i,Hn,gi);break;default:throw Error(n(329))}}}return zn(i,Rt()),i.callbackNode===l?p2.bind(null,i):null}function Gm(i,o){var l=Ru;return i.current.memoizedState.isDehydrated&&(Is(i,o).flags|=256),i=fd(i,o),i!==2&&(o=Hn,Hn=l,o!==null&&Wm(o)),i}function Wm(i){Hn===null?Hn=i:Hn.push.apply(Hn,i)}function a7(i){for(var o=i;;){if(o.flags&16384){var l=o.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var h=0;h<l.length;h++){var E=l[h],T=E.getSnapshot;E=E.value;try{if(!_r(T(),E))return!1}catch(x){return!1}}}if(l=o.child,o.subtreeFlags&16384&&l!==null)l.return=o,o=l;else{if(o===i)break;for(;o.sibling===null;){if(o.return===null||o.return===i)return!0;o=o.return}o.sibling.return=o.return,o=o.sibling}}return!0}function Yi(i,o){for(o&=~$m,o&=~od,i.suspendedLanes|=o,i.pingedLanes&=~o,i=i.expirationTimes;0<o;){var l=31-br(o),h=1<<l;i[l]=-1,o&=~h}}function m2(i){if((it&6)!==0)throw Error(n(327));Xo();var o=bc(i,0);if((o&1)===0)return zn(i,Rt()),null;var l=fd(i,o);if(i.tag!==0&&l===2){var h=Cp(i);h!==0&&(o=h,l=Gm(i,h))}if(l===1)throw l=Iu,Is(i,0),Yi(i,o),zn(i,Rt()),l;if(l===6)throw Error(n(345));return i.finishedWork=i.current.alternate,i.finishedLanes=o,Rs(i,Hn,gi),zn(i,Rt()),null}function Xm(i,o){var l=it;it|=1;try{return i(o)}finally{it=l,it===0&&(Wo=Rt()+500,Uc&&Ui())}}function Os(i){Vi!==null&&Vi.tag===0&&(it&6)===0&&Xo();var o=it;it|=1;var l=lr.transition,h=ct;try{if(lr.transition=null,ct=1,i)return i()}finally{ct=h,lr.transition=l,it=o,(it&6)===0&&Ui()}}function Km(){Kn=Go.current,_t(Go)}function Is(i,o){i.finishedWork=null,i.finishedLanes=0;var l=i.timeoutHandle;if(l!==-1&&(i.timeoutHandle=-1,FB(l)),Ht!==null)for(l=Ht.return;l!==null;){var h=l;switch(sm(h),h.tag){case 1:h=h.type.childContextTypes,h!=null&&Fc();break;case 3:Vo(),_t(Fn),_t(bn),ym();break;case 5:gm(h);break;case 4:Vo();break;case 13:_t(Nt);break;case 19:_t(Nt);break;case 10:dm(h.type._context);break;case 22:case 23:Km()}l=l.return}if(Zt=i,Ht=i=Gi(i.current,null),ln=Kn=o,qt=0,Iu=null,$m=od=Ps=0,Hn=Ru=null,vs!==null){for(o=0;o<vs.length;o++)if(l=vs[o],h=l.interleaved,h!==null){l.interleaved=null;var E=h.next,T=l.pending;if(T!==null){var x=T.next;T.next=E,h.next=x}l.pending=h}vs=null}return i}function g2(i,o){do{var l=Ht;try{if(cm(),Xc.current=Zc,Kc){for(var h=kt.memoizedState;h!==null;){var E=h.queue;E!==null&&(E.pending=null),h=h.next}Kc=!1}if(ks=0,Jt=Vt=kt=null,Cu=!1,vu=0,jm.current=null,l===null||l.return===null){qt=1,Iu=o,Ht=null;break}e:{var T=i,x=l.return,R=l,U=o;if(o=ln,R.flags|=32768,U!==null&&typeof U=="object"&&typeof U.then=="function"){var Z=U,ce=R,me=ce.tag;if((ce.mode&1)===0&&(me===0||me===11||me===15)){var ue=ce.alternate;ue?(ce.updateQueue=ue.updateQueue,ce.memoizedState=ue.memoizedState,ce.lanes=ue.lanes):(ce.updateQueue=null,ce.memoizedState=null)}var Ae=zx(x);if(Ae!==null){Ae.flags&=-257,jx(Ae,x,R,T,o),Ae.mode&1&&Hx(T,Z,o),o=Ae,U=Z;var ke=o.updateQueue;if(ke===null){var Oe=new Set;Oe.add(U),o.updateQueue=Oe}else ke.add(U);break e}else{if((o&1)===0){Hx(T,Z,o),Qm();break e}U=Error(n(426))}}else if(At&&R.mode&1){var Lt=zx(x);if(Lt!==null){(Lt.flags&65536)===0&&(Lt.flags|=256),jx(Lt,x,R,T,o),um(qo(U,R));break e}}T=U=qo(U,R),qt!==4&&(qt=2),Ru===null?Ru=[T]:Ru.push(T),T=x;do{switch(T.tag){case 3:T.flags|=65536,o&=-o,T.lanes|=o;var W=Bx(T,U,o);dx(T,W);break e;case 1:R=U;var j=T.type,K=T.stateNode;if((T.flags&128)===0&&(typeof j.getDerivedStateFromError=="function"||K!==null&&typeof K.componentDidCatch=="function"&&($i===null||!$i.has(K)))){T.flags|=65536,o&=-o,T.lanes|=o;var Te=Ux(T,R,o);dx(T,Te);break e}}T=T.return}while(T!==null)}T2(l)}catch(De){o=De,Ht===l&&l!==null&&(Ht=l=l.return);continue}break}while(!0)}function E2(){var i=sd.current;return sd.current=Zc,i===null?Zc:i}function Qm(){(qt===0||qt===3||qt===2)&&(qt=4),Zt===null||(Ps&268435455)===0&&(od&268435455)===0||Yi(Zt,ln)}function fd(i,o){var l=it;it|=2;var h=E2();(Zt!==i||ln!==o)&&(gi=null,Is(i,o));do try{u7();break}catch(E){g2(i,E)}while(!0);if(cm(),it=l,sd.current=h,Ht!==null)throw Error(n(261));return Zt=null,ln=0,qt}function u7(){for(;Ht!==null;)y2(Ht)}function l7(){for(;Ht!==null&&!L9();)y2(Ht)}function y2(i){var o=S2(i.alternate,i,Kn);i.memoizedProps=i.pendingProps,o===null?T2(i):Ht=o,jm.current=null}function T2(i){var o=i;do{var l=o.alternate;if(i=o.return,(o.flags&32768)===0){if(l=t7(l,o,Kn),l!==null){Ht=l;return}}else{if(l=n7(l,o),l!==null){l.flags&=32767,Ht=l;return}if(i!==null)i.flags|=32768,i.subtreeFlags=0,i.deletions=null;else{qt=6,Ht=null;return}}if(o=o.sibling,o!==null){Ht=o;return}Ht=o=i}while(o!==null);qt===0&&(qt=5)}function Rs(i,o,l){var h=ct,E=lr.transition;try{lr.transition=null,ct=1,c7(i,o,l,h)}finally{lr.transition=E,ct=h}return null}function c7(i,o,l,h){do Xo();while(Vi!==null);if((it&6)!==0)throw Error(n(327));l=i.finishedWork;var E=i.finishedLanes;if(l===null)return null;if(i.finishedWork=null,i.finishedLanes=0,l===i.current)throw Error(n(177));i.callbackNode=null,i.callbackPriority=0;var T=l.lanes|l.childLanes;if(V9(i,T),i===Zt&&(Ht=Zt=null,ln=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||ud||(ud=!0,x2(gc,function(){return Xo(),null})),T=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||T){T=lr.transition,lr.transition=null;var x=ct;ct=1;var R=it;it|=4,jm.current=null,i7(i,l),l2(l,i),PB(Qp),xc=!!Kp,Qp=Kp=null,i.current=l,s7(l),D9(),it=R,ct=x,lr.transition=T}else i.current=l;if(ud&&(ud=!1,Vi=i,ld=E),T=i.pendingLanes,T===0&&($i=null),B9(l.stateNode),zn(i,Rt()),o!==null)for(h=i.onRecoverableError,l=0;l<o.length;l++)E=o[l],h(E.value,{componentStack:E.stack,digest:E.digest});if(ad)throw ad=!1,i=qm,qm=null,i;return(ld&1)!==0&&i.tag!==0&&Xo(),T=i.pendingLanes,(T&1)!==0?i===Ym?Lu++:(Lu=0,Ym=i):Lu=0,Ui(),null}function Xo(){if(Vi!==null){var i=aS(ld),o=lr.transition,l=ct;try{if(lr.transition=null,ct=16>i?16:i,Vi===null)var h=!1;else{if(i=Vi,Vi=null,ld=0,(it&6)!==0)throw Error(n(331));var E=it;for(it|=4,Ne=i.current;Ne!==null;){var T=Ne,x=T.child;if((Ne.flags&16)!==0){var R=T.deletions;if(R!==null){for(var U=0;U<R.length;U++){var Z=R[U];for(Ne=Z;Ne!==null;){var ce=Ne;switch(ce.tag){case 0:case 11:case 15:Ou(8,ce,T)}var me=ce.child;if(me!==null)me.return=ce,Ne=me;else for(;Ne!==null;){ce=Ne;var ue=ce.sibling,Ae=ce.return;if(i2(ce),ce===Z){Ne=null;break}if(ue!==null){ue.return=Ae,Ne=ue;break}Ne=Ae}}}var ke=T.alternate;if(ke!==null){var Oe=ke.child;if(Oe!==null){ke.child=null;do{var Lt=Oe.sibling;Oe.sibling=null,Oe=Lt}while(Oe!==null)}}Ne=T}}if((T.subtreeFlags&2064)!==0&&x!==null)x.return=T,Ne=x;else e:for(;Ne!==null;){if(T=Ne,(T.flags&2048)!==0)switch(T.tag){case 0:case 11:case 15:Ou(9,T,T.return)}var W=T.sibling;if(W!==null){W.return=T.return,Ne=W;break e}Ne=T.return}}var j=i.current;for(Ne=j;Ne!==null;){x=Ne;var K=x.child;if((x.subtreeFlags&2064)!==0&&K!==null)K.return=x,Ne=K;else e:for(x=j;Ne!==null;){if(R=Ne,(R.flags&2048)!==0)try{switch(R.tag){case 0:case 11:case 15:id(9,R)}}catch(De){Pt(R,R.return,De)}if(R===x){Ne=null;break e}var Te=R.sibling;if(Te!==null){Te.return=R.return,Ne=Te;break e}Ne=R.return}}if(it=E,Ui(),qr&&typeof qr.onPostCommitFiberRoot=="function")try{qr.onPostCommitFiberRoot(Ec,i)}catch(De){}h=!0}return h}finally{ct=l,lr.transition=o}}return!1}function b2(i,o,l){o=qo(l,o),o=Bx(i,o,1),i=zi(i,o,1),o=kn(),i!==null&&(iu(i,1,o),zn(i,o))}function Pt(i,o,l){if(i.tag===3)b2(i,i,l);else for(;o!==null;){if(o.tag===3){b2(o,i,l);break}else if(o.tag===1){var h=o.stateNode;if(typeof o.type.getDerivedStateFromError=="function"||typeof h.componentDidCatch=="function"&&($i===null||!$i.has(h))){i=qo(l,i),i=Ux(o,i,1),o=zi(o,i,1),i=kn(),o!==null&&(iu(o,1,i),zn(o,i));break}}o=o.return}}function d7(i,o,l){var h=i.pingCache;h!==null&&h.delete(o),o=kn(),i.pingedLanes|=i.suspendedLanes&l,Zt===i&&(ln&l)===l&&(qt===4||qt===3&&(ln&130023424)===ln&&500>Rt()-Vm?Is(i,0):$m|=l),zn(i,o)}function _2(i,o){o===0&&((i.mode&1)===0?o=1:(o=Tc,Tc<<=1,(Tc&130023424)===0&&(Tc=4194304)));var l=kn();i=hi(i,o),i!==null&&(iu(i,o,l),zn(i,l))}function f7(i){var o=i.memoizedState,l=0;o!==null&&(l=o.retryLane),_2(i,l)}function h7(i,o){var l=0;switch(i.tag){case 13:var h=i.stateNode,E=i.memoizedState;E!==null&&(l=E.retryLane);break;case 19:h=i.stateNode;break;default:throw Error(n(314))}h!==null&&h.delete(o),_2(i,l)}var S2;S2=function(i,o,l){if(i!==null)if(i.memoizedProps!==o.pendingProps||Fn.current)Un=!0;else{if((i.lanes&l)===0&&(o.flags&128)===0)return Un=!1,e7(i,o,l);Un=(i.flags&131072)!==0}else Un=!1,At&&(o.flags&1048576)!==0&&tx(o,zc,o.index);switch(o.lanes=0,o.tag){case 2:var h=o.type;nd(i,o),i=o.pendingProps;var E=Fo(o,bn.current);$o(o,l),E=_m(null,o,h,i,E,l);var T=Sm();return o.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(o.tag=1,o.memoizedState=null,o.updateQueue=null,Bn(h)?(T=!0,Bc(o)):T=!1,o.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,pm(o),E.updater=ed,o.stateNode=E,E._reactInternals=o,Nm(o,h,i,l),o=Im(null,o,h,!0,T,l)):(o.tag=0,At&&T&&im(o),Nn(null,o,E,l),o=o.child),o;case 16:h=o.elementType;e:{switch(nd(i,o),i=o.pendingProps,E=h._init,h=E(h._payload),o.type=h,E=o.tag=m7(h),i=xr(h,i),E){case 0:o=Om(null,o,h,i,l);break e;case 1:o=Wx(null,o,h,i,l);break e;case 11:o=$x(null,o,h,i,l);break e;case 14:o=Vx(null,o,h,xr(h.type,i),l);break e}throw Error(n(306,h,""))}return o;case 0:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Om(i,o,h,E,l);case 1:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),Wx(i,o,h,E,l);case 3:e:{if(Xx(o),i===null)throw Error(n(387));h=o.pendingProps,T=o.memoizedState,E=T.element,cx(i,o),Gc(o,h,null,l);var x=o.memoizedState;if(h=x.element,T.isDehydrated)if(T={element:h,isDehydrated:!1,cache:x.cache,pendingSuspenseBoundaries:x.pendingSuspenseBoundaries,transitions:x.transitions},o.updateQueue.baseState=T,o.memoizedState=T,o.flags&256){E=qo(Error(n(423)),o),o=Kx(i,o,h,l,E);break e}else if(h!==E){E=qo(Error(n(424)),o),o=Kx(i,o,h,l,E);break e}else for(Xn=Mi(o.stateNode.containerInfo.firstChild),Wn=o,At=!0,Sr=null,l=ux(o,null,h,l),o.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(Ho(),h===E){o=mi(i,o,l);break e}Nn(i,o,h,l)}o=o.child}return o;case 5:return hx(o),i===null&&am(o),h=o.type,E=o.pendingProps,T=i!==null?i.memoizedProps:null,x=E.children,Jp(h,E)?x=null:T!==null&&Jp(h,T)&&(o.flags|=32),Gx(i,o),Nn(i,o,x,l),o.child;case 6:return i===null&&am(o),null;case 13:return Qx(i,o,l);case 4:return mm(o,o.stateNode.containerInfo),h=o.pendingProps,i===null?o.child=zo(o,null,h,l):Nn(i,o,h,l),o.child;case 11:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),$x(i,o,h,E,l);case 7:return Nn(i,o,o.pendingProps,l),o.child;case 8:return Nn(i,o,o.pendingProps.children,l),o.child;case 12:return Nn(i,o,o.pendingProps.children,l),o.child;case 10:e:{if(h=o.type._context,E=o.pendingProps,T=o.memoizedProps,x=E.value,Et(Vc,h._currentValue),h._currentValue=x,T!==null)if(_r(T.value,x)){if(T.children===E.children&&!Fn.current){o=mi(i,o,l);break e}}else for(T=o.child,T!==null&&(T.return=o);T!==null;){var R=T.dependencies;if(R!==null){x=T.child;for(var U=R.firstContext;U!==null;){if(U.context===h){if(T.tag===1){U=pi(-1,l&-l),U.tag=2;var Z=T.updateQueue;if(Z!==null){Z=Z.shared;var ce=Z.pending;ce===null?U.next=U:(U.next=ce.next,ce.next=U),Z.pending=U}}T.lanes|=l,U=T.alternate,U!==null&&(U.lanes|=l),fm(T.return,l,o),R.lanes|=l;break}U=U.next}}else if(T.tag===10)x=T.type===o.type?null:T.child;else if(T.tag===18){if(x=T.return,x===null)throw Error(n(341));x.lanes|=l,R=x.alternate,R!==null&&(R.lanes|=l),fm(x,l,o),x=T.sibling}else x=T.child;if(x!==null)x.return=T;else for(x=T;x!==null;){if(x===o){x=null;break}if(T=x.sibling,T!==null){T.return=x.return,x=T;break}x=x.return}T=x}Nn(i,o,E.children,l),o=o.child}return o;case 9:return E=o.type,h=o.pendingProps.children,$o(o,l),E=ar(E),h=h(E),o.flags|=1,Nn(i,o,h,l),o.child;case 14:return h=o.type,E=xr(h,o.pendingProps),E=xr(h.type,E),Vx(i,o,h,E,l);case 15:return qx(i,o,o.type,o.pendingProps,l);case 17:return h=o.type,E=o.pendingProps,E=o.elementType===h?E:xr(h,E),nd(i,o),o.tag=1,Bn(h)?(i=!0,Bc(o)):i=!1,$o(o,l),Mx(o,h,E),Nm(o,h,E,l),Im(null,o,h,!0,i,l);case 19:return Zx(i,o,l);case 22:return Yx(i,o,l)}throw Error(n(156,o.tag))};function x2(i,o){return nS(i,o)}function p7(i,o,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=o,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=h,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cr(i,o,l,h){return new p7(i,o,l,h)}function Jm(i){return i=i.prototype,!(!i||!i.isReactComponent)}function m7(i){if(typeof i=="function")return Jm(i)?1:0;if(i!=null){if(i=i.$$typeof,i===pe)return 11;if(i===oe)return 14}return 2}function Gi(i,o){var l=i.alternate;return l===null?(l=cr(i.tag,o,i.key,i.mode),l.elementType=i.elementType,l.type=i.type,l.stateNode=i.stateNode,l.alternate=i,i.alternate=l):(l.pendingProps=o,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,o=i.dependencies,l.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext},l.sibling=i.sibling,l.index=i.index,l.ref=i.ref,l}function hd(i,o,l,h,E,T){var x=2;if(h=i,typeof i=="function")Jm(i)&&(x=1);else if(typeof i=="string")x=5;else e:switch(i){case q:return Ls(l.children,E,T,o);case ne:x=8,E|=8;break;case de:return i=cr(12,l,o,E|2),i.elementType=de,i.lanes=T,i;case ve:return i=cr(13,l,o,E),i.elementType=ve,i.lanes=T,i;case re:return i=cr(19,l,o,E),i.elementType=re,i.lanes=T,i;case ae:return pd(l,E,T,o);default:if(typeof i=="object"&&i!==null)switch(i.$$typeof){case V:x=10;break e;case se:x=9;break e;case pe:x=11;break e;case oe:x=14;break e;case xe:x=16,h=null;break e}throw Error(n(130,i==null?i:typeof i,""))}return o=cr(x,l,o,E),o.elementType=i,o.type=h,o.lanes=T,o}function Ls(i,o,l,h){return i=cr(7,i,h,o),i.lanes=l,i}function pd(i,o,l,h){return i=cr(22,i,h,o),i.elementType=ae,i.lanes=l,i.stateNode={isHidden:!1},i}function Zm(i,o,l){return i=cr(6,i,null,o),i.lanes=l,i}function e0(i,o,l){return o=cr(4,i.children!==null?i.children:[],i.key,o),o.lanes=l,o.stateNode={containerInfo:i.containerInfo,pendingChildren:null,implementation:i.implementation},o}function g7(i,o,l,h,E){this.tag=o,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=vp(0),this.expirationTimes=vp(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=vp(0),this.identifierPrefix=h,this.onRecoverableError=E,this.mutableSourceEagerHydrationData=null}function t0(i,o,l,h,E,T,x,R,U){return i=new g7(i,o,l,R,U),o===1?(o=1,T===!0&&(o|=8)):o=0,T=cr(3,null,null,o),i.current=T,T.stateNode=i,T.memoizedState={element:h,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},pm(T),i}function E7(i,o,l){var h=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:L,key:h==null?null:""+h,children:i,containerInfo:o,implementation:l}}function w2(i){if(!i)return Bi;i=i._reactInternals;e:{if(Ss(i)!==i||i.tag!==1)throw Error(n(170));var o=i;do{switch(o.tag){case 3:o=o.stateNode.context;break e;case 1:if(Bn(o.type)){o=o.stateNode.__reactInternalMemoizedMergedChildContext;break e}}o=o.return}while(o!==null);throw Error(n(171))}if(i.tag===1){var l=i.type;if(Bn(l))return JS(i,l,o)}return o}function A2(i,o,l,h,E,T,x,R,U){return i=t0(l,h,!0,i,E,T,x,R,U),i.context=w2(null),l=i.current,h=kn(),E=qi(l),T=pi(h,E),T.callback=o!=null?o:null,zi(l,T,E),i.current.lanes=E,iu(i,E,h),zn(i,h),i}function md(i,o,l,h){var E=o.current,T=kn(),x=qi(E);return l=w2(l),o.context===null?o.context=l:o.pendingContext=l,o=pi(T,x),o.payload={element:i},h=h===void 0?null:h,h!==null&&(o.callback=h),i=zi(E,o,x),i!==null&&(Cr(i,E,x,T),Yc(i,E,x)),x}function gd(i){return i=i.current,i.child?(i.child.tag===5,i.child.stateNode):null}function C2(i,o){if(i=i.memoizedState,i!==null&&i.dehydrated!==null){var l=i.retryLane;i.retryLane=l!==0&&l<o?l:o}}function n0(i,o){C2(i,o),(i=i.alternate)&&C2(i,o)}function y7(){return null}var v2=typeof reportError=="function"?reportError:function(i){console.error(i)};function r0(i){this._internalRoot=i}Ed.prototype.render=r0.prototype.render=function(i){var o=this._internalRoot;if(o===null)throw Error(n(409));md(i,o,null,null)},Ed.prototype.unmount=r0.prototype.unmount=function(){var i=this._internalRoot;if(i!==null){this._internalRoot=null;var o=i.containerInfo;Os(function(){md(null,i,null,null)}),o[li]=null}};function Ed(i){this._internalRoot=i}Ed.prototype.unstable_scheduleHydration=function(i){if(i){var o=cS();i={blockedOn:null,target:i,priority:o};for(var l=0;l<Ri.length&&o!==0&&o<Ri[l].priority;l++);Ri.splice(l,0,i),l===0&&hS(i)}};function i0(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11)}function yd(i){return!(!i||i.nodeType!==1&&i.nodeType!==9&&i.nodeType!==11&&(i.nodeType!==8||i.nodeValue!==" react-mount-point-unstable "))}function N2(){}function T7(i,o,l,h,E){if(E){if(typeof h=="function"){var T=h;h=function(){var Z=gd(x);T.call(Z)}}var x=A2(o,h,i,0,null,!1,!1,"",N2);return i._reactRootContainer=x,i[li]=x.current,yu(i.nodeType===8?i.parentNode:i),Os(),x}for(;E=i.lastChild;)i.removeChild(E);if(typeof h=="function"){var R=h;h=function(){var Z=gd(U);R.call(Z)}}var U=t0(i,0,!1,null,null,!1,!1,"",N2);return i._reactRootContainer=U,i[li]=U.current,yu(i.nodeType===8?i.parentNode:i),Os(function(){md(o,U,l,h)}),U}function Td(i,o,l,h,E){var T=l._reactRootContainer;if(T){var x=T;if(typeof E=="function"){var R=E;E=function(){var U=gd(x);R.call(U)}}md(o,x,i,E)}else x=T7(l,o,i,E,h);return gd(x)}uS=function(i){switch(i.tag){case 3:var o=i.stateNode;if(o.current.memoizedState.isDehydrated){var l=ru(o.pendingLanes);l!==0&&(Np(o,l|1),zn(o,Rt()),(it&6)===0&&(Wo=Rt()+500,Ui()))}break;case 13:Os(function(){var h=hi(i,1);if(h!==null){var E=kn();Cr(h,i,1,E)}}),n0(i,1)}},kp=function(i){if(i.tag===13){var o=hi(i,134217728);if(o!==null){var l=kn();Cr(o,i,134217728,l)}n0(i,134217728)}},lS=function(i){if(i.tag===13){var o=qi(i),l=hi(i,o);if(l!==null){var h=kn();Cr(l,i,o,h)}n0(i,o)}},cS=function(){return ct},dS=function(i,o){var l=ct;try{return ct=i,o()}finally{ct=l}},_p=function(i,o,l){switch(o){case"input":if(vt(i,l),o=l.name,l.type==="radio"&&o!=null){for(l=i;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+o)+'][type="radio"]'),o=0;o<l.length;o++){var h=l[o];if(h!==i&&h.form===i.form){var E=Mc(h);if(!E)throw Error(n(90));rn(h),vt(h,E)}}}break;case"textarea":rt(i,l);break;case"select":o=l.value,o!=null&&we(i,!!l.multiple,o,!1)}},X_=Xm,K_=Os;var b7={usingClientEntryPoint:!1,Events:[_u,Do,Mc,G_,W_,Xm]},Du={findFiberByHostInstance:xs,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},_7={bundleType:Du.bundleType,version:Du.version,rendererPackageName:Du.rendererPackageName,rendererConfig:Du.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:H.ReactCurrentDispatcher,findHostInstanceByFiber:function(i){return i=eS(i),i===null?null:i.stateNode},findFiberByHostInstance:Du.findFiberByHostInstance||y7,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 bd=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!bd.isDisabled&&bd.supportsFiber)try{Ec=bd.inject(_7),qr=bd}catch(i){}}return On.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=b7,On.createPortal=function(i,o){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!i0(o))throw Error(n(200));return E7(i,o,null,l)},On.createRoot=function(i,o){if(!i0(i))throw Error(n(299));var l=!1,h="",E=v2;return o!=null&&(o.unstable_strictMode===!0&&(l=!0),o.identifierPrefix!==void 0&&(h=o.identifierPrefix),o.onRecoverableError!==void 0&&(E=o.onRecoverableError)),o=t0(i,1,!1,null,null,l,!1,h,E),i[li]=o.current,yu(i.nodeType===8?i.parentNode:i),new r0(o)},On.findDOMNode=function(i){if(i==null)return null;if(i.nodeType===1)return i;var o=i._reactInternals;if(o===void 0)throw typeof i.render=="function"?Error(n(188)):(i=Object.keys(i).join(","),Error(n(268,i)));return i=eS(o),i=i===null?null:i.stateNode,i},On.flushSync=function(i){return Os(i)},On.hydrate=function(i,o,l){if(!yd(o))throw Error(n(200));return Td(null,i,o,!0,l)},On.hydrateRoot=function(i,o,l){if(!i0(i))throw Error(n(405));var h=l!=null&&l.hydratedSources||null,E=!1,T="",x=v2;if(l!=null&&(l.unstable_strictMode===!0&&(E=!0),l.identifierPrefix!==void 0&&(T=l.identifierPrefix),l.onRecoverableError!==void 0&&(x=l.onRecoverableError)),o=A2(o,null,i,1,l!=null?l:null,E,!1,T,x),i[li]=o.current,yu(i),h)for(i=0;i<h.length;i++)l=h[i],E=l._getVersion,E=E(l._source),o.mutableSourceEagerHydrationData==null?o.mutableSourceEagerHydrationData=[l,E]:o.mutableSourceEagerHydrationData.push(l,E);return new Ed(o)},On.render=function(i,o,l){if(!yd(o))throw Error(n(200));return Td(null,i,o,!1,l)},On.unmountComponentAtNode=function(i){if(!yd(i))throw Error(n(40));return i._reactRootContainer?(Os(function(){Td(null,null,i,!1,function(){i._reactRootContainer=null,i[li]=null})}),!0):!1},On.unstable_batchedUpdates=Xm,On.unstable_renderSubtreeIntoContainer=function(i,o,l,h){if(!yd(l))throw Error(n(200));if(i==null||i._reactInternals===void 0)throw Error(n(38));return Td(i,o,l,!1,h)},On.version="18.3.1-next-f1338f8080-20240426",On}var T1;function b1(){if(T1)return Sf.exports;T1=1;function e(){if(!(typeof __REACT_DEVTOOLS_GLOBAL_HOOK__=="undefined"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(t){console.error(t)}}return e(),Sf.exports=SN(),Sf.exports}var Ws=b1();function _1(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(t=0;t<s;t++)e[t]&&(n=_1(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function G(){for(var e,t,n=0,r="",s=arguments.length;n<s;n++)(e=arguments[n])&&(t=_1(e))&&(r&&(r+=" "),r+=t);return r}var S1={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},x1=Ki.createContext&&Ki.createContext(S1),xN=["attr","size","title"];function wN(e,t){if(e==null)return{};var n=AN(e,t),r,s;if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(s=0;s<a.length;s++)r=a[s],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function AN(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 fl(){return fl=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},fl.apply(this,arguments)}function w1(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(s){return Object.getOwnPropertyDescriptor(e,s).enumerable})),n.push.apply(n,r)}return n}function hl(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?w1(Object(n),!0).forEach(function(r){CN(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):w1(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function CN(e,t,n){return t=vN(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vN(e){var t=NN(e,"string");return typeof t=="symbol"?t:t+""}function NN(e,t){if(typeof e!="object"||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t);if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(t==="string"?String:Number)(e)}function A1(e){return e&&e.map((t,n)=>Ki.createElement(t.tag,hl({key:n},t.attr),A1(t.child)))}function St(e){return t=>Ki.createElement(kN,fl({attr:hl({},e.attr)},t),A1(e.child))}function kN(e){var t=n=>{var{attr:r,size:s,title:a}=e,u=wN(e,xN),c=s||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Ki.createElement("svg",fl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:hl(hl({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),a&&Ki.createElement("title",null,a),e.children)};return x1!==void 0?Ki.createElement(x1.Consumer,null,n=>t(n)):t(S1)}function PN(e){return St({attr:{fill:"none",viewBox:"0 0 24 24",strokeWidth:"1.5",stroke:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{strokeLinecap:"round",strokeLinejoin:"round",d:"M9.813 15.904 9 18.75l-.813-2.846a4.5 4.5 0 0 0-3.09-3.09L2.25 12l2.846-.813a4.5 4.5 0 0 0 3.09-3.09L9 5.25l.813 2.846a4.5 4.5 0 0 0 3.09 3.09L15.75 12l-2.846.813a4.5 4.5 0 0 0-3.09 3.09ZM18.259 8.715 18 9.75l-.259-1.035a3.375 3.375 0 0 0-2.455-2.456L14.25 6l1.036-.259a3.375 3.375 0 0 0 2.455-2.456L18 2.25l.259 1.035a3.375 3.375 0 0 0 2.456 2.456L21.75 6l-1.035.259a3.375 3.375 0 0 0-2.456 2.456ZM16.894 20.567 16.5 21.75l-.394-1.183a2.25 2.25 0 0 0-1.423-1.423L13.5 18.75l1.183-.394a2.25 2.25 0 0 0 1.423-1.423l.394-1.183.394 1.183a2.25 2.25 0 0 0 1.423 1.423l1.183.394-1.183.394a2.25 2.25 0 0 0-1.423 1.423Z"},child:[]}]})(e)}const ni=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:s,title:a,disabled:u=!1,onClick:c})=>!n&&!t?null:S.jsx("button",{className:G(e,`${z}-icon-button`),type:r,"aria-label":s,title:a,onClick:c,disabled:u,children:t?S.jsx("img",{className:G(`${z}-icon-image`),src:t,alt:s,loading:"lazy"}):n}),ON="data:image/svg+xml,%3csvg%20width='140'%20height='137'%20viewBox='0%200%20140%20137'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpath%20d='M140%2034.5C140%2040.8513%20135.075%2046%20129%2046C122.925%2046%20118%2040.8513%20118%2034.5C118%2028.1487%20122.925%2023%20129%2023C135.075%2023%20140%2028.1487%20140%2034.5Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%2011.3028C85%205.06042%2090.1487%200%2096.5%200C102.851%200%20108%205.06042%20108%2011.3028V21.6972C108%2027.9396%20102.851%2033%2096.5%2033C90.1487%2033%2085%2027.9396%2085%2021.6972V11.3028Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%2030.0986C36.9601%2025.6719%2036.9601%2018.4948%2041.3868%2014.0682C45.8134%209.64151%2052.9905%209.6415%2057.4172%2014.0682L71.3628%2028.0138C75.7894%2032.4404%2075.7894%2039.6175%2071.3628%2044.0442C66.9361%2048.4708%2059.759%2048.4708%2055.3324%2044.0442L41.3868%2030.0986Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M140%20101C140%2094.9249%20135.075%2090%20129%2090C122.925%2090%20118%2094.9249%20118%20101C118%20107.075%20122.925%20112%20129%20112C135.075%20112%20140%20107.075%20140%20101Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M85%20125.697C85%20131.94%2090.1487%20137%2096.5%20137C102.851%20137%20108%20131.94%20108%20125.697V115.303C108%20109.06%20102.851%20104%2096.5%20104C90.1487%20104%2085%20109.06%2085%20115.303V125.697Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M41.3868%20106.932C36.9601%20111.359%2036.9601%20118.536%2041.3868%20122.963C45.8134%20127.389%2052.9905%20127.39%2057.4172%20122.963L71.3628%20109.017C75.7894%20104.591%2075.7894%2097.4135%2071.3628%2092.9868C66.9361%2088.5602%2059.759%2088.5602%2055.3324%2092.9868L41.3868%20106.932Z'%20fill='%23F3F2EB'/%3e%3cpath%20d='M11.259%2080C5.04084%2080%200%2074.8513%200%2068.5C0%2062.1487%205.04084%2057%2011.259%2057H49.741C55.9592%2057%2061%2062.1487%2061%2068.5C61%2074.8513%2055.9592%2080%2049.741%2080H11.259Z'%20fill='%23F3F2EB'/%3e%3c/svg%3e",IN=({onClick:e})=>{const{globalClassName:t,headerConfig:n,mode:r}=tt(),s=r==="messaging",a=s?"Open Commerce Client":"Open Copilot",u=s?S.jsx(PN,{className:G(t,`${z}-minimized-icon`)}):S.jsx("img",{src:(n==null?void 0:n.logoUrl)||ON,alt:"Copilot",className:G(t,`${z}-minimized-icon-img`)});return S.jsx(ni,{className:G(t,`${z}-minimized-button`),ariaLabel:a,title:a,icon:u,onClick:e})},RN=()=>{const{globalClassName:e,themeVariables:t}=tt(),n=()=>{pa(!1),ei(!0)};return Ws.createPortal(S.jsx("div",{className:G(e,`${z}-minimized-container`),style:t,children:S.jsx(IN,{onClick:n})}),document.body)};function C1(e){return St({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 v1(e){return St({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M6 19h12v2H6z"},child:[]}]})(e)}function Xs(e){return St({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 LN(e){return St({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 N1(e){return St({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 DN(e){return St({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 MN(e){return St({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 FN(e){return St({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 BN(e){return St({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 UN(e){return St({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 HN=e=>({[`${jn}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${jn}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${jn}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${jn}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${jn}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${jn}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),k1=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>S.jsx("button",{"aria-label":t,title:t,className:G(e,`${z}-close-button`),disabled:r,onClick:n,children:S.jsx("svg",{role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:S.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"})})}),pl=({className:e,children:t,type:n,disabled:r=!1,onClick:s})=>S.jsx("button",{className:G(`${z}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:s,children:t}),zN=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl;return n?S.jsx("img",{className:G(`${z}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):S.jsx(Xs,{size:"16px"})},jN=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:s})=>{if((t==null?void 0:t.buttonType)==="icon")return S.jsx(ni,{className:G(e,n,`cim-${r}-component`,`${z}-search-button-icon`),type:"submit",disabled:s,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:S.jsx(Xs,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl});const a=(t==null?void 0:t.buttonType)==="icon-text";return S.jsxs(pl,{className:G(e,n,`cim-${r}-component`,`${z}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:s,children:[a&&S.jsx(zN,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function $N(e){return St({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"path",attr:{d:"M8 9h8"},child:[]},{tag:"path",attr:{d:"M8 13h6"},child:[]},{tag:"path",attr:{d:"M13 18l-5 3v-3h-2a3 3 0 0 1 -3 -3v-8a3 3 0 0 1 3 -3h12a3 3 0 0 1 3 3v6"},child:[]},{tag:"path",attr:{d:"M17 17v5"},child:[]},{tag:"path",attr:{d:"M21 17v5"},child:[]}]})(e)}const VN=()=>{const{messages:e}=er(),{handleCancel:t}=Or();return{cancelRequest:B.useCallback(()=>{if(!(e!=null&&e.length))return null;const r=e[e.length-1],s=r.eventSourceId||r.id;t(s)},[t,e])}},qN=({isLoading:e})=>{const{globalClassName:t,searchConfig:n}=tt(),{cancelRequest:r}=VN();return n!=null&&n.enableCancelSearch?S.jsx(ni,{className:G(t,`${z}-cancel-button`),ariaLabel:"Cancel Copilot chat processing",title:"Cancel Copilot request",icon:S.jsx($N,{}),disabled:!e,onClick:r}):null};function tU(){}function nU(){}function P1(e){const t=[],n=String(e||"");let r=n.indexOf(","),s=0,a=!1;for(;!a;){r===-1&&(r=n.length,a=!0);const u=n.slice(s,r).trim();(u||!a)&&t.push(u),s=r+1,r=n.indexOf(",",s)}return t}function O1(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const YN=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,GN=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,WN={};function I1(e,t){return(WN.jsx?GN:YN).test(e)}const XN=/[ \t\n\f\r]/g;function KN(e){return typeof e=="object"?e.type==="text"?R1(e.value):!1:R1(e)}function R1(e){return e.replace(XN,"")===""}class Ea{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ea.prototype.normal={},Ea.prototype.property={},Ea.prototype.space=void 0;function L1(e,t){const n={},r={};for(const s of e)Object.assign(n,s.property),Object.assign(r,s.normal);return new Ea(n,r,t)}function ya(e){return e.toLowerCase()}class In{constructor(t,n){this.attribute=n,this.property=t}}In.prototype.attribute="",In.prototype.booleanish=!1,In.prototype.boolean=!1,In.prototype.commaOrSpaceSeparated=!1,In.prototype.commaSeparated=!1,In.prototype.defined=!1,In.prototype.mustUseProperty=!1,In.prototype.number=!1,In.prototype.overloadedBoolean=!1,In.prototype.property="",In.prototype.spaceSeparated=!1,In.prototype.space=void 0;let QN=0;const We=ss(),Bt=ss(),Af=ss(),Ee=ss(),dt=ss(),is=ss(),$n=ss();function ss(){return Mu(2,++QN)}const Cf=Object.freeze(Object.defineProperty({__proto__:null,boolean:We,booleanish:Bt,commaOrSpaceSeparated:$n,commaSeparated:is,number:Ee,overloadedBoolean:Af,spaceSeparated:dt},Symbol.toStringTag,{value:"Module"})),vf=Object.keys(Cf);class Nf extends In{constructor(t,n,r,s){let a=-1;if(super(t,n),D1(this,"space",s),typeof r=="number")for(;++a<vf.length;){const u=vf[a];D1(this,vf[a],(r&Cf[u])===Cf[u])}}}Nf.prototype.defined=!0;function D1(e,t,n){n&&(e[t]=n)}function Ks(e){const t={},n={};for(const[r,s]of Object.entries(e.properties)){const a=new Nf(r,e.transform(e.attributes||{},r),s,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(a.mustUseProperty=!0),t[r]=a,n[ya(r)]=r,n[ya(a.attribute)]=r}return new Ea(t,n,e.space)}const M1=Ks({properties:{ariaActiveDescendant:null,ariaAtomic:Bt,ariaAutoComplete:null,ariaBusy:Bt,ariaChecked:Bt,ariaColCount:Ee,ariaColIndex:Ee,ariaColSpan:Ee,ariaControls:dt,ariaCurrent:null,ariaDescribedBy:dt,ariaDetails:null,ariaDisabled:Bt,ariaDropEffect:dt,ariaErrorMessage:null,ariaExpanded:Bt,ariaFlowTo:dt,ariaGrabbed:Bt,ariaHasPopup:null,ariaHidden:Bt,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:dt,ariaLevel:Ee,ariaLive:null,ariaModal:Bt,ariaMultiLine:Bt,ariaMultiSelectable:Bt,ariaOrientation:null,ariaOwns:dt,ariaPlaceholder:null,ariaPosInSet:Ee,ariaPressed:Bt,ariaReadOnly:Bt,ariaRelevant:null,ariaRequired:Bt,ariaRoleDescription:dt,ariaRowCount:Ee,ariaRowIndex:Ee,ariaRowSpan:Ee,ariaSelected:Bt,ariaSetSize:Ee,ariaSort:null,ariaValueMax:Ee,ariaValueMin:Ee,ariaValueNow:Ee,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function F1(e,t){return t in e?e[t]:t}function B1(e,t){return F1(e,t.toLowerCase())}const JN=Ks({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:is,acceptCharset:dt,accessKey:dt,action:null,allow:null,allowFullScreen:We,allowPaymentRequest:We,allowUserMedia:We,alpha:We,alt:null,as:null,async:We,autoCapitalize:null,autoComplete:dt,autoFocus:We,autoPlay:We,blocking:dt,capture:null,charSet:null,checked:We,cite:null,className:dt,closedBy:null,colorSpace:null,cols:Ee,colSpan:Ee,command:null,commandFor:null,content:null,contentEditable:Bt,controls:We,controlsList:dt,coords:Ee|is,crossOrigin:null,data:null,dateTime:null,decoding:null,default:We,defer:We,dir:null,dirName:null,disabled:We,download:Af,draggable:Bt,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:We,formTarget:null,headers:dt,height:Ee,hidden:Af,high:Ee,href:null,hrefLang:null,htmlFor:dt,httpEquiv:dt,id:null,imageSizes:null,imageSrcSet:null,inert:We,inputMode:null,integrity:null,is:null,isMap:We,itemId:null,itemProp:dt,itemRef:dt,itemScope:We,itemType:dt,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:We,low:Ee,manifest:null,max:null,maxLength:Ee,media:null,method:null,min:null,minLength:Ee,multiple:We,muted:We,name:null,nonce:null,noModule:We,noValidate:We,onAbort:null,onAfterPrint:null,onAuxClick:null,onBeforeMatch:null,onBeforePrint:null,onBeforeToggle:null,onBeforeUnload:null,onBlur:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onContextLost:null,onContextMenu:null,onContextRestored:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnded:null,onError:null,onFocus:null,onFormData:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLanguageChange:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadEnd:null,onLoadStart:null,onMessage:null,onMessageError:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRejectionHandled:null,onReset:null,onResize:null,onScroll:null,onScrollEnd:null,onSecurityPolicyViolation:null,onSeeked:null,onSeeking:null,onSelect:null,onSlotChange:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnhandledRejection:null,onUnload:null,onVolumeChange:null,onWaiting:null,onWheel:null,open:We,optimum:Ee,pattern:null,ping:dt,placeholder:null,playsInline:We,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:We,referrerPolicy:null,rel:dt,required:We,reversed:We,rows:Ee,rowSpan:Ee,sandbox:dt,scope:null,scoped:We,seamless:We,selected:We,shadowRootClonable:We,shadowRootCustomElementRegistry:We,shadowRootDelegatesFocus:We,shadowRootMode:null,shadowRootSerializable:We,shape:null,size:Ee,sizes:null,slot:null,span:Ee,spellCheck:Bt,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ee,step:null,style:null,tabIndex:Ee,target:null,title:null,translate:null,type:null,typeMustMatch:We,useMap:null,value:Bt,width:Ee,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:dt,axis:null,background:null,bgColor:null,border:Ee,borderColor:null,bottomMargin:Ee,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:We,declare:We,event:null,face:null,frame:null,frameBorder:null,hSpace:Ee,leftMargin:Ee,link:null,longDesc:null,lowSrc:null,marginHeight:Ee,marginWidth:Ee,noResize:We,noHref:We,noShade:We,noWrap:We,object:null,profile:null,prompt:null,rev:null,rightMargin:Ee,rules:null,scheme:null,scrolling:Bt,standby:null,summary:null,text:null,topMargin:Ee,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ee,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:We,disablePictureInPicture:We,disableRemotePlayback:We,exportParts:is,part:dt,prefix:null,property:null,results:Ee,security:null,unselectable:null},space:"html",transform:B1}),ZN=Ks({attributes:{accentHeight:"accent-height",alignmentBaseline:"alignment-baseline",arabicForm:"arabic-form",baselineShift:"baseline-shift",capHeight:"cap-height",className:"class",clipPath:"clip-path",clipRule:"clip-rule",colorInterpolation:"color-interpolation",colorInterpolationFilters:"color-interpolation-filters",colorProfile:"color-profile",colorRendering:"color-rendering",crossOrigin:"crossorigin",dataType:"datatype",dominantBaseline:"dominant-baseline",enableBackground:"enable-background",fillOpacity:"fill-opacity",fillRule:"fill-rule",floodColor:"flood-color",floodOpacity:"flood-opacity",fontFamily:"font-family",fontSize:"font-size",fontSizeAdjust:"font-size-adjust",fontStretch:"font-stretch",fontStyle:"font-style",fontVariant:"font-variant",fontWeight:"font-weight",glyphName:"glyph-name",glyphOrientationHorizontal:"glyph-orientation-horizontal",glyphOrientationVertical:"glyph-orientation-vertical",hrefLang:"hreflang",horizAdvX:"horiz-adv-x",horizOriginX:"horiz-origin-x",horizOriginY:"horiz-origin-y",imageRendering:"image-rendering",letterSpacing:"letter-spacing",lightingColor:"lighting-color",markerEnd:"marker-end",markerMid:"marker-mid",markerStart:"marker-start",maskType:"mask-type",navDown:"nav-down",navDownLeft:"nav-down-left",navDownRight:"nav-down-right",navLeft:"nav-left",navNext:"nav-next",navPrev:"nav-prev",navRight:"nav-right",navUp:"nav-up",navUpLeft:"nav-up-left",navUpRight:"nav-up-right",onAbort:"onabort",onActivate:"onactivate",onAfterPrint:"onafterprint",onBeforePrint:"onbeforeprint",onBegin:"onbegin",onCancel:"oncancel",onCanPlay:"oncanplay",onCanPlayThrough:"oncanplaythrough",onChange:"onchange",onClick:"onclick",onClose:"onclose",onCopy:"oncopy",onCueChange:"oncuechange",onCut:"oncut",onDblClick:"ondblclick",onDrag:"ondrag",onDragEnd:"ondragend",onDragEnter:"ondragenter",onDragExit:"ondragexit",onDragLeave:"ondragleave",onDragOver:"ondragover",onDragStart:"ondragstart",onDrop:"ondrop",onDurationChange:"ondurationchange",onEmptied:"onemptied",onEnd:"onend",onEnded:"onended",onError:"onerror",onFocus:"onfocus",onFocusIn:"onfocusin",onFocusOut:"onfocusout",onHashChange:"onhashchange",onInput:"oninput",onInvalid:"oninvalid",onKeyDown:"onkeydown",onKeyPress:"onkeypress",onKeyUp:"onkeyup",onLoad:"onload",onLoadedData:"onloadeddata",onLoadedMetadata:"onloadedmetadata",onLoadStart:"onloadstart",onMessage:"onmessage",onMouseDown:"onmousedown",onMouseEnter:"onmouseenter",onMouseLeave:"onmouseleave",onMouseMove:"onmousemove",onMouseOut:"onmouseout",onMouseOver:"onmouseover",onMouseUp:"onmouseup",onMouseWheel:"onmousewheel",onOffline:"onoffline",onOnline:"ononline",onPageHide:"onpagehide",onPageShow:"onpageshow",onPaste:"onpaste",onPause:"onpause",onPlay:"onplay",onPlaying:"onplaying",onPopState:"onpopstate",onProgress:"onprogress",onRateChange:"onratechange",onRepeat:"onrepeat",onReset:"onreset",onResize:"onresize",onScroll:"onscroll",onSeeked:"onseeked",onSeeking:"onseeking",onSelect:"onselect",onShow:"onshow",onStalled:"onstalled",onStorage:"onstorage",onSubmit:"onsubmit",onSuspend:"onsuspend",onTimeUpdate:"ontimeupdate",onToggle:"ontoggle",onUnload:"onunload",onVolumeChange:"onvolumechange",onWaiting:"onwaiting",onZoom:"onzoom",overlinePosition:"overline-position",overlineThickness:"overline-thickness",paintOrder:"paint-order",panose1:"panose-1",pointerEvents:"pointer-events",referrerPolicy:"referrerpolicy",renderingIntent:"rendering-intent",shapeRendering:"shape-rendering",stopColor:"stop-color",stopOpacity:"stop-opacity",strikethroughPosition:"strikethrough-position",strikethroughThickness:"strikethrough-thickness",strokeDashArray:"stroke-dasharray",strokeDashOffset:"stroke-dashoffset",strokeLineCap:"stroke-linecap",strokeLineJoin:"stroke-linejoin",strokeMiterLimit:"stroke-miterlimit",strokeOpacity:"stroke-opacity",strokeWidth:"stroke-width",tabIndex:"tabindex",textAnchor:"text-anchor",textDecoration:"text-decoration",textRendering:"text-rendering",transformOrigin:"transform-origin",typeOf:"typeof",underlinePosition:"underline-position",underlineThickness:"underline-thickness",unicodeBidi:"unicode-bidi",unicodeRange:"unicode-range",unitsPerEm:"units-per-em",vAlphabetic:"v-alphabetic",vHanging:"v-hanging",vIdeographic:"v-ideographic",vMathematical:"v-mathematical",vectorEffect:"vector-effect",vertAdvY:"vert-adv-y",vertOriginX:"vert-origin-x",vertOriginY:"vert-origin-y",wordSpacing:"word-spacing",writingMode:"writing-mode",xHeight:"x-height",playbackOrder:"playbackorder",timelineBegin:"timelinebegin"},properties:{about:$n,accentHeight:Ee,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ee,amplitude:Ee,arabicForm:null,ascent:Ee,attributeName:null,attributeType:null,azimuth:Ee,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ee,by:null,calcMode:null,capHeight:Ee,className: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:Ee,diffuseConstant:Ee,direction:null,display:null,dur:null,divisor:Ee,dominantBaseline:null,download:We,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ee,enableBackground:null,end:null,event:null,exponent:Ee,externalResourcesRequired:null,fill:null,fillOpacity:Ee,fillRule:null,filter:null,filterRes:null,filterUnits:null,floodColor:null,floodOpacity:null,focusable:null,focusHighlight:null,fontFamily:null,fontSize:null,fontSizeAdjust:null,fontStretch:null,fontStyle:null,fontVariant:null,fontWeight:null,format:null,fr:null,from:null,fx:null,fy:null,g1:is,g2:is,glyphName:is,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ee,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ee,horizOriginX:Ee,horizOriginY:Ee,id:null,ideographic:Ee,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ee,k:Ee,k1:Ee,k2:Ee,k3:Ee,k4:Ee,kernelMatrix:$n,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ee,local:null,markerEnd:null,markerMid:null,markerStart:null,markerHeight:null,markerUnits:null,markerWidth:null,mask:null,maskContentUnits:null,maskType:null,maskUnits:null,mathematical:null,max:null,media:null,mediaCharacterEncoding:null,mediaContentEncodings:null,mediaSize:Ee,mediaTime:null,method:null,min:null,mode:null,name:null,navDown:null,navDownLeft:null,navDownRight:null,navLeft:null,navNext:null,navPrev:null,navRight:null,navUp:null,navUpLeft:null,navUpRight:null,numOctaves:null,observer:null,offset:null,onAbort:null,onActivate:null,onAfterPrint:null,onBeforePrint:null,onBegin:null,onCancel:null,onCanPlay:null,onCanPlayThrough:null,onChange:null,onClick:null,onClose:null,onCopy:null,onCueChange:null,onCut:null,onDblClick:null,onDrag:null,onDragEnd:null,onDragEnter:null,onDragExit:null,onDragLeave:null,onDragOver:null,onDragStart:null,onDrop:null,onDurationChange:null,onEmptied:null,onEnd:null,onEnded:null,onError:null,onFocus:null,onFocusIn:null,onFocusOut:null,onHashChange:null,onInput:null,onInvalid:null,onKeyDown:null,onKeyPress:null,onKeyUp:null,onLoad:null,onLoadedData:null,onLoadedMetadata:null,onLoadStart:null,onMessage:null,onMouseDown:null,onMouseEnter:null,onMouseLeave:null,onMouseMove:null,onMouseOut:null,onMouseOver:null,onMouseUp:null,onMouseWheel:null,onOffline:null,onOnline:null,onPageHide:null,onPageShow:null,onPaste:null,onPause:null,onPlay:null,onPlaying:null,onPopState:null,onProgress:null,onRateChange:null,onRepeat:null,onReset:null,onResize:null,onScroll:null,onSeeked:null,onSeeking:null,onSelect:null,onShow:null,onStalled:null,onStorage:null,onSubmit:null,onSuspend:null,onTimeUpdate:null,onToggle:null,onUnload:null,onVolumeChange:null,onWaiting:null,onZoom:null,opacity:null,operator:null,order:null,orient:null,orientation:null,origin:null,overflow:null,overlay:null,overlinePosition:Ee,overlineThickness:Ee,paintOrder:null,panose1:null,path:null,pathLength:Ee,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:dt,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ee,pointsAtY:Ee,pointsAtZ:Ee,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:$n,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:$n,rev:$n,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:$n,requiredFeatures:$n,requiredFonts:$n,requiredFormats:$n,resource:null,restart:null,result:null,rotate:null,rx:null,ry:null,scale:null,seed:null,shapeRendering:null,side:null,slope:null,snapshotTime:null,specularConstant:Ee,specularExponent:Ee,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ee,strikethroughThickness:Ee,string:null,stroke:null,strokeDashArray:$n,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ee,strokeOpacity:Ee,strokeWidth:null,style:null,surfaceScale:Ee,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:$n,tabIndex:Ee,tableValues:null,target:null,targetX:Ee,targetY:Ee,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:$n,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ee,underlineThickness:Ee,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ee,values:null,vAlphabetic:Ee,vMathematical:Ee,vectorEffect:null,vHanging:Ee,vIdeographic:Ee,version:null,vertAdvY:Ee,vertOriginX:Ee,vertOriginY:Ee,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ee,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:F1}),U1=Ks({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()}}),H1=Ks({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:B1}),z1=Ks({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),ek={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"},tk=/[A-Z]/g,j1=/-[a-z]/g,nk=/^data[-\w.:]+$/i;function ml(e,t){const n=ya(t);let r=t,s=In;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&nk.test(t)){if(t.charAt(4)==="-"){const a=t.slice(5).replace(j1,ik);r="data"+a.charAt(0).toUpperCase()+a.slice(1)}else{const a=t.slice(4);if(!j1.test(a)){let u=a.replace(tk,rk);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}s=Nf}return new s(r,t)}function rk(e){return"-"+e.toLowerCase()}function ik(e){return e.charAt(1).toUpperCase()}const Ta=L1([M1,JN,U1,H1,z1],"html"),bi=L1([M1,ZN,U1,H1,z1],"svg");function $1(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function V1(e){return e.join(" ").trim()}var Qs={},kf,q1;function sk(){if(q1)return kf;q1=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,s=/^:\s*/,a=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
|
|
18
|
+
`,f="/",p="*",m="",b="comment",y="declaration";function _(v,w){if(typeof v!="string")throw new TypeError("First argument must be a string");if(!v)return[];w=w||{};var k=1,C=1;function H(re){var oe=re.match(t);oe&&(k+=oe.length);var xe=re.lastIndexOf(d);C=~xe?re.length-xe:C+re.length}function Y(){var re={line:k,column:C};return function(oe){return oe.position=new L(re),de(),oe}}function L(re){this.start=re,this.end={line:k,column:C},this.source=w.source}L.prototype.content=v;function q(re){var oe=new Error(w.source+":"+k+":"+C+": "+re);if(oe.reason=re,oe.filename=w.source,oe.line=k,oe.column=C,oe.source=v,!w.silent)throw oe}function ne(re){var oe=re.exec(v);if(oe){var xe=oe[0];return H(xe),v=v.slice(xe.length),oe}}function de(){ne(n)}function V(re){var oe;for(re=re||[];oe=se();)oe!==!1&&re.push(oe);return re}function se(){var re=Y();if(!(f!=v.charAt(0)||p!=v.charAt(1))){for(var oe=2;m!=v.charAt(oe)&&(p!=v.charAt(oe)||f!=v.charAt(oe+1));)++oe;if(oe+=2,m===v.charAt(oe-1))return q("End of comment missing");var xe=v.slice(2,oe-2);return C+=2,H(xe),v=v.slice(oe),C+=2,re({type:b,comment:xe})}}function pe(){var re=Y(),oe=ne(r);if(oe){if(se(),!ne(s))return q("property missing ':'");var xe=ne(a),ae=re({type:y,property:A(oe[0].replace(e,m)),value:xe?A(xe[0].replace(e,m)):m});return ne(u),ae}}function ve(){var re=[];V(re);for(var oe;oe=pe();)oe!==!1&&(re.push(oe),V(re));return re}return de(),ve()}function A(v){return v?v.replace(c,m):m}return kf=_,kf}var Y1;function ok(){if(Y1)return Qs;Y1=1;var e=Qs&&Qs.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Qs,"__esModule",{value:!0}),Qs.default=n;const t=e(sk());function n(r,s){let a=null;if(!r||typeof r!="string")return a;const u=(0,t.default)(r),c=typeof s=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:p}=d;c?s(f,p,d):p&&(a=a||{},a[f]=p)}),a}return Qs}var ba={},G1;function ak(){if(G1)return ba;G1=1,Object.defineProperty(ba,"__esModule",{value:!0}),ba.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,s=/^-(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(s,c):f=f.replace(r,c),f.replace(t,u))};return ba.camelCase=d,ba}var _a,W1;function uk(){if(W1)return _a;W1=1;var e=_a&&_a.__importDefault||function(s){return s&&s.__esModule?s:{default:s}},t=e(ok()),n=ak();function r(s,a){var u={};return!s||typeof s!="string"||(0,t.default)(s,function(c,d){c&&d&&(u[(0,n.camelCase)(c,a)]=d)}),u}return r.default=r,_a=r,_a}var lk=uk();const ck=je(lk),gl=X1("end"),Ir=X1("start");function X1(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 K1(e){const t=Ir(e),n=gl(e);if(t&&n)return{start:t,end:n}}function Sa(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?Q1(e.position):"start"in e||"end"in e?Q1(e):"line"in e||"column"in e?Pf(e):""}function Pf(e){return J1(e&&e.line)+":"+J1(e&&e.column)}function Q1(e){return Pf(e&&e.start)+"-"+Pf(e&&e.end)}function J1(e){return e&&typeof e=="number"?e:1}class gn extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let s="",a={},u=!1;if(n&&("line"in n&&"column"in n?a={place:n}:"start"in n&&"end"in n?a={place:n}:"type"in n?a={ancestors:[n],place:n.position}:a=F({},n)),typeof t=="string"?s=t:!a.cause&&t&&(u=!0,s=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=s,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=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}gn.prototype.file="",gn.prototype.name="",gn.prototype.reason="",gn.prototype.message="",gn.prototype.stack="",gn.prototype.column=void 0,gn.prototype.line=void 0,gn.prototype.ancestors=void 0,gn.prototype.cause=void 0,gn.prototype.fatal=void 0,gn.prototype.place=void 0,gn.prototype.ruleId=void 0,gn.prototype.source=void 0;const Of={}.hasOwnProperty,dk=new Map,fk=/[A-Z]/g,hk=new Set(["table","tbody","thead","tfoot","tr"]),pk=new Set(["td","th"]),Z1="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function mk(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=xk(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=Sk(n,t.jsx,t.jsxs)}const s={Fragment:t.Fragment,ancestors:[],components:t.components||{},create:r,elementAttributeNameCase:t.elementAttributeNameCase||"react",evaluater:t.createEvaluater?t.createEvaluater():void 0,filePath:n,ignoreInvalidStyle:t.ignoreInvalidStyle||!1,passKeys:t.passKeys!==!1,passNode:t.passNode||!1,schema:t.space==="svg"?bi:Ta,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},a=eE(s,e,void 0);return a&&typeof a!="string"?a:s.create(e,s.Fragment,{children:a||void 0},void 0)}function eE(e,t,n){if(t.type==="element")return gk(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return Ek(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return Tk(e,t,n);if(t.type==="mdxjsEsm")return yk(e,t);if(t.type==="root")return bk(e,t,n);if(t.type==="text")return _k(e,t)}function gk(e,t,n){const r=e.schema;let s=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(s=bi,e.schema=s),e.ancestors.push(t);const a=nE(e,t.tagName,!1),u=wk(e,t);let c=Rf(e,t);return hk.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!KN(d):!0})),tE(e,u,a,t),If(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function Ek(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)}xa(e,t.position)}function yk(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);xa(e,t.position)}function Tk(e,t,n){const r=e.schema;let s=r;t.name==="svg"&&r.space==="html"&&(s=bi,e.schema=s),e.ancestors.push(t);const a=t.name===null?e.Fragment:nE(e,t.name,!0),u=Ak(e,t),c=Rf(e,t);return tE(e,u,a,t),If(u,c),e.ancestors.pop(),e.schema=r,e.create(t,a,u,n)}function bk(e,t,n){const r={};return If(r,Rf(e,t)),e.create(t,e.Fragment,r,n)}function _k(e,t){return t.value}function tE(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function If(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function Sk(e,t,n){return r;function r(s,a,u,c){const f=Array.isArray(u.children)?n:t;return c?f(a,u,c):f(a,u)}}function xk(e,t){return n;function n(r,s,a,u){const c=Array.isArray(a.children),d=Ir(r);return t(s,a,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function wk(e,t){const n={};let r,s;for(s in t.properties)if(s!=="children"&&Of.call(t.properties,s)){const a=Ck(e,s,t.properties[s]);if(a){const[u,c]=a;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&pk.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 Ak(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 xa(e,t.position);else{const s=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 xa(e,t.position);else a=r.value===null?!0:r.value;n[s]=a}return n}function Rf(e,t){const n=[];let r=-1;const s=e.passKeys?new Map:dk;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=s.get(d)||0;u=d+"-"+f,s.set(d,f+1)}}const c=eE(e,a,u);c!==void 0&&n.push(c)}return n}function Ck(e,t,n){const r=ml(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?O1(n):V1(n)),r.property==="style"){let s=typeof n=="object"?n:vk(e,String(n));return e.stylePropertyNameCase==="css"&&(s=Nk(s)),["style",s]}return[e.elementAttributeNameCase==="react"&&r.space?ek[r.property]||r.property:r.attribute,n]}}function vk(e,t){try{return ck(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,s=new gn("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw s.file=e.filePath||void 0,s.url=Z1+"#cannot-parse-style-attribute",s}}function nE(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const s=t.split(".");let a=-1,u;for(;++a<s.length;){const c=I1(s[a])?{type:"Identifier",name:s[a]}:{type:"Literal",value:s[a]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(a&&c.type==="Literal"),optional:!1}:c}r=u}else r=I1(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const s=r.value;return Of.call(e.components,s)?e.components[s]:s}if(e.evaluater)return e.evaluater.evaluateExpression(r);xa(e)}function xa(e,t){const n=new gn("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=Z1+"#cannot-handle-mdx-estrees-without-createevaluater",n}function Nk(e){const t={};let n;for(n in e)Of.call(e,n)&&(t[kk(n)]=e[n]);return t}function kk(e){let t=e.replace(fk,Pk);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function Pk(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"]},Ok={};function Df(e,t){const n=Ok,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,s=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return rE(e,r,s)}function rE(e,t,n){if(Ik(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 iE(e.children,t,n)}return Array.isArray(e)?iE(e,t,n):""}function iE(e,t,n){const r=[];let s=-1;for(;++s<e.length;)r[s]=rE(e[s],t,n);return r.join("")}function Ik(e){return!!(e&&typeof e=="object")}const sE=document.createElement("i");function Mf(e){const t="&"+e+";";sE.innerHTML=t;const n=sE.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function Vn(e,t,n,r){const s=e.length;let a=0,u;if(t<0?t=-t>s?0:s+t:t=t>s?s:t,n=n>0?n:0,r.length<1e4)u=Array.from(r),u.unshift(t,n),e.splice(...u);else for(n&&e.splice(t,n);a<r.length;)u=r.slice(a,a+1e4),u.unshift(t,0),e.splice(...u),a+=1e4,t+=1e4}function tr(e,t){return e.length>0?(Vn(e,e.length,0,t),e):t}const oE={}.hasOwnProperty;function aE(e){const t={};let n=-1;for(;++n<e.length;)Rk(t,e[n]);return t}function Rk(e,t){let n;for(n in t){const s=(oE.call(e,n)?e[n]:void 0)||(e[n]={}),a=t[n];let u;if(a)for(u in a){oE.call(s,u)||(s[u]=[]);const c=a[u];Lk(s[u],Array.isArray(c)?c:c?[c]:[])}}}function Lk(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);Vn(e,0,0,r)}function uE(e,t){const n=Number.parseInt(e,t);return n<9||n===11||n>13&&n<32||n>126&&n<160||n>55295&&n<57344||n>64975&&n<65008||(n&65535)===65535||(n&65535)===65534||n>1114111?"�":String.fromCodePoint(n)}function pr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const An=_i(/[A-Za-z]/),En=_i(/[\dA-Za-z]/),Dk=_i(/[#-'*+\--9=?A-Z^-~]/);function El(e){return e!==null&&(e<32||e===127)}const Ff=_i(/\d/),Mk=_i(/[\dA-Fa-f]/),Fk=_i(/[!-/:-@[-`{-~]/);function Fe(e){return e!==null&&e<-2}function ft(e){return e!==null&&(e<0||e===32)}function Ze(e){return e===-2||e===-1||e===32}const yl=_i(new RegExp("\\p{P}|\\p{S}","u")),os=_i(/\s/);function _i(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Js(e){const t=[];let n=-1,r=0,s=0;for(;++n<e.length;){const a=e.charCodeAt(n);let u="";if(a===37&&En(e.charCodeAt(n+1))&&En(e.charCodeAt(n+2)))s=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),s=1):u="�"}else u=String.fromCharCode(a);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+s+1,u=""),s&&(n+=s,s=0)}return t.join("")+e.slice(r)}function nt(e,t,n,r){const s=r?r-1:Number.POSITIVE_INFINITY;let a=0;return u;function u(d){return Ze(d)?(e.enter(n),c(d)):t(d)}function c(d){return Ze(d)&&a++<s?(e.consume(d),c):(e.exit(n),t(d))}}const Bk={tokenize:Uk};function Uk(e){const t=e.attempt(this.parser.constructs.contentInitial,r,s);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),nt(e,t,"linePrefix")}function s(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 Fe(c)?(e.consume(c),e.exit("chunkText"),a):(e.consume(c),u)}}const Hk={tokenize:zk},lE={tokenize:jk};function zk(e){const t=this,n=[];let r=0,s,a,u;return c;function c(C){if(r<n.length){const H=n[r];return t.containerState=H[1],e.attempt(H[0].continuation,d,f)(C)}return f(C)}function d(C){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,s&&k();const H=t.events.length;let Y=H,L;for(;Y--;)if(t.events[Y][0]==="exit"&&t.events[Y][1].type==="chunkFlow"){L=t.events[Y][1].end;break}w(r);let q=H;for(;q<t.events.length;)t.events[q][1].end=F({},L),q++;return Vn(t.events,Y+1,0,t.events.slice(H)),t.events.length=q,f(C)}return c(C)}function f(C){if(r===n.length){if(!s)return b(C);if(s.currentConstruct&&s.currentConstruct.concrete)return _(C);t.interrupt=!!(s.currentConstruct&&!s._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(lE,p,m)(C)}function p(C){return s&&k(),w(r),b(C)}function m(C){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,_(C)}function b(C){return t.containerState={},e.attempt(lE,y,_)(C)}function y(C){return r++,n.push([t.currentConstruct,t.containerState]),b(C)}function _(C){if(C===null){s&&k(),w(0),e.consume(C);return}return s=s||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:s,contentType:"flow",previous:a}),A(C)}function A(C){if(C===null){v(e.exit("chunkFlow"),!0),w(0),e.consume(C);return}return Fe(C)?(e.consume(C),v(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(C),A)}function v(C,H){const Y=t.sliceStream(C);if(H&&Y.push(null),C.previous=a,a&&(a.next=C),a=C,s.defineSkip(C.start),s.write(Y),t.parser.lazy[C.start.line]){let L=s.events.length;for(;L--;)if(s.events[L][1].start.offset<u&&(!s.events[L][1].end||s.events[L][1].end.offset>u))return;const q=t.events.length;let ne=q,de,V;for(;ne--;)if(t.events[ne][0]==="exit"&&t.events[ne][1].type==="chunkFlow"){if(de){V=t.events[ne][1].end;break}de=!0}for(w(r),L=q;L<t.events.length;)t.events[L][1].end=F({},V),L++;Vn(t.events,ne+1,0,t.events.slice(q)),t.events.length=L}}function w(C){let H=n.length;for(;H-- >C;){const Y=n[H];t.containerState=Y[1],Y[0].exit.call(t,e)}n.length=C}function k(){s.write([null]),a=void 0,s=void 0,t.containerState._closeFlow=void 0}}function jk(e,t,n){return nt(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Zs(e){if(e===null||ft(e)||os(e))return 1;if(yl(e))return 2}function Tl(e,t,n){const r=[];let s=-1;for(;++s<e.length;){const a=e[s].resolveAll;a&&!r.includes(a)&&(t=a(t,n),r.push(a))}return t}const Bf={name:"attention",resolveAll:$k,tokenize:Vk};function $k(e,t){let n=-1,r,s,a,u,c,d,f,p;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=F({},e[r][1].end),b=F({},e[n][1].start);cE(m,-d),cE(b,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:F({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:F({},e[n][1].start),end:b},a={type:d>1?"strongText":"emphasisText",start:F({},e[r][1].end),end:F({},e[n][1].start)},s={type:d>1?"strong":"emphasis",start:F({},u.start),end:F({},c.end)},e[r][1].end=F({},u.start),e[n][1].start=F({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=tr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=tr(f,[["enter",s,t],["enter",u,t],["exit",u,t],["enter",a,t]]),f=tr(f,Tl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=tr(f,[["exit",a,t],["enter",c,t],["exit",c,t],["exit",s,t]]),e[n][1].end.offset-e[n][1].start.offset?(p=2,f=tr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):p=0,Vn(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 Vk(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,s=Zs(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=Zs(d),m=!p||p===2&&s||n.includes(d),b=!s||s===2&&p||n.includes(r);return f._open=!!(a===42?m:m&&(s||!b)),f._close=!!(a===42?b:b&&(p||!m)),t(d)}}function cE(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const qk={name:"autolink",tokenize:Yk};function Yk(e,t,n){let r=0;return s;function s(y){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),a}function a(y){return An(y)?(e.consume(y),u):y===64?n(y):f(y)}function u(y){return y===43||y===45||y===46||En(y)?(r=1,c(y)):f(y)}function c(y){return y===58?(e.consume(y),r=0,d):(y===43||y===45||y===46||En(y))&&r++<32?(e.consume(y),c):(r=0,f(y))}function d(y){return y===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):y===null||y===32||y===60||El(y)?n(y):(e.consume(y),d)}function f(y){return y===64?(e.consume(y),p):Dk(y)?(e.consume(y),f):n(y)}function p(y){return En(y)?m(y):n(y)}function m(y){return y===46?(e.consume(y),r=0,p):y===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(y),e.exit("autolinkMarker"),e.exit("autolink"),t):b(y)}function b(y){if((y===45||En(y))&&r++<63){const _=y===45?b:m;return e.consume(y),_}return n(y)}}const wa={partial:!0,tokenize:Gk};function Gk(e,t,n){return r;function r(a){return Ze(a)?nt(e,s,"linePrefix")(a):s(a)}function s(a){return a===null||Fe(a)?t(a):n(a)}}const dE={continuation:{tokenize:Xk},exit:Kk,name:"blockQuote",tokenize:Wk};function Wk(e,t,n){const r=this;return s;function s(u){if(u===62){const c=r.containerState;return c.open||(e.enter("blockQuote",{_container:!0}),c.open=!0),e.enter("blockQuotePrefix"),e.enter("blockQuoteMarker"),e.consume(u),e.exit("blockQuoteMarker"),a}return n(u)}function a(u){return Ze(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function Xk(e,t,n){const r=this;return s;function s(u){return Ze(u)?nt(e,a,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):a(u)}function a(u){return e.attempt(dE,t,n)(u)}}function Kk(e){e.exit("blockQuote")}const fE={name:"characterEscape",tokenize:Qk};function Qk(e,t,n){return r;function r(a){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(a),e.exit("escapeMarker"),s}function s(a){return Fk(a)?(e.enter("characterEscapeValue"),e.consume(a),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(a)}}const hE={name:"characterReference",tokenize:Jk};function Jk(e,t,n){const r=this;let s=0,a,u;return c;function c(m){return e.enter("characterReference"),e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),d}function d(m){return m===35?(e.enter("characterReferenceMarkerNumeric"),e.consume(m),e.exit("characterReferenceMarkerNumeric"),f):(e.enter("characterReferenceValue"),a=31,u=En,p(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),a=6,u=Mk,p):(e.enter("characterReferenceValue"),a=7,u=Ff,p(m))}function p(m){if(m===59&&s){const b=e.exit("characterReferenceValue");return u===En&&!Mf(r.sliceSerialize(b))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&s++<a?(e.consume(m),p):n(m)}}const pE={partial:!0,tokenize:eP},mE={concrete:!0,name:"codeFenced",tokenize:Zk};function Zk(e,t,n){const r=this,s={partial:!0,tokenize:Y};let a=0,u=0,c;return d;function d(L){return f(L)}function f(L){const q=r.events[r.events.length-1];return a=q&&q[1].type==="linePrefix"?q[2].sliceSerialize(q[1],!0).length:0,c=L,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),p(L)}function p(L){return L===c?(u++,e.consume(L),p):u<3?n(L):(e.exit("codeFencedFenceSequence"),Ze(L)?nt(e,m,"whitespace")(L):m(L))}function m(L){return L===null||Fe(L)?(e.exit("codeFencedFence"),r.interrupt?t(L):e.check(pE,A,H)(L)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),b(L))}function b(L){return L===null||Fe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(L)):Ze(L)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),nt(e,y,"whitespace")(L)):L===96&&L===c?n(L):(e.consume(L),b)}function y(L){return L===null||Fe(L)?m(L):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),_(L))}function _(L){return L===null||Fe(L)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(L)):L===96&&L===c?n(L):(e.consume(L),_)}function A(L){return e.attempt(s,H,v)(L)}function v(L){return e.enter("lineEnding"),e.consume(L),e.exit("lineEnding"),w}function w(L){return a>0&&Ze(L)?nt(e,k,"linePrefix",a+1)(L):k(L)}function k(L){return L===null||Fe(L)?e.check(pE,A,H)(L):(e.enter("codeFlowValue"),C(L))}function C(L){return L===null||Fe(L)?(e.exit("codeFlowValue"),k(L)):(e.consume(L),C)}function H(L){return e.exit("codeFenced"),t(L)}function Y(L,q,ne){let de=0;return V;function V(oe){return L.enter("lineEnding"),L.consume(oe),L.exit("lineEnding"),se}function se(oe){return L.enter("codeFencedFence"),Ze(oe)?nt(L,pe,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(oe):pe(oe)}function pe(oe){return oe===c?(L.enter("codeFencedFenceSequence"),ve(oe)):ne(oe)}function ve(oe){return oe===c?(de++,L.consume(oe),ve):de>=u?(L.exit("codeFencedFenceSequence"),Ze(oe)?nt(L,re,"whitespace")(oe):re(oe)):ne(oe)}function re(oe){return oe===null||Fe(oe)?(L.exit("codeFencedFence"),q(oe)):ne(oe)}}}function eP(e,t,n){const r=this;return s;function s(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 Uf={name:"codeIndented",tokenize:nP},tP={partial:!0,tokenize:rP};function nP(e,t,n){const r=this;return s;function s(f){return e.enter("codeIndented"),nt(e,a,"linePrefix",5)(f)}function a(f){const p=r.events[r.events.length-1];return p&&p[1].type==="linePrefix"&&p[2].sliceSerialize(p[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Fe(f)?e.attempt(tP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Fe(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function rP(e,t,n){const r=this;return s;function s(u){return r.parser.lazy[r.now().line]?n(u):Fe(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):nt(e,a,"linePrefix",5)(u)}function a(u){const c=r.events[r.events.length-1];return c&&c[1].type==="linePrefix"&&c[2].sliceSerialize(c[1],!0).length>=4?t(u):Fe(u)?s(u):n(u)}}const iP={name:"codeText",previous:oP,resolve:sP,tokenize:aP};function sP(e){let t=e.length-4,n=3,r,s;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;)s===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(s=r):(r===t||e[r][1].type==="lineEnding")&&(e[s][1].type="codeTextData",r!==s+2&&(e[s][1].end=e[r-1][1].end,e.splice(s+2,r-s-2),t-=r-s-2,r=s+2),s=void 0);return e}function oP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function aP(e,t,n){let r=0,s,a;return u;function u(m){return e.enter("codeText"),e.enter("codeTextSequence"),c(m)}function c(m){return m===96?(e.consume(m),r++,c):(e.exit("codeTextSequence"),d(m))}function d(m){return m===null?n(m):m===32?(e.enter("space"),e.consume(m),e.exit("space"),d):m===96?(a=e.enter("codeTextSequence"),s=0,p(m)):Fe(m)?(e.enter("lineEnding"),e.consume(m),e.exit("lineEnding"),d):(e.enter("codeTextData"),f(m))}function f(m){return m===null||m===32||m===96||Fe(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function p(m){return m===96?(e.consume(m),s++,p):s===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(a.type="codeTextData",f(m))}}class uP{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 s=n||0;this.setCursor(Math.trunc(t));const a=this.right.splice(this.right.length-s,Number.POSITIVE_INFINITY);return r&&Aa(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),Aa(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),Aa(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);Aa(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);Aa(this.left,n.reverse())}}}function Aa(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 gE(e){const t={};let n=-1,r,s,a,u,c,d,f;const p=new uP(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,lP(p,n)),n=t[n],f=!0);else if(r[1]._container){for(a=n,s=void 0;a--;)if(u=p.get(a),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(s&&(p.get(s)[1].type="lineEndingBlank"),u[1].type="lineEnding",s=a);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;s&&(r[1].end=F({},p.get(s)[1].start),c=p.slice(s,n),c.unshift(r),p.splice(s,n-s+1,c))}}return Vn(e,0,Number.POSITIVE_INFINITY,p.slice(0)),!f}function lP(e,t){const n=e.get(t)[1],r=e.get(t)[2];let s=t-1;const a=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let p,m,b=-1,y=n,_=0,A=0;const v=[A];for(;y;){for(;e.get(++s)[1]!==y;);a.push(s),y._tokenizer||(p=r.sliceStream(y),y.next||p.push(null),m&&u.defineSkip(y.start),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(p),y._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=y,y=y.next}for(y=n;++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&&(A=b+1,v.push(A),y._tokenizer=void 0,y.previous=void 0,y=y.next);for(u.events=[],y?(y._tokenizer=void 0,y.previous=void 0):v.pop(),b=v.length;b--;){const w=c.slice(v[b],v[b+1]),k=a.pop();d.push([k,k+w.length-1]),e.splice(k,2,w)}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 cP={resolve:fP,tokenize:hP},dP={partial:!0,tokenize:pP};function fP(e){return gE(e),e}function hP(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),s(c)}function s(c){return c===null?a(c):Fe(c)?e.check(dP,u,a)(c):(e.consume(c),s)}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,s}}function pP(e,t,n){const r=this;return s;function s(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),nt(e,a,"linePrefix")}function a(u){if(u===null||Fe(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 EE(e,t,n,r,s,a,u,c,d){const f=d||Number.POSITIVE_INFINITY;let p=0;return m;function m(w){return w===60?(e.enter(r),e.enter(s),e.enter(a),e.consume(w),e.exit(a),b):w===null||w===32||w===41||El(w)?n(w):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),A(w))}function b(w){return w===62?(e.enter(a),e.consume(w),e.exit(a),e.exit(s),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),y(w))}function y(w){return w===62?(e.exit("chunkString"),e.exit(c),b(w)):w===null||w===60||Fe(w)?n(w):(e.consume(w),w===92?_:y)}function _(w){return w===60||w===62||w===92?(e.consume(w),y):y(w)}function A(w){return!p&&(w===null||w===41||ft(w))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(w)):p<f&&w===40?(e.consume(w),p++,A):w===41?(e.consume(w),p--,A):w===null||w===32||w===40||El(w)?n(w):(e.consume(w),w===92?v:A)}function v(w){return w===40||w===41||w===92?(e.consume(w),A):A(w)}}function yE(e,t,n,r,s,a){const u=this;let c=0,d;return f;function f(y){return e.enter(r),e.enter(s),e.consume(y),e.exit(s),e.enter(a),p}function p(y){return c>999||y===null||y===91||y===93&&!d||y===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(y):y===93?(e.exit(a),e.enter(s),e.consume(y),e.exit(s),e.exit(r),t):Fe(y)?(e.enter("lineEnding"),e.consume(y),e.exit("lineEnding"),p):(e.enter("chunkString",{contentType:"string"}),m(y))}function m(y){return y===null||y===91||y===93||Fe(y)||c++>999?(e.exit("chunkString"),p(y)):(e.consume(y),d||(d=!Ze(y)),y===92?b:m)}function b(y){return y===91||y===92||y===93?(e.consume(y),c++,m):m(y)}}function TE(e,t,n,r,s,a){let u;return c;function c(b){return b===34||b===39||b===40?(e.enter(r),e.enter(s),e.consume(b),e.exit(s),u=b===40?41:b,d):n(b)}function d(b){return b===u?(e.enter(s),e.consume(b),e.exit(s),e.exit(r),t):(e.enter(a),f(b))}function f(b){return b===u?(e.exit(a),d(u)):b===null?n(b):Fe(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),nt(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),p(b))}function p(b){return b===u||b===null||Fe(b)?(e.exit("chunkString"),f(b)):(e.consume(b),b===92?m:p)}function m(b){return b===u||b===92?(e.consume(b),p):p(b)}}function Ca(e,t){let n;return r;function r(s){return Fe(s)?(e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),n=!0,r):Ze(s)?nt(e,r,n?"linePrefix":"lineSuffix")(s):t(s)}}const mP={name:"definition",tokenize:EP},gP={partial:!0,tokenize:yP};function EP(e,t,n){const r=this;let s;return a;function a(y){return e.enter("definition"),u(y)}function u(y){return yE.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(y)}function c(y){return s=pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),y===58?(e.enter("definitionMarker"),e.consume(y),e.exit("definitionMarker"),d):n(y)}function d(y){return ft(y)?Ca(e,f)(y):f(y)}function f(y){return EE(e,p,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(y)}function p(y){return e.attempt(gP,m,m)(y)}function m(y){return Ze(y)?nt(e,b,"whitespace")(y):b(y)}function b(y){return y===null||Fe(y)?(e.exit("definition"),r.parser.defined.push(s),t(y)):n(y)}}function yP(e,t,n){return r;function r(c){return ft(c)?Ca(e,s)(c):n(c)}function s(c){return TE(e,a,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function a(c){return Ze(c)?nt(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Fe(c)?t(c):n(c)}}const TP={name:"hardBreakEscape",tokenize:bP};function bP(e,t,n){return r;function r(a){return e.enter("hardBreakEscape"),e.consume(a),s}function s(a){return Fe(a)?(e.exit("hardBreakEscape"),t(a)):n(a)}}const _P={name:"headingAtx",resolve:SP,tokenize:xP};function SP(e,t){let n=e.length-2,r=3,s,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&&(s={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"},Vn(e,r,n-r+1,[["enter",s,t],["enter",a,t],["exit",a,t],["exit",s,t]])),e}function xP(e,t,n){let r=0;return s;function s(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||ft(p)?(e.exit("atxHeadingSequence"),c(p)):n(p)}function c(p){return p===35?(e.enter("atxHeadingSequence"),d(p)):p===null||Fe(p)?(e.exit("atxHeading"),t(p)):Ze(p)?nt(e,c,"whitespace")(p):(e.enter("atxHeadingText"),f(p))}function d(p){return p===35?(e.consume(p),d):(e.exit("atxHeadingSequence"),c(p))}function f(p){return p===null||p===35||ft(p)?(e.exit("atxHeadingText"),c(p)):(e.consume(p),f)}}const wP=["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"],bE=["pre","script","style","textarea"],AP={concrete:!0,name:"htmlFlow",resolveTo:NP,tokenize:kP},CP={partial:!0,tokenize:OP},vP={partial:!0,tokenize:PP};function NP(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 kP(e,t,n){const r=this;let s,a,u,c,d;return f;function f(I){return p(I)}function p(I){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(I),m}function m(I){return I===33?(e.consume(I),b):I===47?(e.consume(I),a=!0,A):I===63?(e.consume(I),s=3,r.interrupt?t:N):An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function b(I){return I===45?(e.consume(I),s=2,y):I===91?(e.consume(I),s=5,c=0,_):An(I)?(e.consume(I),s=4,r.interrupt?t:N):n(I)}function y(I){return I===45?(e.consume(I),r.interrupt?t:N):n(I)}function _(I){const _e="CDATA[";return I===_e.charCodeAt(c++)?(e.consume(I),c===_e.length?r.interrupt?t:pe:_):n(I)}function A(I){return An(I)?(e.consume(I),u=String.fromCharCode(I),v):n(I)}function v(I){if(I===null||I===47||I===62||ft(I)){const _e=I===47,Be=u.toLowerCase();return!_e&&!a&&bE.includes(Be)?(s=1,r.interrupt?t(I):pe(I)):wP.includes(u.toLowerCase())?(s=6,_e?(e.consume(I),w):r.interrupt?t(I):pe(I)):(s=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(I):a?k(I):C(I))}return I===45||En(I)?(e.consume(I),u+=String.fromCharCode(I),v):n(I)}function w(I){return I===62?(e.consume(I),r.interrupt?t:pe):n(I)}function k(I){return Ze(I)?(e.consume(I),k):V(I)}function C(I){return I===47?(e.consume(I),V):I===58||I===95||An(I)?(e.consume(I),H):Ze(I)?(e.consume(I),C):V(I)}function H(I){return I===45||I===46||I===58||I===95||En(I)?(e.consume(I),H):Y(I)}function Y(I){return I===61?(e.consume(I),L):Ze(I)?(e.consume(I),Y):C(I)}function L(I){return I===null||I===60||I===61||I===62||I===96?n(I):I===34||I===39?(e.consume(I),d=I,q):Ze(I)?(e.consume(I),L):ne(I)}function q(I){return I===d?(e.consume(I),d=null,de):I===null||Fe(I)?n(I):(e.consume(I),q)}function ne(I){return I===null||I===34||I===39||I===47||I===60||I===61||I===62||I===96||ft(I)?Y(I):(e.consume(I),ne)}function de(I){return I===47||I===62||Ze(I)?C(I):n(I)}function V(I){return I===62?(e.consume(I),se):n(I)}function se(I){return I===null||Fe(I)?pe(I):Ze(I)?(e.consume(I),se):n(I)}function pe(I){return I===45&&s===2?(e.consume(I),xe):I===60&&s===1?(e.consume(I),ae):I===62&&s===4?(e.consume(I),D):I===63&&s===3?(e.consume(I),N):I===93&&s===5?(e.consume(I),ie):Fe(I)&&(s===6||s===7)?(e.exit("htmlFlowData"),e.check(CP,ee,ve)(I)):I===null||Fe(I)?(e.exit("htmlFlowData"),ve(I)):(e.consume(I),pe)}function ve(I){return e.check(vP,re,ee)(I)}function re(I){return e.enter("lineEnding"),e.consume(I),e.exit("lineEnding"),oe}function oe(I){return I===null||Fe(I)?ve(I):(e.enter("htmlFlowData"),pe(I))}function xe(I){return I===45?(e.consume(I),N):pe(I)}function ae(I){return I===47?(e.consume(I),u="",Q):pe(I)}function Q(I){if(I===62){const _e=u.toLowerCase();return bE.includes(_e)?(e.consume(I),D):pe(I)}return An(I)&&u.length<8?(e.consume(I),u+=String.fromCharCode(I),Q):pe(I)}function ie(I){return I===93?(e.consume(I),N):pe(I)}function N(I){return I===62?(e.consume(I),D):I===45&&s===2?(e.consume(I),N):pe(I)}function D(I){return I===null||Fe(I)?(e.exit("htmlFlowData"),ee(I)):(e.consume(I),D)}function ee(I){return e.exit("htmlFlow"),t(I)}}function PP(e,t,n){const r=this;return s;function s(u){return Fe(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 OP(e,t,n){return r;function r(s){return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),e.attempt(wa,t,n)}}const IP={name:"htmlText",tokenize:RP};function RP(e,t,n){const r=this;let s,a,u;return c;function c(N){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(N),d}function d(N){return N===33?(e.consume(N),f):N===47?(e.consume(N),Y):N===63?(e.consume(N),C):An(N)?(e.consume(N),ne):n(N)}function f(N){return N===45?(e.consume(N),p):N===91?(e.consume(N),a=0,_):An(N)?(e.consume(N),k):n(N)}function p(N){return N===45?(e.consume(N),y):n(N)}function m(N){return N===null?n(N):N===45?(e.consume(N),b):Fe(N)?(u=m,ae(N)):(e.consume(N),m)}function b(N){return N===45?(e.consume(N),y):m(N)}function y(N){return N===62?xe(N):N===45?b(N):m(N)}function _(N){const D="CDATA[";return N===D.charCodeAt(a++)?(e.consume(N),a===D.length?A:_):n(N)}function A(N){return N===null?n(N):N===93?(e.consume(N),v):Fe(N)?(u=A,ae(N)):(e.consume(N),A)}function v(N){return N===93?(e.consume(N),w):A(N)}function w(N){return N===62?xe(N):N===93?(e.consume(N),w):A(N)}function k(N){return N===null||N===62?xe(N):Fe(N)?(u=k,ae(N)):(e.consume(N),k)}function C(N){return N===null?n(N):N===63?(e.consume(N),H):Fe(N)?(u=C,ae(N)):(e.consume(N),C)}function H(N){return N===62?xe(N):C(N)}function Y(N){return An(N)?(e.consume(N),L):n(N)}function L(N){return N===45||En(N)?(e.consume(N),L):q(N)}function q(N){return Fe(N)?(u=q,ae(N)):Ze(N)?(e.consume(N),q):xe(N)}function ne(N){return N===45||En(N)?(e.consume(N),ne):N===47||N===62||ft(N)?de(N):n(N)}function de(N){return N===47?(e.consume(N),xe):N===58||N===95||An(N)?(e.consume(N),V):Fe(N)?(u=de,ae(N)):Ze(N)?(e.consume(N),de):xe(N)}function V(N){return N===45||N===46||N===58||N===95||En(N)?(e.consume(N),V):se(N)}function se(N){return N===61?(e.consume(N),pe):Fe(N)?(u=se,ae(N)):Ze(N)?(e.consume(N),se):de(N)}function pe(N){return N===null||N===60||N===61||N===62||N===96?n(N):N===34||N===39?(e.consume(N),s=N,ve):Fe(N)?(u=pe,ae(N)):Ze(N)?(e.consume(N),pe):(e.consume(N),re)}function ve(N){return N===s?(e.consume(N),s=void 0,oe):N===null?n(N):Fe(N)?(u=ve,ae(N)):(e.consume(N),ve)}function re(N){return N===null||N===34||N===39||N===60||N===61||N===96?n(N):N===47||N===62||ft(N)?de(N):(e.consume(N),re)}function oe(N){return N===47||N===62||ft(N)?de(N):n(N)}function xe(N){return N===62?(e.consume(N),e.exit("htmlTextData"),e.exit("htmlText"),t):n(N)}function ae(N){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(N),e.exit("lineEnding"),Q}function Q(N){return Ze(N)?nt(e,ie,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(N):ie(N)}function ie(N){return e.enter("htmlTextData"),u(N)}}const Hf={name:"labelEnd",resolveAll:FP,resolveTo:BP,tokenize:UP},LP={tokenize:HP},DP={tokenize:zP},MP={tokenize:jP};function FP(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 s=r.type==="labelImage"?4:2;r.type="data",t+=s}}return e.length!==n.length&&Vn(e,0,e.length,n),e}function BP(e,t){let n=e.length,r=0,s,a,u,c;for(;n--;)if(s=e[n][1],a){if(s.type==="link"||s.type==="labelLink"&&s._inactive)break;e[n][0]==="enter"&&s.type==="labelLink"&&(s._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(s.type==="labelImage"||s.type==="labelLink")&&!s._balanced&&(a=n,s.type!=="labelLink")){r=2;break}}else s.type==="labelEnd"&&(u=n);const d={type:e[a][1].type==="labelLink"?"link":"image",start:F({},e[a][1].start),end:F({},e[e.length-1][1].end)},f={type:"label",start:F({},e[a][1].start),end:F({},e[u][1].end)},p={type:"labelText",start:F({},e[a+r+2][1].end),end:F({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=tr(c,e.slice(a+1,a+r+3)),c=tr(c,[["enter",p,t]]),c=tr(c,Tl(t.parser.constructs.insideSpan.null,e.slice(a+r+4,u-3),t)),c=tr(c,[["exit",p,t],e[u-2],e[u-1],["exit",f,t]]),c=tr(c,e.slice(u+1)),c=tr(c,[["exit",d,t]]),Vn(e,a,e.length,c),e}function UP(e,t,n){const r=this;let s=r.events.length,a,u;for(;s--;)if((r.events[s][1].type==="labelImage"||r.events[s][1].type==="labelLink")&&!r.events[s][1]._balanced){a=r.events[s][1];break}return c;function c(b){return a?a._inactive?m(b):(u=r.parser.defined.includes(pr(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(LP,p,u?p:m)(b):b===91?e.attempt(DP,p,u?f:m)(b):u?p(b):m(b)}function f(b){return e.attempt(MP,p,m)(b)}function p(b){return t(b)}function m(b){return a._balanced=!0,n(b)}}function HP(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),s}function s(m){return ft(m)?Ca(e,a)(m):a(m)}function a(m){return m===41?p(m):EE(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return ft(m)?Ca(e,d)(m):p(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?TE(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):p(m)}function f(m){return ft(m)?Ca(e,p)(m):p(m)}function p(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function zP(e,t,n){const r=this;return s;function s(c){return yE.call(r,e,a,u,"reference","referenceMarker","referenceString")(c)}function a(c){return r.parser.defined.includes(pr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function jP(e,t,n){return r;function r(a){return e.enter("reference"),e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),s}function s(a){return a===93?(e.enter("referenceMarker"),e.consume(a),e.exit("referenceMarker"),e.exit("reference"),t):n(a)}}const $P={name:"labelStartImage",resolveAll:Hf.resolveAll,tokenize:VP};function VP(e,t,n){const r=this;return s;function s(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 qP={name:"labelStartLink",resolveAll:Hf.resolveAll,tokenize:YP};function YP(e,t,n){const r=this;return s;function s(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 zf={name:"lineEnding",tokenize:GP};function GP(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),nt(e,t,"linePrefix")}}const bl={name:"thematicBreak",tokenize:WP};function WP(e,t,n){let r=0,s;return a;function a(f){return e.enter("thematicBreak"),u(f)}function u(f){return s=f,c(f)}function c(f){return f===s?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Fe(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===s?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),Ze(f)?nt(e,c,"whitespace")(f):c(f))}}const Rn={continuation:{tokenize:JP},exit:eO,name:"list",tokenize:QP},XP={partial:!0,tokenize:tO},KP={partial:!0,tokenize:ZP};function QP(e,t,n){const r=this,s=r.events[r.events.length-1];let a=s&&s[1].type==="linePrefix"?s[2].sliceSerialize(s[1],!0).length:0,u=0;return c;function c(y){const _=r.containerState.type||(y===42||y===43||y===45?"listUnordered":"listOrdered");if(_==="listUnordered"?!r.containerState.marker||y===r.containerState.marker:Ff(y)){if(r.containerState.type||(r.containerState.type=_,e.enter(_,{_container:!0})),_==="listUnordered")return e.enter("listItemPrefix"),y===42||y===45?e.check(bl,n,f)(y):f(y);if(!r.interrupt||y===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(y)}return n(y)}function d(y){return Ff(y)&&++u<10?(e.consume(y),d):(!r.interrupt||u<2)&&(r.containerState.marker?y===r.containerState.marker:y===41||y===46)?(e.exit("listItemValue"),f(y)):n(y)}function f(y){return e.enter("listItemMarker"),e.consume(y),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||y,e.check(wa,r.interrupt?n:p,e.attempt(XP,b,m))}function p(y){return r.containerState.initialBlankLine=!0,a++,b(y)}function m(y){return Ze(y)?(e.enter("listItemPrefixWhitespace"),e.consume(y),e.exit("listItemPrefixWhitespace"),b):n(y)}function b(y){return r.containerState.size=a+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(y)}}function JP(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(wa,s,a);function s(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,nt(e,t,"listItemIndent",r.containerState.size+1)(c)}function a(c){return r.containerState.furtherBlankLines||!Ze(c)?(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,u(c)):(r.containerState.furtherBlankLines=void 0,r.containerState.initialBlankLine=void 0,e.attempt(KP,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,nt(e,e.attempt(Rn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function ZP(e,t,n){const r=this;return nt(e,s,"listItemIndent",r.containerState.size+1);function s(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 eO(e){e.exit(this.containerState.type)}function tO(e,t,n){const r=this;return nt(e,s,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function s(a){const u=r.events[r.events.length-1];return!Ze(a)&&u&&u[1].type==="listItemPrefixWhitespace"?t(a):n(a)}}const _E={name:"setextUnderline",resolveTo:nO,tokenize:rO};function nO(e,t){let n=e.length,r,s,a;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(s=n)}else e[n][1].type==="content"&&e.splice(n,1),!a&&e[n][1].type==="definition"&&(a=n);const u={type:"setextHeading",start:F({},e[r][1].start),end:F({},e[e.length-1][1].end)};return e[s][1].type="setextHeadingText",a?(e.splice(s,0,["enter",u,t]),e.splice(a+1,0,["exit",e[r][1],t]),e[r][1].end=F({},e[a][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function rO(e,t,n){const r=this;let s;return a;function a(f){let p=r.events.length,m;for(;p--;)if(r.events[p][1].type!=="lineEnding"&&r.events[p][1].type!=="linePrefix"&&r.events[p][1].type!=="content"){m=r.events[p][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),s=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===s?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),Ze(f)?nt(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Fe(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const iO={tokenize:sO};function sO(e){const t=this,n=e.attempt(wa,r,e.attempt(this.parser.constructs.flowInitial,s,nt(e,e.attempt(this.parser.constructs.flow,s,e.attempt(cP,s)),"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 s(a){if(a===null){e.consume(a);return}return e.enter("lineEnding"),e.consume(a),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const oO={resolveAll:xE()},aO=SE("string"),uO=SE("text");function SE(e){return{resolveAll:xE(e==="text"?lO:void 0),tokenize:t};function t(n){const r=this,s=this.parser.constructs[e],a=n.attempt(s,u,c);return u;function u(p){return f(p)?a(p):c(p)}function c(p){if(p===null){n.consume(p);return}return n.enter("data"),n.consume(p),d}function d(p){return f(p)?(n.exit("data"),a(p)):(n.consume(p),d)}function f(p){if(p===null)return!0;const m=s[p];let b=-1;if(m)for(;++b<m.length;){const y=m[b];if(!y.previous||y.previous.call(r,r.previous))return!0}return!1}}}function xE(e){return t;function t(n,r){let s=-1,a;for(;++s<=n.length;)a===void 0?n[s]&&n[s][1].type==="data"&&(a=s,s++):(!n[s]||n[s][1].type!=="data")&&(s!==a+2&&(n[a][1].end=n[s-1][1].end,n.splice(a+2,s-a-2),s=a+2),a=void 0);return e?e(n,r):n}}function lO(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],s=t.sliceStream(r);let a=s.length,u=-1,c=0,d;for(;a--;){const f=s[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:F({},r.end)};r.end=F({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const cO=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:mP},disable:{null:[]},document:{42:Rn,43:Rn,45:Rn,48:Rn,49:Rn,50:Rn,51:Rn,52:Rn,53:Rn,54:Rn,55:Rn,56:Rn,57:Rn,62:dE},flow:{35:_P,42:bl,45:[_E,bl],60:AP,61:_E,95:bl,96:mE,126:mE},flowInitial:{[-2]:Uf,[-1]:Uf,32:Uf},insideSpan:{null:[Bf,oO]},string:{38:hE,92:fE},text:{[-5]:zf,[-4]:zf,[-3]:zf,33:$P,38:hE,42:Bf,60:[qk,IP],91:qP,92:[TP,fE],93:Hf,95:Bf,96:iP}},Symbol.toStringTag,{value:"Module"}));function dO(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 s={},a=[];let u=[],c=[];const d={attempt:q(Y),check:q(L),consume:k,enter:C,exit:H,interrupt:q(L,{interrupt:!0})},f={code:null,containerState:{},defineSkip:A,events:[],now:_,parser:e,previous:null,sliceSerialize:b,sliceStream:y,write:m};let p=t.tokenize.call(f,d);return t.resolveAll&&a.push(t),f;function m(se){return u=tr(u,se),v(),u[u.length-1]!==null?[]:(ne(t,0),f.events=Tl(a,f.events,f),f.events)}function b(se,pe){return hO(y(se),pe)}function y(se){return fO(u,se)}function _(){const{_bufferIndex:se,_index:pe,line:ve,column:re,offset:oe}=r;return{_bufferIndex:se,_index:pe,line:ve,column:re,offset:oe}}function A(se){s[se.line]=se.column,V()}function v(){let se;for(;r._index<u.length;){const pe=u[r._index];if(typeof pe=="string")for(se=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===se&&r._bufferIndex<pe.length;)w(pe.charCodeAt(r._bufferIndex));else w(pe)}}function w(se){p=p(se)}function k(se){Fe(se)?(r.line++,r.column=1,r.offset+=se===-3?2:1,V()):se!==-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=se}function C(se,pe){const ve=pe||{};return ve.type=se,ve.start=_(),f.events.push(["enter",ve,f]),c.push(ve),ve}function H(se){const pe=c.pop();return pe.end=_(),f.events.push(["exit",pe,f]),pe}function Y(se,pe){ne(se,pe.from)}function L(se,pe){pe.restore()}function q(se,pe){return ve;function ve(re,oe,xe){let ae,Q,ie,N;return Array.isArray(re)?ee(re):"tokenize"in re?ee([re]):D(re);function D(ye){return Le;function Le(Ue){const Ye=Ue!==null&&ye[Ue],Tt=Ue!==null&&ye.null,Cn=[...Array.isArray(Ye)?Ye:Ye?[Ye]:[],...Array.isArray(Tt)?Tt:Tt?[Tt]:[]];return ee(Cn)(Ue)}}function ee(ye){return ae=ye,Q=0,ye.length===0?xe:I(ye[Q])}function I(ye){return Le;function Le(Ue){return N=de(),ie=ye,ye.partial||(f.currentConstruct=ye),ye.name&&f.parser.constructs.disable.null.includes(ye.name)?Be():ye.tokenize.call(pe?Object.assign(Object.create(f),pe):f,d,_e,Be)(Ue)}}function _e(ye){return se(ie,N),oe}function Be(ye){return N.restore(),++Q<ae.length?I(ae[Q]):xe}}}function ne(se,pe){se.resolveAll&&!a.includes(se)&&a.push(se),se.resolve&&Vn(f.events,pe,f.events.length-pe,se.resolve(f.events.slice(pe),f)),se.resolveTo&&(f.events=se.resolveTo(f.events,f))}function de(){const se=_(),pe=f.previous,ve=f.currentConstruct,re=f.events.length,oe=Array.from(c);return{from:re,restore:xe};function xe(){r=se,f.previous=pe,f.currentConstruct=ve,f.events.length=re,c=oe,V()}}function V(){r.line in s&&r.column<2&&(r.column=s[r.line],r.offset+=s[r.line]-1)}}function fO(e,t){const n=t.start._index,r=t.start._bufferIndex,s=t.end._index,a=t.end._bufferIndex;let u;if(n===s)u=[e[n].slice(r,a)];else{if(u=e.slice(n,s),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}a>0&&u.push(e[s].slice(0,a))}return u}function hO(e,t){let n=-1;const r=[];let s;for(;++n<e.length;){const a=e[n];let u;if(typeof a=="string")u=a;else switch(a){case-5:{u="\r";break}case-4:{u=`
|
|
19
19
|
`;break}case-3:{u=`\r
|
|
20
|
-
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function dO(e){const r={constructs:oE([aO,...(e||{}).extensions||[]]),content:s(DN),defined:[],document:s(FN),flow:s(tO),lazy:{},string:s(iO),text:s(sO)};return r;function s(a){return u;function u(c){return uO(r,a,c)}}}function fO(e){for(;!mE(e););return e}const xE=/[\0\t\n\r]/g;function hO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(xE.lastIndex=m,f=xE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const pO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function mO(e){return e.replace(pO,gO)}function gO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return aE(n.slice(a?2:1),a?16:10)}return Df(n)||e}const wE={}.hasOwnProperty;function EO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),yO(n)(fO(dO(n).document().write(hO()(e,t,!0))))}function yO(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(sn),autolinkProtocol:me,autolinkEmail:me,atxHeading:a(Qt),blockQuote:a(Tt),characterEscape:me,characterReference:me,codeFenced:a(Cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Cn,u),codeText:a(rn,u),codeTextData:me,data:me,codeFlowValue:me,definition:a(Tr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(ir),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(vt,u),htmlFlowData:me,htmlText:a(vt,u),htmlTextData:me,image:a(vn),label:u,link:a(sn),listItem:a(we),listItemValue:b,listOrdered:a(Mn,m),listUnordered:a(Mn),paragraph:a(Pe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Qt),strong:a(Me),thematicBreak:a(ht)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Ue,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:ye,characterReference:Le,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(w),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:U,definitionLabelString:N,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(he),hardBreakTrailing:d(he),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(ae),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:k,resourceTitleString:D,resource:ee,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:R,strong:d(),thematicBreak:d()}};AE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")Ve.push(Ie);else{const lt=Ve.pop();Ie=s(J,lt,Ie)}for(Ie=-1;++Ie<J.length;){const lt=t[J[Ie][0]];wE.call(lt,J[Ie][1].type)&<[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},Ce),J[Ie][1])}if(Ce.tokenStack.length>0){const lt=Ce.tokenStack[Ce.tokenStack.length-1];(lt[1]||CE).call(Ce,void 0,lt[0])}for(ge.position={start:Si(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Si(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(J,ge,Ce){let Ve=ge-1,Ie=-1,lt=!1,$t,Ut,on,$r;for(;++Ve<=Ce;){const an=J[Ve];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Ie++:Ie--,$r=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&($t&&!$r&&!Ie&&!on&&(on=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Ie&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Ie===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if($t){let Vr=Ve;for(Ut=void 0;Vr--;){const Yn=J[Vr];if(Yn[1].type==="lineEnding"||Yn[1].type==="lineEndingBlank"){if(Yn[0]==="exit")continue;Ut&&(J[Ut][1].type="lineEndingBlank",lt=!0),Yn[1].type="lineEnding",Ut=Vr}else if(!(Yn[1].type==="linePrefix"||Yn[1].type==="blockQuotePrefix"||Yn[1].type==="blockQuotePrefixWhitespace"||Yn[1].type==="blockQuoteMarker"||Yn[1].type==="listItemIndent"))break}on&&(!Ut||on<Ut)&&($t._spread=!0),$t.end=Object.assign({},Ut?J[Ut][1].start:an[1].end),J.splice(Ut||Ve,0,["exit",$t,an[2]]),Ve++,Ce++}if(an[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};$t=Vr,J.splice(Ve,0,["enter",Vr,an[2]]),Ve++,Ce++,on=void 0,$r=!0}}}return J[ge][1]._spread=lt,Ce}function a(J,ge){return Ce;function Ce(Ve){c.call(this,J(Ve),Ve),ge&&ge.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:Si(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==J.type&&(ge?ge.call(this,J,Ve[0]):(Ve[1]||CE).call(this,J,Ve[0]));else throw new Error("Cannot close `"+J.type+"` ("+_a({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=Si(J.end)}function p(){return Lf(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function N(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=pr(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function U(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function R(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function me(J){const Ce=this.stack[this.stack.length-1].children;let Ve=Ce[Ce.length-1];(!Ve||Ve.type!=="text")&&(Ve=rt(),Ve.position={start:Si(J.start),end:void 0},Ce.push(Ve)),this.stack.push(Ve)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=Si(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Si(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(me.call(this,J),V.call(this,J))}function he(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function re(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function oe(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=mO(ge),Ce.identifier=pr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ve=J.children;Ce.children=Ve}else Ce.alt=ge}function k(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function _e(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=pr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Be(J){this.data.characterReferenceType=J.type}function ye(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let Ve;Ce?(Ve=aE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Df(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=Ve}function Le(J){const ge=this.stack.pop();ge.position.end=Si(J.end)}function Ue(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function Tt(){return{type:"blockquote",children:[]}}function Cn(){return{type:"code",lang:null,meta:null,value:""}}function rn(){return{type:"inlineCode",value:""}}function Tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ir(){return{type:"emphasis",children:[]}}function Qt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function vt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function sn(){return{type:"link",title:null,url:"",children:[]}}function Mn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function we(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function Si(e){return{line:e.line,column:e.column,offset:e.offset}}function AE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?AE(e,r):TO(e,r)}}function TO(e,t){let n;for(n in t)if(wE.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 CE(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+_a({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+_a({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+_a({start:t.start,end:t.end})+") is still open")}function bO(e){const t=this;t.parser=n;function n(r){return EO(r,de(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function _O(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 SO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
-
`}]}function
|
|
22
|
-
`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[0]]);let a={type:"element",tagName:"code",properties:r,children:[{type:"text",value:n}]};return t.meta&&(a.data={meta:t.meta}),e.patch(t,a),a=e.applyData(t,a),a={type:"element",tagName:"pre",properties:{},children:[a]},e.patch(t,a),a}function
|
|
20
|
+
`;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&s)continue;u=" ";break}default:u=String.fromCharCode(a)}s=a===-2,r.push(u)}return r.join("")}function pO(e){const r={constructs:aE([cO,...(e||{}).extensions||[]]),content:s(Bk),defined:[],document:s(Hk),flow:s(iO),lazy:{},string:s(aO),text:s(uO)};return r;function s(a){return u;function u(c){return dO(r,a,c)}}}function mO(e){for(;!gE(e););return e}const wE=/[\0\t\n\r]/g;function gO(){let e=1,t="",n=!0,r;return s;function s(a,u,c){const d=[];let f,p,m,b,y;for(a=t+(typeof a=="string"?a.toString():new TextDecoder(u||void 0).decode(a)),m=0,t="",n&&(a.charCodeAt(0)===65279&&m++,n=void 0);m<a.length;){if(wE.lastIndex=m,f=wE.exec(a),b=f&&f.index!==void 0?f.index:a.length,y=a.charCodeAt(b),!f){t=a.slice(m);break}if(y===10&&m===b&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<b&&(d.push(a.slice(m,b)),e+=b-m),y){case 0:{d.push(65533),e++;break}case 9:{for(p=Math.ceil(e/4)*4,d.push(-2);e++<p;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=b+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const EO=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function yO(e){return e.replace(EO,TO)}function TO(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const s=n.charCodeAt(1),a=s===120||s===88;return uE(n.slice(a?2:1),a?16:10)}return Mf(n)||e}const AE={}.hasOwnProperty;function bO(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),_O(n)(mO(pO(n).document().write(gO()(e,t,!0))))}function _O(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:a(sn),autolinkProtocol:de,autolinkEmail:de,atxHeading:a(Qt),blockQuote:a(Tt),characterEscape:de,characterReference:de,codeFenced:a(Cn),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:a(Cn,u),codeText:a(rn,u),codeTextData:de,data:de,codeFlowValue:de,definition:a(Tr),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:a(ir),hardBreakEscape:a($e),hardBreakTrailing:a($e),htmlFlow:a(vt,u),htmlFlowData:de,htmlText:a(vt,u),htmlTextData:de,image:a(vn),label:u,link:a(sn),listItem:a(we),listItemValue:b,listOrdered:a(Mn,m),listUnordered:a(Mn),paragraph:a(Pe),reference:I,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:a(Qt),strong:a(Me),thematicBreak:a(ht)},exit:{atxHeading:d(),atxHeadingSequence:Y,autolink:d(),autolinkEmail:Ye,autolinkProtocol:Ue,blockQuote:d(),characterEscapeValue:V,characterReferenceMarkerHexadecimal:Be,characterReferenceMarkerNumeric:Be,characterReferenceValue:ye,characterReference:Le,codeFenced:d(v),codeFencedFence:A,codeFencedFenceInfo:y,codeFencedFenceMeta:_,codeFlowValue:V,codeIndented:d(w),codeText:d(oe),codeTextData:V,data:V,definition:d(),definitionDestinationString:H,definitionLabelString:k,definitionTitleString:C,emphasis:d(),hardBreakEscape:d(pe),hardBreakTrailing:d(pe),htmlFlow:d(ve),htmlFlowData:V,htmlText:d(re),htmlTextData:V,image:d(ae),label:ie,labelText:Q,lineEnding:se,link:d(xe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:_e,resourceDestinationString:N,resourceTitleString:D,resource:ee,setextHeading:d(ne),setextHeadingLineSequence:q,setextHeadingText:L,strong:d(),thematicBreak:d()}};CE(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(J){let ge={type:"root",children:[]};const Ce={stack:[ge],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:p,data:n},Ve=[];let Ie=-1;for(;++Ie<J.length;)if(J[Ie][1].type==="listOrdered"||J[Ie][1].type==="listUnordered")if(J[Ie][0]==="enter")Ve.push(Ie);else{const lt=Ve.pop();Ie=s(J,lt,Ie)}for(Ie=-1;++Ie<J.length;){const lt=t[J[Ie][0]];AE.call(lt,J[Ie][1].type)&<[J[Ie][1].type].call(Object.assign({sliceSerialize:J[Ie][2].sliceSerialize},Ce),J[Ie][1])}if(Ce.tokenStack.length>0){const lt=Ce.tokenStack[Ce.tokenStack.length-1];(lt[1]||vE).call(Ce,void 0,lt[0])}for(ge.position={start:Si(J.length>0?J[0][1].start:{line:1,column:1,offset:0}),end:Si(J.length>0?J[J.length-2][1].end:{line:1,column:1,offset:0})},Ie=-1;++Ie<t.transforms.length;)ge=t.transforms[Ie](ge)||ge;return ge}function s(J,ge,Ce){let Ve=ge-1,Ie=-1,lt=!1,$t,Ut,on,$r;for(;++Ve<=Ce;){const an=J[Ve];switch(an[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{an[0]==="enter"?Ie++:Ie--,$r=void 0;break}case"lineEndingBlank":{an[0]==="enter"&&($t&&!$r&&!Ie&&!on&&(on=Ve),$r=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:$r=void 0}if(!Ie&&an[0]==="enter"&&an[1].type==="listItemPrefix"||Ie===-1&&an[0]==="exit"&&(an[1].type==="listUnordered"||an[1].type==="listOrdered")){if($t){let Vr=Ve;for(Ut=void 0;Vr--;){const Yn=J[Vr];if(Yn[1].type==="lineEnding"||Yn[1].type==="lineEndingBlank"){if(Yn[0]==="exit")continue;Ut&&(J[Ut][1].type="lineEndingBlank",lt=!0),Yn[1].type="lineEnding",Ut=Vr}else if(!(Yn[1].type==="linePrefix"||Yn[1].type==="blockQuotePrefix"||Yn[1].type==="blockQuotePrefixWhitespace"||Yn[1].type==="blockQuoteMarker"||Yn[1].type==="listItemIndent"))break}on&&(!Ut||on<Ut)&&($t._spread=!0),$t.end=Object.assign({},Ut?J[Ut][1].start:an[1].end),J.splice(Ut||Ve,0,["exit",$t,an[2]]),Ve++,Ce++}if(an[1].type==="listItemPrefix"){const Vr={type:"listItem",_spread:!1,start:Object.assign({},an[1].start),end:void 0};$t=Vr,J.splice(Ve,0,["enter",Vr,an[2]]),Ve++,Ce++,on=void 0,$r=!0}}}return J[ge][1]._spread=lt,Ce}function a(J,ge){return Ce;function Ce(Ve){c.call(this,J(Ve),Ve),ge&&ge.call(this,Ve)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(J,ge,Ce){this.stack[this.stack.length-1].children.push(J),this.stack.push(J),this.tokenStack.push([ge,Ce||void 0]),J.position={start:Si(ge.start),end:void 0}}function d(J){return ge;function ge(Ce){J&&J.call(this,Ce),f.call(this,Ce)}}function f(J,ge){const Ce=this.stack.pop(),Ve=this.tokenStack.pop();if(Ve)Ve[0].type!==J.type&&(ge?ge.call(this,J,Ve[0]):(Ve[1]||vE).call(this,J,Ve[0]));else throw new Error("Cannot close `"+J.type+"` ("+Sa({start:J.start,end:J.end})+"): it’s not open");Ce.position.end=Si(J.end)}function p(){return Df(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function b(J){if(this.data.expectingFirstListItemValue){const ge=this.stack[this.stack.length-2];ge.start=Number.parseInt(this.sliceSerialize(J),10),this.data.expectingFirstListItemValue=void 0}}function y(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.lang=J}function _(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.meta=J}function A(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function v(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function w(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J.replace(/(\r?\n|\r)$/g,"")}function k(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=pr(this.sliceSerialize(J)).toLowerCase()}function C(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function H(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function Y(J){const ge=this.stack[this.stack.length-1];if(!ge.depth){const Ce=this.sliceSerialize(J).length;ge.depth=Ce}}function L(){this.data.setextHeadingSlurpLineEnding=!0}function q(J){const ge=this.stack[this.stack.length-1];ge.depth=this.sliceSerialize(J).codePointAt(0)===61?1:2}function ne(){this.data.setextHeadingSlurpLineEnding=void 0}function de(J){const Ce=this.stack[this.stack.length-1].children;let Ve=Ce[Ce.length-1];(!Ve||Ve.type!=="text")&&(Ve=rt(),Ve.position={start:Si(J.start),end:void 0},Ce.push(Ve)),this.stack.push(Ve)}function V(J){const ge=this.stack.pop();ge.value+=this.sliceSerialize(J),ge.position.end=Si(J.end)}function se(J){const ge=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Ce=ge.children[ge.children.length-1];Ce.position.end=Si(J.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ge.type)&&(de.call(this,J),V.call(this,J))}function pe(){this.data.atHardBreak=!0}function ve(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function re(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function oe(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.value=J}function xe(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function ae(){const J=this.stack[this.stack.length-1];if(this.data.inReference){const ge=this.data.referenceType||"shortcut";J.type+="Reference",J.referenceType=ge,delete J.url,delete J.title}else delete J.identifier,delete J.label;this.data.referenceType=void 0}function Q(J){const ge=this.sliceSerialize(J),Ce=this.stack[this.stack.length-2];Ce.label=yO(ge),Ce.identifier=pr(ge).toLowerCase()}function ie(){const J=this.stack[this.stack.length-1],ge=this.resume(),Ce=this.stack[this.stack.length-1];if(this.data.inReference=!0,Ce.type==="link"){const Ve=J.children;Ce.children=Ve}else Ce.alt=ge}function N(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.url=J}function D(){const J=this.resume(),ge=this.stack[this.stack.length-1];ge.title=J}function ee(){this.data.inReference=void 0}function I(){this.data.referenceType="collapsed"}function _e(J){const ge=this.resume(),Ce=this.stack[this.stack.length-1];Ce.label=ge,Ce.identifier=pr(this.sliceSerialize(J)).toLowerCase(),this.data.referenceType="full"}function Be(J){this.data.characterReferenceType=J.type}function ye(J){const ge=this.sliceSerialize(J),Ce=this.data.characterReferenceType;let Ve;Ce?(Ve=uE(ge,Ce==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Ve=Mf(ge);const Ie=this.stack[this.stack.length-1];Ie.value+=Ve}function Le(J){const ge=this.stack.pop();ge.position.end=Si(J.end)}function Ue(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url=this.sliceSerialize(J)}function Ye(J){V.call(this,J);const ge=this.stack[this.stack.length-1];ge.url="mailto:"+this.sliceSerialize(J)}function Tt(){return{type:"blockquote",children:[]}}function Cn(){return{type:"code",lang:null,meta:null,value:""}}function rn(){return{type:"inlineCode",value:""}}function Tr(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function ir(){return{type:"emphasis",children:[]}}function Qt(){return{type:"heading",depth:0,children:[]}}function $e(){return{type:"break"}}function vt(){return{type:"html",value:""}}function vn(){return{type:"image",title:null,url:"",alt:null}}function sn(){return{type:"link",title:null,url:"",children:[]}}function Mn(J){return{type:"list",ordered:J.type==="listOrdered",start:null,spread:J._spread,children:[]}}function we(J){return{type:"listItem",spread:J._spread,checked:null,children:[]}}function Pe(){return{type:"paragraph",children:[]}}function Me(){return{type:"strong",children:[]}}function rt(){return{type:"text",value:""}}function ht(){return{type:"thematicBreak"}}}function Si(e){return{line:e.line,column:e.column,offset:e.offset}}function CE(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?CE(e,r):SO(e,r)}}function SO(e,t){let n;for(n in t)if(AE.call(t,n))switch(n){case"canContainEols":{const r=t[n];r&&e[n].push(...r);break}case"transforms":{const r=t[n];r&&e[n].push(...r);break}case"enter":case"exit":{const r=t[n];r&&Object.assign(e[n],r);break}}}function vE(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 xO(e){const t=this;t.parser=n;function n(r){return bO(r,fe(F(F({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function wO(e,t){const n={type:"element",tagName:"blockquote",properties:{},children:e.wrap(e.all(t),!0)};return e.patch(t,n),e.applyData(t,n)}function AO(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
|
|
21
|
+
`}]}function CO(e,t){const n=t.value?t.value+`
|
|
22
|
+
`:"",r={},s=t.lang?t.lang.split(/\s+/):[];s.length>0&&(r.className=["language-"+s[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 vO(e,t){const n={type:"element",tagName:"del",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function NO(e,t){const n={type:"element",tagName:"em",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function kO(e,t){const n=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",r=String(t.identifier).toUpperCase(),s=Js(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-"+s,id:n+"fnref-"+s+(c>1?"-"+c:""),dataFootnoteRef:!0,ariaDescribedBy:["footnote-label"]},children:[{type:"text",value:String(u)}]};e.patch(t,d);const f={type:"element",tagName:"sup",properties:{},children:[d]};return e.patch(t,f),e.applyData(t,f)}function PO(e,t){const n={type:"element",tagName:"h"+t.depth,properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function OO(e,t){if(e.options.allowDangerousHtml){const n={type:"raw",value:t.value};return e.patch(t,n),e.applyData(t,n)}}function NE(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 s=e.all(t),a=s[0];a&&a.type==="text"?a.value="["+a.value:s.unshift({type:"text",value:"["});const u=s[s.length-1];return u&&u.type==="text"?u.value+=r:s.push({type:"text",value:r}),s}function IO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NE(e,t);const s={src:Js(r.url||""),alt:t.alt};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"img",properties:s,children:[]};return e.patch(t,a),e.applyData(t,a)}function RO(e,t){const n={src:Js(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 LO(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 DO(e,t){const n=String(t.identifier).toUpperCase(),r=e.definitionById.get(n);if(!r)return NE(e,t);const s={href:Js(r.url||"")};r.title!==null&&r.title!==void 0&&(s.title=r.title);const a={type:"element",tagName:"a",properties:s,children:e.all(t)};return e.patch(t,a),e.applyData(t,a)}function MO(e,t){const n={href:Js(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 FO(e,t,n){const r=e.all(t),s=n?BO(n):kE(t),a={},u=[];if(typeof t.checked=="boolean"){const p=r[0];let m;p&&p.type==="element"&&p.tagName==="p"?m=p:(m={type:"element",tagName:"p",properties:{},children:[]},r.unshift(m)),m.children.length>0&&m.children.unshift({type:"text",value:" "}),m.children.unshift({type:"element",tagName:"input",properties:{type:"checkbox",checked:t.checked,disabled:!0},children:[]}),a.className=["task-list-item"]}let c=-1;for(;++c<r.length;){const p=r[c];(s||c!==0||p.type!=="element"||p.tagName!=="p")&&u.push({type:"text",value:`
|
|
23
23
|
`}),p.type==="element"&&p.tagName==="p"&&!s?u.push(...p.children):u.push(p)}const d=r[r.length-1];d&&(s||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
|
|
24
|
-
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function
|
|
24
|
+
`});const f={type:"element",tagName:"li",properties:a,children:u};return e.patch(t,f),e.applyData(t,f)}function BO(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=kE(n[r])}return t}function kE(e){const t=e.spread;return t==null?e.children.length>1:t}function UO(e,t){const n={},r=e.all(t);let s=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++s<r.length;){const u=r[s];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 HO(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function zO(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function jO(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function $O(e,t){const n=e.all(t),r=n.shift(),s=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),s.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Ir(t.children[1]),d=gl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),s.push(u)}const a={type:"element",tagName:"table",properties:{},children:e.wrap(s,!0)};return e.patch(t,a),e.applyData(t,a)}function VO(e,t,n){const r=n?n.children:void 0,a=(r?r.indexOf(t):1)===0?"th":"td",u=n&&n.type==="table"?n.align:void 0,c=u?u.length:t.children.length;let d=-1;const f=[];for(;++d<c;){const m=t.children[d],b={},y=u?u[d]:void 0;y&&(b.align=y);let _={type:"element",tagName:a,properties:b,children:[]};m&&(_.children=e.all(m),e.patch(m,_),_=e.applyData(m,_)),f.push(_)}const p={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,p),e.applyData(t,p)}function qO(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const PE=9,OE=32;function YO(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),s=0;const a=[];for(;r;)a.push(IE(t.slice(s,r.index),s>0,!0),r[0]),s=r.index+r[0].length,r=n.exec(t);return a.push(IE(t.slice(s),s>0,!1)),a.join("")}function IE(e,t,n){let r=0,s=e.length;if(t){let a=e.codePointAt(r);for(;a===PE||a===OE;)r++,a=e.codePointAt(r)}if(n){let a=e.codePointAt(s-1);for(;a===PE||a===OE;)s--,a=e.codePointAt(s-1)}return s>r?e.slice(r,s):""}function GO(e,t){const n={type:"text",value:YO(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function WO(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const XO={blockquote:wO,break:AO,code:CO,delete:vO,emphasis:NO,footnoteReference:kO,heading:PO,html:OO,imageReference:IO,image:RO,inlineCode:LO,linkReference:DO,link:MO,listItem:FO,list:UO,paragraph:HO,root:zO,strong:jO,table:$O,tableCell:qO,tableRow:VO,text:GO,thematicBreak:WO,toml:_l,yaml:_l,definition:_l,footnoteDefinition:_l};function _l(){}const RE=-1,Sl=0,va=1,xl=2,jf=3,$f=4,Vf=5,qf=6,LE=7,DE=8,ME=typeof self=="object"?self:globalThis,FE=(e,t)=>{switch(e){case"Function":case"SharedWorker":case"Worker":case"eval":case"setInterval":case"setTimeout":throw new TypeError("unable to deserialize "+e)}return new ME[e](t)},KO=(e,t)=>{const n=(s,a)=>(e.set(a,s),s),r=s=>{if(e.has(s))return e.get(s);const[a,u]=t[s];switch(a){case Sl:case RE:return n(u,s);case va:{const c=n([],s);for(const d of u)c.push(r(d));return c}case xl:{const c=n({},s);for(const[d,f]of u)c[r(d)]=r(f);return c}case jf:return n(new Date(u),s);case $f:{const{source:c,flags:d}=u;return n(new RegExp(c,d),s)}case Vf:{const c=n(new Map,s);for(const[d,f]of u)c.set(r(d),r(f));return c}case qf:{const c=n(new Set,s);for(const d of u)c.add(r(d));return c}case LE:{const{name:c,message:d}=u;return n(typeof ME[c]=="function"?FE(c,d):new Error(d),s)}case DE:return n(BigInt(u),s);case"BigInt":return n(Object(BigInt(u)),s);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(FE(a,u),s)};return r},BE=e=>KO(new Map,e)(0),as="",{toString:QO}={},{keys:JO}=Object,Na=e=>{const t=typeof e;if(t!=="object"||!e)return[Sl,t];const n=QO.call(e).slice(8,-1);switch(n){case"Array":return[va,as];case"Object":return[xl,as];case"Date":return[jf,as];case"RegExp":return[$f,as];case"Map":return[Vf,as];case"Set":return[qf,as];case"DataView":return[va,n]}return n.includes("Array")?[va,n]:e instanceof Error?[LE,e.name||"Error"]:[xl,n]},wl=([e,t])=>e===Sl&&(t==="function"||t==="symbol"),ZO=(e,t,n,r)=>{const s=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},a=u=>{if(n.has(u))return n.get(u);let[c,d]=Na(u);switch(c){case Sl:{let p=u;switch(d){case"bigint":c=DE,p=u.toString();break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);p=null;break;case"undefined":return s([RE],u)}return s([c,p],u)}case va:{if(d){let b=u;return d==="DataView"?b=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(b=new Uint8Array(u)),s([d,[...b]],u)}const p=[],m=s([c,p],u);for(const b of u)p.push(a(b));return m}case xl:{if(d)switch(d){case"BigInt":return s([d,u.toString()],u);case"Boolean":case"Number":case"String":return s([d,u.valueOf()],u)}if(t&&"toJSON"in u)return a(u.toJSON());const p=[],m=s([c,p],u);for(const b of JO(u))(e||!wl(Na(u[b])))&&p.push([a(b),a(u[b])]);return m}case jf:return s([c,isNaN(u.getTime())?as:u.toISOString()],u);case $f:{const{source:p,flags:m}=u;return s([c,{source:p,flags:m}],u)}case Vf:{const p=[],m=s([c,p],u);for(const[b,y]of u)(e||!(wl(Na(b))||wl(Na(y))))&&p.push([a(b),a(y)]);return m}case qf:{const p=[],m=s([c,p],u);for(const b of u)(e||!wl(Na(b)))&&p.push(a(b));return m}}const{message:f}=u;return s([c,{name:d,message:f}],u)};return a},UE=(e,{json:t,lossy:n}={})=>{const r=[];return ZO(!(t||n),!!t,new Map,r)(e),r},us=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?BE(UE(e,t)):structuredClone(e):(e,t)=>BE(UE(e,t));function e3(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 t3(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function n3(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||e3,r=e.options.footnoteBackLabel||t3,s=e.options.footnoteLabel||"Footnotes",a=e.options.footnoteLabelTagName||"h2",u=e.options.footnoteLabelProperties||{className:["sr-only"]},c=[];let d=-1;for(;++d<e.footnoteOrder.length;){const f=e.footnoteById.get(e.footnoteOrder[d]);if(!f)continue;const p=e.all(f),m=String(f.identifier).toUpperCase(),b=Js(m.toLowerCase());let y=0;const _=[],A=e.footnoteCounts.get(m);for(;A!==void 0&&++y<=A;){_.length>0&&_.push({type:"text",value:" "});let k=typeof n=="string"?n:n(d,y);typeof k=="string"&&(k={type:"text",value:k}),_.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+b+(y>1?"-"+y:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,y),className:["data-footnote-backref"]},children:Array.isArray(k)?k:[k]})}const v=p[p.length-1];if(v&&v.type==="element"&&v.tagName==="p"){const k=v.children[v.children.length-1];k&&k.type==="text"?k.value+=" ":v.children.push({type:"text",value:" "}),v.children.push(..._)}else p.push(..._);const w={type:"element",tagName:"li",properties:{id:t+"fn-"+b},children:e.wrap(p,!0)};e.patch(f,w),c.push(w)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:a,properties:fe(F({},us(u)),{id:"footnote-label"}),children:[{type:"text",value:s}]},{type:"text",value:`
|
|
25
25
|
`},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
|
|
26
|
-
`}]}}const Al=(function(e){if(e==null)return
|
|
26
|
+
`}]}}const Al=(function(e){if(e==null)return o3;if(typeof e=="function")return Cl(e);if(typeof e=="object")return Array.isArray(e)?r3(e):i3(e);if(typeof e=="string")return s3(e);throw new Error("Expected function, string, or object as test")});function r3(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=Al(e[n]);return Cl(r);function r(...s){let a=-1;for(;++a<t.length;)if(t[a].apply(this,s))return!0;return!1}}function i3(e){const t=e;return Cl(n);function n(r){const s=r;let a;for(a in e)if(s[a]!==t[a])return!1;return!0}}function s3(e){return Cl(t);function t(n){return n&&n.type===e}}function Cl(e){return t;function t(n,r,s){return!!(a3(n)&&e.call(this,n,typeof r=="number"?r:void 0,s||void 0))}}function o3(){return!0}function a3(e){return e!==null&&typeof e=="object"&&"type"in e}function fU(e){return e}const HE=[],u3=!0,Yf=!1,l3="skip";function zE(e,t,n,r){let s;typeof t=="function"&&typeof n!="function"?(r=n,n=t):s=t;const a=Al(s),u=r?-1:1;c(e,void 0,[])();function c(d,f,p){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const y=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(b,"name",{value:"node ("+(d.type+(y?"<"+y+">":""))+")"})}return b;function b(){let y=HE,_,A,v;if((!t||a(d,f,p[p.length-1]||void 0))&&(y=c3(n(d,p)),y[0]===Yf))return y;if("children"in d&&d.children){const w=d;if(w.children&&y[0]!==l3)for(A=(r?w.children.length:-1)+u,v=p.concat(w);A>-1&&A<w.children.length;){const k=w.children[A];if(_=c(k,A,v)(),_[0]===Yf)return _;A=typeof _[1]=="number"?_[1]:A+u}}return y}}}function c3(e){return Array.isArray(e)?e:typeof e=="number"?[u3,e]:e==null?HE:[e]}function vl(e,t,n,r){let s,a,u;typeof t=="function"&&typeof n!="function"?(a=void 0,u=t,s=n):(a=t,u=n,s=r),zE(e,a,c,s);function c(d,f){const p=f[f.length-1],m=p?p.children.indexOf(d):void 0;return u(d,m,p)}}const Gf={}.hasOwnProperty,d3={};function f3(e,t){const n=t||d3,r=new Map,s=new Map,a=new Map,u=F(F({},XO),n.handlers),c={all:f,applyData:p3,definitionById:r,footnoteById:s,footnoteCounts:a,footnoteOrder:[],handlers:u,one:d,options:n,patch:h3,wrap:g3};return vl(e,function(p){if(p.type==="definition"||p.type==="footnoteDefinition"){const m=p.type==="definition"?r:s,b=String(p.identifier).toUpperCase();m.has(b)||m.set(b,p)}}),c;function d(p,m){const b=p.type,y=c.handlers[b];if(Gf.call(c.handlers,b)&&y)return y(c,p,m);if(c.options.passThrough&&c.options.passThrough.includes(b)){if("children"in p){const A=p,{children:v}=A,w=cn(A,["children"]),k=us(w);return k.children=c.all(p),k}return us(p)}return(c.options.unknownHandler||m3)(c,p,m)}function f(p){const m=[];if("children"in p){const b=p.children;let y=-1;for(;++y<b.length;){const _=c.one(b[y],p);if(_){if(y&&b[y-1].type==="break"&&(!Array.isArray(_)&&_.type==="text"&&(_.value=jE(_.value)),!Array.isArray(_)&&_.type==="element")){const A=_.children[0];A&&A.type==="text"&&(A.value=jE(A.value))}Array.isArray(_)?m.push(..._):m.push(_)}}}return m}}function h3(e,t){e.position&&(t.position=K1(e))}function p3(e,t){let n=t;if(e&&e.data){const r=e.data.hName,s=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,us(a)),"children"in n&&n.children&&s!==null&&s!==void 0&&(n.children=s)}return n}function m3(e,t){const n=t.data||{},r="value"in t&&!(Gf.call(n,"hProperties")||Gf.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 g3(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
|
|
27
27
|
`});++r<e.length;)r&&n.push({type:"text",value:`
|
|
28
28
|
`}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
|
|
29
|
-
`}),n}function
|
|
30
|
-
`},s),a}function p3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=jE(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return jE(n,F({file:r},e||t))}}function $E(e){if(e)throw e}var Gf,VE;function m3(){if(VE)return Gf;VE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var 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 Gf=function d(){var f,p,m,b,y,_,A=arguments[0],v=1,w=arguments.length,N=!1;for(typeof A=="boolean"&&(N=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(N&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(N,_,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Gf}var g3=m3();const Wf=je(g3);function Xf(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 E3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?y3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function y3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Rr={basename:T3,dirname:b3,extname:_3,join:S3,sep:"/"};function T3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ka(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function b3(e){if(ka(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 _3(e){ka(e);let t=e.length,n=-1,r=0,s=-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?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function S3(...e){let t=-1,n;for(;++t<e.length;)ka(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":x3(n)}function x3(e){ka(e);const t=e.codePointAt(0)===47;let n=w3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function w3(e,t){let n="",r=0,s=-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(!(s===u-1||a===1))if(s!==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("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ka(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const A3={cwd:C3};function C3(){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 v3(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 k3(e)}function k3(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Qf=["history","path","basename","stem","extname","dirname"];class qE{constructor(t){let n;t?Kf(t)?n={path:t}:typeof t=="string"||N3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":A3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Qf.length;){const a=Qf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Qf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){Zf(t,"basename"),Jf(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){YE(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(Jf(t,"extname"),YE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Kf(t)&&(t=v3(t)),Zf(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){Zf(t,"stem"),Jf(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new gn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Jf(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function Zf(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function YE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function N3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const P3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),O3={}.hasOwnProperty;class eh extends P3{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=E3()}copy(){const t=new eh;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?(rh("data",this.frozen),this.namespace[t]=n,this):O3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(rh("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 s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=kl(t),r=this.parser||this.Parser;return th("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),th("process",this.parser||this.Parser),nh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=kl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,_=r.stringify(y,b);L3(_)?b.value=_:b.result=_,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),th("processSync",this.parser||this.Parser),nh("processSync",this.compiler||this.Compiler),this.process(t,s),WE("processSync","process",n),r;function s(a,u){n=!0,$E(a),r=u}}run(t,n,r){GE(t),this.freeze();const s=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=kl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),WE("runSync","run",r),s;function a(u,c){$E(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=kl(n),s=this.compiler||this.Compiler;return nh("stringify",s),GE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(rh("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Wf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const A=r[b][1];Xf(A)&&Xf(y)&&(y=Wf(!0,A,y)),r[b]=[f,y,..._]}}}}const I3=new eh().freeze();function th(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function rh(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function GE(e){if(!Xf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function WE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function kl(e){return R3(e)?e:new qE(e)}function R3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function L3(e){return typeof e=="string"||D3(e)}function D3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const M3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",XE=[],KE={allowDangerousHtml:!0},F3=/^(https?|ircs?|mailto|xmpp)$/i,B3=[{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 QE(e){const t=U3(e),n=H3(e);return z3(t.runSync(t.parse(n),n),e)}function U3(e){const t=e.rehypePlugins||XE,n=e.remarkPlugins||XE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),KE):KE;return I3().use(bO).use(n).use(p3,r).use(t)}function H3(e){const t=e.children||"",n=new qE;return typeof t=="string"&&(n.value=t),n}function z3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||j3;for(const p of B3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+M3+p.id,void 0);return vl(e,f),fN(e,{Fragment:S.Fragment,components:s,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Rf)if(Object.hasOwn(Rf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=Rf[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function j3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||F3.test(e.slice(0,t))?e:""}const JE=/[#.]/g;function $3(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){JE.lastIndex=s;const c=JE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ZE(e,t,n){const r=n?G3(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=$3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,V3(u))c.unshift(u);else for(const[m,b]of Object.entries(u))q3(e,d.properties,m,b)}for(const f of c)ih(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function V3(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 s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function q3(e,t,n,r){const s=ml(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"?s.spaceSeparated?a=j1(r):s.commaSeparated?a=N1(r):s.commaOrSpaceSeparated?a=j1(N1(r).join(" ")):a=ey(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?Y3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ey(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function ih(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)ih(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?ih(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ey(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Ea(n)===Ea(t)))return!0}return n}function Y3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function G3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const W3=["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"],X3=ZE(ya,"div"),K3=ZE(bi,"g",W3);function Q3(e){const t=String(e),n=[];return{toOffset:s,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=ty(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 s(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=ty(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 ty(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
-
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ls={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/"},ny={}.hasOwnProperty,J3=Object.prototype;function Z3(e,t){const n=t||{};return sh({file:n.file||void 0,location:!1,schema:n.space==="svg"?bi:ya,verbose:n.verbose||!1},e)}function sh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Nl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:ry(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=Q3(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"},Nl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Nl(e,r,n),n}default:return n=eI(e,t),n}}function ry(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=sh(e,t[n]);r.push(s)}return r}function eI(e,t){const n=e.schema;e.schema=t.namespaceURI===ls.svg?bi:ya;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ny.call(J3,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?K3:X3)(t.tagName,s,ry(e,t.childNodes));if(Nl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&eo(d.startTag),p=d&&d.endTag&&eo(d.endTag),m=sh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function Nl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=tI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function tI(e,t,n){const r=eo(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ny.call(n.attrs,u)&&(a[ml(e.schema,u).property]=eo(n.attrs[u]));n.startTag;const c=eo(n.startTag),d=n.endTag?eo(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function eo(e){const t=iy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=iy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function iy(e){return e.line&&e.column?e:void 0}const sy={}.hasOwnProperty;function oy(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&sy.call(s,e)){const d=String(s[e]);u=sy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const nI={},rI={}.hasOwnProperty,ay=oy("type",{handlers:{root:sI,element:cI,text:uI,comment:lI,doctype:aI}});function iI(e,t){const r=(t||nI).space;return ay(e,r==="svg"?bi:ya)}function sI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=oh(e.children,n,t),to(e,n),n}function oI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=oh(e.children,n,t),to(e,n),n}function aI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return to(e,t),t}function uI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return to(e,t),t}function lI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return to(e,t),t}function cI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=bi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&rI.call(e.properties,a)){const d=dI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ls[u],childNodes:[],parentNode:null};return c.childNodes=oh(e.children,c,r),to(e,c),e.tagName==="template"&&e.content&&(c.content=oI(e.content,r)),c}function dI(e,t,n){const r=ml(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?P1(n):$1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=ls[r.space]}return s}function oh(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=ay(e[r],n);a.parentNode=t,s.push(a)}return s}function to(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 fI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],hI=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]),xt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Ln={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function uy(e){return e>=55296&&e<=57343}function pI(e){return e>=56320&&e<=57343}function mI(e,t){return(e-55296)*1024+9216+t}function ly(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function cy(e){return e>=64976&&e<=65007||hI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const gI=65536;class EI{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=gI,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:s,offset:a}=this,u=s+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(pI(n))return this.pos++,this._addGap(),mI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,uy(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){ly(t)?this._err(te.controlCharacterInInputStream):cy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function dy(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 yI=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),TI=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 bI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=TI.get(e))!==null&&t!==void 0?t:e}var Gt;(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"})(Gt||(Gt={}));const _I=32;var xi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xi||(xi={}));function ah(e){return e>=Gt.ZERO&&e<=Gt.NINE}function SI(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_F||e>=Gt.LOWER_A&&e<=Gt.LOWER_F}function xI(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_Z||e>=Gt.LOWER_A&&e<=Gt.LOWER_Z||ah(e)}function wI(e){return e===Gt.EQUALS||xI(e)}var Wt;(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"})(Wt||(Wt={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class AI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Gt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|_I)===Gt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(ah(s)||SI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(ah(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,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===Gt.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(bI(this.result),this.consumed),this.errors&&(t!==Gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&xi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=CI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||wI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&xi.VALUE_LENGTH)>>14,a!==0){if(u===Gt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&xi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~xi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function CI(e,t,n,r){const s=(t&xi.BRANCH_LENGTH)>>7,a=t&xi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-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+s]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var cs;(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"})(cs||(cs={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const vI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function no(e){var t;return(t=vI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const fe=g,kI={[le.HTML]:new Set([fe.ADDRESS,fe.APPLET,fe.AREA,fe.ARTICLE,fe.ASIDE,fe.BASE,fe.BASEFONT,fe.BGSOUND,fe.BLOCKQUOTE,fe.BODY,fe.BR,fe.BUTTON,fe.CAPTION,fe.CENTER,fe.COL,fe.COLGROUP,fe.DD,fe.DETAILS,fe.DIR,fe.DIV,fe.DL,fe.DT,fe.EMBED,fe.FIELDSET,fe.FIGCAPTION,fe.FIGURE,fe.FOOTER,fe.FORM,fe.FRAME,fe.FRAMESET,fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6,fe.HEAD,fe.HEADER,fe.HGROUP,fe.HR,fe.HTML,fe.IFRAME,fe.IMG,fe.INPUT,fe.LI,fe.LINK,fe.LISTING,fe.MAIN,fe.MARQUEE,fe.MENU,fe.META,fe.NAV,fe.NOEMBED,fe.NOFRAMES,fe.NOSCRIPT,fe.OBJECT,fe.OL,fe.P,fe.PARAM,fe.PLAINTEXT,fe.PRE,fe.SCRIPT,fe.SECTION,fe.SELECT,fe.SOURCE,fe.STYLE,fe.SUMMARY,fe.TABLE,fe.TBODY,fe.TD,fe.TEMPLATE,fe.TEXTAREA,fe.TFOOT,fe.TH,fe.THEAD,fe.TITLE,fe.TR,fe.TRACK,fe.UL,fe.WBR,fe.XMP]),[le.MATHML]:new Set([fe.MI,fe.MO,fe.MN,fe.MS,fe.MTEXT,fe.ANNOTATION_XML]),[le.SVG]:new Set([fe.TITLE,fe.FOREIGN_OBJECT,fe.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},uh=new Set([fe.H1,fe.H2,fe.H3,fe.H4,fe.H5,fe.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const It={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function NI(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Na(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function PI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function wi(e){return PI(e)||Na(e)}function fy(e){return wi(e)||NI(e)}function Pl(e){return e+32}function hy(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function py(e){return hy(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function OI(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:uy(e)?te.surrogateCharacterReference:cy(e)?te.noncharacterCharacterReference:ly(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class II{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new EI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new AI(yI,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=OI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(dy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=no(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=hy(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(wi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Na(t)?Pl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){wi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){wi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){wi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:wi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){wi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ln.SCRIPT,!1)&&py(this.preprocessor.peek(Ln.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ln.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ln.SCRIPT,!1)&&py(this.preprocessor.peek(Ln.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ln.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(Na(t)?Pl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ln.DASH_DASH,!0)?(this._createCommentToken(Ln.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Ln.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ln.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Ln.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Ln.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Na(t))this._createDoctypeToken(String.fromCharCode(Pl(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=xt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Na(t)?Pl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ln.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ln.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&fy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){fy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const my=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),gy=new Set([...my,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ol=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),RI=new Set([...Ol,g.OL,g.UL]),LI=new Set([...Ol,g.BUTTON]),Ey=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),yy=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),DI=new Set([g.TR,g.TEMPLATE,g.HTML]),MI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),FI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),BI=new Set([g.TD,g.TH]);class UI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(uh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(BI,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(FI,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(MI,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(DI,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(yy.has(s))return!1;break}case le.MATHML:{if(Ey.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ol)}hasInListItemScope(t){return this.hasInDynamicScope(t,RI)}hasInButtonScope(t){return this.hasInDynamicScope(t,LI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(uh.has(n))return!0;if(Ol.has(n))return!1;break}case le.SVG:{if(yy.has(n))return!1;break}case le.MATHML:{if(Ey.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&my.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&gy.has(this.currentTagId);)this.pop()}}const lh=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const Ty={type:Lr.Marker};class HI{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Lr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<lh)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<lh)return;const s=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=>s.get(d.name)===d.value)&&(a+=1,a>=lh&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Ty)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(Ty);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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 s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},by="html",zI="about:legacy-compat",jI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",_y=["+//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//"],$I=[..._y,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],VI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Sy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],qI=[...Sy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function xy(e,t){return t.some(n=>e.startsWith(n))}function YI(e){return e.name===by&&e.publicId===null&&(e.systemId===null||e.systemId===zI)}function GI(e){if(e.name!==by)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===jI)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),VI.has(n))return nr.QUIRKS;let r=t===null?$I:_y;if(xy(n,r))return nr.QUIRKS;if(r=t===null?Sy:qI,xy(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const wy={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},WI="definitionurl",XI="definitionURL",KI=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])),QI=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),JI=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])),ZI=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function eR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===cs.COLOR||r===cs.SIZE||r===cs.FACE)||ZI.has(t)}function Ay(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===WI){e.attrs[t].name=XI;break}}function Cy(e){for(let t=0;t<e.attrs.length;t++){const n=KI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function ch(e){for(let t=0;t<e.attrs.length;t++){const n=QI.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 tR(e){const t=JI.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=no(e.tagName))}function nR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function rR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===cs.ENCODING){const s=n[r].value.toLowerCase();return s===wy.TEXT_HTML||s===wy.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function iR(e,t,n,r){return(!r||r===le.HTML)&&rR(e,t,n)||(!r||r===le.MATHML)&&nR(e,t)}const sR="hidden",oR=8,aR=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const uR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},vy=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class Ny{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},ky),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 II(this.options,this),this.activeFormattingElements=new HI(this.treeAdapter),this.fragmentContextID=r?no(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new UI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:uR,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 s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=It.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=It.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=It.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=It.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=It.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),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&&de(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[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,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return iR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Lr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return vy.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return kI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Pa(this,t);break}case M.BEFORE_HTML:{Oa(this,t);break}case M.BEFORE_HEAD:{Ia(this,t);break}case M.IN_HEAD:{Ra(this,t);break}case M.IN_HEAD_NO_SCRIPT:{La(this,t);break}case M.AFTER_HEAD:{Da(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Oy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ph(this,t);break}case M.IN_TABLE_TEXT:{Uy(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){FL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Pa(this,t);break}case M.BEFORE_HTML:{Oa(this,t);break}case M.BEFORE_HEAD:{Ia(this,t);break}case M.IN_HEAD:{Ra(this,t);break}case M.IN_HEAD_NO_SCRIPT:{La(this,t);break}case M.AFTER_HEAD:{Da(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ph(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){fh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{fh(this,t);break}case M.IN_TABLE_TEXT:{Ba(this,t);break}case M.AFTER_BODY:{mR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{gR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{ER(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ba(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?UL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Pa(this,t);break}case M.BEFORE_HTML:{yR(this,t);break}case M.BEFORE_HEAD:{bR(this,t);break}case M.IN_HEAD:{mr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{xR(this,t);break}case M.AFTER_HEAD:{AR(this,t);break}case M.IN_BODY:{yn(this,t);break}case M.IN_TABLE:{ro(this,t);break}case M.IN_TABLE_TEXT:{Ba(this,t);break}case M.IN_CAPTION:{_L(this,t);break}case M.IN_COLUMN_GROUP:{mh(this,t);break}case M.IN_TABLE_BODY:{Dl(this,t);break}case M.IN_ROW:{Ml(this,t);break}case M.IN_CELL:{wL(this,t);break}case M.IN_SELECT:{jy(this,t);break}case M.IN_SELECT_IN_TABLE:{CL(this,t);break}case M.IN_TEMPLATE:{kL(this,t);break}case M.AFTER_BODY:{PL(this,t);break}case M.IN_FRAMESET:{OL(this,t);break}case M.AFTER_FRAMESET:{RL(this,t);break}case M.AFTER_AFTER_BODY:{DL(this,t);break}case M.AFTER_AFTER_FRAMESET:{ML(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?HL(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Pa(this,t);break}case M.BEFORE_HTML:{TR(this,t);break}case M.BEFORE_HEAD:{_R(this,t);break}case M.IN_HEAD:{SR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{wR(this,t);break}case M.AFTER_HEAD:{CR(this,t);break}case M.IN_BODY:{Rl(this,t);break}case M.TEXT:{dL(this,t);break}case M.IN_TABLE:{Ma(this,t);break}case M.IN_TABLE_TEXT:{Ba(this,t);break}case M.IN_CAPTION:{SL(this,t);break}case M.IN_COLUMN_GROUP:{xL(this,t);break}case M.IN_TABLE_BODY:{gh(this,t);break}case M.IN_ROW:{zy(this,t);break}case M.IN_CELL:{AL(this,t);break}case M.IN_SELECT:{$y(this,t);break}case M.IN_SELECT_IN_TABLE:{vL(this,t);break}case M.IN_TEMPLATE:{NL(this,t);break}case M.AFTER_BODY:{qy(this,t);break}case M.IN_FRAMESET:{IL(this,t);break}case M.AFTER_FRAMESET:{LL(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Pa(this,t);break}case M.BEFORE_HTML:{Oa(this,t);break}case M.BEFORE_HEAD:{Ia(this,t);break}case M.IN_HEAD:{Ra(this,t);break}case M.IN_HEAD_NO_SCRIPT:{La(this,t);break}case M.AFTER_HEAD:{Da(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{Fy(this,t);break}case M.TEXT:{fL(this,t);break}case M.IN_TABLE_TEXT:{Ba(this,t);break}case M.IN_TEMPLATE:{Vy(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{hh(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Py(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{ph(this,t);break}case M.IN_TABLE_TEXT:{By(this,t);break}}}}function lR(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):My(e,t),n}function cR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function dR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=aR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=fR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function fR(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 hR(e,t,n){const r=e.treeAdapter.getTagName(t),s=no(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function pR(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function dh(e,t){for(let n=0;n<oR;n++){const r=lR(e,t);if(!r)break;const s=cR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=dR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&hR(e,u,a),pR(e,s,r)}}function fh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function mR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function gR(e,t){e._appendCommentNode(t,e.document)}function hh(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],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.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 ER(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:GI(t);YI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Pa(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function yR(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Oa(e,t)}function TR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Oa(e,t)}function Oa(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function bR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ia(e,t)}}function _R(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ia(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ia(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,It.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,It.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,It.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,It.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ra(e,t)}}function SR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{Ra(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ds(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ra(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function xR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{mr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:La(e,t)}}function wR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{La(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function La(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function AR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),mr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Da(e,t)}}function CR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Da(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Da(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Il(e,t)}function Il(e,t){switch(t.type){case Xe.CHARACTER:{Oy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Py(e,t);break}case Xe.COMMENT:{fh(e,t);break}case Xe.START_TAG:{yn(e,t);break}case Xe.END_TAG:{Rl(e,t);break}case Xe.EOF:{Fy(e,t);break}}}function Py(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function kR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function NR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function PR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function OR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&uh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function IR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function RR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function LR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function DR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=It.PLAINTEXT}function MR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function FR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(dh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function BR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function UR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(dh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function HR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function zR(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Iy(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ry(e){const t=dy(e,cs.TYPE);return t!=null&&t.toLowerCase()===sR}function jR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Ry(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function $R(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function VR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function qR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Iy(e,t)}function YR(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=It.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function GR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function WR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function Ly(e,t){e._switchToTextParsing(t,It.RAWTEXT)}function XR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function KR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function QR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function JR(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function ZR(e,t){e._reconstructActiveFormattingElements(),Ay(t),ch(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function eL(e,t){e._reconstructActiveFormattingElements(),Cy(t),ch(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function Dy(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function yn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{BR(e,t);break}case g.A:{FR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{OR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{PR(e,t);break}case g.LI:case g.DD:case g.DT:{LR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Iy(e,t);break}case g.HR:{VR(e,t);break}case g.RB:case g.RTC:{QR(e,t);break}case g.RT:case g.RP:{JR(e,t);break}case g.PRE:case g.LISTING:{IR(e,t);break}case g.XMP:{GR(e,t);break}case g.SVG:{eL(e,t);break}case g.HTML:{vR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{mr(e,t);break}case g.BODY:{kR(e,t);break}case g.FORM:{RR(e,t);break}case g.NOBR:{UR(e,t);break}case g.MATH:{ZR(e,t);break}case g.TABLE:{zR(e,t);break}case g.INPUT:{jR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{$R(e,t);break}case g.IMAGE:{qR(e,t);break}case g.BUTTON:{MR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{HR(e,t);break}case g.IFRAME:{WR(e,t);break}case g.SELECT:{XR(e,t);break}case g.OPTION:case g.OPTGROUP:{KR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Ly(e,t);break}case g.FRAMESET:{NR(e,t);break}case g.TEXTAREA:{YR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Ly(e,t):Dy(e,t);break}case g.PLAINTEXT:{DR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:Dy(e,t)}}function tL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function nL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,qy(e,t))}function rL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function iL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function sL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function oL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function aL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function uL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function cL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function My(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Rl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{dh(e,t);break}case g.P:{sL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{rL(e,t);break}case g.LI:{oL(e);break}case g.DD:case g.DT:{aL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{uL(e);break}case g.BR:{cL(e);break}case g.BODY:{tL(e,t);break}case g.HTML:{nL(e,t);break}case g.FORM:{iL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{lL(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:My(e,t)}}function Fy(e,t){e.tmplInsertionModeStack.length>0?Vy(e,t):hh(e,t)}function dL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function fL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function ph(e,t){if(e.openElements.currentTagId!==void 0&&vy.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{Uy(e,t);break}case Xe.WHITESPACE_CHARACTER:{By(e,t);break}}else Fa(e,t)}function hL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function pL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function mL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,mh(e,t)}function gL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function EL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Dl(e,t)}function yL(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function TL(e,t){Ry(t)?e._appendElement(t,le.HTML):Fa(e,t),t.ackSelfClosing=!0}function bL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ro(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{EL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{mr(e,t);break}case g.COL:{mL(e,t);break}case g.FORM:{bL(e,t);break}case g.TABLE:{yL(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{gL(e,t);break}case g.INPUT:{TL(e,t);break}case g.CAPTION:{hL(e,t);break}case g.COLGROUP:{pL(e,t);break}default:Fa(e,t)}}function Ma(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ds(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Fa(e,t)}}function Fa(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Il(e,t),e.fosterParentingEnabled=n}function By(e,t){e.pendingCharacterTokens.push(t)}function Uy(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++)Fa(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([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function _L(e,t){const n=t.tagID;Hy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,ro(e,t)):yn(e,t)}function SL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Ma(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Rl(e,t)}}function mh(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{mr(e,t);break}default:Ll(e,t)}}function xL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{ds(e,t);break}case g.COL:break;default:Ll(e,t)}}function Ll(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Dl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Ml(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ro(e,t));break}default:ro(e,t)}}function gh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Ma(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Ma(e,t)}}function Ml(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Dl(e,t));break}default:ro(e,t)}}function zy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,gh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,gh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Ma(e,t)}}function wL(e,t){const n=t.tagID;Hy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ml(e,t)):yn(e,t)}function AL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),zy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Rl(e,t)}}function jy(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{mr(e,t);break}}}function $y(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ds(e,t);break}}}function CL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):jy(e,t)}function vL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):$y(e,t)}function kL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{mr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,ro(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,mh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Dl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Ml(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,yn(e,t)}}function NL(e,t){t.tagID===g.TEMPLATE&&ds(e,t)}function Vy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):hh(e,t)}function PL(e,t){t.tagID===g.HTML?yn(e,t):Fl(e,t)}function qy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Fl(e,t)}function Fl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function OL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{mr(e,t);break}}}function IL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function RL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function LL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function DL(e,t){t.tagID===g.HTML?yn(e,t):Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function ML(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function FL(e,t){t.chars=xt,e._insertCharacters(t)}function BL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Yy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function UL(e,t){if(eR(t))Yy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Ay(t):r===le.SVG&&(tR(t),Cy(t)),ch(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function HL(e,t){if(t.tagID===g.P||t.tagID===g.BR){Yy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const zL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,jL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Gy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Wy(e,t){const n=JL(e),r=oy("type",{handlers:{root:$L,element:VL,text:qL,comment:Ky,doctype:YL,raw:WL},unknown:XL}),s={parser:n?new Ny(Gy):Ny.getFragmentParser(void 0,Gy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),io(s,Ir());const a=n?s.parser.document:s.parser.getFragment(),u=Z3(a,{file:s.options.file});return s.stitches&&vl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Xy(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function $L(e,t){Xy(e.children,t)}function VL(e,t){KL(e,t),Xy(e.children,t),QL(e,t)}function qL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:Ua(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function YL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ua(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function GL(e,t){t.stitches=!0;const n=ZL(e);if("children"in e&&"children"in n){const r=Wy({type:"root",children:e.children},t.options);n.children=r.children}Ky({type:"comment",value:{stitch:n}},t)}function Ky(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:Ua(e)};io(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function WL(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,Qy(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(zL,"<$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 XL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))GL(n,t);else{let r="";throw jL.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 io(e,t){Qy(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=It.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 Qy(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 KL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,Ir(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ls.html;s===ls.html&&n==="svg"&&(s=ls.svg);const a=iI(de(F({},e),{children:[]}),{space:s===ls.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ua(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function QL(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&fI.includes(n)||t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,gl(e));const r={type:Xe.END_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ua(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===It.RCDATA||t.parser.tokenizer.state===It.RAWTEXT||t.parser.tokenizer.state===It.SCRIPT_DATA)&&(t.parser.tokenizer.state=It.DATA)}function JL(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ua(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=gl(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 ZL(e){return"children"in e?us(de(F({},e),{children:[]})):us(e)}function Jy(e){return function(t,n){return Wy(t,de(F({},e),{file:n}))}}const fs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],Zy={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...fs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...fs],h2:[["className","sr-only"]],img:[...fs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...fs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...fs],table:[...fs],ul:[...fs,["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"]},Ci={}.hasOwnProperty;function e6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},Zy),t):Zy,stack:[]},s=eT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function eT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return t6(e,n);case"doctype":return n6(e,n);case"element":return r6(e,n);case"root":return i6(e,n);case"text":return s6(e,n)}}}function t6(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 Ha(a,t),a}}function n6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Ha(n,t),n}}function r6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=tT(e,t.children),s=o6(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&&Ci.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:s,children:r};return Ha(u,t),u}function i6(e,t){const r={type:"root",children:tT(e,t.children)};return Ha(r,t),r}function s6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Ha(r,t),r}function tT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=eT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function o6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ci.call(c,f)){const p=c[f];let m=nT(e,iT(a,f),f,p);m==null&&(m=nT(e,iT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function nT(e,t,n,r){return t?Array.isArray(r)?a6(e,t,n,r):rT(e,t,n,r):void 0}function a6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=rT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function rT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&u6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function u6(e,t,n){const r=e.schema.protocols&&Ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.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&&s.slice(0,p.length)===p)return!0}return!1}function Ha(e,t){const n=X1(t);t.data&&(e.data=us(t.data)),n&&(e.position=n)}function iT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function l6(e){return function(t){return e6(t,e)}}const sT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",de(F(F({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},c6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:S.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?S.jsx(QE,{rehypePlugins:[Jy,l6],components:{ul:({children:r})=>S.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(sT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},Eh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=er(),{setImageFile:u}=Gs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=B.useRef(null),b=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",A=!!s||!1,v=A?"connected":"disconnected",w=t||!A,N=()=>a?new Promise((R,q)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>R(ne.result),ne.onerror=me=>q(me)}):Promise.resolve(""),C=R=>Ke(null,null,function*(){var me;if(w)return;const q=10*1024*1024,ne=(me=R.target.files)==null?void 0:me[0];if(ne){if(ne.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ne)}}),U=()=>{u(null),b.current&&(b.current.value="")},Y=R=>Ke(null,null,function*(){var me;R.preventDefault();const q=(((me=m.current)==null?void 0:me.value)||"").trim();let ne="";try{ne=yield N()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(U(),m.current.value="",r(q,ne))});return S.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&S.jsxs("div",{className:G(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[S.jsx("img",{className:G(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),S.jsx("span",{className:G(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),S.jsx(k1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:U})]}),S.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[S.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,v)}),y&&S.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-button`),"aria-disabled":w,tabIndex:0,children:[S.jsx("label",{className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:S.jsx(Mk,{})}),S.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:w,onInput:C})]}),S.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),S.jsx(jk,{isLoading:w}),S.jsx(Uk,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:w})]}),S.jsx(c6,{})]})};function d6(e){return St({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function f6(e){return St({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 oT=B.createContext({isOpen:!1}),yh=B.createContext(null),aT=B.createContext(null),so=()=>{var n,r;const e=B.useContext(yh),t=B.useContext(aT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},uT=({onClearChat:e,componentType:t})=>{const n=so(),r=()=>{e(),n()};return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(f6,{}),"Clear chat"]})};function h6(e){return e==null?[]:Array.isArray(e)?e:[e]}var p6=(e,...t)=>e.concat(t),m6=(e,...t)=>e.filter(n=>!t.includes(n)),g6=e=>Array.from(new Set(e));function lT(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function E6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return lT(e,t,{step:-r,loop:s})}var y6=e=>Array.isArray(e),cT=e=>e!=null&&typeof e=="object",T6=e=>cT(e)&&!y6(e),Ul=e=>typeof e=="string",oo=e=>typeof e=="function",b6=e=>e==null,_6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),S6=e=>Object.prototype.toString.call(e),dT=Function.prototype.toString,x6=dT.call(Object),w6=e=>{if(!cT(e)||S6(e)!="[object Object]"||v6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=_6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&dT.call(n)==x6},A6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,C6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,v6=e=>A6(e)||C6(e),k6=e=>e(),N6=()=>{},Th=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function P6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:O6,max:I6}=Math,R6=e=>Number.isNaN(e),L6=e=>R6(e)?0:e,fT=(e,t,n)=>O6(I6(L6(e),t),n);function bh(e){if(!w6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=bh(s))}return n}function _h(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function D6(e,t){if(e==null)throw new Error(t())}function M6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var F6=Object.defineProperty,B6=(e,t,n)=>t in e?F6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Sh=(e,t,n)=>B6(e,typeof t!="symbol"?t+"":t,n),hT=()=>{},Hl=e=>typeof e=="object"&&e!==null,ao=e=>e?"":void 0,pT=e=>e?"true":void 0,U6=1,H6=9,z6=11,Xt=e=>Hl(e)&&e.nodeType===U6&&typeof e.nodeName=="string",zl=e=>Hl(e)&&e.nodeType===H6,j6=e=>Hl(e)&&e===e.window,mT=e=>Xt(e)?e.localName||"":"#document";function $6(e){return["html","body","#document"].includes(mT(e))}var V6=e=>Hl(e)&&e.nodeType!==void 0,hs=e=>V6(e)&&e.nodeType===z6&&"host"in e,q6=e=>Xt(e)&&e.localName==="input",Y6=e=>Xt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function za(e){if(!e)return!1;const t=e.getRootNode();return co(t)===e}var G6=/(textarea|select)/;function W6(e){if(e==null||!Xt(e))return!1;try{return q6(e)&&e.selectionStart!=null||G6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function uo(e,t){var r;if(!e||!t||!Xt(e)||!Xt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&hs(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Dr(e){var t;return zl(e)?e:j6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function X6(e){return Dr(e).documentElement}function lo(e){var t,n,r;return hs(e)?lo(e.host):zl(e)?(t=e.defaultView)!=null?t:window:Xt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function co(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 K6(e){if(mT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hs(e)&&e.host||X6(e);return hs(t)?t.host:t}function xh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),zl(t)||hs(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var wh=new WeakMap;function fo(e){return wh.has(e)||wh.set(e,lo(e).getComputedStyle(e)),wh.get(e)}var Ah=new Set(["menu","listbox","dialog","grid","tree","region"]),Q6=e=>Ah.has(e),gT=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function ET(e,t){const n=new Set,r=xh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=gT(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&Q6(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function yT(e,t){const n=xh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=gT(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&Ah.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function J6(e){const t=new Set;return yT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function Z6(e){const t=e.getAttribute("role");return!!(t&&Ah.has(t))}function e4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function t4(e){var t;return e4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function n4(e){if(!e.id)return!1;const t=xh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&Z6(e))}var Ch=()=>typeof document!="undefined";function r4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var vh=e=>Ch()&&e.test(r4()),i4=e=>Ch()&&e.test(navigator.vendor),TT=()=>Ch()&&!!navigator.maxTouchPoints,s4=()=>vh(/^iPhone/i),o4=()=>vh(/^iPad/i)||kh()&&navigator.maxTouchPoints>1,jl=()=>s4()||o4(),a4=()=>kh()||jl(),kh=()=>vh(/^Mac/i),u4=()=>a4()&&i4(/apple/i);function l4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function gr(e){var n;const t=l4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var bT=e=>e.button===0,c4=e=>e.button===2||kh()&&e.ctrlKey&&e.button===0,d4=e=>"touches"in e&&e.touches.length>0,f4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},_T={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function h4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=f4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in _T&&(s=_T[s]),s}function ST(e,t="client"){const n=d4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Kt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},xT=e=>Xt(e)&&e.tagName==="IFRAME",p4=/^(audio|video|details)$/;function wT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var m4=e=>!Number.isNaN(wT(e)),g4=e=>wT(e)<0;function E4(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 AT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=E4(d,t);if(f){const p=Array.from(f.querySelectorAll($l)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}s.push(...p)}}return r}var $l="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",CT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));(n==!0||n=="if-empty"&&s.length===0)&&Xt(e)&&Mr(e)&&s.unshift(e);const u=[];for(const c of s)if(Mr(c)){if(xT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...CT(d,{getShadowRoot:r}));continue}u.push(c)}return r?AT(u,r,Mr):u};function Mr(e){return!Xt(e)||e.closest("[inert]")?!1:e.matches($l)&&Y6(e)}function ho(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));n&&ps(e)&&s.unshift(e);const a=[];for(const u of s)if(ps(u)){if(xT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ho(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=AT(a,r,ps);return!u.length&&n?s:u}return!a.length&&n?s:a}function ps(e){return Xt(e)&&e.tabIndex>0?!0:Mr(e)&&!g4(e)}function y4(e,t={}){const n=ho(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function T4(e,t={}){const{current:n,getShadowRoot:r}=t,s=ho(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:co(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function ja(e){return e.tabIndex<0&&(p4.test(e.localName)||W6(e))&&!m4(e)?0:e.tabIndex}function vT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)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=ho(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var b4=class R2{constructor(){Sh(this,"id",null),Sh(this,"fn_cleanup"),Sh(this,"cleanup",()=>{this.cancel()})}static create(){return new R2}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 zt(e){const t=b4.create();return t.request(e),t.cleanup}function kT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Nh(e){const t=K6(e);return $6(t)?Dr(t).body:Xt(t)&&x4(t)?t:Nh(t)}var _4=/auto|scroll|overlay|hidden|clip/,S4=new Set(["inline","contents"]);function x4(e){const t=lo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return _4.test(n+s+r)&&!S4.has(a)}var po="default",Ph="",Vl=new WeakMap;function w4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return jl()?(po==="default"&&(Ph=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),po="disabled"):t&&(Vl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>A4({target:t,doc:r})}function A4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(jl()){if(po!=="disabled")return;po="restoring",setTimeout(()=>{kT(()=>{po==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Ph||""),Ph="",po="default")})},300)}else if(t&&Vl.has(t)){const a=Vl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Vl.delete(t)}}function C4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),s=t?zt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(w4(de(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function v4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=ST(c),f=Math.sqrt(Du(d.x,2)+Du(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=ST(c);r({point:d,event:c})},u=[Kt(e,"pointermove",s,!1),Kt(e,"pointerup",a,!1),Kt(e,"pointercancel",a,!1),Kt(e,"contextmenu",a,!1),C4({doc:e})];return()=>{u.forEach(c=>c())}}function k4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=y4(e,{includeContainer:!0,getShadowRoot:a}),y=T4(c,{current:n,getShadowRoot:a}),_=!m&&!b;f.shiftKey&&za(y)?(s==null||s(),p=b):f.shiftKey&&(za(m)||_)?p=n:!f.shiftKey&&za(n)?(s==null||s(),p=m):!f.shiftKey&&(za(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Kt(u,"keydown",d,!0)}function N4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=cn(c,["defer","triggerElement"]),a=n?zt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(k4(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function P4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ql(e,t){if(!e)return hT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function O4(e,t,n){if(!e)return hT;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 I4(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 R4(e,t){const{timeout:n,rootNode:r}=t,s=lo(r),a=Dr(r),u=new s.AbortController;return I4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var L4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),D4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,NT=e=>{const t={};let n;for(;n=D4.exec(e);)t[n[1]]=n[2];return t},M4=(e,t)=>{if(Ul(e)){if(Ul(t))return`${e};${t}`;e=NT(e)}else Ul(t)&&(t=NT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function jt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=Th(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=L4(t[s],n[s]);continue}if(s==="style"){t[s]=M4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function cU(e){return e}var mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(mo||{}),Oh="__init__";function F4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>co(t()),a=u=>t().getElementById(u);return de(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:za,getById:a})}function B4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var go=()=>e=>Array.from(new Set(e)),PT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Yl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);PT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const _=d.current,A=oo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(w=(v=e()).onChange)==null||w.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ws.flushSync:k6)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Yl.cleanup=e=>{B.useEffect(()=>e,[])},Yl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function U4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var H4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Gl(e,t={}){var se,he,ve,re,oe,xe;const n=B.useMemo(()=>{const{id:ae,ids:Q,getRootNode:ie}=t;return F4({id:ae,ids:Q,getRootNode:ie})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},s=(he=(se=e.props)==null?void 0:se.call(e,{props:bh(t),scope:n}))!=null?he:t,a=z4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Yl,scope:n,flush:IT,getContext(){return d},getComputed(){return Y},getRefs(){return A},getEvent(){return y()}}),c=OT(u),d={get(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].ref.current},set(ae,Q){var ie;(ie=c.current)==null||ie[ae].set(Q)},initial(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].initial},hash(ae){var ie,k;const Q=(ie=c.current)==null?void 0:ie[ae].get();return(k=c.current)==null?void 0:k[ae].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>de(F({},b.current),{current(){return b.current},previous(){return m.current}}),_=()=>de(F({},R),{matches(...ae){return ae.includes(R.ref.current)},hasTag(ae){var Q,ie;return!!((ie=(Q=e.states[R.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(ae))}}),A=U4((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:w,guard:N,track:H4,refs:A,computed:Y,flush:IT,scope:n,choose:U}),w=ae=>{const Q=oo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(k=>{var ee,I;const D=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[k];return D||_h(`[zag-js] No implementation found for action "${JSON.stringify(k)}"`),D});for(const k of ie)k==null||k(v())},N=ae=>{var Q,ie;return oo(ae)?ae(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[ae](v())},C=ae=>{const Q=oo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(D=>{var I,_e;const ee=(_e=(I=e.implementations)==null?void 0:I.effects)==null?void 0:_e[D];return ee||_h(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),k=[];for(const D of ie){const ee=D==null?void 0:D(v());ee&&k.push(ee)}return()=>k.forEach(D=>D==null?void 0:D())},U=ae=>h6(ae).find(Q=>{let ie=!Q.guard;return Ul(Q.guard)?ie=!!N(Q.guard):oo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=ae=>{D6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ae];return Q({context:d,event:y(),prop:a,refs:A,scope:n,computed:Y})},R=Yl(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,Q){var k,D,ee,I;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&w((k=e.states[Q])==null?void 0:k.exit),w((D=p.current)==null?void 0:D.actions);const ie=C((ee=e.states[ae])==null?void 0:ee.effects);if(ie&&f.current.set(ae,ie),Q===Oh){w(e.entry);const _e=C(e.effects);_e&&f.current.set(Oh,_e)}w((I=e.states[ae])==null?void 0:I.entry)}})),q=B.useRef(void 0),ne=B.useRef(mo.NotStarted);PT(()=>{queueMicrotask(()=>{var D;const ie=ne.current===mo.Started;ne.current=mo.Started,r(ie?"rehydrating...":"initializing...");const k=(D=q.current)!=null?D:R.initial;R.invoke(k,ie?R.get():Oh)});const ae=f.current,Q=R.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=mo.Stopped,ae.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const me=()=>"ref"in R?R.ref.current:R.get(),V=ae=>{queueMicrotask(()=>{var I,_e,Be,ye,Le;if(ne.current!==mo.Started)return;m.current=b.current,b.current=ae;let Q=me();const ie=(Be=(I=e.states[Q].on)==null?void 0:I[ae.type])!=null?Be:(_e=e.on)==null?void 0:_e[ae.type],k=U(ie);if(!k)return;p.current=k;const D=(ye=k.target)!=null?ye:Q;r("transition",ae.type,k.target||Q,`(${k.actions})`);const ee=D!==Q;ee?Ws.flushSync(()=>R.set(D)):k.reenter&&!ee?R.invoke(Q,Q):w((Le=k.actions)!=null?Le:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:A,computed:Y,event:y(),getStatus:()=>ne.current}}function OT(e){const t=B.useRef(e);return t.current=e,t}function z4(e){const t=OT(e);return function(r){return t.current[r]}}function IT(e){queueMicrotask(()=>{Ws.flushSync(()=>e())})}var Ih=B4(e=>e);function Wl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function j4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Rh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=cn(f,["asChild","children"]);if(!s)return B.createElement(e,de(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=j4(c);return B.cloneElement(c,de(F({},jt(u,c.props)),{ref:r?Wl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Tn=(()=>{const e=new Map;return new Proxy(Rh,{apply(t,n,r){return Rh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Rh(r)),e.get(r)}})})();function $4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ms(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:$4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[V4,Lh]=ms({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[RT,$a]=ms({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),LT=B.forwardRef((e,t)=>{const n=Lh(),r=$a(),s=jt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(F({},s),{ref:Wl(r.ref,t)}))});LT.displayName="PopoverContent";const DT=B.forwardRef((e,t)=>{const n=Lh(),r=$a(),s=jt(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(F({},s),{ref:t}))});DT.displayName="PopoverPositioner";const Va=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},F({},e)]),MT=e=>Va()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function q4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var Y4={props({props:e}){return de(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",fo(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});zt(()=>{var c,d;const u=Xl(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})=>{zt(()=>{e.set("prevAnimationName",Xl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Xl(t.get("styles")))},u=d=>{const f=Xl(t.get("styles"));gr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=ql(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),kT(()=>c())}}}}};function Xl(e){return(e==null?void 0:e.animationName)||"none"}go()(["onExitComplete","present","immediate"]);function G4(e,t={}){const{sync:n=!1}=t,r=W4(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function W4(e){const t=B.useRef(e);return t.current=e,t}const Dh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=cn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=de(F({},a),{present:r,onExitComplete:G4(e.onExitComplete)}),d=Gl(Y4,c),f=q4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var gs=(e,t=[])=>({parts:(...n)=>{if(X4(t))return gs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>gs(e,[...t,...n]),omit:(...n)=>gs(e,t.filter(r=>!n.includes(r))),rename:n=>gs(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(),X4=e=>e.length===0;const K4=["top","right","bottom","left"],vi=Math.min,ii=Math.max,Kl=Math.round,Ql=Math.floor,Fr=e=>({x:e,y:e}),Q4={left:"right",right:"left",bottom:"top",top:"bottom"};function FT(e,t,n){return ii(e,vi(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function ki(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function Mh(e){return e==="x"?"y":"x"}function Fh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Bh(e){return Mh(Br(e))}function J4(e,t,n){n===void 0&&(n=!1);const r=yo(e),s=Bh(e),a=Fh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Jl(u)),[u,Jl(u)]}function Z4(e){const t=Jl(e);return[Uh(e),t,Uh(t)]}function Uh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const BT=["left","right"],UT=["right","left"],eD=["top","bottom"],tD=["bottom","top"];function nD(e,t,n){switch(e){case"top":case"bottom":return n?t?UT:BT:t?BT:UT;case"left":case"right":return t?eD:tD;default:return[]}}function rD(e,t,n,r){const s=yo(e);let a=nD(ki(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Uh)))),a}function Jl(e){const t=ki(e);return Q4[t]+e.slice(t.length)}function iD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function HT(e){return typeof e!="number"?iD(e):{top:e,right:e,bottom:e,left:e}}function Zl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function zT(e,t,n){let{reference:r,floating:s}=e;const a=Br(t),u=Bh(t),c=Fh(u),d=ki(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=yo(t);return _&&(y[u]+=b*(_==="end"?1:-1)*(n&&f?-1:1)),y}function sD(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=si(t,e),_=HT(y),v=c[b?m==="floating"?"reference":"floating":m],w=Zl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),N=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),U=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=Zl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:N,offsetParent:C,strategy:d}):N);return{top:(w.top-Y.top+_.top)/U.y,bottom:(Y.bottom-w.bottom+_.bottom)/U.y,left:(w.left-Y.left+_.left)/U.x,right:(Y.right-w.right+_.right)/U.x}})}const oD=50,aD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:de(F({},u),{detectOverflow:sD}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=zT(f,r,d),b=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:N}=v,{x:C,y:U,data:Y,reset:R}=yield N({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=U!=null?U:m,_[w]=F(F({},_[w]),Y),R&&y<oD&&(y++,typeof R=="object"&&(R.placement&&(b=R.placement),R.rects&&(f=R.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):R.rects),{x:p,y:m}=zT(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:_}}),uD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const b=HT(m),y={x:r,y:s},_=Bh(a),A=Fh(_),v=yield c.getDimensions(p),w=_==="y",N=w?"top":"left",C=w?"bottom":"right",U=w?"clientHeight":"clientWidth",Y=u.reference[A]+u.reference[_]-y[_]-u.floating[A],R=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[U]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[U]||u.floating[A]);const me=Y/2-R/2,V=ne/2-v[A]/2-1,se=vi(b[N],V),he=vi(b[C],V),ve=ne-v[A]-he,re=ne/2-v[A]/2+me,oe=FT(se,re,ve),xe=!f.arrow&&yo(a)!=null&&re!==oe&&u.reference[A]/2-(re<se?se:he)-v[A]/2<0,ae=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+ae,data:F({[_]:oe,centerOffset:re-oe-ae},xe&&{alignmentOffset:ae}),reset:xe}})}}),lD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,oe=si(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,w=cn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const N=ki(a),C=Br(d),U=ki(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),R=y||(U||!v?[Jl(d)]:Z4(d)),q=A!=="none";!y&&q&&R.push(...rD(d,v,A,Y));const ne=[d,...R],me=yield f.detectOverflow(n,w),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(me[N]),b){const xe=J4(a,c,Y);V.push(me[xe[0]],me[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var he,ve;const xe=(((he=u.flip)==null?void 0:he.index)||0)+1,ae=ne[xe];if(ae&&(!(b==="alignment"?C!==Br(ae):!1)||se.every(k=>Br(k.placement)===C?k.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:ae}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,k)=>ie.overflows[1]-k.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(k=>{if(q){const D=Br(k.placement);return D===C||D==="y"}return!0}).map(k=>[k.placement,k.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((k,D)=>k[1]-D[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function jT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function $T(e){return K4.some(t=>e[t]>=0)}const cD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=si(e,n),{strategy:a="referenceHidden"}=c,u=cn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,de(F({},u),{elementContext:"reference"})),f=jT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:$T(f)}}}case"escaped":{const d=yield s.detectOverflow(n,de(F({},u),{altBoundary:!0})),f=jT(d,r.floating);return{data:{escapedOffsets:f,escaped:$T(f)}}}default:return{}}})}}},VT=new Set(["left","top"]);function dD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=ki(n),c=yo(n),d=Br(n)==="y",f=VT.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const fD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield dD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:de(F({},f),{placement:c})}})}}},hD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=si(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:Y,y:R}=U;return{x:Y,y:R}}}}=C,p=cn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Br(a),_=Mh(y);let A=m[_],v=m[y];const w=(U,Y)=>FT(Y+b[U==="y"?"top":"left"],Y,Y-b[U==="y"?"bottom":"right"]);c&&(A=w(_,A)),d&&(v=w(y,v));const N=f.fn(de(F({},n),{[_]:A,[y]:v}));return de(F({},N),{data:{x:N.x-r,y:N.y-s,enabled:{[_]:c,[y]:d}}})})}}},pD=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=si(e,t),b={x:s,y:a},y=Br(u),_=Mh(y);let A=b[_],v=b[y];const w=si(f,t),N=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",R=c.reference[_]-c.floating[Y]+N.mainAxis,q=c.reference[_]+c.reference[Y]-N.mainAxis;A<R?A=R:A>q&&(A=q)}if(m){var C,U;const Y=_==="y"?"width":"height",R=VT.has(ki(u)),q=c.reference[y]-c.floating[Y]+(R&&((C=d.offset)==null?void 0:C[y])||0)+(R?0:N.crossAxis),ne=c.reference[y]+c.reference[Y]+(R?0:((U=d.offset)==null?void 0:U[y])||0)-(R?N.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},mD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=si(e,n),{apply:c=()=>{}}=V,d=cn(V,["apply"]),f=yield a.detectOverflow(n,d),p=ki(r),m=yo(r),b=Br(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=_-f.top-f.bottom,N=y-f.left-f.right,C=vi(_-f[A],w),U=vi(y-f[v],N),Y=n.middlewareData.shift,R=!Y;let q=C,ne=U;Y!=null&&Y.enabled.x&&(ne=N),Y!=null&&Y.enabled.y&&(q=w),R&&!m&&(b?ne=y-2*ii(f.left,f.right):q=_-2*ii(f.top,f.bottom)),yield c(de(F({},n),{availableWidth:ne,availableHeight:q}));const me=yield a.getDimensions(u.floating);return y!==me.width||_!==me.height?{reset:{rects:!0}}:{}})}}};function ec(){return typeof window!="undefined"}function To(e){return qT(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(qT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function qT(e){return ec()?e instanceof Node||e instanceof qn(e).Node:!1}function Er(e){return ec()?e instanceof Element||e instanceof qn(e).Element:!1}function Hr(e){return ec()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function YT(e){return!ec()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function qa(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function gD(e){return/^(table|td|th)$/.test(To(e))}function tc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const ED=/transform|translate|scale|rotate|perspective|filter/,yD=/paint|layout|strict|content/,Es=e=>!!e&&e!=="none";let Hh;function zh(e){const t=Er(e)?yr(e):e;return Es(t.transform)||Es(t.translate)||Es(t.scale)||Es(t.rotate)||Es(t.perspective)||!jh()&&(Es(t.backdropFilter)||Es(t.filter))||ED.test(t.willChange||"")||yD.test(t.contain||"")}function TD(e){let t=Ni(e);for(;Hr(t)&&!bo(t);){if(zh(t))return t;if(tc(t))return null;t=Ni(t)}return null}function jh(){return Hh==null&&(Hh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),Hh}function bo(e){return/^(html|body|#document)$/.test(To(e))}function yr(e){return qn(e).getComputedStyle(e)}function nc(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function Ni(e){if(To(e)==="html")return e;const t=e.assignedSlot||e.parentNode||YT(e)&&e.host||Ur(e);return YT(t)?t.host:t}function GT(e){const t=Ni(e);return bo(t)?(e.ownerDocument||e).body:Hr(t)&&qa(t)?t:GT(t)}function Ya(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=GT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=qn(s);if(a){const c=$h(u);return t.concat(u,u.visualViewport||[],qa(s)?s:[],c&&n?Ya(c):[])}else return t.concat(s,Ya(s,[],n))}function $h(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function WT(e){const t=yr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Kl(n)!==a||Kl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function Vh(e){return Er(e)?e:e.contextElement}function _o(e){const t=Vh(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=WT(t);let u=(a?Kl(n.width):n.width)/r,c=(a?Kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const bD=Fr(0);function XT(e){const t=qn(e);return!jh()||!t.visualViewport?bD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function _D(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=Vh(e);let u=Fr(1);t&&(r?Er(r)&&(u=_o(r)):u=_o(e));const c=_D(a,n,r)?XT(a):Fr(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=qn(a),y=r&&Er(r)?qn(r):r;let _=b,A=$h(_);for(;A&&r&&y!==_;){const v=_o(A),w=A.getBoundingClientRect(),N=yr(A),C=w.left+(A.clientLeft+parseFloat(N.paddingLeft))*v.x,U=w.top+(A.clientTop+parseFloat(N.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=U,_=qn(A),A=$h(_)}}return Zl({width:p,height:m,x:d,y:f})}function rc(e,t){const n=nc(e).scrollLeft;return t?t.left+n:ys(Ur(e)).left+n}function KT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function SD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ur(r),c=t?tc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((To(r)!=="body"||qa(u))&&(d=nc(r)),Hr(r))){const y=ys(r);f=_o(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?KT(u,d):Fr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function xD(e){return Array.from(e.getClientRects())}function wD(e){const t=Ur(e),n=nc(e),r=e.ownerDocument.body,s=ii(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ii(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+rc(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=ii(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const QT=25;function AD(e,t){const n=qn(e),r=Ur(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=jh();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=rc(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=QT&&(a-=_)}else f<=QT&&(a+=f);return{width:a,height:u,x:c,y:d}}const CD=new Set(["absolute","fixed"]);function vD(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Hr(e)?_o(e):Fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function JT(e,t,n){let r;if(t==="viewport")r=AD(e,n);else if(t==="document")r=wD(Ur(e));else if(Er(t))r=vD(t,n);else{const s=XT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Zl(r)}function ZT(e,t){const n=Ni(e);return n===t||!Er(n)||bo(n)?!1:yr(n).position==="fixed"||ZT(n,t)}function kD(e,t){const n=t.get(e);if(n)return n;let r=Ya(e,[],!1).filter(c=>Er(c)&&To(c)!=="body"),s=null;const a=yr(e).position==="fixed";let u=a?Ni(e):e;for(;Er(u)&&!bo(u);){const c=yr(u),d=zh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&CD.has(s.position)||qa(u)&&!d&&ZT(e,u))?r=r.filter(p=>p!==u):s=c,u=Ni(u)}return t.set(e,r),r}function ND(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?tc(t)?[]:kD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=JT(t,p,s);return f.top=ii(m.top,f.top),f.right=vi(m.right,f.right),f.bottom=vi(m.bottom,f.bottom),f.left=ii(m.left,f.left),f},JT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function PD(e){const{width:t,height:n}=WT(e);return{width:t,height:n}}function OD(e,t,n){const r=Hr(t),s=Ur(t),a=n==="fixed",u=ys(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=rc(s)}if(r||!r&&!a)if((To(t)!=="body"||qa(s))&&(c=nc(t)),r){const y=ys(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?KT(s,c):Fr(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function qh(e){return yr(e).position==="static"}function eb(e,t){if(!Hr(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function tb(e,t){const n=qn(e);if(tc(e))return n;if(!Hr(e)){let s=Ni(e);for(;s&&!bo(s);){if(Er(s)&&!qh(s))return s;s=Ni(s)}return n}let r=eb(e,t);for(;r&&gD(r)&&qh(r);)r=eb(r,t);return r&&bo(r)&&qh(r)&&!zh(r)?n:r||TD(e)||n}const ID=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||tb,n=this.getDimensions,r=yield n(e.floating);return{reference:OD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function RD(e){return yr(e).direction==="rtl"}const LD={convertOffsetParentRelativeRectToViewportRelativeRect:SD,getDocumentElement:Ur,getClippingRect:ND,getOffsetParent:tb,getElementRects:ID,getClientRects:xD,getDimensions:PD,getScale:_o,isElement:Er,isRTL:RD};function nb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function DD(e,t){let n=null,r;const s=Ur(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=Ql(m),A=Ql(s.clientWidth-(p+b)),v=Ql(s.clientHeight-(m+y)),w=Ql(p),C={rootMargin:-_+"px "+-A+"px "+-v+"px "+-w+"px",threshold:ii(0,vi(1,d))||1};let U=!0;function Y(R){const q=R[0].intersectionRatio;if(q!==d){if(!U)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!nb(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(Y,de(F({},C),{root:s.ownerDocument}))}catch(R){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function MD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=Vh(e),p=s||a?[...f?Ya(f):[],...Ya(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?DD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[N]=w;N&&N.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?ys(e):null;d&&v();function v(){const w=ys(e);A&&!nb(A,w)&&n(),A=w,_=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(N=>{s&&N.removeEventListener("scroll",n),a&&N.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const FD=fD,BD=hD,UD=lD,HD=mD,zD=cD,jD=uD,$D=pD,VD=(e,t,n)=>{const r=new Map,s=F({platform:LD},n),a=de(F({},s.platform),{_c:r});return aD(e,t,de(F({},s),{platform:a}))};function rb(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return de(F({},s),{toJSON:()=>s})}function qD(e){if(!e)return rb();const{x:t,y:n,width:r,height:s}=e;return rb(t,n,r,s)}function YD(e,t){return{contextElement:Xt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?qD(r):n.getBoundingClientRect()}}}var Ga=e=>({variable:e,reference:`var(${e})`}),oi={arrowSize:Ga("--arrow-size"),arrowSizeHalf:Ga("--arrow-size-half"),arrowBg:Ga("--arrow-background"),transformOrigin:Ga("--transform-origin"),arrowOffset:Ga("--arrow-offset")},GD=e=>e==="top"||e==="bottom"?"y":"x";function WD(e,t){return{name:"transformOrigin",fn(n){var me,V,se,he,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=GD(d),p=((me=s.arrow)==null?void 0:me.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,A=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),w=u.reference.height/2,N=y/2,C=(ve=(he=e.offset)==null?void 0:he.mainAxis)!=null?ve:e.gutter,U=typeof C=="number"?C+N:C!=null?C:N,Y=v>U,R={top:`${_}px calc(100% + ${U}px)`,bottom:`${_}px ${-U}px`,left:`calc(100% + ${U}px) ${A}px`,right:`${-U}px ${A}px`}[d],q=`${_}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(oi.transformOrigin.variable,ne?q:R),{data:{transformOrigin:ne?q:R}}}}}var XD={name:"rects",fn({rects:e}){return{data:e}}},KD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${oi.arrowOffset.reference})`}),{}}}};function QD(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var JD={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function ib(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Yh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function ZD(e,t,n){const r=e||t.createElement("div");return jD({element:r,padding:n.arrowPadding})}function e5(e,t){var n;if(!b6((n=t.offset)!=null?n:t.gutter))return FD(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=QD(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return bh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function t5(e){if(!e.flip)return;const t=Yh(e.boundary);return UD(de(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function n5(e){if(!e.slide&&!e.overlap)return;const t=Yh(e.boundary);return BD(de(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:$D()}))}function r5(e){return HD({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function i5(e){var t;if(e.hideWhenDetached)return zD({strategy:"referenceHidden",boundary:(t=Yh(e.boundary))!=null?t:"clippingAncestors"})}function s5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function o5(e,t,n={}){const r=YD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},JD,n),a=t.querySelector("[data-part=arrow]"),u=[e5(a,s),t5(s),n5(s),ZD(a,t.ownerDocument,s),KD(a),WD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),r5(s),i5(s),XD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var U;if(!r||!t)return;const A=yield VD(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=lo(t),w=ib(v,A.x),N=ib(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${N}px`),s.hideWhenDetached&&(((U=A.middlewareData.hide)==null?void 0:U.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=fo(C);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=s5(s.listeners),_=s.listeners?MD(r,t,b,y):N6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function sb(e,t,n={}){const c=n,{defer:r}=c,s=cn(c,["defer"]),a=r?zt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(o5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var a5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function u5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:oi.arrowSize.reference,height:oi.arrowSize.reference,[oi.arrowSizeHalf.variable]:`calc(${oi.arrowSize.reference} / 2)`,[oi.arrowOffset.variable]:`calc(${oi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?a5[t.split("-")[0]]:void 0,background:oi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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,ic=new WeakMap,sc={},Gh=0,ob=e=>e&&(e.host||ob(e.parentNode)),l5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ob(n);return r&&e.contains(r)?r:(console.error("[zag-js > ariaHidden] target",n,"in not contained inside",e,". Doing nothing"),null)}).filter(n=>!!n),c5=new Set(["script","output","status","next-route-announcer"]),d5=e=>c5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),f5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=l5(n,Array.isArray(e)?e:[e]);sc[r]||(sc[r]=new WeakMap);const c=sc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Xt(y)&&yT(y,_=>{m(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(d5(_))return;const v=_.getAttribute(s)==="true",w=(So.get(_)||0)+1,N=(c.get(_)||0)+1;So.set(_,w),c.set(_,N),d.push(_),w===1&&v&&ic.set(_,!0),N===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return b(n),f.clear(),Gh++,()=>{d.forEach(y=>{const _=So.get(y)-1,A=c.get(y)-1;So.set(y,_),c.set(y,A),_||(ic.has(y)||y.removeAttribute(s),ic.delete(y)),A||y.removeAttribute(r)}),Gh--,Gh||(So=new WeakMap,So=new WeakMap,ic=new WeakMap,sc={})}},h5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,p5=(e,t=h5(e),n="data-aria-hidden",r=!0)=>{if(t)return f5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},m5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ab(e,t={}){const{defer:n=!0}=t,r=n?m5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(p5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function g5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function E5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var ub="pointerdown.outside",lb="focus.outside";function y5(e){for(const t of e)if(Xt(t)&&Mr(t))return!0;return!1}var cb=e=>"clientY"in e;function T5(e,t){if(!cb(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 b5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function db(e,t){if(!t||!cb(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return b5(u,c)?r||a:!1}function _5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=lo(e),p=g5(f),m=E5(f);function b(C,U){if(!Xt(U)||!U.isConnected||uo(e,U)||T5(e,C)||c&&ET(e,U))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Nh(Y);if(db(C,q))return!1}const R=Nh(e);return db(C,R)?!1:!(n!=null&&n(U))}const y=new Set,_=hs(e==null?void 0:e.getRootNode());function A(C){function U(Y){var me,V;const R=u&&!TT()?zt:se=>se(),q=Y!=null?Y:C,ne=(V=(me=q==null?void 0:q.composedPath)==null?void 0:me.call(q))!=null?V:[q==null?void 0:q.target];R(()=>{const se=_?ne[0]:gr(C);if(!(!e||!b(C,se))){if(s||a){const he=Th(s,a);e.addEventListener(ub,he,{once:!0})}fb(e,ub,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:c4(q),focusable:y5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Kt(d,"click",U,{once:!0})),y.add(m.addEventListener("click",U,{once:!0})),y.add(p.addEventListener("click",U,{once:!0}))):U()}const v=new Set,w=setTimeout(()=>{v.add(Kt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function N(C){(u?zt:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],R=_?Y[0]:gr(C);if(!(!e||!b(C,R))){if(r||a){const me=Th(r,a);e.addEventListener(lb,me,{once:!0})}fb(e,lb,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(R),target:R}})}})}return TT()||(v.add(Kt(d,"focusin",N,!0)),v.add(m.addEventListener("focusin",N,!0)),v.add(p.addEventListener("focusin",N,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function S5(e,t){const{defer:n}=t,r=n?zt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(_5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function fb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function x5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Kt(Dr(e),"keydown",n,{capture:!0})}var hb="layer:request-dismiss",rr={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=>uo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>uo(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=>rr.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];A5(e,hb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),w5(e,hb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function w5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function A5(e,t,n){e.addEventListener(t,n,{once:!0})}var pb;function mb(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function C5(e){e.style.pointerEvents=""}function v5(e,t){const n=Dr(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(pb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=R4(()=>{const c=s();return Xt(c)?c:null},{timeout:1e3});a.then(c=>r.push(ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=pb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function k5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){_h("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};rr.add(f),mb();function p(A){var w,N;const v=gr(A.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,N;const v=gr(A.detail.originalEvent);rr.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(N=t.onInteractOutside)==null||N.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;rr.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],N=(C=t.persistentElements)==null?void 0:C.map(U=>U()).filter(Xt);return N&&w.push(...N),w.some(U=>uo(U,A))||rr.isInNestedLayer(e,A)}const _=[a?v5(e,t.persistentElements):void 0,x5(e,b),S5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),mb(),C5(e),_.forEach(A=>A==null?void 0:A())}}function gb(e,t){const{defer:n}=t,r=n?zt:a=>a(),s=[];return s.push(r(()=>{const a=oo(e)?e():e;s.push(k5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var N5=Object.defineProperty,P5=(e,t,n)=>t in e?N5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>P5(e,typeof t!="symbol"?t+"":t,n),Eb={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()}},O5=[],I5=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const s=gr(r),a=this.findContainerIndex(s,r)>=0;if(a||zl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(ja(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>ja(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}),wt(this,"handlePointerDown",r=>{const s=gr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Xa(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Xa(this.config.allowOutsideClick,r)||r.preventDefault()}}),wt(this,"handleClick",r=>{const s=gr(r);this.findContainerIndex(s,r)>=0||Xa(this.config.clickOutsideDeactivates,r)||Xa(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Wa(r)&&r.preventDefault(),this.tryFocus(a)}}),wt(this,"handleEscapeKey",r=>{R5(r)&&Xa(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.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 t4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?n4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const s=co(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;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}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==co(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,L5(r)&&r.select()}}),wt(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),Eb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{yb(()=>{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}),wt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),wt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),wt(this,"getNodeForOption",(r,{hasFallback:s=!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&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),wt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||gr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!ps(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=ja(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Wa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!ps(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=ja(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Wa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||O5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Wa(r)&&!r.shiftKey},isKeyBackward(r){return Wa(r)&&r.shiftKey}},t);this.doc=n.document||Dr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{J6(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:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?ET(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ho(e,{getShadowRoot:this.config.getShadowRoot}),n=CT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if(ja(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ps(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ps(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,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 Eb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?yb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Kt(this.doc,"focusin",this.handleFocus,!0),Kt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Kt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Kt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Kt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Kt(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=co(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Wa=e=>e.key==="Tab",Xa=(e,...t)=>typeof e=="function"?e(...t):e,R5=e=>!e.isComposing&&e.key==="Escape",yb=e=>setTimeout(e,0),L5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function Tb(e,t={}){let n;const r=zt(()=>{const s=typeof e=="function"?e():e;if(s){n=new I5(s,de(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Dr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Wh="data-scroll-lock";function D5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function bb(e){const t=fo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function _b(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Wh))return;const u=bb(r)||bb(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Wh,"");const d=()=>O4(r,"--scrollbar-width",`${c}px`),f=D5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),ql(s,_)},m=()=>{var Y,R;const{scrollX:_,scrollY:A,visualViewport:v}=n,w=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,N=(R=v==null?void 0:v.offsetTop)!=null?R:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(N))}px`,left:`${-(_-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const U=ql(s,C);return()=>{U==null||U(),n.scrollTo({left:_,top:A,behavior:"instant"})}},b=[d(),jl()?m():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(Wh)}}var M5=gs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=M5.build(),Sb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Xh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},F5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},B5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Ab=e=>e.getById(Sb(e)),xo=e=>e.getById(xb(e)),wo=e=>e.getById(Xh(e)),Cb=e=>e.getById(wb(e)),U5=e=>e.getById(Kh(e)),H5=e=>e.getById(Qh(e));function z5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=u5(de(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(de(F({id:F5(c)},zr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(de(F({},zr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(de(F({},zr.anchor.attrs),{dir:u("dir"),id:Sb(c)}))},getTriggerProps(){return t.button(de(F({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:xb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Xh(c),onPointerDown(y){bT(y)&&u4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(de(F({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(F({id:wb(c)},zr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(de(F({},zr.content.attrs),{dir:u("dir"),id:Xh(c),tabIndex:-1,role:"dialog","aria-modal":pT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ao(d),"aria-labelledby":m.title?Kh(c):void 0,"aria-describedby":m.description?Qh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(de(F({},zr.title.attrs),{id:Kh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(de(F({},zr.description.attrs),{id:Qh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(de(F({},zr.closeTrigger.attrs),{dir:u("dir"),id:B5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var j5={props({props:e}){return de(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Ab(n))!=null?a:xo(n);return sb(r,()=>Cb(n),de(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>wo(n);let s=!0;return gb(r,{type:"popover",pointerBlocking:t("modal"),exclude:xo(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&&(s=!(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:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:N4(()=>wo(t),{triggerElement:xo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?ab(()=>[wo(t),xo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return _b(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?Tb(()=>wo(t),{initialFocus:()=>vT({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=Ab(n))!=null?u:xo(n);sb(s,()=>Cb(n),de(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){zt(()=>{Object.assign(e.get("renderedElements"),{title:!!U5(t),description:!!H5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||zt(()=>{const n=vT({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||zt(()=>{const a=xo(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})}}}};go()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[fU,oc]=ms({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[hU,Jh]=ms({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),$5=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Jh(),s=F({id:t,dir:r,getRootNode:n},e),a=Gl(j5,s);return z5(a,Ih)},V5=e=>{const[t,u]=MT(e),c=u,{children:n}=c,r=cn(c,["children"]),s=$5(r),a=Dh(jt({present:s.open},t));return S.jsx(V4,{value:s,children:S.jsx(RT,{value:a,children:n})})},vb=B.forwardRef((e,t)=>{const n=Lh(),r=$a(),s=jt(de(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(Tn.button,de(F({},s),{ref:t}))});vb.displayName="PopoverTrigger";function q5(e){return St({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 Y5(e){return St({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 G5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function W5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function X5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function K5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function Zh(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function kb(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const Q5=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return S.jsxs(V5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(vb,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(kb,{})}),S.jsx(DT,{children:S.jsx(LT,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(aT.Provider,{value:d,children:n})})})]})};function Nb(e){return St({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 Pb(e){return St({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[J5,Ts]=ms({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Ob=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getControlProps(),e);return S.jsx(Tn.div,de(F(F({},r),e),{ref:t}))});Ob.displayName="CarouselControl";const Ib=B.forwardRef((e,t)=>{const[n,r]=Va()(e,["readOnly","index"]),s=Ts(),a=jt(s.getIndicatorProps(n),r);return S.jsx(Tn.button,de(F({},a),{ref:t}))});Ib.displayName="CarouselIndicator";const Rb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getIndicatorGroupProps(),e);return S.jsx(Tn.div,de(F({},r),{ref:t}))});Rb.displayName="CarouselIndicatorGroup";const Lb=B.forwardRef((e,t)=>{const[n,r]=Va()(e,["index","snapAlign"]),s=Ts(),a=jt(s.getItemProps(n),r);return S.jsx(Tn.div,de(F({},a),{ref:t}))});Lb.displayName="CarouselItem";const Db=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getItemGroupProps(),e);return S.jsx(Tn.div,de(F({},r),{ref:t}))});Db.displayName="CarouselItemGroup";const Mb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getNextTriggerProps(),e);return S.jsx(Tn.button,de(F({},r),{ref:t}))});Mb.displayName="CarouselNextTrigger";const Fb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getPrevTriggerProps(),e);return S.jsx(Tn.button,de(F({},r),{ref:t}))});Fb.displayName="CarouselPrevTrigger";function Z5(e){const t=fo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function e8(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Bb(e){let t=[];for(const n of e.children)t=t.concat(n,Bb(n));return t}function Ub(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Bb(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!e8(n,m,u))continue;const b=fo(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function Hb(e){const t=e.getBoundingClientRect(),n=Z5(e),r=Ub(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:zb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map(jb(0,s.x))),y:zb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map(jb(0,s.y)))}}function t8(e,t,n){const r=Ub(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var zb=e=>[...new Set(e)],jb=(e,t)=>n=>Math.max(e,Math.min(t,n)),n8=gs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=n8.build(),r8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},i8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},ac=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},s8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},o8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},a8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},$b=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Dn=e=>e.getById(ac(e)),Vb=e=>P4(Dn(e),"[data-part=item]"),u8=(e,t)=>e.getById($b(e,t)),qb=e=>{const t=Dn(e);if(!t)return;const n=ho(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function l8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(N,C){a({type:"INDEX.SET",index:N,instant:C})},scrollTo(N,C){a({type:"PAGE.SET",index:N,instant:C})},scrollNext(N){a({type:"PAGE.NEXT",instant:N})},scrollPrev(N){a({type:"PAGE.PREV",instant:N})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(N){return Array.from(r.get("slidesInView")).includes(N)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(de(F({},ai.root.attrs),{id:r8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(de(F({},ai.itemGroup.attrs),{id:ac(u),"data-orientation":c("orientation"),"data-dragging":ao(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(N){uo(N.currentTarget,gr(N))&&a({type:"VIEWPORT.FOCUS"})},onBlur(N){uo(N.currentTarget,N.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(N){if(N.defaultPrevented||!c("allowMouseDrag")||!bT(N))return;const C=gr(N);Mr(C)&&C!==N.currentTarget||(N.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:P6(N=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";N[C]<0&&!s("canScrollPrev")||N[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(N){const C=r.get("slidesInView").includes(N.index);return t.element(de(F({},ai.item.attrs),{id:i8(u,N.index),dir:c("dir"),role:"group","data-index":N.index,"data-inview":ao(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(N.index,c("slideCount")),"aria-hidden":pT(!C),style:{scrollSnapAlign:(()=>{var ne;const U=(ne=N.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),R=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(N.index+R)%R===0?U:void 0})()}}))},getControlProps(){return t.element(de(F({},ai.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(de(F({},ai.prevTrigger.attrs),{id:o8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),onClick(N){N.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(de(F({},ai.nextTrigger.attrs),{dir:c("dir"),id:s8(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),disabled:!p,onClick(N){N.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(de(F({},ai.indicatorGroup.attrs),{dir:c("dir"),id:a8(u),"data-orientation":c("orientation"),onKeyDown(N){if(N.defaultPrevented)return;const C="indicator",U={ArrowDown(q){b||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){b||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){b&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){b&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=h4(N,{dir:c("dir"),orientation:c("orientation")}),R=U[Y];R==null||R(N)}}))},getIndicatorProps(N){return t.button(de(F({},ai.indicator.attrs),{dir:c("dir"),id:$b(u,N.index),type:"button","data-orientation":c("orientation"),"data-index":N.index,"data-readonly":ao(N.readOnly),"data-current":ao(N.index===_),"aria-label":w.indicator(N.index),onClick(C){C.defaultPrevented||N.readOnly||a({type:"PAGE.SET",index:N.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(de(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ao(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(N){N.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var c8={props({props:e}){return M6(e,["slideCount"],"carousel"),de(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:d8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return T6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Dn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Dn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),qb(e)});return qb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Dn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};zt(()=>{s(),zt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return Vb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Dn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?p6(d,m):m6(d,m)},n.get("slidesInView"));n.set("slidesInView",g6(c))},{root:r,threshold:t("inViewThreshold")});return Vb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Dn(n);return r?Kt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Kt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return v4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Kt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=fT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Dn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Dn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=lT(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=E6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Dn(r);if(!s)return;const a=t8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=fT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Dn(n);if(!r)return;const s=Hb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Dn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Dn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Dn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=Hb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);zt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=u8(n,e.get("page"));r&&zt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function d8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}go()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),go()(["index","readOnly"]),go()(["index","snapAlign"]);const f8=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Jh(),s=F({id:t,dir:r,getRootNode:n},e),a=Gl(c8,s);return l8(a,Ih)},Yb=B.forwardRef((e,t)=>{const[n,r]=Va()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=f8(n),a=jt(s.getRootProps(),r);return S.jsx(J5,{value:s,children:S.jsx(Tn.div,de(F({},a),{ref:t}))})});Yb.displayName="CarouselRoot";const h8=180,p8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},m8=({globalClassName:e,className:t,itemMinWidth:n=h8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,me)=>({node:ne,key:B.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${me}`})),b=m.length,y=B.useRef(null),[_,A]=B.useState(0),{width:v}=xv();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=p8(r),N=n+w,C=_>0?(_+w)/N:1,U=Math.max(1,Math.floor(C));if(b===0)return null;const Y=b>U,R=Math.ceil(b/U),q=Y?Math.max(1,C):U;return S.jsxs(Yb,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:U,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[S.jsx(Db,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:me},V)=>S.jsx(Lb,{index:V,className:G(e,`${z}-carousel__item`),children:ne},me))}),c&&Y&&S.jsxs(Ob,{className:G(e,`${z}-carousel__control`),children:[S.jsx(Fb,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(G5,{size:"16px"})}),S.jsx(Mb,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(W5,{size:"16px"})})]}),u&&Y&&S.jsx(Rb,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:R},(ne,me)=>S.jsx(Ib,{index:me,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${me+1}`},me))})]})},[g8,E8]=ms({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),y8=e=>Va()(e,["lazyMount","unmountOnExit"]),[T8,Ka]=ms({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Gb=B.forwardRef((e,t)=>{const n=Ka(),r=E8(),s=Dh(de(F({},r),{present:n.open})),a=jt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(Tn.div,de(F({},a),{ref:Wl(s.ref,t)}))});Gb.displayName="DialogBackdrop";const ep=B.forwardRef((e,t)=>{const n=Ka(),r=$a(),s=jt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,de(F({},s),{ref:Wl(r.ref,t)}))});ep.displayName="DialogContent";const tp=B.forwardRef((e,t)=>{const n=Ka(),r=jt(n.getDescriptionProps(),e);return S.jsx(Tn.div,de(F({},r),{ref:t}))});tp.displayName="DialogDescription";const np=B.forwardRef((e,t)=>{const n=Ka(),r=jt(n.getPositionerProps(),e);return $a().unmounted?null:S.jsx(Tn.div,de(F({},r),{ref:t}))});np.displayName="DialogPositioner";var b8=gs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),bs=b8.build(),Wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},rp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},uc=e=>e.getById(rp(e)),_8=e=>e.getById(Wb(e)),S8=e=>e.getById(Xb(e)),x8=e=>e.getById(Kb(e)),w8=e=>e.getById(ip(e)),A8=e=>e.getById(sp(e)),C8=e=>e.getById(Qb(e));function v8(e,t){const{state:n,send:r,context:s,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(de(F({},bs.trigger.attrs),{dir:a("dir"),id:Kb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":rp(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(de(F({},bs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Xb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(de(F({},bs.positioner.attrs),{dir:a("dir"),id:Wb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(de(F({},bs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:rp(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:ip(u),"aria-describedby":f.description?sp(u):void 0}))},getTitleProps(){return t.element(de(F({},bs.title.attrs),{dir:a("dir"),id:ip(u)}))},getDescriptionProps(){return t.element(de(F({},bs.description.attrs),{dir:a("dir"),id:sp(u)}))},getCloseTriggerProps(){return t.button(de(F({},bs.closeTrigger.attrs),{dir:a("dir"),id:Qb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var k8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>C8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:s,trapFocus:s,preventScroll:s,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 gb(()=>uc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[x8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return _b(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?Tb(()=>uc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?ab(()=>[uc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){zt(()=>{e.set("rendered",{title:!!w8(t),description:!!A8(t)})})},syncZIndex({scope:e}){zt(()=>{const t=uc(e);if(!t)return;const n=fo(t);[_8(e),S8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.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})}}}};go()(["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 N8=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Jh(),s=F({id:t,getRootNode:n,dir:r},e),a=Gl(k8,s);return v8(a,Ih)},Jb=e=>{const[t,c]=MT(e),d=c,{children:n}=d,r=cn(d,["children"]),[s]=y8(t),a=N8(r),u=Dh(jt({present:a.open},t));return S.jsx(T8,{value:a,children:S.jsx(g8,{value:s,children:S.jsx(RT,{value:u,children:n})})})},Zb=B.forwardRef((e,t)=>{const n=Ka(),r=jt(n.getTitleProps(),e);return S.jsx(Tn.h2,de(F({},r),{ref:t}))});Zb.displayName="DialogTitle";const P8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return S.jsx(yh.Provider,{value:r,children:S.jsx(oT.Provider,{value:s,children:e})})},e_=()=>B.useContext(oT),t_=()=>{const e=B.useContext(yh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},O8=`${z}-overflow-menu-button-trigger`,I8=({componentType:e,children:t})=>{const{isOpen:n}=e_(),{closeMenu:r}=t_(),{globalClassName:s}=tt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${O8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?S.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${z}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},R8=({componentType:e,className:t})=>{const{toggleMenu:n}=t_(),{isOpen:r}=e_(),{globalClassName:s}=tt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(kb,{})})},op=()=>{const{status:e,entryType:t}=Zn(),{messages:n}=er(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},L8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=Zn(),s=so(),a=()=>{cl(r||"dialog"),s()};return t?S.jsx(ni,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(Nb,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(Nb,{}),"Show ",r||"dialog"]})},D8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=Zn(),s=so(),a=()=>{Ef(!r),s()},u=r?Lk:Dk,c="Toggle Fullscreen";return t?S.jsx(ni,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},M8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=Zn(),s=so(),a=r==="bottom-left",u=()=>{yf(a?"bottom-right":"bottom-left"),s()},c=a?Y5:q5,d=a?"Move right":"Move left";return t?S.jsx(ni,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},n_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=tt(),{mode:d}=Zn(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?L8:r_,y=m?D8:M8,_=B.useMemo(()=>s?Fk(s):{},[s]);return S.jsx(P8,{children:S.jsxs("div",{className:G(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:G(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(s==null?void 0:s.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:G(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),S.jsx(Zb,{className:G(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),S.jsxs("div",{className:G(a,`${z}-${e}-controls`),children:[S.jsx(b,{componentType:e,isIcon:!0}),S.jsx(R8,{componentType:e}),S.jsx(k1,{className:G(a,`cim-${e}-component`),onClick:n})]})]}),S.jsxs(I8,{componentType:e,children:[S.jsx(y,{componentType:e}),S.jsx(H8,{componentType:e}),S.jsx(uT,{componentType:e,onClearChat:t}),f&&S.jsx(F8,{componentType:e,onDownloadTranscript:r})]})]})})},F8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=so(),[s,a]=B.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(d6,{}),"Download transcript"]})},B8={sparkle:Zh,plus:X5,"paper-plane":K5},ap=({icon:e,className:t})=>{const n=B8[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},U8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=_=>S.jsxs(S.Fragment,{children:[c&&S.jsx(ap,{icon:c,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(pl,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:b(_)},_):S.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:b(_)},_))})},H8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ei(!1),ll(!0)};return t?S.jsx(ni,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(C1,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(C1,{}),"Minimize"]})},r_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=so(),s=()=>{cl("modal"),r()};return t?S.jsx(ni,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(Pb,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(Pb,{}),"Show modal"]})},z8=({isWidgetStandalone:e})=>{var _,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s}=tt(),{askCimPrompts:a,messages:u}=er(),{isLoading:c,handleSuggestion:d}=Or(),f=s==null?void 0:s.icon,p=(_=s==null?void 0:s.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const v=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(N=>N.name==="conversation_reset")&&r||v},[u,n,r]),b=((A=a.message)==null?void 0:A.suggestions)||[],y=(v,w)=>()=>{d(v,w)};return S.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:m}),!!(b!=null&&b.length)&&S.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:b.map(v=>{var w;return S.jsxs(pl,{disabled:c,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(v,((w=a.message)==null?void 0:w.eventSourceId)||""),children:[f&&S.jsx(ap,{icon:f,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:v.displayText})]},v.displayText)})})]})},j8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return S.jsxs("div",{className:G(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?S.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:S.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&S.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:S.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},$8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?S.jsxs("div",{className:G(r,`${z}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(m8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(j8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},V8=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(Ok,{})," ",t.message||"An error occurred while processing your request."]})}),q8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Or(),{messages:u}=er(),c=u.find(A=>A.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?oA(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=A=>{const v=n.suggestions.find(w=>w.displayText===A);v&&s(v,n.eventSourceId||n.id)};return S.jsxs("div",{className:G(e,`${z}-follow-up`),children:[S.jsx("p",{className:G(e,`${z}-text`),children:n.message}),S.jsx(U8,{suggestions:n.suggestions.map(A=>A.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function i_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function Y8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function G8(e,t,n){const s=Al((n||{}).ignore||[]),a=W8(t);let u=-1;for(;++u<a.length;)HE(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],_=b?b.children:void 0;if(s(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let w=!1,N=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const U=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let R=y(...C,Y);if(typeof R=="string"&&(R=R.length>0?{type:"text",value:R}:void 0),R===!1?b.lastIndex=U+1:(_!==U&&N.push({type:"text",value:f.value.slice(_,U)}),Array.isArray(R)?N.push(...R):R&&N.push(R),_=U+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(_<f.value.length&&N.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...N)):N=[f],v+N.length}}function W8(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 s=n[r];t.push([X8(s[0]),K8(s[1])])}return t}function X8(e){return typeof e=="string"?new RegExp(Y8(e),"g"):e}function K8(e){return typeof e=="function"?e:function(){return e}}const up="phrasing",lp=["autolink","link","image","label"];function Q8(){return{transforms:[iM],enter:{literalAutolink:Z8,literalAutolinkEmail:cp,literalAutolinkHttp:cp,literalAutolinkWww:cp},exit:{literalAutolink:rM,literalAutolinkEmail:nM,literalAutolinkHttp:eM,literalAutolinkWww:tM}}}function J8(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:lp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:up,notInConstruct:lp},{character:":",before:"[ps]",after:"\\/",inConstruct:up,notInConstruct:lp}]}}function Z8(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function cp(e){this.config.enter.autolinkProtocol.call(this,e)}function eM(e){this.config.exit.autolinkProtocol.call(this,e)}function tM(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 nM(e){this.config.exit.autolinkEmail.call(this,e)}function rM(e){this.exit(e)}function iM(e){G8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,sM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),oM]],{ignore:["link","linkReference"]})}function sM(e,t,n,r,s){let a="";if(!s_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!aM(n)))return!1;const u=uM(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 oM(e,t,n,r){return!s_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function aM(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 uM(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 s=i_(e,"(");let a=i_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function s_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||yl(n))&&(!t||n!==47)}o_.peek=EM;function lM(){this.buffer()}function cM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function dM(){this.buffer()}function fM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function hM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function pM(e){this.exit(e)}function mM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function gM(e){this.exit(e)}function EM(){return"["}function o_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function yM(){return{enter:{gfmFootnoteCallString:lM,gfmFootnoteCall:cM,gfmFootnoteDefinitionLabelString:dM,gfmFootnoteDefinition:fM},exit:{gfmFootnoteCallString:hM,gfmFootnoteCall:pM,gfmFootnoteDefinitionLabelString:mM,gfmFootnoteDefinition:gM}}}function TM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:o_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
|
-
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?
|
|
33
|
-
`)}function
|
|
34
|
-
`&&
|
|
35
|
-
`}function
|
|
29
|
+
`}),n}function jE(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function $E(e,t){const n=f3(e,t),r=n.one(e,void 0),s=n3(n),a=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return s&&a.children.push({type:"text",value:`
|
|
30
|
+
`},s),a}function E3(e,t){return e&&"run"in e?function(n,r){return Ke(this,null,function*(){const s=$E(n,F({file:r},t));yield e.run(s,r)})}:function(n,r){return $E(n,F({file:r},e||t))}}function VE(e){if(e)throw e}var Wf,qE;function y3(){if(qE)return Wf;qE=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,s=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},a=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var p=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!p&&!m)return!1;var 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 Wf=function d(){var f,p,m,b,y,_,A=arguments[0],v=1,w=arguments.length,k=!1;for(typeof A=="boolean"&&(k=A,A=arguments[1]||{},v=2),(A==null||typeof A!="object"&&typeof A!="function")&&(A={});v<w;++v)if(f=arguments[v],f!=null)for(p in f)m=c(A,p),b=c(f,p),A!==b&&(k&&b&&(a(b)||(y=s(b)))?(y?(y=!1,_=m&&s(m)?m:[]):_=m&&a(m)?m:{},u(A,{name:p,newValue:d(k,_,b)})):typeof b!="undefined"&&u(A,{name:p,newValue:b}));return A},Wf}var T3=y3();const Xf=je(T3);function Kf(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 b3(){const e=[],t={run:n,use:r};return t;function n(...s){let a=-1;const u=s.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...s);function c(d,...f){const p=e[++a];let m=-1;if(d){u(d);return}for(;++m<s.length;)(f[m]===null||f[m]===void 0)&&(f[m]=s[m]);s=f,p?_3(p,c)(...f):u(null,...f)}}function r(s){if(typeof s!="function")throw new TypeError("Expected `middelware` to be a function, not "+s);return e.push(s),t}}function _3(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(s);try{d=e.apply(this,u)}catch(f){const p=f;if(c&&n)throw p;return s(p)}c||(d&&d.then&&typeof d.then=="function"?d.then(a,s):d instanceof Error?s(d):a(d))}function s(u,...c){n||(n=!0,t(u,...c))}function a(u){s(null,u)}}const Rr={basename:S3,dirname:x3,extname:w3,join:A3,sep:"/"};function S3(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');ka(e);let n=0,r=-1,s=e.length,a;if(t===void 0||t.length===0||t.length>e.length){for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else r<0&&(a=!0,r=s+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;s--;)if(e.codePointAt(s)===47){if(a){n=s+1;break}}else u<0&&(a=!0,u=s+1),c>-1&&(e.codePointAt(s)===t.codePointAt(c--)?c<0&&(r=s):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function x3(e){if(ka(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 w3(e){ka(e);let t=e.length,n=-1,r=0,s=-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?s<0?s=t:a!==1&&(a=1):s>-1&&(a=-1)}return s<0||n<0||a===0||a===1&&s===n-1&&s===r+1?"":e.slice(s,n)}function A3(...e){let t=-1,n;for(;++t<e.length;)ka(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":C3(n)}function C3(e){ka(e);const t=e.codePointAt(0)===47;let n=v3(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function v3(e,t){let n="",r=0,s=-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(!(s===u-1||a===1))if(s!==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("/")),s=u,a=0;continue}}else if(n.length>0){n="",r=0,s=u,a=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(s+1,u):n=e.slice(s+1,u),r=u-s-1;s=u,a=0}else c===46&&a>-1?a++:a=-1}return n}function ka(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const N3={cwd:k3};function k3(){return"/"}function Qf(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function P3(e){if(typeof e=="string")e=new URL(e);else if(!Qf(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 O3(e)}function O3(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 s=new TypeError("File URL path must not include encoded / characters");throw s.code="ERR_INVALID_FILE_URL_PATH",s}}return decodeURIComponent(t)}const Jf=["history","path","basename","stem","extname","dirname"];class YE{constructor(t){let n;t?Qf(t)?n={path:t}:typeof t=="string"||I3(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":N3.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<Jf.length;){const a=Jf[r];a in n&&n[a]!==void 0&&n[a]!==null&&(this[a]=a==="history"?[...n[a]]:n[a])}let s;for(s in n)Jf.includes(s)||(this[s]=n[s])}get basename(){return typeof this.path=="string"?Rr.basename(this.path):void 0}set basename(t){eh(t,"basename"),Zf(t,"basename"),this.path=Rr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Rr.dirname(this.path):void 0}set dirname(t){GE(this.basename,"dirname"),this.path=Rr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Rr.extname(this.path):void 0}set extname(t){if(Zf(t,"extname"),GE(this.dirname,"extname"),t){if(t.codePointAt(0)!==46)throw new Error("`extname` must start with `.`");if(t.includes(".",1))throw new Error("`extname` cannot contain multiple dots")}this.path=Rr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){Qf(t)&&(t=P3(t)),eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Rr.basename(this.path,this.extname):void 0}set stem(t){eh(t,"stem"),Zf(t,"stem"),this.path=Rr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const s=this.message(t,n,r);throw s.fatal=!0,s}info(t,n,r){const s=this.message(t,n,r);return s.fatal=void 0,s}message(t,n,r){const s=new gn(t,n,r);return this.path&&(s.name=this.path+":"+s.name,s.file=this.path),s.fatal=!1,this.messages.push(s),s}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function Zf(e,t){if(e&&e.includes(Rr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Rr.sep+"`")}function eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function GE(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function I3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const R3=(function(e){const r=this.constructor.prototype,s=r[e],a=function(){return s.apply(a,arguments)};return Object.setPrototypeOf(a,r),a}),L3={}.hasOwnProperty;class th extends R3{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=b3()}copy(){const t=new th;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(Xf(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(ih("data",this.frozen),this.namespace[t]=n,this):L3.call(this.namespace,t)&&this.namespace[t]||void 0:t?(ih("data",this.frozen),this.namespace=t,this):this.namespace}freeze(){if(this.frozen)return this;const t=this;for(;++this.freezeIndex<this.attachers.length;){const[n,...r]=this.attachers[this.freezeIndex];if(r[0]===!1)continue;r[0]===!0&&(r[0]=void 0);const s=n.call(t,...r);typeof s=="function"&&this.transformers.use(s)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=Nl(t),r=this.parser||this.Parser;return nh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),nh("process",this.parser||this.Parser),rh("process",this.compiler||this.Compiler),n?s(void 0,n):new Promise(s);function s(a,u){const c=Nl(t),d=r.parse(c);r.run(d,c,function(p,m,b){if(p||!m||!b)return f(p);const y=m,_=r.stringify(y,b);F3(_)?b.value=_:b.result=_,f(p,b)});function f(p,m){p||!m?u(p):a?a(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),nh("processSync",this.parser||this.Parser),rh("processSync",this.compiler||this.Compiler),this.process(t,s),XE("processSync","process",n),r;function s(a,u){n=!0,VE(a),r=u}}run(t,n,r){WE(t),this.freeze();const s=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=Nl(n);s.run(t,d,f);function f(p,m,b){const y=m||t;p?c(p):u?u(y):r(void 0,y,b)}}}runSync(t,n){let r=!1,s;return this.run(t,n,a),XE("runSync","run",r),s;function a(u,c){VE(u),s=c,r=!0}}stringify(t,n){this.freeze();const r=Nl(n),s=this.compiler||this.Compiler;return rh("stringify",s),WE(t),s(t,r)}use(t,...n){const r=this.attachers,s=this.namespace;if(ih("use",this.frozen),t!=null)if(typeof t=="function")d(t,n);else if(typeof t=="object")Array.isArray(t)?c(t):u(t);else throw new TypeError("Expected usable value, not `"+t+"`");return this;function a(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[p,...m]=f;d(p,m)}else u(f);else throw new TypeError("Expected usable value, not `"+f+"`")}function u(f){if(!("plugins"in f)&&!("settings"in f))throw new Error("Expected usable value but received an empty preset, which is probably a mistake: presets typically come with `plugins` and sometimes with `settings`, but this has neither");c(f.plugins),f.settings&&(s.settings=Xf(!0,s.settings,f.settings))}function c(f){let p=-1;if(f!=null)if(Array.isArray(f))for(;++p<f.length;){const m=f[p];a(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,p){let m=-1,b=-1;for(;++m<r.length;)if(r[m][0]===f){b=m;break}if(b===-1)r.push([f,...p]);else if(p.length>0){let[y,..._]=p;const A=r[b][1];Kf(A)&&Kf(y)&&(y=Xf(!0,A,y)),r[b]=[f,y,..._]}}}}const D3=new th().freeze();function nh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function rh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function ih(e,t){if(t)throw new Error("Cannot call `"+e+"` on a frozen processor.\nCreate a new processor first, by calling it: use `processor()` instead of `processor`.")}function WE(e){if(!Kf(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function XE(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function Nl(e){return M3(e)?e:new YE(e)}function M3(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function F3(e){return typeof e=="string"||B3(e)}function B3(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const U3="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",KE=[],QE={allowDangerousHtml:!0},H3=/^(https?|ircs?|mailto|xmpp)$/i,z3=[{from:"astPlugins",id:"remove-buggy-html-in-markdown-parser"},{from:"allowDangerousHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"allowNode",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowElement"},{from:"allowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"allowedElements"},{from:"className",id:"remove-classname"},{from:"disallowedTypes",id:"replace-allownode-allowedtypes-and-disallowedtypes",to:"disallowedElements"},{from:"escapeHtml",id:"remove-buggy-html-in-markdown-parser"},{from:"includeElementIndex",id:"#remove-includeelementindex"},{from:"includeNodeIndex",id:"change-includenodeindex-to-includeelementindex"},{from:"linkTarget",id:"remove-linktarget"},{from:"plugins",id:"change-plugins-to-remarkplugins",to:"remarkPlugins"},{from:"rawSourcePos",id:"#remove-rawsourcepos"},{from:"renderers",id:"change-renderers-to-components",to:"components"},{from:"source",id:"change-source-to-children",to:"children"},{from:"sourcePos",id:"#remove-sourcepos"},{from:"transformImageUri",id:"#add-urltransform",to:"urlTransform"},{from:"transformLinkUri",id:"#add-urltransform",to:"urlTransform"}];function JE(e){const t=j3(e),n=$3(e);return V3(t.runSync(t.parse(n),n),e)}function j3(e){const t=e.rehypePlugins||KE,n=e.remarkPlugins||KE,r=e.remarkRehypeOptions?F(F({},e.remarkRehypeOptions),QE):QE;return D3().use(xO).use(n).use(E3,r).use(t)}function $3(e){const t=e.children||"",n=new YE;return typeof t=="string"&&(n.value=t),n}function V3(e,t){const n=t.allowedElements,r=t.allowElement,s=t.components,a=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||q3;for(const p of z3)Object.hasOwn(t,p.from)&&(""+p.from+(p.to?"use `"+p.to+"` instead":"remove it")+U3+p.id,void 0);return vl(e,f),mk(e,{Fragment:S.Fragment,components:s,ignoreInvalidStyle:!0,jsx:S.jsx,jsxs:S.jsxs,passKeys:!0,passNode:!0});function f(p,m,b){if(p.type==="raw"&&b&&typeof m=="number")return u?b.children.splice(m,1):b.children[m]={type:"text",value:p.value},m;if(p.type==="element"){let y;for(y in Lf)if(Object.hasOwn(Lf,y)&&Object.hasOwn(p.properties,y)){const _=p.properties[y],A=Lf[y];(A===null||A.includes(p.tagName))&&(p.properties[y]=d(String(_||""),y,p))}}if(p.type==="element"){let y=n?!n.includes(p.tagName):a?a.includes(p.tagName):!1;if(!y&&r&&typeof m=="number"&&(y=!r(p,m,b)),y&&b&&typeof m=="number")return c&&p.children?b.children.splice(m,1,...p.children):b.children.splice(m,1),m}}}function q3(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),s=e.indexOf("/");return t===-1||s!==-1&&t>s||n!==-1&&t>n||r!==-1&&t>r||H3.test(e.slice(0,t))?e:""}const ZE=/[#.]/g;function Y3(e,t){const n=e||"",r={};let s=0,a,u;for(;s<n.length;){ZE.lastIndex=s;const c=ZE.exec(n),d=n.slice(s,c?c.index:n.length);d&&(a?a==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,s+=d.length),c&&(a=c[0],s++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function ey(e,t,n){const r=n?K3(n):void 0;function s(a,u,...c){let d;if(a==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=Y3(a,t);const f=d.tagName.toLowerCase(),p=r?r.get(f):void 0;if(d.tagName=p||f,G3(u))c.unshift(u);else for(const[m,b]of Object.entries(u))W3(e,d.properties,m,b)}for(const f of c)sh(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return s}function G3(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 s=t[r];if(s&&typeof s=="object"){if(!Array.isArray(s))return!0;const a=s;for(const u of a)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function W3(e,t,n,r){const s=ml(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"?s.spaceSeparated?a=$1(r):s.commaSeparated?a=P1(r):s.commaOrSpaceSeparated?a=$1(P1(r).join(" ")):a=ty(s,s.property,r):Array.isArray(r)?a=[...r]:a=s.property==="style"?X3(r):String(r);if(Array.isArray(a)){const u=[];for(const c of a)u.push(ty(s,s.property,c));a=u}s.property==="className"&&Array.isArray(t.className)&&(a=t.className.concat(a)),t[s.property]=a}}function sh(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)sh(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?sh(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function ty(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||ya(n)===ya(t)))return!0}return n}function X3(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function K3(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const Q3=["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"],J3=ey(Ta,"div"),Z3=ey(bi,"g",Q3);function eI(e){const t=String(e),n=[];return{toOffset:s,toPoint:r};function r(a){if(typeof a=="number"&&a>-1&&a<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=ny(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>a)return{line:u+1,column:a-(u>0?n[u-1]:0)+1,offset:a};u++}}}function s(a){if(a&&typeof a.line=="number"&&typeof a.column=="number"&&!Number.isNaN(a.line)&&!Number.isNaN(a.column)){for(;n.length<a.line;){const c=n[n.length-1],d=ny(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(a.line>1?n[a.line-2]:0)+a.column-1;if(u<n[a.line-1])return u}}}function ny(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
|
|
31
|
+
`,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const ls={html:"http://www.w3.org/1999/xhtml",mathml:"http://www.w3.org/1998/Math/MathML",svg:"http://www.w3.org/2000/svg",xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},ry={}.hasOwnProperty,tI=Object.prototype;function nI(e,t){const n=t||{};return oh({file:n.file||void 0,location:!1,schema:n.space==="svg"?bi:Ta,verbose:n.verbose||!1},e)}function oh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},kl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,s="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:iy(e,t.childNodes),data:{quirksMode:s}},e.file&&e.location){const a=String(e.file),u=eI(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"},kl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},kl(e,r,n),n}default:return n=rI(e,t),n}}function iy(e,t){let n=-1;const r=[];for(;++n<t.length;){const s=oh(e,t[n]);r.push(s)}return r}function rI(e,t){const n=e.schema;e.schema=t.namespaceURI===ls.svg?bi:Ta;let r=-1;const s={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;ry.call(tI,d)||(s[d]=c.value)}const u=(e.schema.space==="svg"?Z3:J3)(t.tagName,s,iy(e,t.childNodes));if(kl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&eo(d.startTag),p=d&&d.endTag&&eo(d.endTag),m=oh(e,c.content);f&&p&&e.file&&(m.position={start:f.end,end:p.start}),u.content=m}return e.schema=n,u}function kl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=iI(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function iI(e,t,n){const r=eo(n);if(t.type==="element"){const s=t.children[t.children.length-1];if(r&&!n.endTag&&s&&s.position&&s.position.end&&(r.end=Object.assign({},s.position.end)),e.verbose){const a={};let u;if(n.attrs)for(u in n.attrs)ry.call(n.attrs,u)&&(a[ml(e.schema,u).property]=eo(n.attrs[u]));n.startTag;const c=eo(n.startTag),d=n.endTag?eo(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=a,t.data={position:f}}}return r}function eo(e){const t=sy({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=sy({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function sy(e){return e.line&&e.column?e:void 0}const oy={}.hasOwnProperty;function ay(e,t){const n=t||{};function r(s,...a){let u=r.invalid;const c=r.handlers;if(s&&oy.call(s,e)){const d=String(s[e]);u=oy.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,s,...a)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const sI={},oI={}.hasOwnProperty,uy=ay("type",{handlers:{root:uI,element:hI,text:dI,comment:fI,doctype:cI}});function aI(e,t){const r=(t||sI).space;return uy(e,r==="svg"?bi:Ta)}function uI(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=ah(e.children,n,t),to(e,n),n}function lI(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=ah(e.children,n,t),to(e,n),n}function cI(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return to(e,t),t}function dI(e){const t={nodeName:"#text",value:e.value,parentNode:null};return to(e,t),t}function fI(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return to(e,t),t}function hI(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=bi);const s=[];let a;if(e.properties){for(a in e.properties)if(a!=="children"&&oI.call(e.properties,a)){const d=pI(r,a,e.properties[a]);d&&s.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:s,namespaceURI:ls[u],childNodes:[],parentNode:null};return c.childNodes=ah(e.children,c,r),to(e,c),e.tagName==="template"&&e.content&&(c.content=lI(e.content,r)),c}function pI(e,t,n){const r=ml(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?O1(n):V1(n));const s={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const a=s.name.indexOf(":");a<0?s.prefix="":(s.name=s.name.slice(a+1),s.prefix=r.attribute.slice(0,a)),s.namespace=ls[r.space]}return s}function ah(e,t,n){let r=-1;const s=[];if(e)for(;++r<e.length;){const a=uy(e[r],n);a.parentNode=t,s.push(a)}return s}function to(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 mI=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],gI=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]),xt="�";var P;(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(P||(P={}));const Ln={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function ly(e){return e>=55296&&e<=57343}function EI(e){return e>=56320&&e<=57343}function yI(e,t){return(e-55296)*1024+9216+t}function cy(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function dy(e){return e>=64976&&e<=65007||gI.has(e)}var te;(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(te||(te={}));const TI=65536;class bI{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=TI,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:s,offset:a}=this,u=s+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(EI(n))return this.pos++,this._addGap(),yI(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,P.EOF;return this._err(te.surrogateInInputStream),t}willDropParsedChunk(){return this.pos>this.bufferWaterline}dropParsedChunk(){this.willDropParsedChunk()&&(this.html=this.html.substring(this.pos),this.lineStartPos-=this.pos,this.droppedBufferSize+=this.pos,this.pos=0,this.lastGapPos=-2,this.gapStack.length=0)}write(t,n){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=n}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,n){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(n)return this.html.startsWith(t,this.pos);for(let r=0;r<t.length;r++)if((this.html.charCodeAt(this.pos+r)|32)!==t.charCodeAt(r))return!1;return!0}peek(t){const n=this.pos+t;if(n>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;const r=this.html.charCodeAt(n);return r===P.CARRIAGE_RETURN?P.LINE_FEED:r}advance(){if(this.pos++,this.isEol&&(this.isEol=!1,this.line++,this.lineStartPos=this.pos),this.pos>=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,P.EOF;let t=this.html.charCodeAt(this.pos);return t===P.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,P.LINE_FEED):t===P.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,ly(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===P.LINE_FEED||t===P.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){cy(t)?this._err(te.controlCharacterInInputStream):dy(t)&&this._err(te.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var Xe;(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Xe||(Xe={}));function fy(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 _I=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏઑඡ༉༦ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲϏϢϸontourIntegraìȹoɴ\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲy;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱còJTabcdfgorstרׯؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ߂ߐĀiyޱrc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣসে্ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४ĀnrࢃgleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpwਖਛgȀLRlr৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼અઋp;椅y;䐜Ādl੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑඞcy;䐊cute;䅃ƀaeyહાron;䅇dil;䅅;䐝ƀgswે૰ativeƀMTV૨ediumSpace;怋hiĀcn૦ëeryThiîtedĀGLଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷreak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪௫ఄ಄ದൡඅ櫬Āoungruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater;EFGLSTஶஷ扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨setĀ;Eೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂෛ෧ขภยา฿ไlig;䅒cute耻Ó䃓Āiyීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲcr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬืde耻Õ䃕es;樷ml耻Ö䃖erĀBP๋Āar๐๓r;怾acĀek๚;揞et;掴arenthesis;揜ҀacfhilorsງຊຏຒດຝະrtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ檻cedesȀ;EST່້扺qual;檯lantEqual;扼ilde;找me;怳Ādpuct;戏ortionĀ;aȥl;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL憒ar;懥eftArrow;懄eiling;按oǵ\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄቕቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHcቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗ĀeiቻDzኀ\0ኇefore;戴a;䎘ĀcnኘkSpace;쀀 Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtèa;䎖r;愨pf;愤cr;쀀𝒵ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒;Eaeiopᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;eᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;eᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰᝃᝈ០៦ᠹᡐᜍ᥈ᥰot;櫭ĀcrᛶkȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;tbrk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯᝳ;䎲;愶een;扬r;쀀𝔟gcostuvwឍឝឳេ៕៛ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀakoᠦᠵĀcn៲ᠣkƀlst֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ;敛;敘;攘;攔;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģbar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;elƀ;bhᥨᥩᥫ䁜;槅sub;柈ŬᥴlĀ;e怢t»pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭒\0᯽\0ᰌƀcprᦲute;䄇̀;abcdsᦿᧀᧄ᧕᧙戩nd;橄rcup;橉Āau᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r;Ecefms᩠ᩢᩫ᪤᪪旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ\0\0aĀ;t䀬;䁀ƀ;fl戁îᅠeĀmxent»eóɍǧ\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯delprvw᭠᭬᭷ᮂᮬᯔarrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;pᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰻᰿ᱝᱩᱵᲞᲬᲷᴍᵻᶑᶫᶻ᷆᷍ròar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂᳖᳜᳠mƀ;oș᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄĀDoḆᴴoôĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»ṺƀaeiἒἚls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧\0耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₥₰₴⃰℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽ƀ;qsؾٌlanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqrⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0proør;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼ròòΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonóquigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roøurĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨íistĀ;sடr;쀀𝔫ȀEest⩦⩹⩼ƀ;qs⩭ƀ;qs⩴lanôií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast⭕⭚⭟lleìl;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖchimpqu⮽⯍⯙⬄⯤⯯Ȁ;cerല⯆ഷ⯉uå;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭ååഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñĀ;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;cⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācrir;榿;쀀𝔬ͯ\0\0\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕⶥⶨrò᪀Āirⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔǒr;榷rp;榹;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ\0\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ脀¶;l䂶leìЃɩ\0\0m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳ᤈ⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t⾴ïrel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⋢⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔ABHabcdefhilmnoprstuxけさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstwガクシスゼゾダッデナp;極Ā;fゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ìâヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘rrowĀ;tㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowóarpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓ròaòՑ;怏oustĀ;a㈞掱che»mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì耻䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;qኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫwar;椪lig耻ß䃟㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rëƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproøim»ኬsðኞĀas㚺㚮ðrn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈadempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xôheadĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roðtré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜtré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),SI=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 xI(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=SI.get(e))!==null&&t!==void 0?t:e}var Gt;(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"})(Gt||(Gt={}));const wI=32;var xi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(xi||(xi={}));function uh(e){return e>=Gt.ZERO&&e<=Gt.NINE}function AI(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_F||e>=Gt.LOWER_A&&e<=Gt.LOWER_F}function CI(e){return e>=Gt.UPPER_A&&e<=Gt.UPPER_Z||e>=Gt.LOWER_A&&e<=Gt.LOWER_Z||uh(e)}function vI(e){return e===Gt.EQUALS||CI(e)}var Wt;(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"})(Wt||(Wt={}));var ri;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(ri||(ri={}));class NI{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=Wt.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=ri.Strict}startEntity(t){this.decodeMode=t,this.state=Wt.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case Wt.EntityStart:return t.charCodeAt(n)===Gt.NUM?(this.state=Wt.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=Wt.NamedEntity,this.stateNamedEntity(t,n));case Wt.NumericStart:return this.stateNumericStart(t,n);case Wt.NumericDecimal:return this.stateNumericDecimal(t,n);case Wt.NumericHex:return this.stateNumericHex(t,n);case Wt.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|wI)===Gt.LOWER_X?(this.state=Wt.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=Wt.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,s){if(n!==r){const a=r-n;this.result=this.result*Math.pow(s,a)+Number.parseInt(t.substr(n,a),s),this.consumed+=a}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s)||AI(s))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(s,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const s=t.charCodeAt(n);if(uh(s))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(s,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===Gt.SEMI)this.consumed+=1;else if(this.decodeMode===ri.Strict)return 0;return this.emitCodePoint(xI(this.result),this.consumed),this.errors&&(t!==Gt.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let s=r[this.treeIndex],a=(s&xi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=kI(r,s,this.treeIndex+Math.max(1,a),u),this.treeIndex<0)return this.result===0||this.decodeMode===ri.Attribute&&(a===0||vI(u))?0:this.emitNotTerminatedNamedEntity();if(s=r[this.treeIndex],a=(s&xi.VALUE_LENGTH)>>14,a!==0){if(u===Gt.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==ri.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,s=(r[n]&xi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,s,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:s}=this;return this.emitCodePoint(n===1?s[t]&~xi.VALUE_LENGTH:s[t+1],r),n===3&&this.emitCodePoint(s[t+2],r),r}end(){var t;switch(this.state){case Wt.NamedEntity:return this.result!==0&&(this.decodeMode!==ri.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case Wt.NumericDecimal:return this.emitNumericEntity(0,2);case Wt.NumericHex:return this.emitNumericEntity(0,3);case Wt.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case Wt.EntityStart:return 0}}}function kI(e,t,n,r){const s=(t&xi.BRANCH_LENGTH)>>7,a=t&xi.JUMP_TABLE;if(s===0)return a!==0&&r===a?n:-1;if(a){const d=r-a;return d<0||d>=s?-1:e[n+d]-1}let u=n,c=u+s-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+s]}return-1}var le;(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(le||(le={}));var cs;(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"})(cs||(cs={}));var nr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(nr||(nr={}));var X;(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(X||(X={}));var g;(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(g||(g={}));const PI=new Map([[X.A,g.A],[X.ADDRESS,g.ADDRESS],[X.ANNOTATION_XML,g.ANNOTATION_XML],[X.APPLET,g.APPLET],[X.AREA,g.AREA],[X.ARTICLE,g.ARTICLE],[X.ASIDE,g.ASIDE],[X.B,g.B],[X.BASE,g.BASE],[X.BASEFONT,g.BASEFONT],[X.BGSOUND,g.BGSOUND],[X.BIG,g.BIG],[X.BLOCKQUOTE,g.BLOCKQUOTE],[X.BODY,g.BODY],[X.BR,g.BR],[X.BUTTON,g.BUTTON],[X.CAPTION,g.CAPTION],[X.CENTER,g.CENTER],[X.CODE,g.CODE],[X.COL,g.COL],[X.COLGROUP,g.COLGROUP],[X.DD,g.DD],[X.DESC,g.DESC],[X.DETAILS,g.DETAILS],[X.DIALOG,g.DIALOG],[X.DIR,g.DIR],[X.DIV,g.DIV],[X.DL,g.DL],[X.DT,g.DT],[X.EM,g.EM],[X.EMBED,g.EMBED],[X.FIELDSET,g.FIELDSET],[X.FIGCAPTION,g.FIGCAPTION],[X.FIGURE,g.FIGURE],[X.FONT,g.FONT],[X.FOOTER,g.FOOTER],[X.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[X.FORM,g.FORM],[X.FRAME,g.FRAME],[X.FRAMESET,g.FRAMESET],[X.H1,g.H1],[X.H2,g.H2],[X.H3,g.H3],[X.H4,g.H4],[X.H5,g.H5],[X.H6,g.H6],[X.HEAD,g.HEAD],[X.HEADER,g.HEADER],[X.HGROUP,g.HGROUP],[X.HR,g.HR],[X.HTML,g.HTML],[X.I,g.I],[X.IMG,g.IMG],[X.IMAGE,g.IMAGE],[X.INPUT,g.INPUT],[X.IFRAME,g.IFRAME],[X.KEYGEN,g.KEYGEN],[X.LABEL,g.LABEL],[X.LI,g.LI],[X.LINK,g.LINK],[X.LISTING,g.LISTING],[X.MAIN,g.MAIN],[X.MALIGNMARK,g.MALIGNMARK],[X.MARQUEE,g.MARQUEE],[X.MATH,g.MATH],[X.MENU,g.MENU],[X.META,g.META],[X.MGLYPH,g.MGLYPH],[X.MI,g.MI],[X.MO,g.MO],[X.MN,g.MN],[X.MS,g.MS],[X.MTEXT,g.MTEXT],[X.NAV,g.NAV],[X.NOBR,g.NOBR],[X.NOFRAMES,g.NOFRAMES],[X.NOEMBED,g.NOEMBED],[X.NOSCRIPT,g.NOSCRIPT],[X.OBJECT,g.OBJECT],[X.OL,g.OL],[X.OPTGROUP,g.OPTGROUP],[X.OPTION,g.OPTION],[X.P,g.P],[X.PARAM,g.PARAM],[X.PLAINTEXT,g.PLAINTEXT],[X.PRE,g.PRE],[X.RB,g.RB],[X.RP,g.RP],[X.RT,g.RT],[X.RTC,g.RTC],[X.RUBY,g.RUBY],[X.S,g.S],[X.SCRIPT,g.SCRIPT],[X.SEARCH,g.SEARCH],[X.SECTION,g.SECTION],[X.SELECT,g.SELECT],[X.SOURCE,g.SOURCE],[X.SMALL,g.SMALL],[X.SPAN,g.SPAN],[X.STRIKE,g.STRIKE],[X.STRONG,g.STRONG],[X.STYLE,g.STYLE],[X.SUB,g.SUB],[X.SUMMARY,g.SUMMARY],[X.SUP,g.SUP],[X.TABLE,g.TABLE],[X.TBODY,g.TBODY],[X.TEMPLATE,g.TEMPLATE],[X.TEXTAREA,g.TEXTAREA],[X.TFOOT,g.TFOOT],[X.TD,g.TD],[X.TH,g.TH],[X.THEAD,g.THEAD],[X.TITLE,g.TITLE],[X.TR,g.TR],[X.TRACK,g.TRACK],[X.TT,g.TT],[X.U,g.U],[X.UL,g.UL],[X.SVG,g.SVG],[X.VAR,g.VAR],[X.WBR,g.WBR],[X.XMP,g.XMP]]);function no(e){var t;return(t=PI.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const he=g,OI={[le.HTML]:new Set([he.ADDRESS,he.APPLET,he.AREA,he.ARTICLE,he.ASIDE,he.BASE,he.BASEFONT,he.BGSOUND,he.BLOCKQUOTE,he.BODY,he.BR,he.BUTTON,he.CAPTION,he.CENTER,he.COL,he.COLGROUP,he.DD,he.DETAILS,he.DIR,he.DIV,he.DL,he.DT,he.EMBED,he.FIELDSET,he.FIGCAPTION,he.FIGURE,he.FOOTER,he.FORM,he.FRAME,he.FRAMESET,he.H1,he.H2,he.H3,he.H4,he.H5,he.H6,he.HEAD,he.HEADER,he.HGROUP,he.HR,he.HTML,he.IFRAME,he.IMG,he.INPUT,he.LI,he.LINK,he.LISTING,he.MAIN,he.MARQUEE,he.MENU,he.META,he.NAV,he.NOEMBED,he.NOFRAMES,he.NOSCRIPT,he.OBJECT,he.OL,he.P,he.PARAM,he.PLAINTEXT,he.PRE,he.SCRIPT,he.SECTION,he.SELECT,he.SOURCE,he.STYLE,he.SUMMARY,he.TABLE,he.TBODY,he.TD,he.TEMPLATE,he.TEXTAREA,he.TFOOT,he.TH,he.THEAD,he.TITLE,he.TR,he.TRACK,he.UL,he.WBR,he.XMP]),[le.MATHML]:new Set([he.MI,he.MO,he.MN,he.MS,he.MTEXT,he.ANNOTATION_XML]),[le.SVG]:new Set([he.TITLE,he.FOREIGN_OBJECT,he.DESC]),[le.XLINK]:new Set,[le.XML]:new Set,[le.XMLNS]:new Set},lh=new Set([he.H1,he.H2,he.H3,he.H4,he.H5,he.H6]);X.STYLE,X.SCRIPT,X.XMP,X.IFRAME,X.NOEMBED,X.NOFRAMES,X.PLAINTEXT;var O;(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(O||(O={}));const It={DATA:O.DATA,RCDATA:O.RCDATA,RAWTEXT:O.RAWTEXT,SCRIPT_DATA:O.SCRIPT_DATA,PLAINTEXT:O.PLAINTEXT,CDATA_SECTION:O.CDATA_SECTION};function II(e){return e>=P.DIGIT_0&&e<=P.DIGIT_9}function Pa(e){return e>=P.LATIN_CAPITAL_A&&e<=P.LATIN_CAPITAL_Z}function RI(e){return e>=P.LATIN_SMALL_A&&e<=P.LATIN_SMALL_Z}function wi(e){return RI(e)||Pa(e)}function hy(e){return wi(e)||II(e)}function Pl(e){return e+32}function py(e){return e===P.SPACE||e===P.LINE_FEED||e===P.TABULATION||e===P.FORM_FEED}function my(e){return py(e)||e===P.SOLIDUS||e===P.GREATER_THAN_SIGN}function LI(e){return e===P.NULL?te.nullCharacterReference:e>1114111?te.characterReferenceOutsideUnicodeRange:ly(e)?te.surrogateCharacterReference:dy(e)?te.noncharacterCharacterReference:cy(e)||e===P.CARRIAGE_RETURN?te.controlCharacterReference:null}class DI{constructor(t,n){this.options=t,this.handler=n,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=O.DATA,this.returnState=O.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new bI(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new NI(_I,(r,s)=>{this.preprocessor.pos=this.entityStartPos+s-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(te.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(te.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const s=LI(r);s&&this._err(s,1)}}:void 0)}_err(t,n=0){var r,s;(s=(r=this.handler).onParseError)===null||s===void 0||s.call(r,this.preprocessor.getError(t,n))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;const t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t==null||t())}write(t,n,r){this.active=!0,this.preprocessor.write(t,n),this._runParsingLoop(),this.paused||r==null||r()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),this._runParsingLoop()}_ensureHibernation(){return this.preprocessor.endOfChunkHit?(this.preprocessor.retreat(this.consumedAfterSnapshot),this.consumedAfterSnapshot=0,this.active=!1,!0):!1}_consume(){return this.consumedAfterSnapshot++,this.preprocessor.advance()}_advanceBy(t){this.consumedAfterSnapshot+=t;for(let n=0;n<t;n++)this.preprocessor.advance()}_consumeSequenceIfMatch(t,n){return this.preprocessor.startsWith(t,n)?(this._advanceBy(t.length-1),!0):!1}_createStartTagToken(){this.currentToken={type:Xe.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:Xe.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:Xe.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:Xe.DOCTYPE,name:t,forceQuirks:!1,publicId:null,systemId:null,location:this.currentLocation}}_createCharacterToken(t,n){this.currentCharacterToken={type:t,chars:n,location:this.currentLocation}}_createAttr(t){this.currentAttr={name:t,value:""},this.currentLocation=this.getCurrentLocation(0)}_leaveAttrName(){var t,n;const r=this.currentToken;if(fy(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const s=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);s[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(te.duplicateAttribute)}_leaveAttrValue(){this.currentLocation&&(this.currentLocation.endLine=this.preprocessor.line,this.currentLocation.endCol=this.preprocessor.col,this.currentLocation.endOffset=this.preprocessor.offset)}prepareToken(t){this._emitCurrentCharacterToken(t.location),this.currentToken=null,t.location&&(t.location.endLine=this.preprocessor.line,t.location.endCol=this.preprocessor.col+1,t.location.endOffset=this.preprocessor.offset+1),this.currentLocation=this.getCurrentLocation(-1)}emitCurrentTagToken(){const t=this.currentToken;this.prepareToken(t),t.tagID=no(t.tagName),t.type===Xe.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(te.endTagWithAttributes),t.selfClosing&&this._err(te.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Xe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Xe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Xe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){const t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Xe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,n){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=n;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,n)}_emitCodePoint(t){const n=py(t)?Xe.WHITESPACE_CHARACTER:t===P.NULL?Xe.NULL_CHARACTER:Xe.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Xe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=O.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?ri.Attribute:ri.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===O.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===O.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case O.DATA:{this._stateData(t);break}case O.RCDATA:{this._stateRcdata(t);break}case O.RAWTEXT:{this._stateRawtext(t);break}case O.SCRIPT_DATA:{this._stateScriptData(t);break}case O.PLAINTEXT:{this._statePlaintext(t);break}case O.TAG_OPEN:{this._stateTagOpen(t);break}case O.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case O.TAG_NAME:{this._stateTagName(t);break}case O.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case O.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case O.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case O.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case O.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case O.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case O.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case O.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case O.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case O.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case O.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case O.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case O.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case O.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case O.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case O.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case O.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case O.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case O.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case O.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case O.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case O.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case O.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case O.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case O.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case O.BOGUS_COMMENT:{this._stateBogusComment(t);break}case O.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case O.COMMENT_START:{this._stateCommentStart(t);break}case O.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case O.COMMENT:{this._stateComment(t);break}case O.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case O.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case O.COMMENT_END:{this._stateCommentEnd(t);break}case O.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case O.DOCTYPE:{this._stateDoctype(t);break}case O.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case O.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case O.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case O.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case O.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case O.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case O.CDATA_SECTION:{this._stateCdataSection(t);break}case O.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case O.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case O.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case O.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.TAG_OPEN;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitCodePoint(t);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case P.AMPERSAND:{this._startCharacterReference();break}case P.LESS_THAN_SIGN:{this.state=O.RCDATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.RAWTEXT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(wi(t))this._createStartTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.EXCLAMATION_MARK:{this.state=O.MARKUP_DECLARATION_OPEN;break}case P.SOLIDUS:{this.state=O.END_TAG_OPEN;break}case P.QUESTION_MARK:{this._err(te.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t);break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=O.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(wi(t))this._createEndTagToken(),this.state=O.TAG_NAME,this._stateTagName(t);else switch(t){case P.GREATER_THAN_SIGN:{this._err(te.missingEndTagName),this.state=O.DATA;break}case P.EOF:{this._err(te.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(te.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.tagName+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(Pa(t)?Pl(t):t)}}_stateRcdataLessThanSign(t){t===P.SOLIDUS?this.state=O.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){wi(t)?(this.state=O.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}handleSpecialEndTag(t){if(!this.preprocessor.startsWith(this.lastStartTagName,!1))return!this._ensureHibernation();this._createEndTagToken();const n=this.currentToken;switch(n.tagName=this.lastStartTagName,this.preprocessor.peek(this.lastStartTagName.length)){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=O.BEFORE_ATTRIBUTE_NAME,!1;case P.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=O.SELF_CLOSING_START_TAG,!1;case P.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=O.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===P.SOLIDUS?this.state=O.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){wi(t)?(this.state=O.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case P.SOLIDUS:{this.state=O.SCRIPT_DATA_END_TAG_OPEN;break}case P.EXCLAMATION_MARK:{this.state=O.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=O.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){wi(t)?(this.state=O.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===P.HYPHEN_MINUS?(this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=O.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===P.SOLIDUS?this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:wi(t)?(this._emitChars("<"),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){wi(t)?(this.state=O.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Ln.SCRIPT,!1)&&my(this.preprocessor.peek(Ln.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ln.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case P.HYPHEN_MINUS:{this._emitChars("-");break}case P.LESS_THAN_SIGN:{this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case P.GREATER_THAN_SIGN:{this.state=O.SCRIPT_DATA,this._emitChars(">");break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case P.EOF:{this._err(te.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===P.SOLIDUS?(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Ln.SCRIPT,!1)&&my(this.preprocessor.peek(Ln.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Ln.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=O.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=O.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._err(te.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=O.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:case P.SOLIDUS:case P.GREATER_THAN_SIGN:case P.EOF:{this._leaveAttrName(),this.state=O.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case P.EQUALS_SIGN:{this._leaveAttrName(),this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:{this._err(te.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.name+=xt;break}default:this.currentAttr.name+=String.fromCodePoint(Pa(t)?Pl(t):t)}}_stateAfterAttributeName(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.SOLIDUS:{this.state=O.SELF_CLOSING_START_TAG;break}case P.EQUALS_SIGN:{this.state=O.BEFORE_ATTRIBUTE_VALUE;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=O.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{this.state=O.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this.state=O.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingAttributeValue),this.state=O.DATA,this.emitCurrentTagToken();break}default:this.state=O.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case P.APOSTROPHE:{this.state=O.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.AMPERSAND:{this._startCharacterReference();break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),this.currentAttr.value+=xt;break}case P.QUOTATION_MARK:case P.APOSTROPHE:case P.LESS_THAN_SIGN:case P.EQUALS_SIGN:case P.GRAVE_ACCENT:{this._err(te.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this._leaveAttrValue(),this.state=O.BEFORE_ATTRIBUTE_NAME;break}case P.SOLIDUS:{this._leaveAttrValue(),this.state=O.SELF_CLOSING_START_TAG;break}case P.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBetweenAttributes),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case P.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=O.DATA,this.emitCurrentTagToken();break}case P.EOF:{this._err(te.eofInTag),this._emitEOFToken();break}default:this._err(te.unexpectedSolidusInTag),this.state=O.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Ln.DASH_DASH,!0)?(this._createCommentToken(Ln.DASH_DASH.length+1),this.state=O.COMMENT_START):this._consumeSequenceIfMatch(Ln.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Ln.DOCTYPE.length+1),this.state=O.DOCTYPE):this._consumeSequenceIfMatch(Ln.CDATA_START,!0)?this.inForeignNode?this.state=O.CDATA_SECTION:(this._err(te.cdataInHtmlContent),this._createCommentToken(Ln.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=O.BOGUS_COMMENT):this._ensureHibernation()||(this._err(te.incorrectlyOpenedComment),this._createCommentToken(2),this.state=O.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_START_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptClosingOfEmptyComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END_DASH;break}case P.LESS_THAN_SIGN:{n.data+="<",this.state=O.COMMENT_LESS_THAN_SIGN;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.data+=xt;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case P.EXCLAMATION_MARK:{n.data+="!",this.state=O.COMMENT_LESS_THAN_SIGN_BANG;break}case P.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=O.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=O.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===P.HYPHEN_MINUS?this.state=O.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=O.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==P.GREATER_THAN_SIGN&&t!==P.EOF&&this._err(te.nestedComment),this.state=O.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{this.state=O.COMMENT_END;break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentComment(n);break}case P.EXCLAMATION_MARK:{this.state=O.COMMENT_END_BANG;break}case P.HYPHEN_MINUS:{n.data+="-";break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=O.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case P.HYPHEN_MINUS:{n.data+="--!",this.state=O.COMMENT_END_DASH;break}case P.GREATER_THAN_SIGN:{this._err(te.incorrectlyClosedComment),this.state=O.DATA,this.emitCurrentComment(n);break}case P.EOF:{this._err(te.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=O.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingWhitespaceBeforeDoctypeName),this.state=O.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(Pa(t))this._createDoctypeToken(String.fromCharCode(Pl(t))),this.state=O.DOCTYPE_NAME;else switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.NULL:{this._err(te.unexpectedNullCharacter),this._createDoctypeToken(xt),this.state=O.DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._createDoctypeToken(String.fromCodePoint(t)),this.state=O.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.AFTER_DOCTYPE_NAME;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.name+=xt;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(Pa(t)?Pl(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Ln.PUBLIC,!1)?this.state=O.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Ln.SYSTEM,!1)?this.state=O.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(te.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.publicId="",this.state=O.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateDoctypePublicIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.publicId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.publicId+=String.fromCodePoint(t)}}_stateAfterDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case P.GREATER_THAN_SIGN:{this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:{this.state=O.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.QUOTATION_MARK:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{this._err(te.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.QUOTATION_MARK:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case P.APOSTROPHE:{n.systemId="",this.state=O.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case P.GREATER_THAN_SIGN:{this._err(te.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.DATA,this.emitCurrentDoctype(n);break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case P.QUOTATION_MARK:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateDoctypeSystemIdentifierSingleQuoted(t){const n=this.currentToken;switch(t){case P.APOSTROPHE:{this.state=O.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case P.NULL:{this._err(te.unexpectedNullCharacter),n.systemId+=xt;break}case P.GREATER_THAN_SIGN:{this._err(te.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.systemId+=String.fromCodePoint(t)}}_stateAfterDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case P.SPACE:case P.LINE_FEED:case P.TABULATION:case P.FORM_FEED:break;case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.EOF:{this._err(te.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(te.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=O.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case P.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=O.DATA;break}case P.NULL:{this._err(te.unexpectedNullCharacter);break}case P.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case P.RIGHT_SQUARE_BRACKET:{this.state=O.CDATA_SECTION_BRACKET;break}case P.EOF:{this._err(te.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===P.RIGHT_SQUARE_BRACKET?this.state=O.CDATA_SECTION_END:(this._emitChars("]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case P.GREATER_THAN_SIGN:{this.state=O.DATA;break}case P.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=O.CDATA_SECTION,this._stateCdataSection(t)}}_stateCharacterReference(){let t=this.entityDecoder.write(this.preprocessor.html,this.preprocessor.pos);if(t<0)if(this.preprocessor.lastChunkWritten)t=this.entityDecoder.end();else{this.active=!1,this.preprocessor.pos=this.preprocessor.html.length-1,this.consumedAfterSnapshot=0,this.preprocessor.endOfChunkHit=!0;return}t===0?(this.preprocessor.pos=this.entityStartPos,this._flushCodePointConsumedAsCharacterReference(P.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&hy(this.preprocessor.peek(1))?O.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){hy(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===P.SEMICOLON&&this._err(te.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const gy=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Ey=new Set([...gy,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),Ol=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),MI=new Set([...Ol,g.OL,g.UL]),FI=new Set([...Ol,g.BUTTON]),yy=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Ty=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),BI=new Set([g.TR,g.TEMPLATE,g.HTML]),UI=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),HI=new Set([g.TABLE,g.TEMPLATE,g.HTML]),zI=new Set([g.TD,g.TH]);class jI{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,n,r){this.treeAdapter=n,this.handler=r,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=g.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===g.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===le.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,n){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=n,this.currentTagId=n,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,n,!0)}pop(){const t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,n){const r=this._indexOf(t);this.items[r]=n,r===this.stackTop&&(this.current=n)}insertAfter(t,n,r){const s=this._indexOf(t)+1;this.items.splice(s,0,n),this.tagIDs.splice(s,0,r),this.stackTop++,s===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,s===this.stackTop)}popUntilTagNamePopped(t){let n=this.stackTop+1;do n=this.tagIDs.lastIndexOf(t,n-1);while(n>0&&this.treeAdapter.getNamespaceURI(this.items[n])!==le.HTML);this.shortenToLength(Math.max(n,0))}shortenToLength(t){for(;this.stackTop>=t;){const n=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(n,this.stackTop<t)}}popUntilElementPopped(t){const n=this._indexOf(t);this.shortenToLength(Math.max(n,0))}popUntilPopped(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(Math.max(r,0))}popUntilNumberedHeaderPopped(){this.popUntilPopped(lh,le.HTML)}popUntilTableCellPopped(){this.popUntilPopped(zI,le.HTML)}popAllUpToHtmlElement(){this.tmplCount=0,this.shortenToLength(1)}_indexOfTagNames(t,n){for(let r=this.stackTop;r>=0;r--)if(t.has(this.tagIDs[r])&&this.treeAdapter.getNamespaceURI(this.items[r])===n)return r;return-1}clearBackTo(t,n){const r=this._indexOfTagNames(t,n);this.shortenToLength(r+1)}clearBackToTableContext(){this.clearBackTo(HI,le.HTML)}clearBackToTableBodyContext(){this.clearBackTo(UI,le.HTML)}clearBackToTableRowContext(){this.clearBackTo(BI,le.HTML)}remove(t){const n=this._indexOf(t);n>=0&&(n===this.stackTop?this.pop():(this.items.splice(n,1),this.tagIDs.splice(n,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===g.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){const n=this._indexOf(t)-1;return n>=0?this.items[n]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===g.HTML}hasInDynamicScope(t,n){for(let r=this.stackTop;r>=0;r--){const s=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case le.HTML:{if(s===t)return!0;if(n.has(s))return!1;break}case le.SVG:{if(Ty.has(s))return!1;break}case le.MATHML:{if(yy.has(s))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,Ol)}hasInListItemScope(t){return this.hasInDynamicScope(t,MI)}hasInButtonScope(t){return this.hasInDynamicScope(t,FI)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case le.HTML:{if(lh.has(n))return!0;if(Ol.has(n))return!1;break}case le.SVG:{if(Ty.has(n))return!1;break}case le.MATHML:{if(yy.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===le.HTML)switch(this.tagIDs[t]){case g.TBODY:case g.THEAD:case g.TFOOT:return!0;case g.TABLE:case g.HTML:return!1}return!0}hasInSelectScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===le.HTML)switch(this.tagIDs[n]){case t:return!0;case g.OPTION:case g.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;this.currentTagId!==void 0&&gy.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Ey.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Ey.has(this.currentTagId);)this.pop()}}const ch=3;var Lr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Lr||(Lr={}));const by={type:Lr.Marker};class $I{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],s=n.length,a=this.treeAdapter.getTagName(t),u=this.treeAdapter.getNamespaceURI(t);for(let c=0;c<this.entries.length;c++){const d=this.entries[c];if(d.type===Lr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===a&&this.treeAdapter.getNamespaceURI(f)===u){const p=this.treeAdapter.getAttrList(f);p.length===s&&r.push({idx:c,attrs:p})}}return r}_ensureNoahArkCondition(t){if(this.entries.length<ch)return;const n=this.treeAdapter.getAttrList(t),r=this._getNoahArkConditionCandidates(t,n);if(r.length<ch)return;const s=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=>s.get(d.name)===d.value)&&(a+=1,a>=ch&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(by)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Lr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Lr.Element,element:t,token:n})}removeEntry(t){const n=this.entries.indexOf(t);n!==-1&&this.entries.splice(n,1)}clearToLastMarker(){const t=this.entries.indexOf(by);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Lr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Lr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Lr.Element&&n.element===t)}}const Ai={createDocument(){return{nodeName:"#document",mode:nr.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 s=e.childNodes.find(a=>a.nodeName==="#documentType");if(s)s.name=t,s.publicId=n,s.systemId=r;else{const a={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ai.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(Ai.isTextNode(n)){n.value+=t;return}}Ai.appendChild(e,Ai.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ai.isTextNode(r)?r.value+=t:Ai.insertBefore(e,Ai.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=F(F({},e.sourceCodeLocation),t)}},_y="html",VI="about:legacy-compat",qI="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Sy=["+//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//"],YI=[...Sy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],GI=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),xy=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],WI=[...xy,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function wy(e,t){return t.some(n=>e.startsWith(n))}function XI(e){return e.name===_y&&e.publicId===null&&(e.systemId===null||e.systemId===VI)}function KI(e){if(e.name!==_y)return nr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===qI)return nr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),GI.has(n))return nr.QUIRKS;let r=t===null?YI:Sy;if(wy(n,r))return nr.QUIRKS;if(r=t===null?xy:WI,wy(n,r))return nr.LIMITED_QUIRKS}return nr.NO_QUIRKS}const Ay={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},QI="definitionurl",JI="definitionURL",ZI=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])),eR=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:le.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:le.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:le.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:le.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:le.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:le.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:le.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:le.XML}],["xml:space",{prefix:"xml",name:"space",namespace:le.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:le.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:le.XMLNS}]]),tR=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])),nR=new Set([g.B,g.BIG,g.BLOCKQUOTE,g.BODY,g.BR,g.CENTER,g.CODE,g.DD,g.DIV,g.DL,g.DT,g.EM,g.EMBED,g.H1,g.H2,g.H3,g.H4,g.H5,g.H6,g.HEAD,g.HR,g.I,g.IMG,g.LI,g.LISTING,g.MENU,g.META,g.NOBR,g.OL,g.P,g.PRE,g.RUBY,g.S,g.SMALL,g.SPAN,g.STRONG,g.STRIKE,g.SUB,g.SUP,g.TABLE,g.TT,g.U,g.UL,g.VAR]);function rR(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===cs.COLOR||r===cs.SIZE||r===cs.FACE)||nR.has(t)}function Cy(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===QI){e.attrs[t].name=JI;break}}function vy(e){for(let t=0;t<e.attrs.length;t++){const n=ZI.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function dh(e){for(let t=0;t<e.attrs.length;t++){const n=eR.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 iR(e){const t=tR.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=no(e.tagName))}function sR(e,t){return t===le.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function oR(e,t,n){if(t===le.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===cs.ENCODING){const s=n[r].value.toLowerCase();return s===Ay.TEXT_HTML||s===Ay.APPLICATION_XML}}return t===le.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function aR(e,t,n,r){return(!r||r===le.HTML)&&oR(e,t,n)||(!r||r===le.MATHML)&&sR(e,t)}const uR="hidden",lR=8,cR=3;var M;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(M||(M={}));const dR={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Ny=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),ky={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ai,onParseError:null};class Py{constructor(t,n,r=null,s=null){this.fragmentContext=r,this.scriptHandler=s,this.currentToken=null,this.stopped=!1,this.insertionMode=M.INITIAL,this.originalInsertionMode=M.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=F(F({},ky),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 DI(this.options,this),this.activeFormattingElements=new $I(this.treeAdapter),this.fragmentContextID=r?no(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new jI(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=F(F({},ky),n);t!=null||(t=r.treeAdapter.createElement(X.TEMPLATE,le.HTML,[]));const s=r.treeAdapter.createElement("documentmock",le.HTML,[]),a=new this(r,s,t);return a.fragmentContextID===g.TEMPLATE&&a.tmplInsertionModeStack.unshift(M.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var s;if(!this.onParseError)return;const a=(s=t.location)!==null&&s!==void 0?s:dR,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 s,a;(a=(s=this.treeAdapter).onItemPush)===null||a===void 0||a.call(s,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,s;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(s=(r=this.treeAdapter).onItemPop)===null||s===void 0||s.call(r,t,this.openElements.current),n){let a,u;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,u=this.fragmentContextID):{current:a,currentTagId:u}=this.openElements,this._setContextModes(a,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===le.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,le.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=M.TEXT}switchToPlaintextParsing(){this.insertionMode=M.TEXT,this.originalInsertionMode=M.IN_BODY,this.tokenizer.state=It.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===X.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==le.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=It.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=It.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=It.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=It.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",s=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,s),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&&fe(F({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,le.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,le.HTML,t.attrs),r=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(n,r),this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,null)}_insertFakeRootElement(){const t=this.treeAdapter.createElement(X.HTML,le.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,g.HTML)}_appendCommentNode(t,n){const r=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(n,r),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(r,t.location)}_insertCharacters(t){let n,r;if(this._shouldFosterParentOnInsertion()?({parent:n,beforeElement:r}=this._findFosterParentingLocation(),r?this.treeAdapter.insertTextBefore(n,t.chars,r):this.treeAdapter.insertText(n,t.chars)):(n=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(n,t.chars)),!t.location)return;const s=this.treeAdapter.getChildNodes(n),a=r?s.lastIndexOf(r):s.length,u=s[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,s=this.treeAdapter.getTagName(t),a=n.type===Xe.END_TAG&&s===n.tagName?{endTag:F({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let n,r;return this.openElements.stackTop===0&&this.fragmentContext?(n=this.fragmentContext,r=this.fragmentContextID):{current:n,currentTagId:r}=this.openElements,t.tagID===g.SVG&&this.treeAdapter.getTagName(n)===X.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===le.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,le.HTML)}_processToken(t){switch(t.type){case Xe.CHARACTER:{this.onCharacter(t);break}case Xe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Xe.COMMENT:{this.onComment(t);break}case Xe.DOCTYPE:{this.onDoctype(t);break}case Xe.START_TAG:{this._processStartTag(t);break}case Xe.END_TAG:{this.onEndTag(t);break}case Xe.EOF:{this.onEof(t);break}case Xe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const s=this.treeAdapter.getNamespaceURI(n),a=this.treeAdapter.getAttrList(n);return aR(t,s,a,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(s=>s.type===Lr.Marker||this.openElements.contains(s.element)),r=n===-1?t-1:n-1;for(let s=r;s>=0;s--){const a=this.activeFormattingElements.entries[s];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=M.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(g.P),this.openElements.popUntilTagNamePopped(g.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case g.TR:{this.insertionMode=M.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=M.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=M.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=M.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=M.IN_TABLE;return}case g.BODY:{this.insertionMode=M.IN_BODY;return}case g.FRAMESET:{this.insertionMode=M.IN_FRAMESET;return}case g.SELECT:{this._resetInsertionModeForSelect(t);return}case g.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case g.HTML:{this.insertionMode=this.headElement?M.AFTER_HEAD:M.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=M.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=M.IN_HEAD;return}break}}this.insertionMode=M.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let n=t-1;n>0;n--){const r=this.openElements.tagIDs[n];if(r===g.TEMPLATE)break;if(r===g.TABLE){this.insertionMode=M.IN_SELECT_IN_TABLE;return}}this.insertionMode=M.IN_SELECT}_isElementCausesFosterParenting(t){return Ny.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this.openElements.currentTagId!==void 0&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){const n=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case g.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(n)===le.HTML)return{parent:this.treeAdapter.getTemplateContent(n),beforeElement:null};break}case g.TABLE:{const r=this.treeAdapter.getParentNode(n);return r?{parent:r,beforeElement:n}:{parent:this.openElements.items[t-1],beforeElement:null}}}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){const n=this._findFosterParentingLocation();n.beforeElement?this.treeAdapter.insertBefore(n.parent,t,n.beforeElement):this.treeAdapter.appendChild(n.parent,t)}_isSpecialElement(t,n){const r=this.treeAdapter.getNamespaceURI(t);return OI[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){zL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:{Iy(this,t);break}case M.TEXT:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_TABLE_TEXT:{Hy(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){HL(this,t);return}switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.TEXT:{this._insertCharacters(t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_COLUMN_GROUP:{Ll(this,t);break}case M.AFTER_BODY:{Fl(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){hh(this,t);return}switch(this.insertionMode){case M.INITIAL:case M.BEFORE_HTML:case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_TEMPLATE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{hh(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.AFTER_BODY:{yR(this,t);break}case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{TR(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case M.INITIAL:{bR(this,t);break}case M.BEFORE_HEAD:case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:{this._err(t,te.misplacedDoctype);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,te.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?jL(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{_R(this,t);break}case M.BEFORE_HEAD:{xR(this,t);break}case M.IN_HEAD:{mr(this,t);break}case M.IN_HEAD_NO_SCRIPT:{CR(this,t);break}case M.AFTER_HEAD:{NR(this,t);break}case M.IN_BODY:{yn(this,t);break}case M.IN_TABLE:{ro(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_CAPTION:{wL(this,t);break}case M.IN_COLUMN_GROUP:{gh(this,t);break}case M.IN_TABLE_BODY:{Dl(this,t);break}case M.IN_ROW:{Ml(this,t);break}case M.IN_CELL:{vL(this,t);break}case M.IN_SELECT:{$y(this,t);break}case M.IN_SELECT_IN_TABLE:{kL(this,t);break}case M.IN_TEMPLATE:{OL(this,t);break}case M.AFTER_BODY:{RL(this,t);break}case M.IN_FRAMESET:{LL(this,t);break}case M.AFTER_FRAMESET:{ML(this,t);break}case M.AFTER_AFTER_BODY:{BL(this,t);break}case M.AFTER_AFTER_FRAMESET:{UL(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?$L(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{SR(this,t);break}case M.BEFORE_HEAD:{wR(this,t);break}case M.IN_HEAD:{AR(this,t);break}case M.IN_HEAD_NO_SCRIPT:{vR(this,t);break}case M.AFTER_HEAD:{kR(this,t);break}case M.IN_BODY:{Rl(this,t);break}case M.TEXT:{pL(this,t);break}case M.IN_TABLE:{Fa(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_CAPTION:{AL(this,t);break}case M.IN_COLUMN_GROUP:{CL(this,t);break}case M.IN_TABLE_BODY:{Eh(this,t);break}case M.IN_ROW:{jy(this,t);break}case M.IN_CELL:{NL(this,t);break}case M.IN_SELECT:{Vy(this,t);break}case M.IN_SELECT_IN_TABLE:{PL(this,t);break}case M.IN_TEMPLATE:{IL(this,t);break}case M.AFTER_BODY:{Yy(this,t);break}case M.IN_FRAMESET:{DL(this,t);break}case M.AFTER_FRAMESET:{FL(this,t);break}case M.AFTER_AFTER_BODY:{Bl(this,t);break}}}onEof(t){switch(this.insertionMode){case M.INITIAL:{Oa(this,t);break}case M.BEFORE_HTML:{Ia(this,t);break}case M.BEFORE_HEAD:{Ra(this,t);break}case M.IN_HEAD:{La(this,t);break}case M.IN_HEAD_NO_SCRIPT:{Da(this,t);break}case M.AFTER_HEAD:{Ma(this,t);break}case M.IN_BODY:case M.IN_TABLE:case M.IN_CAPTION:case M.IN_COLUMN_GROUP:case M.IN_TABLE_BODY:case M.IN_ROW:case M.IN_CELL:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:{By(this,t);break}case M.TEXT:{mL(this,t);break}case M.IN_TABLE_TEXT:{Ua(this,t);break}case M.IN_TEMPLATE:{qy(this,t);break}case M.AFTER_BODY:case M.IN_FRAMESET:case M.AFTER_FRAMESET:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===P.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case M.IN_HEAD:case M.IN_HEAD_NO_SCRIPT:case M.AFTER_HEAD:case M.TEXT:case M.IN_COLUMN_GROUP:case M.IN_SELECT:case M.IN_SELECT_IN_TABLE:case M.IN_FRAMESET:case M.AFTER_FRAMESET:{this._insertCharacters(t);break}case M.IN_BODY:case M.IN_CAPTION:case M.IN_CELL:case M.IN_TEMPLATE:case M.AFTER_BODY:case M.AFTER_AFTER_BODY:case M.AFTER_AFTER_FRAMESET:{Oy(this,t);break}case M.IN_TABLE:case M.IN_TABLE_BODY:case M.IN_ROW:{mh(this,t);break}case M.IN_TABLE_TEXT:{Uy(this,t);break}}}}function fR(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):Fy(e,t),n}function hR(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const s=e.openElements.items[r];if(s===t.element)break;e._isSpecialElement(s,e.openElements.tagIDs[r])&&(n=s)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function pR(e,t,n){let r=t,s=e.openElements.getCommonAncestor(t);for(let a=0,u=s;u!==n;a++,u=s){s=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&a>=cR;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=mR(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function mR(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 gR(e,t,n){const r=e.treeAdapter.getTagName(t),s=no(r);if(e._isElementCausesFosterParenting(s))e._fosterParentElement(n);else{const a=e.treeAdapter.getNamespaceURI(t);s===g.TEMPLATE&&a===le.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function ER(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:s}=n,a=e.treeAdapter.createElement(s.tagName,r,s.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,s),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,a,s.tagID)}function fh(e,t){for(let n=0;n<lR;n++){const r=fR(e,t);if(!r)break;const s=hR(e,r);if(!s)break;e.activeFormattingElements.bookmark=r;const a=pR(e,s,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(a),u&&gR(e,u,a),ER(e,s,r)}}function hh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function yR(e,t){e._appendCommentNode(t,e.openElements.items[0])}function TR(e,t){e._appendCommentNode(t,e.document)}function ph(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],s=e.treeAdapter.getNodeSourceCodeLocation(r);if(s&&!s.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 bR(e,t){e._setDocumentType(t);const n=t.forceQuirks?nr.QUIRKS:KI(t);XI(t)||e._err(t,te.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=M.BEFORE_HTML}function Oa(e,t){e._err(t,te.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,nr.QUIRKS),e.insertionMode=M.BEFORE_HTML,e._processToken(t)}function _R(e,t){t.tagID===g.HTML?(e._insertElement(t,le.HTML),e.insertionMode=M.BEFORE_HEAD):Ia(e,t)}function SR(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&Ia(e,t)}function Ia(e,t){e._insertFakeRootElement(),e.insertionMode=M.BEFORE_HEAD,e._processToken(t)}function xR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.HEAD:{e._insertElement(t,le.HTML),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD;break}default:Ra(e,t)}}function wR(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?Ra(e,t):e._err(t,te.endTagWithoutMatchingOpenElement)}function Ra(e,t){e._insertFakeElement(X.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=M.IN_HEAD,e._processToken(t)}function mr(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,It.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,It.RAWTEXT):(e._insertElement(t,le.HTML),e.insertionMode=M.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,It.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,It.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=M.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(M.IN_TEMPLATE);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:La(e,t)}}function AR(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=M.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{La(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function ds(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,te.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,te.endTagWithoutMatchingOpenElement)}function La(e,t){e.openElements.pop(),e.insertionMode=M.AFTER_HEAD,e._processToken(t)}function CR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{mr(e,t);break}case g.NOSCRIPT:{e._err(t,te.nestedNoscriptInHead);break}default:Da(e,t)}}function vR(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=M.IN_HEAD;break}case g.BR:{Da(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Da(e,t){const n=t.type===Xe.EOF?te.openElementsLeftAfterEof:te.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=M.IN_HEAD,e._processToken(t)}function NR(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.BODY:{e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET;break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{e._err(t,te.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),mr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,te.misplacedStartTagForHeadElement);break}default:Ma(e,t)}}function kR(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{Ma(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:e._err(t,te.endTagWithoutMatchingOpenElement)}}function Ma(e,t){e._insertFakeElement(X.BODY,g.BODY),e.insertionMode=M.IN_BODY,Il(e,t)}function Il(e,t){switch(t.type){case Xe.CHARACTER:{Iy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Oy(e,t);break}case Xe.COMMENT:{hh(e,t);break}case Xe.START_TAG:{yn(e,t);break}case Xe.END_TAG:{Rl(e,t);break}case Xe.EOF:{By(e,t);break}}}function Oy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function Iy(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function PR(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function OR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function IR(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_FRAMESET)}function RR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function LR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&lh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,le.HTML)}function DR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function MR(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),n||(e.formElement=e.openElements.current))}function FR(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const s=e.openElements.tagIDs[r];if(n===g.LI&&s===g.LI||(n===g.DD||n===g.DT)&&(s===g.DD||s===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(s),e.openElements.popUntilTagNamePopped(s);break}if(s!==g.ADDRESS&&s!==g.DIV&&s!==g.P&&e._isSpecialElement(e.openElements.items[r],s))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML)}function BR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.tokenizer.state=It.PLAINTEXT}function UR(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1}function HR(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(X.A);n&&(fh(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function zR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function jR(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(fh(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,le.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $R(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function VR(e,t){e.treeAdapter.getDocumentMode(e.document)!==nr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=M.IN_TABLE}function Ry(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Ly(e){const t=fy(e,cs.TYPE);return t!=null&&t.toLowerCase()===uR}function qR(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,le.HTML),Ly(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function YR(e,t){e._appendElement(t,le.HTML),t.ackSelfClosing=!0}function GR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,le.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function WR(e,t){t.tagName=X.IMG,t.tagID=g.IMG,Ry(e,t)}function XR(e,t){e._insertElement(t,le.HTML),e.skipNextNewLine=!0,e.tokenizer.state=It.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=M.TEXT}function KR(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function QR(e,t){e.framesetOk=!1,e._switchToTextParsing(t,It.RAWTEXT)}function Dy(e,t){e._switchToTextParsing(t,It.RAWTEXT)}function JR(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===M.IN_TABLE||e.insertionMode===M.IN_CAPTION||e.insertionMode===M.IN_TABLE_BODY||e.insertionMode===M.IN_ROW||e.insertionMode===M.IN_CELL?M.IN_SELECT_IN_TABLE:M.IN_SELECT}function ZR(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function eL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,le.HTML)}function tL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,le.HTML)}function nL(e,t){e._reconstructActiveFormattingElements(),Cy(t),dh(t),t.selfClosing?e._appendElement(t,le.MATHML):e._insertElement(t,le.MATHML),t.ackSelfClosing=!0}function rL(e,t){e._reconstructActiveFormattingElements(),vy(t),dh(t),t.selfClosing?e._appendElement(t,le.SVG):e._insertElement(t,le.SVG),t.ackSelfClosing=!0}function My(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,le.HTML)}function yn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{zR(e,t);break}case g.A:{HR(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{LR(e,t);break}case g.P:case g.DL:case g.OL:case g.UL:case g.DIV:case g.DIR:case g.NAV:case g.MAIN:case g.MENU:case g.ASIDE:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.DETAILS:case g.ADDRESS:case g.ARTICLE:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{RR(e,t);break}case g.LI:case g.DD:case g.DT:{FR(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ry(e,t);break}case g.HR:{GR(e,t);break}case g.RB:case g.RTC:{eL(e,t);break}case g.RT:case g.RP:{tL(e,t);break}case g.PRE:case g.LISTING:{DR(e,t);break}case g.XMP:{KR(e,t);break}case g.SVG:{rL(e,t);break}case g.HTML:{PR(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{mr(e,t);break}case g.BODY:{OR(e,t);break}case g.FORM:{MR(e,t);break}case g.NOBR:{jR(e,t);break}case g.MATH:{nL(e,t);break}case g.TABLE:{VR(e,t);break}case g.INPUT:{qR(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{YR(e,t);break}case g.IMAGE:{WR(e,t);break}case g.BUTTON:{UR(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{$R(e,t);break}case g.IFRAME:{QR(e,t);break}case g.SELECT:{JR(e,t);break}case g.OPTION:case g.OPTGROUP:{ZR(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Dy(e,t);break}case g.FRAMESET:{IR(e,t);break}case g.TEXTAREA:{XR(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Dy(e,t):My(e,t);break}case g.PLAINTEXT:{BR(e,t);break}case g.COL:case g.TH:case g.TD:case g.TR:case g.HEAD:case g.FRAME:case g.TBODY:case g.TFOOT:case g.THEAD:case g.CAPTION:case g.COLGROUP:break;default:My(e,t)}}function iL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function sL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=M.AFTER_BODY,Yy(e,t))}function oL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function aL(e){const t=e.openElements.tmplCount>0,{formElement:n}=e;t||(e.formElement=null),(n||t)&&e.openElements.hasInScope(g.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(g.FORM):n&&e.openElements.remove(n))}function uL(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(X.P,g.P),e._closePElement()}function lL(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function cL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function dL(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function fL(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function hL(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(X.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Fy(e,t){const n=t.tagName,r=t.tagID;for(let s=e.openElements.stackTop;s>0;s--){const a=e.openElements.items[s],u=e.openElements.tagIDs[s];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(a)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=s&&e.openElements.shortenToLength(s);break}if(e._isSpecialElement(a,u))break}}function Rl(e,t){switch(t.tagID){case g.A:case g.B:case g.I:case g.S:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.NOBR:case g.SMALL:case g.STRIKE:case g.STRONG:{fh(e,t);break}case g.P:{uL(e);break}case g.DL:case g.UL:case g.OL:case g.DIR:case g.DIV:case g.NAV:case g.PRE:case g.MAIN:case g.MENU:case g.ASIDE:case g.BUTTON:case g.CENTER:case g.FIGURE:case g.FOOTER:case g.HEADER:case g.HGROUP:case g.DIALOG:case g.ADDRESS:case g.ARTICLE:case g.DETAILS:case g.SEARCH:case g.SECTION:case g.SUMMARY:case g.LISTING:case g.FIELDSET:case g.BLOCKQUOTE:case g.FIGCAPTION:{oL(e,t);break}case g.LI:{lL(e);break}case g.DD:case g.DT:{cL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{dL(e);break}case g.BR:{hL(e);break}case g.BODY:{iL(e,t);break}case g.HTML:{sL(e,t);break}case g.FORM:{aL(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{fL(e,t);break}case g.TEMPLATE:{ds(e,t);break}default:Fy(e,t)}}function By(e,t){e.tmplInsertionModeStack.length>0?qy(e,t):ph(e,t)}function pL(e,t){var n;t.tagID===g.SCRIPT&&((n=e.scriptHandler)===null||n===void 0||n.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function mL(e,t){e._err(t,te.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function mh(e,t){if(e.openElements.currentTagId!==void 0&&Ny.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=M.IN_TABLE_TEXT,t.type){case Xe.CHARACTER:{Hy(e,t);break}case Xe.WHITESPACE_CHARACTER:{Uy(e,t);break}}else Ba(e,t)}function gL(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CAPTION}function EL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_COLUMN_GROUP}function yL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.COLGROUP,g.COLGROUP),e.insertionMode=M.IN_COLUMN_GROUP,gh(e,t)}function TL(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_TABLE_BODY}function bL(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(X.TBODY,g.TBODY),e.insertionMode=M.IN_TABLE_BODY,Dl(e,t)}function _L(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function SL(e,t){Ly(t)?e._appendElement(t,le.HTML):Ba(e,t),t.ackSelfClosing=!0}function xL(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,le.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function ro(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{bL(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{mr(e,t);break}case g.COL:{yL(e,t);break}case g.FORM:{xL(e,t);break}case g.TABLE:{_L(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{TL(e,t);break}case g.INPUT:{SL(e,t);break}case g.CAPTION:{gL(e,t);break}case g.COLGROUP:{EL(e,t);break}default:Ba(e,t)}}function Fa(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{ds(e,t);break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Ba(e,t)}}function Ba(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Il(e,t),e.fosterParentingEnabled=n}function Uy(e,t){e.pendingCharacterTokens.push(t)}function Hy(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function Ua(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)Ba(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const zy=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function wL(e,t){const n=t.tagID;zy.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,ro(e,t)):yn(e,t)}function AL(e,t){const n=t.tagID;switch(n){case g.CAPTION:case g.TABLE:{e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_TABLE,n===g.TABLE&&Fa(e,t));break}case g.BODY:case g.COL:case g.COLGROUP:case g.HTML:case g.TBODY:case g.TD:case g.TFOOT:case g.TH:case g.THEAD:case g.TR:break;default:Rl(e,t)}}function gh(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.COL:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{mr(e,t);break}default:Ll(e,t)}}function CL(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TEMPLATE:{ds(e,t);break}case g.COL:break;default:Ll(e,t)}}function Ll(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=M.IN_TABLE,e._processToken(t))}function Dl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(X.TR,g.TR),e.insertionMode=M.IN_ROW,Ml(e,t);break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,ro(e,t));break}default:ro(e,t)}}function Eh(e,t){const n=t.tagID;switch(t.tagID){case g.TBODY:case g.TFOOT:case g.THEAD:{e.openElements.hasInTableScope(n)&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE,Fa(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:case g.TR:break;default:Fa(e,t)}}function Ml(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,le.HTML),e.insertionMode=M.IN_CELL,e.activeFormattingElements.insertMarker();break}case g.CAPTION:case g.COL:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Dl(e,t));break}default:ro(e,t)}}function jy(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Eh(e,t));break}case g.TBODY:case g.TFOOT:case g.THEAD:{(e.openElements.hasInTableScope(t.tagID)||e.openElements.hasInTableScope(g.TR))&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=M.IN_TABLE_BODY,Eh(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:case g.TD:case g.TH:break;default:Fa(e,t)}}function vL(e,t){const n=t.tagID;zy.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Ml(e,t)):yn(e,t)}function NL(e,t){const n=t.tagID;switch(n){case g.TD:case g.TH:{e.openElements.hasInTableScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=M.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),jy(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Rl(e,t)}}function $y(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,le.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{mr(e,t);break}}}function Vy(e,t){switch(t.tagID){case g.OPTGROUP:{e.openElements.stackTop>0&&e.openElements.currentTagId===g.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===g.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop();break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop();break}case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode());break}case g.TEMPLATE:{ds(e,t);break}}}function kL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e._processStartTag(t)):$y(e,t)}function PL(e,t){const n=t.tagID;n===g.CAPTION||n===g.TABLE||n===g.TBODY||n===g.TFOOT||n===g.THEAD||n===g.TR||n===g.TD||n===g.TH?e.openElements.hasInTableScope(n)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),e.onEndTag(t)):Vy(e,t)}function OL(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{mr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=M.IN_TABLE,e.insertionMode=M.IN_TABLE,ro(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=M.IN_COLUMN_GROUP,e.insertionMode=M.IN_COLUMN_GROUP,gh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=M.IN_TABLE_BODY,e.insertionMode=M.IN_TABLE_BODY,Dl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=M.IN_ROW,e.insertionMode=M.IN_ROW,Ml(e,t);break}default:e.tmplInsertionModeStack[0]=M.IN_BODY,e.insertionMode=M.IN_BODY,yn(e,t)}}function IL(e,t){t.tagID===g.TEMPLATE&&ds(e,t)}function qy(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):ph(e,t)}function RL(e,t){t.tagID===g.HTML?yn(e,t):Fl(e,t)}function Yy(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=M.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===g.HTML){e._setEndLocation(e.openElements.items[0],t);const r=e.openElements.items[1];r&&!(!((n=e.treeAdapter.getNodeSourceCodeLocation(r))===null||n===void 0)&&n.endTag)&&e._setEndLocation(r,t)}}else Fl(e,t)}function Fl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function LL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.FRAMESET:{e._insertElement(t,le.HTML);break}case g.FRAME:{e._appendElement(t,le.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{mr(e,t);break}}}function DL(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=M.AFTER_FRAMESET))}function ML(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function FL(e,t){t.tagID===g.HTML&&(e.insertionMode=M.AFTER_AFTER_FRAMESET)}function BL(e,t){t.tagID===g.HTML?yn(e,t):Bl(e,t)}function Bl(e,t){e.insertionMode=M.IN_BODY,Il(e,t)}function UL(e,t){switch(t.tagID){case g.HTML:{yn(e,t);break}case g.NOFRAMES:{mr(e,t);break}}}function HL(e,t){t.chars=xt,e._insertCharacters(t)}function zL(e,t){e._insertCharacters(t),e.framesetOk=!1}function Gy(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==le.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function jL(e,t){if(rR(t))Gy(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===le.MATHML?Cy(t):r===le.SVG&&(iR(t),vy(t)),dh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function $L(e,t){if(t.tagID===g.P||t.tagID===g.BR){Gy(e),e._endTagOutsideForeignContent(t);return}for(let n=e.openElements.stackTop;n>0;n--){const r=e.openElements.items[n];if(e.treeAdapter.getNamespaceURI(r)===le.HTML){e._endTagOutsideForeignContent(t);break}const s=e.treeAdapter.getTagName(r);if(s.toLowerCase()===t.tagName){t.tagName=s,e.openElements.shortenToLength(n);break}}}X.AREA,X.BASE,X.BASEFONT,X.BGSOUND,X.BR,X.COL,X.EMBED,X.FRAME,X.HR,X.IMG,X.INPUT,X.KEYGEN,X.LINK,X.META,X.PARAM,X.SOURCE,X.TRACK,X.WBR;const VL=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,qL=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),Wy={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function Xy(e,t){const n=t6(e),r=ay("type",{handlers:{root:YL,element:GL,text:WL,comment:Qy,doctype:XL,raw:QL},unknown:JL}),s={parser:n?new Py(Wy):Py.getFragmentParser(void 0,Wy),handle(c){r(c,s)},stitches:!1,options:t||{}};r(e,s),io(s,Ir());const a=n?s.parser.document:s.parser.getFragment(),u=nI(a,{file:s.options.file});return s.stitches&&vl(u,"comment",function(c,d,f){const p=c;if(p.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=p.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function Ky(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function YL(e,t){Ky(e.children,t)}function GL(e,t){ZL(e,t),Ky(e.children,t),e6(e,t)}function WL(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:Xe.CHARACTER,chars:e.value,location:Ha(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function XL(e,t){const n={type:Xe.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:Ha(e)};io(t,Ir(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function KL(e,t){t.stitches=!0;const n=n6(e);if("children"in e&&"children"in n){const r=Xy({type:"root",children:e.children},t.options);n.children=r.children}Qy({type:"comment",value:{stitch:n}},t)}function Qy(e,t){const n=e.value,r={type:Xe.COMMENT,data:n,location:Ha(e)};io(t,Ir(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function QL(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,Jy(t,Ir(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(VL,"<$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 JL(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))KL(n,t);else{let r="";throw qL.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 io(e,t){Jy(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=It.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 Jy(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 ZL(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,Ir(e));const r=t.parser.openElements.current;let s="namespaceURI"in r?r.namespaceURI:ls.html;s===ls.html&&n==="svg"&&(s=ls.svg);const a=aI(fe(F({},e),{children:[]}),{space:s===ls.svg?"svg":"html"}),u={type:Xe.START_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in a?a.attrs:[],location:Ha(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function e6(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&mI.includes(n)||t.parser.tokenizer.state===It.PLAINTEXT)return;io(t,gl(e));const r={type:Xe.END_TAG,tagName:n,tagID:no(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:Ha(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===It.RCDATA||t.parser.tokenizer.state===It.RAWTEXT||t.parser.tokenizer.state===It.SCRIPT_DATA)&&(t.parser.tokenizer.state=It.DATA)}function t6(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function Ha(e){const t=Ir(e)||{line:void 0,column:void 0,offset:void 0},n=gl(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 n6(e){return"children"in e?us(fe(F({},e),{children:[]})):us(e)}function Zy(e){return function(t,n){return Xy(t,fe(F({},e),{file:n}))}}const fs=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],eT={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...fs,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...fs],h2:[["className","sr-only"]],img:[...fs,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...fs,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...fs],table:[...fs],ul:[...fs,["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"]},Ci={}.hasOwnProperty;function r6(e,t){let n={type:"root",children:[]};const r={schema:t?F(F({},eT),t):eT,stack:[]},s=tT(r,e);return s&&(Array.isArray(s)?s.length===1?n=s[0]:n.children=s:n=s),n}function tT(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return i6(e,n);case"doctype":return s6(e,n);case"element":return o6(e,n);case"root":return a6(e,n);case"text":return u6(e,n)}}}function i6(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 za(a,t),a}}function s6(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return za(n,t),n}}function o6(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=nT(e,t.children),s=l6(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&&Ci.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:s,children:r};return za(u,t),u}function a6(e,t){const r={type:"root",children:nT(e,t.children)};return za(r,t),r}function u6(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return za(r,t),r}function nT(e,t){const n=[];if(Array.isArray(t)){const r=t;let s=-1;for(;++s<r.length;){const a=tT(e,r[s]);a&&(Array.isArray(a)?n.push(...a):n.push(a))}}return n}function l6(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,s=e.schema.required,a=r&&Ci.call(r,n)?r[n]:void 0,u=r&&Ci.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(Ci.call(c,f)){const p=c[f];let m=rT(e,sT(a,f),f,p);m==null&&(m=rT(e,sT(u,f),f,p)),m!=null&&(d[f]=m)}if(s&&Ci.call(s,n)){const p=s[n];for(f in p)Ci.call(p,f)&&!Ci.call(d,f)&&(d[f]=p[f])}return d}function rT(e,t,n,r){return t?Array.isArray(r)?c6(e,t,n,r):iT(e,t,n,r):void 0}function c6(e,t,n,r){let s=-1;const a=[];for(;++s<r.length;){const u=iT(e,t,n,r[s]);(typeof u=="number"||typeof u=="string")&&a.push(u)}return a}function iT(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&d6(e,n,r)){if(typeof t=="object"&&t.length>1){let s=!1,a=0;for(;++a<t.length;){const u=t[a];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){s=!0;break}}else if(u===r){s=!0;break}}if(!s)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function d6(e,t,n){const r=e.schema.protocols&&Ci.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const s=String(n),a=s.indexOf(":"),u=s.indexOf("?"),c=s.indexOf("#"),d=s.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&&s.slice(0,p.length)===p)return!0}return!1}function za(e,t){const n=K1(t);t.data&&(e.data=us(t.data)),n&&(e.position=n)}function sT(e,t){let n,r=-1;if(e)for(;++r<e.length;){const s=e[r],a=typeof s=="string"?s:s[0];if(a===t)return s;a==="data*"&&(n=s)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function f6(e){return function(t){return r6(t,e)}}const oT=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,children:s})=>{const a=n?t?"_blank":"_self":void 0;return S.jsx("a",fe(F(F({className:G(e,`${z}-link`)},n?{href:n,target:a}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},h6=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=tt();return!e&&!t?null:S.jsx("div",{className:G(n,`${z}-disclaimer`),children:t?S.jsx(JE,{rehypePlugins:[Zy,f6],components:{ul:({children:r})=>S.jsx("ul",{className:G(n,`${z}-ul`),children:r}),ol:({children:r})=>S.jsx("ol",{className:G(n,`${z}-ol`),children:r}),li:({children:r})=>S.jsx("li",{className:G(n,`${z}-li`),children:r}),a:({href:r,title:s,children:a})=>S.jsx(oT,{globalClassName:n,openLinksInNewTab:!0,href:r,title:s,children:a}),img:({src:r,alt:s})=>S.jsx("img",{className:G(n,`${z}-disclaimer-image`),src:r,alt:s}),p:({children:r})=>S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:r}),span:({children:r})=>S.jsx("span",{className:G(n,`${z}-disclaimer-text-span`),children:r})},children:t}):S.jsx("p",{className:G(n,`${z}-disclaimer-text`),children:e})})},yh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{const{connected:s,imageFile:a}=er(),{setImageFile:u}=Gs(),{logger:c,globalClassName:d,searchConfig:f,features:p}=tt(),m=B.useRef(null),b=B.useRef(null),y=!!(p!=null&&p.enableImageUpload),_=(a==null?void 0:a.name)||"",A=!!s||!1,v=A?"connected":"disconnected",w=t||!A,k=()=>a?new Promise((L,q)=>{const ne=new FileReader;ne.readAsDataURL(a),ne.onload=()=>L(ne.result),ne.onerror=de=>q(de)}):Promise.resolve(""),C=L=>Ke(null,null,function*(){var de;if(w)return;const q=10*1024*1024,ne=(de=L.target.files)==null?void 0:de[0];if(ne){if(ne.size>q){alert("File size exceeds the 10MB limit. Please choose a smaller file."),u(null);return}u(ne)}}),H=()=>{u(null),b.current&&(b.current.value="")},Y=L=>Ke(null,null,function*(){var de;L.preventDefault();const q=(((de=m.current)==null?void 0:de.value)||"").trim();let ne="";try{ne=yield k()}catch(V){c==null||c.error("Error converting file to base64:",V),alert("There was an error processing the file. Please try again.");return}q&&(H(),m.current.value="",r(q,ne))});return S.jsxs("div",{className:G(d,e,`cim-${n}-component`,a&&"with-attachments",`${z}-search-bar-wrapper`),children:[a&&S.jsxs("div",{className:G(d,`cim-${n}-component`,`${z}-image-file-preview`),children:[S.jsx("img",{className:G(d,`cim-${n}-component`,`${z}-image-preview`),src:URL.createObjectURL(a),alt:`${_} preview`,loading:"lazy"}),S.jsx("span",{className:G(d,`cim-${n}-component`,`${z}-image-file-name`),title:_,children:_}),S.jsx(k1,{className:G(`cim-${n}-component`,"clear-attachment"),label:"Remove image",onClick:H})]}),S.jsxs("form",{className:G(d,e,`cim-${n}-component`,`${z}-search-bar`),name:`${z}-search-form`,onSubmit:Y,children:[S.jsx("span",{role:"status",className:G(`${z}-connection-status-icon`,v)}),y&&S.jsxs("div",{role:"button",className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-button`),"aria-disabled":w,tabIndex:0,children:[S.jsx("label",{className:G(d,e,`cim-${n}-component`,w&&"disabled",`${z}-image-upload-label`),htmlFor:"image-input","aria-label":"Upload an image",children:S.jsx(UN,{})}),S.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-file-input`),type:"file",ref:b,id:"image-input",accept:".png,.jpg,.jpeg,.avif,.svg,.gif,.tiff,.tif,.webp",name:`${z}-file-input`,disabled:w,onInput:C})]}),S.jsx("input",{className:G(d,e,`cim-${n}-component`,`${z}-search-input`),type:"text",ref:m,placeholder:f==null?void 0:f.placeholder,name:`${z}-user-input`}),S.jsx(qN,{isLoading:w}),S.jsx(jN,{className:e,globalClassName:d,searchConfig:f,componentType:n,isLoading:w})]}),S.jsx(h6,{})]})};function p6(e){return St({attr:{version:"1.1",viewBox:"0 0 17 17"},child:[{tag:"g",attr:{},child:[]},{tag:"path",attr:{d:"M17 16v1h-17v-1h17zM13.354 8.854l-0.707-0.707-3.646 3.646v-11.793h-1v11.794l-3.647-3.648-0.708 0.708 4.854 4.853 4.854-4.853z"},child:[]}]})(e)}function m6(e){return St({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 aT=B.createContext({isOpen:!1}),Th=B.createContext(null),uT=B.createContext(null),so=()=>{var n,r;const e=B.useContext(Th),t=B.useContext(uT);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},lT=({onClearChat:e,componentType:t})=>{const n=so(),r=()=>{e(),n()};return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[S.jsx(m6,{}),"Clear chat"]})};function g6(e){return e==null?[]:Array.isArray(e)?e:[e]}var E6=(e,...t)=>e.concat(t),y6=(e,...t)=>e.filter(n=>!t.includes(n)),T6=e=>Array.from(new Set(e));function cT(e,t,n={}){const{step:r=1,loop:s=!0}=n,a=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:a<0?s?c:0:a>=u?s?0:t>u?u:t:a}function b6(e,t,n={}){const{step:r=1,loop:s=!0}=n;return cT(e,t,{step:-r,loop:s})}var _6=e=>Array.isArray(e),dT=e=>e!=null&&typeof e=="object",S6=e=>dT(e)&&!_6(e),Ul=e=>typeof e=="string",oo=e=>typeof e=="function",x6=e=>e==null,w6=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),A6=e=>Object.prototype.toString.call(e),fT=Function.prototype.toString,C6=fT.call(Object),v6=e=>{if(!dT(e)||A6(e)!="[object Object]"||P6(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=w6(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&fT.call(n)==C6},N6=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,k6=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,P6=e=>N6(e)||k6(e),O6=e=>e(),I6=()=>{},bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function R6(e,t=0){let n=0,r=null;return((...s)=>{const a=Date.now(),u=a-n;u>=t?(r&&(clearTimeout(r),r=null),e(...s),n=a):r||(r=setTimeout(()=>{e(...s),n=Date.now(),r=null},t-u))})}var{min:L6,max:D6}=Math,M6=e=>Number.isNaN(e),F6=e=>M6(e)?0:e,hT=(e,t,n)=>L6(D6(F6(e),t),n);function _h(e){if(!v6(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const s=e[r];s!==void 0&&(n[r]=_h(s))}return n}function Sh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function B6(e,t){if(e==null)throw new Error(t())}function U6(e,t,n){let r=[];for(const s of t)e[s]==null&&r.push(s);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var H6=Object.defineProperty,z6=(e,t,n)=>t in e?H6(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,xh=(e,t,n)=>z6(e,typeof t!="symbol"?t+"":t,n),pT=()=>{},Hl=e=>typeof e=="object"&&e!==null,ao=e=>e?"":void 0,mT=e=>e?"true":void 0,j6=1,$6=9,V6=11,Xt=e=>Hl(e)&&e.nodeType===j6&&typeof e.nodeName=="string",zl=e=>Hl(e)&&e.nodeType===$6,q6=e=>Hl(e)&&e===e.window,gT=e=>Xt(e)?e.localName||"":"#document";function Y6(e){return["html","body","#document"].includes(gT(e))}var G6=e=>Hl(e)&&e.nodeType!==void 0,hs=e=>G6(e)&&e.nodeType===V6&&"host"in e,W6=e=>Xt(e)&&e.localName==="input",X6=e=>Xt(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function ja(e){if(!e)return!1;const t=e.getRootNode();return co(t)===e}var K6=/(textarea|select)/;function Q6(e){if(e==null||!Xt(e))return!1;try{return W6(e)&&e.selectionStart!=null||K6.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function uo(e,t){var r;if(!e||!t||!Xt(e)||!Xt(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&hs(n)){let s=t;for(;s;){if(e===s)return!0;s=s.parentNode||s.host}}return!1}function Dr(e){var t;return zl(e)?e:q6(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function J6(e){return Dr(e).documentElement}function lo(e){var t,n,r;return hs(e)?lo(e.host):zl(e)?(t=e.defaultView)!=null?t:window:Xt(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function co(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 Z6(e){if(gT(e)==="html")return e;const t=e.assignedSlot||e.parentNode||hs(e)&&e.host||J6(e);return hs(t)?t.host:t}function wh(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),zl(t)||hs(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var Ah=new WeakMap;function fo(e){return Ah.has(e)||Ah.set(e,lo(e).getComputedStyle(e)),Ah.get(e)}var Ch=new Set(["menu","listbox","dialog","grid","tree","region"]),e4=e=>Ch.has(e),ET=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function yT(e,t){const n=new Set,r=wh(e),s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=ET(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const p=r.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";if(m&&e4(m)&&!b&&(p===t||p.contains(t)||s(p)))return!0}}}return!1};return s(e)}function TT(e,t){const n=wh(e),r=new Set,s=a=>{const u=a.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=ET(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const p=n.getElementById(f);if(p){const m=p.getAttribute("role"),b=p.getAttribute("aria-modal")==="true";m&&Ch.has(m)&&!b&&(t(p),s(p))}}}};s(e)}function t4(e){const t=new Set;return TT(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function n4(e){const t=e.getAttribute("role");return!!(t&&Ch.has(t))}function r4(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function i4(e){var t;return r4(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function s4(e){if(!e.id)return!1;const t=wh(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&n4(e))}var vh=()=>typeof document!="undefined";function o4(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Nh=e=>vh()&&e.test(o4()),a4=e=>vh()&&e.test(navigator.vendor),bT=()=>vh()&&!!navigator.maxTouchPoints,u4=()=>Nh(/^iPhone/i),l4=()=>Nh(/^iPad/i)||kh()&&navigator.maxTouchPoints>1,jl=()=>u4()||l4(),c4=()=>kh()||jl(),kh=()=>Nh(/^Mac/i),d4=()=>c4()&&a4(/apple/i);function f4(e){var t,n,r,s;return(s=(t=e.composedPath)==null?void 0:t.call(e))!=null?s:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function gr(e){var n;const t=f4(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var _T=e=>e.button===0,h4=e=>e.button===2||kh()&&e.ctrlKey&&e.button===0,p4=e=>"touches"in e&&e.touches.length>0,m4={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},ST={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function g4(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let s=e.key;return s=(u=m4[s])!=null?u:s,n==="rtl"&&r==="horizontal"&&s in ST&&(s=ST[s]),s}function xT(e,t="client"){const n=p4(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var Kt=(e,t,n,r)=>{const s=typeof e=="function"?e():e;return s==null||s.addEventListener(t,n,r),()=>{s==null||s.removeEventListener(t,n,r)}},wT=e=>Xt(e)&&e.tagName==="IFRAME",E4=/^(audio|video|details)$/;function AT(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var y4=e=>!Number.isNaN(AT(e)),T4=e=>AT(e)<0;function b4(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 CT(e,t,n){const r=[...e],s=[...e],a=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<s.length;){const d=s[c++];if(!d||a.has(d))continue;a.add(d);const f=b4(d,t);if(f){const p=Array.from(f.querySelectorAll($l)).filter(n),m=u.get(d);if(m!==void 0){const b=m+1;r.splice(b,0,...p),p.forEach((y,_)=>{u.set(y,b+_)});for(let y=b+p.length;y<r.length;y++)u.set(r[y],y)}else{const b=r.length;r.push(...p),p.forEach((y,_)=>{u.set(y,b+_)})}s.push(...p)}}return r}var $l="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",vT=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));(n==!0||n=="if-empty"&&s.length===0)&&Xt(e)&&Mr(e)&&s.unshift(e);const u=[];for(const c of s)if(Mr(c)){if(wT(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...vT(d,{getShadowRoot:r}));continue}u.push(c)}return r?CT(u,r,Mr):u};function Mr(e){return!Xt(e)||e.closest("[inert]")?!1:e.matches($l)&&X6(e)}function ho(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,s=Array.from(e.querySelectorAll($l));n&&ps(e)&&s.unshift(e);const a=[];for(const u of s)if(ps(u)){if(wT(u)&&u.contentDocument){const c=u.contentDocument.body;a.push(...ho(c,{getShadowRoot:r}));continue}a.push(u)}if(r){const u=CT(a,r,ps);return!u.length&&n?s:u}return!a.length&&n?s:a}function ps(e){return Xt(e)&&e.tabIndex>0?!0:Mr(e)&&!T4(e)}function _4(e,t={}){const n=ho(e,t),r=n[0]||null,s=n[n.length-1]||null;return[r,s]}function S4(e,t={}){const{current:n,getShadowRoot:r}=t,s=ho(e,{getShadowRoot:r}),a=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:co(a);if(!u)return null;const c=s.indexOf(u);return s[c+1]||null}function $a(e){return e.tabIndex<0&&(E4.test(e.localName)||Q6(e))&&!y4(e)?0:e.tabIndex}function NT(e){const{root:t,getInitialEl:n,filter:r,enabled:s=!0}=e;if(!s)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=ho(t);a=r?u.filter(r)[0]:u[0]}return a||t||void 0}var x4=class L2{constructor(){xh(this,"id",null),xh(this,"fn_cleanup"),xh(this,"cleanup",()=>{this.cancel()})}static create(){return new L2}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 zt(e){const t=x4.create();return t.request(e),t.cleanup}function kT(e){const t=new Set;function n(r){const s=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(s))}return n(()=>n(e)),function(){t.forEach(s=>s())}}function Ph(e){const t=Z6(e);return Y6(t)?Dr(t).body:Xt(t)&&C4(t)?t:Ph(t)}var w4=/auto|scroll|overlay|hidden|clip/,A4=new Set(["inline","contents"]);function C4(e){const t=lo(e),{overflow:n,overflowX:r,overflowY:s,display:a}=t.getComputedStyle(e);return w4.test(n+s+r)&&!A4.has(a)}var po="default",Oh="",Vl=new WeakMap;function v4(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,s=r.documentElement;return jl()?(po==="default"&&(Oh=s.style.webkitUserSelect,s.style.webkitUserSelect="none"),po="disabled"):t&&(Vl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>N4({target:t,doc:r})}function N4(e={}){const{target:t,doc:n}=e,s=(n!=null?n:document).documentElement;if(jl()){if(po!=="disabled")return;po="restoring",setTimeout(()=>{kT(()=>{po==="restoring"&&(s.style.webkitUserSelect==="none"&&(s.style.webkitUserSelect=Oh||""),Oh="",po="default")})},300)}else if(t&&Vl.has(t)){const a=Vl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=a!=null?a:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Vl.delete(t)}}function k4(e={}){const u=e,{defer:t,target:n}=u,r=cn(u,["defer","target"]),s=t?zt:c=>c(),a=[];return a.push(s(()=>{const c=typeof n=="function"?n():n;a.push(v4(fe(F({},r),{target:c})))})),()=>{a.forEach(c=>c==null?void 0:c())}}function P4(e,t){const{onPointerMove:n,onPointerUp:r}=t,s=c=>{const d=xT(c),f=Math.sqrt(Mu(d.x,2)+Mu(d.y,2)),p=c.pointerType==="touch"?10:5;if(!(f<p)){if(c.pointerType==="mouse"&&c.button===0){a(c);return}n({point:d,event:c})}},a=c=>{const d=xT(c);r({point:d,event:c})},u=[Kt(e,"pointermove",s,!1),Kt(e,"pointerup",a,!1),Kt(e,"pointercancel",a,!1),Kt(e,"contextmenu",a,!1),k4({doc:e})];return()=>{u.forEach(c=>c())}}function O4(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:s,getShadowRoot:a}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let p=null;const[m,b]=_4(e,{includeContainer:!0,getShadowRoot:a}),y=S4(c,{current:n,getShadowRoot:a}),_=!m&&!b;f.shiftKey&&ja(y)?(s==null||s(),p=b):f.shiftKey&&(ja(m)||_)?p=n:!f.shiftKey&&ja(n)?(s==null||s(),p=m):!f.shiftKey&&(ja(b)||_)&&(p=y),p&&(f.preventDefault(),typeof r=="function"?r(p):p.focus())}return Kt(u,"keydown",d,!0)}function I4(e,t){const c=t,{defer:n,triggerElement:r}=c,s=cn(c,["defer","triggerElement"]),a=n?zt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(O4(d,F({triggerElement:f},s)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function R4(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function ql(e,t){if(!e)return pT;const n=Object.keys(t).reduce((r,s)=>(r[s]=e.style.getPropertyValue(s),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function L4(e,t,n){if(!e)return pT;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 D4(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 M4(e,t){const{timeout:n,rootNode:r}=t,s=lo(r),a=Dr(r),u=new s.AbortController;return D4(new Promise(c=>{const d=e();if(d){c(d);return}const f=new s.MutationObserver(()=>{const p=e();p&&p.isConnected&&(f.disconnect(),c(p))});f.observe(a.body,{childList:!0,subtree:!0})}),u,n)}var F4=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),B4=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,PT=e=>{const t={};let n;for(;n=B4.exec(e);)t[n[1]]=n[2];return t},U4=(e,t)=>{if(Ul(e)){if(Ul(t))return`${e};${t}`;e=PT(e)}else Ul(t)&&(t=PT(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function jt(...e){let t={};for(let n of e){if(!n)continue;for(let s in t){if(s.startsWith("on")&&typeof t[s]=="function"&&typeof n[s]=="function"){t[s]=bh(n[s],t[s]);continue}if(s==="className"||s==="class"){t[s]=F4(t[s],n[s]);continue}if(s==="style"){t[s]=U4(t[s],n[s]);continue}t[s]=n[s]!==void 0?n[s]:t[s]}for(let s in n)t[s]===void 0&&(t[s]=n[s]);const r=Object.getOwnPropertySymbols(n);for(let s of r)t[s]=n[s]}return t}function hU(e){return e}var mo=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(mo||{}),Ih="__init__";function H4(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Dr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},s=()=>co(t()),a=u=>t().getElementById(u);return fe(F({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:s,isActiveElement:ja,getById:a})}function z4(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var go=()=>e=>Array.from(new Set(e)),OT=typeof globalThis.document!="undefined"?B.useLayoutEffect:B.useEffect;function Yl(e){var m,b;const t=(m=e().value)!=null?m:e().defaultValue,n=(b=e().isEqual)!=null?b:Object.is,[r]=B.useState(t),[s,a]=B.useState(r),u=e().value!==void 0,c=B.useRef(s);c.current=u?e().value:s;const d=B.useRef(c.current);OT(()=>{d.current=c.current},[s,e().value]);const f=y=>{var v,w;const _=d.current,A=oo(y)?y(_):y;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:A,prev:_}),u||a(A),n(A,_)||(w=(v=e()).onChange)==null||w.call(v,A,_)};function p(){return u?e().value:s}return{initial:r,ref:c,get:p,set(y){(e().sync?Ws.flushSync:O6)(()=>f(y))},invoke(y,_){var A,v;(v=(A=e()).onChange)==null||v.call(A,y,_)},hash(y){var _,A,v;return(v=(A=(_=e()).hash)==null?void 0:A.call(_,y))!=null?v:String(y)}}}Yl.cleanup=e=>{B.useEffect(()=>e,[])},Yl.ref=e=>{const t=B.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function j4(e){const t=B.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var $4=(e,t)=>{const n=B.useRef(!1),r=B.useRef(!1);B.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(s=>typeof s=="function"?s():s)]),B.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function Gl(e,t={}){var se,pe,ve,re,oe,xe;const n=B.useMemo(()=>{const{id:ae,ids:Q,getRootNode:ie}=t;return H4({id:ae,ids:Q,getRootNode:ie})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},s=(pe=(se=e.props)==null?void 0:se.call(e,{props:_h(t),scope:n}))!=null?pe:t,a=V4(s),u=(ve=e.context)==null?void 0:ve.call(e,{prop:a,bindable:Yl,scope:n,flush:RT,getContext(){return d},getComputed(){return Y},getRefs(){return A},getEvent(){return y()}}),c=IT(u),d={get(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].ref.current},set(ae,Q){var ie;(ie=c.current)==null||ie[ae].set(Q)},initial(ae){var Q;return(Q=c.current)==null?void 0:Q[ae].initial},hash(ae){var ie,N;const Q=(ie=c.current)==null?void 0:ie[ae].get();return(N=c.current)==null?void 0:N[ae].hash(Q)}},f=B.useRef(new Map),p=B.useRef(null),m=B.useRef(null),b=B.useRef({type:""}),y=()=>fe(F({},b.current),{current(){return b.current},previous(){return m.current}}),_=()=>fe(F({},L),{matches(...ae){return ae.includes(L.ref.current)},hasTag(ae){var Q,ie;return!!((ie=(Q=e.states[L.ref.current])==null?void 0:Q.tags)!=null&&ie.includes(ae))}}),A=j4((oe=(re=e.refs)==null?void 0:re.call(e,{prop:a,context:d}))!=null?oe:{}),v=()=>({state:_(),context:d,event:y(),prop:a,send:V,action:w,guard:k,track:$4,refs:A,computed:Y,flush:RT,scope:n,choose:H}),w=ae=>{const Q=oo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(N=>{var ee,I;const D=(I=(ee=e.implementations)==null?void 0:ee.actions)==null?void 0:I[N];return D||Sh(`[zag-js] No implementation found for action "${JSON.stringify(N)}"`),D});for(const N of ie)N==null||N(v())},k=ae=>{var Q,ie;return oo(ae)?ae(v()):(ie=(Q=e.implementations)==null?void 0:Q.guards)==null?void 0:ie[ae](v())},C=ae=>{const Q=oo(ae)?ae(v()):ae;if(!Q)return;const ie=Q.map(D=>{var I,_e;const ee=(_e=(I=e.implementations)==null?void 0:I.effects)==null?void 0:_e[D];return ee||Sh(`[zag-js] No implementation found for effect "${JSON.stringify(D)}"`),ee}),N=[];for(const D of ie){const ee=D==null?void 0:D(v());ee&&N.push(ee)}return()=>N.forEach(D=>D==null?void 0:D())},H=ae=>g6(ae).find(Q=>{let ie=!Q.guard;return Ul(Q.guard)?ie=!!k(Q.guard):oo(Q.guard)&&(ie=Q.guard(v())),ie}),Y=ae=>{B6(e.computed,()=>"[zag-js] No computed object found on machine");const Q=e.computed[ae];return Q({context:d,event:y(),prop:a,refs:A,scope:n,computed:Y})},L=Yl(()=>({defaultValue:e.initialState({prop:a}),onChange(ae,Q){var N,D,ee,I;if(Q){const _e=f.current.get(Q);_e==null||_e(),f.current.delete(Q)}Q&&w((N=e.states[Q])==null?void 0:N.exit),w((D=p.current)==null?void 0:D.actions);const ie=C((ee=e.states[ae])==null?void 0:ee.effects);if(ie&&f.current.set(ae,ie),Q===Ih){w(e.entry);const _e=C(e.effects);_e&&f.current.set(Ih,_e)}w((I=e.states[ae])==null?void 0:I.entry)}})),q=B.useRef(void 0),ne=B.useRef(mo.NotStarted);OT(()=>{queueMicrotask(()=>{var D;const ie=ne.current===mo.Started;ne.current=mo.Started,r(ie?"rehydrating...":"initializing...");const N=(D=q.current)!=null?D:L.initial;L.invoke(N,ie?L.get():Ih)});const ae=f.current,Q=L.ref.current;return()=>{r("unmounting..."),q.current=Q,ne.current=mo.Stopped,ae.forEach(ie=>ie==null?void 0:ie()),f.current=new Map,p.current=null,queueMicrotask(()=>{w(e.exit)})}},[]);const de=()=>"ref"in L?L.ref.current:L.get(),V=ae=>{queueMicrotask(()=>{var I,_e,Be,ye,Le;if(ne.current!==mo.Started)return;m.current=b.current,b.current=ae;let Q=de();const ie=(Be=(I=e.states[Q].on)==null?void 0:I[ae.type])!=null?Be:(_e=e.on)==null?void 0:_e[ae.type],N=H(ie);if(!N)return;p.current=N;const D=(ye=N.target)!=null?ye:Q;r("transition",ae.type,N.target||Q,`(${N.actions})`);const ee=D!==Q;ee?Ws.flushSync(()=>L.set(D)):N.reenter&&!ee?L.invoke(Q,Q):w((Le=N.actions)!=null?Le:[])})};return(xe=e.watch)==null||xe.call(e,v()),{state:_(),send:V,context:d,prop:a,scope:n,refs:A,computed:Y,event:y(),getStatus:()=>ne.current}}function IT(e){const t=B.useRef(e);return t.current=e,t}function V4(e){const t=IT(e);return function(r){return t.current[r]}}function RT(e){queueMicrotask(()=>{Ws.flushSync(()=>e())})}var Rh=z4(e=>e);function Wl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const s=r(t);typeof s=="function"&&n.push(s)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function q4(e){var r,s;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=(s=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:s.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Lh=e=>{const t=B.memo(B.forwardRef((n,r)=>{const f=n,{asChild:s,children:a}=f,u=cn(f,["asChild","children"]);if(!s)return B.createElement(e,fe(F({},u),{ref:r}),a);if(!B.isValidElement(a))return null;const c=B.Children.only(a),d=q4(c);return B.cloneElement(c,fe(F({},jt(u,c.props)),{ref:r?Wl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Tn=(()=>{const e=new Map;return new Proxy(Lh,{apply(t,n,r){return Lh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Lh(r)),e.get(r)}})})();function Y4(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function ms(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:s="Provider",errorMessage:a,defaultValue:u}=e,c=B.createContext(u);c.displayName=t;function d(){var p;const f=B.useContext(c);if(!f&&n){const m=new Error(a!=null?a:Y4(r,s));throw m.name="ContextError",(p=Error.captureStackTrace)==null||p.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[G4,Dh]=ms({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[LT,Va]=ms({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),DT=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=jt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,fe(F({},s),{ref:Wl(r.ref,t)}))});DT.displayName="PopoverContent";const MT=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=jt(n.getPositionerProps(),e);return r.unmounted?null:S.jsx(Tn.div,fe(F({},s),{ref:t}))});MT.displayName="PopoverPositioner";const qa=()=>(e,t)=>t.reduce((n,r)=>{const[s,a]=n,u=r;return a[u]!==void 0&&(s[u]=a[u]),delete a[u],[s,a]},[{},F({},e)]),FT=e=>qa()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function W4(e,t){const{state:n,send:r,context:s}=e,a=n.matches("mounted","unmountSuspended");return{skip:!s.get("initial"),present:a,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var X4={props({props:e}){return fe(F({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",fo(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const s=r("present");if(s)return n({type:"MOUNT",src:"presence.changed"});const a=t.get("node");if(!s&&(a==null?void 0:a.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});zt(()=>{var c,d;const u=Xl(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})=>{zt(()=>{e.set("prevAnimationName",Xl(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const s=t.get("node");if(!s)return;const a=d=>{var p,m,b;((b=(m=(p=d.composedPath)==null?void 0:p.call(d))==null?void 0:m[0])!=null?b:d.target)===s&&e.set("prevAnimationName",Xl(t.get("styles")))},u=d=>{const f=Xl(t.get("styles"));gr(d)===s&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};s.addEventListener("animationstart",a),s.addEventListener("animationcancel",u),s.addEventListener("animationend",u);const c=ql(s,{animationFillMode:"forwards"});return()=>{s.removeEventListener("animationstart",a),s.removeEventListener("animationcancel",u),s.removeEventListener("animationend",u),kT(()=>c())}}}}};function Xl(e){return(e==null?void 0:e.animationName)||"none"}go()(["onExitComplete","present","immediate"]);function K4(e,t={}){const{sync:n=!1}=t,r=Q4(e);return B.useCallback((...s)=>{var a;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...s)}):(a=r.current)==null?void 0:a.call(r,...s)},[n,r])}function Q4(e){const t=B.useRef(e);return t.current=e,t}const Mh=(e={})=>{const b=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:s=!1}=b,a=cn(b,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=B.useRef(!1),c=fe(F({},a),{present:r,onExitComplete:K4(e.onExitComplete)}),d=Gl(X4,c),f=W4(d);f.present&&(u.current=!0);const p=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&s?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:p}};var gs=(e,t=[])=>({parts:(...n)=>{if(J4(t))return gs(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>gs(e,[...t,...n]),omit:(...n)=>gs(e,t.filter(r=>!n.includes(r))),rename:n=>gs(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(),J4=e=>e.length===0;const Z4=["top","right","bottom","left"],vi=Math.min,ii=Math.max,Kl=Math.round,Ql=Math.floor,Fr=e=>({x:e,y:e}),eD={left:"right",right:"left",bottom:"top",top:"bottom"};function BT(e,t,n){return ii(e,vi(t,n))}function si(e,t){return typeof e=="function"?e(t):e}function Ni(e){return e.split("-")[0]}function yo(e){return e.split("-")[1]}function Fh(e){return e==="x"?"y":"x"}function Bh(e){return e==="y"?"height":"width"}function Br(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function Uh(e){return Fh(Br(e))}function tD(e,t,n){n===void 0&&(n=!1);const r=yo(e),s=Uh(e),a=Bh(s);let u=s==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[a]>t.floating[a]&&(u=Jl(u)),[u,Jl(u)]}function nD(e){const t=Jl(e);return[Hh(e),t,Hh(t)]}function Hh(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const UT=["left","right"],HT=["right","left"],rD=["top","bottom"],iD=["bottom","top"];function sD(e,t,n){switch(e){case"top":case"bottom":return n?t?HT:UT:t?UT:HT;case"left":case"right":return t?rD:iD;default:return[]}}function oD(e,t,n,r){const s=yo(e);let a=sD(Ni(e),n==="start",r);return s&&(a=a.map(u=>u+"-"+s),t&&(a=a.concat(a.map(Hh)))),a}function Jl(e){const t=Ni(e);return eD[t]+e.slice(t.length)}function aD(e){var t,n,r,s;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(s=e.left)!=null?s:0}}function zT(e){return typeof e!="number"?aD(e):{top:e,right:e,bottom:e,left:e}}function Zl(e){const{x:t,y:n,width:r,height:s}=e;return{width:r,height:s,top:n,left:t,right:t+r,bottom:n+s,x:t,y:n}}function jT(e,t,n){let{reference:r,floating:s}=e;const a=Br(t),u=Uh(t),c=Bh(u),d=Ni(t),f=a==="y",p=r.x+r.width/2-s.width/2,m=r.y+r.height/2-s.height/2,b=r[c]/2-s[c]/2;let y;switch(d){case"top":y={x:p,y:r.y-s.height};break;case"bottom":y={x:p,y:r.y+r.height};break;case"right":y={x:r.x+r.width,y:m};break;case"left":y={x:r.x-s.width,y:m};break;default:y={x:r.x,y:r.y}}const _=yo(t);return _&&(y[u]+=b*(_==="end"?1:-1)*(n&&f?-1:1)),y}function uD(e,t){return Ke(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:s,platform:a,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:p="viewport",elementContext:m="floating",altBoundary:b=!1,padding:y=0}=si(t,e),_=zT(y),v=c[b?m==="floating"?"reference":"floating":m],w=Zl(yield a.getClippingRect({element:(n=yield a.isElement==null?void 0:a.isElement(v))==null||n?v:v.contextElement||(yield a.getDocumentElement==null?void 0:a.getDocumentElement(c.floating)),boundary:f,rootBoundary:p,strategy:d})),k=m==="floating"?{x:r,y:s,width:u.floating.width,height:u.floating.height}:u.reference,C=yield a.getOffsetParent==null?void 0:a.getOffsetParent(c.floating),H=(yield a.isElement==null?void 0:a.isElement(C))&&(yield a.getScale==null?void 0:a.getScale(C))||{x:1,y:1},Y=Zl(a.convertOffsetParentRelativeRectToViewportRelativeRect?yield a.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:k,offsetParent:C,strategy:d}):k);return{top:(w.top-Y.top+_.top)/H.y,bottom:(Y.bottom-w.bottom+_.bottom)/H.y,left:(w.left-Y.left+_.left)/H.x,right:(Y.right-w.right+_.right)/H.x}})}const lD=50,cD=(e,t,n)=>Ke(null,null,function*(){const{placement:r="bottom",strategy:s="absolute",middleware:a=[],platform:u}=n,c=u.detectOverflow?u:fe(F({},u),{detectOverflow:uD}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:s}),{x:p,y:m}=jT(f,r,d),b=r,y=0;const _={};for(let A=0;A<a.length;A++){const v=a[A];if(!v)continue;const{name:w,fn:k}=v,{x:C,y:H,data:Y,reset:L}=yield k({x:p,y:m,initialPlacement:r,placement:b,strategy:s,middlewareData:_,rects:f,platform:c,elements:{reference:e,floating:t}});p=C!=null?C:p,m=H!=null?H:m,_[w]=F(F({},_[w]),Y),L&&y<lD&&(y++,typeof L=="object"&&(L.placement&&(b=L.placement),L.rects&&(f=L.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:s}):L.rects),{x:p,y:m}=jT(f,b,d)),A=-1)}return{x:p,y:m,placement:b,strategy:s,middlewareData:_}}),dD=e=>({name:"arrow",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:p,padding:m=0}=si(e,n)||{};if(p==null)return{};const b=zT(m),y={x:r,y:s},_=Uh(a),A=Bh(_),v=yield c.getDimensions(p),w=_==="y",k=w?"top":"left",C=w?"bottom":"right",H=w?"clientHeight":"clientWidth",Y=u.reference[A]+u.reference[_]-y[_]-u.floating[A],L=y[_]-u.reference[_],q=yield c.getOffsetParent==null?void 0:c.getOffsetParent(p);let ne=q?q[H]:0;(!ne||!(yield c.isElement==null?void 0:c.isElement(q)))&&(ne=d.floating[H]||u.floating[A]);const de=Y/2-L/2,V=ne/2-v[A]/2-1,se=vi(b[k],V),pe=vi(b[C],V),ve=ne-v[A]-pe,re=ne/2-v[A]/2+de,oe=BT(se,re,ve),xe=!f.arrow&&yo(a)!=null&&re!==oe&&u.reference[A]/2-(re<se?se:pe)-v[A]/2<0,ae=xe?re<se?re-se:re-ve:0;return{[_]:y[_]+ae,data:F({[_]:oe,centerOffset:re-oe-ae},xe&&{alignmentOffset:ae}),reset:xe}})}}),fD=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{placement:a,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:p}=n,oe=si(e,n),{mainAxis:m=!0,crossAxis:b=!0,fallbackPlacements:y,fallbackStrategy:_="bestFit",fallbackAxisSideDirection:A="none",flipAlignment:v=!0}=oe,w=cn(oe,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const k=Ni(a),C=Br(d),H=Ni(d)===d,Y=yield f.isRTL==null?void 0:f.isRTL(p.floating),L=y||(H||!v?[Jl(d)]:nD(d)),q=A!=="none";!y&&q&&L.push(...oD(d,v,A,Y));const ne=[d,...L],de=yield f.detectOverflow(n,w),V=[];let se=((s=u.flip)==null?void 0:s.overflows)||[];if(m&&V.push(de[k]),b){const xe=tD(a,c,Y);V.push(de[xe[0]],de[xe[1]])}if(se=[...se,{placement:a,overflows:V}],!V.every(xe=>xe<=0)){var pe,ve;const xe=(((pe=u.flip)==null?void 0:pe.index)||0)+1,ae=ne[xe];if(ae&&(!(b==="alignment"?C!==Br(ae):!1)||se.every(N=>Br(N.placement)===C?N.overflows[0]>0:!0)))return{data:{index:xe,overflows:se},reset:{placement:ae}};let Q=(ve=se.filter(ie=>ie.overflows[0]<=0).sort((ie,N)=>ie.overflows[1]-N.overflows[1])[0])==null?void 0:ve.placement;if(!Q)switch(_){case"bestFit":{var re;const ie=(re=se.filter(N=>{if(q){const D=Br(N.placement);return D===C||D==="y"}return!0}).map(N=>[N.placement,N.overflows.filter(D=>D>0).reduce((D,ee)=>D+ee,0)]).sort((N,D)=>N[1]-D[1])[0])==null?void 0:re[0];ie&&(Q=ie);break}case"initialPlacement":Q=d;break}if(a!==Q)return{reset:{placement:Q}}}return{}})}}};function $T(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function VT(e){return Z4.some(t=>e[t]>=0)}const hD=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ke(this,null,function*(){const{rects:r,platform:s}=n,c=si(e,n),{strategy:a="referenceHidden"}=c,u=cn(c,["strategy"]);switch(a){case"referenceHidden":{const d=yield s.detectOverflow(n,fe(F({},u),{elementContext:"reference"})),f=$T(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:VT(f)}}}case"escaped":{const d=yield s.detectOverflow(n,fe(F({},u),{altBoundary:!0})),f=$T(d,r.floating);return{data:{escapedOffsets:f,escaped:VT(f)}}}default:return{}}})}}},qT=new Set(["left","top"]);function pD(e,t){return Ke(this,null,function*(){const{placement:n,platform:r,elements:s}=e,a=yield r.isRTL==null?void 0:r.isRTL(s.floating),u=Ni(n),c=yo(n),d=Br(n)==="y",f=qT.has(u)?-1:1,p=a&&d?-1:1,m=si(t,e);let{mainAxis:b,crossAxis:y,alignmentAxis:_}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof _=="number"&&(y=c==="end"?_*-1:_),d?{x:y*p,y:b*f}:{x:b*f,y:y*p}})}const mD=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ke(this,null,function*(){var r,s;const{x:a,y:u,placement:c,middlewareData:d}=n,f=yield pD(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(s=d.arrow)!=null&&s.alignmentOffset?{}:{x:a+f.x,y:u+f.y,data:fe(F({},f),{placement:c})}})}}},gD=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ke(this,null,function*(){const{x:r,y:s,placement:a,platform:u}=n,C=si(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:H=>{let{x:Y,y:L}=H;return{x:Y,y:L}}}}=C,p=cn(C,["mainAxis","crossAxis","limiter"]),m={x:r,y:s},b=yield u.detectOverflow(n,p),y=Br(a),_=Fh(y);let A=m[_],v=m[y];const w=(H,Y)=>BT(Y+b[H==="y"?"top":"left"],Y,Y-b[H==="y"?"bottom":"right"]);c&&(A=w(_,A)),d&&(v=w(y,v));const k=f.fn(fe(F({},n),{[_]:A,[y]:v}));return fe(F({},k),{data:{x:k.x-r,y:k.y-s,enabled:{[_]:c,[y]:d}}})})}}},ED=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:s,y:a,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:p=!0,crossAxis:m=!0}=si(e,t),b={x:s,y:a},y=Br(u),_=Fh(y);let A=b[_],v=b[y];const w=si(f,t),k=typeof w=="number"?{mainAxis:w,crossAxis:0}:{mainAxis:(n=w.mainAxis)!=null?n:0,crossAxis:(r=w.crossAxis)!=null?r:0};if(p){const Y=_==="y"?"height":"width",L=c.reference[_]-c.floating[Y]+k.mainAxis,q=c.reference[_]+c.reference[Y]-k.mainAxis;A<L?A=L:A>q&&(A=q)}if(m){var C,H;const Y=_==="y"?"width":"height",L=qT.has(Ni(u)),q=c.reference[y]-c.floating[Y]+(L&&((C=d.offset)==null?void 0:C[y])||0)+(L?0:k.crossAxis),ne=c.reference[y]+c.reference[Y]+(L?0:((H=d.offset)==null?void 0:H[y])||0)-(L?k.crossAxis:0);v<q?v=q:v>ne&&(v=ne)}return{[_]:A,[y]:v}}}},yD=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ke(this,null,function*(){const{placement:r,rects:s,platform:a,elements:u}=n,V=si(e,n),{apply:c=()=>{}}=V,d=cn(V,["apply"]),f=yield a.detectOverflow(n,d),p=Ni(r),m=yo(r),b=Br(r)==="y",{width:y,height:_}=s.floating;let A,v;p==="top"||p==="bottom"?(A=p,v=m===((yield a.isRTL==null?void 0:a.isRTL(u.floating))?"start":"end")?"left":"right"):(v=p,A=m==="end"?"top":"bottom");const w=_-f.top-f.bottom,k=y-f.left-f.right,C=vi(_-f[A],w),H=vi(y-f[v],k),Y=n.middlewareData.shift,L=!Y;let q=C,ne=H;Y!=null&&Y.enabled.x&&(ne=k),Y!=null&&Y.enabled.y&&(q=w),L&&!m&&(b?ne=y-2*ii(f.left,f.right):q=_-2*ii(f.top,f.bottom)),yield c(fe(F({},n),{availableWidth:ne,availableHeight:q}));const de=yield a.getDimensions(u.floating);return y!==de.width||_!==de.height?{reset:{rects:!0}}:{}})}}};function ec(){return typeof window!="undefined"}function To(e){return YT(e)?(e.nodeName||"").toLowerCase():"#document"}function qn(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function Ur(e){var t;return(t=(YT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function YT(e){return ec()?e instanceof Node||e instanceof qn(e).Node:!1}function Er(e){return ec()?e instanceof Element||e instanceof qn(e).Element:!1}function Hr(e){return ec()?e instanceof HTMLElement||e instanceof qn(e).HTMLElement:!1}function GT(e){return!ec()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof qn(e).ShadowRoot}function Ya(e){const{overflow:t,overflowX:n,overflowY:r,display:s}=yr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&s!=="inline"&&s!=="contents"}function TD(e){return/^(table|td|th)$/.test(To(e))}function tc(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const bD=/transform|translate|scale|rotate|perspective|filter/,_D=/paint|layout|strict|content/,Es=e=>!!e&&e!=="none";let zh;function jh(e){const t=Er(e)?yr(e):e;return Es(t.transform)||Es(t.translate)||Es(t.scale)||Es(t.rotate)||Es(t.perspective)||!$h()&&(Es(t.backdropFilter)||Es(t.filter))||bD.test(t.willChange||"")||_D.test(t.contain||"")}function SD(e){let t=ki(e);for(;Hr(t)&&!bo(t);){if(jh(t))return t;if(tc(t))return null;t=ki(t)}return null}function $h(){return zh==null&&(zh=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),zh}function bo(e){return/^(html|body|#document)$/.test(To(e))}function yr(e){return qn(e).getComputedStyle(e)}function nc(e){return Er(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function ki(e){if(To(e)==="html")return e;const t=e.assignedSlot||e.parentNode||GT(e)&&e.host||Ur(e);return GT(t)?t.host:t}function WT(e){const t=ki(e);return bo(t)?(e.ownerDocument||e).body:Hr(t)&&Ya(t)?t:WT(t)}function Ga(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const s=WT(e),a=s===((r=e.ownerDocument)==null?void 0:r.body),u=qn(s);if(a){const c=Vh(u);return t.concat(u,u.visualViewport||[],Ya(s)?s:[],c&&n?Ga(c):[])}else return t.concat(s,Ga(s,[],n))}function Vh(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function XT(e){const t=yr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const s=Hr(e),a=s?e.offsetWidth:n,u=s?e.offsetHeight:r,c=Kl(n)!==a||Kl(r)!==u;return c&&(n=a,r=u),{width:n,height:r,$:c}}function qh(e){return Er(e)?e:e.contextElement}function _o(e){const t=qh(e);if(!Hr(t))return Fr(1);const n=t.getBoundingClientRect(),{width:r,height:s,$:a}=XT(t);let u=(a?Kl(n.width):n.width)/r,c=(a?Kl(n.height):n.height)/s;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const xD=Fr(0);function KT(e){const t=qn(e);return!$h()||!t.visualViewport?xD:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function wD(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==qn(e)?!1:t}function ys(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const s=e.getBoundingClientRect(),a=qh(e);let u=Fr(1);t&&(r?Er(r)&&(u=_o(r)):u=_o(e));const c=wD(a,n,r)?KT(a):Fr(0);let d=(s.left+c.x)/u.x,f=(s.top+c.y)/u.y,p=s.width/u.x,m=s.height/u.y;if(a){const b=qn(a),y=r&&Er(r)?qn(r):r;let _=b,A=Vh(_);for(;A&&r&&y!==_;){const v=_o(A),w=A.getBoundingClientRect(),k=yr(A),C=w.left+(A.clientLeft+parseFloat(k.paddingLeft))*v.x,H=w.top+(A.clientTop+parseFloat(k.paddingTop))*v.y;d*=v.x,f*=v.y,p*=v.x,m*=v.y,d+=C,f+=H,_=qn(A),A=Vh(_)}}return Zl({width:p,height:m,x:d,y:f})}function rc(e,t){const n=nc(e).scrollLeft;return t?t.left+n:ys(Ur(e)).left+n}function QT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-rc(e,n),s=n.top+t.scrollTop;return{x:r,y:s}}function AD(e){let{elements:t,rect:n,offsetParent:r,strategy:s}=e;const a=s==="fixed",u=Ur(r),c=t?tc(t.floating):!1;if(r===u||c&&a)return n;let d={scrollLeft:0,scrollTop:0},f=Fr(1);const p=Fr(0),m=Hr(r);if((m||!m&&!a)&&((To(r)!=="body"||Ya(u))&&(d=nc(r)),Hr(r))){const y=ys(r);f=_o(r),p.x=y.x+r.clientLeft,p.y=y.y+r.clientTop}const b=u&&!m&&!a?QT(u,d):Fr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+p.x+b.x,y:n.y*f.y-d.scrollTop*f.y+p.y+b.y}}function CD(e){return Array.from(e.getClientRects())}function vD(e){const t=Ur(e),n=nc(e),r=e.ownerDocument.body,s=ii(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),a=ii(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+rc(e);const c=-n.scrollTop;return yr(r).direction==="rtl"&&(u+=ii(t.clientWidth,r.clientWidth)-s),{width:s,height:a,x:u,y:c}}const JT=25;function ND(e,t){const n=qn(e),r=Ur(e),s=n.visualViewport;let a=r.clientWidth,u=r.clientHeight,c=0,d=0;if(s){a=s.width,u=s.height;const p=$h();(!p||p&&t==="fixed")&&(c=s.offsetLeft,d=s.offsetTop)}const f=rc(r);if(f<=0){const p=r.ownerDocument,m=p.body,b=getComputedStyle(m),y=p.compatMode==="CSS1Compat"&&parseFloat(b.marginLeft)+parseFloat(b.marginRight)||0,_=Math.abs(r.clientWidth-m.clientWidth-y);_<=JT&&(a-=_)}else f<=JT&&(a+=f);return{width:a,height:u,x:c,y:d}}const kD=new Set(["absolute","fixed"]);function PD(e,t){const n=ys(e,!0,t==="fixed"),r=n.top+e.clientTop,s=n.left+e.clientLeft,a=Hr(e)?_o(e):Fr(1),u=e.clientWidth*a.x,c=e.clientHeight*a.y,d=s*a.x,f=r*a.y;return{width:u,height:c,x:d,y:f}}function ZT(e,t,n){let r;if(t==="viewport")r=ND(e,n);else if(t==="document")r=vD(Ur(e));else if(Er(t))r=PD(t,n);else{const s=KT(e);r={x:t.x-s.x,y:t.y-s.y,width:t.width,height:t.height}}return Zl(r)}function eb(e,t){const n=ki(e);return n===t||!Er(n)||bo(n)?!1:yr(n).position==="fixed"||eb(n,t)}function OD(e,t){const n=t.get(e);if(n)return n;let r=Ga(e,[],!1).filter(c=>Er(c)&&To(c)!=="body"),s=null;const a=yr(e).position==="fixed";let u=a?ki(e):e;for(;Er(u)&&!bo(u);){const c=yr(u),d=jh(u);!d&&c.position==="fixed"&&(s=null),(a?!d&&!s:!d&&c.position==="static"&&!!s&&kD.has(s.position)||Ya(u)&&!d&&eb(e,u))?r=r.filter(p=>p!==u):s=c,u=ki(u)}return t.set(e,r),r}function ID(e){let{element:t,boundary:n,rootBoundary:r,strategy:s}=e;const u=[...n==="clippingAncestors"?tc(t)?[]:OD(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,p)=>{const m=ZT(t,p,s);return f.top=ii(m.top,f.top),f.right=vi(m.right,f.right),f.bottom=vi(m.bottom,f.bottom),f.left=ii(m.left,f.left),f},ZT(t,c,s));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function RD(e){const{width:t,height:n}=XT(e);return{width:t,height:n}}function LD(e,t,n){const r=Hr(t),s=Ur(t),a=n==="fixed",u=ys(e,!0,a,t);let c={scrollLeft:0,scrollTop:0};const d=Fr(0);function f(){d.x=rc(s)}if(r||!r&&!a)if((To(t)!=="body"||Ya(s))&&(c=nc(t)),r){const y=ys(t,!0,a,t);d.x=y.x+t.clientLeft,d.y=y.y+t.clientTop}else s&&f();a&&!r&&s&&f();const p=s&&!r&&!a?QT(s,c):Fr(0),m=u.left+c.scrollLeft-d.x-p.x,b=u.top+c.scrollTop-d.y-p.y;return{x:m,y:b,width:u.width,height:u.height}}function Yh(e){return yr(e).position==="static"}function tb(e,t){if(!Hr(e)||yr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return Ur(e)===n&&(n=n.ownerDocument.body),n}function nb(e,t){const n=qn(e);if(tc(e))return n;if(!Hr(e)){let s=ki(e);for(;s&&!bo(s);){if(Er(s)&&!Yh(s))return s;s=ki(s)}return n}let r=tb(e,t);for(;r&&TD(r)&&Yh(r);)r=tb(r,t);return r&&bo(r)&&Yh(r)&&!jh(r)?n:r||SD(e)||n}const DD=function(e){return Ke(this,null,function*(){const t=this.getOffsetParent||nb,n=this.getDimensions,r=yield n(e.floating);return{reference:LD(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function MD(e){return yr(e).direction==="rtl"}const FD={convertOffsetParentRelativeRectToViewportRelativeRect:AD,getDocumentElement:Ur,getClippingRect:ID,getOffsetParent:nb,getElementRects:DD,getClientRects:CD,getDimensions:RD,getScale:_o,isElement:Er,isRTL:MD};function rb(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function BD(e,t){let n=null,r;const s=Ur(e);function a(){var c;clearTimeout(r),(c=n)==null||c.disconnect(),n=null}function u(c,d){c===void 0&&(c=!1),d===void 0&&(d=1),a();const f=e.getBoundingClientRect(),{left:p,top:m,width:b,height:y}=f;if(c||t(),!b||!y)return;const _=Ql(m),A=Ql(s.clientWidth-(p+b)),v=Ql(s.clientHeight-(m+y)),w=Ql(p),C={rootMargin:-_+"px "+-A+"px "+-v+"px "+-w+"px",threshold:ii(0,vi(1,d))||1};let H=!0;function Y(L){const q=L[0].intersectionRatio;if(q!==d){if(!H)return u();q?u(!1,q):r=setTimeout(()=>{u(!1,1e-7)},1e3)}q===1&&!rb(f,e.getBoundingClientRect())&&u(),H=!1}try{n=new IntersectionObserver(Y,fe(F({},C),{root:s.ownerDocument}))}catch(L){n=new IntersectionObserver(Y,C)}n.observe(e)}return u(!0),a}function UD(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:s=!0,ancestorResize:a=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=qh(e),p=s||a?[...f?Ga(f):[],...Ga(t)]:[];p.forEach(w=>{s&&w.addEventListener("scroll",n,{passive:!0}),a&&w.addEventListener("resize",n)});const m=f&&c?BD(f,n):null;let b=-1,y=null;u&&(y=new ResizeObserver(w=>{let[k]=w;k&&k.target===f&&y&&(y.unobserve(t),cancelAnimationFrame(b),b=requestAnimationFrame(()=>{var C;(C=y)==null||C.observe(t)})),n()}),f&&!d&&y.observe(f),y.observe(t));let _,A=d?ys(e):null;d&&v();function v(){const w=ys(e);A&&!rb(A,w)&&n(),A=w,_=requestAnimationFrame(v)}return n(),()=>{var w;p.forEach(k=>{s&&k.removeEventListener("scroll",n),a&&k.removeEventListener("resize",n)}),m==null||m(),(w=y)==null||w.disconnect(),y=null,d&&cancelAnimationFrame(_)}}const HD=mD,zD=gD,jD=fD,$D=yD,VD=hD,qD=dD,YD=ED,GD=(e,t,n)=>{const r=new Map,s=F({platform:FD},n),a=fe(F({},s.platform),{_c:r});return cD(e,t,fe(F({},s),{platform:a}))};function ib(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const s={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return fe(F({},s),{toJSON:()=>s})}function WD(e){if(!e)return ib();const{x:t,y:n,width:r,height:s}=e;return ib(t,n,r,s)}function XD(e,t){return{contextElement:Xt(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?WD(r):n.getBoundingClientRect()}}}var Wa=e=>({variable:e,reference:`var(${e})`}),oi={arrowSize:Wa("--arrow-size"),arrowSizeHalf:Wa("--arrow-size-half"),arrowBg:Wa("--arrow-background"),transformOrigin:Wa("--transform-origin"),arrowOffset:Wa("--arrow-offset")},KD=e=>e==="top"||e==="bottom"?"y":"x";function QD(e,t){return{name:"transformOrigin",fn(n){var de,V,se,pe,ve;const{elements:r,middlewareData:s,placement:a,rects:u,y:c}=n,d=a.split("-")[0],f=KD(d),p=((de=s.arrow)==null?void 0:de.x)||0,m=((V=s.arrow)==null?void 0:V.y)||0,b=(t==null?void 0:t.clientWidth)||0,y=(t==null?void 0:t.clientHeight)||0,_=p+b/2,A=m+y/2,v=Math.abs(((se=s.shift)==null?void 0:se.y)||0),w=u.reference.height/2,k=y/2,C=(ve=(pe=e.offset)==null?void 0:pe.mainAxis)!=null?ve:e.gutter,H=typeof C=="number"?C+k:C!=null?C:k,Y=v>H,L={top:`${_}px calc(100% + ${H}px)`,bottom:`${_}px ${-H}px`,left:`calc(100% + ${H}px) ${A}px`,right:`${-H}px ${A}px`}[d],q=`${_}px ${u.reference.y+w-c}px`,ne=!!e.overlap&&f==="y"&&Y;return r.floating.style.setProperty(oi.transformOrigin.variable,ne?q:L),{data:{transformOrigin:ne?q:L}}}}}var JD={name:"rects",fn({rects:e}){return{data:e}}},ZD=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:s}=n.arrow,a=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:s!=null?`${s}px`:"",[a]:`calc(100% + ${oi.arrowOffset.reference})`}),{}}}};function e5(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var t5={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function sb(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function Gh(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function n5(e,t,n){const r=e||t.createElement("div");return qD({element:r,padding:n.arrowPadding})}function r5(e,t){var n;if(!x6((n=t.offset)!=null?n:t.gutter))return HD(({placement:r})=>{var p,m,b,y;const s=((e==null?void 0:e.clientHeight)||0)/2,a=(m=(p=t.offset)==null?void 0:p.mainAxis)!=null?m:t.gutter,u=typeof a=="number"?a+s:a!=null?a:s,{hasAlign:c}=e5(r),d=c?void 0:t.shift,f=(y=(b=t.offset)==null?void 0:b.crossAxis)!=null?y:d;return _h({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function i5(e){if(!e.flip)return;const t=Gh(e.boundary);return jD(fe(F({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function s5(e){if(!e.slide&&!e.overlap)return;const t=Gh(e.boundary);return zD(fe(F({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:YD()}))}function o5(e){return $D({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:s}){const a=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);s=Math.floor(s),r=Math.floor(r),a.style.setProperty("--reference-width",`${u}px`),a.style.setProperty("--reference-height",`${c}px`),a.style.setProperty("--available-width",`${s}px`),a.style.setProperty("--available-height",`${r}px`)}})}function a5(e){var t;if(e.hideWhenDetached)return VD({strategy:"referenceHidden",boundary:(t=Gh(e.boundary))!=null?t:"clippingAncestors"})}function u5(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function l5(e,t,n={}){const r=XD(e,n.getAnchorRect);if(!t||!r)return;const s=Object.assign({},t5,n),a=t.querySelector("[data-part=arrow]"),u=[r5(a,s),i5(s),s5(s),n5(a,t.ownerDocument,s),ZD(a),QD({gutter:s.gutter,offset:s.offset,overlap:s.overlap},a),o5(s),a5(s),JD],{placement:c,strategy:d,onComplete:f,onPositioned:p}=s,m=()=>Ke(null,null,function*(){var H;if(!r||!t)return;const A=yield GD(r,t,{placement:c,middleware:u,strategy:d});f==null||f(A),p==null||p({placed:!0});const v=lo(t),w=sb(v,A.x),k=sb(v,A.y);t.style.setProperty("--x",`${w}px`),t.style.setProperty("--y",`${k}px`),s.hideWhenDetached&&(((H=A.middlewareData.hide)==null?void 0:H.referenceHidden)?(t.style.setProperty("visibility","hidden"),t.style.setProperty("pointer-events","none")):(t.style.removeProperty("visibility"),t.style.removeProperty("pointer-events")));const C=t.firstElementChild;if(C){const Y=fo(C);t.style.setProperty("--z-index",Y.zIndex)}}),b=()=>Ke(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),p==null||p({placed:!0})):yield m()}),y=u5(s.listeners),_=s.listeners?UD(r,t,b,y):I6;return b(),()=>{_==null||_(),p==null||p({placed:!1})}}function ob(e,t,n={}){const c=n,{defer:r}=c,s=cn(c,["defer"]),a=r?zt:d=>d(),u=[];return u.push(a(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(l5(d,f,s))})),()=>{u.forEach(d=>d==null?void 0:d())}}var c5={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function d5(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:s="absolute"}=e;return{arrow:{position:"absolute",width:oi.arrowSize.reference,height:oi.arrowSize.reference,[oi.arrowSizeHalf.variable]:`calc(${oi.arrowSize.reference} / 2)`,[oi.arrowOffset.variable]:`calc(${oi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?c5[t.split("-")[0]]:void 0,background:oi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:s,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,ic=new WeakMap,sc={},Wh=0,ab=e=>e&&(e.host||ab(e.parentNode)),f5=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=ab(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),h5=new Set(["script","output","status","next-route-announcer"]),p5=e=>h5.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),m5=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:s,followControlledElements:a=!0}=t,u=f5(n,Array.isArray(e)?e:[e]);sc[r]||(sc[r]=new WeakMap);const c=sc[r],d=[],f=new Set,p=new Set(u),m=y=>{!y||f.has(y)||(f.add(y),m(y.parentNode))};u.forEach(y=>{m(y),a&&Xt(y)&&TT(y,_=>{m(_)})});const b=y=>{!y||p.has(y)||Array.prototype.forEach.call(y.children,_=>{if(f.has(_))b(_);else try{if(p5(_))return;const v=_.getAttribute(s)==="true",w=(So.get(_)||0)+1,k=(c.get(_)||0)+1;So.set(_,w),c.set(_,k),d.push(_),w===1&&v&&ic.set(_,!0),k===1&&_.setAttribute(r,""),v||_.setAttribute(s,"true")}catch(A){console.error("[zag-js > ariaHidden] cannot operate on ",_,A)}})};return b(n),f.clear(),Wh++,()=>{d.forEach(y=>{const _=So.get(y)-1,A=c.get(y)-1;So.set(y,_),c.set(y,A),_||(ic.has(y)||y.removeAttribute(s),ic.delete(y)),A||y.removeAttribute(r)}),Wh--,Wh||(So=new WeakMap,So=new WeakMap,ic=new WeakMap,sc={})}},g5=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,E5=(e,t=g5(e),n="data-aria-hidden",r=!0)=>{if(t)return m5(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},y5=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function ub(e,t={}){const{defer:n=!0}=t,r=n?y5:a=>a(),s=[];return s.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&s.push(E5(u))})),()=>{s.forEach(a=>a==null?void 0:a())}}function T5(e){const t={each(n){var r;for(let s=0;s<((r=e.frames)==null?void 0:r.length);s+=1){const a=e.frames[s];a&&n(a)}},addEventListener(n,r,s){return t.each(a=>{try{a.document.addEventListener(n,r,s)}catch(u){}}),()=>{try{t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener(n,r,s){t.each(a=>{try{a.document.removeEventListener(n,r,s)}catch(u){}})}};return t}function b5(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,s)=>{try{t==null||t.addEventListener(n,r,s)}catch(a){}return()=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}},removeEventListener:(n,r,s)=>{try{t==null||t.removeEventListener(n,r,s)}catch(a){}}}}var lb="pointerdown.outside",cb="focus.outside";function _5(e){for(const t of e)if(Xt(t)&&Mr(t))return!0;return!1}var db=e=>"clientY"in e;function S5(e,t){if(!db(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 x5(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function fb(e,t){if(!t||!db(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,s=t.scrollWidth>t.clientWidth,a=s&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(s?16:0)},c={x:e.clientX,y:e.clientY};return x5(u,c)?r||a:!1}function w5(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:s,onInteractOutside:a,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Dr(e),f=lo(e),p=T5(f),m=b5(f);function b(C,H){if(!Xt(H)||!H.isConnected||uo(e,H)||S5(e,C)||c&&yT(e,H))return!1;const Y=d.querySelector(`[aria-controls="${e.id}"]`);if(Y){const q=Ph(Y);if(fb(C,q))return!1}const L=Ph(e);return fb(C,L)?!1:!(n!=null&&n(H))}const y=new Set,_=hs(e==null?void 0:e.getRootNode());function A(C){function H(Y){var de,V;const L=u&&!bT()?zt:se=>se(),q=Y!=null?Y:C,ne=(V=(de=q==null?void 0:q.composedPath)==null?void 0:de.call(q))!=null?V:[q==null?void 0:q.target];L(()=>{const se=_?ne[0]:gr(C);if(!(!e||!b(C,se))){if(s||a){const pe=bh(s,a);e.addEventListener(lb,pe,{once:!0})}hb(e,lb,{bubbles:!1,cancelable:!0,detail:{originalEvent:q,contextmenu:h4(q),focusable:_5(ne),target:se}})}})}C.pointerType==="touch"?(y.forEach(Y=>Y()),y.add(Kt(d,"click",H,{once:!0})),y.add(m.addEventListener("click",H,{once:!0})),y.add(p.addEventListener("click",H,{once:!0}))):H()}const v=new Set,w=setTimeout(()=>{v.add(Kt(d,"pointerdown",A,!0)),v.add(m.addEventListener("pointerdown",A,!0)),v.add(p.addEventListener("pointerdown",A,!0))},0);function k(C){(u?zt:Y=>Y())(()=>{var q,ne;const Y=(ne=(q=C==null?void 0:C.composedPath)==null?void 0:q.call(C))!=null?ne:[C==null?void 0:C.target],L=_?Y[0]:gr(C);if(!(!e||!b(C,L))){if(r||a){const de=bh(r,a);e.addEventListener(cb,de,{once:!0})}hb(e,cb,{bubbles:!1,cancelable:!0,detail:{originalEvent:C,contextmenu:!1,focusable:Mr(L),target:L}})}})}return bT()||(v.add(Kt(d,"focusin",k,!0)),v.add(m.addEventListener("focusin",k,!0)),v.add(p.addEventListener("focusin",k,!0))),()=>{clearTimeout(w),y.forEach(C=>C()),v.forEach(C=>C())}}function A5(e,t){const{defer:n}=t,r=n?zt:a=>a(),s=[];return s.push(r(()=>{const a=typeof e=="function"?e():e;s.push(w5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}function hb(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,n);return e.dispatchEvent(s)}function C5(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return Kt(Dr(e),"keydown",n,{capture:!0})}var pb="layer:request-dismiss",rr={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=>uo(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>uo(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=>rr.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];N5(e,pb,s=>{var a;(a=r.requestDismiss)==null||a.call(r,s),s.defaultPrevented||r==null||r.dismiss()}),v5(e,pb,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function v5(e,t,n){const r=e.ownerDocument.defaultView||window,s=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(s)}function N5(e,t,n){e.addEventListener(t,n,{once:!0})}var mb;function gb(){rr.layers.forEach(({node:e})=>{e.style.pointerEvents=rr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function k5(e){e.style.pointerEvents=""}function P5(e,t){const n=Dr(e),r=[];return rr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(mb=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(s=>{const[a,u]=M4(()=>{const c=s();return Xt(c)?c:null},{timeout:1e3});a.then(c=>r.push(ql(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{rr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=mb,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(s=>s()))}}function O5(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){Sh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:s,pointerBlocking:a,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:a,requestDismiss:s};rr.add(f),gb();function p(A){var w,k;const v=gr(A.detail.originalEvent);rr.isBelowPointerBlockingLayer(e)||rr.isInBranch(v)||((w=t.onPointerDownOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onPointerDownOutside:",A.detail.originalEvent),r==null||r()))}function m(A){var w,k;const v=gr(A.detail.originalEvent);rr.isInBranch(v)||((w=t.onFocusOutside)==null||w.call(t,A),(k=t.onInteractOutside)==null||k.call(t,A),!A.defaultPrevented&&(c&&console.log("onFocusOutside:",A.detail.originalEvent),r==null||r()))}function b(A){var v;rr.isTopMost(e)&&((v=t.onEscapeKeyDown)==null||v.call(t,A),!A.defaultPrevented&&r&&(A.preventDefault(),r()))}function y(A){var C;if(!e)return!1;const v=typeof u=="function"?u():u,w=Array.isArray(v)?v:[v],k=(C=t.persistentElements)==null?void 0:C.map(H=>H()).filter(Xt);return k&&w.push(...k),w.some(H=>uo(H,A))||rr.isInNestedLayer(e,A)}const _=[a?P5(e,t.persistentElements):void 0,C5(e,b),A5(e,{exclude:y,onFocusOutside:m,onPointerDownOutside:p,defer:t.defer})];return()=>{rr.remove(e),gb(),k5(e),_.forEach(A=>A==null?void 0:A())}}function Eb(e,t){const{defer:n}=t,r=n?zt:a=>a(),s=[];return s.push(r(()=>{const a=oo(e)?e():e;s.push(O5(a,t))})),()=>{s.forEach(a=>a==null?void 0:a())}}var I5=Object.defineProperty,R5=(e,t,n)=>t in e?I5(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,wt=(e,t,n)=>R5(e,typeof t!="symbol"?t+"":t,n),yb={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()}},L5=[],D5=class{constructor(e,t){wt(this,"trapStack"),wt(this,"config"),wt(this,"doc"),wt(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),wt(this,"portalContainers",new Set),wt(this,"listenerCleanups",[]),wt(this,"handleFocus",r=>{const s=gr(r),a=this.findContainerIndex(s,r)>=0;if(a||zl(s))a&&(this.state.mostRecentlyFocusedNode=s);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if($a(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const p=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);p>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?p+1<f.length&&(u=f[p+1],c=!1):p-1>=0&&(u=f[p-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>$a(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}),wt(this,"handlePointerDown",r=>{const s=gr(r);if(!(this.findContainerIndex(s,r)>=0)){if(Ka(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ka(this.config.allowOutsideClick,r)||r.preventDefault()}}),wt(this,"handleClick",r=>{const s=gr(r);this.findContainerIndex(s,r)>=0||Ka(this.config.clickOutsideDeactivates,r)||Ka(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),wt(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const s=this.config.isKeyBackward(r),a=this.findNextNavNode({event:r,isBackward:s});if(!a)return;Xa(r)&&r.preventDefault(),this.tryFocus(a)}}),wt(this,"handleEscapeKey",r=>{M5(r)&&Ka(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),wt(this,"_mutationObserver"),wt(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(s=>{s.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),s.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 i4(f)?!0:f.id&&!this.state.containers.some(p=>p.contains(f))?s4(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),wt(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(s=>{var a;(a=this._mutationObserver)==null||a.observe(s,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(s=>{this.observePortalContainer(s)}))}),wt(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Mr(r)){const s=co(this.doc);if(s&&this.findContainerIndex(s)>=0)r=s;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}),wt(this,"tryFocus",r=>{if(r!==!1&&r!==co(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,F5(r)&&r.select()}}),wt(this,"deactivate",r=>{if(!this.state.active)return this;const s=F({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),yb.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const a=this.getOption(s,"onDeactivate"),u=this.getOption(s,"onPostDeactivate"),c=this.getOption(s,"checkCanReturnFocus"),d=this.getOption(s,"returnFocus","returnFocusOnDeactivate");a==null||a();const f=()=>{Tb(()=>{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}),wt(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onPause"),a=this.getOption(r,"onPostPause");return this.state.paused=!0,s==null||s(),this.removeListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const s=this.getOption(r,"onUnpause"),a=this.getOption(r,"onPostUnpause");return this.state.paused=!1,s==null||s(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),a==null||a(),this}),wt(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),wt(this,"getReturnFocusNode",r=>{const s=this.getNodeForOption("setReturnFocus",{params:[r]});return s||(s===!1?!1:r)}),wt(this,"getOption",(r,s,a)=>r&&r[s]!==void 0?r[s]:this.config[a||s]),wt(this,"getNodeForOption",(r,{hasFallback:s=!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&&!s)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),wt(this,"findNextNavNode",r=>{const{event:s,isBackward:a=!1}=r,u=r.target||gr(s);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,s),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)a?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(a){let p=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!ps(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(p=d),p>=0){const m=p===0?this.state.tabbableGroups.length-1:p-1,b=this.state.tabbableGroups[m];c=$a(u)>=0?b.lastTabbableNode:b.lastDomTabbableNode}else Xa(s)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let p=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(p<0&&((f==null?void 0:f.container)===u||Mr(u)&&!ps(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(p=d),p>=0){const m=p===this.state.tabbableGroups.length-1?0:p+1,b=this.state.tabbableGroups[m];c=$a(u)>=0?b.firstTabbableNode:b.firstDomTabbableNode}else Xa(s)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||L5;const n=F({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Xa(r)&&!r.shiftKey},isKeyBackward(r){return Xa(r)&&r.shiftKey}},t);this.doc=n.document||Dr(Array.isArray(e)?e[0]:e),this.config=n,this.updateContainerElements(e),this.setupMutationObserver()}addPortalContainer(e){const t=e.parentElement;t&&!this.portalContainers.has(t)&&(this.portalContainers.add(t),this.state.active&&!this.state.paused&&this.observePortalContainer(t))}observePortalContainer(e){var t;(t=this._mutationObserver)==null||t.observe(e,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}updatePortalContainers(){this.config.followControlledElements&&this.state.containers.forEach(e=>{t4(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:s})=>r.contains(e)||(n==null?void 0:n.includes(r))||s.find(a=>a===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?yT(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=ho(e,{getShadowRoot:this.config.getShadowRoot}),n=vT(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],s=t[t.length-1],a=r,u=s;let c=!1;for(let f=0;f<t.length;f++)if($a(t[f])>0){c=!0;break}function d(f,p=!0){const m=t.indexOf(f);if(m>=0)return t[m+(p?1:-1)];const b=n.indexOf(f);if(!(b<0)){if(p){for(let y=b+1;y<n.length;y++)if(ps(n[y]))return n[y]}else for(let y=b-1;y>=0;y--)if(ps(n[y]))return n[y]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:s,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 yb.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?Tb(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(Kt(this.doc,"focusin",this.handleFocus,!0),Kt(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),Kt(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),Kt(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),Kt(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),Kt(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=co(this.doc),t==null||t();const s=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(s,s),this):(s(),this)}},Xa=e=>e.key==="Tab",Ka=(e,...t)=>typeof e=="function"?e(...t):e,M5=e=>!e.isComposing&&e.key==="Escape",Tb=e=>setTimeout(e,0),F5=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function bb(e,t={}){let n;const r=zt(()=>{const s=typeof e=="function"?e():e;if(s){n=new D5(s,fe(F({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:s},t),{document:Dr(s)}));try{n.activate()}catch(a){}}});return function(){n==null||n.deactivate(),r()}}var Xh="data-scroll-lock";function B5(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function _b(e){const t=fo(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function Sb(e){var y;const t=e!=null?e:document,n=(y=t.defaultView)!=null?y:window,{documentElement:r,body:s}=t;if(s.hasAttribute(Xh))return;const u=_b(r)||_b(s),c=n.innerWidth-r.clientWidth;s.setAttribute(Xh,"");const d=()=>L4(r,"--scrollbar-width",`${c}px`),f=B5(r),p=()=>{const _={overflow:"hidden"};return!u&&c>0&&(_[f]=`${c}px`),ql(s,_)},m=()=>{var Y,L;const{scrollX:_,scrollY:A,visualViewport:v}=n,w=(Y=v==null?void 0:v.offsetLeft)!=null?Y:0,k=(L=v==null?void 0:v.offsetTop)!=null?L:0,C={position:"fixed",overflow:"hidden",top:`${-(A-Math.floor(k))}px`,left:`${-(_-Math.floor(w))}px`,right:"0"};!u&&c>0&&(C[f]=`${c}px`);const H=ql(s,C);return()=>{H==null||H(),n.scrollTo({left:_,top:A,behavior:"instant"})}},b=[d(),jl()?m():p()];return()=>{b.forEach(_=>_==null?void 0:_()),s.removeAttribute(Xh)}}var U5=gs("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),zr=U5.build(),xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},wb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},Kh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},Ab=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},H5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},Qh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},Jh=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},z5=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},Cb=e=>e.getById(xb(e)),xo=e=>e.getById(wb(e)),wo=e=>e.getById(Kh(e)),vb=e=>e.getById(Ab(e)),j5=e=>e.getById(Qh(e)),$5=e=>e.getById(Jh(e));function V5(e,t){const{state:n,context:r,send:s,computed:a,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),p=a("currentPortalled"),m=r.get("renderedElements"),b=d5(fe(F({},u("positioning")),{placement:f}));return{portalled:p,open:d,setOpen(y){n.matches("open")!==y&&s({type:y?"OPEN":"CLOSE"})},reposition(y={}){s({type:"POSITIONING.SET",options:y})},getArrowProps(){return t.element(fe(F({id:H5(c)},zr.arrow.attrs),{dir:u("dir"),style:b.arrow}))},getArrowTipProps(){return t.element(fe(F({},zr.arrowTip.attrs),{dir:u("dir"),style:b.arrowTip}))},getAnchorProps(){return t.element(fe(F({},zr.anchor.attrs),{dir:u("dir"),id:xb(c)}))},getTriggerProps(){return t.button(fe(F({},zr.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:wb(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Kh(c),onPointerDown(y){_T(y)&&d4()&&y.currentTarget.focus()},onClick(y){y.defaultPrevented||s({type:"TOGGLE"})},onBlur(y){s({type:"TRIGGER_BLUR",target:y.relatedTarget})}}))},getIndicatorProps(){return t.element(fe(F({},zr.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({id:Ab(c)},zr.positioner.attrs),{dir:u("dir"),style:b.floating}))},getContentProps(){return t.element(fe(F({},zr.content.attrs),{dir:u("dir"),id:Kh(c),tabIndex:-1,role:"dialog","aria-modal":mT(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":ao(d),"aria-labelledby":m.title?Qh(c):void 0,"aria-describedby":m.description?Jh(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(fe(F({},zr.title.attrs),{id:Qh(c),dir:u("dir")}))},getDescriptionProps(){return t.element(fe(F({},zr.description.attrs),{id:Jh(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(fe(F({},zr.closeTrigger.attrs),{dir:u("dir"),id:z5(c),type:"button","aria-label":"close",onClick(y){y.defaultPrevented||(y.stopPropagation(),s({type:"CLOSE"}))}}))}}}var q5={props({props:e}){return fe(F({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:F({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var a;e.set("currentPlacement",t("positioning").placement);const r=(a=Cb(n))!=null?a:xo(n);return ob(r,()=>vb(n),fe(F({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>wo(n);let s=!0;return Eb(r,{type:"popover",pointerBlocking:t("modal"),exclude:xo(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&&(s=!(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:s})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:I4(()=>wo(t),{triggerElement:xo(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?ub(()=>[wo(t),xo(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return Sb(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?bb(()=>wo(t),{initialFocus:()=>NT({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const s=(u=Cb(n))!=null?u:xo(n);ob(s,()=>vb(n),fe(F(F({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){zt(()=>{Object.assign(e.get("renderedElements"),{title:!!j5(t),description:!!$5(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||zt(()=>{const n=NT({root:wo(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,s;const n=(s=e.restoreFocus)!=null?s:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||zt(()=>{const a=xo(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})}}}};go()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[mU,oc]=ms({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[gU,Zh]=ms({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),Y5=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Zh(),s=F({id:t,dir:r,getRootNode:n},e),a=Gl(q5,s);return V5(a,Rh)},G5=e=>{const[t,u]=FT(e),c=u,{children:n}=c,r=cn(c,["children"]),s=Y5(r),a=Mh(jt({present:s.open},t));return S.jsx(G4,{value:s,children:S.jsx(LT,{value:a,children:n})})},Nb=B.forwardRef((e,t)=>{const n=Dh(),r=Va(),s=jt(fe(F({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return S.jsx(Tn.button,fe(F({},s),{ref:t}))});Nb.displayName="PopoverTrigger";function W5(e){return St({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 X5(e){return St({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 K5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M11.354 1.646a.5.5 0 0 1 0 .708L5.707 8l5.647 5.646a.5.5 0 0 1-.708.708l-6-6a.5.5 0 0 1 0-.708l6-6a.5.5 0 0 1 .708 0"},child:[]}]})(e)}function Q5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M4.646 1.646a.5.5 0 0 1 .708 0l6 6a.5.5 0 0 1 0 .708l-6 6a.5.5 0 0 1-.708-.708L10.293 8 4.646 2.354a.5.5 0 0 1 0-.708"},child:[]}]})(e)}function J5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M8 2a.5.5 0 0 1 .5.5v5h5a.5.5 0 0 1 0 1h-5v5a.5.5 0 0 1-1 0v-5h-5a.5.5 0 0 1 0-1h5v-5A.5.5 0 0 1 8 2"},child:[]}]})(e)}function Z5(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M15.854.146a.5.5 0 0 1 .11.54l-5.819 14.547a.75.75 0 0 1-1.329.124l-3.178-4.995L.643 7.184a.75.75 0 0 1 .124-1.33L15.314.037a.5.5 0 0 1 .54.11ZM6.636 10.07l2.761 4.338L14.13 2.576zm6.787-8.201L1.591 6.602l4.339 2.76z"},child:[]}]})(e)}function ep(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M7.657 6.247c.11-.33.576-.33.686 0l.645 1.937a2.89 2.89 0 0 0 1.829 1.828l1.936.645c.33.11.33.576 0 .686l-1.937.645a2.89 2.89 0 0 0-1.828 1.829l-.645 1.936a.361.361 0 0 1-.686 0l-.645-1.937a2.89 2.89 0 0 0-1.828-1.828l-1.937-.645a.361.361 0 0 1 0-.686l1.937-.645a2.89 2.89 0 0 0 1.828-1.828zM3.794 1.148a.217.217 0 0 1 .412 0l.387 1.162c.173.518.579.924 1.097 1.097l1.162.387a.217.217 0 0 1 0 .412l-1.162.387A1.73 1.73 0 0 0 4.593 5.69l-.387 1.162a.217.217 0 0 1-.412 0L3.407 5.69A1.73 1.73 0 0 0 2.31 4.593l-1.162-.387a.217.217 0 0 1 0-.412l1.162-.387A1.73 1.73 0 0 0 3.407 2.31zM10.863.099a.145.145 0 0 1 .274 0l.258.774c.115.346.386.617.732.732l.774.258a.145.145 0 0 1 0 .274l-.774.258a1.16 1.16 0 0 0-.732.732l-.258.774a.145.145 0 0 1-.274 0l-.258-.774a1.16 1.16 0 0 0-.732-.732L9.1 2.137a.145.145 0 0 1 0-.274l.774-.258c.346-.115.617-.386.732-.732z"},child:[]}]})(e)}function kb(e){return St({attr:{fill:"currentColor",viewBox:"0 0 16 16"},child:[{tag:"path",attr:{d:"M9.5 13a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0m0-5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0"},child:[]}]})(e)}const e8=({className:e,componentType:t,children:n})=>{const[r,s]=B.useState(!1),{globalClassName:a}=tt(),u=f=>{s(f.open)},c=B.useCallback(()=>{s(!1)},[]),d=B.useMemo(()=>({closeMenu:c}),[c]);return S.jsxs(G5,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[S.jsx(Nb,{"aria-label":`Overflow menu for ${t}`,className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,a,e,`cim-${t}-component`),children:S.jsx(kb,{})}),S.jsx(MT,{children:S.jsx(DT,{className:G(`${z}-overflow-menu-list`,a,`cim-${t}-component`),children:S.jsx(uT.Provider,{value:d,children:n})})})]})};function Pb(e){return St({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 Ob(e){return St({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[t8,Ts]=ms({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),Ib=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getControlProps(),e);return S.jsx(Tn.div,fe(F(F({},r),e),{ref:t}))});Ib.displayName="CarouselControl";const Rb=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["readOnly","index"]),s=Ts(),a=jt(s.getIndicatorProps(n),r);return S.jsx(Tn.button,fe(F({},a),{ref:t}))});Rb.displayName="CarouselIndicator";const Lb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getIndicatorGroupProps(),e);return S.jsx(Tn.div,fe(F({},r),{ref:t}))});Lb.displayName="CarouselIndicatorGroup";const Db=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["index","snapAlign"]),s=Ts(),a=jt(s.getItemProps(n),r);return S.jsx(Tn.div,fe(F({},a),{ref:t}))});Db.displayName="CarouselItem";const Mb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getItemGroupProps(),e);return S.jsx(Tn.div,fe(F({},r),{ref:t}))});Mb.displayName="CarouselItemGroup";const Fb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getNextTriggerProps(),e);return S.jsx(Tn.button,fe(F({},r),{ref:t}))});Fb.displayName="CarouselNextTrigger";const Bb=B.forwardRef((e,t)=>{const n=Ts(),r=jt(n.getPrevTriggerProps(),e);return S.jsx(Tn.button,fe(F({},r),{ref:t}))});Bb.displayName="CarouselPrevTrigger";function n8(e){const t=fo(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),a=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(b,y){let _=parseFloat(b);return/%/.test(b)&&(_/=100,_*=y),Number.isNaN(_)?0:_}let d=c(r,n.width),f=c(s,n.height),p=c(a,n.width),m=c(u,n.height);return{x:{before:d,after:p},y:{before:f,after:m}}}function r8(e,t,n="both"){return n==="x"&&e.right>=t.left&&e.left<=t.right||n==="y"&&e.bottom>=t.top&&e.top<=t.bottom||n==="both"&&e.right>=t.left&&e.left<=t.right&&e.bottom>=t.top&&e.top<=t.bottom}function Ub(e){let t=[];for(const n of e.children)t=t.concat(n,Ub(n));return t}function Hb(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},s=t?Ub(e):e.children;for(const a of["x","y"]){const u=a==="x"?"y":"x",c=a==="x"?"left":"top",d=a==="x"?"width":"height",f=a==="x"?"scrollLeft":"scrollTop";for(const p of s){const m=p.getBoundingClientRect();if(!r8(n,m,u))continue;const b=fo(p);let[y,_]=b.getPropertyValue("scroll-snap-align").split(" ");typeof _=="undefined"&&(_=y);const A=a==="x"?_:y,v=m[c]-n[c]+e[f];switch(A){case"none":break;case"start":r[a].start.push({node:p,position:v});break;case"center":r[a].center.push({node:p,position:v+m[d]/2});break;case"end":r[a].end.push({node:p,position:v+m[d]});break}}}return r}function zb(e){const t=e.getBoundingClientRect(),n=n8(e),r=Hb(e),s={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:jb([...r.x.start.map(a=>a.position-n.x.before),...r.x.center.map(a=>a.position-t.width/2),...r.x.end.map(a=>a.position-t.width+n.x.after)].map($b(0,s.x))),y:jb([...r.y.start.map(a=>a.position-n.y.before),...r.y.center.map(a=>a.position-t.height/2),...r.y.end.map(a=>a.position-t.height+n.y.after)].map($b(0,s.y)))}}function i8(e,t,n){const r=Hb(e),s=[...r[t].start,...r[t].center,...r[t].end];for(const a of s)if(n(a.node))return a.position}var jb=e=>[...new Set(e)],$b=(e,t)=>n=>Math.max(e,Math.min(t,n)),s8=gs("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),ai=s8.build(),o8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},a8=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:item:${t}`},ac=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},u8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},l8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},c8=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},Vb=(e,t)=>{var n,r,s;return(s=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?s:`carousel:${e.id}:indicator:${t}`},Dn=e=>e.getById(ac(e)),qb=e=>R4(Dn(e),"[data-part=item]"),d8=(e,t)=>e.getById(Vb(e,t)),Yb=e=>{const t=Dn(e);if(!t)return;const n=ho(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function f8(e,t){const{state:n,context:r,computed:s,send:a,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),p=s("canScrollNext"),m=s("canScrollPrev"),b=s("isHorizontal"),y=Array.from(r.get("pageSnapPoints")),_=r.get("page"),A=c("slidesPerPage"),v=c("padding"),w=c("translations");return{isPlaying:d,isDragging:f,page:_,pageSnapPoints:y,canScrollNext:p,canScrollPrev:m,getProgress(){return _/y.length},scrollToIndex(k,C){a({type:"INDEX.SET",index:k,instant:C})},scrollTo(k,C){a({type:"PAGE.SET",index:k,instant:C})},scrollNext(k){a({type:"PAGE.NEXT",instant:k})},scrollPrev(k){a({type:"PAGE.PREV",instant:k})},play(){a({type:"AUTOPLAY.START"})},pause(){a({type:"AUTOPLAY.PAUSE"})},isInView(k){return Array.from(r.get("slidesInView")).includes(k)},refresh(){a({type:"SNAP.REFRESH"})},getRootProps(){return t.element(fe(F({},ai.root.attrs),{id:o8(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":A,"--slide-spacing":c("spacing"),"--slide-item-size":"calc(100% / var(--slides-per-page) - var(--slide-spacing) * (var(--slides-per-page) - 1) / var(--slides-per-page))"}}))},getItemGroupProps(){return t.element(fe(F({},ai.itemGroup.attrs),{id:ac(u),"data-orientation":c("orientation"),"data-dragging":ao(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(k){uo(k.currentTarget,gr(k))&&a({type:"VIEWPORT.FOCUS"})},onBlur(k){uo(k.currentTarget,k.relatedTarget)||a({type:"VIEWPORT.BLUR"})},onMouseDown(k){if(k.defaultPrevented||!c("allowMouseDrag")||!_T(k))return;const C=gr(k);Mr(C)&&C!==k.currentTarget||(k.preventDefault(),a({type:"DRAGGING.START"}))},onWheel:R6(k=>{const C=c("orientation")==="horizontal"?"deltaX":"deltaY";k[C]<0&&!s("canScrollPrev")||k[C]>0&&!s("canScrollNext")||a({type:"USER.SCROLL"})},150),onTouchStart(){a({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[b?"x":"y",c("snapType")].join(" "),gridAutoFlow:b?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[b?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[b?"scrollPaddingInline":"scrollPaddingBlock"]:v,[b?"paddingInline":"paddingBlock"]:v,[b?"overflowX":"overflowY"]:"auto"}}))},getItemProps(k){const C=r.get("slidesInView").includes(k.index);return t.element(fe(F({},ai.item.attrs),{id:a8(u,k.index),dir:c("dir"),role:"group","data-index":k.index,"data-inview":ao(C),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":w.item(k.index,c("slideCount")),"aria-hidden":mT(!C),style:{scrollSnapAlign:(()=>{var ne;const H=(ne=k.snapAlign)!=null?ne:"start",Y=c("slidesPerMove"),L=Y==="auto"?Math.floor(c("slidesPerPage")):Y;return(k.index+L)%L===0?H:void 0})()}}))},getControlProps(){return t.element(fe(F({},ai.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(fe(F({},ai.prevTrigger.attrs),{id:l8(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":w.prevTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),onClick(k){k.defaultPrevented||a({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(fe(F({},ai.nextTrigger.attrs),{dir:c("dir"),id:u8(u),type:"button","aria-label":w.nextTrigger,"data-orientation":c("orientation"),"aria-controls":ac(u),disabled:!p,onClick(k){k.defaultPrevented||a({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(fe(F({},ai.indicatorGroup.attrs),{dir:c("dir"),id:c8(u),"data-orientation":c("orientation"),onKeyDown(k){if(k.defaultPrevented)return;const C="indicator",H={ArrowDown(q){b||(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowUp(q){b||(a({type:"PAGE.PREV",src:C}),q.preventDefault())},ArrowRight(q){b&&(a({type:"PAGE.NEXT",src:C}),q.preventDefault())},ArrowLeft(q){b&&(a({type:"PAGE.PREV",src:C}),q.preventDefault())},Home(q){a({type:"PAGE.SET",index:0,src:C}),q.preventDefault()},End(q){a({type:"PAGE.SET",index:y.length-1,src:C}),q.preventDefault()}},Y=g4(k,{dir:c("dir"),orientation:c("orientation")}),L=H[Y];L==null||L(k)}}))},getIndicatorProps(k){return t.button(fe(F({},ai.indicator.attrs),{dir:c("dir"),id:Vb(u,k.index),type:"button","data-orientation":c("orientation"),"data-index":k.index,"data-readonly":ao(k.readOnly),"data-current":ao(k.index===_),"aria-label":w.indicator(k.index),onClick(C){C.defaultPrevented||k.readOnly||a({type:"PAGE.SET",index:k.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(fe(F({},ai.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":ao(d),"aria-label":d?w.autoplayStop:w.autoplayStart,onClick(k){k.defaultPrevented||a({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var h8={props({props:e}){return U6(e,["slideCount"],"carousel"),fe(F({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:F({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const a=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:a[r]})}})),pageSnapPoints:t(()=>({defaultValue:p8(e("slideCount"),e("slidesPerMove"),e("slidesPerPage"))})),slidesInView:t(()=>({defaultValue:[]}))}},computed:{isRtl:({prop:e})=>e("dir")==="rtl",isHorizontal:({prop:e})=>e("orientation")==="horizontal",canScrollNext:({prop:e,context:t})=>e("loop")||t.get("page")<t.get("pageSnapPoints").length-1,canScrollPrev:({prop:e,context:t})=>e("loop")||t.get("page")>0,autoplayInterval:({prop:e})=>{const t=e("autoplay");return S6(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:s}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{s({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{s({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(Dn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=Dn(e);if(!n)return;const r=e.getWin(),s=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),Yb(e)});return Yb(e),s.observe(n,{childList:!0,subtree:!0}),()=>s.disconnect()},trackSlideResize({scope:e,send:t}){if(!Dn(e))return;const r=e.getWin(),s=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};zt(()=>{s(),zt(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const a=new r.ResizeObserver(s);return qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=Dn(e),s=e.getWin(),a=new s.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var b;const p=f.target,m=Number((b=p.dataset.index)!=null?b:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?E6(d,m):y6(d,m)},n.get("slidesInView"));n.set("slidesInView",T6(c))},{root:r,threshold:t("inViewThreshold")});return qb(e).forEach(u=>a.observe(u)),()=>a.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=Dn(n);return r?Kt(r,"scroll",()=>{clearTimeout(t.get("timeoutRef")),t.set("timeoutRef",void 0),t.set("timeoutRef",setTimeout(()=>{e({type:"SCROLL.END"})},150))},{passive:!0}):void 0},trackDocumentVisibility({scope:e,send:t}){const n=e.getDoc();return Kt(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return P4(n,{onPointerMove({event:r}){t({type:"DRAGGING",left:-r.movementX,top:-r.movementY})},onPointerUp(){t({type:"DRAGGING.END"})}})},trackKeyboardScroll({scope:e,send:t,context:n}){const r=e.getWin();return Kt(r,"keydown",a=>{switch(a.key){case"ArrowRight":a.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":a.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":a.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":a.preventDefault(),t({type:"PAGE.SET",index:n.get("pageSnapPoints").length-1})}},{capture:!0})}},actions:{clearScrollEndTimer({refs:e}){e.get("timeoutRef")!=null&&(clearTimeout(e.get("timeoutRef")),e.set("timeoutRef",void 0))},scrollToPage({context:e,event:t,scope:n,computed:r,flush:s}){var f;const a=t.instant?"instant":"smooth",u=hT((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=Dn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";s(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:a})})},setClosestPage({context:e,scope:t,computed:n}){const r=Dn(t);if(!r)return;const s=n("isHorizontal")?r.scrollLeft:r.scrollTop,a=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-s)<1);a!==-1&&e.set("page",a)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=cT(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),s=b6(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",s)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const s=Dn(r);if(!s)return;const a=i8(s,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(a==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-a)<1);e.set("page",u)},setPage({context:e,event:t}){var r;const n=(r=t.index)!=null?r:e.get("page");e.set("page",n)},clampPage({context:e}){const t=hT(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=Dn(n);if(!r)return;const s=zb(r);e.set("pageSnapPoints",t("isHorizontal")?s.x:s.y)},disableScrollSnap({scope:e}){const t=Dn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=Dn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=Dn(e);if(!r)return;const s=r.scrollLeft,a=r.scrollTop,u=zb(r),c=u.x.reduce((f,p)=>Math.abs(p-s)<Math.abs(f-s)?p:f,u.x[0]),d=u.y.reduce((f,p)=>Math.abs(p-a)<Math.abs(f-a)?p:f,u.y[0]);zt(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const p=r.dataset.scrollSnapType;p&&(r.style.setProperty("scroll-snap-type",p),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=d8(n,e.get("page"));r&&zt(()=>r.focus({preventScroll:!0}))},invokeDragStart({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.start",isDragging:!0,page:e.get("page")})},invokeDragging({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging",isDragging:!0,page:e.get("page")})},invokeDraggingEnd({context:e,prop:t}){var n;(n=t("onDragStatusChange"))==null||n({type:"dragging.end",isDragging:!1,page:e.get("page")})},invokeAutoplay({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay",isPlaying:!0,page:e.get("page")})},invokeAutoplayStart({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.start",isPlaying:!0,page:e.get("page")})},invokeAutoplayEnd({context:e,prop:t}){var n;(n=t("onAutoplayStatusChange"))==null||n({type:"autoplay.stop",isPlaying:!1,page:e.get("page")})}}}};function p8(e,t,n){if(e==null||n<=0)return[];const r=[],s=t==="auto"?Math.floor(n):t;if(s<=0)return[];for(let a=0;a<e&&!(a+n>e);a+=s)r.push(a);return r}go()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),go()(["index","readOnly"]),go()(["index","snapAlign"]);const m8=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Zh(),s=F({id:t,dir:r,getRootNode:n},e),a=Gl(h8,s);return f8(a,Rh)},Gb=B.forwardRef((e,t)=>{const[n,r]=qa()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),s=m8(n),a=jt(s.getRootProps(),r);return S.jsx(t8,{value:s,children:S.jsx(Tn.div,fe(F({},a),{ref:t}))})});Gb.displayName="CarouselRoot";const g8=180,E8=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},y8=({globalClassName:e,className:t,itemMinWidth:n=g8,spacing:r="0.5rem",loop:s=!1,allowMouseDrag:a=!0,showIndicators:u=!0,showNavigation:c=!0,onPageChange:d,ariaLabel:f="Product carousel",children:p})=>{const m=Array.from(p).map((ne,de)=>({node:ne,key:B.isValidElement(ne)&&ne.key!=null?ne.key:`carousel-item-${de}`})),b=m.length,y=B.useRef(null),[_,A]=B.useState(0),{width:v}=Cv();B.useLayoutEffect(()=>{y.current&&A(y.current.getBoundingClientRect().width)},[v,b]);const w=E8(r),k=n+w,C=_>0?(_+w)/k:1,H=Math.max(1,Math.floor(C));if(b===0)return null;const Y=b>H,L=Math.ceil(b/H),q=Y?Math.max(1,C):H;return S.jsxs(Gb,{ref:y,className:G(e,t,`${z}-carousel`),slidesPerPage:q,slidesPerMove:H,spacing:r,loop:s,allowMouseDrag:a,slideCount:b,onPageChange:d,"aria-label":f,children:[S.jsx(Mb,{className:G(e,`${z}-carousel__item-group`,{"carousel-row-container":!Y}),children:m.map(({node:ne,key:de},V)=>S.jsx(Db,{index:V,className:G(e,`${z}-carousel__item`),children:ne},de))}),c&&Y&&S.jsxs(Ib,{className:G(e,`${z}-carousel__control`),children:[S.jsx(Bb,{className:G(e,`${z}-carousel__prev-trigger`),"aria-label":"Previous slide",children:S.jsx(K5,{size:"16px"})}),S.jsx(Fb,{className:G(e,`${z}-carousel__next-trigger`),"aria-label":"Next slide",children:S.jsx(Q5,{size:"16px"})})]}),u&&Y&&S.jsx(Lb,{className:G(e,`${z}-carousel__indicator-group`),children:Array.from({length:L},(ne,de)=>S.jsx(Rb,{index:de,className:G(e,`${z}-carousel__indicator`),"aria-label":`Go to slide group ${de+1}`},de))})]})},[T8,b8]=ms({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),_8=e=>qa()(e,["lazyMount","unmountOnExit"]),[S8,Qa]=ms({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),Wb=B.forwardRef((e,t)=>{const n=Qa(),r=b8(),s=Mh(fe(F({},r),{present:n.open})),a=jt(n.getBackdropProps(),s.getPresenceProps(),e);return s.unmounted?null:S.jsx(Tn.div,fe(F({},a),{ref:Wl(s.ref,t)}))});Wb.displayName="DialogBackdrop";const tp=B.forwardRef((e,t)=>{const n=Qa(),r=Va(),s=jt(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:S.jsx(Tn.div,fe(F({},s),{ref:Wl(r.ref,t)}))});tp.displayName="DialogContent";const np=B.forwardRef((e,t)=>{const n=Qa(),r=jt(n.getDescriptionProps(),e);return S.jsx(Tn.div,fe(F({},r),{ref:t}))});np.displayName="DialogDescription";const rp=B.forwardRef((e,t)=>{const n=Qa(),r=jt(n.getPositionerProps(),e);return Va().unmounted?null:S.jsx(Tn.div,fe(F({},r),{ref:t}))});rp.displayName="DialogPositioner";var x8=gs("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),bs=x8.build(),Xb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},Kb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},ip=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},Qb=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},sp=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},op=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`},uc=e=>e.getById(ip(e)),w8=e=>e.getById(Xb(e)),A8=e=>e.getById(Kb(e)),C8=e=>e.getById(Qb(e)),v8=e=>e.getById(sp(e)),N8=e=>e.getById(op(e)),k8=e=>e.getById(Jb(e));function P8(e,t){const{state:n,send:r,context:s,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(fe(F({},bs.trigger.attrs),{dir:a("dir"),id:Qb(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":ip(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(fe(F({},bs.backdrop.attrs),{dir:a("dir"),hidden:!d,id:Kb(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(fe(F({},bs.positioner.attrs),{dir:a("dir"),id:Xb(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=s.get("rendered");return t.element(fe(F({},bs.content.attrs),{dir:a("dir"),role:a("role"),hidden:!d,id:ip(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:sp(u),"aria-describedby":f.description?op(u):void 0}))},getTitleProps(){return t.element(fe(F({},bs.title.attrs),{dir:a("dir"),id:sp(u)}))},getDescriptionProps(){return t.element(fe(F({},bs.description.attrs),{dir:a("dir"),id:op(u)}))},getCloseTriggerProps(){return t.button(fe(F({},bs.closeTrigger.attrs),{dir:a("dir"),id:Jb(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var O8={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>k8(t):void 0,s=typeof e.modal=="boolean"?e.modal:!0;return F({role:"dialog",modal:s,trapFocus:s,preventScroll:s,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 Eb(()=>uc(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[C8(e)],onInteractOutside(s){var a;(a=n("onInteractOutside"))==null||a(s),n("closeOnInteractOutside")||s.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(s){var a;(a=n("onEscapeKeyDown"))==null||a(s),n("closeOnEscape")||s.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return Sb(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?bb(()=>uc(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var s,a;return(a=(s=t("finalFocusEl"))==null?void 0:s())!=null?a:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?ub(()=>[uc(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){zt(()=>{e.set("rendered",{title:!!v8(t),description:!!N8(t)})})},syncZIndex({scope:e}){zt(()=>{const t=uc(e);if(!t)return;const n=fo(t);[w8(e),A8(e)].forEach(s=>{s==null||s.style.setProperty("--z-index",n.zIndex),s==null||s.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})}}}};go()(["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 I8=e=>{const t=B.useId(),{getRootNode:n}=oc(),{dir:r}=Zh(),s=F({id:t,getRootNode:n,dir:r},e),a=Gl(O8,s);return P8(a,Rh)},Zb=e=>{const[t,c]=FT(e),d=c,{children:n}=d,r=cn(d,["children"]),[s]=_8(t),a=I8(r),u=Mh(jt({present:a.open},t));return S.jsx(S8,{value:a,children:S.jsx(T8,{value:s,children:S.jsx(LT,{value:u,children:n})})})},e_=B.forwardRef((e,t)=>{const n=Qa(),r=jt(n.getTitleProps(),e);return S.jsx(Tn.h2,fe(F({},r),{ref:t}))});e_.displayName="DialogTitle";const R8=({children:e})=>{const[t,n]=B.useState(!1),r=B.useMemo(()=>({toggleMenu:()=>n(a=>!a),closeMenu:()=>n(!1)}),[]),s=B.useMemo(()=>({isOpen:t}),[t]);return S.jsx(Th.Provider,{value:r,children:S.jsx(aT.Provider,{value:s,children:e})})},t_=()=>B.useContext(aT),n_=()=>{const e=B.useContext(Th);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},L8=`${z}-overflow-menu-button-trigger`,D8=({componentType:e,children:t})=>{const{isOpen:n}=t_(),{closeMenu:r}=n_(),{globalClassName:s}=tt(),a=B.useRef(null);return B.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${L8}`)||a.current&&!a.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?S.jsx("div",{ref:a,role:"menu","aria-label":`Overflow menu for ${e}`,className:G(`${z}-overflow-panel`,s,`cim-${e}-component`),children:t}):null},M8=({componentType:e,className:t})=>{const{toggleMenu:n}=n_(),{isOpen:r}=t_(),{globalClassName:s}=tt();return S.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,"aria-haspopup":"menu",className:G(`${z}-overflow-menu-button-trigger`,`${z}-icon-button`,s,t,`cim-${e}-component`),onClick:n,children:S.jsx(kb,{})})},ap=()=>{const{status:e,entryType:t}=Zn(),{messages:n}=er(),r=t==="ask_cim",s=!!(n&&n.length>0),a=!!e.isOpen;return r&&a||!r&&a&&s},F8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{previousComponentType:r}=Zn(),s=so(),a=()=>{cl(r||"dialog"),s()};return t?S.jsx(ni,{className:G(n,`${z}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:a,icon:S.jsx(Pb,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-dialog-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(Pb,{}),"Show ",r||"dialog"]})},B8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{isModalFullscreen:r}=Zn(),s=so(),a=()=>{yf(!r),s()},u=r?FN:BN,c="Toggle Fullscreen";return t?S.jsx(ni,{ariaLabel:c,title:c,className:G(n,`${z}-modal-fullscreen-button`,`cim-${e}-component`),icon:S.jsx(u,{}),onClick:a}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-modal-fullscreen-button`,`cim-${e}-component`),onClick:a,children:[S.jsx(u,{}),c]})},U8=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),{dialogPosition:r}=Zn(),s=so(),a=r==="bottom-left",u=()=>{Tf(a?"bottom-right":"bottom-left"),s()},c=a?X5:W5,d=a?"Move right":"Move left";return t?S.jsx(ni,{className:G(n,`${z}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:S.jsx(c,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[S.jsx(c,{}),d]})},r_=({componentType:e,onClearChat:t,onClose:n,onDownloadTranscript:r})=>{const{headerConfig:s,globalClassName:a,mode:u,enableDownloadTranscript:c}=tt(),{mode:d}=Zn(),f=u==="messaging"&&c&&!!r,p=d==="standalone",m=e==="modal",b=m?F8:i_,y=m?B8:U8,_=B.useMemo(()=>s?HN(s):{},[s]);return S.jsx(R8,{children:S.jsxs("div",{className:G(a,`${z}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[S.jsxs("div",{className:G(a,`${z}-${e}-header`,{standalone:p,embedded:!p}),style:_,children:[(s==null?void 0:s.logoUrl)&&S.jsx("img",{alt:"",role:"img",className:G(a,`${z}-${e}-logo`,{standalone:p,embedded:!p}),src:s.logoUrl}),S.jsx(e_,{className:G(a,`${z}-${e}-title`,{standalone:p,embedded:!p}),children:s==null?void 0:s.headerText}),S.jsxs("div",{className:G(a,`${z}-${e}-controls`),children:[S.jsx(b,{componentType:e,isIcon:!0}),S.jsx(M8,{componentType:e}),S.jsx(k1,{className:G(a,`cim-${e}-component`),onClick:n})]})]}),S.jsxs(D8,{componentType:e,children:[S.jsx(y,{componentType:e}),S.jsx($8,{componentType:e}),S.jsx(lT,{componentType:e,onClearChat:t}),f&&S.jsx(H8,{componentType:e,onDownloadTranscript:r})]})]})})},H8=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=tt(),r=so(),[s,a]=B.useState(!1),u=()=>Ke(null,null,function*(){if(!s){a(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{a(!1)}}});return S.jsxs("button",{className:G(`${z}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:s,children:[S.jsx(p6,{}),"Download transcript"]})},z8={sparkle:ep,plus:J5,"paper-plane":Z5},up=({icon:e,className:t})=>{const n=z8[e];return n?S.jsx(n,{className:t,"aria-hidden":"true"}):null},j8=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:s,onSuggestionClick:a})=>{var y;const{suggestionButtonConfig:u}=tt(),c=u==null?void 0:u.icon,d=(y=u==null?void 0:u.iconPosition)!=null?y:"left",f=s?"standalone":"embedded",p=_=>()=>{a(_)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},b=_=>S.jsxs(S.Fragment,{children:[c&&S.jsx(up,{icon:c,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:_})]});return S.jsx("div",{className:G(t,`${z}-suggestion-container ${f}`,e),children:n.map(_=>s?S.jsx(pl,{disabled:r,className:G(t,`${z}-suggestion-button standalone`,m),onClick:p(_),children:b(_)},_):S.jsx("button",{disabled:r,className:G(t,`${z}-suggestion-button embedded`,m),onClick:p(_),children:b(_)},_))})},$8=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=tt();if(!r)return null;const s=()=>{ei(!1),pa(!0)};return t?S.jsx(ni,{className:G(n,`${z}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:s,icon:S.jsx(v1,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-minimize-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(v1,{}),"Minimize"]})},i_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=tt(),r=so(),s=()=>{cl("modal"),r()};return t?S.jsx(ni,{className:G(n,`${z}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:s,icon:S.jsx(Ob,{})}):S.jsxs("button",{className:G(n,`${z}-overflow-menu-button`,`${z}-toggle-modal-button`,`cim-${e}-component`),onClick:s,children:[S.jsx(Ob,{}),"Show modal"]})},V8=({isWidgetStandalone:e})=>{var _,A;const{globalClassName:t,entryMessage:n,resetConversationMessage:r,suggestionButtonConfig:s}=tt(),{askCimPrompts:a,messages:u}=er(),{isLoading:c,handleSuggestion:d}=Or(),f=s==null?void 0:s.icon,p=(_=s==null?void 0:s.iconPosition)!=null?_:"left",m=B.useMemo(()=>{const v=typeof n=="string"?n:"Hi! I'm your Cimulate Co-Pilot. Ask me anything — I can help you find products, compare items, discover trends, and more!";return u.some(k=>k.name==="conversation_reset")&&r||v},[u,n,r]),b=((A=a.message)==null?void 0:A.suggestions)||[],y=(v,w)=>()=>{d(v,w)};return S.jsxs("div",{className:G(t,`${z}-ask-cim-entry-message`,`${z}-message-group`,e?"standalone":"embedded"),children:[S.jsx("p",{className:G(t,`${z}-ask-cim-entry-text`),children:m}),!!(b!=null&&b.length)&&S.jsx("div",{className:G(t,`${z}-ask-cim-suggestions-container`,`${z}-suggestion-container`,e?"standalone":"embedded"),children:b.map(v=>{var w;return S.jsxs(pl,{disabled:c,className:G(t,`${z}-ask-cim-suggestion-button`,`${z}-suggestion-button`,e?"standalone":"embedded",{"has-icon":!!f,"icon-right":!!f&&p==="right"}),onClick:y(v,((w=a.message)==null?void 0:w.eventSourceId)||""),children:[f&&S.jsx(up,{icon:f,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:v.displayText})]},v.displayText)})})]})},q8=({isWidgetStandalone:e,product:t})=>{const{configModule:n,globalClassName:r,openLinksInNewTab:s}=tt();if(!n)return null;const a=n.getName(t),u=n.getBrand(t),c=n.getPriceDisplay(t),d=n.getRelativePdp(t),f=n.getPdp(t),p=n.getImage(t),m=d&&typeof d=="string"?new URL(d,window.location.origin).href:f;return S.jsxs("div",{className:G(r,`${z}-product-tile`,{embedded:!e,standalone:e}),children:[m?S.jsx("a",{href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer","aria-label":`Go to product page for ${a}`,children:S.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"})}):S.jsx("img",{className:G(r,`${z}-product-tile-image`,{embedded:!e,standalone:e}),src:`${p}`,alt:`${a}`,loading:"lazy"}),S.jsxs("div",{className:G(r,`${z}-product-tile-details`,{embedded:!e,standalone:e}),children:[S.jsxs("div",{className:G(r,`${z}-product-tile-content`),children:[u&&S.jsx("p",{className:`${z}-product-tile-brand`,children:u}),m?S.jsxs("a",{"aria-label":`Go to product page for ${a}`,className:G(r,`${z}-product-tile-pdp`),href:`${m}`,target:s?"_blank":"_self",rel:"noopener noreferrer",children:[a," ",S.jsx("span",{className:G(r,`${z}-product-tile-pdp-arrow`),children:"→"})]}):S.jsx("p",{className:G(r,`${z}-product-tile-name`),title:a,children:a})]}),S.jsx("div",{className:G(r,`${z}-product-tile-footer`),children:S.jsx("p",{className:G(r,`${z}-product-tile-price`),children:c})})]})]})},Y8=({isWidgetStandalone:e,message:t})=>{const{configModule:n,globalClassName:r}=tt(),s=t;return n?S.jsxs("div",{className:G(r,`${z}-display-products`),children:[S.jsx("p",{children:s.message}),s.products&&s.products.length>0&&S.jsx(y8,{globalClassName:r,spacing:"0.5rem",ariaLabel:"Recommended products",children:s.products.map(a=>{const u=n.getPid(a);return S.jsx(q8,{isWidgetStandalone:e,product:a},`${u}`)})})]}):null},G8=({globalClassName:e,message:t,isWidgetStandalone:n})=>S.jsx("div",{className:G(e,`${z}-error-message`,{standalone:n,embedded:!n}),children:S.jsxs("p",{className:G(e,`${z}-error-message-text`,{standalone:n,embedded:!n}),children:[S.jsx(LN,{})," ",t.message||"An error occurred while processing your request."]})}),W8=({globalClassName:e,entryType:t,message:n,isWidgetStandalone:r,handleSuggestionClick:s})=>{var _;const{isLoading:a}=Or(),{messages:u}=er(),c=u.find(A=>A.id===n.eventSourceId),d=!!c,f=((_=c==null?void 0:c.name)==null?void 0:_.replace("_suggestions",""))||"",p=d?aA(f):null,b=a||!d||!(d&&(p===t||t==="ask_cim")),y=A=>{const v=n.suggestions.find(w=>w.displayText===A);v&&s(v,n.eventSourceId||n.id)};return S.jsxs("div",{className:G(e,`${z}-follow-up`),children:[S.jsx("p",{className:G(e,`${z}-text`),children:n.message}),S.jsx(j8,{suggestions:n.suggestions.map(A=>A.displayText),disabled:b,isWidgetStandalone:r,onSuggestionClick:y,globalClassName:e})]})};function s_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,s=n.indexOf(t);for(;s!==-1;)r++,s=n.indexOf(t,s+t.length);return r}function X8(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function K8(e,t,n){const s=Al((n||{}).ignore||[]),a=Q8(t);let u=-1;for(;++u<a.length;)zE(e,"text",c);function c(f,p){let m=-1,b;for(;++m<p.length;){const y=p[m],_=b?b.children:void 0;if(s(y,_?_.indexOf(y):void 0,b))return;b=y}if(b)return d(f,p)}function d(f,p){const m=p[p.length-1],b=a[u][0],y=a[u][1];let _=0;const v=m.children.indexOf(f);let w=!1,k=[];b.lastIndex=0;let C=b.exec(f.value);for(;C;){const H=C.index,Y={index:C.index,input:C.input,stack:[...p,f]};let L=y(...C,Y);if(typeof L=="string"&&(L=L.length>0?{type:"text",value:L}:void 0),L===!1?b.lastIndex=H+1:(_!==H&&k.push({type:"text",value:f.value.slice(_,H)}),Array.isArray(L)?k.push(...L):L&&k.push(L),_=H+C[0].length,w=!0),!b.global)break;C=b.exec(f.value)}return w?(_<f.value.length&&k.push({type:"text",value:f.value.slice(_)}),m.children.splice(v,1,...k)):k=[f],v+k.length}}function Q8(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 s=n[r];t.push([J8(s[0]),Z8(s[1])])}return t}function J8(e){return typeof e=="string"?new RegExp(X8(e),"g"):e}function Z8(e){return typeof e=="function"?e:function(){return e}}const lp="phrasing",cp=["autolink","link","image","label"];function eM(){return{transforms:[aM],enter:{literalAutolink:nM,literalAutolinkEmail:dp,literalAutolinkHttp:dp,literalAutolinkWww:dp},exit:{literalAutolink:oM,literalAutolinkEmail:sM,literalAutolinkHttp:rM,literalAutolinkWww:iM}}}function tM(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:cp},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:lp,notInConstruct:cp},{character:":",before:"[ps]",after:"\\/",inConstruct:lp,notInConstruct:cp}]}}function nM(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function dp(e){this.config.enter.autolinkProtocol.call(this,e)}function rM(e){this.config.exit.autolinkProtocol.call(this,e)}function iM(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 sM(e){this.config.exit.autolinkEmail.call(this,e)}function oM(e){this.exit(e)}function aM(e){K8(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,uM],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),lM]],{ignore:["link","linkReference"]})}function uM(e,t,n,r,s){let a="";if(!o_(s)||(/^w/i.test(t)&&(n=t+n,t="",a="http://"),!cM(n)))return!1;const u=dM(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 lM(e,t,n,r){return!o_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function cM(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 dM(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 s=s_(e,"(");let a=s_(e,")");for(;r!==-1&&s>a;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),a++;return[e,n]}function o_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||os(n)||yl(n))&&(!t||n!==47)}a_.peek=bM;function fM(){this.buffer()}function hM(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function pM(){this.buffer()}function mM(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function gM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function EM(e){this.exit(e)}function yM(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=pr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function TM(e){this.exit(e)}function bM(){return"["}function a_(e,t,n,r){const s=n.createTracker(r);let a=s.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return a+=s.move(n.safe(n.associationId(e),{after:"]",before:a})),c(),u(),a+=s.move("]"),a}function _M(){return{enter:{gfmFootnoteCallString:fM,gfmFootnoteCall:hM,gfmFootnoteDefinitionLabelString:pM,gfmFootnoteDefinition:mM},exit:{gfmFootnoteCallString:gM,gfmFootnoteCall:EM,gfmFootnoteDefinitionLabelString:yM,gfmFootnoteDefinition:TM}}}function SM(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:a_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,s,a,u){const c=a.createTracker(u);let d=c.move("[^");const f=a.enter("footnoteDefinition"),p=a.enter("label");return d+=c.move(a.safe(a.associationId(r),{before:d,after:"]"})),p(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
|
|
32
|
+
`:" ")+a.indentLines(a.containerFlow(r,c.current()),t?u_:xM))),f(),d}}function xM(e,t,n){return t===0?e:u_(e,t,n)}function u_(e,t,n){return(n?"":" ")+e}const wM=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];l_.peek=kM;function AM(){return{canContainEols:["delete"],enter:{strikethrough:vM},exit:{strikethrough:NM}}}function CM(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:wM}],handlers:{delete:l_}}}function vM(e){this.enter({type:"delete",children:[]},e)}function NM(e){this.exit(e)}function l_(e,t,n,r){const s=n.createTracker(r),a=n.enter("strikethrough");let u=s.move("~~");return u+=n.containerPhrasing(e,fe(F({},s.current()),{before:u,after:"~"})),u+=s.move("~~"),a(),u}function kM(){return"~"}function PM(e){return e.length}function OM(e,t){const n=t||{},r=(n.align||[]).concat(),s=n.stringLength||PM,a=[],u=[],c=[],d=[];let f=0,p=-1;for(;++p<e.length;){const A=[],v=[];let w=-1;for(e[p].length>f&&(f=e[p].length);++w<e[p].length;){const k=IM(e[p][w]);if(n.alignDelimiters!==!1){const C=s(k);v[w]=C,(d[w]===void 0||C>d[w])&&(d[w]=C)}A.push(k)}u[p]=A,c[p]=v}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)a[m]=c_(r[m]);else{const A=c_(r);for(;++m<f;)a[m]=A}m=-1;const b=[],y=[];for(;++m<f;){const A=a[m];let v="",w="";A===99?(v=":",w=":"):A===108?v=":":A===114&&(w=":");let k=n.alignDelimiters===!1?1:Math.max(1,d[m]-v.length-w.length);const C=v+"-".repeat(k)+w;n.alignDelimiters!==!1&&(k=v.length+k+w.length,k>d[m]&&(d[m]=k),y[m]=k),b[m]=C}u.splice(1,0,b),c.splice(1,0,y),p=-1;const _=[];for(;++p<u.length;){const A=u[p],v=c[p];m=-1;const w=[];for(;++m<f;){const k=A[m]||"";let C="",H="";if(n.alignDelimiters!==!1){const Y=d[m]-(v[m]||0),L=a[m];L===114?C=" ".repeat(Y):L===99?Y%2?(C=" ".repeat(Y/2+.5),H=" ".repeat(Y/2-.5)):(C=" ".repeat(Y/2),H=C):H=" ".repeat(Y)}n.delimiterStart!==!1&&!m&&w.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&k==="")&&(n.delimiterStart!==!1||m)&&w.push(" "),n.alignDelimiters!==!1&&w.push(C),w.push(k),n.alignDelimiters!==!1&&w.push(H),n.padding!==!1&&w.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&w.push("|")}_.push(n.delimiterEnd===!1?w.join("").replace(/ +$/,""):w.join(""))}return _.join(`
|
|
33
|
+
`)}function IM(e){return e==null?"":String(e)}function c_(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 RM(e,t,n,r){const s=n.enter("blockquote"),a=n.createTracker(r);a.move("> "),a.shift(2);const u=n.indentLines(n.containerFlow(e,a.current()),LM);return s(),u}function LM(e,t,n){return">"+(n?"":" ")+e}function DM(e,t){return d_(e,t.inConstruct,!0)&&!d_(e,t.notInConstruct,!1)}function d_(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 f_(e,t,n,r){let s=-1;for(;++s<n.unsafe.length;)if(n.unsafe[s].character===`
|
|
34
|
+
`&&DM(n.stack,n.unsafe[s]))return/[ \t]/.test(r.before)?"":" ";return`\\
|
|
35
|
+
`}function MM(e,t){const n=String(e);let r=n.indexOf(t),s=r,a=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===s?++a>u&&(u=a):a=1,s=r+t.length,r=n.indexOf(t,s);return u}function FM(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 BM(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 UM(e,t,n,r){const s=BM(n),a=e.value||"",u=s==="`"?"GraveAccent":"Tilde";if(FM(e,n)){const m=n.enter("codeIndented"),b=n.indentLines(a,HM);return m(),b}const c=n.createTracker(r),d=s.repeat(Math.max(MM(a,s)+1,3)),f=n.enter("codeFenced");let p=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);p+=c.move(n.safe(e.lang,F({before:p,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);p+=c.move(" "),p+=c.move(n.safe(e.meta,F({before:p,after:`
|
|
36
36
|
`,encode:["`"]},c.current()))),m()}return p+=c.move(`
|
|
37
37
|
`),a&&(p+=c.move(a+`
|
|
38
|
-
`)),p+=c.move(d),f(),p}function
|
|
39
|
-
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function
|
|
38
|
+
`)),p+=c.move(d),f(),p}function HM(e,t,n){return(n?"":" ")+e}function fp(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 zM(e,t,n,r){const s=fp(n),a=s==='"'?"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),F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":`
|
|
39
|
+
`},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),u(),f}function jM(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 Ja(e){return"&#x"+e.toString(16).toUpperCase()+";"}function lc(e,t,n){const r=Zs(e),s=Zs(t);return r===void 0?s===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:s===void 0?{inside:!1,outside:!1}:s===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}h_.peek=$M;function h_(e,t,n,r){const s=jM(n),a=n.enter("emphasis"),u=n.createTracker(r),c=u.move(s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=lc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ja(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=lc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Ja(m));const y=u.move(s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function $M(e,t,n){return n.options.emphasis||"*"}function VM(e,t){let n=!1;return vl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,Yf}),!!((!e.depth||e.depth<3)&&Df(e)&&(t.options.setext||n))}function qM(e,t,n,r){const s=Math.max(Math.min(6,e.depth||1),1),a=n.createTracker(r);if(VM(e,n)){const p=n.enter("headingSetext"),m=n.enter("phrasing"),b=n.containerPhrasing(e,fe(F({},a.current()),{before:`
|
|
40
40
|
`,after:`
|
|
41
41
|
`}));return m(),p(),b+`
|
|
42
42
|
`+(s===1?"=":"-").repeat(b.length-(Math.max(b.lastIndexOf("\r"),b.lastIndexOf(`
|
|
43
43
|
`))+1))}const u="#".repeat(s),c=n.enter("headingAtx"),d=n.enter("phrasing");a.move(u+" ");let f=n.containerPhrasing(e,F({before:"# ",after:`
|
|
44
|
-
`},a.current()));return/^[\t ]/.test(f)&&(f=
|
|
45
|
-
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,_,A,v){return f(p(y,A,v),y.align)}function c(y,_,A,v){const w=m(y,A,v),
|
|
46
|
-
`))}function d(y,_,A,v){const w=A.enter("tableCell"),N=A.enter("phrasing"),C=A.containerPhrasing(y,de(F({},v),{before:a,after:a}));return N(),w(),C}function f(y,_){return kM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let w=-1;const N=[],C=_.enter("table");for(;++w<v.length;)N[w]=m(v[w],_,A);return C(),N}function m(y,_,A){const v=y.children;let w=-1;const N=[],C=_.enter("tableRow");for(;++w<v.length;)N[w]=d(v[w],y,_,A);return C(),N}function b(y,_,A){let v=S_.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function mF(){return{exit:{taskListCheckValueChecked:w_,taskListCheckValueUnchecked:w_,paragraph:EF}}}function gF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:yF}}}function w_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function EF(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 s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[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 yF(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=S_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function TF(){return[Q8(),yM(),SM(),uF(),mF()]}function bF(e){return{extensions:[J8(),TM(e),xM(),pF(e),gF()]}}const _F={tokenize:vF,partial:!0},A_={tokenize:kF,partial:!0},C_={tokenize:NF,partial:!0},v_={tokenize:PF,partial:!0},SF={tokenize:OF,partial:!0},k_={name:"wwwAutolink",tokenize:AF,previous:P_},N_={name:"protocolAutolink",tokenize:CF,previous:O_},ui={name:"emailAutolink",tokenize:wF,previous:I_},jr={};function xF(){return{text:jr}}let _s=48;for(;_s<123;)jr[_s]=ui,_s++,_s===58?_s=65:_s===91&&(_s=97);jr[43]=ui,jr[45]=ui,jr[46]=ui,jr[95]=ui,jr[72]=[ui,N_],jr[104]=[ui,N_],jr[87]=[ui,k_],jr[119]=[ui,k_];function wF(e,t,n){const r=this;let s,a;return u;function u(m){return!pp(m)||!I_.call(r,r.previous)||mp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return pp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(SF,p,f)(m):m===45||m===95||En(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&An(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function AF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!P_.call(r,r.previous)||mp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(_F,e.attempt(A_,e.attempt(C_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function CF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&O_.call(r,r.previous)&&!mp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(An(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||El(m)||ft(m)||os(m)||yl(m)?n(m):e.attempt(A_,e.attempt(C_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function vF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function kF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(v_,d,c)(f):f===null||ft(f)||os(f)||f!==45&&yl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function NF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):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(v_,t,a)(u):u===null||ft(u)||os(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function PF(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),s):c===60||c===null||ft(c)||os(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||os(c)?t(c):r(c)}function a(c){return An(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):An(c)?(e.consume(c),u):n(c)}}function OF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return En(a)?n(a):t(a)}}function P_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function O_(e){return!An(e)}function I_(e){return!(e===47||pp(e))}function pp(e){return e===43||e===45||e===46||e===95||En(e)}function mp(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 IF={tokenize:HF,partial:!0};function RF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:FF,continuation:{tokenize:BF},exit:UF}},text:{91:{name:"gfmFootnoteCall",tokenize:MF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:LF,resolveTo:DF}}}}function LF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][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=pr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function DF(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.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",s,t],["exit",s,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 MF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ft(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(pr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ft(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function FF(e,t,n){const r=this,s=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||ft(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=pr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function BF(e,t,n){return e.check(xa,t,e.attempt(IF,t,n))}function UF(e){e.exit("gfmFootnoteDefinition")}function HF(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(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 zF(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Vn(b,b.length,0,Tl(y,u.slice(f+1,d),c)),Vn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Vn(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 m=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=Zs(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),w=Zs(_);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(_)}}}class jF{constructor(){this.map=[]}add(t,n,r){$F(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 s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function $F(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function VF(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function qF(){return{flow:{null:{name:"table",tokenize:YF,resolveAll:GF}}}}function YF(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const he=se>-1?r.events[se][1].type:null,ve=he==="tableHead"||he==="tableRow"?R:d;return ve===R&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Fe(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ft(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?b:m)}function b(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),A):Y(V)}function A(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),w):V===45?(a+=1,w(V)):V===null||Fe(V)?U(V):Y(V)}function w(V){return V===45?(e.enter("tableDelimiterFiller"),N(V)):Y(V)}function N(V){return V===45?(e.consume(V),N):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,U,"whitespace")(V):U(V)}function U(V){return V===124?_(V):V===null||Fe(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function R(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Fe(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ft(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?me:ne)}function me(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function GF(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new jF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(R_(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,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=cc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=cc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=cc(b,t,a,s,n,m)):u[1]!==0&&(m=cc(b,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&R_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=VF(t.events,n))}return e}function cc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Ao(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ao(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=Ao(t.events,n[2]),p=Ao(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},Ao(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function R_(e,t,n,r,s){const a=[],u=Ao(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ao(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const WF={name:"tasklistCheck",tokenize:KF};function XF(){return{text:{91:WF}}}function KF(e,t,n){const r=this;return s;function s(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 ft(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 Fe(d)?t(d):Ze(d)?e.check({tokenize:QF},t,n)(d):n(d)}}function QF(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function JF(e){return oE([xF(),RF(),zF(e),qF(),XF()])}const ZF={};function e9(e){const t=this,n=e||ZF,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(JF(n)),a.push(TF()),u.push(bF(n))}const dc=()=>S.jsx("span",{className:`${z}-blinking-cursor`,children:S.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),gp=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(QE,{remarkPlugins:[e9],rehypePlugins:[Jy],components:{h1:({children:s})=>S.jsx("h1",{className:G(e,`${z}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:G(e,`${z}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:G(e,`${z}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:G(e,`${z}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:G(e,`${z}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:G(e,`${z}-li`),children:s}),a:({href:s,children:a})=>S.jsx(sT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:G(e,`${z}-table-container`),children:S.jsx("table",{className:G(e,`${z}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:G(e,`${z}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:G(e,`${z}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:G(e,`${z}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:G(e,`${z}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:G(e,`${z}-td`),children:s}),span:({className:s,children:a})=>s===`${z}-blinking-cursor`?S.jsx(dc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),t9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return S.jsxs("div",{children:[S.jsxs("div",{className:G(e,`${z}-progress-message`,"standalone"),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:S.jsx(A1,{})}),S.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(pl,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(Ik,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx(Rk,{})]})}),n&&S.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&S.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},n9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(t9,{globalClassName:e,message:t}):S.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:S.jsx(A1,{})}),S.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),r9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return S.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Xs,{role:"img"})}),S.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(gp,{text:t.message})]})},L_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},fc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),D_=({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),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return S.jsxs("div",{className:G(e,`${z}-facets`),children:[S.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),S.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},Ja=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),i9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=L_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?S.jsxs("div",{className:G(e,`${z}-user-message standalone`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:S.jsx(v1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(D_,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(Ja,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:S.jsx(v1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(Ja,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},s9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:S.jsx(Xs,{})}),S.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(D_,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(Ja,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),o9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=L_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:b}=B.useMemo(()=>{var A,v,w;const _=typeof((A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(w=r==null?void 0:r.browseParams)==null?void 0:w.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?S.jsx(s9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:b,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?S.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:b||m,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:S.jsx(Xs,{})}),S.jsx("p",{className:G(e,`${z}-text bold embedded`),children:b||m}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(Ja,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},M_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Or(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?S.jsx(i9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(o9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx(r9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(q8,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(gp,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(V8,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx($8,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(n9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:S.jsxs(S.Fragment,{children:[S.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},a9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=er(),{entryType:u}=Zn();return S.jsxs(S.Fragment,{children:[u==="ask_cim"&&S.jsx(z8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),S.jsxs("div",{className:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${z}-message-group-child`,children:S.jsx(M_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(Ja,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(M_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},u9=({isOpen:e}={})=>{const{messages:t}=Or(),{autoScroll:n}=tt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},l9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},Ep=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=u9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(a9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&S.jsx("div",{style:F(F({},l9),s),children:S.jsx(dc,{})}),S.jsx("div",{ref:a})]})},F_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Or();return op()?r?S.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[S.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),children:S.jsx(Ep,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(Eh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:S.jsxs(Q5,{componentType:"chat",children:[S.jsx(r_,{componentType:"chat"}),S.jsx(uT,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},B_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(d9,()=>!1,()=>!0),{getRootNode:u}=oc();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return S.jsx(S.Fragment,{children:t});const c=r!=null?r:c9(u);return S.jsx(S.Fragment,{children:B.Children.map(t,f=>Ws.createPortal(f,c))})},c9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return hs(n)?n:Dr(t).body},d9=()=>()=>{},U_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=Zn(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:b}=Or(),y=op(),{isOpen:_}=s||{},A=r==="standalone",v=()=>{ei(!1)};return y?d?S.jsx(Jb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:S.jsx(B_,{children:S.jsx(np,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:S.jsxs(ep,{className:G(e,`${z}-dialog-content`,{standalone:A,embedded:!A}),children:[S.jsx(n_,{componentType:"dialog",onClearChat:b,onClose:v}),S.jsx(tp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:S.jsx(Ep,{isWidgetStandalone:A,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(Eh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},H_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=Zn(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Or(),{isOpen:m}=s||{},b=r==="standalone",y=op(),_=({open:v})=>{ei(v)},A=()=>{ei(!1)};return y?u?S.jsx(Jb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:S.jsx(B_,{children:S.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[S.jsx(Gb,{className:G(e,`${z}-modal-backdrop`)}),S.jsx(np,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:S.jsxs(ep,{className:G(e,`${z}-modal-content`,{standalone:b,embedded:!b}),children:[S.jsx(n_,{componentType:"modal",onClearChat:p,onClose:A}),S.jsx(tp,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:S.jsx(Ep,{isWidgetStandalone:b,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(Eh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},f9=()=>{const e=Zn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(Pk,{}):t==="dialog"?S.jsx(U_,{}):t==="modal"?S.jsx(H_,{}):S.jsx(F_,{})},h9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=bf();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return Uv(a),()=>{Hv(a)}},[e,t,n,r,s])},p9=()=>{const{copilot:e}=er(),{entryType:t,activePromptsId:n,params:r}=ti(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=bf(),{getCopilotSuggestions:f}=h1();h9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),b=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{s(!0),d(!1)},[s,d]);return B.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",b),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",b),e.off("error",y)}},[e,m,b,y]),null},z_={copilot:"Ask Copilot",messaging:"Ask a question"},m9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ti(),u=s||z_[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return S.jsxs("form",{className:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:S.jsx(Zh,{className:G(n,`${z}-prompts-input-icon`)})}),S.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ni,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Xs,{}),disabled:f})]})},g9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ti(),r=n||z_[t];return S.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[S.jsx(Zh,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:G(e,`${z}-prompts-header-text`),children:r})]})},j_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return S.jsxs("button",{className:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(ap,{icon:a,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},E9="Ask me something else",y9=({label:e,disabled:t=!1})=>S.jsx(j_,{label:e||E9,disabled:t,onClick:()=>ei(!0)}),T9=({sendCopilotPrompt:e})=>{var N,C;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ti(),p=d==="override"&&c.length>0,m=s?(C=(N=n==null?void 0:n.suggestions)==null?void 0:N.map(U=>U.displayText.trim()).filter(Boolean))!=null?C:[]:[];let b;p?b=c:d==="prepend"?b=[...c,...m]:b=[...m,...c];const y=s?Array.from(new Set(b)):[],_=!s,v=y.length>0&&!a&&!f,w=U=>()=>{const Y=U.trim();Y&&e(Y)};return S.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[_&&S.jsx(dc,{}),y.map(U=>S.jsx(j_,{label:U,disabled:r,onClick:w(U)},U)),v&&S.jsx(y9,{label:u,disabled:r})]})},b9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ti();return!n||!t?null:S.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:S.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},_9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ti();return!n||!r&&!s?null:s?S.jsx(dc,{}):r?S.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:S.jsx(gp,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},S9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=er(),{handleCopilotRequestAck:s}=Gs(),{status:{isOpen:a}}=Zn(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ti(),b=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:A,setResponseMessage:v,setIsResponseLoading:w}=bf(),[N,C]=B.useState(null);B.useEffect(()=>{if(!d||N)return;const Y=document.getElementById(d);Y&&C(Y)},[d,N]);const U=B.useCallback(Y=>{if(!r||!f||!p)return;const R=ne=>{c?(v(null),A(Y),_(ne.id),w(!0)):(a||ei(!0),s(ne))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,R);break;case"search":r.search(F({searchParams:p},q),R);break;case"browse":r.browse(F({browseParams:p},q),R);break;case"pdp":r.productView(F(F({},p),q),R);break}},[r,c,f,p,a,_,v,A,w,s]);return!n||!u||!N||!f?null:Ws.createPortal(S.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[b&&S.jsx(m9,{onSubmit:U}),!b&&S.jsx(g9,{}),y&&S.jsx(T9,{sendCopilotPrompt:U}),S.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[S.jsx(b9,{}),S.jsx(_9,{})]})]}),N)},x9=()=>S.jsxs(S.Fragment,{children:[S.jsx(p9,{}),S.jsx(S9,{})]}),yp=e=>S.jsxs(p1,de(F({},e),{children:[S.jsx(f9,{}),S.jsx(x9,{})]}));var hc={},$_;function w9(){if($_)return hc;$_=1;var e=T1();return hc.createRoot=e.createRoot,hc.hydrateRoot=e.hydrateRoot,hc}var V_=w9();const A9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=cn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const b of m.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ys(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=V_.createRoot(b))==null||p.render(S.jsx(yp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ys(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:U_,CopilotEmbed:F_,CopilotModal:H_,CopilotWidget:yp,CopilotWidgetProvider:p1,eventHandlers:{search:Jv,browse:Lv,pdp:{setPdpContext:Jg,updatePdpProductId:Mv,updatePdpLink:Fv},components:{setEntryType:ha,toggleWidgetOpen:ei,toggleWidgetMinimized:ll,toggleModalFullscreen:Ef,setWidgetType:cl,setWidgetDialogPosition:yf,togglePromptsExtensionOpen:e1,togglePromptsExtensionInline:t1,loadPromptsComponent:qv,getAskCimPrompts:zv,getSearchPrompts:jv,getBrowsePrompts:$v,getProductViewPrompts:Vv},session:Yv},injectCopilotWidget:r=>{var s=r,{timeout:e,elementId:t}=s,n=cn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ys(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ys(!0,"warn","Container element not found for id:",t),Ys(!0,"warn","Beginning observation for element"),A9(F({elementId:t,timeout:e},n));return}V_.createRoot(a).render(S.jsx(yp,F({},n)))},state:()=>Object.freeze({search:Object.freeze(yt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(hr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));
|
|
44
|
+
`},a.current()));return/^[\t ]/.test(f)&&(f=Ja(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}p_.peek=YM;function p_(e){return e.value||""}function YM(){return"<"}m_.peek=GM;function m_(e,t,n,r){const s=fp(n),a=s==='"'?"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,F({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,F({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${a}`),f+=d.move(" "+s),f+=d.move(n.safe(e.title,F({before:f,after:s},d.current()))),f+=d.move(s),c()),f+=d.move(")"),u(),f}function GM(){return"!"}g_.peek=WM;function g_(e,t,n,r){const s=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,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function WM(){return"!"}E_.peek=XM;function E_(e,t,n){let r=e.value||"",s="`",a=-1;for(;new RegExp("(^|[^`])"+s+"([^`]|$)").test(r);)s+="`";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 s+r+s}function XM(){return"`"}function y_(e,t){const n=Df(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))}T_.peek=KM;function T_(e,t,n,r){const s=fp(n),a=s==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(y_(e,n)){const p=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,F({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=p,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,F({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,F({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,F({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${a}`),f+=u.move(" "+s),f+=u.move(n.safe(e.title,F({before:f,after:s},u.current()))),f+=u.move(s),d()),f+=u.move(")"),c(),f}function KM(e,t,n){return y_(e,n)?"<":"["}b_.peek=QM;function b_(e,t,n,r){const s=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,F({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const p=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),F({before:d,after:"]"},c.current()));return u(),n.stack=p,a(),s==="full"||!f||f!==m?d+=c.move(m+"]"):s==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function QM(){return"["}function hp(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 JM(e){const t=hp(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 ZM(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 __(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 eF(e,t,n,r){const s=n.enter("list"),a=n.bulletCurrent;let u=e.ordered?ZM(n):hp(n);const c=e.ordered?u==="."?")":".":JM(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),__(n)===u&&p){let m=-1;for(;++m<e.children.length;){const b=e.children[m];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,s(),f}function tF(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 nF(e,t,n,r){const s=tF(n);let a=n.bulletCurrent||hp(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;(s==="tab"||s==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(a+" ".repeat(u-a.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),p);return d(),f;function p(m,b,y){return b?(y?"":" ".repeat(u))+m:(y?a:a+" ".repeat(u-a.length))+m}}function rF(e,t,n,r){const s=n.enter("paragraph"),a=n.enter("phrasing"),u=n.containerPhrasing(e,r);return a(),s(),u}const iF=Al(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function sF(e,t,n,r){return(e.children.some(function(u){return iF(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function oF(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}S_.peek=aF;function S_(e,t,n,r){const s=oF(n),a=n.enter("strong"),u=n.createTracker(r),c=u.move(s+s);let d=u.move(n.containerPhrasing(e,F({after:s,before:c},u.current())));const f=d.charCodeAt(0),p=lc(r.before.charCodeAt(r.before.length-1),f,s);p.inside&&(d=Ja(f)+d.slice(1));const m=d.charCodeAt(d.length-1),b=lc(r.after.charCodeAt(0),m,s);b.inside&&(d=d.slice(0,-1)+Ja(m));const y=u.move(s+s);return a(),n.attentionEncodeSurroundingInfo={after:b.outside,before:p.outside},c+d+y}function aF(e,t,n){return n.options.strong||"*"}function uF(e,t,n,r){return n.safe(e.value,r)}function lF(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 cF(e,t,n){const r=(__(n)+(n.options.ruleSpaces?" ":"")).repeat(lF(n));return n.options.ruleSpaces?r.slice(0,-1):r}const x_={blockquote:RM,break:f_,code:UM,definition:zM,emphasis:h_,hardBreak:f_,heading:qM,html:p_,image:m_,imageReference:g_,inlineCode:E_,link:T_,linkReference:b_,list:eF,listItem:nF,paragraph:rF,root:sF,strong:S_,text:uF,thematicBreak:cF};function dF(){return{enter:{table:fF,tableData:w_,tableHeader:w_,tableRow:pF},exit:{codeText:mF,table:hF,tableData:pp,tableHeader:pp,tableRow:pp}}}function fF(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 hF(e){this.exit(e),this.data.inTable=void 0}function pF(e){this.enter({type:"tableRow",children:[]},e)}function pp(e){this.exit(e)}function w_(e){this.enter({type:"tableCell",children:[]},e)}function mF(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,gF));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function gF(e,t){return t==="|"?t:e}function EF(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,s=t.stringLength,a=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
|
|
45
|
+
`,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:b,table:u,tableCell:d,tableRow:c}};function u(y,_,A,v){return f(p(y,A,v),y.align)}function c(y,_,A,v){const w=m(y,A,v),k=f([w]);return k.slice(0,k.indexOf(`
|
|
46
|
+
`))}function d(y,_,A,v){const w=A.enter("tableCell"),k=A.enter("phrasing"),C=A.containerPhrasing(y,fe(F({},v),{before:a,after:a}));return k(),w(),C}function f(y,_){return OM(y,{align:_,alignDelimiters:r,padding:n,stringLength:s})}function p(y,_,A){const v=y.children;let w=-1;const k=[],C=_.enter("table");for(;++w<v.length;)k[w]=m(v[w],_,A);return C(),k}function m(y,_,A){const v=y.children;let w=-1;const k=[],C=_.enter("tableRow");for(;++w<v.length;)k[w]=d(v[w],y,_,A);return C(),k}function b(y,_,A){let v=x_.inlineCode(y,_,A);return A.stack.includes("tableCell")&&(v=v.replace(/\|/g,"\\$&")),v}}function yF(){return{exit:{taskListCheckValueChecked:A_,taskListCheckValueUnchecked:A_,paragraph:bF}}}function TF(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:_F}}}function A_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function bF(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 s=t.children;let a=-1,u;for(;++a<s.length;){const c=s[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 _F(e,t,n,r){const s=e.children[0],a=typeof e.checked=="boolean"&&s&&s.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);a&&c.move(u);let d=x_.listItem(e,t,n,F(F({},r),c.current()));return a&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(p){return p+u}}function SF(){return[eM(),_M(),AM(),dF(),yF()]}function xF(e){return{extensions:[tM(),SM(e),CM(),EF(e),TF()]}}const wF={tokenize:PF,partial:!0},C_={tokenize:OF,partial:!0},v_={tokenize:IF,partial:!0},N_={tokenize:RF,partial:!0},AF={tokenize:LF,partial:!0},k_={name:"wwwAutolink",tokenize:NF,previous:O_},P_={name:"protocolAutolink",tokenize:kF,previous:I_},ui={name:"emailAutolink",tokenize:vF,previous:R_},jr={};function CF(){return{text:jr}}let _s=48;for(;_s<123;)jr[_s]=ui,_s++,_s===58?_s=65:_s===91&&(_s=97);jr[43]=ui,jr[45]=ui,jr[46]=ui,jr[95]=ui,jr[72]=[ui,P_],jr[104]=[ui,P_],jr[87]=[ui,k_],jr[119]=[ui,k_];function vF(e,t,n){const r=this;let s,a;return u;function u(m){return!mp(m)||!R_.call(r,r.previous)||gp(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return mp(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(AF,p,f)(m):m===45||m===95||En(m)?(a=!0,e.consume(m),d):p(m)}function f(m){return e.consume(m),s=!0,d}function p(m){return a&&s&&An(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function NF(e,t,n){const r=this;return s;function s(u){return u!==87&&u!==119||!O_.call(r,r.previous)||gp(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(wF,e.attempt(C_,e.attempt(v_,a),n),n)(u))}function a(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function kF(e,t,n){const r=this;let s="",a=!1;return u;function u(m){return(m===72||m===104)&&I_.call(r,r.previous)&&!gp(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),s+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(An(m)&&s.length<5)return s+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const b=s.toLowerCase();if(b==="http"||b==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),a?f:(a=!0,d)):n(m)}function f(m){return m===null||El(m)||ft(m)||os(m)||yl(m)?n(m):e.attempt(C_,e.attempt(v_,p),n)(m)}function p(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function PF(e,t,n){let r=0;return s;function s(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),s):u===46&&r===3?(e.consume(u),a):n(u)}function a(u){return u===null?n(u):t(u)}}function OF(e,t,n){let r,s,a;return u;function u(f){return f===46||f===95?e.check(N_,d,c)(f):f===null||ft(f)||os(f)||f!==45&&yl(f)?d(f):(a=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(s=r,r=void 0),e.consume(f),u}function d(f){return s||r||!a?n(f):t(f)}}function IF(e,t){let n=0,r=0;return s;function s(u){return u===40?(n++,e.consume(u),s):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(N_,t,a)(u):u===null||ft(u)||os(u)?t(u):(e.consume(u),s)}function a(u){return u===41&&r++,e.consume(u),s}}function RF(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),s):c===60||c===null||ft(c)||os(c)?t(c):n(c)}function s(c){return c===null||c===40||c===91||ft(c)||os(c)?t(c):r(c)}function a(c){return An(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):An(c)?(e.consume(c),u):n(c)}}function LF(e,t,n){return r;function r(a){return e.consume(a),s}function s(a){return En(a)?n(a):t(a)}}function O_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||ft(e)}function I_(e){return!An(e)}function R_(e){return!(e===47||mp(e))}function mp(e){return e===43||e===45||e===46||e===95||En(e)}function gp(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 DF={tokenize:$F,partial:!0};function MF(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:HF,continuation:{tokenize:zF},exit:jF}},text:{91:{name:"gfmFootnoteCall",tokenize:UF},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:FF,resolveTo:BF}}}}function FF(e,t,n){const r=this;let s=r.events.length;const a=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;s--;){const d=r.events[s][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=pr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!a.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function BF(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)},s={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};s.end.column++,s.end.offset++,s.end._bufferIndex++;const a={type:"gfmFootnoteCallString",start:Object.assign({},s.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",s,t],["exit",s,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 UF(e,t,n){const r=this,s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let a=0,u;return c;function c(m){return e.enter("gfmFootnoteCall"),e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),d}function d(m){return m!==94?n(m):(e.enter("gfmFootnoteCallMarker"),e.consume(m),e.exit("gfmFootnoteCallMarker"),e.enter("gfmFootnoteCallString"),e.enter("chunkString").contentType="string",f)}function f(m){if(a>999||m===93&&!u||m===null||m===91||ft(m))return n(m);if(m===93){e.exit("chunkString");const b=e.exit("gfmFootnoteCallString");return s.includes(pr(r.sliceSerialize(b)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return ft(m)||(u=!0),a++,e.consume(m),m===92?p:f}function p(m){return m===91||m===92||m===93?(e.consume(m),a++,f):f(m)}}function HF(e,t,n){const r=this,s=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||ft(_))return n(_);if(_===93){e.exit("chunkString");const A=e.exit("gfmFootnoteDefinitionLabelString");return a=pr(r.sliceSerialize(A)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(_),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),b}return ft(_)||(c=!0),u++,e.consume(_),_===92?m:p}function m(_){return _===91||_===92||_===93?(e.consume(_),u++,p):p(_)}function b(_){return _===58?(e.enter("definitionMarker"),e.consume(_),e.exit("definitionMarker"),s.includes(a)||s.push(a),nt(e,y,"gfmFootnoteDefinitionWhitespace")):n(_)}function y(_){return t(_)}}function zF(e,t,n){return e.check(wa,t,e.attempt(DF,t,n))}function jF(e){e.exit("gfmFootnoteDefinition")}function $F(e,t,n){const r=this;return nt(e,s,"gfmFootnoteDefinitionIndent",5);function s(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 VF(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:a,resolveAll:s};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function s(u,c){let d=-1;for(;++d<u.length;)if(u[d][0]==="enter"&&u[d][1].type==="strikethroughSequenceTemporary"&&u[d][1]._close){let f=d;for(;f--;)if(u[f][0]==="exit"&&u[f][1].type==="strikethroughSequenceTemporary"&&u[f][1]._open&&u[d][1].end.offset-u[d][1].start.offset===u[f][1].end.offset-u[f][1].start.offset){u[d][1].type="strikethroughSequence",u[f][1].type="strikethroughSequence";const p={type:"strikethrough",start:Object.assign({},u[f][1].start),end:Object.assign({},u[d][1].end)},m={type:"strikethroughText",start:Object.assign({},u[f][1].end),end:Object.assign({},u[d][1].start)},b=[["enter",p,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],y=c.parser.constructs.insideSpan.null;y&&Vn(b,b.length,0,Tl(y,u.slice(f+1,d),c)),Vn(b,b.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",p,c]]),Vn(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 m=0;return b;function b(_){return f===126&&p[p.length-1][1].type!=="characterEscape"?d(_):(u.enter("strikethroughSequenceTemporary"),y(_))}function y(_){const A=Zs(f);if(_===126)return m>1?d(_):(u.consume(_),m++,y);if(m<2&&!n)return d(_);const v=u.exit("strikethroughSequenceTemporary"),w=Zs(_);return v._open=!w||w===2&&!!A,v._close=!A||A===2&&!!w,c(_)}}}class qF{constructor(){this.map=[]}add(t,n,r){YF(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 s=r.pop();for(;s;){for(const a of s)t.push(a);s=r.pop()}this.map.length=0}}function YF(e,t,n,r){let s=0;if(!(n===0&&r.length===0)){for(;s<e.map.length;){if(e.map[s][0]===t){e.map[s][1]+=n,e.map[s][2].push(...r);return}s+=1}e.map.push([t,n,r])}}function GF(e,t){let n=!1;const r=[];for(;t<e.length;){const s=e[t];if(n){if(s[0]==="enter")s[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(s[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const a=r.length-1;r[a]=r[a]==="left"?"center":"right"}}else if(s[1].type==="tableDelimiterRow")break}else s[0]==="enter"&&s[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function WF(){return{flow:{null:{name:"table",tokenize:XF,resolveAll:KF}}}}function XF(e,t,n){const r=this;let s=0,a=0,u;return c;function c(V){let se=r.events.length-1;for(;se>-1;){const re=r.events[se][1].type;if(re==="lineEnding"||re==="linePrefix")se--;else break}const pe=se>-1?r.events[se][1].type:null,ve=pe==="tableHead"||pe==="tableRow"?L:d;return ve===L&&r.parser.lazy[r.now().line]?n(V):ve(V)}function d(V){return e.enter("tableHead"),e.enter("tableRow"),f(V)}function f(V){return V===124||(u=!0,a+=1),p(V)}function p(V){return V===null?n(V):Fe(V)?a>1?(a=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(V),e.exit("lineEnding"),y):n(V):Ze(V)?nt(e,p,"whitespace")(V):(a+=1,u&&(u=!1,s+=1),V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),u=!0,p):(e.enter("data"),m(V)))}function m(V){return V===null||V===124||ft(V)?(e.exit("data"),p(V)):(e.consume(V),V===92?b:m)}function b(V){return V===92||V===124?(e.consume(V),m):m(V)}function y(V){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(V):(e.enter("tableDelimiterRow"),u=!1,Ze(V)?nt(e,_,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(V):_(V))}function _(V){return V===45||V===58?v(V):V===124?(u=!0,e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),A):Y(V)}function A(V){return Ze(V)?nt(e,v,"whitespace")(V):v(V)}function v(V){return V===58?(a+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),w):V===45?(a+=1,w(V)):V===null||Fe(V)?H(V):Y(V)}function w(V){return V===45?(e.enter("tableDelimiterFiller"),k(V)):Y(V)}function k(V){return V===45?(e.consume(V),k):V===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(V),e.exit("tableDelimiterMarker"),C):(e.exit("tableDelimiterFiller"),C(V))}function C(V){return Ze(V)?nt(e,H,"whitespace")(V):H(V)}function H(V){return V===124?_(V):V===null||Fe(V)?!u||s!==a?Y(V):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(V)):Y(V)}function Y(V){return n(V)}function L(V){return e.enter("tableRow"),q(V)}function q(V){return V===124?(e.enter("tableCellDivider"),e.consume(V),e.exit("tableCellDivider"),q):V===null||Fe(V)?(e.exit("tableRow"),t(V)):Ze(V)?nt(e,q,"whitespace")(V):(e.enter("data"),ne(V))}function ne(V){return V===null||V===124||ft(V)?(e.exit("data"),q(V)):(e.consume(V),V===92?de:ne)}function de(V){return V===92||V===124?(e.consume(V),ne):ne(V)}}function KF(e,t){let n=-1,r=!0,s=0,a=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,p,m;const b=new qF;for(;++n<e.length;){const y=e[n],_=y[1];y[0]==="enter"?_.type==="tableHead"?(c=!1,d!==0&&(L_(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,m=void 0,a=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,p={type:"tableBody",start:Object.assign({},_.start),end:Object.assign({},_.end)},b.add(n,0,[["enter",p,t]])),s=_.type==="tableDelimiterRow"?2:p?3:1):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(a[1]!==0&&(u[0]=u[1],m=cc(b,t,a,s,void 0,m),a=[0,0,0,0]),u[2]=n)):_.type==="tableCellDivider"&&(r?r=!1:(a[1]!==0&&(u[0]=u[1],m=cc(b,t,a,s,void 0,m)),a=u,u=[a[1],n,0,0])):_.type==="tableHead"?(c=!0,d=n):_.type==="tableRow"||_.type==="tableDelimiterRow"?(d=n,a[1]!==0?(u[0]=u[1],m=cc(b,t,a,s,n,m)):u[1]!==0&&(m=cc(b,t,u,s,n,m)),s=0):s&&(_.type==="data"||_.type==="tableDelimiterMarker"||_.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&L_(b,t,d,f,p),b.consume(t.events),n=-1;++n<t.events.length;){const y=t.events[n];y[0]==="enter"&&y[1].type==="table"&&(y[1]._align=GF(t.events,n))}return e}function cc(e,t,n,r,s,a){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(a.end=Object.assign({},Ao(t.events,n[0])),e.add(n[0],0,[["exit",a,t]]));const d=Ao(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=Ao(t.events,n[2]),p=Ao(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},p)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const b=t.events[n[2]],y=t.events[n[3]];if(b[1].end=Object.assign({},y[1].end),b[1].type="chunkText",b[1].contentType="text",n[3]>n[2]+1){const _=n[2]+1,A=n[3]-n[2]-1;e.add(_,A,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return s!==void 0&&(a.end=Object.assign({},Ao(t.events,s)),e.add(s,0,[["exit",a,t]]),a=void 0),a}function L_(e,t,n,r,s){const a=[],u=Ao(t.events,n);s&&(s.end=Object.assign({},u),a.push(["exit",s,t])),r.end=Object.assign({},u),a.push(["exit",r,t]),e.add(n+1,0,a)}function Ao(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const QF={name:"tasklistCheck",tokenize:ZF};function JF(){return{text:{91:QF}}}function ZF(e,t,n){const r=this;return s;function s(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 ft(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 Fe(d)?t(d):Ze(d)?e.check({tokenize:e9},t,n)(d):n(d)}}function e9(e,t,n){return nt(e,r,"whitespace");function r(s){return s===null?n(s):t(s)}}function t9(e){return aE([CF(),MF(),VF(e),WF(),JF()])}const n9={};function r9(e){const t=this,n=e||n9,r=t.data(),s=r.micromarkExtensions||(r.micromarkExtensions=[]),a=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);s.push(t9(n)),a.push(SF()),u.push(xF(n))}const dc=()=>S.jsx("span",{className:`${z}-blinking-cursor`,children:S.jsx("svg",{height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:S.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})}),Ep=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r})=>S.jsx(JE,{remarkPlugins:[r9],rehypePlugins:[Zy],components:{h1:({children:s})=>S.jsx("h1",{className:G(e,`${z}-header h1`),children:s}),h2:({children:s})=>S.jsx("h2",{className:G(e,`${z}-header h2`),children:s}),h3:({children:s})=>S.jsx("h3",{className:G(e,`${z}-header h3`),children:s}),ul:({children:s})=>S.jsx("ul",{className:G(e,`${z}-ul`),children:s}),ol:({children:s})=>S.jsx("ol",{className:G(e,`${z}-ol`),children:s}),li:({children:s})=>S.jsx("li",{className:G(e,`${z}-li`),children:s}),a:({href:s,children:a})=>S.jsx(oT,{globalClassName:e,openLinksInNewTab:t,href:s,children:a}),table:({children:s})=>S.jsx("div",{className:G(e,`${z}-table-container`),children:S.jsx("table",{className:G(e,`${z}-table`),children:s})}),thead:({children:s})=>S.jsx("thead",{className:G(e,`${z}-thead`),children:s}),tbody:({children:s})=>S.jsx("tbody",{className:G(e,`${z}-tbody`),children:s}),tr:({children:s})=>S.jsx("tr",{className:G(e,`${z}-tr`),children:s}),th:({children:s})=>S.jsx("th",{className:G(e,`${z}-th`),children:s}),td:({children:s})=>S.jsx("td",{className:G(e,`${z}-td`),children:s}),span:({className:s,children:a})=>s===`${z}-blinking-cursor`?S.jsx(dc,{}):S.jsx("span",{children:a})},children:r+(n?`<span className='${z}-blinking-cursor'></span>`:"")}),i9=({globalClassName:e,message:t})=>{const[n,r]=B.useState(!1),s=t.tool_name||t.toolName,a=!!t.thought,u=!!s,c=()=>{r(d=>!d)};return S.jsxs("div",{children:[S.jsxs("div",{className:G(e,`${z}-progress-message`,"standalone"),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","standalone"),children:S.jsx(C1,{})}),S.jsx("p",{className:G(e,`${z}-progress-text`,"standalone"),children:t.message})]}),(a||u)&&S.jsxs(S.Fragment,{children:[S.jsx(pl,{className:G(e,`${z}-thought-context-button`),onClick:c,children:n?S.jsxs(S.Fragment,{children:["Hide ",S.jsx(DN,{})]}):S.jsxs(S.Fragment,{children:["Context ",S.jsx(MN,{})]})}),n&&S.jsx("div",{className:G(e,`${z}-thought-container`),children:a&&S.jsx("p",{className:G(e,`${z}-progress-thought`),children:t.thought})})]})]})},s9=({globalClassName:e,message:t,isWidgetStandalone:n})=>n?S.jsx(i9,{globalClassName:e,message:t}):S.jsxs("div",{className:G(e,`${z}-progress-message`,"embedded"),title:t.message,children:[S.jsx("span",{className:G(e,`${z}-message-icon`,"progress-icon","embedded"),children:S.jsx(C1,{})}),S.jsx("i",{className:G(e,`${z}-progress-text`,"embedded"),children:t.message})]}),o9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var s;const r=(s=t.searchParams)==null?void 0:s.query;return S.jsxs("div",{className:G(e,`${z}-refined-event`,{embedded:!n,standalone:n}),children:[!!r&&S.jsxs("div",{className:G(e,`${z}-refined-event-query`,{embedded:!n,standalone:n}),children:[S.jsx("span",{className:G(e,`${z}-message-icon`,`${z}-refined-event-icon`,{embedded:!n,standalone:n}),children:S.jsx(Xs,{role:"img"})}),S.jsx("p",{className:G(e,`${z}-text`,`${z}-refined-event-query-text`,"bold",{embedded:!n,standalone:n}),children:r})]}),S.jsx(Ep,{text:t.message})]})},D_=e=>{var d,f;const{configModule:t}=tt(),n=((d=e.request)==null?void 0:d.searchParams)||((f=e.request)==null?void 0:f.browseParams),r=(t==null?void 0:t.getProductHiddenFields())||[],{facetFilters:s={}}=n||{facetFilters:{}},a=Object.fromEntries(Object.entries(s).filter(([p])=>!r.includes(p))),u=Object.keys(a),c=Object.values(a).reduce((p,m)=>p+m.length,0);return{facetFiltersList:u,filterCount:c}},fc=({isWidgetStandalone:e,globalClassName:t,filterCount:n})=>S.jsx("span",{className:G(t,`${z}-facet-pill`,{standalone:e,embedded:!e}),children:`${n} filter${n!==1?"s":""}`}),M_=({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),s=(r==null?void 0:r.facetFilters)||{};return n.map(c=>{var f;const d=((f=s[c])==null?void 0:f.join(", "))||"";return S.jsxs("div",{className:G(e,`${z}-facets`),children:[S.jsx("p",{className:G(e,`${z}-facet-category`),children:c}),S.jsx("p",{className:G(e,`${z}-facet-values`),children:d})]},c)})},Za=({globalClassName:e,timestamp:t,isWidgetStandalone:n})=>S.jsx("span",{className:G(e,`${z}-message-timestamp`,n?"standalone":"embedded"),title:t,children:t}),a9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var f,p;const{request:r,createdAt:s}=t,{facetFiltersList:a,filterCount:u}=D_(t),c=new Date(s).toLocaleString(),d=(f=r==null?void 0:r.attachments)==null?void 0:f.image;return n?S.jsxs("div",{className:G(e,`${z}-user-message standalone`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image standalone`),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon standalone`),children:S.jsx(N1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text`,"standalone"),children:r==null?void 0:r.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:u})]}),S.jsx(M_,{globalClassName:e,facetFiltersList:a,message:t}),S.jsx(Za,{globalClassName:e,timestamp:c,isWidgetStandalone:!0})]}):S.jsxs("div",{className:G(e,`${z}-user-message embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-message-row embedded`),children:[d?S.jsx("img",{className:G(e,`${z}-user-message-image`,"embedded"),src:d,alt:"User provided context",loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-message-icon embedded`),children:S.jsx(N1,{})}),S.jsx("p",{className:G(e,`${z}-user-message-text embedded`),children:(p=t.request)==null?void 0:p.userPrompt}),a.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:u})]}),S.jsx(Za,{globalClassName:e,timestamp:c,isWidgetStandalone:!1})]})},u9=({globalClassName:e,timestamp:t,actionLabel:n,query:r,queryLabel:s,message:a,facetFiltersList:u,filterCount:c,imageData:d})=>S.jsxs("div",{className:G(e,`${z}-user-search standalone`),children:[S.jsxs("div",{children:[S.jsxs("div",{className:G(e,`${z}-user-search-query standalone`),children:[d?S.jsx("img",{className:G(e,`${z}-user-search-image standalone`),src:d,alt:s||r,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon standalone`),children:S.jsx(Xs,{})}),S.jsx("p",{className:G(e,`${z}-text bold`),children:`${n}: ${s||r}`}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!0,globalClassName:e,filterCount:c})]}),S.jsx(M_,{globalClassName:e,facetFiltersList:u,message:a})]}),S.jsx(Za,{globalClassName:e,timestamp:t,isWidgetStandalone:!0})]}),l9=({globalClassName:e,message:t,isWidgetStandalone:n})=>{var y;const{request:r,name:s,createdAt:a}=t,{facetFiltersList:u,filterCount:c}=D_(t),d=new Date(a).toLocaleString(),f=(y=r==null?void 0:r.attachments)==null?void 0:y.image,{actionLabel:p,query:m,queryLabel:b}=B.useMemo(()=>{var A,v,w;const _=typeof((A=r==null?void 0:r.clientContext)==null?void 0:A.cimLabel)=="string"?(v=r==null?void 0:r.clientContext)==null?void 0:v.cimLabel:r==null?void 0:r.label;switch(s){case"copilot_search":return{actionLabel:"Your search",query:r==null?void 0:r.searchParams.query,queryLabel:""};case"copilot_browse":return{actionLabel:"Browsing category",query:(w=r==null?void 0:r.browseParams)==null?void 0:w.categoryId,queryLabel:_||""};case"product_view":return{actionLabel:"Viewing product",query:r==null?void 0:r.productId,queryLabel:_||""};default:return{actionLabel:"",query:"",queryLabel:""}}},[s,r]);return m?n?S.jsx(u9,{globalClassName:e,timestamp:d,message:t,actionLabel:p,query:m,queryLabel:b,facetFiltersList:u,filterCount:c}):S.jsxs("div",{className:G(e,`${z}-user-search embedded`),children:[S.jsxs("div",{className:G(e,`${z}-user-search-query embedded`),children:[f?S.jsx("img",{className:G(e,`${z}-user-search-image embedded`),src:f,alt:b||m,loading:"lazy"}):S.jsx("span",{className:G(e,`${z}-message-icon user-search-icon embedded`),children:S.jsx(Xs,{})}),S.jsx("p",{className:G(e,`${z}-text bold embedded`),children:b||m}),u.length>0&&S.jsx(fc,{isWidgetStandalone:!1,filterCount:c})]}),S.jsx(Za,{globalClassName:e,timestamp:d,isWidgetStandalone:!1})]}):null},F_=({message:e,globalClassName:t,openLinksInNewTab:n,resetConversationMessage:r,entryType:s,isWidgetStandalone:a,handleSuggestionClick:u})=>{var b;const{isLoading:c,isResponseLoading:d}=Or(),f=c&&d((e==null?void 0:e.eventSourceId)||"")&&e.name==="partial_inquiry";if(!e)return null;const p=e.name,m=!!((b=e.request)!=null&&b.userPrompt);switch(p){case"ask_cim":case"copilot_search":case"copilot_browse":case"product_view":return m?S.jsx(a9,{globalClassName:t,isWidgetStandalone:a,message:e}):S.jsx(l9,{globalClassName:t,message:e,isWidgetStandalone:a});case"faceted_navigation":return null;case"refined_search":case"refined_browse":return S.jsx(o9,{globalClassName:t,message:e,isWidgetStandalone:a});case"follow_up":return S.jsx(W8,{globalClassName:t,entryType:s,isWidgetStandalone:a,message:e,handleSuggestionClick:u});case"inquiry":case"partial_inquiry":return S.jsx(Ep,{globalClassName:t,openLinksInNewTab:n,showIsLoading:f,text:e.message});case"error":return S.jsx(G8,{message:e,isWidgetStandalone:a});case"display_products":return S.jsx(Y8,{message:e,isWidgetStandalone:a});case"progress":return S.jsx(s9,{globalClassName:t,isWidgetStandalone:a,message:e});case"conversation_reset":return s==="ask_cim"?null:S.jsxs(S.Fragment,{children:[S.jsx("p",{className:G(t,`${z}-reset-message`),children:"This conversation has been reset."}),S.jsx("p",{className:G(t,`${z}-start-search-message`),children:r||"What products would you like to explore today?"})]});default:return null}},c9=({isWidgetStandalone:e,handleSuggestionClick:t})=>{const{globalClassName:n,openLinksInNewTab:r,resetConversationMessage:s}=tt(),{groupedMessages:a}=er(),{entryType:u}=Zn();return S.jsxs(S.Fragment,{children:[u==="ask_cim"&&S.jsx(V8,{isWidgetStandalone:e}),a.map(c=>{if(c.messages&&c.type==="group"){let d=new Date(c.createdAt).toLocaleString();const f=c.messages[c.messages.length-1];return f&&(d=new Date(f.createdAt).toLocaleString()),S.jsxs("div",{className:G(n,`${z}-message-group`,e?"standalone":"embedded"),children:[c.messages.length>0&&c.messages.map(p=>S.jsx("div",{className:`${z}-message-group-child`,children:S.jsx(F_,{id:p.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:p,handleSuggestionClick:t})},p.id)),S.jsx(Za,{globalClassName:n,timestamp:d,isWidgetStandalone:e})]},`group-${c.eventSourceId}`)}else if(c.type==="individual"&&c.message)return S.jsx("div",{className:G(n,`${z}-message`,e?"standalone":"embedded",{error:c.message.name.includes("error")}),children:S.jsx(F_,{id:c.message.id,openLinksInNewTab:r,resetConversationMessage:s,entryType:u,globalClassName:n,isWidgetStandalone:e,message:c.message,handleSuggestionClick:t})},c.message.id);return null})]})},d9=({isOpen:e}={})=>{const{messages:t}=Or(),{autoScroll:n}=tt(),r=B.useRef(null);return B.useEffect(()=>{n&&r.current&&r.current.scrollIntoView({behavior:"smooth",block:"end"})},[t,n]),B.useEffect(()=>{e&&r.current&&r.current.scrollIntoView(!0)},[e]),r},f9={display:"flex",justifyContent:"flex-start",paddingBottom:"1rem"},yp=({isOpen:e,isWidgetStandalone:t,isLoading:n,handleSuggestionClick:r,loadingIndicatorStyle:s})=>{const a=d9({isOpen:e});return S.jsxs(S.Fragment,{children:[S.jsx(c9,{isWidgetStandalone:t,handleSuggestionClick:r}),n&&S.jsx("div",{style:F(F({},f9),s),children:S.jsx(dc,{})}),S.jsx("div",{ref:a})]})},B_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{copilot:r,isLoading:s,handleUserInput:a,handleSuggestion:u,resetConversation:c}=Or();return ap()?r?S.jsxs("div",{className:G(e,`${z}-container`,`${z}-embedded-chat`),style:t,children:[S.jsx("div",{className:G(e,`${z}-message-container`,`container-${n}`,"embedded"),children:S.jsx(yp,{isWidgetStandalone:!1,isLoading:s,handleSuggestionClick:u})}),S.jsx(yh,{componentType:"chat",className:"embedded-chat",isLoading:s,onSubmit:a}),S.jsx("div",{className:G(`${z}-embedded-chat-menu`),children:S.jsxs(e8,{componentType:"chat",children:[S.jsx(i_,{componentType:"chat"}),S.jsx(lT,{componentType:"chat",onClearChat:c})]})})]}):S.jsx("div",{children:"Loading Copilot..."}):null},U_=e=>{var d;const{children:t,disabled:n}=e,[r,s]=B.useState((d=e.container)==null?void 0:d.current),a=B.useSyncExternalStore(p9,()=>!1,()=>!0),{getRootNode:u}=oc();if(B.useEffect(()=>{s(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),a||n)return S.jsx(S.Fragment,{children:t});const c=r!=null?r:h9(u);return S.jsx(S.Fragment,{children:B.Children.map(t,f=>Ws.createPortal(f,c))})},h9=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return hs(n)?n:Dr(t).body},p9=()=>()=>{},H_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,dialogPosition:a,isDialogFullHeight:u,dialogWidth:c}=Zn(),{copilot:d,isLoading:f,handleUserInput:p,handleSuggestion:m,resetConversation:b}=Or(),y=ap(),{isOpen:_}=s||{},A=r==="standalone",v=()=>{ei(!1)};return y?d?S.jsx(Zb,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:y,children:S.jsx(U_,{children:S.jsx(rp,{className:G(e,`${z}-container`,`${z}-dialog`,a,u&&"full-height"),style:F(F({},t),c&&{width:c}),children:S.jsxs(tp,{className:G(e,`${z}-dialog-content`,{standalone:A,embedded:!A}),children:[S.jsx(r_,{componentType:"dialog",onClearChat:b,onClose:v}),S.jsx(np,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:A,embedded:!A}),children:S.jsx(yp,{isWidgetStandalone:A,isLoading:f,isOpen:_,handleSuggestionClick:m})}),S.jsx(yh,{componentType:"dialog",isLoading:f,onSubmit:p})]})})})}):S.jsx("div",{children:"Loading Copilot..."}):null},z_=()=>{const{globalClassName:e,themeVariables:t,messageAlignment:n}=tt(),{mode:r,status:s,isModalFullscreen:a}=Zn(),{copilot:u,isLoading:c,handleUserInput:d,handleSuggestion:f,resetConversation:p}=Or(),{isOpen:m}=s||{},b=r==="standalone",y=ap(),_=({open:v})=>{ei(v)},A=()=>{ei(!1)};return y?u?S.jsx(Zb,{lazyMount:!0,unmountOnExit:!0,open:y,onOpenChange:_,children:S.jsx(U_,{children:S.jsxs("div",{className:G(e,`${z}-modal-container`),style:t,children:[S.jsx(Wb,{className:G(e,`${z}-modal-backdrop`)}),S.jsx(rp,{className:G(e,`${z}-container`,`${z}-modal`,{fullscreen:a,standalone:b,embedded:!b}),children:S.jsxs(tp,{className:G(e,`${z}-modal-content`,{standalone:b,embedded:!b}),children:[S.jsx(r_,{componentType:"modal",onClearChat:p,onClose:A}),S.jsx(np,{className:G(e,`${z}-message-container`,`container-${n}`,{standalone:b,embedded:!b}),children:S.jsx(yp,{isWidgetStandalone:b,isLoading:c,isOpen:m,handleSuggestionClick:f,loadingIndicatorStyle:{paddingLeft:"1rem"}})}),S.jsx(yh,{componentType:"modal",isLoading:c,onSubmit:d})]})})]})})}):S.jsx("div",{children:"Loading Copilot..."}):null},m9=()=>{const e=Zn(),{status:{type:t,isMinimized:n}}=e||{status:{}};return n?S.jsx(RN,{}):t==="dialog"?S.jsx(H_,{}):t==="modal"?S.jsx(z_,{}):S.jsx(B_,{})},g9=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:s}=_f();B.useEffect(()=>{const a=u=>{const{property:c,value:d}=u.detail||{};!c||d===void 0||(c==="isOpen"&&e(d),c==="isInline"&&t(d),c==="elementId"&&n(d),c==="entryType"&&r(d),c==="params"&&s(d))};return jv(a),()=>{$v(a)}},[e,t,n,r,s])},E9=()=>{const{copilot:e}=er(),{entryType:t,activePromptsId:n,params:r}=ti(),{setIsInitialized:s,setActivePromptsId:a,setPromptsMessage:u,setResponseMessage:c,setIsResponseLoading:d}=_f(),{getCopilotSuggestions:f}=p1();g9();const p=B.useCallback(_=>{if(!t||!_)return;f(_,t,v=>{a(v.id)})},[t,f,a]);B.useEffect(()=>{!e||!t||!r||p(r)},[e,t,r,p]);const m=B.useCallback(_=>{_.eventSourceId===n&&(u(_),a(_.id),s(!0))},[n,u,a,s]),b=B.useCallback(_=>{(_==null?void 0:_.eventSourceId)===n&&(c(_),d(!1))},[n,c,d]),y=B.useCallback(()=>{s(!0),d(!1)},[s,d]);return B.useEffect(()=>{if(e)return e.on("follow_up",m),e.on("inquiry",b),e.on("error",y),()=>{e.off("follow_up",m),e.off("inquiry",b),e.off("error",y)}},[e,m,b,y]),null},j_={copilot:"Ask Copilot",messaging:"Ask a question"},y9=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=tt(),{placeholder:s,isResponseLoading:a}=ti(),u=s||j_[r],[c,d]=B.useState(""),f=t||a,p=m=>{const b=c.trim();b&&(m.preventDefault(),e(b),d(""))};return S.jsxs("form",{className:G(n,`${z}-prompts-input-container`),name:`${z}-prompts-form`,onSubmit:p,children:[S.jsx("label",{htmlFor:`${z}-prompts-input`,"aria-label":u,children:S.jsx(ep,{className:G(n,`${z}-prompts-input-icon`)})}),S.jsx("input",{id:`${z}-prompts-input`,className:G(n,`${z}-prompts-input`),name:`${z}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),S.jsx(ni,{className:G(n,`${z}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:S.jsx(Xs,{}),disabled:f})]})},T9=()=>{const{globalClassName:e,mode:t}=tt(),{placeholder:n}=ti(),r=n||j_[t];return S.jsxs("div",{className:G(e,`${z}-prompts-header`),children:[S.jsx(ep,{className:G(e,`${z}-prompts-input-icon`),"aria-hidden":"true"}),S.jsx("span",{className:G(e,`${z}-prompts-header-text`),children:r})]})},$_=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:s}=tt(),a=s==null?void 0:s.icon,u=(c=s==null?void 0:s.iconPosition)!=null?c:"left";return S.jsxs("button",{className:G(r,`${z}-prompts-button`,{"has-icon":!!a,"icon-right":!!a&&u==="right"}),disabled:t,onClick:n,children:[a&&S.jsx(up,{icon:a,className:`${z}-suggestion-button-icon`}),S.jsx("span",{children:e})]})},b9="Ask me something else",_9=({label:e,disabled:t=!1})=>S.jsx($_,{label:e||b9,disabled:t,onClick:()=>ei(!0)}),S9=({sendCopilotPrompt:e})=>{var k,C;const{globalClassName:t}=tt(),{promptsMessage:n,isResponseLoading:r,isInitialized:s,isInline:a,askElseButtonLabel:u,staticQuestions:c,staticQuestionsStrategy:d,disableAskElseButton:f}=ti(),p=d==="override"&&c.length>0,m=s?(C=(k=n==null?void 0:n.suggestions)==null?void 0:k.map(H=>H.displayText.trim()).filter(Boolean))!=null?C:[]:[];let b;p?b=c:d==="prepend"?b=[...c,...m]:b=[...m,...c];const y=s?Array.from(new Set(b)):[],_=!s,v=y.length>0&&!a&&!f,w=H=>()=>{const Y=H.trim();Y&&e(Y)};return S.jsxs("div",{className:G(t,`${z}-prompts-button-group`),children:[_&&S.jsx(dc,{}),y.map(H=>S.jsx($_,{label:H,disabled:r,onClick:w(H)},H)),v&&S.jsx(_9,{label:u,disabled:r})]})},x9=()=>{const{globalClassName:e}=tt(),{isInline:t,userPrompt:n}=ti();return!n||!t?null:S.jsx("div",{className:G(e,`${z}-prompts-user-message-container`),children:S.jsx("p",{className:G(e,`${z}-prompts-user-message`),children:n})})},w9=()=>{const{globalClassName:e,openLinksInNewTab:t}=tt(),{isInline:n,responseMessage:r,isResponseLoading:s}=ti();return!n||!r&&!s?null:s?S.jsx(dc,{}):r?S.jsx("div",{className:G(e,`${z}-prompts-response-container`,`${z}-message-container`),children:S.jsx(Ep,{globalClassName:e,openLinksInNewTab:t,text:r.message})}):null},A9=()=>{const{globalClassName:e,themeVariables:t}=tt(),{connected:n,copilot:r}=er(),{handleCopilotRequestAck:s}=Gs(),{status:{isOpen:a}}=Zn(),{isOpen:u,isInline:c,elementId:d,entryType:f,params:p,promptsDisplay:m}=ti(),b=m!=="buttons",y=m!=="input",{setActivePromptsId:_,setUserPrompt:A,setResponseMessage:v,setIsResponseLoading:w}=_f(),[k,C]=B.useState(null);B.useEffect(()=>{if(!d||k)return;const Y=document.getElementById(d);Y&&C(Y)},[d,k]);const H=B.useCallback(Y=>{if(!r||!f||!p)return;const L=ne=>{c?(v(null),A(Y),_(ne.id),w(!0)):(a||ei(!0),s(ne))},q={userPrompt:Y,clientContext:F({_cimEventSource:"prompts-extension"},c?{_cimPromptsExtensionInline:"true"}:{})};switch(f){case"ask_cim":r.askCim(q,L);break;case"search":r.search(F({searchParams:p},q),L);break;case"browse":r.browse(F({browseParams:p},q),L);break;case"pdp":r.productView(F(F({},p),q),L);break}},[r,c,f,p,a,_,v,A,w,s]);return!n||!u||!k||!f?null:Ws.createPortal(S.jsxs("div",{className:G(e,`${z}-prompts-extension-container`),style:t,children:[b&&S.jsx(y9,{onSubmit:H}),!b&&S.jsx(T9,{}),y&&S.jsx(S9,{sendCopilotPrompt:H}),S.jsxs("div",{className:G(e,`${z}-prompts-extension-messages-container`),children:[S.jsx(x9,{}),S.jsx(w9,{})]})]}),k)},C9=()=>S.jsxs(S.Fragment,{children:[S.jsx(E9,{}),S.jsx(A9,{})]}),Tp=e=>S.jsxs(m1,fe(F({},e),{children:[S.jsx(m9,{}),S.jsx(C9,{})]}));var hc={},V_;function v9(){if(V_)return hc;V_=1;var e=b1();return hc.createRoot=e.createRoot,hc.hydrateRoot=e.hydrateRoot,hc}var q_=v9();const N9=r=>{var s=r,{elementId:e,timeout:t=5e3}=s,n=cn(s,["elementId","timeout"]);let a;const u=(d,f)=>{var p;for(const m of d)if(m.type==="childList"&&m.addedNodes.length)for(const b of m.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(Ys(!0,"log","Target element found, rendering Copilot Widget"),f.disconnect(),clearTimeout(a),(p=q_.createRoot(b))==null||p.render(S.jsx(Tp,F({},n))))},c=new MutationObserver(u);return c.observe(document.body,{childList:!0,subtree:!0}),a=setTimeout(()=>{c.disconnect(),Ys(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),c};return Object.freeze(Object.defineProperty({__proto__:null,CopilotDialog:H_,CopilotEmbed:B_,CopilotModal:z_,CopilotWidget:Tp,CopilotWidgetProvider:m1,eventHandlers:{search:tN,browse:Fv,pdp:{setPdpContext:Zg,updatePdpProductId:Uv,updatePdpLink:Hv},components:{setEntryType:ha,toggleWidgetOpen:ei,toggleWidgetMinimized:pa,toggleModalFullscreen:yf,setWidgetType:cl,setWidgetDialogPosition:Tf,togglePromptsExtensionOpen:t1,togglePromptsExtensionInline:n1,loadPromptsComponent:Wv,getAskCimPrompts:Vv,getSearchPrompts:qv,getBrowsePrompts:Yv,getProductViewPrompts:Gv},session:Xv},injectCopilotWidget:r=>{var s=r,{timeout:e,elementId:t}=s,n=cn(s,["timeout","elementId"]);if(!n.apiKey&&!n.apiToken){Ys(!0,"error","Copilot Widget requires either apiKey or apiToken");return}const a=document.getElementById(t);if(!a){Ys(!0,"warn","Container element not found for id:",t),Ys(!0,"warn","Beginning observation for element"),N9(F({elementId:t,timeout:e},n));return}q_.createRoot(a).render(S.jsx(Tp,F({},n)))},state:()=>Object.freeze({search:Object.freeze(yt.state),browse:Object.freeze(ut.state),pdp:Object.freeze(hr.state),isConnected:Je.state.connected,isOpen:Je.isOpen,entryType:Je.entryType}),useCopilot:Or},Symbol.toStringTag,{value:"Module"}))}));
|