@cimulate/copilot-widget 1.55.3 → 1.55.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
- (function(Fe,Ke){typeof exports=="object"&&typeof module!="undefined"?Ke(exports):typeof define=="function"&&define.amd?define(["exports"],Ke):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ke(Fe.CimulateMessaging={}))})(this,(function(Fe){"use strict";var Hz=Object.defineProperty,$z=Object.defineProperties;var zz=Object.getOwnPropertyDescriptors;var Ef=Object.getOwnPropertySymbols;var XS=Object.prototype.hasOwnProperty,KS=Object.prototype.propertyIsEnumerable;var Oa=(Fe,Ke)=>(Ke=Symbol[Fe])?Ke:Symbol.for("Symbol."+Fe),Vz=Fe=>{throw TypeError(Fe)},bf=Math.pow,L0=(Fe,Ke,ht)=>Ke in Fe?Hz(Fe,Ke,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Fe[Ke]=ht,M=(Fe,Ke)=>{for(var ht in Ke||(Ke={}))XS.call(Ke,ht)&&L0(Fe,ht,Ke[ht]);if(Ef)for(var ht of Ef(Ke))KS.call(Ke,ht)&&L0(Fe,ht,Ke[ht]);return Fe},ce=(Fe,Ke)=>$z(Fe,zz(Ke));var _n=(Fe,Ke)=>{var ht={};for(var St in Fe)XS.call(Fe,St)&&Ke.indexOf(St)<0&&(ht[St]=Fe[St]);if(Fe!=null&&Ef)for(var St of Ef(Fe))Ke.indexOf(St)<0&&KS.call(Fe,St)&&(ht[St]=Fe[St]);return ht};var We=(Fe,Ke,ht)=>L0(Fe,typeof Ke!="symbol"?Ke+"":Ke,ht);var Ie=(Fe,Ke,ht)=>new Promise((St,Wt)=>{var Lt=Dt=>{try{bn(ht.next(Dt))}catch(Ln){Wt(Ln)}},qe=Dt=>{try{bn(ht.throw(Dt))}catch(Ln){Wt(Ln)}},bn=Dt=>Dt.done?St(Dt.value):Promise.resolve(Dt.value).then(Lt,qe);bn((ht=ht.apply(Fe,Ke)).next())}),ps=function(Fe,Ke){this[0]=Fe,this[1]=Ke},D0=(Fe,Ke,ht)=>{var St=(bn,Dt,Ln,vr)=>{try{var yo=ht[bn](Dt),hs=(Dt=yo.value)instanceof ps,ms=yo.done;Promise.resolve(hs?Dt[0]:Dt).then(Un=>hs?St(bn==="return"?bn:"next",Dt[1]?{done:Un.done,value:Un.value}:Un,Ln,vr):Ln({value:Un,done:ms})).catch(Un=>St("throw",Un,Ln,vr))}catch(Un){vr(Un)}},Wt=(bn,Dt,Ln,vr)=>qe[bn]=yo=>(Dt=new Promise((hs,ms,Un)=>(Un=()=>St(bn,yo,hs,ms),Lt?Lt.then(Un):Un())),vr=()=>Lt===Ln&&(Lt=0),Lt=Ln=Dt.then(vr,vr),Dt),Lt,qe={};return ht=ht.apply(Fe,Ke),qe[Oa("asyncIterator")]=()=>qe,Wt("next"),Wt("throw"),Wt("return"),qe},M0=Fe=>{var Ke=Fe[Oa("asyncIterator")],ht=!1,St,Wt={};return Ke==null?(Ke=Fe[Oa("iterator")](),St=Lt=>Wt[Lt]=qe=>Ke[Lt](qe)):(Ke=Ke.call(Fe),St=Lt=>Wt[Lt]=qe=>{if(ht){if(ht=!1,Lt==="throw")throw qe;return qe}return ht=!0,{done:!1,value:new ps(new Promise(bn=>{var Dt=Ke[Lt](qe);Dt instanceof Object||Vz("Object expected"),bn(Dt)}),1)}}),Wt[Oa("iterator")]=()=>Wt,St("next"),"throw"in Ke?St("throw"):Wt.throw=Lt=>{throw Lt},"return"in Ke&&St("return"),Wt},QS=(Fe,Ke,ht)=>(Ke=Fe[Oa("asyncIterator")])?Ke.call(Fe):(Fe=Fe[Oa("iterator")](),Ke={},ht=(St,Wt)=>(Wt=Fe[St])&&(Ke[St]=Lt=>new Promise((qe,bn,Dt)=>(Lt=Wt.call(Fe,Lt),Dt=Lt.done,Promise.resolve(Lt.value).then(Ln=>qe({value:Ln,done:Dt}),bn)))),ht("next"),ht("return"),Ke);var Ke=document.createElement("style");Ke.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:50%;padding:.25rem;border:none;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-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button{animation:cim-widget-fab-pulse 2s infinite ease-in-out;transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-layout-commerce{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}.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-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}.cim-widget-search-input:is(input,textarea){width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){.cim-widget-search-input:is(input,textarea){font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-search-input:is(input,textarea){flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-composer-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px}.cim-widget-search-bar.cim-widget-search-bar-with-context{box-sizing:border-box;display:grid;width:100%;grid-template-columns:minmax(0,1fr) max-content;row-gap:4px;border:1px solid var(--cim-widget-border-color, #a3a3a3);border-radius:var(--cim-widget-border-radius);padding:8px 10px}.cim-widget-search-bar-with-context.cim-widget-search-bar-with-escalation{grid-template-columns:minmax(0,1fr) max-content max-content}.cim-widget-page-context-row{display:flex;grid-column:1 / -1;min-width:0;margin-bottom:2px}.cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{display:contents}.cim-widget-page-context-chip{box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;max-width:min(100%,210px);height:32px;padding:3px 4px 3px 5px;border-radius:999px;background:#303030;color:#fff;font-size:12px;font-weight:600;line-height:1.2}.cim-widget-page-context-image{width:26px;height:26px;flex:none;object-fit:cover;border-radius:50%;background:#fff}.cim-widget-page-context-icon{box-sizing:border-box;width:26px;height:26px;flex:none;padding:4px}.cim-widget-page-context-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button.cim-widget-page-context-remove{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;padding:0;border:0;border-radius:50%;background:#656565;color:#fff;cursor:pointer}button.cim-widget-page-context-remove:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.cim-widget-search-bar-with-context .cim-widget-search-input:is(input,textarea){flex:1;width:auto;height:36px;border:0;outline-offset:2px}.cim-widget-search-bar-with-context .cim-widget-messaging-input-group{border:0;width:100%}.cim-widget-messaging-composer-group>.cim-widget-messaging-input-group{border:0;border-radius:0}.cim-widget-search-bar textarea.cim-widget-search-input{--cim-widget-composer-min-height: 36px;--cim-widget-composer-max-height: 156px;box-sizing:border-box;height:auto;min-height:var(--cim-widget-composer-min-height);max-height:min(var(--cim-widget-composer-max-height),max(var(--cim-widget-composer-min-height),25dvh));padding:6px 8px;font-family:inherit;line-height:24px;outline:0;resize:none;overflow-y:auto;overflow-x:hidden;overflow-wrap:anywhere;white-space:pre-wrap}.cim-widget-layout-commerce .cim-widget-search-bar textarea.cim-widget-search-input{--cim-widget-composer-min-height: 44px;--cim-widget-composer-max-height: 164px;padding:10px;border-radius:0}.cim-widget-search-bar:has(textarea.cim-widget-search-input),.cim-widget-search-bar:has(textarea.cim-widget-search-input) .cim-widget-messaging-input-group,.cim-widget-search-bar:has(textarea.cim-widget-search-input) .cim-widget-messaging-composer-group{align-items:flex-end}.cim-widget-layout-commerce .cim-widget-messaging-composer-group:has(textarea){box-sizing:border-box;border-radius:1.75rem;align-items:flex-end}.cim-widget-layout-commerce .cim-widget-search-bar:has(textarea)>.cim-widget-icon-button{box-sizing:border-box;width:44px;height:44px;flex:none}.cim-widget-layout-commerce .cim-widget-search-bar:not(.cim-widget-search-bar-with-context):has(textarea)>.cim-widget-icon-button{margin-bottom:5px}@media(forced-colors:active){.cim-widget-search-bar:has(textarea.cim-widget-search-input):focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}.cim-widget-connecting-indicator--sparkles{flex:1 0 100%;align-self:stretch;min-height:20rem;flex-direction:column;justify-content:center;gap:.5rem;padding:2rem 1rem;color:var(--cim-widget-font-color, #111111);text-align:center}.cim-widget-connecting-sparkles{position:relative;width:7.5rem;height:6.5rem;margin-bottom:.75rem}.cim-widget-connecting-sparkle{position:absolute;top:50%;left:50%;width:2.8rem;height:2.8rem;margin-top:-1.4rem;margin-left:-1.4rem;overflow:visible;animation:cim-widget-sparkle-diagonal 2s cubic-bezier(.4,0,.2,1) infinite}.cim-widget-connecting-sparkle.sparkle-left{animation-delay:0s}.cim-widget-connecting-sparkle.sparkle-main{animation-delay:-.6667s}.cim-widget-connecting-sparkle.sparkle-right{animation-delay:-1.3333s}.cim-widget-connecting-heading,.cim-widget-connecting-text--feature{font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, #111111)}.cim-widget-connecting-heading{font-size:.875rem;line-height:1.4;opacity:.72}.cim-widget-connecting-text--feature{min-height:1.4em;font-size:1rem;font-weight:700;line-height:1.4}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@keyframes cim-widget-sparkle-diagonal{0%{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:1}33.33%{transform:translate(0) scale(1.5);opacity:1}66.67%{transform:translate(2.75rem,2.75rem) scale(1);opacity:1}75%{transform:translate(2.75rem,2.75rem) scale(1);opacity:0}76%{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:0}to{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring,.cim-widget-connecting-sparkle{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;min-height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel{margin-bottom:1rem}.cim-widget-product-carousel-title{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__control{padding:0 1rem}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger{box-sizing:border-box;width:2.75rem;min-width:2.75rem;height:2.75rem;min-height:2.75rem;padding:0;border:1px solid #e5e5e5;border-radius:50%;background-color:#fff;color:#333;box-shadow:0 5px 16px #0000001a;transform:none}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger:hover,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger:hover{background-color:#fff;box-shadow:0 6px 18px #00000026}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid currentColor;outline-offset:2px}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart-express-error{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;margin-bottom:.5rem;border-radius:.375rem;background:#fef2f2;border:1px solid #fecaca;color:#c53030;font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;line-height:1.4}.cim-widget-cart-express-error svg{flex-shrink:0;width:1.125rem;height:1.125rem}.cim-widget-cart-express-error span{flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;word-break:break-word}.cim-widget-cart-express-error-dismiss{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;margin:0;background:transparent;border:0;color:inherit;cursor:pointer;border-radius:.25rem;line-height:0}.cim-widget-cart-express-error-dismiss:hover,.cim-widget-cart-express-error-dismiss:focus-visible{background:#c530301f}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart.cim-widget-cart-busy{opacity:.7}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary:focus{outline:none}.cim-widget-cart-summary:focus-visible{border-radius:var(--cim-widget-border-radius, .25rem);box-shadow:inset 0 0 0 2px var(--cim-widget-primary-color, #2563eb)}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.875rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px;border-top:none;margin-top:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:var(--cim-widget-border-radius);animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-layout-commerce .cim-widget-cart-item-image{width:90px;height:90px;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:12px;background-color:#fff;padding:4px;display:flex;align-items:center;justify-content:center}.cim-widget-layout-commerce .cim-widget-cart-item-image img{max-width:100%;max-height:100%;object-fit:contain}.cim-widget-layout-commerce .cim-widget-cart-item-price{display:flex;flex-direction:row;align-items:center;gap:8px}.cim-widget-layout-commerce .cim-widget-cart-item-original-price{font-size:.9375rem;font-weight:400}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:1.0625rem;color:var(--cim-widget-font-color, #18181b)}.cim-widget-layout-commerce .cim-widget-cart-qty-heading{font-weight:500;margin-bottom:2px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-layout-commerce .cim-widget-cart-qty-selector{display:inline-flex;align-items:center;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:9999px;padding:4px 8px;background-color:var(--cim-widget-background-color, #ffffff);width:fit-content;box-shadow:0 1px 2px #00000005}.cim-widget-layout-commerce .cim-widget-cart-qty-selector.disabled{opacity:.6}.cim-widget-layout-commerce .cim-widget-cart-qty-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;color:var(--cim-widget-font-color, #52525b);font-size:1.125rem;font-weight:500;cursor:pointer;transition:opacity .15s ease;user-select:none;padding:0}.cim-widget-layout-commerce .cim-widget-cart-qty-btn:hover:not(:disabled){opacity:.6}.cim-widget-layout-commerce .cim-widget-cart-qty-btn:disabled{opacity:.35;cursor:not-allowed}.cim-widget-layout-commerce .cim-widget-cart-qty-input{width:36px;height:24px;padding:0;border:none;background:transparent;color:var(--cim-widget-font-color, #18181b);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;outline:none;box-sizing:border-box}.cim-widget-layout-commerce .cim-widget-cart-qty-spinner{width:36px;height:24px;padding:3px 9px;box-sizing:border-box;animation:cim-widget-spin 1s linear infinite}.cim-widget-layout-commerce .cim-widget-cart-totals{gap:8px;padding-top:16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7);margin-top:8px}.cim-widget-layout-commerce .cim-widget-cart-total-row{display:grid;grid-template-columns:max-content minmax(0,1fr) max-content}.cim-widget-layout-commerce .cim-widget-cart-total-label{grid-column:1}.cim-widget-layout-commerce .cim-widget-cart-total-badge{grid-column:2;text-align:left}.cim-widget-layout-commerce .cim-widget-cart-total-value{grid-column:3;text-align:right}.cim-widget-layout-commerce .cim-widget-cart-coupon-field{padding:0 12px;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:12px}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit{height:44px;border:none;border-radius:12px;background-color:#f3f4f6;color:#3f3f46}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:#e5e7eb}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit:disabled{opacity:.35}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--cim-widget-border-radius, 12px);border:1px solid var(--cim-widget-border-color, transparent);background-color:var(--cim-widget-background-color, #f3f4f6);color:var(--cim-widget-font-color, #1f2937);cursor:pointer;box-shadow:none;transition:background-color .15s ease,opacity .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{background-color:var(--cim-widget-background-color-hover, #e5e7eb);opacity:.9}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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,width .2s ease,border-radius .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{width:20px;border-radius:4px;background-color:var(--cim-widget-font-color, #1a202c)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:#e5e5e5;border-color:#c5c5c5;color:#141415}label.cim-widget-msg-pdp__chip.selected:hover{background-color:#d9d9d9;border-color:#b8b8b8}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:#c5c5c5}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:12px;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;height:40px;background-color:var(--cim-widget-primary-color, #1c1d22);color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-primary-color, #1c1d22);border-radius:var(--cim-widget-border-radius, 8px);font-weight:700;font-size:14px;transition:background-color .15s ease,border-color .15s ease;&:hover:not(:disabled){background-color:var(--cim-widget-secondary-color, #333333);border-color:var(--cim-widget-secondary-color, #333333)}&:hover:disabled{background-color:var(--cim-widget-primary-color, #1c1d22);opacity:.6}}.cim-widget-msg-pdp__add-to-cart-icon{width:18px;height:18px;flex-shrink:0}.cim-widget-cart-express~button.cim-widget-msg-pdp__add-to-cart{background-color:var(--cim-widget-secondary-button-bg, #ededed);color:var(--cim-widget-font-color, #1c1d22);border:1px solid var(--cim-widget-secondary-button-border, #ededed);border-radius:var(--cim-widget-border-radius, 8px);&:hover:not(:disabled){background-color:var(--cim-widget-secondary-button-hover-bg, #e0e0e0);border-color:var(--cim-widget-secondary-button-hover-border, #e0e0e0)}&:hover:disabled{background-color:var(--cim-widget-secondary-button-bg, #ededed);opacity:.6}}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__header-spacer{position:sticky;left:0;background-color:var(--cim-widget-background-color, #ffffff);z-index:2;border-right:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name-link:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap;position:sticky;left:0;background-color:var(--cim-widget-background-color, #ffffff);z-index:2;border-right:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__action-cell{display:flex;align-items:center;justify-content:center;padding:12px}.cim-widget-product-comparison__add-to-cart-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background-color:#ededed;color:#1a202c;border:none;border-radius:9999px;padding:8px 14px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.75rem;font-weight:600;cursor:pointer;transition:background-color .15s ease,opacity .15s ease;white-space:nowrap}.cim-widget-product-comparison__add-to-cart-btn:hover{background-color:#e1e1e1}.cim-widget-product-comparison__add-to-cart-btn:active{opacity:.85}.cim-widget-product-comparison__image-button{background:none;border:none;padding:0;cursor:pointer;width:100%;display:block}.cim-widget-product-comparison__name-button{background:none;border:none;padding:0;cursor:pointer;text-align:left;display:block}.cim-widget-product-comparison__name-button:hover{text-decoration:underline}.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-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-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-page-context-divider{display:flex;align-items:center;justify-content:center;width:100%;margin:1.5rem 0;color:var(--cim-widget-font-color, #333);font-family:var(--cim-widget-font-family, Arial, sans-serif);font-size:.875rem}.cim-widget-page-context-divider:before,.cim-widget-page-context-divider:after{content:"";height:1px;flex:1 1 auto;background:var(--cim-widget-border-color, #e5e7eb)}.cim-widget-page-context-divider-pill{display:inline-flex;align-items:center;gap:.625rem;min-width:0;max-width:calc(100% - 2rem);padding:.375rem;border:1px solid var(--cim-widget-border-color, #e5e7eb);border-radius:999px;background:var(--cim-widget-background-color, #fff)}.cim-widget-page-context-divider-image,.cim-widget-page-context-divider-icon{width:1.5rem;height:1.5rem;flex:0 0 auto;border-radius:50%;object-fit:contain}.cim-widget-page-context-divider-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-font-color, #1f2937);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.cim-widget-transcript-placeholder{display:flex;flex-direction:column;align-items:flex-start;padding:.5rem 1rem;margin-bottom:1rem;font-family:var(--cim-widget-font-family, inherit);font-size:.875rem;color:var(--cim-widget-font-color, inherit)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-user-message-body{display:flex;flex-direction:column;gap:.375rem;min-width:0}.cim-widget-user-message-body .cim-widget-user-message-text{white-space:pre-wrap}.cim-widget-user-message-body:has(.cim-widget-user-message-image){align-items:flex-end}.cim-widget-user-message-image{max-width:12rem;max-height:12rem;width:auto;height:auto;object-fit:contain;border-radius:8px}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-font-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-font-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-embedded-chat.cim-widget-layout-commerce>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-layout-commerce .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-dialog.cim-widget-layout-commerce{border:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{height:3.875rem;min-height:3.875rem;padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0;.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding: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-layout-commerce{--cim-widget-shopping-canvas: #fcfcfc;--cim-widget-shopping-chip: #f7f7f7;--cim-widget-shopping-muted: #5c5c5c;--cim-widget-shopping-outline: #a3a3a3;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-container{gap:1rem;padding:1.25rem;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-message-group-child{width:100%}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-markdown,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text,.cim-widget-layout-commerce .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:1rem;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:#fff}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-cart-box,.cim-widget-layout-commerce .cim-widget-cart-summary,.cim-widget-layout-commerce .cim-widget-cart-expanded,.cim-widget-layout-commerce .cim-widget-cart-coupon,.cim-widget-layout-commerce .cim-widget-cart-coupon-field,.cim-widget-layout-commerce .cim-widget-cart-coupon-input{background-color:#fff}.cim-widget-layout-commerce .cim-widget-cart-expanded{border-top:none}.cim-widget-layout-commerce .cim-widget-cart-totals{border-top:1px solid #dedede;padding-top:16px;gap:12px}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-layout-commerce .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:8px;background-color:#f1f1f1;color:#181818}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-layout-commerce .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-msg-pdp__card,.cim-widget-layout-commerce .cim-widget-msg-pdp__gallery,.cim-widget-layout-commerce .cim-widget-msg-pdp__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-pdp__card{border-color:#dedede;border-radius:.75rem;box-shadow:0 1px 3px #00000012}.cim-widget-layout-commerce .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__title,.cim-widget-layout-commerce .cim-widget-msg-pdp__title-link{color:#181818;font-size:.875rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__description{color:#3e3e3c;font-size:.75rem;opacity:1}.cim-widget-layout-commerce .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip{border-radius:20px;background-color:#f1f1f1;border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip:hover{background-color:#ededed;border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #db665e);border-color:var(--cim-widget-primary-color, #db665e);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-secondary-color, #c9554d);border-color:var(--cim-widget-secondary-color, #c9554d);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-primary-color, #181818);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-pdp-gallery__prev-trigger,.cim-widget-layout-commerce .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:.375rem;background-color:#f1f1f1;color:#5c5c5c;box-shadow:none}.cim-widget-layout-commerce .cim-widget-msg-product-card,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-wrapper,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-placeholder,.cim-widget-layout-commerce .cim-widget-msg-product-card__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-product-card__title,.cim-widget-layout-commerce .cim-widget-msg-product-card__title-link,.cim-widget-layout-commerce .cim-widget-msg-product-card__price,.cim-widget-layout-commerce .cim-widget-product-tile-name,.cim-widget-layout-commerce .cim-widget-product-tile-price{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-layout-commerce .cim-widget-carousel__control{padding:0}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid #dedede;border-radius:50%;background-color:#fff;color:#3e3e3c;box-shadow:0 2px 5px #00000026}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:hover,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:hover{background-color:#fff;border-color:#c9c9c9;box-shadow:0 3px 7px #0000002e}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid #181818;outline-offset:2px}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-markdown>:first-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-layout-commerce .cim-widget-markdown>:last-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-ask-cim-suggestions-container,.cim-widget-layout-commerce .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-shopping-chip);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:hover,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-layout-commerce .cim-widget-user-message.embedded,.cim-widget-layout-commerce .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-user-message-text{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:400}.cim-widget-layout-commerce .cim-widget-message.embedded{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-layout-commerce .cim-widget-search-bar{gap:.5rem}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-layout-commerce .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .25rem .5rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:1.5rem;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-connection-status-icon{display:none}.cim-widget-layout-commerce .cim-widget-search-input:is(input,textarea){min-height:2.75rem;padding:0 .625rem;border:0;border-radius:999px;background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-shopping-muted);opacity:1}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:999px}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-layout-commerce .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:2.75rem;border:0;border-radius:50%;background-color:#111;color:#fff}.cim-widget-layout-commerce .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-layout-commerce .cim-widget-search-button-icon:hover{background-color:#333;border-color:transparent}.cim-widget-layout-commerce .cim-widget-search-button-icon:focus-visible{outline:2px solid #000000;outline-offset:3px}.cim-widget-layout-commerce .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-shopping-muted)}@media(max-width:576px){.cim-widget-layout-commerce .cim-widget-message-container{padding:1rem}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{padding-right:1rem;padding-left:1rem}}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
- /*$vite$:1*/`,document.head.appendChild(Ke);function ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var St={exports:{}},Wt={},Lt={exports:{}},qe={};var bn;function Dt(){if(bn)return qe;bn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=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"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=m&&j[m]||j["@@iterator"],typeof j=="function"?j:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,_={};function I(j,q,P){this.props=j,this.context=q,this.refs=_,this.updater=P||b}I.prototype.isReactComponent={},I.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,q,"setState")},I.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function v(){}v.prototype=I.prototype;function S(j,q,P){this.props=j,this.context=q,this.refs=_,this.updater=P||b}var R=S.prototype=new v;R.constructor=S,T(R,I.prototype),R.isPureReactComponent=!0;var U=Array.isArray,B=Object.prototype.hasOwnProperty,A={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function W(j,q,P){var ge,Re={},pe=null,Ne=null;if(q!=null)for(ge in q.ref!==void 0&&(Ne=q.ref),q.key!==void 0&&(pe=""+q.key),q)B.call(q,ge)&&!G.hasOwnProperty(ge)&&(Re[ge]=q[ge]);var ve=arguments.length-2;if(ve===1)Re.children=P;else if(1<ve){for(var ze=Array(ve),rt=0;rt<ve;rt++)ze[rt]=arguments[rt+2];Re.children=ze}if(j&&j.defaultProps)for(ge in ve=j.defaultProps,ve)Re[ge]===void 0&&(Re[ge]=ve[ge]);return{$$typeof:e,type:j,key:pe,ref:Ne,props:Re,_owner:A.current}}function re(j,q){return{$$typeof:e,type:j.type,key:q,ref:j.ref,props:j.props,_owner:j._owner}}function H(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function ee(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(P){return q[P]})}var Q=/\/+/g;function me(j,q){return typeof j=="object"&&j!==null&&j.key!=null?ee(""+j.key):q.toString(36)}function V(j,q,P,ge,Re){var pe=typeof j;(pe==="undefined"||pe==="boolean")&&(j=null);var Ne=!1;if(j===null)Ne=!0;else switch(pe){case"string":case"number":Ne=!0;break;case"object":switch(j.$$typeof){case e:case t:Ne=!0}}if(Ne)return Ne=j,Re=Re(Ne),j=ge===""?"."+me(Ne,0):ge,U(Re)?(P="",j!=null&&(P=j.replace(Q,"$&/")+"/"),V(Re,q,P,"",function(rt){return rt})):Re!=null&&(H(Re)&&(Re=re(Re,P+(!Re.key||Ne&&Ne.key===Re.key?"":(""+Re.key).replace(Q,"$&/")+"/")+j)),q.push(Re)),1;if(Ne=0,ge=ge===""?".":ge+":",U(j))for(var ve=0;ve<j.length;ve++){pe=j[ve];var ze=ge+me(pe,ve);Ne+=V(pe,q,P,ze,Re)}else if(ze=E(j),typeof ze=="function")for(j=ze.call(j),ve=0;!(pe=j.next()).done;)pe=pe.value,ze=ge+me(pe,ve++),Ne+=V(pe,q,P,ze,Re);else if(pe==="object")throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Ne}function ue(j,q,P){if(j==null)return j;var ge=[],Re=0;return V(j,ge,"","",function(pe){return q.call(P,pe,Re++)}),ge}function fe(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(P){(j._status===0||j._status===-1)&&(j._status=1,j._result=P)},function(P){(j._status===0||j._status===-1)&&(j._status=2,j._result=P)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var ae={current:null},J={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:J,ReactCurrentOwner:A};function O(){throw Error("act(...) is not supported in production builds of React.")}return qe.Children={map:ue,forEach:function(j,q,P){ue(j,function(){q.apply(this,arguments)},P)},count:function(j){var q=0;return ue(j,function(){q++}),q},toArray:function(j){return ue(j,function(q){return q})||[]},only:function(j){if(!H(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},qe.Component=I,qe.Fragment=n,qe.Profiler=i,qe.PureComponent=S,qe.StrictMode=r,qe.Suspense=d,qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,qe.act=O,qe.cloneElement=function(j,q,P){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ge=T({},j.props),Re=j.key,pe=j.ref,Ne=j._owner;if(q!=null){if(q.ref!==void 0&&(pe=q.ref,Ne=A.current),q.key!==void 0&&(Re=""+q.key),j.type&&j.type.defaultProps)var ve=j.type.defaultProps;for(ze in q)B.call(q,ze)&&!G.hasOwnProperty(ze)&&(ge[ze]=q[ze]===void 0&&ve!==void 0?ve[ze]:q[ze])}var ze=arguments.length-2;if(ze===1)ge.children=P;else if(1<ze){ve=Array(ze);for(var rt=0;rt<ze;rt++)ve[rt]=arguments[rt+2];ge.children=ve}return{$$typeof:e,type:j.type,key:Re,ref:pe,props:ge,_owner:Ne}},qe.createContext=function(j){return j={$$typeof:u,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:s,_context:j},j.Consumer=j},qe.createElement=W,qe.createFactory=function(j){var q=W.bind(null,j);return q.type=j,q},qe.createRef=function(){return{current:null}},qe.forwardRef=function(j){return{$$typeof:c,render:j}},qe.isValidElement=H,qe.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:fe}},qe.memo=function(j,q){return{$$typeof:f,type:j,compare:q===void 0?null:q}},qe.startTransition=function(j){var q=J.transition;J.transition={};try{j()}finally{J.transition=q}},qe.unstable_act=O,qe.useCallback=function(j,q){return ae.current.useCallback(j,q)},qe.useContext=function(j){return ae.current.useContext(j)},qe.useDebugValue=function(){},qe.useDeferredValue=function(j){return ae.current.useDeferredValue(j)},qe.useEffect=function(j,q){return ae.current.useEffect(j,q)},qe.useId=function(){return ae.current.useId()},qe.useImperativeHandle=function(j,q,P){return ae.current.useImperativeHandle(j,q,P)},qe.useInsertionEffect=function(j,q){return ae.current.useInsertionEffect(j,q)},qe.useLayoutEffect=function(j,q){return ae.current.useLayoutEffect(j,q)},qe.useMemo=function(j,q){return ae.current.useMemo(j,q)},qe.useReducer=function(j,q,P){return ae.current.useReducer(j,q,P)},qe.useRef=function(j){return ae.current.useRef(j)},qe.useState=function(j){return ae.current.useState(j)},qe.useSyncExternalStore=function(j,q,P){return ae.current.useSyncExternalStore(j,q,P)},qe.useTransition=function(){return ae.current.useTransition()},qe.version="18.3.1",qe}var Ln;function vr(){return Ln||(Ln=1,Lt.exports=Dt()),Lt.exports}var yo;function hs(){if(yo)return Wt;yo=1;var e=vr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var h,m={},E=null,b=null;f!==void 0&&(E=""+f),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!s.hasOwnProperty(h)&&(m[h]=d[h]);if(c&&c.defaultProps)for(h in d=c.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:c,key:E,ref:b,props:m,_owner:i.current}}return Wt.Fragment=n,Wt.jsx=u,Wt.jsxs=u,Wt}var ms;function Un(){return ms||(ms=1,St.exports=hs()),St.exports}var w=Un(),k=vr();const Eo=ht(k),Hr=Object.create(null);Hr.open="0",Hr.close="1",Hr.ping="2",Hr.pong="3",Hr.message="4",Hr.upgrade="5",Hr.noop="6";const wc=Object.create(null);Object.keys(Hr).forEach(e=>{wc[Hr[e]]=e});const wf={type:"error",data:"parser error"},F0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",B0=typeof ArrayBuffer=="function",U0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xf=({type:e,data:t},n,r)=>F0&&t instanceof Blob?n?r(t):j0(t,r):B0&&(t instanceof ArrayBuffer||U0(t))?n?r(t):j0(new Blob([t]),r):r(Hr[e]+(t||"")),j0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function H0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tf;function tA(e,t){if(F0&&e.data instanceof Blob)return e.data.arrayBuffer().then(H0).then(t);if(B0&&(e.data instanceof ArrayBuffer||U0(e.data)))return t(H0(e.data));xf(e,!1,n=>{Tf||(Tf=new TextEncoder),t(Tf.encode(n))})}const $0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<$0.length;e++)Pa[$0.charCodeAt(e)]=e;const nA=e=>{let t=e.length*.75,n=e.length,r,i=0,s,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),h=new Uint8Array(f);for(r=0;r<n;r+=4)s=Pa[e.charCodeAt(r)],u=Pa[e.charCodeAt(r+1)],c=Pa[e.charCodeAt(r+2)],d=Pa[e.charCodeAt(r+3)],h[i++]=s<<2|u>>4,h[i++]=(u&15)<<4|c>>2,h[i++]=(c&3)<<6|d&63;return f},rA=typeof ArrayBuffer=="function",_f=(e,t)=>{if(typeof e!="string")return{type:"message",data:z0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:iA(e.substring(1),t)}:wc[n]?e.length>1?{type:wc[n],data:e.substring(1)}:{type:wc[n]}:wf},iA=(e,t)=>{if(rA){const n=nA(e);return z0(n,t)}else return{base64:!0,data:e}},z0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,V0="",oA=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,u)=>{xf(s,!1,c=>{r[u]=c,++i===n&&t(r.join(V0))})})},sA=(e,t)=>{const n=e.split(V0),r=[];for(let i=0;i<n.length;i++){const s=_f(n[i],t);if(r.push(s),s.type==="error")break}return r};function aA(){return new TransformStream({transform(e,t){tA(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let vf;function xc(e){return e.reduce((t,n)=>t+n.length,0)}function Tc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=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 uA(e,t){vf||(vf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(xc(n)<1)break;const d=Tc(n,1);s=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(xc(n)<2)break;const d=Tc(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(xc(n)<8)break;const d=Tc(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),h=f.getUint32(0);if(h>Math.pow(2,21)-1){c.enqueue(wf);break}i=h*Math.pow(2,32)+f.getUint32(4),r=3}else{if(xc(n)<i)break;const d=Tc(n,i);c.enqueue(_f(s?d:vf.decode(d),t)),r=0}if(i===0||i>e){c.enqueue(wf);break}}}})}const q0=4;function nn(e){if(e)return cA(e)}function cA(e){for(var t in nn.prototype)e[t]=nn.prototype[t];return e}nn.prototype.on=nn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},nn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},nn.prototype.off=nn.prototype.removeListener=nn.prototype.removeAllListeners=nn.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,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this},nn.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,i=n.length;r<i;++r)n[r].apply(this,t)}return this},nn.prototype.emitReserved=nn.prototype.emit,nn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},nn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _c=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),fr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),lA="arraybuffer";function qz(){}function W0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const dA=fr.setTimeout,fA=fr.clearTimeout;function vc(e,t){t.useNativeTimers?(e.setTimeoutFn=dA.bind(fr),e.clearTimeoutFn=fA.bind(fr)):(e.setTimeoutFn=fr.setTimeout.bind(fr),e.clearTimeoutFn=fr.clearTimeout.bind(fr))}const pA=1.33;function hA(e){return typeof e=="string"?mA(e):Math.ceil((e.byteLength||e.size)*pA)}function mA(e){let t=0,n=0;for(let r=0,i=e.length;r<i;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 Y0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function gA(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function yA(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class EA extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Sf extends nn{constructor(t){super(),this.writable=!1,vc(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 EA(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=_f(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=gA(t);return n.length?"?"+n:""}}class bA extends Sf{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)};sA(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,oA(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]=Y0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let G0=!1;try{G0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const wA=G0;function xA(){}class TA extends bA{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",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class $r extends nn{constructor(t,n,r){super(),this.createRequest=t,vc(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=W0(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 i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch(i){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{r.setRequestHeader("Accept","*/*")}catch(i){}(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 i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.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(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document!="undefined"&&(this._index=$r.requestsCount++,$r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=xA,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete $r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if($r.requestsCount=0,$r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",X0);else if(typeof addEventListener=="function"){const e="onpagehide"in fr?"pagehide":"unload";addEventListener(e,X0,!1)}}function X0(){for(let e in $r.requests)$r.requests.hasOwnProperty(e)&&$r.requests[e].abort()}const _A=(function(){const e=K0({xdomain:!1});return e&&e.responseType!==null})();class vA extends TA{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=_A&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new $r(K0,this.uri(),t)}}function K0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||wA))return new XMLHttpRequest}catch(n){}if(!t)try{return new fr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Q0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class SA extends Sf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Q0?{}:W0(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(i){return this.emitReserved("error",i)}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],i=n===t.length-1;xf(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch(u){}i&&_c(()=>{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]=Y0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Af=fr.WebSocket||fr.MozWebSocket;class AA extends SA{createSocket(t,n,r){return Q0?new Af(t,n,r):n?new Af(t,n):new Af(t)}doWrite(t,n){this.ws.send(n)}}class kA extends Sf{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=uA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=aA();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),s())}).catch(c=>{})};s();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],i=n===t.length-1;this._writer.write(r).then(()=>{i&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const CA={websocket:AA,webtransport:kA,polling:vA},NA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kf(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 i=NA.exec(e||""),s={},u=14;for(;u--;)s[IA[u]]=i[u]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=OA(s,s.path),s.queryKey=PA(s,s.query),s}function OA(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 PA(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Cf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Sc=[];Cf&&addEventListener("offline",()=>{Sc.forEach(e=>e())},!1);class Oi extends nn{constructor(t,n){if(super(),this.binaryType=lA,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=kf(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=kf(n.host).host);vc(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 i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=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=yA(this.opts.query)),Cf&&(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"})},Sc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=q0,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&&Oi.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",Oi.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 i=this.writeBuffer[r].data;if(i&&(n+=hA(i)),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,_c(()=>{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,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),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(Oi.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(),Cf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Sc.indexOf(this._offlineEventListener);r!==-1&&Sc.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Oi.protocol=q0;class RA extends Oi{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;Oi.priorWebsocketSuccess=!1;const i=()=>{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;Oi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const E=new Error("probe error");E.transport=n.name,this.emitReserved("upgradeError",E)}}))};function s(){r||(r=!0,h(),n.close(),n=null)}const u=m=>{const E=new Error("probe error: "+m);E.transport=n.name,s(),this.emitReserved("upgradeError",E)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&s()}const h=()=>{n.removeListener("open",i),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",i),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 LA=class extends RA{constructor(t,n={}){const r=typeof t=="object",i=r?M({},t):M({},n);(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>CA[s]).filter(s=>!!s)),super(r?i:t,i)}};function DA(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=kf(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 s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const MA=typeof ArrayBuffer=="function",FA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,J0=Object.prototype.toString,BA=typeof Blob=="function"||typeof Blob!="undefined"&&J0.call(Blob)==="[object BlobConstructor]",UA=typeof File=="function"||typeof File!="undefined"&&J0.call(File)==="[object FileConstructor]";function Nf(e){return MA&&(e instanceof ArrayBuffer||FA(e))||BA&&e instanceof Blob||UA&&e instanceof File}function Ac(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ac(e[n]))return!0;return!1}if(Nf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ac(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ac(e[n]))return!0;return!1}function jA(e){const t=[],n=e.data,r=e;return r.data=kc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function kc(e,t,n){if(!e)return e;if(Nf(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 i=0;i<e.length;i++)r[i]=kc(e[i],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return kc(e.toJSON(),t,!0);const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=kc(e[i],t));return r}return e}function HA(e,t){return e.data=If(e.data,t),delete e.attachments,e}function If(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]=If(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=If(e[n],t));return e}const $A=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var gt;(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"})(gt||(gt={}));class zA{constructor(t){this.replacer=t}encode(t){return(t.type===gt.EVENT||t.type===gt.ACK)&&Ac(t)?this.encodeAsBinary({type:t.type===gt.EVENT?gt.BINARY_EVENT:gt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===gt.BINARY_EVENT||t.type===gt.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=jA(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Of extends nn{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===gt.BINARY_EVENT;r||n.type===gt.BINARY_ACK?(n.type=r?gt.EVENT:gt.ACK,this.reconstructor=new VA(n)):super.emitReserved("decoded",n)}else if(Nf(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(gt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===gt.BINARY_EVENT||r.type===gt.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(s,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!qA(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 s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=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(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Of.isPayloadValid(r.type,s))r.data=s;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 gt.CONNECT:return Z0(n);case gt.DISCONNECT:return n===void 0;case gt.CONNECT_ERROR:return typeof n=="string"||Z0(n);case gt.EVENT:case gt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$A.indexOf(n[0])===-1);case gt.ACK:case gt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VA{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=HA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const WA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Of,Encoder:zA,get PacketType(){return gt}},Symbol.toStringTag,{value:"Module"}));function Sr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const YA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class e1 extends nn{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=[Sr(t,"open",this.onopen.bind(this)),Sr(t,"packet",this.onpacket.bind(this)),Sr(t,"error",this.onerror.bind(this)),Sr(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,i,s;if(YA.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:gt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,m=n.pop();this._registerAckCallback(h,m),u.id=h}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._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 i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=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"))},i),u=(...c)=>{this.io.clearTimeoutFn(s),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(u,c)=>u?i(u):r(c);s.withError=!0,n.push(s),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((i,...s)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),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:gt.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 gt.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 gt.EVENT:case gt.BINARY_EVENT:this.onevent(t);break;case gt.ACK:case gt.BINARY_ACK:this.onack(t);break;case gt.DISCONNECT:this.ondisconnect();break;case gt.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(...i){r||(r=!0,n.packet({type:gt.ACK,id:t,data:i}))}}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:gt.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 gs(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}gs.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},gs.prototype.reset=function(){this.attempts=0},gs.prototype.setMin=function(e){this.ms=e},gs.prototype.setMax=function(e){this.max=e},gs.prototype.setJitter=function(e){this.jitter=e};class Pf extends nn{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,vc(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 gs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||WA;this.encoder=new i.Encoder,this.decoder=new i.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 LA(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Sr(n,"open",function(){r.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Sr(n,"error",s);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),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(Sr(t,"ping",this.onping.bind(this)),Sr(t,"data",this.ondata.bind(this)),Sr(t,"error",this.onerror.bind(this)),Sr(t,"close",this.onclose.bind(this)),Sr(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){_c(()=>{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 e1(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(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ra={};function Rf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DA(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,u=Ra[i]&&s in Ra[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Pf(r,t):(Ra[i]||(Ra[i]=new Pf(r,t)),d=Ra[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Rf,{Manager:Pf,Socket:e1,io:Rf,connect:Rf});const t1=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&t1.call(Blob),typeof File=="function"||typeof File!="undefined"&&t1.call(File);var n1;(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"})(n1||(n1={}));const kt=(e,t,n,...r)=>{if(!e)return;const i=["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]",i,n,...r)};class GA{constructor(t=!1){We(this,"isDevelopment");We(this,"_log",(t,n,...r)=>{kt(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 ys="cimulate",Lf=`${ys}:pdp-update`,Df=`${ys}:ui-state-update`,Mf=`${ys}:prompts-state-update`,Ff=`${ys}:session-state`,Cc=`${ys}:cart-update`,Bf=`${ys}:cart-set`,r1=e=>{window.addEventListener(Lf,e)},i1=e=>{window.removeEventListener(Lf,e)},o1=(e,t,n)=>{const r=new CustomEvent(Lf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},s1=e=>{window.addEventListener(Ff,e)},a1=e=>{window.removeEventListener(Ff,e)},u1=(e,t,n)=>{const r=new CustomEvent(Ff,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},XA=e=>{window.addEventListener(Cc,e)},KA=e=>{window.removeEventListener(Cc,e)},c1=e=>{const t=new CustomEvent(Cc,{detail:e});window.dispatchEvent(t)};class QA{constructor(){We(this,"initialParams",{productId:"",productName:"",pdpLink:""});We(this,"proxy");We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>(o1(n,r),Reflect.set(t,n,r)));We(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});We(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});We(this,"dispatchContextUpdate",()=>{o1("pdp-context",this.state)});We(this,"createProxy",t=>new Proxy(M({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return M({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Zn=new QA;class JA{constructor(){We(this,"context",null)}get state(){return this.context?M(M({},this.context),this.context.refinements?{refinements:this.context.refinements.map(({name:t,values:n})=>({name:t,values:[...n]}))}:{}):null}set(t){this.context=M(M({},t),t.refinements?{refinements:t.refinements.map(({name:n,values:r})=>({name:n,values:[...r]}))}:{})}clear(){this.context=null}}const Nc=new JA,l1="onCimulateWidgetReady",d1=["ask_cim","search","browse","pdp"],f1=e=>d1.includes(e),p1={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(p1)),new Map(Object.entries(p1).map(([e,t])=>[t,e]));const N="cim-widget",er=`--${N}`,bo={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},ZA=(e={},t)=>{const n=t==="commerce",r=n?"#db665e":bo.primaryColor,i=n?"#c9554d":bo.secondaryColor,s=n?"0.75rem":bo.borderRadius;return{[`${er}-primary-color`]:e.primaryColor||r,[`${er}-secondary-color`]:e.secondaryColor||i,[`${er}-font-color`]:e.fontColor||bo.fontColor,[`${er}-font-family`]:e.fontFamily||bo.fontFamily,[`${er}-background-color`]:e.backgroundColor||bo.backgroundColor,[`${er}-border-color`]:e.borderColor||bo.borderColor,[`${er}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||s)}},Ic={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation"},Oc="cimulate.widget.minimizedOnNav";function ek(){try{sessionStorage.setItem(Oc,"1")}catch(e){return}}function tk(){try{const e=sessionStorage.getItem(Oc)==="1";return sessionStorage.removeItem(Oc),e}catch(e){return!1}}function nk(){try{sessionStorage.removeItem(Oc)}catch(e){return}}const h1=e=>{window.addEventListener(Df,e)},m1=e=>{window.removeEventListener(Df,e)},rk=(e,t)=>{const n=new CustomEvent(Df,{detail:{property:e,value:t}});window.dispatchEvent(n)},g1=e=>{wt.connectedProxy.connected=e},Pc=e=>{if(!f1(e)){const t=d1.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}wt.entryTypeProxy.entryType=e},zr=e=>{const t=wt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;wt.statusProxy.isOpen=n,n&&(wt.statusProxy.isMinimized=!1,nk())},wo=e=>{const t=wt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;wt.statusProxy.isMinimized=n,n&&(wt.statusProxy.isOpen=!1)},Rc=e=>{wt.modalProxy.isFullscreen=e},Es=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);wt.statusProxy.type=e,e==="dialog"||e==="chat"?wt.modeProxy.mode="embedded":wt.modeProxy.mode="standalone"},Lc=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);wt.dialogProxy.position=e},ik=e=>{const t=wt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;wt.dialogProxy.isFullHeight=n};class ok{constructor(){We(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});We(this,"connectedProxy");We(this,"modeProxy");We(this,"entryTypeProxy");We(this,"statusProxy");We(this,"dialogProxy");We(this,"modalProxy",{isFullscreen:!1});We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return rk(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 wt=new ok;function sk(e){if(typeof(e==null?void 0:e.name)!="string"||!e.name.trim())throw new Error("Search results page refinements must include a name");if(!Array.isArray(e.values)||e.values.length===0||e.values.some(t=>typeof t!="string"||!t.trim()))throw new Error("Search results page refinements must include at least one value");return{name:e.name.trim(),values:[...e.values]}}function ak(e){var i;const t=typeof e.query=="string"?e.query.trim():"";if(!t)throw new Error("Search results page context must include a query");if(e.refinements!==void 0&&!Array.isArray(e.refinements))throw new Error("Search results page refinements must be an array");const n=(i=e.refinements)==null?void 0:i.map(sk),r={type:"srp",query:t};n!=null&&n.length&&(r.refinements=n);for(const s of["minPrice","maxPrice"]){const u=e[s];if(u!==void 0){if(typeof u!="number"||!Number.isFinite(u))throw new Error(`Search results page ${s} must be a finite number`);r[s]=u}}return r}function bs(){switch(wt.entryType){case"pdp":{const{productId:e}=Zn.state;return e?{type:"pdp",id:e}:null}case"search":return Nc.state;default:return null}}function y1(){const e=bs();if(!e)return null;switch(e.type){case"pdp":{const{productName:t,imageUrl:n}=Zn.state,r=t||e.id;return{type:"pdp",label:r,removeLabel:`Stop asking about ${r}`,placeholder:`Ask about ${r}`,imageUrl:n}}case"srp":return{type:"srp",label:`Search: "${e.query}"`,removeLabel:`Remove search context for ${e.query}`,placeholder:"Ask us anything"}}}function Dc(e){switch(e.type){case"pdp":{const t=e.id.trim();if(!t)throw new Error("PDP page context must include an id");Nc.clear(),Pc("pdp"),Zn.updateProxy({productId:t,productName:e.name,imageUrl:e.imageUrl}),Zn.dispatchContextUpdate();return}case"srp":{const t=ak(e);Zn.clear(),Zn.dispatchContextUpdate(),Nc.set(t),Pc("search");return}default:{const t=e.type;throw new Error(`Unsupported page context type: ${String(t)}`)}}}function Uf(){Zn.clear(),Zn.dispatchContextUpdate(),Nc.clear()}function uk(e){return e.type==="srp"?"search":"pdp"}function ck({initialPageContext:e,isDevelopment:t=!1}){if(e)try{return Dc(e),uk(e)}catch(n){const r=n instanceof Error?n.message:String(n);kt(t,"warn",`initialPageContext is invalid; skipping initial context seeding. ${r}`);return}}const lk=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!f1(e.type)){kt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&kt(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){kt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Zn.updateProxy(e.params);return}kt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};function dk({enablePageContext:e,initialPageContext:t,initialEntry:n,isDevelopment:r=!1}){return e?{entryType:ck({initialPageContext:t,isDevelopment:r})}:(t&&kt(r,"warn","messagingConfig.initialPageContext is ignored when enablePageContext is false. Set enablePageContext: true to seed page context, or use initialEntry for the legacy PDP text-suffix path."),lk({initialEntry:n,isDevelopment:r}),{})}const La=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},fk="ccDevMode",pk=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(fk))==null?void 0:t.toLowerCase())==="true"},hk=["toggleDialogPosition","minimize","clearChat"],mk=["toggleFullscreen","minimize","clearChat"],E1=[...hk,"endConversation","downloadTranscript"],b1=[...mk,"endConversation","downloadTranscript"],w1=["toggleExpanded","clearChat","endConversation","downloadTranscript"],gk={dialog:new Set(["close","toggleExpanded",...E1]),modal:new Set(["close","toggleExpanded",...b1]),chat:new Set(w1)},jf=(e,t)=>e!=null?e:t,x1=(e,t,n)=>{const r=gk[e],i=(s,u)=>r.has(s)&&jf(t==null?void 0:t[s],u);return{close:i("close",!0),toggleExpanded:i("toggleExpanded",!0),toggleFullscreen:i("toggleFullscreen",!0),toggleDialogPosition:i("toggleDialogPosition",!0),minimize:i("minimize",n.enableMinimize),clearChat:i("clearChat",!0),endConversation:i("endConversation",!0),downloadTranscript:i("downloadTranscript",n.enableDownloadTranscript)}},yk=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){kt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){kt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const i=document.createElement("script");i.src=e,i.async=!0,i.crossOrigin="anonymous";let s=!1;const u=()=>{s=!0,clearTimeout(c)};i.onload=()=>{if(s)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(kt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(kt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},i.onerror=()=>{s||(u(),kt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const c=setTimeout(()=>{s||(s=!0,kt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(i)}),T1=k.createContext({overrides:{},isInitialized:!1}),Ek=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,i]=k.useState({}),[s,u]=k.useState(!1);k.useEffect(()=>{Ie(null,null,function*(){let f={};e?(kt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield yk(e)):t&&typeof t=="object"?(kt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(kt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),i(f),u(!0)})},[e,t]);const c=k.useMemo(()=>({overrides:r,isInitialized:s}),[r,s]);return w.jsx(T1.Provider,{value:c,children:n})};let bk=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,i;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((i=this.onceListeners.get(t))==null?void 0:i.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const s of r)try{s(...n)}catch(u){}const i=this.onceListeners.get(t);if(i){for(const s of i)try{s(...n)}catch(u){}this.onceListeners.delete(t)}}};class wk{constructor(t,n,r,i,s){this.url=t,this.headers=n,this.onEvent=r,this.onClose=i,this.logger=s,this.controller=null,this.reading=!1}connect(){return Ie(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ce(M({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Ie(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let i="";try{for(;this.reading;){const{value:s,done:u}=yield n.read();if(u)break;let c;for(i+=r.decode(s,{stream:!0}),i=i.replace(/\r\n/g,`
1
+ (function(Fe,Ke){typeof exports=="object"&&typeof module!="undefined"?Ke(exports):typeof define=="function"&&define.amd?define(["exports"],Ke):(Fe=typeof globalThis!="undefined"?globalThis:Fe||self,Ke(Fe.CimulateMessaging={}))})(this,(function(Fe){"use strict";var jz=Object.defineProperty,Hz=Object.defineProperties;var $z=Object.getOwnPropertyDescriptors;var Ef=Object.getOwnPropertySymbols;var XS=Object.prototype.hasOwnProperty,KS=Object.prototype.propertyIsEnumerable;var Oa=(Fe,Ke)=>(Ke=Symbol[Fe])?Ke:Symbol.for("Symbol."+Fe),zz=Fe=>{throw TypeError(Fe)},bf=Math.pow,L0=(Fe,Ke,ht)=>Ke in Fe?jz(Fe,Ke,{enumerable:!0,configurable:!0,writable:!0,value:ht}):Fe[Ke]=ht,M=(Fe,Ke)=>{for(var ht in Ke||(Ke={}))XS.call(Ke,ht)&&L0(Fe,ht,Ke[ht]);if(Ef)for(var ht of Ef(Ke))KS.call(Ke,ht)&&L0(Fe,ht,Ke[ht]);return Fe},ce=(Fe,Ke)=>Hz(Fe,$z(Ke));var _n=(Fe,Ke)=>{var ht={};for(var St in Fe)XS.call(Fe,St)&&Ke.indexOf(St)<0&&(ht[St]=Fe[St]);if(Fe!=null&&Ef)for(var St of Ef(Fe))Ke.indexOf(St)<0&&KS.call(Fe,St)&&(ht[St]=Fe[St]);return ht};var We=(Fe,Ke,ht)=>L0(Fe,typeof Ke!="symbol"?Ke+"":Ke,ht);var Ie=(Fe,Ke,ht)=>new Promise((St,Wt)=>{var Lt=Dt=>{try{bn(ht.next(Dt))}catch(Ln){Wt(Ln)}},qe=Dt=>{try{bn(ht.throw(Dt))}catch(Ln){Wt(Ln)}},bn=Dt=>Dt.done?St(Dt.value):Promise.resolve(Dt.value).then(Lt,qe);bn((ht=ht.apply(Fe,Ke)).next())}),ps=function(Fe,Ke){this[0]=Fe,this[1]=Ke},D0=(Fe,Ke,ht)=>{var St=(bn,Dt,Ln,vr)=>{try{var yo=ht[bn](Dt),hs=(Dt=yo.value)instanceof ps,ms=yo.done;Promise.resolve(hs?Dt[0]:Dt).then(Un=>hs?St(bn==="return"?bn:"next",Dt[1]?{done:Un.done,value:Un.value}:Un,Ln,vr):Ln({value:Un,done:ms})).catch(Un=>St("throw",Un,Ln,vr))}catch(Un){vr(Un)}},Wt=(bn,Dt,Ln,vr)=>qe[bn]=yo=>(Dt=new Promise((hs,ms,Un)=>(Un=()=>St(bn,yo,hs,ms),Lt?Lt.then(Un):Un())),vr=()=>Lt===Ln&&(Lt=0),Lt=Ln=Dt.then(vr,vr),Dt),Lt,qe={};return ht=ht.apply(Fe,Ke),qe[Oa("asyncIterator")]=()=>qe,Wt("next"),Wt("throw"),Wt("return"),qe},M0=Fe=>{var Ke=Fe[Oa("asyncIterator")],ht=!1,St,Wt={};return Ke==null?(Ke=Fe[Oa("iterator")](),St=Lt=>Wt[Lt]=qe=>Ke[Lt](qe)):(Ke=Ke.call(Fe),St=Lt=>Wt[Lt]=qe=>{if(ht){if(ht=!1,Lt==="throw")throw qe;return qe}return ht=!0,{done:!1,value:new ps(new Promise(bn=>{var Dt=Ke[Lt](qe);Dt instanceof Object||zz("Object expected"),bn(Dt)}),1)}}),Wt[Oa("iterator")]=()=>Wt,St("next"),"throw"in Ke?St("throw"):Wt.throw=Lt=>{throw Lt},"return"in Ke&&St("return"),Wt},QS=(Fe,Ke,ht)=>(Ke=Fe[Oa("asyncIterator")])?Ke.call(Fe):(Fe=Fe[Oa("iterator")](),Ke={},ht=(St,Wt)=>(Wt=Fe[St])&&(Ke[St]=Lt=>new Promise((qe,bn,Dt)=>(Lt=Wt.call(Fe,Lt),Dt=Lt.done,Promise.resolve(Lt.value).then(Ln=>qe({value:Ln,done:Dt}),bn)))),ht("next"),ht("return"),Ke);var Ke=document.createElement("style");Ke.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:50%;padding:.25rem;border:none;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-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button{animation:cim-widget-fab-pulse 2s infinite ease-in-out;transition:transform .2s ease,background-color .2s ease}.cim-widget-minimized-container.cim-widget-layout-commerce .cim-widget-minimized-button:hover{transform:scale(1.1);animation-play-state:paused}.cim-widget-minimized-container.cim-widget-layout-commerce{background-color:transparent}@keyframes cim-widget-fab-pulse{0%,to{box-shadow:0 4px 10px #00000040,0 0 0 .1px color-mix(in srgb,var(--base-color) 40%,transparent)}50%{box-shadow:0 4px 15px #00000059,0 0 0 8px color-mix(in srgb,var(--base-color) 0%,transparent)}}.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-disclaimer{display:flex;flex-direction:column;padding:0 .5rem .5rem;gap:.5rem}.cim-widget-disclaimer-text{font-size:.75rem;color:#00000090;margin:0}.cim-widget-disclaimer-image{object-fit:contain;height:100%;width:100%}.cim-widget-search-bar-wrapper{display:flex;flex-direction:column;padding:.5rem;gap:.5rem;&.with-attachments{border-top:1px solid var(--cim-widget-border-color)}}.cim-widget-search-bar{display:flex;align-items:center;gap:4px;font-family:var(--cim-widget-font-family);&.drag-over{outline:2px dashed var(--cim-widget-primary-color);outline-offset:2px}}.cim-widget-image-file-preview{display:inline-flex;align-items:center;gap:8px;padding-left:.5rem}.cim-widget-image-preview{object-fit:contain;max-height:2.5rem;&.cim-modal-component{max-height:3.5rem}}.cim-widget-image-file-name{width:100%;font-size:.8rem;color:#00000090;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;line-clamp:3;overflow:hidden}.cim-widget-close-button.clear-attachment{padding:.15rem;color:#00000090}.cim-widget-search-input:is(input,textarea){width:100%;height:stretch;min-width:0;min-height:2rem;padding:0 8px;font-size:.875rem;background-color:transparent;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius)}@media(max-width:576px){.cim-widget-search-input:is(input,textarea){font-size:16px}}.cim-widget-connection-status-icon{display:inline-block;min-width:8px;width:.6rem;height:.5rem;border-radius:50%;margin:.35rem;vertical-align:middle;&.connected{background-color:#00d60080}&.disconnected{background-color:#c9c7c7}}.cim-widget-image-upload-button-container{display:inline-flex;height:100%}button.cim-widget-image-upload-button{display:inline-flex;justify-content:center;align-items:center;padding:8px;margin:0;color:inherit;background:transparent;border:0;border-radius:var(--cim-widget-border-radius);cursor:pointer;&:hover{background-color:#f0f0f0}&:disabled,&.disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-search-button{display:inline-flex;align-items:center;white-space:nowrap;gap:.25rem}.cim-widget-search-button-icon{--base-color: var(--cim-widget-primary-color, #3182ce);background-color:var(--base-color);border-color:var(--base-color);color:#fff;&:disabled,&[disabled]{background-color:var(--base-color);border-color:var(--base-color);opacity:.6}&:hover{background-color:color-mix(in srgb,var(--base-color),black 20%);border-color:color-mix(in srgb,var(--base-color),black 20%)}}.cim-widget-search-button-icon-image{object-fit:contain;width:1.25em;height:1.25em}.cim-widget-file-input{display:none}.cim-widget-attach-error{color:#e53e3e;font-size:.75rem;padding:4px 8px 0}.cim-widget-messaging-input-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px;border:1px solid #00000040;border-radius:var(--cim-widget-border-radius);&:focus-within{border-color:var(--cim-widget-primary-color, #3182ce)}.cim-widget-search-input:is(input,textarea){flex:1 1 auto;width:auto;border:none;border-radius:0}& button.cim-widget-image-upload-button{flex:0 0 auto}.cim-widget-image-upload-label{font-size:1.25rem;line-height:1}}.cim-widget-messaging-composer-group{display:flex;align-items:center;flex:1 1 auto;min-width:0;gap:4px}.cim-widget-search-bar.cim-widget-search-bar-with-context{box-sizing:border-box;display:grid;width:100%;grid-template-columns:minmax(0,1fr) max-content;row-gap:4px;border:1px solid var(--cim-widget-border-color, #a3a3a3);border-radius:var(--cim-widget-border-radius);padding:8px 10px}.cim-widget-search-bar-with-context.cim-widget-search-bar-with-escalation{grid-template-columns:minmax(0,1fr) max-content max-content}.cim-widget-page-context-row{display:flex;grid-column:1 / -1;min-width:0;margin-bottom:2px}.cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{display:contents}.cim-widget-page-context-chip{box-sizing:border-box;display:inline-flex;align-items:center;gap:6px;max-width:min(100%,210px);height:32px;padding:3px 4px 3px 5px;border-radius:999px;background:#303030;color:#fff;font-size:12px;font-weight:600;line-height:1.2}.cim-widget-page-context-image{width:26px;height:26px;flex:none;object-fit:cover;border-radius:50%;background:#fff}.cim-widget-page-context-icon{box-sizing:border-box;width:26px;height:26px;flex:none;padding:4px}.cim-widget-page-context-name{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}button.cim-widget-page-context-remove{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;flex:none;padding:0;border:0;border-radius:50%;background:#656565;color:#fff;cursor:pointer}button.cim-widget-page-context-remove:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.cim-widget-search-bar-with-context .cim-widget-search-input:is(input,textarea){flex:1;width:auto;height:36px;border:0;outline-offset:2px}.cim-widget-search-bar-with-context .cim-widget-messaging-input-group{border:0;width:100%}.cim-widget-messaging-composer-group>.cim-widget-messaging-input-group{border:0;border-radius:0}.cim-widget-search-bar textarea.cim-widget-search-input{--cim-widget-composer-min-height: 36px;--cim-widget-composer-max-height: 156px;box-sizing:border-box;height:auto;min-height:var(--cim-widget-composer-min-height);max-height:min(var(--cim-widget-composer-max-height),max(var(--cim-widget-composer-min-height),25dvh));padding:6px 8px;font-family:inherit;line-height:24px;outline:0;resize:none;overflow-y:auto;overflow-x:hidden;overflow-wrap:anywhere;white-space:pre-wrap}.cim-widget-layout-commerce .cim-widget-search-bar textarea.cim-widget-search-input{--cim-widget-composer-min-height: 44px;--cim-widget-composer-max-height: 164px;padding:10px;border-radius:0}.cim-widget-search-bar:has(textarea.cim-widget-search-input),.cim-widget-search-bar:has(textarea.cim-widget-search-input) .cim-widget-messaging-input-group,.cim-widget-search-bar:has(textarea.cim-widget-search-input) .cim-widget-messaging-composer-group{align-items:flex-end}.cim-widget-layout-commerce .cim-widget-messaging-composer-group:has(textarea){box-sizing:border-box;border-radius:1.75rem;align-items:flex-end}.cim-widget-layout-commerce .cim-widget-search-bar:has(textarea)>.cim-widget-icon-button{box-sizing:border-box;width:44px;height:44px;flex:none}.cim-widget-layout-commerce .cim-widget-search-bar:not(.cim-widget-search-bar-with-context):has(textarea)>.cim-widget-icon-button{margin-bottom:5px}@media(forced-colors:active){.cim-widget-search-bar:has(textarea.cim-widget-search-input):focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-overflow-menu{position:relative;height:auto;width:auto}.cim-widget-overflow-menu-list{width:170px;background:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-overflow-menu-button{background-color:#fff}.cim-widget-overflow-menu-button-trigger,.cim-widget-overflow-menu-button{display:inline-flex;align-items:center;width:100%;border:1px solid transparent;border-radius:var(--cim-widget-border-radius);cursor:pointer;color:#333;&:hover{background-color:#f0f0f0}}.cim-widget-overflow-menu-button{gap:.5rem;padding:.5rem .75rem;background-color:#f0f0f080;svg{font-size:.75rem}}.cim-widget-carousel{position:relative;width:100%}.cim-widget-carousel__item-group{padding:4px 0;justify-content:flex-start;&.carousel-row-container{display:flex}}.cim-widget-carousel__item{flex-shrink:0;>*{height:100%}}.cim-widget-carousel__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 4px}.cim-widget-carousel__prev-trigger,.cim-widget-carousel__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:32px;height:32px;padding:1rem 0;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color, #d1d5db);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);cursor:pointer;box-shadow:0 1px 3px #0000001a;transition:background-color .15s ease,box-shadow .15s ease;&:hover{color:var(--cim-widget-font-color, #1a202c)}}.cim-widget-carousel__prev-trigger:hover,.cim-widget-carousel__next-trigger:hover{background-color:#f9fafb;box-shadow:0 2px 6px #0000001f}.cim-widget-carousel__prev-trigger:disabled,.cim-widget-carousel__next-trigger:disabled{opacity:.4;cursor:not-allowed}.cim-widget-carousel__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-carousel__indicator{width:6px;height:6px;border-radius:3px;border:none;background-color:var(--cim-widget-border-color, #d1d5db);cursor:pointer;padding:0;transition:width .2s cubic-bezier(.16,1,.3,1),background-color .2s ease}.cim-widget-carousel__indicator[data-current]{background-color:var(--cim-widget-font-color, #1a202c);width:16px;border-radius:3px}.cim-widget-carousel__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-overflow-panel{position:absolute;top:100%;left:0;right:0;display:flex;flex-direction:column;gap:.5rem;padding:.5rem;background:#fff;border-bottom:1px solid var(--cim-widget-border-color);z-index:10}.cim-widget-overflow-panel .cim-widget-overflow-menu-button{width:100%;justify-content:center;gap:.75rem;font-size:.875rem}.cim-widget-left-right-toggle-button{display:none}@media(min-width:576px){.cim-widget-left-right-toggle-button{display:inline-flex}}.cim-widget-price{display:flex;align-items:baseline;gap:.4em;flex-wrap:wrap;font-family:var(--cim-widget-font-family, sans-serif)}.cim-widget-price__amount{font-weight:700;font-size:1em;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-price__compare{font-weight:400;font-size:.85em;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.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-connecting-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-size: 8px;--cim-loader-speed: 1.4s;--cim-loader-gap: .5rem;display:flex;align-items:center;gap:var(--cim-loader-gap)}.cim-widget-connecting-indicator.embedded{padding:12px 4px}.cim-widget-connecting-indicator.standalone{padding:12px 1rem}.cim-widget-connecting-pulse-wrapper{position:relative;width:calc(var(--cim-loader-size) * 2);height:calc(var(--cim-loader-size) * 2);display:flex;align-items:center;justify-content:center}.cim-widget-connecting-pulse{width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;background-color:var(--cim-loader-color);animation:cim-widget-pulse var(--cim-loader-speed) ease-in-out infinite}.cim-widget-connecting-ring{position:absolute;width:var(--cim-loader-size);height:var(--cim-loader-size);border-radius:50%;border:1.5px solid var(--cim-loader-color);animation:cim-widget-ring-expand var(--cim-loader-speed) ease-out infinite}.cim-widget-connecting-text{font-size:12px;color:var(--cim-widget-font-color);font-family:var(--cim-widget-font-family, inherit);opacity:0;transform:translateY(4px);transition:opacity .4s ease,transform .4s ease}.cim-widget-connecting-text--visible{opacity:1;transform:translateY(0)}.cim-widget-connecting-indicator--sparkles{flex:1 0 100%;align-self:stretch;min-height:20rem;flex-direction:column;justify-content:center;gap:.5rem;padding:2rem 1rem;color:var(--cim-widget-font-color, #111111);text-align:center}.cim-widget-connecting-sparkles{position:relative;width:7.5rem;height:6.5rem;margin-bottom:.75rem}.cim-widget-connecting-sparkle{position:absolute;top:50%;left:50%;width:2.8rem;height:2.8rem;margin-top:-1.4rem;margin-left:-1.4rem;overflow:visible;animation:cim-widget-sparkle-diagonal 2s cubic-bezier(.4,0,.2,1) infinite}.cim-widget-connecting-sparkle.sparkle-left{animation-delay:0s}.cim-widget-connecting-sparkle.sparkle-main{animation-delay:-.6667s}.cim-widget-connecting-sparkle.sparkle-right{animation-delay:-1.3333s}.cim-widget-connecting-heading,.cim-widget-connecting-text--feature{font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, #111111)}.cim-widget-connecting-heading{font-size:.875rem;line-height:1.4;opacity:.72}.cim-widget-connecting-text--feature{min-height:1.4em;font-size:1rem;font-weight:700;line-height:1.4}@keyframes cim-widget-pulse{0%,to{transform:scale(1);opacity:1}50%{transform:scale(1.6);opacity:.4}}@keyframes cim-widget-ring-expand{0%{transform:scale(1);opacity:.6}to{transform:scale(2.8);opacity:0}}@keyframes cim-widget-sparkle-diagonal{0%{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:1}33.33%{transform:translate(0) scale(1.5);opacity:1}66.67%{transform:translate(2.75rem,2.75rem) scale(1);opacity:1}75%{transform:translate(2.75rem,2.75rem) scale(1);opacity:0}76%{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:0}to{transform:translate(-2.75rem,-2.75rem) scale(1);opacity:1}}@media(prefers-reduced-motion:reduce){.cim-widget-connecting-pulse,.cim-widget-connecting-ring,.cim-widget-connecting-sparkle{animation:none!important}.cim-widget-connecting-pulse{opacity:.6}.cim-widget-connecting-text{animation:none!important;transition:none!important}}.cim-widget-processing-indicator{--cim-loader-color: var(--cim-widget-primary-color);--cim-loader-speed: 1.8s;display:flex;flex-direction:column;gap:8px}.cim-widget-processing-indicator.embedded{max-width:80%;min-height:2.5rem;padding:.5rem 0}.cim-widget-processing-indicator.standalone{padding:0 1rem;min-height:3rem}.cim-widget-processing-text{font-size:.875rem;font-style:italic;color:color-mix(in srgb,var(--cim-widget-secondary-color) 70%,var(--cim-loader-color));opacity:.75}.cim-widget-processing-shimmer-bar{height:10px;min-height:10px;border-radius:4px;background:linear-gradient(90deg,var(--cim-widget-border-color) 25%,color-mix(in srgb,var(--cim-loader-color) 15%,var(--cim-widget-background-color)) 50%,var(--cim-widget-border-color) 75%);background-size:200% 100%;animation:cim-widget-shimmer var(--cim-loader-speed) ease-in-out infinite}.cim-widget-processing-shimmer-bar:nth-child(2){width:75%;animation-delay:.15s}.cim-widget-processing-shimmer-bar:nth-child(3){width:50%;animation-delay:.3s}@keyframes cim-widget-shimmer{0%{background-position:-200% 0}to{background-position:200% 0}}@media(prefers-reduced-motion:reduce){.cim-widget-processing-shimmer-bar{animation:none!important;background:var(--cim-widget-border-color)!important}}.cim-widget-blinking-cursor{display:inline-flex;margin-left:2px;line-height:0;animation:cim-widget-cursor-blink 1.5s steps(2) infinite}@keyframes cim-widget-cursor-blink{0%{opacity:0}}.cim-widget-ul{list-style-type:disc;padding-left:1.5rem}.cim-widget-ol{list-style-type:decimal;padding-left:1.5rem}.cim-widget-table-container{margin-top:1rem;margin-bottom:1rem;margin-right:.5rem;overflow-x:auto}.cim-widget-table{border-radius:.5rem;border-width:1px;border-style:solid;border-color:var(--cim-widget-border-color);border-collapse:collapse;width:100%}.cim-widget-thead{background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);border-bottom-width:2px;border-color:var(--cim-widget-border-color)}.cim-widget-tbody{border-width:0px;box-sizing:border-box;background-color:#ffffff90;overflow-wrap:break-word}.cim-widget-tr{border-style:solid;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-th{padding:.5rem 1rem;text-align:left;font-weight:700;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-td{padding:.5rem 1rem;border-bottom-width:1px;border-color:var(--cim-widget-border-color)}.cim-widget-message-container pre{margin:0}.cim-widget-msg-product-card{display:flex;flex-direction:column;width:180px;min-width:180px;height:100%;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden;transition:box-shadow .2s ease}.cim-widget-msg-product-card:hover{box-shadow:0 2px 8px #0000001f}.cim-widget-msg-product-card__image-wrapper{position:relative;width:100%;height:100%;aspect-ratio:1 / 1;overflow:hidden}.cim-widget-msg-product-card__image{width:100%;height:100%;object-fit:contain;display:block}.cim-widget-msg-product-card__image-placeholder{width:100%;height:100%;display:flex;align-items:center;justify-content:center;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-border-color, #d1d5db)}.cim-widget-msg-product-card__image-placeholder svg{width:40%;height:40%}button.cim-widget-msg-product-card__image-button{width:100%;height:100%;padding:0;margin:0;border:none;background:none;cursor:pointer;display:block}button.cim-widget-msg-product-card__image-button:disabled{cursor:default}.cim-widget-msg-product-card__content{display:flex;flex-direction:column;justify-content:space-between;gap:1rem;padding:12px;height:50%}.cim-widget-msg-product-card__content-header{display:grid;gap:8px}.cim-widget-msg-product-card__title,.cim-widget-msg-product-card__title-link{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0;display:-webkit-box;line-clamp:2;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.cim-widget-msg-product-card__title-link{text-decoration:none;cursor:pointer}button.cim-widget-msg-product-card__title-link{padding:0;border:none;background:none;text-align:left;width:100%}.cim-widget-msg-product-card__title-link:hover{text-decoration:underline}button.cim-widget-msg-product-card__title-link:disabled{cursor:default;text-decoration:none}.cim-widget-msg-product-card__description{font-size:12px}@media(min-width:576px){.cim-widget-msg-product-card__description{display:-webkit-box;line-clamp:4;-webkit-line-clamp:4;-webkit-box-orient:vertical;overflow:hidden}}.cim-widget-msg-product-card__price-row{display:flex;align-items:center;justify-content:space-between;gap:8px}.cim-widget-msg-product-card__prices{display:flex;align-items:baseline;gap:6px;flex-wrap:wrap}.cim-widget-msg-product-card__price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:700;font-size:14px;line-height:1.2;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-product-card__compare-price{font-family:var(--cim-widget-font-family, sans-serif);font-weight:400;font-size:13px;line-height:1.2;color:var(--cim-widget-font-color, #3f3f46);opacity:.6;text-decoration:line-through}.cim-widget-msg-product-card__add-btn{display:flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-primary-color, #141415);color:#fff;cursor:pointer;transition:opacity .15s ease}.cim-widget-msg-product-card__add-btn:hover{opacity:.85}.cim-widget-msg-product-card__add-btn svg{width:14px;height:14px}.cim-widget-product-carousel{margin-bottom:1rem}.cim-widget-product-carousel-title{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-product-carousel-item{display:flex;flex-direction:column;p.cim-widget-product-carousel-caption{font-size:11px;line-height:1.3;color:color-mix(in hsl decreasing hue,var(--cim-widget-font-color) 80%,white);margin:.25rem .5rem;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__control{padding:0 1rem}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger{box-sizing:border-box;width:2.75rem;min-width:2.75rem;height:2.75rem;min-height:2.75rem;padding:0;border:1px solid #e5e5e5;border-radius:50%;background-color:#fff;color:#333;box-shadow:0 5px 16px #0000001a;transform:none}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger:hover,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger:hover{background-color:#fff;box-shadow:0 6px 18px #00000026}.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-product-carousel .cim-widget-carousel--circle-arrow-navigation .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid currentColor;outline-offset:2px}.cim-widget-cart-express{width:100%;height:0;overflow:hidden;transition:height .15s ease}.cim-widget-cart-express-frame{display:block;width:100%;height:100%;border:0;background:transparent;color-scheme:normal}.cim-widget-cart-express:not(.cim-widget-cart-express-ready) .cim-widget-cart-express-frame{visibility:hidden;pointer-events:none}.cim-widget-cart-express-error{display:flex;align-items:center;gap:.5rem;padding:.5rem .75rem;margin-bottom:.5rem;border-radius:.375rem;background:#fef2f2;border:1px solid #fecaca;color:#c53030;font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;line-height:1.4}.cim-widget-cart-express-error svg{flex-shrink:0;width:1.125rem;height:1.125rem}.cim-widget-cart-express-error span{flex:1;min-width:0;display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:3;line-clamp:3;overflow:hidden;word-break:break-word}.cim-widget-cart-express-error-dismiss{display:inline-flex;align-items:center;justify-content:center;flex-shrink:0;padding:0;margin:0;background:transparent;border:0;color:inherit;cursor:pointer;border-radius:.25rem;line-height:0}.cim-widget-cart-express-error-dismiss:hover,.cim-widget-cart-express-error-dismiss:focus-visible{background:#c530301f}.cim-widget-cart{display:flex;flex-direction:column;gap:12px;width:100%;padding:16px;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);font-family:var(--cim-widget-font-family, sans-serif);color:var(--cim-widget-font-color, #3f3f46);box-sizing:border-box}.cim-widget-cart.cim-widget-cart-busy{opacity:.7}.cim-widget-cart *{box-sizing:border-box}.cim-widget-cart-banner{display:flex;align-items:flex-start;gap:10px}.cim-widget-cart-banner-icon{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:4px;background-color:#2e844a;color:#fff}.cim-widget-cart-banner-icon svg{width:16px;height:16px}.cim-widget-cart-banner-text{margin:0;font-size:.875rem;font-weight:500;line-height:1.4}.cim-widget-cart-summary{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;padding:12px 16px;border:none;background-color:transparent;font-family:inherit;color:inherit;text-align:left;cursor:pointer}.cim-widget-cart-summary:focus{outline:none}.cim-widget-cart-summary:focus-visible{border-radius:var(--cim-widget-border-radius, .25rem);box-shadow:inset 0 0 0 2px var(--cim-widget-primary-color, #2563eb)}.cim-widget-cart-summary-text{flex:1 1 auto;min-width:0;font-size:.875rem;line-height:1.4}.cim-widget-cart-summary-text p{margin:0}.cim-widget-cart-summary-toggle{flex:0 0 auto;display:flex;align-items:center;justify-content:center;opacity:.6}.cim-widget-cart-summary-toggle svg{width:20px;height:20px}.cim-widget-cart-box{display:flex;flex-direction:column;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-expanded{display:flex;flex-direction:column;padding:0 16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}@media(min-width:768px){.cim-widget-embedded-chat .cim-widget-cart-expanded,.cim-widget-modal.standalone .cim-widget-cart-expanded{flex-direction:row;gap:32px;align-items:flex-start}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-items-section,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-items-section{flex:1 1 auto;min-width:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-totals,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-totals{flex:0 0 auto;width:280px;padding-top:64px;padding-bottom:0;gap:14px;border-top:none;margin-top:0}.cim-widget-embedded-chat .cim-widget-cart-expanded .cim-widget-cart-total-row,.cim-widget-modal.standalone .cim-widget-cart-expanded .cim-widget-cart-total-row{gap:12px}}.cim-widget-cart-items{list-style:none;margin:0;padding:0;display:flex;flex-direction:column}.cim-widget-cart-item{display:flex;align-items:flex-start;gap:12px;padding:12px 0;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-item:first-child{border-top:none}.cim-widget-cart-item-image{flex:0 0 auto;width:64px;height:64px;border-radius:4px;overflow:hidden;background-color:#f4f4f5}.cim-widget-cart-item-image img{width:100%;height:100%;object-fit:cover;display:block}.cim-widget-cart-item-details{flex:1 1 auto;min-width:0;display:flex;flex-direction:column;gap:6px}.cim-widget-cart-item-name{margin:0;font-size:1rem;font-weight:600;line-height:1.3;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical}.cim-widget-cart-item-attrs{display:flex;flex-direction:column;gap:6px;margin-top:-3px}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr,.cim-widget-cart-item-attr{margin:0;font-size:.875rem;line-height:1.3;opacity:.7}.cim-widget-cart-item-attrs p.cim-widget-cart-item-attr+p.cim-widget-cart-item-attr{margin-top:0}.cim-widget-cart-item-price{display:flex;flex-direction:column;align-items:flex-start;gap:2px;white-space:nowrap}.cim-widget-cart-item-original-price{font-size:1rem;opacity:.55;text-decoration:line-through}.cim-widget-cart-item-final-price{font-size:1rem;font-weight:700}.cim-widget-cart-item-footer{display:flex;flex-direction:column;align-items:flex-start;gap:6px}.cim-widget-cart-qty-heading{font-size:.9375rem;font-weight:400;margin-bottom:0}.cim-widget-cart-qty-input-wrapper{display:flex;align-items:center;justify-content:flex-start}.cim-widget-cart-qty-input{width:45px;height:36px;padding:6px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #3f3f46);font-family:inherit;font-size:.9375rem;font-weight:400;text-align:center;transition:border-color .15s ease;box-sizing:border-box}.cim-widget-cart-qty-input:hover:not(:disabled){border-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 40%,var(--cim-widget-border-color, #d1d5db))}.cim-widget-cart-qty-input:focus{outline:none;border-color:var(--cim-widget-primary-color, #2563eb);box-shadow:0 0 0 2px color-mix(in srgb,var(--cim-widget-primary-color, #2563eb) 20%,transparent)}.cim-widget-cart-qty-input:disabled{opacity:.5;cursor:not-allowed}.cim-widget-cart-qty-spinner{width:18px;height:18px;animation:cim-widget-spin 1s linear infinite}@keyframes cim-widget-spin{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.cim-widget-cart-item-remove{padding:0;border:none;background:transparent;font-family:inherit;font-size:.875rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap;cursor:pointer;transition:opacity .15s ease;text-decoration:underline}.cim-widget-cart-item-remove:hover:not(:disabled){opacity:.7}.cim-widget-cart-item-remove:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-chips{display:flex;flex-wrap:wrap;gap:6px}.cim-widget-cart-applied-coupons{padding-top:12px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7)}.cim-widget-cart-chip{display:inline-flex;align-items:center;gap:4px;padding:3px 8px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:#f4f4f5;font-size:.6875rem;font-weight:500;line-height:1.2;letter-spacing:.02em}.cim-widget-cart-chip svg{width:12px;height:12px;opacity:.7}.cim-widget-cart-chip.inactive{opacity:.5}.cim-widget-cart-totals{display:flex;flex-direction:column;gap:6px;padding-top:12px;padding-bottom:16px}.cim-widget-cart-total-shimmer{display:inline-block;height:1em;width:60px;background:linear-gradient(90deg,var(--cim-widget-border-color, #e4e4e7) 25%,color-mix(in srgb,var(--cim-widget-border-color, #e4e4e7) 50%,transparent) 50%,var(--cim-widget-border-color, #e4e4e7) 75%);background-size:200% 100%;border-radius:var(--cim-widget-border-radius);animation:cim-widget-shimmer 1.5s ease-in-out infinite}@keyframes cim-widget-shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}.cim-widget-cart-total-row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:.9375rem;line-height:1.3}.cim-widget-cart-total-label{display:inline-flex;align-items:center;gap:8px;opacity:.85}.cim-widget-cart-total-badge{font-weight:700;opacity:1}.cim-widget-cart-total-row.emphasized{margin-top:4px;font-size:1.125rem;font-weight:700}.cim-widget-cart-total-row.emphasized .cim-widget-cart-total-label{opacity:1}.cim-widget-cart-coupon{display:flex;align-items:stretch;gap:8px}.cim-widget-cart-coupon-field{flex:1 1 auto;min-width:0;display:flex;align-items:center;gap:8px;padding:0 10px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius)}.cim-widget-cart-coupon-icon{flex:0 0 auto;display:flex;align-items:center;opacity:.55}.cim-widget-cart-coupon-icon svg{width:16px;height:16px}.cim-widget-cart-coupon-input{flex:1 1 auto;min-width:0;padding:11px 0;border:none;outline:none;background:transparent;font-family:inherit;font-size:.8125rem;color:inherit}.cim-widget-cart-coupon-input::placeholder{opacity:.5}.cim-widget-cart-coupon-input:disabled{cursor:not-allowed}.cim-widget-cart-coupon-submit{flex:0 0 auto;display:flex;align-items:center;justify-content:center;width:44px;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:inherit;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-coupon-submit svg{width:16px;height:16px}.cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:color-mix(in srgb,var(--cim-widget-font-color, #3f3f46) 8%,transparent)}.cim-widget-cart-coupon-submit:disabled{opacity:.4;cursor:not-allowed}.cim-widget-cart-checkout-button{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;padding:11px 16px;border:1px solid var(--cim-widget-primary-color, #3182ce);border-radius:var(--cim-widget-border-radius);background-color:transparent;color:var(--cim-widget-primary-color, #3182ce);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;text-decoration:none;cursor:pointer;transition:background-color .15s ease}.cim-widget-cart-checkout-button svg{width:16px;height:16px}.cim-widget-cart-checkout-button:hover{background-color:color-mix(in srgb,var(--cim-widget-primary-color, #3182ce) 6%,transparent);text-decoration:none}.cim-widget-cart-footer{margin:0;font-size:.75rem;line-height:1.3;opacity:.6;text-align:center}.cim-widget-layout-commerce .cim-widget-cart-item-image{width:90px;height:90px;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:12px;background-color:#fff;padding:4px;display:flex;align-items:center;justify-content:center}.cim-widget-layout-commerce .cim-widget-cart-item-image img{max-width:100%;max-height:100%;object-fit:contain}.cim-widget-layout-commerce .cim-widget-cart-item-price{display:flex;flex-direction:row;align-items:center;gap:8px}.cim-widget-layout-commerce .cim-widget-cart-item-original-price{font-size:.9375rem;font-weight:400}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:1.0625rem;color:var(--cim-widget-font-color, #18181b)}.cim-widget-layout-commerce .cim-widget-cart-qty-heading{font-weight:500;margin-bottom:2px;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-layout-commerce .cim-widget-cart-qty-selector{display:inline-flex;align-items:center;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:9999px;padding:4px 8px;background-color:var(--cim-widget-background-color, #ffffff);width:fit-content;box-shadow:0 1px 2px #00000005}.cim-widget-layout-commerce .cim-widget-cart-qty-selector.disabled{opacity:.6}.cim-widget-layout-commerce .cim-widget-cart-qty-btn{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border:none;background:transparent;color:var(--cim-widget-font-color, #52525b);font-size:1.125rem;font-weight:500;cursor:pointer;transition:opacity .15s ease;user-select:none;padding:0}.cim-widget-layout-commerce .cim-widget-cart-qty-btn:hover:not(:disabled){opacity:.6}.cim-widget-layout-commerce .cim-widget-cart-qty-btn:disabled{opacity:.35;cursor:not-allowed}.cim-widget-layout-commerce .cim-widget-cart-qty-input{width:36px;height:24px;padding:0;border:none;background:transparent;color:var(--cim-widget-font-color, #18181b);font-family:inherit;font-size:.9375rem;font-weight:600;text-align:center;outline:none;box-sizing:border-box}.cim-widget-layout-commerce .cim-widget-cart-qty-spinner{width:36px;height:24px;padding:3px 9px;box-sizing:border-box;animation:cim-widget-spin 1s linear infinite}.cim-widget-layout-commerce .cim-widget-cart-totals{gap:8px;padding-top:16px;border-top:1px solid var(--cim-widget-border-color, #e4e4e7);margin-top:8px}.cim-widget-layout-commerce .cim-widget-cart-total-row{display:grid;grid-template-columns:max-content minmax(0,1fr) max-content}.cim-widget-layout-commerce .cim-widget-cart-total-label{grid-column:1}.cim-widget-layout-commerce .cim-widget-cart-total-badge{grid-column:2;text-align:left}.cim-widget-layout-commerce .cim-widget-cart-total-value{grid-column:3;text-align:right}.cim-widget-layout-commerce .cim-widget-cart-coupon-field{padding:0 12px;border:1px solid var(--cim-widget-border-color, #e4e4e7);border-radius:12px}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit{height:44px;border:none;border-radius:12px;background-color:#f3f4f6;color:#3f3f46}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit:hover:not(:disabled){background-color:#e5e7eb}.cim-widget-layout-commerce .cim-widget-cart-coupon-submit:disabled{opacity:.35}.cim-widget-order-confirmation-meta{display:flex;flex-direction:column;gap:2px;font-size:.8125rem;opacity:.85}.cim-widget-pdp-gallery{position:relative;width:100%}.cim-widget-pdp-gallery__item-group{display:flex}.cim-widget-pdp-gallery__item{flex-shrink:0;width:100%}.cim-widget-pdp-gallery__image{width:100%;height:100%;aspect-ratio:1 / 1;object-fit:contain;display:block;opacity:0;transition:opacity .2s ease}.cim-widget-pdp-gallery__image--loaded{opacity:1}.cim-widget-pdp-gallery__control{position:absolute;top:50%;left:0;right:0;transform:translateY(-50%);display:flex;justify-content:space-between;pointer-events:none;padding:0 8px}.cim-widget-pdp-gallery__prev-trigger,.cim-widget-pdp-gallery__next-trigger{pointer-events:auto;display:flex;align-items:center;justify-content:center;width:36px;height:36px;border-radius:var(--cim-widget-border-radius, 12px);border:1px solid var(--cim-widget-border-color, transparent);background-color:var(--cim-widget-background-color, #f3f4f6);color:var(--cim-widget-font-color, #1f2937);cursor:pointer;box-shadow:none;transition:background-color .15s ease,opacity .15s ease}.cim-widget-pdp-gallery__prev-trigger:hover,.cim-widget-pdp-gallery__next-trigger:hover{background-color:var(--cim-widget-background-color-hover, #e5e7eb);opacity:.9}.cim-widget-pdp-gallery__indicator-group{display:flex;justify-content:center;gap:6px;padding-top:12px}.cim-widget-pdp-gallery__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,width .2s ease,border-radius .2s ease}.cim-widget-pdp-gallery__indicator[data-current]{width:20px;border-radius:4px;background-color:var(--cim-widget-font-color, #1a202c)}.cim-widget-pdp-gallery__indicator:hover:not([data-current]){background-color:var(--cim-widget-font-color, #1a202c);opacity:.5}.cim-widget-msg-pdp{width:100%;margin:.5rem 0;font-family:var(--cim-widget-font-family, sans-serif);container:cim-pdp / inline-size}.cim-widget-msg-pdp__card{display:flex;flex-direction:column;background-color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);overflow:hidden}.cim-widget-msg-pdp__content{display:flex;flex-direction:column;gap:1rem;padding:16px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600;font-size:1rem;line-height:1.3;letter-spacing:-.3px;color:var(--cim-widget-font-color, #3f3f46);margin:0}.cim-widget-msg-pdp__title-link{text-decoration:none}.cim-widget-msg-pdp__title-link:hover{text-decoration:underline}.cim-widget-msg-pdp__description{font-size:.75rem;line-height:1.4;color:var(--cim-widget-font-color, #3f3f46);opacity:.85;margin:0}.cim-widget-msg-pdp__variant{display:flex;flex-direction:column;gap:.75rem}.cim-widget-msg-pdp__variant-label{display:flex;align-items:baseline;gap:1rem;font-size:.875rem}.cim-widget-msg-pdp__variant-name{opacity:.7;color:var(--cim-widget-font-color, #3f3f46);white-space:nowrap}.cim-widget-msg-pdp__variant-value{color:var(--cim-widget-font-color, #3f3f46);font-weight:700}.cim-widget-msg-pdp__swatches,.cim-widget-msg-pdp__chips{display:flex;flex-wrap:wrap;gap:.25rem}input[type=radio].cim-widget-msg-pdp__radio-input{position:absolute;inset:0;width:100%;height:100%;margin:0;padding:0;border:0;border-radius:inherit;opacity:0;cursor:pointer}input[type=radio].cim-widget-msg-pdp__radio-input:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}label.cim-widget-msg-pdp__chip{position:relative;display:inline-flex;align-items:center;justify-content:center;min-width:34px;min-height:34px;padding:.25rem .75rem;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46);font-size:.875rem;box-sizing:border-box;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__chip:hover{background-color:#0000000a;border-color:var(--cim-widget-primary-color, #3182ce)}label.cim-widget-msg-pdp__chip.selected{background-color:#e5e5e5;border-color:#c5c5c5;color:#141415}label.cim-widget-msg-pdp__chip.selected:hover{background-color:#d9d9d9;border-color:#b8b8b8}label.cim-widget-msg-pdp__chip.unavailable{opacity:.4;text-decoration:line-through}label.cim-widget-msg-pdp__swatch{display:inline-flex;position:relative;width:36px;height:36px;min-width:36px;min-height:36px;padding:2px;border-radius:50%;background-color:transparent;border:1px solid var(--cim-widget-border-color, #d1d5db);box-sizing:border-box;overflow:hidden;cursor:pointer;user-select:none}label.cim-widget-msg-pdp__swatch:hover{border-color:var(--cim-widget-font-color, #3f3f46)}label.cim-widget-msg-pdp__swatch.selected{border-width:2px;border-color:#c5c5c5}label.cim-widget-msg-pdp__swatch.unavailable{opacity:.3}.cim-widget-msg-pdp__swatch-image{width:100%;height:100%;border-radius:50%;object-fit:cover;display:block}.cim-widget-msg-pdp__stepper{display:flex;align-items:center;gap:.25rem}button.cim-widget-msg-pdp__stepper-btn{border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius);color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__quantity{min-width:1.5rem;text-align:center;font-size:.95rem;font-weight:700;color:var(--cim-widget-font-color, #3f3f46)}.cim-widget-msg-pdp__actions{display:flex;flex-direction:column;gap:12px;margin-top:.25rem}button.cim-widget-msg-pdp__add-to-cart{display:flex;align-items:center;justify-content:center;gap:6px;min-height:40px;height:40px;background-color:var(--cim-widget-primary-color, #1c1d22);color:var(--cim-widget-background-color, #ffffff);border:1px solid var(--cim-widget-primary-color, #1c1d22);border-radius:var(--cim-widget-border-radius, 8px);font-weight:700;font-size:14px;transition:background-color .15s ease,border-color .15s ease;&:hover:not(:disabled){background-color:var(--cim-widget-secondary-color, #333333);border-color:var(--cim-widget-secondary-color, #333333)}&:hover:disabled{background-color:var(--cim-widget-primary-color, #1c1d22);opacity:.6}}.cim-widget-msg-pdp__add-to-cart-icon{width:18px;height:18px;flex-shrink:0}.cim-widget-cart-express~button.cim-widget-msg-pdp__add-to-cart{background-color:var(--cim-widget-secondary-button-bg, #ededed);color:var(--cim-widget-font-color, #1c1d22);border:1px solid var(--cim-widget-secondary-button-border, #ededed);border-radius:var(--cim-widget-border-radius, 8px);&:hover:not(:disabled){background-color:var(--cim-widget-secondary-button-hover-bg, #e0e0e0);border-color:var(--cim-widget-secondary-button-hover-border, #e0e0e0)}&:hover:disabled{background-color:var(--cim-widget-secondary-button-bg, #ededed);opacity:.6}}@container cim-pdp (max-width: 340px){.cim-widget-msg-pdp__content{padding:12px}.cim-widget-msg-pdp__title,.cim-widget-msg-pdp__title-link{font-size:.95rem}label.cim-widget-msg-pdp__chip{font-size:.75rem}label.cim-widget-msg-pdp__swatch,button.cim-widget-msg-pdp__stepper-btn{width:28px;height:28px;min-width:28px;min-height:28px}.cim-widget-msg-pdp__quantity{font-size:.85rem}button.cim-widget-msg-pdp__express-pay,button.cim-widget-msg-pdp__add-to-cart{min-height:36px;height:36px;font-size:.8rem}}@container cim-pdp (min-width: 480px){.cim-widget-msg-pdp__card{flex-direction:row;align-items:center;gap:.5rem}.cim-widget-msg-pdp__gallery{flex:0 0 50%;min-width:0;padding-bottom:1.5rem}.cim-widget-msg-pdp__content{flex:1 1 0;min-width:0}}.cim-widget-product-comparison{overflow-x:auto;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:var(--cim-widget-border-radius, .5rem);background-color:var(--cim-widget-background-color, #ffffff);margin-bottom:1rem}.cim-widget-product-comparison__grid{display:grid}.cim-widget-product-comparison__header{display:contents}.cim-widget-product-comparison__header-spacer{position:sticky;left:0;background-color:var(--cim-widget-background-color, #ffffff);z-index:2;border-right:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__product-col{display:flex;flex-direction:column;align-items:flex-start;padding:12px 8px 8px;min-width:0;overflow:hidden}.cim-widget-product-comparison__image{width:100%;max-width:100%;max-height:180px;aspect-ratio:1 / 1;object-fit:contain;border-radius:4px;background-color:#fff}.cim-widget-product-comparison__name{font-family:var(--cim-widget-font-family, sans-serif);font-size:.875rem;font-weight:700;line-height:1.3;color:var(--cim-widget-primary-color, #3182ce);text-decoration:none;margin-top:8px;text-align:left;width:100%;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-product-comparison__name-link:hover{text-decoration:underline}.cim-widget-product-comparison__table,.cim-widget-product-comparison__row{display:contents}.cim-widget-product-comparison__row-label,.cim-widget-product-comparison__row-value{padding:10px 12px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.8125rem;line-height:1.4;color:var(--cim-widget-font-color, #1a202c);border-top:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-label{font-weight:700;white-space:nowrap;position:sticky;left:0;background-color:var(--cim-widget-background-color, #ffffff);z-index:2;border-right:1px solid var(--cim-widget-border-color, #d1d5db)}.cim-widget-product-comparison__row-value{font-weight:400}.cim-widget-product-comparison__action-cell{display:flex;align-items:center;justify-content:center;padding:12px}.cim-widget-product-comparison__add-to-cart-btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;background-color:#ededed;color:#1a202c;border:none;border-radius:9999px;padding:8px 14px;font-family:var(--cim-widget-font-family, sans-serif);font-size:.75rem;font-weight:600;cursor:pointer;transition:background-color .15s ease,opacity .15s ease;white-space:nowrap}.cim-widget-product-comparison__add-to-cart-btn:hover{background-color:#e1e1e1}.cim-widget-product-comparison__add-to-cart-btn:active{opacity:.85}.cim-widget-product-comparison__image-button{background:none;border:none;padding:0;cursor:pointer;width:100%;display:block}.cim-widget-product-comparison__name-button{background:none;border:none;padding:0;cursor:pointer;text-align:left;display:block}.cim-widget-product-comparison__name-button:hover{text-decoration:underline}.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-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-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-page-context-divider{display:flex;align-items:center;justify-content:center;width:100%;margin:1.5rem 0;color:var(--cim-widget-font-color, #333);font-family:var(--cim-widget-font-family, Arial, sans-serif);font-size:.875rem}.cim-widget-page-context-divider:before,.cim-widget-page-context-divider:after{content:"";height:1px;flex:1 1 auto;background:var(--cim-widget-border-color, #e5e7eb)}.cim-widget-page-context-divider-pill{display:inline-flex;align-items:center;gap:.625rem;min-width:0;max-width:calc(100% - 2rem);padding:.375rem;border:1px solid var(--cim-widget-border-color, #e5e7eb);border-radius:999px;background:var(--cim-widget-background-color, #fff)}.cim-widget-page-context-divider-image,.cim-widget-page-context-divider-icon{width:1.5rem;height:1.5rem;flex:0 0 auto;border-radius:50%;object-fit:contain}.cim-widget-page-context-divider-label{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cim-widget-jump-to-latest{position:sticky;bottom:.75rem;z-index:9999;height:0;pointer-events:none}.cim-widget-jump-to-latest-button{position:absolute;right:0;bottom:0;pointer-events:auto;display:inline-flex;align-items:center;justify-content:center;width:3rem;height:3rem;padding:0;border:1px solid var(--cim-widget-border-color, #d1d5db);border-radius:50%;background-color:var(--cim-widget-background-color, #fff);color:var(--cim-widget-font-color, #1f2937);box-shadow:0 2px 8px #0000001f;font-family:var(--cim-widget-font-family);font-size:.8125rem;font-weight:600;line-height:1;cursor:pointer}.cim-widget-jump-to-latest-button:hover{background-color:var(--cim-widget-background-color, #fff)}.cim-widget-jump-to-latest-button:focus-visible{outline:2px solid var(--cim-widget-primary-color, #3182ce);outline-offset:2px}.cim-widget-transcript-placeholder{display:flex;flex-direction:column;align-items:flex-start;padding:.5rem 1rem;margin-bottom:1rem;font-family:var(--cim-widget-font-family, inherit);font-size:.875rem;color:var(--cim-widget-font-color, inherit)}.cim-widget-message-group-child{display:flex;flex-direction:column;gap:.25rem}.cim-widget-send-error{display:flex;flex-direction:column;align-items:flex-end;gap:.5rem;padding:.25rem 0;font-family:var(--cim-widget-font-family)}.cim-widget-send-error .cim-widget-send-error-text{font-size:.875rem;line-height:1.4;color:#4a5568;text-align:right}.cim-widget-modal .cim-widget-send-error{align-items:flex-start;padding:0 1rem}.cim-widget-modal .cim-widget-send-error .cim-widget-send-error-text{text-align:left}.cim-widget-retry-button{--base-color: var(--cim-widget-primary-color, #3182ce);display:inline-flex;align-items:center;gap:.3rem;padding:.25rem 0;color:var(--base-color);background:transparent;border:none;font-family:inherit;font-size:.875rem;font-weight:600;cursor:pointer}.cim-widget-retry-button:hover{text-decoration:underline}.cim-widget-retry-button svg{width:1rem;height:1rem}.cim-widget-user-message-body{display:flex;flex-direction:column;gap:.375rem;min-width:0}.cim-widget-user-message-body .cim-widget-user-message-text{white-space:pre-wrap}.cim-widget-user-message-body:has(.cim-widget-user-message-image){align-items:flex-end}.cim-widget-user-message-image{max-width:12rem;max-height:12rem;width:auto;height:auto;object-fit:contain;border-radius:8px}.cim-widget-progress-steps-panel{border-top:1px solid var(--cim-widget-border-color);background-color:var(--cim-widget-background-color);padding:.75rem 1rem}.cim-widget-progress-steps{display:flex;flex-direction:column;gap:6px}.cim-widget-progress-steps-header{font-size:.8125rem;font-weight:700;color:var(--cim-widget-font-color, #1a1a1a)}.cim-widget-progress-steps-list{list-style:none;margin:0;padding:0;display:flex;flex-direction:column;gap:4px}.cim-widget-progress-step{display:flex;align-items:center;gap:8px;font-size:.8125rem;color:var(--cim-widget-secondary-color)}.cim-widget-progress-step.active{font-weight:700;color:var(--cim-widget-font-color, #1a1a1a)}.cim-widget-progress-step-arc{display:inline-block;width:14px;height:14px;flex-shrink:0;border:2px solid transparent;border-top-color:var(--cim-widget-secondary-color);border-left-color:var(--cim-widget-secondary-color);border-radius:50%;animation:cim-widget-step-spin .8s linear infinite}.cim-widget-progress-step-text{flex:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.cim-widget-progress-step-icon{display:inline-flex;align-items:center;justify-content:center;width:14px;height:14px;flex-shrink:0;margin-left:auto}.cim-widget-progress-step-icon.done{color:var(--cim-widget-secondary-color);opacity:.6}.cim-widget-progress-step-icon.active{color:var(--cim-widget-secondary-color)}.cim-widget-progress-step-check{width:14px;height:14px}.cim-widget-progress-step-starburst{width:14px;height:14px;animation:cim-widget-step-spin 2s linear infinite}@keyframes cim-widget-step-spin{to{transform:rotate(360deg)}}@media(prefers-reduced-motion:reduce){.cim-widget-progress-step-arc,.cim-widget-progress-step-starburst{animation:none!important}}.cim-widget-embedded-chat{position:relative;width:100%;height:100%;margin:0 auto;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color)}.cim-widget-embedded-chat>.cim-widget-message-container{padding-top:2rem;padding-left:1rem;padding-right:1rem}.cim-widget-embedded-chat-menu{position:absolute;top:.25rem;right:.25rem}.cim-widget-embedded-chat.cim-widget-layout-commerce>.cim-widget-message-container{padding-top:3.75rem}.cim-widget-embedded-chat.cim-widget-layout-commerce .cim-widget-embedded-chat-menu{top:.75rem;right:.75rem}.cim-widget-overflow-menu-button-trigger.cim-chat-component{border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);background-color:#fff}.cim-widget-overflow-menu-button.cim-chat-component{background-color:#fff;border-radius:var(--cim-widget-border-radius);&:hover{background-color:#f0f0f0}}.cim-widget-dialog{--cim-widget-dialog-animation-duration: .25s;box-sizing:border-box;position:fixed;width:35dvw;max-width:100dvw;height:55dvh;border-radius:var(--cim-widget-border-radius);overflow:hidden;border:1px solid var(--cim-widget-border-color);font-size:.875rem;z-index:9999;&.full-height{height:100%}&.full-height.bottom-left{bottom:0;left:0}&.full-height.bottom-right{bottom:0;right:0}&.bottom-left{bottom:.5rem;left:.5rem}&.bottom-left[data-state=open]{animation:cim-widget-dialog-slide-in-left var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-left[data-state=closed]{animation:cim-widget-dialog-slide-out-left var(--cim-widget-dialog-animation-duration) ease-in}&.bottom-right{bottom:.5rem;right:.5rem}&.bottom-right[data-state=open]{animation:cim-widget-dialog-slide-in-right var(--cim-widget-dialog-animation-duration) ease-out}&.bottom-right[data-state=closed]{animation:cim-widget-dialog-slide-out-right var(--cim-widget-dialog-animation-duration) ease-in}.cim-widget-message-group.embedded{max-width:100%}}.cim-widget-dialog-content{display:flex;flex-direction:column}.cim-widget-dialog-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-dialog-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-dialog-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-dialog-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-dialog.cim-widget-layout-commerce{border:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}@media(min-width:576px)and (max-width:768px){.cim-widget-dialog{width:50%}}@media(max-width:576px){.cim-widget-dialog{height:100%;width:100dvw;max-width:100dvw;border-radius:0;&.full-height{height:100%}&.bottom-left{bottom:0;left:0}&.bottom-right{bottom:0;right:0}}.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}.cim-widget-dialog-header{border-top-left-radius:0;border-top-right-radius:0}.cim-widget-dialog.cim-widget-layout-commerce .cim-widget-dialog-header{height:3.875rem;min-height:3.875rem;padding-left:1rem;padding-right:7.5rem}}@media(prefers-reduced-motion:reduce){.cim-widget-dialog.bottom-left[data-state],.cim-widget-dialog.bottom-right[data-state]{animation:none}}@keyframes cim-widget-dialog-slide-in-right{0%{transform:translate(100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-in-left{0%{transform:translate(-100%)}to{transform:translate(0)}}@keyframes cim-widget-dialog-slide-out-right{0%{transform:translate(0)}to{transform:translate(100%)}}@keyframes cim-widget-dialog-slide-out-left{0%{transform:translate(0)}to{transform:translate(-100%)}}.cim-widget-modal-container{display:flex;align-items:center;justify-content:center;position:fixed;top:0;left:0;height:100dvh;width:100dvw;z-index:9999}.cim-widget-modal-backdrop{position:absolute;top:0;left:0;height:100%;width:100%;background:#00000080}.cim-widget-modal{position:fixed;width:70dvw;height:80dvh;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-border-color);overflow-y:hidden;&.fullscreen{height:100%;width:100%;border-radius:0;.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}}.cim-widget-modal-content{display:flex;flex-direction:column;height:100%}.cim-widget-modal-header{display:inline-flex;align-items:center;padding:.5rem 1rem;gap:8px;border-bottom:1px solid var(--cim-widget-border-color);border-top-left-radius:var(--cim-widget-border-radius);border-top-right-radius:var(--cim-widget-border-radius);background-color:var(--cim-widget-header-background-color)}.cim-widget-modal-controls{position:absolute;top:4px;right:4px;display:inline-flex;align-items:center}.cim-widget-modal-logo{object-fit:contain;max-width:50%;max-height:3rem}.cim-widget-modal-title{width:100%;margin-top:0;margin-bottom:0;line-height:normal;color:var(--cim-widget-header-text-color, inherit);font-size:var(--cim-widget-header-text-font-size);font-weight:var(--cim-widget-header-text-font-weight, bold);font-family:var(--cim-widget-header-text-font-family, inherit);text-align:var(--cim-widget-header-text-text-align, left)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-header{box-sizing:border-box;height:3.875rem;min-height:3.875rem;gap:.75rem;padding:.75rem 8rem .75rem 1.5rem;border-bottom:1px solid var(--cim-widget-border-color, #e0e0e0);box-shadow:0 1px 1px -1px #17171b08,0 14px 30px -20px #17171b1a;background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-logo{box-sizing:border-box;width:1.75rem;max-width:1.75rem;height:1.75rem;padding:.25rem;border-radius:.375rem;background-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-title{overflow:hidden;color:var(--cim-widget-font-color, #181818);font-size:1rem;font-weight:400;line-height:1.25;text-overflow:ellipsis;white-space:nowrap}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls{top:50%;right:1rem;transform:translateY(-50%)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button{color:var(--cim-widget-font-color, #181818)}.cim-widget-modal.cim-widget-layout-commerce .cim-widget-modal-controls button:hover{background-color:var(--cim-widget-border-color, #f3f3f3)}.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:none}@media(max-width:576px){.cim-widget-modal{height:100%;width:100%;border-radius:0}.cim-widget-modal-header{border-top-left-radius:0;border-top-right-radius:0}}@media(min-width:576px){.cim-widget-modal-fullscreen-button,.cim-widget-modal-toggle-dialog-button{display:inline-flex}}.cim-widget-container{box-sizing:border-box;display:flex;flex-direction:column;background-color:var(--cim-widget-background-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit)}.cim-widget-visually-hidden{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}.cim-widget-message-container p{margin:.25rem 0;padding:0;+p{margin-top:.5rem}}.cim-widget-message-container span{line-height:1}.cim-widget-header{font-weight:700;color:inherit}.cim-widget-header.h1{margin-top:2rem;margin-bottom:2rem;font-size:1rem}.cim-widget-header.h2{margin-top:1.5rem;margin-bottom:1.5rem;font-size:1rem}.cim-widget-header.h3{margin-top:1rem;margin-bottom:1rem;font-size:1rem}.cim-widget-link{color:var(--cim-widget-primary-color);text-decoration:underline;cursor:pointer}.cim-widget-link:hover{color:var(--cim-widget-secondary-color);text-decoration:none}.cim-widget-text{line-height:1.5;color:inherit;margin-bottom:.25rem}.cim-widget-text.italic{font-style:italic}.cim-widget-text.bold{font-weight:700}.cim-widget-message-container{display:flex;flex-direction:column;flex:1;min-width:0;overflow-x:hidden;overflow-y:auto;overscroll-behavior:contain;overflow-wrap:anywhere;padding: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-layout-commerce{--cim-widget-shopping-canvas: #fcfcfc;--cim-widget-shopping-chip: #f7f7f7;--cim-widget-shopping-muted: #5c5c5c;--cim-widget-shopping-outline: #a3a3a3;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-container{gap:1rem;padding:1.25rem;background-color:var(--cim-widget-shopping-canvas)}.cim-widget-layout-commerce .cim-widget-message-group{width:100%;max-width:100%;margin-bottom:0;padding:0;border:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-message-group-child{width:100%}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-message{width:auto;max-width:100%;padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-ask-cim-entry-text{box-sizing:border-box;width:100%;max-width:100%;margin:0;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);line-height:1.5;box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-markdown,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text,.cim-widget-layout-commerce .cim-widget-display-products{box-sizing:border-box;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card{box-sizing:border-box;display:flex;flex-direction:column;gap:1rem;width:100%;max-width:100%;padding:1.25rem;border:1px solid var(--cim-widget-border-color, #e4e4e4);border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-background-color, #ffffff);color:var(--cim-widget-font-color, #111111);box-shadow:0 1px 2px #0000000d}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown{width:auto;max-width:none;padding:0;border:0;border-radius:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-carousel{min-width:0;margin-bottom:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp{min-width:0;margin:0}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart{min-width:0;margin:0;padding:0;border:0;background-color:#fff}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison{margin:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-cart-box,.cim-widget-layout-commerce .cim-widget-cart-summary,.cim-widget-layout-commerce .cim-widget-cart-expanded,.cim-widget-layout-commerce .cim-widget-cart-coupon,.cim-widget-layout-commerce .cim-widget-cart-coupon-field,.cim-widget-layout-commerce .cim-widget-cart-coupon-input{background-color:#fff}.cim-widget-layout-commerce .cim-widget-cart-expanded{border-top:none}.cim-widget-layout-commerce .cim-widget-cart-totals{border-top:1px solid #dedede;padding-top:16px;gap:12px}.cim-widget-layout-commerce .cim-widget-cart-item-final-price{font-size:14px;font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-total-row:not(.emphasized){font-size:14px}.cim-widget-layout-commerce .cim-widget-cart-summary{display:flex;align-items:center;gap:12px;padding:16px}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box{display:inline-flex;align-items:center;justify-content:center;width:36px;height:36px;min-width:36px;min-height:36px;border-radius:8px;background-color:#f1f1f1;color:#181818}.cim-widget-layout-commerce .cim-widget-cart-summary-icon-box svg{width:20px;height:20px}.cim-widget-layout-commerce .cim-widget-cart-checkout-button{border-color:var(--cim-widget-border-color, #d3d3d3);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce .cim-widget-cart-checkout-button:hover{border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-msg-pdp__card,.cim-widget-layout-commerce .cim-widget-msg-pdp__gallery,.cim-widget-layout-commerce .cim-widget-msg-pdp__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-pdp__card{border-color:#dedede;border-radius:.75rem;box-shadow:0 1px 3px #00000012}.cim-widget-layout-commerce .cim-widget-msg-pdp__content{gap:1.25rem;padding:.75rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__title,.cim-widget-layout-commerce .cim-widget-msg-pdp__title-link{color:#181818;font-size:.875rem}.cim-widget-layout-commerce .cim-widget-msg-pdp__description{color:#3e3e3c;font-size:.75rem;opacity:1}.cim-widget-layout-commerce .cim-widget-msg-pdp__description .cim-widget-markdown{padding:0;border:0;background-color:transparent;box-shadow:none}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart{min-height:2.25rem;border:1px solid var(--cim-widget-border-color, #d3d3d3);border-radius:var(--cim-widget-border-radius, .25rem);background-color:var(--cim-widget-primary-color, #e8e8e8);color:var(--cim-widget-background-color, #ffffff);font-weight:600}.cim-widget-layout-commerce button.cim-widget-msg-pdp__add-to-cart:hover:not(:disabled){border-color:var(--cim-widget-secondary-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #dcdcdc)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip{border-radius:20px;background-color:#f1f1f1;border-color:var(--cim-widget-border-color, #e5e5e5);color:var(--cim-widget-font-color, #181818)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip:hover{background-color:#ededed;border-color:var(--cim-widget-primary-color, #db665e)}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected{background-color:var(--cim-widget-primary-color, #db665e);border-color:var(--cim-widget-primary-color, #db665e);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__chip.selected:hover{background-color:var(--cim-widget-secondary-color, #c9554d);border-color:var(--cim-widget-secondary-color, #c9554d);color:#fff}.cim-widget-layout-commerce label.cim-widget-msg-pdp__swatch.selected{outline:2px solid var(--cim-widget-primary-color, #181818);outline-offset:2px;border-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-pdp-gallery__prev-trigger,.cim-widget-layout-commerce .cim-widget-pdp-gallery__next-trigger{width:2rem;height:2rem;padding:0;border:0;border-radius:.375rem;background-color:#f1f1f1;color:#5c5c5c;box-shadow:none}.cim-widget-layout-commerce .cim-widget-msg-product-card,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-wrapper,.cim-widget-layout-commerce .cim-widget-msg-product-card__image-placeholder,.cim-widget-layout-commerce .cim-widget-msg-product-card__content{background-color:#fff}.cim-widget-layout-commerce .cim-widget-msg-product-card__title,.cim-widget-layout-commerce .cim-widget-msg-product-card__title-link,.cim-widget-layout-commerce .cim-widget-msg-product-card__price,.cim-widget-layout-commerce .cim-widget-product-tile-name,.cim-widget-layout-commerce .cim-widget-product-tile-price{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:600}.cim-widget-layout-commerce .cim-widget-carousel__control{padding:0}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{width:2rem;min-width:2rem;height:2rem;min-height:2rem;padding:0;border:1px solid #dedede;border-radius:50%;background-color:#fff;color:#3e3e3c;box-shadow:0 2px 5px #00000026}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger{transform:translate(-50%)}.cim-widget-layout-commerce .cim-widget-carousel__next-trigger{transform:translate(50%)}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:hover,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:hover{background-color:#fff;border-color:#c9c9c9;box-shadow:0 3px 7px #0000002e}.cim-widget-layout-commerce .cim-widget-carousel__prev-trigger:focus-visible,.cim-widget-layout-commerce .cim-widget-carousel__next-trigger:focus-visible{outline:2px solid #181818;outline-offset:2px}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-carousel{padding-top:1rem;border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-product-comparison,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-product-comparison+.cim-widget-markdown{border-top:1px solid #e4e4e4}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-cart,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-cart+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-markdown+.cim-widget-msg-pdp,.cim-widget-layout-commerce .cim-widget-response-card .cim-widget-msg-pdp+.cim-widget-markdown{padding-top:1rem;border-top:none}.cim-widget-layout-commerce .cim-widget-markdown>:first-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-top:0}.cim-widget-layout-commerce .cim-widget-markdown>:last-child,.cim-widget-layout-commerce .cim-widget-follow-up>.cim-widget-text{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-ask-cim-suggestions-container,.cim-widget-layout-commerce .cim-widget-follow-up .cim-widget-suggestion-container{margin-top:.75rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.embedded{display:flex;flex-wrap:wrap;gap:.5rem}.cim-widget-layout-commerce .cim-widget-suggestion-container.standalone{display:flex;flex-wrap:wrap;gap:.5rem;padding:0}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone{min-height:2rem;padding:.4rem .8rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-shopping-chip);color:var(--cim-widget-font-color, #303030);font-size:.8125rem;font-weight:400;line-height:1.25}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:hover,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:hover{border-color:var(--cim-widget-border-color, #b8b8b8);background-color:var(--cim-widget-secondary-color, #ededed);color:var(--cim-widget-background-color, #111111)}.cim-widget-layout-commerce button.cim-widget-suggestion-button.embedded:focus-visible,.cim-widget-layout-commerce button.cim-widget-suggestion-button.standalone:focus-visible{outline:2px solid var(--cim-widget-primary-color, #000000);outline-offset:2px}.cim-widget-layout-commerce .cim-widget-user-message.embedded,.cim-widget-layout-commerce .cim-widget-user-message.standalone{min-width:0;max-width:85%;margin:0;padding:.75rem 1rem;border-radius:var(--cim-widget-border-radius, .75rem);background-color:var(--cim-widget-primary-color, #3a3a3a);color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-user-message-text{font-family:"Source Sans Pro",var(--cim-widget-font-family, sans-serif);font-weight:400}.cim-widget-layout-commerce .cim-widget-message.embedded{margin-bottom:0}.cim-widget-layout-commerce .cim-widget-message.standalone{margin-bottom:0;padding:0}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{gap:.375rem;padding:.875rem 1.25rem 1rem;border-top:1px solid var(--cim-widget-border-color, #d5d5d5);background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper.with-attachments{border-top-color:var(--cim-widget-border-color, #d5d5d5)}.cim-widget-layout-commerce .cim-widget-search-bar{gap:.5rem}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)),.cim-widget-layout-commerce .cim-widget-messaging-composer-group{position:relative;min-height:3.375rem;padding:.25rem .25rem .25rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:999px;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{border-color:var(--cim-widget-primary-color, #17171b);box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-bar:has(.cim-widget-messaging-composer-group){min-height:auto;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-search-bar.cim-widget-search-bar-with-context:has(.cim-widget-messaging-composer-group){padding:.5rem .25rem .5rem .75rem;border:1px solid var(--cim-widget-shopping-outline);border-radius:1.5rem;background-color:var(--cim-widget-background-color, #ffffff)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context:focus-within{border-color:var(--cim-widget-primary-color, #17171b)}.cim-widget-layout-commerce .cim-widget-search-bar-with-context .cim-widget-messaging-composer-group{min-height:2.75rem;padding:0;border:0;border-radius:0;background-color:transparent}.cim-widget-layout-commerce .cim-widget-connection-status-icon{display:none}.cim-widget-layout-commerce .cim-widget-search-input:is(input,textarea){min-height:2.75rem;padding:0 .625rem;border:0;border-radius:999px;background-color:transparent;color:var(--cim-widget-font-color, #111111);outline:0;box-shadow:none}.cim-widget-layout-commerce .cim-widget-search-input:is(input,textarea)::placeholder{color:var(--cim-widget-shopping-muted);opacity:1}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group{border:0;border-radius:999px}.cim-widget-layout-commerce .cim-widget-messaging-composer-group .cim-widget-messaging-input-group:focus-within{border-color:transparent}@media(forced-colors:active){.cim-widget-layout-commerce .cim-widget-search-bar:not(:has(.cim-widget-messaging-composer-group)):focus-within,.cim-widget-layout-commerce .cim-widget-messaging-composer-group:focus-within{outline:2px solid Highlight;outline-offset:2px}}.cim-widget-layout-commerce .cim-widget-search-button-icon{flex:0 0 auto;width:2.75rem;min-width:2.75rem;min-height:2.75rem;border:0;border-radius:50%;background-color:#111;color:#fff}.cim-widget-layout-commerce .cim-widget-search-button-icon svg{padding:.75rem}.cim-widget-layout-commerce .cim-widget-search-button-icon:hover{background-color:#333;border-color:transparent}.cim-widget-layout-commerce .cim-widget-search-button-icon:focus-visible{outline:2px solid #000000;outline-offset:3px}.cim-widget-layout-commerce .cim-widget-disclaimer{padding-bottom:0;color:var(--cim-widget-shopping-muted)}@media(max-width:576px){.cim-widget-layout-commerce .cim-widget-message-container{padding:1rem}.cim-widget-layout-commerce .cim-widget-search-bar-wrapper{padding-right:1rem;padding-left:1rem}}.cim-widget-prompts-extension-container{height:100%;width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:1rem .5rem 1rem 1.25rem;gap:.75rem;font-size:.875rem;font-family:var(--cim-widget-font-family, inherit);background-color:var(--cim-widget-background-color);color:var(--cim-widget-font-color, inherit);border:1px solid var(--cim-widget-border-color);border-radius:var(--cim-widget-border-radius);box-sizing:border-box}.cim-widget-prompts-input-container{display:flex;align-items:center;justify-content:center;gap:.5rem;width:100%;label[for=cim-widget-prompts-input]{width:auto}.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color)}input.cim-widget-prompts-input{width:100%;padding:.25rem 0;outline:none;border-color:transparent;background-color:transparent;border-bottom-width:1px;border-bottom-color:var(--cim-widget-border-color);font-family:var(--cim-widget-font-family, inherit);color:var(--cim-widget-font-color, inherit);&:disabled{opacity:.6;cursor:not-allowed}}input.cim-widget-prompts-input:focus{border-bottom-color:color-mix(in srgb,var(--cim-widget-primary-color),white 25%)}.cim-widget-prompts-input-submit-button:disabled{opacity:.6;background-color:#f9f9f9;cursor:not-allowed}}.cim-widget-prompts-header{display:flex;align-items:center;gap:.5rem;width:100%;.cim-widget-prompts-input-icon{width:20px;height:20px;color:var(--cim-widget-primary-color);flex-shrink:0}.cim-widget-prompts-header-text{color:var(--cim-widget-font-color, inherit)}}.cim-widget-prompts-button-group{display:inline-flex;flex-wrap:wrap;gap:.5rem;width:100%}.cim-widget-prompts-button{height:auto;padding:.2rem .5rem;border:1px solid var(--cim-widget-primary-color);border-radius:var(--cim-widget-border-radius);background-color:transparent;font-size:.875rem;font-weight:700;font-family:inherit;color:var(--cim-widget-primary-color);white-space:normal;word-break:break-word;text-align:left;cursor:pointer}.cim-widget-prompts-button.has-icon{display:inline-flex;align-items:center;gap:.35rem}.cim-widget-prompts-button.icon-right{flex-direction:row-reverse;justify-content:start}.cim-widget-prompts-button:hover{background-color:#fff;color:color-mix(in hsl decreasing hue,var(--cim-widget-primary-color) 85%,black)}.cim-widget-prompts-button:disabled{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a;cursor:not-allowed}.cim-widget-prompts-button:disabled:hover{border-color:#8a8a8a;background-color:#f9f9f9;color:#8a8a8a}.cim-widget-prompts-extension-messages-container{display:flex;flex-direction:column;gap:1rem;height:100%;width:100%;scrollbar-gutter:stable;overflow-y:auto}.cim-widget-prompts-user-message-container{display:flex;align-items:center;justify-content:flex-end;width:100%}.cim-widget-prompts-user-message{margin:0;max-width:85%;padding:.25rem 1rem;color:#fff;border-radius:var(--cim-widget-border-radius);border:1px solid var(--cim-widget-primary-color);background-color:var(--cim-widget-primary-color)}.cim-widget-prompts-response-container{display:flex;flex:none;flex-direction:column;justify-content:flex-start;padding:.5rem 1rem;border-radius:var(--cim-widget-border-radius);background-color:color-mix(in hsl decreasing hue,var(--cim-widget-secondary-color) 5%,transparent);overscroll-behavior:auto;max-width:85%}.cim-widget-prompts-connecting-message,.cim-widget-prompts-error-message{opacity:.6;margin:0 1rem;font-size:.75rem;font-family:var(--cim-widget-font-family, inherit)}
2
+ /*$vite$:1*/`,document.head.appendChild(Ke);function ht(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var St={exports:{}},Wt={},Lt={exports:{}},qe={};var bn;function Dt(){if(bn)return qe;bn=1;var e=Symbol.for("react.element"),t=Symbol.for("react.portal"),n=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),i=Symbol.for("react.profiler"),s=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"),h=Symbol.for("react.lazy"),m=Symbol.iterator;function E(j){return j===null||typeof j!="object"?null:(j=m&&j[m]||j["@@iterator"],typeof j=="function"?j:null)}var b={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},T=Object.assign,_={};function I(j,q,P){this.props=j,this.context=q,this.refs=_,this.updater=P||b}I.prototype.isReactComponent={},I.prototype.setState=function(j,q){if(typeof j!="object"&&typeof j!="function"&&j!=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,j,q,"setState")},I.prototype.forceUpdate=function(j){this.updater.enqueueForceUpdate(this,j,"forceUpdate")};function v(){}v.prototype=I.prototype;function S(j,q,P){this.props=j,this.context=q,this.refs=_,this.updater=P||b}var R=S.prototype=new v;R.constructor=S,T(R,I.prototype),R.isPureReactComponent=!0;var U=Array.isArray,B=Object.prototype.hasOwnProperty,A={current:null},G={key:!0,ref:!0,__self:!0,__source:!0};function W(j,q,P){var ge,Re={},pe=null,Ne=null;if(q!=null)for(ge in q.ref!==void 0&&(Ne=q.ref),q.key!==void 0&&(pe=""+q.key),q)B.call(q,ge)&&!G.hasOwnProperty(ge)&&(Re[ge]=q[ge]);var ve=arguments.length-2;if(ve===1)Re.children=P;else if(1<ve){for(var ze=Array(ve),rt=0;rt<ve;rt++)ze[rt]=arguments[rt+2];Re.children=ze}if(j&&j.defaultProps)for(ge in ve=j.defaultProps,ve)Re[ge]===void 0&&(Re[ge]=ve[ge]);return{$$typeof:e,type:j,key:pe,ref:Ne,props:Re,_owner:A.current}}function re(j,q){return{$$typeof:e,type:j.type,key:q,ref:j.ref,props:j.props,_owner:j._owner}}function H(j){return typeof j=="object"&&j!==null&&j.$$typeof===e}function ee(j){var q={"=":"=0",":":"=2"};return"$"+j.replace(/[=:]/g,function(P){return q[P]})}var Q=/\/+/g;function me(j,q){return typeof j=="object"&&j!==null&&j.key!=null?ee(""+j.key):q.toString(36)}function V(j,q,P,ge,Re){var pe=typeof j;(pe==="undefined"||pe==="boolean")&&(j=null);var Ne=!1;if(j===null)Ne=!0;else switch(pe){case"string":case"number":Ne=!0;break;case"object":switch(j.$$typeof){case e:case t:Ne=!0}}if(Ne)return Ne=j,Re=Re(Ne),j=ge===""?"."+me(Ne,0):ge,U(Re)?(P="",j!=null&&(P=j.replace(Q,"$&/")+"/"),V(Re,q,P,"",function(rt){return rt})):Re!=null&&(H(Re)&&(Re=re(Re,P+(!Re.key||Ne&&Ne.key===Re.key?"":(""+Re.key).replace(Q,"$&/")+"/")+j)),q.push(Re)),1;if(Ne=0,ge=ge===""?".":ge+":",U(j))for(var ve=0;ve<j.length;ve++){pe=j[ve];var ze=ge+me(pe,ve);Ne+=V(pe,q,P,ze,Re)}else if(ze=E(j),typeof ze=="function")for(j=ze.call(j),ve=0;!(pe=j.next()).done;)pe=pe.value,ze=ge+me(pe,ve++),Ne+=V(pe,q,P,ze,Re);else if(pe==="object")throw q=String(j),Error("Objects are not valid as a React child (found: "+(q==="[object Object]"?"object with keys {"+Object.keys(j).join(", ")+"}":q)+"). If you meant to render a collection of children, use an array instead.");return Ne}function ue(j,q,P){if(j==null)return j;var ge=[],Re=0;return V(j,ge,"","",function(pe){return q.call(P,pe,Re++)}),ge}function fe(j){if(j._status===-1){var q=j._result;q=q(),q.then(function(P){(j._status===0||j._status===-1)&&(j._status=1,j._result=P)},function(P){(j._status===0||j._status===-1)&&(j._status=2,j._result=P)}),j._status===-1&&(j._status=0,j._result=q)}if(j._status===1)return j._result.default;throw j._result}var ae={current:null},J={transition:null},se={ReactCurrentDispatcher:ae,ReactCurrentBatchConfig:J,ReactCurrentOwner:A};function O(){throw Error("act(...) is not supported in production builds of React.")}return qe.Children={map:ue,forEach:function(j,q,P){ue(j,function(){q.apply(this,arguments)},P)},count:function(j){var q=0;return ue(j,function(){q++}),q},toArray:function(j){return ue(j,function(q){return q})||[]},only:function(j){if(!H(j))throw Error("React.Children.only expected to receive a single React element child.");return j}},qe.Component=I,qe.Fragment=n,qe.Profiler=i,qe.PureComponent=S,qe.StrictMode=r,qe.Suspense=d,qe.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=se,qe.act=O,qe.cloneElement=function(j,q,P){if(j==null)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+j+".");var ge=T({},j.props),Re=j.key,pe=j.ref,Ne=j._owner;if(q!=null){if(q.ref!==void 0&&(pe=q.ref,Ne=A.current),q.key!==void 0&&(Re=""+q.key),j.type&&j.type.defaultProps)var ve=j.type.defaultProps;for(ze in q)B.call(q,ze)&&!G.hasOwnProperty(ze)&&(ge[ze]=q[ze]===void 0&&ve!==void 0?ve[ze]:q[ze])}var ze=arguments.length-2;if(ze===1)ge.children=P;else if(1<ze){ve=Array(ze);for(var rt=0;rt<ze;rt++)ve[rt]=arguments[rt+2];ge.children=ve}return{$$typeof:e,type:j.type,key:Re,ref:pe,props:ge,_owner:Ne}},qe.createContext=function(j){return j={$$typeof:u,_currentValue:j,_currentValue2:j,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null},j.Provider={$$typeof:s,_context:j},j.Consumer=j},qe.createElement=W,qe.createFactory=function(j){var q=W.bind(null,j);return q.type=j,q},qe.createRef=function(){return{current:null}},qe.forwardRef=function(j){return{$$typeof:c,render:j}},qe.isValidElement=H,qe.lazy=function(j){return{$$typeof:h,_payload:{_status:-1,_result:j},_init:fe}},qe.memo=function(j,q){return{$$typeof:f,type:j,compare:q===void 0?null:q}},qe.startTransition=function(j){var q=J.transition;J.transition={};try{j()}finally{J.transition=q}},qe.unstable_act=O,qe.useCallback=function(j,q){return ae.current.useCallback(j,q)},qe.useContext=function(j){return ae.current.useContext(j)},qe.useDebugValue=function(){},qe.useDeferredValue=function(j){return ae.current.useDeferredValue(j)},qe.useEffect=function(j,q){return ae.current.useEffect(j,q)},qe.useId=function(){return ae.current.useId()},qe.useImperativeHandle=function(j,q,P){return ae.current.useImperativeHandle(j,q,P)},qe.useInsertionEffect=function(j,q){return ae.current.useInsertionEffect(j,q)},qe.useLayoutEffect=function(j,q){return ae.current.useLayoutEffect(j,q)},qe.useMemo=function(j,q){return ae.current.useMemo(j,q)},qe.useReducer=function(j,q,P){return ae.current.useReducer(j,q,P)},qe.useRef=function(j){return ae.current.useRef(j)},qe.useState=function(j){return ae.current.useState(j)},qe.useSyncExternalStore=function(j,q,P){return ae.current.useSyncExternalStore(j,q,P)},qe.useTransition=function(){return ae.current.useTransition()},qe.version="18.3.1",qe}var Ln;function vr(){return Ln||(Ln=1,Lt.exports=Dt()),Lt.exports}var yo;function hs(){if(yo)return Wt;yo=1;var e=vr(),t=Symbol.for("react.element"),n=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,i=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function u(c,d,f){var h,m={},E=null,b=null;f!==void 0&&(E=""+f),d.key!==void 0&&(E=""+d.key),d.ref!==void 0&&(b=d.ref);for(h in d)r.call(d,h)&&!s.hasOwnProperty(h)&&(m[h]=d[h]);if(c&&c.defaultProps)for(h in d=c.defaultProps,d)m[h]===void 0&&(m[h]=d[h]);return{$$typeof:t,type:c,key:E,ref:b,props:m,_owner:i.current}}return Wt.Fragment=n,Wt.jsx=u,Wt.jsxs=u,Wt}var ms;function Un(){return ms||(ms=1,St.exports=hs()),St.exports}var w=Un(),k=vr();const Eo=ht(k),Hr=Object.create(null);Hr.open="0",Hr.close="1",Hr.ping="2",Hr.pong="3",Hr.message="4",Hr.upgrade="5",Hr.noop="6";const wc=Object.create(null);Object.keys(Hr).forEach(e=>{wc[Hr[e]]=e});const wf={type:"error",data:"parser error"},F0=typeof Blob=="function"||typeof Blob!="undefined"&&Object.prototype.toString.call(Blob)==="[object BlobConstructor]",B0=typeof ArrayBuffer=="function",U0=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,xf=({type:e,data:t},n,r)=>F0&&t instanceof Blob?n?r(t):j0(t,r):B0&&(t instanceof ArrayBuffer||U0(t))?n?r(t):j0(new Blob([t]),r):r(Hr[e]+(t||"")),j0=(e,t)=>{const n=new FileReader;return n.onload=function(){const r=n.result.split(",")[1];t("b"+(r||""))},n.readAsDataURL(e)};function H0(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let Tf;function tA(e,t){if(F0&&e.data instanceof Blob)return e.data.arrayBuffer().then(H0).then(t);if(B0&&(e.data instanceof ArrayBuffer||U0(e.data)))return t(H0(e.data));xf(e,!1,n=>{Tf||(Tf=new TextEncoder),t(Tf.encode(n))})}const $0="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Pa=typeof Uint8Array=="undefined"?[]:new Uint8Array(256);for(let e=0;e<$0.length;e++)Pa[$0.charCodeAt(e)]=e;const nA=e=>{let t=e.length*.75,n=e.length,r,i=0,s,u,c,d;e[e.length-1]==="="&&(t--,e[e.length-2]==="="&&t--);const f=new ArrayBuffer(t),h=new Uint8Array(f);for(r=0;r<n;r+=4)s=Pa[e.charCodeAt(r)],u=Pa[e.charCodeAt(r+1)],c=Pa[e.charCodeAt(r+2)],d=Pa[e.charCodeAt(r+3)],h[i++]=s<<2|u>>4,h[i++]=(u&15)<<4|c>>2,h[i++]=(c&3)<<6|d&63;return f},rA=typeof ArrayBuffer=="function",_f=(e,t)=>{if(typeof e!="string")return{type:"message",data:z0(e,t)};const n=e.charAt(0);return n==="b"?{type:"message",data:iA(e.substring(1),t)}:wc[n]?e.length>1?{type:wc[n],data:e.substring(1)}:{type:wc[n]}:wf},iA=(e,t)=>{if(rA){const n=nA(e);return z0(n,t)}else return{base64:!0,data:e}},z0=(e,t)=>t==="blob"?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,V0="",oA=(e,t)=>{const n=e.length,r=new Array(n);let i=0;e.forEach((s,u)=>{xf(s,!1,c=>{r[u]=c,++i===n&&t(r.join(V0))})})},sA=(e,t)=>{const n=e.split(V0),r=[];for(let i=0;i<n.length;i++){const s=_f(n[i],t);if(r.push(s),s.type==="error")break}return r};function aA(){return new TransformStream({transform(e,t){tA(e,n=>{const r=n.length;let i;if(r<126)i=new Uint8Array(1),new DataView(i.buffer).setUint8(0,r);else if(r<65536){i=new Uint8Array(3);const s=new DataView(i.buffer);s.setUint8(0,126),s.setUint16(1,r)}else{i=new Uint8Array(9);const s=new DataView(i.buffer);s.setUint8(0,127),s.setBigUint64(1,BigInt(r))}e.data&&typeof e.data!="string"&&(i[0]|=128),t.enqueue(i),t.enqueue(n)})}})}let vf;function xc(e){return e.reduce((t,n)=>t+n.length,0)}function Tc(e,t){if(e[0].length===t)return e.shift();const n=new Uint8Array(t);let r=0;for(let i=0;i<t;i++)n[i]=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 uA(e,t){vf||(vf=new TextDecoder);const n=[];let r=0,i=-1,s=!1;return new TransformStream({transform(u,c){for(n.push(u);;){if(r===0){if(xc(n)<1)break;const d=Tc(n,1);s=(d[0]&128)===128,i=d[0]&127,i<126?r=3:i===126?r=1:r=2}else if(r===1){if(xc(n)<2)break;const d=Tc(n,2);i=new DataView(d.buffer,d.byteOffset,d.length).getUint16(0),r=3}else if(r===2){if(xc(n)<8)break;const d=Tc(n,8),f=new DataView(d.buffer,d.byteOffset,d.length),h=f.getUint32(0);if(h>Math.pow(2,21)-1){c.enqueue(wf);break}i=h*Math.pow(2,32)+f.getUint32(4),r=3}else{if(xc(n)<i)break;const d=Tc(n,i);c.enqueue(_f(s?d:vf.decode(d),t)),r=0}if(i===0||i>e){c.enqueue(wf);break}}}})}const q0=4;function nn(e){if(e)return cA(e)}function cA(e){for(var t in nn.prototype)e[t]=nn.prototype[t];return e}nn.prototype.on=nn.prototype.addEventListener=function(e,t){return this._callbacks=this._callbacks||{},(this._callbacks["$"+e]=this._callbacks["$"+e]||[]).push(t),this},nn.prototype.once=function(e,t){function n(){this.off(e,n),t.apply(this,arguments)}return n.fn=t,this.on(e,n),this},nn.prototype.off=nn.prototype.removeListener=nn.prototype.removeAllListeners=nn.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,i=0;i<n.length;i++)if(r=n[i],r===t||r.fn===t){n.splice(i,1);break}return n.length===0&&delete this._callbacks["$"+e],this},nn.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,i=n.length;r<i;++r)n[r].apply(this,t)}return this},nn.prototype.emitReserved=nn.prototype.emit,nn.prototype.listeners=function(e){return this._callbacks=this._callbacks||{},this._callbacks["$"+e]||[]},nn.prototype.hasListeners=function(e){return!!this.listeners(e).length};const _c=typeof Promise=="function"&&typeof Promise.resolve=="function"?t=>Promise.resolve().then(t):(t,n)=>n(t,0),fr=typeof self!="undefined"?self:typeof window!="undefined"?window:Function("return this")(),lA="arraybuffer";function Vz(){}function W0(e,...t){return t.reduce((n,r)=>(e.hasOwnProperty(r)&&(n[r]=e[r]),n),{})}const dA=fr.setTimeout,fA=fr.clearTimeout;function vc(e,t){t.useNativeTimers?(e.setTimeoutFn=dA.bind(fr),e.clearTimeoutFn=fA.bind(fr)):(e.setTimeoutFn=fr.setTimeout.bind(fr),e.clearTimeoutFn=fr.clearTimeout.bind(fr))}const pA=1.33;function hA(e){return typeof e=="string"?mA(e):Math.ceil((e.byteLength||e.size)*pA)}function mA(e){let t=0,n=0;for(let r=0,i=e.length;r<i;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 Y0(){return Date.now().toString(36).substring(3)+Math.random().toString(36).substring(2,5)}function gA(e){let t="";for(let n in e)e.hasOwnProperty(n)&&(t.length&&(t+="&"),t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n]));return t}function yA(e){let t={},n=e.split("&");for(let r=0,i=n.length;r<i;r++){let s=n[r].split("=");t[decodeURIComponent(s[0])]=decodeURIComponent(s[1])}return t}class EA extends Error{constructor(t,n,r){super(t),this.description=n,this.context=r,this.type="TransportError"}}class Sf extends nn{constructor(t){super(),this.writable=!1,vc(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 EA(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=_f(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=gA(t);return n.length?"?"+n:""}}class bA extends Sf{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)};sA(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,oA(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]=Y0()),!this.supportsBinary&&!n.sid&&(n.b64=1),this.createUri(t,n)}}let G0=!1;try{G0=typeof XMLHttpRequest!="undefined"&&"withCredentials"in new XMLHttpRequest}catch(e){}const wA=G0;function xA(){}class TA extends bA{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",(i,s)=>{this.onError("xhr post error",i,s)})}doPoll(){const t=this.request();t.on("data",this.onData.bind(this)),t.on("error",(n,r)=>{this.onError("xhr poll error",n,r)}),this.pollXhr=t}}class $r extends nn{constructor(t,n,r){super(),this.createRequest=t,vc(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=W0(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 i in this._opts.extraHeaders)this._opts.extraHeaders.hasOwnProperty(i)&&r.setRequestHeader(i,this._opts.extraHeaders[i])}}catch(i){}if(this._method==="POST")try{r.setRequestHeader("Content-type","text/plain;charset=UTF-8")}catch(i){}try{r.setRequestHeader("Accept","*/*")}catch(i){}(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 i;r.readyState===3&&((i=this._opts.cookieJar)===null||i===void 0||i.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(i){this.setTimeoutFn(()=>{this._onError(i)},0);return}typeof document!="undefined"&&(this._index=$r.requestsCount++,$r.requests[this._index]=this)}_onError(t){this.emitReserved("error",t,this._xhr),this._cleanup(!0)}_cleanup(t){if(!(typeof this._xhr=="undefined"||this._xhr===null)){if(this._xhr.onreadystatechange=xA,t)try{this._xhr.abort()}catch(n){}typeof document!="undefined"&&delete $r.requests[this._index],this._xhr=null}}_onLoad(){const t=this._xhr.responseText;t!==null&&(this.emitReserved("data",t),this.emitReserved("success"),this._cleanup())}abort(){this._cleanup()}}if($r.requestsCount=0,$r.requests={},typeof document!="undefined"){if(typeof attachEvent=="function")attachEvent("onunload",X0);else if(typeof addEventListener=="function"){const e="onpagehide"in fr?"pagehide":"unload";addEventListener(e,X0,!1)}}function X0(){for(let e in $r.requests)$r.requests.hasOwnProperty(e)&&$r.requests[e].abort()}const _A=(function(){const e=K0({xdomain:!1});return e&&e.responseType!==null})();class vA extends TA{constructor(t){super(t);const n=t&&t.forceBase64;this.supportsBinary=_A&&!n}request(t={}){return Object.assign(t,{xd:this.xd},this.opts),new $r(K0,this.uri(),t)}}function K0(e){const t=e.xdomain;try{if(typeof XMLHttpRequest!="undefined"&&(!t||wA))return new XMLHttpRequest}catch(n){}if(!t)try{return new fr[["Active"].concat("Object").join("X")]("Microsoft.XMLHTTP")}catch(n){}}const Q0=typeof navigator!="undefined"&&typeof navigator.product=="string"&&navigator.product.toLowerCase()==="reactnative";class SA extends Sf{get name(){return"websocket"}doOpen(){const t=this.uri(),n=this.opts.protocols,r=Q0?{}:W0(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(i){return this.emitReserved("error",i)}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],i=n===t.length-1;xf(r,this.supportsBinary,s=>{try{this.doWrite(r,s)}catch(u){}i&&_c(()=>{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]=Y0()),this.supportsBinary||(n.b64=1),this.createUri(t,n)}}const Af=fr.WebSocket||fr.MozWebSocket;class AA extends SA{createSocket(t,n,r){return Q0?new Af(t,n,r):n?new Af(t,n):new Af(t)}doWrite(t,n){this.ws.send(n)}}class kA extends Sf{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=uA(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=t.readable.pipeThrough(n).getReader(),i=aA();i.readable.pipeTo(t.writable),this._writer=i.writable.getWriter();const s=()=>{r.read().then(({done:c,value:d})=>{c||(this.onPacket(d),s())}).catch(c=>{})};s();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],i=n===t.length-1;this._writer.write(r).then(()=>{i&&_c(()=>{this.writable=!0,this.emitReserved("drain")},this.setTimeoutFn)})}}doClose(){var t;(t=this._transport)===null||t===void 0||t.close()}}const CA={websocket:AA,webtransport:kA,polling:vA},NA=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,IA=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function kf(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 i=NA.exec(e||""),s={},u=14;for(;u--;)s[IA[u]]=i[u]||"";return n!=-1&&r!=-1&&(s.source=t,s.host=s.host.substring(1,s.host.length-1).replace(/;/g,":"),s.authority=s.authority.replace("[","").replace("]","").replace(/;/g,":"),s.ipv6uri=!0),s.pathNames=OA(s,s.path),s.queryKey=PA(s,s.query),s}function OA(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 PA(e,t){const n={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,function(r,i,s){i&&(n[i]=s)}),n}const Cf=typeof addEventListener=="function"&&typeof removeEventListener=="function",Sc=[];Cf&&addEventListener("offline",()=>{Sc.forEach(e=>e())},!1);class Oi extends nn{constructor(t,n){if(super(),this.binaryType=lA,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=kf(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=kf(n.host).host);vc(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 i=r.prototype.name;this.transports.push(i),this._transportsByName[i]=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=yA(this.opts.query)),Cf&&(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"})},Sc.push(this._offlineEventListener))),this.opts.withCredentials&&(this._cookieJar=void 0),this._open()}createTransport(t){const n=Object.assign({},this.opts.query);n.EIO=q0,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&&Oi.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",Oi.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 i=this.writeBuffer[r].data;if(i&&(n+=hA(i)),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,_c(()=>{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,i){if(typeof n=="function"&&(i=n,n=void 0),typeof r=="function"&&(i=r,r=null),this.readyState==="closing"||this.readyState==="closed")return;r=r||{},r.compress=r.compress!==!1;const s={type:t,data:n,options:r};this.emitReserved("packetCreate",s),this.writeBuffer.push(s),i&&this.once("flush",i),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(Oi.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(),Cf&&(this._beforeunloadEventListener&&removeEventListener("beforeunload",this._beforeunloadEventListener,!1),this._offlineEventListener)){const r=Sc.indexOf(this._offlineEventListener);r!==-1&&Sc.splice(r,1)}this.readyState="closed",this.id=null,this.emitReserved("close",t,n),this.writeBuffer=[],this._prevBufferLen=0}}}Oi.protocol=q0;class RA extends Oi{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;Oi.priorWebsocketSuccess=!1;const i=()=>{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;Oi.priorWebsocketSuccess=n.name==="websocket",this.transport.pause(()=>{r||this.readyState!=="closed"&&(h(),this.setTransport(n),n.send([{type:"upgrade"}]),this.emitReserved("upgrade",n),n=null,this.upgrading=!1,this.flush())})}else{const E=new Error("probe error");E.transport=n.name,this.emitReserved("upgradeError",E)}}))};function s(){r||(r=!0,h(),n.close(),n=null)}const u=m=>{const E=new Error("probe error: "+m);E.transport=n.name,s(),this.emitReserved("upgradeError",E)};function c(){u("transport closed")}function d(){u("socket closed")}function f(m){n&&m.name!==n.name&&s()}const h=()=>{n.removeListener("open",i),n.removeListener("error",u),n.removeListener("close",c),this.off("close",d),this.off("upgrading",f)};n.once("open",i),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 LA=class extends RA{constructor(t,n={}){const r=typeof t=="object",i=r?M({},t):M({},n);(!i.transports||i.transports&&typeof i.transports[0]=="string")&&(i.transports=(i.transports||["polling","websocket","webtransport"]).map(s=>CA[s]).filter(s=>!!s)),super(r?i:t,i)}};function DA(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=kf(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 s=r.host.indexOf(":")!==-1?"["+r.host+"]":r.host;return r.id=r.protocol+"://"+s+":"+r.port+t,r.href=r.protocol+"://"+s+(n&&n.port===r.port?"":":"+r.port),r}const MA=typeof ArrayBuffer=="function",FA=e=>typeof ArrayBuffer.isView=="function"?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,J0=Object.prototype.toString,BA=typeof Blob=="function"||typeof Blob!="undefined"&&J0.call(Blob)==="[object BlobConstructor]",UA=typeof File=="function"||typeof File!="undefined"&&J0.call(File)==="[object FileConstructor]";function Nf(e){return MA&&(e instanceof ArrayBuffer||FA(e))||BA&&e instanceof Blob||UA&&e instanceof File}function Ac(e,t){if(!e||typeof e!="object")return!1;if(Array.isArray(e)){for(let n=0,r=e.length;n<r;n++)if(Ac(e[n]))return!0;return!1}if(Nf(e))return!0;if(e.toJSON&&typeof e.toJSON=="function"&&arguments.length===1)return Ac(e.toJSON(),!0);for(const n in e)if(Object.prototype.hasOwnProperty.call(e,n)&&Ac(e[n]))return!0;return!1}function jA(e){const t=[],n=e.data,r=e;return r.data=kc(n,t),r.attachments=t.length,{packet:r,buffers:t}}function kc(e,t,n){if(!e)return e;if(Nf(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 i=0;i<e.length;i++)r[i]=kc(e[i],t);return r}else if(typeof e=="object"&&!(e instanceof Date)){if(e.toJSON&&typeof e.toJSON=="function"&&!n)return kc(e.toJSON(),t,!0);const r={};for(const i in e)Object.prototype.hasOwnProperty.call(e,i)&&(r[i]=kc(e[i],t));return r}return e}function HA(e,t){return e.data=If(e.data,t),delete e.attachments,e}function If(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]=If(e[n],t);else if(typeof e=="object")for(const n in e)Object.prototype.hasOwnProperty.call(e,n)&&(e[n]=If(e[n],t));return e}const $A=["connect","connect_error","disconnect","disconnecting","newListener","removeListener"];var gt;(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"})(gt||(gt={}));class zA{constructor(t){this.replacer=t}encode(t){return(t.type===gt.EVENT||t.type===gt.ACK)&&Ac(t)?this.encodeAsBinary({type:t.type===gt.EVENT?gt.BINARY_EVENT:gt.BINARY_ACK,nsp:t.nsp,data:t.data,id:t.id}):[this.encodeAsString(t)]}encodeAsString(t){let n=""+t.type;return(t.type===gt.BINARY_EVENT||t.type===gt.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=jA(t),r=this.encodeAsString(n.packet),i=n.buffers;return i.unshift(r),i}}class Of extends nn{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===gt.BINARY_EVENT;r||n.type===gt.BINARY_ACK?(n.type=r?gt.EVENT:gt.ACK,this.reconstructor=new VA(n)):super.emitReserved("decoded",n)}else if(Nf(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(gt[r.type]===void 0)throw new Error("unknown packet type "+r.type);if(r.type===gt.BINARY_EVENT||r.type===gt.BINARY_ACK){const s=n+1;for(;t.charAt(++n)!=="-"&&n!=t.length;);const u=t.substring(s,n);if(u!=Number(u)||t.charAt(n)!=="-")throw new Error("Illegal attachments");const c=Number(u);if(!qA(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 s=n+1;for(;++n&&!(t.charAt(n)===","||n===t.length););r.nsp=t.substring(s,n)}else r.nsp="/";const i=t.charAt(n+1);if(i!==""&&Number(i)==i){const s=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(s,n+1))}if(t.charAt(++n)){const s=this.tryParse(t.substr(n));if(Of.isPayloadValid(r.type,s))r.data=s;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 gt.CONNECT:return Z0(n);case gt.DISCONNECT:return n===void 0;case gt.CONNECT_ERROR:return typeof n=="string"||Z0(n);case gt.EVENT:case gt.BINARY_EVENT:return Array.isArray(n)&&(typeof n[0]=="number"||typeof n[0]=="string"&&$A.indexOf(n[0])===-1);case gt.ACK:case gt.BINARY_ACK:return Array.isArray(n)}}destroy(){this.reconstructor&&(this.reconstructor.finishedReconstruction(),this.reconstructor=null)}}class VA{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=HA(this.reconPack,this.buffers);return this.finishedReconstruction(),n}return null}finishedReconstruction(){this.reconPack=null,this.buffers=[]}}const qA=Number.isInteger||function(e){return typeof e=="number"&&isFinite(e)&&Math.floor(e)===e};function Z0(e){return Object.prototype.toString.call(e)==="[object Object]"}const WA=Object.freeze(Object.defineProperty({__proto__:null,Decoder:Of,Encoder:zA,get PacketType(){return gt}},Symbol.toStringTag,{value:"Module"}));function Sr(e,t,n){return e.on(t,n),function(){e.off(t,n)}}const YA=Object.freeze({connect:1,connect_error:1,disconnect:1,disconnecting:1,newListener:1,removeListener:1});class e1 extends nn{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=[Sr(t,"open",this.onopen.bind(this)),Sr(t,"packet",this.onpacket.bind(this)),Sr(t,"error",this.onerror.bind(this)),Sr(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,i,s;if(YA.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:gt.EVENT,data:n};if(u.options={},u.options.compress=this.flags.compress!==!1,typeof n[n.length-1]=="function"){const h=this.ids++,m=n.pop();this._registerAckCallback(h,m),u.id=h}const c=(i=(r=this.io.engine)===null||r===void 0?void 0:r.transport)===null||i===void 0?void 0:i.writable,d=this.connected&&!(!((s=this.io.engine)===null||s===void 0)&&s._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 i=(r=this.flags.timeout)!==null&&r!==void 0?r:this._opts.ackTimeout;if(i===void 0){this.acks[t]=n;return}const s=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"))},i),u=(...c)=>{this.io.clearTimeoutFn(s),n.apply(this,c)};u.withError=!0,this.acks[t]=u}emitWithAck(t,...n){return new Promise((r,i)=>{const s=(u,c)=>u?i(u):r(c);s.withError=!0,n.push(s),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((i,...s)=>(this._queue[0],i!==null?r.tryCount>this._opts.retries&&(this._queue.shift(),n&&n(i)):(this._queue.shift(),n&&n(null,...s)),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:gt.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 gt.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 gt.EVENT:case gt.BINARY_EVENT:this.onevent(t);break;case gt.ACK:case gt.BINARY_ACK:this.onack(t);break;case gt.DISCONNECT:this.ondisconnect();break;case gt.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(...i){r||(r=!0,n.packet({type:gt.ACK,id:t,data:i}))}}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:gt.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 gs(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}gs.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},gs.prototype.reset=function(){this.attempts=0},gs.prototype.setMin=function(e){this.ms=e},gs.prototype.setMax=function(e){this.max=e},gs.prototype.setJitter=function(e){this.jitter=e};class Pf extends nn{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,vc(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 gs({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(n.timeout==null?2e4:n.timeout),this._readyState="closed",this.uri=t;const i=n.parser||WA;this.encoder=new i.Encoder,this.decoder=new i.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 LA(this.uri,this.opts);const n=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const i=Sr(n,"open",function(){r.onopen(),t&&t()}),s=c=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",c),t?t(c):this.maybeReconnectOnOpen()},u=Sr(n,"error",s);if(this._timeout!==!1){const c=this._timeout,d=this.setTimeoutFn(()=>{i(),s(new Error("timeout")),n.close()},c);this.opts.autoUnref&&d.unref(),this.subs.push(()=>{this.clearTimeoutFn(d)})}return this.subs.push(i),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(Sr(t,"ping",this.onping.bind(this)),Sr(t,"data",this.ondata.bind(this)),Sr(t,"error",this.onerror.bind(this)),Sr(t,"close",this.onclose.bind(this)),Sr(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){_c(()=>{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 e1(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(i=>{i?(t._reconnecting=!1,t.reconnect(),this.emitReserved("reconnect_error",i)):t.onreconnect()}))},n);this.opts.autoUnref&&r.unref(),this.subs.push(()=>{this.clearTimeoutFn(r)})}}onreconnect(){const t=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",t)}}const Ra={};function Rf(e,t){typeof e=="object"&&(t=e,e=void 0),t=t||{};const n=DA(e,t.path||"/socket.io"),r=n.source,i=n.id,s=n.path,u=Ra[i]&&s in Ra[i].nsps,c=t.forceNew||t["force new connection"]||t.multiplex===!1||u;let d;return c?d=new Pf(r,t):(Ra[i]||(Ra[i]=new Pf(r,t)),d=Ra[i]),n.query&&!t.query&&(t.query=n.queryKey),d.socket(n.path,t)}Object.assign(Rf,{Manager:Pf,Socket:e1,io:Rf,connect:Rf});const t1=Object.prototype.toString;typeof Blob=="function"||typeof Blob!="undefined"&&t1.call(Blob),typeof File=="function"||typeof File!="undefined"&&t1.call(File);var n1;(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"})(n1||(n1={}));const kt=(e,t,n,...r)=>{if(!e)return;const i=["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]",i,n,...r)};class GA{constructor(t=!1){We(this,"isDevelopment");We(this,"_log",(t,n,...r)=>{kt(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 ys="cimulate",Lf=`${ys}:pdp-update`,Df=`${ys}:ui-state-update`,Mf=`${ys}:prompts-state-update`,Ff=`${ys}:session-state`,Cc=`${ys}:cart-update`,Bf=`${ys}:cart-set`,r1=e=>{window.addEventListener(Lf,e)},i1=e=>{window.removeEventListener(Lf,e)},o1=(e,t,n)=>{const r=new CustomEvent(Lf,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},s1=e=>{window.addEventListener(Ff,e)},a1=e=>{window.removeEventListener(Ff,e)},u1=(e,t,n)=>{const r=new CustomEvent(Ff,{detail:{property:e,value:t,event:n}});window.dispatchEvent(r)},XA=e=>{window.addEventListener(Cc,e)},KA=e=>{window.removeEventListener(Cc,e)},c1=e=>{const t=new CustomEvent(Cc,{detail:e});window.dispatchEvent(t)};class QA{constructor(){We(this,"initialParams",{productId:"",productName:"",pdpLink:""});We(this,"proxy");We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>(o1(n,r),Reflect.set(t,n,r)));We(this,"updateProxy",t=>{t.productId&&(this.proxy=this.createProxy(t))});We(this,"clear",()=>{this.proxy=this.createProxy(this.initialParams)});We(this,"dispatchContextUpdate",()=>{o1("pdp-context",this.state)});We(this,"createProxy",t=>new Proxy(M({productId:t.productId||"",productName:t.productName||"",pdpLink:t.pdpLink||""},t.imageUrl!==void 0?{imageUrl:t.imageUrl}:{}),{get:this._fullGet,set:this._fullSet}));this.proxy=this.createProxy(this.initialParams)}get productId(){return this.proxy.productId}get pdpLink(){return this.proxy.pdpLink}get state(){return M({productId:this.productId,productName:this.proxy.productName,pdpLink:this.pdpLink},this.proxy.imageUrl!==void 0?{imageUrl:this.proxy.imageUrl}:{})}}const Zn=new QA;class JA{constructor(){We(this,"context",null)}get state(){return this.context?M(M({},this.context),this.context.refinements?{refinements:this.context.refinements.map(({name:t,values:n})=>({name:t,values:[...n]}))}:{}):null}set(t){this.context=M(M({},t),t.refinements?{refinements:t.refinements.map(({name:n,values:r})=>({name:n,values:[...r]}))}:{})}clear(){this.context=null}}const Nc=new JA,l1="onCimulateWidgetReady",d1=["ask_cim","search","browse","pdp"],f1=e=>d1.includes(e),p1={ask_cim:"ask_cim",search:"copilot_search",browse:"copilot_browse",pdp:"product_view"};new Set(Object.values(p1)),new Map(Object.entries(p1).map(([e,t])=>[t,e]));const N="cim-widget",er=`--${N}`,bo={primaryColor:"#3182ce",secondaryColor:"#2c5282",fontColor:"#1a202c",fontFamily:"inherit",backgroundColor:"#ffffff",borderColor:"#dddddd",borderRadius:"0.25rem"},ZA=(e={},t)=>{const n=t==="commerce",r=n?"#db665e":bo.primaryColor,i=n?"#c9554d":bo.secondaryColor,s=n?"0.75rem":bo.borderRadius;return{[`${er}-primary-color`]:e.primaryColor||r,[`${er}-secondary-color`]:e.secondaryColor||i,[`${er}-font-color`]:e.fontColor||bo.fontColor,[`${er}-font-family`]:e.fontFamily||bo.fontFamily,[`${er}-background-color`]:e.backgroundColor||bo.backgroundColor,[`${er}-border-color`]:e.borderColor||bo.borderColor,[`${er}-border-radius`]:e.borderRadius===0?"0":String(e.borderRadius||s)}},Ic={RESET_CONVERSATION:"reset-conversation",END_CONVERSATION:"end-conversation"},Oc="cimulate.widget.minimizedOnNav";function ek(){try{sessionStorage.setItem(Oc,"1")}catch(e){return}}function tk(){try{const e=sessionStorage.getItem(Oc)==="1";return sessionStorage.removeItem(Oc),e}catch(e){return!1}}function nk(){try{sessionStorage.removeItem(Oc)}catch(e){return}}const h1=e=>{window.addEventListener(Df,e)},m1=e=>{window.removeEventListener(Df,e)},rk=(e,t)=>{const n=new CustomEvent(Df,{detail:{property:e,value:t}});window.dispatchEvent(n)},g1=e=>{wt.connectedProxy.connected=e},Pc=e=>{if(!f1(e)){const t=d1.map(r=>`'${r}'`),n=`${t.slice(0,-1).join(", ")}, or ${t[t.length-1]}`;throw new Error(`Invalid entryType: "${e}". Must be ${n}.`)}wt.entryTypeProxy.entryType=e},zr=e=>{const t=wt.statusProxy.isOpen,n=typeof e=="boolean"?e:!t;wt.statusProxy.isOpen=n,n&&(wt.statusProxy.isMinimized=!1,nk())},wo=e=>{const t=wt.statusProxy.isMinimized,n=typeof e=="boolean"?e:!t;wt.statusProxy.isMinimized=n,n&&(wt.statusProxy.isOpen=!1)},Rc=e=>{wt.modalProxy.isFullscreen=e},Es=e=>{if(!["chat","dialog","modal"].includes(e))throw new Error(`Invalid type: ${e}. Must be 'chat', 'dialog', or 'modal'.`);wt.statusProxy.type=e,e==="dialog"||e==="chat"?wt.modeProxy.mode="embedded":wt.modeProxy.mode="standalone"},Lc=e=>{const t=["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right","center"];if(!t.includes(e))throw new Error(`Invalid position: ${e}. Must be one of ${t.join(", ")}.`);wt.dialogProxy.position=e},ik=e=>{const t=wt.dialogProxy.isFullHeight,n=typeof e=="boolean"?e:!t;wt.dialogProxy.isFullHeight=n};class ok{constructor(){We(this,"initialState",{connected:!1,mode:"embedded",entryType:"search",status:{type:"dialog",isOpen:!1,isMinimized:!1},dialog:{position:"bottom-left",isFullHeight:!1,width:""},modal:{isFullscreen:!1}});We(this,"connectedProxy");We(this,"modeProxy");We(this,"entryTypeProxy");We(this,"statusProxy");We(this,"dialogProxy");We(this,"modalProxy",{isFullscreen:!1});We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on UIState`);return rk(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 wt=new ok;function sk(e){if(typeof(e==null?void 0:e.name)!="string"||!e.name.trim())throw new Error("Search results page refinements must include a name");if(!Array.isArray(e.values)||e.values.length===0||e.values.some(t=>typeof t!="string"||!t.trim()))throw new Error("Search results page refinements must include at least one value");return{name:e.name.trim(),values:[...e.values]}}function ak(e){var i;const t=typeof e.query=="string"?e.query.trim():"";if(!t)throw new Error("Search results page context must include a query");if(e.refinements!==void 0&&!Array.isArray(e.refinements))throw new Error("Search results page refinements must be an array");const n=(i=e.refinements)==null?void 0:i.map(sk),r={type:"srp",query:t};n!=null&&n.length&&(r.refinements=n);for(const s of["minPrice","maxPrice"]){const u=e[s];if(u!==void 0){if(typeof u!="number"||!Number.isFinite(u))throw new Error(`Search results page ${s} must be a finite number`);r[s]=u}}return r}function bs(){switch(wt.entryType){case"pdp":{const{productId:e}=Zn.state;return e?{type:"pdp",id:e}:null}case"search":return Nc.state;default:return null}}function y1(){const e=bs();if(!e)return null;switch(e.type){case"pdp":{const{productName:t,imageUrl:n}=Zn.state,r=t||e.id;return{type:"pdp",label:r,removeLabel:`Stop asking about ${r}`,placeholder:`Ask about ${r}`,imageUrl:n}}case"srp":return{type:"srp",label:`Search: "${e.query}"`,removeLabel:`Remove search context for ${e.query}`,placeholder:"Ask us anything"}}}function Dc(e){switch(e.type){case"pdp":{const t=e.id.trim();if(!t)throw new Error("PDP page context must include an id");Nc.clear(),Pc("pdp"),Zn.updateProxy({productId:t,productName:e.name,imageUrl:e.imageUrl}),Zn.dispatchContextUpdate();return}case"srp":{const t=ak(e);Zn.clear(),Zn.dispatchContextUpdate(),Nc.set(t),Pc("search");return}default:{const t=e.type;throw new Error(`Unsupported page context type: ${String(t)}`)}}}function Uf(){Zn.clear(),Zn.dispatchContextUpdate(),Nc.clear()}function uk(e){return e.type==="srp"?"search":"pdp"}function ck({initialPageContext:e,isDevelopment:t=!1}){if(e)try{return Dc(e),uk(e)}catch(n){const r=n instanceof Error?n.message:String(n);kt(t,"warn",`initialPageContext is invalid; skipping initial context seeding. ${r}`);return}}const lk=({initialEntry:e,entryType:t,isDevelopment:n=!1})=>{var r;if(e){if(!f1(e.type)){kt(n,"warn",`initialEntry.type "${e.type}" is not a valid entry type; ignoring.`);return}if(t&&t!==e.type&&kt(n,"warn",`initialEntry.type "${e.type}" conflicts with the deprecated entryType "${t}". entryType wins for the UI entry type; initialEntry params are still seeded. Prefer initialEntry on its own.`),e.type==="pdp"){if(!((r=e.params)!=null&&r.productId)){kt(n,"warn","initialEntry pdp params must include a productId; skipping proxy seed.");return}Zn.updateProxy(e.params);return}kt(n,"info",`initialEntry.type "${e.type}" is not applied yet; only "pdp" is supported in this release.`)}};function dk({enablePageContext:e,initialPageContext:t,initialEntry:n,isDevelopment:r=!1}){return e?{entryType:ck({initialPageContext:t,isDevelopment:r})}:(t&&kt(r,"warn","messagingConfig.initialPageContext is ignored when enablePageContext is false. Set enablePageContext: true to seed page context, or use initialEntry for the legacy PDP text-suffix path."),lk({initialEntry:n,isDevelopment:r}),{})}const La=(e,t)=>{if(/^(https?:)?\/\//i.test(t)||/^data:/i.test(t)||!e)return t;try{return new URL(t,e).href}catch(n){return`${e}${t}`}},fk="ccDevMode",pk=(e=typeof window!="undefined"?window.location.search:"")=>{var t;return((t=new URLSearchParams(e).get(fk))==null?void 0:t.toLowerCase())==="true"},hk=["toggleDialogPosition","minimize","clearChat"],mk=["toggleFullscreen","minimize","clearChat"],E1=[...hk,"endConversation","downloadTranscript"],b1=[...mk,"endConversation","downloadTranscript"],w1=["toggleExpanded","clearChat","endConversation","downloadTranscript"],gk={dialog:new Set(["close","toggleExpanded",...E1]),modal:new Set(["close","toggleExpanded",...b1]),chat:new Set(w1)},jf=(e,t)=>e!=null?e:t,x1=(e,t,n)=>{const r=gk[e],i=(s,u)=>r.has(s)&&jf(t==null?void 0:t[s],u);return{close:i("close",!0),toggleExpanded:i("toggleExpanded",!0),toggleFullscreen:i("toggleFullscreen",!0),toggleDialogPosition:i("toggleDialogPosition",!0),minimize:i("minimize",n.enableMinimize),clearChat:i("clearChat",!0),endConversation:i("endConversation",!0),downloadTranscript:i("downloadTranscript",n.enableDownloadTranscript)}},yk=e=>new Promise(t=>{let r;try{r=new URL(e)}catch(d){kt(!0,"error",`[CimulateOverrides] Invalid URL provided: ${e}. Using default components.`),t({});return}if(r.protocol!=="https:"){kt(!0,"error",`[CimulateOverrides] Override URL must use HTTPS, got ${r.protocol}. Using default components.`),t({});return}const i=document.createElement("script");i.src=e,i.async=!0,i.crossOrigin="anonymous";let s=!1;const u=()=>{s=!0,clearTimeout(c)};i.onload=()=>{if(s)return;u();const d=window.CimulateOverrides;d&&typeof d=="object"?(kt(!0,"log","[CimulateOverrides] Override script loaded successfully."),t(d)):(kt(!0,"warn","[CimulateOverrides] Override script loaded but window.CimulateOverrides is not set. Using default components."),t({}))},i.onerror=()=>{s||(u(),kt(!0,"warn",`[CimulateOverrides] Failed to load override script from: ${e}. Using default components.`),t({}))};const c=setTimeout(()=>{s||(s=!0,kt(!0,"warn",`[CimulateOverrides] Override script timed out after 5000ms: ${e}. Using default components.`),t({}))},5e3);document.head.appendChild(i)}),T1=k.createContext({overrides:{},isInitialized:!1}),Ek=({overridesUrl:e,inlineOverrides:t,children:n})=>{const[r,i]=k.useState({}),[s,u]=k.useState(!1);k.useEffect(()=>{Ie(null,null,function*(){let f={};e?(kt(!0,"log","[CimulateOverrides] Loading overrides from URL..."),f=yield yk(e)):t&&typeof t=="object"?(kt(!0,"log","[CimulateOverrides] Using inline overrides."),f=t):window.CimulateOverrides&&typeof window.CimulateOverrides=="object"&&(kt(!0,"log","[CimulateOverrides] Using window.CimulateOverrides."),f=window.CimulateOverrides),i(f),u(!0)})},[e,t]);const c=k.useMemo(()=>({overrides:r,isInitialized:s}),[r,s]);return w.jsx(T1.Provider,{value:c,children:n})};let bk=class{constructor(){this.listeners=new Map,this.onceListeners=new Map}on(t,n){this.listeners.has(t)||this.listeners.set(t,new Set),this.listeners.get(t).add(n)}once(t,n){this.onceListeners.has(t)||this.onceListeners.set(t,new Set),this.onceListeners.get(t).add(n)}off(t,n){var r,i;return t?n?((r=this.listeners.get(t))==null||r.delete(n),void((i=this.onceListeners.get(t))==null?void 0:i.delete(n))):(this.listeners.delete(t),void this.onceListeners.delete(t)):(this.listeners.clear(),void this.onceListeners.clear())}emit(t,...n){const r=this.listeners.get(t);if(r)for(const s of r)try{s(...n)}catch(u){}const i=this.onceListeners.get(t);if(i){for(const s of i)try{s(...n)}catch(u){}this.onceListeners.delete(t)}}};class wk{constructor(t,n,r,i,s){this.url=t,this.headers=n,this.onEvent=r,this.onClose=i,this.logger=s,this.controller=null,this.reading=!1}connect(){return Ie(this,null,function*(){if(this.reading)return void this.logger.warn("SSE already connected, ignoring duplicate connect()");this.controller=new AbortController,this.reading=!0;const t=yield fetch(this.url,{method:"GET",headers:ce(M({},this.headers),{Accept:"text/event-stream","Cache-Control":"no-cache"}),signal:this.controller.signal});if(!t.ok){this.reading=!1;const n=yield t.text().catch(()=>t.statusText);throw new Error(`SSE connection failed (${t.status}): ${n}`)}if(!t.body)throw this.reading=!1,new Error("SSE response has no body stream");this.readStream(t.body)})}disconnect(){this.reading=!1,this.controller&&(this.controller.abort(),this.controller=null)}get isConnected(){return this.reading}readStream(t){return Ie(this,null,function*(){const n=t.getReader(),r=new TextDecoder;let i="";try{for(;this.reading;){const{value:s,done:u}=yield n.read();if(u)break;let c;for(i+=r.decode(s,{stream:!0}),i=i.replace(/\r\n/g,`
3
3
  `).replace(/\r/g,`
4
4
  `);(c=i.indexOf(`
5
5
 
@@ -13,14 +13,14 @@
13
13
  `);u=c===-1?"":s.slice(c+1)}if(!r.stack)r.stack=u;else if(u){const c=u.indexOf(`
14
14
  `),d=c===-1?-1:u.indexOf(`
15
15
  `,c+1),f=d===-1?"":u.slice(d+1);String(r.stack).endsWith(f)||(r.stack+=`
16
- `+u)}}catch(i){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Wc.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean),legacyInterceptorReqResOrdering:Sn.transitional(Sn.boolean),advertiseZstdAcceptEncoding:Sn.transitional(Sn.boolean),validateStatusUndefinedResolves:Sn.transitional(Sn.boolean)},!1),i!=null&&(X.isFunction(i)?n.paramsSerializer={serialize:i}:Wc.assertOptions(i,{encode:Sn.function,serialize:Sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wc.assertOptions(n,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),n.method=(X.getSafeProp(n,"method")||X.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=s&&X.merge(s.common,s[n.method]);s&&X.forEach(ay.concat("common"),T=>{delete s[T]}),n.headers=vn.concat(u,s);const c=[];let d=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;d=d&&_.synchronous;const I=n.transitional||ep;I&&I.legacyInterceptorReqResOrdering?c.unshift(_.fulfilled,_.rejected):c.push(_.fulfilled,_.rejected)});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let h,m=0,E;if(!d){const T=[up.bind(this),void 0];for(T.unshift(...c),T.push(...f),E=T.length,h=Promise.resolve(n);m<E;)h=h.then(T[m++],T[m++]);return h}E=c.length;let b=n;for(;m<E;){const T=c[m++],_=c[m++];try{b=T?T(b):b}catch(I){if(!_){h=Promise.reject(I);break}try{const v=_.call(this,I);X.isThenable(v)&&(h=Promise.resolve(v).then(()=>up.call(this,b)))}catch(v){h=Promise.reject(v)}break}}if(!h)try{h=up.call(this,b)}catch(T){h=Promise.reject(T)}for(m=0,E=f.length;m<E;)h=h.then(f[m++],f[m++]);return h}getUri(t){t=vo(this.defaults,t);const n=hy(t.baseURL,t.url,t.allowAbsoluteUrls,t);return ey(n,t.params,t.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(t){So.prototype[t]=function(n,r){return this.request(vo(r||{},{method:t,url:n,data:r&&X.hasOwnProp(r,"data")?r.data:void 0}))}}),X.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,u,c){return this.request(vo(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:u}))}}So.prototype[t]=n(),t!=="query"&&(So.prototype[t+"Form"]=n(!0))});let uN=class ZS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const u=new Promise(c=>{r.subscribe(c),s=c}).then(i);return u.cancel=function(){r.unsubscribe(s)},u},t(function(s,u,c){r.reason||(r.reason=new za(s,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 ZS(function(i){t=i}),cancel:t}}};function cN(e){return function(n){return e.apply(null,n)}}function lN(e){return X.isObject(e)&&e.isAxiosError===!0}const Yc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Yc).forEach(([e,t])=>{Yc[t]===void 0&&(Yc[t]=e)});function Cy(e){const t=new So(e),n=L1(So.prototype.request,t);return X.extend(n,So.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Cy(vo(e,i))},n}const Jt=Cy($a);Jt.Axios=So,Jt.CanceledError=za,Jt.CancelToken=uN,Jt.isCancel=uy,Jt.VERSION=op,Jt.toFormData=$c,Jt.AxiosError=Pe,Jt.Cancel=Jt.CanceledError,Jt.all=function(t){return Promise.all(t)},Jt.spread=cN,Jt.isAxiosError=lN,Jt.mergeConfig=vo,Jt.AxiosHeaders=vn,Jt.formToJSON=e=>sy(X.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Ay.getAdapter,Jt.HttpStatusCode=Yc,Jt.default=Jt;const{Axios:Jz,AxiosError:Zz,CanceledError:eV,isCancel:tV,CancelToken:nV,VERSION:rV,all:iV,Cancel:oV,isAxiosError:sV,spread:aV,toFormData:uV,AxiosHeaders:cV,HttpStatusCode:lV,formToJSON:dV,getAdapter:fV,mergeConfig:pV,create:hV}=Jt;class dN{constructor(t,n,r,i=!1,s,u){We(this,"CIMULATE_API_HEADER","x-cimulate-api-key");We(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");We(this,"CIMULATE_SEARCH_API_PATH","api/v1");We(this,"baseApiUrl");We(this,"headers",{});We(this,"fetchConfig",()=>Ie(this,null,function*(){try{const t=yield Jt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));We(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const i=new URL(t);return i.hostname=i.hostname.replace(/^copilot\./,"api."),i.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}`),s&&(this.headers["x-cimulate-customer-id"]=s),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,i)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class fN{constructor(t,n,r,i=!1,s,u){We(this,"apiService");We(this,"config",null);We(this,"getConfig",()=>Ie(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));We(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));We(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));We(this,"getDescription",t=>this.getProductFieldValue(t,"description"));We(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));We(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));We(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));We(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));We(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));We(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});We(this,"getProductField",t=>this.config?this.config[t]:"");We(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new dN(t,n,r,i,s,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 pN={copilot:"Your Search Assistant",messaging:"Commerce Client"},Ny=k.createContext(null),hN=({mode:e,layoutPreset:t="standard",logoUrl:n,headerText:r,headerConfig:i,globalClassName:s="",entryMessage:u,openLinksInNewTab:c=!1,onNavigate:d,disclaimerText:f,disclaimerMarkdown:h,clientContext:m,baseCatalogParams:E,searchPlaceholder:b,searchButtonLabel:T,searchConfig:_,suggestionButtonConfig:I,progressStepsLimit:v=3,messageAlignment:S="start",autoScroll:R=!0,showProductDescription:U=!1,componentConfig:B,conversationHistory:A,resetConversationMessage:G="",apiKey:W,apiToken:re,baseUrl:H,customerId:ee,tenantId:Q,theme:me,isDevelopment:V,__features:ue,routingAttributes:fe,enableDownloadTranscript:ae=!0,enablePageContext:J=!1,enableEscalationToAgent:se=!1,enableImageUpload:O=!1,showProductCaptions:j=!1,connectingMessages:q,staticQuestions:P,staticQuestionsStrategy:ge="append",children:Re})=>{const pe=e==="messaging",Ne=k.useMemo(()=>{const tt=fe==null?void 0:fe.isCartMgmtSupported;return tt===!0||tt==="true"},[fe]),ve=k.useMemo(()=>pe?{config:null}:new fN(H,W,re,V,ee,Q),[pe,H,W,re,V,ee,Q]),ze=k.useMemo(()=>new GA(V),[V]);k.useEffect(()=>{pe||!ve||ve.config||ve.getConfig()},[ve,pe]);const rt=k.useMemo(()=>ZA(me,t),[me,t]),Ot=k.useMemo(()=>{const tt=(_==null?void 0:_.placeholder)||b,yt=(_==null?void 0:_.buttonLabel)||T;let De="icon";return _!=null&&_.buttonType?De=_.buttonType:T&&(De="text"),ce(M({},_||{}),{placeholder:tt,buttonLabel:yt,buttonType:De})},[_,b,T]),ct=k.useMemo(()=>ce(M({},i||{}),{logoUrl:n||(i==null?void 0:i.logoUrl),headerText:(i==null?void 0:i.headerText)||r||pN[e!=null?e:"copilot"]}),[i,n,r,e]),_t=k.useMemo(()=>({configModule:ve,mode:e!=null?e:"copilot",layoutPreset:t,headerConfig:ct,entryMessage:u,staticQuestions:P||[],staticQuestionsStrategy:ge,globalClassName:s,openLinksInNewTab:c,onNavigate:d,disclaimerText:f,disclaimerMarkdown:h,clientContext:m,baseCatalogParams:E,themeVariables:rt,logger:ze,searchConfig:Ot,suggestionButtonConfig:I,progressStepsLimit:v,messageAlignment:S,autoScroll:R,showProductDescription:!!U,enableMinimize:!!(B!=null&&B.enableMinimize),launcherAriaLabel:B==null?void 0:B.launcherAriaLabel,enableDownloadTranscript:ae,enablePageContext:J,enableEscalationToAgent:se,enableImageUpload:O,showProductCaptions:!!j,connectingMessages:q,resetConversationMessage:G,conversationHistory:{sinceHours:typeof(A==null?void 0:A.sinceHours)=="number"?A.sinceHours:pe?24:1,limit:A==null?void 0:A.limit},features:ue,isCartMgmtSupported:Ne}),[ve,e,t,ct,u,P,ge,s,m,E,f,h,c,d,Ot,I,S,R,U,B,ae,J,se,O,v,j,q,G,ze,rt,A,ue,Ne,pe]);return w.jsx(Ny.Provider,{value:_t,children:Re})},st=()=>{const e=k.useContext(Ny);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Iy=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],Ri=-1;function cp(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Oy(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&Iy.includes(t.type))return t;const n=cp(t);return n?{type:"markdown",index:Ri,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:Ri,data:{content:e}}}function Gc(e){let t;try{t=JSON.parse(e)}catch(i){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!Iy.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ce(M({},n),{type:n.type,index:r})}function Va(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function lp(e){var i,s;if(e.type!=="markdown")return[e];const t=(s=(i=e.data)==null?void 0:i.content)!=null?s:"",n=Va(t);if(n)return n.response;const r=Gc(t);return[r&&r.type!=="markdown"?r:e]}function qa(e){const t=Va(e);if(t)return t.response.flatMap(lp);const n=Gc(e);return n?lp(n):[]}function Py(e,t){return qa(e).some(n=>n.type===t)}function mN(e){return qa(e).map(t=>t.type)}function gN(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Py(r.content,t))return r.id}}function Ry(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function yN(e){return e.type==="markdown"&&e.index===Ri?!Ry(e.data.content):!0}function EN(e){var i;const t=(i=Va(e))==null?void 0:i.response;if(!t)return null;const n=t.find(s=>s.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(s=>s.id)};const r=t.find(s=>s.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function bN(e){var s,u,c,d,f;const t=qa(e).find(h=>h.type==="product_tile");if(!t)return null;const n=(u=(s=t.data)==null?void 0:s.id)==null?void 0:u.trim();if(!n)return null;const r=t.data.data,i=(r==null?void 0:r.imageUrl)||((d=(c=r==null?void 0:r.imgGroups)==null?void 0:c.filter(h=>{var m;return((m=h.viewType)==null?void 0:m.toLowerCase())!=="swatch"}).flatMap(h=>{var m;return(m=h.imgs)!=null?m:[]}).find(h=>{var m;return(m=h.url)==null?void 0:m.trim()}))==null?void 0:d.url);return M({type:"pdp",id:n,name:((f=r==null?void 0:r.name)==null?void 0:f.trim())||n},i?{imageUrl:La(r==null?void 0:r.baseUrl,i)}:{})}function Ly(e){var n,r,i,s,u,c,d,f,h,m;const t=qa(e).find(E=>E.type==="cart");return t?{status:(c=(u=(r=(n=t.data)==null?void 0:n.cart)==null?void 0:r.__action_execution_status__)!=null?u:(s=(i=t.data)==null?void 0:i.cart)==null?void 0:s.action_execution_status)!=null?c:null,cartDetails:(m=(h=(f=(d=t.data)==null?void 0:d.cart)==null?void 0:f.cartSummary)==null?void 0:h.cartDetails)!=null?m:null}:null}function wN(e){var i,s,u;const t=qa(e).find(c=>c.type==="cart"),n=(u=(s=(i=t==null?void 0:t.data)==null?void 0:i.cart)==null?void 0:s.cartSummary)==null?void 0:u.cartOperation,r=typeof n=="string"?n.toLowerCase():null;return r==="add"||r==="remove"?r:null}function xN(e,t){if(t.index===Ri){const i=e[e.length-1];if(i&&i.type==="markdown"&&i.index===Ri&&t.type==="markdown"){const s={type:"markdown",index:Ri,data:{content:i.data.content+t.data.content}};return[...e.slice(0,-1),s]}return[...e,t]}const n=e.findIndex(i=>i.index===t.index);return[...n>=0?e.map((i,s)=>s===n?t:i):[...e,t]].sort((i,s)=>i.index-s.index)}function Dy(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const My={connectionStatus:"disconnected",loading:!1,conversationId:null,messagingSessionId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function TN(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return M(ce(M({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ce(M({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return e.conversationId===t.id?e:ce(M({},e),{conversationId:t.id,messagingSessionId:null});case"SET_MESSAGING_SESSION_ID":return e.messagingSessionId===t.id?e:ce(M({},e),{messagingSessionId:t.id});case"ADD_MESSAGE":return Dy(e.messages,t.message)?e:ce(M({},e),{messages:[...e.messages,ce(M({},t.message),{type:"ADD_MESSAGE"})]});case"UPDATE_MESSAGE":return ce(M({},e),{messages:e.messages.map(n=>n.id===t.id?M(M({},n),t.patch):n)});case"APPEND_STREAMING_TOKEN":{const n=Oy(t.token);return n?ce(M({},e),{streamingBlocks:xN(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Dy(e.messages,t.message))return M(M({},e),n);const r=ce(M({},t.message),{type:"FLUSH_STREAMING"}),i=t.replaceMessageId?e.messages.findIndex(s=>s.id===t.replaceMessageId):-1;if(i>=0){const s=[...e.messages];return s[i]=ce(M({},r),{id:e.messages[i].id}),M(ce(M({},e),{messages:s}),n)}return M(ce(M({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ce(M({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return M(ce(M({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ce(M({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ce(M({},e),{routingResult:t.result});case"SET_ERROR":return ce(M({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ce(M({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ce(M({},e),{sendError:null});case"LOAD_HISTORY":return ce(M({},e),{messages:t.messages.map(n=>ce(M({},n),{restored:!0})),loading:!1});case"SET_SESSION_EXPIRED":return ce(M({},e),{sessionExpired:t.expired});case"RESET":return ce(M({},My),{connectionStatus:e.connectionStatus});default:return e}}const _N=e=>typeof e=="string"?e:e.code,Fy=e=>{var t;return((t=e==null?void 0:e.couponsApplied)!=null?t:[]).map(_N)},By=e=>{var n;const t=new Map;for(const r of(n=e==null?void 0:e.items)!=null?n:[])t.set(r.itemId,r);return t};function vN(e,t){const n=By(e),r=By(t),i=[];for(const[f,h]of r){const m=n.get(f);m?m.quantity!==h.quantity&&i.push({type:"quantity",itemId:f,productId:h.productId,name:h.name,quantityBefore:m.quantity,quantityAfter:h.quantity}):i.push({type:"add",itemId:f,productId:h.productId,name:h.name,quantityBefore:0,quantityAfter:h.quantity})}for(const[f,h]of n)r.has(f)||i.push({type:"remove",itemId:f,productId:h.productId,name:h.name,quantityBefore:h.quantity,quantityAfter:0});const s=Fy(e),u=Fy(t),c=u.filter(f=>!s.includes(f)),d=s.filter(f=>!u.includes(f));if(c.length||d.length){const f={type:"coupon",added:c,removed:d};i.push(f)}return i}function SN(e){if(e.length===0)return"unknown";const t=new Set(e.map(n=>n.type));if(t.size===1){const[n]=[...t];return n}return"mixed"}function Uy(e,t,n=null){if(!e&&t&&n)return{status:"success",action:n,changes:[]};if(!e||!t)return{status:"success",action:"unknown",changes:[]};const r=vN(e,t);return{status:"success",action:SN(r),changes:r}}let dp=null;function AN(){const e=dp;return dp=null,e}function kN(e){!e||typeof e!="object"||!Array.isArray(e.items)||(dp=e,window.dispatchEvent(new CustomEvent(Bf,{detail:e})))}const jy=k.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),sendFile:()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Ie(null,null,function*(){}),endConversation:()=>Ie(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Ie(null,null,function*(){}),getAuthLinkKey:()=>Ie(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),Hy=4320*60*1e3;function fp(e,t){return`cim_af_conv_${e}_${t}`}function pp(e,t){return Date.now()-e>t}function hp(e,t,n){try{const r=fp(e,t),i=localStorage.getItem(r);if(!i)return null;const s=JSON.parse(i);if(!s||typeof s!="object"||!("conversationId"in s)||!("storedAt"in s))return null;const u=s;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||pp(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function Wa(e,t,n){try{const r=fp(e,t),i={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(i))}catch(r){}}function mp(e,t){try{const n=fp(e,t);localStorage.removeItem(n)}catch(n){}}function gp(e,t){return`cim_af_ct_${e}_${t}`}function CN(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(NN(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function $y(e){const t=CN(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function NN(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function yp(e,t){try{const n=gp(e,t),r=localStorage.getItem(n);if(!r)return null;const i=JSON.parse(r);if(!i||typeof i!="object"||!("accessToken"in i)||!("lastEventId"in i)||!("storedAt"in i))return null;const s=i;return typeof s.accessToken!="string"||!s.accessToken||typeof s.lastEventId!="string"||typeof s.storedAt!="number"?null:$y(s.accessToken)==="expired"?(localStorage.removeItem(n),null):s}catch(n){return null}}function zy(e,t,n,r){try{const i=gp(e,t),s={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(i,JSON.stringify(s))}catch(i){}}function IN(e,t){try{const n=gp(e,t);localStorage.removeItem(n)}catch(n){}}function ON(e,t){return`cim_af_conv_${e}_${t}`}function PN(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=ON(e,t);return new BroadcastChannel(n)}catch(n){return null}}function RN(e,t=500){return e?new Promise(n=>{let r=!1;const i=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",s),n(null))},t);function s(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(i),e.removeEventListener("message",s),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",s);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(i),e.removeEventListener("message",s),n(null))}}):Promise.resolve(null)}function LN(e,t,n){if(!e)return()=>{};function r(i){var s;if((s=i.data)!=null&&s.type)switch(i.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function DN(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function MN(e){if(e)try{e.close()}catch(t){}}function FN(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function BN(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Vy(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function UN(e){const t=e.staticContent;if(!t||typeof t!="object")return!1;const n=t.attachments;return Array.isArray(n)&&n.length>0}function jN(e){if(e.entryType!=="Message")return null;const n=BN(e.entryPayload).abstractMessage;if(!n)return null;const r=Vy(n,"staticContent","text")||Vy(n,"content","text")||"";if(!r&&!UN(n))return null;const i=FN(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:i,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function HN(e){const t=[];for(const n of e){const r=jN(n);r&&t.push(r)}return t}function Ep(e,t,n){return`cim_af_dividers_${e}_${t}_${n}`}function qy(e,t,n){try{const r=Ep(e,t,n),i=localStorage.getItem(r);if(!i)return{};const s=JSON.parse(i);return!s||typeof s.storedAt!="number"||Date.now()-s.storedAt>Hy||!s.byMessageId||typeof s.byMessageId!="object"?(localStorage.removeItem(r),{}):s.byMessageId}catch(r){return{}}}function $N(e,t,n,r,i){if(!(!n||!r))try{const s=Ep(e,t,n),u=qy(e,t,n);localStorage.setItem(s,JSON.stringify({storedAt:Date.now(),byMessageId:ce(M({},u),{[r]:i})}))}catch(s){}}function zN(e,t,n){try{localStorage.removeItem(Ep(e,t,n))}catch(r){return}}const VN="cim_widget_thumbnails",Xc="thumbnails",qN=1,bp="byConversation",Wy="byStoredAt",WN=2e3;function YN(e,t){return`${e}::${t}`}function GN(){return new Promise(e=>{try{if(typeof indexedDB=="undefined"||!indexedDB){e(null);return}let t=!1;const n=s=>{t||(t=!0,e(s))},r=setTimeout(()=>n(null),WN),i=indexedDB.open(VN,qN);i.onupgradeneeded=()=>{const s=i.result;if(!s.objectStoreNames.contains(Xc)){const u=s.createObjectStore(Xc,{keyPath:"key"});u.createIndex(bp,"conversationId",{unique:!1}),u.createIndex(Wy,"storedAt",{unique:!1})}},i.onsuccess=()=>{clearTimeout(r),n(i.result)},i.onerror=()=>{clearTimeout(r),n(null)},i.onblocked=()=>{clearTimeout(r),n(null)}}catch(t){e(null)}})}function Kc(e,t,n){return Ie(this,null,function*(){const r=yield GN();return r?new Promise(i=>{let s=t,u=!1;const c=d=>{u||(u=!0,i(d))};try{const d=r.transaction(Xc,e),f=d.objectStore(Xc);d.oncomplete=()=>{r.close(),c(s)},d.onerror=()=>{r.close(),c(t)},d.onabort=()=>{r.close(),c(t)},n(f,h=>{s=h})}catch(d){try{r.close()}catch(f){}c(t)}}):t})}function XN(e,t,n){return Ie(this,null,function*(){if(!e||!t||!n)return;const r={key:YN(e,t),conversationId:e,messageId:t,dataUrl:n,storedAt:Date.now()};yield Kc("readwrite",void 0,i=>{i.put(r)})})}function KN(e){return Ie(this,null,function*(){return e?Kc("readonly",{},(t,n)=>{const r={},s=t.index(bp).openCursor(IDBKeyRange.only(e));s.onsuccess=()=>{const u=s.result;if(u){const c=u.value;c!=null&&c.messageId&&(c!=null&&c.dataUrl)&&(r[c.messageId]=c.dataUrl),u.continue()}else n(r)}}):{}})}function Yy(e){return Ie(this,null,function*(){e&&(yield Kc("readwrite",void 0,t=>{const r=t.index(bp).openCursor(IDBKeyRange.only(e));r.onsuccess=()=>{const i=r.result;i&&(i.delete(),i.continue())}}))})}function QN(e){return Ie(this,null,function*(){const t=Date.now()-e;yield Kc("readwrite",void 0,n=>{const i=n.index(Wy).openCursor(IDBKeyRange.upperBound(t,!0));i.onsuccess=()=>{const s=i.result;s&&(s.delete(),s.continue())}})})}const JN=5e3,Ya=Symbol("cimulate-abort-conversation");function Qc(e={}){const{routingAttributes:t,timeoutMs:n=JN}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=M({},t!=null?t:{});return new Promise(i=>{const s={settled:!1},u=()=>{if(s.settled)return;s.settled=!0,s.timer!==void 0&&clearTimeout(s.timer);const m=Object.keys(r).length>0;i(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{s.settled||!m||Object.assign(r,m)},done:u,abort:()=>{s.settled||(s.settled=!0,s.timer!==void 0&&clearTimeout(s.timer),i(Ya))}},f=new CustomEvent(l1,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}s.timer=setTimeout(u,n)})}const ZN=200,eI=1e3,Gy="cim_widget_thumbnails_last_sweep",tI=3600*1e3;function Xy(e){try{const t=Date.now(),n=Number(localStorage.getItem(Gy))||0;if(n>0&&t-n<tI)return;localStorage.setItem(Gy,String(t))}catch(t){}QN(e)}function nI(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:i,conversationId:s,continuationToken:u,lastEventId:c,onSessionUpdate:d}=e,f=k.useRef(null),h=k.useRef(null),m=k.useRef(!1),E=k.useRef(d);E.current=d;const b=k.useRef(null),T=i.sinceHours*60*60*1e3,_=Hy,I=k.useCallback(()=>(b.current||(b.current=RN(f.current)),b.current),[]),v=k.useCallback(W=>{const re=E.current;if(!re)return;if(W==="ended"||W==="reset"){re({reason:W,snapshot:null});return}const H=hp(t,n,_),ee=yp(t,n);!H||!ee||re({reason:W,snapshot:{conversationId:H.conversationId,continuationToken:ee.accessToken,lastEventId:ee.lastEventId,storedAt:Math.max(H.storedAt,ee.storedAt)}})},[t,n,_]);k.useEffect(()=>{const W=PN(t,n);f.current=W,b.current=null,m.current=!1;const re=LN(W,()=>{const H=h.current;if(!H)return null;const ee=yp(t,n);return{conversationId:H,continuationToken:ee==null?void 0:ee.accessToken,lastEventId:ee==null?void 0:ee.lastEventId}},()=>{mp(t,n),h.current=null});return()=>{re(),MN(W),f.current=null}},[t,n]),k.useEffect(()=>{Xy(_)},[_]);const S=k.useCallback((W,re)=>Ie(null,null,function*(){var me,V,ue;const H=(me=re==null?void 0:re.createIfMissing)!=null?me:!0,ee=(V=re==null?void 0:re.isCurrent)!=null?V:(()=>!0);Xy(_);let Q=hp(t,n,_);if(!Q){const fe=yield I();fe&&!pp(fe.storedAt,_)&&(Q=fe)}if(!Q){if(!H)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const fe=yield Qc({routingAttributes:r});if(fe===Ya)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ae=yield W.createConversation(fe);return ee()?(Wa(t,n,ae),h.current=ae,v("created"),{conversationId:ae,restoredMessages:[],resumed:!1,outcome:"created"}):(yield W.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const fe=yield W.listConversations({conversationId:Q.conversationId,startTimestamp:Date.now()-_});if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ae=fe.conversations.find(se=>se.conversationId===Q.conversationId&&!se.isConversationClosed);if(!ae){if(mp(t,n),Yy(Q.conversationId),h.current=null,!H)return v("ended"),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const se=yield Qc({routingAttributes:r});if(se===Ya)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const O=yield W.createConversation(se);return ee()?(Wa(t,n,O),h.current=O,v("created"),{conversationId:O,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield W.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}W.resumeConversation(ae.conversationId),h.current=ae.conversationId,Wa(t,n,ae.conversationId),v("resumed");let J=[];try{const se=yield W.listConversationEntries(ae.conversationId,{limit:Math.min((ue=i.limit)!=null?ue:ZN,eI),startTimestamp:Date.now()-T,direction:"FromEnd"});J=HN(se.conversationEntries).reverse();const O=qy(t,n,ae.conversationId);Object.keys(O).length>0&&(J=J.map(q=>q.role==="user"&&O[q.id]?ce(M({},q),{pageContextDivider:O[q.id]}):q));const j=yield KN(ae.conversationId);Object.keys(j).length>0&&(J=J.map(q=>j[q.id]?ce(M({},q),{attachmentImageUrl:j[q.id]}):q))}catch(se){}return{conversationId:ae.conversationId,restoredMessages:J,resumed:!0,outcome:"resumed"}}catch(fe){return{conversationId:Q.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:fe}}}),[t,n,r,i,T,_,I,v]),R=k.useCallback((W,re)=>{Wa(t,n,W),h.current=W,v(re)},[t,n,v]),U=k.useCallback(W=>{h.current&&(Yy(h.current),zN(t,n,h.current)),mp(t,n),IN(t,n),DN(f.current),h.current=null,v(W)},[t,n,v]),B=k.useCallback(()=>{m.current||(m.current=!0,u&&s&&$y(u)!=="expired"&&(zy(t,n,u,c!=null?c:""),Wa(t,n,s),h.current=s));const W=yp(t,n);return W?M({continuationToken:W.accessToken},W.lastEventId?{lastEventId:W.lastEventId}:{}):null},[t,n,u,s,c]),A=k.useCallback(()=>Ie(null,null,function*(){const W=yield I();return!(W!=null&&W.continuationToken)||pp(W.storedAt,_)?null:{continuationToken:W.continuationToken,lastEventId:W.lastEventId}}),[_,I]),G=k.useCallback((W,re=()=>!0)=>Ie(null,null,function*(){try{const{accessToken:H,lastEventId:ee}=yield W.generateContinuationToken();if(!re())return;zy(t,n,H,ee),(h.current||hp(t,n,_))&&v("refreshed")}catch(H){}}),[t,n,_,v]);return{initializeConversation:S,persistConversationId:R,clearPersistedConversation:U,getStoredConnectOptions:B,getPeerConnectOptions:A,persistContinuationToken:G}}const rI=128,iI=.7;function Ky(e,t,n){return Ie(this,null,function*(){var r,i;try{if(!e||!n.type.startsWith("image/"))return;const s=(i=(r=t==null?void 0:t.conversationEntries)==null?void 0:r[0])==null?void 0:i.id;if(!s)return;const u=yield qf(n,{maxDimension:rI,quality:iI,mimeType:"image/jpeg"}),c=yield P1(u);yield XN(e,s,c)}catch(s){}})}const Qy="Your session ended due to inactivity. Starting a new session…",wp="This conversation has ended.",oI=300*1e3,sI=2e3,aI=1e4,Jy=15e3,uI=2;function Zy(e,t,n){return e||t||n===!0}function xp(e){return e.some(t=>t.role==="agent")}function vs(e){e.sentAt=performance.now(),e.firstTokenAt=void 0}function Ga(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function cI(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function eE(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function Tp(e){if(eE(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function lI(e){var E;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((E=e.variants)!=null?E:[]).filter(b=>b.value),i=r.map(b=>`${b.label}: ${b.value}`).join(", "),s=r.map(b=>b.value).join(", "),u=i?` (${i})`:"",c=s?` (${s})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",h=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:h,display:m}}function _p(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function dI({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:i,resumeUsedLastEventId:s,recoverySteps:u,onExhausted:c,timeoutMs:d=Jy,logger:f,isRecoveryInFlight:h}){const m=k.useRef(u);m.current=u;const E=k.useRef(c);E.current=c;const b=k.useRef(f);b.current=f;const T=k.useRef(h);T.current=h;const _=k.useRef(0),I=k.useRef(!1),v=k.useRef(0),[S,R]=k.useState(0);k.useEffect(()=>{if(!t||n){_.current=0,I.current=!1,v.current=0;return}const U=s||_.current>0;if(!(i&&U&&e==="connected"&&!r&&!I.current))return;const A=setTimeout(()=>{Ie(null,null,function*(){var H,ee;if((H=T.current)!=null&&H.call(T)){if(v.current+=1,v.current>uI){I.current=!0,E.current();return}R(Q=>Q+1);return}const G=_.current,W=m.current;if(G>=W.length){I.current=!0,E.current();return}v.current=0,(ee=b.current)==null||ee.warn("🦜 connect bootstrap stalled",{attempt:G});let re;try{yield Promise.race([Promise.resolve(W[G]()),new Promise((Q,me)=>{re=setTimeout(()=>{me(new Error("connect bootstrap step timed out"))},d)})])}catch(Q){}finally{re!==void 0&&clearTimeout(re),_.current=G+1,R(Q=>Q+1)}})},d);return()=>{clearTimeout(A)}},[e,t,n,r,i,s,d,S])}const fI=(e,t,n)=>e==="chat"?"open":t?n?"minimized":"open":"closed",pI=(e,t,n,r,i)=>e==="error"||n?"error":t&&i===0?"connecting":r||t?"processing":e==="reconnecting"?"reconnecting":"transcript",hI=e=>{for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role!=="agent")continue;const r=mN(n.content);if(r.includes("order_confirmation"))return"order";if(r.includes("cart"))return"cart";if(r.includes("product_comparison"))return"comparison";if(r.includes("product_carousel")||r.includes("product_tile"))return"products"}return"text"};function mI({telemetryRef:e,connectionStatus:t,loading:n,sendError:r,isAgentTyping:i,messages:s}){const{status:{isOpen:u,isMinimized:c,type:d}}=tr(),f=fI(d,u,c);k.useEffect(()=>{var E;(E=e.current)==null||E.uiState(f)},[e,f]);const h=pI(t,n,r,i,s.length);k.useEffect(()=>{var E;(E=e.current)==null||E.viewState(h)},[e,h]);const m=k.useMemo(()=>hI(s),[s]);k.useEffect(()=>{var E;(E=e.current)==null||E.contentState(m)},[e,m])}const gI=e=>typeof e=="number"?e:typeof e!="string"?NaN:/^\d+$/.test(e)?Number(e):Date.parse(e),vp=(e,t=Date.now())=>{for(let n=e.length-1;n>=0;n--){const{role:r,timestamp:i}=e[n];if(r==="system")continue;const s=gI(i);return Number.isFinite(s)?Math.max(0,t-s):null}return null};function yI({telemetryRef:e,stateRef:t}){const n=k.useRef(null),r=k.useCallback(i=>{var u;const s=t.current;!(s!=null&&s.conversationId)||s.conversationId===n.current||(n.current=s.conversationId,(u=e.current)==null||u.conversationEnded(i,vp(s.messages)))},[e,t]);return k.useEffect(()=>{const i=performance.now();let s=!1;const u=d=>{var f,h,m;s||(s=!0,(m=e.current)==null||m.sessionEnded(d,Math.round(performance.now()-i),vp((h=(f=t.current)==null?void 0:f.messages)!=null?h:[])))},c=()=>u("navigated_away");return window.addEventListener("pagehide",c),()=>{window.removeEventListener("pagehide",c),u("unmounted")}},[e,t]),r}const EI=100,bI=3e3,wI=12e3;function tE(e,t){const n=e.current;e.current=[],n.forEach(({text:r,options:i,file:s,resolve:u})=>{const c=t.current;if(!c){u==null||u({outcome:"failure",message:"Messaging is unavailable"});return}c(r,i==null?void 0:i.displayContent,i,void 0,s).then(d=>u==null?void 0:u(d),d=>u==null?void 0:u({outcome:"failure",message:d instanceof Error?d.message:String(d)}))})}function nE(e,t){const n=e.current;n.length!==0&&(e.current=[],n.forEach(({resolve:r})=>{r==null||r({outcome:"failure",message:t})}))}function xI({isOpen:e,connectionStatus:t,conversationId:n,messages:r,deliverUserMessageRef:i,requireWelcome:s=!1,onWelcomeTimeout:u}){const[c,d]=k.useState(0),f=k.useRef([]),h=k.useRef(t);h.current=t;const m=k.useRef(null);return k.useEffect(()=>{if(t==="error"){m.current=null,nE(f,"Connection error");return}const E=t==="connected"&&n!==null,b=f.current.length>0;if(!e||!E||!b){m.current=null;return}if(xp(r)){m.current=null;const S=setTimeout(()=>{tE(f,i)},EI);return()=>clearTimeout(S)}const T=Date.now(),_=s?wI:bI;m.current===null&&(m.current=T+_);const I=Math.max(0,m.current-T),v=setTimeout(()=>{m.current=null,f.current.length!==0&&(s?(nE(f,"Welcome timeout"),u==null||u()):tE(f,i))},I);return()=>clearTimeout(v)},[e,t,n,r,i,c,s,u]),k.useCallback((E,b,T)=>h.current==="error"?Promise.resolve({outcome:"failure",message:"Connection error"}):new Promise(_=>{f.current.push({text:E,options:b,file:T,resolve:_}),d(I=>I+1)}),[])}function TI(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Ic.RESET_CONVERSATION&&t.current()};return s1(n),()=>{a1(n)}},[])}function _I(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Ic.END_CONVERSATION&&t.current()};return s1(n),()=>{a1(n)}},[])}const qr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function rE(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ss(e){const{type:t,statusCode:n}=rE(e),r=e&&typeof e=="object"&&typeof e.attemptsMade=="number"?e.attemptsMade:void 0;return{status:n,context:{errType:t!=null?t:"unknown",attempts:r}}}function Wr(e){const{type:t,statusCode:n}=rE(e);if(t==="api"&&typeof n=="number")return n===429?qr.rateLimit:n>=500?qr.server:qr.default;switch(t){case"network":return qr.network;case"sse":return qr.interrupted;case"auth":return qr.connect;default:return qr.default}}function iE(e){switch(e.code){case"MAX_RECONNECT":return qr.lost;case"ROUTING_FAILED":return qr.routing;default:return qr.connect}}let Ao=null;function vI(e){Ao&&Ao!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Ao=e}function SI(e){Ao===e&&(Ao=null)}function oE(){if(!Ao)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Ao}const AI={pdp:"This is the product details page the user is currently looking at",srp:"This is the search results page the user is currently looking at"},kI="1.0.0";function CI(e){if(!e)return;const t=e.type,n=e.type==="pdp"?{id:e.id}:M(M(M({query:e.query},e.refinements!==void 0?{refinements:e.refinements}:{}),e.minPrice!==void 0?{minPrice:e.minPrice}:{}),e.maxPrice!==void 0?{maxPrice:e.maxPrice}:{});return[{entryType:"SessionContext",id:crypto.randomUUID(),sessionContext:{contextType:"SessionContextSet",contextVariables:[{name:"commerce_agent_context",value:{valueType:"StructuredValue",value:{version:kI,page_context_type:t,page_context_message:AI[t],page_context_data:n}}}]}}]}function sE(e,t){return e===t?!0:!e||!t||e.type!==t.type?!1:e.type==="pdp"&&t.type==="pdp"?e.id===t.id:e.type!=="srp"||t.type!=="srp"?!1:e.query===t.query}const As=Symbol("initialization-cancelled"),NI=3e4,II="Image is too large to send. Please choose a smaller image.",OI="Sorry, we couldn't process that image. Please try a PNG, JPG, or GIF.",PI=512,RI=.7,LI=e=>Ie(null,null,function*(){let t;try{t=yield qf(e)}catch(n){if(!Qk.includes(e.type))return console.warn("🦜 image downsize failed; original type not SCRT2-native, rejecting",n),{error:OI};console.warn("🦜 image downsize failed; uploading original",n),t=e}return t.size>Vf?{error:II}:{file:t}}),aE=e=>Ie(null,null,function*(){if(e.preparedFile)return{file:e.preparedFile};const t=yield LI(e.file);return"error"in t?t:(e.preparedFile=t.file,{file:t.file})}),uE=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,conversationId:i,continuationToken:s,lastEventId:u,capabilitiesVersion:c,enablePageContext:d=!1,enableLogging:f=!1,onConnect:h,onMessage:m,onError:E,onProductResult:b,onEndConversation:T,onSessionUpdate:_,onWelcomeTimeout:I,children:v})=>{const{logger:S,conversationHistory:R}=st(),{status:{isOpen:U}}=tr(),[B,A]=k.useReducer(TN,My),[G,W]=k.useState(!1),re=k.useRef(!1),[H,ee]=k.useState(!1),[Q,me]=k.useState(!1),V=k.useRef(B);V.current=B;const ue=k.useRef(null);ue.current||(ue.current=crypto.randomUUID());const fe=k.useRef(null);fe.current||(fe.current=jk({orgId:t,esDeveloperName:n,widgetSessionId:ue.current,getIdentity:()=>({conversationId:V.current.conversationId,messagingSessionId:V.current.messagingSessionId})}));const ae=k.useRef(null),J=k.useRef(null),se=k.useRef(null),O=k.useRef(0),j=k.useRef(!1);k.useEffect(()=>{const Z=B.connectionStatus,ye=ae.current;ae.current=Z;const Ee=fe.current;if(Ee&&!(ye===Z||ye===null&&Z==="disconnected"))switch(Ee.connectionState(Z),Z){case"connecting":J.current=performance.now();break;case"reconnecting":se.current=performance.now();break;case"connected":ye==="reconnecting"&&se.current!==null?Ee.reconnectSucceeded(Math.round(performance.now()-se.current),O.current):Ee.connectSucceeded(J.current!==null?Math.round(performance.now()-J.current):null),J.current=null,se.current=null,O.current=0;break}},[B.connectionStatus]),k.useEffect(()=>{var Z;(Z=fe.current)==null||Z.sessionState(B.sessionExpired)},[B.sessionExpired]),mI({telemetryRef:fe,connectionStatus:B.connectionStatus,loading:B.loading,sendError:B.sendError,isAgentTyping:B.isAgentTyping,messages:B.messages});const q=yI({telemetryRef:fe,stateRef:V}),P=nI({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:R,conversationId:i,continuationToken:s,lastEventId:u,onSessionUpdate:_}),ge=k.useRef(null),Re=k.useRef(m),pe=k.useRef(E),Ne=k.useRef(h),ve=k.useRef(b),ze=k.useRef(T),rt=k.useRef(!1),Ot=k.useRef(!1),ct=k.useRef(!1),_t=k.useRef(0),tt=k.useRef(0),yt=k.useRef(0),De=k.useRef(null),Ve=k.useRef(null),Oe=k.useRef(null),it=k.useRef(0),lt=k.useRef(!1),jt=k.useRef(0),At=k.useRef(0),Ei=k.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),sr=k.useRef(),Ko=k.useRef(()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}})),he=k.useRef(null),ke=k.useCallback((Z,ye,Ee)=>{var Le,$e;const Se=Z.options.pageContextDivider,de=($e=(Le=ye==null?void 0:ye.conversationEntries)==null?void 0:Le[0])==null?void 0:$e.id;Se&&Ee&&de&&$N(t,n,Ee,de,Se)},[t,n]),Qe=k.useCallback((Z={})=>{if(!d)return Z;const ye=bs();if(!ye)return ce(M({},Z),{pageContextSnapshot:null});const Ee=ce(M({},Z),{pageContextSnapshot:ye});if(Z.silent)return Ee;let Se;switch(ye.type){case"pdp":{const de=y1();Se={context:ye,label:(de==null?void 0:de.label)||ye.id,imageUrl:de==null?void 0:de.imageUrl};break}case"srp":Se={context:ye,label:ye.query};break}return ce(M({},Ee),{pageContextDivider:Se})},[d]),Je=k.useRef([]),et=k.useRef(null),Yt=k.useRef(null),Yn=k.useRef(!1),mn=k.useRef(0);k.useEffect(()=>{const Z=ye=>{var Se;const Ee=(Se=AN())!=null?Se:ye==null?void 0:ye.detail;!Ee||typeof Ee!="object"||!Array.isArray(Ee.items)||(Yt.current=Ee,Yn.current=!0,mn.current+=1)};return window.addEventListener(Bf,Z),Z(),()=>window.removeEventListener(Bf,Z)},[]);const Gt=k.useCallback((Z,ye)=>{ye.outcome==="timeout"?(Z.timedOut=!0,Je.current=Je.current.filter(Ee=>Ee===Z||!Ee.timedOut)):Je.current=Je.current.filter(Ee=>Ee!==Z),clearTimeout(Z.timeoutId),Z.resolve(ye)},[]);Re.current=m,pe.current=E,Ne.current=h,ve.current=b,ze.current=T,k.useEffect(()=>{const Z=new _k({baseURL:e,orgId:t,esDeveloperName:n,options:M({enableLogging:f},c?{capabilitiesVersion:c}:{})});ge.current=Z,lt.current=!1,j.current=!1,me(!1),W(!1),re.current=!1,ee(!1),A({type:"RESET"}),Z.on("connected",()=>{var de,Le;A({type:"SET_CONNECTION_STATUS",status:"connected"}),j.current||(j.current=!0,(de=fe.current)==null||de.sessionStarted()),(Le=Ne.current)==null||Le.call(Ne)}),Z.on("disconnected",()=>{A({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),Z.on("reconnecting",de=>{O.current=de.attempt,A({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),Z.on("message",de=>{var oi,Jo,pd,ju,Zo,ar;const Le=Yt.current,$e=mn.current,bt=de.messageId!==void 0&&V.current.messages.some(es=>es.serverId===de.messageId);if(d&&!bt){const es=bN(de.content);es&&!sE(es,bs())&&Dc(es)}const dt=ce(M({id:de.messageId||crypto.randomUUID()},de.messageId?{serverId:de.messageId}:{}),{role:"agent",content:de.content,timestamp:de.timestamp,sender:de.sender,raw:de});S==null||S.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:dt.id,tokensBeforeFlush:_t.current,streamedFinalOnly:_t.current===0}),_t.current=0;const Ze=Ga(Je.current),ft=Ze==null?void 0:Ze.options.reconcileMessageId;A({type:"FLUSH_STREAMING",message:dt,replaceMessageId:ft}),(oi=Re.current)==null||oi.call(Re,dt),Ze&&(Ze.sentAt!==void 0&&!Ze.options.silent&&((Jo=fe.current)==null||Jo.agentReplied(Math.round(performance.now()-Ze.sentAt),Ze.firstTokenAt!==void 0?Math.round(Ze.firstTokenAt-Ze.sentAt):null)),Gt(Ze,{outcome:"success"}));const{messagingSessionId:Kt}=de;Kt&&A({type:"SET_MESSAGING_SESSION_ID",id:Kt});const at=EN(de.content);Kt&&at&&((pd=ve.current)==null||pd.call(ve,{agentSessionId:Kt,kind:at.kind,productIds:at.productIds}));const Pt=Ly(de.content),Ht=(ju=Pt==null?void 0:Pt.cartDetails)!=null?ju:null;bt||((at==null?void 0:at.kind)==="search"&&at.productIds.length===0&&((Zo=fe.current)==null||Zo.failure("no_results")),(Pt==null?void 0:Pt.status)==="failure"&&((ar=fe.current)==null||ar.failure("cart_action_failed"))),!(bt||!re.current&&Yn.current)&&(Ht&&$e===mn.current&&(Yt.current=Ht,Yn.current=!1,mn.current+=1),(Pt==null?void 0:Pt.status)==="success"&&Ht?re.current&&c1(Uy(Le,Ht,wN(de.content))):Ze!=null&&Ze.options.cartMutation&&!Ht&&(Pt==null?void 0:Pt.status)!=="failure"&&re.current&&c1(Uy(Le,null)))}),Z.on("streaming_token",de=>{const Le=Ga(Je.current);if(!(Le!=null&&Le.options.silent)){if(Le&&Le.firstTokenAt===void 0&&(Le.firstTokenAt=performance.now()),_t.current+=1,S!=null&&S.isDevelopment){const $e=Oy(de.token);$e?$e.index===Ri?S.debug("🦜 streaming_token → markdown fallback",{token:de.token}):S.debug("🦜 streaming_token parsed",{type:$e.type,index:$e.index,outputName:$e.type==="tool_results"?$e.output_name:void 0}):S.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:de.token})}A({type:"APPEND_STREAMING_TOKEN",token:de.token})}}),Z.on("typing_started",()=>{var de;(de=Ga(Je.current))!=null&&de.options.silent||A({type:"SET_AGENT_TYPING",isTyping:!0})}),Z.on("typing_stopped",()=>{var de;(de=Ga(Je.current))!=null&&de.options.silent||A({type:"SET_AGENT_TYPING",isTyping:!1})}),Z.on("progress_indicator",de=>{var Le;(Le=Ga(Je.current))!=null&&Le.options.silent||A({type:"ADD_PROGRESS_STEP",message:de.message})}),Z.on("routing_result",de=>{var Le,$e;if(A({type:"SET_ROUTING_RESULT",result:de}),!de.isSuccessful){const bt=`Routing failed: ${de.failureType||"unknown"}`;(Le=fe.current)==null||Le.failure("routing_failed",{context:{failureType:de.failureType||"unknown"}}),A({type:"SET_ERROR",error:iE({code:"ROUTING_FAILED"})}),A({type:"SET_CONNECTION_STATUS",status:"error"}),($e=pe.current)==null||$e.call(pe,bt)}}),Z.on("participant_changed",de=>{var $e,bt;if(de.participant.name==="Automated Process")return;const Le=ce(M({id:crypto.randomUUID()},de.entryId?{serverId:de.entryId}:{}),{role:"system",content:de.action==="add"?`${de.participant.name||"Agent"} joined the conversation`:`${de.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});S==null||S.log("🦜 MessagingProvider participant_changed event received",{event:de}),de.action==="add"?($e=fe.current)==null||$e.participantJoined(de.participant.name||"Agent"):(bt=fe.current)==null||bt.participantLeft(de.participant.name||"Agent",vp(V.current.messages)),A({type:"ADD_MESSAGE",message:Le})}),Z.on("conversation_closed",()=>{const de={id:crypto.randomUUID(),role:"system",content:wp,timestamp:new Date().toISOString()};q("server_closed"),A({type:"ADD_MESSAGE",message:de}),A({type:"SET_CONVERSATION_ID",id:null}),P.clearPersistedConversation("ended")}),Z.on("error",de=>{var Le,$e,bt;if(S==null||S.log("🦜 MessagingProvider ERROR event received",{event:de}),de.code==="SESSION_EXPIRED"){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),A({type:"SET_LOADING",isLoading:!1});return}($e=fe.current)==null||$e.failure("sdk_error",{context:{code:(Le=de.code)!=null?Le:"unknown",recoverable:de.recoverable}}),A({type:"SET_ERROR",error:iE(de)}),de.recoverable||A({type:"SET_CONNECTION_STATUS",status:"error"}),(bt=pe.current)==null||bt.call(pe,de.message)});const ye=de=>{if(de!==jt.current)throw As},Ee=de=>de===jt.current,Se=de=>Ie(null,null,function*(){var Ze,ft,Kt,at;W(!1),re.current=!1;let Le=P.getStoredConnectOptions(),$e=!1;Le||(Le=yield P.getPeerConnectOptions(),ye(de),$e=!!Le);let bt=!1;try{if(yield Z.connect(Le!=null?Le:void 0),!Ee(de))throw Z.disconnect(),As;bt=!!(Le!=null&&Le.lastEventId)}catch(Pt){if(ye(de),Le&&Tp(Pt)){if(S==null||S.log("Stored token expired on connect — falling back to fresh connect"),$e||P.clearPersistedConversation("reset"),yield Z.connect(),!Ee(de))throw Z.disconnect(),As;bt=!1}else throw Pt}ee(bt),yield P.persistContinuationToken(Z,()=>Ee(de)),ye(de);const dt=yield P.initializeConversation(Z,{isCurrent:()=>Ee(de)});if(ye(de),S==null||S.log("🦜 initial connect complete",{conversationId:dt.conversationId,resumed:dt.resumed,outcome:dt.outcome,restoredMessages:dt.restoredMessages.length}),(Ze=fe.current)==null||Ze.sessionInitialized(dt.outcome,dt.restoredMessages.length),dt.outcome==="aborted")throw A({type:"SET_LOADING",isLoading:!1}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),As;if(dt.outcome==="unverified-error"){dt.conversationId&&(Z.resumeConversation(dt.conversationId),A({type:"SET_CONVERSATION_ID",id:dt.conversationId})),W(!0),re.current=!0;return}if(A({type:"SET_CONVERSATION_ID",id:dt.conversationId}),dt.resumed){const Pt=(ft=[...dt.restoredMessages].reverse().find(Ht=>Ht.pageContextDivider))==null?void 0:ft.pageContextDivider;if(he.current=(Kt=Pt==null?void 0:Pt.context)!=null?Kt:null,!Yn.current)for(const Ht of[...dt.restoredMessages].reverse()){const oi=(at=Ly(Ht.content))==null?void 0:at.cartDetails;if(oi){Yt.current=oi,mn.current+=1;break}}A({type:"LOAD_HISTORY",messages:dt.restoredMessages}),W(!0),re.current=!0}else he.current=null,W(!0),re.current=!0;A({type:"SET_LOADING",isLoading:!1})});return Ve.current=Se,()=>{jt.current+=1,At.current+=1,Z.disconnect(),Z.off(),ge.current=null,Ve.current=null,Oe.current=null,lt.current=!1}},[e,t,n,c,Gt]);const en=k.useCallback(()=>{if(lt.current)return Promise.resolve();if(Oe.current)return it.current===jt.current?Oe.current:Oe.current.catch(Se=>{if(Se!==As)throw Se}).then(()=>Ei.current());const Z=Ve.current;if(!Z)return Promise.reject(new Error("Messaging is unavailable"));A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_CONNECTION_STATUS",status:"connecting"});const ye=++jt.current;it.current=ye;const Ee=Z(ye).then(()=>{lt.current=!0,me(!0)}).catch(Se=>{var Le,$e;if(Se===As)throw Se;const de=Se instanceof Error?Se.message:String(Se);throw(Le=fe.current)==null||Le.failure("connect_failed",Ss(Se)),A({type:"SET_CONNECTION_STATUS",status:"error"}),A({type:"SET_ERROR",error:Wr(Se)}),($e=pe.current)==null||$e.call(pe,de),Se}).finally(()=>{Oe.current===Ee&&(Oe.current=null)});return Oe.current=Ee,Ee},[]);Ei.current=en,k.useEffect(()=>{U&&en().catch(()=>{})},[U,e,t,n,c,en]);const Xt=xI({isOpen:U,connectionStatus:B.connectionStatus,conversationId:B.conversationId,messages:B.messages,deliverUserMessageRef:sr,requireWelcome:d,onWelcomeTimeout:I}),Mn=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)return!1;const ye=P.getStoredConnectOptions();if(!ye)return S==null||S.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;S==null||S.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{Z.disconnect(),yield Z.connect(ye)}catch(Se){if(Tp(Se))return S==null||S.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Se instanceof Error?Se.message:String(Se)}),!1;throw S==null||S.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Se instanceof Error?Se.message:String(Se)}),Se}yield P.persistContinuationToken(Z);const Ee=yield P.initializeConversation(Z,{createIfMissing:!1});return Ee.outcome==="not-found-or-closed"||!Ee.conversationId?(S==null||S.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ee.outcome==="unverified-error"&&(S==null||S.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ee.conversationId}),Z.resumeConversation(Ee.conversationId)),S==null||S.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ee.conversationId}),A({type:"SET_CONVERSATION_ID",id:Ee.conversationId}),A({type:"SET_CONNECTION_STATUS",status:"connected"}),Ee.outcome!=="resumed"&&P.persistConversationId(Ee.conversationId,"resumed"),ct.current=!1,A({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[P,S]),wn=k.useCallback(Z=>Ie(null,null,function*(){var Ee,Se,de,Le,$e,bt,dt;const ye=ge.current;if(ye){Z.options.silent||(A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_PROGRESS_MESSAGE",message:""}));try{if(Z.file){const Ze=yield aE(Z);if("error"in Ze){A({type:"SET_SEND_ERROR",error:{text:Z.text,displayContent:Z.displayContent,options:Z.options,sessionContext:Z.sessionContext,file:Z.file,message:Ze.error}}),(Ee=fe.current)==null||Ee.failure("file_rejected"),(Se=pe.current)==null||Se.call(pe,Ze.error),Gt(Z,{outcome:"failure",message:Ze.error});return}vs(Z);const ft=yield ye.sendFile(Ze.file,Z.text.trim()?{text:Z.text}:void 0);Ky((de=ye.conversationId)!=null?de:V.current.conversationId,ft,Z.file)}else if(Z.sessionContext){vs(Z);const Ze=yield ye.sendMessage(Z.text,Z.sessionContext);ke(Z,Ze,(Le=ye.conversationId)!=null?Le:V.current.conversationId)}else{vs(Z);const Ze=yield ye.sendMessage(Z.text);ke(Z,Ze,($e=ye.conversationId)!=null?$e:V.current.conversationId)}}catch(Ze){(bt=fe.current)==null||bt.failure("send_failed",Ss(Ze));const ft=Wr(Ze);A({type:"SET_SEND_ERROR",error:{text:Z.text,displayContent:Z.displayContent,options:Z.options,sessionContext:Z.sessionContext,file:Z.file,message:ft}}),(dt=pe.current)==null||dt.call(pe,Ze instanceof Error?Ze.message:String(Ze)),Gt(Z,{outcome:"failure",message:ft})}}}),[Gt,ke]),sa=k.useCallback(Z=>Ie(null,null,function*(){var Ee,Se,de;const ye=ge.current;if(!(!ye||rt.current)){rt.current=!0,Ot.current=!0;try{if(yield Mn()){Z&&(yield wn(Z));return}S==null||S.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),q("expired"),ct.current=!1,A({type:"SET_SESSION_EXPIRED",expired:!1}),A({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:Qy,timestamp:new Date().toISOString()}}),P.clearPersistedConversation("reset"),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.disconnect(),yield ye.connect(),yield P.persistContinuationToken(ye);const Le=yield Qc({routingAttributes:r});if(Le===Ya){A({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const $e=yield ye.createConversation(Le);S==null||S.log("🦜 recoverExpiredSession: new conversation created",{conversationId:$e}),A({type:"SET_CONVERSATION_ID",id:$e}),(Ee=fe.current)==null||Ee.conversationStarted("recovery"),A({type:"SET_CONNECTION_STATUS",status:"connected"}),P.persistConversationId($e,"created"),Z&&(yield wn(Z))}catch(Le){(Se=fe.current)==null||Se.failure("session_recovery_failed",Ss(Le));const $e=Le instanceof Error?Le.message:String(Le);A({type:"SET_ERROR",error:Wr(Le)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(de=pe.current)==null||de.call(pe,$e),Z&&Gt(Z,{outcome:"failure",message:Wr(Le)})}finally{rt.current=!1,Ot.current=!1}}}),[r,P,Mn,wn,S,Gt,q]),Qo=k.useRef(sa);Qo.current=sa;const bi=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z||!lt.current||rt.current)return;if(!V.current.conversationId&&!ct.current){Z.reconnect();return}rt.current=!0;const ye=Ie(null,null,function*(){try{(yield Mn())||(ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ee){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{rt.current=!1,De.current=null}});De.current=ye,yield ye}),[Mn]),wi=k.useRef(bi);wi.current=bi;const fd=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z||rt.current)return;const ye=P.getStoredConnectOptions(),Ee=ye==null?void 0:ye.continuationToken;if(Ee){rt.current=!0;try{Z.disconnect(),yield Z.connect({continuationToken:Ee}),yield P.persistContinuationToken(Z);const Se=V.current.conversationId;Se&&Z.resumeConversation(Se)}catch(Se){if(Tp(Se)){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),A({type:"SET_LOADING",isLoading:!1});return}S==null||S.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Se instanceof Error?Se.message:String(Se)})}finally{rt.current=!1}}}),[P,S]);k.useEffect(()=>{const Z=()=>{const $e=Date.now();$e-yt.current<sI||(yt.current=$e,wi.current())},ye=()=>{if(document.visibilityState==="hidden"){tt.current=Date.now();return}const $e=ge.current;if(!$e)return;const bt=tt.current?Date.now()-tt.current:0;tt.current=0,(ct.current||!$e.isConnected||bt>oI)&&Z()},Ee=$e=>{$e.persisted&&Z()},Se=()=>{tt.current=Date.now()},de=()=>Z(),Le=()=>Z();return document.addEventListener("visibilitychange",ye),window.addEventListener("pageshow",Ee),window.addEventListener("pagehide",Se),document.addEventListener("resume",de),window.addEventListener("online",Le),()=>{document.removeEventListener("visibilitychange",ye),window.removeEventListener("pageshow",Ee),window.removeEventListener("pagehide",Se),document.removeEventListener("resume",de),window.removeEventListener("online",Le)}},[]);const Mu=k.useCallback((Z,ye)=>Ie(null,null,function*(){var Se,de,Le,$e,bt,dt,Ze;const Ee=ge.current;if(!Ee){Gt(Z,{outcome:"failure",message:"Messaging is unavailable"});return}if(ct.current){yield Qo.current(Z);return}try{if(Z.file){const ft=yield aE(Z);if("error"in ft){A({type:"SET_SEND_ERROR",error:ye(ft.error)}),(Se=fe.current)==null||Se.failure("file_rejected"),(de=pe.current)==null||de.call(pe,ft.error),Gt(Z,{outcome:"failure",message:ft.error});return}vs(Z);const Kt=yield Ee.sendFile(ft.file,Z.text.trim()?{text:Z.text}:void 0);Ky((Le=Ee.conversationId)!=null?Le:V.current.conversationId,Kt,Z.file)}else if(Z.sessionContext){vs(Z);const ft=yield Ee.sendMessage(Z.text,Z.sessionContext);ke(Z,ft,($e=Ee.conversationId)!=null?$e:V.current.conversationId)}else{vs(Z);const ft=yield Ee.sendMessage(Z.text);ke(Z,ft,(bt=Ee.conversationId)!=null?bt:V.current.conversationId)}}catch(ft){if(eE(ft)){yield Qo.current(Z);return}(dt=fe.current)==null||dt.failure("send_failed",Ss(ft));const Kt=Wr(ft);A({type:"SET_SEND_ERROR",error:ye(Kt)}),(Ze=pe.current)==null||Ze.call(pe,ft instanceof Error?ft.message:String(ft)),Gt(Z,{outcome:"failure",message:Kt})}}),[Gt,ke]),Fu=k.useCallback(Z=>Ie(null,null,function*(){const ye=De.current;ye&&(yield ye),yield Z()}),[]),yr=k.useCallback((Z,ye,Ee={},Se,de,Le=!1)=>new Promise($e=>{var Pt;if(!ge.current){$e({outcome:"failure",message:"Messaging is unavailable"});return}if(!Z.trim()&&!de){$e({outcome:"failure",message:"Message is empty"});return}const dt=Ee.pageContextDivider,Ze=!Le&&!de&&dt!==void 0&&!sE(dt.context,he.current),ft=!Le&&dt!==void 0&&!Ze?ce(M({},Ee),{pageContextDivider:void 0}):Ee;let Kt=Se;if(Kt===void 0){let Ht=null;d&&(Ht=ft.pageContextSnapshot===void 0?bs():ft.pageContextSnapshot),Kt=(Pt=CI(Ht))!=null?Pt:null}const at={};if(Object.assign(at,{text:Z,displayContent:ye,options:ft,sessionContext:Kt,file:de,resolve:$e,timeoutId:setTimeout(()=>{var Ht;(Ht=fe.current)==null||Ht.failure("send_timeout"),A({type:"SET_LOADING",isLoading:!1}),Gt(at,{outcome:"timeout"})},aI)}),Je.current.push(at),A({type:"CLEAR_SEND_ERROR"}),!ft.silent){if(!Le){const Ht=crypto.randomUUID();A({type:"ADD_MESSAGE",message:{id:Ht,role:"user",content:ye!=null?ye:Z,timestamp:new Date().toISOString(),pageContextDivider:ft.pageContextDivider}}),Ze&&dt&&(he.current=dt.context),de&&de.type.startsWith("image/")&&qf(de,{maxDimension:PI,quality:RI}).then(P1).then(oi=>A({type:"UPDATE_MESSAGE",id:Ht,patch:{attachmentImageUrl:oi}})).catch(()=>{})}A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_PROGRESS_MESSAGE",message:""})}Fu(()=>Mu(at,Ht=>({text:Z,displayContent:ye,options:ft,sessionContext:at.sessionContext,file:de,message:Ht})))}),[Mu,Fu,d,Gt]);sr.current=yr;const Wi=k.useCallback((Z,ye)=>{var dt;if(!Z.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const Ee=Qe(ye),Se=ce(M({},Ee),{displayContent:(dt=Ee.displayContent)!=null?dt:Z});if(!U||!xp(V.current.messages)){const Ze=Xt(Z,Se);return lt.current||en().catch(()=>{}),U?Ze:Promise.resolve({outcome:"success"})}const de=At.current,Le=()=>{const Ze=()=>de!==At.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):yr(Z,Se.displayContent,Se);return lt.current?Ze():en().then(Ze,ft=>({outcome:"failure",message:Wr(ft)}))},$e=et.current?et.current.then(Le):Le(),bt=$e.then(()=>{});return et.current=bt,bt.finally(()=>{et.current===bt&&(et.current=null)}),$e},[yr,en,U,Xt,Qe]);Ko.current=Wi;const aa=k.useCallback(Z=>{if(!ge.current)return Promise.resolve({outcome:"failure",message:"Messaging is unavailable"});const{text:Ee,file:Se,displayContent:de}=Z;if(!Se)return Ee.trim()?Wi(Ee):Promise.resolve({outcome:"failure",message:"Message is empty"});const Le=Ee.trim(),$e=(de!=null?de:Ee).trim()||Se.name,bt={displayContent:$e};if(!U||!xp(V.current.messages)){const at=Xt(Le,bt,Se);return lt.current||en().catch(()=>{}),U?at:Promise.resolve({outcome:"success"})}const dt=At.current,Ze=()=>{const at=()=>dt!==At.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):yr(Le,$e,bt,null,Se);return lt.current?at():en().then(at,Pt=>({outcome:"failure",message:Wr(Pt)}))},ft=et.current?et.current.then(Ze):Ze(),Kt=ft.then(()=>{});return et.current=Kt,Kt.finally(()=>{et.current===Kt&&(et.current=null)}),ft},[yr,Wi,en,U,Xt]),Bu=k.useCallback(Z=>{if(!ge.current)return;const ye=At.current,{prompt:Ee,display:Se}=lI(Z);en().then(()=>{if(ye===At.current)return yr(Ee,Se)}).catch(()=>{})},[yr,en]),Yi=k.useCallback(()=>{const Z=ge.current,ye=V.current.sendError;if(!Z||!ye)return;const Ee=()=>Ot.current?Promise.resolve({outcome:"failure",message:ye.message}):yr(ye.text,ye.displayContent,ye.options,ye.sessionContext,ye.file,!0),Se=et.current?et.current.then(Ee):Ee(),de=Se.then(()=>{});return et.current=de,de.finally(()=>{et.current===de&&(et.current=null)}),Se},[yr]),ua=k.useCallback(()=>{const Z=ge.current;Z&&(Oe.current||(ct.current=!1,lt.current=!1,me(!1),Z.disconnect(),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),en().catch(()=>{})))},[en]),xi=k.useCallback(Z=>{const ye=ge.current;if(!ye)return Promise.resolve();if(Je.current=[],he.current=null,q(Z),!lt.current)return jt.current+=1,At.current+=1,ye.disconnect(),P.clearPersistedConversation("reset"),A({type:"RESET"}),Promise.resolve();const Ee=++At.current;return ct.current=!1,ee(!1),P.clearPersistedConversation("reset"),A({type:"RESET"}),A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.endConversation().then(()=>Ee!==At.current||ge.current!==ye?null:(ye.disconnect(),ye.connect().then(()=>ye))).then(Se=>Ie(null,null,function*(){if(!Se||Ee!==At.current||(yield P.persistContinuationToken(Se,()=>Ee===At.current&&ge.current===Se),Ee!==At.current||ge.current!==Se))return null;const de=yield Qc({routingAttributes:r});return de===Ya?null:ye.createConversation(de)})).then(Se=>{var de;!Se||Ee!==At.current||ge.current!==ye||(A({type:"SET_CONVERSATION_ID",id:Se}),A({type:"SET_CONNECTION_STATUS",status:"connected"}),P.persistConversationId(Se,"created"),(de=fe.current)==null||de.conversationStarted("reset"))}).catch(Se=>{var de,Le;Ee!==At.current||ge.current!==ye||((de=fe.current)==null||de.failure("conversation_create_failed",Ss(Se)),A({type:"SET_ERROR",error:Wr(Se)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=pe.current)==null||Le.call(pe,Se.message))})},[r,P,q]),Uu=k.useCallback(()=>xi("reset"),[xi]);TI(Uu),dI({connectionStatus:B.connectionStatus,loading:B.loading,hasMessages:B.messages.length>0,sessionExpired:B.sessionExpired,bootstrapSettled:G,resumeUsedLastEventId:H,recoverySteps:[fd,()=>xi("resume_timeout")],onExhausted:()=>{var ye,Ee;(ye=fe.current)==null||ye.failure("resume_timeout");const Z=Wr({type:"network"});A({type:"SET_ERROR",error:Z}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Ee=pe.current)==null||Ee.call(pe,Z)},logger:S,isRecoveryInFlight:()=>rt.current||De.current!==null});const Gi=k.useCallback(()=>Ie(null,null,function*(){var Se;const Z=ge.current;if(!Z||!V.current.conversationId)return;const ye=yield Z.retrieveConversationTranscript(),Ee=URL.createObjectURL(ye);try{const de=document.createElement("a");de.href=Ee,de.download=`transcript-${(Se=Z.conversationId)!=null?Se:"conversation"}.pdf`,document.body.appendChild(de),de.click(),de.remove()}finally{URL.revokeObjectURL(Ee)}}),[]),Xi=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)return Promise.resolve();if(Je.current=[],he.current=null,q("ended"),!lt.current)return jt.current+=1,At.current+=1,Z.disconnect(),P.clearPersistedConversation("ended"),A({type:"RESET"}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const ye=++At.current;if(ct.current=!1,ee(!1),ze.current)try{yield Promise.race([ze.current(V.current.conversationId),new Promise(Se=>setTimeout(Se,NI))])}catch(Se){S==null||S.error("onEndConversation callback failed",Se)}P.clearPersistedConversation("ended"),A({type:"RESET"}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"});const Ee={id:crypto.randomUUID(),role:"system",content:wp,timestamp:new Date().toISOString()};return A({type:"ADD_MESSAGE",message:Ee}),lt.current=!1,me(!1),Z.endConversation().then(()=>{ye!==At.current||ge.current!==Z||Z.disconnect()}).catch(Se=>{var de,Le;ye!==At.current||ge.current!==Z||((de=fe.current)==null||de.failure("end_conversation_failed",Ss(Se)),A({type:"SET_ERROR",error:Wr(Se)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=pe.current)==null||Le.call(pe,Se.message))})}),[S,P,ee,q]);_I(Xi);const Ti=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)throw new Error("getAuthLinkKey called before the messaging client connected");return S==null||S.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),Z.getAuthLinkKey()}),[S]);k.useEffect(()=>{const Z={getAuthLinkKey:Ti,sendMessage:(ye,Ee)=>Ko.current(ye,Ee)};return vI(Z),()=>SI(Z)},[Ti]);const Ki=B.connectionStatus==="connected"&&B.conversationId!==null;k.useEffect(()=>{g1(Ki)},[Ki]),k.useEffect(()=>()=>g1(!1),[]);const eg=k.useMemo(()=>({connectionStatus:B.connectionStatus,isConnected:Ki,isAgentTyping:B.isAgentTyping,conversationId:B.conversationId,messages:B.messages,streamingBlocks:B.streamingBlocks,progressMessage:B.progressMessage,progressSteps:B.progressSteps,error:B.error,sendError:B.sendError,canInitialize:!Q&&B.error===null,loading:B.loading,sessionExpired:B.sessionExpired,sendMessage:Wi,sendFile:aa,addToCart:Bu,resetConversation:Uu,endConversation:Xi,retryLastMessage:Yi,retryConnection:ua,downloadTranscript:Gi,getAuthLinkKey:Ti}),[B,Ki,Q,Wi,aa,Bu,Uu,Xi,Yi,ua,Gi,Ti]);return w.jsx(Mc.Provider,{value:fe.current,children:w.jsx(jy.Provider,{value:eg,children:v})})};var cE=Symbol.for("immer-nothing"),lE=Symbol.for("immer-draftable"),nr=Symbol.for("immer-state");function Ar(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ks=Object.getPrototypeOf;function Cs(e){return!!e&&!!e[nr]}function ko(e){var t;return e?dE(e)||Array.isArray(e)||!!e[lE]||!!((t=e.constructor)!=null&&t[lE])||Xa(e)||el(e):!1}var DI=Object.prototype.constructor.toString();function dE(e){if(!e||typeof e!="object")return!1;const t=ks(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===DI}function Jc(e,t){Zc(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zc(e){const t=e[nr];return t?t.type_:Array.isArray(e)?1:Xa(e)?2:el(e)?3:0}function Sp(e,t){return Zc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fE(e,t,n){const r=Zc(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function MI(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xa(e){return e instanceof Map}function el(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function Ap(e,t){if(Xa(e))return new Map(e);if(el(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=dE(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[nr];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const u=i[s],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(ks(e),r)}else{const r=ks(e);if(r!==null&&n)return M({},e);const i=Object.create(r);return Object.assign(i,e)}}function kp(e,t=!1){return nl(e)||Cs(e)||!ko(e)||(Zc(e)>1&&Object.defineProperties(e,{set:{value:tl},add:{value:tl},clear:{value:tl},delete:{value:tl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>kp(n,!0))),e}function tl(){Ar(2)}function nl(e){return Object.isFrozen(e)}var FI={};function No(e){const t=FI[e];return t||Ar(0,e),t}var Ka;function pE(){return Ka}function BI(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hE(e,t){t&&(No("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cp(e){Np(e),e.drafts_.forEach(UI),e.drafts_=null}function Np(e){e===Ka&&(Ka=e.parent_)}function mE(e){return Ka=BI(Ka,e)}function UI(e){const t=e[nr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[nr].modified_&&(Cp(t),Ar(4)),ko(e)&&(e=rl(t,e),t.parent_||il(t,e)),t.patches_&&No("Patches").generateReplacementPatches_(n[nr].base_,e,t.patches_,t.inversePatches_)):e=rl(t,n,[]),Cp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cE?e:void 0}function rl(e,t,n){if(nl(t))return t;const r=t[nr];if(!r)return Jc(t,(i,s)=>yE(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return il(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,u=!1;r.type_===3&&(s=new Set(i),i.clear(),u=!0),Jc(s,(c,d)=>yE(e,r,i,c,d,n,u)),il(e,i,!1),n&&e.patches_&&No("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yE(e,t,n,r,i,s,u){if(Cs(i)){const c=s&&t&&t.type_!==3&&!Sp(t.assigned_,r)?s.concat(r):void 0,d=rl(e,i,c);if(fE(n,r,d),Cs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(i);if(ko(i)&&!nl(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rl(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Xa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&il(e,i)}}function il(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kp(t,n)}function jI(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:pE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=Ip;n&&(i=[r],s=Qa);const{revoke:u,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=u,c}var Ip={get(e,t){if(t===nr)return e;const n=Co(e);if(!Sp(n,t))return HI(e,n,t);const r=n[t];return e.finalized_||!ko(r)?r:r===Op(e.base_,t)?(Rp(e),e.copy_[t]=Lp(r,e)):r},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,n){const r=EE(Co(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Op(Co(e),t),s=i==null?void 0:i[nr];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(MI(n,i)&&(n!==void 0||Sp(e.base_,t)))return!0;Rp(e),Pp(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 Op(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Rp(e),Pp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Co(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ar(11)},getPrototypeOf(e){return ks(e.base_)},setPrototypeOf(){Ar(12)}},Qa={};Jc(Ip,(e,t)=>{Qa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qa.deleteProperty=function(e,t){return Qa.set.call(this,e,t,void 0)},Qa.set=function(e,t,n){return Ip.set.call(this,e[0],t,n,e[0])};function Op(e,t){const n=e[nr];return(n?Co(n):e)[t]}function HI(e,t,n){var i;const r=EE(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function EE(e,t){if(!(t in e))return;let n=ks(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ks(n)}}function Pp(e){e.modified_||(e.modified_=!0,e.parent_&&Pp(e.parent_))}function Rp(e){e.copy_||(e.copy_=Ap(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $I=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const u=this;return function(d=s,...f){return u.produce(d,h=>n.call(this,h,...f))}}typeof n!="function"&&Ar(6),r!==void 0&&typeof r!="function"&&Ar(7);let i;if(ko(t)){const s=mE(this),u=Lp(t,void 0);let c=!0;try{i=n(u),c=!1}finally{c?Cp(s):Np(s)}return hE(s,r),gE(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===cE&&(i=void 0),this.autoFreeze_&&kp(i,!0),r){const s=[],u=[];No("Patches").generateReplacementPatches_(t,i,s,u),r(s,u)}return i}else Ar(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,i;return[this.produce(t,n,(u,c)=>{r=u,i=c}),r,i]},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){ko(e)||Ar(8),Cs(e)&&(e=zI(e));const t=mE(this),n=Lp(e,void 0);return n[nr].isManual_=!0,Np(t),n}finishDraft(e,t){const n=e&&e[nr];(!n||!n.isManual_)&&Ar(9);const{scope_:r}=n;return hE(r,t),gE(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 i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=No("Patches").applyPatches_;return Cs(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Lp(e,t){const n=Xa(e)?No("MapSet").proxyMap_(e,t):el(e)?No("MapSet").proxySet_(e,t):jI(e,t);return(t?t.scope_:pE()).drafts_.push(n),n}function zI(e){return Cs(e)||Ar(10,e),bE(e)}function bE(e){if(!ko(e)||nl(e))return e;const t=e[nr];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ap(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ap(e,!0);return Jc(n,(r,i)=>{fE(n,r,bE(i))}),t&&(t.finalized_=!1),n}var VI=new $I,qI=VI.produce;function WI(e,t,n){var r=k.useMemo(function(){return qI(e)},[e]);return k.useReducer(r,t,n)}const YI=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),wE=k.createContext(null),xE=k.createContext(null),GI=({children:e,dispatch:t})=>{const n=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_INITIALIZED,payload:T})},[t]),r=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_OPEN,payload:T})},[t]),i=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_INLINE,payload:T})},[t]),s=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:T})},[t]),u=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:T})},[t]),c=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:T})},[t]),d=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:T})},[t]),f=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_PARAMS,payload:T})},[t]),h=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:T})},[t]),m=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:T})},[t]),E=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:T})},[t]),b=k.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:i,setElementId:s,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:h,setResponseMessage:m,setIsResponseLoading:E}),[n,r,i,s,u,c,d,f,h,m,E]);return w.jsx(xE.Provider,{value:b,children:e})},XI=(e,t)=>{const{type:n,payload:r}=t;switch(n){case It.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case It.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case It.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case It.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case It.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case It.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case It.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case It.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case It.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case It.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case It.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case It.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case It.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case It.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case It.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},KI=({promptsConfig:e,children:t})=>{const[n,r]=WI(XI,ce(M(M({},R1),e||{}),{staticQuestions:YI((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(wE.Provider,{value:n,children:w.jsx(GI,{dispatch:r,children:t})})},QI={productId:Zn.productId,pdpLink:Zn.pdpLink},TE=k.createContext(QI),JI=({children:e})=>{const[t,n]=k.useState(Zn.productId),[r,i]=k.useState(Zn.pdpLink);k.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),i(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&i(c.value)};return r1(u),()=>{i1(u)}},[]);const s=k.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(TE.Provider,{value:s,children:e})},_E=({mode:e,layoutPreset:t,apiKey:n,apiToken:r,baseUrl:i,logoUrl:s,headerText:u,headerConfig:c,theme:d,openLinksInNewTab:f,onNavigate:h,globalClassName:m,isDevelopment:E=!1,componentType:b,componentConfig:T,initialEntry:_,entryMessage:I,disclaimerText:v,disclaimerMarkdown:S,clientContext:R,searchPlaceholder:U,searchButtonLabel:B,searchConfig:A,suggestionButtonConfig:G,messageAlignment:W,autoScroll:re,promptsConfig:H,showProductDescription:ee,resetConversationMessage:Q,conversationHistory:me,messagingConfig:V,overrides:ue,overridesUrl:fe,inlineOverrides:ae,__features:J,children:se})=>{var Re,pe,Ne,ve;const O=E||pk(),j=k.useRef({}),q=k.useRef(!1);q.current||(q.current=!0,j.current=dk({enablePageContext:!!(V!=null&&V.enablePageContext),initialPageContext:V==null?void 0:V.initialPageContext,initialEntry:_,isDevelopment:O}));const P=(Re=c==null?void 0:c.actions)==null?void 0:Re.minimize,ge=k.useMemo(()=>P===void 0?T:ce(M({},T),{enableMinimize:jf(P,!!(T!=null&&T.enableMinimize))}),[T,P]);return w.jsx(hN,{mode:e,layoutPreset:t,baseUrl:i,apiKey:n,apiToken:r,logoUrl:s,headerText:u,headerConfig:c,entryMessage:I,theme:d,globalClassName:m,openLinksInNewTab:f,onNavigate:h,searchPlaceholder:U,searchButtonLabel:B,searchConfig:A,suggestionButtonConfig:G,messageAlignment:W,autoScroll:re,showProductDescription:ee,componentConfig:ge,clientContext:R,disclaimerMarkdown:S,disclaimerText:v,resetConversationMessage:Q,conversationHistory:me,isDevelopment:O,__features:J,progressStepsLimit:V==null?void 0:V.progressStepsLimit,routingAttributes:V==null?void 0:V.routingAttributes,enableDownloadTranscript:jf((pe=c==null?void 0:c.actions)==null?void 0:pe.downloadTranscript,(Ne=V==null?void 0:V.enableDownloadTranscript)!=null?Ne:!0),enablePageContext:V==null?void 0:V.enablePageContext,enableEscalationToAgent:V==null?void 0:V.enableEscalationToAgent,enableImageUpload:V==null?void 0:V.enableImageUpload,showProductCaptions:V==null?void 0:V.showProductCaptions,connectingMessages:V==null?void 0:V.connectingMessages,children:w.jsx(Xk,{entryType:(ve=j.current.entryType)!=null?ve:_==null?void 0:_.type,componentConfig:T,componentType:b,children:w.jsx(JI,{children:w.jsx(KI,{promptsConfig:H,children:w.jsx(Ek,{overridesUrl:fe,inlineOverrides:ae||ue,children:w.jsx(uE,{scrt2Url:(V==null?void 0:V.scrt2Url)||"",orgId:(V==null?void 0:V.orgId)||"",esDeveloperName:(V==null?void 0:V.esDeveloperName)||"",routingAttributes:(V==null?void 0:V.routingAttributes)||{},conversationId:V==null?void 0:V.conversationId,continuationToken:V==null?void 0:V.continuationToken,lastEventId:V==null?void 0:V.lastEventId,capabilitiesVersion:V==null?void 0:V.capabilitiesVersion,enablePageContext:V==null?void 0:V.enablePageContext,enableLogging:O,onProductResult:V==null?void 0:V.onProductResult,onEndConversation:V==null?void 0:V.onEndConversation,onSessionUpdate:V==null?void 0:V.onSessionUpdate,children:se})})})})})})};var Dp={exports:{}},Hn={},Mp={exports:{}},Fp={};var vE;function ZI(){return vE||(vE=1,(function(e){function t(J,se){var O=J.length;J.push(se);e:for(;0<O;){var j=O-1>>>1,q=J[j];if(0<i(q,se))J[j]=se,J[O]=q,O=j;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var se=J[0],O=J.pop();if(O!==se){J[0]=O;e:for(var j=0,q=J.length,P=q>>>1;j<P;){var ge=2*(j+1)-1,Re=J[ge],pe=ge+1,Ne=J[pe];if(0>i(Re,O))pe<q&&0>i(Ne,Re)?(J[j]=Ne,J[pe]=O,j=pe):(J[j]=Re,J[ge]=O,j=ge);else if(pe<q&&0>i(Ne,O))J[j]=Ne,J[pe]=O,j=pe;else break e}}return se}function i(J,se){var O=J.sortIndex-se.sortIndex;return O!==0?O:J.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],h=1,m=null,E=3,b=!1,T=!1,_=!1,I=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(J){for(var se=n(f);se!==null;){if(se.callback===null)r(f);else if(se.startTime<=J)r(f),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(f)}}function U(J){if(_=!1,R(J),!T)if(n(d)!==null)T=!0,fe(B);else{var se=n(f);se!==null&&ae(U,se.startTime-J)}}function B(J,se){T=!1,_&&(_=!1,v(W),W=-1),b=!0;var O=E;try{for(R(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!ee());){var j=m.callback;if(typeof j=="function"){m.callback=null,E=m.priorityLevel;var q=j(m.expirationTime<=se);se=e.unstable_now(),typeof q=="function"?m.callback=q:m===n(d)&&r(d),R(se)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var ge=n(f);ge!==null&&ae(U,ge.startTime-se),P=!1}return P}finally{m=null,E=O,b=!1}}var A=!1,G=null,W=-1,re=5,H=-1;function ee(){return!(e.unstable_now()-H<re)}function Q(){if(G!==null){var J=e.unstable_now();H=J;var se=!0;try{se=G(!0,J)}finally{se?me():(A=!1,G=null)}}else A=!1}var me;if(typeof S=="function")me=function(){S(Q)};else if(typeof MessageChannel!="undefined"){var V=new MessageChannel,ue=V.port2;V.port1.onmessage=Q,me=function(){ue.postMessage(null)}}else me=function(){I(Q,0)};function fe(J){G=J,A||(A=!0,me())}function ae(J,se){W=I(function(){J(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){T||b||(T=!0,fe(B))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(E){case 1:case 2:case 3:var se=3;break;default:se=E}var O=E;E=se;try{return J()}finally{E=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,se){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var O=E;E=J;try{return se()}finally{E=O}},e.unstable_scheduleCallback=function(J,se,O){var j=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?j+O:j):O=j,J){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=O+q,J={id:h++,callback:se,priorityLevel:J,startTime:O,expirationTime:q,sortIndex:-1},O>j?(J.sortIndex=O,t(f,J),n(d)===null&&J===n(f)&&(_?(v(W),W=-1):_=!0,ae(U,O-j))):(J.sortIndex=q,t(d,J),T||b||(T=!0,fe(B))),J},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(J){var se=E;return function(){var O=E;E=se;try{return J.apply(this,arguments)}finally{E=O}}}})(Fp)),Fp}var SE;function eO(){return SE||(SE=1,Mp.exports=ZI()),Mp.exports}var AE;function tO(){if(AE)return Hn;AE=1;var e=vr(),t=eO();function n(o){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+o,l=1;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(o,a){u(o,a),u(o+"Capture",a)}function u(o,a){for(i[o]=a,o=0;o<a.length;o++)r.add(a[o])}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]*$/,h={},m={};function E(o){return d.call(m,o)?!0:d.call(h,o)?!1:f.test(o)?m[o]=!0:(h[o]=!0,!1)}function b(o,a,l,p){if(l!==null&&l.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:l!==null?!l.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function T(o,a,l,p){if(a===null||typeof a=="undefined"||b(o,a,l,p))return!0;if(p)return!1;if(l!==null)switch(l.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function _(o,a,l,p,y,x,C){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=l,this.propertyName=o,this.type=a,this.sanitizeURL=x,this.removeEmptyString=C}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){I[o]=new _(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var a=o[0];I[a]=new _(a,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){I[o]=new _(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){I[o]=new _(o,2,!1,o,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(o){I[o]=new _(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){I[o]=new _(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){I[o]=new _(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){I[o]=new _(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){I[o]=new _(o,5,!1,o.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function S(o){return o[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(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){I[o]=new _(o,1,!1,o.toLowerCase(),null,!1,!1)}),I.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){I[o]=new _(o,1,!1,o.toLowerCase(),null,!0,!0)});function R(o,a,l,p){var y=I.hasOwnProperty(a)?I[a]:null;(y!==null?y.type!==0:p||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(T(a,l,y,p)&&(l=null),p||y===null?E(a)&&(l===null?o.removeAttribute(a):o.setAttribute(a,""+l)):y.mustUseProperty?o[y.propertyName]=l===null?y.type===3?!1:"":l:(a=y.attributeName,p=y.attributeNamespace,l===null?o.removeAttribute(a):(y=y.type,l=y===3||y===4&&l===!0?"":""+l,p?o.setAttributeNS(p,a,l):o.setAttribute(a,l))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),A=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ee=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),J=Symbol.iterator;function se(o){return o===null||typeof o!="object"?null:(o=J&&o[J]||o["@@iterator"],typeof o=="function"?o:null)}var O=Object.assign,j;function q(o){if(j===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);j=a&&a[1]||""}return`
16
+ `+u)}}catch(i){}throw r}})}_request(t,n){typeof t=="string"?(n=n||{},n.url=t):n=t||{},n=vo(this.defaults,n);const{transitional:r,paramsSerializer:i,headers:s}=n;r!==void 0&&Wc.assertOptions(r,{silentJSONParsing:Sn.transitional(Sn.boolean),forcedJSONParsing:Sn.transitional(Sn.boolean),clarifyTimeoutError:Sn.transitional(Sn.boolean),legacyInterceptorReqResOrdering:Sn.transitional(Sn.boolean),advertiseZstdAcceptEncoding:Sn.transitional(Sn.boolean),validateStatusUndefinedResolves:Sn.transitional(Sn.boolean)},!1),i!=null&&(X.isFunction(i)?n.paramsSerializer={serialize:i}:Wc.assertOptions(i,{encode:Sn.function,serialize:Sn.function},!0)),n.allowAbsoluteUrls!==void 0||(this.defaults.allowAbsoluteUrls!==void 0?n.allowAbsoluteUrls=this.defaults.allowAbsoluteUrls:n.allowAbsoluteUrls=!0),Wc.assertOptions(n,{baseUrl:Sn.spelling("baseURL"),withXsrfToken:Sn.spelling("withXSRFToken")},!0),n.method=(X.getSafeProp(n,"method")||X.getSafeProp(this.defaults,"method")||"get").toLowerCase();let u=s&&X.merge(s.common,s[n.method]);s&&X.forEach(ay.concat("common"),T=>{delete s[T]}),n.headers=vn.concat(u,s);const c=[];let d=!0;this.interceptors.request.forEach(function(_){if(typeof _.runWhen=="function"&&_.runWhen(n)===!1)return;d=d&&_.synchronous;const I=n.transitional||ep;I&&I.legacyInterceptorReqResOrdering?c.unshift(_.fulfilled,_.rejected):c.push(_.fulfilled,_.rejected)});const f=[];this.interceptors.response.forEach(function(_){f.push(_.fulfilled,_.rejected)});let h,m=0,E;if(!d){const T=[up.bind(this),void 0];for(T.unshift(...c),T.push(...f),E=T.length,h=Promise.resolve(n);m<E;)h=h.then(T[m++],T[m++]);return h}E=c.length;let b=n;for(;m<E;){const T=c[m++],_=c[m++];try{b=T?T(b):b}catch(I){if(!_){h=Promise.reject(I);break}try{const v=_.call(this,I);X.isThenable(v)&&(h=Promise.resolve(v).then(()=>up.call(this,b)))}catch(v){h=Promise.reject(v)}break}}if(!h)try{h=up.call(this,b)}catch(T){h=Promise.reject(T)}for(m=0,E=f.length;m<E;)h=h.then(f[m++],f[m++]);return h}getUri(t){t=vo(this.defaults,t);const n=hy(t.baseURL,t.url,t.allowAbsoluteUrls,t);return ey(n,t.params,t.paramsSerializer)}};X.forEach(["delete","get","head","options"],function(t){So.prototype[t]=function(n,r){return this.request(vo(r||{},{method:t,url:n,data:r&&X.hasOwnProp(r,"data")?r.data:void 0}))}}),X.forEach(["post","put","patch","query"],function(t){function n(r){return function(s,u,c){return this.request(vo(c||{},{method:t,headers:r?{"Content-Type":"multipart/form-data"}:{},url:s,data:u}))}}So.prototype[t]=n(),t!=="query"&&(So.prototype[t+"Form"]=n(!0))});let uN=class ZS{constructor(t){if(typeof t!="function")throw new TypeError("executor must be a function.");let n;this.promise=new Promise(function(s){n=s});const r=this;this.promise.then(i=>{if(!r._listeners)return;let s=r._listeners.length;for(;s-- >0;)r._listeners[s](i);r._listeners=null}),this.promise.then=i=>{let s;const u=new Promise(c=>{r.subscribe(c),s=c}).then(i);return u.cancel=function(){r.unsubscribe(s)},u},t(function(s,u,c){r.reason||(r.reason=new za(s,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 ZS(function(i){t=i}),cancel:t}}};function cN(e){return function(n){return e.apply(null,n)}}function lN(e){return X.isObject(e)&&e.isAxiosError===!0}const Yc={Continue:100,SwitchingProtocols:101,Processing:102,EarlyHints:103,Ok:200,Created:201,Accepted:202,NonAuthoritativeInformation:203,NoContent:204,ResetContent:205,PartialContent:206,MultiStatus:207,AlreadyReported:208,ImUsed:226,MultipleChoices:300,MovedPermanently:301,Found:302,SeeOther:303,NotModified:304,UseProxy:305,Unused:306,TemporaryRedirect:307,PermanentRedirect:308,BadRequest:400,Unauthorized:401,PaymentRequired:402,Forbidden:403,NotFound:404,MethodNotAllowed:405,NotAcceptable:406,ProxyAuthenticationRequired:407,RequestTimeout:408,Conflict:409,Gone:410,LengthRequired:411,PreconditionFailed:412,PayloadTooLarge:413,ContentTooLarge:413,UriTooLong:414,UnsupportedMediaType:415,RangeNotSatisfiable:416,ExpectationFailed:417,ImATeapot:418,MisdirectedRequest:421,UnprocessableEntity:422,UnprocessableContent:422,Locked:423,FailedDependency:424,TooEarly:425,UpgradeRequired:426,PreconditionRequired:428,TooManyRequests:429,RequestHeaderFieldsTooLarge:431,UnavailableForLegalReasons:451,InternalServerError:500,NotImplemented:501,BadGateway:502,ServiceUnavailable:503,GatewayTimeout:504,HttpVersionNotSupported:505,VariantAlsoNegotiates:506,InsufficientStorage:507,LoopDetected:508,NotExtended:510,NetworkAuthenticationRequired:511,WebServerReturnsAnUnknownError:520,WebServerIsDown:521,ConnectionTimedOut:522,OriginIsUnreachable:523,TimeoutOccurred:524,SslHandshakeFailed:525,InvalidSslCertificate:526};Object.entries(Yc).forEach(([e,t])=>{Yc[t]===void 0&&(Yc[t]=e)});function Cy(e){const t=new So(e),n=L1(So.prototype.request,t);return X.extend(n,So.prototype,t,{allOwnKeys:!0}),X.extend(n,t,null,{allOwnKeys:!0}),n.create=function(i){return Cy(vo(e,i))},n}const Jt=Cy($a);Jt.Axios=So,Jt.CanceledError=za,Jt.CancelToken=uN,Jt.isCancel=uy,Jt.VERSION=op,Jt.toFormData=$c,Jt.AxiosError=Pe,Jt.Cancel=Jt.CanceledError,Jt.all=function(t){return Promise.all(t)},Jt.spread=cN,Jt.isAxiosError=lN,Jt.mergeConfig=vo,Jt.AxiosHeaders=vn,Jt.formToJSON=e=>sy(X.isHTMLForm(e)?new FormData(e):e),Jt.getAdapter=Ay.getAdapter,Jt.HttpStatusCode=Yc,Jt.default=Jt;const{Axios:Qz,AxiosError:Jz,CanceledError:Zz,isCancel:eV,CancelToken:tV,VERSION:nV,all:rV,Cancel:iV,isAxiosError:oV,spread:sV,toFormData:aV,AxiosHeaders:uV,HttpStatusCode:cV,formToJSON:lV,getAdapter:dV,mergeConfig:fV,create:pV}=Jt;class dN{constructor(t,n,r,i=!1,s,u){We(this,"CIMULATE_API_HEADER","x-cimulate-api-key");We(this,"CIMULATE_SEARCH_API_HOST","search.cimulate");We(this,"CIMULATE_SEARCH_API_PATH","api/v1");We(this,"baseApiUrl");We(this,"headers",{});We(this,"fetchConfig",()=>Ie(this,null,function*(){try{const t=yield Jt.get(`${this.apiUrl}/configs/copilot`,{headers:this.headers}),{customer_config:n}=t.data,r=atob(n);return JSON.parse(r)}catch(t){throw console.error("Error fetching customer config:",t),t}}));We(this,"_mapCopilotUrlToSearchUrl",(t="",n=!1)=>{if(t.endsWith("io")){const i=new URL(t);return i.hostname=i.hostname.replace(/^copilot\./,"api."),i.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}`),s&&(this.headers["x-cimulate-customer-id"]=s),u&&(this.headers["Tenant-ID"]=u),this.baseApiUrl=this._mapCopilotUrlToSearchUrl(t,i)}get apiUrl(){return`${this.baseApiUrl}/${this.CIMULATE_SEARCH_API_PATH}`}}class fN{constructor(t,n,r,i=!1,s,u){We(this,"apiService");We(this,"config",null);We(this,"getConfig",()=>Ie(this,null,function*(){if(this.config)return this.config;try{const t=yield this.apiService.fetchConfig();return this.config=t,this.config}catch(t){throw console.error("Failed to fetch customer config:",t),t}}));We(this,"getPid",t=>this.getProductFieldValue(t,"pidCol"));We(this,"getName",t=>this.getProductFieldValue(t,"nameCol"));We(this,"getDescription",t=>this.getProductFieldValue(t,"description"));We(this,"getBrand",t=>this.getProductFieldValue(t,"productBrandCol"));We(this,"getPrice",t=>this.getProductFieldValue(t,"priceCol"));We(this,"getRelativePdp",t=>this.getProductFieldValue(t,"relativePdpCol"));We(this,"getPdp",t=>this.getProductFieldValue(t,"pdpCol"));We(this,"getImage",t=>this.getProductFieldValue(t,"imageCol"));We(this,"getProductHiddenFields",()=>{const t=this.getProductField("productHiddenFields");return Array.isArray(t)?t:[]});We(this,"getProductField",t=>this.config?this.config[t]:"");We(this,"getProductFieldValue",(t,n)=>{const r=this.getProductField(n);return r&&t[r]||""});this.apiService=new dN(t,n,r,i,s,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 pN={copilot:"Your Search Assistant",messaging:"Commerce Client"},Ny=k.createContext(null),hN=({mode:e,layoutPreset:t="standard",logoUrl:n,headerText:r,headerConfig:i,globalClassName:s="",entryMessage:u,openLinksInNewTab:c=!1,onNavigate:d,disclaimerText:f,disclaimerMarkdown:h,clientContext:m,baseCatalogParams:E,searchPlaceholder:b,searchButtonLabel:T,searchConfig:_,suggestionButtonConfig:I,progressStepsLimit:v=3,messageAlignment:S="start",autoScroll:R=!0,showProductDescription:U=!1,componentConfig:B,conversationHistory:A,resetConversationMessage:G="",apiKey:W,apiToken:re,baseUrl:H,customerId:ee,tenantId:Q,theme:me,isDevelopment:V,__features:ue,routingAttributes:fe,enableDownloadTranscript:ae=!0,enablePageContext:J=!1,enableEscalationToAgent:se=!1,enableImageUpload:O=!1,showProductCaptions:j=!1,connectingMessages:q,staticQuestions:P,staticQuestionsStrategy:ge="append",children:Re})=>{const pe=e==="messaging",Ne=k.useMemo(()=>{const tt=fe==null?void 0:fe.isCartMgmtSupported;return tt===!0||tt==="true"},[fe]),ve=k.useMemo(()=>pe?{config:null}:new fN(H,W,re,V,ee,Q),[pe,H,W,re,V,ee,Q]),ze=k.useMemo(()=>new GA(V),[V]);k.useEffect(()=>{pe||!ve||ve.config||ve.getConfig()},[ve,pe]);const rt=k.useMemo(()=>ZA(me,t),[me,t]),Ot=k.useMemo(()=>{const tt=(_==null?void 0:_.placeholder)||b,yt=(_==null?void 0:_.buttonLabel)||T;let De="icon";return _!=null&&_.buttonType?De=_.buttonType:T&&(De="text"),ce(M({},_||{}),{placeholder:tt,buttonLabel:yt,buttonType:De})},[_,b,T]),ct=k.useMemo(()=>ce(M({},i||{}),{logoUrl:n||(i==null?void 0:i.logoUrl),headerText:(i==null?void 0:i.headerText)||r||pN[e!=null?e:"copilot"]}),[i,n,r,e]),_t=k.useMemo(()=>({configModule:ve,mode:e!=null?e:"copilot",layoutPreset:t,headerConfig:ct,entryMessage:u,staticQuestions:P||[],staticQuestionsStrategy:ge,globalClassName:s,openLinksInNewTab:c,onNavigate:d,disclaimerText:f,disclaimerMarkdown:h,clientContext:m,baseCatalogParams:E,themeVariables:rt,logger:ze,searchConfig:Ot,suggestionButtonConfig:I,progressStepsLimit:v,messageAlignment:S,autoScroll:R,showProductDescription:!!U,enableMinimize:!!(B!=null&&B.enableMinimize),launcherAriaLabel:B==null?void 0:B.launcherAriaLabel,enableDownloadTranscript:ae,enablePageContext:J,enableEscalationToAgent:se,enableImageUpload:O,showProductCaptions:!!j,connectingMessages:q,resetConversationMessage:G,conversationHistory:{sinceHours:typeof(A==null?void 0:A.sinceHours)=="number"?A.sinceHours:pe?24:1,limit:A==null?void 0:A.limit},features:ue,isCartMgmtSupported:Ne}),[ve,e,t,ct,u,P,ge,s,m,E,f,h,c,d,Ot,I,S,R,U,B,ae,J,se,O,v,j,q,G,ze,rt,A,ue,Ne,pe]);return w.jsx(Ny.Provider,{value:_t,children:Re})},st=()=>{const e=k.useContext(Ny);if(!e)throw new Error("useConfig must be used within a ConfigProvider");return e},Iy=["markdown","product_carousel","product_tile","product_comparison","suggestions","cart","order_confirmation","tool_results"],Ri=-1;function cp(e){if(!e||typeof e!="object"||Array.isArray(e))return null;const t=e,n=typeof t.text=="string"?t.text:"",r=typeof t.message=="string"?t.message:"";return n||r||null}function Oy(e){if(!e||!e.trim())return null;try{const t=JSON.parse(e);if(t&&typeof t=="object"){if(!Array.isArray(t)&&typeof t.type=="string"&&typeof t.index=="number"&&Iy.includes(t.type))return t;const n=cp(t);return n?{type:"markdown",index:Ri,data:{content:n}}:null}}catch(t){}return{type:"markdown",index:Ri,data:{content:e}}}function Gc(e){let t;try{t=JSON.parse(e)}catch(i){return null}if(!t||typeof t!="object"||Array.isArray(t))return null;const n=t;if(typeof n.type!="string"||!Iy.includes(n.type))return null;const r=typeof n.index=="number"?n.index:0;return ce(M({},n),{type:n.type,index:r})}function Va(e){let t;try{t=JSON.parse(e)}catch(n){return null}return t&&typeof t=="object"&&Array.isArray(t.response)?t:null}function lp(e){var i,s;if(e.type!=="markdown")return[e];const t=(s=(i=e.data)==null?void 0:i.content)!=null?s:"",n=Va(t);if(n)return n.response;const r=Gc(t);return[r&&r.type!=="markdown"?r:e]}function qa(e){const t=Va(e);if(t)return t.response.flatMap(lp);const n=Gc(e);return n?lp(n):[]}function Py(e,t){return qa(e).some(n=>n.type===t)}function mN(e){return qa(e).map(t=>t.type)}function gN(e,t){for(let n=e.length-1;n>=0;n--){const r=e[n];if(r.role==="agent"&&Py(r.content,t))return r.id}}function Ry(e){const t=e.trimStart();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{return JSON.parse(e),!1}catch(n){return!0}}function yN(e){return e.type==="markdown"&&e.index===Ri?!Ry(e.data.content):!0}function EN(e){var i;const t=(i=Va(e))==null?void 0:i.response;if(!t)return null;const n=t.find(s=>s.type==="product_carousel");if(n)return{kind:"search",productIds:n.data.products.map(s=>s.id)};const r=t.find(s=>s.type==="product_tile");return r?{kind:"detail",productIds:[r.data.id]}:null}function bN(e){var s,u,c,d,f;const t=qa(e).find(h=>h.type==="product_tile");if(!t)return null;const n=(u=(s=t.data)==null?void 0:s.id)==null?void 0:u.trim();if(!n)return null;const r=t.data.data,i=(r==null?void 0:r.imageUrl)||((d=(c=r==null?void 0:r.imgGroups)==null?void 0:c.filter(h=>{var m;return((m=h.viewType)==null?void 0:m.toLowerCase())!=="swatch"}).flatMap(h=>{var m;return(m=h.imgs)!=null?m:[]}).find(h=>{var m;return(m=h.url)==null?void 0:m.trim()}))==null?void 0:d.url);return M({type:"pdp",id:n,name:((f=r==null?void 0:r.name)==null?void 0:f.trim())||n},i?{imageUrl:La(r==null?void 0:r.baseUrl,i)}:{})}function Ly(e){var n,r,i,s,u,c,d,f,h,m;const t=qa(e).find(E=>E.type==="cart");return t?{status:(c=(u=(r=(n=t.data)==null?void 0:n.cart)==null?void 0:r.__action_execution_status__)!=null?u:(s=(i=t.data)==null?void 0:i.cart)==null?void 0:s.action_execution_status)!=null?c:null,cartDetails:(m=(h=(f=(d=t.data)==null?void 0:d.cart)==null?void 0:f.cartSummary)==null?void 0:h.cartDetails)!=null?m:null}:null}function wN(e){var i,s,u;const t=qa(e).find(c=>c.type==="cart"),n=(u=(s=(i=t==null?void 0:t.data)==null?void 0:i.cart)==null?void 0:s.cartSummary)==null?void 0:u.cartOperation,r=typeof n=="string"?n.toLowerCase():null;return r==="add"||r==="remove"?r:null}function xN(e,t){if(t.index===Ri){const i=e[e.length-1];if(i&&i.type==="markdown"&&i.index===Ri&&t.type==="markdown"){const s={type:"markdown",index:Ri,data:{content:i.data.content+t.data.content}};return[...e.slice(0,-1),s]}return[...e,t]}const n=e.findIndex(i=>i.index===t.index);return[...n>=0?e.map((i,s)=>s===n?t:i):[...e,t]].sort((i,s)=>i.index-s.index)}function Dy(e,t){return t.serverId!==void 0&&e.some(n=>n.serverId===t.serverId)}const My={connectionStatus:"disconnected",loading:!1,conversationId:null,messagingSessionId:null,messages:[],streamingBlocks:[],isAgentTyping:!1,progressMessage:"",progressSteps:[],routingResult:null,error:null,sendError:null,sessionExpired:!1};function TN(e,t){switch(t.type){case"SET_CONNECTION_STATUS":return M(ce(M({},e),{connectionStatus:t.status}),t.status==="connected"||t.status==="connecting"?{error:null}:{});case"SET_LOADING":return ce(M({},e),{loading:t.isLoading});case"SET_CONVERSATION_ID":return e.conversationId===t.id?e:ce(M({},e),{conversationId:t.id,messagingSessionId:null});case"SET_MESSAGING_SESSION_ID":return e.messagingSessionId===t.id?e:ce(M({},e),{messagingSessionId:t.id});case"ADD_MESSAGE":return Dy(e.messages,t.message)?e:ce(M({},e),{messages:[...e.messages,ce(M({},t.message),{type:"ADD_MESSAGE"})]});case"UPDATE_MESSAGE":return ce(M({},e),{messages:e.messages.map(n=>n.id===t.id?M(M({},n),t.patch):n)});case"APPEND_STREAMING_TOKEN":{const n=Oy(t.token);return n?ce(M({},e),{streamingBlocks:xN(e.streamingBlocks,n)}):e}case"FLUSH_STREAMING":{const n={streamingBlocks:[],isAgentTyping:!1,loading:!1,progressMessage:"",progressSteps:[],sendError:null};if(Dy(e.messages,t.message))return M(M({},e),n);const r=ce(M({},t.message),{type:"FLUSH_STREAMING"}),i=t.replaceMessageId?e.messages.findIndex(s=>s.id===t.replaceMessageId):-1;if(i>=0){const s=[...e.messages];return s[i]=ce(M({},r),{id:e.messages[i].id}),M(ce(M({},e),{messages:s}),n)}return M(ce(M({},e),{messages:[...e.messages,r]}),n)}case"SET_AGENT_TYPING":return ce(M({},e),{isAgentTyping:t.isTyping,loading:t.isTyping});case"SET_PROGRESS_MESSAGE":return M(ce(M({},e),{progressMessage:t.message}),t.message===""?{progressSteps:[]}:{});case"ADD_PROGRESS_STEP":return e.progressSteps[e.progressSteps.length-1]===t.message?e:ce(M({},e),{progressSteps:[...e.progressSteps,t.message],progressMessage:t.message});case"SET_ROUTING_RESULT":return ce(M({},e),{routingResult:t.result});case"SET_ERROR":return ce(M({},e),{error:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"SET_SEND_ERROR":return ce(M({},e),{sendError:t.error,loading:!1,progressMessage:"",progressSteps:[]});case"CLEAR_SEND_ERROR":return ce(M({},e),{sendError:null});case"LOAD_HISTORY":return ce(M({},e),{messages:t.messages.map(n=>ce(M({},n),{restored:!0})),loading:!1});case"SET_SESSION_EXPIRED":return ce(M({},e),{sessionExpired:t.expired});case"RESET":return ce(M({},My),{connectionStatus:e.connectionStatus});default:return e}}const _N=e=>typeof e=="string"?e:e.code,Fy=e=>{var t;return((t=e==null?void 0:e.couponsApplied)!=null?t:[]).map(_N)},By=e=>{var n;const t=new Map;for(const r of(n=e==null?void 0:e.items)!=null?n:[])t.set(r.itemId,r);return t};function vN(e,t){const n=By(e),r=By(t),i=[];for(const[f,h]of r){const m=n.get(f);m?m.quantity!==h.quantity&&i.push({type:"quantity",itemId:f,productId:h.productId,name:h.name,quantityBefore:m.quantity,quantityAfter:h.quantity}):i.push({type:"add",itemId:f,productId:h.productId,name:h.name,quantityBefore:0,quantityAfter:h.quantity})}for(const[f,h]of n)r.has(f)||i.push({type:"remove",itemId:f,productId:h.productId,name:h.name,quantityBefore:h.quantity,quantityAfter:0});const s=Fy(e),u=Fy(t),c=u.filter(f=>!s.includes(f)),d=s.filter(f=>!u.includes(f));if(c.length||d.length){const f={type:"coupon",added:c,removed:d};i.push(f)}return i}function SN(e){if(e.length===0)return"unknown";const t=new Set(e.map(n=>n.type));if(t.size===1){const[n]=[...t];return n}return"mixed"}function Uy(e,t,n=null){if(!e&&t&&n)return{status:"success",action:n,changes:[]};if(!e||!t)return{status:"success",action:"unknown",changes:[]};const r=vN(e,t);return{status:"success",action:SN(r),changes:r}}let dp=null;function AN(){const e=dp;return dp=null,e}function kN(e){!e||typeof e!="object"||!Array.isArray(e.items)||(dp=e,window.dispatchEvent(new CustomEvent(Bf,{detail:e})))}const jy=k.createContext({connectionStatus:"disconnected",isConnected:!1,isAgentTyping:!1,conversationId:null,messages:[],streamingBlocks:[],progressMessage:"",progressSteps:[],loading:!0,error:null,sendError:null,sessionExpired:!1,canInitialize:!0,sendMessage:()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),sendFile:()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}}),addToCart:()=>{},resetConversation:()=>Ie(null,null,function*(){}),endConversation:()=>Ie(null,null,function*(){}),retryLastMessage:()=>{},retryConnection:()=>{},downloadTranscript:()=>Ie(null,null,function*(){}),getAuthLinkKey:()=>Ie(null,null,function*(){throw new Error("getAuthLinkKey called without a MessagingProvider")})}),Hy=4320*60*1e3;function fp(e,t){return`cim_af_conv_${e}_${t}`}function pp(e,t){return Date.now()-e>t}function hp(e,t,n){try{const r=fp(e,t),i=localStorage.getItem(r);if(!i)return null;const s=JSON.parse(i);if(!s||typeof s!="object"||!("conversationId"in s)||!("storedAt"in s))return null;const u=s;return typeof u.conversationId!="string"||!u.conversationId?null:typeof u.storedAt!="number"||pp(u.storedAt,n)?(localStorage.removeItem(r),null):u}catch(r){return null}}function Wa(e,t,n){try{const r=fp(e,t),i={conversationId:n,storedAt:Date.now()};localStorage.setItem(r,JSON.stringify(i))}catch(r){}}function mp(e,t){try{const n=fp(e,t);localStorage.removeItem(n)}catch(n){}}function gp(e,t){return`cim_af_ct_${e}_${t}`}function CN(e){try{const t=e.split(".")[1];if(!t)return null;const n=JSON.parse(NN(t));return typeof n.exp=="number"?n.exp*1e3:null}catch(t){return null}}function $y(e){const t=CN(e);return t===null?"unknown":Date.now()>=t?"expired":"valid"}function NN(e){const t=e.replace(/-/g,"+").replace(/_/g,"/"),n=t.padEnd(t.length+(4-t.length%4)%4,"=");return atob(n)}function yp(e,t){try{const n=gp(e,t),r=localStorage.getItem(n);if(!r)return null;const i=JSON.parse(r);if(!i||typeof i!="object"||!("accessToken"in i)||!("lastEventId"in i)||!("storedAt"in i))return null;const s=i;return typeof s.accessToken!="string"||!s.accessToken||typeof s.lastEventId!="string"||typeof s.storedAt!="number"?null:$y(s.accessToken)==="expired"?(localStorage.removeItem(n),null):s}catch(n){return null}}function zy(e,t,n,r){try{const i=gp(e,t),s={accessToken:n,lastEventId:r,storedAt:Date.now()};localStorage.setItem(i,JSON.stringify(s))}catch(i){}}function IN(e,t){try{const n=gp(e,t);localStorage.removeItem(n)}catch(n){}}function ON(e,t){return`cim_af_conv_${e}_${t}`}function PN(e,t){try{if(typeof BroadcastChannel=="undefined")return null;const n=ON(e,t);return new BroadcastChannel(n)}catch(n){return null}}function RN(e,t=500){return e?new Promise(n=>{let r=!1;const i=setTimeout(()=>{r||(r=!0,e.removeEventListener("message",s),n(null))},t);function s(u){var c;r||((c=u.data)==null?void 0:c.type)==="conversation_response"&&(r=!0,clearTimeout(i),e.removeEventListener("message",s),n({conversationId:u.data.conversationId,storedAt:u.data.storedAt,continuationToken:u.data.continuationToken,lastEventId:u.data.lastEventId}))}e.addEventListener("message",s);try{e.postMessage({type:"request_conversation"})}catch(u){r||(r=!0,clearTimeout(i),e.removeEventListener("message",s),n(null))}}):Promise.resolve(null)}function LN(e,t,n){if(!e)return()=>{};function r(i){var s;if((s=i.data)!=null&&s.type)switch(i.data.type){case"request_conversation":{const u=t();if(u!=null&&u.conversationId)try{e.postMessage({type:"conversation_response",conversationId:u.conversationId,storedAt:Date.now(),continuationToken:u.continuationToken,lastEventId:u.lastEventId})}catch(c){}break}case"conversation_cleared":{n==null||n();break}}}return e.addEventListener("message",r),()=>{e.removeEventListener("message",r)}}function DN(e){if(e)try{e.postMessage({type:"conversation_cleared"})}catch(t){}}function MN(e){if(e)try{e.close()}catch(t){}}function FN(e){switch(e){case"EndUser":case"Customer":return"user";case"Agent":case"Chatbot":return"agent";default:return"system"}}function BN(e){if(!e)return{};if(typeof e=="string")try{return JSON.parse(e)}catch(t){return{}}return e}function Vy(e,...t){let n=e;for(const r of t){if(n==null||typeof n!="object")return"";n=n[r]}return typeof n=="string"?n:""}function UN(e){const t=e.staticContent;if(!t||typeof t!="object")return!1;const n=t.attachments;return Array.isArray(n)&&n.length>0}function jN(e){if(e.entryType!=="Message")return null;const n=BN(e.entryPayload).abstractMessage;if(!n)return null;const r=Vy(n,"staticContent","text")||Vy(n,"content","text")||"";if(!r&&!UN(n))return null;const i=FN(e.sender.role);return{id:e.identifier,serverId:e.identifier,role:i,content:r,timestamp:new Date(e.transcriptedTimestamp).toISOString(),sender:{role:e.sender.role,name:e.senderDisplayName}}}function HN(e){const t=[];for(const n of e){const r=jN(n);r&&t.push(r)}return t}function Ep(e,t,n){return`cim_af_dividers_${e}_${t}_${n}`}function qy(e,t,n){try{const r=Ep(e,t,n),i=localStorage.getItem(r);if(!i)return{};const s=JSON.parse(i);return!s||typeof s.storedAt!="number"||Date.now()-s.storedAt>Hy||!s.byMessageId||typeof s.byMessageId!="object"?(localStorage.removeItem(r),{}):s.byMessageId}catch(r){return{}}}function $N(e,t,n,r,i){if(!(!n||!r))try{const s=Ep(e,t,n),u=qy(e,t,n);localStorage.setItem(s,JSON.stringify({storedAt:Date.now(),byMessageId:ce(M({},u),{[r]:i})}))}catch(s){}}function zN(e,t,n){try{localStorage.removeItem(Ep(e,t,n))}catch(r){return}}const VN="cim_widget_thumbnails",Xc="thumbnails",qN=1,bp="byConversation",Wy="byStoredAt",WN=2e3;function YN(e,t){return`${e}::${t}`}function GN(){return new Promise(e=>{try{if(typeof indexedDB=="undefined"||!indexedDB){e(null);return}let t=!1;const n=s=>{t||(t=!0,e(s))},r=setTimeout(()=>n(null),WN),i=indexedDB.open(VN,qN);i.onupgradeneeded=()=>{const s=i.result;if(!s.objectStoreNames.contains(Xc)){const u=s.createObjectStore(Xc,{keyPath:"key"});u.createIndex(bp,"conversationId",{unique:!1}),u.createIndex(Wy,"storedAt",{unique:!1})}},i.onsuccess=()=>{clearTimeout(r),n(i.result)},i.onerror=()=>{clearTimeout(r),n(null)},i.onblocked=()=>{clearTimeout(r),n(null)}}catch(t){e(null)}})}function Kc(e,t,n){return Ie(this,null,function*(){const r=yield GN();return r?new Promise(i=>{let s=t,u=!1;const c=d=>{u||(u=!0,i(d))};try{const d=r.transaction(Xc,e),f=d.objectStore(Xc);d.oncomplete=()=>{r.close(),c(s)},d.onerror=()=>{r.close(),c(t)},d.onabort=()=>{r.close(),c(t)},n(f,h=>{s=h})}catch(d){try{r.close()}catch(f){}c(t)}}):t})}function XN(e,t,n){return Ie(this,null,function*(){if(!e||!t||!n)return;const r={key:YN(e,t),conversationId:e,messageId:t,dataUrl:n,storedAt:Date.now()};yield Kc("readwrite",void 0,i=>{i.put(r)})})}function KN(e){return Ie(this,null,function*(){return e?Kc("readonly",{},(t,n)=>{const r={},s=t.index(bp).openCursor(IDBKeyRange.only(e));s.onsuccess=()=>{const u=s.result;if(u){const c=u.value;c!=null&&c.messageId&&(c!=null&&c.dataUrl)&&(r[c.messageId]=c.dataUrl),u.continue()}else n(r)}}):{}})}function Yy(e){return Ie(this,null,function*(){e&&(yield Kc("readwrite",void 0,t=>{const r=t.index(bp).openCursor(IDBKeyRange.only(e));r.onsuccess=()=>{const i=r.result;i&&(i.delete(),i.continue())}}))})}function QN(e){return Ie(this,null,function*(){const t=Date.now()-e;yield Kc("readwrite",void 0,n=>{const i=n.index(Wy).openCursor(IDBKeyRange.upperBound(t,!0));i.onsuccess=()=>{const s=i.result;s&&(s.delete(),s.continue())}})})}const JN=5e3,Ya=Symbol("cimulate-abort-conversation");function Qc(e={}){const{routingAttributes:t,timeoutMs:n=JN}=e;if(typeof window=="undefined"||typeof window.dispatchEvent!="function")return Promise.resolve(t);const r=M({},t!=null?t:{});return new Promise(i=>{const s={settled:!1},u=()=>{if(s.settled)return;s.settled=!0,s.timer!==void 0&&clearTimeout(s.timer);const m=Object.keys(r).length>0;i(m?r:t)},d={routingAttributes:t,setHiddenPrechatFields:m=>{s.settled||!m||Object.assign(r,m)},done:u,abort:()=>{s.settled||(s.settled=!0,s.timer!==void 0&&clearTimeout(s.timer),i(Ya))}},f=new CustomEvent(l1,{detail:d,cancelable:!0});if(!!window.dispatchEvent(f)){u();return}s.timer=setTimeout(u,n)})}const ZN=200,eI=1e3,Gy="cim_widget_thumbnails_last_sweep",tI=3600*1e3;function Xy(e){try{const t=Date.now(),n=Number(localStorage.getItem(Gy))||0;if(n>0&&t-n<tI)return;localStorage.setItem(Gy,String(t))}catch(t){}QN(e)}function nI(e){const{orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:i,conversationId:s,continuationToken:u,lastEventId:c,onSessionUpdate:d}=e,f=k.useRef(null),h=k.useRef(null),m=k.useRef(!1),E=k.useRef(d);E.current=d;const b=k.useRef(null),T=i.sinceHours*60*60*1e3,_=Hy,I=k.useCallback(()=>(b.current||(b.current=RN(f.current)),b.current),[]),v=k.useCallback(W=>{const re=E.current;if(!re)return;if(W==="ended"||W==="reset"){re({reason:W,snapshot:null});return}const H=hp(t,n,_),ee=yp(t,n);!H||!ee||re({reason:W,snapshot:{conversationId:H.conversationId,continuationToken:ee.accessToken,lastEventId:ee.lastEventId,storedAt:Math.max(H.storedAt,ee.storedAt)}})},[t,n,_]);k.useEffect(()=>{const W=PN(t,n);f.current=W,b.current=null,m.current=!1;const re=LN(W,()=>{const H=h.current;if(!H)return null;const ee=yp(t,n);return{conversationId:H,continuationToken:ee==null?void 0:ee.accessToken,lastEventId:ee==null?void 0:ee.lastEventId}},()=>{mp(t,n),h.current=null});return()=>{re(),MN(W),f.current=null}},[t,n]),k.useEffect(()=>{Xy(_)},[_]);const S=k.useCallback((W,re)=>Ie(null,null,function*(){var me,V,ue;const H=(me=re==null?void 0:re.createIfMissing)!=null?me:!0,ee=(V=re==null?void 0:re.isCurrent)!=null?V:(()=>!0);Xy(_);let Q=hp(t,n,_);if(!Q){const fe=yield I();fe&&!pp(fe.storedAt,_)&&(Q=fe)}if(!Q){if(!H)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const fe=yield Qc({routingAttributes:r});if(fe===Ya)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ae=yield W.createConversation(fe);return ee()?(Wa(t,n,ae),h.current=ae,v("created"),{conversationId:ae,restoredMessages:[],resumed:!1,outcome:"created"}):(yield W.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}try{const fe=yield W.listConversations({conversationId:Q.conversationId,startTimestamp:Date.now()-_});if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const ae=fe.conversations.find(se=>se.conversationId===Q.conversationId&&!se.isConversationClosed);if(!ae){if(mp(t,n),Yy(Q.conversationId),h.current=null,!H)return v("ended"),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"};const se=yield Qc({routingAttributes:r});if(se===Ya)return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"aborted"};if(!ee())return{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"};const O=yield W.createConversation(se);return ee()?(Wa(t,n,O),h.current=O,v("created"),{conversationId:O,restoredMessages:[],resumed:!1,outcome:"not-found-or-closed"}):(yield W.endConversation(),{conversationId:null,restoredMessages:[],resumed:!1,outcome:"unverified-error"})}W.resumeConversation(ae.conversationId),h.current=ae.conversationId,Wa(t,n,ae.conversationId),v("resumed");let J=[];try{const se=yield W.listConversationEntries(ae.conversationId,{limit:Math.min((ue=i.limit)!=null?ue:ZN,eI),startTimestamp:Date.now()-T,direction:"FromEnd"});J=HN(se.conversationEntries).reverse();const O=qy(t,n,ae.conversationId);Object.keys(O).length>0&&(J=J.map(q=>q.role==="user"&&O[q.id]?ce(M({},q),{pageContextDivider:O[q.id]}):q));const j=yield KN(ae.conversationId);Object.keys(j).length>0&&(J=J.map(q=>j[q.id]?ce(M({},q),{attachmentImageUrl:j[q.id]}):q))}catch(se){}return{conversationId:ae.conversationId,restoredMessages:J,resumed:!0,outcome:"resumed"}}catch(fe){return{conversationId:Q.conversationId,restoredMessages:[],resumed:!1,outcome:"unverified-error",error:fe}}}),[t,n,r,i,T,_,I,v]),R=k.useCallback((W,re)=>{Wa(t,n,W),h.current=W,v(re)},[t,n,v]),U=k.useCallback(W=>{h.current&&(Yy(h.current),zN(t,n,h.current)),mp(t,n),IN(t,n),DN(f.current),h.current=null,v(W)},[t,n,v]),B=k.useCallback(()=>{m.current||(m.current=!0,u&&s&&$y(u)!=="expired"&&(zy(t,n,u,c!=null?c:""),Wa(t,n,s),h.current=s));const W=yp(t,n);return W?M({continuationToken:W.accessToken},W.lastEventId?{lastEventId:W.lastEventId}:{}):null},[t,n,u,s,c]),A=k.useCallback(()=>Ie(null,null,function*(){const W=yield I();return!(W!=null&&W.continuationToken)||pp(W.storedAt,_)?null:{continuationToken:W.continuationToken,lastEventId:W.lastEventId}}),[_,I]),G=k.useCallback((W,re=()=>!0)=>Ie(null,null,function*(){try{const{accessToken:H,lastEventId:ee}=yield W.generateContinuationToken();if(!re())return;zy(t,n,H,ee),(h.current||hp(t,n,_))&&v("refreshed")}catch(H){}}),[t,n,_,v]);return{initializeConversation:S,persistConversationId:R,clearPersistedConversation:U,getStoredConnectOptions:B,getPeerConnectOptions:A,persistContinuationToken:G}}const rI=128,iI=.7;function Ky(e,t,n){return Ie(this,null,function*(){var r,i;try{if(!e||!n.type.startsWith("image/"))return;const s=(i=(r=t==null?void 0:t.conversationEntries)==null?void 0:r[0])==null?void 0:i.id;if(!s)return;const u=yield qf(n,{maxDimension:rI,quality:iI,mimeType:"image/jpeg"}),c=yield P1(u);yield XN(e,s,c)}catch(s){}})}const Qy="Your session ended due to inactivity. Starting a new session…",wp="This conversation has ended.",oI=300*1e3,sI=2e3,aI=1e4,Jy=15e3,uI=2;function Zy(e,t,n){return e||t||n===!0}function xp(e){return e.some(t=>t.role==="agent")}function vs(e){e.sentAt=performance.now(),e.firstTokenAt=void 0}function Ga(e){const t=e.find(r=>!r.timedOut),n=e[e.length-1];return t!=null?t:n}function cI(e){const t=e.trim();if(!t.startsWith("{")&&!t.startsWith("["))return!1;try{const n=JSON.parse(t);return typeof n=="object"&&n!==null}catch(n){return!1}}function eE(e){if(!e||typeof e!="object")return!1;const t=e,n=t.type==="auth",r=t.type==="api"&&(t.statusCode===401||t.statusCode===403);return n||r}function Tp(e){if(eE(e))return!0;const t=e instanceof Error?e.message:"";return/\(401\)/.test(t)}function lI(e){var E;const t=e.productName||"this product",n=e.quantity&&e.quantity>1?e.quantity:void 0,r=((E=e.variants)!=null?E:[]).filter(b=>b.value),i=r.map(b=>`${b.label}: ${b.value}`).join(", "),s=r.map(b=>b.value).join(", "),u=i?` (${i})`:"",c=s?` (${s})`:"",d=n?`Add ${n} of`:"Add",f=e.sku?` [SKU: ${e.sku}]`:"",h=`${d} ${t} to my cart${u}${f}`,m=`Add ${n?`${n} × `:""}${t} to cart${c}`;return{prompt:h,display:m}}function _p(e,t){return t?{prompt:`${e} (Viewing product details for: ${t})`,display:e}:{prompt:e}}function dI({connectionStatus:e,loading:t,hasMessages:n,sessionExpired:r,bootstrapSettled:i,resumeUsedLastEventId:s,recoverySteps:u,onExhausted:c,timeoutMs:d=Jy,logger:f,isRecoveryInFlight:h}){const m=k.useRef(u);m.current=u;const E=k.useRef(c);E.current=c;const b=k.useRef(f);b.current=f;const T=k.useRef(h);T.current=h;const _=k.useRef(0),I=k.useRef(!1),v=k.useRef(0),[S,R]=k.useState(0);k.useEffect(()=>{if(!t||n){_.current=0,I.current=!1,v.current=0;return}const U=s||_.current>0;if(!(i&&U&&e==="connected"&&!r&&!I.current))return;const A=setTimeout(()=>{Ie(null,null,function*(){var H,ee;if((H=T.current)!=null&&H.call(T)){if(v.current+=1,v.current>uI){I.current=!0,E.current();return}R(Q=>Q+1);return}const G=_.current,W=m.current;if(G>=W.length){I.current=!0,E.current();return}v.current=0,(ee=b.current)==null||ee.warn("🦜 connect bootstrap stalled",{attempt:G});let re;try{yield Promise.race([Promise.resolve(W[G]()),new Promise((Q,me)=>{re=setTimeout(()=>{me(new Error("connect bootstrap step timed out"))},d)})])}catch(Q){}finally{re!==void 0&&clearTimeout(re),_.current=G+1,R(Q=>Q+1)}})},d);return()=>{clearTimeout(A)}},[e,t,n,r,i,s,d,S])}const fI=(e,t,n)=>e==="chat"?"open":t?n?"minimized":"open":"closed",pI=(e,t,n,r,i)=>e==="error"||n?"error":t&&i===0?"connecting":r||t?"processing":e==="reconnecting"?"reconnecting":"transcript",hI=e=>{for(let t=e.length-1;t>=0;t--){const n=e[t];if(n.role!=="agent")continue;const r=mN(n.content);if(r.includes("order_confirmation"))return"order";if(r.includes("cart"))return"cart";if(r.includes("product_comparison"))return"comparison";if(r.includes("product_carousel")||r.includes("product_tile"))return"products"}return"text"};function mI({telemetryRef:e,connectionStatus:t,loading:n,sendError:r,isAgentTyping:i,messages:s}){const{status:{isOpen:u,isMinimized:c,type:d}}=tr(),f=fI(d,u,c);k.useEffect(()=>{var E;(E=e.current)==null||E.uiState(f)},[e,f]);const h=pI(t,n,r,i,s.length);k.useEffect(()=>{var E;(E=e.current)==null||E.viewState(h)},[e,h]);const m=k.useMemo(()=>hI(s),[s]);k.useEffect(()=>{var E;(E=e.current)==null||E.contentState(m)},[e,m])}const gI=e=>typeof e=="number"?e:typeof e!="string"?NaN:/^\d+$/.test(e)?Number(e):Date.parse(e),vp=(e,t=Date.now())=>{for(let n=e.length-1;n>=0;n--){const{role:r,timestamp:i}=e[n];if(r==="system")continue;const s=gI(i);return Number.isFinite(s)?Math.max(0,t-s):null}return null};function yI({telemetryRef:e,stateRef:t}){const n=k.useRef(null),r=k.useCallback(i=>{var u;const s=t.current;!(s!=null&&s.conversationId)||s.conversationId===n.current||(n.current=s.conversationId,(u=e.current)==null||u.conversationEnded(i,vp(s.messages)))},[e,t]);return k.useEffect(()=>{const i=performance.now();let s=!1;const u=d=>{var f,h,m;s||(s=!0,(m=e.current)==null||m.sessionEnded(d,Math.round(performance.now()-i),vp((h=(f=t.current)==null?void 0:f.messages)!=null?h:[])))},c=()=>u("navigated_away");return window.addEventListener("pagehide",c),()=>{window.removeEventListener("pagehide",c),u("unmounted")}},[e,t]),r}const EI=100,bI=3e3,wI=12e3;function tE(e,t){const n=e.current;e.current=[],n.forEach(({text:r,options:i,file:s,resolve:u})=>{const c=t.current;if(!c){u==null||u({outcome:"failure",message:"Messaging is unavailable"});return}c(r,i==null?void 0:i.displayContent,i,void 0,s).then(d=>u==null?void 0:u(d),d=>u==null?void 0:u({outcome:"failure",message:d instanceof Error?d.message:String(d)}))})}function nE(e,t){const n=e.current;n.length!==0&&(e.current=[],n.forEach(({resolve:r})=>{r==null||r({outcome:"failure",message:t})}))}function xI({isOpen:e,connectionStatus:t,conversationId:n,messages:r,deliverUserMessageRef:i,requireWelcome:s=!1,onWelcomeTimeout:u}){const[c,d]=k.useState(0),f=k.useRef([]),h=k.useRef(t);h.current=t;const m=k.useRef(null);return k.useEffect(()=>{if(t==="error"){m.current=null,nE(f,"Connection error");return}const E=t==="connected"&&n!==null,b=f.current.length>0;if(!e||!E||!b){m.current=null;return}if(xp(r)){m.current=null;const S=setTimeout(()=>{tE(f,i)},EI);return()=>clearTimeout(S)}const T=Date.now(),_=s?wI:bI;m.current===null&&(m.current=T+_);const I=Math.max(0,m.current-T),v=setTimeout(()=>{m.current=null,f.current.length!==0&&(s?(nE(f,"Welcome timeout"),u==null||u()):tE(f,i))},I);return()=>clearTimeout(v)},[e,t,n,r,i,c,s,u]),k.useCallback((E,b,T)=>h.current==="error"?Promise.resolve({outcome:"failure",message:"Connection error"}):new Promise(_=>{f.current.push({text:E,options:b,file:T,resolve:_}),d(I=>I+1)}),[])}function TI(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Ic.RESET_CONVERSATION&&t.current()};return s1(n),()=>{a1(n)}},[])}function _I(e){const t=k.useRef(e);t.current=e,k.useEffect(()=>{const n=({detail:r})=>{(r==null?void 0:r.event)===Ic.END_CONVERSATION&&t.current()};return s1(n),()=>{a1(n)}},[])}const qr={default:"Something went wrong. Please try again.",server:"Something went wrong. Please try again.",rateLimit:"We are getting a lot of requests right now. Please try again in a moment.",network:"You are offline or we couldn't reach the assistant. Check connection and try again.",interrupted:"Something went wrong. Please try again.",connect:"You are offline or we couldn't reach the assistant. Check connection and try again.",lost:"You are offline or we couldn't reach the assistant. Check connection and try again.",routing:"Something went wrong. Please try again."};function rE(e){if(!e||typeof e!="object")return{};const t=e;return{type:typeof t.type=="string"?t.type:void 0,statusCode:typeof t.statusCode=="number"?t.statusCode:void 0}}function Ss(e){const{type:t,statusCode:n}=rE(e),r=e&&typeof e=="object"&&typeof e.attemptsMade=="number"?e.attemptsMade:void 0;return{status:n,context:{errType:t!=null?t:"unknown",attempts:r}}}function Wr(e){const{type:t,statusCode:n}=rE(e);if(t==="api"&&typeof n=="number")return n===429?qr.rateLimit:n>=500?qr.server:qr.default;switch(t){case"network":return qr.network;case"sse":return qr.interrupted;case"auth":return qr.connect;default:return qr.default}}function iE(e){switch(e.code){case"MAX_RECONNECT":return qr.lost;case"ROUTING_FAILED":return qr.routing;default:return qr.connect}}let Ao=null;function vI(e){Ao&&Ao!==e&&console.warn("[CimulateMessaging] A messaging API is already registered; overwriting it. Mounting more than one messaging widget per page is not supported."),Ao=e}function SI(e){Ao===e&&(Ao=null)}function oE(){if(!Ao)throw new Error("Cimulate messaging widget is not ready. Call this after injectMessagingWidget() has run and the widget has mounted.");return Ao}const AI={pdp:"This is the product details page the user is currently looking at",srp:"This is the search results page the user is currently looking at"},kI="1.0.0";function CI(e){if(!e)return;const t=e.type,n=e.type==="pdp"?{id:e.id}:M(M(M({query:e.query},e.refinements!==void 0?{refinements:e.refinements}:{}),e.minPrice!==void 0?{minPrice:e.minPrice}:{}),e.maxPrice!==void 0?{maxPrice:e.maxPrice}:{});return[{entryType:"SessionContext",id:crypto.randomUUID(),sessionContext:{contextType:"SessionContextSet",contextVariables:[{name:"commerce_agent_context",value:{valueType:"StructuredValue",value:{version:kI,page_context_type:t,page_context_message:AI[t],page_context_data:n}}}]}}]}function sE(e,t){return e===t?!0:!e||!t||e.type!==t.type?!1:e.type==="pdp"&&t.type==="pdp"?e.id===t.id:e.type!=="srp"||t.type!=="srp"?!1:e.query===t.query}const As=Symbol("initialization-cancelled"),NI=3e4,II="Image is too large to send. Please choose a smaller image.",OI="Sorry, we couldn't process that image. Please try a PNG, JPG, or GIF.",PI=512,RI=.7,LI=e=>Ie(null,null,function*(){let t;try{t=yield qf(e)}catch(n){if(!Qk.includes(e.type))return console.warn("🦜 image downsize failed; original type not SCRT2-native, rejecting",n),{error:OI};console.warn("🦜 image downsize failed; uploading original",n),t=e}return t.size>Vf?{error:II}:{file:t}}),aE=e=>Ie(null,null,function*(){if(e.preparedFile)return{file:e.preparedFile};const t=yield LI(e.file);return"error"in t?t:(e.preparedFile=t.file,{file:t.file})}),uE=({scrt2Url:e,orgId:t,esDeveloperName:n,routingAttributes:r,conversationId:i,continuationToken:s,lastEventId:u,capabilitiesVersion:c,enablePageContext:d=!1,enableLogging:f=!1,onConnect:h,onMessage:m,onError:E,onProductResult:b,onEndConversation:T,onSessionUpdate:_,onWelcomeTimeout:I,children:v})=>{const{logger:S,conversationHistory:R}=st(),{status:{isOpen:U}}=tr(),[B,A]=k.useReducer(TN,My),[G,W]=k.useState(!1),re=k.useRef(!1),[H,ee]=k.useState(!1),[Q,me]=k.useState(!1),V=k.useRef(B);V.current=B;const ue=k.useRef(null);ue.current||(ue.current=crypto.randomUUID());const fe=k.useRef(null);fe.current||(fe.current=jk({orgId:t,esDeveloperName:n,widgetSessionId:ue.current,getIdentity:()=>({conversationId:V.current.conversationId,messagingSessionId:V.current.messagingSessionId})}));const ae=k.useRef(null),J=k.useRef(null),se=k.useRef(null),O=k.useRef(0),j=k.useRef(!1);k.useEffect(()=>{const Z=B.connectionStatus,ye=ae.current;ae.current=Z;const Ee=fe.current;if(Ee&&!(ye===Z||ye===null&&Z==="disconnected"))switch(Ee.connectionState(Z),Z){case"connecting":J.current=performance.now();break;case"reconnecting":se.current=performance.now();break;case"connected":ye==="reconnecting"&&se.current!==null?Ee.reconnectSucceeded(Math.round(performance.now()-se.current),O.current):Ee.connectSucceeded(J.current!==null?Math.round(performance.now()-J.current):null),J.current=null,se.current=null,O.current=0;break}},[B.connectionStatus]),k.useEffect(()=>{var Z;(Z=fe.current)==null||Z.sessionState(B.sessionExpired)},[B.sessionExpired]),mI({telemetryRef:fe,connectionStatus:B.connectionStatus,loading:B.loading,sendError:B.sendError,isAgentTyping:B.isAgentTyping,messages:B.messages});const q=yI({telemetryRef:fe,stateRef:V}),P=nI({orgId:t,esDeveloperName:n,routingAttributes:r,conversationHistory:R,conversationId:i,continuationToken:s,lastEventId:u,onSessionUpdate:_}),ge=k.useRef(null),Re=k.useRef(m),pe=k.useRef(E),Ne=k.useRef(h),ve=k.useRef(b),ze=k.useRef(T),rt=k.useRef(!1),Ot=k.useRef(!1),ct=k.useRef(!1),_t=k.useRef(0),tt=k.useRef(0),yt=k.useRef(0),De=k.useRef(null),Ve=k.useRef(null),Oe=k.useRef(null),it=k.useRef(0),lt=k.useRef(!1),jt=k.useRef(0),At=k.useRef(0),Ei=k.useRef(()=>Promise.reject(new Error("Messaging is unavailable"))),sr=k.useRef(),Ko=k.useRef(()=>Ie(null,null,function*(){return{outcome:"failure",message:"Messaging is unavailable"}})),he=k.useRef(null),ke=k.useCallback((Z,ye,Ee)=>{var Le,$e;const Se=Z.options.pageContextDivider,de=($e=(Le=ye==null?void 0:ye.conversationEntries)==null?void 0:Le[0])==null?void 0:$e.id;Se&&Ee&&de&&$N(t,n,Ee,de,Se)},[t,n]),Qe=k.useCallback((Z={})=>{if(!d)return Z;const ye=bs();if(!ye)return ce(M({},Z),{pageContextSnapshot:null});const Ee=ce(M({},Z),{pageContextSnapshot:ye});if(Z.silent)return Ee;let Se;switch(ye.type){case"pdp":{const de=y1();Se={context:ye,label:(de==null?void 0:de.label)||ye.id,imageUrl:de==null?void 0:de.imageUrl};break}case"srp":Se={context:ye,label:ye.query};break}return ce(M({},Ee),{pageContextDivider:Se})},[d]),Je=k.useRef([]),et=k.useRef(null),Yt=k.useRef(null),Yn=k.useRef(!1),mn=k.useRef(0);k.useEffect(()=>{const Z=ye=>{var Se;const Ee=(Se=AN())!=null?Se:ye==null?void 0:ye.detail;!Ee||typeof Ee!="object"||!Array.isArray(Ee.items)||(Yt.current=Ee,Yn.current=!0,mn.current+=1)};return window.addEventListener(Bf,Z),Z(),()=>window.removeEventListener(Bf,Z)},[]);const Gt=k.useCallback((Z,ye)=>{ye.outcome==="timeout"?(Z.timedOut=!0,Je.current=Je.current.filter(Ee=>Ee===Z||!Ee.timedOut)):Je.current=Je.current.filter(Ee=>Ee!==Z),clearTimeout(Z.timeoutId),Z.resolve(ye)},[]);Re.current=m,pe.current=E,Ne.current=h,ve.current=b,ze.current=T,k.useEffect(()=>{const Z=new _k({baseURL:e,orgId:t,esDeveloperName:n,options:M({enableLogging:f},c?{capabilitiesVersion:c}:{})});ge.current=Z,lt.current=!1,j.current=!1,me(!1),W(!1),re.current=!1,ee(!1),A({type:"RESET"}),Z.on("connected",()=>{var de,Le;A({type:"SET_CONNECTION_STATUS",status:"connected"}),j.current||(j.current=!0,(de=fe.current)==null||de.sessionStarted()),(Le=Ne.current)==null||Le.call(Ne)}),Z.on("disconnected",()=>{A({type:"SET_CONNECTION_STATUS",status:"disconnected"})}),Z.on("reconnecting",de=>{O.current=de.attempt,A({type:"SET_CONNECTION_STATUS",status:"reconnecting"})}),Z.on("message",de=>{var oi,Jo,pd,ju,Zo,ar;const Le=Yt.current,$e=mn.current,bt=de.messageId!==void 0&&V.current.messages.some(es=>es.serverId===de.messageId);if(d&&!bt){const es=bN(de.content);es&&!sE(es,bs())&&Dc(es)}const dt=ce(M({id:de.messageId||crypto.randomUUID()},de.messageId?{serverId:de.messageId}:{}),{role:"agent",content:de.content,timestamp:de.timestamp,sender:de.sender,raw:de});S==null||S.log("🦜 MessagingProvider message received (FLUSH_STREAMING)",{messageId:dt.id,tokensBeforeFlush:_t.current,streamedFinalOnly:_t.current===0}),_t.current=0;const Ze=Ga(Je.current),ft=Ze==null?void 0:Ze.options.reconcileMessageId;A({type:"FLUSH_STREAMING",message:dt,replaceMessageId:ft}),(oi=Re.current)==null||oi.call(Re,dt),Ze&&(Ze.sentAt!==void 0&&!Ze.options.silent&&((Jo=fe.current)==null||Jo.agentReplied(Math.round(performance.now()-Ze.sentAt),Ze.firstTokenAt!==void 0?Math.round(Ze.firstTokenAt-Ze.sentAt):null)),Gt(Ze,{outcome:"success"}));const{messagingSessionId:Kt}=de;Kt&&A({type:"SET_MESSAGING_SESSION_ID",id:Kt});const at=EN(de.content);Kt&&at&&((pd=ve.current)==null||pd.call(ve,{agentSessionId:Kt,kind:at.kind,productIds:at.productIds}));const Pt=Ly(de.content),Ht=(ju=Pt==null?void 0:Pt.cartDetails)!=null?ju:null;bt||((at==null?void 0:at.kind)==="search"&&at.productIds.length===0&&((Zo=fe.current)==null||Zo.failure("no_results")),(Pt==null?void 0:Pt.status)==="failure"&&((ar=fe.current)==null||ar.failure("cart_action_failed"))),!(bt||!re.current&&Yn.current)&&(Ht&&$e===mn.current&&(Yt.current=Ht,Yn.current=!1,mn.current+=1),(Pt==null?void 0:Pt.status)==="success"&&Ht?re.current&&c1(Uy(Le,Ht,wN(de.content))):Ze!=null&&Ze.options.cartMutation&&!Ht&&(Pt==null?void 0:Pt.status)!=="failure"&&re.current&&c1(Uy(Le,null)))}),Z.on("streaming_token",de=>{const Le=Ga(Je.current);if(!(Le!=null&&Le.options.silent)){if(Le&&Le.firstTokenAt===void 0&&(Le.firstTokenAt=performance.now()),_t.current+=1,S!=null&&S.isDevelopment){const $e=Oy(de.token);$e?$e.index===Ri?S.debug("🦜 streaming_token → markdown fallback",{token:de.token}):S.debug("🦜 streaming_token parsed",{type:$e.type,index:$e.index,outputName:$e.type==="tool_results"?$e.output_name:void 0}):S.debug("🦜 streaming_token dropped (empty or unrecognized payload shape)",{token:de.token})}A({type:"APPEND_STREAMING_TOKEN",token:de.token})}}),Z.on("typing_started",()=>{var de;(de=Ga(Je.current))!=null&&de.options.silent||A({type:"SET_AGENT_TYPING",isTyping:!0})}),Z.on("typing_stopped",()=>{var de;(de=Ga(Je.current))!=null&&de.options.silent||A({type:"SET_AGENT_TYPING",isTyping:!1})}),Z.on("progress_indicator",de=>{var Le;(Le=Ga(Je.current))!=null&&Le.options.silent||A({type:"ADD_PROGRESS_STEP",message:de.message})}),Z.on("routing_result",de=>{var Le,$e;if(A({type:"SET_ROUTING_RESULT",result:de}),!de.isSuccessful){const bt=`Routing failed: ${de.failureType||"unknown"}`;(Le=fe.current)==null||Le.failure("routing_failed",{context:{failureType:de.failureType||"unknown"}}),A({type:"SET_ERROR",error:iE({code:"ROUTING_FAILED"})}),A({type:"SET_CONNECTION_STATUS",status:"error"}),($e=pe.current)==null||$e.call(pe,bt)}}),Z.on("participant_changed",de=>{var $e,bt;if(de.participant.name==="Automated Process")return;const Le=ce(M({id:crypto.randomUUID()},de.entryId?{serverId:de.entryId}:{}),{role:"system",content:de.action==="add"?`${de.participant.name||"Agent"} joined the conversation`:`${de.participant.name||"Agent"} left the conversation`,timestamp:new Date().toISOString()});S==null||S.log("🦜 MessagingProvider participant_changed event received",{event:de}),de.action==="add"?($e=fe.current)==null||$e.participantJoined(de.participant.name||"Agent"):(bt=fe.current)==null||bt.participantLeft(de.participant.name||"Agent",vp(V.current.messages)),A({type:"ADD_MESSAGE",message:Le})}),Z.on("conversation_closed",()=>{const de={id:crypto.randomUUID(),role:"system",content:wp,timestamp:new Date().toISOString()};q("server_closed"),A({type:"ADD_MESSAGE",message:de}),A({type:"SET_CONVERSATION_ID",id:null}),P.clearPersistedConversation("ended")}),Z.on("error",de=>{var Le,$e,bt;if(S==null||S.log("🦜 MessagingProvider ERROR event received",{event:de}),de.code==="SESSION_EXPIRED"){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),A({type:"SET_LOADING",isLoading:!1});return}($e=fe.current)==null||$e.failure("sdk_error",{context:{code:(Le=de.code)!=null?Le:"unknown",recoverable:de.recoverable}}),A({type:"SET_ERROR",error:iE(de)}),de.recoverable||A({type:"SET_CONNECTION_STATUS",status:"error"}),(bt=pe.current)==null||bt.call(pe,de.message)});const ye=de=>{if(de!==jt.current)throw As},Ee=de=>de===jt.current,Se=de=>Ie(null,null,function*(){var Ze,ft,Kt,at;W(!1),re.current=!1;let Le=P.getStoredConnectOptions(),$e=!1;Le||(Le=yield P.getPeerConnectOptions(),ye(de),$e=!!Le);let bt=!1;try{if(yield Z.connect(Le!=null?Le:void 0),!Ee(de))throw Z.disconnect(),As;bt=!!(Le!=null&&Le.lastEventId)}catch(Pt){if(ye(de),Le&&Tp(Pt)){if(S==null||S.log("Stored token expired on connect — falling back to fresh connect"),$e||P.clearPersistedConversation("reset"),yield Z.connect(),!Ee(de))throw Z.disconnect(),As;bt=!1}else throw Pt}ee(bt),yield P.persistContinuationToken(Z,()=>Ee(de)),ye(de);const dt=yield P.initializeConversation(Z,{isCurrent:()=>Ee(de)});if(ye(de),S==null||S.log("🦜 initial connect complete",{conversationId:dt.conversationId,resumed:dt.resumed,outcome:dt.outcome,restoredMessages:dt.restoredMessages.length}),(Ze=fe.current)==null||Ze.sessionInitialized(dt.outcome,dt.restoredMessages.length),dt.outcome==="aborted")throw A({type:"SET_LOADING",isLoading:!1}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),As;if(dt.outcome==="unverified-error"){dt.conversationId&&(Z.resumeConversation(dt.conversationId),A({type:"SET_CONVERSATION_ID",id:dt.conversationId})),W(!0),re.current=!0;return}if(A({type:"SET_CONVERSATION_ID",id:dt.conversationId}),dt.resumed){const Pt=(ft=[...dt.restoredMessages].reverse().find(Ht=>Ht.pageContextDivider))==null?void 0:ft.pageContextDivider;if(he.current=(Kt=Pt==null?void 0:Pt.context)!=null?Kt:null,!Yn.current)for(const Ht of[...dt.restoredMessages].reverse()){const oi=(at=Ly(Ht.content))==null?void 0:at.cartDetails;if(oi){Yt.current=oi,mn.current+=1;break}}A({type:"LOAD_HISTORY",messages:dt.restoredMessages}),W(!0),re.current=!0}else he.current=null,W(!0),re.current=!0;A({type:"SET_LOADING",isLoading:!1})});return Ve.current=Se,()=>{jt.current+=1,At.current+=1,Z.disconnect(),Z.off(),ge.current=null,Ve.current=null,Oe.current=null,lt.current=!1}},[e,t,n,c,Gt]);const en=k.useCallback(()=>{if(lt.current)return Promise.resolve();if(Oe.current)return it.current===jt.current?Oe.current:Oe.current.catch(Se=>{if(Se!==As)throw Se}).then(()=>Ei.current());const Z=Ve.current;if(!Z)return Promise.reject(new Error("Messaging is unavailable"));A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_CONNECTION_STATUS",status:"connecting"});const ye=++jt.current;it.current=ye;const Ee=Z(ye).then(()=>{lt.current=!0,me(!0)}).catch(Se=>{var Le,$e;if(Se===As)throw Se;const de=Se instanceof Error?Se.message:String(Se);throw(Le=fe.current)==null||Le.failure("connect_failed",Ss(Se)),A({type:"SET_CONNECTION_STATUS",status:"error"}),A({type:"SET_ERROR",error:Wr(Se)}),($e=pe.current)==null||$e.call(pe,de),Se}).finally(()=>{Oe.current===Ee&&(Oe.current=null)});return Oe.current=Ee,Ee},[]);Ei.current=en,k.useEffect(()=>{U&&en().catch(()=>{})},[U,e,t,n,c,en]);const Xt=xI({isOpen:U,connectionStatus:B.connectionStatus,conversationId:B.conversationId,messages:B.messages,deliverUserMessageRef:sr,requireWelcome:d,onWelcomeTimeout:I}),Mn=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)return!1;const ye=P.getStoredConnectOptions();if(!ye)return S==null||S.log("🦜 attemptResume: no stored identity — cannot resume, will start fresh"),!1;S==null||S.log("🦜 attemptResume: reconnecting on stored identity via continuation token");try{Z.disconnect(),yield Z.connect(ye)}catch(Se){if(Tp(Se))return S==null||S.log("🦜 attemptResume: token expired (401) — will start fresh",{error:Se instanceof Error?Se.message:String(Se)}),!1;throw S==null||S.log("🦜 attemptResume: transient connect failure — rethrowing, session kept",{error:Se instanceof Error?Se.message:String(Se)}),Se}yield P.persistContinuationToken(Z);const Ee=yield P.initializeConversation(Z,{createIfMissing:!1});return Ee.outcome==="not-found-or-closed"||!Ee.conversationId?(S==null||S.log("🦜 attemptResume: conversation no longer resumable (closed/not found) — will start fresh"),!1):(Ee.outcome==="unverified-error"&&(S==null||S.log("🦜 attemptResume: resume validation failed transiently — keeping live session, resuming optimistically",{conversationId:Ee.conversationId}),Z.resumeConversation(Ee.conversationId)),S==null||S.log("🦜 attemptResume: resumed conversation on same identity",{conversationId:Ee.conversationId}),A({type:"SET_CONVERSATION_ID",id:Ee.conversationId}),A({type:"SET_CONNECTION_STATUS",status:"connected"}),Ee.outcome!=="resumed"&&P.persistConversationId(Ee.conversationId,"resumed"),ct.current=!1,A({type:"SET_SESSION_EXPIRED",expired:!1}),!0)}),[P,S]),wn=k.useCallback(Z=>Ie(null,null,function*(){var Ee,Se,de,Le,$e,bt,dt;const ye=ge.current;if(ye){Z.options.silent||(A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_PROGRESS_MESSAGE",message:""}));try{if(Z.file){const Ze=yield aE(Z);if("error"in Ze){A({type:"SET_SEND_ERROR",error:{text:Z.text,displayContent:Z.displayContent,options:Z.options,sessionContext:Z.sessionContext,file:Z.file,message:Ze.error}}),(Ee=fe.current)==null||Ee.failure("file_rejected"),(Se=pe.current)==null||Se.call(pe,Ze.error),Gt(Z,{outcome:"failure",message:Ze.error});return}vs(Z);const ft=yield ye.sendFile(Ze.file,Z.text.trim()?{text:Z.text}:void 0);Ky((de=ye.conversationId)!=null?de:V.current.conversationId,ft,Z.file)}else if(Z.sessionContext){vs(Z);const Ze=yield ye.sendMessage(Z.text,Z.sessionContext);ke(Z,Ze,(Le=ye.conversationId)!=null?Le:V.current.conversationId)}else{vs(Z);const Ze=yield ye.sendMessage(Z.text);ke(Z,Ze,($e=ye.conversationId)!=null?$e:V.current.conversationId)}}catch(Ze){(bt=fe.current)==null||bt.failure("send_failed",Ss(Ze));const ft=Wr(Ze);A({type:"SET_SEND_ERROR",error:{text:Z.text,displayContent:Z.displayContent,options:Z.options,sessionContext:Z.sessionContext,file:Z.file,message:ft}}),(dt=pe.current)==null||dt.call(pe,Ze instanceof Error?Ze.message:String(Ze)),Gt(Z,{outcome:"failure",message:ft})}}}),[Gt,ke]),sa=k.useCallback(Z=>Ie(null,null,function*(){var Ee,Se,de;const ye=ge.current;if(!(!ye||rt.current)){rt.current=!0,Ot.current=!0;try{if(yield Mn()){Z&&(yield wn(Z));return}S==null||S.log("🦜 recoverExpiredSession: resume failed — starting a new session + conversation"),q("expired"),ct.current=!1,A({type:"SET_SESSION_EXPIRED",expired:!1}),A({type:"ADD_MESSAGE",message:{id:crypto.randomUUID(),role:"system",content:Qy,timestamp:new Date().toISOString()}}),P.clearPersistedConversation("reset"),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.disconnect(),yield ye.connect(),yield P.persistContinuationToken(ye);const Le=yield Qc({routingAttributes:r});if(Le===Ya){A({type:"SET_CONNECTION_STATUS",status:"disconnected"});return}const $e=yield ye.createConversation(Le);S==null||S.log("🦜 recoverExpiredSession: new conversation created",{conversationId:$e}),A({type:"SET_CONVERSATION_ID",id:$e}),(Ee=fe.current)==null||Ee.conversationStarted("recovery"),A({type:"SET_CONNECTION_STATUS",status:"connected"}),P.persistConversationId($e,"created"),Z&&(yield wn(Z))}catch(Le){(Se=fe.current)==null||Se.failure("session_recovery_failed",Ss(Le));const $e=Le instanceof Error?Le.message:String(Le);A({type:"SET_ERROR",error:Wr(Le)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(de=pe.current)==null||de.call(pe,$e),Z&&Gt(Z,{outcome:"failure",message:Wr(Le)})}finally{rt.current=!1,Ot.current=!1}}}),[r,P,Mn,wn,S,Gt,q]),Qo=k.useRef(sa);Qo.current=sa;const bi=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z||!lt.current||rt.current)return;if(!V.current.conversationId&&!ct.current){Z.reconnect();return}rt.current=!0;const ye=Ie(null,null,function*(){try{(yield Mn())||(ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}))}catch(Ee){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"})}finally{rt.current=!1,De.current=null}});De.current=ye,yield ye}),[Mn]),wi=k.useRef(bi);wi.current=bi;const fd=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z||rt.current)return;const ye=P.getStoredConnectOptions(),Ee=ye==null?void 0:ye.continuationToken;if(Ee){rt.current=!0;try{Z.disconnect(),yield Z.connect({continuationToken:Ee}),yield P.persistContinuationToken(Z);const Se=V.current.conversationId;Se&&Z.resumeConversation(Se)}catch(Se){if(Tp(Se)){ct.current=!0,A({type:"SET_SESSION_EXPIRED",expired:!0}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),A({type:"SET_LOADING",isLoading:!1});return}S==null||S.log("🦜 reconnectOmittingLastEventId: transient connect failure — session kept",{error:Se instanceof Error?Se.message:String(Se)})}finally{rt.current=!1}}}),[P,S]);k.useEffect(()=>{const Z=()=>{const $e=Date.now();$e-yt.current<sI||(yt.current=$e,wi.current())},ye=()=>{if(document.visibilityState==="hidden"){tt.current=Date.now();return}const $e=ge.current;if(!$e)return;const bt=tt.current?Date.now()-tt.current:0;tt.current=0,(ct.current||!$e.isConnected||bt>oI)&&Z()},Ee=$e=>{$e.persisted&&Z()},Se=()=>{tt.current=Date.now()},de=()=>Z(),Le=()=>Z();return document.addEventListener("visibilitychange",ye),window.addEventListener("pageshow",Ee),window.addEventListener("pagehide",Se),document.addEventListener("resume",de),window.addEventListener("online",Le),()=>{document.removeEventListener("visibilitychange",ye),window.removeEventListener("pageshow",Ee),window.removeEventListener("pagehide",Se),document.removeEventListener("resume",de),window.removeEventListener("online",Le)}},[]);const Mu=k.useCallback((Z,ye)=>Ie(null,null,function*(){var Se,de,Le,$e,bt,dt,Ze;const Ee=ge.current;if(!Ee){Gt(Z,{outcome:"failure",message:"Messaging is unavailable"});return}if(ct.current){yield Qo.current(Z);return}try{if(Z.file){const ft=yield aE(Z);if("error"in ft){A({type:"SET_SEND_ERROR",error:ye(ft.error)}),(Se=fe.current)==null||Se.failure("file_rejected"),(de=pe.current)==null||de.call(pe,ft.error),Gt(Z,{outcome:"failure",message:ft.error});return}vs(Z);const Kt=yield Ee.sendFile(ft.file,Z.text.trim()?{text:Z.text}:void 0);Ky((Le=Ee.conversationId)!=null?Le:V.current.conversationId,Kt,Z.file)}else if(Z.sessionContext){vs(Z);const ft=yield Ee.sendMessage(Z.text,Z.sessionContext);ke(Z,ft,($e=Ee.conversationId)!=null?$e:V.current.conversationId)}else{vs(Z);const ft=yield Ee.sendMessage(Z.text);ke(Z,ft,(bt=Ee.conversationId)!=null?bt:V.current.conversationId)}}catch(ft){if(eE(ft)){yield Qo.current(Z);return}(dt=fe.current)==null||dt.failure("send_failed",Ss(ft));const Kt=Wr(ft);A({type:"SET_SEND_ERROR",error:ye(Kt)}),(Ze=pe.current)==null||Ze.call(pe,ft instanceof Error?ft.message:String(ft)),Gt(Z,{outcome:"failure",message:Kt})}}),[Gt,ke]),Fu=k.useCallback(Z=>Ie(null,null,function*(){const ye=De.current;ye&&(yield ye),yield Z()}),[]),yr=k.useCallback((Z,ye,Ee={},Se,de,Le=!1)=>new Promise($e=>{var Pt;if(!ge.current){$e({outcome:"failure",message:"Messaging is unavailable"});return}if(!Z.trim()&&!de){$e({outcome:"failure",message:"Message is empty"});return}const dt=Ee.pageContextDivider,Ze=!Le&&!de&&dt!==void 0&&!sE(dt.context,he.current),ft=!Le&&dt!==void 0&&!Ze?ce(M({},Ee),{pageContextDivider:void 0}):Ee;let Kt=Se;if(Kt===void 0){let Ht=null;d&&(Ht=ft.pageContextSnapshot===void 0?bs():ft.pageContextSnapshot),Kt=(Pt=CI(Ht))!=null?Pt:null}const at={};if(Object.assign(at,{text:Z,displayContent:ye,options:ft,sessionContext:Kt,file:de,resolve:$e,timeoutId:setTimeout(()=>{var Ht;(Ht=fe.current)==null||Ht.failure("send_timeout"),A({type:"SET_LOADING",isLoading:!1}),Gt(at,{outcome:"timeout"})},aI)}),Je.current.push(at),A({type:"CLEAR_SEND_ERROR"}),!ft.silent){if(!Le){const Ht=crypto.randomUUID();A({type:"ADD_MESSAGE",message:{id:Ht,role:"user",content:ye!=null?ye:Z,timestamp:new Date().toISOString(),pageContextDivider:ft.pageContextDivider}}),Ze&&dt&&(he.current=dt.context),de&&de.type.startsWith("image/")&&qf(de,{maxDimension:PI,quality:RI}).then(P1).then(oi=>A({type:"UPDATE_MESSAGE",id:Ht,patch:{attachmentImageUrl:oi}})).catch(()=>{})}A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_PROGRESS_MESSAGE",message:""})}Fu(()=>Mu(at,Ht=>({text:Z,displayContent:ye,options:ft,sessionContext:at.sessionContext,file:de,message:Ht})))}),[Mu,Fu,d,Gt]);sr.current=yr;const Wi=k.useCallback((Z,ye)=>{var dt;if(!Z.trim())return Promise.resolve({outcome:"failure",message:"Message is empty"});const Ee=Qe(ye),Se=ce(M({},Ee),{displayContent:(dt=Ee.displayContent)!=null?dt:Z});if(!U||!xp(V.current.messages)){const Ze=Xt(Z,Se);return lt.current||en().catch(()=>{}),U?Ze:Promise.resolve({outcome:"success"})}const de=At.current,Le=()=>{const Ze=()=>de!==At.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):yr(Z,Se.displayContent,Se);return lt.current?Ze():en().then(Ze,ft=>({outcome:"failure",message:Wr(ft)}))},$e=et.current?et.current.then(Le):Le(),bt=$e.then(()=>{});return et.current=bt,bt.finally(()=>{et.current===bt&&(et.current=null)}),$e},[yr,en,U,Xt,Qe]);Ko.current=Wi;const aa=k.useCallback(Z=>{if(!ge.current)return Promise.resolve({outcome:"failure",message:"Messaging is unavailable"});const{text:Ee,file:Se,displayContent:de}=Z;if(!Se)return Ee.trim()?Wi(Ee):Promise.resolve({outcome:"failure",message:"Message is empty"});const Le=Ee.trim(),$e=(de!=null?de:Ee).trim()||Se.name,bt={displayContent:$e};if(!U||!xp(V.current.messages)){const at=Xt(Le,bt,Se);return lt.current||en().catch(()=>{}),U?at:Promise.resolve({outcome:"success"})}const dt=At.current,Ze=()=>{const at=()=>dt!==At.current?Promise.resolve({outcome:"failure",message:"Message cancelled"}):yr(Le,$e,bt,null,Se);return lt.current?at():en().then(at,Pt=>({outcome:"failure",message:Wr(Pt)}))},ft=et.current?et.current.then(Ze):Ze(),Kt=ft.then(()=>{});return et.current=Kt,Kt.finally(()=>{et.current===Kt&&(et.current=null)}),ft},[yr,Wi,en,U,Xt]),Bu=k.useCallback(Z=>{if(!ge.current)return;const ye=At.current,{prompt:Ee,display:Se}=lI(Z);en().then(()=>{if(ye===At.current)return yr(Ee,Se)}).catch(()=>{})},[yr,en]),Yi=k.useCallback(()=>{const Z=ge.current,ye=V.current.sendError;if(!Z||!ye)return;const Ee=()=>Ot.current?Promise.resolve({outcome:"failure",message:ye.message}):yr(ye.text,ye.displayContent,ye.options,ye.sessionContext,ye.file,!0),Se=et.current?et.current.then(Ee):Ee(),de=Se.then(()=>{});return et.current=de,de.finally(()=>{et.current===de&&(et.current=null)}),Se},[yr]),ua=k.useCallback(()=>{const Z=ge.current;Z&&(Oe.current||(ct.current=!1,lt.current=!1,me(!1),Z.disconnect(),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),en().catch(()=>{})))},[en]),xi=k.useCallback(Z=>{const ye=ge.current;if(!ye)return Promise.resolve();if(Je.current=[],he.current=null,q(Z),!lt.current)return jt.current+=1,At.current+=1,ye.disconnect(),P.clearPersistedConversation("reset"),A({type:"RESET"}),Promise.resolve();const Ee=++At.current;return ct.current=!1,ee(!1),P.clearPersistedConversation("reset"),A({type:"RESET"}),A({type:"SET_LOADING",isLoading:!0}),A({type:"SET_CONNECTION_STATUS",status:"connecting"}),ye.endConversation().then(()=>Ee!==At.current||ge.current!==ye?null:(ye.disconnect(),ye.connect().then(()=>ye))).then(Se=>Ie(null,null,function*(){if(!Se||Ee!==At.current||(yield P.persistContinuationToken(Se,()=>Ee===At.current&&ge.current===Se),Ee!==At.current||ge.current!==Se))return null;const de=yield Qc({routingAttributes:r});return de===Ya?null:ye.createConversation(de)})).then(Se=>{var de;!Se||Ee!==At.current||ge.current!==ye||(A({type:"SET_CONVERSATION_ID",id:Se}),A({type:"SET_CONNECTION_STATUS",status:"connected"}),P.persistConversationId(Se,"created"),(de=fe.current)==null||de.conversationStarted("reset"))}).catch(Se=>{var de,Le;Ee!==At.current||ge.current!==ye||((de=fe.current)==null||de.failure("conversation_create_failed",Ss(Se)),A({type:"SET_ERROR",error:Wr(Se)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=pe.current)==null||Le.call(pe,Se.message))})},[r,P,q]),Uu=k.useCallback(()=>xi("reset"),[xi]);TI(Uu),dI({connectionStatus:B.connectionStatus,loading:B.loading,hasMessages:B.messages.length>0,sessionExpired:B.sessionExpired,bootstrapSettled:G,resumeUsedLastEventId:H,recoverySteps:[fd,()=>xi("resume_timeout")],onExhausted:()=>{var ye,Ee;(ye=fe.current)==null||ye.failure("resume_timeout");const Z=Wr({type:"network"});A({type:"SET_ERROR",error:Z}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Ee=pe.current)==null||Ee.call(pe,Z)},logger:S,isRecoveryInFlight:()=>rt.current||De.current!==null});const Gi=k.useCallback(()=>Ie(null,null,function*(){var Se;const Z=ge.current;if(!Z||!V.current.conversationId)return;const ye=yield Z.retrieveConversationTranscript(),Ee=URL.createObjectURL(ye);try{const de=document.createElement("a");de.href=Ee,de.download=`transcript-${(Se=Z.conversationId)!=null?Se:"conversation"}.pdf`,document.body.appendChild(de),de.click(),de.remove()}finally{URL.revokeObjectURL(Ee)}}),[]),Xi=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)return Promise.resolve();if(Je.current=[],he.current=null,q("ended"),!lt.current)return jt.current+=1,At.current+=1,Z.disconnect(),P.clearPersistedConversation("ended"),A({type:"RESET"}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"}),Promise.resolve();const ye=++At.current;if(ct.current=!1,ee(!1),ze.current)try{yield Promise.race([ze.current(V.current.conversationId),new Promise(Se=>setTimeout(Se,NI))])}catch(Se){S==null||S.error("onEndConversation callback failed",Se)}P.clearPersistedConversation("ended"),A({type:"RESET"}),A({type:"SET_CONNECTION_STATUS",status:"disconnected"});const Ee={id:crypto.randomUUID(),role:"system",content:wp,timestamp:new Date().toISOString()};return A({type:"ADD_MESSAGE",message:Ee}),lt.current=!1,me(!1),Z.endConversation().then(()=>{ye!==At.current||ge.current!==Z||Z.disconnect()}).catch(Se=>{var de,Le;ye!==At.current||ge.current!==Z||((de=fe.current)==null||de.failure("end_conversation_failed",Ss(Se)),A({type:"SET_ERROR",error:Wr(Se)}),A({type:"SET_CONNECTION_STATUS",status:"error"}),(Le=pe.current)==null||Le.call(pe,Se.message))})}),[S,P,ee,q]);_I(Xi);const Ti=k.useCallback(()=>Ie(null,null,function*(){const Z=ge.current;if(!Z)throw new Error("getAuthLinkKey called before the messaging client connected");return S==null||S.debug("🦜 getAuthLinkKey: requesting single-use auth link key"),Z.getAuthLinkKey()}),[S]);k.useEffect(()=>{const Z={getAuthLinkKey:Ti,sendMessage:(ye,Ee)=>Ko.current(ye,Ee)};return vI(Z),()=>SI(Z)},[Ti]);const Ki=B.connectionStatus==="connected"&&B.conversationId!==null;k.useEffect(()=>{g1(Ki)},[Ki]),k.useEffect(()=>()=>g1(!1),[]);const eg=k.useMemo(()=>({connectionStatus:B.connectionStatus,isConnected:Ki,isAgentTyping:B.isAgentTyping,conversationId:B.conversationId,messages:B.messages,streamingBlocks:B.streamingBlocks,progressMessage:B.progressMessage,progressSteps:B.progressSteps,error:B.error,sendError:B.sendError,canInitialize:!Q&&B.error===null,loading:B.loading,sessionExpired:B.sessionExpired,sendMessage:Wi,sendFile:aa,addToCart:Bu,resetConversation:Uu,endConversation:Xi,retryLastMessage:Yi,retryConnection:ua,downloadTranscript:Gi,getAuthLinkKey:Ti}),[B,Ki,Q,Wi,aa,Bu,Uu,Xi,Yi,ua,Gi,Ti]);return w.jsx(Mc.Provider,{value:fe.current,children:w.jsx(jy.Provider,{value:eg,children:v})})};var cE=Symbol.for("immer-nothing"),lE=Symbol.for("immer-draftable"),nr=Symbol.for("immer-state");function Ar(e,...t){throw new Error(`[Immer] minified error nr: ${e}. Full error at: https://bit.ly/3cXEKWf`)}var ks=Object.getPrototypeOf;function Cs(e){return!!e&&!!e[nr]}function ko(e){var t;return e?dE(e)||Array.isArray(e)||!!e[lE]||!!((t=e.constructor)!=null&&t[lE])||Xa(e)||el(e):!1}var DI=Object.prototype.constructor.toString();function dE(e){if(!e||typeof e!="object")return!1;const t=ks(e);if(t===null)return!0;const n=Object.hasOwnProperty.call(t,"constructor")&&t.constructor;return n===Object?!0:typeof n=="function"&&Function.toString.call(n)===DI}function Jc(e,t){Zc(e)===0?Reflect.ownKeys(e).forEach(n=>{t(n,e[n],e)}):e.forEach((n,r)=>t(r,n,e))}function Zc(e){const t=e[nr];return t?t.type_:Array.isArray(e)?1:Xa(e)?2:el(e)?3:0}function Sp(e,t){return Zc(e)===2?e.has(t):Object.prototype.hasOwnProperty.call(e,t)}function fE(e,t,n){const r=Zc(e);r===2?e.set(t,n):r===3?e.add(n):e[t]=n}function MI(e,t){return e===t?e!==0||1/e===1/t:e!==e&&t!==t}function Xa(e){return e instanceof Map}function el(e){return e instanceof Set}function Co(e){return e.copy_||e.base_}function Ap(e,t){if(Xa(e))return new Map(e);if(el(e))return new Set(e);if(Array.isArray(e))return Array.prototype.slice.call(e);const n=dE(e);if(t===!0||t==="class_only"&&!n){const r=Object.getOwnPropertyDescriptors(e);delete r[nr];let i=Reflect.ownKeys(r);for(let s=0;s<i.length;s++){const u=i[s],c=r[u];c.writable===!1&&(c.writable=!0,c.configurable=!0),(c.get||c.set)&&(r[u]={configurable:!0,writable:!0,enumerable:c.enumerable,value:e[u]})}return Object.create(ks(e),r)}else{const r=ks(e);if(r!==null&&n)return M({},e);const i=Object.create(r);return Object.assign(i,e)}}function kp(e,t=!1){return nl(e)||Cs(e)||!ko(e)||(Zc(e)>1&&Object.defineProperties(e,{set:{value:tl},add:{value:tl},clear:{value:tl},delete:{value:tl}}),Object.freeze(e),t&&Object.values(e).forEach(n=>kp(n,!0))),e}function tl(){Ar(2)}function nl(e){return Object.isFrozen(e)}var FI={};function No(e){const t=FI[e];return t||Ar(0,e),t}var Ka;function pE(){return Ka}function BI(e,t){return{drafts_:[],parent_:e,immer_:t,canAutoFreeze_:!0,unfinalizedDrafts_:0}}function hE(e,t){t&&(No("Patches"),e.patches_=[],e.inversePatches_=[],e.patchListener_=t)}function Cp(e){Np(e),e.drafts_.forEach(UI),e.drafts_=null}function Np(e){e===Ka&&(Ka=e.parent_)}function mE(e){return Ka=BI(Ka,e)}function UI(e){const t=e[nr];t.type_===0||t.type_===1?t.revoke_():t.revoked_=!0}function gE(e,t){t.unfinalizedDrafts_=t.drafts_.length;const n=t.drafts_[0];return e!==void 0&&e!==n?(n[nr].modified_&&(Cp(t),Ar(4)),ko(e)&&(e=rl(t,e),t.parent_||il(t,e)),t.patches_&&No("Patches").generateReplacementPatches_(n[nr].base_,e,t.patches_,t.inversePatches_)):e=rl(t,n,[]),Cp(t),t.patches_&&t.patchListener_(t.patches_,t.inversePatches_),e!==cE?e:void 0}function rl(e,t,n){if(nl(t))return t;const r=t[nr];if(!r)return Jc(t,(i,s)=>yE(e,r,t,i,s,n)),t;if(r.scope_!==e)return t;if(!r.modified_)return il(e,r.base_,!0),r.base_;if(!r.finalized_){r.finalized_=!0,r.scope_.unfinalizedDrafts_--;const i=r.copy_;let s=i,u=!1;r.type_===3&&(s=new Set(i),i.clear(),u=!0),Jc(s,(c,d)=>yE(e,r,i,c,d,n,u)),il(e,i,!1),n&&e.patches_&&No("Patches").generatePatches_(r,n,e.patches_,e.inversePatches_)}return r.copy_}function yE(e,t,n,r,i,s,u){if(Cs(i)){const c=s&&t&&t.type_!==3&&!Sp(t.assigned_,r)?s.concat(r):void 0,d=rl(e,i,c);if(fE(n,r,d),Cs(d))e.canAutoFreeze_=!1;else return}else u&&n.add(i);if(ko(i)&&!nl(i)){if(!e.immer_.autoFreeze_&&e.unfinalizedDrafts_<1)return;rl(e,i),(!t||!t.scope_.parent_)&&typeof r!="symbol"&&(Xa(n)?n.has(r):Object.prototype.propertyIsEnumerable.call(n,r))&&il(e,i)}}function il(e,t,n=!1){!e.parent_&&e.immer_.autoFreeze_&&e.canAutoFreeze_&&kp(t,n)}function jI(e,t){const n=Array.isArray(e),r={type_:n?1:0,scope_:t?t.scope_:pE(),modified_:!1,finalized_:!1,assigned_:{},parent_:t,base_:e,draft_:null,copy_:null,revoke_:null,isManual_:!1};let i=r,s=Ip;n&&(i=[r],s=Qa);const{revoke:u,proxy:c}=Proxy.revocable(i,s);return r.draft_=c,r.revoke_=u,c}var Ip={get(e,t){if(t===nr)return e;const n=Co(e);if(!Sp(n,t))return HI(e,n,t);const r=n[t];return e.finalized_||!ko(r)?r:r===Op(e.base_,t)?(Rp(e),e.copy_[t]=Lp(r,e)):r},has(e,t){return t in Co(e)},ownKeys(e){return Reflect.ownKeys(Co(e))},set(e,t,n){const r=EE(Co(e),t);if(r!=null&&r.set)return r.set.call(e.draft_,n),!0;if(!e.modified_){const i=Op(Co(e),t),s=i==null?void 0:i[nr];if(s&&s.base_===n)return e.copy_[t]=n,e.assigned_[t]=!1,!0;if(MI(n,i)&&(n!==void 0||Sp(e.base_,t)))return!0;Rp(e),Pp(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 Op(e.base_,t)!==void 0||t in e.base_?(e.assigned_[t]=!1,Rp(e),Pp(e)):delete e.assigned_[t],e.copy_&&delete e.copy_[t],!0},getOwnPropertyDescriptor(e,t){const n=Co(e),r=Reflect.getOwnPropertyDescriptor(n,t);return r&&{writable:!0,configurable:e.type_!==1||t!=="length",enumerable:r.enumerable,value:n[t]}},defineProperty(){Ar(11)},getPrototypeOf(e){return ks(e.base_)},setPrototypeOf(){Ar(12)}},Qa={};Jc(Ip,(e,t)=>{Qa[e]=function(){return arguments[0]=arguments[0][0],t.apply(this,arguments)}}),Qa.deleteProperty=function(e,t){return Qa.set.call(this,e,t,void 0)},Qa.set=function(e,t,n){return Ip.set.call(this,e[0],t,n,e[0])};function Op(e,t){const n=e[nr];return(n?Co(n):e)[t]}function HI(e,t,n){var i;const r=EE(t,n);return r?"value"in r?r.value:(i=r.get)==null?void 0:i.call(e.draft_):void 0}function EE(e,t){if(!(t in e))return;let n=ks(e);for(;n;){const r=Object.getOwnPropertyDescriptor(n,t);if(r)return r;n=ks(n)}}function Pp(e){e.modified_||(e.modified_=!0,e.parent_&&Pp(e.parent_))}function Rp(e){e.copy_||(e.copy_=Ap(e.base_,e.scope_.immer_.useStrictShallowCopy_))}var $I=class{constructor(e){this.autoFreeze_=!0,this.useStrictShallowCopy_=!1,this.produce=(t,n,r)=>{if(typeof t=="function"&&typeof n!="function"){const s=n;n=t;const u=this;return function(d=s,...f){return u.produce(d,h=>n.call(this,h,...f))}}typeof n!="function"&&Ar(6),r!==void 0&&typeof r!="function"&&Ar(7);let i;if(ko(t)){const s=mE(this),u=Lp(t,void 0);let c=!0;try{i=n(u),c=!1}finally{c?Cp(s):Np(s)}return hE(s,r),gE(i,s)}else if(!t||typeof t!="object"){if(i=n(t),i===void 0&&(i=t),i===cE&&(i=void 0),this.autoFreeze_&&kp(i,!0),r){const s=[],u=[];No("Patches").generateReplacementPatches_(t,i,s,u),r(s,u)}return i}else Ar(1,t)},this.produceWithPatches=(t,n)=>{if(typeof t=="function")return(u,...c)=>this.produceWithPatches(u,d=>t(d,...c));let r,i;return[this.produce(t,n,(u,c)=>{r=u,i=c}),r,i]},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){ko(e)||Ar(8),Cs(e)&&(e=zI(e));const t=mE(this),n=Lp(e,void 0);return n[nr].isManual_=!0,Np(t),n}finishDraft(e,t){const n=e&&e[nr];(!n||!n.isManual_)&&Ar(9);const{scope_:r}=n;return hE(r,t),gE(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 i=t[n];if(i.path.length===0&&i.op==="replace"){e=i.value;break}}n>-1&&(t=t.slice(n+1));const r=No("Patches").applyPatches_;return Cs(e)?r(e,t):this.produce(e,i=>r(i,t))}};function Lp(e,t){const n=Xa(e)?No("MapSet").proxyMap_(e,t):el(e)?No("MapSet").proxySet_(e,t):jI(e,t);return(t?t.scope_:pE()).drafts_.push(n),n}function zI(e){return Cs(e)||Ar(10,e),bE(e)}function bE(e){if(!ko(e)||nl(e))return e;const t=e[nr];let n;if(t){if(!t.modified_)return t.base_;t.finalized_=!0,n=Ap(e,t.scope_.immer_.useStrictShallowCopy_)}else n=Ap(e,!0);return Jc(n,(r,i)=>{fE(n,r,bE(i))}),t&&(t.finalized_=!1),n}var VI=new $I,qI=VI.produce;function WI(e,t,n){var r=k.useMemo(function(){return qI(e)},[e]);return k.useReducer(r,t,n)}const YI=e=>Array.from(new Set((e!=null?e:[]).map(t=>t.trim()).filter(Boolean))),wE=k.createContext(null),xE=k.createContext(null),GI=({children:e,dispatch:t})=>{const n=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_INITIALIZED,payload:T})},[t]),r=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_OPEN,payload:T})},[t]),i=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_INLINE,payload:T})},[t]),s=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ELEMENT_ID,payload:T})},[t]),u=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ENTRY_TYPE,payload:T})},[t]),c=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID,payload:T})},[t]),d=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_USER_PROMPT,payload:T})},[t]),f=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_PARAMS,payload:T})},[t]),h=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE,payload:T})},[t]),m=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE,payload:T})},[t]),E=k.useCallback(T=>{t({type:It.SET_PROMPTS_EXTENSION_RESPONSE_LOADING,payload:T})},[t]),b=k.useMemo(()=>({setIsInitialized:n,setIsOpen:r,setIsInline:i,setElementId:s,setEntryType:u,setActivePromptsId:c,setUserPrompt:d,setParams:f,setPromptsMessage:h,setResponseMessage:m,setIsResponseLoading:E}),[n,r,i,s,u,c,d,f,h,m,E]);return w.jsx(xE.Provider,{value:b,children:e})},XI=(e,t)=>{const{type:n,payload:r}=t;switch(n){case It.SET_PROMPTS_EXTENSION_INITIALIZED:e.isInitialized=r;break;case It.SET_PROMPTS_EXTENSION_OPEN:e.isOpen=r;break;case It.SET_PROMPTS_EXTENSION_INLINE:e.isInline=r;break;case It.SET_PROMPTS_EXTENSION_ELEMENT_ID:e.elementId=r;break;case It.SET_PROMPTS_EXTENSION_ENTRY_TYPE:e.entryType=r;break;case It.SET_PROMPTS_EXTENSION_PARAMS:e.params=r;break;case It.RESET_PROMPTS_EXTENSION_PARAMS:e.params=null;break;case It.SET_PROMPTS_EXTENSION_USER_PROMPT:e.userPrompt=r;break;case It.SET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=r;break;case It.RESET_PROMPTS_EXTENSION_ACTIVE_PROMPTS_ID:e.activePromptsId=null;break;case It.SET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=r;break;case It.RESET_PROMPTS_EXTENSION_PROMPTS_MESSAGE:e.promptsMessage=null;break;case It.SET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=r;break;case It.RESET_PROMPTS_EXTENSION_RESPONSE_MESSAGE:e.responseMessage=null;break;case It.SET_PROMPTS_EXTENSION_RESPONSE_LOADING:e.isResponseLoading=r;break}},KI=({promptsConfig:e,children:t})=>{const[n,r]=WI(XI,ce(M(M({},R1),e||{}),{staticQuestions:YI((e==null?void 0:e.staticQuestions)||[])}));return w.jsx(wE.Provider,{value:n,children:w.jsx(GI,{dispatch:r,children:t})})},QI={productId:Zn.productId,pdpLink:Zn.pdpLink},TE=k.createContext(QI),JI=({children:e})=>{const[t,n]=k.useState(Zn.productId),[r,i]=k.useState(Zn.pdpLink);k.useEffect(()=>{const u=({detail:c})=>{if((c==null?void 0:c.property)==="pdp-context"){const d=c.value;n(d.productId),i(d.pdpLink);return}(c==null?void 0:c.property)==="productId"&&n(c.value),(c==null?void 0:c.property)==="pdpLink"&&i(c.value)};return r1(u),()=>{i1(u)}},[]);const s=k.useMemo(()=>({productId:t,pdpLink:r}),[t,r]);return w.jsx(TE.Provider,{value:s,children:e})},_E=({mode:e,layoutPreset:t,apiKey:n,apiToken:r,baseUrl:i,logoUrl:s,headerText:u,headerConfig:c,theme:d,openLinksInNewTab:f,onNavigate:h,globalClassName:m,isDevelopment:E=!1,componentType:b,componentConfig:T,initialEntry:_,entryMessage:I,disclaimerText:v,disclaimerMarkdown:S,clientContext:R,searchPlaceholder:U,searchButtonLabel:B,searchConfig:A,suggestionButtonConfig:G,messageAlignment:W,autoScroll:re,promptsConfig:H,showProductDescription:ee,resetConversationMessage:Q,conversationHistory:me,messagingConfig:V,overrides:ue,overridesUrl:fe,inlineOverrides:ae,__features:J,children:se})=>{var Re,pe,Ne,ve;const O=E||pk(),j=k.useRef({}),q=k.useRef(!1);q.current||(q.current=!0,j.current=dk({enablePageContext:!!(V!=null&&V.enablePageContext),initialPageContext:V==null?void 0:V.initialPageContext,initialEntry:_,isDevelopment:O}));const P=(Re=c==null?void 0:c.actions)==null?void 0:Re.minimize,ge=k.useMemo(()=>P===void 0?T:ce(M({},T),{enableMinimize:jf(P,!!(T!=null&&T.enableMinimize))}),[T,P]);return w.jsx(hN,{mode:e,layoutPreset:t,baseUrl:i,apiKey:n,apiToken:r,logoUrl:s,headerText:u,headerConfig:c,entryMessage:I,theme:d,globalClassName:m,openLinksInNewTab:f,onNavigate:h,searchPlaceholder:U,searchButtonLabel:B,searchConfig:A,suggestionButtonConfig:G,messageAlignment:W,autoScroll:re,showProductDescription:ee,componentConfig:ge,clientContext:R,disclaimerMarkdown:S,disclaimerText:v,resetConversationMessage:Q,conversationHistory:me,isDevelopment:O,__features:J,progressStepsLimit:V==null?void 0:V.progressStepsLimit,routingAttributes:V==null?void 0:V.routingAttributes,enableDownloadTranscript:jf((pe=c==null?void 0:c.actions)==null?void 0:pe.downloadTranscript,(Ne=V==null?void 0:V.enableDownloadTranscript)!=null?Ne:!0),enablePageContext:V==null?void 0:V.enablePageContext,enableEscalationToAgent:V==null?void 0:V.enableEscalationToAgent,enableImageUpload:V==null?void 0:V.enableImageUpload,showProductCaptions:V==null?void 0:V.showProductCaptions,connectingMessages:V==null?void 0:V.connectingMessages,children:w.jsx(Xk,{entryType:(ve=j.current.entryType)!=null?ve:_==null?void 0:_.type,componentConfig:T,componentType:b,children:w.jsx(JI,{children:w.jsx(KI,{promptsConfig:H,children:w.jsx(Ek,{overridesUrl:fe,inlineOverrides:ae||ue,children:w.jsx(uE,{scrt2Url:(V==null?void 0:V.scrt2Url)||"",orgId:(V==null?void 0:V.orgId)||"",esDeveloperName:(V==null?void 0:V.esDeveloperName)||"",routingAttributes:(V==null?void 0:V.routingAttributes)||{},conversationId:V==null?void 0:V.conversationId,continuationToken:V==null?void 0:V.continuationToken,lastEventId:V==null?void 0:V.lastEventId,capabilitiesVersion:V==null?void 0:V.capabilitiesVersion,enablePageContext:V==null?void 0:V.enablePageContext,enableLogging:O,onProductResult:V==null?void 0:V.onProductResult,onEndConversation:V==null?void 0:V.onEndConversation,onSessionUpdate:V==null?void 0:V.onSessionUpdate,children:se})})})})})})};var Dp={exports:{}},Hn={},Mp={exports:{}},Fp={};var vE;function ZI(){return vE||(vE=1,(function(e){function t(J,se){var O=J.length;J.push(se);e:for(;0<O;){var j=O-1>>>1,q=J[j];if(0<i(q,se))J[j]=se,J[O]=q,O=j;else break e}}function n(J){return J.length===0?null:J[0]}function r(J){if(J.length===0)return null;var se=J[0],O=J.pop();if(O!==se){J[0]=O;e:for(var j=0,q=J.length,P=q>>>1;j<P;){var ge=2*(j+1)-1,Re=J[ge],pe=ge+1,Ne=J[pe];if(0>i(Re,O))pe<q&&0>i(Ne,Re)?(J[j]=Ne,J[pe]=O,j=pe):(J[j]=Re,J[ge]=O,j=ge);else if(pe<q&&0>i(Ne,O))J[j]=Ne,J[pe]=O,j=pe;else break e}}return se}function i(J,se){var O=J.sortIndex-se.sortIndex;return O!==0?O:J.id-se.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;e.unstable_now=function(){return s.now()}}else{var u=Date,c=u.now();e.unstable_now=function(){return u.now()-c}}var d=[],f=[],h=1,m=null,E=3,b=!1,T=!1,_=!1,I=typeof setTimeout=="function"?setTimeout:null,v=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate!="undefined"?setImmediate:null;typeof navigator!="undefined"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function R(J){for(var se=n(f);se!==null;){if(se.callback===null)r(f);else if(se.startTime<=J)r(f),se.sortIndex=se.expirationTime,t(d,se);else break;se=n(f)}}function U(J){if(_=!1,R(J),!T)if(n(d)!==null)T=!0,fe(B);else{var se=n(f);se!==null&&ae(U,se.startTime-J)}}function B(J,se){T=!1,_&&(_=!1,v(W),W=-1),b=!0;var O=E;try{for(R(se),m=n(d);m!==null&&(!(m.expirationTime>se)||J&&!ee());){var j=m.callback;if(typeof j=="function"){m.callback=null,E=m.priorityLevel;var q=j(m.expirationTime<=se);se=e.unstable_now(),typeof q=="function"?m.callback=q:m===n(d)&&r(d),R(se)}else r(d);m=n(d)}if(m!==null)var P=!0;else{var ge=n(f);ge!==null&&ae(U,ge.startTime-se),P=!1}return P}finally{m=null,E=O,b=!1}}var A=!1,G=null,W=-1,re=5,H=-1;function ee(){return!(e.unstable_now()-H<re)}function Q(){if(G!==null){var J=e.unstable_now();H=J;var se=!0;try{se=G(!0,J)}finally{se?me():(A=!1,G=null)}}else A=!1}var me;if(typeof S=="function")me=function(){S(Q)};else if(typeof MessageChannel!="undefined"){var V=new MessageChannel,ue=V.port2;V.port1.onmessage=Q,me=function(){ue.postMessage(null)}}else me=function(){I(Q,0)};function fe(J){G=J,A||(A=!0,me())}function ae(J,se){W=I(function(){J(e.unstable_now())},se)}e.unstable_IdlePriority=5,e.unstable_ImmediatePriority=1,e.unstable_LowPriority=4,e.unstable_NormalPriority=3,e.unstable_Profiling=null,e.unstable_UserBlockingPriority=2,e.unstable_cancelCallback=function(J){J.callback=null},e.unstable_continueExecution=function(){T||b||(T=!0,fe(B))},e.unstable_forceFrameRate=function(J){0>J||125<J?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):re=0<J?Math.floor(1e3/J):5},e.unstable_getCurrentPriorityLevel=function(){return E},e.unstable_getFirstCallbackNode=function(){return n(d)},e.unstable_next=function(J){switch(E){case 1:case 2:case 3:var se=3;break;default:se=E}var O=E;E=se;try{return J()}finally{E=O}},e.unstable_pauseExecution=function(){},e.unstable_requestPaint=function(){},e.unstable_runWithPriority=function(J,se){switch(J){case 1:case 2:case 3:case 4:case 5:break;default:J=3}var O=E;E=J;try{return se()}finally{E=O}},e.unstable_scheduleCallback=function(J,se,O){var j=e.unstable_now();switch(typeof O=="object"&&O!==null?(O=O.delay,O=typeof O=="number"&&0<O?j+O:j):O=j,J){case 1:var q=-1;break;case 2:q=250;break;case 5:q=1073741823;break;case 4:q=1e4;break;default:q=5e3}return q=O+q,J={id:h++,callback:se,priorityLevel:J,startTime:O,expirationTime:q,sortIndex:-1},O>j?(J.sortIndex=O,t(f,J),n(d)===null&&J===n(f)&&(_?(v(W),W=-1):_=!0,ae(U,O-j))):(J.sortIndex=q,t(d,J),T||b||(T=!0,fe(B))),J},e.unstable_shouldYield=ee,e.unstable_wrapCallback=function(J){var se=E;return function(){var O=E;E=se;try{return J.apply(this,arguments)}finally{E=O}}}})(Fp)),Fp}var SE;function eO(){return SE||(SE=1,Mp.exports=ZI()),Mp.exports}var AE;function tO(){if(AE)return Hn;AE=1;var e=vr(),t=eO();function n(o){for(var a="https://reactjs.org/docs/error-decoder.html?invariant="+o,l=1;l<arguments.length;l++)a+="&args[]="+encodeURIComponent(arguments[l]);return"Minified React error #"+o+"; visit "+a+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var r=new Set,i={};function s(o,a){u(o,a),u(o+"Capture",a)}function u(o,a){for(i[o]=a,o=0;o<a.length;o++)r.add(a[o])}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]*$/,h={},m={};function E(o){return d.call(m,o)?!0:d.call(h,o)?!1:f.test(o)?m[o]=!0:(h[o]=!0,!1)}function b(o,a,l,p){if(l!==null&&l.type===0)return!1;switch(typeof a){case"function":case"symbol":return!0;case"boolean":return p?!1:l!==null?!l.acceptsBooleans:(o=o.toLowerCase().slice(0,5),o!=="data-"&&o!=="aria-");default:return!1}}function T(o,a,l,p){if(a===null||typeof a=="undefined"||b(o,a,l,p))return!0;if(p)return!1;if(l!==null)switch(l.type){case 3:return!a;case 4:return a===!1;case 5:return isNaN(a);case 6:return isNaN(a)||1>a}return!1}function _(o,a,l,p,y,x,C){this.acceptsBooleans=a===2||a===3||a===4,this.attributeName=p,this.attributeNamespace=y,this.mustUseProperty=l,this.propertyName=o,this.type=a,this.sanitizeURL=x,this.removeEmptyString=C}var I={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(o){I[o]=new _(o,0,!1,o,null,!1,!1)}),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(o){var a=o[0];I[a]=new _(a,1,!1,o[1],null,!1,!1)}),["contentEditable","draggable","spellCheck","value"].forEach(function(o){I[o]=new _(o,2,!1,o.toLowerCase(),null,!1,!1)}),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(o){I[o]=new _(o,2,!1,o,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(o){I[o]=new _(o,3,!1,o.toLowerCase(),null,!1,!1)}),["checked","multiple","muted","selected"].forEach(function(o){I[o]=new _(o,3,!0,o,null,!1,!1)}),["capture","download"].forEach(function(o){I[o]=new _(o,4,!1,o,null,!1,!1)}),["cols","rows","size","span"].forEach(function(o){I[o]=new _(o,6,!1,o,null,!1,!1)}),["rowSpan","start"].forEach(function(o){I[o]=new _(o,5,!1,o.toLowerCase(),null,!1,!1)});var v=/[\-:]([a-z])/g;function S(o){return o[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(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,null,!1,!1)}),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,"http://www.w3.org/1999/xlink",!1,!1)}),["xml:base","xml:lang","xml:space"].forEach(function(o){var a=o.replace(v,S);I[a]=new _(a,1,!1,o,"http://www.w3.org/XML/1998/namespace",!1,!1)}),["tabIndex","crossOrigin"].forEach(function(o){I[o]=new _(o,1,!1,o.toLowerCase(),null,!1,!1)}),I.xlinkHref=new _("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach(function(o){I[o]=new _(o,1,!1,o.toLowerCase(),null,!0,!0)});function R(o,a,l,p){var y=I.hasOwnProperty(a)?I[a]:null;(y!==null?y.type!==0:p||!(2<a.length)||a[0]!=="o"&&a[0]!=="O"||a[1]!=="n"&&a[1]!=="N")&&(T(a,l,y,p)&&(l=null),p||y===null?E(a)&&(l===null?o.removeAttribute(a):o.setAttribute(a,""+l)):y.mustUseProperty?o[y.propertyName]=l===null?y.type===3?!1:"":l:(a=y.attributeName,p=y.attributeNamespace,l===null?o.removeAttribute(a):(y=y.type,l=y===3||y===4&&l===!0?"":""+l,p?o.setAttributeNS(p,a,l):o.setAttribute(a,l))))}var U=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,B=Symbol.for("react.element"),A=Symbol.for("react.portal"),G=Symbol.for("react.fragment"),W=Symbol.for("react.strict_mode"),re=Symbol.for("react.profiler"),H=Symbol.for("react.provider"),ee=Symbol.for("react.context"),Q=Symbol.for("react.forward_ref"),me=Symbol.for("react.suspense"),V=Symbol.for("react.suspense_list"),ue=Symbol.for("react.memo"),fe=Symbol.for("react.lazy"),ae=Symbol.for("react.offscreen"),J=Symbol.iterator;function se(o){return o===null||typeof o!="object"?null:(o=J&&o[J]||o["@@iterator"],typeof o=="function"?o:null)}var O=Object.assign,j;function q(o){if(j===void 0)try{throw Error()}catch(l){var a=l.stack.trim().match(/\n( *(at )?)/);j=a&&a[1]||""}return`
17
17
  `+j+o}var P=!1;function ge(o,a){if(!o||P)return"";P=!0;var l=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(a)if(a=function(){throw Error()},Object.defineProperty(a.prototype,"props",{set:function(){throw Error()}}),typeof Reflect=="object"&&Reflect.construct){try{Reflect.construct(a,[])}catch(oe){var p=oe}Reflect.construct(o,[],a)}else{try{a.call()}catch(oe){p=oe}o.call(a.prototype)}else{try{throw Error()}catch(oe){p=oe}o()}}catch(oe){if(oe&&p&&typeof oe.stack=="string"){for(var y=oe.stack.split(`
18
18
  `),x=p.stack.split(`
19
19
  `),C=y.length-1,$=x.length-1;1<=C&&0<=$&&y[C]!==x[$];)$--;for(;1<=C&&0<=$;C--,$--)if(y[C]!==x[$]){if(C!==1||$!==1)do if(C--,$--,0>$||y[C]!==x[$]){var Y=`
20
- `+y[C].replace(" at new "," at ");return o.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",o.displayName)),Y}while(1<=C&&0<=$);break}}}finally{P=!1,Error.prepareStackTrace=l}return(o=o?o.displayName||o.name:"")?q(o):""}function Re(o){switch(o.tag){case 5:return q(o.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return o=ge(o.type,!1),o;case 11:return o=ge(o.type.render,!1),o;case 1:return o=ge(o.type,!0),o;default:return""}}function pe(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case G:return"Fragment";case A:return"Portal";case re:return"Profiler";case W:return"StrictMode";case me:return"Suspense";case V:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case ee:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case Q:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ue:return a=o.displayName||null,a!==null?a:pe(o.type)||"Memo";case fe:a=o._payload,o=o._init;try{return pe(o(a))}catch(l){}}return null}function Ne(o){var a=o.type;switch(o.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=a.render,o=o.displayName||o.name||"",a.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(a);case 8:return a===W?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ve(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ze(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function rt(o){var a=ze(o)?"checked":"value",l=Object.getOwnPropertyDescriptor(o.constructor.prototype,a),p=""+o[a];if(!o.hasOwnProperty(a)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var y=l.get,x=l.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return y.call(this)},set:function(C){p=""+C,x.call(this,C)}}),Object.defineProperty(o,a,{enumerable:l.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function Ot(o){o._valueTracker||(o._valueTracker=rt(o))}function ct(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var l=a.getValue(),p="";return o&&(p=ze(o)?o.checked?"true":"false":o.value),o=p,o!==l?(a.setValue(o),!0):!1}function _t(o){if(o=o||(typeof document!="undefined"?document:void 0),typeof o=="undefined")return null;try{return o.activeElement||o.body}catch(a){return o.body}}function tt(o,a){var l=a.checked;return O({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:o._wrapperState.initialChecked})}function yt(o,a){var l=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;l=ve(a.value!=null?a.value:l),o._wrapperState={initialChecked:p,initialValue:l,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function De(o,a){a=a.checked,a!=null&&R(o,"checked",a,!1)}function Ve(o,a){De(o,a);var l=ve(a.value),p=a.type;if(l!=null)p==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+l):o.value!==""+l&&(o.value=""+l);else if(p==="submit"||p==="reset"){o.removeAttribute("value");return}a.hasOwnProperty("value")?it(o,a.type,l):a.hasOwnProperty("defaultValue")&&it(o,a.type,ve(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(o.defaultChecked=!!a.defaultChecked)}function Oe(o,a,l){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+o._wrapperState.initialValue,l||a===o.value||(o.value=a),o.defaultValue=a}l=o.name,l!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,l!==""&&(o.name=l)}function it(o,a,l){(a!=="number"||_t(o.ownerDocument)!==o)&&(l==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+l&&(o.defaultValue=""+l))}var lt=Array.isArray;function jt(o,a,l,p){if(o=o.options,a){a={};for(var y=0;y<l.length;y++)a["$"+l[y]]=!0;for(l=0;l<o.length;l++)y=a.hasOwnProperty("$"+o[l].value),o[l].selected!==y&&(o[l].selected=y),y&&p&&(o[l].defaultSelected=!0)}else{for(l=""+ve(l),a=null,y=0;y<o.length;y++){if(o[y].value===l){o[y].selected=!0,p&&(o[y].defaultSelected=!0);return}a!==null||o[y].disabled||(a=o[y])}a!==null&&(a.selected=!0)}}function At(o,a){if(a.dangerouslySetInnerHTML!=null)throw Error(n(91));return O({},a,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Ei(o,a){var l=a.value;if(l==null){if(l=a.children,a=a.defaultValue,l!=null){if(a!=null)throw Error(n(92));if(lt(l)){if(1<l.length)throw Error(n(93));l=l[0]}a=l}a==null&&(a=""),l=a}o._wrapperState={initialValue:ve(l)}}function sr(o,a){var l=ve(a.value),p=ve(a.defaultValue);l!=null&&(l=""+l,l!==o.value&&(o.value=l),a.defaultValue==null&&o.defaultValue!==l&&(o.defaultValue=l)),p!=null&&(o.defaultValue=""+p)}function Ko(o){var a=o.textContent;a===o._wrapperState.initialValue&&a!==""&&a!==null&&(o.value=a)}function he(o){switch(o){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 ke(o,a){return o==null||o==="http://www.w3.org/1999/xhtml"?he(a):o==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Qe,Je=(function(o){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(a,l,p,y){MSApp.execUnsafeLocalFunction(function(){return o(a,l,p,y)})}:o})(function(o,a){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=a;else{for(Qe=Qe||document.createElement("div"),Qe.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=Qe.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;a.firstChild;)o.appendChild(a.firstChild)}});function et(o,a){if(a){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=a;return}}o.textContent=a}var Yt={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},Yn=["Webkit","ms","Moz","O"];Object.keys(Yt).forEach(function(o){Yn.forEach(function(a){a=a+o.charAt(0).toUpperCase()+o.substring(1),Yt[a]=Yt[o]})});function mn(o,a,l){return a==null||typeof a=="boolean"||a===""?"":l||typeof a!="number"||a===0||Yt.hasOwnProperty(o)&&Yt[o]?(""+a).trim():a+"px"}function Gt(o,a){o=o.style;for(var l in a)if(a.hasOwnProperty(l)){var p=l.indexOf("--")===0,y=mn(l,a[l],p);l==="float"&&(l="cssFloat"),p?o.setProperty(l,y):o[l]=y}}var en=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xt(o,a){if(a){if(en[o]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function Mn(o,a){if(o.indexOf("-")===-1)return typeof a.is=="string";switch(o){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 wn=null;function sa(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Qo=null,bi=null,wi=null;function fd(o){if(o=oc(o)){if(typeof Qo!="function")throw Error(n(280));var a=o.stateNode;a&&(a=Pd(a),Qo(o.stateNode,o.type,a))}}function Mu(o){bi?wi?wi.push(o):wi=[o]:bi=o}function Fu(){if(bi){var o=bi,a=wi;if(wi=bi=null,fd(o),a)for(o=0;o<a.length;o++)fd(a[o])}}function yr(o,a){return o(a)}function Wi(){}var aa=!1;function Bu(o,a,l){if(aa)return o(a,l);aa=!0;try{return yr(o,a,l)}finally{aa=!1,(bi!==null||wi!==null)&&(Wi(),Fu())}}function Yi(o,a){var l=o.stateNode;if(l===null)return null;var p=Pd(l);if(p===null)return null;l=p[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(l&&typeof l!="function")throw Error(n(231,a,typeof l));return l}var ua=!1;if(c)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){ua=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch(o){ua=!1}function Uu(o,a,l,p,y,x,C,$,Y){var oe=Array.prototype.slice.call(arguments,3);try{a.apply(l,oe)}catch(xe){this.onError(xe)}}var Gi=!1,Xi=null,Ti=!1,Ki=null,eg={onError:function(o){Gi=!0,Xi=o}};function Z(o,a,l,p,y,x,C,$,Y){Gi=!1,Xi=null,Uu.apply(eg,arguments)}function ye(o,a,l,p,y,x,C,$,Y){if(Z.apply(this,arguments),Gi){if(Gi){var oe=Xi;Gi=!1,Xi=null}else throw Error(n(198));Ti||(Ti=!0,Ki=oe)}}function Ee(o){var a=o,l=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(l=a.return),o=a.return;while(o)}return a.tag===3?l:null}function Se(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function de(o){if(Ee(o)!==o)throw Error(n(188))}function Le(o){var a=o.alternate;if(!a){if(a=Ee(o),a===null)throw Error(n(188));return a!==o?null:o}for(var l=o,p=a;;){var y=l.return;if(y===null)break;var x=y.alternate;if(x===null){if(p=y.return,p!==null){l=p;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===l)return de(y),o;if(x===p)return de(y),a;x=x.sibling}throw Error(n(188))}if(l.return!==p.return)l=y,p=x;else{for(var C=!1,$=y.child;$;){if($===l){C=!0,l=y,p=x;break}if($===p){C=!0,p=y,l=x;break}$=$.sibling}if(!C){for($=x.child;$;){if($===l){C=!0,l=x,p=y;break}if($===p){C=!0,p=x,l=y;break}$=$.sibling}if(!C)throw Error(n(189))}}if(l.alternate!==p)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?o:a}function $e(o){return o=Le(o),o!==null?bt(o):null}function bt(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var a=bt(o);if(a!==null)return a;o=o.sibling}return null}var dt=t.unstable_scheduleCallback,Ze=t.unstable_cancelCallback,ft=t.unstable_shouldYield,Kt=t.unstable_requestPaint,at=t.unstable_now,Pt=t.unstable_getCurrentPriorityLevel,Ht=t.unstable_ImmediatePriority,oi=t.unstable_UserBlockingPriority,Jo=t.unstable_NormalPriority,pd=t.unstable_LowPriority,ju=t.unstable_IdlePriority,Zo=null,ar=null;function es(o){if(ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(Zo,o,void 0,(o.current.flags&128)===128)}catch(a){}}var Lr=Math.clz32?Math.clz32:o$,r$=Math.log,i$=Math.LN2;function o$(o){return o>>>=0,o===0?32:31-(r$(o)/i$|0)|0}var hd=64,md=4194304;function Hu(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function gd(o,a){var l=o.pendingLanes;if(l===0)return 0;var p=0,y=o.suspendedLanes,x=o.pingedLanes,C=l&268435455;if(C!==0){var $=C&~y;$!==0?p=Hu($):(x&=C,x!==0&&(p=Hu(x)))}else C=l&~y,C!==0?p=Hu(C):x!==0&&(p=Hu(x));if(p===0)return 0;if(a!==0&&a!==p&&(a&y)===0&&(y=p&-p,x=a&-a,y>=x||y===16&&(x&4194240)!==0))return a;if((p&4)!==0&&(p|=l&16),a=o.entangledLanes,a!==0)for(o=o.entanglements,a&=p;0<a;)l=31-Lr(a),y=1<<l,p|=o[l],a&=~y;return p}function s$(o,a){switch(o){case 1:case 2:case 4:return a+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 a+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 a$(o,a){for(var l=o.suspendedLanes,p=o.pingedLanes,y=o.expirationTimes,x=o.pendingLanes;0<x;){var C=31-Lr(x),$=1<<C,Y=y[C];Y===-1?(($&l)===0||($&p)!==0)&&(y[C]=s$($,a)):Y<=a&&(o.expiredLanes|=$),x&=~$}}function tg(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Av(){var o=hd;return hd<<=1,(hd&4194240)===0&&(hd=64),o}function ng(o){for(var a=[],l=0;31>l;l++)a.push(o);return a}function $u(o,a,l){o.pendingLanes|=a,a!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,a=31-Lr(a),o[a]=l}function u$(o,a){var l=o.pendingLanes&~a;o.pendingLanes=a,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=a,o.mutableReadLanes&=a,o.entangledLanes&=a,a=o.entanglements;var p=o.eventTimes;for(o=o.expirationTimes;0<l;){var y=31-Lr(l),x=1<<y;a[y]=0,p[y]=-1,o[y]=-1,l&=~x}}function rg(o,a){var l=o.entangledLanes|=a;for(o=o.entanglements;l;){var p=31-Lr(l),y=1<<p;y&a|o[p]&a&&(o[p]|=a),l&=~y}}var vt=0;function kv(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Cv,ig,Nv,Iv,Ov,og=!1,yd=[],Qi=null,Ji=null,Zi=null,zu=new Map,Vu=new Map,eo=[],c$="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 Pv(o,a){switch(o){case"focusin":case"focusout":Qi=null;break;case"dragenter":case"dragleave":Ji=null;break;case"mouseover":case"mouseout":Zi=null;break;case"pointerover":case"pointerout":zu.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vu.delete(a.pointerId)}}function qu(o,a,l,p,y,x){return o===null||o.nativeEvent!==x?(o={blockedOn:a,domEventName:l,eventSystemFlags:p,nativeEvent:x,targetContainers:[y]},a!==null&&(a=oc(a),a!==null&&ig(a)),o):(o.eventSystemFlags|=p,a=o.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),o)}function l$(o,a,l,p,y){switch(a){case"focusin":return Qi=qu(Qi,o,a,l,p,y),!0;case"dragenter":return Ji=qu(Ji,o,a,l,p,y),!0;case"mouseover":return Zi=qu(Zi,o,a,l,p,y),!0;case"pointerover":var x=y.pointerId;return zu.set(x,qu(zu.get(x)||null,o,a,l,p,y)),!0;case"gotpointercapture":return x=y.pointerId,Vu.set(x,qu(Vu.get(x)||null,o,a,l,p,y)),!0}return!1}function Rv(o){var a=ts(o.target);if(a!==null){var l=Ee(a);if(l!==null){if(a=l.tag,a===13){if(a=Se(l),a!==null){o.blockedOn=a,Ov(o.priority,function(){Nv(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Ed(o){if(o.blockedOn!==null)return!1;for(var a=o.targetContainers;0<a.length;){var l=ag(o.domEventName,o.eventSystemFlags,a[0],o.nativeEvent);if(l===null){l=o.nativeEvent;var p=new l.constructor(l.type,l);wn=p,l.target.dispatchEvent(p),wn=null}else return a=oc(l),a!==null&&ig(a),o.blockedOn=l,!1;a.shift()}return!0}function Lv(o,a,l){Ed(o)&&l.delete(a)}function d$(){og=!1,Qi!==null&&Ed(Qi)&&(Qi=null),Ji!==null&&Ed(Ji)&&(Ji=null),Zi!==null&&Ed(Zi)&&(Zi=null),zu.forEach(Lv),Vu.forEach(Lv)}function Wu(o,a){o.blockedOn===a&&(o.blockedOn=null,og||(og=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,d$)))}function Yu(o){function a(y){return Wu(y,o)}if(0<yd.length){Wu(yd[0],o);for(var l=1;l<yd.length;l++){var p=yd[l];p.blockedOn===o&&(p.blockedOn=null)}}for(Qi!==null&&Wu(Qi,o),Ji!==null&&Wu(Ji,o),Zi!==null&&Wu(Zi,o),zu.forEach(a),Vu.forEach(a),l=0;l<eo.length;l++)p=eo[l],p.blockedOn===o&&(p.blockedOn=null);for(;0<eo.length&&(l=eo[0],l.blockedOn===null);)Rv(l),l.blockedOn===null&&eo.shift()}var ca=U.ReactCurrentBatchConfig,bd=!0;function f$(o,a,l,p){var y=vt,x=ca.transition;ca.transition=null;try{vt=1,sg(o,a,l,p)}finally{vt=y,ca.transition=x}}function p$(o,a,l,p){var y=vt,x=ca.transition;ca.transition=null;try{vt=4,sg(o,a,l,p)}finally{vt=y,ca.transition=x}}function sg(o,a,l,p){if(bd){var y=ag(o,a,l,p);if(y===null)vg(o,a,p,wd,l),Pv(o,p);else if(l$(y,o,a,l,p))p.stopPropagation();else if(Pv(o,p),a&4&&-1<c$.indexOf(o)){for(;y!==null;){var x=oc(y);if(x!==null&&Cv(x),x=ag(o,a,l,p),x===null&&vg(o,a,p,wd,l),x===y)break;y=x}y!==null&&p.stopPropagation()}else vg(o,a,p,null,l)}}var wd=null;function ag(o,a,l,p){if(wd=null,o=sa(p),o=ts(o),o!==null)if(a=Ee(o),a===null)o=null;else if(l=a.tag,l===13){if(o=Se(a),o!==null)return o;o=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;o=null}else a!==o&&(o=null);return wd=o,null}function Dv(o){switch(o){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(Pt()){case Ht:return 1;case oi:return 4;case Jo:case pd:return 16;case ju:return 536870912;default:return 16}default:return 16}}var to=null,ug=null,xd=null;function Mv(){if(xd)return xd;var o,a=ug,l=a.length,p,y="value"in to?to.value:to.textContent,x=y.length;for(o=0;o<l&&a[o]===y[o];o++);var C=l-o;for(p=1;p<=C&&a[l-p]===y[x-p];p++);return xd=y.slice(o,1<p?1-p:void 0)}function Td(o){var a=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&a===13&&(o=13)):o=a,o===10&&(o=13),32<=o||o===13?o:0}function _d(){return!0}function Fv(){return!1}function ur(o){function a(l,p,y,x,C){this._reactName=l,this._targetInst=y,this.type=p,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(l=o[$],this[$]=l?l(x):x[$]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?_d:Fv,this.isPropagationStopped=Fv,this}return O(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=_d)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=_d)},persist:function(){},isPersistent:_d}),a}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cg=ur(la),Gu=O({},la,{view:0,detail:0}),h$=ur(Gu),lg,dg,Xu,vd=O({},Gu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Xu&&(Xu&&o.type==="mousemove"?(lg=o.screenX-Xu.screenX,dg=o.screenY-Xu.screenY):dg=lg=0,Xu=o),lg)},movementY:function(o){return"movementY"in o?o.movementY:dg}}),Bv=ur(vd),m$=O({},vd,{dataTransfer:0}),g$=ur(m$),y$=O({},Gu,{relatedTarget:0}),fg=ur(y$),E$=O({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),b$=ur(E$),w$=O({},la,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),x$=ur(w$),T$=O({},la,{data:0}),Uv=ur(T$),_$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},v$={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"},S$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function A$(o){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(o):(o=S$[o])?!!a[o]:!1}function pg(){return A$}var k$=O({},Gu,{key:function(o){if(o.key){var a=_$[o.key]||o.key;if(a!=="Unidentified")return a}return o.type==="keypress"?(o=Td(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?v$[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pg,charCode:function(o){return o.type==="keypress"?Td(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Td(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),C$=ur(k$),N$=O({},vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jv=ur(N$),I$=O({},Gu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pg}),O$=ur(I$),P$=O({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),R$=ur(P$),L$=O({},vd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),D$=ur(L$),M$=[9,13,27,32],hg=c&&"CompositionEvent"in window,Ku=null;c&&"documentMode"in document&&(Ku=document.documentMode);var F$=c&&"TextEvent"in window&&!Ku,Hv=c&&(!hg||Ku&&8<Ku&&11>=Ku),$v=" ",zv=!1;function Vv(o,a){switch(o){case"keyup":return M$.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qv(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var da=!1;function B$(o,a){switch(o){case"compositionend":return qv(a);case"keypress":return a.which!==32?null:(zv=!0,$v);case"textInput":return o=a.data,o===$v&&zv?null:o;default:return null}}function U$(o,a){if(da)return o==="compositionend"||!hg&&Vv(o,a)?(o=Mv(),xd=ug=to=null,da=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Hv&&a.locale!=="ko"?null:a.data;default:return null}}var j$={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 Wv(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a==="input"?!!j$[o.type]:a==="textarea"}function Yv(o,a,l,p){Mu(p),a=Nd(a,"onChange"),0<a.length&&(l=new cg("onChange","change",null,l,p),o.push({event:l,listeners:a}))}var Qu=null,Ju=null;function H$(o){d2(o,0)}function Sd(o){var a=ga(o);if(ct(a))return o}function $$(o,a){if(o==="change")return a}var Gv=!1;if(c){var mg;if(c){var gg="oninput"in document;if(!gg){var Xv=document.createElement("div");Xv.setAttribute("oninput","return;"),gg=typeof Xv.oninput=="function"}mg=gg}else mg=!1;Gv=mg&&(!document.documentMode||9<document.documentMode)}function Kv(){Qu&&(Qu.detachEvent("onpropertychange",Qv),Ju=Qu=null)}function Qv(o){if(o.propertyName==="value"&&Sd(Ju)){var a=[];Yv(a,Ju,o,sa(o)),Bu(H$,a)}}function z$(o,a,l){o==="focusin"?(Kv(),Qu=a,Ju=l,Qu.attachEvent("onpropertychange",Qv)):o==="focusout"&&Kv()}function V$(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Sd(Ju)}function q$(o,a){if(o==="click")return Sd(a)}function W$(o,a){if(o==="input"||o==="change")return Sd(a)}function Y$(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var Dr=typeof Object.is=="function"?Object.is:Y$;function Zu(o,a){if(Dr(o,a))return!0;if(typeof o!="object"||o===null||typeof a!="object"||a===null)return!1;var l=Object.keys(o),p=Object.keys(a);if(l.length!==p.length)return!1;for(p=0;p<l.length;p++){var y=l[p];if(!d.call(a,y)||!Dr(o[y],a[y]))return!1}return!0}function Jv(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Zv(o,a){var l=Jv(o);o=0;for(var p;l;){if(l.nodeType===3){if(p=o+l.textContent.length,o<=a&&p>=a)return{node:l,offset:a-o};o=p}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Jv(l)}}function e2(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?e2(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function t2(){for(var o=window,a=_t();a instanceof o.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch(p){l=!1}if(l)o=a.contentWindow;else break;a=_t(o.document)}return a}function yg(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}function G$(o){var a=t2(),l=o.focusedElem,p=o.selectionRange;if(a!==l&&l&&l.ownerDocument&&e2(l.ownerDocument.documentElement,l)){if(p!==null&&yg(l)){if(a=p.start,o=p.end,o===void 0&&(o=a),"selectionStart"in l)l.selectionStart=a,l.selectionEnd=Math.min(o,l.value.length);else if(o=(a=l.ownerDocument||document)&&a.defaultView||window,o.getSelection){o=o.getSelection();var y=l.textContent.length,x=Math.min(p.start,y);p=p.end===void 0?x:Math.min(p.end,y),!o.extend&&x>p&&(y=p,p=x,x=y),y=Zv(l,x);var C=Zv(l,p);y&&C&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==C.node||o.focusOffset!==C.offset)&&(a=a.createRange(),a.setStart(y.node,y.offset),o.removeAllRanges(),x>p?(o.addRange(a),o.extend(C.node,C.offset)):(a.setEnd(C.node,C.offset),o.addRange(a)))}}for(a=[],o=l;o=o.parentNode;)o.nodeType===1&&a.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<a.length;l++)o=a[l],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var X$=c&&"documentMode"in document&&11>=document.documentMode,fa=null,Eg=null,ec=null,bg=!1;function n2(o,a,l){var p=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bg||fa==null||fa!==_t(p)||(p=fa,"selectionStart"in p&&yg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),ec&&Zu(ec,p)||(ec=p,p=Nd(Eg,"onSelect"),0<p.length&&(a=new cg("onSelect","select",null,a,l),o.push({event:a,listeners:p}),a.target=fa)))}function Ad(o,a){var l={};return l[o.toLowerCase()]=a.toLowerCase(),l["Webkit"+o]="webkit"+a,l["Moz"+o]="moz"+a,l}var pa={animationend:Ad("Animation","AnimationEnd"),animationiteration:Ad("Animation","AnimationIteration"),animationstart:Ad("Animation","AnimationStart"),transitionend:Ad("Transition","TransitionEnd")},wg={},r2={};c&&(r2=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function kd(o){if(wg[o])return wg[o];if(!pa[o])return o;var a=pa[o],l;for(l in a)if(a.hasOwnProperty(l)&&l in r2)return wg[o]=a[l];return o}var i2=kd("animationend"),o2=kd("animationiteration"),s2=kd("animationstart"),a2=kd("transitionend"),u2=new Map,c2="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 no(o,a){u2.set(o,a),s(a,[o])}for(var xg=0;xg<c2.length;xg++){var Tg=c2[xg],K$=Tg.toLowerCase(),Q$=Tg[0].toUpperCase()+Tg.slice(1);no(K$,"on"+Q$)}no(i2,"onAnimationEnd"),no(o2,"onAnimationIteration"),no(s2,"onAnimationStart"),no("dblclick","onDoubleClick"),no("focusin","onFocus"),no("focusout","onBlur"),no(a2,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tc="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(" "),J$=new Set("cancel close invalid load scroll toggle".split(" ").concat(tc));function l2(o,a,l){var p=o.type||"unknown-event";o.currentTarget=l,ye(p,a,void 0,o),o.currentTarget=null}function d2(o,a){a=(a&4)!==0;for(var l=0;l<o.length;l++){var p=o[l],y=p.event;p=p.listeners;e:{var x=void 0;if(a)for(var C=p.length-1;0<=C;C--){var $=p[C],Y=$.instance,oe=$.currentTarget;if($=$.listener,Y!==x&&y.isPropagationStopped())break e;l2(y,$,oe),x=Y}else for(C=0;C<p.length;C++){if($=p[C],Y=$.instance,oe=$.currentTarget,$=$.listener,Y!==x&&y.isPropagationStopped())break e;l2(y,$,oe),x=Y}}}if(Ti)throw o=Ki,Ti=!1,Ki=null,o}function Mt(o,a){var l=a[Ig];l===void 0&&(l=a[Ig]=new Set);var p=o+"__bubble";l.has(p)||(f2(a,o,2,!1),l.add(p))}function _g(o,a,l){var p=0;a&&(p|=4),f2(l,o,p,a)}var Cd="_reactListening"+Math.random().toString(36).slice(2);function nc(o){if(!o[Cd]){o[Cd]=!0,r.forEach(function(l){l!=="selectionchange"&&(J$.has(l)||_g(l,!1,o),_g(l,!0,o))});var a=o.nodeType===9?o:o.ownerDocument;a===null||a[Cd]||(a[Cd]=!0,_g("selectionchange",!1,a))}}function f2(o,a,l,p){switch(Dv(a)){case 1:var y=f$;break;case 4:y=p$;break;default:y=sg}l=y.bind(null,a,l,o),y=void 0,!ua||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),p?y!==void 0?o.addEventListener(a,l,{capture:!0,passive:y}):o.addEventListener(a,l,!0):y!==void 0?o.addEventListener(a,l,{passive:y}):o.addEventListener(a,l,!1)}function vg(o,a,l,p,y){var x=p;if((a&1)===0&&(a&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var $=p.stateNode.containerInfo;if($===y||$.nodeType===8&&$.parentNode===y)break;if(C===4)for(C=p.return;C!==null;){var Y=C.tag;if((Y===3||Y===4)&&(Y=C.stateNode.containerInfo,Y===y||Y.nodeType===8&&Y.parentNode===y))return;C=C.return}for(;$!==null;){if(C=ts($),C===null)return;if(Y=C.tag,Y===5||Y===6){p=x=C;continue e}$=$.parentNode}}p=p.return}Bu(function(){var oe=x,xe=sa(l),_e=[];e:{var be=u2.get(o);if(be!==void 0){var Me=cg,Ue=o;switch(o){case"keypress":if(Td(l)===0)break e;case"keydown":case"keyup":Me=C$;break;case"focusin":Ue="focus",Me=fg;break;case"focusout":Ue="blur",Me=fg;break;case"beforeblur":case"afterblur":Me=fg;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":Me=Bv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Me=g$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Me=O$;break;case i2:case o2:case s2:Me=b$;break;case a2:Me=R$;break;case"scroll":Me=h$;break;case"wheel":Me=D$;break;case"copy":case"cut":case"paste":Me=x$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Me=jv}var je=(a&4)!==0,tn=!je&&o==="scroll",te=je?be!==null?be+"Capture":null:be;je=[];for(var K=oe,ie;K!==null;){ie=K;var Ce=ie.stateNode;if(ie.tag===5&&Ce!==null&&(ie=Ce,te!==null&&(Ce=Yi(K,te),Ce!=null&&je.push(rc(K,Ce,ie)))),tn)break;K=K.return}0<je.length&&(be=new Me(be,Ue,null,l,xe),_e.push({event:be,listeners:je}))}}if((a&7)===0){e:{if(be=o==="mouseover"||o==="pointerover",Me=o==="mouseout"||o==="pointerout",be&&l!==wn&&(Ue=l.relatedTarget||l.fromElement)&&(ts(Ue)||Ue[_i]))break e;if((Me||be)&&(be=xe.window===xe?xe:(be=xe.ownerDocument)?be.defaultView||be.parentWindow:window,Me?(Ue=l.relatedTarget||l.toElement,Me=oe,Ue=Ue?ts(Ue):null,Ue!==null&&(tn=Ee(Ue),Ue!==tn||Ue.tag!==5&&Ue.tag!==6)&&(Ue=null)):(Me=null,Ue=oe),Me!==Ue)){if(je=Bv,Ce="onMouseLeave",te="onMouseEnter",K="mouse",(o==="pointerout"||o==="pointerover")&&(je=jv,Ce="onPointerLeave",te="onPointerEnter",K="pointer"),tn=Me==null?be:ga(Me),ie=Ue==null?be:ga(Ue),be=new je(Ce,K+"leave",Me,l,xe),be.target=tn,be.relatedTarget=ie,Ce=null,ts(xe)===oe&&(je=new je(te,K+"enter",Ue,l,xe),je.target=ie,je.relatedTarget=tn,Ce=je),tn=Ce,Me&&Ue)t:{for(je=Me,te=Ue,K=0,ie=je;ie;ie=ha(ie))K++;for(ie=0,Ce=te;Ce;Ce=ha(Ce))ie++;for(;0<K-ie;)je=ha(je),K--;for(;0<ie-K;)te=ha(te),ie--;for(;K--;){if(je===te||te!==null&&je===te.alternate)break t;je=ha(je),te=ha(te)}je=null}else je=null;Me!==null&&p2(_e,be,Me,je,!1),Ue!==null&&tn!==null&&p2(_e,tn,Ue,je,!0)}}e:{if(be=oe?ga(oe):window,Me=be.nodeName&&be.nodeName.toLowerCase(),Me==="select"||Me==="input"&&be.type==="file")var He=$$;else if(Wv(be))if(Gv)He=W$;else{He=V$;var Ge=z$}else(Me=be.nodeName)&&Me.toLowerCase()==="input"&&(be.type==="checkbox"||be.type==="radio")&&(He=q$);if(He&&(He=He(o,oe))){Yv(_e,He,l,xe);break e}Ge&&Ge(o,be,oe),o==="focusout"&&(Ge=be._wrapperState)&&Ge.controlled&&be.type==="number"&&it(be,"number",be.value)}switch(Ge=oe?ga(oe):window,o){case"focusin":(Wv(Ge)||Ge.contentEditable==="true")&&(fa=Ge,Eg=oe,ec=null);break;case"focusout":ec=Eg=fa=null;break;case"mousedown":bg=!0;break;case"contextmenu":case"mouseup":case"dragend":bg=!1,n2(_e,l,xe);break;case"selectionchange":if(X$)break;case"keydown":case"keyup":n2(_e,l,xe)}var Xe;if(hg)e:{switch(o){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else da?Vv(o,l)&&(nt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(nt="onCompositionStart");nt&&(Hv&&l.locale!=="ko"&&(da||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&da&&(Xe=Mv()):(to=xe,ug="value"in to?to.value:to.textContent,da=!0)),Ge=Nd(oe,nt),0<Ge.length&&(nt=new Uv(nt,o,null,l,xe),_e.push({event:nt,listeners:Ge}),Xe?nt.data=Xe:(Xe=qv(l),Xe!==null&&(nt.data=Xe)))),(Xe=F$?B$(o,l):U$(o,l))&&(oe=Nd(oe,"onBeforeInput"),0<oe.length&&(xe=new Uv("onBeforeInput","beforeinput",null,l,xe),_e.push({event:xe,listeners:oe}),xe.data=Xe))}d2(_e,a)})}function rc(o,a,l){return{instance:o,listener:a,currentTarget:l}}function Nd(o,a){for(var l=a+"Capture",p=[];o!==null;){var y=o,x=y.stateNode;y.tag===5&&x!==null&&(y=x,x=Yi(o,l),x!=null&&p.unshift(rc(o,x,y)),x=Yi(o,a),x!=null&&p.push(rc(o,x,y))),o=o.return}return p}function ha(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function p2(o,a,l,p,y){for(var x=a._reactName,C=[];l!==null&&l!==p;){var $=l,Y=$.alternate,oe=$.stateNode;if(Y!==null&&Y===p)break;$.tag===5&&oe!==null&&($=oe,y?(Y=Yi(l,x),Y!=null&&C.unshift(rc(l,Y,$))):y||(Y=Yi(l,x),Y!=null&&C.push(rc(l,Y,$)))),l=l.return}C.length!==0&&o.push({event:a,listeners:C})}var Z$=/\r\n?/g,ez=/\u0000|\uFFFD/g;function h2(o){return(typeof o=="string"?o:""+o).replace(Z$,`
21
- `).replace(ez,"")}function Id(o,a,l){if(a=h2(a),h2(o)!==a&&l)throw Error(n(425))}function Od(){}var Sg=null,Ag=null;function kg(o,a){return o==="textarea"||o==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Cg=typeof setTimeout=="function"?setTimeout:void 0,tz=typeof clearTimeout=="function"?clearTimeout:void 0,m2=typeof Promise=="function"?Promise:void 0,nz=typeof queueMicrotask=="function"?queueMicrotask:typeof m2!="undefined"?function(o){return m2.resolve(null).then(o).catch(rz)}:Cg;function rz(o){setTimeout(function(){throw o})}function Ng(o,a){var l=a,p=0;do{var y=l.nextSibling;if(o.removeChild(l),y&&y.nodeType===8)if(l=y.data,l==="/$"){if(p===0){o.removeChild(y),Yu(a);return}p--}else l!=="$"&&l!=="$?"&&l!=="$!"||p++;l=y}while(l);Yu(a)}function ro(o){for(;o!=null;o=o.nextSibling){var a=o.nodeType;if(a===1||a===3)break;if(a===8){if(a=o.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return o}function g2(o){o=o.previousSibling;for(var a=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"){if(a===0)return o;a--}else l==="/$"&&a++}o=o.previousSibling}return null}var ma=Math.random().toString(36).slice(2),si="__reactFiber$"+ma,ic="__reactProps$"+ma,_i="__reactContainer$"+ma,Ig="__reactEvents$"+ma,iz="__reactListeners$"+ma,oz="__reactHandles$"+ma;function ts(o){var a=o[si];if(a)return a;for(var l=o.parentNode;l;){if(a=l[_i]||l[si]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(o=g2(o);o!==null;){if(l=o[si])return l;o=g2(o)}return a}o=l,l=o.parentNode}return null}function oc(o){return o=o[si]||o[_i],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function ga(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function Pd(o){return o[ic]||null}var Og=[],ya=-1;function io(o){return{current:o}}function Ft(o){0>ya||(o.current=Og[ya],Og[ya]=null,ya--)}function Rt(o,a){ya++,Og[ya]=o.current,o.current=a}var oo={},In=io(oo),Gn=io(!1),ns=oo;function Ea(o,a){var l=o.type.contextTypes;if(!l)return oo;var p=o.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var y={},x;for(x in l)y[x]=a[x];return p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=a,o.__reactInternalMemoizedMaskedChildContext=y),y}function Xn(o){return o=o.childContextTypes,o!=null}function Rd(){Ft(Gn),Ft(In)}function y2(o,a,l){if(In.current!==oo)throw Error(n(168));Rt(In,a),Rt(Gn,l)}function E2(o,a,l){var p=o.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return l;p=p.getChildContext();for(var y in p)if(!(y in a))throw Error(n(108,Ne(o)||"Unknown",y));return O({},l,p)}function Ld(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||oo,ns=In.current,Rt(In,o),Rt(Gn,Gn.current),!0}function b2(o,a,l){var p=o.stateNode;if(!p)throw Error(n(169));l?(o=E2(o,a,ns),p.__reactInternalMemoizedMergedChildContext=o,Ft(Gn),Ft(In),Rt(In,o)):Ft(Gn),Rt(Gn,l)}var vi=null,Dd=!1,Pg=!1;function w2(o){vi===null?vi=[o]:vi.push(o)}function sz(o){Dd=!0,w2(o)}function so(){if(!Pg&&vi!==null){Pg=!0;var o=0,a=vt;try{var l=vi;for(vt=1;o<l.length;o++){var p=l[o];do p=p(!0);while(p!==null)}vi=null,Dd=!1}catch(y){throw vi!==null&&(vi=vi.slice(o+1)),dt(Ht,so),y}finally{vt=a,Pg=!1}}return null}var ba=[],wa=0,Md=null,Fd=0,Er=[],br=0,rs=null,Si=1,Ai="";function is(o,a){ba[wa++]=Fd,ba[wa++]=Md,Md=o,Fd=a}function x2(o,a,l){Er[br++]=Si,Er[br++]=Ai,Er[br++]=rs,rs=o;var p=Si;o=Ai;var y=32-Lr(p)-1;p&=~(1<<y),l+=1;var x=32-Lr(a)+y;if(30<x){var C=y-y%5;x=(p&(1<<C)-1).toString(32),p>>=C,y-=C,Si=1<<32-Lr(a)+y|l<<y|p,Ai=x+o}else Si=1<<x|l<<y|p,Ai=o}function Rg(o){o.return!==null&&(is(o,1),x2(o,1,0))}function Lg(o){for(;o===Md;)Md=ba[--wa],ba[wa]=null,Fd=ba[--wa],ba[wa]=null;for(;o===rs;)rs=Er[--br],Er[br]=null,Ai=Er[--br],Er[br]=null,Si=Er[--br],Er[br]=null}var cr=null,lr=null,$t=!1,Mr=null;function T2(o,a){var l=_r(5,null,null,0);l.elementType="DELETED",l.stateNode=a,l.return=o,a=o.deletions,a===null?(o.deletions=[l],o.flags|=16):a.push(l)}function _2(o,a){switch(o.tag){case 5:var l=o.type;return a=a.nodeType!==1||l.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(o.stateNode=a,cr=o,lr=ro(a.firstChild),!0):!1;case 6:return a=o.pendingProps===""||a.nodeType!==3?null:a,a!==null?(o.stateNode=a,cr=o,lr=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(l=rs!==null?{id:Si,overflow:Ai}:null,o.memoizedState={dehydrated:a,treeContext:l,retryLane:1073741824},l=_r(18,null,null,0),l.stateNode=a,l.return=o,o.child=l,cr=o,lr=null,!0):!1;default:return!1}}function Dg(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Mg(o){if($t){var a=lr;if(a){var l=a;if(!_2(o,a)){if(Dg(o))throw Error(n(418));a=ro(l.nextSibling);var p=cr;a&&_2(o,a)?T2(p,l):(o.flags=o.flags&-4097|2,$t=!1,cr=o)}}else{if(Dg(o))throw Error(n(418));o.flags=o.flags&-4097|2,$t=!1,cr=o}}}function v2(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;cr=o}function Bd(o){if(o!==cr)return!1;if(!$t)return v2(o),$t=!0,!1;var a;if((a=o.tag!==3)&&!(a=o.tag!==5)&&(a=o.type,a=a!=="head"&&a!=="body"&&!kg(o.type,o.memoizedProps)),a&&(a=lr)){if(Dg(o))throw S2(),Error(n(418));for(;a;)T2(o,a),a=ro(a.nextSibling)}if(v2(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,a=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"){if(a===0){lr=ro(o.nextSibling);break e}a--}else l!=="$"&&l!=="$!"&&l!=="$?"||a++}o=o.nextSibling}lr=null}}else lr=cr?ro(o.stateNode.nextSibling):null;return!0}function S2(){for(var o=lr;o;)o=ro(o.nextSibling)}function xa(){lr=cr=null,$t=!1}function Fg(o){Mr===null?Mr=[o]:Mr.push(o)}var az=U.ReactCurrentBatchConfig;function sc(o,a,l){if(o=l.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var p=l.stateNode}if(!p)throw Error(n(147,o));var y=p,x=""+o;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===x?a.ref:(a=function(C){var $=y.refs;C===null?delete $[x]:$[x]=C},a._stringRef=x,a)}if(typeof o!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,o))}return o}function Ud(o,a){throw o=Object.prototype.toString.call(a),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":o))}function A2(o){var a=o._init;return a(o._payload)}function k2(o){function a(te,K){if(o){var ie=te.deletions;ie===null?(te.deletions=[K],te.flags|=16):ie.push(K)}}function l(te,K){if(!o)return null;for(;K!==null;)a(te,K),K=K.sibling;return null}function p(te,K){for(te=new Map;K!==null;)K.key!==null?te.set(K.key,K):te.set(K.index,K),K=K.sibling;return te}function y(te,K){return te=mo(te,K),te.index=0,te.sibling=null,te}function x(te,K,ie){return te.index=ie,o?(ie=te.alternate,ie!==null?(ie=ie.index,ie<K?(te.flags|=2,K):ie):(te.flags|=2,K)):(te.flags|=1048576,K)}function C(te){return o&&te.alternate===null&&(te.flags|=2),te}function $(te,K,ie,Ce){return K===null||K.tag!==6?(K=C0(ie,te.mode,Ce),K.return=te,K):(K=y(K,ie),K.return=te,K)}function Y(te,K,ie,Ce){var He=ie.type;return He===G?xe(te,K,ie.props.children,Ce,ie.key):K!==null&&(K.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===fe&&A2(He)===K.type)?(Ce=y(K,ie.props),Ce.ref=sc(te,K,ie),Ce.return=te,Ce):(Ce=lf(ie.type,ie.key,ie.props,null,te.mode,Ce),Ce.ref=sc(te,K,ie),Ce.return=te,Ce)}function oe(te,K,ie,Ce){return K===null||K.tag!==4||K.stateNode.containerInfo!==ie.containerInfo||K.stateNode.implementation!==ie.implementation?(K=N0(ie,te.mode,Ce),K.return=te,K):(K=y(K,ie.children||[]),K.return=te,K)}function xe(te,K,ie,Ce,He){return K===null||K.tag!==7?(K=fs(ie,te.mode,Ce,He),K.return=te,K):(K=y(K,ie),K.return=te,K)}function _e(te,K,ie){if(typeof K=="string"&&K!==""||typeof K=="number")return K=C0(""+K,te.mode,ie),K.return=te,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case B:return ie=lf(K.type,K.key,K.props,null,te.mode,ie),ie.ref=sc(te,null,K),ie.return=te,ie;case A:return K=N0(K,te.mode,ie),K.return=te,K;case fe:var Ce=K._init;return _e(te,Ce(K._payload),ie)}if(lt(K)||se(K))return K=fs(K,te.mode,ie,null),K.return=te,K;Ud(te,K)}return null}function be(te,K,ie,Ce){var He=K!==null?K.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number")return He!==null?null:$(te,K,""+ie,Ce);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case B:return ie.key===He?Y(te,K,ie,Ce):null;case A:return ie.key===He?oe(te,K,ie,Ce):null;case fe:return He=ie._init,be(te,K,He(ie._payload),Ce)}if(lt(ie)||se(ie))return He!==null?null:xe(te,K,ie,Ce,null);Ud(te,ie)}return null}function Me(te,K,ie,Ce,He){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return te=te.get(ie)||null,$(K,te,""+Ce,He);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case B:return te=te.get(Ce.key===null?ie:Ce.key)||null,Y(K,te,Ce,He);case A:return te=te.get(Ce.key===null?ie:Ce.key)||null,oe(K,te,Ce,He);case fe:var Ge=Ce._init;return Me(te,K,ie,Ge(Ce._payload),He)}if(lt(Ce)||se(Ce))return te=te.get(ie)||null,xe(K,te,Ce,He,null);Ud(K,Ce)}return null}function Ue(te,K,ie,Ce){for(var He=null,Ge=null,Xe=K,nt=K=0,En=null;Xe!==null&&nt<ie.length;nt++){Xe.index>nt?(En=Xe,Xe=null):En=Xe.sibling;var Tt=be(te,Xe,ie[nt],Ce);if(Tt===null){Xe===null&&(Xe=En);break}o&&Xe&&Tt.alternate===null&&a(te,Xe),K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt,Xe=En}if(nt===ie.length)return l(te,Xe),$t&&is(te,nt),He;if(Xe===null){for(;nt<ie.length;nt++)Xe=_e(te,ie[nt],Ce),Xe!==null&&(K=x(Xe,K,nt),Ge===null?He=Xe:Ge.sibling=Xe,Ge=Xe);return $t&&is(te,nt),He}for(Xe=p(te,Xe);nt<ie.length;nt++)En=Me(Xe,te,nt,ie[nt],Ce),En!==null&&(o&&En.alternate!==null&&Xe.delete(En.key===null?nt:En.key),K=x(En,K,nt),Ge===null?He=En:Ge.sibling=En,Ge=En);return o&&Xe.forEach(function(go){return a(te,go)}),$t&&is(te,nt),He}function je(te,K,ie,Ce){var He=se(ie);if(typeof He!="function")throw Error(n(150));if(ie=He.call(ie),ie==null)throw Error(n(151));for(var Ge=He=null,Xe=K,nt=K=0,En=null,Tt=ie.next();Xe!==null&&!Tt.done;nt++,Tt=ie.next()){Xe.index>nt?(En=Xe,Xe=null):En=Xe.sibling;var go=be(te,Xe,Tt.value,Ce);if(go===null){Xe===null&&(Xe=En);break}o&&Xe&&go.alternate===null&&a(te,Xe),K=x(go,K,nt),Ge===null?He=go:Ge.sibling=go,Ge=go,Xe=En}if(Tt.done)return l(te,Xe),$t&&is(te,nt),He;if(Xe===null){for(;!Tt.done;nt++,Tt=ie.next())Tt=_e(te,Tt.value,Ce),Tt!==null&&(K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt);return $t&&is(te,nt),He}for(Xe=p(te,Xe);!Tt.done;nt++,Tt=ie.next())Tt=Me(Xe,te,nt,Tt.value,Ce),Tt!==null&&(o&&Tt.alternate!==null&&Xe.delete(Tt.key===null?nt:Tt.key),K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt);return o&&Xe.forEach(function(jz){return a(te,jz)}),$t&&is(te,nt),He}function tn(te,K,ie,Ce){if(typeof ie=="object"&&ie!==null&&ie.type===G&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case B:e:{for(var He=ie.key,Ge=K;Ge!==null;){if(Ge.key===He){if(He=ie.type,He===G){if(Ge.tag===7){l(te,Ge.sibling),K=y(Ge,ie.props.children),K.return=te,te=K;break e}}else if(Ge.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===fe&&A2(He)===Ge.type){l(te,Ge.sibling),K=y(Ge,ie.props),K.ref=sc(te,Ge,ie),K.return=te,te=K;break e}l(te,Ge);break}else a(te,Ge);Ge=Ge.sibling}ie.type===G?(K=fs(ie.props.children,te.mode,Ce,ie.key),K.return=te,te=K):(Ce=lf(ie.type,ie.key,ie.props,null,te.mode,Ce),Ce.ref=sc(te,K,ie),Ce.return=te,te=Ce)}return C(te);case A:e:{for(Ge=ie.key;K!==null;){if(K.key===Ge)if(K.tag===4&&K.stateNode.containerInfo===ie.containerInfo&&K.stateNode.implementation===ie.implementation){l(te,K.sibling),K=y(K,ie.children||[]),K.return=te,te=K;break e}else{l(te,K);break}else a(te,K);K=K.sibling}K=N0(ie,te.mode,Ce),K.return=te,te=K}return C(te);case fe:return Ge=ie._init,tn(te,K,Ge(ie._payload),Ce)}if(lt(ie))return Ue(te,K,ie,Ce);if(se(ie))return je(te,K,ie,Ce);Ud(te,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"?(ie=""+ie,K!==null&&K.tag===6?(l(te,K.sibling),K=y(K,ie),K.return=te,te=K):(l(te,K),K=C0(ie,te.mode,Ce),K.return=te,te=K),C(te)):l(te,K)}return tn}var Ta=k2(!0),C2=k2(!1),jd=io(null),Hd=null,_a=null,Bg=null;function Ug(){Bg=_a=Hd=null}function jg(o){var a=jd.current;Ft(jd),o._currentValue=a}function Hg(o,a,l){for(;o!==null;){var p=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),o===l)break;o=o.return}}function va(o,a){Hd=o,Bg=_a=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&a)!==0&&(Kn=!0),o.firstContext=null)}function wr(o){var a=o._currentValue;if(Bg!==o)if(o={context:o,memoizedValue:a,next:null},_a===null){if(Hd===null)throw Error(n(308));_a=o,Hd.dependencies={lanes:0,firstContext:o}}else _a=_a.next=o;return a}var os=null;function $g(o){os===null?os=[o]:os.push(o)}function N2(o,a,l,p){var y=a.interleaved;return y===null?(l.next=l,$g(a)):(l.next=y.next,y.next=l),a.interleaved=l,ki(o,p)}function ki(o,a){o.lanes|=a;var l=o.alternate;for(l!==null&&(l.lanes|=a),l=o,o=o.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),l=o,o=o.return;return l.tag===3?l.stateNode:null}var ao=!1;function zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I2(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Ci(o,a){return{eventTime:o,lane:a,tag:0,payload:null,callback:null,next:null}}function uo(o,a,l){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(xt&2)!==0){var y=p.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),p.pending=a,ki(o,l)}return y=p.interleaved,y===null?(a.next=a,$g(p)):(a.next=y.next,y.next=a),p.interleaved=a,ki(o,l)}function $d(o,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194240)!==0)){var p=a.lanes;p&=o.pendingLanes,l|=p,a.lanes=l,rg(o,l)}}function O2(o,a){var l=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,l===p)){var y=null,x=null;if(l=l.firstBaseUpdate,l!==null){do{var C={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};x===null?y=x=C:x=x.next=C,l=l.next}while(l!==null);x===null?y=x=a:x=x.next=a}else y=x=a;l={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:p.shared,effects:p.effects},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=a:o.next=a,l.lastBaseUpdate=a}function zd(o,a,l,p){var y=o.updateQueue;ao=!1;var x=y.firstBaseUpdate,C=y.lastBaseUpdate,$=y.shared.pending;if($!==null){y.shared.pending=null;var Y=$,oe=Y.next;Y.next=null,C===null?x=oe:C.next=oe,C=Y;var xe=o.alternate;xe!==null&&(xe=xe.updateQueue,$=xe.lastBaseUpdate,$!==C&&($===null?xe.firstBaseUpdate=oe:$.next=oe,xe.lastBaseUpdate=Y))}if(x!==null){var _e=y.baseState;C=0,xe=oe=Y=null,$=x;do{var be=$.lane,Me=$.eventTime;if((p&be)===be){xe!==null&&(xe=xe.next={eventTime:Me,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Ue=o,je=$;switch(be=a,Me=l,je.tag){case 1:if(Ue=je.payload,typeof Ue=="function"){_e=Ue.call(Me,_e,be);break e}_e=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=je.payload,be=typeof Ue=="function"?Ue.call(Me,_e,be):Ue,be==null)break e;_e=O({},_e,be);break e;case 2:ao=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,be=y.effects,be===null?y.effects=[$]:be.push($))}else Me={eventTime:Me,lane:be,tag:$.tag,payload:$.payload,callback:$.callback,next:null},xe===null?(oe=xe=Me,Y=_e):xe=xe.next=Me,C|=be;if($=$.next,$===null){if($=y.shared.pending,$===null)break;be=$,$=be.next,be.next=null,y.lastBaseUpdate=be,y.shared.pending=null}}while(!0);if(xe===null&&(Y=_e),y.baseState=Y,y.firstBaseUpdate=oe,y.lastBaseUpdate=xe,a=y.shared.interleaved,a!==null){y=a;do C|=y.lane,y=y.next;while(y!==a)}else x===null&&(y.shared.lanes=0);us|=C,o.lanes=C,o.memoizedState=_e}}function P2(o,a,l){if(o=a.effects,a.effects=null,o!==null)for(a=0;a<o.length;a++){var p=o[a],y=p.callback;if(y!==null){if(p.callback=null,p=l,typeof y!="function")throw Error(n(191,y));y.call(p)}}}var ac={},ai=io(ac),uc=io(ac),cc=io(ac);function ss(o){if(o===ac)throw Error(n(174));return o}function Vg(o,a){switch(Rt(cc,a),Rt(uc,o),Rt(ai,ac),o=a.nodeType,o){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:ke(null,"");break;default:o=o===8?a.parentNode:a,a=o.namespaceURI||null,o=o.tagName,a=ke(a,o)}Ft(ai),Rt(ai,a)}function Sa(){Ft(ai),Ft(uc),Ft(cc)}function R2(o){ss(cc.current);var a=ss(ai.current),l=ke(a,o.type);a!==l&&(Rt(uc,o),Rt(ai,l))}function qg(o){uc.current===o&&(Ft(ai),Ft(uc))}var Vt=io(0);function Vd(o){for(var a=o;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wg=[];function Yg(){for(var o=0;o<Wg.length;o++)Wg[o]._workInProgressVersionPrimary=null;Wg.length=0}var qd=U.ReactCurrentDispatcher,Gg=U.ReactCurrentBatchConfig,as=0,qt=null,un=null,gn=null,Wd=!1,lc=!1,dc=0,uz=0;function On(){throw Error(n(321))}function Xg(o,a){if(a===null)return!1;for(var l=0;l<a.length&&l<o.length;l++)if(!Dr(o[l],a[l]))return!1;return!0}function Kg(o,a,l,p,y,x){if(as=x,qt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,qd.current=o===null||o.memoizedState===null?fz:pz,o=l(p,y),lc){x=0;do{if(lc=!1,dc=0,25<=x)throw Error(n(301));x+=1,gn=un=null,a.updateQueue=null,qd.current=hz,o=l(p,y)}while(lc)}if(qd.current=Xd,a=un!==null&&un.next!==null,as=0,gn=un=qt=null,Wd=!1,a)throw Error(n(300));return o}function Qg(){var o=dc!==0;return dc=0,o}function ui(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?qt.memoizedState=gn=o:gn=gn.next=o,gn}function xr(){if(un===null){var o=qt.alternate;o=o!==null?o.memoizedState:null}else o=un.next;var a=gn===null?qt.memoizedState:gn.next;if(a!==null)gn=a,un=o;else{if(o===null)throw Error(n(310));un=o,o={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},gn===null?qt.memoizedState=gn=o:gn=gn.next=o}return gn}function fc(o,a){return typeof a=="function"?a(o):a}function Jg(o){var a=xr(),l=a.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=o;var p=un,y=p.baseQueue,x=l.pending;if(x!==null){if(y!==null){var C=y.next;y.next=x.next,x.next=C}p.baseQueue=y=x,l.pending=null}if(y!==null){x=y.next,p=p.baseState;var $=C=null,Y=null,oe=x;do{var xe=oe.lane;if((as&xe)===xe)Y!==null&&(Y=Y.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),p=oe.hasEagerState?oe.eagerState:o(p,oe.action);else{var _e={lane:xe,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};Y===null?($=Y=_e,C=p):Y=Y.next=_e,qt.lanes|=xe,us|=xe}oe=oe.next}while(oe!==null&&oe!==x);Y===null?C=p:Y.next=$,Dr(p,a.memoizedState)||(Kn=!0),a.memoizedState=p,a.baseState=C,a.baseQueue=Y,l.lastRenderedState=p}if(o=l.interleaved,o!==null){y=o;do x=y.lane,qt.lanes|=x,us|=x,y=y.next;while(y!==o)}else y===null&&(l.lanes=0);return[a.memoizedState,l.dispatch]}function Zg(o){var a=xr(),l=a.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=o;var p=l.dispatch,y=l.pending,x=a.memoizedState;if(y!==null){l.pending=null;var C=y=y.next;do x=o(x,C.action),C=C.next;while(C!==y);Dr(x,a.memoizedState)||(Kn=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),l.lastRenderedState=x}return[x,p]}function L2(){}function D2(o,a){var l=qt,p=xr(),y=a(),x=!Dr(p.memoizedState,y);if(x&&(p.memoizedState=y,Kn=!0),p=p.queue,e0(B2.bind(null,l,p,o),[o]),p.getSnapshot!==a||x||gn!==null&&gn.memoizedState.tag&1){if(l.flags|=2048,pc(9,F2.bind(null,l,p,y,a),void 0,null),yn===null)throw Error(n(349));(as&30)!==0||M2(l,a,y)}return y}function M2(o,a,l){o.flags|=16384,o={getSnapshot:a,value:l},a=qt.updateQueue,a===null?(a={lastEffect:null,stores:null},qt.updateQueue=a,a.stores=[o]):(l=a.stores,l===null?a.stores=[o]:l.push(o))}function F2(o,a,l,p){a.value=l,a.getSnapshot=p,U2(a)&&j2(o)}function B2(o,a,l){return l(function(){U2(a)&&j2(o)})}function U2(o){var a=o.getSnapshot;o=o.value;try{var l=a();return!Dr(o,l)}catch(p){return!0}}function j2(o){var a=ki(o,1);a!==null&&jr(a,o,1,-1)}function H2(o){var a=ui();return typeof o=="function"&&(o=o()),a.memoizedState=a.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fc,lastRenderedState:o},a.queue=o,o=o.dispatch=dz.bind(null,qt,o),[a.memoizedState,o]}function pc(o,a,l,p){return o={tag:o,create:a,destroy:l,deps:p,next:null},a=qt.updateQueue,a===null?(a={lastEffect:null,stores:null},qt.updateQueue=a,a.lastEffect=o.next=o):(l=a.lastEffect,l===null?a.lastEffect=o.next=o:(p=l.next,l.next=o,o.next=p,a.lastEffect=o)),o}function $2(){return xr().memoizedState}function Yd(o,a,l,p){var y=ui();qt.flags|=o,y.memoizedState=pc(1|a,l,void 0,p===void 0?null:p)}function Gd(o,a,l,p){var y=xr();p=p===void 0?null:p;var x=void 0;if(un!==null){var C=un.memoizedState;if(x=C.destroy,p!==null&&Xg(p,C.deps)){y.memoizedState=pc(a,l,x,p);return}}qt.flags|=o,y.memoizedState=pc(1|a,l,x,p)}function z2(o,a){return Yd(8390656,8,o,a)}function e0(o,a){return Gd(2048,8,o,a)}function V2(o,a){return Gd(4,2,o,a)}function q2(o,a){return Gd(4,4,o,a)}function W2(o,a){if(typeof a=="function")return o=o(),a(o),function(){a(null)};if(a!=null)return o=o(),a.current=o,function(){a.current=null}}function Y2(o,a,l){return l=l!=null?l.concat([o]):null,Gd(4,4,W2.bind(null,a,o),l)}function t0(){}function G2(o,a){var l=xr();a=a===void 0?null:a;var p=l.memoizedState;return p!==null&&a!==null&&Xg(a,p[1])?p[0]:(l.memoizedState=[o,a],o)}function X2(o,a){var l=xr();a=a===void 0?null:a;var p=l.memoizedState;return p!==null&&a!==null&&Xg(a,p[1])?p[0]:(o=o(),l.memoizedState=[o,a],o)}function K2(o,a,l){return(as&21)===0?(o.baseState&&(o.baseState=!1,Kn=!0),o.memoizedState=l):(Dr(l,a)||(l=Av(),qt.lanes|=l,us|=l,o.baseState=!0),a)}function cz(o,a){var l=vt;vt=l!==0&&4>l?l:4,o(!0);var p=Gg.transition;Gg.transition={};try{o(!1),a()}finally{vt=l,Gg.transition=p}}function Q2(){return xr().memoizedState}function lz(o,a,l){var p=po(o);if(l={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null},J2(o))Z2(a,l);else if(l=N2(o,a,l,p),l!==null){var y=Bn();jr(l,o,p,y),eS(l,a,p)}}function dz(o,a,l){var p=po(o),y={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null};if(J2(o))Z2(a,y);else{var x=o.alternate;if(o.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,$=x(C,l);if(y.hasEagerState=!0,y.eagerState=$,Dr($,C)){var Y=a.interleaved;Y===null?(y.next=y,$g(a)):(y.next=Y.next,Y.next=y),a.interleaved=y;return}}catch(oe){}l=N2(o,a,y,p),l!==null&&(y=Bn(),jr(l,o,p,y),eS(l,a,p))}}function J2(o){var a=o.alternate;return o===qt||a!==null&&a===qt}function Z2(o,a){lc=Wd=!0;var l=o.pending;l===null?a.next=a:(a.next=l.next,l.next=a),o.pending=a}function eS(o,a,l){if((l&4194240)!==0){var p=a.lanes;p&=o.pendingLanes,l|=p,a.lanes=l,rg(o,l)}}var Xd={readContext:wr,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},fz={readContext:wr,useCallback:function(o,a){return ui().memoizedState=[o,a===void 0?null:a],o},useContext:wr,useEffect:z2,useImperativeHandle:function(o,a,l){return l=l!=null?l.concat([o]):null,Yd(4194308,4,W2.bind(null,a,o),l)},useLayoutEffect:function(o,a){return Yd(4194308,4,o,a)},useInsertionEffect:function(o,a){return Yd(4,2,o,a)},useMemo:function(o,a){var l=ui();return a=a===void 0?null:a,o=o(),l.memoizedState=[o,a],o},useReducer:function(o,a,l){var p=ui();return a=l!==void 0?l(a):a,p.memoizedState=p.baseState=a,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:a},p.queue=o,o=o.dispatch=lz.bind(null,qt,o),[p.memoizedState,o]},useRef:function(o){var a=ui();return o={current:o},a.memoizedState=o},useState:H2,useDebugValue:t0,useDeferredValue:function(o){return ui().memoizedState=o},useTransition:function(){var o=H2(!1),a=o[0];return o=cz.bind(null,o[1]),ui().memoizedState=o,[a,o]},useMutableSource:function(){},useSyncExternalStore:function(o,a,l){var p=qt,y=ui();if($t){if(l===void 0)throw Error(n(407));l=l()}else{if(l=a(),yn===null)throw Error(n(349));(as&30)!==0||M2(p,a,l)}y.memoizedState=l;var x={value:l,getSnapshot:a};return y.queue=x,z2(B2.bind(null,p,x,o),[o]),p.flags|=2048,pc(9,F2.bind(null,p,x,l,a),void 0,null),l},useId:function(){var o=ui(),a=yn.identifierPrefix;if($t){var l=Ai,p=Si;l=(p&~(1<<32-Lr(p)-1)).toString(32)+l,a=":"+a+"R"+l,l=dc++,0<l&&(a+="H"+l.toString(32)),a+=":"}else l=uz++,a=":"+a+"r"+l.toString(32)+":";return o.memoizedState=a},unstable_isNewReconciler:!1},pz={readContext:wr,useCallback:G2,useContext:wr,useEffect:e0,useImperativeHandle:Y2,useInsertionEffect:V2,useLayoutEffect:q2,useMemo:X2,useReducer:Jg,useRef:$2,useState:function(){return Jg(fc)},useDebugValue:t0,useDeferredValue:function(o){var a=xr();return K2(a,un.memoizedState,o)},useTransition:function(){var o=Jg(fc)[0],a=xr().memoizedState;return[o,a]},useMutableSource:L2,useSyncExternalStore:D2,useId:Q2,unstable_isNewReconciler:!1},hz={readContext:wr,useCallback:G2,useContext:wr,useEffect:e0,useImperativeHandle:Y2,useInsertionEffect:V2,useLayoutEffect:q2,useMemo:X2,useReducer:Zg,useRef:$2,useState:function(){return Zg(fc)},useDebugValue:t0,useDeferredValue:function(o){var a=xr();return un===null?a.memoizedState=o:K2(a,un.memoizedState,o)},useTransition:function(){var o=Zg(fc)[0],a=xr().memoizedState;return[o,a]},useMutableSource:L2,useSyncExternalStore:D2,useId:Q2,unstable_isNewReconciler:!1};function Fr(o,a){if(o&&o.defaultProps){a=O({},a),o=o.defaultProps;for(var l in o)a[l]===void 0&&(a[l]=o[l]);return a}return a}function n0(o,a,l,p){a=o.memoizedState,l=l(p,a),l=l==null?a:O({},a,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var Kd={isMounted:function(o){return(o=o._reactInternals)?Ee(o)===o:!1},enqueueSetState:function(o,a,l){o=o._reactInternals;var p=Bn(),y=po(o),x=Ci(p,y);x.payload=a,l!=null&&(x.callback=l),a=uo(o,x,y),a!==null&&(jr(a,o,y,p),$d(a,o,y))},enqueueReplaceState:function(o,a,l){o=o._reactInternals;var p=Bn(),y=po(o),x=Ci(p,y);x.tag=1,x.payload=a,l!=null&&(x.callback=l),a=uo(o,x,y),a!==null&&(jr(a,o,y,p),$d(a,o,y))},enqueueForceUpdate:function(o,a){o=o._reactInternals;var l=Bn(),p=po(o),y=Ci(l,p);y.tag=2,a!=null&&(y.callback=a),a=uo(o,y,p),a!==null&&(jr(a,o,p,l),$d(a,o,p))}};function tS(o,a,l,p,y,x,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,x,C):a.prototype&&a.prototype.isPureReactComponent?!Zu(l,p)||!Zu(y,x):!0}function nS(o,a,l){var p=!1,y=oo,x=a.contextType;return typeof x=="object"&&x!==null?x=wr(x):(y=Xn(a)?ns:In.current,p=a.contextTypes,x=(p=p!=null)?Ea(o,y):oo),a=new a(l,x),o.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Kd,o.stateNode=a,a._reactInternals=o,p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=y,o.__reactInternalMemoizedMaskedChildContext=x),a}function rS(o,a,l,p){o=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,p),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,p),a.state!==o&&Kd.enqueueReplaceState(a,a.state,null)}function r0(o,a,l,p){var y=o.stateNode;y.props=l,y.state=o.memoizedState,y.refs={},zg(o);var x=a.contextType;typeof x=="object"&&x!==null?y.context=wr(x):(x=Xn(a)?ns:In.current,y.context=Ea(o,x)),y.state=o.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(n0(o,a,x,l),y.state=o.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(a=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),a!==y.state&&Kd.enqueueReplaceState(y,y.state,null),zd(o,l,y,p),y.state=o.memoizedState),typeof y.componentDidMount=="function"&&(o.flags|=4194308)}function Aa(o,a){try{var l="",p=a;do l+=Re(p),p=p.return;while(p);var y=l}catch(x){y=`
20
+ `+y[C].replace(" at new "," at ");return o.displayName&&Y.includes("<anonymous>")&&(Y=Y.replace("<anonymous>",o.displayName)),Y}while(1<=C&&0<=$);break}}}finally{P=!1,Error.prepareStackTrace=l}return(o=o?o.displayName||o.name:"")?q(o):""}function Re(o){switch(o.tag){case 5:return q(o.type);case 16:return q("Lazy");case 13:return q("Suspense");case 19:return q("SuspenseList");case 0:case 2:case 15:return o=ge(o.type,!1),o;case 11:return o=ge(o.type.render,!1),o;case 1:return o=ge(o.type,!0),o;default:return""}}function pe(o){if(o==null)return null;if(typeof o=="function")return o.displayName||o.name||null;if(typeof o=="string")return o;switch(o){case G:return"Fragment";case A:return"Portal";case re:return"Profiler";case W:return"StrictMode";case me:return"Suspense";case V:return"SuspenseList"}if(typeof o=="object")switch(o.$$typeof){case ee:return(o.displayName||"Context")+".Consumer";case H:return(o._context.displayName||"Context")+".Provider";case Q:var a=o.render;return o=o.displayName,o||(o=a.displayName||a.name||"",o=o!==""?"ForwardRef("+o+")":"ForwardRef"),o;case ue:return a=o.displayName||null,a!==null?a:pe(o.type)||"Memo";case fe:a=o._payload,o=o._init;try{return pe(o(a))}catch(l){}}return null}function Ne(o){var a=o.type;switch(o.tag){case 24:return"Cache";case 9:return(a.displayName||"Context")+".Consumer";case 10:return(a._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return o=a.render,o=o.displayName||o.name||"",a.displayName||(o!==""?"ForwardRef("+o+")":"ForwardRef");case 7:return"Fragment";case 5:return a;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return pe(a);case 8:return a===W?"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 a=="function")return a.displayName||a.name||null;if(typeof a=="string")return a}return null}function ve(o){switch(typeof o){case"boolean":case"number":case"string":case"undefined":return o;case"object":return o;default:return""}}function ze(o){var a=o.type;return(o=o.nodeName)&&o.toLowerCase()==="input"&&(a==="checkbox"||a==="radio")}function rt(o){var a=ze(o)?"checked":"value",l=Object.getOwnPropertyDescriptor(o.constructor.prototype,a),p=""+o[a];if(!o.hasOwnProperty(a)&&typeof l!="undefined"&&typeof l.get=="function"&&typeof l.set=="function"){var y=l.get,x=l.set;return Object.defineProperty(o,a,{configurable:!0,get:function(){return y.call(this)},set:function(C){p=""+C,x.call(this,C)}}),Object.defineProperty(o,a,{enumerable:l.enumerable}),{getValue:function(){return p},setValue:function(C){p=""+C},stopTracking:function(){o._valueTracker=null,delete o[a]}}}}function Ot(o){o._valueTracker||(o._valueTracker=rt(o))}function ct(o){if(!o)return!1;var a=o._valueTracker;if(!a)return!0;var l=a.getValue(),p="";return o&&(p=ze(o)?o.checked?"true":"false":o.value),o=p,o!==l?(a.setValue(o),!0):!1}function _t(o){if(o=o||(typeof document!="undefined"?document:void 0),typeof o=="undefined")return null;try{return o.activeElement||o.body}catch(a){return o.body}}function tt(o,a){var l=a.checked;return O({},a,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:l!=null?l:o._wrapperState.initialChecked})}function yt(o,a){var l=a.defaultValue==null?"":a.defaultValue,p=a.checked!=null?a.checked:a.defaultChecked;l=ve(a.value!=null?a.value:l),o._wrapperState={initialChecked:p,initialValue:l,controlled:a.type==="checkbox"||a.type==="radio"?a.checked!=null:a.value!=null}}function De(o,a){a=a.checked,a!=null&&R(o,"checked",a,!1)}function Ve(o,a){De(o,a);var l=ve(a.value),p=a.type;if(l!=null)p==="number"?(l===0&&o.value===""||o.value!=l)&&(o.value=""+l):o.value!==""+l&&(o.value=""+l);else if(p==="submit"||p==="reset"){o.removeAttribute("value");return}a.hasOwnProperty("value")?it(o,a.type,l):a.hasOwnProperty("defaultValue")&&it(o,a.type,ve(a.defaultValue)),a.checked==null&&a.defaultChecked!=null&&(o.defaultChecked=!!a.defaultChecked)}function Oe(o,a,l){if(a.hasOwnProperty("value")||a.hasOwnProperty("defaultValue")){var p=a.type;if(!(p!=="submit"&&p!=="reset"||a.value!==void 0&&a.value!==null))return;a=""+o._wrapperState.initialValue,l||a===o.value||(o.value=a),o.defaultValue=a}l=o.name,l!==""&&(o.name=""),o.defaultChecked=!!o._wrapperState.initialChecked,l!==""&&(o.name=l)}function it(o,a,l){(a!=="number"||_t(o.ownerDocument)!==o)&&(l==null?o.defaultValue=""+o._wrapperState.initialValue:o.defaultValue!==""+l&&(o.defaultValue=""+l))}var lt=Array.isArray;function jt(o,a,l,p){if(o=o.options,a){a={};for(var y=0;y<l.length;y++)a["$"+l[y]]=!0;for(l=0;l<o.length;l++)y=a.hasOwnProperty("$"+o[l].value),o[l].selected!==y&&(o[l].selected=y),y&&p&&(o[l].defaultSelected=!0)}else{for(l=""+ve(l),a=null,y=0;y<o.length;y++){if(o[y].value===l){o[y].selected=!0,p&&(o[y].defaultSelected=!0);return}a!==null||o[y].disabled||(a=o[y])}a!==null&&(a.selected=!0)}}function At(o,a){if(a.dangerouslySetInnerHTML!=null)throw Error(n(91));return O({},a,{value:void 0,defaultValue:void 0,children:""+o._wrapperState.initialValue})}function Ei(o,a){var l=a.value;if(l==null){if(l=a.children,a=a.defaultValue,l!=null){if(a!=null)throw Error(n(92));if(lt(l)){if(1<l.length)throw Error(n(93));l=l[0]}a=l}a==null&&(a=""),l=a}o._wrapperState={initialValue:ve(l)}}function sr(o,a){var l=ve(a.value),p=ve(a.defaultValue);l!=null&&(l=""+l,l!==o.value&&(o.value=l),a.defaultValue==null&&o.defaultValue!==l&&(o.defaultValue=l)),p!=null&&(o.defaultValue=""+p)}function Ko(o){var a=o.textContent;a===o._wrapperState.initialValue&&a!==""&&a!==null&&(o.value=a)}function he(o){switch(o){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 ke(o,a){return o==null||o==="http://www.w3.org/1999/xhtml"?he(a):o==="http://www.w3.org/2000/svg"&&a==="foreignObject"?"http://www.w3.org/1999/xhtml":o}var Qe,Je=(function(o){return typeof MSApp!="undefined"&&MSApp.execUnsafeLocalFunction?function(a,l,p,y){MSApp.execUnsafeLocalFunction(function(){return o(a,l,p,y)})}:o})(function(o,a){if(o.namespaceURI!=="http://www.w3.org/2000/svg"||"innerHTML"in o)o.innerHTML=a;else{for(Qe=Qe||document.createElement("div"),Qe.innerHTML="<svg>"+a.valueOf().toString()+"</svg>",a=Qe.firstChild;o.firstChild;)o.removeChild(o.firstChild);for(;a.firstChild;)o.appendChild(a.firstChild)}});function et(o,a){if(a){var l=o.firstChild;if(l&&l===o.lastChild&&l.nodeType===3){l.nodeValue=a;return}}o.textContent=a}var Yt={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},Yn=["Webkit","ms","Moz","O"];Object.keys(Yt).forEach(function(o){Yn.forEach(function(a){a=a+o.charAt(0).toUpperCase()+o.substring(1),Yt[a]=Yt[o]})});function mn(o,a,l){return a==null||typeof a=="boolean"||a===""?"":l||typeof a!="number"||a===0||Yt.hasOwnProperty(o)&&Yt[o]?(""+a).trim():a+"px"}function Gt(o,a){o=o.style;for(var l in a)if(a.hasOwnProperty(l)){var p=l.indexOf("--")===0,y=mn(l,a[l],p);l==="float"&&(l="cssFloat"),p?o.setProperty(l,y):o[l]=y}}var en=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function Xt(o,a){if(a){if(en[o]&&(a.children!=null||a.dangerouslySetInnerHTML!=null))throw Error(n(137,o));if(a.dangerouslySetInnerHTML!=null){if(a.children!=null)throw Error(n(60));if(typeof a.dangerouslySetInnerHTML!="object"||!("__html"in a.dangerouslySetInnerHTML))throw Error(n(61))}if(a.style!=null&&typeof a.style!="object")throw Error(n(62))}}function Mn(o,a){if(o.indexOf("-")===-1)return typeof a.is=="string";switch(o){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 wn=null;function sa(o){return o=o.target||o.srcElement||window,o.correspondingUseElement&&(o=o.correspondingUseElement),o.nodeType===3?o.parentNode:o}var Qo=null,bi=null,wi=null;function fd(o){if(o=oc(o)){if(typeof Qo!="function")throw Error(n(280));var a=o.stateNode;a&&(a=Pd(a),Qo(o.stateNode,o.type,a))}}function Mu(o){bi?wi?wi.push(o):wi=[o]:bi=o}function Fu(){if(bi){var o=bi,a=wi;if(wi=bi=null,fd(o),a)for(o=0;o<a.length;o++)fd(a[o])}}function yr(o,a){return o(a)}function Wi(){}var aa=!1;function Bu(o,a,l){if(aa)return o(a,l);aa=!0;try{return yr(o,a,l)}finally{aa=!1,(bi!==null||wi!==null)&&(Wi(),Fu())}}function Yi(o,a){var l=o.stateNode;if(l===null)return null;var p=Pd(l);if(p===null)return null;l=p[a];e:switch(a){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(p=!p.disabled)||(o=o.type,p=!(o==="button"||o==="input"||o==="select"||o==="textarea")),o=!p;break e;default:o=!1}if(o)return null;if(l&&typeof l!="function")throw Error(n(231,a,typeof l));return l}var ua=!1;if(c)try{var xi={};Object.defineProperty(xi,"passive",{get:function(){ua=!0}}),window.addEventListener("test",xi,xi),window.removeEventListener("test",xi,xi)}catch(o){ua=!1}function Uu(o,a,l,p,y,x,C,$,Y){var oe=Array.prototype.slice.call(arguments,3);try{a.apply(l,oe)}catch(xe){this.onError(xe)}}var Gi=!1,Xi=null,Ti=!1,Ki=null,eg={onError:function(o){Gi=!0,Xi=o}};function Z(o,a,l,p,y,x,C,$,Y){Gi=!1,Xi=null,Uu.apply(eg,arguments)}function ye(o,a,l,p,y,x,C,$,Y){if(Z.apply(this,arguments),Gi){if(Gi){var oe=Xi;Gi=!1,Xi=null}else throw Error(n(198));Ti||(Ti=!0,Ki=oe)}}function Ee(o){var a=o,l=o;if(o.alternate)for(;a.return;)a=a.return;else{o=a;do a=o,(a.flags&4098)!==0&&(l=a.return),o=a.return;while(o)}return a.tag===3?l:null}function Se(o){if(o.tag===13){var a=o.memoizedState;if(a===null&&(o=o.alternate,o!==null&&(a=o.memoizedState)),a!==null)return a.dehydrated}return null}function de(o){if(Ee(o)!==o)throw Error(n(188))}function Le(o){var a=o.alternate;if(!a){if(a=Ee(o),a===null)throw Error(n(188));return a!==o?null:o}for(var l=o,p=a;;){var y=l.return;if(y===null)break;var x=y.alternate;if(x===null){if(p=y.return,p!==null){l=p;continue}break}if(y.child===x.child){for(x=y.child;x;){if(x===l)return de(y),o;if(x===p)return de(y),a;x=x.sibling}throw Error(n(188))}if(l.return!==p.return)l=y,p=x;else{for(var C=!1,$=y.child;$;){if($===l){C=!0,l=y,p=x;break}if($===p){C=!0,p=y,l=x;break}$=$.sibling}if(!C){for($=x.child;$;){if($===l){C=!0,l=x,p=y;break}if($===p){C=!0,p=x,l=y;break}$=$.sibling}if(!C)throw Error(n(189))}}if(l.alternate!==p)throw Error(n(190))}if(l.tag!==3)throw Error(n(188));return l.stateNode.current===l?o:a}function $e(o){return o=Le(o),o!==null?bt(o):null}function bt(o){if(o.tag===5||o.tag===6)return o;for(o=o.child;o!==null;){var a=bt(o);if(a!==null)return a;o=o.sibling}return null}var dt=t.unstable_scheduleCallback,Ze=t.unstable_cancelCallback,ft=t.unstable_shouldYield,Kt=t.unstable_requestPaint,at=t.unstable_now,Pt=t.unstable_getCurrentPriorityLevel,Ht=t.unstable_ImmediatePriority,oi=t.unstable_UserBlockingPriority,Jo=t.unstable_NormalPriority,pd=t.unstable_LowPriority,ju=t.unstable_IdlePriority,Zo=null,ar=null;function es(o){if(ar&&typeof ar.onCommitFiberRoot=="function")try{ar.onCommitFiberRoot(Zo,o,void 0,(o.current.flags&128)===128)}catch(a){}}var Lr=Math.clz32?Math.clz32:i$,n$=Math.log,r$=Math.LN2;function i$(o){return o>>>=0,o===0?32:31-(n$(o)/r$|0)|0}var hd=64,md=4194304;function Hu(o){switch(o&-o){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 o&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return o&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return o}}function gd(o,a){var l=o.pendingLanes;if(l===0)return 0;var p=0,y=o.suspendedLanes,x=o.pingedLanes,C=l&268435455;if(C!==0){var $=C&~y;$!==0?p=Hu($):(x&=C,x!==0&&(p=Hu(x)))}else C=l&~y,C!==0?p=Hu(C):x!==0&&(p=Hu(x));if(p===0)return 0;if(a!==0&&a!==p&&(a&y)===0&&(y=p&-p,x=a&-a,y>=x||y===16&&(x&4194240)!==0))return a;if((p&4)!==0&&(p|=l&16),a=o.entangledLanes,a!==0)for(o=o.entanglements,a&=p;0<a;)l=31-Lr(a),y=1<<l,p|=o[l],a&=~y;return p}function o$(o,a){switch(o){case 1:case 2:case 4:return a+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 a+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 s$(o,a){for(var l=o.suspendedLanes,p=o.pingedLanes,y=o.expirationTimes,x=o.pendingLanes;0<x;){var C=31-Lr(x),$=1<<C,Y=y[C];Y===-1?(($&l)===0||($&p)!==0)&&(y[C]=o$($,a)):Y<=a&&(o.expiredLanes|=$),x&=~$}}function tg(o){return o=o.pendingLanes&-1073741825,o!==0?o:o&1073741824?1073741824:0}function Av(){var o=hd;return hd<<=1,(hd&4194240)===0&&(hd=64),o}function ng(o){for(var a=[],l=0;31>l;l++)a.push(o);return a}function $u(o,a,l){o.pendingLanes|=a,a!==536870912&&(o.suspendedLanes=0,o.pingedLanes=0),o=o.eventTimes,a=31-Lr(a),o[a]=l}function a$(o,a){var l=o.pendingLanes&~a;o.pendingLanes=a,o.suspendedLanes=0,o.pingedLanes=0,o.expiredLanes&=a,o.mutableReadLanes&=a,o.entangledLanes&=a,a=o.entanglements;var p=o.eventTimes;for(o=o.expirationTimes;0<l;){var y=31-Lr(l),x=1<<y;a[y]=0,p[y]=-1,o[y]=-1,l&=~x}}function rg(o,a){var l=o.entangledLanes|=a;for(o=o.entanglements;l;){var p=31-Lr(l),y=1<<p;y&a|o[p]&a&&(o[p]|=a),l&=~y}}var vt=0;function kv(o){return o&=-o,1<o?4<o?(o&268435455)!==0?16:536870912:4:1}var Cv,ig,Nv,Iv,Ov,og=!1,yd=[],Qi=null,Ji=null,Zi=null,zu=new Map,Vu=new Map,eo=[],u$="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 Pv(o,a){switch(o){case"focusin":case"focusout":Qi=null;break;case"dragenter":case"dragleave":Ji=null;break;case"mouseover":case"mouseout":Zi=null;break;case"pointerover":case"pointerout":zu.delete(a.pointerId);break;case"gotpointercapture":case"lostpointercapture":Vu.delete(a.pointerId)}}function qu(o,a,l,p,y,x){return o===null||o.nativeEvent!==x?(o={blockedOn:a,domEventName:l,eventSystemFlags:p,nativeEvent:x,targetContainers:[y]},a!==null&&(a=oc(a),a!==null&&ig(a)),o):(o.eventSystemFlags|=p,a=o.targetContainers,y!==null&&a.indexOf(y)===-1&&a.push(y),o)}function c$(o,a,l,p,y){switch(a){case"focusin":return Qi=qu(Qi,o,a,l,p,y),!0;case"dragenter":return Ji=qu(Ji,o,a,l,p,y),!0;case"mouseover":return Zi=qu(Zi,o,a,l,p,y),!0;case"pointerover":var x=y.pointerId;return zu.set(x,qu(zu.get(x)||null,o,a,l,p,y)),!0;case"gotpointercapture":return x=y.pointerId,Vu.set(x,qu(Vu.get(x)||null,o,a,l,p,y)),!0}return!1}function Rv(o){var a=ts(o.target);if(a!==null){var l=Ee(a);if(l!==null){if(a=l.tag,a===13){if(a=Se(l),a!==null){o.blockedOn=a,Ov(o.priority,function(){Nv(l)});return}}else if(a===3&&l.stateNode.current.memoizedState.isDehydrated){o.blockedOn=l.tag===3?l.stateNode.containerInfo:null;return}}}o.blockedOn=null}function Ed(o){if(o.blockedOn!==null)return!1;for(var a=o.targetContainers;0<a.length;){var l=ag(o.domEventName,o.eventSystemFlags,a[0],o.nativeEvent);if(l===null){l=o.nativeEvent;var p=new l.constructor(l.type,l);wn=p,l.target.dispatchEvent(p),wn=null}else return a=oc(l),a!==null&&ig(a),o.blockedOn=l,!1;a.shift()}return!0}function Lv(o,a,l){Ed(o)&&l.delete(a)}function l$(){og=!1,Qi!==null&&Ed(Qi)&&(Qi=null),Ji!==null&&Ed(Ji)&&(Ji=null),Zi!==null&&Ed(Zi)&&(Zi=null),zu.forEach(Lv),Vu.forEach(Lv)}function Wu(o,a){o.blockedOn===a&&(o.blockedOn=null,og||(og=!0,t.unstable_scheduleCallback(t.unstable_NormalPriority,l$)))}function Yu(o){function a(y){return Wu(y,o)}if(0<yd.length){Wu(yd[0],o);for(var l=1;l<yd.length;l++){var p=yd[l];p.blockedOn===o&&(p.blockedOn=null)}}for(Qi!==null&&Wu(Qi,o),Ji!==null&&Wu(Ji,o),Zi!==null&&Wu(Zi,o),zu.forEach(a),Vu.forEach(a),l=0;l<eo.length;l++)p=eo[l],p.blockedOn===o&&(p.blockedOn=null);for(;0<eo.length&&(l=eo[0],l.blockedOn===null);)Rv(l),l.blockedOn===null&&eo.shift()}var ca=U.ReactCurrentBatchConfig,bd=!0;function d$(o,a,l,p){var y=vt,x=ca.transition;ca.transition=null;try{vt=1,sg(o,a,l,p)}finally{vt=y,ca.transition=x}}function f$(o,a,l,p){var y=vt,x=ca.transition;ca.transition=null;try{vt=4,sg(o,a,l,p)}finally{vt=y,ca.transition=x}}function sg(o,a,l,p){if(bd){var y=ag(o,a,l,p);if(y===null)vg(o,a,p,wd,l),Pv(o,p);else if(c$(y,o,a,l,p))p.stopPropagation();else if(Pv(o,p),a&4&&-1<u$.indexOf(o)){for(;y!==null;){var x=oc(y);if(x!==null&&Cv(x),x=ag(o,a,l,p),x===null&&vg(o,a,p,wd,l),x===y)break;y=x}y!==null&&p.stopPropagation()}else vg(o,a,p,null,l)}}var wd=null;function ag(o,a,l,p){if(wd=null,o=sa(p),o=ts(o),o!==null)if(a=Ee(o),a===null)o=null;else if(l=a.tag,l===13){if(o=Se(a),o!==null)return o;o=null}else if(l===3){if(a.stateNode.current.memoizedState.isDehydrated)return a.tag===3?a.stateNode.containerInfo:null;o=null}else a!==o&&(o=null);return wd=o,null}function Dv(o){switch(o){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(Pt()){case Ht:return 1;case oi:return 4;case Jo:case pd:return 16;case ju:return 536870912;default:return 16}default:return 16}}var to=null,ug=null,xd=null;function Mv(){if(xd)return xd;var o,a=ug,l=a.length,p,y="value"in to?to.value:to.textContent,x=y.length;for(o=0;o<l&&a[o]===y[o];o++);var C=l-o;for(p=1;p<=C&&a[l-p]===y[x-p];p++);return xd=y.slice(o,1<p?1-p:void 0)}function Td(o){var a=o.keyCode;return"charCode"in o?(o=o.charCode,o===0&&a===13&&(o=13)):o=a,o===10&&(o=13),32<=o||o===13?o:0}function _d(){return!0}function Fv(){return!1}function ur(o){function a(l,p,y,x,C){this._reactName=l,this._targetInst=y,this.type=p,this.nativeEvent=x,this.target=C,this.currentTarget=null;for(var $ in o)o.hasOwnProperty($)&&(l=o[$],this[$]=l?l(x):x[$]);return this.isDefaultPrevented=(x.defaultPrevented!=null?x.defaultPrevented:x.returnValue===!1)?_d:Fv,this.isPropagationStopped=Fv,this}return O(a.prototype,{preventDefault:function(){this.defaultPrevented=!0;var l=this.nativeEvent;l&&(l.preventDefault?l.preventDefault():typeof l.returnValue!="unknown"&&(l.returnValue=!1),this.isDefaultPrevented=_d)},stopPropagation:function(){var l=this.nativeEvent;l&&(l.stopPropagation?l.stopPropagation():typeof l.cancelBubble!="unknown"&&(l.cancelBubble=!0),this.isPropagationStopped=_d)},persist:function(){},isPersistent:_d}),a}var la={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(o){return o.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cg=ur(la),Gu=O({},la,{view:0,detail:0}),p$=ur(Gu),lg,dg,Xu,vd=O({},Gu,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:pg,button:0,buttons:0,relatedTarget:function(o){return o.relatedTarget===void 0?o.fromElement===o.srcElement?o.toElement:o.fromElement:o.relatedTarget},movementX:function(o){return"movementX"in o?o.movementX:(o!==Xu&&(Xu&&o.type==="mousemove"?(lg=o.screenX-Xu.screenX,dg=o.screenY-Xu.screenY):dg=lg=0,Xu=o),lg)},movementY:function(o){return"movementY"in o?o.movementY:dg}}),Bv=ur(vd),h$=O({},vd,{dataTransfer:0}),m$=ur(h$),g$=O({},Gu,{relatedTarget:0}),fg=ur(g$),y$=O({},la,{animationName:0,elapsedTime:0,pseudoElement:0}),E$=ur(y$),b$=O({},la,{clipboardData:function(o){return"clipboardData"in o?o.clipboardData:window.clipboardData}}),w$=ur(b$),x$=O({},la,{data:0}),Uv=ur(x$),T$={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},_$={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"},v$={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function S$(o){var a=this.nativeEvent;return a.getModifierState?a.getModifierState(o):(o=v$[o])?!!a[o]:!1}function pg(){return S$}var A$=O({},Gu,{key:function(o){if(o.key){var a=T$[o.key]||o.key;if(a!=="Unidentified")return a}return o.type==="keypress"?(o=Td(o),o===13?"Enter":String.fromCharCode(o)):o.type==="keydown"||o.type==="keyup"?_$[o.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:pg,charCode:function(o){return o.type==="keypress"?Td(o):0},keyCode:function(o){return o.type==="keydown"||o.type==="keyup"?o.keyCode:0},which:function(o){return o.type==="keypress"?Td(o):o.type==="keydown"||o.type==="keyup"?o.keyCode:0}}),k$=ur(A$),C$=O({},vd,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0}),jv=ur(C$),N$=O({},Gu,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:pg}),I$=ur(N$),O$=O({},la,{propertyName:0,elapsedTime:0,pseudoElement:0}),P$=ur(O$),R$=O({},vd,{deltaX:function(o){return"deltaX"in o?o.deltaX:"wheelDeltaX"in o?-o.wheelDeltaX:0},deltaY:function(o){return"deltaY"in o?o.deltaY:"wheelDeltaY"in o?-o.wheelDeltaY:"wheelDelta"in o?-o.wheelDelta:0},deltaZ:0,deltaMode:0}),L$=ur(R$),D$=[9,13,27,32],hg=c&&"CompositionEvent"in window,Ku=null;c&&"documentMode"in document&&(Ku=document.documentMode);var M$=c&&"TextEvent"in window&&!Ku,Hv=c&&(!hg||Ku&&8<Ku&&11>=Ku),$v=" ",zv=!1;function Vv(o,a){switch(o){case"keyup":return D$.indexOf(a.keyCode)!==-1;case"keydown":return a.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function qv(o){return o=o.detail,typeof o=="object"&&"data"in o?o.data:null}var da=!1;function F$(o,a){switch(o){case"compositionend":return qv(a);case"keypress":return a.which!==32?null:(zv=!0,$v);case"textInput":return o=a.data,o===$v&&zv?null:o;default:return null}}function B$(o,a){if(da)return o==="compositionend"||!hg&&Vv(o,a)?(o=Mv(),xd=ug=to=null,da=!1,o):null;switch(o){case"paste":return null;case"keypress":if(!(a.ctrlKey||a.altKey||a.metaKey)||a.ctrlKey&&a.altKey){if(a.char&&1<a.char.length)return a.char;if(a.which)return String.fromCharCode(a.which)}return null;case"compositionend":return Hv&&a.locale!=="ko"?null:a.data;default:return null}}var U$={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 Wv(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a==="input"?!!U$[o.type]:a==="textarea"}function Yv(o,a,l,p){Mu(p),a=Nd(a,"onChange"),0<a.length&&(l=new cg("onChange","change",null,l,p),o.push({event:l,listeners:a}))}var Qu=null,Ju=null;function j$(o){d2(o,0)}function Sd(o){var a=ga(o);if(ct(a))return o}function H$(o,a){if(o==="change")return a}var Gv=!1;if(c){var mg;if(c){var gg="oninput"in document;if(!gg){var Xv=document.createElement("div");Xv.setAttribute("oninput","return;"),gg=typeof Xv.oninput=="function"}mg=gg}else mg=!1;Gv=mg&&(!document.documentMode||9<document.documentMode)}function Kv(){Qu&&(Qu.detachEvent("onpropertychange",Qv),Ju=Qu=null)}function Qv(o){if(o.propertyName==="value"&&Sd(Ju)){var a=[];Yv(a,Ju,o,sa(o)),Bu(j$,a)}}function $$(o,a,l){o==="focusin"?(Kv(),Qu=a,Ju=l,Qu.attachEvent("onpropertychange",Qv)):o==="focusout"&&Kv()}function z$(o){if(o==="selectionchange"||o==="keyup"||o==="keydown")return Sd(Ju)}function V$(o,a){if(o==="click")return Sd(a)}function q$(o,a){if(o==="input"||o==="change")return Sd(a)}function W$(o,a){return o===a&&(o!==0||1/o===1/a)||o!==o&&a!==a}var Dr=typeof Object.is=="function"?Object.is:W$;function Zu(o,a){if(Dr(o,a))return!0;if(typeof o!="object"||o===null||typeof a!="object"||a===null)return!1;var l=Object.keys(o),p=Object.keys(a);if(l.length!==p.length)return!1;for(p=0;p<l.length;p++){var y=l[p];if(!d.call(a,y)||!Dr(o[y],a[y]))return!1}return!0}function Jv(o){for(;o&&o.firstChild;)o=o.firstChild;return o}function Zv(o,a){var l=Jv(o);o=0;for(var p;l;){if(l.nodeType===3){if(p=o+l.textContent.length,o<=a&&p>=a)return{node:l,offset:a-o};o=p}e:{for(;l;){if(l.nextSibling){l=l.nextSibling;break e}l=l.parentNode}l=void 0}l=Jv(l)}}function e2(o,a){return o&&a?o===a?!0:o&&o.nodeType===3?!1:a&&a.nodeType===3?e2(o,a.parentNode):"contains"in o?o.contains(a):o.compareDocumentPosition?!!(o.compareDocumentPosition(a)&16):!1:!1}function t2(){for(var o=window,a=_t();a instanceof o.HTMLIFrameElement;){try{var l=typeof a.contentWindow.location.href=="string"}catch(p){l=!1}if(l)o=a.contentWindow;else break;a=_t(o.document)}return a}function yg(o){var a=o&&o.nodeName&&o.nodeName.toLowerCase();return a&&(a==="input"&&(o.type==="text"||o.type==="search"||o.type==="tel"||o.type==="url"||o.type==="password")||a==="textarea"||o.contentEditable==="true")}function Y$(o){var a=t2(),l=o.focusedElem,p=o.selectionRange;if(a!==l&&l&&l.ownerDocument&&e2(l.ownerDocument.documentElement,l)){if(p!==null&&yg(l)){if(a=p.start,o=p.end,o===void 0&&(o=a),"selectionStart"in l)l.selectionStart=a,l.selectionEnd=Math.min(o,l.value.length);else if(o=(a=l.ownerDocument||document)&&a.defaultView||window,o.getSelection){o=o.getSelection();var y=l.textContent.length,x=Math.min(p.start,y);p=p.end===void 0?x:Math.min(p.end,y),!o.extend&&x>p&&(y=p,p=x,x=y),y=Zv(l,x);var C=Zv(l,p);y&&C&&(o.rangeCount!==1||o.anchorNode!==y.node||o.anchorOffset!==y.offset||o.focusNode!==C.node||o.focusOffset!==C.offset)&&(a=a.createRange(),a.setStart(y.node,y.offset),o.removeAllRanges(),x>p?(o.addRange(a),o.extend(C.node,C.offset)):(a.setEnd(C.node,C.offset),o.addRange(a)))}}for(a=[],o=l;o=o.parentNode;)o.nodeType===1&&a.push({element:o,left:o.scrollLeft,top:o.scrollTop});for(typeof l.focus=="function"&&l.focus(),l=0;l<a.length;l++)o=a[l],o.element.scrollLeft=o.left,o.element.scrollTop=o.top}}var G$=c&&"documentMode"in document&&11>=document.documentMode,fa=null,Eg=null,ec=null,bg=!1;function n2(o,a,l){var p=l.window===l?l.document:l.nodeType===9?l:l.ownerDocument;bg||fa==null||fa!==_t(p)||(p=fa,"selectionStart"in p&&yg(p)?p={start:p.selectionStart,end:p.selectionEnd}:(p=(p.ownerDocument&&p.ownerDocument.defaultView||window).getSelection(),p={anchorNode:p.anchorNode,anchorOffset:p.anchorOffset,focusNode:p.focusNode,focusOffset:p.focusOffset}),ec&&Zu(ec,p)||(ec=p,p=Nd(Eg,"onSelect"),0<p.length&&(a=new cg("onSelect","select",null,a,l),o.push({event:a,listeners:p}),a.target=fa)))}function Ad(o,a){var l={};return l[o.toLowerCase()]=a.toLowerCase(),l["Webkit"+o]="webkit"+a,l["Moz"+o]="moz"+a,l}var pa={animationend:Ad("Animation","AnimationEnd"),animationiteration:Ad("Animation","AnimationIteration"),animationstart:Ad("Animation","AnimationStart"),transitionend:Ad("Transition","TransitionEnd")},wg={},r2={};c&&(r2=document.createElement("div").style,"AnimationEvent"in window||(delete pa.animationend.animation,delete pa.animationiteration.animation,delete pa.animationstart.animation),"TransitionEvent"in window||delete pa.transitionend.transition);function kd(o){if(wg[o])return wg[o];if(!pa[o])return o;var a=pa[o],l;for(l in a)if(a.hasOwnProperty(l)&&l in r2)return wg[o]=a[l];return o}var i2=kd("animationend"),o2=kd("animationiteration"),s2=kd("animationstart"),a2=kd("transitionend"),u2=new Map,c2="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 no(o,a){u2.set(o,a),s(a,[o])}for(var xg=0;xg<c2.length;xg++){var Tg=c2[xg],X$=Tg.toLowerCase(),K$=Tg[0].toUpperCase()+Tg.slice(1);no(X$,"on"+K$)}no(i2,"onAnimationEnd"),no(o2,"onAnimationIteration"),no(s2,"onAnimationStart"),no("dblclick","onDoubleClick"),no("focusin","onFocus"),no("focusout","onBlur"),no(a2,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),s("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),s("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),s("onBeforeInput",["compositionend","keypress","textInput","paste"]),s("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),s("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var tc="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(" "),Q$=new Set("cancel close invalid load scroll toggle".split(" ").concat(tc));function l2(o,a,l){var p=o.type||"unknown-event";o.currentTarget=l,ye(p,a,void 0,o),o.currentTarget=null}function d2(o,a){a=(a&4)!==0;for(var l=0;l<o.length;l++){var p=o[l],y=p.event;p=p.listeners;e:{var x=void 0;if(a)for(var C=p.length-1;0<=C;C--){var $=p[C],Y=$.instance,oe=$.currentTarget;if($=$.listener,Y!==x&&y.isPropagationStopped())break e;l2(y,$,oe),x=Y}else for(C=0;C<p.length;C++){if($=p[C],Y=$.instance,oe=$.currentTarget,$=$.listener,Y!==x&&y.isPropagationStopped())break e;l2(y,$,oe),x=Y}}}if(Ti)throw o=Ki,Ti=!1,Ki=null,o}function Mt(o,a){var l=a[Ig];l===void 0&&(l=a[Ig]=new Set);var p=o+"__bubble";l.has(p)||(f2(a,o,2,!1),l.add(p))}function _g(o,a,l){var p=0;a&&(p|=4),f2(l,o,p,a)}var Cd="_reactListening"+Math.random().toString(36).slice(2);function nc(o){if(!o[Cd]){o[Cd]=!0,r.forEach(function(l){l!=="selectionchange"&&(Q$.has(l)||_g(l,!1,o),_g(l,!0,o))});var a=o.nodeType===9?o:o.ownerDocument;a===null||a[Cd]||(a[Cd]=!0,_g("selectionchange",!1,a))}}function f2(o,a,l,p){switch(Dv(a)){case 1:var y=d$;break;case 4:y=f$;break;default:y=sg}l=y.bind(null,a,l,o),y=void 0,!ua||a!=="touchstart"&&a!=="touchmove"&&a!=="wheel"||(y=!0),p?y!==void 0?o.addEventListener(a,l,{capture:!0,passive:y}):o.addEventListener(a,l,!0):y!==void 0?o.addEventListener(a,l,{passive:y}):o.addEventListener(a,l,!1)}function vg(o,a,l,p,y){var x=p;if((a&1)===0&&(a&2)===0&&p!==null)e:for(;;){if(p===null)return;var C=p.tag;if(C===3||C===4){var $=p.stateNode.containerInfo;if($===y||$.nodeType===8&&$.parentNode===y)break;if(C===4)for(C=p.return;C!==null;){var Y=C.tag;if((Y===3||Y===4)&&(Y=C.stateNode.containerInfo,Y===y||Y.nodeType===8&&Y.parentNode===y))return;C=C.return}for(;$!==null;){if(C=ts($),C===null)return;if(Y=C.tag,Y===5||Y===6){p=x=C;continue e}$=$.parentNode}}p=p.return}Bu(function(){var oe=x,xe=sa(l),_e=[];e:{var be=u2.get(o);if(be!==void 0){var Me=cg,Ue=o;switch(o){case"keypress":if(Td(l)===0)break e;case"keydown":case"keyup":Me=k$;break;case"focusin":Ue="focus",Me=fg;break;case"focusout":Ue="blur",Me=fg;break;case"beforeblur":case"afterblur":Me=fg;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":Me=Bv;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":Me=m$;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":Me=I$;break;case i2:case o2:case s2:Me=E$;break;case a2:Me=P$;break;case"scroll":Me=p$;break;case"wheel":Me=L$;break;case"copy":case"cut":case"paste":Me=w$;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":Me=jv}var je=(a&4)!==0,tn=!je&&o==="scroll",te=je?be!==null?be+"Capture":null:be;je=[];for(var K=oe,ie;K!==null;){ie=K;var Ce=ie.stateNode;if(ie.tag===5&&Ce!==null&&(ie=Ce,te!==null&&(Ce=Yi(K,te),Ce!=null&&je.push(rc(K,Ce,ie)))),tn)break;K=K.return}0<je.length&&(be=new Me(be,Ue,null,l,xe),_e.push({event:be,listeners:je}))}}if((a&7)===0){e:{if(be=o==="mouseover"||o==="pointerover",Me=o==="mouseout"||o==="pointerout",be&&l!==wn&&(Ue=l.relatedTarget||l.fromElement)&&(ts(Ue)||Ue[_i]))break e;if((Me||be)&&(be=xe.window===xe?xe:(be=xe.ownerDocument)?be.defaultView||be.parentWindow:window,Me?(Ue=l.relatedTarget||l.toElement,Me=oe,Ue=Ue?ts(Ue):null,Ue!==null&&(tn=Ee(Ue),Ue!==tn||Ue.tag!==5&&Ue.tag!==6)&&(Ue=null)):(Me=null,Ue=oe),Me!==Ue)){if(je=Bv,Ce="onMouseLeave",te="onMouseEnter",K="mouse",(o==="pointerout"||o==="pointerover")&&(je=jv,Ce="onPointerLeave",te="onPointerEnter",K="pointer"),tn=Me==null?be:ga(Me),ie=Ue==null?be:ga(Ue),be=new je(Ce,K+"leave",Me,l,xe),be.target=tn,be.relatedTarget=ie,Ce=null,ts(xe)===oe&&(je=new je(te,K+"enter",Ue,l,xe),je.target=ie,je.relatedTarget=tn,Ce=je),tn=Ce,Me&&Ue)t:{for(je=Me,te=Ue,K=0,ie=je;ie;ie=ha(ie))K++;for(ie=0,Ce=te;Ce;Ce=ha(Ce))ie++;for(;0<K-ie;)je=ha(je),K--;for(;0<ie-K;)te=ha(te),ie--;for(;K--;){if(je===te||te!==null&&je===te.alternate)break t;je=ha(je),te=ha(te)}je=null}else je=null;Me!==null&&p2(_e,be,Me,je,!1),Ue!==null&&tn!==null&&p2(_e,tn,Ue,je,!0)}}e:{if(be=oe?ga(oe):window,Me=be.nodeName&&be.nodeName.toLowerCase(),Me==="select"||Me==="input"&&be.type==="file")var He=H$;else if(Wv(be))if(Gv)He=q$;else{He=z$;var Ge=$$}else(Me=be.nodeName)&&Me.toLowerCase()==="input"&&(be.type==="checkbox"||be.type==="radio")&&(He=V$);if(He&&(He=He(o,oe))){Yv(_e,He,l,xe);break e}Ge&&Ge(o,be,oe),o==="focusout"&&(Ge=be._wrapperState)&&Ge.controlled&&be.type==="number"&&it(be,"number",be.value)}switch(Ge=oe?ga(oe):window,o){case"focusin":(Wv(Ge)||Ge.contentEditable==="true")&&(fa=Ge,Eg=oe,ec=null);break;case"focusout":ec=Eg=fa=null;break;case"mousedown":bg=!0;break;case"contextmenu":case"mouseup":case"dragend":bg=!1,n2(_e,l,xe);break;case"selectionchange":if(G$)break;case"keydown":case"keyup":n2(_e,l,xe)}var Xe;if(hg)e:{switch(o){case"compositionstart":var nt="onCompositionStart";break e;case"compositionend":nt="onCompositionEnd";break e;case"compositionupdate":nt="onCompositionUpdate";break e}nt=void 0}else da?Vv(o,l)&&(nt="onCompositionEnd"):o==="keydown"&&l.keyCode===229&&(nt="onCompositionStart");nt&&(Hv&&l.locale!=="ko"&&(da||nt!=="onCompositionStart"?nt==="onCompositionEnd"&&da&&(Xe=Mv()):(to=xe,ug="value"in to?to.value:to.textContent,da=!0)),Ge=Nd(oe,nt),0<Ge.length&&(nt=new Uv(nt,o,null,l,xe),_e.push({event:nt,listeners:Ge}),Xe?nt.data=Xe:(Xe=qv(l),Xe!==null&&(nt.data=Xe)))),(Xe=M$?F$(o,l):B$(o,l))&&(oe=Nd(oe,"onBeforeInput"),0<oe.length&&(xe=new Uv("onBeforeInput","beforeinput",null,l,xe),_e.push({event:xe,listeners:oe}),xe.data=Xe))}d2(_e,a)})}function rc(o,a,l){return{instance:o,listener:a,currentTarget:l}}function Nd(o,a){for(var l=a+"Capture",p=[];o!==null;){var y=o,x=y.stateNode;y.tag===5&&x!==null&&(y=x,x=Yi(o,l),x!=null&&p.unshift(rc(o,x,y)),x=Yi(o,a),x!=null&&p.push(rc(o,x,y))),o=o.return}return p}function ha(o){if(o===null)return null;do o=o.return;while(o&&o.tag!==5);return o||null}function p2(o,a,l,p,y){for(var x=a._reactName,C=[];l!==null&&l!==p;){var $=l,Y=$.alternate,oe=$.stateNode;if(Y!==null&&Y===p)break;$.tag===5&&oe!==null&&($=oe,y?(Y=Yi(l,x),Y!=null&&C.unshift(rc(l,Y,$))):y||(Y=Yi(l,x),Y!=null&&C.push(rc(l,Y,$)))),l=l.return}C.length!==0&&o.push({event:a,listeners:C})}var J$=/\r\n?/g,Z$=/\u0000|\uFFFD/g;function h2(o){return(typeof o=="string"?o:""+o).replace(J$,`
21
+ `).replace(Z$,"")}function Id(o,a,l){if(a=h2(a),h2(o)!==a&&l)throw Error(n(425))}function Od(){}var Sg=null,Ag=null;function kg(o,a){return o==="textarea"||o==="noscript"||typeof a.children=="string"||typeof a.children=="number"||typeof a.dangerouslySetInnerHTML=="object"&&a.dangerouslySetInnerHTML!==null&&a.dangerouslySetInnerHTML.__html!=null}var Cg=typeof setTimeout=="function"?setTimeout:void 0,ez=typeof clearTimeout=="function"?clearTimeout:void 0,m2=typeof Promise=="function"?Promise:void 0,tz=typeof queueMicrotask=="function"?queueMicrotask:typeof m2!="undefined"?function(o){return m2.resolve(null).then(o).catch(nz)}:Cg;function nz(o){setTimeout(function(){throw o})}function Ng(o,a){var l=a,p=0;do{var y=l.nextSibling;if(o.removeChild(l),y&&y.nodeType===8)if(l=y.data,l==="/$"){if(p===0){o.removeChild(y),Yu(a);return}p--}else l!=="$"&&l!=="$?"&&l!=="$!"||p++;l=y}while(l);Yu(a)}function ro(o){for(;o!=null;o=o.nextSibling){var a=o.nodeType;if(a===1||a===3)break;if(a===8){if(a=o.data,a==="$"||a==="$!"||a==="$?")break;if(a==="/$")return null}}return o}function g2(o){o=o.previousSibling;for(var a=0;o;){if(o.nodeType===8){var l=o.data;if(l==="$"||l==="$!"||l==="$?"){if(a===0)return o;a--}else l==="/$"&&a++}o=o.previousSibling}return null}var ma=Math.random().toString(36).slice(2),si="__reactFiber$"+ma,ic="__reactProps$"+ma,_i="__reactContainer$"+ma,Ig="__reactEvents$"+ma,rz="__reactListeners$"+ma,iz="__reactHandles$"+ma;function ts(o){var a=o[si];if(a)return a;for(var l=o.parentNode;l;){if(a=l[_i]||l[si]){if(l=a.alternate,a.child!==null||l!==null&&l.child!==null)for(o=g2(o);o!==null;){if(l=o[si])return l;o=g2(o)}return a}o=l,l=o.parentNode}return null}function oc(o){return o=o[si]||o[_i],!o||o.tag!==5&&o.tag!==6&&o.tag!==13&&o.tag!==3?null:o}function ga(o){if(o.tag===5||o.tag===6)return o.stateNode;throw Error(n(33))}function Pd(o){return o[ic]||null}var Og=[],ya=-1;function io(o){return{current:o}}function Ft(o){0>ya||(o.current=Og[ya],Og[ya]=null,ya--)}function Rt(o,a){ya++,Og[ya]=o.current,o.current=a}var oo={},In=io(oo),Gn=io(!1),ns=oo;function Ea(o,a){var l=o.type.contextTypes;if(!l)return oo;var p=o.stateNode;if(p&&p.__reactInternalMemoizedUnmaskedChildContext===a)return p.__reactInternalMemoizedMaskedChildContext;var y={},x;for(x in l)y[x]=a[x];return p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=a,o.__reactInternalMemoizedMaskedChildContext=y),y}function Xn(o){return o=o.childContextTypes,o!=null}function Rd(){Ft(Gn),Ft(In)}function y2(o,a,l){if(In.current!==oo)throw Error(n(168));Rt(In,a),Rt(Gn,l)}function E2(o,a,l){var p=o.stateNode;if(a=a.childContextTypes,typeof p.getChildContext!="function")return l;p=p.getChildContext();for(var y in p)if(!(y in a))throw Error(n(108,Ne(o)||"Unknown",y));return O({},l,p)}function Ld(o){return o=(o=o.stateNode)&&o.__reactInternalMemoizedMergedChildContext||oo,ns=In.current,Rt(In,o),Rt(Gn,Gn.current),!0}function b2(o,a,l){var p=o.stateNode;if(!p)throw Error(n(169));l?(o=E2(o,a,ns),p.__reactInternalMemoizedMergedChildContext=o,Ft(Gn),Ft(In),Rt(In,o)):Ft(Gn),Rt(Gn,l)}var vi=null,Dd=!1,Pg=!1;function w2(o){vi===null?vi=[o]:vi.push(o)}function oz(o){Dd=!0,w2(o)}function so(){if(!Pg&&vi!==null){Pg=!0;var o=0,a=vt;try{var l=vi;for(vt=1;o<l.length;o++){var p=l[o];do p=p(!0);while(p!==null)}vi=null,Dd=!1}catch(y){throw vi!==null&&(vi=vi.slice(o+1)),dt(Ht,so),y}finally{vt=a,Pg=!1}}return null}var ba=[],wa=0,Md=null,Fd=0,Er=[],br=0,rs=null,Si=1,Ai="";function is(o,a){ba[wa++]=Fd,ba[wa++]=Md,Md=o,Fd=a}function x2(o,a,l){Er[br++]=Si,Er[br++]=Ai,Er[br++]=rs,rs=o;var p=Si;o=Ai;var y=32-Lr(p)-1;p&=~(1<<y),l+=1;var x=32-Lr(a)+y;if(30<x){var C=y-y%5;x=(p&(1<<C)-1).toString(32),p>>=C,y-=C,Si=1<<32-Lr(a)+y|l<<y|p,Ai=x+o}else Si=1<<x|l<<y|p,Ai=o}function Rg(o){o.return!==null&&(is(o,1),x2(o,1,0))}function Lg(o){for(;o===Md;)Md=ba[--wa],ba[wa]=null,Fd=ba[--wa],ba[wa]=null;for(;o===rs;)rs=Er[--br],Er[br]=null,Ai=Er[--br],Er[br]=null,Si=Er[--br],Er[br]=null}var cr=null,lr=null,$t=!1,Mr=null;function T2(o,a){var l=_r(5,null,null,0);l.elementType="DELETED",l.stateNode=a,l.return=o,a=o.deletions,a===null?(o.deletions=[l],o.flags|=16):a.push(l)}function _2(o,a){switch(o.tag){case 5:var l=o.type;return a=a.nodeType!==1||l.toLowerCase()!==a.nodeName.toLowerCase()?null:a,a!==null?(o.stateNode=a,cr=o,lr=ro(a.firstChild),!0):!1;case 6:return a=o.pendingProps===""||a.nodeType!==3?null:a,a!==null?(o.stateNode=a,cr=o,lr=null,!0):!1;case 13:return a=a.nodeType!==8?null:a,a!==null?(l=rs!==null?{id:Si,overflow:Ai}:null,o.memoizedState={dehydrated:a,treeContext:l,retryLane:1073741824},l=_r(18,null,null,0),l.stateNode=a,l.return=o,o.child=l,cr=o,lr=null,!0):!1;default:return!1}}function Dg(o){return(o.mode&1)!==0&&(o.flags&128)===0}function Mg(o){if($t){var a=lr;if(a){var l=a;if(!_2(o,a)){if(Dg(o))throw Error(n(418));a=ro(l.nextSibling);var p=cr;a&&_2(o,a)?T2(p,l):(o.flags=o.flags&-4097|2,$t=!1,cr=o)}}else{if(Dg(o))throw Error(n(418));o.flags=o.flags&-4097|2,$t=!1,cr=o}}}function v2(o){for(o=o.return;o!==null&&o.tag!==5&&o.tag!==3&&o.tag!==13;)o=o.return;cr=o}function Bd(o){if(o!==cr)return!1;if(!$t)return v2(o),$t=!0,!1;var a;if((a=o.tag!==3)&&!(a=o.tag!==5)&&(a=o.type,a=a!=="head"&&a!=="body"&&!kg(o.type,o.memoizedProps)),a&&(a=lr)){if(Dg(o))throw S2(),Error(n(418));for(;a;)T2(o,a),a=ro(a.nextSibling)}if(v2(o),o.tag===13){if(o=o.memoizedState,o=o!==null?o.dehydrated:null,!o)throw Error(n(317));e:{for(o=o.nextSibling,a=0;o;){if(o.nodeType===8){var l=o.data;if(l==="/$"){if(a===0){lr=ro(o.nextSibling);break e}a--}else l!=="$"&&l!=="$!"&&l!=="$?"||a++}o=o.nextSibling}lr=null}}else lr=cr?ro(o.stateNode.nextSibling):null;return!0}function S2(){for(var o=lr;o;)o=ro(o.nextSibling)}function xa(){lr=cr=null,$t=!1}function Fg(o){Mr===null?Mr=[o]:Mr.push(o)}var sz=U.ReactCurrentBatchConfig;function sc(o,a,l){if(o=l.ref,o!==null&&typeof o!="function"&&typeof o!="object"){if(l._owner){if(l=l._owner,l){if(l.tag!==1)throw Error(n(309));var p=l.stateNode}if(!p)throw Error(n(147,o));var y=p,x=""+o;return a!==null&&a.ref!==null&&typeof a.ref=="function"&&a.ref._stringRef===x?a.ref:(a=function(C){var $=y.refs;C===null?delete $[x]:$[x]=C},a._stringRef=x,a)}if(typeof o!="string")throw Error(n(284));if(!l._owner)throw Error(n(290,o))}return o}function Ud(o,a){throw o=Object.prototype.toString.call(a),Error(n(31,o==="[object Object]"?"object with keys {"+Object.keys(a).join(", ")+"}":o))}function A2(o){var a=o._init;return a(o._payload)}function k2(o){function a(te,K){if(o){var ie=te.deletions;ie===null?(te.deletions=[K],te.flags|=16):ie.push(K)}}function l(te,K){if(!o)return null;for(;K!==null;)a(te,K),K=K.sibling;return null}function p(te,K){for(te=new Map;K!==null;)K.key!==null?te.set(K.key,K):te.set(K.index,K),K=K.sibling;return te}function y(te,K){return te=mo(te,K),te.index=0,te.sibling=null,te}function x(te,K,ie){return te.index=ie,o?(ie=te.alternate,ie!==null?(ie=ie.index,ie<K?(te.flags|=2,K):ie):(te.flags|=2,K)):(te.flags|=1048576,K)}function C(te){return o&&te.alternate===null&&(te.flags|=2),te}function $(te,K,ie,Ce){return K===null||K.tag!==6?(K=C0(ie,te.mode,Ce),K.return=te,K):(K=y(K,ie),K.return=te,K)}function Y(te,K,ie,Ce){var He=ie.type;return He===G?xe(te,K,ie.props.children,Ce,ie.key):K!==null&&(K.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===fe&&A2(He)===K.type)?(Ce=y(K,ie.props),Ce.ref=sc(te,K,ie),Ce.return=te,Ce):(Ce=lf(ie.type,ie.key,ie.props,null,te.mode,Ce),Ce.ref=sc(te,K,ie),Ce.return=te,Ce)}function oe(te,K,ie,Ce){return K===null||K.tag!==4||K.stateNode.containerInfo!==ie.containerInfo||K.stateNode.implementation!==ie.implementation?(K=N0(ie,te.mode,Ce),K.return=te,K):(K=y(K,ie.children||[]),K.return=te,K)}function xe(te,K,ie,Ce,He){return K===null||K.tag!==7?(K=fs(ie,te.mode,Ce,He),K.return=te,K):(K=y(K,ie),K.return=te,K)}function _e(te,K,ie){if(typeof K=="string"&&K!==""||typeof K=="number")return K=C0(""+K,te.mode,ie),K.return=te,K;if(typeof K=="object"&&K!==null){switch(K.$$typeof){case B:return ie=lf(K.type,K.key,K.props,null,te.mode,ie),ie.ref=sc(te,null,K),ie.return=te,ie;case A:return K=N0(K,te.mode,ie),K.return=te,K;case fe:var Ce=K._init;return _e(te,Ce(K._payload),ie)}if(lt(K)||se(K))return K=fs(K,te.mode,ie,null),K.return=te,K;Ud(te,K)}return null}function be(te,K,ie,Ce){var He=K!==null?K.key:null;if(typeof ie=="string"&&ie!==""||typeof ie=="number")return He!==null?null:$(te,K,""+ie,Ce);if(typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case B:return ie.key===He?Y(te,K,ie,Ce):null;case A:return ie.key===He?oe(te,K,ie,Ce):null;case fe:return He=ie._init,be(te,K,He(ie._payload),Ce)}if(lt(ie)||se(ie))return He!==null?null:xe(te,K,ie,Ce,null);Ud(te,ie)}return null}function Me(te,K,ie,Ce,He){if(typeof Ce=="string"&&Ce!==""||typeof Ce=="number")return te=te.get(ie)||null,$(K,te,""+Ce,He);if(typeof Ce=="object"&&Ce!==null){switch(Ce.$$typeof){case B:return te=te.get(Ce.key===null?ie:Ce.key)||null,Y(K,te,Ce,He);case A:return te=te.get(Ce.key===null?ie:Ce.key)||null,oe(K,te,Ce,He);case fe:var Ge=Ce._init;return Me(te,K,ie,Ge(Ce._payload),He)}if(lt(Ce)||se(Ce))return te=te.get(ie)||null,xe(K,te,Ce,He,null);Ud(K,Ce)}return null}function Ue(te,K,ie,Ce){for(var He=null,Ge=null,Xe=K,nt=K=0,En=null;Xe!==null&&nt<ie.length;nt++){Xe.index>nt?(En=Xe,Xe=null):En=Xe.sibling;var Tt=be(te,Xe,ie[nt],Ce);if(Tt===null){Xe===null&&(Xe=En);break}o&&Xe&&Tt.alternate===null&&a(te,Xe),K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt,Xe=En}if(nt===ie.length)return l(te,Xe),$t&&is(te,nt),He;if(Xe===null){for(;nt<ie.length;nt++)Xe=_e(te,ie[nt],Ce),Xe!==null&&(K=x(Xe,K,nt),Ge===null?He=Xe:Ge.sibling=Xe,Ge=Xe);return $t&&is(te,nt),He}for(Xe=p(te,Xe);nt<ie.length;nt++)En=Me(Xe,te,nt,ie[nt],Ce),En!==null&&(o&&En.alternate!==null&&Xe.delete(En.key===null?nt:En.key),K=x(En,K,nt),Ge===null?He=En:Ge.sibling=En,Ge=En);return o&&Xe.forEach(function(go){return a(te,go)}),$t&&is(te,nt),He}function je(te,K,ie,Ce){var He=se(ie);if(typeof He!="function")throw Error(n(150));if(ie=He.call(ie),ie==null)throw Error(n(151));for(var Ge=He=null,Xe=K,nt=K=0,En=null,Tt=ie.next();Xe!==null&&!Tt.done;nt++,Tt=ie.next()){Xe.index>nt?(En=Xe,Xe=null):En=Xe.sibling;var go=be(te,Xe,Tt.value,Ce);if(go===null){Xe===null&&(Xe=En);break}o&&Xe&&go.alternate===null&&a(te,Xe),K=x(go,K,nt),Ge===null?He=go:Ge.sibling=go,Ge=go,Xe=En}if(Tt.done)return l(te,Xe),$t&&is(te,nt),He;if(Xe===null){for(;!Tt.done;nt++,Tt=ie.next())Tt=_e(te,Tt.value,Ce),Tt!==null&&(K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt);return $t&&is(te,nt),He}for(Xe=p(te,Xe);!Tt.done;nt++,Tt=ie.next())Tt=Me(Xe,te,nt,Tt.value,Ce),Tt!==null&&(o&&Tt.alternate!==null&&Xe.delete(Tt.key===null?nt:Tt.key),K=x(Tt,K,nt),Ge===null?He=Tt:Ge.sibling=Tt,Ge=Tt);return o&&Xe.forEach(function(Uz){return a(te,Uz)}),$t&&is(te,nt),He}function tn(te,K,ie,Ce){if(typeof ie=="object"&&ie!==null&&ie.type===G&&ie.key===null&&(ie=ie.props.children),typeof ie=="object"&&ie!==null){switch(ie.$$typeof){case B:e:{for(var He=ie.key,Ge=K;Ge!==null;){if(Ge.key===He){if(He=ie.type,He===G){if(Ge.tag===7){l(te,Ge.sibling),K=y(Ge,ie.props.children),K.return=te,te=K;break e}}else if(Ge.elementType===He||typeof He=="object"&&He!==null&&He.$$typeof===fe&&A2(He)===Ge.type){l(te,Ge.sibling),K=y(Ge,ie.props),K.ref=sc(te,Ge,ie),K.return=te,te=K;break e}l(te,Ge);break}else a(te,Ge);Ge=Ge.sibling}ie.type===G?(K=fs(ie.props.children,te.mode,Ce,ie.key),K.return=te,te=K):(Ce=lf(ie.type,ie.key,ie.props,null,te.mode,Ce),Ce.ref=sc(te,K,ie),Ce.return=te,te=Ce)}return C(te);case A:e:{for(Ge=ie.key;K!==null;){if(K.key===Ge)if(K.tag===4&&K.stateNode.containerInfo===ie.containerInfo&&K.stateNode.implementation===ie.implementation){l(te,K.sibling),K=y(K,ie.children||[]),K.return=te,te=K;break e}else{l(te,K);break}else a(te,K);K=K.sibling}K=N0(ie,te.mode,Ce),K.return=te,te=K}return C(te);case fe:return Ge=ie._init,tn(te,K,Ge(ie._payload),Ce)}if(lt(ie))return Ue(te,K,ie,Ce);if(se(ie))return je(te,K,ie,Ce);Ud(te,ie)}return typeof ie=="string"&&ie!==""||typeof ie=="number"?(ie=""+ie,K!==null&&K.tag===6?(l(te,K.sibling),K=y(K,ie),K.return=te,te=K):(l(te,K),K=C0(ie,te.mode,Ce),K.return=te,te=K),C(te)):l(te,K)}return tn}var Ta=k2(!0),C2=k2(!1),jd=io(null),Hd=null,_a=null,Bg=null;function Ug(){Bg=_a=Hd=null}function jg(o){var a=jd.current;Ft(jd),o._currentValue=a}function Hg(o,a,l){for(;o!==null;){var p=o.alternate;if((o.childLanes&a)!==a?(o.childLanes|=a,p!==null&&(p.childLanes|=a)):p!==null&&(p.childLanes&a)!==a&&(p.childLanes|=a),o===l)break;o=o.return}}function va(o,a){Hd=o,Bg=_a=null,o=o.dependencies,o!==null&&o.firstContext!==null&&((o.lanes&a)!==0&&(Kn=!0),o.firstContext=null)}function wr(o){var a=o._currentValue;if(Bg!==o)if(o={context:o,memoizedValue:a,next:null},_a===null){if(Hd===null)throw Error(n(308));_a=o,Hd.dependencies={lanes:0,firstContext:o}}else _a=_a.next=o;return a}var os=null;function $g(o){os===null?os=[o]:os.push(o)}function N2(o,a,l,p){var y=a.interleaved;return y===null?(l.next=l,$g(a)):(l.next=y.next,y.next=l),a.interleaved=l,ki(o,p)}function ki(o,a){o.lanes|=a;var l=o.alternate;for(l!==null&&(l.lanes|=a),l=o,o=o.return;o!==null;)o.childLanes|=a,l=o.alternate,l!==null&&(l.childLanes|=a),l=o,o=o.return;return l.tag===3?l.stateNode:null}var ao=!1;function zg(o){o.updateQueue={baseState:o.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function I2(o,a){o=o.updateQueue,a.updateQueue===o&&(a.updateQueue={baseState:o.baseState,firstBaseUpdate:o.firstBaseUpdate,lastBaseUpdate:o.lastBaseUpdate,shared:o.shared,effects:o.effects})}function Ci(o,a){return{eventTime:o,lane:a,tag:0,payload:null,callback:null,next:null}}function uo(o,a,l){var p=o.updateQueue;if(p===null)return null;if(p=p.shared,(xt&2)!==0){var y=p.pending;return y===null?a.next=a:(a.next=y.next,y.next=a),p.pending=a,ki(o,l)}return y=p.interleaved,y===null?(a.next=a,$g(p)):(a.next=y.next,y.next=a),p.interleaved=a,ki(o,l)}function $d(o,a,l){if(a=a.updateQueue,a!==null&&(a=a.shared,(l&4194240)!==0)){var p=a.lanes;p&=o.pendingLanes,l|=p,a.lanes=l,rg(o,l)}}function O2(o,a){var l=o.updateQueue,p=o.alternate;if(p!==null&&(p=p.updateQueue,l===p)){var y=null,x=null;if(l=l.firstBaseUpdate,l!==null){do{var C={eventTime:l.eventTime,lane:l.lane,tag:l.tag,payload:l.payload,callback:l.callback,next:null};x===null?y=x=C:x=x.next=C,l=l.next}while(l!==null);x===null?y=x=a:x=x.next=a}else y=x=a;l={baseState:p.baseState,firstBaseUpdate:y,lastBaseUpdate:x,shared:p.shared,effects:p.effects},o.updateQueue=l;return}o=l.lastBaseUpdate,o===null?l.firstBaseUpdate=a:o.next=a,l.lastBaseUpdate=a}function zd(o,a,l,p){var y=o.updateQueue;ao=!1;var x=y.firstBaseUpdate,C=y.lastBaseUpdate,$=y.shared.pending;if($!==null){y.shared.pending=null;var Y=$,oe=Y.next;Y.next=null,C===null?x=oe:C.next=oe,C=Y;var xe=o.alternate;xe!==null&&(xe=xe.updateQueue,$=xe.lastBaseUpdate,$!==C&&($===null?xe.firstBaseUpdate=oe:$.next=oe,xe.lastBaseUpdate=Y))}if(x!==null){var _e=y.baseState;C=0,xe=oe=Y=null,$=x;do{var be=$.lane,Me=$.eventTime;if((p&be)===be){xe!==null&&(xe=xe.next={eventTime:Me,lane:0,tag:$.tag,payload:$.payload,callback:$.callback,next:null});e:{var Ue=o,je=$;switch(be=a,Me=l,je.tag){case 1:if(Ue=je.payload,typeof Ue=="function"){_e=Ue.call(Me,_e,be);break e}_e=Ue;break e;case 3:Ue.flags=Ue.flags&-65537|128;case 0:if(Ue=je.payload,be=typeof Ue=="function"?Ue.call(Me,_e,be):Ue,be==null)break e;_e=O({},_e,be);break e;case 2:ao=!0}}$.callback!==null&&$.lane!==0&&(o.flags|=64,be=y.effects,be===null?y.effects=[$]:be.push($))}else Me={eventTime:Me,lane:be,tag:$.tag,payload:$.payload,callback:$.callback,next:null},xe===null?(oe=xe=Me,Y=_e):xe=xe.next=Me,C|=be;if($=$.next,$===null){if($=y.shared.pending,$===null)break;be=$,$=be.next,be.next=null,y.lastBaseUpdate=be,y.shared.pending=null}}while(!0);if(xe===null&&(Y=_e),y.baseState=Y,y.firstBaseUpdate=oe,y.lastBaseUpdate=xe,a=y.shared.interleaved,a!==null){y=a;do C|=y.lane,y=y.next;while(y!==a)}else x===null&&(y.shared.lanes=0);us|=C,o.lanes=C,o.memoizedState=_e}}function P2(o,a,l){if(o=a.effects,a.effects=null,o!==null)for(a=0;a<o.length;a++){var p=o[a],y=p.callback;if(y!==null){if(p.callback=null,p=l,typeof y!="function")throw Error(n(191,y));y.call(p)}}}var ac={},ai=io(ac),uc=io(ac),cc=io(ac);function ss(o){if(o===ac)throw Error(n(174));return o}function Vg(o,a){switch(Rt(cc,a),Rt(uc,o),Rt(ai,ac),o=a.nodeType,o){case 9:case 11:a=(a=a.documentElement)?a.namespaceURI:ke(null,"");break;default:o=o===8?a.parentNode:a,a=o.namespaceURI||null,o=o.tagName,a=ke(a,o)}Ft(ai),Rt(ai,a)}function Sa(){Ft(ai),Ft(uc),Ft(cc)}function R2(o){ss(cc.current);var a=ss(ai.current),l=ke(a,o.type);a!==l&&(Rt(uc,o),Rt(ai,l))}function qg(o){uc.current===o&&(Ft(ai),Ft(uc))}var Vt=io(0);function Vd(o){for(var a=o;a!==null;){if(a.tag===13){var l=a.memoizedState;if(l!==null&&(l=l.dehydrated,l===null||l.data==="$?"||l.data==="$!"))return a}else if(a.tag===19&&a.memoizedProps.revealOrder!==void 0){if((a.flags&128)!==0)return a}else if(a.child!==null){a.child.return=a,a=a.child;continue}if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return null;a=a.return}a.sibling.return=a.return,a=a.sibling}return null}var Wg=[];function Yg(){for(var o=0;o<Wg.length;o++)Wg[o]._workInProgressVersionPrimary=null;Wg.length=0}var qd=U.ReactCurrentDispatcher,Gg=U.ReactCurrentBatchConfig,as=0,qt=null,un=null,gn=null,Wd=!1,lc=!1,dc=0,az=0;function On(){throw Error(n(321))}function Xg(o,a){if(a===null)return!1;for(var l=0;l<a.length&&l<o.length;l++)if(!Dr(o[l],a[l]))return!1;return!0}function Kg(o,a,l,p,y,x){if(as=x,qt=a,a.memoizedState=null,a.updateQueue=null,a.lanes=0,qd.current=o===null||o.memoizedState===null?dz:fz,o=l(p,y),lc){x=0;do{if(lc=!1,dc=0,25<=x)throw Error(n(301));x+=1,gn=un=null,a.updateQueue=null,qd.current=pz,o=l(p,y)}while(lc)}if(qd.current=Xd,a=un!==null&&un.next!==null,as=0,gn=un=qt=null,Wd=!1,a)throw Error(n(300));return o}function Qg(){var o=dc!==0;return dc=0,o}function ui(){var o={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return gn===null?qt.memoizedState=gn=o:gn=gn.next=o,gn}function xr(){if(un===null){var o=qt.alternate;o=o!==null?o.memoizedState:null}else o=un.next;var a=gn===null?qt.memoizedState:gn.next;if(a!==null)gn=a,un=o;else{if(o===null)throw Error(n(310));un=o,o={memoizedState:un.memoizedState,baseState:un.baseState,baseQueue:un.baseQueue,queue:un.queue,next:null},gn===null?qt.memoizedState=gn=o:gn=gn.next=o}return gn}function fc(o,a){return typeof a=="function"?a(o):a}function Jg(o){var a=xr(),l=a.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=o;var p=un,y=p.baseQueue,x=l.pending;if(x!==null){if(y!==null){var C=y.next;y.next=x.next,x.next=C}p.baseQueue=y=x,l.pending=null}if(y!==null){x=y.next,p=p.baseState;var $=C=null,Y=null,oe=x;do{var xe=oe.lane;if((as&xe)===xe)Y!==null&&(Y=Y.next={lane:0,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null}),p=oe.hasEagerState?oe.eagerState:o(p,oe.action);else{var _e={lane:xe,action:oe.action,hasEagerState:oe.hasEagerState,eagerState:oe.eagerState,next:null};Y===null?($=Y=_e,C=p):Y=Y.next=_e,qt.lanes|=xe,us|=xe}oe=oe.next}while(oe!==null&&oe!==x);Y===null?C=p:Y.next=$,Dr(p,a.memoizedState)||(Kn=!0),a.memoizedState=p,a.baseState=C,a.baseQueue=Y,l.lastRenderedState=p}if(o=l.interleaved,o!==null){y=o;do x=y.lane,qt.lanes|=x,us|=x,y=y.next;while(y!==o)}else y===null&&(l.lanes=0);return[a.memoizedState,l.dispatch]}function Zg(o){var a=xr(),l=a.queue;if(l===null)throw Error(n(311));l.lastRenderedReducer=o;var p=l.dispatch,y=l.pending,x=a.memoizedState;if(y!==null){l.pending=null;var C=y=y.next;do x=o(x,C.action),C=C.next;while(C!==y);Dr(x,a.memoizedState)||(Kn=!0),a.memoizedState=x,a.baseQueue===null&&(a.baseState=x),l.lastRenderedState=x}return[x,p]}function L2(){}function D2(o,a){var l=qt,p=xr(),y=a(),x=!Dr(p.memoizedState,y);if(x&&(p.memoizedState=y,Kn=!0),p=p.queue,e0(B2.bind(null,l,p,o),[o]),p.getSnapshot!==a||x||gn!==null&&gn.memoizedState.tag&1){if(l.flags|=2048,pc(9,F2.bind(null,l,p,y,a),void 0,null),yn===null)throw Error(n(349));(as&30)!==0||M2(l,a,y)}return y}function M2(o,a,l){o.flags|=16384,o={getSnapshot:a,value:l},a=qt.updateQueue,a===null?(a={lastEffect:null,stores:null},qt.updateQueue=a,a.stores=[o]):(l=a.stores,l===null?a.stores=[o]:l.push(o))}function F2(o,a,l,p){a.value=l,a.getSnapshot=p,U2(a)&&j2(o)}function B2(o,a,l){return l(function(){U2(a)&&j2(o)})}function U2(o){var a=o.getSnapshot;o=o.value;try{var l=a();return!Dr(o,l)}catch(p){return!0}}function j2(o){var a=ki(o,1);a!==null&&jr(a,o,1,-1)}function H2(o){var a=ui();return typeof o=="function"&&(o=o()),a.memoizedState=a.baseState=o,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:fc,lastRenderedState:o},a.queue=o,o=o.dispatch=lz.bind(null,qt,o),[a.memoizedState,o]}function pc(o,a,l,p){return o={tag:o,create:a,destroy:l,deps:p,next:null},a=qt.updateQueue,a===null?(a={lastEffect:null,stores:null},qt.updateQueue=a,a.lastEffect=o.next=o):(l=a.lastEffect,l===null?a.lastEffect=o.next=o:(p=l.next,l.next=o,o.next=p,a.lastEffect=o)),o}function $2(){return xr().memoizedState}function Yd(o,a,l,p){var y=ui();qt.flags|=o,y.memoizedState=pc(1|a,l,void 0,p===void 0?null:p)}function Gd(o,a,l,p){var y=xr();p=p===void 0?null:p;var x=void 0;if(un!==null){var C=un.memoizedState;if(x=C.destroy,p!==null&&Xg(p,C.deps)){y.memoizedState=pc(a,l,x,p);return}}qt.flags|=o,y.memoizedState=pc(1|a,l,x,p)}function z2(o,a){return Yd(8390656,8,o,a)}function e0(o,a){return Gd(2048,8,o,a)}function V2(o,a){return Gd(4,2,o,a)}function q2(o,a){return Gd(4,4,o,a)}function W2(o,a){if(typeof a=="function")return o=o(),a(o),function(){a(null)};if(a!=null)return o=o(),a.current=o,function(){a.current=null}}function Y2(o,a,l){return l=l!=null?l.concat([o]):null,Gd(4,4,W2.bind(null,a,o),l)}function t0(){}function G2(o,a){var l=xr();a=a===void 0?null:a;var p=l.memoizedState;return p!==null&&a!==null&&Xg(a,p[1])?p[0]:(l.memoizedState=[o,a],o)}function X2(o,a){var l=xr();a=a===void 0?null:a;var p=l.memoizedState;return p!==null&&a!==null&&Xg(a,p[1])?p[0]:(o=o(),l.memoizedState=[o,a],o)}function K2(o,a,l){return(as&21)===0?(o.baseState&&(o.baseState=!1,Kn=!0),o.memoizedState=l):(Dr(l,a)||(l=Av(),qt.lanes|=l,us|=l,o.baseState=!0),a)}function uz(o,a){var l=vt;vt=l!==0&&4>l?l:4,o(!0);var p=Gg.transition;Gg.transition={};try{o(!1),a()}finally{vt=l,Gg.transition=p}}function Q2(){return xr().memoizedState}function cz(o,a,l){var p=po(o);if(l={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null},J2(o))Z2(a,l);else if(l=N2(o,a,l,p),l!==null){var y=Bn();jr(l,o,p,y),eS(l,a,p)}}function lz(o,a,l){var p=po(o),y={lane:p,action:l,hasEagerState:!1,eagerState:null,next:null};if(J2(o))Z2(a,y);else{var x=o.alternate;if(o.lanes===0&&(x===null||x.lanes===0)&&(x=a.lastRenderedReducer,x!==null))try{var C=a.lastRenderedState,$=x(C,l);if(y.hasEagerState=!0,y.eagerState=$,Dr($,C)){var Y=a.interleaved;Y===null?(y.next=y,$g(a)):(y.next=Y.next,Y.next=y),a.interleaved=y;return}}catch(oe){}l=N2(o,a,y,p),l!==null&&(y=Bn(),jr(l,o,p,y),eS(l,a,p))}}function J2(o){var a=o.alternate;return o===qt||a!==null&&a===qt}function Z2(o,a){lc=Wd=!0;var l=o.pending;l===null?a.next=a:(a.next=l.next,l.next=a),o.pending=a}function eS(o,a,l){if((l&4194240)!==0){var p=a.lanes;p&=o.pendingLanes,l|=p,a.lanes=l,rg(o,l)}}var Xd={readContext:wr,useCallback:On,useContext:On,useEffect:On,useImperativeHandle:On,useInsertionEffect:On,useLayoutEffect:On,useMemo:On,useReducer:On,useRef:On,useState:On,useDebugValue:On,useDeferredValue:On,useTransition:On,useMutableSource:On,useSyncExternalStore:On,useId:On,unstable_isNewReconciler:!1},dz={readContext:wr,useCallback:function(o,a){return ui().memoizedState=[o,a===void 0?null:a],o},useContext:wr,useEffect:z2,useImperativeHandle:function(o,a,l){return l=l!=null?l.concat([o]):null,Yd(4194308,4,W2.bind(null,a,o),l)},useLayoutEffect:function(o,a){return Yd(4194308,4,o,a)},useInsertionEffect:function(o,a){return Yd(4,2,o,a)},useMemo:function(o,a){var l=ui();return a=a===void 0?null:a,o=o(),l.memoizedState=[o,a],o},useReducer:function(o,a,l){var p=ui();return a=l!==void 0?l(a):a,p.memoizedState=p.baseState=a,o={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:o,lastRenderedState:a},p.queue=o,o=o.dispatch=cz.bind(null,qt,o),[p.memoizedState,o]},useRef:function(o){var a=ui();return o={current:o},a.memoizedState=o},useState:H2,useDebugValue:t0,useDeferredValue:function(o){return ui().memoizedState=o},useTransition:function(){var o=H2(!1),a=o[0];return o=uz.bind(null,o[1]),ui().memoizedState=o,[a,o]},useMutableSource:function(){},useSyncExternalStore:function(o,a,l){var p=qt,y=ui();if($t){if(l===void 0)throw Error(n(407));l=l()}else{if(l=a(),yn===null)throw Error(n(349));(as&30)!==0||M2(p,a,l)}y.memoizedState=l;var x={value:l,getSnapshot:a};return y.queue=x,z2(B2.bind(null,p,x,o),[o]),p.flags|=2048,pc(9,F2.bind(null,p,x,l,a),void 0,null),l},useId:function(){var o=ui(),a=yn.identifierPrefix;if($t){var l=Ai,p=Si;l=(p&~(1<<32-Lr(p)-1)).toString(32)+l,a=":"+a+"R"+l,l=dc++,0<l&&(a+="H"+l.toString(32)),a+=":"}else l=az++,a=":"+a+"r"+l.toString(32)+":";return o.memoizedState=a},unstable_isNewReconciler:!1},fz={readContext:wr,useCallback:G2,useContext:wr,useEffect:e0,useImperativeHandle:Y2,useInsertionEffect:V2,useLayoutEffect:q2,useMemo:X2,useReducer:Jg,useRef:$2,useState:function(){return Jg(fc)},useDebugValue:t0,useDeferredValue:function(o){var a=xr();return K2(a,un.memoizedState,o)},useTransition:function(){var o=Jg(fc)[0],a=xr().memoizedState;return[o,a]},useMutableSource:L2,useSyncExternalStore:D2,useId:Q2,unstable_isNewReconciler:!1},pz={readContext:wr,useCallback:G2,useContext:wr,useEffect:e0,useImperativeHandle:Y2,useInsertionEffect:V2,useLayoutEffect:q2,useMemo:X2,useReducer:Zg,useRef:$2,useState:function(){return Zg(fc)},useDebugValue:t0,useDeferredValue:function(o){var a=xr();return un===null?a.memoizedState=o:K2(a,un.memoizedState,o)},useTransition:function(){var o=Zg(fc)[0],a=xr().memoizedState;return[o,a]},useMutableSource:L2,useSyncExternalStore:D2,useId:Q2,unstable_isNewReconciler:!1};function Fr(o,a){if(o&&o.defaultProps){a=O({},a),o=o.defaultProps;for(var l in o)a[l]===void 0&&(a[l]=o[l]);return a}return a}function n0(o,a,l,p){a=o.memoizedState,l=l(p,a),l=l==null?a:O({},a,l),o.memoizedState=l,o.lanes===0&&(o.updateQueue.baseState=l)}var Kd={isMounted:function(o){return(o=o._reactInternals)?Ee(o)===o:!1},enqueueSetState:function(o,a,l){o=o._reactInternals;var p=Bn(),y=po(o),x=Ci(p,y);x.payload=a,l!=null&&(x.callback=l),a=uo(o,x,y),a!==null&&(jr(a,o,y,p),$d(a,o,y))},enqueueReplaceState:function(o,a,l){o=o._reactInternals;var p=Bn(),y=po(o),x=Ci(p,y);x.tag=1,x.payload=a,l!=null&&(x.callback=l),a=uo(o,x,y),a!==null&&(jr(a,o,y,p),$d(a,o,y))},enqueueForceUpdate:function(o,a){o=o._reactInternals;var l=Bn(),p=po(o),y=Ci(l,p);y.tag=2,a!=null&&(y.callback=a),a=uo(o,y,p),a!==null&&(jr(a,o,p,l),$d(a,o,p))}};function tS(o,a,l,p,y,x,C){return o=o.stateNode,typeof o.shouldComponentUpdate=="function"?o.shouldComponentUpdate(p,x,C):a.prototype&&a.prototype.isPureReactComponent?!Zu(l,p)||!Zu(y,x):!0}function nS(o,a,l){var p=!1,y=oo,x=a.contextType;return typeof x=="object"&&x!==null?x=wr(x):(y=Xn(a)?ns:In.current,p=a.contextTypes,x=(p=p!=null)?Ea(o,y):oo),a=new a(l,x),o.memoizedState=a.state!==null&&a.state!==void 0?a.state:null,a.updater=Kd,o.stateNode=a,a._reactInternals=o,p&&(o=o.stateNode,o.__reactInternalMemoizedUnmaskedChildContext=y,o.__reactInternalMemoizedMaskedChildContext=x),a}function rS(o,a,l,p){o=a.state,typeof a.componentWillReceiveProps=="function"&&a.componentWillReceiveProps(l,p),typeof a.UNSAFE_componentWillReceiveProps=="function"&&a.UNSAFE_componentWillReceiveProps(l,p),a.state!==o&&Kd.enqueueReplaceState(a,a.state,null)}function r0(o,a,l,p){var y=o.stateNode;y.props=l,y.state=o.memoizedState,y.refs={},zg(o);var x=a.contextType;typeof x=="object"&&x!==null?y.context=wr(x):(x=Xn(a)?ns:In.current,y.context=Ea(o,x)),y.state=o.memoizedState,x=a.getDerivedStateFromProps,typeof x=="function"&&(n0(o,a,x,l),y.state=o.memoizedState),typeof a.getDerivedStateFromProps=="function"||typeof y.getSnapshotBeforeUpdate=="function"||typeof y.UNSAFE_componentWillMount!="function"&&typeof y.componentWillMount!="function"||(a=y.state,typeof y.componentWillMount=="function"&&y.componentWillMount(),typeof y.UNSAFE_componentWillMount=="function"&&y.UNSAFE_componentWillMount(),a!==y.state&&Kd.enqueueReplaceState(y,y.state,null),zd(o,l,y,p),y.state=o.memoizedState),typeof y.componentDidMount=="function"&&(o.flags|=4194308)}function Aa(o,a){try{var l="",p=a;do l+=Re(p),p=p.return;while(p);var y=l}catch(x){y=`
22
22
  Error generating stack: `+x.message+`
23
- `+x.stack}return{value:o,source:a,stack:y,digest:null}}function i0(o,a,l){return{value:o,source:null,stack:l!=null?l:null,digest:a!=null?a:null}}function o0(o,a){try{console.error(a.value)}catch(l){setTimeout(function(){throw l})}}var mz=typeof WeakMap=="function"?WeakMap:Map;function iS(o,a,l){l=Ci(-1,l),l.tag=3,l.payload={element:null};var p=a.value;return l.callback=function(){rf||(rf=!0,w0=p),o0(o,a)},l}function oS(o,a,l){l=Ci(-1,l),l.tag=3;var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=a.value;l.payload=function(){return p(y)},l.callback=function(){o0(o,a)}}var x=o.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(l.callback=function(){o0(o,a),typeof p!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var C=a.stack;this.componentDidCatch(a.value,{componentStack:C!==null?C:""})}),l}function sS(o,a,l){var p=o.pingCache;if(p===null){p=o.pingCache=new mz;var y=new Set;p.set(a,y)}else y=p.get(a),y===void 0&&(y=new Set,p.set(a,y));y.has(l)||(y.add(l),o=Nz.bind(null,o,a,l),a.then(o,o))}function aS(o){do{var a;if((a=o.tag===13)&&(a=o.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return o;o=o.return}while(o!==null);return null}function uS(o,a,l,p,y){return(o.mode&1)===0?(o===a?o.flags|=65536:(o.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(a=Ci(-1,1),a.tag=2,uo(l,a,1))),l.lanes|=1),o):(o.flags|=65536,o.lanes=y,o)}var gz=U.ReactCurrentOwner,Kn=!1;function Fn(o,a,l,p){a.child=o===null?C2(a,null,l,p):Ta(a,o.child,l,p)}function cS(o,a,l,p,y){l=l.render;var x=a.ref;return va(a,y),p=Kg(o,a,l,p,x,y),l=Qg(),o!==null&&!Kn?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,Ni(o,a,y)):($t&&l&&Rg(a),a.flags|=1,Fn(o,a,p,y),a.child)}function lS(o,a,l,p,y){if(o===null){var x=l.type;return typeof x=="function"&&!k0(x)&&x.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(a.tag=15,a.type=x,dS(o,a,x,p,y)):(o=lf(l.type,null,p,a,a.mode,y),o.ref=a.ref,o.return=a,a.child=o)}if(x=o.child,(o.lanes&y)===0){var C=x.memoizedProps;if(l=l.compare,l=l!==null?l:Zu,l(C,p)&&o.ref===a.ref)return Ni(o,a,y)}return a.flags|=1,o=mo(x,p),o.ref=a.ref,o.return=a,a.child=o}function dS(o,a,l,p,y){if(o!==null){var x=o.memoizedProps;if(Zu(x,p)&&o.ref===a.ref)if(Kn=!1,a.pendingProps=p=x,(o.lanes&y)!==0)(o.flags&131072)!==0&&(Kn=!0);else return a.lanes=o.lanes,Ni(o,a,y)}return s0(o,a,l,p,y)}function fS(o,a,l){var p=a.pendingProps,y=p.children,x=o!==null?o.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(Ca,dr),dr|=l;else{if((l&1073741824)===0)return o=x!==null?x.baseLanes|l:l,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:o,cachePool:null,transitions:null},a.updateQueue=null,Rt(Ca,dr),dr|=o,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=x!==null?x.baseLanes:l,Rt(Ca,dr),dr|=p}else x!==null?(p=x.baseLanes|l,a.memoizedState=null):p=l,Rt(Ca,dr),dr|=p;return Fn(o,a,y,l),a.child}function pS(o,a){var l=a.ref;(o===null&&l!==null||o!==null&&o.ref!==l)&&(a.flags|=512,a.flags|=2097152)}function s0(o,a,l,p,y){var x=Xn(l)?ns:In.current;return x=Ea(a,x),va(a,y),l=Kg(o,a,l,p,x,y),p=Qg(),o!==null&&!Kn?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,Ni(o,a,y)):($t&&p&&Rg(a),a.flags|=1,Fn(o,a,l,y),a.child)}function hS(o,a,l,p,y){if(Xn(l)){var x=!0;Ld(a)}else x=!1;if(va(a,y),a.stateNode===null)Jd(o,a),nS(a,l,p),r0(a,l,p,y),p=!0;else if(o===null){var C=a.stateNode,$=a.memoizedProps;C.props=$;var Y=C.context,oe=l.contextType;typeof oe=="object"&&oe!==null?oe=wr(oe):(oe=Xn(l)?ns:In.current,oe=Ea(a,oe));var xe=l.getDerivedStateFromProps,_e=typeof xe=="function"||typeof C.getSnapshotBeforeUpdate=="function";_e||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||($!==p||Y!==oe)&&rS(a,C,p,oe),ao=!1;var be=a.memoizedState;C.state=be,zd(a,p,C,y),Y=a.memoizedState,$!==p||be!==Y||Gn.current||ao?(typeof xe=="function"&&(n0(a,l,xe,p),Y=a.memoizedState),($=ao||tS(a,l,$,p,be,Y,oe))?(_e||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(a.flags|=4194308)):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=Y),C.props=p,C.state=Y,C.context=oe,p=$):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{C=a.stateNode,I2(o,a),$=a.memoizedProps,oe=a.type===a.elementType?$:Fr(a.type,$),C.props=oe,_e=a.pendingProps,be=C.context,Y=l.contextType,typeof Y=="object"&&Y!==null?Y=wr(Y):(Y=Xn(l)?ns:In.current,Y=Ea(a,Y));var Me=l.getDerivedStateFromProps;(xe=typeof Me=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||($!==_e||be!==Y)&&rS(a,C,p,Y),ao=!1,be=a.memoizedState,C.state=be,zd(a,p,C,y);var Ue=a.memoizedState;$!==_e||be!==Ue||Gn.current||ao?(typeof Me=="function"&&(n0(a,l,Me,p),Ue=a.memoizedState),(oe=ao||tS(a,l,oe,p,be,Ue,Y)||!1)?(xe||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,Ue,Y),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,Ue,Y)),typeof C.componentDidUpdate=="function"&&(a.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof C.componentDidUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=Ue),C.props=p,C.state=Ue,C.context=Y,p=oe):(typeof C.componentDidUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=1024),p=!1)}return a0(o,a,l,p,x,y)}function a0(o,a,l,p,y,x){pS(o,a);var C=(a.flags&128)!==0;if(!p&&!C)return y&&b2(a,l,!1),Ni(o,a,x);p=a.stateNode,gz.current=a;var $=C&&typeof l.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,o!==null&&C?(a.child=Ta(a,o.child,null,x),a.child=Ta(a,null,$,x)):Fn(o,a,$,x),a.memoizedState=p.state,y&&b2(a,l,!0),a.child}function mS(o){var a=o.stateNode;a.pendingContext?y2(o,a.pendingContext,a.pendingContext!==a.context):a.context&&y2(o,a.context,!1),Vg(o,a.containerInfo)}function gS(o,a,l,p,y){return xa(),Fg(y),a.flags|=256,Fn(o,a,l,p),a.child}var u0={dehydrated:null,treeContext:null,retryLane:0};function c0(o){return{baseLanes:o,cachePool:null,transitions:null}}function yS(o,a,l){var p=a.pendingProps,y=Vt.current,x=!1,C=(a.flags&128)!==0,$;if(($=C)||($=o!==null&&o.memoizedState===null?!1:(y&2)!==0),$?(x=!0,a.flags&=-129):(o===null||o.memoizedState!==null)&&(y|=1),Rt(Vt,y&1),o===null)return Mg(a),o=a.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((a.mode&1)===0?a.lanes=1:o.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(C=p.children,o=p.fallback,x?(p=a.mode,x=a.child,C={mode:"hidden",children:C},(p&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=C):x=df(C,p,0,null),o=fs(o,p,l,null),x.return=a,o.return=a,x.sibling=o,a.child=x,a.child.memoizedState=c0(l),a.memoizedState=u0,o):l0(a,C));if(y=o.memoizedState,y!==null&&($=y.dehydrated,$!==null))return yz(o,a,C,p,$,y,l);if(x){x=p.fallback,C=a.mode,y=o.child,$=y.sibling;var Y={mode:"hidden",children:p.children};return(C&1)===0&&a.child!==y?(p=a.child,p.childLanes=0,p.pendingProps=Y,a.deletions=null):(p=mo(y,Y),p.subtreeFlags=y.subtreeFlags&14680064),$!==null?x=mo($,x):(x=fs(x,C,l,null),x.flags|=2),x.return=a,p.return=a,p.sibling=x,a.child=p,p=x,x=a.child,C=o.child.memoizedState,C=C===null?c0(l):{baseLanes:C.baseLanes|l,cachePool:null,transitions:C.transitions},x.memoizedState=C,x.childLanes=o.childLanes&~l,a.memoizedState=u0,p}return x=o.child,o=x.sibling,p=mo(x,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=l),p.return=a,p.sibling=null,o!==null&&(l=a.deletions,l===null?(a.deletions=[o],a.flags|=16):l.push(o)),a.child=p,a.memoizedState=null,p}function l0(o,a){return a=df({mode:"visible",children:a},o.mode,0,null),a.return=o,o.child=a}function Qd(o,a,l,p){return p!==null&&Fg(p),Ta(a,o.child,null,l),o=l0(a,a.pendingProps.children),o.flags|=2,a.memoizedState=null,o}function yz(o,a,l,p,y,x,C){if(l)return a.flags&256?(a.flags&=-257,p=i0(Error(n(422))),Qd(o,a,C,p)):a.memoizedState!==null?(a.child=o.child,a.flags|=128,null):(x=p.fallback,y=a.mode,p=df({mode:"visible",children:p.children},y,0,null),x=fs(x,y,C,null),x.flags|=2,p.return=a,x.return=a,p.sibling=x,a.child=p,(a.mode&1)!==0&&Ta(a,o.child,null,C),a.child.memoizedState=c0(C),a.memoizedState=u0,x);if((a.mode&1)===0)return Qd(o,a,C,null);if(y.data==="$!"){if(p=y.nextSibling&&y.nextSibling.dataset,p)var $=p.dgst;return p=$,x=Error(n(419)),p=i0(x,p,void 0),Qd(o,a,C,p)}if($=(C&o.childLanes)!==0,Kn||$){if(p=yn,p!==null){switch(C&-C){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(p.suspendedLanes|C))!==0?0:y,y!==0&&y!==x.retryLane&&(x.retryLane=y,ki(o,y),jr(p,o,y,-1))}return A0(),p=i0(Error(n(421))),Qd(o,a,C,p)}return y.data==="$?"?(a.flags|=128,a.child=o.child,a=Iz.bind(null,o),y._reactRetry=a,null):(o=x.treeContext,lr=ro(y.nextSibling),cr=a,$t=!0,Mr=null,o!==null&&(Er[br++]=Si,Er[br++]=Ai,Er[br++]=rs,Si=o.id,Ai=o.overflow,rs=a),a=l0(a,p.children),a.flags|=4096,a)}function ES(o,a,l){o.lanes|=a;var p=o.alternate;p!==null&&(p.lanes|=a),Hg(o.return,a,l)}function d0(o,a,l,p,y){var x=o.memoizedState;x===null?o.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:l,tailMode:y}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=p,x.tail=l,x.tailMode=y)}function bS(o,a,l){var p=a.pendingProps,y=p.revealOrder,x=p.tail;if(Fn(o,a,p.children,l),p=Vt.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=a.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&ES(o,l,a);else if(o.tag===19)ES(o,l,a);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}p&=1}if(Rt(Vt,p),(a.mode&1)===0)a.memoizedState=null;else switch(y){case"forwards":for(l=a.child,y=null;l!==null;)o=l.alternate,o!==null&&Vd(o)===null&&(y=l),l=l.sibling;l=y,l===null?(y=a.child,a.child=null):(y=l.sibling,l.sibling=null),d0(a,!1,y,l,x);break;case"backwards":for(l=null,y=a.child,a.child=null;y!==null;){if(o=y.alternate,o!==null&&Vd(o)===null){a.child=y;break}o=y.sibling,y.sibling=l,l=y,y=o}d0(a,!0,l,null,x);break;case"together":d0(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Jd(o,a){(a.mode&1)===0&&o!==null&&(o.alternate=null,a.alternate=null,a.flags|=2)}function Ni(o,a,l){if(o!==null&&(a.dependencies=o.dependencies),us|=a.lanes,(l&a.childLanes)===0)return null;if(o!==null&&a.child!==o.child)throw Error(n(153));if(a.child!==null){for(o=a.child,l=mo(o,o.pendingProps),a.child=l,l.return=a;o.sibling!==null;)o=o.sibling,l=l.sibling=mo(o,o.pendingProps),l.return=a;l.sibling=null}return a.child}function Ez(o,a,l){switch(a.tag){case 3:mS(a),xa();break;case 5:R2(a);break;case 1:Xn(a.type)&&Ld(a);break;case 4:Vg(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,y=a.memoizedProps.value;Rt(jd,p._currentValue),p._currentValue=y;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(Rt(Vt,Vt.current&1),a.flags|=128,null):(l&a.child.childLanes)!==0?yS(o,a,l):(Rt(Vt,Vt.current&1),o=Ni(o,a,l),o!==null?o.sibling:null);Rt(Vt,Vt.current&1);break;case 19:if(p=(l&a.childLanes)!==0,(o.flags&128)!==0){if(p)return bS(o,a,l);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Rt(Vt,Vt.current),p)break;return null;case 22:case 23:return a.lanes=0,fS(o,a,l)}return Ni(o,a,l)}var wS,f0,xS,TS;wS=function(o,a){for(var l=a.child;l!==null;){if(l.tag===5||l.tag===6)o.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},f0=function(){},xS=function(o,a,l,p){var y=o.memoizedProps;if(y!==p){o=a.stateNode,ss(ai.current);var x=null;switch(l){case"input":y=tt(o,y),p=tt(o,p),x=[];break;case"select":y=O({},y,{value:void 0}),p=O({},p,{value:void 0}),x=[];break;case"textarea":y=At(o,y),p=At(o,p),x=[];break;default:typeof y.onClick!="function"&&typeof p.onClick=="function"&&(o.onclick=Od)}Xt(l,p);var C;l=null;for(oe in y)if(!p.hasOwnProperty(oe)&&y.hasOwnProperty(oe)&&y[oe]!=null)if(oe==="style"){var $=y[oe];for(C in $)$.hasOwnProperty(C)&&(l||(l={}),l[C]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(i.hasOwnProperty(oe)?x||(x=[]):(x=x||[]).push(oe,null));for(oe in p){var Y=p[oe];if($=y!=null?y[oe]:void 0,p.hasOwnProperty(oe)&&Y!==$&&(Y!=null||$!=null))if(oe==="style")if($){for(C in $)!$.hasOwnProperty(C)||Y&&Y.hasOwnProperty(C)||(l||(l={}),l[C]="");for(C in Y)Y.hasOwnProperty(C)&&$[C]!==Y[C]&&(l||(l={}),l[C]=Y[C])}else l||(x||(x=[]),x.push(oe,l)),l=Y;else oe==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,$=$?$.__html:void 0,Y!=null&&$!==Y&&(x=x||[]).push(oe,Y)):oe==="children"?typeof Y!="string"&&typeof Y!="number"||(x=x||[]).push(oe,""+Y):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(i.hasOwnProperty(oe)?(Y!=null&&oe==="onScroll"&&Mt("scroll",o),x||$===Y||(x=[])):(x=x||[]).push(oe,Y))}l&&(x=x||[]).push("style",l);var oe=x;(a.updateQueue=oe)&&(a.flags|=4)}},TS=function(o,a,l,p){l!==p&&(a.flags|=4)};function hc(o,a){if(!$t)switch(o.tailMode){case"hidden":a=o.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?a||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function Pn(o){var a=o.alternate!==null&&o.alternate.child===o.child,l=0,p=0;if(a)for(var y=o.child;y!==null;)l|=y.lanes|y.childLanes,p|=y.subtreeFlags&14680064,p|=y.flags&14680064,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)l|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=p,o.childLanes=l,a}function bz(o,a,l){var p=a.pendingProps;switch(Lg(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pn(a),null;case 1:return Xn(a.type)&&Rd(),Pn(a),null;case 3:return p=a.stateNode,Sa(),Ft(Gn),Ft(In),Yg(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(Bd(a)?a.flags|=4:o===null||o.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Mr!==null&&(_0(Mr),Mr=null))),f0(o,a),Pn(a),null;case 5:qg(a);var y=ss(cc.current);if(l=a.type,o!==null&&a.stateNode!=null)xS(o,a,l,p,y),o.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(n(166));return Pn(a),null}if(o=ss(ai.current),Bd(a)){p=a.stateNode,l=a.type;var x=a.memoizedProps;switch(p[si]=a,p[ic]=x,o=(a.mode&1)!==0,l){case"dialog":Mt("cancel",p),Mt("close",p);break;case"iframe":case"object":case"embed":Mt("load",p);break;case"video":case"audio":for(y=0;y<tc.length;y++)Mt(tc[y],p);break;case"source":Mt("error",p);break;case"img":case"image":case"link":Mt("error",p),Mt("load",p);break;case"details":Mt("toggle",p);break;case"input":yt(p,x),Mt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!x.multiple},Mt("invalid",p);break;case"textarea":Ei(p,x),Mt("invalid",p)}Xt(l,x),y=null;for(var C in x)if(x.hasOwnProperty(C)){var $=x[C];C==="children"?typeof $=="string"?p.textContent!==$&&(x.suppressHydrationWarning!==!0&&Id(p.textContent,$,o),y=["children",$]):typeof $=="number"&&p.textContent!==""+$&&(x.suppressHydrationWarning!==!0&&Id(p.textContent,$,o),y=["children",""+$]):i.hasOwnProperty(C)&&$!=null&&C==="onScroll"&&Mt("scroll",p)}switch(l){case"input":Ot(p),Oe(p,x,!0);break;case"textarea":Ot(p),Ko(p);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(p.onclick=Od)}p=y,a.updateQueue=p,p!==null&&(a.flags|=4)}else{C=y.nodeType===9?y:y.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=he(l)),o==="http://www.w3.org/1999/xhtml"?l==="script"?(o=C.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof p.is=="string"?o=C.createElement(l,{is:p.is}):(o=C.createElement(l),l==="select"&&(C=o,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):o=C.createElementNS(o,l),o[si]=a,o[ic]=p,wS(o,a,!1,!1),a.stateNode=o;e:{switch(C=Mn(l,p),l){case"dialog":Mt("cancel",o),Mt("close",o),y=p;break;case"iframe":case"object":case"embed":Mt("load",o),y=p;break;case"video":case"audio":for(y=0;y<tc.length;y++)Mt(tc[y],o);y=p;break;case"source":Mt("error",o),y=p;break;case"img":case"image":case"link":Mt("error",o),Mt("load",o),y=p;break;case"details":Mt("toggle",o),y=p;break;case"input":yt(o,p),y=tt(o,p),Mt("invalid",o);break;case"option":y=p;break;case"select":o._wrapperState={wasMultiple:!!p.multiple},y=O({},p,{value:void 0}),Mt("invalid",o);break;case"textarea":Ei(o,p),y=At(o,p),Mt("invalid",o);break;default:y=p}Xt(l,y),$=y;for(x in $)if($.hasOwnProperty(x)){var Y=$[x];x==="style"?Gt(o,Y):x==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,Y!=null&&Je(o,Y)):x==="children"?typeof Y=="string"?(l!=="textarea"||Y!=="")&&et(o,Y):typeof Y=="number"&&et(o,""+Y):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(i.hasOwnProperty(x)?Y!=null&&x==="onScroll"&&Mt("scroll",o):Y!=null&&R(o,x,Y,C))}switch(l){case"input":Ot(o),Oe(o,p,!1);break;case"textarea":Ot(o),Ko(o);break;case"option":p.value!=null&&o.setAttribute("value",""+ve(p.value));break;case"select":o.multiple=!!p.multiple,x=p.value,x!=null?jt(o,!!p.multiple,x,!1):p.defaultValue!=null&&jt(o,!!p.multiple,p.defaultValue,!0);break;default:typeof y.onClick=="function"&&(o.onclick=Od)}switch(l){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Pn(a),null;case 6:if(o&&a.stateNode!=null)TS(o,a,o.memoizedProps,p);else{if(typeof p!="string"&&a.stateNode===null)throw Error(n(166));if(l=ss(cc.current),ss(ai.current),Bd(a)){if(p=a.stateNode,l=a.memoizedProps,p[si]=a,(x=p.nodeValue!==l)&&(o=cr,o!==null))switch(o.tag){case 3:Id(p.nodeValue,l,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Id(p.nodeValue,l,(o.mode&1)!==0)}x&&(a.flags|=4)}else p=(l.nodeType===9?l:l.ownerDocument).createTextNode(p),p[si]=a,a.stateNode=p}return Pn(a),null;case 13:if(Ft(Vt),p=a.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if($t&&lr!==null&&(a.mode&1)!==0&&(a.flags&128)===0)S2(),xa(),a.flags|=98560,x=!1;else if(x=Bd(a),p!==null&&p.dehydrated!==null){if(o===null){if(!x)throw Error(n(318));if(x=a.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[si]=a}else xa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pn(a),x=!1}else Mr!==null&&(_0(Mr),Mr=null),x=!0;if(!x)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=l,a):(p=p!==null,p!==(o!==null&&o.memoizedState!==null)&&p&&(a.child.flags|=8192,(a.mode&1)!==0&&(o===null||(Vt.current&1)!==0?cn===0&&(cn=3):A0())),a.updateQueue!==null&&(a.flags|=4),Pn(a),null);case 4:return Sa(),f0(o,a),o===null&&nc(a.stateNode.containerInfo),Pn(a),null;case 10:return jg(a.type._context),Pn(a),null;case 17:return Xn(a.type)&&Rd(),Pn(a),null;case 19:if(Ft(Vt),x=a.memoizedState,x===null)return Pn(a),null;if(p=(a.flags&128)!==0,C=x.rendering,C===null)if(p)hc(x,!1);else{if(cn!==0||o!==null&&(o.flags&128)!==0)for(o=a.child;o!==null;){if(C=Vd(o),C!==null){for(a.flags|=128,hc(x,!1),p=C.updateQueue,p!==null&&(a.updateQueue=p,a.flags|=4),a.subtreeFlags=0,p=l,l=a.child;l!==null;)x=l,o=p,x.flags&=14680066,C=x.alternate,C===null?(x.childLanes=0,x.lanes=o,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=C.childLanes,x.lanes=C.lanes,x.child=C.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=C.memoizedProps,x.memoizedState=C.memoizedState,x.updateQueue=C.updateQueue,x.type=C.type,o=C.dependencies,x.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),l=l.sibling;return Rt(Vt,Vt.current&1|2),a.child}o=o.sibling}x.tail!==null&&at()>Na&&(a.flags|=128,p=!0,hc(x,!1),a.lanes=4194304)}else{if(!p)if(o=Vd(C),o!==null){if(a.flags|=128,p=!0,l=o.updateQueue,l!==null&&(a.updateQueue=l,a.flags|=4),hc(x,!0),x.tail===null&&x.tailMode==="hidden"&&!C.alternate&&!$t)return Pn(a),null}else 2*at()-x.renderingStartTime>Na&&l!==1073741824&&(a.flags|=128,p=!0,hc(x,!1),a.lanes=4194304);x.isBackwards?(C.sibling=a.child,a.child=C):(l=x.last,l!==null?l.sibling=C:a.child=C,x.last=C)}return x.tail!==null?(a=x.tail,x.rendering=a,x.tail=a.sibling,x.renderingStartTime=at(),a.sibling=null,l=Vt.current,Rt(Vt,p?l&1|2:l&1),a):(Pn(a),null);case 22:case 23:return S0(),p=a.memoizedState!==null,o!==null&&o.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(dr&1073741824)!==0&&(Pn(a),a.subtreeFlags&6&&(a.flags|=8192)):Pn(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function wz(o,a){switch(Lg(a),a.tag){case 1:return Xn(a.type)&&Rd(),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return Sa(),Ft(Gn),Ft(In),Yg(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 5:return qg(a),null;case 13:if(Ft(Vt),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(n(340));xa()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return Ft(Vt),null;case 4:return Sa(),null;case 10:return jg(a.type._context),null;case 22:case 23:return S0(),null;case 24:return null;default:return null}}var Zd=!1,Rn=!1,xz=typeof WeakSet=="function"?WeakSet:Set,Be=null;function ka(o,a){var l=o.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(p){Qt(o,a,p)}else l.current=null}function p0(o,a,l){try{l()}catch(p){Qt(o,a,p)}}var _S=!1;function Tz(o,a){if(Sg=bd,o=t2(),yg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var p=l.getSelection&&l.getSelection();if(p&&p.rangeCount!==0){l=p.anchorNode;var y=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{l.nodeType,x.nodeType}catch(Ce){l=null;break e}var C=0,$=-1,Y=-1,oe=0,xe=0,_e=o,be=null;t:for(;;){for(var Me;_e!==l||y!==0&&_e.nodeType!==3||($=C+y),_e!==x||p!==0&&_e.nodeType!==3||(Y=C+p),_e.nodeType===3&&(C+=_e.nodeValue.length),(Me=_e.firstChild)!==null;)be=_e,_e=Me;for(;;){if(_e===o)break t;if(be===l&&++oe===y&&($=C),be===x&&++xe===p&&(Y=C),(Me=_e.nextSibling)!==null)break;_e=be,be=_e.parentNode}_e=Me}l=$===-1||Y===-1?null:{start:$,end:Y}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ag={focusedElem:o,selectionRange:l},bd=!1,Be=a;Be!==null;)if(a=Be,o=a.child,(a.subtreeFlags&1028)!==0&&o!==null)o.return=a,Be=o;else for(;Be!==null;){a=Be;try{var Ue=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ue!==null){var je=Ue.memoizedProps,tn=Ue.memoizedState,te=a.stateNode,K=te.getSnapshotBeforeUpdate(a.elementType===a.type?je:Fr(a.type,je),tn);te.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var ie=a.stateNode.containerInfo;ie.nodeType===1?ie.textContent="":ie.nodeType===9&&ie.documentElement&&ie.removeChild(ie.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ce){Qt(a,a.return,Ce)}if(o=a.sibling,o!==null){o.return=a.return,Be=o;break}Be=a.return}return Ue=_S,_S=!1,Ue}function mc(o,a,l){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&o)===o){var x=y.destroy;y.destroy=void 0,x!==void 0&&p0(a,l,x)}y=y.next}while(y!==p)}}function ef(o,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var l=a=a.next;do{if((l.tag&o)===o){var p=l.create;l.destroy=p()}l=l.next}while(l!==a)}}function h0(o){var a=o.ref;if(a!==null){var l=o.stateNode;o.tag,o=l,typeof a=="function"?a(o):a.current=o}}function vS(o){var a=o.alternate;a!==null&&(o.alternate=null,vS(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&(delete a[si],delete a[ic],delete a[Ig],delete a[iz],delete a[oz])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function SS(o){return o.tag===5||o.tag===3||o.tag===4}function AS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||SS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function m0(o,a,l){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?l.nodeType===8?l.parentNode.insertBefore(o,a):l.insertBefore(o,a):(l.nodeType===8?(a=l.parentNode,a.insertBefore(o,l)):(a=l,a.appendChild(o)),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=Od));else if(p!==4&&(o=o.child,o!==null))for(m0(o,a,l),o=o.sibling;o!==null;)m0(o,a,l),o=o.sibling}function g0(o,a,l){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?l.insertBefore(o,a):l.appendChild(o);else if(p!==4&&(o=o.child,o!==null))for(g0(o,a,l),o=o.sibling;o!==null;)g0(o,a,l),o=o.sibling}var xn=null,Br=!1;function co(o,a,l){for(l=l.child;l!==null;)kS(o,a,l),l=l.sibling}function kS(o,a,l){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(Zo,l)}catch($){}switch(l.tag){case 5:Rn||ka(l,a);case 6:var p=xn,y=Br;xn=null,co(o,a,l),xn=p,Br=y,xn!==null&&(Br?(o=xn,l=l.stateNode,o.nodeType===8?o.parentNode.removeChild(l):o.removeChild(l)):xn.removeChild(l.stateNode));break;case 18:xn!==null&&(Br?(o=xn,l=l.stateNode,o.nodeType===8?Ng(o.parentNode,l):o.nodeType===1&&Ng(o,l),Yu(o)):Ng(xn,l.stateNode));break;case 4:p=xn,y=Br,xn=l.stateNode.containerInfo,Br=!0,co(o,a,l),xn=p,Br=y;break;case 0:case 11:case 14:case 15:if(!Rn&&(p=l.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var x=y,C=x.destroy;x=x.tag,C!==void 0&&((x&2)!==0||(x&4)!==0)&&p0(l,a,C),y=y.next}while(y!==p)}co(o,a,l);break;case 1:if(!Rn&&(ka(l,a),p=l.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=l.memoizedProps,p.state=l.memoizedState,p.componentWillUnmount()}catch($){Qt(l,a,$)}co(o,a,l);break;case 21:co(o,a,l);break;case 22:l.mode&1?(Rn=(p=Rn)||l.memoizedState!==null,co(o,a,l),Rn=p):co(o,a,l);break;default:co(o,a,l)}}function CS(o){var a=o.updateQueue;if(a!==null){o.updateQueue=null;var l=o.stateNode;l===null&&(l=o.stateNode=new xz),a.forEach(function(p){var y=Oz.bind(null,o,p);l.has(p)||(l.add(p),p.then(y,y))})}}function Ur(o,a){var l=a.deletions;if(l!==null)for(var p=0;p<l.length;p++){var y=l[p];try{var x=o,C=a,$=C;e:for(;$!==null;){switch($.tag){case 5:xn=$.stateNode,Br=!1;break e;case 3:xn=$.stateNode.containerInfo,Br=!0;break e;case 4:xn=$.stateNode.containerInfo,Br=!0;break e}$=$.return}if(xn===null)throw Error(n(160));kS(x,C,y),xn=null,Br=!1;var Y=y.alternate;Y!==null&&(Y.return=null),y.return=null}catch(oe){Qt(y,a,oe)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)NS(a,o),a=a.sibling}function NS(o,a){var l=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Ur(a,o),ci(o),p&4){try{mc(3,o,o.return),ef(3,o)}catch(je){Qt(o,o.return,je)}try{mc(5,o,o.return)}catch(je){Qt(o,o.return,je)}}break;case 1:Ur(a,o),ci(o),p&512&&l!==null&&ka(l,l.return);break;case 5:if(Ur(a,o),ci(o),p&512&&l!==null&&ka(l,l.return),o.flags&32){var y=o.stateNode;try{et(y,"")}catch(je){Qt(o,o.return,je)}}if(p&4&&(y=o.stateNode,y!=null)){var x=o.memoizedProps,C=l!==null?l.memoizedProps:x,$=o.type,Y=o.updateQueue;if(o.updateQueue=null,Y!==null)try{$==="input"&&x.type==="radio"&&x.name!=null&&De(y,x),Mn($,C);var oe=Mn($,x);for(C=0;C<Y.length;C+=2){var xe=Y[C],_e=Y[C+1];xe==="style"?Gt(y,_e):xe==="dangerouslySetInnerHTML"?Je(y,_e):xe==="children"?et(y,_e):R(y,xe,_e,oe)}switch($){case"input":Ve(y,x);break;case"textarea":sr(y,x);break;case"select":var be=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!x.multiple;var Me=x.value;Me!=null?jt(y,!!x.multiple,Me,!1):be!==!!x.multiple&&(x.defaultValue!=null?jt(y,!!x.multiple,x.defaultValue,!0):jt(y,!!x.multiple,x.multiple?[]:"",!1))}y[ic]=x}catch(je){Qt(o,o.return,je)}}break;case 6:if(Ur(a,o),ci(o),p&4){if(o.stateNode===null)throw Error(n(162));y=o.stateNode,x=o.memoizedProps;try{y.nodeValue=x}catch(je){Qt(o,o.return,je)}}break;case 3:if(Ur(a,o),ci(o),p&4&&l!==null&&l.memoizedState.isDehydrated)try{Yu(a.containerInfo)}catch(je){Qt(o,o.return,je)}break;case 4:Ur(a,o),ci(o);break;case 13:Ur(a,o),ci(o),y=o.child,y.flags&8192&&(x=y.memoizedState!==null,y.stateNode.isHidden=x,!x||y.alternate!==null&&y.alternate.memoizedState!==null||(b0=at())),p&4&&CS(o);break;case 22:if(xe=l!==null&&l.memoizedState!==null,o.mode&1?(Rn=(oe=Rn)||xe,Ur(a,o),Rn=oe):Ur(a,o),ci(o),p&8192){if(oe=o.memoizedState!==null,(o.stateNode.isHidden=oe)&&!xe&&(o.mode&1)!==0)for(Be=o,xe=o.child;xe!==null;){for(_e=Be=xe;Be!==null;){switch(be=Be,Me=be.child,be.tag){case 0:case 11:case 14:case 15:mc(4,be,be.return);break;case 1:ka(be,be.return);var Ue=be.stateNode;if(typeof Ue.componentWillUnmount=="function"){p=be,l=be.return;try{a=p,Ue.props=a.memoizedProps,Ue.state=a.memoizedState,Ue.componentWillUnmount()}catch(je){Qt(p,l,je)}}break;case 5:ka(be,be.return);break;case 22:if(be.memoizedState!==null){PS(_e);continue}}Me!==null?(Me.return=be,Be=Me):PS(_e)}xe=xe.sibling}e:for(xe=null,_e=o;;){if(_e.tag===5){if(xe===null){xe=_e;try{y=_e.stateNode,oe?(x=y.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):($=_e.stateNode,Y=_e.memoizedProps.style,C=Y!=null&&Y.hasOwnProperty("display")?Y.display:null,$.style.display=mn("display",C))}catch(je){Qt(o,o.return,je)}}}else if(_e.tag===6){if(xe===null)try{_e.stateNode.nodeValue=oe?"":_e.memoizedProps}catch(je){Qt(o,o.return,je)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===o)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===o)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===o)break e;xe===_e&&(xe=null),_e=_e.return}xe===_e&&(xe=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Ur(a,o),ci(o),p&4&&CS(o);break;case 21:break;default:Ur(a,o),ci(o)}}function ci(o){var a=o.flags;if(a&2){try{e:{for(var l=o.return;l!==null;){if(SS(l)){var p=l;break e}l=l.return}throw Error(n(160))}switch(p.tag){case 5:var y=p.stateNode;p.flags&32&&(et(y,""),p.flags&=-33);var x=AS(o);g0(o,x,y);break;case 3:case 4:var C=p.stateNode.containerInfo,$=AS(o);m0(o,$,C);break;default:throw Error(n(161))}}catch(Y){Qt(o,o.return,Y)}o.flags&=-3}a&4096&&(o.flags&=-4097)}function _z(o,a,l){Be=o,IS(o)}function IS(o,a,l){for(var p=(o.mode&1)!==0;Be!==null;){var y=Be,x=y.child;if(y.tag===22&&p){var C=y.memoizedState!==null||Zd;if(!C){var $=y.alternate,Y=$!==null&&$.memoizedState!==null||Rn;$=Zd;var oe=Rn;if(Zd=C,(Rn=Y)&&!oe)for(Be=y;Be!==null;)C=Be,Y=C.child,C.tag===22&&C.memoizedState!==null?RS(y):Y!==null?(Y.return=C,Be=Y):RS(y);for(;x!==null;)Be=x,IS(x),x=x.sibling;Be=y,Zd=$,Rn=oe}OS(o)}else(y.subtreeFlags&8772)!==0&&x!==null?(x.return=y,Be=x):OS(o)}}function OS(o){for(;Be!==null;){var a=Be;if((a.flags&8772)!==0){var l=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Rn||ef(5,a);break;case 1:var p=a.stateNode;if(a.flags&4&&!Rn)if(l===null)p.componentDidMount();else{var y=a.elementType===a.type?l.memoizedProps:Fr(a.type,l.memoizedProps);p.componentDidUpdate(y,l.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var x=a.updateQueue;x!==null&&P2(a,x,p);break;case 3:var C=a.updateQueue;if(C!==null){if(l=null,a.child!==null)switch(a.child.tag){case 5:l=a.child.stateNode;break;case 1:l=a.child.stateNode}P2(a,C,l)}break;case 5:var $=a.stateNode;if(l===null&&a.flags&4){l=$;var Y=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":Y.autoFocus&&l.focus();break;case"img":Y.src&&(l.src=Y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var oe=a.alternate;if(oe!==null){var xe=oe.memoizedState;if(xe!==null){var _e=xe.dehydrated;_e!==null&&Yu(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Rn||a.flags&512&&h0(a)}catch(be){Qt(a,a.return,be)}}if(a===o){Be=null;break}if(l=a.sibling,l!==null){l.return=a.return,Be=l;break}Be=a.return}}function PS(o){for(;Be!==null;){var a=Be;if(a===o){Be=null;break}var l=a.sibling;if(l!==null){l.return=a.return,Be=l;break}Be=a.return}}function RS(o){for(;Be!==null;){var a=Be;try{switch(a.tag){case 0:case 11:case 15:var l=a.return;try{ef(4,a)}catch(Y){Qt(a,l,Y)}break;case 1:var p=a.stateNode;if(typeof p.componentDidMount=="function"){var y=a.return;try{p.componentDidMount()}catch(Y){Qt(a,y,Y)}}var x=a.return;try{h0(a)}catch(Y){Qt(a,x,Y)}break;case 5:var C=a.return;try{h0(a)}catch(Y){Qt(a,C,Y)}}}catch(Y){Qt(a,a.return,Y)}if(a===o){Be=null;break}var $=a.sibling;if($!==null){$.return=a.return,Be=$;break}Be=a.return}}var vz=Math.ceil,tf=U.ReactCurrentDispatcher,y0=U.ReactCurrentOwner,Tr=U.ReactCurrentBatchConfig,xt=0,yn=null,on=null,Tn=0,dr=0,Ca=io(0),cn=0,gc=null,us=0,nf=0,E0=0,yc=null,Qn=null,b0=0,Na=1/0,Ii=null,rf=!1,w0=null,lo=null,of=!1,fo=null,sf=0,Ec=0,x0=null,af=-1,uf=0;function Bn(){return(xt&6)!==0?at():af!==-1?af:af=at()}function po(o){return(o.mode&1)===0?1:(xt&2)!==0&&Tn!==0?Tn&-Tn:az.transition!==null?(uf===0&&(uf=Av()),uf):(o=vt,o!==0||(o=window.event,o=o===void 0?16:Dv(o.type)),o)}function jr(o,a,l,p){if(50<Ec)throw Ec=0,x0=null,Error(n(185));$u(o,l,p),((xt&2)===0||o!==yn)&&(o===yn&&((xt&2)===0&&(nf|=l),cn===4&&ho(o,Tn)),Jn(o,p),l===1&&xt===0&&(a.mode&1)===0&&(Na=at()+500,Dd&&so()))}function Jn(o,a){var l=o.callbackNode;a$(o,a);var p=gd(o,o===yn?Tn:0);if(p===0)l!==null&&Ze(l),o.callbackNode=null,o.callbackPriority=0;else if(a=p&-p,o.callbackPriority!==a){if(l!=null&&Ze(l),a===1)o.tag===0?sz(DS.bind(null,o)):w2(DS.bind(null,o)),nz(function(){(xt&6)===0&&so()}),l=null;else{switch(kv(p)){case 1:l=Ht;break;case 4:l=oi;break;case 16:l=Jo;break;case 536870912:l=ju;break;default:l=Jo}l=zS(l,LS.bind(null,o))}o.callbackPriority=a,o.callbackNode=l}}function LS(o,a){if(af=-1,uf=0,(xt&6)!==0)throw Error(n(327));var l=o.callbackNode;if(Ia()&&o.callbackNode!==l)return null;var p=gd(o,o===yn?Tn:0);if(p===0)return null;if((p&30)!==0||(p&o.expiredLanes)!==0||a)a=cf(o,p);else{a=p;var y=xt;xt|=2;var x=FS();(yn!==o||Tn!==a)&&(Ii=null,Na=at()+500,ls(o,a));do try{kz();break}catch($){MS(o,$)}while(!0);Ug(),tf.current=x,xt=y,on!==null?a=0:(yn=null,Tn=0,a=cn)}if(a!==0){if(a===2&&(y=tg(o),y!==0&&(p=y,a=T0(o,y))),a===1)throw l=gc,ls(o,0),ho(o,p),Jn(o,at()),l;if(a===6)ho(o,p);else{if(y=o.current.alternate,(p&30)===0&&!Sz(y)&&(a=cf(o,p),a===2&&(x=tg(o),x!==0&&(p=x,a=T0(o,x))),a===1))throw l=gc,ls(o,0),ho(o,p),Jn(o,at()),l;switch(o.finishedWork=y,o.finishedLanes=p,a){case 0:case 1:throw Error(n(345));case 2:ds(o,Qn,Ii);break;case 3:if(ho(o,p),(p&130023424)===p&&(a=b0+500-at(),10<a)){if(gd(o,0)!==0)break;if(y=o.suspendedLanes,(y&p)!==p){Bn(),o.pingedLanes|=o.suspendedLanes&y;break}o.timeoutHandle=Cg(ds.bind(null,o,Qn,Ii),a);break}ds(o,Qn,Ii);break;case 4:if(ho(o,p),(p&4194240)===p)break;for(a=o.eventTimes,y=-1;0<p;){var C=31-Lr(p);x=1<<C,C=a[C],C>y&&(y=C),p&=~x}if(p=y,p=at()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*vz(p/1960))-p,10<p){o.timeoutHandle=Cg(ds.bind(null,o,Qn,Ii),p);break}ds(o,Qn,Ii);break;case 5:ds(o,Qn,Ii);break;default:throw Error(n(329))}}}return Jn(o,at()),o.callbackNode===l?LS.bind(null,o):null}function T0(o,a){var l=yc;return o.current.memoizedState.isDehydrated&&(ls(o,a).flags|=256),o=cf(o,a),o!==2&&(a=Qn,Qn=l,a!==null&&_0(a)),o}function _0(o){Qn===null?Qn=o:Qn.push.apply(Qn,o)}function Sz(o){for(var a=o;;){if(a.flags&16384){var l=a.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var p=0;p<l.length;p++){var y=l[p],x=y.getSnapshot;y=y.value;try{if(!Dr(x(),y))return!1}catch(C){return!1}}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ho(o,a){for(a&=~E0,a&=~nf,o.suspendedLanes|=a,o.pingedLanes&=~a,o=o.expirationTimes;0<a;){var l=31-Lr(a),p=1<<l;o[l]=-1,a&=~p}}function DS(o){if((xt&6)!==0)throw Error(n(327));Ia();var a=gd(o,0);if((a&1)===0)return Jn(o,at()),null;var l=cf(o,a);if(o.tag!==0&&l===2){var p=tg(o);p!==0&&(a=p,l=T0(o,p))}if(l===1)throw l=gc,ls(o,0),ho(o,a),Jn(o,at()),l;if(l===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=a,ds(o,Qn,Ii),Jn(o,at()),null}function v0(o,a){var l=xt;xt|=1;try{return o(a)}finally{xt=l,xt===0&&(Na=at()+500,Dd&&so())}}function cs(o){fo!==null&&fo.tag===0&&(xt&6)===0&&Ia();var a=xt;xt|=1;var l=Tr.transition,p=vt;try{if(Tr.transition=null,vt=1,o)return o()}finally{vt=p,Tr.transition=l,xt=a,(xt&6)===0&&so()}}function S0(){dr=Ca.current,Ft(Ca)}function ls(o,a){o.finishedWork=null,o.finishedLanes=0;var l=o.timeoutHandle;if(l!==-1&&(o.timeoutHandle=-1,tz(l)),on!==null)for(l=on.return;l!==null;){var p=l;switch(Lg(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Rd();break;case 3:Sa(),Ft(Gn),Ft(In),Yg();break;case 5:qg(p);break;case 4:Sa();break;case 13:Ft(Vt);break;case 19:Ft(Vt);break;case 10:jg(p.type._context);break;case 22:case 23:S0()}l=l.return}if(yn=o,on=o=mo(o.current,null),Tn=dr=a,cn=0,gc=null,E0=nf=us=0,Qn=yc=null,os!==null){for(a=0;a<os.length;a++)if(l=os[a],p=l.interleaved,p!==null){l.interleaved=null;var y=p.next,x=l.pending;if(x!==null){var C=x.next;x.next=y,p.next=C}l.pending=p}os=null}return o}function MS(o,a){do{var l=on;try{if(Ug(),qd.current=Xd,Wd){for(var p=qt.memoizedState;p!==null;){var y=p.queue;y!==null&&(y.pending=null),p=p.next}Wd=!1}if(as=0,gn=un=qt=null,lc=!1,dc=0,y0.current=null,l===null||l.return===null){cn=1,gc=a,on=null;break}e:{var x=o,C=l.return,$=l,Y=a;if(a=Tn,$.flags|=32768,Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var oe=Y,xe=$,_e=xe.tag;if((xe.mode&1)===0&&(_e===0||_e===11||_e===15)){var be=xe.alternate;be?(xe.updateQueue=be.updateQueue,xe.memoizedState=be.memoizedState,xe.lanes=be.lanes):(xe.updateQueue=null,xe.memoizedState=null)}var Me=aS(C);if(Me!==null){Me.flags&=-257,uS(Me,C,$,x,a),Me.mode&1&&sS(x,oe,a),a=Me,Y=oe;var Ue=a.updateQueue;if(Ue===null){var je=new Set;je.add(Y),a.updateQueue=je}else Ue.add(Y);break e}else{if((a&1)===0){sS(x,oe,a),A0();break e}Y=Error(n(426))}}else if($t&&$.mode&1){var tn=aS(C);if(tn!==null){(tn.flags&65536)===0&&(tn.flags|=256),uS(tn,C,$,x,a),Fg(Aa(Y,$));break e}}x=Y=Aa(Y,$),cn!==4&&(cn=2),yc===null?yc=[x]:yc.push(x),x=C;do{switch(x.tag){case 3:x.flags|=65536,a&=-a,x.lanes|=a;var te=iS(x,Y,a);O2(x,te);break e;case 1:$=Y;var K=x.type,ie=x.stateNode;if((x.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||ie!==null&&typeof ie.componentDidCatch=="function"&&(lo===null||!lo.has(ie)))){x.flags|=65536,a&=-a,x.lanes|=a;var Ce=oS(x,$,a);O2(x,Ce);break e}}x=x.return}while(x!==null)}US(l)}catch(He){a=He,on===l&&l!==null&&(on=l=l.return);continue}break}while(!0)}function FS(){var o=tf.current;return tf.current=Xd,o===null?Xd:o}function A0(){(cn===0||cn===3||cn===2)&&(cn=4),yn===null||(us&268435455)===0&&(nf&268435455)===0||ho(yn,Tn)}function cf(o,a){var l=xt;xt|=2;var p=FS();(yn!==o||Tn!==a)&&(Ii=null,ls(o,a));do try{Az();break}catch(y){MS(o,y)}while(!0);if(Ug(),xt=l,tf.current=p,on!==null)throw Error(n(261));return yn=null,Tn=0,cn}function Az(){for(;on!==null;)BS(on)}function kz(){for(;on!==null&&!ft();)BS(on)}function BS(o){var a=$S(o.alternate,o,dr);o.memoizedProps=o.pendingProps,a===null?US(o):on=a,y0.current=null}function US(o){var a=o;do{var l=a.alternate;if(o=a.return,(a.flags&32768)===0){if(l=bz(l,a,dr),l!==null){on=l;return}}else{if(l=wz(l,a),l!==null){l.flags&=32767,on=l;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{cn=6,on=null;return}}if(a=a.sibling,a!==null){on=a;return}on=a=o}while(a!==null);cn===0&&(cn=5)}function ds(o,a,l){var p=vt,y=Tr.transition;try{Tr.transition=null,vt=1,Cz(o,a,l,p)}finally{Tr.transition=y,vt=p}return null}function Cz(o,a,l,p){do Ia();while(fo!==null);if((xt&6)!==0)throw Error(n(327));l=o.finishedWork;var y=o.finishedLanes;if(l===null)return null;if(o.finishedWork=null,o.finishedLanes=0,l===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var x=l.lanes|l.childLanes;if(u$(o,x),o===yn&&(on=yn=null,Tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||of||(of=!0,zS(Jo,function(){return Ia(),null})),x=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||x){x=Tr.transition,Tr.transition=null;var C=vt;vt=1;var $=xt;xt|=4,y0.current=null,Tz(o,l),NS(l,o),G$(Ag),bd=!!Sg,Ag=Sg=null,o.current=l,_z(l),Kt(),xt=$,vt=C,Tr.transition=x}else o.current=l;if(of&&(of=!1,fo=o,sf=y),x=o.pendingLanes,x===0&&(lo=null),es(l.stateNode),Jn(o,at()),a!==null)for(p=o.onRecoverableError,l=0;l<a.length;l++)y=a[l],p(y.value,{componentStack:y.stack,digest:y.digest});if(rf)throw rf=!1,o=w0,w0=null,o;return(sf&1)!==0&&o.tag!==0&&Ia(),x=o.pendingLanes,(x&1)!==0?o===x0?Ec++:(Ec=0,x0=o):Ec=0,so(),null}function Ia(){if(fo!==null){var o=kv(sf),a=Tr.transition,l=vt;try{if(Tr.transition=null,vt=16>o?16:o,fo===null)var p=!1;else{if(o=fo,fo=null,sf=0,(xt&6)!==0)throw Error(n(331));var y=xt;for(xt|=4,Be=o.current;Be!==null;){var x=Be,C=x.child;if((Be.flags&16)!==0){var $=x.deletions;if($!==null){for(var Y=0;Y<$.length;Y++){var oe=$[Y];for(Be=oe;Be!==null;){var xe=Be;switch(xe.tag){case 0:case 11:case 15:mc(8,xe,x)}var _e=xe.child;if(_e!==null)_e.return=xe,Be=_e;else for(;Be!==null;){xe=Be;var be=xe.sibling,Me=xe.return;if(vS(xe),xe===oe){Be=null;break}if(be!==null){be.return=Me,Be=be;break}Be=Me}}}var Ue=x.alternate;if(Ue!==null){var je=Ue.child;if(je!==null){Ue.child=null;do{var tn=je.sibling;je.sibling=null,je=tn}while(je!==null)}}Be=x}}if((x.subtreeFlags&2064)!==0&&C!==null)C.return=x,Be=C;else e:for(;Be!==null;){if(x=Be,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:mc(9,x,x.return)}var te=x.sibling;if(te!==null){te.return=x.return,Be=te;break e}Be=x.return}}var K=o.current;for(Be=K;Be!==null;){C=Be;var ie=C.child;if((C.subtreeFlags&2064)!==0&&ie!==null)ie.return=C,Be=ie;else e:for(C=K;Be!==null;){if($=Be,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:ef(9,$)}}catch(He){Qt($,$.return,He)}if($===C){Be=null;break e}var Ce=$.sibling;if(Ce!==null){Ce.return=$.return,Be=Ce;break e}Be=$.return}}if(xt=y,so(),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(Zo,o)}catch(He){}p=!0}return p}finally{vt=l,Tr.transition=a}}return!1}function jS(o,a,l){a=Aa(l,a),a=iS(o,a,1),o=uo(o,a,1),a=Bn(),o!==null&&($u(o,1,a),Jn(o,a))}function Qt(o,a,l){if(o.tag===3)jS(o,o,l);else for(;a!==null;){if(a.tag===3){jS(a,o,l);break}else if(a.tag===1){var p=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(lo===null||!lo.has(p))){o=Aa(l,o),o=oS(a,o,1),a=uo(a,o,1),o=Bn(),a!==null&&($u(a,1,o),Jn(a,o));break}}a=a.return}}function Nz(o,a,l){var p=o.pingCache;p!==null&&p.delete(a),a=Bn(),o.pingedLanes|=o.suspendedLanes&l,yn===o&&(Tn&l)===l&&(cn===4||cn===3&&(Tn&130023424)===Tn&&500>at()-b0?ls(o,0):E0|=l),Jn(o,a)}function HS(o,a){a===0&&((o.mode&1)===0?a=1:(a=md,md<<=1,(md&130023424)===0&&(md=4194304)));var l=Bn();o=ki(o,a),o!==null&&($u(o,a,l),Jn(o,l))}function Iz(o){var a=o.memoizedState,l=0;a!==null&&(l=a.retryLane),HS(o,l)}function Oz(o,a){var l=0;switch(o.tag){case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(l=y.retryLane);break;case 19:p=o.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(a),HS(o,l)}var $S;$S=function(o,a,l){if(o!==null)if(o.memoizedProps!==a.pendingProps||Gn.current)Kn=!0;else{if((o.lanes&l)===0&&(a.flags&128)===0)return Kn=!1,Ez(o,a,l);Kn=(o.flags&131072)!==0}else Kn=!1,$t&&(a.flags&1048576)!==0&&x2(a,Fd,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Jd(o,a),o=a.pendingProps;var y=Ea(a,In.current);va(a,l),y=Kg(null,a,p,o,y,l);var x=Qg();return a.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Xn(p)?(x=!0,Ld(a)):x=!1,a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,zg(a),y.updater=Kd,a.stateNode=y,y._reactInternals=a,r0(a,p,o,l),a=a0(null,a,p,!0,x,l)):(a.tag=0,$t&&x&&Rg(a),Fn(null,a,y,l),a=a.child),a;case 16:p=a.elementType;e:{switch(Jd(o,a),o=a.pendingProps,y=p._init,p=y(p._payload),a.type=p,y=a.tag=Rz(p),o=Fr(p,o),y){case 0:a=s0(null,a,p,o,l);break e;case 1:a=hS(null,a,p,o,l);break e;case 11:a=cS(null,a,p,o,l);break e;case 14:a=lS(null,a,p,Fr(p.type,o),l);break e}throw Error(n(306,p,""))}return a;case 0:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),s0(o,a,p,y,l);case 1:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),hS(o,a,p,y,l);case 3:e:{if(mS(a),o===null)throw Error(n(387));p=a.pendingProps,x=a.memoizedState,y=x.element,I2(o,a),zd(a,p,null,l);var C=a.memoizedState;if(p=C.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){y=Aa(Error(n(423)),a),a=gS(o,a,p,l,y);break e}else if(p!==y){y=Aa(Error(n(424)),a),a=gS(o,a,p,l,y);break e}else for(lr=ro(a.stateNode.containerInfo.firstChild),cr=a,$t=!0,Mr=null,l=C2(a,null,p,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xa(),p===y){a=Ni(o,a,l);break e}Fn(o,a,p,l)}a=a.child}return a;case 5:return R2(a),o===null&&Mg(a),p=a.type,y=a.pendingProps,x=o!==null?o.memoizedProps:null,C=y.children,kg(p,y)?C=null:x!==null&&kg(p,x)&&(a.flags|=32),pS(o,a),Fn(o,a,C,l),a.child;case 6:return o===null&&Mg(a),null;case 13:return yS(o,a,l);case 4:return Vg(a,a.stateNode.containerInfo),p=a.pendingProps,o===null?a.child=Ta(a,null,p,l):Fn(o,a,p,l),a.child;case 11:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),cS(o,a,p,y,l);case 7:return Fn(o,a,a.pendingProps,l),a.child;case 8:return Fn(o,a,a.pendingProps.children,l),a.child;case 12:return Fn(o,a,a.pendingProps.children,l),a.child;case 10:e:{if(p=a.type._context,y=a.pendingProps,x=a.memoizedProps,C=y.value,Rt(jd,p._currentValue),p._currentValue=C,x!==null)if(Dr(x.value,C)){if(x.children===y.children&&!Gn.current){a=Ni(o,a,l);break e}}else for(x=a.child,x!==null&&(x.return=a);x!==null;){var $=x.dependencies;if($!==null){C=x.child;for(var Y=$.firstContext;Y!==null;){if(Y.context===p){if(x.tag===1){Y=Ci(-1,l&-l),Y.tag=2;var oe=x.updateQueue;if(oe!==null){oe=oe.shared;var xe=oe.pending;xe===null?Y.next=Y:(Y.next=xe.next,xe.next=Y),oe.pending=Y}}x.lanes|=l,Y=x.alternate,Y!==null&&(Y.lanes|=l),Hg(x.return,l,a),$.lanes|=l;break}Y=Y.next}}else if(x.tag===10)C=x.type===a.type?null:x.child;else if(x.tag===18){if(C=x.return,C===null)throw Error(n(341));C.lanes|=l,$=C.alternate,$!==null&&($.lanes|=l),Hg(C,l,a),C=x.sibling}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===a){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}Fn(o,a,y.children,l),a=a.child}return a;case 9:return y=a.type,p=a.pendingProps.children,va(a,l),y=wr(y),p=p(y),a.flags|=1,Fn(o,a,p,l),a.child;case 14:return p=a.type,y=Fr(p,a.pendingProps),y=Fr(p.type,y),lS(o,a,p,y,l);case 15:return dS(o,a,a.type,a.pendingProps,l);case 17:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),Jd(o,a),a.tag=1,Xn(p)?(o=!0,Ld(a)):o=!1,va(a,l),nS(a,p,y),r0(a,p,y,l),a0(null,a,p,!0,o,l);case 19:return bS(o,a,l);case 22:return fS(o,a,l)}throw Error(n(156,a.tag))};function zS(o,a){return dt(o,a)}function Pz(o,a,l,p){this.tag=o,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _r(o,a,l,p){return new Pz(o,a,l,p)}function k0(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Rz(o){if(typeof o=="function")return k0(o)?1:0;if(o!=null){if(o=o.$$typeof,o===Q)return 11;if(o===ue)return 14}return 2}function mo(o,a){var l=o.alternate;return l===null?(l=_r(o.tag,a,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=a,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&14680064,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,a=o.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l}function lf(o,a,l,p,y,x){var C=2;if(p=o,typeof o=="function")k0(o)&&(C=1);else if(typeof o=="string")C=5;else e:switch(o){case G:return fs(l.children,y,x,a);case W:C=8,y|=8;break;case re:return o=_r(12,l,a,y|2),o.elementType=re,o.lanes=x,o;case me:return o=_r(13,l,a,y),o.elementType=me,o.lanes=x,o;case V:return o=_r(19,l,a,y),o.elementType=V,o.lanes=x,o;case ae:return df(l,y,x,a);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:C=10;break e;case ee:C=9;break e;case Q:C=11;break e;case ue:C=14;break e;case fe:C=16,p=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return a=_r(C,l,a,y),a.elementType=o,a.type=p,a.lanes=x,a}function fs(o,a,l,p){return o=_r(7,o,p,a),o.lanes=l,o}function df(o,a,l,p){return o=_r(22,o,p,a),o.elementType=ae,o.lanes=l,o.stateNode={isHidden:!1},o}function C0(o,a,l){return o=_r(6,o,null,a),o.lanes=l,o}function N0(o,a,l){return a=_r(4,o.children!==null?o.children:[],o.key,a),a.lanes=l,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}function Lz(o,a,l,p,y){this.tag=a,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ng(0),this.expirationTimes=ng(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ng(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function I0(o,a,l,p,y,x,C,$,Y){return o=new Lz(o,a,l,$,Y),a===1?(a=1,x===!0&&(a|=8)):a=0,x=_r(3,null,null,a),o.current=x,x.stateNode=o,x.memoizedState={element:p,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},zg(x),o}function Dz(o,a,l){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:p==null?null:""+p,children:o,containerInfo:a,implementation:l}}function VS(o){if(!o)return oo;o=o._reactInternals;e:{if(Ee(o)!==o||o.tag!==1)throw Error(n(170));var a=o;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(Xn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(n(171))}if(o.tag===1){var l=o.type;if(Xn(l))return E2(o,l,a)}return a}function qS(o,a,l,p,y,x,C,$,Y){return o=I0(l,p,!0,o,y,x,C,$,Y),o.context=VS(null),l=o.current,p=Bn(),y=po(l),x=Ci(p,y),x.callback=a!=null?a:null,uo(l,x,y),o.current.lanes=y,$u(o,y,p),Jn(o,p),o}function ff(o,a,l,p){var y=a.current,x=Bn(),C=po(y);return l=VS(l),a.context===null?a.context=l:a.pendingContext=l,a=Ci(x,C),a.payload={element:o},p=p===void 0?null:p,p!==null&&(a.callback=p),o=uo(y,a,C),o!==null&&(jr(o,y,C,x),$d(o,y,C)),C}function pf(o){return o=o.current,o.child?(o.child.tag===5,o.child.stateNode):null}function WS(o,a){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<a?l:a}}function O0(o,a){WS(o,a),(o=o.alternate)&&WS(o,a)}function Mz(){return null}var YS=typeof reportError=="function"?reportError:function(o){console.error(o)};function P0(o){this._internalRoot=o}hf.prototype.render=P0.prototype.render=function(o){var a=this._internalRoot;if(a===null)throw Error(n(409));ff(o,a,null,null)},hf.prototype.unmount=P0.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var a=o.containerInfo;cs(function(){ff(null,o,null,null)}),a[_i]=null}};function hf(o){this._internalRoot=o}hf.prototype.unstable_scheduleHydration=function(o){if(o){var a=Iv();o={blockedOn:null,target:o,priority:a};for(var l=0;l<eo.length&&a!==0&&a<eo[l].priority;l++);eo.splice(l,0,o),l===0&&Rv(o)}};function R0(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function mf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function GS(){}function Fz(o,a,l,p,y){if(y){if(typeof p=="function"){var x=p;p=function(){var oe=pf(C);x.call(oe)}}var C=qS(a,p,o,0,null,!1,!1,"",GS);return o._reactRootContainer=C,o[_i]=C.current,nc(o.nodeType===8?o.parentNode:o),cs(),C}for(;y=o.lastChild;)o.removeChild(y);if(typeof p=="function"){var $=p;p=function(){var oe=pf(Y);$.call(oe)}}var Y=I0(o,0,!1,null,null,!1,!1,"",GS);return o._reactRootContainer=Y,o[_i]=Y.current,nc(o.nodeType===8?o.parentNode:o),cs(function(){ff(a,Y,l,p)}),Y}function gf(o,a,l,p,y){var x=l._reactRootContainer;if(x){var C=x;if(typeof y=="function"){var $=y;y=function(){var Y=pf(C);$.call(Y)}}ff(a,C,o,y)}else C=Fz(l,a,o,y,p);return pf(C)}Cv=function(o){switch(o.tag){case 3:var a=o.stateNode;if(a.current.memoizedState.isDehydrated){var l=Hu(a.pendingLanes);l!==0&&(rg(a,l|1),Jn(a,at()),(xt&6)===0&&(Na=at()+500,so()))}break;case 13:cs(function(){var p=ki(o,1);if(p!==null){var y=Bn();jr(p,o,1,y)}}),O0(o,1)}},ig=function(o){if(o.tag===13){var a=ki(o,134217728);if(a!==null){var l=Bn();jr(a,o,134217728,l)}O0(o,134217728)}},Nv=function(o){if(o.tag===13){var a=po(o),l=ki(o,a);if(l!==null){var p=Bn();jr(l,o,a,p)}O0(o,a)}},Iv=function(){return vt},Ov=function(o,a){var l=vt;try{return vt=o,a()}finally{vt=l}},Qo=function(o,a,l){switch(a){case"input":if(Ve(o,l),a=l.name,l.type==="radio"&&a!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<l.length;a++){var p=l[a];if(p!==o&&p.form===o.form){var y=Pd(p);if(!y)throw Error(n(90));ct(p),Ve(p,y)}}}break;case"textarea":sr(o,l);break;case"select":a=l.value,a!=null&&jt(o,!!l.multiple,a,!1)}},yr=v0,Wi=cs;var Bz={usingClientEntryPoint:!1,Events:[oc,ga,Pd,Mu,Fu,v0]},bc={findFiberByHostInstance:ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Uz={bundleType:bc.bundleType,version:bc.version,rendererPackageName:bc.rendererPackageName,rendererConfig:bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=$e(o),o===null?null:o.stateNode},findFiberByHostInstance:bc.findFiberByHostInstance||Mz,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 yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yf.isDisabled&&yf.supportsFiber)try{Zo=yf.inject(Uz),ar=yf}catch(o){}}return Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Bz,Hn.createPortal=function(o,a){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!R0(a))throw Error(n(200));return Dz(o,a,null,l)},Hn.createRoot=function(o,a){if(!R0(o))throw Error(n(299));var l=!1,p="",y=YS;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),a=I0(o,1,!1,null,null,l,!1,p,y),o[_i]=a.current,nc(o.nodeType===8?o.parentNode:o),new P0(a)},Hn.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var a=o._reactInternals;if(a===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=$e(a),o=o===null?null:o.stateNode,o},Hn.flushSync=function(o){return cs(o)},Hn.hydrate=function(o,a,l){if(!mf(a))throw Error(n(200));return gf(null,o,a,!0,l)},Hn.hydrateRoot=function(o,a,l){if(!R0(o))throw Error(n(405));var p=l!=null&&l.hydratedSources||null,y=!1,x="",C=YS;if(l!=null&&(l.unstable_strictMode===!0&&(y=!0),l.identifierPrefix!==void 0&&(x=l.identifierPrefix),l.onRecoverableError!==void 0&&(C=l.onRecoverableError)),a=qS(a,null,o,1,l!=null?l:null,y,!1,x,C),o[_i]=a.current,nc(o),p)for(o=0;o<p.length;o++)l=p[o],y=l._getVersion,y=y(l._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[l,y]:a.mutableSourceEagerHydrationData.push(l,y);return new hf(a)},Hn.render=function(o,a,l){if(!mf(a))throw Error(n(200));return gf(null,o,a,!1,l)},Hn.unmountComponentAtNode=function(o){if(!mf(o))throw Error(n(40));return o._reactRootContainer?(cs(function(){gf(null,null,o,!1,function(){o._reactRootContainer=null,o[_i]=null})}),!0):!1},Hn.unstable_batchedUpdates=v0,Hn.unstable_renderSubtreeIntoContainer=function(o,a,l,p){if(!mf(l))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return gf(o,a,l,!1,p)},Hn.version="18.3.1-next-f1338f8080-20240426",Hn}var kE;function CE(){if(kE)return Dp.exports;kE=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(),Dp.exports=tO(),Dp.exports}var Ns=CE();function NE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=NE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=NE(e))&&(r&&(r+=" "),r+=t);return r}const nO=()=>document.querySelector(`:is(input, textarea)[name="${N}-user-input"]:not(:disabled)`),Bp=()=>{var e;return(e=nO())!=null?e:document.querySelector(`.${N}-dialog-content, .${N}-modal-content`)},rO=()=>{var e;return(e=Bp())==null?void 0:e.focus({preventScroll:!0})},ol=()=>{const e=()=>{const n=document.querySelector(`.${N}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var IE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},OE=Eo.createContext&&Eo.createContext(IE),iO=["attr","size","title"];function oO(e,t){if(e==null)return{};var n=sO(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sO(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 sl(){return sl=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},sl.apply(this,arguments)}function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){aO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aO(e,t,n){return t=uO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uO(e){var t=cO(e,"string");return typeof t=="symbol"?t:t+""}function cO(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 RE(e){return e&&e.map((t,n)=>Eo.createElement(t.tag,al({key:n},t.attr),RE(t.child)))}function ut(e){return t=>Eo.createElement(lO,sl({attr:al({},e.attr)},t),RE(e.child))}function lO(e){var t=n=>{var{attr:r,size:i,title:s}=e,u=oO(e,iO),c=i||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Eo.createElement("svg",sl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:al(al({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&Eo.createElement("title",null,s),e.children)};return OE!==void 0?Eo.createElement(OE.Consumer,null,n=>t(n)):t(IE)}function dO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function LE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function fO(e){return ut({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 kr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:i,title:s,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:D(e,`${N}-icon-button`),type:r,"aria-label":i,title:s,onClick:c,disabled:u,children:t?w.jsx("img",{className:D(`${N}-icon-image`),src:t,alt:i,loading:"lazy"}):n}),pO="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",hO=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:i}=st(),s=i==="messaging",c=r||(s?"Open Commerce Client":"Open Copilot"),d=s?w.jsx(fO,{className:D(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||pO,alt:"Copilot",className:D(t,`${N}-minimized-icon-img`)});return w.jsx(kr,{className:D(t,`${N}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},mO=()=>{const{globalClassName:e,themeVariables:t,layoutPreset:n}=st(),r=()=>{wo(!1),zr(!0),setTimeout(rO)};return Ns.createPortal(w.jsx("div",{className:D(e,`${N}-minimized-container`,`${N}-layout-${n}`),style:t,children:w.jsx(hO,{onClick:r})}),document.body)};function gO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function DE(e){return ut({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 yO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function Up(e){return ut({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 EO(e){return ut({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 bO(e){return ut({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 jp(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function wO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function xO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function ME(e){return ut({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 FE(e){return ut({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 TO(e){return ut({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 _O(e){return ut({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 vO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function SO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function AO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function kO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"},child:[]}]})(e)}function CO(e){return ut({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)}function BE(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}function NO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function UE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function jE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}function IO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"16.5",y1:"9.4",x2:"7.5",y2:"4.21"},child:[]},{tag:"path",attr:{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"},child:[]},{tag:"polyline",attr:{points:"3.27 6.96 12 12.01 20.73 6.96"},child:[]},{tag:"line",attr:{x1:"12",y1:"22.08",x2:"12",y2:"12"},child:[]}]})(e)}function HE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function OO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function zt(){const e=k.useContext(jy);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const PO=e=>({[`${er}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${er}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${er}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${er}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${er}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${er}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),RO=(e,t,n)=>e.size>n?{ok:!1,reason:"oversize"}:t.includes(e.type)?{ok:!0}:{ok:!1,reason:"type"},LO=({allowedMime:e=I1,maxBytes:t=Vf,onReject:n}={})=>{const[r,i]=k.useState(null),s=k.useCallback(c=>{const d=c&&"length"in c?c[0]:null;if(!d)return;const f=RO(d,e,t);if(!f.ok){n==null||n(f.reason);return}i(d)},[e,t,n]),u=k.useCallback(()=>i(null),[]);return{file:r,attach:s,clear:u}},Hp=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:D(e,`${N}-close-button`),disabled:r,onClick:n,type:"button",children:w.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),DO=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const i=e.name||"",[s,u]=k.useState("");return k.useEffect(()=>{const c=URL.createObjectURL(e);return u(c),()=>URL.revokeObjectURL(c)},[e]),w.jsxs("div",{className:D(n,`cim-${t}-component`,`${N}-image-file-preview`),children:[w.jsx("img",{className:D(n,`cim-${t}-component`,`${N}-image-preview`),src:s,alt:`${i} preview`,loading:"lazy"}),w.jsx("span",{className:D(n,`cim-${t}-component`,`${N}-image-file-name`),title:i,children:i}),w.jsx(Hp,{className:D(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})},MO=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:i,className:s,icon:u=w.jsx(CO,{}),onFiles:c})=>{const d=k.useRef(null),f=k.useId(),h=r!=null?r:f,m=k.useCallback(()=>{var b;return(b=d.current)==null?void 0:b.click()},[]),E=k.useCallback(b=>{const T=b.target;c(T.files),T.value=""},[c]);return w.jsxs("button",{type:"button",className:D(i,s,`cim-${e}-component`,n&&"disabled",`${N}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[w.jsx("span",{className:D(i,s,`cim-${e}-component`,n&&"disabled",`${N}-image-upload-label`),"aria-hidden":"true",children:u}),w.jsx("input",{ref:d,className:D(i,s,`cim-${e}-component`,`${N}-file-input`),type:"file",id:h,accept:t,name:`${N}-file-input`,disabled:n,onInput:E})]})},$p=({className:e,children:t,type:n,disabled:r=!1,onClick:i,"aria-label":s})=>w.jsx("button",{"aria-label":s,className:D(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:i,children:t}),FO=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?jp:Up;return n?w.jsx("img",{className:D(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(r,{size:"16px"})},BO=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:i})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?jp:Up;return w.jsx(kr,{className:D(e,n,`cim-${r}-component`,`${N}-search-button-icon`),type:"submit",disabled:i,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Search Copilot",icon:t!=null&&t.buttonIconUrl?null:w.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const s=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs($p,{className:D(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:i,children:[s&&w.jsx(FO,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function mV(){}function gV(){}function $E(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const u=n.slice(i,r).trim();(u||!s)&&t.push(u),i=r+1,r=n.indexOf(",",i)}return t}function zE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const UO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HO={};function VE(e,t){return(HO.jsx?jO:UO).test(e)}const $O=/[ \t\n\f\r]/g;function zO(e){return typeof e=="object"?e.type==="text"?qE(e.value):!1:qE(e)}function qE(e){return e.replace($O,"")===""}class Ja{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ja.prototype.normal={},Ja.prototype.property={},Ja.prototype.space=void 0;function WE(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ja(n,r,t)}function Za(e){return e.toLowerCase()}class $n{constructor(t,n){this.attribute=n,this.property=t}}$n.prototype.attribute="",$n.prototype.booleanish=!1,$n.prototype.boolean=!1,$n.prototype.commaOrSpaceSeparated=!1,$n.prototype.commaSeparated=!1,$n.prototype.defined=!1,$n.prototype.mustUseProperty=!1,$n.prototype.number=!1,$n.prototype.overloadedBoolean=!1,$n.prototype.property="",$n.prototype.spaceSeparated=!1,$n.prototype.space=void 0;let VO=0;const ot=Oo(),rn=Oo(),zp=Oo(),Ae=Oo(),Ct=Oo(),Io=Oo(),rr=Oo();function Oo(){return bf(2,++VO)}const Vp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ot,booleanish:rn,commaOrSpaceSeparated:rr,commaSeparated:Io,number:Ae,overloadedBoolean:zp,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),qp=Object.keys(Vp);class Wp extends $n{constructor(t,n,r,i){let s=-1;if(super(t,n),YE(this,"space",i),typeof r=="number")for(;++s<qp.length;){const u=qp[s];YE(this,qp[s],(r&Vp[u])===Vp[u])}}}Wp.prototype.defined=!0;function YE(e,t,n){n&&(e[t]=n)}function Is(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Wp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Za(r)]=r,n[Za(s.attribute)]=r}return new Ja(t,n,e.space)}const GE=Is({properties:{ariaActiveDescendant:null,ariaAtomic:rn,ariaAutoComplete:null,ariaBusy:rn,ariaChecked:rn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:rn,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:rn,ariaFlowTo:Ct,ariaGrabbed:rn,ariaHasPopup:null,ariaHidden:rn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:Ae,ariaLive:null,ariaModal:rn,ariaMultiLine:rn,ariaMultiSelectable:rn,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:rn,ariaReadOnly:rn,ariaRelevant:null,ariaRequired:rn,ariaRoleDescription:Ct,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:rn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function XE(e,t){return t in e?e[t]:t}function KE(e,t){return XE(e,t.toLowerCase())}const qO=Is({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:ot,allowPaymentRequest:ot,allowUserMedia:ot,alpha:ot,alt:null,as:null,async:ot,autoCapitalize:null,autoComplete:Ct,autoFocus:ot,autoPlay:ot,blocking:Ct,capture:null,charSet:null,checked:ot,cite:null,className:Ct,closedBy:null,colorSpace:null,cols:Ae,colSpan:Ae,command:null,commandFor:null,content:null,contentEditable:rn,controls:ot,controlsList:Ct,coords:Ae|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ot,defer:ot,dir:null,dirName:null,disabled:ot,download:zp,draggable:rn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ot,formTarget:null,headers:Ct,height:Ae,hidden:zp,high:Ae,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:ot,inputMode:null,integrity:null,is:null,isMap:ot,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:ot,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ot,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:ot,muted:ot,name:null,nonce:null,noModule:ot,noValidate:ot,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:ot,optimum:Ae,pattern:null,ping:Ct,placeholder:null,playsInline:ot,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ot,referrerPolicy:null,rel:Ct,required:ot,reversed:ot,rows:Ae,rowSpan:Ae,sandbox:Ct,scope:null,scoped:ot,seamless:ot,selected:ot,shadowRootClonable:ot,shadowRootCustomElementRegistry:ot,shadowRootDelegatesFocus:ot,shadowRootMode:null,shadowRootSerializable:ot,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:rn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:ot,useMap:null,value:rn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ot,declare:ot,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:ot,noHref:ot,noShade:ot,noWrap:ot,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:rn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ot,disablePictureInPicture:ot,disableRemotePlayback:ot,exportParts:Io,part:Ct,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:KE}),WO=Is({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:rr,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Ct,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:ot,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:rr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rr,rev:rr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rr,requiredFeatures:rr,requiredFonts:rr,requiredFormats:rr,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:rr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rr,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:XE}),QE=Is({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()}}),JE=Is({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:KE}),ZE=Is({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YO={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"},GO=/[A-Z]/g,eb=/-[a-z]/g,XO=/^data[-\w.:]+$/i;function ul(e,t){const n=Za(t);let r=t,i=$n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(eb,QO);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!eb.test(s)){let u=s.replace(GO,KO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}i=Wp}return new i(r,t)}function KO(e){return"-"+e.toLowerCase()}function QO(e){return e.charAt(1).toUpperCase()}const eu=WE([GE,qO,QE,JE,ZE],"html"),Li=WE([GE,WO,QE,JE,ZE],"svg");function tb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function nb(e){return e.join(" ").trim()}var Os={},Yp,rb;function JO(){if(rb)return Yp;rb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
23
+ `+x.stack}return{value:o,source:a,stack:y,digest:null}}function i0(o,a,l){return{value:o,source:null,stack:l!=null?l:null,digest:a!=null?a:null}}function o0(o,a){try{console.error(a.value)}catch(l){setTimeout(function(){throw l})}}var hz=typeof WeakMap=="function"?WeakMap:Map;function iS(o,a,l){l=Ci(-1,l),l.tag=3,l.payload={element:null};var p=a.value;return l.callback=function(){rf||(rf=!0,w0=p),o0(o,a)},l}function oS(o,a,l){l=Ci(-1,l),l.tag=3;var p=o.type.getDerivedStateFromError;if(typeof p=="function"){var y=a.value;l.payload=function(){return p(y)},l.callback=function(){o0(o,a)}}var x=o.stateNode;return x!==null&&typeof x.componentDidCatch=="function"&&(l.callback=function(){o0(o,a),typeof p!="function"&&(lo===null?lo=new Set([this]):lo.add(this));var C=a.stack;this.componentDidCatch(a.value,{componentStack:C!==null?C:""})}),l}function sS(o,a,l){var p=o.pingCache;if(p===null){p=o.pingCache=new hz;var y=new Set;p.set(a,y)}else y=p.get(a),y===void 0&&(y=new Set,p.set(a,y));y.has(l)||(y.add(l),o=Cz.bind(null,o,a,l),a.then(o,o))}function aS(o){do{var a;if((a=o.tag===13)&&(a=o.memoizedState,a=a!==null?a.dehydrated!==null:!0),a)return o;o=o.return}while(o!==null);return null}function uS(o,a,l,p,y){return(o.mode&1)===0?(o===a?o.flags|=65536:(o.flags|=128,l.flags|=131072,l.flags&=-52805,l.tag===1&&(l.alternate===null?l.tag=17:(a=Ci(-1,1),a.tag=2,uo(l,a,1))),l.lanes|=1),o):(o.flags|=65536,o.lanes=y,o)}var mz=U.ReactCurrentOwner,Kn=!1;function Fn(o,a,l,p){a.child=o===null?C2(a,null,l,p):Ta(a,o.child,l,p)}function cS(o,a,l,p,y){l=l.render;var x=a.ref;return va(a,y),p=Kg(o,a,l,p,x,y),l=Qg(),o!==null&&!Kn?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,Ni(o,a,y)):($t&&l&&Rg(a),a.flags|=1,Fn(o,a,p,y),a.child)}function lS(o,a,l,p,y){if(o===null){var x=l.type;return typeof x=="function"&&!k0(x)&&x.defaultProps===void 0&&l.compare===null&&l.defaultProps===void 0?(a.tag=15,a.type=x,dS(o,a,x,p,y)):(o=lf(l.type,null,p,a,a.mode,y),o.ref=a.ref,o.return=a,a.child=o)}if(x=o.child,(o.lanes&y)===0){var C=x.memoizedProps;if(l=l.compare,l=l!==null?l:Zu,l(C,p)&&o.ref===a.ref)return Ni(o,a,y)}return a.flags|=1,o=mo(x,p),o.ref=a.ref,o.return=a,a.child=o}function dS(o,a,l,p,y){if(o!==null){var x=o.memoizedProps;if(Zu(x,p)&&o.ref===a.ref)if(Kn=!1,a.pendingProps=p=x,(o.lanes&y)!==0)(o.flags&131072)!==0&&(Kn=!0);else return a.lanes=o.lanes,Ni(o,a,y)}return s0(o,a,l,p,y)}function fS(o,a,l){var p=a.pendingProps,y=p.children,x=o!==null?o.memoizedState:null;if(p.mode==="hidden")if((a.mode&1)===0)a.memoizedState={baseLanes:0,cachePool:null,transitions:null},Rt(Ca,dr),dr|=l;else{if((l&1073741824)===0)return o=x!==null?x.baseLanes|l:l,a.lanes=a.childLanes=1073741824,a.memoizedState={baseLanes:o,cachePool:null,transitions:null},a.updateQueue=null,Rt(Ca,dr),dr|=o,null;a.memoizedState={baseLanes:0,cachePool:null,transitions:null},p=x!==null?x.baseLanes:l,Rt(Ca,dr),dr|=p}else x!==null?(p=x.baseLanes|l,a.memoizedState=null):p=l,Rt(Ca,dr),dr|=p;return Fn(o,a,y,l),a.child}function pS(o,a){var l=a.ref;(o===null&&l!==null||o!==null&&o.ref!==l)&&(a.flags|=512,a.flags|=2097152)}function s0(o,a,l,p,y){var x=Xn(l)?ns:In.current;return x=Ea(a,x),va(a,y),l=Kg(o,a,l,p,x,y),p=Qg(),o!==null&&!Kn?(a.updateQueue=o.updateQueue,a.flags&=-2053,o.lanes&=~y,Ni(o,a,y)):($t&&p&&Rg(a),a.flags|=1,Fn(o,a,l,y),a.child)}function hS(o,a,l,p,y){if(Xn(l)){var x=!0;Ld(a)}else x=!1;if(va(a,y),a.stateNode===null)Jd(o,a),nS(a,l,p),r0(a,l,p,y),p=!0;else if(o===null){var C=a.stateNode,$=a.memoizedProps;C.props=$;var Y=C.context,oe=l.contextType;typeof oe=="object"&&oe!==null?oe=wr(oe):(oe=Xn(l)?ns:In.current,oe=Ea(a,oe));var xe=l.getDerivedStateFromProps,_e=typeof xe=="function"||typeof C.getSnapshotBeforeUpdate=="function";_e||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||($!==p||Y!==oe)&&rS(a,C,p,oe),ao=!1;var be=a.memoizedState;C.state=be,zd(a,p,C,y),Y=a.memoizedState,$!==p||be!==Y||Gn.current||ao?(typeof xe=="function"&&(n0(a,l,xe,p),Y=a.memoizedState),($=ao||tS(a,l,$,p,be,Y,oe))?(_e||typeof C.UNSAFE_componentWillMount!="function"&&typeof C.componentWillMount!="function"||(typeof C.componentWillMount=="function"&&C.componentWillMount(),typeof C.UNSAFE_componentWillMount=="function"&&C.UNSAFE_componentWillMount()),typeof C.componentDidMount=="function"&&(a.flags|=4194308)):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),a.memoizedProps=p,a.memoizedState=Y),C.props=p,C.state=Y,C.context=oe,p=$):(typeof C.componentDidMount=="function"&&(a.flags|=4194308),p=!1)}else{C=a.stateNode,I2(o,a),$=a.memoizedProps,oe=a.type===a.elementType?$:Fr(a.type,$),C.props=oe,_e=a.pendingProps,be=C.context,Y=l.contextType,typeof Y=="object"&&Y!==null?Y=wr(Y):(Y=Xn(l)?ns:In.current,Y=Ea(a,Y));var Me=l.getDerivedStateFromProps;(xe=typeof Me=="function"||typeof C.getSnapshotBeforeUpdate=="function")||typeof C.UNSAFE_componentWillReceiveProps!="function"&&typeof C.componentWillReceiveProps!="function"||($!==_e||be!==Y)&&rS(a,C,p,Y),ao=!1,be=a.memoizedState,C.state=be,zd(a,p,C,y);var Ue=a.memoizedState;$!==_e||be!==Ue||Gn.current||ao?(typeof Me=="function"&&(n0(a,l,Me,p),Ue=a.memoizedState),(oe=ao||tS(a,l,oe,p,be,Ue,Y)||!1)?(xe||typeof C.UNSAFE_componentWillUpdate!="function"&&typeof C.componentWillUpdate!="function"||(typeof C.componentWillUpdate=="function"&&C.componentWillUpdate(p,Ue,Y),typeof C.UNSAFE_componentWillUpdate=="function"&&C.UNSAFE_componentWillUpdate(p,Ue,Y)),typeof C.componentDidUpdate=="function"&&(a.flags|=4),typeof C.getSnapshotBeforeUpdate=="function"&&(a.flags|=1024)):(typeof C.componentDidUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=1024),a.memoizedProps=p,a.memoizedState=Ue),C.props=p,C.state=Ue,C.context=Y,p=oe):(typeof C.componentDidUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=4),typeof C.getSnapshotBeforeUpdate!="function"||$===o.memoizedProps&&be===o.memoizedState||(a.flags|=1024),p=!1)}return a0(o,a,l,p,x,y)}function a0(o,a,l,p,y,x){pS(o,a);var C=(a.flags&128)!==0;if(!p&&!C)return y&&b2(a,l,!1),Ni(o,a,x);p=a.stateNode,mz.current=a;var $=C&&typeof l.getDerivedStateFromError!="function"?null:p.render();return a.flags|=1,o!==null&&C?(a.child=Ta(a,o.child,null,x),a.child=Ta(a,null,$,x)):Fn(o,a,$,x),a.memoizedState=p.state,y&&b2(a,l,!0),a.child}function mS(o){var a=o.stateNode;a.pendingContext?y2(o,a.pendingContext,a.pendingContext!==a.context):a.context&&y2(o,a.context,!1),Vg(o,a.containerInfo)}function gS(o,a,l,p,y){return xa(),Fg(y),a.flags|=256,Fn(o,a,l,p),a.child}var u0={dehydrated:null,treeContext:null,retryLane:0};function c0(o){return{baseLanes:o,cachePool:null,transitions:null}}function yS(o,a,l){var p=a.pendingProps,y=Vt.current,x=!1,C=(a.flags&128)!==0,$;if(($=C)||($=o!==null&&o.memoizedState===null?!1:(y&2)!==0),$?(x=!0,a.flags&=-129):(o===null||o.memoizedState!==null)&&(y|=1),Rt(Vt,y&1),o===null)return Mg(a),o=a.memoizedState,o!==null&&(o=o.dehydrated,o!==null)?((a.mode&1)===0?a.lanes=1:o.data==="$!"?a.lanes=8:a.lanes=1073741824,null):(C=p.children,o=p.fallback,x?(p=a.mode,x=a.child,C={mode:"hidden",children:C},(p&1)===0&&x!==null?(x.childLanes=0,x.pendingProps=C):x=df(C,p,0,null),o=fs(o,p,l,null),x.return=a,o.return=a,x.sibling=o,a.child=x,a.child.memoizedState=c0(l),a.memoizedState=u0,o):l0(a,C));if(y=o.memoizedState,y!==null&&($=y.dehydrated,$!==null))return gz(o,a,C,p,$,y,l);if(x){x=p.fallback,C=a.mode,y=o.child,$=y.sibling;var Y={mode:"hidden",children:p.children};return(C&1)===0&&a.child!==y?(p=a.child,p.childLanes=0,p.pendingProps=Y,a.deletions=null):(p=mo(y,Y),p.subtreeFlags=y.subtreeFlags&14680064),$!==null?x=mo($,x):(x=fs(x,C,l,null),x.flags|=2),x.return=a,p.return=a,p.sibling=x,a.child=p,p=x,x=a.child,C=o.child.memoizedState,C=C===null?c0(l):{baseLanes:C.baseLanes|l,cachePool:null,transitions:C.transitions},x.memoizedState=C,x.childLanes=o.childLanes&~l,a.memoizedState=u0,p}return x=o.child,o=x.sibling,p=mo(x,{mode:"visible",children:p.children}),(a.mode&1)===0&&(p.lanes=l),p.return=a,p.sibling=null,o!==null&&(l=a.deletions,l===null?(a.deletions=[o],a.flags|=16):l.push(o)),a.child=p,a.memoizedState=null,p}function l0(o,a){return a=df({mode:"visible",children:a},o.mode,0,null),a.return=o,o.child=a}function Qd(o,a,l,p){return p!==null&&Fg(p),Ta(a,o.child,null,l),o=l0(a,a.pendingProps.children),o.flags|=2,a.memoizedState=null,o}function gz(o,a,l,p,y,x,C){if(l)return a.flags&256?(a.flags&=-257,p=i0(Error(n(422))),Qd(o,a,C,p)):a.memoizedState!==null?(a.child=o.child,a.flags|=128,null):(x=p.fallback,y=a.mode,p=df({mode:"visible",children:p.children},y,0,null),x=fs(x,y,C,null),x.flags|=2,p.return=a,x.return=a,p.sibling=x,a.child=p,(a.mode&1)!==0&&Ta(a,o.child,null,C),a.child.memoizedState=c0(C),a.memoizedState=u0,x);if((a.mode&1)===0)return Qd(o,a,C,null);if(y.data==="$!"){if(p=y.nextSibling&&y.nextSibling.dataset,p)var $=p.dgst;return p=$,x=Error(n(419)),p=i0(x,p,void 0),Qd(o,a,C,p)}if($=(C&o.childLanes)!==0,Kn||$){if(p=yn,p!==null){switch(C&-C){case 4:y=2;break;case 16:y=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:y=32;break;case 536870912:y=268435456;break;default:y=0}y=(y&(p.suspendedLanes|C))!==0?0:y,y!==0&&y!==x.retryLane&&(x.retryLane=y,ki(o,y),jr(p,o,y,-1))}return A0(),p=i0(Error(n(421))),Qd(o,a,C,p)}return y.data==="$?"?(a.flags|=128,a.child=o.child,a=Nz.bind(null,o),y._reactRetry=a,null):(o=x.treeContext,lr=ro(y.nextSibling),cr=a,$t=!0,Mr=null,o!==null&&(Er[br++]=Si,Er[br++]=Ai,Er[br++]=rs,Si=o.id,Ai=o.overflow,rs=a),a=l0(a,p.children),a.flags|=4096,a)}function ES(o,a,l){o.lanes|=a;var p=o.alternate;p!==null&&(p.lanes|=a),Hg(o.return,a,l)}function d0(o,a,l,p,y){var x=o.memoizedState;x===null?o.memoizedState={isBackwards:a,rendering:null,renderingStartTime:0,last:p,tail:l,tailMode:y}:(x.isBackwards=a,x.rendering=null,x.renderingStartTime=0,x.last=p,x.tail=l,x.tailMode=y)}function bS(o,a,l){var p=a.pendingProps,y=p.revealOrder,x=p.tail;if(Fn(o,a,p.children,l),p=Vt.current,(p&2)!==0)p=p&1|2,a.flags|=128;else{if(o!==null&&(o.flags&128)!==0)e:for(o=a.child;o!==null;){if(o.tag===13)o.memoizedState!==null&&ES(o,l,a);else if(o.tag===19)ES(o,l,a);else if(o.child!==null){o.child.return=o,o=o.child;continue}if(o===a)break e;for(;o.sibling===null;){if(o.return===null||o.return===a)break e;o=o.return}o.sibling.return=o.return,o=o.sibling}p&=1}if(Rt(Vt,p),(a.mode&1)===0)a.memoizedState=null;else switch(y){case"forwards":for(l=a.child,y=null;l!==null;)o=l.alternate,o!==null&&Vd(o)===null&&(y=l),l=l.sibling;l=y,l===null?(y=a.child,a.child=null):(y=l.sibling,l.sibling=null),d0(a,!1,y,l,x);break;case"backwards":for(l=null,y=a.child,a.child=null;y!==null;){if(o=y.alternate,o!==null&&Vd(o)===null){a.child=y;break}o=y.sibling,y.sibling=l,l=y,y=o}d0(a,!0,l,null,x);break;case"together":d0(a,!1,null,null,void 0);break;default:a.memoizedState=null}return a.child}function Jd(o,a){(a.mode&1)===0&&o!==null&&(o.alternate=null,a.alternate=null,a.flags|=2)}function Ni(o,a,l){if(o!==null&&(a.dependencies=o.dependencies),us|=a.lanes,(l&a.childLanes)===0)return null;if(o!==null&&a.child!==o.child)throw Error(n(153));if(a.child!==null){for(o=a.child,l=mo(o,o.pendingProps),a.child=l,l.return=a;o.sibling!==null;)o=o.sibling,l=l.sibling=mo(o,o.pendingProps),l.return=a;l.sibling=null}return a.child}function yz(o,a,l){switch(a.tag){case 3:mS(a),xa();break;case 5:R2(a);break;case 1:Xn(a.type)&&Ld(a);break;case 4:Vg(a,a.stateNode.containerInfo);break;case 10:var p=a.type._context,y=a.memoizedProps.value;Rt(jd,p._currentValue),p._currentValue=y;break;case 13:if(p=a.memoizedState,p!==null)return p.dehydrated!==null?(Rt(Vt,Vt.current&1),a.flags|=128,null):(l&a.child.childLanes)!==0?yS(o,a,l):(Rt(Vt,Vt.current&1),o=Ni(o,a,l),o!==null?o.sibling:null);Rt(Vt,Vt.current&1);break;case 19:if(p=(l&a.childLanes)!==0,(o.flags&128)!==0){if(p)return bS(o,a,l);a.flags|=128}if(y=a.memoizedState,y!==null&&(y.rendering=null,y.tail=null,y.lastEffect=null),Rt(Vt,Vt.current),p)break;return null;case 22:case 23:return a.lanes=0,fS(o,a,l)}return Ni(o,a,l)}var wS,f0,xS,TS;wS=function(o,a){for(var l=a.child;l!==null;){if(l.tag===5||l.tag===6)o.appendChild(l.stateNode);else if(l.tag!==4&&l.child!==null){l.child.return=l,l=l.child;continue}if(l===a)break;for(;l.sibling===null;){if(l.return===null||l.return===a)return;l=l.return}l.sibling.return=l.return,l=l.sibling}},f0=function(){},xS=function(o,a,l,p){var y=o.memoizedProps;if(y!==p){o=a.stateNode,ss(ai.current);var x=null;switch(l){case"input":y=tt(o,y),p=tt(o,p),x=[];break;case"select":y=O({},y,{value:void 0}),p=O({},p,{value:void 0}),x=[];break;case"textarea":y=At(o,y),p=At(o,p),x=[];break;default:typeof y.onClick!="function"&&typeof p.onClick=="function"&&(o.onclick=Od)}Xt(l,p);var C;l=null;for(oe in y)if(!p.hasOwnProperty(oe)&&y.hasOwnProperty(oe)&&y[oe]!=null)if(oe==="style"){var $=y[oe];for(C in $)$.hasOwnProperty(C)&&(l||(l={}),l[C]="")}else oe!=="dangerouslySetInnerHTML"&&oe!=="children"&&oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&oe!=="autoFocus"&&(i.hasOwnProperty(oe)?x||(x=[]):(x=x||[]).push(oe,null));for(oe in p){var Y=p[oe];if($=y!=null?y[oe]:void 0,p.hasOwnProperty(oe)&&Y!==$&&(Y!=null||$!=null))if(oe==="style")if($){for(C in $)!$.hasOwnProperty(C)||Y&&Y.hasOwnProperty(C)||(l||(l={}),l[C]="");for(C in Y)Y.hasOwnProperty(C)&&$[C]!==Y[C]&&(l||(l={}),l[C]=Y[C])}else l||(x||(x=[]),x.push(oe,l)),l=Y;else oe==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,$=$?$.__html:void 0,Y!=null&&$!==Y&&(x=x||[]).push(oe,Y)):oe==="children"?typeof Y!="string"&&typeof Y!="number"||(x=x||[]).push(oe,""+Y):oe!=="suppressContentEditableWarning"&&oe!=="suppressHydrationWarning"&&(i.hasOwnProperty(oe)?(Y!=null&&oe==="onScroll"&&Mt("scroll",o),x||$===Y||(x=[])):(x=x||[]).push(oe,Y))}l&&(x=x||[]).push("style",l);var oe=x;(a.updateQueue=oe)&&(a.flags|=4)}},TS=function(o,a,l,p){l!==p&&(a.flags|=4)};function hc(o,a){if(!$t)switch(o.tailMode){case"hidden":a=o.tail;for(var l=null;a!==null;)a.alternate!==null&&(l=a),a=a.sibling;l===null?o.tail=null:l.sibling=null;break;case"collapsed":l=o.tail;for(var p=null;l!==null;)l.alternate!==null&&(p=l),l=l.sibling;p===null?a||o.tail===null?o.tail=null:o.tail.sibling=null:p.sibling=null}}function Pn(o){var a=o.alternate!==null&&o.alternate.child===o.child,l=0,p=0;if(a)for(var y=o.child;y!==null;)l|=y.lanes|y.childLanes,p|=y.subtreeFlags&14680064,p|=y.flags&14680064,y.return=o,y=y.sibling;else for(y=o.child;y!==null;)l|=y.lanes|y.childLanes,p|=y.subtreeFlags,p|=y.flags,y.return=o,y=y.sibling;return o.subtreeFlags|=p,o.childLanes=l,a}function Ez(o,a,l){var p=a.pendingProps;switch(Lg(a),a.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Pn(a),null;case 1:return Xn(a.type)&&Rd(),Pn(a),null;case 3:return p=a.stateNode,Sa(),Ft(Gn),Ft(In),Yg(),p.pendingContext&&(p.context=p.pendingContext,p.pendingContext=null),(o===null||o.child===null)&&(Bd(a)?a.flags|=4:o===null||o.memoizedState.isDehydrated&&(a.flags&256)===0||(a.flags|=1024,Mr!==null&&(_0(Mr),Mr=null))),f0(o,a),Pn(a),null;case 5:qg(a);var y=ss(cc.current);if(l=a.type,o!==null&&a.stateNode!=null)xS(o,a,l,p,y),o.ref!==a.ref&&(a.flags|=512,a.flags|=2097152);else{if(!p){if(a.stateNode===null)throw Error(n(166));return Pn(a),null}if(o=ss(ai.current),Bd(a)){p=a.stateNode,l=a.type;var x=a.memoizedProps;switch(p[si]=a,p[ic]=x,o=(a.mode&1)!==0,l){case"dialog":Mt("cancel",p),Mt("close",p);break;case"iframe":case"object":case"embed":Mt("load",p);break;case"video":case"audio":for(y=0;y<tc.length;y++)Mt(tc[y],p);break;case"source":Mt("error",p);break;case"img":case"image":case"link":Mt("error",p),Mt("load",p);break;case"details":Mt("toggle",p);break;case"input":yt(p,x),Mt("invalid",p);break;case"select":p._wrapperState={wasMultiple:!!x.multiple},Mt("invalid",p);break;case"textarea":Ei(p,x),Mt("invalid",p)}Xt(l,x),y=null;for(var C in x)if(x.hasOwnProperty(C)){var $=x[C];C==="children"?typeof $=="string"?p.textContent!==$&&(x.suppressHydrationWarning!==!0&&Id(p.textContent,$,o),y=["children",$]):typeof $=="number"&&p.textContent!==""+$&&(x.suppressHydrationWarning!==!0&&Id(p.textContent,$,o),y=["children",""+$]):i.hasOwnProperty(C)&&$!=null&&C==="onScroll"&&Mt("scroll",p)}switch(l){case"input":Ot(p),Oe(p,x,!0);break;case"textarea":Ot(p),Ko(p);break;case"select":case"option":break;default:typeof x.onClick=="function"&&(p.onclick=Od)}p=y,a.updateQueue=p,p!==null&&(a.flags|=4)}else{C=y.nodeType===9?y:y.ownerDocument,o==="http://www.w3.org/1999/xhtml"&&(o=he(l)),o==="http://www.w3.org/1999/xhtml"?l==="script"?(o=C.createElement("div"),o.innerHTML="<script><\/script>",o=o.removeChild(o.firstChild)):typeof p.is=="string"?o=C.createElement(l,{is:p.is}):(o=C.createElement(l),l==="select"&&(C=o,p.multiple?C.multiple=!0:p.size&&(C.size=p.size))):o=C.createElementNS(o,l),o[si]=a,o[ic]=p,wS(o,a,!1,!1),a.stateNode=o;e:{switch(C=Mn(l,p),l){case"dialog":Mt("cancel",o),Mt("close",o),y=p;break;case"iframe":case"object":case"embed":Mt("load",o),y=p;break;case"video":case"audio":for(y=0;y<tc.length;y++)Mt(tc[y],o);y=p;break;case"source":Mt("error",o),y=p;break;case"img":case"image":case"link":Mt("error",o),Mt("load",o),y=p;break;case"details":Mt("toggle",o),y=p;break;case"input":yt(o,p),y=tt(o,p),Mt("invalid",o);break;case"option":y=p;break;case"select":o._wrapperState={wasMultiple:!!p.multiple},y=O({},p,{value:void 0}),Mt("invalid",o);break;case"textarea":Ei(o,p),y=At(o,p),Mt("invalid",o);break;default:y=p}Xt(l,y),$=y;for(x in $)if($.hasOwnProperty(x)){var Y=$[x];x==="style"?Gt(o,Y):x==="dangerouslySetInnerHTML"?(Y=Y?Y.__html:void 0,Y!=null&&Je(o,Y)):x==="children"?typeof Y=="string"?(l!=="textarea"||Y!=="")&&et(o,Y):typeof Y=="number"&&et(o,""+Y):x!=="suppressContentEditableWarning"&&x!=="suppressHydrationWarning"&&x!=="autoFocus"&&(i.hasOwnProperty(x)?Y!=null&&x==="onScroll"&&Mt("scroll",o):Y!=null&&R(o,x,Y,C))}switch(l){case"input":Ot(o),Oe(o,p,!1);break;case"textarea":Ot(o),Ko(o);break;case"option":p.value!=null&&o.setAttribute("value",""+ve(p.value));break;case"select":o.multiple=!!p.multiple,x=p.value,x!=null?jt(o,!!p.multiple,x,!1):p.defaultValue!=null&&jt(o,!!p.multiple,p.defaultValue,!0);break;default:typeof y.onClick=="function"&&(o.onclick=Od)}switch(l){case"button":case"input":case"select":case"textarea":p=!!p.autoFocus;break e;case"img":p=!0;break e;default:p=!1}}p&&(a.flags|=4)}a.ref!==null&&(a.flags|=512,a.flags|=2097152)}return Pn(a),null;case 6:if(o&&a.stateNode!=null)TS(o,a,o.memoizedProps,p);else{if(typeof p!="string"&&a.stateNode===null)throw Error(n(166));if(l=ss(cc.current),ss(ai.current),Bd(a)){if(p=a.stateNode,l=a.memoizedProps,p[si]=a,(x=p.nodeValue!==l)&&(o=cr,o!==null))switch(o.tag){case 3:Id(p.nodeValue,l,(o.mode&1)!==0);break;case 5:o.memoizedProps.suppressHydrationWarning!==!0&&Id(p.nodeValue,l,(o.mode&1)!==0)}x&&(a.flags|=4)}else p=(l.nodeType===9?l:l.ownerDocument).createTextNode(p),p[si]=a,a.stateNode=p}return Pn(a),null;case 13:if(Ft(Vt),p=a.memoizedState,o===null||o.memoizedState!==null&&o.memoizedState.dehydrated!==null){if($t&&lr!==null&&(a.mode&1)!==0&&(a.flags&128)===0)S2(),xa(),a.flags|=98560,x=!1;else if(x=Bd(a),p!==null&&p.dehydrated!==null){if(o===null){if(!x)throw Error(n(318));if(x=a.memoizedState,x=x!==null?x.dehydrated:null,!x)throw Error(n(317));x[si]=a}else xa(),(a.flags&128)===0&&(a.memoizedState=null),a.flags|=4;Pn(a),x=!1}else Mr!==null&&(_0(Mr),Mr=null),x=!0;if(!x)return a.flags&65536?a:null}return(a.flags&128)!==0?(a.lanes=l,a):(p=p!==null,p!==(o!==null&&o.memoizedState!==null)&&p&&(a.child.flags|=8192,(a.mode&1)!==0&&(o===null||(Vt.current&1)!==0?cn===0&&(cn=3):A0())),a.updateQueue!==null&&(a.flags|=4),Pn(a),null);case 4:return Sa(),f0(o,a),o===null&&nc(a.stateNode.containerInfo),Pn(a),null;case 10:return jg(a.type._context),Pn(a),null;case 17:return Xn(a.type)&&Rd(),Pn(a),null;case 19:if(Ft(Vt),x=a.memoizedState,x===null)return Pn(a),null;if(p=(a.flags&128)!==0,C=x.rendering,C===null)if(p)hc(x,!1);else{if(cn!==0||o!==null&&(o.flags&128)!==0)for(o=a.child;o!==null;){if(C=Vd(o),C!==null){for(a.flags|=128,hc(x,!1),p=C.updateQueue,p!==null&&(a.updateQueue=p,a.flags|=4),a.subtreeFlags=0,p=l,l=a.child;l!==null;)x=l,o=p,x.flags&=14680066,C=x.alternate,C===null?(x.childLanes=0,x.lanes=o,x.child=null,x.subtreeFlags=0,x.memoizedProps=null,x.memoizedState=null,x.updateQueue=null,x.dependencies=null,x.stateNode=null):(x.childLanes=C.childLanes,x.lanes=C.lanes,x.child=C.child,x.subtreeFlags=0,x.deletions=null,x.memoizedProps=C.memoizedProps,x.memoizedState=C.memoizedState,x.updateQueue=C.updateQueue,x.type=C.type,o=C.dependencies,x.dependencies=o===null?null:{lanes:o.lanes,firstContext:o.firstContext}),l=l.sibling;return Rt(Vt,Vt.current&1|2),a.child}o=o.sibling}x.tail!==null&&at()>Na&&(a.flags|=128,p=!0,hc(x,!1),a.lanes=4194304)}else{if(!p)if(o=Vd(C),o!==null){if(a.flags|=128,p=!0,l=o.updateQueue,l!==null&&(a.updateQueue=l,a.flags|=4),hc(x,!0),x.tail===null&&x.tailMode==="hidden"&&!C.alternate&&!$t)return Pn(a),null}else 2*at()-x.renderingStartTime>Na&&l!==1073741824&&(a.flags|=128,p=!0,hc(x,!1),a.lanes=4194304);x.isBackwards?(C.sibling=a.child,a.child=C):(l=x.last,l!==null?l.sibling=C:a.child=C,x.last=C)}return x.tail!==null?(a=x.tail,x.rendering=a,x.tail=a.sibling,x.renderingStartTime=at(),a.sibling=null,l=Vt.current,Rt(Vt,p?l&1|2:l&1),a):(Pn(a),null);case 22:case 23:return S0(),p=a.memoizedState!==null,o!==null&&o.memoizedState!==null!==p&&(a.flags|=8192),p&&(a.mode&1)!==0?(dr&1073741824)!==0&&(Pn(a),a.subtreeFlags&6&&(a.flags|=8192)):Pn(a),null;case 24:return null;case 25:return null}throw Error(n(156,a.tag))}function bz(o,a){switch(Lg(a),a.tag){case 1:return Xn(a.type)&&Rd(),o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 3:return Sa(),Ft(Gn),Ft(In),Yg(),o=a.flags,(o&65536)!==0&&(o&128)===0?(a.flags=o&-65537|128,a):null;case 5:return qg(a),null;case 13:if(Ft(Vt),o=a.memoizedState,o!==null&&o.dehydrated!==null){if(a.alternate===null)throw Error(n(340));xa()}return o=a.flags,o&65536?(a.flags=o&-65537|128,a):null;case 19:return Ft(Vt),null;case 4:return Sa(),null;case 10:return jg(a.type._context),null;case 22:case 23:return S0(),null;case 24:return null;default:return null}}var Zd=!1,Rn=!1,wz=typeof WeakSet=="function"?WeakSet:Set,Be=null;function ka(o,a){var l=o.ref;if(l!==null)if(typeof l=="function")try{l(null)}catch(p){Qt(o,a,p)}else l.current=null}function p0(o,a,l){try{l()}catch(p){Qt(o,a,p)}}var _S=!1;function xz(o,a){if(Sg=bd,o=t2(),yg(o)){if("selectionStart"in o)var l={start:o.selectionStart,end:o.selectionEnd};else e:{l=(l=o.ownerDocument)&&l.defaultView||window;var p=l.getSelection&&l.getSelection();if(p&&p.rangeCount!==0){l=p.anchorNode;var y=p.anchorOffset,x=p.focusNode;p=p.focusOffset;try{l.nodeType,x.nodeType}catch(Ce){l=null;break e}var C=0,$=-1,Y=-1,oe=0,xe=0,_e=o,be=null;t:for(;;){for(var Me;_e!==l||y!==0&&_e.nodeType!==3||($=C+y),_e!==x||p!==0&&_e.nodeType!==3||(Y=C+p),_e.nodeType===3&&(C+=_e.nodeValue.length),(Me=_e.firstChild)!==null;)be=_e,_e=Me;for(;;){if(_e===o)break t;if(be===l&&++oe===y&&($=C),be===x&&++xe===p&&(Y=C),(Me=_e.nextSibling)!==null)break;_e=be,be=_e.parentNode}_e=Me}l=$===-1||Y===-1?null:{start:$,end:Y}}else l=null}l=l||{start:0,end:0}}else l=null;for(Ag={focusedElem:o,selectionRange:l},bd=!1,Be=a;Be!==null;)if(a=Be,o=a.child,(a.subtreeFlags&1028)!==0&&o!==null)o.return=a,Be=o;else for(;Be!==null;){a=Be;try{var Ue=a.alternate;if((a.flags&1024)!==0)switch(a.tag){case 0:case 11:case 15:break;case 1:if(Ue!==null){var je=Ue.memoizedProps,tn=Ue.memoizedState,te=a.stateNode,K=te.getSnapshotBeforeUpdate(a.elementType===a.type?je:Fr(a.type,je),tn);te.__reactInternalSnapshotBeforeUpdate=K}break;case 3:var ie=a.stateNode.containerInfo;ie.nodeType===1?ie.textContent="":ie.nodeType===9&&ie.documentElement&&ie.removeChild(ie.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(n(163))}}catch(Ce){Qt(a,a.return,Ce)}if(o=a.sibling,o!==null){o.return=a.return,Be=o;break}Be=a.return}return Ue=_S,_S=!1,Ue}function mc(o,a,l){var p=a.updateQueue;if(p=p!==null?p.lastEffect:null,p!==null){var y=p=p.next;do{if((y.tag&o)===o){var x=y.destroy;y.destroy=void 0,x!==void 0&&p0(a,l,x)}y=y.next}while(y!==p)}}function ef(o,a){if(a=a.updateQueue,a=a!==null?a.lastEffect:null,a!==null){var l=a=a.next;do{if((l.tag&o)===o){var p=l.create;l.destroy=p()}l=l.next}while(l!==a)}}function h0(o){var a=o.ref;if(a!==null){var l=o.stateNode;o.tag,o=l,typeof a=="function"?a(o):a.current=o}}function vS(o){var a=o.alternate;a!==null&&(o.alternate=null,vS(a)),o.child=null,o.deletions=null,o.sibling=null,o.tag===5&&(a=o.stateNode,a!==null&&(delete a[si],delete a[ic],delete a[Ig],delete a[rz],delete a[iz])),o.stateNode=null,o.return=null,o.dependencies=null,o.memoizedProps=null,o.memoizedState=null,o.pendingProps=null,o.stateNode=null,o.updateQueue=null}function SS(o){return o.tag===5||o.tag===3||o.tag===4}function AS(o){e:for(;;){for(;o.sibling===null;){if(o.return===null||SS(o.return))return null;o=o.return}for(o.sibling.return=o.return,o=o.sibling;o.tag!==5&&o.tag!==6&&o.tag!==18;){if(o.flags&2||o.child===null||o.tag===4)continue e;o.child.return=o,o=o.child}if(!(o.flags&2))return o.stateNode}}function m0(o,a,l){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?l.nodeType===8?l.parentNode.insertBefore(o,a):l.insertBefore(o,a):(l.nodeType===8?(a=l.parentNode,a.insertBefore(o,l)):(a=l,a.appendChild(o)),l=l._reactRootContainer,l!=null||a.onclick!==null||(a.onclick=Od));else if(p!==4&&(o=o.child,o!==null))for(m0(o,a,l),o=o.sibling;o!==null;)m0(o,a,l),o=o.sibling}function g0(o,a,l){var p=o.tag;if(p===5||p===6)o=o.stateNode,a?l.insertBefore(o,a):l.appendChild(o);else if(p!==4&&(o=o.child,o!==null))for(g0(o,a,l),o=o.sibling;o!==null;)g0(o,a,l),o=o.sibling}var xn=null,Br=!1;function co(o,a,l){for(l=l.child;l!==null;)kS(o,a,l),l=l.sibling}function kS(o,a,l){if(ar&&typeof ar.onCommitFiberUnmount=="function")try{ar.onCommitFiberUnmount(Zo,l)}catch($){}switch(l.tag){case 5:Rn||ka(l,a);case 6:var p=xn,y=Br;xn=null,co(o,a,l),xn=p,Br=y,xn!==null&&(Br?(o=xn,l=l.stateNode,o.nodeType===8?o.parentNode.removeChild(l):o.removeChild(l)):xn.removeChild(l.stateNode));break;case 18:xn!==null&&(Br?(o=xn,l=l.stateNode,o.nodeType===8?Ng(o.parentNode,l):o.nodeType===1&&Ng(o,l),Yu(o)):Ng(xn,l.stateNode));break;case 4:p=xn,y=Br,xn=l.stateNode.containerInfo,Br=!0,co(o,a,l),xn=p,Br=y;break;case 0:case 11:case 14:case 15:if(!Rn&&(p=l.updateQueue,p!==null&&(p=p.lastEffect,p!==null))){y=p=p.next;do{var x=y,C=x.destroy;x=x.tag,C!==void 0&&((x&2)!==0||(x&4)!==0)&&p0(l,a,C),y=y.next}while(y!==p)}co(o,a,l);break;case 1:if(!Rn&&(ka(l,a),p=l.stateNode,typeof p.componentWillUnmount=="function"))try{p.props=l.memoizedProps,p.state=l.memoizedState,p.componentWillUnmount()}catch($){Qt(l,a,$)}co(o,a,l);break;case 21:co(o,a,l);break;case 22:l.mode&1?(Rn=(p=Rn)||l.memoizedState!==null,co(o,a,l),Rn=p):co(o,a,l);break;default:co(o,a,l)}}function CS(o){var a=o.updateQueue;if(a!==null){o.updateQueue=null;var l=o.stateNode;l===null&&(l=o.stateNode=new wz),a.forEach(function(p){var y=Iz.bind(null,o,p);l.has(p)||(l.add(p),p.then(y,y))})}}function Ur(o,a){var l=a.deletions;if(l!==null)for(var p=0;p<l.length;p++){var y=l[p];try{var x=o,C=a,$=C;e:for(;$!==null;){switch($.tag){case 5:xn=$.stateNode,Br=!1;break e;case 3:xn=$.stateNode.containerInfo,Br=!0;break e;case 4:xn=$.stateNode.containerInfo,Br=!0;break e}$=$.return}if(xn===null)throw Error(n(160));kS(x,C,y),xn=null,Br=!1;var Y=y.alternate;Y!==null&&(Y.return=null),y.return=null}catch(oe){Qt(y,a,oe)}}if(a.subtreeFlags&12854)for(a=a.child;a!==null;)NS(a,o),a=a.sibling}function NS(o,a){var l=o.alternate,p=o.flags;switch(o.tag){case 0:case 11:case 14:case 15:if(Ur(a,o),ci(o),p&4){try{mc(3,o,o.return),ef(3,o)}catch(je){Qt(o,o.return,je)}try{mc(5,o,o.return)}catch(je){Qt(o,o.return,je)}}break;case 1:Ur(a,o),ci(o),p&512&&l!==null&&ka(l,l.return);break;case 5:if(Ur(a,o),ci(o),p&512&&l!==null&&ka(l,l.return),o.flags&32){var y=o.stateNode;try{et(y,"")}catch(je){Qt(o,o.return,je)}}if(p&4&&(y=o.stateNode,y!=null)){var x=o.memoizedProps,C=l!==null?l.memoizedProps:x,$=o.type,Y=o.updateQueue;if(o.updateQueue=null,Y!==null)try{$==="input"&&x.type==="radio"&&x.name!=null&&De(y,x),Mn($,C);var oe=Mn($,x);for(C=0;C<Y.length;C+=2){var xe=Y[C],_e=Y[C+1];xe==="style"?Gt(y,_e):xe==="dangerouslySetInnerHTML"?Je(y,_e):xe==="children"?et(y,_e):R(y,xe,_e,oe)}switch($){case"input":Ve(y,x);break;case"textarea":sr(y,x);break;case"select":var be=y._wrapperState.wasMultiple;y._wrapperState.wasMultiple=!!x.multiple;var Me=x.value;Me!=null?jt(y,!!x.multiple,Me,!1):be!==!!x.multiple&&(x.defaultValue!=null?jt(y,!!x.multiple,x.defaultValue,!0):jt(y,!!x.multiple,x.multiple?[]:"",!1))}y[ic]=x}catch(je){Qt(o,o.return,je)}}break;case 6:if(Ur(a,o),ci(o),p&4){if(o.stateNode===null)throw Error(n(162));y=o.stateNode,x=o.memoizedProps;try{y.nodeValue=x}catch(je){Qt(o,o.return,je)}}break;case 3:if(Ur(a,o),ci(o),p&4&&l!==null&&l.memoizedState.isDehydrated)try{Yu(a.containerInfo)}catch(je){Qt(o,o.return,je)}break;case 4:Ur(a,o),ci(o);break;case 13:Ur(a,o),ci(o),y=o.child,y.flags&8192&&(x=y.memoizedState!==null,y.stateNode.isHidden=x,!x||y.alternate!==null&&y.alternate.memoizedState!==null||(b0=at())),p&4&&CS(o);break;case 22:if(xe=l!==null&&l.memoizedState!==null,o.mode&1?(Rn=(oe=Rn)||xe,Ur(a,o),Rn=oe):Ur(a,o),ci(o),p&8192){if(oe=o.memoizedState!==null,(o.stateNode.isHidden=oe)&&!xe&&(o.mode&1)!==0)for(Be=o,xe=o.child;xe!==null;){for(_e=Be=xe;Be!==null;){switch(be=Be,Me=be.child,be.tag){case 0:case 11:case 14:case 15:mc(4,be,be.return);break;case 1:ka(be,be.return);var Ue=be.stateNode;if(typeof Ue.componentWillUnmount=="function"){p=be,l=be.return;try{a=p,Ue.props=a.memoizedProps,Ue.state=a.memoizedState,Ue.componentWillUnmount()}catch(je){Qt(p,l,je)}}break;case 5:ka(be,be.return);break;case 22:if(be.memoizedState!==null){PS(_e);continue}}Me!==null?(Me.return=be,Be=Me):PS(_e)}xe=xe.sibling}e:for(xe=null,_e=o;;){if(_e.tag===5){if(xe===null){xe=_e;try{y=_e.stateNode,oe?(x=y.style,typeof x.setProperty=="function"?x.setProperty("display","none","important"):x.display="none"):($=_e.stateNode,Y=_e.memoizedProps.style,C=Y!=null&&Y.hasOwnProperty("display")?Y.display:null,$.style.display=mn("display",C))}catch(je){Qt(o,o.return,je)}}}else if(_e.tag===6){if(xe===null)try{_e.stateNode.nodeValue=oe?"":_e.memoizedProps}catch(je){Qt(o,o.return,je)}}else if((_e.tag!==22&&_e.tag!==23||_e.memoizedState===null||_e===o)&&_e.child!==null){_e.child.return=_e,_e=_e.child;continue}if(_e===o)break e;for(;_e.sibling===null;){if(_e.return===null||_e.return===o)break e;xe===_e&&(xe=null),_e=_e.return}xe===_e&&(xe=null),_e.sibling.return=_e.return,_e=_e.sibling}}break;case 19:Ur(a,o),ci(o),p&4&&CS(o);break;case 21:break;default:Ur(a,o),ci(o)}}function ci(o){var a=o.flags;if(a&2){try{e:{for(var l=o.return;l!==null;){if(SS(l)){var p=l;break e}l=l.return}throw Error(n(160))}switch(p.tag){case 5:var y=p.stateNode;p.flags&32&&(et(y,""),p.flags&=-33);var x=AS(o);g0(o,x,y);break;case 3:case 4:var C=p.stateNode.containerInfo,$=AS(o);m0(o,$,C);break;default:throw Error(n(161))}}catch(Y){Qt(o,o.return,Y)}o.flags&=-3}a&4096&&(o.flags&=-4097)}function Tz(o,a,l){Be=o,IS(o)}function IS(o,a,l){for(var p=(o.mode&1)!==0;Be!==null;){var y=Be,x=y.child;if(y.tag===22&&p){var C=y.memoizedState!==null||Zd;if(!C){var $=y.alternate,Y=$!==null&&$.memoizedState!==null||Rn;$=Zd;var oe=Rn;if(Zd=C,(Rn=Y)&&!oe)for(Be=y;Be!==null;)C=Be,Y=C.child,C.tag===22&&C.memoizedState!==null?RS(y):Y!==null?(Y.return=C,Be=Y):RS(y);for(;x!==null;)Be=x,IS(x),x=x.sibling;Be=y,Zd=$,Rn=oe}OS(o)}else(y.subtreeFlags&8772)!==0&&x!==null?(x.return=y,Be=x):OS(o)}}function OS(o){for(;Be!==null;){var a=Be;if((a.flags&8772)!==0){var l=a.alternate;try{if((a.flags&8772)!==0)switch(a.tag){case 0:case 11:case 15:Rn||ef(5,a);break;case 1:var p=a.stateNode;if(a.flags&4&&!Rn)if(l===null)p.componentDidMount();else{var y=a.elementType===a.type?l.memoizedProps:Fr(a.type,l.memoizedProps);p.componentDidUpdate(y,l.memoizedState,p.__reactInternalSnapshotBeforeUpdate)}var x=a.updateQueue;x!==null&&P2(a,x,p);break;case 3:var C=a.updateQueue;if(C!==null){if(l=null,a.child!==null)switch(a.child.tag){case 5:l=a.child.stateNode;break;case 1:l=a.child.stateNode}P2(a,C,l)}break;case 5:var $=a.stateNode;if(l===null&&a.flags&4){l=$;var Y=a.memoizedProps;switch(a.type){case"button":case"input":case"select":case"textarea":Y.autoFocus&&l.focus();break;case"img":Y.src&&(l.src=Y.src)}}break;case 6:break;case 4:break;case 12:break;case 13:if(a.memoizedState===null){var oe=a.alternate;if(oe!==null){var xe=oe.memoizedState;if(xe!==null){var _e=xe.dehydrated;_e!==null&&Yu(_e)}}}break;case 19:case 17:case 21:case 22:case 23:case 25:break;default:throw Error(n(163))}Rn||a.flags&512&&h0(a)}catch(be){Qt(a,a.return,be)}}if(a===o){Be=null;break}if(l=a.sibling,l!==null){l.return=a.return,Be=l;break}Be=a.return}}function PS(o){for(;Be!==null;){var a=Be;if(a===o){Be=null;break}var l=a.sibling;if(l!==null){l.return=a.return,Be=l;break}Be=a.return}}function RS(o){for(;Be!==null;){var a=Be;try{switch(a.tag){case 0:case 11:case 15:var l=a.return;try{ef(4,a)}catch(Y){Qt(a,l,Y)}break;case 1:var p=a.stateNode;if(typeof p.componentDidMount=="function"){var y=a.return;try{p.componentDidMount()}catch(Y){Qt(a,y,Y)}}var x=a.return;try{h0(a)}catch(Y){Qt(a,x,Y)}break;case 5:var C=a.return;try{h0(a)}catch(Y){Qt(a,C,Y)}}}catch(Y){Qt(a,a.return,Y)}if(a===o){Be=null;break}var $=a.sibling;if($!==null){$.return=a.return,Be=$;break}Be=a.return}}var _z=Math.ceil,tf=U.ReactCurrentDispatcher,y0=U.ReactCurrentOwner,Tr=U.ReactCurrentBatchConfig,xt=0,yn=null,on=null,Tn=0,dr=0,Ca=io(0),cn=0,gc=null,us=0,nf=0,E0=0,yc=null,Qn=null,b0=0,Na=1/0,Ii=null,rf=!1,w0=null,lo=null,of=!1,fo=null,sf=0,Ec=0,x0=null,af=-1,uf=0;function Bn(){return(xt&6)!==0?at():af!==-1?af:af=at()}function po(o){return(o.mode&1)===0?1:(xt&2)!==0&&Tn!==0?Tn&-Tn:sz.transition!==null?(uf===0&&(uf=Av()),uf):(o=vt,o!==0||(o=window.event,o=o===void 0?16:Dv(o.type)),o)}function jr(o,a,l,p){if(50<Ec)throw Ec=0,x0=null,Error(n(185));$u(o,l,p),((xt&2)===0||o!==yn)&&(o===yn&&((xt&2)===0&&(nf|=l),cn===4&&ho(o,Tn)),Jn(o,p),l===1&&xt===0&&(a.mode&1)===0&&(Na=at()+500,Dd&&so()))}function Jn(o,a){var l=o.callbackNode;s$(o,a);var p=gd(o,o===yn?Tn:0);if(p===0)l!==null&&Ze(l),o.callbackNode=null,o.callbackPriority=0;else if(a=p&-p,o.callbackPriority!==a){if(l!=null&&Ze(l),a===1)o.tag===0?oz(DS.bind(null,o)):w2(DS.bind(null,o)),tz(function(){(xt&6)===0&&so()}),l=null;else{switch(kv(p)){case 1:l=Ht;break;case 4:l=oi;break;case 16:l=Jo;break;case 536870912:l=ju;break;default:l=Jo}l=zS(l,LS.bind(null,o))}o.callbackPriority=a,o.callbackNode=l}}function LS(o,a){if(af=-1,uf=0,(xt&6)!==0)throw Error(n(327));var l=o.callbackNode;if(Ia()&&o.callbackNode!==l)return null;var p=gd(o,o===yn?Tn:0);if(p===0)return null;if((p&30)!==0||(p&o.expiredLanes)!==0||a)a=cf(o,p);else{a=p;var y=xt;xt|=2;var x=FS();(yn!==o||Tn!==a)&&(Ii=null,Na=at()+500,ls(o,a));do try{Az();break}catch($){MS(o,$)}while(!0);Ug(),tf.current=x,xt=y,on!==null?a=0:(yn=null,Tn=0,a=cn)}if(a!==0){if(a===2&&(y=tg(o),y!==0&&(p=y,a=T0(o,y))),a===1)throw l=gc,ls(o,0),ho(o,p),Jn(o,at()),l;if(a===6)ho(o,p);else{if(y=o.current.alternate,(p&30)===0&&!vz(y)&&(a=cf(o,p),a===2&&(x=tg(o),x!==0&&(p=x,a=T0(o,x))),a===1))throw l=gc,ls(o,0),ho(o,p),Jn(o,at()),l;switch(o.finishedWork=y,o.finishedLanes=p,a){case 0:case 1:throw Error(n(345));case 2:ds(o,Qn,Ii);break;case 3:if(ho(o,p),(p&130023424)===p&&(a=b0+500-at(),10<a)){if(gd(o,0)!==0)break;if(y=o.suspendedLanes,(y&p)!==p){Bn(),o.pingedLanes|=o.suspendedLanes&y;break}o.timeoutHandle=Cg(ds.bind(null,o,Qn,Ii),a);break}ds(o,Qn,Ii);break;case 4:if(ho(o,p),(p&4194240)===p)break;for(a=o.eventTimes,y=-1;0<p;){var C=31-Lr(p);x=1<<C,C=a[C],C>y&&(y=C),p&=~x}if(p=y,p=at()-p,p=(120>p?120:480>p?480:1080>p?1080:1920>p?1920:3e3>p?3e3:4320>p?4320:1960*_z(p/1960))-p,10<p){o.timeoutHandle=Cg(ds.bind(null,o,Qn,Ii),p);break}ds(o,Qn,Ii);break;case 5:ds(o,Qn,Ii);break;default:throw Error(n(329))}}}return Jn(o,at()),o.callbackNode===l?LS.bind(null,o):null}function T0(o,a){var l=yc;return o.current.memoizedState.isDehydrated&&(ls(o,a).flags|=256),o=cf(o,a),o!==2&&(a=Qn,Qn=l,a!==null&&_0(a)),o}function _0(o){Qn===null?Qn=o:Qn.push.apply(Qn,o)}function vz(o){for(var a=o;;){if(a.flags&16384){var l=a.updateQueue;if(l!==null&&(l=l.stores,l!==null))for(var p=0;p<l.length;p++){var y=l[p],x=y.getSnapshot;y=y.value;try{if(!Dr(x(),y))return!1}catch(C){return!1}}}if(l=a.child,a.subtreeFlags&16384&&l!==null)l.return=a,a=l;else{if(a===o)break;for(;a.sibling===null;){if(a.return===null||a.return===o)return!0;a=a.return}a.sibling.return=a.return,a=a.sibling}}return!0}function ho(o,a){for(a&=~E0,a&=~nf,o.suspendedLanes|=a,o.pingedLanes&=~a,o=o.expirationTimes;0<a;){var l=31-Lr(a),p=1<<l;o[l]=-1,a&=~p}}function DS(o){if((xt&6)!==0)throw Error(n(327));Ia();var a=gd(o,0);if((a&1)===0)return Jn(o,at()),null;var l=cf(o,a);if(o.tag!==0&&l===2){var p=tg(o);p!==0&&(a=p,l=T0(o,p))}if(l===1)throw l=gc,ls(o,0),ho(o,a),Jn(o,at()),l;if(l===6)throw Error(n(345));return o.finishedWork=o.current.alternate,o.finishedLanes=a,ds(o,Qn,Ii),Jn(o,at()),null}function v0(o,a){var l=xt;xt|=1;try{return o(a)}finally{xt=l,xt===0&&(Na=at()+500,Dd&&so())}}function cs(o){fo!==null&&fo.tag===0&&(xt&6)===0&&Ia();var a=xt;xt|=1;var l=Tr.transition,p=vt;try{if(Tr.transition=null,vt=1,o)return o()}finally{vt=p,Tr.transition=l,xt=a,(xt&6)===0&&so()}}function S0(){dr=Ca.current,Ft(Ca)}function ls(o,a){o.finishedWork=null,o.finishedLanes=0;var l=o.timeoutHandle;if(l!==-1&&(o.timeoutHandle=-1,ez(l)),on!==null)for(l=on.return;l!==null;){var p=l;switch(Lg(p),p.tag){case 1:p=p.type.childContextTypes,p!=null&&Rd();break;case 3:Sa(),Ft(Gn),Ft(In),Yg();break;case 5:qg(p);break;case 4:Sa();break;case 13:Ft(Vt);break;case 19:Ft(Vt);break;case 10:jg(p.type._context);break;case 22:case 23:S0()}l=l.return}if(yn=o,on=o=mo(o.current,null),Tn=dr=a,cn=0,gc=null,E0=nf=us=0,Qn=yc=null,os!==null){for(a=0;a<os.length;a++)if(l=os[a],p=l.interleaved,p!==null){l.interleaved=null;var y=p.next,x=l.pending;if(x!==null){var C=x.next;x.next=y,p.next=C}l.pending=p}os=null}return o}function MS(o,a){do{var l=on;try{if(Ug(),qd.current=Xd,Wd){for(var p=qt.memoizedState;p!==null;){var y=p.queue;y!==null&&(y.pending=null),p=p.next}Wd=!1}if(as=0,gn=un=qt=null,lc=!1,dc=0,y0.current=null,l===null||l.return===null){cn=1,gc=a,on=null;break}e:{var x=o,C=l.return,$=l,Y=a;if(a=Tn,$.flags|=32768,Y!==null&&typeof Y=="object"&&typeof Y.then=="function"){var oe=Y,xe=$,_e=xe.tag;if((xe.mode&1)===0&&(_e===0||_e===11||_e===15)){var be=xe.alternate;be?(xe.updateQueue=be.updateQueue,xe.memoizedState=be.memoizedState,xe.lanes=be.lanes):(xe.updateQueue=null,xe.memoizedState=null)}var Me=aS(C);if(Me!==null){Me.flags&=-257,uS(Me,C,$,x,a),Me.mode&1&&sS(x,oe,a),a=Me,Y=oe;var Ue=a.updateQueue;if(Ue===null){var je=new Set;je.add(Y),a.updateQueue=je}else Ue.add(Y);break e}else{if((a&1)===0){sS(x,oe,a),A0();break e}Y=Error(n(426))}}else if($t&&$.mode&1){var tn=aS(C);if(tn!==null){(tn.flags&65536)===0&&(tn.flags|=256),uS(tn,C,$,x,a),Fg(Aa(Y,$));break e}}x=Y=Aa(Y,$),cn!==4&&(cn=2),yc===null?yc=[x]:yc.push(x),x=C;do{switch(x.tag){case 3:x.flags|=65536,a&=-a,x.lanes|=a;var te=iS(x,Y,a);O2(x,te);break e;case 1:$=Y;var K=x.type,ie=x.stateNode;if((x.flags&128)===0&&(typeof K.getDerivedStateFromError=="function"||ie!==null&&typeof ie.componentDidCatch=="function"&&(lo===null||!lo.has(ie)))){x.flags|=65536,a&=-a,x.lanes|=a;var Ce=oS(x,$,a);O2(x,Ce);break e}}x=x.return}while(x!==null)}US(l)}catch(He){a=He,on===l&&l!==null&&(on=l=l.return);continue}break}while(!0)}function FS(){var o=tf.current;return tf.current=Xd,o===null?Xd:o}function A0(){(cn===0||cn===3||cn===2)&&(cn=4),yn===null||(us&268435455)===0&&(nf&268435455)===0||ho(yn,Tn)}function cf(o,a){var l=xt;xt|=2;var p=FS();(yn!==o||Tn!==a)&&(Ii=null,ls(o,a));do try{Sz();break}catch(y){MS(o,y)}while(!0);if(Ug(),xt=l,tf.current=p,on!==null)throw Error(n(261));return yn=null,Tn=0,cn}function Sz(){for(;on!==null;)BS(on)}function Az(){for(;on!==null&&!ft();)BS(on)}function BS(o){var a=$S(o.alternate,o,dr);o.memoizedProps=o.pendingProps,a===null?US(o):on=a,y0.current=null}function US(o){var a=o;do{var l=a.alternate;if(o=a.return,(a.flags&32768)===0){if(l=Ez(l,a,dr),l!==null){on=l;return}}else{if(l=bz(l,a),l!==null){l.flags&=32767,on=l;return}if(o!==null)o.flags|=32768,o.subtreeFlags=0,o.deletions=null;else{cn=6,on=null;return}}if(a=a.sibling,a!==null){on=a;return}on=a=o}while(a!==null);cn===0&&(cn=5)}function ds(o,a,l){var p=vt,y=Tr.transition;try{Tr.transition=null,vt=1,kz(o,a,l,p)}finally{Tr.transition=y,vt=p}return null}function kz(o,a,l,p){do Ia();while(fo!==null);if((xt&6)!==0)throw Error(n(327));l=o.finishedWork;var y=o.finishedLanes;if(l===null)return null;if(o.finishedWork=null,o.finishedLanes=0,l===o.current)throw Error(n(177));o.callbackNode=null,o.callbackPriority=0;var x=l.lanes|l.childLanes;if(a$(o,x),o===yn&&(on=yn=null,Tn=0),(l.subtreeFlags&2064)===0&&(l.flags&2064)===0||of||(of=!0,zS(Jo,function(){return Ia(),null})),x=(l.flags&15990)!==0,(l.subtreeFlags&15990)!==0||x){x=Tr.transition,Tr.transition=null;var C=vt;vt=1;var $=xt;xt|=4,y0.current=null,xz(o,l),NS(l,o),Y$(Ag),bd=!!Sg,Ag=Sg=null,o.current=l,Tz(l),Kt(),xt=$,vt=C,Tr.transition=x}else o.current=l;if(of&&(of=!1,fo=o,sf=y),x=o.pendingLanes,x===0&&(lo=null),es(l.stateNode),Jn(o,at()),a!==null)for(p=o.onRecoverableError,l=0;l<a.length;l++)y=a[l],p(y.value,{componentStack:y.stack,digest:y.digest});if(rf)throw rf=!1,o=w0,w0=null,o;return(sf&1)!==0&&o.tag!==0&&Ia(),x=o.pendingLanes,(x&1)!==0?o===x0?Ec++:(Ec=0,x0=o):Ec=0,so(),null}function Ia(){if(fo!==null){var o=kv(sf),a=Tr.transition,l=vt;try{if(Tr.transition=null,vt=16>o?16:o,fo===null)var p=!1;else{if(o=fo,fo=null,sf=0,(xt&6)!==0)throw Error(n(331));var y=xt;for(xt|=4,Be=o.current;Be!==null;){var x=Be,C=x.child;if((Be.flags&16)!==0){var $=x.deletions;if($!==null){for(var Y=0;Y<$.length;Y++){var oe=$[Y];for(Be=oe;Be!==null;){var xe=Be;switch(xe.tag){case 0:case 11:case 15:mc(8,xe,x)}var _e=xe.child;if(_e!==null)_e.return=xe,Be=_e;else for(;Be!==null;){xe=Be;var be=xe.sibling,Me=xe.return;if(vS(xe),xe===oe){Be=null;break}if(be!==null){be.return=Me,Be=be;break}Be=Me}}}var Ue=x.alternate;if(Ue!==null){var je=Ue.child;if(je!==null){Ue.child=null;do{var tn=je.sibling;je.sibling=null,je=tn}while(je!==null)}}Be=x}}if((x.subtreeFlags&2064)!==0&&C!==null)C.return=x,Be=C;else e:for(;Be!==null;){if(x=Be,(x.flags&2048)!==0)switch(x.tag){case 0:case 11:case 15:mc(9,x,x.return)}var te=x.sibling;if(te!==null){te.return=x.return,Be=te;break e}Be=x.return}}var K=o.current;for(Be=K;Be!==null;){C=Be;var ie=C.child;if((C.subtreeFlags&2064)!==0&&ie!==null)ie.return=C,Be=ie;else e:for(C=K;Be!==null;){if($=Be,($.flags&2048)!==0)try{switch($.tag){case 0:case 11:case 15:ef(9,$)}}catch(He){Qt($,$.return,He)}if($===C){Be=null;break e}var Ce=$.sibling;if(Ce!==null){Ce.return=$.return,Be=Ce;break e}Be=$.return}}if(xt=y,so(),ar&&typeof ar.onPostCommitFiberRoot=="function")try{ar.onPostCommitFiberRoot(Zo,o)}catch(He){}p=!0}return p}finally{vt=l,Tr.transition=a}}return!1}function jS(o,a,l){a=Aa(l,a),a=iS(o,a,1),o=uo(o,a,1),a=Bn(),o!==null&&($u(o,1,a),Jn(o,a))}function Qt(o,a,l){if(o.tag===3)jS(o,o,l);else for(;a!==null;){if(a.tag===3){jS(a,o,l);break}else if(a.tag===1){var p=a.stateNode;if(typeof a.type.getDerivedStateFromError=="function"||typeof p.componentDidCatch=="function"&&(lo===null||!lo.has(p))){o=Aa(l,o),o=oS(a,o,1),a=uo(a,o,1),o=Bn(),a!==null&&($u(a,1,o),Jn(a,o));break}}a=a.return}}function Cz(o,a,l){var p=o.pingCache;p!==null&&p.delete(a),a=Bn(),o.pingedLanes|=o.suspendedLanes&l,yn===o&&(Tn&l)===l&&(cn===4||cn===3&&(Tn&130023424)===Tn&&500>at()-b0?ls(o,0):E0|=l),Jn(o,a)}function HS(o,a){a===0&&((o.mode&1)===0?a=1:(a=md,md<<=1,(md&130023424)===0&&(md=4194304)));var l=Bn();o=ki(o,a),o!==null&&($u(o,a,l),Jn(o,l))}function Nz(o){var a=o.memoizedState,l=0;a!==null&&(l=a.retryLane),HS(o,l)}function Iz(o,a){var l=0;switch(o.tag){case 13:var p=o.stateNode,y=o.memoizedState;y!==null&&(l=y.retryLane);break;case 19:p=o.stateNode;break;default:throw Error(n(314))}p!==null&&p.delete(a),HS(o,l)}var $S;$S=function(o,a,l){if(o!==null)if(o.memoizedProps!==a.pendingProps||Gn.current)Kn=!0;else{if((o.lanes&l)===0&&(a.flags&128)===0)return Kn=!1,yz(o,a,l);Kn=(o.flags&131072)!==0}else Kn=!1,$t&&(a.flags&1048576)!==0&&x2(a,Fd,a.index);switch(a.lanes=0,a.tag){case 2:var p=a.type;Jd(o,a),o=a.pendingProps;var y=Ea(a,In.current);va(a,l),y=Kg(null,a,p,o,y,l);var x=Qg();return a.flags|=1,typeof y=="object"&&y!==null&&typeof y.render=="function"&&y.$$typeof===void 0?(a.tag=1,a.memoizedState=null,a.updateQueue=null,Xn(p)?(x=!0,Ld(a)):x=!1,a.memoizedState=y.state!==null&&y.state!==void 0?y.state:null,zg(a),y.updater=Kd,a.stateNode=y,y._reactInternals=a,r0(a,p,o,l),a=a0(null,a,p,!0,x,l)):(a.tag=0,$t&&x&&Rg(a),Fn(null,a,y,l),a=a.child),a;case 16:p=a.elementType;e:{switch(Jd(o,a),o=a.pendingProps,y=p._init,p=y(p._payload),a.type=p,y=a.tag=Pz(p),o=Fr(p,o),y){case 0:a=s0(null,a,p,o,l);break e;case 1:a=hS(null,a,p,o,l);break e;case 11:a=cS(null,a,p,o,l);break e;case 14:a=lS(null,a,p,Fr(p.type,o),l);break e}throw Error(n(306,p,""))}return a;case 0:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),s0(o,a,p,y,l);case 1:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),hS(o,a,p,y,l);case 3:e:{if(mS(a),o===null)throw Error(n(387));p=a.pendingProps,x=a.memoizedState,y=x.element,I2(o,a),zd(a,p,null,l);var C=a.memoizedState;if(p=C.element,x.isDehydrated)if(x={element:p,isDehydrated:!1,cache:C.cache,pendingSuspenseBoundaries:C.pendingSuspenseBoundaries,transitions:C.transitions},a.updateQueue.baseState=x,a.memoizedState=x,a.flags&256){y=Aa(Error(n(423)),a),a=gS(o,a,p,l,y);break e}else if(p!==y){y=Aa(Error(n(424)),a),a=gS(o,a,p,l,y);break e}else for(lr=ro(a.stateNode.containerInfo.firstChild),cr=a,$t=!0,Mr=null,l=C2(a,null,p,l),a.child=l;l;)l.flags=l.flags&-3|4096,l=l.sibling;else{if(xa(),p===y){a=Ni(o,a,l);break e}Fn(o,a,p,l)}a=a.child}return a;case 5:return R2(a),o===null&&Mg(a),p=a.type,y=a.pendingProps,x=o!==null?o.memoizedProps:null,C=y.children,kg(p,y)?C=null:x!==null&&kg(p,x)&&(a.flags|=32),pS(o,a),Fn(o,a,C,l),a.child;case 6:return o===null&&Mg(a),null;case 13:return yS(o,a,l);case 4:return Vg(a,a.stateNode.containerInfo),p=a.pendingProps,o===null?a.child=Ta(a,null,p,l):Fn(o,a,p,l),a.child;case 11:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),cS(o,a,p,y,l);case 7:return Fn(o,a,a.pendingProps,l),a.child;case 8:return Fn(o,a,a.pendingProps.children,l),a.child;case 12:return Fn(o,a,a.pendingProps.children,l),a.child;case 10:e:{if(p=a.type._context,y=a.pendingProps,x=a.memoizedProps,C=y.value,Rt(jd,p._currentValue),p._currentValue=C,x!==null)if(Dr(x.value,C)){if(x.children===y.children&&!Gn.current){a=Ni(o,a,l);break e}}else for(x=a.child,x!==null&&(x.return=a);x!==null;){var $=x.dependencies;if($!==null){C=x.child;for(var Y=$.firstContext;Y!==null;){if(Y.context===p){if(x.tag===1){Y=Ci(-1,l&-l),Y.tag=2;var oe=x.updateQueue;if(oe!==null){oe=oe.shared;var xe=oe.pending;xe===null?Y.next=Y:(Y.next=xe.next,xe.next=Y),oe.pending=Y}}x.lanes|=l,Y=x.alternate,Y!==null&&(Y.lanes|=l),Hg(x.return,l,a),$.lanes|=l;break}Y=Y.next}}else if(x.tag===10)C=x.type===a.type?null:x.child;else if(x.tag===18){if(C=x.return,C===null)throw Error(n(341));C.lanes|=l,$=C.alternate,$!==null&&($.lanes|=l),Hg(C,l,a),C=x.sibling}else C=x.child;if(C!==null)C.return=x;else for(C=x;C!==null;){if(C===a){C=null;break}if(x=C.sibling,x!==null){x.return=C.return,C=x;break}C=C.return}x=C}Fn(o,a,y.children,l),a=a.child}return a;case 9:return y=a.type,p=a.pendingProps.children,va(a,l),y=wr(y),p=p(y),a.flags|=1,Fn(o,a,p,l),a.child;case 14:return p=a.type,y=Fr(p,a.pendingProps),y=Fr(p.type,y),lS(o,a,p,y,l);case 15:return dS(o,a,a.type,a.pendingProps,l);case 17:return p=a.type,y=a.pendingProps,y=a.elementType===p?y:Fr(p,y),Jd(o,a),a.tag=1,Xn(p)?(o=!0,Ld(a)):o=!1,va(a,l),nS(a,p,y),r0(a,p,y,l),a0(null,a,p,!0,o,l);case 19:return bS(o,a,l);case 22:return fS(o,a,l)}throw Error(n(156,a.tag))};function zS(o,a){return dt(o,a)}function Oz(o,a,l,p){this.tag=o,this.key=l,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=a,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=p,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function _r(o,a,l,p){return new Oz(o,a,l,p)}function k0(o){return o=o.prototype,!(!o||!o.isReactComponent)}function Pz(o){if(typeof o=="function")return k0(o)?1:0;if(o!=null){if(o=o.$$typeof,o===Q)return 11;if(o===ue)return 14}return 2}function mo(o,a){var l=o.alternate;return l===null?(l=_r(o.tag,a,o.key,o.mode),l.elementType=o.elementType,l.type=o.type,l.stateNode=o.stateNode,l.alternate=o,o.alternate=l):(l.pendingProps=a,l.type=o.type,l.flags=0,l.subtreeFlags=0,l.deletions=null),l.flags=o.flags&14680064,l.childLanes=o.childLanes,l.lanes=o.lanes,l.child=o.child,l.memoizedProps=o.memoizedProps,l.memoizedState=o.memoizedState,l.updateQueue=o.updateQueue,a=o.dependencies,l.dependencies=a===null?null:{lanes:a.lanes,firstContext:a.firstContext},l.sibling=o.sibling,l.index=o.index,l.ref=o.ref,l}function lf(o,a,l,p,y,x){var C=2;if(p=o,typeof o=="function")k0(o)&&(C=1);else if(typeof o=="string")C=5;else e:switch(o){case G:return fs(l.children,y,x,a);case W:C=8,y|=8;break;case re:return o=_r(12,l,a,y|2),o.elementType=re,o.lanes=x,o;case me:return o=_r(13,l,a,y),o.elementType=me,o.lanes=x,o;case V:return o=_r(19,l,a,y),o.elementType=V,o.lanes=x,o;case ae:return df(l,y,x,a);default:if(typeof o=="object"&&o!==null)switch(o.$$typeof){case H:C=10;break e;case ee:C=9;break e;case Q:C=11;break e;case ue:C=14;break e;case fe:C=16,p=null;break e}throw Error(n(130,o==null?o:typeof o,""))}return a=_r(C,l,a,y),a.elementType=o,a.type=p,a.lanes=x,a}function fs(o,a,l,p){return o=_r(7,o,p,a),o.lanes=l,o}function df(o,a,l,p){return o=_r(22,o,p,a),o.elementType=ae,o.lanes=l,o.stateNode={isHidden:!1},o}function C0(o,a,l){return o=_r(6,o,null,a),o.lanes=l,o}function N0(o,a,l){return a=_r(4,o.children!==null?o.children:[],o.key,a),a.lanes=l,a.stateNode={containerInfo:o.containerInfo,pendingChildren:null,implementation:o.implementation},a}function Rz(o,a,l,p,y){this.tag=a,this.containerInfo=o,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=ng(0),this.expirationTimes=ng(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=ng(0),this.identifierPrefix=p,this.onRecoverableError=y,this.mutableSourceEagerHydrationData=null}function I0(o,a,l,p,y,x,C,$,Y){return o=new Rz(o,a,l,$,Y),a===1?(a=1,x===!0&&(a|=8)):a=0,x=_r(3,null,null,a),o.current=x,x.stateNode=o,x.memoizedState={element:p,isDehydrated:l,cache:null,transitions:null,pendingSuspenseBoundaries:null},zg(x),o}function Lz(o,a,l){var p=3<arguments.length&&arguments[3]!==void 0?arguments[3]:null;return{$$typeof:A,key:p==null?null:""+p,children:o,containerInfo:a,implementation:l}}function VS(o){if(!o)return oo;o=o._reactInternals;e:{if(Ee(o)!==o||o.tag!==1)throw Error(n(170));var a=o;do{switch(a.tag){case 3:a=a.stateNode.context;break e;case 1:if(Xn(a.type)){a=a.stateNode.__reactInternalMemoizedMergedChildContext;break e}}a=a.return}while(a!==null);throw Error(n(171))}if(o.tag===1){var l=o.type;if(Xn(l))return E2(o,l,a)}return a}function qS(o,a,l,p,y,x,C,$,Y){return o=I0(l,p,!0,o,y,x,C,$,Y),o.context=VS(null),l=o.current,p=Bn(),y=po(l),x=Ci(p,y),x.callback=a!=null?a:null,uo(l,x,y),o.current.lanes=y,$u(o,y,p),Jn(o,p),o}function ff(o,a,l,p){var y=a.current,x=Bn(),C=po(y);return l=VS(l),a.context===null?a.context=l:a.pendingContext=l,a=Ci(x,C),a.payload={element:o},p=p===void 0?null:p,p!==null&&(a.callback=p),o=uo(y,a,C),o!==null&&(jr(o,y,C,x),$d(o,y,C)),C}function pf(o){return o=o.current,o.child?(o.child.tag===5,o.child.stateNode):null}function WS(o,a){if(o=o.memoizedState,o!==null&&o.dehydrated!==null){var l=o.retryLane;o.retryLane=l!==0&&l<a?l:a}}function O0(o,a){WS(o,a),(o=o.alternate)&&WS(o,a)}function Dz(){return null}var YS=typeof reportError=="function"?reportError:function(o){console.error(o)};function P0(o){this._internalRoot=o}hf.prototype.render=P0.prototype.render=function(o){var a=this._internalRoot;if(a===null)throw Error(n(409));ff(o,a,null,null)},hf.prototype.unmount=P0.prototype.unmount=function(){var o=this._internalRoot;if(o!==null){this._internalRoot=null;var a=o.containerInfo;cs(function(){ff(null,o,null,null)}),a[_i]=null}};function hf(o){this._internalRoot=o}hf.prototype.unstable_scheduleHydration=function(o){if(o){var a=Iv();o={blockedOn:null,target:o,priority:a};for(var l=0;l<eo.length&&a!==0&&a<eo[l].priority;l++);eo.splice(l,0,o),l===0&&Rv(o)}};function R0(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11)}function mf(o){return!(!o||o.nodeType!==1&&o.nodeType!==9&&o.nodeType!==11&&(o.nodeType!==8||o.nodeValue!==" react-mount-point-unstable "))}function GS(){}function Mz(o,a,l,p,y){if(y){if(typeof p=="function"){var x=p;p=function(){var oe=pf(C);x.call(oe)}}var C=qS(a,p,o,0,null,!1,!1,"",GS);return o._reactRootContainer=C,o[_i]=C.current,nc(o.nodeType===8?o.parentNode:o),cs(),C}for(;y=o.lastChild;)o.removeChild(y);if(typeof p=="function"){var $=p;p=function(){var oe=pf(Y);$.call(oe)}}var Y=I0(o,0,!1,null,null,!1,!1,"",GS);return o._reactRootContainer=Y,o[_i]=Y.current,nc(o.nodeType===8?o.parentNode:o),cs(function(){ff(a,Y,l,p)}),Y}function gf(o,a,l,p,y){var x=l._reactRootContainer;if(x){var C=x;if(typeof y=="function"){var $=y;y=function(){var Y=pf(C);$.call(Y)}}ff(a,C,o,y)}else C=Mz(l,a,o,y,p);return pf(C)}Cv=function(o){switch(o.tag){case 3:var a=o.stateNode;if(a.current.memoizedState.isDehydrated){var l=Hu(a.pendingLanes);l!==0&&(rg(a,l|1),Jn(a,at()),(xt&6)===0&&(Na=at()+500,so()))}break;case 13:cs(function(){var p=ki(o,1);if(p!==null){var y=Bn();jr(p,o,1,y)}}),O0(o,1)}},ig=function(o){if(o.tag===13){var a=ki(o,134217728);if(a!==null){var l=Bn();jr(a,o,134217728,l)}O0(o,134217728)}},Nv=function(o){if(o.tag===13){var a=po(o),l=ki(o,a);if(l!==null){var p=Bn();jr(l,o,a,p)}O0(o,a)}},Iv=function(){return vt},Ov=function(o,a){var l=vt;try{return vt=o,a()}finally{vt=l}},Qo=function(o,a,l){switch(a){case"input":if(Ve(o,l),a=l.name,l.type==="radio"&&a!=null){for(l=o;l.parentNode;)l=l.parentNode;for(l=l.querySelectorAll("input[name="+JSON.stringify(""+a)+'][type="radio"]'),a=0;a<l.length;a++){var p=l[a];if(p!==o&&p.form===o.form){var y=Pd(p);if(!y)throw Error(n(90));ct(p),Ve(p,y)}}}break;case"textarea":sr(o,l);break;case"select":a=l.value,a!=null&&jt(o,!!l.multiple,a,!1)}},yr=v0,Wi=cs;var Fz={usingClientEntryPoint:!1,Events:[oc,ga,Pd,Mu,Fu,v0]},bc={findFiberByHostInstance:ts,bundleType:0,version:"18.3.1",rendererPackageName:"react-dom"},Bz={bundleType:bc.bundleType,version:bc.version,rendererPackageName:bc.rendererPackageName,rendererConfig:bc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:U.ReactCurrentDispatcher,findHostInstanceByFiber:function(o){return o=$e(o),o===null?null:o.stateNode},findFiberByHostInstance:bc.findFiberByHostInstance||Dz,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 yf=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!yf.isDisabled&&yf.supportsFiber)try{Zo=yf.inject(Bz),ar=yf}catch(o){}}return Hn.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Fz,Hn.createPortal=function(o,a){var l=2<arguments.length&&arguments[2]!==void 0?arguments[2]:null;if(!R0(a))throw Error(n(200));return Lz(o,a,null,l)},Hn.createRoot=function(o,a){if(!R0(o))throw Error(n(299));var l=!1,p="",y=YS;return a!=null&&(a.unstable_strictMode===!0&&(l=!0),a.identifierPrefix!==void 0&&(p=a.identifierPrefix),a.onRecoverableError!==void 0&&(y=a.onRecoverableError)),a=I0(o,1,!1,null,null,l,!1,p,y),o[_i]=a.current,nc(o.nodeType===8?o.parentNode:o),new P0(a)},Hn.findDOMNode=function(o){if(o==null)return null;if(o.nodeType===1)return o;var a=o._reactInternals;if(a===void 0)throw typeof o.render=="function"?Error(n(188)):(o=Object.keys(o).join(","),Error(n(268,o)));return o=$e(a),o=o===null?null:o.stateNode,o},Hn.flushSync=function(o){return cs(o)},Hn.hydrate=function(o,a,l){if(!mf(a))throw Error(n(200));return gf(null,o,a,!0,l)},Hn.hydrateRoot=function(o,a,l){if(!R0(o))throw Error(n(405));var p=l!=null&&l.hydratedSources||null,y=!1,x="",C=YS;if(l!=null&&(l.unstable_strictMode===!0&&(y=!0),l.identifierPrefix!==void 0&&(x=l.identifierPrefix),l.onRecoverableError!==void 0&&(C=l.onRecoverableError)),a=qS(a,null,o,1,l!=null?l:null,y,!1,x,C),o[_i]=a.current,nc(o),p)for(o=0;o<p.length;o++)l=p[o],y=l._getVersion,y=y(l._source),a.mutableSourceEagerHydrationData==null?a.mutableSourceEagerHydrationData=[l,y]:a.mutableSourceEagerHydrationData.push(l,y);return new hf(a)},Hn.render=function(o,a,l){if(!mf(a))throw Error(n(200));return gf(null,o,a,!1,l)},Hn.unmountComponentAtNode=function(o){if(!mf(o))throw Error(n(40));return o._reactRootContainer?(cs(function(){gf(null,null,o,!1,function(){o._reactRootContainer=null,o[_i]=null})}),!0):!1},Hn.unstable_batchedUpdates=v0,Hn.unstable_renderSubtreeIntoContainer=function(o,a,l,p){if(!mf(l))throw Error(n(200));if(o==null||o._reactInternals===void 0)throw Error(n(38));return gf(o,a,l,!1,p)},Hn.version="18.3.1-next-f1338f8080-20240426",Hn}var kE;function CE(){if(kE)return Dp.exports;kE=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(),Dp.exports=tO(),Dp.exports}var Ns=CE();function NE(e){var t,n,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var i=e.length;for(t=0;t<i;t++)e[t]&&(n=NE(e[t]))&&(r&&(r+=" "),r+=n)}else for(n in e)e[n]&&(r&&(r+=" "),r+=n);return r}function D(){for(var e,t,n=0,r="",i=arguments.length;n<i;n++)(e=arguments[n])&&(t=NE(e))&&(r&&(r+=" "),r+=t);return r}const nO=()=>document.querySelector(`:is(input, textarea)[name="${N}-user-input"]:not(:disabled)`),Bp=()=>{var e;return(e=nO())!=null?e:document.querySelector(`.${N}-dialog-content, .${N}-modal-content`)},rO=()=>{var e;return(e=Bp())==null?void 0:e.focus({preventScroll:!0})},ol=()=>{const e=()=>{const n=document.querySelector(`.${N}-minimized-button:not([aria-hidden="true"])`);return n==null||n.focus({preventScroll:!0}),!!n};if(e())return;const t=new MutationObserver(()=>{e()&&t.disconnect()});t.observe(document.body,{childList:!0,subtree:!0}),setTimeout(()=>t.disconnect(),1e3)};var IE={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},OE=Eo.createContext&&Eo.createContext(IE),iO=["attr","size","title"];function oO(e,t){if(e==null)return{};var n=sO(e,t),r,i;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(e);for(i=0;i<s.length;i++)r=s[i],!(t.indexOf(r)>=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function sO(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 sl(){return sl=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},sl.apply(this,arguments)}function PE(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(e,i).enumerable})),n.push.apply(n,r)}return n}function al(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]!=null?arguments[t]:{};t%2?PE(Object(n),!0).forEach(function(r){aO(e,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):PE(Object(n)).forEach(function(r){Object.defineProperty(e,r,Object.getOwnPropertyDescriptor(n,r))})}return e}function aO(e,t,n){return t=uO(t),t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function uO(e){var t=cO(e,"string");return typeof t=="symbol"?t:t+""}function cO(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 RE(e){return e&&e.map((t,n)=>Eo.createElement(t.tag,al({key:n},t.attr),RE(t.child)))}function ut(e){return t=>Eo.createElement(lO,sl({attr:al({},e.attr)},t),RE(e.child))}function lO(e){var t=n=>{var{attr:r,size:i,title:s}=e,u=oO(e,iO),c=i||n.size||"1em",d;return n.className&&(d=n.className),e.className&&(d=(d?d+" ":"")+e.className),Eo.createElement("svg",sl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,u,{className:d,style:al(al({color:e.color||n.color},n.style),e.style),height:c,width:c,xmlns:"http://www.w3.org/2000/svg"}),s&&Eo.createElement("title",null,s),e.children)};return OE!==void 0?Eo.createElement(OE.Consumer,null,n=>t(n)):t(IE)}function dO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M5.25 12a.75.75 0 0 1 .75-.75h12a.75.75 0 0 1 0 1.5H6a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function LE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M12 5.25a.75.75 0 0 1 .75.75v5.25H18a.75.75 0 0 1 0 1.5h-5.25V18a.75.75 0 0 1-1.5 0v-5.25H6a.75.75 0 0 1 0-1.5h5.25V6a.75.75 0 0 1 .75-.75Z",clipRule:"evenodd"},child:[]}]})(e)}function fO(e){return ut({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 kr=({className:e,iconUrl:t,icon:n,type:r="button",ariaLabel:i,title:s,disabled:u=!1,onClick:c})=>!n&&!t?null:w.jsx("button",{className:D(e,`${N}-icon-button`),type:r,"aria-label":i,title:s,onClick:c,disabled:u,children:t?w.jsx("img",{className:D(`${N}-icon-image`),src:t,alt:i,loading:"lazy"}):n}),pO="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",hO=({onClick:e})=>{const{globalClassName:t,headerConfig:n,launcherAriaLabel:r,mode:i}=st(),s=i==="messaging",c=r||(s?"Open Commerce Client":"Open Copilot"),d=s?w.jsx(fO,{className:D(t,`${N}-minimized-icon`)}):w.jsx("img",{src:(n==null?void 0:n.logoUrl)||pO,alt:"Copilot",className:D(t,`${N}-minimized-icon-img`)});return w.jsx(kr,{className:D(t,`${N}-minimized-button`),ariaLabel:c,title:c,icon:d,onClick:e})},mO=()=>{const{globalClassName:e,themeVariables:t,layoutPreset:n}=st(),r=()=>{wo(!1),zr(!0),setTimeout(rO)};return Ns.createPortal(w.jsx("div",{className:D(e,`${N}-minimized-container`,`${N}-layout-${n}`),style:t,children:w.jsx(hO,{onClick:r})}),document.body)};function gO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"M3.5 8a5.5 5.5 0 1 1 8.596 4.547 9.005 9.005 0 0 1 5.9 8.18.751.751 0 0 1-1.5.045 7.5 7.5 0 0 0-14.993 0 .75.75 0 0 1-1.499-.044 9.005 9.005 0 0 1 5.9-8.181A5.496 5.496 0 0 1 3.5 8ZM9 4a4 4 0 1 0 0 8 4 4 0 0 0 0-8Zm8.29 4c-.148 0-.292.01-.434.03a.75.75 0 1 1-.212-1.484 4.53 4.53 0 0 1 3.38 8.097 6.69 6.69 0 0 1 3.956 6.107.75.75 0 0 1-1.5 0 5.193 5.193 0 0 0-3.696-4.972l-.534-.16v-1.676l.41-.209A3.03 3.03 0 0 0 17.29 8Z"},child:[]}]})(e)}function DE(e){return ut({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 yO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 19H5V5h7V3H5a2 2 0 0 0-2 2v14a2 2 0 0 0 2 2h14c1.1 0 2-.9 2-2v-7h-2v7zM14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3h-7z"},child:[]}]})(e)}function Up(e){return ut({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 EO(e){return ut({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 bO(e){return ut({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 jp(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"m12 4-1.41 1.41L16.17 11H4v2h12.17l-5.58 5.59L12 20l8-8z"},child:[]}]})(e)}function wO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M9 16.17 4.83 12l-1.42 1.41L9 19 21 7l-1.41-1.41z"},child:[]}]})(e)}function xO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"},child:[]}]})(e)}function ME(e){return ut({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 FE(e){return ut({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 TO(e){return ut({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 _O(e){return ut({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 vO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0z"},child:[]},{tag:"path",attr:{d:"M17.65 6.35A7.958 7.958 0 0 0 12 4c-4.42 0-7.99 3.58-7.99 8s3.57 8 7.99 8c3.73 0 6.84-2.55 7.73-6h-2.08A5.99 5.99 0 0 1 12 18c-3.31 0-6-2.69-6-6s2.69-6 6-6c1.66 0 3.14.69 4.22 1.78L13 11h7V4l-2.35 2.35z"},child:[]}]})(e)}function SO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M15.55 13c.75 0 1.41-.41 1.75-1.03l3.58-6.49A.996.996 0 0 0 20.01 4H5.21l-.94-2H1v2h2l3.6 7.59-1.35 2.44C4.52 15.37 5.48 17 7 17h12v-2H7l1.1-2h7.45zM6.16 6h12.15l-2.76 5H8.53L6.16 6zM7 18c-1.1 0-1.99.9-1.99 2S5.9 22 7 22s2-.9 2-2-.9-2-2-2zm10 0c-1.1 0-1.99.9-1.99 2s.89 2 1.99 2 2-.9 2-2-.9-2-2-2z"},child:[]}]})(e)}function AO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18.59 10.52c1.05.51 2.04 1.15 2.96 1.91l-1.07 1.07c-.58-.47-1.21-.89-1.88-1.27v-1.71m-13.2 0v1.7c-.65.37-1.28.79-1.87 1.27l-1.07-1.07c.91-.75 1.9-1.38 2.94-1.9M12 7C7.46 7 3.34 8.78.29 11.67c-.18.18-.29.43-.29.71s.11.53.29.7l2.48 2.48c.18.18.43.29.71.29.27 0 .52-.1.7-.28.79-.73 1.68-1.36 2.66-1.85.33-.16.56-.51.56-.9v-3.1C8.85 9.25 10.4 9 12 9s3.15.25 4.59.73v3.1c0 .4.23.74.56.9.98.49 1.88 1.11 2.67 1.85.18.17.43.28.7.28.28 0 .53-.11.71-.29l2.48-2.48c.18-.18.29-.43.29-.71s-.11-.53-.29-.71A16.971 16.971 0 0 0 12 7z"},child:[]}]})(e)}function kO(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"M18 20H4V6h9V4H4c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2v-9h-2v9zm-7.79-3.17-1.96-2.36L5.5 18h11l-3.54-4.71zM20 4V1h-2v3h-3c.01.01 0 2 0 2h3v2.99c.01.01 2 0 2 0V6h3V4h-3z"},child:[]}]})(e)}function CO(e){return ut({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)}function BE(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{fill:"none",d:"M0 0h24v24H0V0z"},child:[]},{tag:"path",attr:{d:"m21.41 11.58-9-9C12.05 2.22 11.55 2 11 2H4c-1.1 0-2 .9-2 2v7c0 .55.22 1.05.59 1.42l9 9c.36.36.86.58 1.41.58s1.05-.22 1.41-.59l7-7c.37-.36.59-.86.59-1.41s-.23-1.06-.59-1.42zM13 20.01 4 11V4h7v-.01l9 9-7 7.02z"},child:[]},{tag:"circle",attr:{cx:"6.5",cy:"6.5",r:"1.5"},child:[]}]})(e)}function NO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"12",y1:"5",x2:"12",y2:"19"},child:[]},{tag:"polyline",attr:{points:"19 12 12 19 5 12"},child:[]}]})(e)}function UE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"19",y1:"12",x2:"5",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 19 5 12 12 5"},child:[]}]})(e)}function jE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"5",y1:"12",x2:"19",y2:"12"},child:[]},{tag:"polyline",attr:{points:"12 5 19 12 12 19"},child:[]}]})(e)}function IO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"16.5",y1:"9.4",x2:"7.5",y2:"4.21"},child:[]},{tag:"path",attr:{d:"M21 16V8a2 2 0 0 0-1-1.73l-7-4a2 2 0 0 0-2 0l-7 4A2 2 0 0 0 3 8v8a2 2 0 0 0 1 1.73l7 4a2 2 0 0 0 2 0l7-4A2 2 0 0 0 21 16z"},child:[]},{tag:"polyline",attr:{points:"3.27 6.96 12 12.01 20.73 6.96"},child:[]},{tag:"line",attr:{x1:"12",y1:"22.08",x2:"12",y2:"12"},child:[]}]})(e)}function HE(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"circle",attr:{cx:"11",cy:"11",r:"8"},child:[]},{tag:"line",attr:{x1:"21",y1:"21",x2:"16.65",y2:"16.65"},child:[]}]})(e)}function OO(e){return ut({attr:{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},child:[{tag:"line",attr:{x1:"18",y1:"6",x2:"6",y2:"18"},child:[]},{tag:"line",attr:{x1:"6",y1:"6",x2:"18",y2:"18"},child:[]}]})(e)}function zt(){const e=k.useContext(jy);if(!e)throw new Error("useMessaging must be used within a MessagingProvider");return e}const PO=e=>({[`${er}-header-background-color`]:(e==null?void 0:e.headerBackgroundColor)||"transparent",[`${er}-header-text-color`]:(e==null?void 0:e.headerTextColor)||"inherit",[`${er}-header-text-font-size`]:(e==null?void 0:e.headerTextFontSize)||"1.25rem",[`${er}-header-text-font-weight`]:(e==null?void 0:e.headerTextFontWeight)!=null?String(e.headerTextFontWeight):"bold",[`${er}-header-text-font-family`]:(e==null?void 0:e.headerTextFontFamily)||"inherit",[`${er}-header-text-text-align`]:(e==null?void 0:e.headerTextTextAlign)||"left"}),RO=(e,t,n)=>e.size>n?{ok:!1,reason:"oversize"}:t.includes(e.type)?{ok:!0}:{ok:!1,reason:"type"},LO=({allowedMime:e=I1,maxBytes:t=Vf,onReject:n}={})=>{const[r,i]=k.useState(null),s=k.useCallback(c=>{const d=c&&"length"in c?c[0]:null;if(!d)return;const f=RO(d,e,t);if(!f.ok){n==null||n(f.reason);return}i(d)},[e,t,n]),u=k.useCallback(()=>i(null),[]);return{file:r,attach:s,clear:u}},Hp=({className:e,label:t="Close",onClick:n,disabled:r=!1})=>w.jsx("button",{"aria-label":t,title:t,className:D(e,`${N}-close-button`),disabled:r,onClick:n,type:"button",children:w.jsx("svg",{"aria-hidden":"true",focusable:"false",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 20",width:"16",height:"16",fill:"currentColor",children:w.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"})})}),DO=({file:e,componentType:t,globalClassName:n,onRemove:r})=>{const i=e.name||"",[s,u]=k.useState("");return k.useEffect(()=>{const c=URL.createObjectURL(e);return u(c),()=>URL.revokeObjectURL(c)},[e]),w.jsxs("div",{className:D(n,`cim-${t}-component`,`${N}-image-file-preview`),children:[w.jsx("img",{className:D(n,`cim-${t}-component`,`${N}-image-preview`),src:s,alt:`${i} preview`,loading:"lazy"}),w.jsx("span",{className:D(n,`cim-${t}-component`,`${N}-image-file-name`),title:i,children:i}),w.jsx(Hp,{className:D(`cim-${t}-component`,"clear-attachment"),label:"Remove image",onClick:r})]})},MO=({componentType:e,accept:t,disabled:n=!1,inputId:r,globalClassName:i,className:s,icon:u=w.jsx(CO,{}),onFiles:c})=>{const d=k.useRef(null),f=k.useId(),h=r!=null?r:f,m=k.useCallback(()=>{var b;return(b=d.current)==null?void 0:b.click()},[]),E=k.useCallback(b=>{const T=b.target;c(T.files),T.value=""},[c]);return w.jsxs("button",{type:"button",className:D(i,s,`cim-${e}-component`,n&&"disabled",`${N}-image-upload-button`),disabled:n,"aria-label":"Upload an image",onClick:m,children:[w.jsx("span",{className:D(i,s,`cim-${e}-component`,n&&"disabled",`${N}-image-upload-label`),"aria-hidden":"true",children:u}),w.jsx("input",{ref:d,className:D(i,s,`cim-${e}-component`,`${N}-file-input`),type:"file",id:h,accept:t,name:`${N}-file-input`,disabled:n,onInput:E})]})},$p=({className:e,children:t,type:n,disabled:r=!1,onClick:i,"aria-label":s})=>w.jsx("button",{"aria-label":s,className:D(`${N}-button`,e,{disabled:r}),type:n||"button",disabled:r,onClick:i,children:t}),FO=({searchConfig:e,globalClassName:t})=>{const n=e.buttonIconUrl,r=e.buttonIcon==="arrow"?jp:Up;return n?w.jsx("img",{className:D(`${N}-search-button-icon-image`,t),src:n,alt:"",loading:"lazy"}):w.jsx(r,{size:"16px"})},BO=({className:e,searchConfig:t,globalClassName:n,componentType:r,isLoading:i})=>{if((t==null?void 0:t.buttonType)==="icon"){const u=t.buttonIcon==="arrow"?jp:Up;return w.jsx(kr,{className:D(e,n,`cim-${r}-component`,`${N}-search-button-icon`),type:"submit",disabled:i,ariaLabel:(t==null?void 0:t.buttonAriaLabel)||(t==null?void 0:t.buttonLabel)||"Send message",icon:t!=null&&t.buttonIconUrl?null:w.jsx(u,{size:"16px"}),iconUrl:t==null?void 0:t.buttonIconUrl})}const s=(t==null?void 0:t.buttonType)==="icon-text";return w.jsxs($p,{className:D(e,n,`cim-${r}-component`,`${N}-search-button`),type:"submit","aria-label":(t==null?void 0:t.buttonAriaLabel)||"",disabled:i,children:[s&&w.jsx(FO,{globalClassName:n,searchConfig:t}),(t==null?void 0:t.buttonLabel)||"Search"]})};function hV(){}function mV(){}function $E(e){const t=[],n=String(e||"");let r=n.indexOf(","),i=0,s=!1;for(;!s;){r===-1&&(r=n.length,s=!0);const u=n.slice(i,r).trim();(u||!s)&&t.push(u),i=r+1,r=n.indexOf(",",i)}return t}function zE(e,t){const n={};return(e[e.length-1]===""?[...e,""]:e).join((n.padRight?" ":"")+","+(n.padLeft===!1?"":" ")).trim()}const UO=/^[$_\p{ID_Start}][$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,jO=/^[$_\p{ID_Start}][-$_\u{200C}\u{200D}\p{ID_Continue}]*$/u,HO={};function VE(e,t){return(HO.jsx?jO:UO).test(e)}const $O=/[ \t\n\f\r]/g;function zO(e){return typeof e=="object"?e.type==="text"?qE(e.value):!1:qE(e)}function qE(e){return e.replace($O,"")===""}class Ja{constructor(t,n,r){this.normal=n,this.property=t,r&&(this.space=r)}}Ja.prototype.normal={},Ja.prototype.property={},Ja.prototype.space=void 0;function WE(e,t){const n={},r={};for(const i of e)Object.assign(n,i.property),Object.assign(r,i.normal);return new Ja(n,r,t)}function Za(e){return e.toLowerCase()}class $n{constructor(t,n){this.attribute=n,this.property=t}}$n.prototype.attribute="",$n.prototype.booleanish=!1,$n.prototype.boolean=!1,$n.prototype.commaOrSpaceSeparated=!1,$n.prototype.commaSeparated=!1,$n.prototype.defined=!1,$n.prototype.mustUseProperty=!1,$n.prototype.number=!1,$n.prototype.overloadedBoolean=!1,$n.prototype.property="",$n.prototype.spaceSeparated=!1,$n.prototype.space=void 0;let VO=0;const ot=Oo(),rn=Oo(),zp=Oo(),Ae=Oo(),Ct=Oo(),Io=Oo(),rr=Oo();function Oo(){return bf(2,++VO)}const Vp=Object.freeze(Object.defineProperty({__proto__:null,boolean:ot,booleanish:rn,commaOrSpaceSeparated:rr,commaSeparated:Io,number:Ae,overloadedBoolean:zp,spaceSeparated:Ct},Symbol.toStringTag,{value:"Module"})),qp=Object.keys(Vp);class Wp extends $n{constructor(t,n,r,i){let s=-1;if(super(t,n),YE(this,"space",i),typeof r=="number")for(;++s<qp.length;){const u=qp[s];YE(this,qp[s],(r&Vp[u])===Vp[u])}}}Wp.prototype.defined=!0;function YE(e,t,n){n&&(e[t]=n)}function Is(e){const t={},n={};for(const[r,i]of Object.entries(e.properties)){const s=new Wp(r,e.transform(e.attributes||{},r),i,e.space);e.mustUseProperty&&e.mustUseProperty.includes(r)&&(s.mustUseProperty=!0),t[r]=s,n[Za(r)]=r,n[Za(s.attribute)]=r}return new Ja(t,n,e.space)}const GE=Is({properties:{ariaActiveDescendant:null,ariaAtomic:rn,ariaAutoComplete:null,ariaBusy:rn,ariaChecked:rn,ariaColCount:Ae,ariaColIndex:Ae,ariaColSpan:Ae,ariaControls:Ct,ariaCurrent:null,ariaDescribedBy:Ct,ariaDetails:null,ariaDisabled:rn,ariaDropEffect:Ct,ariaErrorMessage:null,ariaExpanded:rn,ariaFlowTo:Ct,ariaGrabbed:rn,ariaHasPopup:null,ariaHidden:rn,ariaInvalid:null,ariaKeyShortcuts:null,ariaLabel:null,ariaLabelledBy:Ct,ariaLevel:Ae,ariaLive:null,ariaModal:rn,ariaMultiLine:rn,ariaMultiSelectable:rn,ariaOrientation:null,ariaOwns:Ct,ariaPlaceholder:null,ariaPosInSet:Ae,ariaPressed:rn,ariaReadOnly:rn,ariaRelevant:null,ariaRequired:rn,ariaRoleDescription:Ct,ariaRowCount:Ae,ariaRowIndex:Ae,ariaRowSpan:Ae,ariaSelected:rn,ariaSetSize:Ae,ariaSort:null,ariaValueMax:Ae,ariaValueMin:Ae,ariaValueNow:Ae,ariaValueText:null,role:null},transform(e,t){return t==="role"?t:"aria-"+t.slice(4).toLowerCase()}});function XE(e,t){return t in e?e[t]:t}function KE(e,t){return XE(e,t.toLowerCase())}const qO=Is({attributes:{acceptcharset:"accept-charset",classname:"class",htmlfor:"for",httpequiv:"http-equiv"},mustUseProperty:["checked","multiple","muted","selected"],properties:{abbr:null,accept:Io,acceptCharset:Ct,accessKey:Ct,action:null,allow:null,allowFullScreen:ot,allowPaymentRequest:ot,allowUserMedia:ot,alpha:ot,alt:null,as:null,async:ot,autoCapitalize:null,autoComplete:Ct,autoFocus:ot,autoPlay:ot,blocking:Ct,capture:null,charSet:null,checked:ot,cite:null,className:Ct,closedBy:null,colorSpace:null,cols:Ae,colSpan:Ae,command:null,commandFor:null,content:null,contentEditable:rn,controls:ot,controlsList:Ct,coords:Ae|Io,crossOrigin:null,data:null,dateTime:null,decoding:null,default:ot,defer:ot,dir:null,dirName:null,disabled:ot,download:zp,draggable:rn,encType:null,enterKeyHint:null,fetchPriority:null,form:null,formAction:null,formEncType:null,formMethod:null,formNoValidate:ot,formTarget:null,headers:Ct,height:Ae,hidden:zp,high:Ae,href:null,hrefLang:null,htmlFor:Ct,httpEquiv:Ct,id:null,imageSizes:null,imageSrcSet:null,inert:ot,inputMode:null,integrity:null,is:null,isMap:ot,itemId:null,itemProp:Ct,itemRef:Ct,itemScope:ot,itemType:Ct,kind:null,label:null,lang:null,language:null,list:null,loading:null,loop:ot,low:Ae,manifest:null,max:null,maxLength:Ae,media:null,method:null,min:null,minLength:Ae,multiple:ot,muted:ot,name:null,nonce:null,noModule:ot,noValidate:ot,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:ot,optimum:Ae,pattern:null,ping:Ct,placeholder:null,playsInline:ot,popover:null,popoverTarget:null,popoverTargetAction:null,poster:null,preload:null,readOnly:ot,referrerPolicy:null,rel:Ct,required:ot,reversed:ot,rows:Ae,rowSpan:Ae,sandbox:Ct,scope:null,scoped:ot,seamless:ot,selected:ot,shadowRootClonable:ot,shadowRootCustomElementRegistry:ot,shadowRootDelegatesFocus:ot,shadowRootMode:null,shadowRootSerializable:ot,shape:null,size:Ae,sizes:null,slot:null,span:Ae,spellCheck:rn,src:null,srcDoc:null,srcLang:null,srcSet:null,start:Ae,step:null,style:null,tabIndex:Ae,target:null,title:null,translate:null,type:null,typeMustMatch:ot,useMap:null,value:rn,width:Ae,wrap:null,writingSuggestions:null,align:null,aLink:null,archive:Ct,axis:null,background:null,bgColor:null,border:Ae,borderColor:null,bottomMargin:Ae,cellPadding:null,cellSpacing:null,char:null,charOff:null,classId:null,clear:null,code:null,codeBase:null,codeType:null,color:null,compact:ot,declare:ot,event:null,face:null,frame:null,frameBorder:null,hSpace:Ae,leftMargin:Ae,link:null,longDesc:null,lowSrc:null,marginHeight:Ae,marginWidth:Ae,noResize:ot,noHref:ot,noShade:ot,noWrap:ot,object:null,profile:null,prompt:null,rev:null,rightMargin:Ae,rules:null,scheme:null,scrolling:rn,standby:null,summary:null,text:null,topMargin:Ae,valueType:null,version:null,vAlign:null,vLink:null,vSpace:Ae,allowTransparency:null,autoCorrect:null,autoSave:null,credentialless:ot,disablePictureInPicture:ot,disableRemotePlayback:ot,exportParts:Io,part:Ct,prefix:null,property:null,results:Ae,security:null,unselectable:null},space:"html",transform:KE}),WO=Is({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:rr,accentHeight:Ae,accumulate:null,additive:null,alignmentBaseline:null,alphabetic:Ae,amplitude:Ae,arabicForm:null,ascent:Ae,attributeName:null,attributeType:null,azimuth:Ae,bandwidth:null,baselineShift:null,baseFrequency:null,baseProfile:null,bbox:null,begin:null,bias:Ae,by:null,calcMode:null,capHeight:Ae,className:Ct,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:Ae,diffuseConstant:Ae,direction:null,display:null,dur:null,divisor:Ae,dominantBaseline:null,download:ot,dx:null,dy:null,edgeMode:null,editable:null,elevation:Ae,enableBackground:null,end:null,event:null,exponent:Ae,externalResourcesRequired:null,fill:null,fillOpacity:Ae,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:Io,g2:Io,glyphName:Io,glyphOrientationHorizontal:null,glyphOrientationVertical:null,glyphRef:null,gradientTransform:null,gradientUnits:null,handler:null,hanging:Ae,hatchContentUnits:null,hatchUnits:null,height:null,href:null,hrefLang:null,horizAdvX:Ae,horizOriginX:Ae,horizOriginY:Ae,id:null,ideographic:Ae,imageRendering:null,initialVisibility:null,in:null,in2:null,intercept:Ae,k:Ae,k1:Ae,k2:Ae,k3:Ae,k4:Ae,kernelMatrix:rr,kernelUnitLength:null,keyPoints:null,keySplines:null,keyTimes:null,kerning:null,lang:null,lengthAdjust:null,letterSpacing:null,lightingColor:null,limitingConeAngle:Ae,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:Ae,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:Ae,overlineThickness:Ae,paintOrder:null,panose1:null,path:null,pathLength:Ae,patternContentUnits:null,patternTransform:null,patternUnits:null,phase:null,ping:Ct,pitch:null,playbackOrder:null,pointerEvents:null,points:null,pointsAtX:Ae,pointsAtY:Ae,pointsAtZ:Ae,preserveAlpha:null,preserveAspectRatio:null,primitiveUnits:null,propagate:null,property:rr,r:null,radius:null,referrerPolicy:null,refX:null,refY:null,rel:rr,rev:rr,renderingIntent:null,repeatCount:null,repeatDur:null,requiredExtensions:rr,requiredFeatures:rr,requiredFonts:rr,requiredFormats:rr,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:Ae,specularExponent:Ae,spreadMethod:null,spacing:null,startOffset:null,stdDeviation:null,stemh:null,stemv:null,stitchTiles:null,stopColor:null,stopOpacity:null,strikethroughPosition:Ae,strikethroughThickness:Ae,string:null,stroke:null,strokeDashArray:rr,strokeDashOffset:null,strokeLineCap:null,strokeLineJoin:null,strokeMiterLimit:Ae,strokeOpacity:Ae,strokeWidth:null,style:null,surfaceScale:Ae,syncBehavior:null,syncBehaviorDefault:null,syncMaster:null,syncTolerance:null,syncToleranceDefault:null,systemLanguage:rr,tabIndex:Ae,tableValues:null,target:null,targetX:Ae,targetY:Ae,textAnchor:null,textDecoration:null,textRendering:null,textLength:null,timelineBegin:null,title:null,transformBehavior:null,type:null,typeOf:rr,to:null,transform:null,transformOrigin:null,u1:null,u2:null,underlinePosition:Ae,underlineThickness:Ae,unicode:null,unicodeBidi:null,unicodeRange:null,unitsPerEm:Ae,values:null,vAlphabetic:Ae,vMathematical:Ae,vectorEffect:null,vHanging:Ae,vIdeographic:Ae,version:null,vertAdvY:Ae,vertOriginX:Ae,vertOriginY:Ae,viewBox:null,viewTarget:null,visibility:null,width:null,widths:null,wordSpacing:null,writingMode:null,x:null,x1:null,x2:null,xChannelSelector:null,xHeight:Ae,y:null,y1:null,y2:null,yChannelSelector:null,z:null,zoomAndPan:null},space:"svg",transform:XE}),QE=Is({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()}}),JE=Is({attributes:{xmlnsxlink:"xmlns:xlink"},properties:{xmlnsXLink:null,xmlns:null},space:"xmlns",transform:KE}),ZE=Is({properties:{xmlBase:null,xmlLang:null,xmlSpace:null},space:"xml",transform(e,t){return"xml:"+t.slice(3).toLowerCase()}}),YO={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"},GO=/[A-Z]/g,eb=/-[a-z]/g,XO=/^data[-\w.:]+$/i;function ul(e,t){const n=Za(t);let r=t,i=$n;if(n in e.normal)return e.property[e.normal[n]];if(n.length>4&&n.slice(0,4)==="data"&&XO.test(t)){if(t.charAt(4)==="-"){const s=t.slice(5).replace(eb,QO);r="data"+s.charAt(0).toUpperCase()+s.slice(1)}else{const s=t.slice(4);if(!eb.test(s)){let u=s.replace(GO,KO);u.charAt(0)!=="-"&&(u="-"+u),t="data"+u}}i=Wp}return new i(r,t)}function KO(e){return"-"+e.toLowerCase()}function QO(e){return e.charAt(1).toUpperCase()}const eu=WE([GE,qO,QE,JE,ZE],"html"),Li=WE([GE,WO,QE,JE,ZE],"svg");function tb(e){const t=String(e||"").trim();return t?t.split(/[ \t\n\r\f]+/g):[]}function nb(e){return e.join(" ").trim()}var Os={},Yp,rb;function JO(){if(rb)return Yp;rb=1;var e=/\/\*[^*]*\*+([^/*][^*]*\*+)*\//g,t=/\n/g,n=/^\s*/,r=/^(\*?[-#/*\\\w]+(\[[0-9a-z_-]+\])?)\s*/,i=/^:\s*/,s=/^((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};])+)/,u=/^[;\s]*/,c=/^\s+|\s+$/g,d=`
24
24
  `,f="/",h="*",m="",E="comment",b="declaration";function T(I,v){if(typeof I!="string")throw new TypeError("First argument must be a string");if(!I)return[];v=v||{};var S=1,R=1;function U(V){var ue=V.match(t);ue&&(S+=ue.length);var fe=V.lastIndexOf(d);R=~fe?V.length-fe:R+V.length}function B(){var V={line:S,column:R};return function(ue){return ue.position=new A(V),re(),ue}}function A(V){this.start=V,this.end={line:S,column:R},this.source=v.source}A.prototype.content=I;function G(V){var ue=new Error(v.source+":"+S+":"+R+": "+V);if(ue.reason=V,ue.filename=v.source,ue.line=S,ue.column=R,ue.source=I,!v.silent)throw ue}function W(V){var ue=V.exec(I);if(ue){var fe=ue[0];return U(fe),I=I.slice(fe.length),ue}}function re(){W(n)}function H(V){var ue;for(V=V||[];ue=ee();)ue!==!1&&V.push(ue);return V}function ee(){var V=B();if(!(f!=I.charAt(0)||h!=I.charAt(1))){for(var ue=2;m!=I.charAt(ue)&&(h!=I.charAt(ue)||f!=I.charAt(ue+1));)++ue;if(ue+=2,m===I.charAt(ue-1))return G("End of comment missing");var fe=I.slice(2,ue-2);return R+=2,U(fe),I=I.slice(ue),R+=2,V({type:E,comment:fe})}}function Q(){var V=B(),ue=W(r);if(ue){if(ee(),!W(i))return G("property missing ':'");var fe=W(s),ae=V({type:b,property:_(ue[0].replace(e,m)),value:fe?_(fe[0].replace(e,m)):m});return W(u),ae}}function me(){var V=[];H(V);for(var ue;ue=Q();)ue!==!1&&(V.push(ue),H(V));return V}return re(),me()}function _(I){return I?I.replace(c,m):m}return Yp=T,Yp}var ib;function ZO(){if(ib)return Os;ib=1;var e=Os&&Os.__importDefault||function(r){return r&&r.__esModule?r:{default:r}};Object.defineProperty(Os,"__esModule",{value:!0}),Os.default=n;const t=e(JO());function n(r,i){let s=null;if(!r||typeof r!="string")return s;const u=(0,t.default)(r),c=typeof i=="function";return u.forEach(d=>{if(d.type!=="declaration")return;const{property:f,value:h}=d;c?i(f,h,d):h&&(s=s||{},s[f]=h)}),s}return Os}var tu={},ob;function eP(){if(ob)return tu;ob=1,Object.defineProperty(tu,"__esModule",{value:!0}),tu.camelCase=void 0;var e=/^--[a-zA-Z0-9_-]+$/,t=/-([a-z])/g,n=/^[^-]+$/,r=/^-(webkit|moz|ms|o|khtml)-/,i=/^-(ms)-/,s=function(f){return!f||n.test(f)||e.test(f)},u=function(f,h){return h.toUpperCase()},c=function(f,h){return"".concat(h,"-")},d=function(f,h){return h===void 0&&(h={}),s(f)?f:(f=f.toLowerCase(),h.reactCompat?f=f.replace(i,c):f=f.replace(r,c),f.replace(t,u))};return tu.camelCase=d,tu}var nu,sb;function tP(){if(sb)return nu;sb=1;var e=nu&&nu.__importDefault||function(i){return i&&i.__esModule?i:{default:i}},t=e(ZO()),n=eP();function r(i,s){var u={};return!i||typeof i!="string"||(0,t.default)(i,function(c,d){c&&d&&(u[(0,n.camelCase)(c,s)]=d)}),u}return r.default=r,nu=r,nu}var nP=tP();const rP=ht(nP),cl=ab("end"),Yr=ab("start");function ab(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 ub(e){const t=Yr(e),n=cl(e);if(t&&n)return{start:t,end:n}}function ru(e){return!e||typeof e!="object"?"":"position"in e||"type"in e?cb(e.position):"start"in e||"end"in e?cb(e):"line"in e||"column"in e?Gp(e):""}function Gp(e){return lb(e&&e.line)+":"+lb(e&&e.column)}function cb(e){return Gp(e&&e.start)+"-"+Gp(e&&e.end)}function lb(e){return e&&typeof e=="number"?e:1}class An extends Error{constructor(t,n,r){super(),typeof n=="string"&&(r=n,n=void 0);let i="",s={},u=!1;if(n&&("line"in n&&"column"in n?s={place:n}:"start"in n&&"end"in n?s={place:n}:"type"in n?s={ancestors:[n],place:n.position}:s=M({},n)),typeof t=="string"?i=t:!s.cause&&t&&(u=!0,i=t.message,s.cause=t),!s.ruleId&&!s.source&&typeof r=="string"){const d=r.indexOf(":");d===-1?s.ruleId=r:(s.source=r.slice(0,d),s.ruleId=r.slice(d+1))}if(!s.place&&s.ancestors&&s.ancestors){const d=s.ancestors[s.ancestors.length-1];d&&(s.place=d.position)}const c=s.place&&"start"in s.place?s.place.start:s.place;this.ancestors=s.ancestors||void 0,this.cause=s.cause||void 0,this.column=c?c.column:void 0,this.fatal=void 0,this.file="",this.message=i,this.line=c?c.line:void 0,this.name=ru(s.place)||"1:1",this.place=s.place||void 0,this.reason=this.message,this.ruleId=s.ruleId||void 0,this.source=s.source||void 0,this.stack=u&&s.cause&&typeof s.cause.stack=="string"?s.cause.stack:"",this.actual=void 0,this.expected=void 0,this.note=void 0,this.url=void 0}}An.prototype.file="",An.prototype.name="",An.prototype.reason="",An.prototype.message="",An.prototype.stack="",An.prototype.column=void 0,An.prototype.line=void 0,An.prototype.ancestors=void 0,An.prototype.cause=void 0,An.prototype.fatal=void 0,An.prototype.place=void 0,An.prototype.ruleId=void 0,An.prototype.source=void 0;const Xp={}.hasOwnProperty,iP=new Map,oP=/[A-Z]/g,sP=new Set(["table","tbody","thead","tfoot","tr"]),aP=new Set(["td","th"]),db="https://github.com/syntax-tree/hast-util-to-jsx-runtime";function uP(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=gP(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=mP(n,t.jsx,t.jsxs)}const i={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"?Li:eu,stylePropertyNameCase:t.stylePropertyNameCase||"dom",tableCellAlignToStyle:t.tableCellAlignToStyle!==!1},s=fb(i,e,void 0);return s&&typeof s!="string"?s:i.create(e,i.Fragment,{children:s||void 0},void 0)}function fb(e,t,n){if(t.type==="element")return cP(e,t,n);if(t.type==="mdxFlowExpression"||t.type==="mdxTextExpression")return lP(e,t);if(t.type==="mdxJsxFlowElement"||t.type==="mdxJsxTextElement")return fP(e,t,n);if(t.type==="mdxjsEsm")return dP(e,t);if(t.type==="root")return pP(e,t,n);if(t.type==="text")return hP(e,t)}function cP(e,t,n){const r=e.schema;let i=r;t.tagName.toLowerCase()==="svg"&&r.space==="html"&&(i=Li,e.schema=i),e.ancestors.push(t);const s=hb(e,t.tagName,!1),u=yP(e,t);let c=Qp(e,t);return sP.has(t.tagName)&&(c=c.filter(function(d){return typeof d=="string"?!zO(d):!0})),pb(e,u,s,t),Kp(u,c),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function lP(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)}iu(e,t.position)}function dP(e,t){if(t.data&&t.data.estree&&e.evaluater)return e.evaluater.evaluateProgram(t.data.estree);iu(e,t.position)}function fP(e,t,n){const r=e.schema;let i=r;t.name==="svg"&&r.space==="html"&&(i=Li,e.schema=i),e.ancestors.push(t);const s=t.name===null?e.Fragment:hb(e,t.name,!0),u=EP(e,t),c=Qp(e,t);return pb(e,u,s,t),Kp(u,c),e.ancestors.pop(),e.schema=r,e.create(t,s,u,n)}function pP(e,t,n){const r={};return Kp(r,Qp(e,t)),e.create(t,e.Fragment,r,n)}function hP(e,t){return t.value}function pb(e,t,n,r){typeof n!="string"&&n!==e.Fragment&&e.passNode&&(t.node=r)}function Kp(e,t){if(t.length>0){const n=t.length>1?t:t[0];n&&(e.children=n)}}function mP(e,t,n){return r;function r(i,s,u,c){const f=Array.isArray(u.children)?n:t;return c?f(s,u,c):f(s,u)}}function gP(e,t){return n;function n(r,i,s,u){const c=Array.isArray(s.children),d=Yr(r);return t(i,s,u,c,{columnNumber:d?d.column-1:void 0,fileName:e,lineNumber:d?d.line:void 0},void 0)}}function yP(e,t){const n={};let r,i;for(i in t.properties)if(i!=="children"&&Xp.call(t.properties,i)){const s=bP(e,i,t.properties[i]);if(s){const[u,c]=s;e.tableCellAlignToStyle&&u==="align"&&typeof c=="string"&&aP.has(t.tagName)?r=c:n[u]=c}}if(r){const s=n.style||(n.style={});s[e.stylePropertyNameCase==="css"?"text-align":"textAlign"]=r}return n}function EP(e,t){const n={};for(const r of t.attributes)if(r.type==="mdxJsxExpressionAttribute")if(r.data&&r.data.estree&&e.evaluater){const s=r.data.estree.body[0];s.type;const u=s.expression;u.type;const c=u.properties[0];c.type,Object.assign(n,e.evaluater.evaluateExpression(c.argument))}else iu(e,t.position);else{const i=r.name;let s;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,s=e.evaluater.evaluateExpression(c.expression)}else iu(e,t.position);else s=r.value===null?!0:r.value;n[i]=s}return n}function Qp(e,t){const n=[];let r=-1;const i=e.passKeys?new Map:iP;for(;++r<t.children.length;){const s=t.children[r];let u;if(e.passKeys){const d=s.type==="element"?s.tagName:s.type==="mdxJsxFlowElement"||s.type==="mdxJsxTextElement"?s.name:void 0;if(d){const f=i.get(d)||0;u=d+"-"+f,i.set(d,f+1)}}const c=fb(e,s,u);c!==void 0&&n.push(c)}return n}function bP(e,t,n){const r=ul(e.schema,t);if(!(n==null||typeof n=="number"&&Number.isNaN(n))){if(Array.isArray(n)&&(n=r.commaSeparated?zE(n):nb(n)),r.property==="style"){let i=typeof n=="object"?n:wP(e,String(n));return e.stylePropertyNameCase==="css"&&(i=xP(i)),["style",i]}return[e.elementAttributeNameCase==="react"&&r.space?YO[r.property]||r.property:r.attribute,n]}}function wP(e,t){try{return rP(t,{reactCompat:!0})}catch(n){if(e.ignoreInvalidStyle)return{};const r=n,i=new An("Cannot parse `style` attribute",{ancestors:e.ancestors,cause:r,ruleId:"style",source:"hast-util-to-jsx-runtime"});throw i.file=e.filePath||void 0,i.url=db+"#cannot-parse-style-attribute",i}}function hb(e,t,n){let r;if(!n)r={type:"Literal",value:t};else if(t.includes(".")){const i=t.split(".");let s=-1,u;for(;++s<i.length;){const c=VE(i[s])?{type:"Identifier",name:i[s]}:{type:"Literal",value:i[s]};u=u?{type:"MemberExpression",object:u,property:c,computed:!!(s&&c.type==="Literal"),optional:!1}:c}r=u}else r=VE(t)&&!/^[a-z]/.test(t)?{type:"Identifier",name:t}:{type:"Literal",value:t};if(r.type==="Literal"){const i=r.value;return Xp.call(e.components,i)?e.components[i]:i}if(e.evaluater)return e.evaluater.evaluateExpression(r);iu(e)}function iu(e,t){const n=new An("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=db+"#cannot-handle-mdx-estrees-without-createevaluater",n}function xP(e){const t={};let n;for(n in e)Xp.call(e,n)&&(t[TP(n)]=e[n]);return t}function TP(e){let t=e.replace(oP,_P);return t.slice(0,3)==="ms-"&&(t="-"+t),t}function _P(e){return"-"+e.toLowerCase()}const Jp={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"]},vP={};function Zp(e,t){const n=vP,r=typeof n.includeImageAlt=="boolean"?n.includeImageAlt:!0,i=typeof n.includeHtml=="boolean"?n.includeHtml:!0;return mb(e,r,i)}function mb(e,t,n){if(SP(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 gb(e.children,t,n)}return Array.isArray(e)?gb(e,t,n):""}function gb(e,t,n){const r=[];let i=-1;for(;++i<e.length;)r[i]=mb(e[i],t,n);return r.join("")}function SP(e){return!!(e&&typeof e=="object")}const yb=document.createElement("i");function eh(e){const t="&"+e+";";yb.innerHTML=t;const n=yb.textContent;return n.charCodeAt(n.length-1)===59&&e!=="semi"||n===t?!1:n}function ir(e,t,n,r){const i=e.length;let s=0,u;if(t<0?t=-t>i?0:i+t:t=t>i?i: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);s<r.length;)u=r.slice(s,s+1e4),u.unshift(t,0),e.splice(...u),s+=1e4,t+=1e4}function hr(e,t){return e.length>0?(ir(e,e.length,0,t),e):t}const Eb={}.hasOwnProperty;function bb(e){const t={};let n=-1;for(;++n<e.length;)AP(t,e[n]);return t}function AP(e,t){let n;for(n in t){const i=(Eb.call(e,n)?e[n]:void 0)||(e[n]={}),s=t[n];let u;if(s)for(u in s){Eb.call(i,u)||(i[u]=[]);const c=s[u];kP(i[u],Array.isArray(c)?c:c?[c]:[])}}}function kP(e,t){let n=-1;const r=[];for(;++n<t.length;)(t[n].add==="after"?e:r).push(t[n]);ir(e,0,0,r)}function wb(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 Cr(e){return e.replace(/[\t\n\r ]+/g," ").replace(/^ | $/g,"").toLowerCase().toUpperCase()}const Dn=Di(/[A-Za-z]/),kn=Di(/[\dA-Za-z]/),CP=Di(/[#-'*+\--9=?A-Z^-~]/);function ll(e){return e!==null&&(e<32||e===127)}const th=Di(/\d/),NP=Di(/[\dA-Fa-f]/),IP=Di(/[!-/:-@[-`{-~]/);function Ye(e){return e!==null&&e<-2}function Nt(e){return e!==null&&(e<0||e===32)}function mt(e){return e===-2||e===-1||e===32}const dl=Di(new RegExp("\\p{P}|\\p{S}","u")),Po=Di(/\s/);function Di(e){return t;function t(n){return n!==null&&n>-1&&e.test(String.fromCharCode(n))}}function Ps(e){const t=[];let n=-1,r=0,i=0;for(;++n<e.length;){const s=e.charCodeAt(n);let u="";if(s===37&&kn(e.charCodeAt(n+1))&&kn(e.charCodeAt(n+2)))i=2;else if(s<128)/[!#$&-;=?-Z_a-z~]/.test(String.fromCharCode(s))||(u=String.fromCharCode(s));else if(s>55295&&s<57344){const c=e.charCodeAt(n+1);s<56320&&c>56319&&c<57344?(u=String.fromCharCode(s,c),i=1):u="�"}else u=String.fromCharCode(s);u&&(t.push(e.slice(r,n),encodeURIComponent(u)),r=n+i+1,u=""),i&&(n+=i,i=0)}return t.join("")+e.slice(r)}function Et(e,t,n,r){const i=r?r-1:Number.POSITIVE_INFINITY;let s=0;return u;function u(d){return mt(d)?(e.enter(n),c(d)):t(d)}function c(d){return mt(d)&&s++<i?(e.consume(d),c):(e.exit(n),t(d))}}const OP={tokenize:PP};function PP(e){const t=e.attempt(this.parser.constructs.contentInitial,r,i);let n;return t;function r(c){if(c===null){e.consume(c);return}return e.enter("lineEnding"),e.consume(c),e.exit("lineEnding"),Et(e,t,"linePrefix")}function i(c){return e.enter("paragraph"),s(c)}function s(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 Ye(c)?(e.consume(c),e.exit("chunkText"),s):(e.consume(c),u)}}const RP={tokenize:LP},xb={tokenize:DP};function LP(e){const t=this,n=[];let r=0,i,s,u;return c;function c(R){if(r<n.length){const U=n[r];return t.containerState=U[1],e.attempt(U[0].continuation,d,f)(R)}return f(R)}function d(R){if(r++,t.containerState._closeFlow){t.containerState._closeFlow=void 0,i&&S();const U=t.events.length;let B=U,A;for(;B--;)if(t.events[B][0]==="exit"&&t.events[B][1].type==="chunkFlow"){A=t.events[B][1].end;break}v(r);let G=U;for(;G<t.events.length;)t.events[G][1].end=M({},A),G++;return ir(t.events,B+1,0,t.events.slice(U)),t.events.length=G,f(R)}return c(R)}function f(R){if(r===n.length){if(!i)return E(R);if(i.currentConstruct&&i.currentConstruct.concrete)return T(R);t.interrupt=!!(i.currentConstruct&&!i._gfmTableDynamicInterruptHack)}return t.containerState={},e.check(xb,h,m)(R)}function h(R){return i&&S(),v(r),E(R)}function m(R){return t.parser.lazy[t.now().line]=r!==n.length,u=t.now().offset,T(R)}function E(R){return t.containerState={},e.attempt(xb,b,T)(R)}function b(R){return r++,n.push([t.currentConstruct,t.containerState]),E(R)}function T(R){if(R===null){i&&S(),v(0),e.consume(R);return}return i=i||t.parser.flow(t.now()),e.enter("chunkFlow",{_tokenizer:i,contentType:"flow",previous:s}),_(R)}function _(R){if(R===null){I(e.exit("chunkFlow"),!0),v(0),e.consume(R);return}return Ye(R)?(e.consume(R),I(e.exit("chunkFlow")),r=0,t.interrupt=void 0,c):(e.consume(R),_)}function I(R,U){const B=t.sliceStream(R);if(U&&B.push(null),R.previous=s,s&&(s.next=R),s=R,i.defineSkip(R.start),i.write(B),t.parser.lazy[R.start.line]){let A=i.events.length;for(;A--;)if(i.events[A][1].start.offset<u&&(!i.events[A][1].end||i.events[A][1].end.offset>u))return;const G=t.events.length;let W=G,re,H;for(;W--;)if(t.events[W][0]==="exit"&&t.events[W][1].type==="chunkFlow"){if(re){H=t.events[W][1].end;break}re=!0}for(v(r),A=G;A<t.events.length;)t.events[A][1].end=M({},H),A++;ir(t.events,W+1,0,t.events.slice(G)),t.events.length=A}}function v(R){let U=n.length;for(;U-- >R;){const B=n[U];t.containerState=B[1],B[0].exit.call(t,e)}n.length=R}function S(){i.write([null]),s=void 0,i=void 0,t.containerState._closeFlow=void 0}}function DP(e,t,n){return Et(e,e.attempt(this.parser.constructs.document,t,n),"linePrefix",this.parser.constructs.disable.null.includes("codeIndented")?void 0:4)}function Rs(e){if(e===null||Nt(e)||Po(e))return 1;if(dl(e))return 2}function fl(e,t,n){const r=[];let i=-1;for(;++i<e.length;){const s=e[i].resolveAll;s&&!r.includes(s)&&(t=s(t,n),r.push(s))}return t}const nh={name:"attention",resolveAll:MP,tokenize:FP};function MP(e,t){let n=-1,r,i,s,u,c,d,f,h;for(;++n<e.length;)if(e[n][0]==="enter"&&e[n][1].type==="attentionSequence"&&e[n][1]._close){for(r=n;r--;)if(e[r][0]==="exit"&&e[r][1].type==="attentionSequence"&&e[r][1]._open&&t.sliceSerialize(e[r][1]).charCodeAt(0)===t.sliceSerialize(e[n][1]).charCodeAt(0)){if((e[r][1]._close||e[n][1]._open)&&(e[n][1].end.offset-e[n][1].start.offset)%3&&!((e[r][1].end.offset-e[r][1].start.offset+e[n][1].end.offset-e[n][1].start.offset)%3))continue;d=e[r][1].end.offset-e[r][1].start.offset>1&&e[n][1].end.offset-e[n][1].start.offset>1?2:1;const m=M({},e[r][1].end),E=M({},e[n][1].start);Tb(m,-d),Tb(E,d),u={type:d>1?"strongSequence":"emphasisSequence",start:m,end:M({},e[r][1].end)},c={type:d>1?"strongSequence":"emphasisSequence",start:M({},e[n][1].start),end:E},s={type:d>1?"strongText":"emphasisText",start:M({},e[r][1].end),end:M({},e[n][1].start)},i={type:d>1?"strong":"emphasis",start:M({},u.start),end:M({},c.end)},e[r][1].end=M({},u.start),e[n][1].start=M({},c.end),f=[],e[r][1].end.offset-e[r][1].start.offset&&(f=hr(f,[["enter",e[r][1],t],["exit",e[r][1],t]])),f=hr(f,[["enter",i,t],["enter",u,t],["exit",u,t],["enter",s,t]]),f=hr(f,fl(t.parser.constructs.insideSpan.null,e.slice(r+1,n),t)),f=hr(f,[["exit",s,t],["enter",c,t],["exit",c,t],["exit",i,t]]),e[n][1].end.offset-e[n][1].start.offset?(h=2,f=hr(f,[["enter",e[n][1],t],["exit",e[n][1],t]])):h=0,ir(e,r-1,n-r+3,f),n=r+f.length-h-2;break}}for(n=-1;++n<e.length;)e[n][1].type==="attentionSequence"&&(e[n][1].type="data");return e}function FP(e,t){const n=this.parser.constructs.attentionMarkers.null,r=this.previous,i=Rs(r);let s;return u;function u(d){return s=d,e.enter("attentionSequence"),c(d)}function c(d){if(d===s)return e.consume(d),c;const f=e.exit("attentionSequence"),h=Rs(d),m=!h||h===2&&i||n.includes(d),E=!i||i===2&&h||n.includes(r);return f._open=!!(s===42?m:m&&(i||!E)),f._close=!!(s===42?E:E&&(h||!m)),t(d)}}function Tb(e,t){e.column+=t,e.offset+=t,e._bufferIndex+=t}const BP={name:"autolink",tokenize:UP};function UP(e,t,n){let r=0;return i;function i(b){return e.enter("autolink"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.enter("autolinkProtocol"),s}function s(b){return Dn(b)?(e.consume(b),u):b===64?n(b):f(b)}function u(b){return b===43||b===45||b===46||kn(b)?(r=1,c(b)):f(b)}function c(b){return b===58?(e.consume(b),r=0,d):(b===43||b===45||b===46||kn(b))&&r++<32?(e.consume(b),c):(r=0,f(b))}function d(b){return b===62?(e.exit("autolinkProtocol"),e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):b===null||b===32||b===60||ll(b)?n(b):(e.consume(b),d)}function f(b){return b===64?(e.consume(b),h):CP(b)?(e.consume(b),f):n(b)}function h(b){return kn(b)?m(b):n(b)}function m(b){return b===46?(e.consume(b),r=0,h):b===62?(e.exit("autolinkProtocol").type="autolinkEmail",e.enter("autolinkMarker"),e.consume(b),e.exit("autolinkMarker"),e.exit("autolink"),t):E(b)}function E(b){if((b===45||kn(b))&&r++<63){const T=b===45?E:m;return e.consume(b),T}return n(b)}}const ou={partial:!0,tokenize:jP};function jP(e,t,n){return r;function r(s){return mt(s)?Et(e,i,"linePrefix")(s):i(s)}function i(s){return s===null||Ye(s)?t(s):n(s)}}const _b={continuation:{tokenize:$P},exit:zP,name:"blockQuote",tokenize:HP};function HP(e,t,n){const r=this;return i;function i(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"),s}return n(u)}function s(u){return mt(u)?(e.enter("blockQuotePrefixWhitespace"),e.consume(u),e.exit("blockQuotePrefixWhitespace"),e.exit("blockQuotePrefix"),t):(e.exit("blockQuotePrefix"),t(u))}}function $P(e,t,n){const r=this;return i;function i(u){return mt(u)?Et(e,s,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(u):s(u)}function s(u){return e.attempt(_b,t,n)(u)}}function zP(e){e.exit("blockQuote")}const vb={name:"characterEscape",tokenize:VP};function VP(e,t,n){return r;function r(s){return e.enter("characterEscape"),e.enter("escapeMarker"),e.consume(s),e.exit("escapeMarker"),i}function i(s){return IP(s)?(e.enter("characterEscapeValue"),e.consume(s),e.exit("characterEscapeValue"),e.exit("characterEscape"),t):n(s)}}const Sb={name:"characterReference",tokenize:qP};function qP(e,t,n){const r=this;let i=0,s,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"),s=31,u=kn,h(m))}function f(m){return m===88||m===120?(e.enter("characterReferenceMarkerHexadecimal"),e.consume(m),e.exit("characterReferenceMarkerHexadecimal"),e.enter("characterReferenceValue"),s=6,u=NP,h):(e.enter("characterReferenceValue"),s=7,u=th,h(m))}function h(m){if(m===59&&i){const E=e.exit("characterReferenceValue");return u===kn&&!eh(r.sliceSerialize(E))?n(m):(e.enter("characterReferenceMarker"),e.consume(m),e.exit("characterReferenceMarker"),e.exit("characterReference"),t)}return u(m)&&i++<s?(e.consume(m),h):n(m)}}const Ab={partial:!0,tokenize:YP},kb={concrete:!0,name:"codeFenced",tokenize:WP};function WP(e,t,n){const r=this,i={partial:!0,tokenize:B};let s=0,u=0,c;return d;function d(A){return f(A)}function f(A){const G=r.events[r.events.length-1];return s=G&&G[1].type==="linePrefix"?G[2].sliceSerialize(G[1],!0).length:0,c=A,e.enter("codeFenced"),e.enter("codeFencedFence"),e.enter("codeFencedFenceSequence"),h(A)}function h(A){return A===c?(u++,e.consume(A),h):u<3?n(A):(e.exit("codeFencedFenceSequence"),mt(A)?Et(e,m,"whitespace")(A):m(A))}function m(A){return A===null||Ye(A)?(e.exit("codeFencedFence"),r.interrupt?t(A):e.check(Ab,_,U)(A)):(e.enter("codeFencedFenceInfo"),e.enter("chunkString",{contentType:"string"}),E(A))}function E(A){return A===null||Ye(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),m(A)):mt(A)?(e.exit("chunkString"),e.exit("codeFencedFenceInfo"),Et(e,b,"whitespace")(A)):A===96&&A===c?n(A):(e.consume(A),E)}function b(A){return A===null||Ye(A)?m(A):(e.enter("codeFencedFenceMeta"),e.enter("chunkString",{contentType:"string"}),T(A))}function T(A){return A===null||Ye(A)?(e.exit("chunkString"),e.exit("codeFencedFenceMeta"),m(A)):A===96&&A===c?n(A):(e.consume(A),T)}function _(A){return e.attempt(i,U,I)(A)}function I(A){return e.enter("lineEnding"),e.consume(A),e.exit("lineEnding"),v}function v(A){return s>0&&mt(A)?Et(e,S,"linePrefix",s+1)(A):S(A)}function S(A){return A===null||Ye(A)?e.check(Ab,_,U)(A):(e.enter("codeFlowValue"),R(A))}function R(A){return A===null||Ye(A)?(e.exit("codeFlowValue"),S(A)):(e.consume(A),R)}function U(A){return e.exit("codeFenced"),t(A)}function B(A,G,W){let re=0;return H;function H(ue){return A.enter("lineEnding"),A.consume(ue),A.exit("lineEnding"),ee}function ee(ue){return A.enter("codeFencedFence"),mt(ue)?Et(A,Q,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(ue):Q(ue)}function Q(ue){return ue===c?(A.enter("codeFencedFenceSequence"),me(ue)):W(ue)}function me(ue){return ue===c?(re++,A.consume(ue),me):re>=u?(A.exit("codeFencedFenceSequence"),mt(ue)?Et(A,V,"whitespace")(ue):V(ue)):W(ue)}function V(ue){return ue===null||Ye(ue)?(A.exit("codeFencedFence"),G(ue)):W(ue)}}}function YP(e,t,n){const r=this;return i;function i(u){return u===null?n(u):(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}const rh={name:"codeIndented",tokenize:XP},GP={partial:!0,tokenize:KP};function XP(e,t,n){const r=this;return i;function i(f){return e.enter("codeIndented"),Et(e,s,"linePrefix",5)(f)}function s(f){const h=r.events[r.events.length-1];return h&&h[1].type==="linePrefix"&&h[2].sliceSerialize(h[1],!0).length>=4?u(f):n(f)}function u(f){return f===null?d(f):Ye(f)?e.attempt(GP,u,d)(f):(e.enter("codeFlowValue"),c(f))}function c(f){return f===null||Ye(f)?(e.exit("codeFlowValue"),u(f)):(e.consume(f),c)}function d(f){return e.exit("codeIndented"),t(f)}}function KP(e,t,n){const r=this;return i;function i(u){return r.parser.lazy[r.now().line]?n(u):Ye(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),i):Et(e,s,"linePrefix",5)(u)}function s(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):Ye(u)?i(u):n(u)}}const QP={name:"codeText",previous:ZP,resolve:JP,tokenize:eR};function JP(e){let t=e.length-4,n=3,r,i;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;)i===void 0?r!==t&&e[r][1].type!=="lineEnding"&&(i=r):(r===t||e[r][1].type==="lineEnding")&&(e[i][1].type="codeTextData",r!==i+2&&(e[i][1].end=e[r-1][1].end,e.splice(i+2,r-i-2),t-=r-i-2,r=i+2),i=void 0);return e}function ZP(e){return e!==96||this.events[this.events.length-1][1].type==="characterEscape"}function eR(e,t,n){let r=0,i,s;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?(s=e.enter("codeTextSequence"),i=0,h(m)):Ye(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||Ye(m)?(e.exit("codeTextData"),d(m)):(e.consume(m),f)}function h(m){return m===96?(e.consume(m),i++,h):i===r?(e.exit("codeTextSequence"),e.exit("codeText"),t(m)):(s.type="codeTextData",f(m))}}class tR{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 i=n||0;this.setCursor(Math.trunc(t));const s=this.right.splice(this.right.length-i,Number.POSITIVE_INFINITY);return r&&su(this.left,r),s.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),su(this.left,t)}unshift(t){this.setCursor(0),this.right.push(t)}unshiftMany(t){this.setCursor(0),su(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);su(this.right,n.reverse())}else{const n=this.right.splice(this.left.length+this.right.length-t,Number.POSITIVE_INFINITY);su(this.left,n.reverse())}}}function su(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 Cb(e){const t={};let n=-1,r,i,s,u,c,d,f;const h=new tR(e);for(;++n<h.length;){for(;n in t;)n=t[n];if(r=h.get(n),n&&r[1].type==="chunkFlow"&&h.get(n-1)[1].type==="listItemPrefix"&&(d=r[1]._tokenizer.events,s=0,s<d.length&&d[s][1].type==="lineEndingBlank"&&(s+=2),s<d.length&&d[s][1].type==="content"))for(;++s<d.length&&d[s][1].type!=="content";)d[s][1].type==="chunkText"&&(d[s][1]._isInFirstContentOfListItem=!0,s++);if(r[0]==="enter")r[1].contentType&&(Object.assign(t,nR(h,n)),n=t[n],f=!0);else if(r[1]._container){for(s=n,i=void 0;s--;)if(u=h.get(s),u[1].type==="lineEnding"||u[1].type==="lineEndingBlank")u[0]==="enter"&&(i&&(h.get(i)[1].type="lineEndingBlank"),u[1].type="lineEnding",i=s);else if(!(u[1].type==="linePrefix"||u[1].type==="listItemIndent"))break;i&&(r[1].end=M({},h.get(i)[1].start),c=h.slice(i,n),c.unshift(r),h.splice(i,n-i+1,c))}}return ir(e,0,Number.POSITIVE_INFINITY,h.slice(0)),!f}function nR(e,t){const n=e.get(t)[1],r=e.get(t)[2];let i=t-1;const s=[];let u=n._tokenizer;u||(u=r.parser[n.contentType](n.start),n._contentTypeTextTrailing&&(u._contentTypeTextTrailing=!0));const c=u.events,d=[],f={};let h,m,E=-1,b=n,T=0,_=0;const I=[_];for(;b;){for(;e.get(++i)[1]!==b;);s.push(i),b._tokenizer||(h=r.sliceStream(b),b.next||h.push(null),m&&u.defineSkip(b.start),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=!0),u.write(h),b._isInFirstContentOfListItem&&(u._gfmTasklistFirstContentOfListItem=void 0)),m=b,b=b.next}for(b=n;++E<c.length;)c[E][0]==="exit"&&c[E-1][0]==="enter"&&c[E][1].type===c[E-1][1].type&&c[E][1].start.line!==c[E][1].end.line&&(_=E+1,I.push(_),b._tokenizer=void 0,b.previous=void 0,b=b.next);for(u.events=[],b?(b._tokenizer=void 0,b.previous=void 0):I.pop(),E=I.length;E--;){const v=c.slice(I[E],I[E+1]),S=s.pop();d.push([S,S+v.length-1]),e.splice(S,2,v)}for(d.reverse(),E=-1;++E<d.length;)f[T+d[E][0]]=T+d[E][1],T+=d[E][1]-d[E][0]-1;return f}const rR={resolve:oR,tokenize:sR},iR={partial:!0,tokenize:aR};function oR(e){return Cb(e),e}function sR(e,t){let n;return r;function r(c){return e.enter("content"),n=e.enter("chunkContent",{contentType:"content"}),i(c)}function i(c){return c===null?s(c):Ye(c)?e.check(iR,u,s)(c):(e.consume(c),i)}function s(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,i}}function aR(e,t,n){const r=this;return i;function i(u){return e.exit("chunkContent"),e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),Et(e,s,"linePrefix")}function s(u){if(u===null||Ye(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 Nb(e,t,n,r,i,s,u,c,d){const f=d||Number.POSITIVE_INFINITY;let h=0;return m;function m(v){return v===60?(e.enter(r),e.enter(i),e.enter(s),e.consume(v),e.exit(s),E):v===null||v===32||v===41||ll(v)?n(v):(e.enter(r),e.enter(u),e.enter(c),e.enter("chunkString",{contentType:"string"}),_(v))}function E(v){return v===62?(e.enter(s),e.consume(v),e.exit(s),e.exit(i),e.exit(r),t):(e.enter(c),e.enter("chunkString",{contentType:"string"}),b(v))}function b(v){return v===62?(e.exit("chunkString"),e.exit(c),E(v)):v===null||v===60||Ye(v)?n(v):(e.consume(v),v===92?T:b)}function T(v){return v===60||v===62||v===92?(e.consume(v),b):b(v)}function _(v){return!h&&(v===null||v===41||Nt(v))?(e.exit("chunkString"),e.exit(c),e.exit(u),e.exit(r),t(v)):h<f&&v===40?(e.consume(v),h++,_):v===41?(e.consume(v),h--,_):v===null||v===32||v===40||ll(v)?n(v):(e.consume(v),v===92?I:_)}function I(v){return v===40||v===41||v===92?(e.consume(v),_):_(v)}}function Ib(e,t,n,r,i,s){const u=this;let c=0,d;return f;function f(b){return e.enter(r),e.enter(i),e.consume(b),e.exit(i),e.enter(s),h}function h(b){return c>999||b===null||b===91||b===93&&!d||b===94&&!c&&"_hiddenFootnoteSupport"in u.parser.constructs?n(b):b===93?(e.exit(s),e.enter(i),e.consume(b),e.exit(i),e.exit(r),t):Ye(b)?(e.enter("lineEnding"),e.consume(b),e.exit("lineEnding"),h):(e.enter("chunkString",{contentType:"string"}),m(b))}function m(b){return b===null||b===91||b===93||Ye(b)||c++>999?(e.exit("chunkString"),h(b)):(e.consume(b),d||(d=!mt(b)),b===92?E:m)}function E(b){return b===91||b===92||b===93?(e.consume(b),c++,m):m(b)}}function Ob(e,t,n,r,i,s){let u;return c;function c(E){return E===34||E===39||E===40?(e.enter(r),e.enter(i),e.consume(E),e.exit(i),u=E===40?41:E,d):n(E)}function d(E){return E===u?(e.enter(i),e.consume(E),e.exit(i),e.exit(r),t):(e.enter(s),f(E))}function f(E){return E===u?(e.exit(s),d(u)):E===null?n(E):Ye(E)?(e.enter("lineEnding"),e.consume(E),e.exit("lineEnding"),Et(e,f,"linePrefix")):(e.enter("chunkString",{contentType:"string"}),h(E))}function h(E){return E===u||E===null||Ye(E)?(e.exit("chunkString"),f(E)):(e.consume(E),E===92?m:h)}function m(E){return E===u||E===92?(e.consume(E),h):h(E)}}function au(e,t){let n;return r;function r(i){return Ye(i)?(e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),n=!0,r):mt(i)?Et(e,r,n?"linePrefix":"lineSuffix")(i):t(i)}}const uR={name:"definition",tokenize:lR},cR={partial:!0,tokenize:dR};function lR(e,t,n){const r=this;let i;return s;function s(b){return e.enter("definition"),u(b)}function u(b){return Ib.call(r,e,c,n,"definitionLabel","definitionLabelMarker","definitionLabelString")(b)}function c(b){return i=Cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)),b===58?(e.enter("definitionMarker"),e.consume(b),e.exit("definitionMarker"),d):n(b)}function d(b){return Nt(b)?au(e,f)(b):f(b)}function f(b){return Nb(e,h,n,"definitionDestination","definitionDestinationLiteral","definitionDestinationLiteralMarker","definitionDestinationRaw","definitionDestinationString")(b)}function h(b){return e.attempt(cR,m,m)(b)}function m(b){return mt(b)?Et(e,E,"whitespace")(b):E(b)}function E(b){return b===null||Ye(b)?(e.exit("definition"),r.parser.defined.push(i),t(b)):n(b)}}function dR(e,t,n){return r;function r(c){return Nt(c)?au(e,i)(c):n(c)}function i(c){return Ob(e,s,n,"definitionTitle","definitionTitleMarker","definitionTitleString")(c)}function s(c){return mt(c)?Et(e,u,"whitespace")(c):u(c)}function u(c){return c===null||Ye(c)?t(c):n(c)}}const fR={name:"hardBreakEscape",tokenize:pR};function pR(e,t,n){return r;function r(s){return e.enter("hardBreakEscape"),e.consume(s),i}function i(s){return Ye(s)?(e.exit("hardBreakEscape"),t(s)):n(s)}}const hR={name:"headingAtx",resolve:mR,tokenize:gR};function mR(e,t){let n=e.length-2,r=3,i,s;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&&(i={type:"atxHeadingText",start:e[r][1].start,end:e[n][1].end},s={type:"chunkText",start:e[r][1].start,end:e[n][1].end,contentType:"text"},ir(e,r,n-r+1,[["enter",i,t],["enter",s,t],["exit",s,t],["exit",i,t]])),e}function gR(e,t,n){let r=0;return i;function i(h){return e.enter("atxHeading"),s(h)}function s(h){return e.enter("atxHeadingSequence"),u(h)}function u(h){return h===35&&r++<6?(e.consume(h),u):h===null||Nt(h)?(e.exit("atxHeadingSequence"),c(h)):n(h)}function c(h){return h===35?(e.enter("atxHeadingSequence"),d(h)):h===null||Ye(h)?(e.exit("atxHeading"),t(h)):mt(h)?Et(e,c,"whitespace")(h):(e.enter("atxHeadingText"),f(h))}function d(h){return h===35?(e.consume(h),d):(e.exit("atxHeadingSequence"),c(h))}function f(h){return h===null||h===35||Nt(h)?(e.exit("atxHeadingText"),c(h)):(e.consume(h),f)}}const yR=["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"],Pb=["pre","script","style","textarea"],ER={concrete:!0,name:"htmlFlow",resolveTo:xR,tokenize:TR},bR={partial:!0,tokenize:vR},wR={partial:!0,tokenize:_R};function xR(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 TR(e,t,n){const r=this;let i,s,u,c,d;return f;function f(P){return h(P)}function h(P){return e.enter("htmlFlow"),e.enter("htmlFlowData"),e.consume(P),m}function m(P){return P===33?(e.consume(P),E):P===47?(e.consume(P),s=!0,_):P===63?(e.consume(P),i=3,r.interrupt?t:O):Dn(P)?(e.consume(P),u=String.fromCharCode(P),I):n(P)}function E(P){return P===45?(e.consume(P),i=2,b):P===91?(e.consume(P),i=5,c=0,T):Dn(P)?(e.consume(P),i=4,r.interrupt?t:O):n(P)}function b(P){return P===45?(e.consume(P),r.interrupt?t:O):n(P)}function T(P){const ge="CDATA[";return P===ge.charCodeAt(c++)?(e.consume(P),c===ge.length?r.interrupt?t:Q:T):n(P)}function _(P){return Dn(P)?(e.consume(P),u=String.fromCharCode(P),I):n(P)}function I(P){if(P===null||P===47||P===62||Nt(P)){const ge=P===47,Re=u.toLowerCase();return!ge&&!s&&Pb.includes(Re)?(i=1,r.interrupt?t(P):Q(P)):yR.includes(u.toLowerCase())?(i=6,ge?(e.consume(P),v):r.interrupt?t(P):Q(P)):(i=7,r.interrupt&&!r.parser.lazy[r.now().line]?n(P):s?S(P):R(P))}return P===45||kn(P)?(e.consume(P),u+=String.fromCharCode(P),I):n(P)}function v(P){return P===62?(e.consume(P),r.interrupt?t:Q):n(P)}function S(P){return mt(P)?(e.consume(P),S):H(P)}function R(P){return P===47?(e.consume(P),H):P===58||P===95||Dn(P)?(e.consume(P),U):mt(P)?(e.consume(P),R):H(P)}function U(P){return P===45||P===46||P===58||P===95||kn(P)?(e.consume(P),U):B(P)}function B(P){return P===61?(e.consume(P),A):mt(P)?(e.consume(P),B):R(P)}function A(P){return P===null||P===60||P===61||P===62||P===96?n(P):P===34||P===39?(e.consume(P),d=P,G):mt(P)?(e.consume(P),A):W(P)}function G(P){return P===d?(e.consume(P),d=null,re):P===null||Ye(P)?n(P):(e.consume(P),G)}function W(P){return P===null||P===34||P===39||P===47||P===60||P===61||P===62||P===96||Nt(P)?B(P):(e.consume(P),W)}function re(P){return P===47||P===62||mt(P)?R(P):n(P)}function H(P){return P===62?(e.consume(P),ee):n(P)}function ee(P){return P===null||Ye(P)?Q(P):mt(P)?(e.consume(P),ee):n(P)}function Q(P){return P===45&&i===2?(e.consume(P),fe):P===60&&i===1?(e.consume(P),ae):P===62&&i===4?(e.consume(P),j):P===63&&i===3?(e.consume(P),O):P===93&&i===5?(e.consume(P),se):Ye(P)&&(i===6||i===7)?(e.exit("htmlFlowData"),e.check(bR,q,me)(P)):P===null||Ye(P)?(e.exit("htmlFlowData"),me(P)):(e.consume(P),Q)}function me(P){return e.check(wR,V,q)(P)}function V(P){return e.enter("lineEnding"),e.consume(P),e.exit("lineEnding"),ue}function ue(P){return P===null||Ye(P)?me(P):(e.enter("htmlFlowData"),Q(P))}function fe(P){return P===45?(e.consume(P),O):Q(P)}function ae(P){return P===47?(e.consume(P),u="",J):Q(P)}function J(P){if(P===62){const ge=u.toLowerCase();return Pb.includes(ge)?(e.consume(P),j):Q(P)}return Dn(P)&&u.length<8?(e.consume(P),u+=String.fromCharCode(P),J):Q(P)}function se(P){return P===93?(e.consume(P),O):Q(P)}function O(P){return P===62?(e.consume(P),j):P===45&&i===2?(e.consume(P),O):Q(P)}function j(P){return P===null||Ye(P)?(e.exit("htmlFlowData"),q(P)):(e.consume(P),j)}function q(P){return e.exit("htmlFlow"),t(P)}}function _R(e,t,n){const r=this;return i;function i(u){return Ye(u)?(e.enter("lineEnding"),e.consume(u),e.exit("lineEnding"),s):n(u)}function s(u){return r.parser.lazy[r.now().line]?n(u):t(u)}}function vR(e,t,n){return r;function r(i){return e.enter("lineEnding"),e.consume(i),e.exit("lineEnding"),e.attempt(ou,t,n)}}const SR={name:"htmlText",tokenize:AR};function AR(e,t,n){const r=this;let i,s,u;return c;function c(O){return e.enter("htmlText"),e.enter("htmlTextData"),e.consume(O),d}function d(O){return O===33?(e.consume(O),f):O===47?(e.consume(O),B):O===63?(e.consume(O),R):Dn(O)?(e.consume(O),W):n(O)}function f(O){return O===45?(e.consume(O),h):O===91?(e.consume(O),s=0,T):Dn(O)?(e.consume(O),S):n(O)}function h(O){return O===45?(e.consume(O),b):n(O)}function m(O){return O===null?n(O):O===45?(e.consume(O),E):Ye(O)?(u=m,ae(O)):(e.consume(O),m)}function E(O){return O===45?(e.consume(O),b):m(O)}function b(O){return O===62?fe(O):O===45?E(O):m(O)}function T(O){const j="CDATA[";return O===j.charCodeAt(s++)?(e.consume(O),s===j.length?_:T):n(O)}function _(O){return O===null?n(O):O===93?(e.consume(O),I):Ye(O)?(u=_,ae(O)):(e.consume(O),_)}function I(O){return O===93?(e.consume(O),v):_(O)}function v(O){return O===62?fe(O):O===93?(e.consume(O),v):_(O)}function S(O){return O===null||O===62?fe(O):Ye(O)?(u=S,ae(O)):(e.consume(O),S)}function R(O){return O===null?n(O):O===63?(e.consume(O),U):Ye(O)?(u=R,ae(O)):(e.consume(O),R)}function U(O){return O===62?fe(O):R(O)}function B(O){return Dn(O)?(e.consume(O),A):n(O)}function A(O){return O===45||kn(O)?(e.consume(O),A):G(O)}function G(O){return Ye(O)?(u=G,ae(O)):mt(O)?(e.consume(O),G):fe(O)}function W(O){return O===45||kn(O)?(e.consume(O),W):O===47||O===62||Nt(O)?re(O):n(O)}function re(O){return O===47?(e.consume(O),fe):O===58||O===95||Dn(O)?(e.consume(O),H):Ye(O)?(u=re,ae(O)):mt(O)?(e.consume(O),re):fe(O)}function H(O){return O===45||O===46||O===58||O===95||kn(O)?(e.consume(O),H):ee(O)}function ee(O){return O===61?(e.consume(O),Q):Ye(O)?(u=ee,ae(O)):mt(O)?(e.consume(O),ee):re(O)}function Q(O){return O===null||O===60||O===61||O===62||O===96?n(O):O===34||O===39?(e.consume(O),i=O,me):Ye(O)?(u=Q,ae(O)):mt(O)?(e.consume(O),Q):(e.consume(O),V)}function me(O){return O===i?(e.consume(O),i=void 0,ue):O===null?n(O):Ye(O)?(u=me,ae(O)):(e.consume(O),me)}function V(O){return O===null||O===34||O===39||O===60||O===61||O===96?n(O):O===47||O===62||Nt(O)?re(O):(e.consume(O),V)}function ue(O){return O===47||O===62||Nt(O)?re(O):n(O)}function fe(O){return O===62?(e.consume(O),e.exit("htmlTextData"),e.exit("htmlText"),t):n(O)}function ae(O){return e.exit("htmlTextData"),e.enter("lineEnding"),e.consume(O),e.exit("lineEnding"),J}function J(O){return mt(O)?Et(e,se,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(O):se(O)}function se(O){return e.enter("htmlTextData"),u(O)}}const ih={name:"labelEnd",resolveAll:IR,resolveTo:OR,tokenize:PR},kR={tokenize:RR},CR={tokenize:LR},NR={tokenize:DR};function IR(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 i=r.type==="labelImage"?4:2;r.type="data",t+=i}}return e.length!==n.length&&ir(e,0,e.length,n),e}function OR(e,t){let n=e.length,r=0,i,s,u,c;for(;n--;)if(i=e[n][1],s){if(i.type==="link"||i.type==="labelLink"&&i._inactive)break;e[n][0]==="enter"&&i.type==="labelLink"&&(i._inactive=!0)}else if(u){if(e[n][0]==="enter"&&(i.type==="labelImage"||i.type==="labelLink")&&!i._balanced&&(s=n,i.type!=="labelLink")){r=2;break}}else i.type==="labelEnd"&&(u=n);const d={type:e[s][1].type==="labelLink"?"link":"image",start:M({},e[s][1].start),end:M({},e[e.length-1][1].end)},f={type:"label",start:M({},e[s][1].start),end:M({},e[u][1].end)},h={type:"labelText",start:M({},e[s+r+2][1].end),end:M({},e[u-2][1].start)};return c=[["enter",d,t],["enter",f,t]],c=hr(c,e.slice(s+1,s+r+3)),c=hr(c,[["enter",h,t]]),c=hr(c,fl(t.parser.constructs.insideSpan.null,e.slice(s+r+4,u-3),t)),c=hr(c,[["exit",h,t],e[u-2],e[u-1],["exit",f,t]]),c=hr(c,e.slice(u+1)),c=hr(c,[["exit",d,t]]),ir(e,s,e.length,c),e}function PR(e,t,n){const r=this;let i=r.events.length,s,u;for(;i--;)if((r.events[i][1].type==="labelImage"||r.events[i][1].type==="labelLink")&&!r.events[i][1]._balanced){s=r.events[i][1];break}return c;function c(E){return s?s._inactive?m(E):(u=r.parser.defined.includes(Cr(r.sliceSerialize({start:s.end,end:r.now()}))),e.enter("labelEnd"),e.enter("labelMarker"),e.consume(E),e.exit("labelMarker"),e.exit("labelEnd"),d):n(E)}function d(E){return E===40?e.attempt(kR,h,u?h:m)(E):E===91?e.attempt(CR,h,u?f:m)(E):u?h(E):m(E)}function f(E){return e.attempt(NR,h,m)(E)}function h(E){return t(E)}function m(E){return s._balanced=!0,n(E)}}function RR(e,t,n){return r;function r(m){return e.enter("resource"),e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),i}function i(m){return Nt(m)?au(e,s)(m):s(m)}function s(m){return m===41?h(m):Nb(e,u,c,"resourceDestination","resourceDestinationLiteral","resourceDestinationLiteralMarker","resourceDestinationRaw","resourceDestinationString",32)(m)}function u(m){return Nt(m)?au(e,d)(m):h(m)}function c(m){return n(m)}function d(m){return m===34||m===39||m===40?Ob(e,f,n,"resourceTitle","resourceTitleMarker","resourceTitleString")(m):h(m)}function f(m){return Nt(m)?au(e,h)(m):h(m)}function h(m){return m===41?(e.enter("resourceMarker"),e.consume(m),e.exit("resourceMarker"),e.exit("resource"),t):n(m)}}function LR(e,t,n){const r=this;return i;function i(c){return Ib.call(r,e,s,u,"reference","referenceMarker","referenceString")(c)}function s(c){return r.parser.defined.includes(Cr(r.sliceSerialize(r.events[r.events.length-1][1]).slice(1,-1)))?t(c):n(c)}function u(c){return n(c)}}function DR(e,t,n){return r;function r(s){return e.enter("reference"),e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),i}function i(s){return s===93?(e.enter("referenceMarker"),e.consume(s),e.exit("referenceMarker"),e.exit("reference"),t):n(s)}}const MR={name:"labelStartImage",resolveAll:ih.resolveAll,tokenize:FR};function FR(e,t,n){const r=this;return i;function i(c){return e.enter("labelImage"),e.enter("labelImageMarker"),e.consume(c),e.exit("labelImageMarker"),s}function s(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 BR={name:"labelStartLink",resolveAll:ih.resolveAll,tokenize:UR};function UR(e,t,n){const r=this;return i;function i(u){return e.enter("labelLink"),e.enter("labelMarker"),e.consume(u),e.exit("labelMarker"),e.exit("labelLink"),s}function s(u){return u===94&&"_hiddenFootnoteSupport"in r.parser.constructs?n(u):t(u)}}const oh={name:"lineEnding",tokenize:jR};function jR(e,t){return n;function n(r){return e.enter("lineEnding"),e.consume(r),e.exit("lineEnding"),Et(e,t,"linePrefix")}}const pl={name:"thematicBreak",tokenize:HR};function HR(e,t,n){let r=0,i;return s;function s(f){return e.enter("thematicBreak"),u(f)}function u(f){return i=f,c(f)}function c(f){return f===i?(e.enter("thematicBreakSequence"),d(f)):r>=3&&(f===null||Ye(f))?(e.exit("thematicBreak"),t(f)):n(f)}function d(f){return f===i?(e.consume(f),r++,d):(e.exit("thematicBreakSequence"),mt(f)?Et(e,c,"whitespace")(f):c(f))}}const zn={continuation:{tokenize:qR},exit:YR,name:"list",tokenize:VR},$R={partial:!0,tokenize:GR},zR={partial:!0,tokenize:WR};function VR(e,t,n){const r=this,i=r.events[r.events.length-1];let s=i&&i[1].type==="linePrefix"?i[2].sliceSerialize(i[1],!0).length:0,u=0;return c;function c(b){const T=r.containerState.type||(b===42||b===43||b===45?"listUnordered":"listOrdered");if(T==="listUnordered"?!r.containerState.marker||b===r.containerState.marker:th(b)){if(r.containerState.type||(r.containerState.type=T,e.enter(T,{_container:!0})),T==="listUnordered")return e.enter("listItemPrefix"),b===42||b===45?e.check(pl,n,f)(b):f(b);if(!r.interrupt||b===49)return e.enter("listItemPrefix"),e.enter("listItemValue"),d(b)}return n(b)}function d(b){return th(b)&&++u<10?(e.consume(b),d):(!r.interrupt||u<2)&&(r.containerState.marker?b===r.containerState.marker:b===41||b===46)?(e.exit("listItemValue"),f(b)):n(b)}function f(b){return e.enter("listItemMarker"),e.consume(b),e.exit("listItemMarker"),r.containerState.marker=r.containerState.marker||b,e.check(ou,r.interrupt?n:h,e.attempt($R,E,m))}function h(b){return r.containerState.initialBlankLine=!0,s++,E(b)}function m(b){return mt(b)?(e.enter("listItemPrefixWhitespace"),e.consume(b),e.exit("listItemPrefixWhitespace"),E):n(b)}function E(b){return r.containerState.size=s+r.sliceSerialize(e.exit("listItemPrefix"),!0).length,t(b)}}function qR(e,t,n){const r=this;return r.containerState._closeFlow=void 0,e.check(ou,i,s);function i(c){return r.containerState.furtherBlankLines=r.containerState.furtherBlankLines||r.containerState.initialBlankLine,Et(e,t,"listItemIndent",r.containerState.size+1)(c)}function s(c){return r.containerState.furtherBlankLines||!mt(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(zR,t,u)(c))}function u(c){return r.containerState._closeFlow=!0,r.interrupt=void 0,Et(e,e.attempt(zn,t,n),"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(c)}}function WR(e,t,n){const r=this;return Et(e,i,"listItemIndent",r.containerState.size+1);function i(s){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(s):n(s)}}function YR(e){e.exit(this.containerState.type)}function GR(e,t,n){const r=this;return Et(e,i,"listItemPrefixWhitespace",r.parser.constructs.disable.null.includes("codeIndented")?void 0:5);function i(s){const u=r.events[r.events.length-1];return!mt(s)&&u&&u[1].type==="listItemPrefixWhitespace"?t(s):n(s)}}const Rb={name:"setextUnderline",resolveTo:XR,tokenize:KR};function XR(e,t){let n=e.length,r,i,s;for(;n--;)if(e[n][0]==="enter"){if(e[n][1].type==="content"){r=n;break}e[n][1].type==="paragraph"&&(i=n)}else e[n][1].type==="content"&&e.splice(n,1),!s&&e[n][1].type==="definition"&&(s=n);const u={type:"setextHeading",start:M({},e[r][1].start),end:M({},e[e.length-1][1].end)};return e[i][1].type="setextHeadingText",s?(e.splice(i,0,["enter",u,t]),e.splice(s+1,0,["exit",e[r][1],t]),e[r][1].end=M({},e[s][1].end)):e[r][1]=u,e.push(["exit",u,t]),e}function KR(e,t,n){const r=this;let i;return s;function s(f){let h=r.events.length,m;for(;h--;)if(r.events[h][1].type!=="lineEnding"&&r.events[h][1].type!=="linePrefix"&&r.events[h][1].type!=="content"){m=r.events[h][1].type==="paragraph";break}return!r.parser.lazy[r.now().line]&&(r.interrupt||m)?(e.enter("setextHeadingLine"),i=f,u(f)):n(f)}function u(f){return e.enter("setextHeadingLineSequence"),c(f)}function c(f){return f===i?(e.consume(f),c):(e.exit("setextHeadingLineSequence"),mt(f)?Et(e,d,"lineSuffix")(f):d(f))}function d(f){return f===null||Ye(f)?(e.exit("setextHeadingLine"),t(f)):n(f)}}const QR={tokenize:JR};function JR(e){const t=this,n=e.attempt(ou,r,e.attempt(this.parser.constructs.flowInitial,i,Et(e,e.attempt(this.parser.constructs.flow,i,e.attempt(rR,i)),"linePrefix")));return n;function r(s){if(s===null){e.consume(s);return}return e.enter("lineEndingBlank"),e.consume(s),e.exit("lineEndingBlank"),t.currentConstruct=void 0,n}function i(s){if(s===null){e.consume(s);return}return e.enter("lineEnding"),e.consume(s),e.exit("lineEnding"),t.currentConstruct=void 0,n}}const ZR={resolveAll:Db()},e4=Lb("string"),t4=Lb("text");function Lb(e){return{resolveAll:Db(e==="text"?n4:void 0),tokenize:t};function t(n){const r=this,i=this.parser.constructs[e],s=n.attempt(i,u,c);return u;function u(h){return f(h)?s(h):c(h)}function c(h){if(h===null){n.consume(h);return}return n.enter("data"),n.consume(h),d}function d(h){return f(h)?(n.exit("data"),s(h)):(n.consume(h),d)}function f(h){if(h===null)return!0;const m=i[h];let E=-1;if(m)for(;++E<m.length;){const b=m[E];if(!b.previous||b.previous.call(r,r.previous))return!0}return!1}}}function Db(e){return t;function t(n,r){let i=-1,s;for(;++i<=n.length;)s===void 0?n[i]&&n[i][1].type==="data"&&(s=i,i++):(!n[i]||n[i][1].type!=="data")&&(i!==s+2&&(n[s][1].end=n[i-1][1].end,n.splice(s+2,i-s-2),i=s+2),s=void 0);return e?e(n,r):n}}function n4(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],i=t.sliceStream(r);let s=i.length,u=-1,c=0,d;for(;s--;){const f=i[s];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){s++;break}}if(t._contentTypeTextTrailing&&n===e.length&&(c=0),c){const f={type:n===e.length||d||c<2?"lineSuffix":"hardBreakTrailing",start:{_bufferIndex:s?u:r.start._bufferIndex+u,_index:r.start._index+s,line:r.end.line,column:r.end.column-c,offset:r.end.offset-c},end:M({},r.end)};r.end=M({},f.start),r.start.offset===r.end.offset?Object.assign(r,f):(e.splice(n,0,["enter",f,t],["exit",f,t]),n+=2)}n++}return e}const r4=Object.freeze(Object.defineProperty({__proto__:null,attentionMarkers:{null:[42,95]},contentInitial:{91:uR},disable:{null:[]},document:{42:zn,43:zn,45:zn,48:zn,49:zn,50:zn,51:zn,52:zn,53:zn,54:zn,55:zn,56:zn,57:zn,62:_b},flow:{35:hR,42:pl,45:[Rb,pl],60:ER,61:Rb,95:pl,96:kb,126:kb},flowInitial:{[-2]:rh,[-1]:rh,32:rh},insideSpan:{null:[nh,ZR]},string:{38:Sb,92:vb},text:{[-5]:oh,[-4]:oh,[-3]:oh,33:MR,38:Sb,42:nh,60:[BP,SR],91:BR,92:[fR,vb],93:ih,95:nh,96:QP}},Symbol.toStringTag,{value:"Module"}));function i4(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 i={},s=[];let u=[],c=[];const d={attempt:G(B),check:G(A),consume:S,enter:R,exit:U,interrupt:G(A,{interrupt:!0})},f={code:null,containerState:{},defineSkip:_,events:[],now:T,parser:e,previous:null,sliceSerialize:E,sliceStream:b,write:m};let h=t.tokenize.call(f,d);return t.resolveAll&&s.push(t),f;function m(ee){return u=hr(u,ee),I(),u[u.length-1]!==null?[]:(W(t,0),f.events=fl(s,f.events,f),f.events)}function E(ee,Q){return s4(b(ee),Q)}function b(ee){return o4(u,ee)}function T(){const{_bufferIndex:ee,_index:Q,line:me,column:V,offset:ue}=r;return{_bufferIndex:ee,_index:Q,line:me,column:V,offset:ue}}function _(ee){i[ee.line]=ee.column,H()}function I(){let ee;for(;r._index<u.length;){const Q=u[r._index];if(typeof Q=="string")for(ee=r._index,r._bufferIndex<0&&(r._bufferIndex=0);r._index===ee&&r._bufferIndex<Q.length;)v(Q.charCodeAt(r._bufferIndex));else v(Q)}}function v(ee){h=h(ee)}function S(ee){Ye(ee)?(r.line++,r.column=1,r.offset+=ee===-3?2:1,H()):ee!==-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=ee}function R(ee,Q){const me=Q||{};return me.type=ee,me.start=T(),f.events.push(["enter",me,f]),c.push(me),me}function U(ee){const Q=c.pop();return Q.end=T(),f.events.push(["exit",Q,f]),Q}function B(ee,Q){W(ee,Q.from)}function A(ee,Q){Q.restore()}function G(ee,Q){return me;function me(V,ue,fe){let ae,J,se,O;return Array.isArray(V)?q(V):"tokenize"in V?q([V]):j(V);function j(pe){return Ne;function Ne(ve){const ze=ve!==null&&pe[ve],rt=ve!==null&&pe.null,Ot=[...Array.isArray(ze)?ze:ze?[ze]:[],...Array.isArray(rt)?rt:rt?[rt]:[]];return q(Ot)(ve)}}function q(pe){return ae=pe,J=0,pe.length===0?fe:P(pe[J])}function P(pe){return Ne;function Ne(ve){return O=re(),se=pe,pe.partial||(f.currentConstruct=pe),pe.name&&f.parser.constructs.disable.null.includes(pe.name)?Re():pe.tokenize.call(Q?Object.assign(Object.create(f),Q):f,d,ge,Re)(ve)}}function ge(pe){return ee(se,O),ue}function Re(pe){return O.restore(),++J<ae.length?P(ae[J]):fe}}}function W(ee,Q){ee.resolveAll&&!s.includes(ee)&&s.push(ee),ee.resolve&&ir(f.events,Q,f.events.length-Q,ee.resolve(f.events.slice(Q),f)),ee.resolveTo&&(f.events=ee.resolveTo(f.events,f))}function re(){const ee=T(),Q=f.previous,me=f.currentConstruct,V=f.events.length,ue=Array.from(c);return{from:V,restore:fe};function fe(){r=ee,f.previous=Q,f.currentConstruct=me,f.events.length=V,c=ue,H()}}function H(){r.line in i&&r.column<2&&(r.column=i[r.line],r.offset+=i[r.line]-1)}}function o4(e,t){const n=t.start._index,r=t.start._bufferIndex,i=t.end._index,s=t.end._bufferIndex;let u;if(n===i)u=[e[n].slice(r,s)];else{if(u=e.slice(n,i),r>-1){const c=u[0];typeof c=="string"?u[0]=c.slice(r):u.shift()}s>0&&u.push(e[i].slice(0,s))}return u}function s4(e,t){let n=-1;const r=[];let i;for(;++n<e.length;){const s=e[n];let u;if(typeof s=="string")u=s;else switch(s){case-5:{u="\r";break}case-4:{u=`
25
25
  `;break}case-3:{u=`\r
26
26
  `;break}case-2:{u=t?" ":" ";break}case-1:{if(!t&&i)continue;u=" ";break}default:u=String.fromCharCode(s)}i=s===-2,r.push(u)}return r.join("")}function a4(e){const r={constructs:bb([r4,...(e||{}).extensions||[]]),content:i(OP),defined:[],document:i(RP),flow:i(QR),lazy:{},string:i(e4),text:i(t4)};return r;function i(s){return u;function u(c){return i4(r,s,c)}}}function u4(e){for(;!Cb(e););return e}const Mb=/[\0\t\n\r]/g;function c4(){let e=1,t="",n=!0,r;return i;function i(s,u,c){const d=[];let f,h,m,E,b;for(s=t+(typeof s=="string"?s.toString():new TextDecoder(u||void 0).decode(s)),m=0,t="",n&&(s.charCodeAt(0)===65279&&m++,n=void 0);m<s.length;){if(Mb.lastIndex=m,f=Mb.exec(s),E=f&&f.index!==void 0?f.index:s.length,b=s.charCodeAt(E),!f){t=s.slice(m);break}if(b===10&&m===E&&r)d.push(-3),r=void 0;else switch(r&&(d.push(-5),r=void 0),m<E&&(d.push(s.slice(m,E)),e+=E-m),b){case 0:{d.push(65533),e++;break}case 9:{for(h=Math.ceil(e/4)*4,d.push(-2);e++<h;)d.push(-1);break}case 10:{d.push(-4),e=1;break}default:r=!0,e=1}m=E+1}return c&&(r&&d.push(-5),t&&d.push(t),d.push(null)),d}}const l4=/\\([!-/:-@[-`{-~])|&(#(?:\d{1,7}|x[\da-f]{1,6})|[\da-z]{1,31});/gi;function d4(e){return e.replace(l4,f4)}function f4(e,t,n){if(t)return t;if(n.charCodeAt(0)===35){const i=n.charCodeAt(1),s=i===120||i===88;return wb(n.slice(s?2:1),s?16:10)}return eh(n)||e}const Fb={}.hasOwnProperty;function p4(e,t,n){return t&&typeof t=="object"&&(n=t,t=void 0),h4(n)(u4(a4(n).document().write(c4()(e,t,!0))))}function h4(e){const t={transforms:[],canContainEols:["emphasis","fragment","heading","paragraph","strong"],enter:{autolink:s(it),autolinkProtocol:re,autolinkEmail:re,atxHeading:s(yt),blockQuote:s(rt),characterEscape:re,characterReference:re,codeFenced:s(Ot),codeFencedFenceInfo:u,codeFencedFenceMeta:u,codeIndented:s(Ot,u),codeText:s(ct,u),codeTextData:re,data:re,codeFlowValue:re,definition:s(_t),definitionDestinationString:u,definitionLabelString:u,definitionTitleString:u,emphasis:s(tt),hardBreakEscape:s(De),hardBreakTrailing:s(De),htmlFlow:s(Ve,u),htmlFlowData:re,htmlText:s(Ve,u),htmlTextData:re,image:s(Oe),label:u,link:s(it),listItem:s(jt),listItemValue:E,listOrdered:s(lt,m),listUnordered:s(lt),paragraph:s(At),reference:P,referenceString:u,resourceDestinationString:u,resourceTitleString:u,setextHeading:s(yt),strong:s(Ei),thematicBreak:s(Ko)},exit:{atxHeading:d(),atxHeadingSequence:B,autolink:d(),autolinkEmail:ze,autolinkProtocol:ve,blockQuote:d(),characterEscapeValue:H,characterReferenceMarkerHexadecimal:Re,characterReferenceMarkerNumeric:Re,characterReferenceValue:pe,characterReference:Ne,codeFenced:d(I),codeFencedFence:_,codeFencedFenceInfo:b,codeFencedFenceMeta:T,codeFlowValue:H,codeIndented:d(v),codeText:d(ue),codeTextData:H,data:H,definition:d(),definitionDestinationString:U,definitionLabelString:S,definitionTitleString:R,emphasis:d(),hardBreakEscape:d(Q),hardBreakTrailing:d(Q),htmlFlow:d(me),htmlFlowData:H,htmlText:d(V),htmlTextData:H,image:d(ae),label:se,labelText:J,lineEnding:ee,link:d(fe),listItem:d(),listOrdered:d(),listUnordered:d(),paragraph:d(),referenceString:ge,resourceDestinationString:O,resourceTitleString:j,resource:q,setextHeading:d(W),setextHeadingLineSequence:G,setextHeadingText:A,strong:d(),thematicBreak:d()}};Bb(t,(e||{}).mdastExtensions||[]);const n={};return r;function r(he){let ke={type:"root",children:[]};const Qe={stack:[ke],tokenStack:[],config:t,enter:c,exit:f,buffer:u,resume:h,data:n},Je=[];let et=-1;for(;++et<he.length;)if(he[et][1].type==="listOrdered"||he[et][1].type==="listUnordered")if(he[et][0]==="enter")Je.push(et);else{const Yt=Je.pop();et=i(he,Yt,et)}for(et=-1;++et<he.length;){const Yt=t[he[et][0]];Fb.call(Yt,he[et][1].type)&&Yt[he[et][1].type].call(Object.assign({sliceSerialize:he[et][2].sliceSerialize},Qe),he[et][1])}if(Qe.tokenStack.length>0){const Yt=Qe.tokenStack[Qe.tokenStack.length-1];(Yt[1]||Ub).call(Qe,void 0,Yt[0])}for(ke.position={start:Mi(he.length>0?he[0][1].start:{line:1,column:1,offset:0}),end:Mi(he.length>0?he[he.length-2][1].end:{line:1,column:1,offset:0})},et=-1;++et<t.transforms.length;)ke=t.transforms[et](ke)||ke;return ke}function i(he,ke,Qe){let Je=ke-1,et=-1,Yt=!1,Yn,mn,Gt,en;for(;++Je<=Qe;){const Xt=he[Je];switch(Xt[1].type){case"listUnordered":case"listOrdered":case"blockQuote":{Xt[0]==="enter"?et++:et--,en=void 0;break}case"lineEndingBlank":{Xt[0]==="enter"&&(Yn&&!en&&!et&&!Gt&&(Gt=Je),en=void 0);break}case"linePrefix":case"listItemValue":case"listItemMarker":case"listItemPrefix":case"listItemPrefixWhitespace":break;default:en=void 0}if(!et&&Xt[0]==="enter"&&Xt[1].type==="listItemPrefix"||et===-1&&Xt[0]==="exit"&&(Xt[1].type==="listUnordered"||Xt[1].type==="listOrdered")){if(Yn){let Mn=Je;for(mn=void 0;Mn--;){const wn=he[Mn];if(wn[1].type==="lineEnding"||wn[1].type==="lineEndingBlank"){if(wn[0]==="exit")continue;mn&&(he[mn][1].type="lineEndingBlank",Yt=!0),wn[1].type="lineEnding",mn=Mn}else if(!(wn[1].type==="linePrefix"||wn[1].type==="blockQuotePrefix"||wn[1].type==="blockQuotePrefixWhitespace"||wn[1].type==="blockQuoteMarker"||wn[1].type==="listItemIndent"))break}Gt&&(!mn||Gt<mn)&&(Yn._spread=!0),Yn.end=Object.assign({},mn?he[mn][1].start:Xt[1].end),he.splice(mn||Je,0,["exit",Yn,Xt[2]]),Je++,Qe++}if(Xt[1].type==="listItemPrefix"){const Mn={type:"listItem",_spread:!1,start:Object.assign({},Xt[1].start),end:void 0};Yn=Mn,he.splice(Je,0,["enter",Mn,Xt[2]]),Je++,Qe++,Gt=void 0,en=!0}}}return he[ke][1]._spread=Yt,Qe}function s(he,ke){return Qe;function Qe(Je){c.call(this,he(Je),Je),ke&&ke.call(this,Je)}}function u(){this.stack.push({type:"fragment",children:[]})}function c(he,ke,Qe){this.stack[this.stack.length-1].children.push(he),this.stack.push(he),this.tokenStack.push([ke,Qe||void 0]),he.position={start:Mi(ke.start),end:void 0}}function d(he){return ke;function ke(Qe){he&&he.call(this,Qe),f.call(this,Qe)}}function f(he,ke){const Qe=this.stack.pop(),Je=this.tokenStack.pop();if(Je)Je[0].type!==he.type&&(ke?ke.call(this,he,Je[0]):(Je[1]||Ub).call(this,he,Je[0]));else throw new Error("Cannot close `"+he.type+"` ("+ru({start:he.start,end:he.end})+"): it’s not open");Qe.position.end=Mi(he.end)}function h(){return Zp(this.stack.pop())}function m(){this.data.expectingFirstListItemValue=!0}function E(he){if(this.data.expectingFirstListItemValue){const ke=this.stack[this.stack.length-2];ke.start=Number.parseInt(this.sliceSerialize(he),10),this.data.expectingFirstListItemValue=void 0}}function b(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.lang=he}function T(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.meta=he}function _(){this.data.flowCodeInside||(this.buffer(),this.data.flowCodeInside=!0)}function I(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.value=he.replace(/^(\r?\n|\r)|(\r?\n|\r)$/g,""),this.data.flowCodeInside=void 0}function v(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.value=he.replace(/(\r?\n|\r)$/g,"")}function S(he){const ke=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=ke,Qe.identifier=Cr(this.sliceSerialize(he)).toLowerCase()}function R(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.title=he}function U(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.url=he}function B(he){const ke=this.stack[this.stack.length-1];if(!ke.depth){const Qe=this.sliceSerialize(he).length;ke.depth=Qe}}function A(){this.data.setextHeadingSlurpLineEnding=!0}function G(he){const ke=this.stack[this.stack.length-1];ke.depth=this.sliceSerialize(he).codePointAt(0)===61?1:2}function W(){this.data.setextHeadingSlurpLineEnding=void 0}function re(he){const Qe=this.stack[this.stack.length-1].children;let Je=Qe[Qe.length-1];(!Je||Je.type!=="text")&&(Je=sr(),Je.position={start:Mi(he.start),end:void 0},Qe.push(Je)),this.stack.push(Je)}function H(he){const ke=this.stack.pop();ke.value+=this.sliceSerialize(he),ke.position.end=Mi(he.end)}function ee(he){const ke=this.stack[this.stack.length-1];if(this.data.atHardBreak){const Qe=ke.children[ke.children.length-1];Qe.position.end=Mi(he.end),this.data.atHardBreak=void 0;return}!this.data.setextHeadingSlurpLineEnding&&t.canContainEols.includes(ke.type)&&(re.call(this,he),H.call(this,he))}function Q(){this.data.atHardBreak=!0}function me(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.value=he}function V(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.value=he}function ue(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.value=he}function fe(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ke,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function ae(){const he=this.stack[this.stack.length-1];if(this.data.inReference){const ke=this.data.referenceType||"shortcut";he.type+="Reference",he.referenceType=ke,delete he.url,delete he.title}else delete he.identifier,delete he.label;this.data.referenceType=void 0}function J(he){const ke=this.sliceSerialize(he),Qe=this.stack[this.stack.length-2];Qe.label=d4(ke),Qe.identifier=Cr(ke).toLowerCase()}function se(){const he=this.stack[this.stack.length-1],ke=this.resume(),Qe=this.stack[this.stack.length-1];if(this.data.inReference=!0,Qe.type==="link"){const Je=he.children;Qe.children=Je}else Qe.alt=ke}function O(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.url=he}function j(){const he=this.resume(),ke=this.stack[this.stack.length-1];ke.title=he}function q(){this.data.inReference=void 0}function P(){this.data.referenceType="collapsed"}function ge(he){const ke=this.resume(),Qe=this.stack[this.stack.length-1];Qe.label=ke,Qe.identifier=Cr(this.sliceSerialize(he)).toLowerCase(),this.data.referenceType="full"}function Re(he){this.data.characterReferenceType=he.type}function pe(he){const ke=this.sliceSerialize(he),Qe=this.data.characterReferenceType;let Je;Qe?(Je=wb(ke,Qe==="characterReferenceMarkerNumeric"?10:16),this.data.characterReferenceType=void 0):Je=eh(ke);const et=this.stack[this.stack.length-1];et.value+=Je}function Ne(he){const ke=this.stack.pop();ke.position.end=Mi(he.end)}function ve(he){H.call(this,he);const ke=this.stack[this.stack.length-1];ke.url=this.sliceSerialize(he)}function ze(he){H.call(this,he);const ke=this.stack[this.stack.length-1];ke.url="mailto:"+this.sliceSerialize(he)}function rt(){return{type:"blockquote",children:[]}}function Ot(){return{type:"code",lang:null,meta:null,value:""}}function ct(){return{type:"inlineCode",value:""}}function _t(){return{type:"definition",identifier:"",label:null,title:null,url:""}}function tt(){return{type:"emphasis",children:[]}}function yt(){return{type:"heading",depth:0,children:[]}}function De(){return{type:"break"}}function Ve(){return{type:"html",value:""}}function Oe(){return{type:"image",title:null,url:"",alt:null}}function it(){return{type:"link",title:null,url:"",children:[]}}function lt(he){return{type:"list",ordered:he.type==="listOrdered",start:null,spread:he._spread,children:[]}}function jt(he){return{type:"listItem",spread:he._spread,checked:null,children:[]}}function At(){return{type:"paragraph",children:[]}}function Ei(){return{type:"strong",children:[]}}function sr(){return{type:"text",value:""}}function Ko(){return{type:"thematicBreak"}}}function Mi(e){return{line:e.line,column:e.column,offset:e.offset}}function Bb(e,t){let n=-1;for(;++n<t.length;){const r=t[n];Array.isArray(r)?Bb(e,r):m4(e,r)}}function m4(e,t){let n;for(n in t)if(Fb.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 Ub(e,t){throw e?new Error("Cannot close `"+e.type+"` ("+ru({start:e.start,end:e.end})+"): a different token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is open"):new Error("Cannot close document, a token (`"+t.type+"`, "+ru({start:t.start,end:t.end})+") is still open")}function g4(e){const t=this;t.parser=n;function n(r){return p4(r,ce(M(M({},t.data("settings")),e),{extensions:t.data("micromarkExtensions")||[],mdastExtensions:t.data("fromMarkdownExtensions")||[]}))}}function y4(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 E4(e,t){const n={type:"element",tagName:"br",properties:{},children:[]};return e.patch(t,n),[e.applyData(t,n),{type:"text",value:`
@@ -29,24 +29,24 @@ Error generating stack: `+x.message+`
29
29
  `}),h.type==="element"&&h.tagName==="p"&&!i?u.push(...h.children):u.push(h)}const d=r[r.length-1];d&&(i||d.type!=="element"||d.tagName!=="p")&&u.push({type:"text",value:`
30
30
  `});const f={type:"element",tagName:"li",properties:s,children:u};return e.patch(t,f),e.applyData(t,f)}function O4(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=Hb(n[r])}return t}function Hb(e){const t=e.spread;return t==null?e.children.length>1:t}function P4(e,t){const n={},r=e.all(t);let i=-1;for(typeof t.start=="number"&&t.start!==1&&(n.start=t.start);++i<r.length;){const u=r[i];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 s={type:"element",tagName:t.ordered?"ol":"ul",properties:n,children:e.wrap(r,!0)};return e.patch(t,s),e.applyData(t,s)}function R4(e,t){const n={type:"element",tagName:"p",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function L4(e,t){const n={type:"root",children:e.wrap(e.all(t))};return e.patch(t,n),e.applyData(t,n)}function D4(e,t){const n={type:"element",tagName:"strong",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}function M4(e,t){const n=e.all(t),r=n.shift(),i=[];if(r){const u={type:"element",tagName:"thead",properties:{},children:e.wrap([r],!0)};e.patch(t.children[0],u),i.push(u)}if(n.length>0){const u={type:"element",tagName:"tbody",properties:{},children:e.wrap(n,!0)},c=Yr(t.children[1]),d=cl(t.children[t.children.length-1]);c&&d&&(u.position={start:c,end:d}),i.push(u)}const s={type:"element",tagName:"table",properties:{},children:e.wrap(i,!0)};return e.patch(t,s),e.applyData(t,s)}function F4(e,t,n){const r=n?n.children:void 0,s=(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],E={},b=u?u[d]:void 0;b&&(E.align=b);let T={type:"element",tagName:s,properties:E,children:[]};m&&(T.children=e.all(m),e.patch(m,T),T=e.applyData(m,T)),f.push(T)}const h={type:"element",tagName:"tr",properties:{},children:e.wrap(f,!0)};return e.patch(t,h),e.applyData(t,h)}function B4(e,t){const n={type:"element",tagName:"td",properties:{},children:e.all(t)};return e.patch(t,n),e.applyData(t,n)}const $b=9,zb=32;function U4(e){const t=String(e),n=/\r?\n|\r/g;let r=n.exec(t),i=0;const s=[];for(;r;)s.push(Vb(t.slice(i,r.index),i>0,!0),r[0]),i=r.index+r[0].length,r=n.exec(t);return s.push(Vb(t.slice(i),i>0,!1)),s.join("")}function Vb(e,t,n){let r=0,i=e.length;if(t){let s=e.codePointAt(r);for(;s===$b||s===zb;)r++,s=e.codePointAt(r)}if(n){let s=e.codePointAt(i-1);for(;s===$b||s===zb;)i--,s=e.codePointAt(i-1)}return i>r?e.slice(r,i):""}function j4(e,t){const n={type:"text",value:U4(String(t.value))};return e.patch(t,n),e.applyData(t,n)}function H4(e,t){const n={type:"element",tagName:"hr",properties:{},children:[]};return e.patch(t,n),e.applyData(t,n)}const $4={blockquote:y4,break:E4,code:b4,delete:w4,emphasis:x4,footnoteReference:T4,heading:_4,html:v4,imageReference:S4,image:A4,inlineCode:k4,linkReference:C4,link:N4,listItem:I4,list:P4,paragraph:R4,root:L4,strong:D4,table:M4,tableCell:B4,tableRow:F4,text:j4,thematicBreak:H4,toml:hl,yaml:hl,definition:hl,footnoteDefinition:hl};function hl(){}const qb=-1,ml=0,uu=1,gl=2,sh=3,ah=4,uh=5,ch=6,Wb=7,Yb=8,{defineProperty:z4}=Object,Gb=typeof self=="object"?self:globalThis,Xb=(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 Gb[e](t)},V4=(e,t)=>{const n=(i,s)=>(e.set(s,i),i),r=i=>{if(e.has(i))return e.get(i);const[s,u]=t[i];switch(s){case ml:case qb:return n(u,i);case uu:{const c=n([],i);for(const d of u)c.push(r(d));return c}case gl:{const c=n({},i);for(const[d,f]of u){const h=r(d),m=r(f);h==="__proto__"?z4(c,h,{value:m,configurable:!0,enumerable:!0,writable:!0}):c[h]=m}return c}case sh:return n(new Date(u),i);case ah:{const{source:c,flags:d}=u;return n(new RegExp(c,d),i)}case uh:{const c=n(new Map,i);for(const[d,f]of u)c.set(r(d),r(f));return c}case ch:{const c=n(new Set,i);for(const d of u)c.add(r(d));return c}case Wb:{const{name:c,message:d}=u;return n(typeof Gb[c]=="function"?Xb(c,d):new Error(d),i)}case Yb:return n(BigInt(u),i);case"BigInt":return n(Object(BigInt(u)),i);case"ArrayBuffer":return n(new Uint8Array(u).buffer,u);case"DataView":{const{buffer:c}=new Uint8Array(u);return n(new DataView(c),u)}case"-0":return-0}return n(Xb(s,u),i)};return r},Kb=e=>V4(new Map,e)(0),Ro="",{toString:q4}={},{keys:W4,is:Y4}=Object,cu=e=>{const t=typeof e;if(t!=="object"||!e)return[ml,t];const n=q4.call(e).slice(8,-1);switch(n){case"Array":return[uu,Ro];case"Object":return[gl,Ro];case"Date":return[sh,Ro];case"RegExp":return[ah,Ro];case"Map":return[uh,Ro];case"Set":return[ch,Ro];case"DataView":return[uu,n]}return n.includes("Array")?[uu,n]:e instanceof Error?[Wb,e.name||"Error"]:[gl,n]},yl=([e,t])=>e===ml&&(t==="function"||t==="symbol"),G4=(e,t,n,r)=>{const i=(u,c)=>{const d=r.push(u)-1;return n.set(c,d),d},s=u=>{if(n.has(u))return n.get(u);let[c,d]=cu(u);switch(c){case ml:{let h=u;switch(d){case"bigint":c=Yb,h=u.toString();break;case"number":if(!u&&Y4(u,-0))return r.push(["-0"])-1;break;case"function":case"symbol":if(e)throw new TypeError("unable to serialize "+d);h=null;break;case"undefined":return i([qb],u)}return i([c,h],u)}case uu:{if(d){let E=u;return d==="DataView"?E=new Uint8Array(u.buffer):d==="ArrayBuffer"&&(E=new Uint8Array(u)),i([d,[...E]],u)}const h=[],m=i([c,h],u);for(const E of u)h.push(s(E));return m}case gl:{if(d)switch(d){case"BigInt":return i([d,u.toString()],u);case"Boolean":case"Number":case"String":return i([d,u.valueOf()],u)}if(t&&"toJSON"in u)return s(u.toJSON());const h=[],m=i([c,h],u);for(const E of W4(u))(e||!yl(cu(u[E])))&&h.push([s(E),s(u[E])]);return m}case sh:return i([c,isNaN(u.getTime())?Ro:u.toISOString()],u);case ah:{const{source:h,flags:m}=u;return i([c,{source:h,flags:m}],u)}case uh:{const h=[],m=i([c,h],u);for(const[E,b]of u)(e||!(yl(cu(E))||yl(cu(b))))&&h.push([s(E),s(b)]);return m}case ch:{const h=[],m=i([c,h],u);for(const E of u)(e||!yl(cu(E)))&&h.push(s(E));return m}}const{message:f}=u;return i([c,{name:d,message:f}],u)};return s},Qb=(e,{json:t,lossy:n}={})=>{const r=[];return G4(!(t||n),!!t,new Map,r)(e),r},Lo=typeof structuredClone=="function"?(e,t)=>t&&("json"in t||"lossy"in t)?Kb(Qb(e,t)):structuredClone(e):(e,t)=>Kb(Qb(e,t));function X4(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 K4(e,t){return"Back to reference "+(e+1)+(t>1?"-"+t:"")}function Q4(e){const t=typeof e.options.clobberPrefix=="string"?e.options.clobberPrefix:"user-content-",n=e.options.footnoteBackContent||X4,r=e.options.footnoteBackLabel||K4,i=e.options.footnoteLabel||"Footnotes",s=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 h=e.all(f),m=String(f.identifier).toUpperCase(),E=Ps(m.toLowerCase());let b=0;const T=[],_=e.footnoteCounts.get(m);for(;_!==void 0&&++b<=_;){T.length>0&&T.push({type:"text",value:" "});let S=typeof n=="string"?n:n(d,b);typeof S=="string"&&(S={type:"text",value:S}),T.push({type:"element",tagName:"a",properties:{href:"#"+t+"fnref-"+E+(b>1?"-"+b:""),dataFootnoteBackref:"",ariaLabel:typeof r=="string"?r:r(d,b),className:["data-footnote-backref"]},children:Array.isArray(S)?S:[S]})}const I=h[h.length-1];if(I&&I.type==="element"&&I.tagName==="p"){const S=I.children[I.children.length-1];S&&S.type==="text"?S.value+=" ":I.children.push({type:"text",value:" "}),I.children.push(...T)}else h.push(...T);const v={type:"element",tagName:"li",properties:{id:t+"fn-"+E},children:e.wrap(h,!0)};e.patch(f,v),c.push(v)}if(c.length!==0)return{type:"element",tagName:"section",properties:{dataFootnotes:!0,className:["footnotes"]},children:[{type:"element",tagName:s,properties:ce(M({},Lo(u)),{id:"footnote-label"}),children:[{type:"text",value:i}]},{type:"text",value:`
31
31
  `},{type:"element",tagName:"ol",properties:{},children:e.wrap(c,!0)},{type:"text",value:`
32
- `}]}}const El=(function(e){if(e==null)return t6;if(typeof e=="function")return bl(e);if(typeof e=="object")return Array.isArray(e)?J4(e):Z4(e);if(typeof e=="string")return e6(e);throw new Error("Expected function, string, or object as test")});function J4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=El(e[n]);return bl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Z4(e){const t=e;return bl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function e6(e){return bl(t);function t(n){return n&&n.type===e}}function bl(e){return t;function t(n,r,i){return!!(n6(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function t6(){return!0}function n6(e){return e!==null&&typeof e=="object"&&"type"in e}function AV(e){return e}const Jb=[],r6=!0,lh=!1,i6="skip";function Zb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=El(i),u=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return E;function E(){let b=Jb,T,_,I;if((!t||s(d,f,h[h.length-1]||void 0))&&(b=o6(n(d,h)),b[0]===lh))return b;if("children"in d&&d.children){const v=d;if(v.children&&b[0]!==i6)for(_=(r?v.children.length:-1)+u,I=h.concat(v);_>-1&&_<v.children.length;){const S=v.children[_];if(T=c(S,_,I)(),T[0]===lh)return T;_=typeof T[1]=="number"?T[1]:_+u}}return b}}}function o6(e){return Array.isArray(e)?e:typeof e=="number"?[r6,e]:e==null?Jb:[e]}function wl(e,t,n,r){let i,s,u;typeof t=="function"&&typeof n!="function"?(s=void 0,u=t,i=n):(s=t,u=n,i=r),Zb(e,s,c,i);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return u(d,m,h)}}const dh={}.hasOwnProperty,s6={};function a6(e,t){const n=t||s6,r=new Map,i=new Map,s=new Map,u=M(M({},$4),n.handlers),c={all:f,applyData:c6,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:u,one:d,options:n,patch:u6,wrap:d6};return wl(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:i,E=String(h.identifier).toUpperCase();m.has(E)||m.set(E,h)}}),c;function d(h,m){const E=h.type,b=c.handlers[E];if(dh.call(c.handlers,E)&&b)return b(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(E)){if("children"in h){const _=h,{children:I}=_,v=_n(_,["children"]),S=Lo(v);return S.children=c.all(h),S}return Lo(h)}return(c.options.unknownHandler||l6)(c,h,m)}function f(h){const m=[];if("children"in h){const E=h.children;let b=-1;for(;++b<E.length;){const T=c.one(E[b],h);if(T){if(b&&E[b-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=ew(T.value)),!Array.isArray(T)&&T.type==="element")){const _=T.children[0];_&&_.type==="text"&&(_.value=ew(_.value))}Array.isArray(T)?m.push(...T):m.push(T)}}}return m}}function u6(e,t){e.position&&(t.position=ub(e))}function c6(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=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"&&s&&Object.assign(n.properties,Lo(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function l6(e,t){const n=t.data||{},r="value"in t&&!(dh.call(n,"hProperties")||dh.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 d6(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
32
+ `}]}}const El=(function(e){if(e==null)return t6;if(typeof e=="function")return bl(e);if(typeof e=="object")return Array.isArray(e)?J4(e):Z4(e);if(typeof e=="string")return e6(e);throw new Error("Expected function, string, or object as test")});function J4(e){const t=[];let n=-1;for(;++n<e.length;)t[n]=El(e[n]);return bl(r);function r(...i){let s=-1;for(;++s<t.length;)if(t[s].apply(this,i))return!0;return!1}}function Z4(e){const t=e;return bl(n);function n(r){const i=r;let s;for(s in e)if(i[s]!==t[s])return!1;return!0}}function e6(e){return bl(t);function t(n){return n&&n.type===e}}function bl(e){return t;function t(n,r,i){return!!(n6(n)&&e.call(this,n,typeof r=="number"?r:void 0,i||void 0))}}function t6(){return!0}function n6(e){return e!==null&&typeof e=="object"&&"type"in e}function SV(e){return e}const Jb=[],r6=!0,lh=!1,i6="skip";function Zb(e,t,n,r){let i;typeof t=="function"&&typeof n!="function"?(r=n,n=t):i=t;const s=El(i),u=r?-1:1;c(e,void 0,[])();function c(d,f,h){const m=d&&typeof d=="object"?d:{};if(typeof m.type=="string"){const b=typeof m.tagName=="string"?m.tagName:typeof m.name=="string"?m.name:void 0;Object.defineProperty(E,"name",{value:"node ("+(d.type+(b?"<"+b+">":""))+")"})}return E;function E(){let b=Jb,T,_,I;if((!t||s(d,f,h[h.length-1]||void 0))&&(b=o6(n(d,h)),b[0]===lh))return b;if("children"in d&&d.children){const v=d;if(v.children&&b[0]!==i6)for(_=(r?v.children.length:-1)+u,I=h.concat(v);_>-1&&_<v.children.length;){const S=v.children[_];if(T=c(S,_,I)(),T[0]===lh)return T;_=typeof T[1]=="number"?T[1]:_+u}}return b}}}function o6(e){return Array.isArray(e)?e:typeof e=="number"?[r6,e]:e==null?Jb:[e]}function wl(e,t,n,r){let i,s,u;typeof t=="function"&&typeof n!="function"?(s=void 0,u=t,i=n):(s=t,u=n,i=r),Zb(e,s,c,i);function c(d,f){const h=f[f.length-1],m=h?h.children.indexOf(d):void 0;return u(d,m,h)}}const dh={}.hasOwnProperty,s6={};function a6(e,t){const n=t||s6,r=new Map,i=new Map,s=new Map,u=M(M({},$4),n.handlers),c={all:f,applyData:c6,definitionById:r,footnoteById:i,footnoteCounts:s,footnoteOrder:[],handlers:u,one:d,options:n,patch:u6,wrap:d6};return wl(e,function(h){if(h.type==="definition"||h.type==="footnoteDefinition"){const m=h.type==="definition"?r:i,E=String(h.identifier).toUpperCase();m.has(E)||m.set(E,h)}}),c;function d(h,m){const E=h.type,b=c.handlers[E];if(dh.call(c.handlers,E)&&b)return b(c,h,m);if(c.options.passThrough&&c.options.passThrough.includes(E)){if("children"in h){const _=h,{children:I}=_,v=_n(_,["children"]),S=Lo(v);return S.children=c.all(h),S}return Lo(h)}return(c.options.unknownHandler||l6)(c,h,m)}function f(h){const m=[];if("children"in h){const E=h.children;let b=-1;for(;++b<E.length;){const T=c.one(E[b],h);if(T){if(b&&E[b-1].type==="break"&&(!Array.isArray(T)&&T.type==="text"&&(T.value=ew(T.value)),!Array.isArray(T)&&T.type==="element")){const _=T.children[0];_&&_.type==="text"&&(_.value=ew(_.value))}Array.isArray(T)?m.push(...T):m.push(T)}}}return m}}function u6(e,t){e.position&&(t.position=ub(e))}function c6(e,t){let n=t;if(e&&e.data){const r=e.data.hName,i=e.data.hChildren,s=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"&&s&&Object.assign(n.properties,Lo(s)),"children"in n&&n.children&&i!==null&&i!==void 0&&(n.children=i)}return n}function l6(e,t){const n=t.data||{},r="value"in t&&!(dh.call(n,"hProperties")||dh.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 d6(e,t){const n=[];let r=-1;for(t&&n.push({type:"text",value:`
33
33
  `});++r<e.length;)r&&n.push({type:"text",value:`
34
34
  `}),n.push(e[r]);return t&&e.length>0&&n.push({type:"text",value:`
35
35
  `}),n}function ew(e){let t=0,n=e.charCodeAt(t);for(;n===9||n===32;)t++,n=e.charCodeAt(t);return e.slice(t)}function tw(e,t){const n=a6(e,t),r=n.one(e,void 0),i=Q4(n),s=Array.isArray(r)?{type:"root",children:r}:r||{type:"root",children:[]};return i&&s.children.push({type:"text",value:`
36
36
  `},i),s}function f6(e,t){return e&&"run"in e?function(n,r){return Ie(this,null,function*(){const i=tw(n,M({file:r},t));yield e.run(i,r)})}:function(n,r){return tw(n,M({file:r},e||t))}}function nw(e){if(e)throw e}var fh,rw;function p6(){if(rw)return fh;rw=1;var e=Object.prototype.hasOwnProperty,t=Object.prototype.toString,n=Object.defineProperty,r=Object.getOwnPropertyDescriptor,i=function(f){return typeof Array.isArray=="function"?Array.isArray(f):t.call(f)==="[object Array]"},s=function(f){if(!f||t.call(f)!=="[object Object]")return!1;var h=e.call(f,"constructor"),m=f.constructor&&f.constructor.prototype&&e.call(f.constructor.prototype,"isPrototypeOf");if(f.constructor&&!h&&!m)return!1;var E;for(E in f);return typeof E=="undefined"||e.call(f,E)},u=function(f,h){n&&h.name==="__proto__"?n(f,h.name,{enumerable:!0,configurable:!0,value:h.newValue,writable:!0}):f[h.name]=h.newValue},c=function(f,h){if(h==="__proto__")if(e.call(f,h)){if(r)return r(f,h).value}else return;return f[h]};return fh=function d(){var f,h,m,E,b,T,_=arguments[0],I=1,v=arguments.length,S=!1;for(typeof _=="boolean"&&(S=_,_=arguments[1]||{},I=2),(_==null||typeof _!="object"&&typeof _!="function")&&(_={});I<v;++I)if(f=arguments[I],f!=null)for(h in f)m=c(_,h),E=c(f,h),_!==E&&(S&&E&&(s(E)||(b=i(E)))?(b?(b=!1,T=m&&i(m)?m:[]):T=m&&s(m)?m:{},u(_,{name:h,newValue:d(S,T,E)})):typeof E!="undefined"&&u(_,{name:h,newValue:E}));return _},fh}var h6=p6();const ph=ht(h6);function hh(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 m6(){const e=[],t={run:n,use:r};return t;function n(...i){let s=-1;const u=i.pop();if(typeof u!="function")throw new TypeError("Expected function as last argument, not "+u);c(null,...i);function c(d,...f){const h=e[++s];let m=-1;if(d){u(d);return}for(;++m<i.length;)(f[m]===null||f[m]===void 0)&&(f[m]=i[m]);i=f,h?g6(h,c)(...f):u(null,...f)}}function r(i){if(typeof i!="function")throw new TypeError("Expected `middelware` to be a function, not "+i);return e.push(i),t}}function g6(e,t){let n;return r;function r(...u){const c=e.length>u.length;let d;c&&u.push(i);try{d=e.apply(this,u)}catch(f){const h=f;if(c&&n)throw h;return i(h)}c||(d&&d.then&&typeof d.then=="function"?d.then(s,i):d instanceof Error?i(d):s(d))}function i(u,...c){n||(n=!0,t(u,...c))}function s(u){i(null,u)}}const Gr={basename:y6,dirname:E6,extname:b6,join:w6,sep:"/"};function y6(e,t){if(t!==void 0&&typeof t!="string")throw new TypeError('"ext" argument must be a string');lu(e);let n=0,r=-1,i=e.length,s;if(t===void 0||t.length===0||t.length>e.length){for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else r<0&&(s=!0,r=i+1);return r<0?"":e.slice(n,r)}if(t===e)return"";let u=-1,c=t.length-1;for(;i--;)if(e.codePointAt(i)===47){if(s){n=i+1;break}}else u<0&&(s=!0,u=i+1),c>-1&&(e.codePointAt(i)===t.codePointAt(c--)?c<0&&(r=i):(c=-1,r=u));return n===r?r=u:r<0&&(r=e.length),e.slice(n,r)}function E6(e){if(lu(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 b6(e){lu(e);let t=e.length,n=-1,r=0,i=-1,s=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?i<0?i=t:s!==1&&(s=1):i>-1&&(s=-1)}return i<0||n<0||s===0||s===1&&i===n-1&&i===r+1?"":e.slice(i,n)}function w6(...e){let t=-1,n;for(;++t<e.length;)lu(e[t]),e[t]&&(n=n===void 0?e[t]:n+"/"+e[t]);return n===void 0?".":x6(n)}function x6(e){lu(e);const t=e.codePointAt(0)===47;let n=T6(e,!t);return n.length===0&&!t&&(n="."),n.length>0&&e.codePointAt(e.length-1)===47&&(n+="/"),t?"/"+n:n}function T6(e,t){let n="",r=0,i=-1,s=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(!(i===u-1||s===1))if(i!==u-1&&s===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("/")),i=u,s=0;continue}}else if(n.length>0){n="",r=0,i=u,s=0;continue}}t&&(n=n.length>0?n+"/..":"..",r=2)}else n.length>0?n+="/"+e.slice(i+1,u):n=e.slice(i+1,u),r=u-i-1;i=u,s=0}else c===46&&s>-1?s++:s=-1}return n}function lu(e){if(typeof e!="string")throw new TypeError("Path must be a string. Received "+JSON.stringify(e))}const _6={cwd:v6};function v6(){return"/"}function mh(e){return!!(e!==null&&typeof e=="object"&&"href"in e&&e.href&&"protocol"in e&&e.protocol&&e.auth===void 0)}function S6(e){if(typeof e=="string")e=new URL(e);else if(!mh(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 A6(e)}function A6(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 i=new TypeError("File URL path must not include encoded / characters");throw i.code="ERR_INVALID_FILE_URL_PATH",i}}return decodeURIComponent(t)}const gh=["history","path","basename","stem","extname","dirname"];class iw{constructor(t){let n;t?mh(t)?n={path:t}:typeof t=="string"||k6(t)?n={value:t}:n=t:n={},this.cwd="cwd"in n?"":_6.cwd(),this.data={},this.history=[],this.messages=[],this.value,this.map,this.result,this.stored;let r=-1;for(;++r<gh.length;){const s=gh[r];s in n&&n[s]!==void 0&&n[s]!==null&&(this[s]=s==="history"?[...n[s]]:n[s])}let i;for(i in n)gh.includes(i)||(this[i]=n[i])}get basename(){return typeof this.path=="string"?Gr.basename(this.path):void 0}set basename(t){Eh(t,"basename"),yh(t,"basename"),this.path=Gr.join(this.dirname||"",t)}get dirname(){return typeof this.path=="string"?Gr.dirname(this.path):void 0}set dirname(t){ow(this.basename,"dirname"),this.path=Gr.join(t||"",this.basename)}get extname(){return typeof this.path=="string"?Gr.extname(this.path):void 0}set extname(t){if(yh(t,"extname"),ow(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=Gr.join(this.dirname,this.stem+(t||""))}get path(){return this.history[this.history.length-1]}set path(t){mh(t)&&(t=S6(t)),Eh(t,"path"),this.path!==t&&this.history.push(t)}get stem(){return typeof this.path=="string"?Gr.basename(this.path,this.extname):void 0}set stem(t){Eh(t,"stem"),yh(t,"stem"),this.path=Gr.join(this.dirname||"",t+(this.extname||""))}fail(t,n,r){const i=this.message(t,n,r);throw i.fatal=!0,i}info(t,n,r){const i=this.message(t,n,r);return i.fatal=void 0,i}message(t,n,r){const i=new An(t,n,r);return this.path&&(i.name=this.path+":"+i.name,i.file=this.path),i.fatal=!1,this.messages.push(i),i}toString(t){return this.value===void 0?"":typeof this.value=="string"?this.value:new TextDecoder(t||void 0).decode(this.value)}}function yh(e,t){if(e&&e.includes(Gr.sep))throw new Error("`"+t+"` cannot be a path: did not expect `"+Gr.sep+"`")}function Eh(e,t){if(!e)throw new Error("`"+t+"` cannot be empty")}function ow(e,t){if(!e)throw new Error("Setting `"+t+"` requires `path` to be set too")}function k6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const C6=(function(e){const r=this.constructor.prototype,i=r[e],s=function(){return i.apply(s,arguments)};return Object.setPrototypeOf(s,r),s}),N6={}.hasOwnProperty;class bh extends C6{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=m6()}copy(){const t=new bh;let n=-1;for(;++n<this.attachers.length;){const r=this.attachers[n];t.use(...r)}return t.data(ph(!0,{},this.namespace)),t}data(t,n){return typeof t=="string"?arguments.length===2?(Th("data",this.frozen),this.namespace[t]=n,this):N6.call(this.namespace,t)&&this.namespace[t]||void 0:t?(Th("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 i=n.call(t,...r);typeof i=="function"&&this.transformers.use(i)}return this.frozen=!0,this.freezeIndex=Number.POSITIVE_INFINITY,this}parse(t){this.freeze();const n=xl(t),r=this.parser||this.Parser;return wh("parse",r),r(String(n),n)}process(t,n){const r=this;return this.freeze(),wh("process",this.parser||this.Parser),xh("process",this.compiler||this.Compiler),n?i(void 0,n):new Promise(i);function i(s,u){const c=xl(t),d=r.parse(c);r.run(d,c,function(h,m,E){if(h||!m||!E)return f(h);const b=m,T=r.stringify(b,E);P6(T)?E.value=T:E.result=T,f(h,E)});function f(h,m){h||!m?u(h):s?s(m):n(void 0,m)}}}processSync(t){let n=!1,r;return this.freeze(),wh("processSync",this.parser||this.Parser),xh("processSync",this.compiler||this.Compiler),this.process(t,i),aw("processSync","process",n),r;function i(s,u){n=!0,nw(s),r=u}}run(t,n,r){sw(t),this.freeze();const i=this.transformers;return!r&&typeof n=="function"&&(r=n,n=void 0),r?s(void 0,r):new Promise(s);function s(u,c){const d=xl(n);i.run(t,d,f);function f(h,m,E){const b=m||t;h?c(h):u?u(b):r(void 0,b,E)}}}runSync(t,n){let r=!1,i;return this.run(t,n,s),aw("runSync","run",r),i;function s(u,c){nw(u),i=c,r=!0}}stringify(t,n){this.freeze();const r=xl(n),i=this.compiler||this.Compiler;return xh("stringify",i),sw(t),i(t,r)}use(t,...n){const r=this.attachers,i=this.namespace;if(Th("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 s(f){if(typeof f=="function")d(f,[]);else if(typeof f=="object")if(Array.isArray(f)){const[h,...m]=f;d(h,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&&(i.settings=ph(!0,i.settings,f.settings))}function c(f){let h=-1;if(f!=null)if(Array.isArray(f))for(;++h<f.length;){const m=f[h];s(m)}else throw new TypeError("Expected a list of plugins, not `"+f+"`")}function d(f,h){let m=-1,E=-1;for(;++m<r.length;)if(r[m][0]===f){E=m;break}if(E===-1)r.push([f,...h]);else if(h.length>0){let[b,...T]=h;const _=r[E][1];hh(_)&&hh(b)&&(b=ph(!0,_,b)),r[E]=[f,b,...T]}}}}const I6=new bh().freeze();function wh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `parser`")}function xh(e,t){if(typeof t!="function")throw new TypeError("Cannot `"+e+"` without `compiler`")}function Th(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 sw(e){if(!hh(e)||typeof e.type!="string")throw new TypeError("Expected node, got `"+e+"`")}function aw(e,t,n){if(!n)throw new Error("`"+e+"` finished async. Use `"+t+"` instead")}function xl(e){return O6(e)?e:new iw(e)}function O6(e){return!!(e&&typeof e=="object"&&"message"in e&&"messages"in e)}function P6(e){return typeof e=="string"||R6(e)}function R6(e){return!!(e&&typeof e=="object"&&"byteLength"in e&&"byteOffset"in e)}const L6="https://github.com/remarkjs/react-markdown/blob/main/changelog.md",uw=[],cw={allowDangerousHtml:!0},D6=/^(https?|ircs?|mailto|xmpp)$/i,M6=[{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 lw(e){const t=F6(e),n=B6(e);return U6(t.runSync(t.parse(n),n),e)}function F6(e){const t=e.rehypePlugins||uw,n=e.remarkPlugins||uw,r=e.remarkRehypeOptions?M(M({},e.remarkRehypeOptions),cw):cw;return I6().use(g4).use(n).use(f6,r).use(t)}function B6(e){const t=e.children||"",n=new iw;return typeof t=="string"&&(n.value=t),n}function U6(e,t){const n=t.allowedElements,r=t.allowElement,i=t.components,s=t.disallowedElements,u=t.skipHtml,c=t.unwrapDisallowed,d=t.urlTransform||dw;for(const h of M6)Object.hasOwn(t,h.from)&&(""+h.from+(h.to?"use `"+h.to+"` instead":"remove it")+L6+h.id,void 0);return wl(e,f),uP(e,{Fragment:w.Fragment,components:i,ignoreInvalidStyle:!0,jsx:w.jsx,jsxs:w.jsxs,passKeys:!0,passNode:!0});function f(h,m,E){if(h.type==="raw"&&E&&typeof m=="number")return u?E.children.splice(m,1):E.children[m]={type:"text",value:h.value},m;if(h.type==="element"){let b;for(b in Jp)if(Object.hasOwn(Jp,b)&&Object.hasOwn(h.properties,b)){const T=h.properties[b],_=Jp[b];(_===null||_.includes(h.tagName))&&(h.properties[b]=d(String(T||""),b,h))}}if(h.type==="element"){let b=n?!n.includes(h.tagName):s?s.includes(h.tagName):!1;if(!b&&r&&typeof m=="number"&&(b=!r(h,m,E)),b&&E&&typeof m=="number")return c&&h.children?E.children.splice(m,1,...h.children):E.children.splice(m,1),m}}}function dw(e){const t=e.indexOf(":"),n=e.indexOf("?"),r=e.indexOf("#"),i=e.indexOf("/");return t===-1||i!==-1&&t>i||n!==-1&&t>n||r!==-1&&t>r||D6.test(e.slice(0,t))?e:""}const fw=/[#.]/g;function j6(e,t){const n=e||"",r={};let i=0,s,u;for(;i<n.length;){fw.lastIndex=i;const c=fw.exec(n),d=n.slice(i,c?c.index:n.length);d&&(s?s==="#"?r.id=d:Array.isArray(r.className)?r.className.push(d):r.className=[d]:u=d,i+=d.length),c&&(s=c[0],i++)}return{type:"element",tagName:u||t||"div",properties:r,children:[]}}function pw(e,t,n){const r=n?V6(n):void 0;function i(s,u,...c){let d;if(s==null){d={type:"root",children:[]};const f=u;c.unshift(f)}else{d=j6(s,t);const f=d.tagName.toLowerCase(),h=r?r.get(f):void 0;if(d.tagName=h||f,H6(u))c.unshift(u);else for(const[m,E]of Object.entries(u))$6(e,d.properties,m,E)}for(const f of c)_h(d.children,f);return d.type==="element"&&d.tagName==="template"&&(d.content={type:"root",children:d.children},d.children=[]),d}return i}function H6(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 i=t[r];if(i&&typeof i=="object"){if(!Array.isArray(i))return!0;const s=i;for(const u of s)if(typeof u!="number"&&typeof u!="string")return!0}}return!!("children"in e&&Array.isArray(e.children))}function $6(e,t,n,r){const i=ul(e,n);let s;if(r!=null){if(typeof r=="number"){if(Number.isNaN(r))return;s=r}else typeof r=="boolean"?s=r:typeof r=="string"?i.spaceSeparated?s=tb(r):i.commaSeparated?s=$E(r):i.commaOrSpaceSeparated?s=tb($E(r).join(" ")):s=hw(i,i.property,r):Array.isArray(r)?s=[...r]:s=i.property==="style"?z6(r):String(r);if(Array.isArray(s)){const u=[];for(const c of s)u.push(hw(i,i.property,c));s=u}i.property==="className"&&Array.isArray(t.className)&&(s=t.className.concat(s)),t[i.property]=s}}function _h(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)_h(e,n);else if(typeof t=="object"&&"type"in t)t.type==="root"?_h(e,t.children):e.push(t);else throw new Error("Expected node, nodes, or string, got `"+t+"`")}function hw(e,t,n){if(typeof n=="string"){if(e.number&&n&&!Number.isNaN(Number(n)))return Number(n);if((e.boolean||e.overloadedBoolean)&&(n===""||Za(n)===Za(t)))return!0}return n}function z6(e){const t=[];for(const[n,r]of Object.entries(e))t.push([n,r].join(": "));return t.join("; ")}function V6(e){const t=new Map;for(const n of e)t.set(n.toLowerCase(),n);return t}const q6=["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"],W6=pw(eu,"div"),Y6=pw(Li,"g",q6);function G6(e){const t=String(e),n=[];return{toOffset:i,toPoint:r};function r(s){if(typeof s=="number"&&s>-1&&s<=t.length){let u=0;for(;;){let c=n[u];if(c===void 0){const d=mw(t,n[u-1]);c=d===-1?t.length+1:d+1,n[u]=c}if(c>s)return{line:u+1,column:s-(u>0?n[u-1]:0)+1,offset:s};u++}}}function i(s){if(s&&typeof s.line=="number"&&typeof s.column=="number"&&!Number.isNaN(s.line)&&!Number.isNaN(s.column)){for(;n.length<s.line;){const c=n[n.length-1],d=mw(t,c),f=d===-1?t.length+1:d+1;if(c===f)break;n.push(f)}const u=(s.line>1?n[s.line-2]:0)+s.column-1;if(u<n[s.line-1])return u}}}function mw(e,t){const n=e.indexOf("\r",t),r=e.indexOf(`
37
- `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Do={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/"},gw={}.hasOwnProperty,X6=Object.prototype;function K6(e,t){const n=t||{};return vh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Li:eu,verbose:n.verbose||!1},e)}function vh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:yw(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),u=G6(s),c=u.toPoint(0),d=u.toPoint(s.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tl(e,r,n),n}default:return n=Q6(e,t),n}}function yw(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=vh(e,t[n]);r.push(i)}return r}function Q6(e,t){const n=e.schema;e.schema=t.namespaceURI===Do.svg?Li:eu;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;gw.call(X6,d)||(i[d]=c.value)}const u=(e.schema.space==="svg"?Y6:W6)(t.tagName,i,yw(e,t.childNodes));if(Tl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Ls(d.startTag),h=d&&d.endTag&&Ls(d.endTag),m=vh(e,c.content);f&&h&&e.file&&(m.position={start:f.end,end:h.start}),u.content=m}return e.schema=n,u}function Tl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=J6(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function J6(e,t,n){const r=Ls(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let u;if(n.attrs)for(u in n.attrs)gw.call(n.attrs,u)&&(s[ul(e.schema,u).property]=Ls(n.attrs[u]));n.startTag;const c=Ls(n.startTag),d=n.endTag?Ls(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=s,t.data={position:f}}}return r}function Ls(e){const t=Ew({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ew({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ew(e){return e.line&&e.column?e:void 0}const bw={}.hasOwnProperty;function ww(e,t){const n=t||{};function r(i,...s){let u=r.invalid;const c=r.handlers;if(i&&bw.call(i,e)){const d=String(i[e]);u=bw.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Z6={},e5={}.hasOwnProperty,xw=ww("type",{handlers:{root:n5,element:a5,text:o5,comment:s5,doctype:i5}});function t5(e,t){const r=(t||Z6).space;return xw(e,r==="svg"?Li:eu)}function n5(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Sh(e.children,n,t),Ds(e,n),n}function r5(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Sh(e.children,n,t),Ds(e,n),n}function i5(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ds(e,t),t}function o5(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ds(e,t),t}function s5(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ds(e,t),t}function a5(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Li);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&e5.call(e.properties,s)){const d=u5(r,s,e.properties[s]);d&&i.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Do[u],childNodes:[],parentNode:null};return c.childNodes=Sh(e.children,c,r),Ds(e,c),e.tagName==="template"&&e.content&&(c.content=r5(e.content,r)),c}function u5(e,t,n){const r=ul(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?zE(n):nb(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Do[r.space]}return i}function Sh(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=xw(e[r],n);s.parentNode=t,i.push(s)}return i}function Ds(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 c5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],l5=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]),Bt="�";var L;(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"})(L||(L={}));const Vn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Tw(e){return e>=55296&&e<=57343}function d5(e){return e>=56320&&e<=57343}function f5(e,t){return(e-55296)*1024+9216+t}function _w(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function vw(e){return e>=64976&&e<=65007||l5.has(e)}var le;(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"})(le||(le={}));const p5=65536;class h5{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=p5,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:i,offset:s}=this,u=i+n,c=s+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(d5(n))return this.pos++,this._addGap(),f5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.EOF;return this._err(le.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,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.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,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Tw(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){_w(t)?this._err(le.controlCharacterInInputStream):vw(t)&&this._err(le.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var pt;(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"})(pt||(pt={}));function Sw(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 m5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),g5=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 y5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=g5.get(e))!==null&&t!==void 0?t:e}var dn;(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"})(dn||(dn={}));const E5=32;var Fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fi||(Fi={}));function Ah(e){return e>=dn.ZERO&&e<=dn.NINE}function b5(e){return e>=dn.UPPER_A&&e<=dn.UPPER_F||e>=dn.LOWER_A&&e<=dn.LOWER_F}function w5(e){return e>=dn.UPPER_A&&e<=dn.UPPER_Z||e>=dn.LOWER_A&&e<=dn.LOWER_Z||Ah(e)}function x5(e){return e===dn.EQUALS||w5(e)}var fn;(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"})(fn||(fn={}));var li;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(li||(li={}));class T5{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=fn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=li.Strict}startEntity(t){this.decodeMode=t,this.state=fn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case fn.EntityStart:return t.charCodeAt(n)===dn.NUM?(this.state=fn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=fn.NamedEntity,this.stateNamedEntity(t,n));case fn.NumericStart:return this.stateNumericStart(t,n);case fn.NumericDecimal:return this.stateNumericDecimal(t,n);case fn.NumericHex:return this.stateNumericHex(t,n);case fn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|E5)===dn.LOWER_X?(this.state=fn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=fn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ah(i)||b5(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ah(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===dn.SEMI)this.consumed+=1;else if(this.decodeMode===li.Strict)return 0;return this.emitCodePoint(y5(this.result),this.consumed),this.errors&&(t!==dn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=_5(r,i,this.treeIndex+Math.max(1,s),u),this.treeIndex<0)return this.result===0||this.decodeMode===li.Attribute&&(s===0||x5(u))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Fi.VALUE_LENGTH)>>14,s!==0){if(u===dn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==li.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Fi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Fi.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case fn.NamedEntity:return this.result!==0&&(this.decodeMode!==li.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case fn.NumericDecimal:return this.emitNumericEntity(0,2);case fn.NumericHex:return this.emitNumericEntity(0,3);case fn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case fn.EntityStart:return 0}}}function _5(e,t,n,r){const i=(t&Fi.BRANCH_LENGTH)>>7,s=t&Fi.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const d=r-s;return d<0||d>=i?-1:e[n+d]-1}let u=n,c=u+i-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+i]}return-1}var we;(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/"})(we||(we={}));var Mo;(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"})(Mo||(Mo={}));var mr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(mr||(mr={}));var ne;(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"})(ne||(ne={}));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 v5=new Map([[ne.A,g.A],[ne.ADDRESS,g.ADDRESS],[ne.ANNOTATION_XML,g.ANNOTATION_XML],[ne.APPLET,g.APPLET],[ne.AREA,g.AREA],[ne.ARTICLE,g.ARTICLE],[ne.ASIDE,g.ASIDE],[ne.B,g.B],[ne.BASE,g.BASE],[ne.BASEFONT,g.BASEFONT],[ne.BGSOUND,g.BGSOUND],[ne.BIG,g.BIG],[ne.BLOCKQUOTE,g.BLOCKQUOTE],[ne.BODY,g.BODY],[ne.BR,g.BR],[ne.BUTTON,g.BUTTON],[ne.CAPTION,g.CAPTION],[ne.CENTER,g.CENTER],[ne.CODE,g.CODE],[ne.COL,g.COL],[ne.COLGROUP,g.COLGROUP],[ne.DD,g.DD],[ne.DESC,g.DESC],[ne.DETAILS,g.DETAILS],[ne.DIALOG,g.DIALOG],[ne.DIR,g.DIR],[ne.DIV,g.DIV],[ne.DL,g.DL],[ne.DT,g.DT],[ne.EM,g.EM],[ne.EMBED,g.EMBED],[ne.FIELDSET,g.FIELDSET],[ne.FIGCAPTION,g.FIGCAPTION],[ne.FIGURE,g.FIGURE],[ne.FONT,g.FONT],[ne.FOOTER,g.FOOTER],[ne.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[ne.FORM,g.FORM],[ne.FRAME,g.FRAME],[ne.FRAMESET,g.FRAMESET],[ne.H1,g.H1],[ne.H2,g.H2],[ne.H3,g.H3],[ne.H4,g.H4],[ne.H5,g.H5],[ne.H6,g.H6],[ne.HEAD,g.HEAD],[ne.HEADER,g.HEADER],[ne.HGROUP,g.HGROUP],[ne.HR,g.HR],[ne.HTML,g.HTML],[ne.I,g.I],[ne.IMG,g.IMG],[ne.IMAGE,g.IMAGE],[ne.INPUT,g.INPUT],[ne.IFRAME,g.IFRAME],[ne.KEYGEN,g.KEYGEN],[ne.LABEL,g.LABEL],[ne.LI,g.LI],[ne.LINK,g.LINK],[ne.LISTING,g.LISTING],[ne.MAIN,g.MAIN],[ne.MALIGNMARK,g.MALIGNMARK],[ne.MARQUEE,g.MARQUEE],[ne.MATH,g.MATH],[ne.MENU,g.MENU],[ne.META,g.META],[ne.MGLYPH,g.MGLYPH],[ne.MI,g.MI],[ne.MO,g.MO],[ne.MN,g.MN],[ne.MS,g.MS],[ne.MTEXT,g.MTEXT],[ne.NAV,g.NAV],[ne.NOBR,g.NOBR],[ne.NOFRAMES,g.NOFRAMES],[ne.NOEMBED,g.NOEMBED],[ne.NOSCRIPT,g.NOSCRIPT],[ne.OBJECT,g.OBJECT],[ne.OL,g.OL],[ne.OPTGROUP,g.OPTGROUP],[ne.OPTION,g.OPTION],[ne.P,g.P],[ne.PARAM,g.PARAM],[ne.PLAINTEXT,g.PLAINTEXT],[ne.PRE,g.PRE],[ne.RB,g.RB],[ne.RP,g.RP],[ne.RT,g.RT],[ne.RTC,g.RTC],[ne.RUBY,g.RUBY],[ne.S,g.S],[ne.SCRIPT,g.SCRIPT],[ne.SEARCH,g.SEARCH],[ne.SECTION,g.SECTION],[ne.SELECT,g.SELECT],[ne.SOURCE,g.SOURCE],[ne.SMALL,g.SMALL],[ne.SPAN,g.SPAN],[ne.STRIKE,g.STRIKE],[ne.STRONG,g.STRONG],[ne.STYLE,g.STYLE],[ne.SUB,g.SUB],[ne.SUMMARY,g.SUMMARY],[ne.SUP,g.SUP],[ne.TABLE,g.TABLE],[ne.TBODY,g.TBODY],[ne.TEMPLATE,g.TEMPLATE],[ne.TEXTAREA,g.TEXTAREA],[ne.TFOOT,g.TFOOT],[ne.TD,g.TD],[ne.TH,g.TH],[ne.THEAD,g.THEAD],[ne.TITLE,g.TITLE],[ne.TR,g.TR],[ne.TRACK,g.TRACK],[ne.TT,g.TT],[ne.U,g.U],[ne.UL,g.UL],[ne.SVG,g.SVG],[ne.VAR,g.VAR],[ne.WBR,g.WBR],[ne.XMP,g.XMP]]);function Ms(e){var t;return(t=v5.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,S5={[we.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[we.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[we.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[we.XLINK]:new Set,[we.XML]:new Set,[we.XMLNS]:new Set},kh=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT;var F;(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"})(F||(F={}));const Zt={DATA:F.DATA,RCDATA:F.RCDATA,RAWTEXT:F.RAWTEXT,SCRIPT_DATA:F.SCRIPT_DATA,PLAINTEXT:F.PLAINTEXT,CDATA_SECTION:F.CDATA_SECTION};function A5(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function du(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function k5(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function Bi(e){return k5(e)||du(e)}function Aw(e){return Bi(e)||A5(e)}function _l(e){return e+32}function kw(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function Cw(e){return kw(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function C5(e){return e===L.NULL?le.nullCharacterReference:e>1114111?le.characterReferenceOutsideUnicodeRange:Tw(e)?le.surrogateCharacterReference:vw(e)?le.noncharacterCharacterReference:_w(e)||e===L.CARRIAGE_RETURN?le.controlCharacterReference:null}class N5{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=F.DATA,this.returnState=F.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new T5(m5,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=C5(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:pt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:pt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:pt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:pt.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(Sw(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(le.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=Ms(t.tagName),t.type===pt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(le.endTagWithAttributes),t.selfClosing&&this._err(le.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 pt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case pt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case pt.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:pt.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=kw(t)?pt.WHITESPACE_CHARACTER:t===L.NULL?pt.NULL_CHARACTER:pt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(pt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=F.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?li.Attribute:li.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===F.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case F.DATA:{this._stateData(t);break}case F.RCDATA:{this._stateRcdata(t);break}case F.RAWTEXT:{this._stateRawtext(t);break}case F.SCRIPT_DATA:{this._stateScriptData(t);break}case F.PLAINTEXT:{this._statePlaintext(t);break}case F.TAG_OPEN:{this._stateTagOpen(t);break}case F.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case F.TAG_NAME:{this._stateTagName(t);break}case F.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case F.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case F.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case F.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case F.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case F.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case F.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case F.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case F.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case F.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case F.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case F.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case F.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case F.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case F.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case F.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case F.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case F.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case F.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case F.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case F.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case F.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case F.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case F.BOGUS_COMMENT:{this._stateBogusComment(t);break}case F.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case F.COMMENT_START:{this._stateCommentStart(t);break}case F.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case F.COMMENT:{this._stateComment(t);break}case F.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case F.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case F.COMMENT_END:{this._stateCommentEnd(t);break}case F.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case F.DOCTYPE:{this._stateDoctype(t);break}case F.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case F.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case F.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case F.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case F.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case F.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case F.CDATA_SECTION:{this._stateCdataSection(t);break}case F.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case F.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case F.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case F.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=F.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Bi(t))this._createStartTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=F.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=F.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=F.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Bi(t))this._createEndTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(le.missingEndTagName),this.state=F.DATA;break}case L.EOF:{this._err(le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.tagName+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(du(t)?_l(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=F.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Bi(t)?(this.state=F.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=F.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=F.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=F.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=F.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=F.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Bi(t)?(this.state=F.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=F.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=F.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=F.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Bi(t)?(this.state=F.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Bi(t)?(this._emitChars("<"),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Bi(t)?(this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Vn.SCRIPT,!1)&&Cw(this.preprocessor.peek(Vn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Vn.SCRIPT,!1)&&Cw(this.preprocessor.peek(Vn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=F.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.name+=Bt;break}default:this.currentAttr.name+=String.fromCodePoint(du(t)?_l(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=F.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=F.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingAttributeValue),this.state=F.DATA,this.emitCurrentTagToken();break}default:this.state=F.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=F.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBetweenAttributes),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.unexpectedSolidusInTag),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Vn.DASH_DASH,!0)?(this._createCommentToken(Vn.DASH_DASH.length+1),this.state=F.COMMENT_START):this._consumeSequenceIfMatch(Vn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Vn.DOCTYPE.length+1),this.state=F.DOCTYPE):this._consumeSequenceIfMatch(Vn.CDATA_START,!0)?this.inForeignNode?this.state=F.CDATA_SECTION:(this._err(le.cdataInHtmlContent),this._createCommentToken(Vn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=F.BOGUS_COMMENT):this._ensureHibernation()||(this._err(le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=F.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=F.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Bt;break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case L.EXCLAMATION_MARK:{n.data+="!",this.state=F.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=F.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=F.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(le.nestedComment),this.state=F.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=F.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=F.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(le.incorrectlyClosedComment),this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=F.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBeforeDoctypeName),this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(du(t))this._createDoctypeToken(String.fromCharCode(_l(t))),this.state=F.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(le.unexpectedNullCharacter),this._createDoctypeToken(Bt),this.state=F.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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=F.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.name+=Bt;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(du(t)?_l(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Vn.PUBLIC,!1)?this.state=F.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vn.SYSTEM,!1)?this.state=F.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(le.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.NULL:{this._err(le.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=F.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=F.CDATA_SECTION_END:(this._emitChars("]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=F.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(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Aw(this.preprocessor.peek(1))?F.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Aw(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(le.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Nw=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Iw=new Set([...Nw,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),vl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),I5=new Set([...vl,g.OL,g.UL]),O5=new Set([...vl,g.BUTTON]),Ow=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Pw=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),P5=new Set([g.TR,g.TEMPLATE,g.HTML]),R5=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),L5=new Set([g.TABLE,g.TEMPLATE,g.HTML]),D5=new Set([g.TD,g.TH]);class M5{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)===we.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==we.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(kh,we.HTML)}popUntilTableCellPopped(){this.popUntilPopped(D5,we.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(L5,we.HTML)}clearBackToTableBodyContext(){this.clearBackTo(R5,we.HTML)}clearBackToTableRowContext(){this.clearBackTo(P5,we.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 i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case we.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case we.SVG:{if(Pw.has(i))return!1;break}case we.MATHML:{if(Ow.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,vl)}hasInListItemScope(t){return this.hasInDynamicScope(t,I5)}hasInButtonScope(t){return this.hasInDynamicScope(t,O5)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case we.HTML:{if(kh.has(n))return!0;if(vl.has(n))return!1;break}case we.SVG:{if(Pw.has(n))return!1;break}case we.MATHML:{if(Ow.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===we.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])===we.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])===we.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&&Nw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Iw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Iw.has(this.currentTagId);)this.pop()}}const Ch=3;var Xr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Xr||(Xr={}));const Rw={type:Xr.Marker};class F5{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=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===Xr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===s&&this.treeAdapter.getNamespaceURI(f)===u){const h=this.treeAdapter.getAttrList(f);h.length===i&&r.push({idx:c,attrs:h})}}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 i=new Map(n.map(u=>[u.name,u.value]));let s=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>i.get(d.name)===d.value)&&(s+=1,s>=Ch&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Rw)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Xr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Xr.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(Rw);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Xr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Xr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Xr.Element&&n.element===t)}}const Ui={createDocument(){return{nodeName:"#document",mode:mr.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 i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ui.appendChild(e,s)}},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(Ui.isTextNode(n)){n.value+=t;return}}Ui.appendChild(e,Ui.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ui.isTextNode(r)?r.value+=t:Ui.insertBefore(e,Ui.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=M(M({},e.sourceCodeLocation),t)}},Lw="html",B5="about:legacy-compat",U5="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dw=["+//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//"],j5=[...Dw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],H5=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Mw=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],$5=[...Mw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Fw(e,t){return t.some(n=>e.startsWith(n))}function z5(e){return e.name===Lw&&e.publicId===null&&(e.systemId===null||e.systemId===B5)}function V5(e){if(e.name!==Lw)return mr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===U5)return mr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),H5.has(n))return mr.QUIRKS;let r=t===null?j5:Dw;if(Fw(n,r))return mr.QUIRKS;if(r=t===null?Mw:$5,Fw(n,r))return mr.LIMITED_QUIRKS}return mr.NO_QUIRKS}const Bw={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},q5="definitionurl",W5="definitionURL",Y5=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])),G5=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:we.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:we.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:we.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:we.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:we.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:we.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:we.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:we.XML}],["xml:space",{prefix:"xml",name:"space",namespace:we.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:we.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:we.XMLNS}]]),X5=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])),K5=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 Q5(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Mo.COLOR||r===Mo.SIZE||r===Mo.FACE)||K5.has(t)}function Uw(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===q5){e.attrs[t].name=W5;break}}function jw(e){for(let t=0;t<e.attrs.length;t++){const n=Y5.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Nh(e){for(let t=0;t<e.attrs.length;t++){const n=G5.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 J5(e){const t=X5.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ms(e.tagName))}function Z5(e,t){return t===we.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function eL(e,t,n){if(t===we.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mo.ENCODING){const i=n[r].value.toLowerCase();return i===Bw.TEXT_HTML||i===Bw.APPLICATION_XML}}return t===we.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function tL(e,t,n,r){return(!r||r===we.HTML)&&eL(e,t,n)||(!r||r===we.MATHML)&&Z5(e,t)}const nL="hidden",rL=8,iL=3;var z;(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"})(z||(z={}));const oL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Hw=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),$w={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ui,onParseError:null};class zw{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=z.INITIAL,this.originalInsertionMode=z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=M(M({},$w),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 N5(this.options,this),this.activeFormattingElements=new F5(this.treeAdapter),this.fragmentContextID=r?Ms(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new M5(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=M(M({},$w),n);t!=null||(t=r.treeAdapter.createElement(ne.TEMPLATE,we.HTML,[]));const i=r.treeAdapter.createElement("documentmock",we.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===g.TEMPLATE&&s.tmplInsertionModeStack.unshift(z.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:oL,u={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(u)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,u;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,u=this.fragmentContextID):{current:s,currentTagId:u}=this.openElements,this._setContextModes(s,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===we.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,we.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=z.TEXT}switchToPlaintextParsing(){this.insertionMode=z.TEXT,this.originalInsertionMode=z.IN_BODY,this.tokenizer.state=Zt.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)===ne.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==we.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Zt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Zt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Zt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Zt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),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&&ce(M({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,we.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,we.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(ne.HTML,we.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 i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,u=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:h})}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,i=this.treeAdapter.getTagName(t),s=n.type===pt.END_TAG&&i===n.tagName?{endTag:M({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}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)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===we.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,we.HTML)}_processToken(t){switch(t.type){case pt.CHARACTER:{this.onCharacter(t);break}case pt.NULL_CHARACTER:{this.onNullCharacter(t);break}case pt.COMMENT:{this.onComment(t);break}case pt.DOCTYPE:{this.onDoctype(t);break}case pt.START_TAG:{this._processStartTag(t);break}case pt.END_TAG:{this.onEndTag(t);break}case pt.EOF:{this.onEof(t);break}case pt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return tL(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Xr.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=z.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=z.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=z.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=z.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=z.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=z.IN_TABLE;return}case g.BODY:{this.insertionMode=z.IN_BODY;return}case g.FRAMESET:{this.insertionMode=z.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?z.AFTER_HEAD:z.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=z.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=z.IN_HEAD;return}break}}this.insertionMode=z.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=z.IN_SELECT_IN_TABLE;return}}this.insertionMode=z.IN_SELECT}_isElementCausesFosterParenting(t){return Hw.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)===we.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 S5[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){DD(this,t);return}switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:{qw(this,t);break}case z.TEXT:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_TABLE_TEXT:{Zw(this,t);break}case z.IN_COLUMN_GROUP:{kl(this,t);break}case z.AFTER_BODY:{Il(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){LD(this,t);return}switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.TEXT:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_COLUMN_GROUP:{kl(this,t);break}case z.AFTER_BODY:{Il(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Oh(this,t);return}switch(this.insertionMode){case z.INITIAL:case z.BEFORE_HTML:case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_TEMPLATE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{Oh(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.AFTER_BODY:{fL(this,t);break}case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{pL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case z.INITIAL:{hL(this,t);break}case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:{this._err(t,le.misplacedDoctype);break}case z.IN_TABLE_TEXT:{wu(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?MD(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{mL(this,t);break}case z.BEFORE_HEAD:{yL(this,t);break}case z.IN_HEAD:{Nr(this,t);break}case z.IN_HEAD_NO_SCRIPT:{wL(this,t);break}case z.AFTER_HEAD:{TL(this,t);break}case z.IN_BODY:{Cn(this,t);break}case z.IN_TABLE:{Fs(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_CAPTION:{ED(this,t);break}case z.IN_COLUMN_GROUP:{Lh(this,t);break}case z.IN_TABLE_BODY:{Cl(this,t);break}case z.IN_ROW:{Nl(this,t);break}case z.IN_CELL:{xD(this,t);break}case z.IN_SELECT:{nx(this,t);break}case z.IN_SELECT_IN_TABLE:{_D(this,t);break}case z.IN_TEMPLATE:{SD(this,t);break}case z.AFTER_BODY:{kD(this,t);break}case z.IN_FRAMESET:{CD(this,t);break}case z.AFTER_FRAMESET:{ID(this,t);break}case z.AFTER_AFTER_BODY:{PD(this,t);break}case z.AFTER_AFTER_FRAMESET:{RD(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?FD(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{gL(this,t);break}case z.BEFORE_HEAD:{EL(this,t);break}case z.IN_HEAD:{bL(this,t);break}case z.IN_HEAD_NO_SCRIPT:{xL(this,t);break}case z.AFTER_HEAD:{_L(this,t);break}case z.IN_BODY:{Al(this,t);break}case z.TEXT:{uD(this,t);break}case z.IN_TABLE:{Eu(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_CAPTION:{bD(this,t);break}case z.IN_COLUMN_GROUP:{wD(this,t);break}case z.IN_TABLE_BODY:{Dh(this,t);break}case z.IN_ROW:{tx(this,t);break}case z.IN_CELL:{TD(this,t);break}case z.IN_SELECT:{rx(this,t);break}case z.IN_SELECT_IN_TABLE:{vD(this,t);break}case z.IN_TEMPLATE:{AD(this,t);break}case z.AFTER_BODY:{ox(this,t);break}case z.IN_FRAMESET:{ND(this,t);break}case z.AFTER_FRAMESET:{OD(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onEof(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{Qw(this,t);break}case z.TEXT:{cD(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_TEMPLATE:{ix(this,t);break}case z.AFTER_BODY:case z.IN_FRAMESET:case z.AFTER_FRAMESET:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{Ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.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 z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.TEXT:case z.IN_COLUMN_GROUP:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{this._insertCharacters(t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:case z.AFTER_BODY:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{Vw(this,t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_TABLE_TEXT:{Jw(this,t);break}}}}function sL(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):Kw(e,t),n}function aL(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function uL(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,u=i;u!==n;s++,u=i){i=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&s>=iL;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=cL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function cL(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 lL(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ms(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===g.TEMPLATE&&s===we.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function dL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Ih(e,t){for(let n=0;n<rL;n++){const r=sL(e,t);if(!r)break;const i=aL(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=uL(e,i,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),u&&lL(e,u,s),dL(e,i,r)}}function Oh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function fL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function pL(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(s);u&&!u.endTag&&e._setEndLocation(s,t)}}}}function hL(e,t){e._setDocumentType(t);const n=t.forceQuirks?mr.QUIRKS:V5(t);z5(t)||e._err(t,le.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=z.BEFORE_HTML}function fu(e,t){e._err(t,le.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,mr.QUIRKS),e.insertionMode=z.BEFORE_HTML,e._processToken(t)}function mL(e,t){t.tagID===g.HTML?(e._insertElement(t,we.HTML),e.insertionMode=z.BEFORE_HEAD):pu(e,t)}function gL(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&pu(e,t)}function pu(e,t){e._insertFakeRootElement(),e.insertionMode=z.BEFORE_HEAD,e._processToken(t)}function yL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.HEAD:{e._insertElement(t,we.HTML),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD;break}default:hu(e,t)}}function EL(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?hu(e,t):e._err(t,le.endTagWithoutMatchingOpenElement)}function hu(e,t){e._insertFakeElement(ne.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD,e._processToken(t)}function Nr(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Zt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Zt.RAWTEXT):(e._insertElement(t,we.HTML),e.insertionMode=z.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Zt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Zt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(z.IN_TEMPLATE);break}case g.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:mu(e,t)}}function bL(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=z.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{mu(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function Fo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,le.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,le.endTagWithoutMatchingOpenElement)}function mu(e,t){e.openElements.pop(),e.insertionMode=z.AFTER_HEAD,e._processToken(t)}function wL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Nr(e,t);break}case g.NOSCRIPT:{e._err(t,le.nestedNoscriptInHead);break}default:gu(e,t)}}function xL(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=z.IN_HEAD;break}case g.BR:{gu(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function gu(e,t){const n=t.type===pt.EOF?le.openElementsLeftAfterEof:le.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=z.IN_HEAD,e._processToken(t)}function TL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BODY:{e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=z.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,we.HTML),e.insertionMode=z.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,le.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Nr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:yu(e,t)}}function _L(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{yu(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function yu(e,t){e._insertFakeElement(ne.BODY,g.BODY),e.insertionMode=z.IN_BODY,Sl(e,t)}function Sl(e,t){switch(t.type){case pt.CHARACTER:{qw(e,t);break}case pt.WHITESPACE_CHARACTER:{Vw(e,t);break}case pt.COMMENT:{Oh(e,t);break}case pt.START_TAG:{Cn(e,t);break}case pt.END_TAG:{Al(e,t);break}case pt.EOF:{Qw(e,t);break}}}function Vw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function qw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function SL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function AL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_FRAMESET)}function kL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML)}function CL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&kh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,we.HTML)}function NL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function IL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),n||(e.formElement=e.openElements.current))}function OL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===g.LI&&i===g.LI||(n===g.DD||n===g.DT)&&(i===g.DD||i===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML)}function PL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.tokenizer.state=Zt.PLAINTEXT}function RL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.framesetOk=!1}function LL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);n&&(Ih(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function DL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ML(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ih(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function BL(e,t){e.treeAdapter.getDocumentMode(e.document)!==mr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=z.IN_TABLE}function Ww(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,we.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Yw(e){const t=Sw(e,Mo.TYPE);return t!=null&&t.toLowerCase()===nL}function UL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,we.HTML),Yw(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function jL(e,t){e._appendElement(t,we.HTML),t.ackSelfClosing=!0}function HL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,we.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $L(e,t){t.tagName=ne.IMG,t.tagID=g.IMG,Ww(e,t)}function zL(e,t){e._insertElement(t,we.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Zt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=z.TEXT}function VL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function qL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function Gw(e,t){e._switchToTextParsing(t,Zt.RAWTEXT)}function WL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===z.IN_TABLE||e.insertionMode===z.IN_CAPTION||e.insertionMode===z.IN_TABLE_BODY||e.insertionMode===z.IN_ROW||e.insertionMode===z.IN_CELL?z.IN_SELECT_IN_TABLE:z.IN_SELECT}function YL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML)}function GL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,we.HTML)}function XL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,we.HTML)}function KL(e,t){e._reconstructActiveFormattingElements(),Uw(t),Nh(t),t.selfClosing?e._appendElement(t,we.MATHML):e._insertElement(t,we.MATHML),t.ackSelfClosing=!0}function QL(e,t){e._reconstructActiveFormattingElements(),jw(t),Nh(t),t.selfClosing?e._appendElement(t,we.SVG):e._insertElement(t,we.SVG),t.ackSelfClosing=!0}function Xw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML)}function Cn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{DL(e,t);break}case g.A:{LL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{CL(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:{kL(e,t);break}case g.LI:case g.DD:case g.DT:{OL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ww(e,t);break}case g.HR:{HL(e,t);break}case g.RB:case g.RTC:{GL(e,t);break}case g.RT:case g.RP:{XL(e,t);break}case g.PRE:case g.LISTING:{NL(e,t);break}case g.XMP:{VL(e,t);break}case g.SVG:{QL(e,t);break}case g.HTML:{vL(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Nr(e,t);break}case g.BODY:{SL(e,t);break}case g.FORM:{IL(e,t);break}case g.NOBR:{ML(e,t);break}case g.MATH:{KL(e,t);break}case g.TABLE:{BL(e,t);break}case g.INPUT:{UL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{jL(e,t);break}case g.IMAGE:{$L(e,t);break}case g.BUTTON:{RL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{FL(e,t);break}case g.IFRAME:{qL(e,t);break}case g.SELECT:{WL(e,t);break}case g.OPTION:case g.OPTGROUP:{YL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Gw(e,t);break}case g.FRAMESET:{AL(e,t);break}case g.TEXTAREA:{zL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Gw(e,t):Xw(e,t);break}case g.PLAINTEXT:{PL(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:Xw(e,t)}}function JL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ZL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=z.AFTER_BODY,ox(e,t))}function eD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function tD(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 nD(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(ne.P,g.P),e._closePElement()}function rD(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function iD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function oD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function sD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function aD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ne.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Kw(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],u=e.openElements.tagIDs[i];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,u))break}}function Al(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:{Ih(e,t);break}case g.P:{nD(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:{eD(e,t);break}case g.LI:{rD(e);break}case g.DD:case g.DT:{iD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{oD(e);break}case g.BR:{aD(e);break}case g.BODY:{JL(e,t);break}case g.HTML:{ZL(e,t);break}case g.FORM:{tD(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{sD(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:Kw(e,t)}}function Qw(e,t){e.tmplInsertionModeStack.length>0?ix(e,t):Ph(e,t)}function uD(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 cD(e,t){e._err(t,le.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Rh(e,t){if(e.openElements.currentTagId!==void 0&&Hw.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=z.IN_TABLE_TEXT,t.type){case pt.CHARACTER:{Zw(e,t);break}case pt.WHITESPACE_CHARACTER:{Jw(e,t);break}}else bu(e,t)}function lD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_CAPTION}function dD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_COLUMN_GROUP}function fD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.COLGROUP,g.COLGROUP),e.insertionMode=z.IN_COLUMN_GROUP,Lh(e,t)}function pD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_TABLE_BODY}function hD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.TBODY,g.TBODY),e.insertionMode=z.IN_TABLE_BODY,Cl(e,t)}function mD(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function gD(e,t){Yw(t)?e._appendElement(t,we.HTML):bu(e,t),t.ackSelfClosing=!0}function yD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,we.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{hD(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}case g.COL:{fD(e,t);break}case g.FORM:{yD(e,t);break}case g.TABLE:{mD(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{pD(e,t);break}case g.INPUT:{gD(e,t);break}case g.CAPTION:{lD(e,t);break}case g.COLGROUP:{dD(e,t);break}default:bu(e,t)}}function Eu(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Fo(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:bu(e,t)}}function bu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Sl(e,t),e.fosterParentingEnabled=n}function Jw(e,t){e.pendingCharacterTokens.push(t)}function Zw(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wu(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)bu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ex=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function ED(e,t){const n=t.tagID;ex.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=z.IN_TABLE,Fs(e,t)):Cn(e,t)}function bD(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=z.IN_TABLE,n===g.TABLE&&Eu(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:Al(e,t)}}function Lh(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.COL:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Nr(e,t);break}default:kl(e,t)}}function wD(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE);break}case g.TEMPLATE:{Fo(e,t);break}case g.COL:break;default:kl(e,t)}}function kl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE,e._processToken(t))}function Cl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ne.TR,g.TR),e.insertionMode=z.IN_ROW,Nl(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=z.IN_TABLE,Fs(e,t));break}default:Fs(e,t)}}function Dh(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=z.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE,Eu(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:Eu(e,t)}}function Nl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,we.HTML),e.insertionMode=z.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=z.IN_TABLE_BODY,Cl(e,t));break}default:Fs(e,t)}}function tx(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY,Dh(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=z.IN_TABLE_BODY,Dh(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:Eu(e,t)}}function xD(e,t){const n=t.tagID;ex.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Nl(e,t)):Cn(e,t)}function TD(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=z.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),tx(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Al(e,t)}}function nx(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,we.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,we.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}}}function rx(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:{Fo(e,t);break}}}function _D(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)):nx(e,t)}function vD(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)):rx(e,t)}function SD(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Nr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=z.IN_TABLE,e.insertionMode=z.IN_TABLE,Fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=z.IN_COLUMN_GROUP,e.insertionMode=z.IN_COLUMN_GROUP,Lh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=z.IN_TABLE_BODY,e.insertionMode=z.IN_TABLE_BODY,Cl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=z.IN_ROW,e.insertionMode=z.IN_ROW,Nl(e,t);break}default:e.tmplInsertionModeStack[0]=z.IN_BODY,e.insertionMode=z.IN_BODY,Cn(e,t)}}function AD(e,t){t.tagID===g.TEMPLATE&&Fo(e,t)}function ix(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 kD(e,t){t.tagID===g.HTML?Cn(e,t):Il(e,t)}function ox(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=z.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 Il(e,t)}function Il(e,t){e.insertionMode=z.IN_BODY,Sl(e,t)}function CD(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.FRAMESET:{e._insertElement(t,we.HTML);break}case g.FRAME:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Nr(e,t);break}}}function ND(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=z.AFTER_FRAMESET))}function ID(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function OD(e,t){t.tagID===g.HTML&&(e.insertionMode=z.AFTER_AFTER_FRAMESET)}function PD(e,t){t.tagID===g.HTML?Cn(e,t):Ol(e,t)}function Ol(e,t){e.insertionMode=z.IN_BODY,Sl(e,t)}function RD(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function LD(e,t){t.chars=Bt,e._insertCharacters(t)}function DD(e,t){e._insertCharacters(t),e.framesetOk=!1}function sx(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==we.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function MD(e,t){if(Q5(t))sx(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===we.MATHML?Uw(t):r===we.SVG&&(J5(t),jw(t)),Nh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function FD(e,t){if(t.tagID===g.P||t.tagID===g.BR){sx(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)===we.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR;const BD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,UD=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ax={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ux(e,t){const n=XD(e),r=ww("type",{handlers:{root:jD,element:HD,text:$D,comment:lx,doctype:zD,raw:qD},unknown:WD}),i={parser:n?new zw(ax):zw.getFragmentParser(void 0,ax),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),Bs(i,Yr());const s=n?i.parser.document:i.parser.getFragment(),u=K6(s,{file:i.options.file});return i.stitches&&wl(u,"comment",function(c,d,f){const h=c;if(h.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=h.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function cx(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function jD(e,t){cx(e.children,t)}function HD(e,t){YD(e,t),cx(e.children,t),GD(e,t)}function $D(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:pt.CHARACTER,chars:e.value,location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zD(e,t){const n={type:pt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function VD(e,t){t.stitches=!0;const n=KD(e);if("children"in e&&"children"in n){const r=ux({type:"root",children:e.children},t.options);n.children=r.children}lx({type:"comment",value:{stitch:n}},t)}function lx(e,t){const n=e.value,r={type:pt.COMMENT,data:n,location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function qD(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,dx(t,Yr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(BD,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function WD(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))VD(n,t);else{let r="";throw UD.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 Bs(e,t){dx(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=Zt.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 dx(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 YD(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Zt.PLAINTEXT)return;Bs(t,Yr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Do.html;i===Do.html&&n==="svg"&&(i=Do.svg);const s=t5(ce(M({},e),{children:[]}),{space:i===Do.svg?"svg":"html"}),u={type:pt.START_TAG,tagName:n,tagID:Ms(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:xu(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function GD(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&c5.includes(n)||t.parser.tokenizer.state===Zt.PLAINTEXT)return;Bs(t,cl(e));const r={type:pt.END_TAG,tagName:n,tagID:Ms(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Zt.RCDATA||t.parser.tokenizer.state===Zt.RAWTEXT||t.parser.tokenizer.state===Zt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Zt.DATA)}function XD(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xu(e){const t=Yr(e)||{line:void 0,column:void 0,offset:void 0},n=cl(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 KD(e){return"children"in e?Lo(ce(M({},e),{children:[]})):Lo(e)}function fx(e){return function(t,n){return ux(t,ce(M({},e),{file:n}))}}const Bo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],px={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Bo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Bo],h2:[["className","sr-only"]],img:[...Bo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Bo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Bo],table:[...Bo],ul:[...Bo,["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"]},ji={}.hasOwnProperty;function QD(e,t){let n={type:"root",children:[]};const r={schema:t?M(M({},px),t):px,stack:[]},i=hx(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function hx(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return JD(e,n);case"doctype":return ZD(e,n);case"element":return e8(e,n);case"root":return t8(e,n);case"text":return n8(e,n)}}}function JD(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return Tu(s,t),s}}function ZD(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Tu(n,t),n}}function e8(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=mx(e,t.children),i=r8(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&ji.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(s=!1;++d<c.length;)e.stack.includes(c[d])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:i,children:r};return Tu(u,t),u}function t8(e,t){const r={type:"root",children:mx(e,t.children)};return Tu(r,t),r}function n8(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Tu(r,t),r}function mx(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=hx(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function r8(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&ji.call(r,n)?r[n]:void 0,u=r&&ji.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ji.call(c,f)){const h=c[f];let m=gx(e,Ex(s,f),f,h);m==null&&(m=gx(e,Ex(u,f),f,h)),m!=null&&(d[f]=m)}if(i&&ji.call(i,n)){const h=i[n];for(f in h)ji.call(h,f)&&!ji.call(d,f)&&(d[f]=h[f])}return d}function gx(e,t,n,r){return t?Array.isArray(r)?i8(e,t,n,r):yx(e,t,n,r):void 0}function i8(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const u=yx(e,t,n,r[i]);(typeof u=="number"||typeof u=="string")&&s.push(u)}return s}function yx(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&o8(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const u=t[s];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){i=!0;break}}else if(u===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function o8(e,t,n){const r=e.schema.protocols&&ji.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),u=i.indexOf("?"),c=i.indexOf("#"),d=i.indexOf("/");if(s<0||d>-1&&s>d||u>-1&&s>u||c>-1&&s>c)return!0;let f=-1;for(;++f<r.length;){const h=r[f];if(s===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Tu(e,t){const n=ub(t);t.data&&(e.data=Lo(t.data)),n&&(e.position=n)}function Ex(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function s8(e){return function(t){return QD(t,e)}}const bx=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:i,children:s})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return w.jsx("a",ce(M(M({className:D(e,`${N}-link`)},n?{href:n,target:d,onClick:i}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},a8=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=st();return!e&&!t?null:w.jsx("div",{className:D(n,`${N}-disclaimer`),children:t?w.jsx(lw,{rehypePlugins:[fx,s8],components:{ul:({children:r})=>w.jsx("ul",{className:D(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:D(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:D(n,`${N}-li`),children:r}),a:({href:r,title:i,children:s})=>w.jsx(bx,{globalClassName:n,openLinksInNewTab:!0,href:r,title:i,children:s}),img:({src:r,alt:i})=>w.jsx("img",{className:D(n,`${N}-disclaimer-image`),src:r,alt:i}),p:({children:r})=>w.jsx("p",{className:D(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:D(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:D(n,`${N}-disclaimer-text`),children:e})})},u8=Math.round(Vf/(1024*1024)),c8=e=>e==="oversize"?`File size exceeds the ${u8}MB limit. Please choose a smaller file.`:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",Mh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{var j;const{isConnected:i,sessionExpired:s,canInitialize:u,messages:c}=zt(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:h,enableImageUpload:m,enablePageContext:E}=st(),[,b]=k.useReducer(q=>q+1,0),T=E?y1():null;k.useEffect(()=>{let q=!0;const P=()=>{queueMicrotask(()=>{q&&b()})};return r1(P),h1(P),P(),()=>{q=!1,i1(P),m1(P)}},[]);const _=k.useRef(null),I=k.useCallback(()=>{const q=_.current;if(!q)return;q.style.height="0px";const P=getComputedStyle(q),ge=parseFloat(P.borderTopWidth)+parseFloat(P.borderBottomWidth);q.style.height=`${q.scrollHeight+(ge||0)}px`},[]);k.useLayoutEffect(()=>{const q=_.current;if(!q)return;I();let P=q.getBoundingClientRect().width;const ge=new ResizeObserver(()=>{const Re=q.getBoundingClientRect().width;Re!==P&&(P=Re,I())});return ge.observe(q),()=>ge.disconnect()},[I]);const v=k.useRef(c);v.current=c;const[S,R]=k.useState(!1),[U,B]=k.useState(null),A=m,G=!Zy(i,s,u),W=t||G,re=(f==null?void 0:f.placeholder)||(T==null?void 0:T.placeholder)||"Ask us anything",H=k.useCallback(q=>{var P;q.key!=="Enter"||q.shiftKey||q.nativeEvent.isComposing||q.keyCode===229||(q.preventDefault(),W||(P=q.currentTarget.form)==null||P.requestSubmit())},[W]),ee=k.useCallback(q=>B(c8(q)),[]),{file:Q,attach:me,clear:V}=LO({allowedMime:I1,maxBytes:Number.POSITIVE_INFINITY,onReject:ee});k.useEffect(()=>{Q&&B(null)},[Q]);const ue=k.useCallback(q=>Ie(null,null,function*(){var ge,Re,pe;if(q.preventDefault(),W)return;B(null);const P=(((ge=_.current)==null?void 0:ge.value)||"").trim();if(P||Q){const Ne=!i&&!s&&u===!0,ve=v.current.length;_.current.value="",I(),(Re=_.current)==null||Re.focus({preventScroll:!0});const ze={text:P};Q&&(ze.file=Q),V();const rt=yield r(ze),Ot=!!rt&&rt.outcome!=="success",ct=v.current.length===ve,_t=((pe=_.current)==null?void 0:pe.value)==="";Ot&&(Ne&&ct&&_t)&&(_.current.value=P,I(),ze.file&&me([ze.file]),_.current.disabled||_.current.focus({preventScroll:!0}))}}),[Q,i,s,u,W,V,r,me,I]),fe=k.useCallback(()=>{r({text:"Can you connect me to a human?"})},[r]),ae=k.useCallback(q=>{!A||W||(q.preventDefault(),R(!0))},[A,W]),J=k.useCallback(()=>R(!1),[]),se=k.useCallback(q=>{!A||W||(q.preventDefault(),R(!1),me(q.dataTransfer.files))},[A,W,me]),O=k.useCallback(q=>{!A||W||q.clipboardData.files.length>0&&me(q.clipboardData.files)},[A,W,me]);return w.jsxs("div",{className:D(d,e,`cim-${n}-component`,Q&&"with-attachments",`${N}-search-bar-wrapper`),children:[A&&Q&&w.jsx(DO,{file:Q,componentType:n,globalClassName:d,onRemove:V}),A&&U&&w.jsx("div",{className:D(d,`${N}-attach-error`),role:"alert",children:U}),w.jsxs("form",{className:D(d,e,`cim-${n}-component`,S&&"drag-over",`${N}-search-bar`,T&&`${N}-search-bar-with-context`,h&&`${N}-search-bar-with-escalation`),name:`${N}-search-form`,onSubmit:ue,onDragOver:ae,onDragLeave:J,onDrop:se,children:[T&&w.jsx("div",{className:`${N}-page-context-row`,role:"group","aria-label":"Current page context",children:w.jsxs("span",{className:`${N}-page-context-chip`,children:[T.type==="pdp"&&T.imageUrl&&w.jsx("img",{src:T.imageUrl,alt:"",className:`${N}-page-context-image`}),T.type==="srp"&&w.jsx(HE,{"aria-hidden":"true",className:`${N}-page-context-icon`}),w.jsx("span",{className:`${N}-page-context-name`,title:T.label,children:T.label}),w.jsx("button",{type:"button",className:`${N}-page-context-remove`,"aria-label":T.removeLabel,onClick:Uf,children:w.jsx(OO,{"aria-hidden":"true"})})]})}),w.jsxs("div",{className:D(d,e,`cim-${n}-component`,`${N}-messaging-input-group`,`${N}-messaging-composer-group`),children:[w.jsxs("div",{className:D(d,e,`cim-${n}-component`,`${N}-messaging-input-group`),children:[A&&w.jsx(MO,{componentType:n,accept:Kk,disabled:W,globalClassName:d,className:e,icon:w.jsx(kO,{}),onFiles:me}),w.jsx("textarea",{className:D(d,e,`cim-${n}-component`,`${N}-search-input`),rows:1,ref:_,placeholder:re,"aria-label":(f==null?void 0:f.inputAriaLabel)||re,name:`${N}-user-input`,disabled:G,readOnly:t,onPaste:O,onInput:I,onKeyDown:H})]}),w.jsx(BO,{className:e,globalClassName:d,searchConfig:ce(M({},f),{buttonIcon:(j=f==null?void 0:f.buttonIcon)!=null?j:"arrow"}),componentType:n,isLoading:W})]}),h&&w.jsx(kr,{className:d,ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:W,onClick:fe,icon:w.jsx(gO,{})})]}),w.jsx(a8,{})]})};function l8(e){return ut({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 d8(e){return ut({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 wx=k.createContext({isOpen:!1}),Fh=k.createContext(null),xx=k.createContext(null),Uo=()=>{var n,r;const e=k.useContext(Fh),t=k.useContext(xx);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Tx=({onClearChat:e,componentType:t})=>{const n=Uo(),r=()=>{e(),n()};return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(d8,{}),"Clear chat"]})},_x=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=st(),r=Uo(),[i,s]=k.useState(!1),u=()=>Ie(null,null,function*(){if(!i){s(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{s(!1)}}});return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:i,children:[w.jsx(l8,{}),"Download transcript"]})},vx=({onEndConversation:e,componentType:t})=>{const n=Uo(),r=()=>{e(),n()};return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(AO,{}),"End conversation"]})};function f8(e){return e==null?[]:Array.isArray(e)?e:[e]}var p8=(e,...t)=>e.concat(t),h8=(e,...t)=>e.filter(n=>!t.includes(n)),m8=e=>Array.from(new Set(e));function Sx(e,t,n={}){const{step:r=1,loop:i=!0}=n,s=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:s<0?i?c:0:s>=u?i?0:t>u?u:t:s}function g8(e,t,n={}){const{step:r=1,loop:i=!0}=n;return Sx(e,t,{step:-r,loop:i})}var y8=e=>Array.isArray(e),Ax=e=>e!=null&&typeof e=="object",E8=e=>Ax(e)&&!y8(e),Pl=e=>typeof e=="string",Us=e=>typeof e=="function",b8=e=>e==null,w8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x8=e=>Object.prototype.toString.call(e),kx=Function.prototype.toString,T8=kx.call(Object),_8=e=>{if(!Ax(e)||x8(e)!="[object Object]"||A8(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=w8(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&kx.call(n)==T8},v8=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,S8=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,A8=e=>v8(e)||S8(e),k8=e=>e(),C8=()=>{},Bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function N8(e,t=0){let n=0,r=null;return((...i)=>{const s=Date.now(),u=s-n;u>=t?(r&&(clearTimeout(r),r=null),e(...i),n=s):r||(r=setTimeout(()=>{e(...i),n=Date.now(),r=null},t-u))})}var{min:I8,max:O8}=Math,P8=e=>Number.isNaN(e),R8=e=>P8(e)?0:e,Cx=(e,t,n)=>I8(O8(R8(e),t),n);function Uh(e){if(!_8(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const i=e[r];i!==void 0&&(n[r]=Uh(i))}return n}function jh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function L8(e,t){if(e==null)throw new Error(t())}function D8(e,t,n){let r=[];for(const i of t)e[i]==null&&r.push(i);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var M8=Object.defineProperty,F8=(e,t,n)=>t in e?M8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hh=(e,t,n)=>F8(e,typeof t!="symbol"?t+"":t,n),Nx=()=>{},Rl=e=>typeof e=="object"&&e!==null,js=e=>e?"":void 0,Ix=e=>e?"true":void 0,B8=1,U8=9,j8=11,pn=e=>Rl(e)&&e.nodeType===B8&&typeof e.nodeName=="string",Ll=e=>Rl(e)&&e.nodeType===U8,H8=e=>Rl(e)&&e===e.window,Ox=e=>pn(e)?e.localName||"":"#document";function $8(e){return["html","body","#document"].includes(Ox(e))}var z8=e=>Rl(e)&&e.nodeType!==void 0,jo=e=>z8(e)&&e.nodeType===j8&&"host"in e,V8=e=>pn(e)&&e.localName==="input",q8=e=>pn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function _u(e){if(!e)return!1;const t=e.getRootNode();return zs(t)===e}var W8=/(textarea|select)/;function Y8(e){if(e==null||!pn(e))return!1;try{return V8(e)&&e.selectionStart!=null||W8.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Hs(e,t){var r;if(!e||!t||!pn(e)||!pn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&jo(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Kr(e){var t;return Ll(e)?e:H8(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function G8(e){return Kr(e).documentElement}function $s(e){var t,n,r;return jo(e)?$s(e.host):Ll(e)?(t=e.defaultView)!=null?t:window:pn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function zs(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 X8(e){if(Ox(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jo(e)&&e.host||G8(e);return jo(t)?t.host:t}function $h(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Ll(t)||jo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var zh=new WeakMap;function Vs(e){return zh.has(e)||zh.set(e,$s(e).getComputedStyle(e)),zh.get(e)}var Vh=new Set(["menu","listbox","dialog","grid","tree","region"]),K8=e=>Vh.has(e),Px=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Rx(e,t){const n=new Set,r=$h(e),i=s=>{const u=s.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Px(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const h=r.getElementById(f);if(h){const m=h.getAttribute("role"),E=h.getAttribute("aria-modal")==="true";if(m&&K8(m)&&!E&&(h===t||h.contains(t)||i(h)))return!0}}}return!1};return i(e)}function Lx(e,t){const n=$h(e),r=new Set,i=s=>{const u=s.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Px(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const h=n.getElementById(f);if(h){const m=h.getAttribute("role"),E=h.getAttribute("aria-modal")==="true";m&&Vh.has(m)&&!E&&(t(h),i(h))}}}};i(e)}function Q8(e){const t=new Set;return Lx(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function J8(e){const t=e.getAttribute("role");return!!(t&&Vh.has(t))}function Z8(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function eM(e){var t;return Z8(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function tM(e){if(!e.id)return!1;const t=$h(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&J8(e))}var qh=()=>typeof document!="undefined";function nM(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Wh=e=>qh()&&e.test(nM()),rM=e=>qh()&&e.test(navigator.vendor),Dx=()=>qh()&&!!navigator.maxTouchPoints,iM=()=>Wh(/^iPhone/i),oM=()=>Wh(/^iPad/i)||Yh()&&navigator.maxTouchPoints>1,Dl=()=>iM()||oM(),sM=()=>Yh()||Dl(),Yh=()=>Wh(/^Mac/i),aM=()=>sM()&&rM(/apple/i);function uM(e){var t,n,r,i;return(i=(t=e.composedPath)==null?void 0:t.call(e))!=null?i:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ir(e){var n;const t=uM(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Mx=e=>e.button===0,cM=e=>e.button===2||Yh()&&e.ctrlKey&&e.button===0,lM=e=>"touches"in e&&e.touches.length>0,dM={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Fx={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function fM(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let i=e.key;return i=(u=dM[i])!=null?u:i,n==="rtl"&&r==="horizontal"&&i in Fx&&(i=Fx[i]),i}function Bx(e,t="client"){const n=lM(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var hn=(e,t,n,r)=>{const i=typeof e=="function"?e():e;return i==null||i.addEventListener(t,n,r),()=>{i==null||i.removeEventListener(t,n,r)}},Ux=e=>pn(e)&&e.tagName==="IFRAME",pM=/^(audio|video|details)$/;function jx(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var hM=e=>!Number.isNaN(jx(e)),mM=e=>jx(e)<0;function gM(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 Hx(e,t,n){const r=[...e],i=[...e],s=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<i.length;){const d=i[c++];if(!d||s.has(d))continue;s.add(d);const f=gM(d,t);if(f){const h=Array.from(f.querySelectorAll(Ml)).filter(n),m=u.get(d);if(m!==void 0){const E=m+1;r.splice(E,0,...h),h.forEach((b,T)=>{u.set(b,E+T)});for(let b=E+h.length;b<r.length;b++)u.set(r[b],b)}else{const E=r.length;r.push(...h),h.forEach((b,T)=>{u.set(b,E+T)})}i.push(...h)}}return r}var Ml="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",$x=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Ml));(n==!0||n=="if-empty"&&i.length===0)&&pn(e)&&Qr(e)&&i.unshift(e);const u=[];for(const c of i)if(Qr(c)){if(Ux(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...$x(d,{getShadowRoot:r}));continue}u.push(c)}return r?Hx(u,r,Qr):u};function Qr(e){return!pn(e)||e.closest("[inert]")?!1:e.matches(Ml)&&q8(e)}function qs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Ml));n&&Ho(e)&&i.unshift(e);const s=[];for(const u of i)if(Ho(u)){if(Ux(u)&&u.contentDocument){const c=u.contentDocument.body;s.push(...qs(c,{getShadowRoot:r}));continue}s.push(u)}if(r){const u=Hx(s,r,Ho);return!u.length&&n?i:u}return!s.length&&n?i:s}function Ho(e){return pn(e)&&e.tabIndex>0?!0:Qr(e)&&!mM(e)}function yM(e,t={}){const n=qs(e,t),r=n[0]||null,i=n[n.length-1]||null;return[r,i]}function EM(e,t={}){const{current:n,getShadowRoot:r}=t,i=qs(e,{getShadowRoot:r}),s=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:zs(s);if(!u)return null;const c=i.indexOf(u);return i[c+1]||null}function vu(e){return e.tabIndex<0&&(pM.test(e.localName)||Y8(e))&&!hM(e)?0:e.tabIndex}function zx(e){const{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){const u=qs(t);s=r?u.filter(r)[0]:u[0]}return s||t||void 0}var bM=class eA{constructor(){Hh(this,"id",null),Hh(this,"fn_cleanup"),Hh(this,"cleanup",()=>{this.cancel()})}static create(){return new eA}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 sn(e){const t=bM.create();return t.request(e),t.cleanup}function Vx(e){const t=new Set;function n(r){const i=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(i=>i())}}function Gh(e){const t=X8(e);return $8(t)?Kr(t).body:pn(t)&&TM(t)?t:Gh(t)}var wM=/auto|scroll|overlay|hidden|clip/,xM=new Set(["inline","contents"]);function TM(e){const t=$s(e),{overflow:n,overflowX:r,overflowY:i,display:s}=t.getComputedStyle(e);return wM.test(n+i+r)&&!xM.has(s)}var Ws="default",Xh="",Fl=new WeakMap;function _M(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,i=r.documentElement;return Dl()?(Ws==="default"&&(Xh=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Ws="disabled"):t&&(Fl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>vM({target:t,doc:r})}function vM(e={}){const{target:t,doc:n}=e,i=(n!=null?n:document).documentElement;if(Dl()){if(Ws!=="disabled")return;Ws="restoring",setTimeout(()=>{Vx(()=>{Ws==="restoring"&&(i.style.webkitUserSelect==="none"&&(i.style.webkitUserSelect=Xh||""),Xh="",Ws="default")})},300)}else if(t&&Fl.has(t)){const s=Fl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Fl.delete(t)}}function SM(e={}){const u=e,{defer:t,target:n}=u,r=_n(u,["defer","target"]),i=t?sn:c=>c(),s=[];return s.push(i(()=>{const c=typeof n=="function"?n():n;s.push(_M(ce(M({},r),{target:c})))})),()=>{s.forEach(c=>c==null?void 0:c())}}function AM(e,t){const{onPointerMove:n,onPointerUp:r}=t,i=c=>{const d=Bx(c),f=Math.sqrt(bf(d.x,2)+bf(d.y,2)),h=c.pointerType==="touch"?10:5;if(!(f<h)){if(c.pointerType==="mouse"&&c.button===0){s(c);return}n({point:d,event:c})}},s=c=>{const d=Bx(c);r({point:d,event:c})},u=[hn(e,"pointermove",i,!1),hn(e,"pointerup",s,!1),hn(e,"pointercancel",s,!1),hn(e,"contextmenu",s,!1),SM({doc:e})];return()=>{u.forEach(c=>c())}}function kM(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:s}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let h=null;const[m,E]=yM(e,{includeContainer:!0,getShadowRoot:s}),b=EM(c,{current:n,getShadowRoot:s}),T=!m&&!E;f.shiftKey&&_u(b)?(i==null||i(),h=E):f.shiftKey&&(_u(m)||T)?h=n:!f.shiftKey&&_u(n)?(i==null||i(),h=m):!f.shiftKey&&(_u(E)||T)&&(h=b),h&&(f.preventDefault(),typeof r=="function"?r(h):h.focus())}return hn(u,"keydown",d,!0)}function CM(e,t){const c=t,{defer:n,triggerElement:r}=c,i=_n(c,["defer","triggerElement"]),s=n?sn:d=>d(),u=[];return u.push(s(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(kM(d,M({triggerElement:f},i)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function NM(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Bl(e,t){if(!e)return Nx;const n=Object.keys(t).reduce((r,i)=>(r[i]=e.style.getPropertyValue(i),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function IM(e,t,n){if(!e)return Nx;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 OM(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 PM(e,t){const{timeout:n,rootNode:r}=t,i=$s(r),s=Kr(r),u=new i.AbortController;return OM(new Promise(c=>{const d=e();if(d){c(d);return}const f=new i.MutationObserver(()=>{const h=e();h&&h.isConnected&&(f.disconnect(),c(h))});f.observe(s.body,{childList:!0,subtree:!0})}),u,n)}var RM=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),LM=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,qx=e=>{const t={};let n;for(;n=LM.exec(e);)t[n[1]]=n[2];return t},DM=(e,t)=>{if(Pl(e)){if(Pl(t))return`${e};${t}`;e=qx(e)}else Pl(t)&&(t=qx(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function an(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=Bh(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=RM(t[i],n[i]);continue}if(i==="style"){t[i]=DM(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const r=Object.getOwnPropertySymbols(n);for(let i of r)t[i]=n[i]}return t}function kV(e){return e}var Ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ys||{}),Kh="__init__";function MM(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Kr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},i=()=>zs(t()),s=u=>t().getElementById(u);return ce(M({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:_u,getById:s})}function FM(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Gs=()=>e=>Array.from(new Set(e)),Wx=typeof globalThis.document!="undefined"?k.useLayoutEffect:k.useEffect;function Ul(e){var m,E;const t=(m=e().value)!=null?m:e().defaultValue,n=(E=e().isEqual)!=null?E:Object.is,[r]=k.useState(t),[i,s]=k.useState(r),u=e().value!==void 0,c=k.useRef(i);c.current=u?e().value:i;const d=k.useRef(c.current);Wx(()=>{d.current=c.current},[i,e().value]);const f=b=>{var I,v;const T=d.current,_=Us(b)?b(T):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:_,prev:T}),u||s(_),n(_,T)||(v=(I=e()).onChange)==null||v.call(I,_,T)};function h(){return u?e().value:i}return{initial:r,ref:c,get:h,set(b){(e().sync?Ns.flushSync:k8)(()=>f(b))},invoke(b,T){var _,I;(I=(_=e()).onChange)==null||I.call(_,b,T)},hash(b){var T,_,I;return(I=(_=(T=e()).hash)==null?void 0:_.call(T,b))!=null?I:String(b)}}}Ul.cleanup=e=>{k.useEffect(()=>e,[])},Ul.ref=e=>{const t=k.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function BM(e){const t=k.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var UM=(e,t)=>{const n=k.useRef(!1),r=k.useRef(!1);k.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(i=>typeof i=="function"?i():i)]),k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function jl(e,t={}){var ee,Q,me,V,ue,fe;const n=k.useMemo(()=>{const{id:ae,ids:J,getRootNode:se}=t;return MM({id:ae,ids:J,getRootNode:se})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},i=(Q=(ee=e.props)==null?void 0:ee.call(e,{props:Uh(t),scope:n}))!=null?Q:t,s=jM(i),u=(me=e.context)==null?void 0:me.call(e,{prop:s,bindable:Ul,scope:n,flush:Gx,getContext(){return d},getComputed(){return B},getRefs(){return _},getEvent(){return b()}}),c=Yx(u),d={get(ae){var J;return(J=c.current)==null?void 0:J[ae].ref.current},set(ae,J){var se;(se=c.current)==null||se[ae].set(J)},initial(ae){var J;return(J=c.current)==null?void 0:J[ae].initial},hash(ae){var se,O;const J=(se=c.current)==null?void 0:se[ae].get();return(O=c.current)==null?void 0:O[ae].hash(J)}},f=k.useRef(new Map),h=k.useRef(null),m=k.useRef(null),E=k.useRef({type:""}),b=()=>ce(M({},E.current),{current(){return E.current},previous(){return m.current}}),T=()=>ce(M({},A),{matches(...ae){return ae.includes(A.ref.current)},hasTag(ae){var J,se;return!!((se=(J=e.states[A.ref.current])==null?void 0:J.tags)!=null&&se.includes(ae))}}),_=BM((ue=(V=e.refs)==null?void 0:V.call(e,{prop:s,context:d}))!=null?ue:{}),I=()=>({state:T(),context:d,event:b(),prop:s,send:H,action:v,guard:S,track:UM,refs:_,computed:B,flush:Gx,scope:n,choose:U}),v=ae=>{const J=Us(ae)?ae(I()):ae;if(!J)return;const se=J.map(O=>{var q,P;const j=(P=(q=e.implementations)==null?void 0:q.actions)==null?void 0:P[O];return j||jh(`[zag-js] No implementation found for action "${JSON.stringify(O)}"`),j});for(const O of se)O==null||O(I())},S=ae=>{var J,se;return Us(ae)?ae(I()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[ae](I())},R=ae=>{const J=Us(ae)?ae(I()):ae;if(!J)return;const se=J.map(j=>{var P,ge;const q=(ge=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ge[j];return q||jh(`[zag-js] No implementation found for effect "${JSON.stringify(j)}"`),q}),O=[];for(const j of se){const q=j==null?void 0:j(I());q&&O.push(q)}return()=>O.forEach(j=>j==null?void 0:j())},U=ae=>f8(ae).find(J=>{let se=!J.guard;return Pl(J.guard)?se=!!S(J.guard):Us(J.guard)&&(se=J.guard(I())),se}),B=ae=>{L8(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[ae];return J({context:d,event:b(),prop:s,refs:_,scope:n,computed:B})},A=Ul(()=>({defaultValue:e.initialState({prop:s}),onChange(ae,J){var O,j,q,P;if(J){const ge=f.current.get(J);ge==null||ge(),f.current.delete(J)}J&&v((O=e.states[J])==null?void 0:O.exit),v((j=h.current)==null?void 0:j.actions);const se=R((q=e.states[ae])==null?void 0:q.effects);if(se&&f.current.set(ae,se),J===Kh){v(e.entry);const ge=R(e.effects);ge&&f.current.set(Kh,ge)}v((P=e.states[ae])==null?void 0:P.entry)}})),G=k.useRef(void 0),W=k.useRef(Ys.NotStarted);Wx(()=>{queueMicrotask(()=>{var j;const se=W.current===Ys.Started;W.current=Ys.Started,r(se?"rehydrating...":"initializing...");const O=(j=G.current)!=null?j:A.initial;A.invoke(O,se?A.get():Kh)});const ae=f.current,J=A.ref.current;return()=>{r("unmounting..."),G.current=J,W.current=Ys.Stopped,ae.forEach(se=>se==null?void 0:se()),f.current=new Map,h.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const re=()=>"ref"in A?A.ref.current:A.get(),H=ae=>{queueMicrotask(()=>{var P,ge,Re,pe,Ne;if(W.current!==Ys.Started)return;m.current=E.current,E.current=ae;let J=re();const se=(Re=(P=e.states[J].on)==null?void 0:P[ae.type])!=null?Re:(ge=e.on)==null?void 0:ge[ae.type],O=U(se);if(!O)return;h.current=O;const j=(pe=O.target)!=null?pe:J;r("transition",ae.type,O.target||J,`(${O.actions})`);const q=j!==J;q?Ns.flushSync(()=>A.set(j)):O.reenter&&!q?A.invoke(J,J):v((Ne=O.actions)!=null?Ne:[])})};return(fe=e.watch)==null||fe.call(e,I()),{state:T(),send:H,context:d,prop:s,scope:n,refs:_,computed:B,event:b(),getStatus:()=>W.current}}function Yx(e){const t=k.useRef(e);return t.current=e,t}function jM(e){const t=Yx(e);return function(r){return t.current[r]}}function Gx(e){queueMicrotask(()=>{Ns.flushSync(()=>e())})}var Qh=FM(e=>e);function Hl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const i=r(t);typeof i=="function"&&n.push(i)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function HM(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Jh=e=>{const t=k.memo(k.forwardRef((n,r)=>{const f=n,{asChild:i,children:s}=f,u=_n(f,["asChild","children"]);if(!i)return k.createElement(e,ce(M({},u),{ref:r}),s);if(!k.isValidElement(s))return null;const c=k.Children.only(s),d=HM(c);return k.cloneElement(c,ce(M({},an(u,c.props)),{ref:r?Hl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Nn=(()=>{const e=new Map;return new Proxy(Jh,{apply(t,n,r){return Jh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Jh(r)),e.get(r)}})})();function $M(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function $o(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:s,defaultValue:u}=e,c=k.createContext(u);c.displayName=t;function d(){var h;const f=k.useContext(c);if(!f&&n){const m=new Error(s!=null?s:$M(r,i));throw m.name="ContextError",(h=Error.captureStackTrace)==null||h.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[zM,Zh]=$o({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Xx,Su]=$o({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Kx=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:Hl(r.ref,t)}))});Kx.displayName="PopoverContent";const Qx=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:t}))});Qx.displayName="PopoverPositioner";const Au=()=>(e,t)=>t.reduce((n,r)=>{const[i,s]=n,u=r;return s[u]!==void 0&&(i[u]=s[u]),delete s[u],[i,s]},[{},M({},e)]),Jx=e=>Au()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function VM(e,t){const{state:n,send:r,context:i}=e,s=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:s,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var qM={props({props:e}){return ce(M({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Vs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const i=r("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const s=t.get("node");if(!i&&(s==null?void 0:s.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});sn(()=>{var c,d;const u=$l(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})=>{sn(()=>{e.set("prevAnimationName",$l(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const i=t.get("node");if(!i)return;const s=d=>{var h,m,E;((E=(m=(h=d.composedPath)==null?void 0:h.call(d))==null?void 0:m[0])!=null?E:d.target)===i&&e.set("prevAnimationName",$l(t.get("styles")))},u=d=>{const f=$l(t.get("styles"));Ir(d)===i&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",s),i.addEventListener("animationcancel",u),i.addEventListener("animationend",u);const c=Bl(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",s),i.removeEventListener("animationcancel",u),i.removeEventListener("animationend",u),Vx(()=>c())}}}}};function $l(e){return(e==null?void 0:e.animationName)||"none"}Gs()(["onExitComplete","present","immediate"]);function WM(e,t={}){const{sync:n=!1}=t,r=YM(e);return k.useCallback((...i)=>{var s;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...i)}):(s=r.current)==null?void 0:s.call(r,...i)},[n,r])}function YM(e){const t=k.useRef(e);return t.current=e,t}const em=(e={})=>{const E=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:i=!1}=E,s=_n(E,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=k.useRef(!1),c=ce(M({},s),{present:r,onExitComplete:WM(e.onExitComplete)}),d=jl(qM,c),f=VM(d);f.present&&(u.current=!0);const h=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&i?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:h}};var zo=(e,t=[])=>({parts:(...n)=>{if(GM(t))return zo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>zo(e,[...t,...n]),omit:(...n)=>zo(e,t.filter(r=>!n.includes(r))),rename:n=>zo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Xs(e)}"][data-part="${Xs(r)}"]`,`& [data-scope="${Xs(e)}"][data-part="${Xs(r)}"]`].join(", "),attrs:{"data-scope":Xs(e),"data-part":Xs(r)}}}),{})}),Xs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),GM=e=>e.length===0;const XM=["top","right","bottom","left"],Hi=Math.min,di=Math.max,zl=Math.round,Vl=Math.floor,Jr=e=>({x:e,y:e}),KM={left:"right",right:"left",bottom:"top",top:"bottom"};function Zx(e,t,n){return di(e,Hi(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function Ks(e){return e.split("-")[1]}function tm(e){return e==="x"?"y":"x"}function nm(e){return e==="y"?"height":"width"}function Zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function rm(e){return tm(Zr(e))}function QM(e,t,n){n===void 0&&(n=!1);const r=Ks(e),i=rm(e),s=nm(i);let u=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(u=ql(u)),[u,ql(u)]}function JM(e){const t=ql(e);return[im(e),t,im(t)]}function im(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const eT=["left","right"],tT=["right","left"],ZM=["top","bottom"],e9=["bottom","top"];function t9(e,t,n){switch(e){case"top":case"bottom":return n?t?tT:eT:t?eT:tT;case"left":case"right":return t?ZM:e9;default:return[]}}function n9(e,t,n,r){const i=Ks(e);let s=t9($i(e),n==="start",r);return i&&(s=s.map(u=>u+"-"+i),t&&(s=s.concat(s.map(im)))),s}function ql(e){const t=$i(e);return KM[t]+e.slice(t.length)}function r9(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function nT(e){return typeof e!="number"?r9(e):{top:e,right:e,bottom:e,left:e}}function Wl(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function rT(e,t,n){let{reference:r,floating:i}=e;const s=Zr(t),u=rm(t),c=nm(u),d=$i(t),f=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,E=r[c]/2-i[c]/2;let b;switch(d){case"top":b={x:h,y:r.y-i.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-i.width,y:m};break;default:b={x:r.x,y:r.y}}const T=Ks(t);return T&&(b[u]+=E*(T==="end"?1:-1)*(n&&f?-1:1)),b}function i9(e,t){return Ie(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:E=!1,padding:b=0}=fi(t,e),T=nT(b),I=c[E?m==="floating"?"reference":"floating":m],v=Wl(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),S=m==="floating"?{x:r,y:i,width:u.floating.width,height:u.floating.height}:u.reference,R=yield s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating),U=(yield s.isElement==null?void 0:s.isElement(R))&&(yield s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},B=Wl(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:R,strategy:d}):S);return{top:(v.top-B.top+T.top)/U.y,bottom:(B.bottom-v.bottom+T.bottom)/U.y,left:(v.left-B.left+T.left)/U.x,right:(B.right-v.right+T.right)/U.x}})}const o9=50,s9=(e,t,n)=>Ie(null,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:u}=n,c=u.detectOverflow?u:ce(M({},u),{detectOverflow:i9}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:m}=rT(f,r,d),E=r,b=0;const T={};for(let _=0;_<s.length;_++){const I=s[_];if(!I)continue;const{name:v,fn:S}=I,{x:R,y:U,data:B,reset:A}=yield S({x:h,y:m,initialPlacement:r,placement:E,strategy:i,middlewareData:T,rects:f,platform:c,elements:{reference:e,floating:t}});h=R!=null?R:h,m=U!=null?U:m,T[v]=M(M({},T[v]),B),A&&b<o9&&(b++,typeof A=="object"&&(A.placement&&(E=A.placement),A.rects&&(f=A.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:h,y:m}=rT(f,E,d)),_=-1)}return{x:h,y:m,placement:E,strategy:i,middlewareData:T}}),a9=e=>({name:"arrow",options:e,fn(n){return Ie(this,null,function*(){const{x:r,y:i,placement:s,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:h,padding:m=0}=fi(e,n)||{};if(h==null)return{};const E=nT(m),b={x:r,y:i},T=rm(s),_=nm(T),I=yield c.getDimensions(h),v=T==="y",S=v?"top":"left",R=v?"bottom":"right",U=v?"clientHeight":"clientWidth",B=u.reference[_]+u.reference[T]-b[T]-u.floating[_],A=b[T]-u.reference[T],G=yield c.getOffsetParent==null?void 0:c.getOffsetParent(h);let W=G?G[U]:0;(!W||!(yield c.isElement==null?void 0:c.isElement(G)))&&(W=d.floating[U]||u.floating[_]);const re=B/2-A/2,H=W/2-I[_]/2-1,ee=Hi(E[S],H),Q=Hi(E[R],H),me=W-I[_]-Q,V=W/2-I[_]/2+re,ue=Zx(ee,V,me),fe=!f.arrow&&Ks(s)!=null&&V!==ue&&u.reference[_]/2-(V<ee?ee:Q)-I[_]/2<0,ae=fe?V<ee?V-ee:V-me:0;return{[T]:b[T]+ae,data:M({[T]:ue,centerOffset:V-ue-ae},fe&&{alignmentOffset:ae}),reset:fe}})}}),u9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ie(this,null,function*(){var r,i;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:h}=n,ue=fi(e,n),{mainAxis:m=!0,crossAxis:E=!0,fallbackPlacements:b,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:I=!0}=ue,v=_n(ue,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const S=$i(s),R=Zr(d),U=$i(d)===d,B=yield f.isRTL==null?void 0:f.isRTL(h.floating),A=b||(U||!I?[ql(d)]:JM(d)),G=_!=="none";!b&&G&&A.push(...n9(d,I,_,B));const W=[d,...A],re=yield f.detectOverflow(n,v),H=[];let ee=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&H.push(re[S]),E){const fe=QM(s,c,B);H.push(re[fe[0]],re[fe[1]])}if(ee=[...ee,{placement:s,overflows:H}],!H.every(fe=>fe<=0)){var Q,me;const fe=(((Q=u.flip)==null?void 0:Q.index)||0)+1,ae=W[fe];if(ae&&(!(E==="alignment"?R!==Zr(ae):!1)||ee.every(O=>Zr(O.placement)===R?O.overflows[0]>0:!0)))return{data:{index:fe,overflows:ee},reset:{placement:ae}};let J=(me=ee.filter(se=>se.overflows[0]<=0).sort((se,O)=>se.overflows[1]-O.overflows[1])[0])==null?void 0:me.placement;if(!J)switch(T){case"bestFit":{var V;const se=(V=ee.filter(O=>{if(G){const j=Zr(O.placement);return j===R||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,q)=>j+q,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:V[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(s!==J)return{reset:{placement:J}}}return{}})}}};function iT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oT(e){return XM.some(t=>e[t]>=0)}const c9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ie(this,null,function*(){const{rects:r,platform:i}=n,c=fi(e,n),{strategy:s="referenceHidden"}=c,u=_n(c,["strategy"]);switch(s){case"referenceHidden":{const d=yield i.detectOverflow(n,ce(M({},u),{elementContext:"reference"})),f=iT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:oT(f)}}}case"escaped":{const d=yield i.detectOverflow(n,ce(M({},u),{altBoundary:!0})),f=iT(d,r.floating);return{data:{escapedOffsets:f,escaped:oT(f)}}}default:return{}}})}}},sT=new Set(["left","top"]);function l9(e,t){return Ie(this,null,function*(){const{placement:n,platform:r,elements:i}=e,s=yield r.isRTL==null?void 0:r.isRTL(i.floating),u=$i(n),c=Ks(n),d=Zr(n)==="y",f=sT.has(u)?-1:1,h=s&&d?-1:1,m=fi(t,e);let{mainAxis:E,crossAxis:b,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof T=="number"&&(b=c==="end"?T*-1:T),d?{x:b*h,y:E*f}:{x:E*f,y:b*h}})}const d9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ie(this,null,function*(){var r,i;const{x:s,y:u,placement:c,middlewareData:d}=n,f=yield l9(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:s+f.x,y:u+f.y,data:ce(M({},f),{placement:c})}})}}},f9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ie(this,null,function*(){const{x:r,y:i,placement:s,platform:u}=n,R=fi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:B,y:A}=U;return{x:B,y:A}}}}=R,h=_n(R,["mainAxis","crossAxis","limiter"]),m={x:r,y:i},E=yield u.detectOverflow(n,h),b=Zr(s),T=tm(b);let _=m[T],I=m[b];const v=(U,B)=>Zx(B+E[U==="y"?"top":"left"],B,B-E[U==="y"?"bottom":"right"]);c&&(_=v(T,_)),d&&(I=v(b,I));const S=f.fn(ce(M({},n),{[T]:_,[b]:I}));return ce(M({},S),{data:{x:S.x-r,y:S.y-i,enabled:{[T]:c,[b]:d}}})})}}},p9=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:s,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=fi(e,t),E={x:i,y:s},b=Zr(u),T=tm(b);let _=E[T],I=E[b];const v=fi(f,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(n=v.mainAxis)!=null?n:0,crossAxis:(r=v.crossAxis)!=null?r:0};if(h){const B=T==="y"?"height":"width",A=c.reference[T]-c.floating[B]+S.mainAxis,G=c.reference[T]+c.reference[B]-S.mainAxis;_<A?_=A:_>G&&(_=G)}if(m){var R,U;const B=T==="y"?"width":"height",A=sT.has($i(u)),G=c.reference[b]-c.floating[B]+(A&&((R=d.offset)==null?void 0:R[b])||0)+(A?0:S.crossAxis),W=c.reference[b]+c.reference[B]+(A?0:((U=d.offset)==null?void 0:U[b])||0)-(A?S.crossAxis:0);I<G?I=G:I>W&&(I=W)}return{[T]:_,[b]:I}}}},h9=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ie(this,null,function*(){const{placement:r,rects:i,platform:s,elements:u}=n,H=fi(e,n),{apply:c=()=>{}}=H,d=_n(H,["apply"]),f=yield s.detectOverflow(n,d),h=$i(r),m=Ks(r),E=Zr(r)==="y",{width:b,height:T}=i.floating;let _,I;h==="top"||h==="bottom"?(_=h,I=m===((yield s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(I=h,_=m==="end"?"top":"bottom");const v=T-f.top-f.bottom,S=b-f.left-f.right,R=Hi(T-f[_],v),U=Hi(b-f[I],S),B=n.middlewareData.shift,A=!B;let G=R,W=U;B!=null&&B.enabled.x&&(W=S),B!=null&&B.enabled.y&&(G=v),A&&!m&&(E?W=b-2*di(f.left,f.right):G=T-2*di(f.top,f.bottom)),yield c(ce(M({},n),{availableWidth:W,availableHeight:G}));const re=yield s.getDimensions(u.floating);return b!==re.width||T!==re.height?{reset:{rects:!0}}:{}})}}};function Yl(){return typeof window!="undefined"}function Qs(e){return aT(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=(aT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aT(e){return Yl()?e instanceof Node||e instanceof or(e).Node:!1}function Or(e){return Yl()?e instanceof Element||e instanceof or(e).Element:!1}function ti(e){return Yl()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function uT(e){return!Yl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}function ku(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function m9(e){return/^(table|td|th)$/.test(Qs(e))}function Gl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const g9=/transform|translate|scale|rotate|perspective|filter/,y9=/paint|layout|strict|content/,Vo=e=>!!e&&e!=="none";let om;function sm(e){const t=Or(e)?Pr(e):e;return Vo(t.transform)||Vo(t.translate)||Vo(t.scale)||Vo(t.rotate)||Vo(t.perspective)||!am()&&(Vo(t.backdropFilter)||Vo(t.filter))||g9.test(t.willChange||"")||y9.test(t.contain||"")}function E9(e){let t=zi(e);for(;ti(t)&&!Js(t);){if(sm(t))return t;if(Gl(t))return null;t=zi(t)}return null}function am(){return om==null&&(om=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),om}function Js(e){return/^(html|body|#document)$/.test(Qs(e))}function Pr(e){return or(e).getComputedStyle(e)}function Xl(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zi(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uT(e)&&e.host||ei(e);return uT(t)?t.host:t}function cT(e){const t=zi(e);return Js(t)?(e.ownerDocument||e).body:ti(t)&&ku(t)?t:cT(t)}function Cu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=cT(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),u=or(i);if(s){const c=um(u);return t.concat(u,u.visualViewport||[],ku(i)?i:[],c&&n?Cu(c):[])}else return t.concat(i,Cu(i,[],n))}function um(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lT(e){const t=Pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ti(e),s=i?e.offsetWidth:n,u=i?e.offsetHeight:r,c=zl(n)!==s||zl(r)!==u;return c&&(n=s,r=u),{width:n,height:r,$:c}}function cm(e){return Or(e)?e:e.contextElement}function Zs(e){const t=cm(e);if(!ti(t))return Jr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=lT(t);let u=(s?zl(n.width):n.width)/r,c=(s?zl(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const b9=Jr(0);function dT(e){const t=or(e);return!am()||!t.visualViewport?b9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==or(e)?!1:t}function qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=cm(e);let u=Jr(1);t&&(r?Or(r)&&(u=Zs(r)):u=Zs(e));const c=w9(s,n,r)?dT(s):Jr(0);let d=(i.left+c.x)/u.x,f=(i.top+c.y)/u.y,h=i.width/u.x,m=i.height/u.y;if(s){const E=or(s),b=r&&Or(r)?or(r):r;let T=E,_=um(T);for(;_&&r&&b!==T;){const I=Zs(_),v=_.getBoundingClientRect(),S=Pr(_),R=v.left+(_.clientLeft+parseFloat(S.paddingLeft))*I.x,U=v.top+(_.clientTop+parseFloat(S.paddingTop))*I.y;d*=I.x,f*=I.y,h*=I.x,m*=I.y,d+=R,f+=U,T=or(_),_=um(T)}}return Wl({width:h,height:m,x:d,y:f})}function Kl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:qo(ei(e)).left+n}function fT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Kl(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function x9(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",u=ei(r),c=t?Gl(t.floating):!1;if(r===u||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Jr(1);const h=Jr(0),m=ti(r);if((m||!m&&!s)&&((Qs(r)!=="body"||ku(u))&&(d=Xl(r)),ti(r))){const b=qo(r);f=Zs(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const E=u&&!m&&!s?fT(u,d):Jr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+E.x,y:n.y*f.y-d.scrollTop*f.y+h.y+E.y}}function T9(e){return Array.from(e.getClientRects())}function _9(e){const t=ei(e),n=Xl(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Kl(e);const c=-n.scrollTop;return Pr(r).direction==="rtl"&&(u+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:u,y:c}}const pT=25;function v9(e,t){const n=or(e),r=ei(e),i=n.visualViewport;let s=r.clientWidth,u=r.clientHeight,c=0,d=0;if(i){s=i.width,u=i.height;const h=am();(!h||h&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=Kl(r);if(f<=0){const h=r.ownerDocument,m=h.body,E=getComputedStyle(m),b=h.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,T=Math.abs(r.clientWidth-m.clientWidth-b);T<=pT&&(s-=T)}else f<=pT&&(s+=f);return{width:s,height:u,x:c,y:d}}const S9=new Set(["absolute","fixed"]);function A9(e,t){const n=qo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ti(e)?Zs(e):Jr(1),u=e.clientWidth*s.x,c=e.clientHeight*s.y,d=i*s.x,f=r*s.y;return{width:u,height:c,x:d,y:f}}function hT(e,t,n){let r;if(t==="viewport")r=v9(e,n);else if(t==="document")r=_9(ei(e));else if(Or(t))r=A9(t,n);else{const i=dT(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Wl(r)}function mT(e,t){const n=zi(e);return n===t||!Or(n)||Js(n)?!1:Pr(n).position==="fixed"||mT(n,t)}function k9(e,t){const n=t.get(e);if(n)return n;let r=Cu(e,[],!1).filter(c=>Or(c)&&Qs(c)!=="body"),i=null;const s=Pr(e).position==="fixed";let u=s?zi(e):e;for(;Or(u)&&!Js(u);){const c=Pr(u),d=sm(u);!d&&c.position==="fixed"&&(i=null),(s?!d&&!i:!d&&c.position==="static"&&!!i&&S9.has(i.position)||ku(u)&&!d&&mT(e,u))?r=r.filter(h=>h!==u):i=c,u=zi(u)}return t.set(e,r),r}function C9(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const u=[...n==="clippingAncestors"?Gl(t)?[]:k9(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,h)=>{const m=hT(t,h,i);return f.top=di(m.top,f.top),f.right=Hi(m.right,f.right),f.bottom=Hi(m.bottom,f.bottom),f.left=di(m.left,f.left),f},hT(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function N9(e){const{width:t,height:n}=lT(e);return{width:t,height:n}}function I9(e,t,n){const r=ti(t),i=ei(t),s=n==="fixed",u=qo(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=Jr(0);function f(){d.x=Kl(i)}if(r||!r&&!s)if((Qs(t)!=="body"||ku(i))&&(c=Xl(t)),r){const b=qo(t,!0,s,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&f();s&&!r&&i&&f();const h=i&&!r&&!s?fT(i,c):Jr(0),m=u.left+c.scrollLeft-d.x-h.x,E=u.top+c.scrollTop-d.y-h.y;return{x:m,y:E,width:u.width,height:u.height}}function lm(e){return Pr(e).position==="static"}function gT(e,t){if(!ti(e)||Pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ei(e)===n&&(n=n.ownerDocument.body),n}function yT(e,t){const n=or(e);if(Gl(e))return n;if(!ti(e)){let i=zi(e);for(;i&&!Js(i);){if(Or(i)&&!lm(i))return i;i=zi(i)}return n}let r=gT(e,t);for(;r&&m9(r)&&lm(r);)r=gT(r,t);return r&&Js(r)&&lm(r)&&!sm(r)?n:r||E9(e)||n}const O9=function(e){return Ie(this,null,function*(){const t=this.getOffsetParent||yT,n=this.getDimensions,r=yield n(e.floating);return{reference:I9(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function P9(e){return Pr(e).direction==="rtl"}const R9={convertOffsetParentRelativeRectToViewportRelativeRect:x9,getDocumentElement:ei,getClippingRect:C9,getOffsetParent:yT,getElementRects:O9,getClientRects:T9,getDimensions:N9,getScale:Zs,isElement:Or,isRTL:P9};function ET(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L9(e,t){let n=null,r;const i=ei(e);function s(){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),s();const f=e.getBoundingClientRect(),{left:h,top:m,width:E,height:b}=f;if(c||t(),!E||!b)return;const T=Vl(m),_=Vl(i.clientWidth-(h+E)),I=Vl(i.clientHeight-(m+b)),v=Vl(h),R={rootMargin:-T+"px "+-_+"px "+-I+"px "+-v+"px",threshold:di(0,Hi(1,d))||1};let U=!0;function B(A){const G=A[0].intersectionRatio;if(G!==d){if(!U)return u();G?u(!1,G):r=setTimeout(()=>{u(!1,1e-7)},1e3)}G===1&&!ET(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(B,ce(M({},R),{root:i.ownerDocument}))}catch(A){n=new IntersectionObserver(B,R)}n.observe(e)}return u(!0),s}function D9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=cm(e),h=i||s?[...f?Cu(f):[],...Cu(t)]:[];h.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const m=f&&c?L9(f,n):null;let E=-1,b=null;u&&(b=new ResizeObserver(v=>{let[S]=v;S&&S.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let T,_=d?qo(e):null;d&&I();function I(){const v=qo(e);_&&!ET(_,v)&&n(),_=v,T=requestAnimationFrame(I)}return n(),()=>{var v;h.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),m==null||m(),(v=b)==null||v.disconnect(),b=null,d&&cancelAnimationFrame(T)}}const M9=d9,F9=f9,B9=u9,U9=h9,j9=c9,H9=a9,$9=p9,z9=(e,t,n)=>{const r=new Map,i=M({platform:R9},n),s=ce(M({},i.platform),{_c:r});return s9(e,t,ce(M({},i),{platform:s}))};function bT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ce(M({},i),{toJSON:()=>i})}function V9(e){if(!e)return bT();const{x:t,y:n,width:r,height:i}=e;return bT(t,n,r,i)}function q9(e,t){return{contextElement:pn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?V9(r):n.getBoundingClientRect()}}}var Nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:Nu("--arrow-size"),arrowSizeHalf:Nu("--arrow-size-half"),arrowBg:Nu("--arrow-background"),transformOrigin:Nu("--transform-origin"),arrowOffset:Nu("--arrow-offset")},W9=e=>e==="top"||e==="bottom"?"y":"x";function Y9(e,t){return{name:"transformOrigin",fn(n){var re,H,ee,Q,me;const{elements:r,middlewareData:i,placement:s,rects:u,y:c}=n,d=s.split("-")[0],f=W9(d),h=((re=i.arrow)==null?void 0:re.x)||0,m=((H=i.arrow)==null?void 0:H.y)||0,E=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,T=h+E/2,_=m+b/2,I=Math.abs(((ee=i.shift)==null?void 0:ee.y)||0),v=u.reference.height/2,S=b/2,R=(me=(Q=e.offset)==null?void 0:Q.mainAxis)!=null?me:e.gutter,U=typeof R=="number"?R+S:R!=null?R:S,B=I>U,A={top:`${T}px calc(100% + ${U}px)`,bottom:`${T}px ${-U}px`,left:`calc(100% + ${U}px) ${_}px`,right:`${-U}px ${_}px`}[d],G=`${T}px ${u.reference.y+v-c}px`,W=!!e.overlap&&f==="y"&&B;return r.floating.style.setProperty(pi.transformOrigin.variable,W?G:A),{data:{transformOrigin:W?G:A}}}}}var G9={name:"rects",fn({rects:e}){return{data:e}}},X9=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:i}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:i!=null?`${i}px`:"",[s]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function K9(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var Q9={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function wT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function dm(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function J9(e,t,n){const r=e||t.createElement("div");return H9({element:r,padding:n.arrowPadding})}function Z9(e,t){var n;if(!b8((n=t.offset)!=null?n:t.gutter))return M9(({placement:r})=>{var h,m,E,b;const i=((e==null?void 0:e.clientHeight)||0)/2,s=(m=(h=t.offset)==null?void 0:h.mainAxis)!=null?m:t.gutter,u=typeof s=="number"?s+i:s!=null?s:i,{hasAlign:c}=K9(r),d=c?void 0:t.shift,f=(b=(E=t.offset)==null?void 0:E.crossAxis)!=null?b:d;return Uh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function e7(e){if(!e.flip)return;const t=dm(e.boundary);return B9(ce(M({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function t7(e){if(!e.slide&&!e.overlap)return;const t=dm(e.boundary);return F9(ce(M({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:$9()}))}function n7(e){return U9({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:i}){const s=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);i=Math.floor(i),r=Math.floor(r),s.style.setProperty("--reference-width",`${u}px`),s.style.setProperty("--reference-height",`${c}px`),s.style.setProperty("--available-width",`${i}px`),s.style.setProperty("--available-height",`${r}px`)}})}function r7(e){var t;if(e.hideWhenDetached)return j9({strategy:"referenceHidden",boundary:(t=dm(e.boundary))!=null?t:"clippingAncestors"})}function i7(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function o7(e,t,n={}){const r=q9(e,n.getAnchorRect);if(!t||!r)return;const i=Object.assign({},Q9,n),s=t.querySelector("[data-part=arrow]"),u=[Z9(s,i),e7(i),t7(i),J9(s,t.ownerDocument,i),X9(s),Y9({gutter:i.gutter,offset:i.offset,overlap:i.overlap},s),n7(i),r7(i),G9],{placement:c,strategy:d,onComplete:f,onPositioned:h}=i,m=()=>Ie(null,null,function*(){var U;if(!r||!t)return;const _=yield z9(r,t,{placement:c,middleware:u,strategy:d});f==null||f(_),h==null||h({placed:!0});const I=$s(t),v=wT(I,_.x),S=wT(I,_.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${S}px`),i.hideWhenDetached&&(((U=_.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 R=t.firstElementChild;if(R){const B=Vs(R);t.style.setProperty("--z-index",B.zIndex)}}),E=()=>Ie(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),b=i7(i.listeners),T=i.listeners?D9(r,t,E,b):C8;return E(),()=>{T==null||T(),h==null||h({placed:!1})}}function xT(e,t,n={}){const c=n,{defer:r}=c,i=_n(c,["defer"]),s=r?sn:d=>d(),u=[];return u.push(s(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(o7(d,f,i))})),()=>{u.forEach(d=>d==null?void 0:d())}}var s7={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function a7(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?s7[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,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 ea=new WeakMap,Ql=new WeakMap,Jl={},fm=0,TT=e=>e&&(e.host||TT(e.parentNode)),u7=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=TT(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),c7=new Set(["script","output","status","next-route-announcer"]),l7=e=>c7.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),d7=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:i,followControlledElements:s=!0}=t,u=u7(n,Array.isArray(e)?e:[e]);Jl[r]||(Jl[r]=new WeakMap);const c=Jl[r],d=[],f=new Set,h=new Set(u),m=b=>{!b||f.has(b)||(f.add(b),m(b.parentNode))};u.forEach(b=>{m(b),s&&pn(b)&&Lx(b,T=>{m(T)})});const E=b=>{!b||h.has(b)||Array.prototype.forEach.call(b.children,T=>{if(f.has(T))E(T);else try{if(l7(T))return;const I=T.getAttribute(i)==="true",v=(ea.get(T)||0)+1,S=(c.get(T)||0)+1;ea.set(T,v),c.set(T,S),d.push(T),v===1&&I&&Ql.set(T,!0),S===1&&T.setAttribute(r,""),I||T.setAttribute(i,"true")}catch(_){console.error("[zag-js > ariaHidden] cannot operate on ",T,_)}})};return E(n),f.clear(),fm++,()=>{d.forEach(b=>{const T=ea.get(b)-1,_=c.get(b)-1;ea.set(b,T),c.set(b,_),T||(Ql.has(b)||b.removeAttribute(i),Ql.delete(b)),_||b.removeAttribute(r)}),fm--,fm||(ea=new WeakMap,ea=new WeakMap,Ql=new WeakMap,Jl={})}},f7=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,p7=(e,t=f7(e),n="data-aria-hidden",r=!0)=>{if(t)return d7(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},h7=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function _T(e,t={}){const{defer:n=!0}=t,r=n?h7:s=>s(),i=[];return i.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&i.push(p7(u))})),()=>{i.forEach(s=>s==null?void 0:s())}}function m7(e){const t={each(n){var r;for(let i=0;i<((r=e.frames)==null?void 0:r.length);i+=1){const s=e.frames[i];s&&n(s)}},addEventListener(n,r,i){return t.each(s=>{try{s.document.addEventListener(n,r,i)}catch(u){}}),()=>{try{t.removeEventListener(n,r,i)}catch(s){}}},removeEventListener(n,r,i){t.each(s=>{try{s.document.removeEventListener(n,r,i)}catch(u){}})}};return t}function g7(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,i)=>{try{t==null||t.addEventListener(n,r,i)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,r,i)}catch(s){}}},removeEventListener:(n,r,i)=>{try{t==null||t.removeEventListener(n,r,i)}catch(s){}}}}var vT="pointerdown.outside",ST="focus.outside";function y7(e){for(const t of e)if(pn(t)&&Qr(t))return!0;return!1}var AT=e=>"clientY"in e;function E7(e,t){if(!AT(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 b7(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function kT(e,t){if(!t||!AT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,s=i&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},c={x:e.clientX,y:e.clientY};return b7(u,c)?r||s:!1}function w7(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:s,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Kr(e),f=$s(e),h=m7(f),m=g7(f);function E(R,U){if(!pn(U)||!U.isConnected||Hs(e,U)||E7(e,R)||c&&Rx(e,U))return!1;const B=d.querySelector(`[aria-controls="${e.id}"]`);if(B){const G=Gh(B);if(kT(R,G))return!1}const A=Gh(e);return kT(R,A)?!1:!(n!=null&&n(U))}const b=new Set,T=jo(e==null?void 0:e.getRootNode());function _(R){function U(B){var re,H;const A=u&&!Dx()?sn:ee=>ee(),G=B!=null?B:R,W=(H=(re=G==null?void 0:G.composedPath)==null?void 0:re.call(G))!=null?H:[G==null?void 0:G.target];A(()=>{const ee=T?W[0]:Ir(R);if(!(!e||!E(R,ee))){if(i||s){const Q=Bh(i,s);e.addEventListener(vT,Q,{once:!0})}CT(e,vT,{bubbles:!1,cancelable:!0,detail:{originalEvent:G,contextmenu:cM(G),focusable:y7(W),target:ee}})}})}R.pointerType==="touch"?(b.forEach(B=>B()),b.add(hn(d,"click",U,{once:!0})),b.add(m.addEventListener("click",U,{once:!0})),b.add(h.addEventListener("click",U,{once:!0}))):U()}const I=new Set,v=setTimeout(()=>{I.add(hn(d,"pointerdown",_,!0)),I.add(m.addEventListener("pointerdown",_,!0)),I.add(h.addEventListener("pointerdown",_,!0))},0);function S(R){(u?sn:B=>B())(()=>{var G,W;const B=(W=(G=R==null?void 0:R.composedPath)==null?void 0:G.call(R))!=null?W:[R==null?void 0:R.target],A=T?B[0]:Ir(R);if(!(!e||!E(R,A))){if(r||s){const re=Bh(r,s);e.addEventListener(ST,re,{once:!0})}CT(e,ST,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:Qr(A),target:A}})}})}return Dx()||(I.add(hn(d,"focusin",S,!0)),I.add(m.addEventListener("focusin",S,!0)),I.add(h.addEventListener("focusin",S,!0))),()=>{clearTimeout(v),b.forEach(R=>R()),I.forEach(R=>R())}}function x7(e,t){const{defer:n}=t,r=n?sn:s=>s(),i=[];return i.push(r(()=>{const s=typeof e=="function"?e():e;i.push(w7(s,t))})),()=>{i.forEach(s=>s==null?void 0:s())}}function CT(e,t,n){const r=e.ownerDocument.defaultView||window,i=new r.CustomEvent(t,n);return e.dispatchEvent(i)}function T7(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return hn(Kr(e),"keydown",n,{capture:!0})}var NT="layer:request-dismiss",gr={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=>Hs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Hs(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=>gr.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];v7(e,NT,i=>{var s;(s=r.requestDismiss)==null||s.call(r,i),i.defaultPrevented||r==null||r.dismiss()}),_7(e,NT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function _7(e,t,n){const r=e.ownerDocument.defaultView||window,i=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function v7(e,t,n){e.addEventListener(t,n,{once:!0})}var IT;function OT(){gr.layers.forEach(({node:e})=>{e.style.pointerEvents=gr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function S7(e){e.style.pointerEvents=""}function A7(e,t){const n=Kr(e),r=[];return gr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(IT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(i=>{const[s,u]=PM(()=>{const c=i();return pn(c)?c:null},{timeout:1e3});s.then(c=>r.push(Bl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{gr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=IT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(i=>i()))}}function k7(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){jh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:i,pointerBlocking:s,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:s,requestDismiss:i};gr.add(f),OT();function h(_){var v,S;const I=Ir(_.detail.originalEvent);gr.isBelowPointerBlockingLayer(e)||gr.isInBranch(I)||((v=t.onPointerDownOutside)==null||v.call(t,_),(S=t.onInteractOutside)==null||S.call(t,_),!_.defaultPrevented&&(c&&console.log("onPointerDownOutside:",_.detail.originalEvent),r==null||r()))}function m(_){var v,S;const I=Ir(_.detail.originalEvent);gr.isInBranch(I)||((v=t.onFocusOutside)==null||v.call(t,_),(S=t.onInteractOutside)==null||S.call(t,_),!_.defaultPrevented&&(c&&console.log("onFocusOutside:",_.detail.originalEvent),r==null||r()))}function E(_){var I;gr.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,_),!_.defaultPrevented&&r&&(_.preventDefault(),r()))}function b(_){var R;if(!e)return!1;const I=typeof u=="function"?u():u,v=Array.isArray(I)?I:[I],S=(R=t.persistentElements)==null?void 0:R.map(U=>U()).filter(pn);return S&&v.push(...S),v.some(U=>Hs(U,_))||gr.isInNestedLayer(e,_)}const T=[s?A7(e,t.persistentElements):void 0,T7(e,E),x7(e,{exclude:b,onFocusOutside:m,onPointerDownOutside:h,defer:t.defer})];return()=>{gr.remove(e),OT(),S7(e),T.forEach(_=>_==null?void 0:_())}}function PT(e,t){const{defer:n}=t,r=n?sn:s=>s(),i=[];return i.push(r(()=>{const s=Us(e)?e():e;i.push(k7(s,t))})),()=>{i.forEach(s=>s==null?void 0:s())}}var C7=Object.defineProperty,N7=(e,t,n)=>t in e?C7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ut=(e,t,n)=>N7(e,typeof t!="symbol"?t+"":t,n),RT={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()}},I7=[],O7=class{constructor(e,t){Ut(this,"trapStack"),Ut(this,"config"),Ut(this,"doc"),Ut(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ut(this,"portalContainers",new Set),Ut(this,"listenerCleanups",[]),Ut(this,"handleFocus",r=>{const i=Ir(r),s=this.findContainerIndex(i,r)>=0;if(s||Ll(i))s&&(this.state.mostRecentlyFocusedNode=i);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(vu(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const h=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<f.length&&(u=f[h+1],c=!1):h-1>=0&&(u=f[h-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>vu(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}),Ut(this,"handlePointerDown",r=>{const i=Ir(r);if(!(this.findContainerIndex(i,r)>=0)){if(Ou(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ou(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ut(this,"handleClick",r=>{const i=Ir(r);this.findContainerIndex(i,r)>=0||Ou(this.config.clickOutsideDeactivates,r)||Ou(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ut(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const i=this.config.isKeyBackward(r),s=this.findNextNavNode({event:r,isBackward:i});if(!s)return;Iu(r)&&r.preventDefault(),this.tryFocus(s)}}),Ut(this,"handleEscapeKey",r=>{P7(r)&&Ou(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ut(this,"_mutationObserver"),Ut(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(i=>{i.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),i.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 eM(f)?!0:f.id&&!this.state.containers.some(h=>h.contains(f))?tM(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ut(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(i=>{var s;(s=this._mutationObserver)==null||s.observe(i,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(i=>{this.observePortalContainer(i)}))}),Ut(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Qr(r)){const i=zs(this.doc);if(i&&this.findContainerIndex(i)>=0)r=i;else{const s=this.state.tabbableGroups[0];r=s&&s.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}),Ut(this,"tryFocus",r=>{if(r!==!1&&r!==zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,R7(r)&&r.select()}}),Ut(this,"deactivate",r=>{if(!this.state.active)return this;const i=M({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),RT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const s=this.getOption(i,"onDeactivate"),u=this.getOption(i,"onPostDeactivate"),c=this.getOption(i,"checkCanReturnFocus"),d=this.getOption(i,"returnFocus","returnFocusOnDeactivate");s==null||s();const f=()=>{LT(()=>{if(d){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}u==null||u()})};if(d&&c){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(h).then(f,f),this}return f(),this}),Ut(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onPause"),s=this.getOption(r,"onPostPause");return this.state.paused=!0,i==null||i(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),Ut(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onUnpause"),s=this.getOption(r,"onPostUnpause");return this.state.paused=!1,i==null||i(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),Ut(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ut(this,"getReturnFocusNode",r=>{const i=this.getNodeForOption("setReturnFocus",{params:[r]});return i||(i===!1?!1:r)}),Ut(this,"getOption",(r,i,s)=>r&&r[i]!==void 0?r[i]:this.config[s||i]),Ut(this,"getNodeForOption",(r,{hasFallback:i=!1,params:s=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...s)),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&&!i)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ut(this,"findNextNavNode",r=>{const{event:i,isBackward:s=!1}=r,u=r.target||Ir(i);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,i),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)s?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let h=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Qr(u)&&!Ho(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(h=d),h>=0){const m=h===0?this.state.tabbableGroups.length-1:h-1,E=this.state.tabbableGroups[m];c=vu(u)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else Iu(i)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Qr(u)&&!Ho(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(h=d),h>=0){const m=h===this.state.tabbableGroups.length-1?0:h+1,E=this.state.tabbableGroups[m];c=vu(u)>=0?E.firstTabbableNode:E.firstDomTabbableNode}else Iu(i)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||I7;const n=M({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Iu(r)&&!r.shiftKey},isKeyBackward(r){return Iu(r)&&r.shiftKey}},t);this.doc=n.document||Kr(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=>{Q8(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:i})=>r.contains(e)||(n==null?void 0:n.includes(r))||i.find(s=>s===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Rx(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=qs(e,{getShadowRoot:this.config.getShadowRoot}),n=$x(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],s=r,u=i;let c=!1;for(let f=0;f<t.length;f++)if(vu(t[f])>0){c=!0;break}function d(f,h=!0){const m=t.indexOf(f);if(m>=0)return t[m+(h?1:-1)];const E=n.indexOf(f);if(!(E<0)){if(h){for(let b=E+1;b<n.length;b++)if(Ho(n[b]))return n[b]}else for(let b=E-1;b>=0;b--)if(Ho(n[b]))return n[b]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:s,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 RT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?LT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(hn(this.doc,"focusin",this.handleFocus,!0),hn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),hn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),hn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),hn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),hn(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=zs(this.doc),t==null||t();const i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Iu=e=>e.key==="Tab",Ou=(e,...t)=>typeof e=="function"?e(...t):e,P7=e=>!e.isComposing&&e.key==="Escape",LT=e=>setTimeout(e,0),R7=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function DT(e,t={}){let n;const r=sn(()=>{const i=typeof e=="function"?e():e;if(i){n=new O7(i,ce(M({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i},t),{document:Kr(i)}));try{n.activate()}catch(s){}}});return function(){n==null||n.deactivate(),r()}}var pm="data-scroll-lock";function L7(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function MT(e){const t=Vs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function FT(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:i}=t;if(i.hasAttribute(pm))return;const u=MT(r)||MT(i),c=n.innerWidth-r.clientWidth;i.setAttribute(pm,"");const d=()=>IM(r,"--scrollbar-width",`${c}px`),f=L7(r),h=()=>{const T={overflow:"hidden"};return!u&&c>0&&(T[f]=`${c}px`),Bl(i,T)},m=()=>{var B,A;const{scrollX:T,scrollY:_,visualViewport:I}=n,v=(B=I==null?void 0:I.offsetLeft)!=null?B:0,S=(A=I==null?void 0:I.offsetTop)!=null?A:0,R={position:"fixed",overflow:"hidden",top:`${-(_-Math.floor(S))}px`,left:`${-(T-Math.floor(v))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const U=Bl(i,R);return()=>{U==null||U(),n.scrollTo({left:T,top:_,behavior:"instant"})}},E=[d(),Dl()?m():h()];return()=>{E.forEach(T=>T==null?void 0:T()),i.removeAttribute(pm)}}var D7=zo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),ni=D7.build(),BT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},UT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},hm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},jT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},M7=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},mm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},gm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},F7=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},HT=e=>e.getById(BT(e)),ta=e=>e.getById(UT(e)),na=e=>e.getById(hm(e)),$T=e=>e.getById(jT(e)),B7=e=>e.getById(mm(e)),U7=e=>e.getById(gm(e));function j7(e,t){const{state:n,context:r,send:i,computed:s,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),h=s("currentPortalled"),m=r.get("renderedElements"),E=a7(ce(M({},u("positioning")),{placement:f}));return{portalled:h,open:d,setOpen(b){n.matches("open")!==b&&i({type:b?"OPEN":"CLOSE"})},reposition(b={}){i({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(ce(M({id:M7(c)},ni.arrow.attrs),{dir:u("dir"),style:E.arrow}))},getArrowTipProps(){return t.element(ce(M({},ni.arrowTip.attrs),{dir:u("dir"),style:E.arrowTip}))},getAnchorProps(){return t.element(ce(M({},ni.anchor.attrs),{dir:u("dir"),id:BT(c)}))},getTriggerProps(){return t.button(ce(M({},ni.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:UT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":hm(c),onPointerDown(b){Mx(b)&&aM()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||i({type:"TOGGLE"})},onBlur(b){i({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(ce(M({},ni.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(M({id:jT(c)},ni.positioner.attrs),{dir:u("dir"),style:E.floating}))},getContentProps(){return t.element(ce(M({},ni.content.attrs),{dir:u("dir"),id:hm(c),tabIndex:-1,role:"dialog","aria-modal":Ix(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":js(d),"aria-labelledby":m.title?mm(c):void 0,"aria-describedby":m.description?gm(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(ce(M({},ni.title.attrs),{id:mm(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ce(M({},ni.description.attrs),{id:gm(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ce(M({},ni.closeTrigger.attrs),{dir:u("dir"),id:F7(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),i({type:"CLOSE"}))}}))}}}var H7={props({props:e}){return ce(M({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:M({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var s;e.set("currentPlacement",t("positioning").placement);const r=(s=HT(n))!=null?s:ta(n);return xT(r,()=>$T(n),ce(M({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>na(n);let i=!0;return PT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ta(n),defer:!0,onEscapeKeyDown(s){var u;(u=t("onEscapeKeyDown"))==null||u(s),!t("closeOnEscape")&&s.preventDefault()},onInteractOutside(s){var u;(u=t("onInteractOutside"))==null||u(s),!s.defaultPrevented&&(i=!(s.detail.focusable||s.detail.contextmenu),t("closeOnInteractOutside")||s.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:CM(()=>na(t),{triggerElement:ta(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?_T(()=>[na(t),ta(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return FT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?DT(()=>na(t),{initialFocus:()=>zx({root:na(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const i=(u=HT(n))!=null?u:ta(n);xT(i,()=>$T(n),ce(M(M({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){sn(()=>{Object.assign(e.get("renderedElements"),{title:!!B7(t),description:!!U7(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||sn(()=>{const n=zx({root:na(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,i;const n=(i=e.restoreFocus)!=null?i:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||sn(()=>{const s=ta(t);s==null||s.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})}}}};Gs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[NV,Zl]=$o({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[IV,ym]=$o({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),$7=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,dir:r,getRootNode:n},e),s=jl(H7,i);return j7(s,Qh)},z7=e=>{const[t,u]=Jx(e),c=u,{children:n}=c,r=_n(c,["children"]),i=$7(r),s=em(an({present:i.open},t));return w.jsx(zM,{value:i,children:w.jsx(Xx,{value:s,children:n})})},zT=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(ce(M({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(Nn.button,ce(M({},i),{ref:t}))});zT.displayName="PopoverTrigger";function V7(e){return ut({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 q7(e){return ut({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 W7(e){return ut({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 Y7(e){return ut({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 G7(e){return ut({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 X7(e){return ut({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 Em(e){return ut({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 VT(e){return ut({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 K7=({className:e,componentType:t,children:n})=>{const[r,i]=k.useState(!1),{globalClassName:s}=st(),u=f=>{i(f.open)},c=k.useCallback(()=>{i(!1)},[]),d=k.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(z7,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(zT,{"aria-label":`Overflow menu for ${t}`,className:D(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,e,`cim-${t}-component`),children:w.jsx(VT,{})}),w.jsx(Qx,{children:w.jsx(Kx,{className:D(`${N}-overflow-menu-list`,s,`cim-${t}-component`),children:w.jsx(xx.Provider,{value:d,children:n})})})]})};function qT(e){return ut({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 WT(e){return ut({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[Q7,Wo]=$o({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),bm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getControlProps(),e);return w.jsx(Nn.div,ce(M(M({},r),e),{ref:t}))});bm.displayName="CarouselControl";const wm=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["readOnly","index"]),i=Wo(),s=an(i.getIndicatorProps(n),r);return w.jsx(Nn.button,ce(M({},s),{ref:t}))});wm.displayName="CarouselIndicator";const xm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getIndicatorGroupProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});xm.displayName="CarouselIndicatorGroup";const Tm=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["index","snapAlign"]),i=Wo(),s=an(i.getItemProps(n),r);return w.jsx(Nn.div,ce(M({},s),{ref:t}))});Tm.displayName="CarouselItem";const _m=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getItemGroupProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});_m.displayName="CarouselItemGroup";const vm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getNextTriggerProps(),e);return w.jsx(Nn.button,ce(M({},r),{ref:t}))});vm.displayName="CarouselNextTrigger";const Sm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getPrevTriggerProps(),e);return w.jsx(Nn.button,ce(M({},r),{ref:t}))});Sm.displayName="CarouselPrevTrigger";function J7(e){const t=Vs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),i=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(E,b){let T=parseFloat(E);return/%/.test(E)&&(T/=100,T*=b),Number.isNaN(T)?0:T}let d=c(r,n.width),f=c(i,n.height),h=c(s,n.width),m=c(u,n.height);return{x:{before:d,after:h},y:{before:f,after:m}}}function Z7(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 YT(e){let t=[];for(const n of e.children)t=t.concat(n,YT(n));return t}function GT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},i=t?YT(e):e.children;for(const s of["x","y"]){const u=s==="x"?"y":"x",c=s==="x"?"left":"top",d=s==="x"?"width":"height",f=s==="x"?"scrollLeft":"scrollTop";for(const h of i){const m=h.getBoundingClientRect();if(!Z7(n,m,u))continue;const E=Vs(h);let[b,T]=E.getPropertyValue("scroll-snap-align").split(" ");typeof T=="undefined"&&(T=b);const _=s==="x"?T:b,I=m[c]-n[c]+e[f];switch(_){case"none":break;case"start":r[s].start.push({node:h,position:I});break;case"center":r[s].center.push({node:h,position:I+m[d]/2});break;case"end":r[s].end.push({node:h,position:I+m[d]});break}}}return r}function XT(e){const t=e.getBoundingClientRect(),n=J7(e),r=GT(e),i={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:KT([...r.x.start.map(s=>s.position-n.x.before),...r.x.center.map(s=>s.position-t.width/2),...r.x.end.map(s=>s.position-t.width+n.x.after)].map(QT(0,i.x))),y:KT([...r.y.start.map(s=>s.position-n.y.before),...r.y.center.map(s=>s.position-t.height/2),...r.y.end.map(s=>s.position-t.height+n.y.after)].map(QT(0,i.y)))}}function eF(e,t,n){const r=GT(e),i=[...r[t].start,...r[t].center,...r[t].end];for(const s of i)if(n(s.node))return s.position}var KT=e=>[...new Set(e)],QT=(e,t)=>n=>Math.max(e,Math.min(t,n)),tF=zo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),hi=tF.build(),nF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},rF=(e,t)=>{var n,r,i;return(i=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?i:`carousel:${e.id}:item:${t}`},ed=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},iF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},oF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},sF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},JT=(e,t)=>{var n,r,i;return(i=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?i:`carousel:${e.id}:indicator:${t}`},qn=e=>e.getById(ed(e)),ZT=e=>NM(qn(e),"[data-part=item]"),aF=(e,t)=>e.getById(JT(e,t)),e_=e=>{const t=qn(e);if(!t)return;const n=qs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function uF(e,t){const{state:n,context:r,computed:i,send:s,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),h=i("canScrollNext"),m=i("canScrollPrev"),E=i("isHorizontal"),b=Array.from(r.get("pageSnapPoints")),T=r.get("page"),_=c("slidesPerPage"),I=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:T,pageSnapPoints:b,canScrollNext:h,canScrollPrev:m,getProgress(){return T/b.length},scrollToIndex(S,R){s({type:"INDEX.SET",index:S,instant:R})},scrollTo(S,R){s({type:"PAGE.SET",index:S,instant:R})},scrollNext(S){s({type:"PAGE.NEXT",instant:S})},scrollPrev(S){s({type:"PAGE.PREV",instant:S})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(S){return Array.from(r.get("slidesInView")).includes(S)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ce(M({},hi.root.attrs),{id:nF(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":_,"--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(ce(M({},hi.itemGroup.attrs),{id:ed(u),"data-orientation":c("orientation"),"data-dragging":js(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(S){Hs(S.currentTarget,Ir(S))&&s({type:"VIEWPORT.FOCUS"})},onBlur(S){Hs(S.currentTarget,S.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(S){if(S.defaultPrevented||!c("allowMouseDrag")||!Mx(S))return;const R=Ir(S);Qr(R)&&R!==S.currentTarget||(S.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:N8(S=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";S[R]<0&&!i("canScrollPrev")||S[R]>0&&!i("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[E?"x":"y",c("snapType")].join(" "),gridAutoFlow:E?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[E?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[E?"scrollPaddingInline":"scrollPaddingBlock"]:I,[E?"paddingInline":"paddingBlock"]:I,[E?"overflowX":"overflowY"]:"auto"}}))},getItemProps(S){const R=r.get("slidesInView").includes(S.index);return t.element(ce(M({},hi.item.attrs),{id:rF(u,S.index),dir:c("dir"),role:"group","data-index":S.index,"data-inview":js(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(S.index,c("slideCount")),"aria-hidden":Ix(!R),style:{scrollSnapAlign:(()=>{var W;const U=(W=S.snapAlign)!=null?W:"start",B=c("slidesPerMove"),A=B==="auto"?Math.floor(c("slidesPerPage")):B;return(S.index+A)%A===0?U:void 0})()}}))},getControlProps(){return t.element(ce(M({},hi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ce(M({},hi.prevTrigger.attrs),{id:oF(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":ed(u),onClick(S){S.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ce(M({},hi.nextTrigger.attrs),{dir:c("dir"),id:iF(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":ed(u),disabled:!h,onClick(S){S.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ce(M({},hi.indicatorGroup.attrs),{dir:c("dir"),id:sF(u),"data-orientation":c("orientation"),onKeyDown(S){if(S.defaultPrevented)return;const R="indicator",U={ArrowDown(G){E||(s({type:"PAGE.NEXT",src:R}),G.preventDefault())},ArrowUp(G){E||(s({type:"PAGE.PREV",src:R}),G.preventDefault())},ArrowRight(G){E&&(s({type:"PAGE.NEXT",src:R}),G.preventDefault())},ArrowLeft(G){E&&(s({type:"PAGE.PREV",src:R}),G.preventDefault())},Home(G){s({type:"PAGE.SET",index:0,src:R}),G.preventDefault()},End(G){s({type:"PAGE.SET",index:b.length-1,src:R}),G.preventDefault()}},B=fM(S,{dir:c("dir"),orientation:c("orientation")}),A=U[B];A==null||A(S)}}))},getIndicatorProps(S){return t.button(ce(M({},hi.indicator.attrs),{dir:c("dir"),id:JT(u,S.index),type:"button","data-orientation":c("orientation"),"data-index":S.index,"data-readonly":js(S.readOnly),"data-current":js(S.index===T),"aria-label":v.indicator(S.index),onClick(R){R.defaultPrevented||S.readOnly||s({type:"PAGE.SET",index:S.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ce(M({},hi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":js(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(S){S.defaultPrevented||s({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var cF={props({props:e}){return D8(e,["slideCount"],"carousel"),ce(M({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:M({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const s=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:s[r]})}})),pageSnapPoints:t(()=>({defaultValue:lF(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 E8(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:i}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{i({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{i({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=qn(e);if(!n)return;const r=e.getWin(),i=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),e_(e)});return e_(e),i.observe(n,{childList:!0,subtree:!0}),()=>i.disconnect()},trackSlideResize({scope:e,send:t}){if(!qn(e))return;const r=e.getWin(),i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};sn(()=>{i(),sn(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const s=new r.ResizeObserver(i);return ZT(e).forEach(u=>s.observe(u)),()=>s.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=qn(e),i=e.getWin(),s=new i.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var E;const h=f.target,m=Number((E=h.dataset.index)!=null?E:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?p8(d,m):h8(d,m)},n.get("slidesInView"));n.set("slidesInView",m8(c))},{root:r,threshold:t("inViewThreshold")});return ZT(e).forEach(u=>s.observe(u)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=qn(n);return r?hn(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 hn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return AM(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 hn(r,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.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:i}){var f;const s=t.instant?"instant":"smooth",u=Cx((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=qn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";i(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){const r=qn(t);if(!r)return;const i=n("isHorizontal")?r.scrollLeft:r.scrollTop,s=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-i)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),i=Sx(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",i)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),i=g8(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",i)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const i=qn(r);if(!i)return;const s=eF(i,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(s==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-s)<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=Cx(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=qn(n);if(!r)return;const i=XT(r);e.set("pageSnapPoints",t("isHorizontal")?i.x:i.y)},disableScrollSnap({scope:e}){const t=qn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=qn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=qn(e);if(!r)return;const i=r.scrollLeft,s=r.scrollTop,u=XT(r),c=u.x.reduce((f,h)=>Math.abs(h-i)<Math.abs(f-i)?h:f,u.x[0]),d=u.y.reduce((f,h)=>Math.abs(h-s)<Math.abs(f-s)?h:f,u.y[0]);sn(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const h=r.dataset.scrollSnapType;h&&(r.style.setProperty("scroll-snap-type",h),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=aF(n,e.get("page"));r&&sn(()=>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 lF(e,t,n){if(e==null||n<=0)return[];const r=[],i=t==="auto"?Math.floor(n):t;if(i<=0)return[];for(let s=0;s<e&&!(s+n>e);s+=i)r.push(s);return r}Gs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Gs()(["index","readOnly"]),Gs()(["index","snapAlign"]);const dF=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,dir:r,getRootNode:n},e),s=jl(cF,i);return uF(s,Qh)},Am=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),i=dF(n),s=an(i.getRootProps(),r);return w.jsx(Q7,{value:i,children:w.jsx(Nn.div,ce(M({},s),{ref:t}))})});Am.displayName="CarouselRoot";const fF=180,pF=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},hF=({globalClassName:e,className:t,itemMinWidth:n=fF,spacing:r="0.5rem",loop:i=!1,allowMouseDrag:s=!0,showIndicators:u=!0,showNavigation:c=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:h="Product carousel",children:m})=>{const E=Array.from(m).map((H,ee)=>({node:H,key:k.isValidElement(H)&&H.key!=null?H.key:`carousel-item-${ee}`})),b=E.length,T=k.useRef(null),[_,I]=k.useState(0),{width:v}=Gk();k.useLayoutEffect(()=>{T.current&&I(T.current.getBoundingClientRect().width)},[v,b]);const S=pF(r),R=n+S,U=_>0?(_+S)/R:1,B=Math.max(1,Math.floor(U));if(b===0)return null;const A=b>B,G=Math.ceil(b/B),W=A?Math.max(1,U):B,re=d==="circle-arrow";return w.jsxs(Am,{ref:T,className:D(e,t,`${N}-carousel`,{[`${N}-carousel--circle-arrow-navigation`]:re}),slidesPerPage:W,slidesPerMove:B,spacing:r,loop:i,allowMouseDrag:s,slideCount:b,onPageChange:f,"aria-label":h,children:[w.jsx(_m,{className:D(e,`${N}-carousel__item-group`,{"carousel-row-container":!A}),children:E.map(({node:H,key:ee},Q)=>w.jsx(Tm,{index:Q,className:D(e,`${N}-carousel__item`),children:H},ee))}),c&&A&&w.jsxs(bm,{className:D(e,`${N}-carousel__control`),children:[w.jsx(Sm,{className:D(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:re?w.jsx(UE,{size:"16px"}):w.jsx(W7,{size:"16px"})}),w.jsx(vm,{className:D(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:re?w.jsx(jE,{size:"16px"}):w.jsx(Y7,{size:"16px"})})]}),u&&A&&w.jsx(xm,{className:D(e,`${N}-carousel__indicator-group`),children:Array.from({length:G},(H,ee)=>w.jsx(wm,{index:ee,className:D(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ee+1}`},ee))})]})},[mF,gF]=$o({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),yF=e=>Au()(e,["lazyMount","unmountOnExit"]),[EF,Pu]=$o({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),t_=k.forwardRef((e,t)=>{const n=Pu(),r=gF(),i=em(ce(M({},r),{present:n.open})),s=an(n.getBackdropProps(),i.getPresenceProps(),e);return i.unmounted?null:w.jsx(Nn.div,ce(M({},s),{ref:Hl(i.ref,t)}))});t_.displayName="DialogBackdrop";const km=k.forwardRef((e,t)=>{const n=Pu(),r=Su(),i=an(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:Hl(r.ref,t)}))});km.displayName="DialogContent";const Cm=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getDescriptionProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});Cm.displayName="DialogDescription";const Nm=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getPositionerProps(),e);return Su().unmounted?null:w.jsx(Nn.div,ce(M({},r),{ref:t}))});Nm.displayName="DialogPositioner";var bF=zo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Yo=bF.build(),n_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},r_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Im=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},i_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Om=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Pm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},td=e=>e.getById(Im(e)),wF=e=>e.getById(n_(e)),xF=e=>e.getById(r_(e)),TF=e=>e.getById(i_(e)),_F=e=>e.getById(Om(e)),vF=e=>e.getById(Pm(e)),SF=e=>e.getById(o_(e));function AF(e,t){const{state:n,send:r,context:i,prop:s,scope:u}=e,c=s("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ce(M({},Yo.trigger.attrs),{dir:s("dir"),id:i_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Im(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ce(M({},Yo.backdrop.attrs),{dir:s("dir"),hidden:!d,id:r_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(M({},Yo.positioner.attrs),{dir:s("dir"),id:n_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=i.get("rendered");return t.element(ce(M({},Yo.content.attrs),{dir:s("dir"),role:s("role"),hidden:!d,id:Im(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:Om(u),"aria-describedby":f.description?Pm(u):void 0}))},getTitleProps(){return t.element(ce(M({},Yo.title.attrs),{dir:s("dir"),id:Om(u)}))},getDescriptionProps(){return t.element(ce(M({},Yo.description.attrs),{dir:s("dir"),id:Pm(u)}))},getCloseTriggerProps(){return t.button(ce(M({},Yo.closeTrigger.attrs),{dir:s("dir"),id:o_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var kF={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>SF(t):void 0,i=typeof e.modal=="boolean"?e.modal:!0;return M({role:"dialog",modal:i,trapFocus:i,preventScroll:i,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 PT(()=>td(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[TF(e)],onInteractOutside(i){var s;(s=n("onInteractOutside"))==null||s(i),n("closeOnInteractOutside")||i.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(i){var s;(s=n("onEscapeKeyDown"))==null||s(i),n("closeOnEscape")||i.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return FT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?DT(()=>td(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var i,s;return(s=(i=t("finalFocusEl"))==null?void 0:i())!=null?s:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?_T(()=>[td(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){sn(()=>{e.set("rendered",{title:!!_F(t),description:!!vF(t)})})},syncZIndex({scope:e}){sn(()=>{const t=td(e);if(!t)return;const n=Vs(t);[wF(e),xF(e)].forEach(i=>{i==null||i.style.setProperty("--z-index",n.zIndex),i==null||i.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})}}}};Gs()(["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 CF=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,getRootNode:n,dir:r},e),s=jl(kF,i);return AF(s,Qh)},s_=e=>{const[t,c]=Jx(e),d=c,{children:n}=d,r=_n(d,["children"]),[i]=yF(t),s=CF(r),u=em(an({present:s.open},t));return w.jsx(EF,{value:s,children:w.jsx(mF,{value:i,children:w.jsx(Xx,{value:u,children:n})})})},a_=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getTitleProps(),e);return w.jsx(Nn.h2,ce(M({},r),{ref:t}))});a_.displayName="DialogTitle";const NF=({children:e})=>{const[t,n]=k.useState(!1),r=k.useMemo(()=>({toggleMenu:()=>n(s=>!s),closeMenu:()=>n(!1)}),[]),i=k.useMemo(()=>({isOpen:t}),[t]);return w.jsx(Fh.Provider,{value:r,children:w.jsx(wx.Provider,{value:i,children:e})})},u_=()=>k.useContext(wx),c_=()=>{const e=k.useContext(Fh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},IF=`${N}-overflow-menu-button-trigger`,OF=({componentType:e,children:t})=>{const{isOpen:n}=u_(),{closeMenu:r}=c_(),{globalClassName:i}=st(),s=k.useRef(null);return k.useEffect(()=>{if(!n)return;const u=d=>{d.key==="Escape"&&r()},c=d=>{const f=d.target;f instanceof Element&&f.closest(`.${IF}`)||s.current&&!s.current.contains(f)&&r()};return document.addEventListener("keydown",u),document.addEventListener("mousedown",c),()=>{document.removeEventListener("keydown",u),document.removeEventListener("mousedown",c)}},[n,r]),n?w.jsx("div",{ref:s,className:D(`${N}-overflow-panel`,i,`cim-${e}-component`),children:t}):null},PF=({componentType:e,className:t})=>{const{toggleMenu:n}=c_(),{isOpen:r}=u_(),{globalClassName:i}=st();return w.jsx("button",{"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:D(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,i,t,`cim-${e}-component`),onClick:n,children:w.jsx(VT,{})})};class RF{constructor(){We(this,"initialState",R1);We(this,"promptsStateProxy");We(this,"promptsParamsProxy");We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return MF(n,r),Reflect.set(t,n,r)});We(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));We(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));We(this,"updatePromptsParamsProxy",t=>new Proxy(M({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Vi=new RF,LF=e=>{window.addEventListener(Mf,e)},DF=e=>{window.removeEventListener(Mf,e)},MF=(e,t)=>{const n=new CustomEvent(Mf,{detail:{property:e,value:t}});window.dispatchEvent(n)},l_=e=>{const t=Vi.isOpen,n=typeof e=="boolean"?e:!t;Vi.promptsStateProxy.isOpen=n},FF=e=>{const t=Vi.isInline,n=typeof e=="boolean"?e:!t;Vi.promptsStateProxy.isInline=n},BF=({elementId:e,entryType:t,params:n,isInline:r})=>{Vi.promptsStateProxy.elementId=e,t&&(Vi.promptsStateProxy.entryType=t),typeof r=="boolean"&&FF(r),n&&Vi.updatePromptsParamsProxy(n),Vi.isOpen||l_(!0)},UF=()=>{u1("resetConversation",!0,Ic.RESET_CONVERSATION)},jF=()=>{u1("endConversation",!0,Ic.END_CONVERSATION)},Rm=()=>{const e=k.useContext(TE);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},HF=()=>{const e=k.useContext(xE);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},nd=()=>{const e=k.useContext(wE);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},$F=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{previousComponentType:r}=tr(),i=Uo(),s=()=>{Es(r||"dialog"),i()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:s,icon:w.jsx(qT,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(qT,{}),"Show ",r||"dialog"]})},zF=({componentType:e,globalClassName:t,controls:n,showClose:r,closeButtonAriaLabel:i,onClose:s,showOverflowMenu:u,showPrimaryToggle:c})=>{const d=e==="modal"?$F:p_;return w.jsx("div",{className:D(t,`${N}-${e}-controls`),children:n!=null?w.jsxs(w.Fragment,{children:[n,r&&w.jsx(Hp,{className:D(t,`cim-${e}-component`),label:i,onClick:s})]}):w.jsxs(w.Fragment,{children:[u&&w.jsx(PF,{componentType:e}),c&&w.jsx(d,{componentType:e,isIcon:!0}),r&&w.jsx(Hp,{className:D(t,`cim-${e}-component`),label:i,onClick:s})]})})},VF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{isModalFullscreen:r}=tr(),i=Uo(),s=()=>{Rc(!r),i()},u=r?TO:_O,c="Toggle Fullscreen";return t?w.jsx(kr,{ariaLabel:c,title:c,className:D(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:s}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(u,{}),c]})},qF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{dialogPosition:r}=tr(),i=Uo(),s=r==="bottom-left",u=()=>{Lc(s?"bottom-right":"bottom-left"),i()},c=s?q7:V7,d=s?"Move right":"Move left";return t?w.jsx(kr,{className:D(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},WF=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:i,showClearChat:s,showEndConversation:u,showDownloadTranscript:c,onClearChat:d,onEndConversation:f,onDownloadTranscript:h})=>{if(t!=null||!n)return null;const m=e==="modal"?VF:qF;return w.jsxs(OF,{componentType:e,children:[r&&w.jsx(m,{componentType:e}),i&&w.jsx(ZF,{componentType:e}),s&&w.jsx(Tx,{componentType:e,onClearChat:d}),u&&f&&w.jsx(vx,{componentType:e,onEndConversation:f}),c&&h&&w.jsx(_x,{componentType:e,onDownloadTranscript:h})]})},YF=({componentType:e,overflowActions:t,availableActions:n,controls:r,onClearChat:i,onEndConversation:s,onClose:u,onDownloadTranscript:c})=>{const{headerConfig:d,globalClassName:f,layoutPreset:h}=st(),{mode:m}=tr(),E=m==="standalone",b=e==="modal",T=re=>n===void 0||n[re],_=(re,H=!0)=>t.includes(re)&&T(re)&&H,I=T("toggleExpanded"),v=_(b?"toggleFullscreen":"toggleDialogPosition"),S=_("minimize"),R=_("clearChat"),U=T("close"),B=_("endConversation",!!s),A=_("downloadTranscript",!!c),G=v||S||R||B||A,W=k.useMemo(()=>d?PO(d):{},[d]);return w.jsx(NF,{children:w.jsxs("div",{className:D(f,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:D(f,`${N}-${e}-header`,{standalone:E,embedded:!E}),style:W,children:[d!=null&&d.logoUrl?w.jsx("img",{alt:"",className:D(f,`${N}-${e}-logo`,{standalone:E,embedded:!E}),src:d.logoUrl}):h==="commerce"?w.jsx("svg",{className:D(f,`${N}-${e}-logo`,{standalone:E,embedded:!E}),viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:w.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,w.jsx(a_,{className:D(f,`${N}-${e}-title`,{standalone:E,embedded:!E}),children:d==null?void 0:d.headerText}),w.jsx(zF,{componentType:e,globalClassName:f,controls:r,showClose:U,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,onClose:u,showOverflowMenu:G,showPrimaryToggle:I})]}),w.jsx(WF,{componentType:e,controls:r,showOverflowMenu:G,showSecondaryToggle:v,showMinimize:S,showClearChat:R,showEndConversation:B,showDownloadTranscript:A,onClearChat:i,onEndConversation:s,onDownloadTranscript:c})]})})},ra="USD",Lm=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),mi=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},GF=({retailPrice:e,discountPrice:t,currencyCode:n=ra})=>{const r=n||ra,i=typeof t=="number"&&typeof e=="number"&&t<e,s=i?t:e||t||null,u=i?e:null;return{price:mi(s,r),comparePrice:mi(u,r),hasDiscount:i}},rd=e=>typeof e=="number"&&Number.isFinite(e),Dm=e=>rd(e==null?void 0:e.min)&&rd(e==null?void 0:e.max),d_=e=>{const t=e==null?void 0:e.type;return typeof t=="string"&&t.length>0?t:void 0},XF=({min:e,max:t,currencyCode:n=ra})=>{if(!rd(e)||!rd(t))return null;const r=n||ra,i=mi(e,r),s=mi(t,r);if(i===null||s===null)return null;const u=e!==t;return{value:u?`${i} – ${s}`:i,low:i,high:s,isRange:u}},KF=({priceBreakdown:e,currencyCode:t=ra})=>{if(!e)return null;const n=t||ra,r=Dm(e.promotional)?e.promotional:null,i=Dm(e.sales)?e.sales:null,s=Dm(e.original)?e.original:null;if(!r&&!i&&!s)return null;const u=E=>XF({min:E.min,max:E.max,currencyCode:n}),c=(E,b)=>b&&b.value!==E.value?b:null;if(r){const E=u(r);return E?{active:E,compare:c(E,i?u(i):null)}:null}const d=d_(e.sales),f=d_(e.original);if(i&&s&&d&&f&&d!==f){const E=u(i);return E?{active:E,compare:c(E,u(s))}:null}const h=i!=null?i:s;if(!h)return null;const m=u(h);return m?{active:m,compare:null}:null},Mm=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:i,className:s})=>{const{price:u,comparePrice:c,hasDiscount:d}=GF({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:D(i,s,`${N}-price`),style:f,children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:D(i,`${N}-price__amount`),children:u}),d&&c&&w.jsxs("span",{className:D(i,`${N}-price__compare`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Original price: "}),c]})]})},QF={sparkle:Em,plus:G7,"paper-plane":X7},f_=({icon:e,className:t})=>{const n=QF[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},JF=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:i,onSuggestionClick:s})=>{var b;const{suggestionButtonConfig:u}=st(),c=u==null?void 0:u.icon,d=(b=u==null?void 0:u.iconPosition)!=null?b:"left",f=i?"standalone":"embedded",h=T=>()=>{s(T)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},E=T=>w.jsxs(w.Fragment,{children:[c&&w.jsx(f_,{icon:c,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:T})]});return w.jsx("div",{className:D(t,`${N}-suggestion-container ${f}`,e),children:n.map(T=>i?w.jsx($p,{disabled:r,className:D(t,`${N}-suggestion-button standalone`,m),onClick:h(T),children:E(T)},T):w.jsx("button",{disabled:r,className:D(t,`${N}-suggestion-button embedded`,m),onClick:h(T),children:E(T)},T))})},ZF=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=st();if(!r)return null;const i=()=>{zr(!1),wo(!0),ol()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:i,icon:w.jsx(DE,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:i,children:[w.jsx(DE,{}),"Minimize"]})},p_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),r=Uo(),i=()=>{Es("modal"),r()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:i,icon:w.jsx(WT,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:i,children:[w.jsx(WT,{}),"Show modal"]})};function eB(e){return e.includes("-")&&e===e.toLowerCase()}function ri({tagName:e,props:t,label:n,onError:r}){const i=k.useRef(null),s=k.useRef(null),u=k.useRef(e),c=k.useRef(null),d=k.useRef(null),f=k.useRef(r);return f.current=r,k.useEffect(()=>{const h=i.current;if(!h)return;const m=()=>{var b;d.current!==e&&(d.current=e,(b=f.current)==null||b.call(f))};if(u.current!==e&&(u.current=e,s.current=null,d.current=null),!eB(e)){c.current!==e&&(c.current=e,kt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`),m()),s.current=null,h.replaceChildren();return}const E=s.current;if(E&&E.isConnected)try{E.props=t;return}catch(b){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,b),m(),s.current=null,h.replaceChildren();return}try{const b=document.createElement(e);b.props=t,h.replaceChildren(b);const T=b.localName;s.current=typeof customElements!="undefined"&&customElements.get(T)?b:null}catch(b){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,b),m(),s.current=null,h.replaceChildren()}},[e,t,n]),k.useEffect(()=>{const h=i.current;return()=>{s.current=null,h==null||h.replaceChildren()}},[]),w.jsx("div",{ref:i,"data-override":n||"custom"})}class id extends k.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){var r,i,s;kt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack),(r=this.context)==null||r.failure("override_render_error",{context:{override:this.props.overrideName}}),(s=(i=this.props).onError)==null||s.call(i)}render(){return this.state.hasError?null:this.props.children}}We(id,"contextType",Mc);const Rr=()=>k.useContext(T1),h_=e=>{try{e()}catch(t){}},m_=()=>{const e=k.useContext(Mc);return k.useMemo(()=>({reportFailure:(t,...[n,r])=>h_(()=>e==null?void 0:e.overrideFailure(t,n,r)),reportEvent:(t,...[n,r])=>h_(()=>e==null?void 0:e.overrideEvent(t,n,r))}),[e])},g_=e=>{const t=m_();return k.useMemo(()=>({reportFailure:(n,r)=>t.reportFailure(e,n,r),reportEvent:(n,r)=>t.reportEvent(e,n,r)}),[t,e])},gi=e=>{const{sendMessage:t,loading:n,isConnected:r}=zt(),{mode:i,status:s}=tr(),{reportFailure:u,reportEvent:c}=g_(e);return k.useMemo(()=>({sendMessage:t,isLoading:n,isConnected:r,componentType:s.type,mode:i,reportFailure:u,reportEvent:c}),[t,n,r,s.type,i,u,c])},tB=({componentType:e,availableActions:t,onClose:n,onClearChat:r,onEndConversation:i,onDownloadTranscript:s})=>{const{isModalFullscreen:u,dialogPosition:c,previousComponentType:d}=tr(),{logger:f}=st(),[h,m]=k.useState(!1),E=k.useRef(t);E.current=t;const b=k.useRef(e);b.current=e;const T=k.useRef(n);T.current=n;const _=k.useRef(r);_.current=r;const I=k.useRef(i);I.current=i;const v=k.useRef(s);v.current=s;const S=k.useRef(u);S.current=u;const R=k.useRef(c);R.current=c;const U=k.useRef(d);U.current=d;const B=k.useRef(f);B.current=f;const A=k.useRef(null),G=k.useMemo(()=>{const re=H=>E.current[H];return{close:()=>{var H;re("close")&&((H=T.current)==null||H.call(T))},toggleExpanded:()=>{if(re("toggleExpanded")){if(b.current==="modal"){Es(U.current||"dialog");return}Es("modal")}},toggleFullscreen:H=>{re("toggleFullscreen")&&Rc(typeof H=="boolean"?H:!S.current)},toggleDialogPosition:H=>{if(!re("toggleDialogPosition"))return;let ee;switch(H){case"left":case"bottom-left":ee="bottom-left";break;case"right":case"bottom-right":ee="bottom-right";break;default:ee=R.current==="bottom-left"?"bottom-right":"bottom-left";break}Lc(ee)},minimize:()=>{re("minimize")&&(zr(!1),wo(!0),ol())},clearChat:()=>Ie(null,null,function*(){var H;re("clearChat")&&(yield(H=_.current)==null?void 0:H.call(_))}),endConversation:()=>Ie(null,null,function*(){var H;re("endConversation")&&(yield(H=I.current)==null?void 0:H.call(I))}),downloadTranscript:()=>{if(!re("downloadTranscript"))return Promise.resolve();const H=A.current;if(H)return H;let ee=()=>{};const Q=new Promise(me=>{ee=me});return A.current=Q,Ie(null,null,function*(){var me,V;m(!0);try{yield(me=v.current)==null?void 0:me.call(v)}catch(ue){(V=B.current)==null||V.error("Error downloading transcript:",ue)}finally{m(!1),A.current===Q&&(A.current=null),ee()}}),Q}}},[]),W=k.useMemo(()=>({available:t,isDownloadingTranscript:h,isFullscreen:u,dialogPosition:c}),[t,h,u,c]);return{actions:G,state:W}},y_=()=>{const{overrides:e,isInitialized:t}=Rr(),[n,r]=k.useState(null),i=e.HeaderActions,s=t&&typeof i=="string"&&i.length>0&&i!==n,u=k.useCallback(()=>{typeof i=="string"&&i.length>0&&r(i)},[i]);return{active:s,onError:u}},E_=n=>{var r=n,{onError:e}=r,t=_n(r,["onError"]);const{overrides:i,isInitialized:s}=Rr(),u=i.HeaderActions,{actions:c,state:d}=tB(t),f=gi("HeaderActions"),h=k.useMemo(()=>({name:"HeaderActions",payload:{actions:d},api:ce(M({},f),{actions:c})}),[d,f,c]);return!s||typeof u!="string"||u.length===0?null:w.jsx(id,{overrideName:"HeaderActions",onError:e,children:w.jsx(ri,{tagName:u,props:h,label:"HeaderActions",onError:e})})};function Go(){const{sendMessage:e}=zt(),{productId:t}=Rm(),{enablePageContext:n}=st();return k.useCallback((r,i)=>{var f,h,m;if(n)return e(r,i);const u=((h=(f=r.match(/\[SKU:\s*([^\]]+)\]/i))==null?void 0:f[1])==null?void 0:h.trim())||t,{prompt:c,display:d}=_p(r,u);return e(c,ce(M({},i),{displayContent:(m=i==null?void 0:i.displayContent)!=null?m:d}))},[e,t,n])}function Fm(){const{sendFile:e}=zt(),{productId:t}=Rm();return k.useCallback(n=>{if(!n.file||!t)return e(n);const{prompt:r}=_p(n.text,t);return e(ce(M({},n),{text:r,displayContent:n.text}))},[e,t])}const nB=["Hey there! 👋 Getting things ready for you…","Connecting you to our shopping assistant…","Just a moment…"],rB=3e3,iB=400,Bm=({className:e})=>{const t=k.useId();return w.jsxs("svg",{className:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[w.jsx("defs",{children:w.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"1",children:[w.jsx("stop",{offset:"0",stopColor:"#4f7fce"}),w.jsx("stop",{offset:"1",stopColor:"#c85d94"})]})}),w.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",fill:`url(#${t})`,stroke:`url(#${t})`,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},oB=e=>e===null?[]:Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim()!==""):nB,sB=({globalClassName:e,isWidgetStandalone:t,messages:n,variant:r="default"})=>{const[i,s]=k.useState(0),[u,c]=k.useState(!0),d=k.useMemo(()=>oB(n),[n]),f=d.length,h=n!==null;return k.useEffect(()=>{if(f<2||!h)return;let m;const E=setInterval(()=>{c(!1),m=setTimeout(()=>{s(b=>(b+1)%f),c(!0)},iB)},rB);return()=>{clearInterval(E),clearTimeout(m),c(!0)}},[f,h]),h?r==="sparkles"?w.jsxs("div",{className:D(e,`${N}-connecting-indicator`,`${N}-connecting-indicator--sparkles`,t?"standalone":"embedded"),role:"status","aria-label":"Loading shopping assistant",children:[w.jsxs("div",{className:`${N}-connecting-sparkles`,"aria-hidden":"true",children:[w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-left`}),w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-main`}),w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-right`})]}),w.jsx("span",{className:`${N}-connecting-heading`,"aria-hidden":"true",children:"Loading your shopping assistant"}),f>0&&w.jsx("span",{className:D(`${N}-connecting-text`,`${N}-connecting-text--feature`,u&&`${N}-connecting-text--visible`),"aria-hidden":"true",children:d[i%f]})]}):w.jsxs("div",{className:D(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,"aria-hidden":"true",children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),f>0&&w.jsx("span",{className:D(`${N}-connecting-text`,u&&`${N}-connecting-text--visible`),"aria-hidden":"true",children:d[i%f]})]}):null},aB=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,"aria-hidden":"true",children:t}):null,uB=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"})]}):null,Um=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:D(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(aB,{shouldShow:!!n,loadingText:n}),w.jsx(uB,{shouldShow:!n})]}),cB="(max-width: 576px)";function lB(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function dB({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||lB(e)&&typeof window!="undefined"&&window.matchMedia(cB).matches&&(wo(!0),ek())}function fB(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function pB(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function qi({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!fB(e)||e.defaultPrevented)return;const i=t||e.currentTarget.href;!i||!pB(i)||r(i,e)}function Ru(n){var r=n,{isCartMgmtSupported:e}=r,t=_n(r,["isCartMgmtSupported"]);dB({event:t.event.nativeEvent,openLinksInNewTab:t.openLinksInNewTab,isCartMgmtSupported:e}),qi(t)}function b_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function hB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function mB(e,t,n){const i=El((n||{}).ignore||[]),s=gB(t);let u=-1;for(;++u<s.length;)Zb(e,"text",c);function c(f,h){let m=-1,E;for(;++m<h.length;){const b=h[m],T=E?E.children:void 0;if(i(b,T?T.indexOf(b):void 0,E))return;E=b}if(E)return d(f,h)}function d(f,h){const m=h[h.length-1],E=s[u][0],b=s[u][1];let T=0;const I=m.children.indexOf(f);let v=!1,S=[];E.lastIndex=0;let R=E.exec(f.value);for(;R;){const U=R.index,B={index:R.index,input:R.input,stack:[...h,f]};let A=b(...R,B);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?E.lastIndex=U+1:(T!==U&&S.push({type:"text",value:f.value.slice(T,U)}),Array.isArray(A)?S.push(...A):A&&S.push(A),T=U+R[0].length,v=!0),!E.global)break;R=E.exec(f.value)}return v?(T<f.value.length&&S.push({type:"text",value:f.value.slice(T)}),m.children.splice(I,1,...S)):S=[f],I+S.length}}function gB(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 i=n[r];t.push([yB(i[0]),EB(i[1])])}return t}function yB(e){return typeof e=="string"?new RegExp(hB(e),"g"):e}function EB(e){return typeof e=="function"?e:function(){return e}}const jm="phrasing",Hm=["autolink","link","image","label"];function bB(){return{transforms:[AB],enter:{literalAutolink:xB,literalAutolinkEmail:$m,literalAutolinkHttp:$m,literalAutolinkWww:$m},exit:{literalAutolink:SB,literalAutolinkEmail:vB,literalAutolinkHttp:TB,literalAutolinkWww:_B}}}function wB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jm,notInConstruct:Hm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jm,notInConstruct:Hm},{character:":",before:"[ps]",after:"\\/",inConstruct:jm,notInConstruct:Hm}]}}function xB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $m(e){this.config.enter.autolinkProtocol.call(this,e)}function TB(e){this.config.exit.autolinkProtocol.call(this,e)}function _B(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 vB(e){this.config.exit.autolinkEmail.call(this,e)}function SB(e){this.exit(e)}function AB(e){mB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,kB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),CB]],{ignore:["link","linkReference"]})}function kB(e,t,n,r,i){let s="";if(!w_(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!NB(n)))return!1;const u=IB(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:s+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function CB(e,t,n,r){return!w_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function NB(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 IB(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 i=b_(e,"(");let s=b_(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function w_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Po(n)||dl(n))&&(!t||n!==47)}x_.peek=UB;function OB(){this.buffer()}function PB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function RB(){this.buffer()}function LB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function DB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function MB(e){this.exit(e)}function FB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function BB(e){this.exit(e)}function UB(){return"["}function x_(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),c(),u(),s+=i.move("]"),s}function jB(){return{enter:{gfmFootnoteCallString:OB,gfmFootnoteCall:PB,gfmFootnoteDefinitionLabelString:RB,gfmFootnoteDefinition:LB},exit:{gfmFootnoteCallString:DB,gfmFootnoteCall:MB,gfmFootnoteDefinitionLabelString:FB,gfmFootnoteDefinition:BB}}}function HB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:x_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,u){const c=s.createTracker(u);let d=c.move("[^");const f=s.enter("footnoteDefinition"),h=s.enter("label");return d+=c.move(s.safe(s.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
38
- `:" ")+s.indentLines(s.containerFlow(r,c.current()),t?T_:$B))),f(),d}}function $B(e,t,n){return t===0?e:T_(e,t,n)}function T_(e,t,n){return(n?"":" ")+e}const zB=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];__.peek=GB;function VB(){return{canContainEols:["delete"],enter:{strikethrough:WB},exit:{strikethrough:YB}}}function qB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:zB}],handlers:{delete:__}}}function WB(e){this.enter({type:"delete",children:[]},e)}function YB(e){this.exit(e)}function __(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let u=i.move("~~");return u+=n.containerPhrasing(e,ce(M({},i.current()),{before:u,after:"~"})),u+=i.move("~~"),s(),u}function GB(){return"~"}function XB(e){return e.length}function KB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||XB,s=[],u=[],c=[],d=[];let f=0,h=-1;for(;++h<e.length;){const _=[],I=[];let v=-1;for(e[h].length>f&&(f=e[h].length);++v<e[h].length;){const S=QB(e[h][v]);if(n.alignDelimiters!==!1){const R=i(S);I[v]=R,(d[v]===void 0||R>d[v])&&(d[v]=R)}_.push(S)}u[h]=_,c[h]=I}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)s[m]=v_(r[m]);else{const _=v_(r);for(;++m<f;)s[m]=_}m=-1;const E=[],b=[];for(;++m<f;){const _=s[m];let I="",v="";_===99?(I=":",v=":"):_===108?I=":":_===114&&(v=":");let S=n.alignDelimiters===!1?1:Math.max(1,d[m]-I.length-v.length);const R=I+"-".repeat(S)+v;n.alignDelimiters!==!1&&(S=I.length+S+v.length,S>d[m]&&(d[m]=S),b[m]=S),E[m]=R}u.splice(1,0,E),c.splice(1,0,b),h=-1;const T=[];for(;++h<u.length;){const _=u[h],I=c[h];m=-1;const v=[];for(;++m<f;){const S=_[m]||"";let R="",U="";if(n.alignDelimiters!==!1){const B=d[m]-(I[m]||0),A=s[m];A===114?R=" ".repeat(B):A===99?B%2?(R=" ".repeat(B/2+.5),U=" ".repeat(B/2-.5)):(R=" ".repeat(B/2),U=R):U=" ".repeat(B)}n.delimiterStart!==!1&&!m&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||m)&&v.push(" "),n.alignDelimiters!==!1&&v.push(R),v.push(S),n.alignDelimiters!==!1&&v.push(U),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&v.push("|")}T.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return T.join(`
39
- `)}function QB(e){return e==null?"":String(e)}function v_(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 JB(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const u=n.indentLines(n.containerFlow(e,s.current()),ZB);return i(),u}function ZB(e,t,n){return">"+(n?"":" ")+e}function eU(e,t){return S_(e,t.inConstruct,!0)&&!S_(e,t.notInConstruct,!1)}function S_(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 A_(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
40
- `&&eU(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
- `}function tU(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>u&&(u=s):s=1,i=r+t.length,r=n.indexOf(t,i);return u}function nU(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 rU(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 iU(e,t,n,r){const i=rU(n),s=e.value||"",u=i==="`"?"GraveAccent":"Tilde";if(nU(e,n)){const m=n.enter("codeIndented"),E=n.indentLines(s,oU);return m(),E}const c=n.createTracker(r),d=i.repeat(Math.max(tU(s,i)+1,3)),f=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);h+=c.move(n.safe(e.lang,M({before:h,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,M({before:h,after:`
37
+ `,t);return r===-1?n:n===-1||n+1===r?r:n<r?n:r}const Do={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/"},gw={}.hasOwnProperty,X6=Object.prototype;function K6(e,t){const n=t||{};return vh({file:n.file||void 0,location:!1,schema:n.space==="svg"?Li:eu,verbose:n.verbose||!1},e)}function vh(e,t){let n;switch(t.nodeName){case"#comment":{const r=t;return n={type:"comment",value:r.data},Tl(e,r,n),n}case"#document":case"#document-fragment":{const r=t,i="mode"in r?r.mode==="quirks"||r.mode==="limited-quirks":!1;if(n={type:"root",children:yw(e,t.childNodes),data:{quirksMode:i}},e.file&&e.location){const s=String(e.file),u=G6(s),c=u.toPoint(0),d=u.toPoint(s.length);n.position={start:c,end:d}}return n}case"#documentType":{const r=t;return n={type:"doctype"},Tl(e,r,n),n}case"#text":{const r=t;return n={type:"text",value:r.value},Tl(e,r,n),n}default:return n=Q6(e,t),n}}function yw(e,t){let n=-1;const r=[];for(;++n<t.length;){const i=vh(e,t[n]);r.push(i)}return r}function Q6(e,t){const n=e.schema;e.schema=t.namespaceURI===Do.svg?Li:eu;let r=-1;const i={};for(;++r<t.attrs.length;){const c=t.attrs[r],d=(c.prefix?c.prefix+":":"")+c.name;gw.call(X6,d)||(i[d]=c.value)}const u=(e.schema.space==="svg"?Y6:W6)(t.tagName,i,yw(e,t.childNodes));if(Tl(e,t,u),u.tagName==="template"){const c=t,d=c.sourceCodeLocation,f=d&&d.startTag&&Ls(d.startTag),h=d&&d.endTag&&Ls(d.endTag),m=vh(e,c.content);f&&h&&e.file&&(m.position={start:f.end,end:h.start}),u.content=m}return e.schema=n,u}function Tl(e,t,n){if("sourceCodeLocation"in t&&t.sourceCodeLocation&&e.file){const r=J6(e,n,t.sourceCodeLocation);r&&(e.location=!0,n.position=r)}}function J6(e,t,n){const r=Ls(n);if(t.type==="element"){const i=t.children[t.children.length-1];if(r&&!n.endTag&&i&&i.position&&i.position.end&&(r.end=Object.assign({},i.position.end)),e.verbose){const s={};let u;if(n.attrs)for(u in n.attrs)gw.call(n.attrs,u)&&(s[ul(e.schema,u).property]=Ls(n.attrs[u]));n.startTag;const c=Ls(n.startTag),d=n.endTag?Ls(n.endTag):void 0,f={opening:c};d&&(f.closing=d),f.properties=s,t.data={position:f}}}return r}function Ls(e){const t=Ew({line:e.startLine,column:e.startCol,offset:e.startOffset}),n=Ew({line:e.endLine,column:e.endCol,offset:e.endOffset});return t||n?{start:t,end:n}:void 0}function Ew(e){return e.line&&e.column?e:void 0}const bw={}.hasOwnProperty;function ww(e,t){const n=t||{};function r(i,...s){let u=r.invalid;const c=r.handlers;if(i&&bw.call(i,e)){const d=String(i[e]);u=bw.call(c,d)?c[d]:r.unknown}if(u)return u.call(this,i,...s)}return r.handlers=n.handlers||{},r.invalid=n.invalid,r.unknown=n.unknown,r}const Z6={},e5={}.hasOwnProperty,xw=ww("type",{handlers:{root:n5,element:a5,text:o5,comment:s5,doctype:i5}});function t5(e,t){const r=(t||Z6).space;return xw(e,r==="svg"?Li:eu)}function n5(e,t){const n={nodeName:"#document",mode:(e.data||{}).quirksMode?"quirks":"no-quirks",childNodes:[]};return n.childNodes=Sh(e.children,n,t),Ds(e,n),n}function r5(e,t){const n={nodeName:"#document-fragment",childNodes:[]};return n.childNodes=Sh(e.children,n,t),Ds(e,n),n}function i5(e){const t={nodeName:"#documentType",name:"html",publicId:"",systemId:"",parentNode:null};return Ds(e,t),t}function o5(e){const t={nodeName:"#text",value:e.value,parentNode:null};return Ds(e,t),t}function s5(e){const t={nodeName:"#comment",data:e.value,parentNode:null};return Ds(e,t),t}function a5(e,t){const n=t;let r=n;e.type==="element"&&e.tagName.toLowerCase()==="svg"&&n.space==="html"&&(r=Li);const i=[];let s;if(e.properties){for(s in e.properties)if(s!=="children"&&e5.call(e.properties,s)){const d=u5(r,s,e.properties[s]);d&&i.push(d)}}const u=r.space,c={nodeName:e.tagName,tagName:e.tagName,attrs:i,namespaceURI:Do[u],childNodes:[],parentNode:null};return c.childNodes=Sh(e.children,c,r),Ds(e,c),e.tagName==="template"&&e.content&&(c.content=r5(e.content,r)),c}function u5(e,t,n){const r=ul(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?zE(n):nb(n));const i={name:r.attribute,value:n===!0?"":String(n)};if(r.space&&r.space!=="html"&&r.space!=="svg"){const s=i.name.indexOf(":");s<0?i.prefix="":(i.name=i.name.slice(s+1),i.prefix=r.attribute.slice(0,s)),i.namespace=Do[r.space]}return i}function Sh(e,t,n){let r=-1;const i=[];if(e)for(;++r<e.length;){const s=xw(e[r],n);s.parentNode=t,i.push(s)}return i}function Ds(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 c5=["area","base","basefont","bgsound","br","col","command","embed","frame","hr","image","img","input","keygen","link","meta","param","source","track","wbr"],l5=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]),Bt="�";var L;(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"})(L||(L={}));const Vn={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"};function Tw(e){return e>=55296&&e<=57343}function d5(e){return e>=56320&&e<=57343}function f5(e,t){return(e-55296)*1024+9216+t}function _w(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function vw(e){return e>=64976&&e<=65007||l5.has(e)}var le;(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"})(le||(le={}));const p5=65536;class h5{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=p5,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:i,offset:s}=this,u=i+n,c=s+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(d5(n))return this.pos++,this._addGap(),f5(t,n)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,L.EOF;return this._err(le.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,L.EOF;const r=this.html.charCodeAt(n);return r===L.CARRIAGE_RETURN?L.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,L.EOF;let t=this.html.charCodeAt(this.pos);return t===L.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,L.LINE_FEED):t===L.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Tw(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===L.LINE_FEED||t===L.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){_w(t)?this._err(le.controlCharacterInInputStream):vw(t)&&this._err(le.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos<this.lastGapPos;)this.lastGapPos=this.gapStack.pop(),this.pos--;this.isEol=!1}}var pt;(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"})(pt||(pt={}));function Sw(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 m5=new Uint16Array('ᵁ<Õıʊҝջאٵ۞ޢߖࠏ੊ઑඡ๭༉༦჊ረዡᐕᒝᓃᓟᔥ\0\0\0\0\0\0ᕫᛍᦍᰒᷝ὾⁠↰⊍⏀⏻⑂⠤⤒ⴈ⹈⿎〖㊺㘹㞬㣾㨨㩱㫠㬮ࠀEMabcfglmnoprstu\\bfms„‹•˜¦³¹ÈÏlig耻Æ䃆P耻&䀦cute耻Á䃁reve;䄂Āiyx}rc耻Â䃂;䐐r;쀀𝔄rave耻À䃀pha;䎑acr;䄀d;橓Āgp¡on;䄄f;쀀𝔸plyFunction;恡ing耻Å䃅Ācs¾Ãr;쀀𝒜ign;扔ilde耻Ã䃃ml耻Ä䃄ЀaceforsuåûþėĜĢħĪĀcrêòkslash;或Ŷöø;櫧ed;挆y;䐑ƀcrtąċĔause;戵noullis;愬a;䎒r;쀀𝔅pf;쀀𝔹eve;䋘còēmpeq;扎܀HOacdefhilorsuōőŖƀƞƢƵƷƺǜȕɳɸɾcy;䐧PY耻©䂩ƀcpyŝŢźute;䄆Ā;iŧŨ拒talDifferentialD;慅leys;愭ȀaeioƉƎƔƘron;䄌dil耻Ç䃇rc;䄈nint;戰ot;䄊ĀdnƧƭilla;䂸terDot;䂷òſi;䎧rcleȀDMPTLJNjǑǖot;抙inus;抖lus;投imes;抗oĀcsǢǸkwiseContourIntegral;戲eCurlyĀDQȃȏoubleQuote;思uote;怙ȀlnpuȞȨɇɕonĀ;eȥȦ户;橴ƀgitȯȶȺruent;扡nt;戯ourIntegral;戮ĀfrɌɎ;愂oduct;成nterClockwiseContourIntegral;戳oss;樯cr;쀀𝒞pĀ;Cʄʅ拓ap;才րDJSZacefiosʠʬʰʴʸˋ˗ˡ˦̳ҍĀ;oŹʥtrahd;椑cy;䐂cy;䐅cy;䐏ƀgrsʿ˄ˇger;怡r;憡hv;櫤Āayː˕ron;䄎;䐔lĀ;t˝˞戇a;䎔r;쀀𝔇Āaf˫̧Ācm˰̢riticalȀADGT̖̜̀̆cute;䂴oŴ̋̍;䋙bleAcute;䋝rave;䁠ilde;䋜ond;拄ferentialD;慆Ѱ̽\0\0\0͔͂\0Ѕf;쀀𝔻ƀ;DE͈͉͍䂨ot;惜qual;扐blèCDLRUVͣͲ΂ϏϢϸontourIntegraìȹoɴ͹\0\0ͻ»͉nArrow;懓Āeo·ΤftƀARTΐΖΡrrow;懐ightArrow;懔eåˊngĀLRΫτeftĀARγιrrow;柸ightArrow;柺ightArrow;柹ightĀATϘϞrrow;懒ee;抨pɁϩ\0\0ϯrrow;懑ownArrow;懕erticalBar;戥ǹABLRTaВЪаўѿͼrrowƀ;BUНОТ憓ar;椓pArrow;懵reve;䌑eft˒к\0ц\0ѐightVector;楐eeVector;楞ectorĀ;Bљњ憽ar;楖ightǔѧ\0ѱeeVector;楟ectorĀ;BѺѻ懁ar;楗eeĀ;A҆҇护rrow;憧ĀctҒҗr;쀀𝒟rok;䄐ࠀNTacdfglmopqstuxҽӀӄӋӞӢӧӮӵԡԯԶՒ՝ՠեG;䅊H耻Ð䃐cute耻É䃉ƀaiyӒӗӜron;䄚rc耻Ê䃊;䐭ot;䄖r;쀀𝔈rave耻È䃈ement;戈ĀapӺӾcr;䄒tyɓԆ\0\0ԒmallSquare;旻erySmallSquare;斫ĀgpԦԪon;䄘f;쀀𝔼silon;䎕uĀaiԼՉlĀ;TՂՃ橵ilde;扂librium;懌Āci՗՚r;愰m;橳a;䎗ml耻Ë䃋Āipժկsts;戃onentialE;慇ʀcfiosօֈ֍ֲ׌y;䐤r;쀀𝔉lledɓ֗\0\0֣mallSquare;旼erySmallSquare;斪Ͱֺ\0ֿ\0\0ׄf;쀀𝔽All;戀riertrf;愱cò׋؀JTabcdfgorstר׬ׯ׺؀ؒؖ؛؝أ٬ٲcy;䐃耻>䀾mmaĀ;d׷׸䎓;䏜reve;䄞ƀeiy؇،ؐdil;䄢rc;䄜;䐓ot;䄠r;쀀𝔊;拙pf;쀀𝔾eater̀EFGLSTصلَٖٛ٦qualĀ;Lؾؿ扥ess;招ullEqual;执reater;檢ess;扷lantEqual;橾ilde;扳cr;쀀𝒢;扫ЀAacfiosuڅڋږڛڞڪھۊRDcy;䐪Āctڐڔek;䋇;䁞irc;䄤r;愌lbertSpace;愋ǰگ\0ڲf;愍izontalLine;攀Āctۃۅòکrok;䄦mpńېۘownHumðįqual;扏܀EJOacdfgmnostuۺ۾܃܇܎ܚܞܡܨ݄ݸދޏޕcy;䐕lig;䄲cy;䐁cute耻Í䃍Āiyܓܘrc耻Î䃎;䐘ot;䄰r;愑rave耻Ì䃌ƀ;apܠܯܿĀcgܴܷr;䄪inaryI;慈lieóϝǴ݉\0ݢĀ;eݍݎ戬Āgrݓݘral;戫section;拂isibleĀCTݬݲomma;恣imes;恢ƀgptݿރވon;䄮f;쀀𝕀a;䎙cr;愐ilde;䄨ǫޚ\0ޞcy;䐆l耻Ï䃏ʀcfosuެ޷޼߂ߐĀiyޱ޵rc;䄴;䐙r;쀀𝔍pf;쀀𝕁ǣ߇\0ߌr;쀀𝒥rcy;䐈kcy;䐄΀HJacfosߤߨ߽߬߱ࠂࠈcy;䐥cy;䐌ppa;䎚Āey߶߻dil;䄶;䐚r;쀀𝔎pf;쀀𝕂cr;쀀𝒦րJTaceflmostࠥࠩࠬࡐࡣ঳সে্਷ੇcy;䐉耻<䀼ʀcmnpr࠷࠼ࡁࡄࡍute;䄹bda;䎛g;柪lacetrf;愒r;憞ƀaeyࡗ࡜ࡡron;䄽dil;䄻;䐛Āfsࡨ॰tԀACDFRTUVarࡾࢩࢱࣦ࣠ࣼयज़ΐ४Ānrࢃ࢏gleBracket;柨rowƀ;BR࢙࢚࢞憐ar;懤ightArrow;懆eiling;挈oǵࢷ\0ࣃbleBracket;柦nǔࣈ\0࣒eeVector;楡ectorĀ;Bࣛࣜ懃ar;楙loor;挊ightĀAV࣯ࣵrrow;憔ector;楎Āerँगeƀ;AVउऊऐ抣rrow;憤ector;楚iangleƀ;BEतथऩ抲ar;槏qual;抴pƀDTVषूौownVector;楑eeVector;楠ectorĀ;Bॖॗ憿ar;楘ectorĀ;B॥०憼ar;楒ightáΜs̀EFGLSTॾঋকঝঢভqualGreater;拚ullEqual;扦reater;扶ess;檡lantEqual;橽ilde;扲r;쀀𝔏Ā;eঽা拘ftarrow;懚idot;䄿ƀnpw৔ਖਛgȀLRlr৞৷ਂਐeftĀAR০৬rrow;柵ightArrow;柷ightArrow;柶eftĀarγਊightáοightáϊf;쀀𝕃erĀLRਢਬeftArrow;憙ightArrow;憘ƀchtਾੀੂòࡌ;憰rok;䅁;扪Ѐacefiosuਗ਼੝੠੷੼અઋ઎p;椅y;䐜Ādl੥੯iumSpace;恟lintrf;愳r;쀀𝔐nusPlus;戓pf;쀀𝕄cò੶;䎜ҀJacefostuણધભીଔଙඑ඗ඞcy;䐊cute;䅃ƀaey઴હાron;䅇dil;䅅;䐝ƀgswે૰଎ativeƀMTV૓૟૨ediumSpace;怋hiĀcn૦૘ë૙eryThiî૙tedĀGL૸ଆreaterGreateòٳessLesóੈLine;䀊r;쀀𝔑ȀBnptଢନଷ଺reak;恠BreakingSpace;䂠f;愕ڀ;CDEGHLNPRSTV୕ୖ୪୼஡௫ఄ౞಄ದ೘ൡඅ櫬Āou୛୤ngruent;扢pCap;扭oubleVerticalBar;戦ƀlqxஃஊ஛ement;戉ualĀ;Tஒஓ扠ilde;쀀≂̸ists;戄reater΀;EFGLSTஶஷ஽௉௓௘௥扯qual;扱ullEqual;쀀≧̸reater;쀀≫̸ess;批lantEqual;쀀⩾̸ilde;扵umpń௲௽ownHump;쀀≎̸qual;쀀≏̸eĀfsఊధtTriangleƀ;BEచఛడ拪ar;쀀⧏̸qual;括s̀;EGLSTవశ఼ౄోౘ扮qual;扰reater;扸ess;쀀≪̸lantEqual;쀀⩽̸ilde;扴estedĀGL౨౹reaterGreater;쀀⪢̸essLess;쀀⪡̸recedesƀ;ESಒಓಛ技qual;쀀⪯̸lantEqual;拠ĀeiಫಹverseElement;戌ghtTriangleƀ;BEೋೌ೒拫ar;쀀⧐̸qual;拭ĀquೝഌuareSuĀbp೨೹setĀ;E೰ೳ쀀⊏̸qual;拢ersetĀ;Eഃആ쀀⊐̸qual;拣ƀbcpഓതൎsetĀ;Eഛഞ쀀⊂⃒qual;抈ceedsȀ;ESTലള഻െ抁qual;쀀⪰̸lantEqual;拡ilde;쀀≿̸ersetĀ;E൘൛쀀⊃⃒qual;抉ildeȀ;EFT൮൯൵ൿ扁qual;扄ullEqual;扇ilde;扉erticalBar;戤cr;쀀𝒩ilde耻Ñ䃑;䎝܀Eacdfgmoprstuvලෂ෉෕ෛ෠෧෼ขภยา฿ไlig;䅒cute耻Ó䃓Āiy෎ීrc耻Ô䃔;䐞blac;䅐r;쀀𝔒rave耻Ò䃒ƀaei෮ෲ෶cr;䅌ga;䎩cron;䎟pf;쀀𝕆enCurlyĀDQฎบoubleQuote;怜uote;怘;橔Āclวฬr;쀀𝒪ash耻Ø䃘iŬื฼de耻Õ䃕es;樷ml耻Ö䃖erĀBP๋๠Āar๐๓r;怾acĀek๚๜;揞et;掴arenthesis;揜Ҁacfhilors๿ງຊຏຒດຝະ໼rtialD;戂y;䐟r;쀀𝔓i;䎦;䎠usMinus;䂱Āipຢອncareplanåڝf;愙Ȁ;eio຺ູ໠໤檻cedesȀ;EST່້໏໚扺qual;檯lantEqual;扼ilde;找me;怳Ādp໩໮uct;戏ortionĀ;aȥ໹l;戝Āci༁༆r;쀀𝒫;䎨ȀUfos༑༖༛༟OT耻"䀢r;쀀𝔔pf;愚cr;쀀𝒬؀BEacefhiorsu༾གྷཇའཱིྦྷྪྭ႖ႩႴႾarr;椐G耻®䂮ƀcnrཎནབute;䅔g;柫rĀ;tཛྷཝ憠l;椖ƀaeyཧཬཱron;䅘dil;䅖;䐠Ā;vླྀཹ愜erseĀEUྂྙĀlq྇ྎement;戋uilibrium;懋pEquilibrium;楯r»ཹo;䎡ghtЀACDFTUVa࿁࿫࿳ဢဨၛႇϘĀnr࿆࿒gleBracket;柩rowƀ;BL࿜࿝࿡憒ar;懥eftArrow;懄eiling;按oǵ࿹\0စbleBracket;柧nǔည\0နeeVector;楝ectorĀ;Bဝသ懂ar;楕loor;挋Āerိ၃eƀ;AVဵံြ抢rrow;憦ector;楛iangleƀ;BEၐၑၕ抳ar;槐qual;抵pƀDTVၣၮၸownVector;楏eeVector;楜ectorĀ;Bႂႃ憾ar;楔ectorĀ;B႑႒懀ar;楓Āpuႛ႞f;愝ndImplies;楰ightarrow;懛ĀchႹႼr;愛;憱leDelayed;槴ڀHOacfhimoqstuფჱჷჽᄙᄞᅑᅖᅡᅧᆵᆻᆿĀCcჩხHcy;䐩y;䐨FTcy;䐬cute;䅚ʀ;aeiyᄈᄉᄎᄓᄗ檼ron;䅠dil;䅞rc;䅜;䐡r;쀀𝔖ortȀDLRUᄪᄴᄾᅉownArrow»ОeftArrow»࢚ightArrow»࿝pArrow;憑gma;䎣allCircle;战pf;쀀𝕊ɲᅭ\0\0ᅰt;戚areȀ;ISUᅻᅼᆉᆯ斡ntersection;抓uĀbpᆏᆞsetĀ;Eᆗᆘ抏qual;抑ersetĀ;Eᆨᆩ抐qual;抒nion;抔cr;쀀𝒮ar;拆ȀbcmpᇈᇛሉላĀ;sᇍᇎ拐etĀ;Eᇍᇕqual;抆ĀchᇠህeedsȀ;ESTᇭᇮᇴᇿ扻qual;檰lantEqual;扽ilde;承Tháྌ;我ƀ;esሒሓሣ拑rsetĀ;Eሜም抃qual;抇et»ሓրHRSacfhiorsሾቄ቉ቕ቞ቱቶኟዂወዑORN耻Þ䃞ADE;愢ĀHc቎ቒcy;䐋y;䐦Ābuቚቜ;䀉;䎤ƀaeyብቪቯron;䅤dil;䅢;䐢r;쀀𝔗Āeiቻ኉Dzኀ\0ኇefore;戴a;䎘Ācn኎ኘkSpace;쀀  Space;怉ldeȀ;EFTካኬኲኼ戼qual;扃ullEqual;扅ilde;扈pf;쀀𝕋ipleDot;惛Āctዖዛr;쀀𝒯rok;䅦ૡዷጎጚጦ\0ጬጱ\0\0\0\0\0ጸጽ፷ᎅ\0᏿ᐄᐊᐐĀcrዻጁute耻Ú䃚rĀ;oጇገ憟cir;楉rǣጓ\0጖y;䐎ve;䅬Āiyጞጣrc耻Û䃛;䐣blac;䅰r;쀀𝔘rave耻Ù䃙acr;䅪Ādiፁ፩erĀBPፈ፝Āarፍፐr;䁟acĀekፗፙ;揟et;掵arenthesis;揝onĀ;P፰፱拃lus;抎Āgp፻፿on;䅲f;쀀𝕌ЀADETadps᎕ᎮᎸᏄϨᏒᏗᏳrrowƀ;BDᅐᎠᎤar;椒ownArrow;懅ownArrow;憕quilibrium;楮eeĀ;AᏋᏌ报rrow;憥ownáϳerĀLRᏞᏨeftArrow;憖ightArrow;憗iĀ;lᏹᏺ䏒on;䎥ing;䅮cr;쀀𝒰ilde;䅨ml耻Ü䃜ҀDbcdefosvᐧᐬᐰᐳᐾᒅᒊᒐᒖash;披ar;櫫y;䐒ashĀ;lᐻᐼ抩;櫦Āerᑃᑅ;拁ƀbtyᑌᑐᑺar;怖Ā;iᑏᑕcalȀBLSTᑡᑥᑪᑴar;戣ine;䁼eparator;杘ilde;所ThinSpace;怊r;쀀𝔙pf;쀀𝕍cr;쀀𝒱dash;抪ʀcefosᒧᒬᒱᒶᒼirc;䅴dge;拀r;쀀𝔚pf;쀀𝕎cr;쀀𝒲Ȁfiosᓋᓐᓒᓘr;쀀𝔛;䎞pf;쀀𝕏cr;쀀𝒳ҀAIUacfosuᓱᓵᓹᓽᔄᔏᔔᔚᔠcy;䐯cy;䐇cy;䐮cute耻Ý䃝Āiyᔉᔍrc;䅶;䐫r;쀀𝔜pf;쀀𝕐cr;쀀𝒴ml;䅸ЀHacdefosᔵᔹᔿᕋᕏᕝᕠᕤcy;䐖cute;䅹Āayᕄᕉron;䅽;䐗ot;䅻Dzᕔ\0ᕛoWidtè૙a;䎖r;愨pf;愤cr;쀀𝒵௡ᖃᖊᖐ\0ᖰᖶᖿ\0\0\0\0ᗆᗛᗫᙟ᙭\0ᚕ᚛ᚲᚹ\0ᚾcute耻á䃡reve;䄃̀;Ediuyᖜᖝᖡᖣᖨᖭ戾;쀀∾̳;房rc耻â䃢te肻´̆;䐰lig耻æ䃦Ā;r²ᖺ;쀀𝔞rave耻à䃠ĀepᗊᗖĀfpᗏᗔsym;愵èᗓha;䎱ĀapᗟcĀclᗤᗧr;䄁g;樿ɤᗰ\0\0ᘊʀ;adsvᗺᗻᗿᘁᘇ戧nd;橕;橜lope;橘;橚΀;elmrszᘘᘙᘛᘞᘿᙏᙙ戠;榤e»ᘙsdĀ;aᘥᘦ戡ѡᘰᘲᘴᘶᘸᘺᘼᘾ;榨;榩;榪;榫;榬;榭;榮;榯tĀ;vᙅᙆ戟bĀ;dᙌᙍ抾;榝Āptᙔᙗh;戢»¹arr;捼Āgpᙣᙧon;䄅f;쀀𝕒΀;Eaeiop዁ᙻᙽᚂᚄᚇᚊ;橰cir;橯;扊d;手s;䀧roxĀ;e዁ᚒñᚃing耻å䃥ƀctyᚡᚦᚨr;쀀𝒶;䀪mpĀ;e዁ᚯñʈilde耻ã䃣ml耻ä䃤Āciᛂᛈoninôɲnt;樑ࠀNabcdefiklnoprsu᛭ᛱᜰ᜼ᝃᝈ᝸᝽០៦ᠹᡐᜍ᤽᥈ᥰot;櫭Ācrᛶ᜞kȀcepsᜀᜅᜍᜓong;扌psilon;䏶rime;怵imĀ;e᜚᜛戽q;拍Ŷᜢᜦee;抽edĀ;gᜬᜭ挅e»ᜭrkĀ;t፜᜷brk;掶Āoyᜁᝁ;䐱quo;怞ʀcmprtᝓ᝛ᝡᝤᝨausĀ;eĊĉptyv;榰séᜌnoõēƀahwᝯ᝱ᝳ;䎲;愶een;扬r;쀀𝔟g΀costuvwឍឝឳេ៕៛៞ƀaiuបពរðݠrc;旯p»፱ƀdptឤឨឭot;樀lus;樁imes;樂ɱឹ\0\0ើcup;樆ar;昅riangleĀdu៍្own;施p;斳plus;樄eåᑄåᒭarow;植ƀako៭ᠦᠵĀcn៲ᠣkƀlst៺֫᠂ozenge;槫riangleȀ;dlr᠒᠓᠘᠝斴own;斾eft;旂ight;斸k;搣Ʊᠫ\0ᠳƲᠯ\0ᠱ;斒;斑4;斓ck;斈ĀeoᠾᡍĀ;qᡃᡆ쀀=⃥uiv;쀀≡⃥t;挐Ȁptwxᡙᡞᡧᡬf;쀀𝕓Ā;tᏋᡣom»Ꮜtie;拈؀DHUVbdhmptuvᢅᢖᢪᢻᣗᣛᣬ᣿ᤅᤊᤐᤡȀLRlrᢎᢐᢒᢔ;敗;敔;敖;敓ʀ;DUduᢡᢢᢤᢦᢨ敐;敦;敩;敤;敧ȀLRlrᢳᢵᢷᢹ;敝;敚;敜;教΀;HLRhlrᣊᣋᣍᣏᣑᣓᣕ救;敬;散;敠;敫;敢;敟ox;槉ȀLRlrᣤᣦᣨᣪ;敕;敒;攐;攌ʀ;DUduڽ᣷᣹᣻᣽;敥;敨;攬;攴inus;抟lus;択imes;抠ȀLRlrᤙᤛᤝ᤟;敛;敘;攘;攔΀;HLRhlrᤰᤱᤳᤵᤷ᤻᤹攂;敪;敡;敞;攼;攤;攜Āevģ᥂bar耻¦䂦Ȁceioᥑᥖᥚᥠr;쀀𝒷mi;恏mĀ;e᜚᜜lƀ;bhᥨᥩᥫ䁜;槅sub;柈Ŭᥴ᥾lĀ;e᥹᥺怢t»᥺pƀ;Eeįᦅᦇ;檮Ā;qۜۛೡᦧ\0᧨ᨑᨕᨲ\0ᨷᩐ\0\0᪴\0\0᫁\0\0ᬡᬮ᭍᭒\0᯽\0ᰌƀcpr᦭ᦲ᧝ute;䄇̀;abcdsᦿᧀᧄ᧊᧕᧙戩nd;橄rcup;橉Āau᧏᧒p;橋p;橇ot;橀;쀀∩︀Āeo᧢᧥t;恁îړȀaeiu᧰᧻ᨁᨅǰ᧵\0᧸s;橍on;䄍dil耻ç䃧rc;䄉psĀ;sᨌᨍ橌m;橐ot;䄋ƀdmnᨛᨠᨦil肻¸ƭptyv;榲t脀¢;eᨭᨮ䂢räƲr;쀀𝔠ƀceiᨽᩀᩍy;䑇ckĀ;mᩇᩈ朓ark»ᩈ;䏇r΀;Ecefms᩟᩠ᩢᩫ᪤᪪᪮旋;槃ƀ;elᩩᩪᩭ䋆q;扗eɡᩴ\0\0᪈rrowĀlr᩼᪁eft;憺ight;憻ʀRSacd᪒᪔᪖᪚᪟»ཇ;擈st;抛irc;抚ash;抝nint;樐id;櫯cir;槂ubsĀ;u᪻᪼晣it»᪼ˬ᫇᫔᫺\0ᬊonĀ;eᫍᫎ䀺Ā;qÇÆɭ᫙\0\0᫢aĀ;t᫞᫟䀬;䁀ƀ;fl᫨᫩᫫戁îᅠeĀmx᫱᫶ent»᫩eóɍǧ᫾\0ᬇĀ;dኻᬂot;橭nôɆƀfryᬐᬔᬗ;쀀𝕔oäɔ脀©;sŕᬝr;愗Āaoᬥᬩrr;憵ss;朗Ācuᬲᬷr;쀀𝒸Ābpᬼ᭄Ā;eᭁᭂ櫏;櫑Ā;eᭉᭊ櫐;櫒dot;拯΀delprvw᭠᭬᭷ᮂᮬᯔ᯹arrĀlr᭨᭪;椸;椵ɰ᭲\0\0᭵r;拞c;拟arrĀ;p᭿ᮀ憶;椽̀;bcdosᮏᮐᮖᮡᮥᮨ截rcap;橈Āauᮛᮞp;橆p;橊ot;抍r;橅;쀀∪︀Ȁalrv᮵ᮿᯞᯣrrĀ;mᮼᮽ憷;椼yƀevwᯇᯔᯘqɰᯎ\0\0ᯒreã᭳uã᭵ee;拎edge;拏en耻¤䂤earrowĀlrᯮ᯳eft»ᮀight»ᮽeäᯝĀciᰁᰇoninôǷnt;戱lcty;挭ঀAHabcdefhijlorstuwz᰸᰻᰿ᱝᱩᱵᲊᲞᲬᲷ᳻᳿ᴍᵻᶑᶫᶻ᷆᷍rò΁ar;楥Ȁglrs᱈ᱍ᱒᱔ger;怠eth;愸òᄳhĀ;vᱚᱛ怐»ऊūᱡᱧarow;椏aã̕Āayᱮᱳron;䄏;䐴ƀ;ao̲ᱼᲄĀgrʿᲁr;懊tseq;橷ƀglmᲑᲔᲘ耻°䂰ta;䎴ptyv;榱ĀirᲣᲨsht;楿;쀀𝔡arĀlrᲳᲵ»ࣜ»သʀaegsv᳂͸᳖᳜᳠mƀ;oș᳊᳔ndĀ;ș᳑uit;晦amma;䏝in;拲ƀ;io᳧᳨᳸䃷de脀÷;o᳧ᳰntimes;拇nø᳷cy;䑒cɯᴆ\0\0ᴊrn;挞op;挍ʀlptuwᴘᴝᴢᵉᵕlar;䀤f;쀀𝕕ʀ;emps̋ᴭᴷᴽᵂqĀ;d͒ᴳot;扑inus;戸lus;戔quare;抡blebarwedgåúnƀadhᄮᵝᵧownarrowóᲃarpoonĀlrᵲᵶefôᲴighôᲶŢᵿᶅkaro÷གɯᶊ\0\0ᶎrn;挟op;挌ƀcotᶘᶣᶦĀryᶝᶡ;쀀𝒹;䑕l;槶rok;䄑Ādrᶰᶴot;拱iĀ;fᶺ᠖斿Āah᷀᷃ròЩaòྦangle;榦Āci᷒ᷕy;䑟grarr;柿ऀDacdefglmnopqrstuxḁḉḙḸոḼṉṡṾấắẽỡἪἷὄ὎὚ĀDoḆᴴoôᲉĀcsḎḔute耻é䃩ter;橮ȀaioyḢḧḱḶron;䄛rĀ;cḭḮ扖耻ê䃪lon;払;䑍ot;䄗ĀDrṁṅot;扒;쀀𝔢ƀ;rsṐṑṗ檚ave耻è䃨Ā;dṜṝ檖ot;檘Ȁ;ilsṪṫṲṴ檙nters;揧;愓Ā;dṹṺ檕ot;檗ƀapsẅẉẗcr;䄓tyƀ;svẒẓẕ戅et»ẓpĀ1;ẝẤijạả;怄;怅怃ĀgsẪẬ;䅋p;怂ĀgpẴẸon;䄙f;쀀𝕖ƀalsỄỎỒrĀ;sỊị拕l;槣us;橱iƀ;lvỚớở䎵on»ớ;䏵ȀcsuvỪỳἋἣĀioữḱrc»Ḯɩỹ\0\0ỻíՈantĀglἂἆtr»ṝess»Ṻƀaeiἒ἖Ἒls;䀽st;扟vĀ;DȵἠD;橸parsl;槥ĀDaἯἳot;打rr;楱ƀcdiἾὁỸr;愯oô͒ĀahὉὋ;䎷耻ð䃰Āmrὓὗl耻ë䃫o;悬ƀcipὡὤὧl;䀡sôծĀeoὬὴctatioîՙnentialåչৡᾒ\0ᾞ\0ᾡᾧ\0\0ῆῌ\0ΐ\0ῦῪ \0 ⁚llingdotseñṄy;䑄male;晀ƀilrᾭᾳ῁lig;耀ffiɩᾹ\0\0᾽g;耀ffig;耀ffl;쀀𝔣lig;耀filig;쀀fjƀaltῙ῜ῡt;晭ig;耀flns;斱of;䆒ǰ΅\0ῳf;쀀𝕗ĀakֿῷĀ;vῼ´拔;櫙artint;樍Āao‌⁕Ācs‑⁒ႉ‸⁅⁈\0⁐β•‥‧‪‬\0‮耻½䂽;慓耻¼䂼;慕;慙;慛Ƴ‴\0‶;慔;慖ʴ‾⁁\0\0⁃耻¾䂾;慗;慜5;慘ƶ⁌\0⁎;慚;慝8;慞l;恄wn;挢cr;쀀𝒻ࢀEabcdefgijlnorstv₂₉₟₥₰₴⃰⃵⃺⃿℃ℒℸ̗ℾ⅒↞Ā;lٍ₇;檌ƀcmpₐₕ₝ute;䇵maĀ;dₜ᳚䎳;檆reve;䄟Āiy₪₮rc;䄝;䐳ot;䄡Ȁ;lqsؾق₽⃉ƀ;qsؾٌ⃄lanô٥Ȁ;cdl٥⃒⃥⃕c;檩otĀ;o⃜⃝檀Ā;l⃢⃣檂;檄Ā;e⃪⃭쀀⋛︀s;檔r;쀀𝔤Ā;gٳ؛mel;愷cy;䑓Ȁ;Eajٚℌℎℐ;檒;檥;檤ȀEaesℛℝ℩ℴ;扩pĀ;p℣ℤ檊rox»ℤĀ;q℮ℯ檈Ā;q℮ℛim;拧pf;쀀𝕘Āci⅃ⅆr;愊mƀ;el٫ⅎ⅐;檎;檐茀>;cdlqr׮ⅠⅪⅮⅳⅹĀciⅥⅧ;檧r;橺ot;拗Par;榕uest;橼ʀadelsↄⅪ←ٖ↛ǰ↉\0↎proø₞r;楸qĀlqؿ↖lesó₈ií٫Āen↣↭rtneqq;쀀≩︀Å↪ԀAabcefkosy⇄⇇⇱⇵⇺∘∝∯≨≽ròΠȀilmr⇐⇔⇗⇛rsðᒄf»․ilôکĀdr⇠⇤cy;䑊ƀ;cwࣴ⇫⇯ir;楈;憭ar;意irc;䄥ƀalr∁∎∓rtsĀ;u∉∊晥it»∊lip;怦con;抹r;쀀𝔥sĀew∣∩arow;椥arow;椦ʀamopr∺∾≃≞≣rr;懿tht;戻kĀlr≉≓eftarrow;憩ightarrow;憪f;쀀𝕙bar;怕ƀclt≯≴≸r;쀀𝒽asè⇴rok;䄧Ābp⊂⊇ull;恃hen»ᱛૡ⊣\0⊪\0⊸⋅⋎\0⋕⋳\0\0⋸⌢⍧⍢⍿\0⎆⎪⎴cute耻í䃭ƀ;iyݱ⊰⊵rc耻î䃮;䐸Ācx⊼⊿y;䐵cl耻¡䂡ĀfrΟ⋉;쀀𝔦rave耻ì䃬Ȁ;inoܾ⋝⋩⋮Āin⋢⋦nt;樌t;戭fin;槜ta;愩lig;䄳ƀaop⋾⌚⌝ƀcgt⌅⌈⌗r;䄫ƀelpܟ⌏⌓inåގarôܠh;䄱f;抷ed;䆵ʀ;cfotӴ⌬⌱⌽⍁are;愅inĀ;t⌸⌹戞ie;槝doô⌙ʀ;celpݗ⍌⍐⍛⍡al;抺Āgr⍕⍙eróᕣã⍍arhk;樗rod;樼Ȁcgpt⍯⍲⍶⍻y;䑑on;䄯f;쀀𝕚a;䎹uest耻¿䂿Āci⎊⎏r;쀀𝒾nʀ;EdsvӴ⎛⎝⎡ӳ;拹ot;拵Ā;v⎦⎧拴;拳Ā;iݷ⎮lde;䄩ǫ⎸\0⎼cy;䑖l耻ï䃯̀cfmosu⏌⏗⏜⏡⏧⏵Āiy⏑⏕rc;䄵;䐹r;쀀𝔧ath;䈷pf;쀀𝕛ǣ⏬\0⏱r;쀀𝒿rcy;䑘kcy;䑔Ѐacfghjos␋␖␢␧␭␱␵␻ppaĀ;v␓␔䎺;䏰Āey␛␠dil;䄷;䐺r;쀀𝔨reen;䄸cy;䑅cy;䑜pf;쀀𝕜cr;쀀𝓀஀ABEHabcdefghjlmnoprstuv⑰⒁⒆⒍⒑┎┽╚▀♎♞♥♹♽⚚⚲⛘❝❨➋⟀⠁⠒ƀart⑷⑺⑼rò৆òΕail;椛arr;椎Ā;gঔ⒋;檋ar;楢ॣ⒥\0⒪\0⒱\0\0\0\0\0⒵Ⓔ\0ⓆⓈⓍ\0⓹ute;䄺mptyv;榴raîࡌbda;䎻gƀ;dlࢎⓁⓃ;榑åࢎ;檅uo耻«䂫rЀ;bfhlpst࢙ⓞⓦⓩ⓫⓮⓱⓵Ā;f࢝ⓣs;椟s;椝ë≒p;憫l;椹im;楳l;憢ƀ;ae⓿─┄檫il;椙Ā;s┉┊檭;쀀⪭︀ƀabr┕┙┝rr;椌rk;杲Āak┢┬cĀek┨┪;䁻;䁛Āes┱┳;榋lĀdu┹┻;榏;榍Ȁaeuy╆╋╖╘ron;䄾Ādi═╔il;䄼ìࢰâ┩;䐻Ȁcqrs╣╦╭╽a;椶uoĀ;rนᝆĀdu╲╷har;楧shar;楋h;憲ʀ;fgqs▋▌উ◳◿扤tʀahlrt▘▤▷◂◨rrowĀ;t࢙□aé⓶arpoonĀdu▯▴own»њp»०eftarrows;懇ightƀahs◍◖◞rrowĀ;sࣴࢧarpoonó྘quigarro÷⇰hreetimes;拋ƀ;qs▋ও◺lanôবʀ;cdgsব☊☍☝☨c;檨otĀ;o☔☕橿Ā;r☚☛檁;檃Ā;e☢☥쀀⋚︀s;檓ʀadegs☳☹☽♉♋pproøⓆot;拖qĀgq♃♅ôউgtò⒌ôছiíলƀilr♕࣡♚sht;楼;쀀𝔩Ā;Eজ♣;檑š♩♶rĀdu▲♮Ā;l॥♳;楪lk;斄cy;䑙ʀ;achtੈ⚈⚋⚑⚖rò◁orneòᴈard;楫ri;旺Āio⚟⚤dot;䅀ustĀ;a⚬⚭掰che»⚭ȀEaes⚻⚽⛉⛔;扨pĀ;p⛃⛄檉rox»⛄Ā;q⛎⛏檇Ā;q⛎⚻im;拦Ѐabnoptwz⛩⛴⛷✚✯❁❇❐Ānr⛮⛱g;柬r;懽rëࣁgƀlmr⛿✍✔eftĀar০✇ightá৲apsto;柼ightá৽parrowĀlr✥✩efô⓭ight;憬ƀafl✶✹✽r;榅;쀀𝕝us;樭imes;樴š❋❏st;戗áፎƀ;ef❗❘᠀旊nge»❘arĀ;l❤❥䀨t;榓ʀachmt❳❶❼➅➇ròࢨorneòᶌarĀ;d྘➃;業;怎ri;抿̀achiqt➘➝ੀ➢➮➻quo;怹r;쀀𝓁mƀ;egল➪➬;檍;檏Ābu┪➳oĀ;rฟ➹;怚rok;䅂萀<;cdhilqrࠫ⟒☹⟜⟠⟥⟪⟰Āci⟗⟙;檦r;橹reå◲mes;拉arr;楶uest;橻ĀPi⟵⟹ar;榖ƀ;ef⠀भ᠛旃rĀdu⠇⠍shar;楊har;楦Āen⠗⠡rtneqq;쀀≨︀Å⠞܀Dacdefhilnopsu⡀⡅⢂⢎⢓⢠⢥⢨⣚⣢⣤ઃ⣳⤂Dot;戺Ȁclpr⡎⡒⡣⡽r耻¯䂯Āet⡗⡙;時Ā;e⡞⡟朠se»⡟Ā;sျ⡨toȀ;dluျ⡳⡷⡻owîҌefôएðᏑker;斮Āoy⢇⢌mma;権;䐼ash;怔asuredangle»ᘦr;쀀𝔪o;愧ƀcdn⢯⢴⣉ro耻µ䂵Ȁ;acdᑤ⢽⣀⣄sôᚧir;櫰ot肻·Ƶusƀ;bd⣒ᤃ⣓戒Ā;uᴼ⣘;横ţ⣞⣡p;櫛ò−ðઁĀdp⣩⣮els;抧f;쀀𝕞Āct⣸⣽r;쀀𝓂pos»ᖝƀ;lm⤉⤊⤍䎼timap;抸ఀGLRVabcdefghijlmoprstuvw⥂⥓⥾⦉⦘⧚⧩⨕⨚⩘⩝⪃⪕⪤⪨⬄⬇⭄⭿⮮ⰴⱧⱼ⳩Āgt⥇⥋;쀀⋙̸Ā;v⥐௏쀀≫⃒ƀelt⥚⥲⥶ftĀar⥡⥧rrow;懍ightarrow;懎;쀀⋘̸Ā;v⥻ే쀀≪⃒ightarrow;懏ĀDd⦎⦓ash;抯ash;抮ʀbcnpt⦣⦧⦬⦱⧌la»˞ute;䅄g;쀀∠⃒ʀ;Eiop඄⦼⧀⧅⧈;쀀⩰̸d;쀀≋̸s;䅉roø඄urĀ;a⧓⧔普lĀ;s⧓ସdz⧟\0⧣p肻 ଷmpĀ;e௹ఀʀaeouy⧴⧾⨃⨐⨓ǰ⧹\0⧻;橃on;䅈dil;䅆ngĀ;dൾ⨊ot;쀀⩭̸p;橂;䐽ash;怓΀;Aadqsxஒ⨩⨭⨻⩁⩅⩐rr;懗rĀhr⨳⨶k;椤Ā;oᏲᏰot;쀀≐̸uiöୣĀei⩊⩎ar;椨í஘istĀ;s஠டr;쀀𝔫ȀEest௅⩦⩹⩼ƀ;qs஼⩭௡ƀ;qs஼௅⩴lanô௢ií௪Ā;rஶ⪁»ஷƀAap⪊⪍⪑rò⥱rr;憮ar;櫲ƀ;svྍ⪜ྌĀ;d⪡⪢拼;拺cy;䑚΀AEadest⪷⪺⪾⫂⫅⫶⫹rò⥦;쀀≦̸rr;憚r;急Ȁ;fqs఻⫎⫣⫯tĀar⫔⫙rro÷⫁ightarro÷⪐ƀ;qs఻⪺⫪lanôౕĀ;sౕ⫴»శiíౝĀ;rవ⫾iĀ;eచథiäඐĀpt⬌⬑f;쀀𝕟膀¬;in⬙⬚⬶䂬nȀ;Edvஉ⬤⬨⬮;쀀⋹̸ot;쀀⋵̸ǡஉ⬳⬵;拷;拶iĀ;vಸ⬼ǡಸ⭁⭃;拾;拽ƀaor⭋⭣⭩rȀ;ast୻⭕⭚⭟lleì୻l;쀀⫽⃥;쀀∂̸lint;樔ƀ;ceಒ⭰⭳uåಥĀ;cಘ⭸Ā;eಒ⭽ñಘȀAait⮈⮋⮝⮧rò⦈rrƀ;cw⮔⮕⮙憛;쀀⤳̸;쀀↝̸ghtarrow»⮕riĀ;eೋೖ΀chimpqu⮽⯍⯙⬄୸⯤⯯Ȁ;cerല⯆ഷ⯉uå൅;쀀𝓃ortɭ⬅\0\0⯖ará⭖mĀ;e൮⯟Ā;q൴൳suĀbp⯫⯭å೸åഋƀbcp⯶ⰑⰙȀ;Ees⯿ⰀഢⰄ抄;쀀⫅̸etĀ;eഛⰋqĀ;qണⰀcĀ;eലⰗñസȀ;EesⰢⰣൟⰧ抅;쀀⫆̸etĀ;e൘ⰮqĀ;qൠⰣȀgilrⰽⰿⱅⱇìௗlde耻ñ䃱çృiangleĀlrⱒⱜeftĀ;eచⱚñదightĀ;eೋⱥñ೗Ā;mⱬⱭ䎽ƀ;esⱴⱵⱹ䀣ro;愖p;怇ҀDHadgilrsⲏⲔⲙⲞⲣⲰⲶⳓⳣash;抭arr;椄p;쀀≍⃒ash;抬ĀetⲨⲬ;쀀≥⃒;쀀>⃒nfin;槞ƀAetⲽⳁⳅrr;椂;쀀≤⃒Ā;rⳊⳍ쀀<⃒ie;쀀⊴⃒ĀAtⳘⳜrr;椃rie;쀀⊵⃒im;쀀∼⃒ƀAan⳰⳴ⴂrr;懖rĀhr⳺⳽k;椣Ā;oᏧᏥear;椧ቓ᪕\0\0\0\0\0\0\0\0\0\0\0\0\0ⴭ\0ⴸⵈⵠⵥ⵲ⶄᬇ\0\0ⶍⶫ\0ⷈⷎ\0ⷜ⸙⸫⸾⹃Ācsⴱ᪗ute耻ó䃳ĀiyⴼⵅrĀ;c᪞ⵂ耻ô䃴;䐾ʀabios᪠ⵒⵗLjⵚlac;䅑v;樸old;榼lig;䅓Ācr⵩⵭ir;榿;쀀𝔬ͯ⵹\0\0⵼\0ⶂn;䋛ave耻ò䃲;槁Ābmⶈ෴ar;榵Ȁacitⶕ⶘ⶥⶨrò᪀Āir⶝ⶠr;榾oss;榻nå๒;槀ƀaeiⶱⶵⶹcr;䅍ga;䏉ƀcdnⷀⷅǍron;䎿;榶pf;쀀𝕠ƀaelⷔ⷗ǒr;榷rp;榹΀;adiosvⷪⷫⷮ⸈⸍⸐⸖戨rò᪆Ȁ;efmⷷⷸ⸂⸅橝rĀ;oⷾⷿ愴f»ⷿ耻ª䂪耻º䂺gof;抶r;橖lope;橗;橛ƀclo⸟⸡⸧ò⸁ash耻ø䃸l;折iŬⸯ⸴de耻õ䃵esĀ;aǛ⸺s;樶ml耻ö䃶bar;挽ૡ⹞\0⹽\0⺀⺝\0⺢⺹\0\0⻋ຜ\0⼓\0\0⼫⾼\0⿈rȀ;astЃ⹧⹲຅脀¶;l⹭⹮䂶leìЃɩ⹸\0\0⹻m;櫳;櫽y;䐿rʀcimpt⺋⺏⺓ᡥ⺗nt;䀥od;䀮il;怰enk;怱r;쀀𝔭ƀimo⺨⺰⺴Ā;v⺭⺮䏆;䏕maô੶ne;明ƀ;tv⺿⻀⻈䏀chfork»´;䏖Āau⻏⻟nĀck⻕⻝kĀ;h⇴⻛;愎ö⇴sҀ;abcdemst⻳⻴ᤈ⻹⻽⼄⼆⼊⼎䀫cir;樣ir;樢Āouᵀ⼂;樥;橲n肻±ຝim;樦wo;樧ƀipu⼙⼠⼥ntint;樕f;쀀𝕡nd耻£䂣Ԁ;Eaceinosu່⼿⽁⽄⽇⾁⾉⾒⽾⾶;檳p;檷uå໙Ā;c໎⽌̀;acens່⽙⽟⽦⽨⽾pproø⽃urlyeñ໙ñ໎ƀaes⽯⽶⽺pprox;檹qq;檵im;拨iíໟmeĀ;s⾈ຮ怲ƀEas⽸⾐⽺ð⽵ƀdfp໬⾙⾯ƀals⾠⾥⾪lar;挮ine;挒urf;挓Ā;t໻⾴ï໻rel;抰Āci⿀⿅r;쀀𝓅;䏈ncsp;怈̀fiopsu⿚⋢⿟⿥⿫⿱r;쀀𝔮pf;쀀𝕢rime;恗cr;쀀𝓆ƀaeo⿸〉〓tĀei⿾々rnionóڰnt;樖stĀ;e【】䀿ñἙô༔઀ABHabcdefhilmnoprstux぀けさすムㄎㄫㅇㅢㅲㆎ㈆㈕㈤㈩㉘㉮㉲㊐㊰㊷ƀartぇおがròႳòϝail;検aròᱥar;楤΀cdenqrtとふへみわゔヌĀeuねぱ;쀀∽̱te;䅕iãᅮmptyv;榳gȀ;del࿑らるろ;榒;榥å࿑uo耻»䂻rր;abcfhlpstw࿜ガクシスゼゾダッデナp;極Ā;f࿠ゴs;椠;椳s;椞ë≝ð✮l;楅im;楴l;憣;憝Āaiパフil;椚oĀ;nホボ戶aló༞ƀabrョリヮrò៥rk;杳ĀakンヽcĀekヹ・;䁽;䁝Āes㄂㄄;榌lĀduㄊㄌ;榎;榐Ȁaeuyㄗㄜㄧㄩron;䅙Ādiㄡㄥil;䅗ì࿲âヺ;䑀Ȁclqsㄴㄷㄽㅄa;椷dhar;楩uoĀ;rȎȍh;憳ƀacgㅎㅟངlȀ;ipsླྀㅘㅛႜnåႻarôྩt;断ƀilrㅩဣㅮsht;楽;쀀𝔯ĀaoㅷㆆrĀduㅽㅿ»ѻĀ;l႑ㆄ;楬Ā;vㆋㆌ䏁;䏱ƀgns㆕ㇹㇼht̀ahlrstㆤㆰ㇂㇘㇤㇮rrowĀ;t࿜ㆭaéトarpoonĀduㆻㆿowîㅾp»႒eftĀah㇊㇐rrowó࿪arpoonóՑightarrows;應quigarro÷ニhreetimes;拌g;䋚ingdotseñἲƀahm㈍㈐㈓rò࿪aòՑ;怏oustĀ;a㈞㈟掱che»㈟mid;櫮Ȁabpt㈲㈽㉀㉒Ānr㈷㈺g;柭r;懾rëဃƀafl㉇㉊㉎r;榆;쀀𝕣us;樮imes;樵Āap㉝㉧rĀ;g㉣㉤䀩t;榔olint;樒arò㇣Ȁachq㉻㊀Ⴜ㊅quo;怺r;쀀𝓇Ābu・㊊oĀ;rȔȓƀhir㊗㊛㊠reåㇸmes;拊iȀ;efl㊪ၙᠡ㊫方tri;槎luhar;楨;愞ൡ㋕㋛㋟㌬㌸㍱\0㍺㎤\0\0㏬㏰\0㐨㑈㑚㒭㒱㓊㓱\0㘖\0\0㘳cute;䅛quï➺Ԁ;Eaceinpsyᇭ㋳㋵㋿㌂㌋㌏㌟㌦㌩;檴ǰ㋺\0㋼;檸on;䅡uåᇾĀ;dᇳ㌇il;䅟rc;䅝ƀEas㌖㌘㌛;檶p;檺im;择olint;樓iíሄ;䑁otƀ;be㌴ᵇ㌵担;橦΀Aacmstx㍆㍊㍗㍛㍞㍣㍭rr;懘rĀhr㍐㍒ë∨Ā;oਸ਼਴t耻§䂧i;䀻war;椩mĀin㍩ðnuóñt;朶rĀ;o㍶⁕쀀𝔰Ȁacoy㎂㎆㎑㎠rp;景Āhy㎋㎏cy;䑉;䑈rtɭ㎙\0\0㎜iäᑤaraì⹯耻­䂭Āgm㎨㎴maƀ;fv㎱㎲㎲䏃;䏂Ѐ;deglnprካ㏅㏉㏎㏖㏞㏡㏦ot;橪Ā;q኱ኰĀ;E㏓㏔檞;檠Ā;E㏛㏜檝;檟e;扆lus;樤arr;楲aròᄽȀaeit㏸㐈㐏㐗Āls㏽㐄lsetmé㍪hp;樳parsl;槤Ādlᑣ㐔e;挣Ā;e㐜㐝檪Ā;s㐢㐣檬;쀀⪬︀ƀflp㐮㐳㑂tcy;䑌Ā;b㐸㐹䀯Ā;a㐾㐿槄r;挿f;쀀𝕤aĀdr㑍ЂesĀ;u㑔㑕晠it»㑕ƀcsu㑠㑹㒟Āau㑥㑯pĀ;sᆈ㑫;쀀⊓︀pĀ;sᆴ㑵;쀀⊔︀uĀbp㑿㒏ƀ;esᆗᆜ㒆etĀ;eᆗ㒍ñᆝƀ;esᆨᆭ㒖etĀ;eᆨ㒝ñᆮƀ;afᅻ㒦ְrť㒫ֱ»ᅼaròᅈȀcemt㒹㒾㓂㓅r;쀀𝓈tmîñiì㐕aræᆾĀar㓎㓕rĀ;f㓔ឿ昆Āan㓚㓭ightĀep㓣㓪psiloîỠhé⺯s»⡒ʀbcmnp㓻㕞ሉ㖋㖎Ҁ;Edemnprs㔎㔏㔑㔕㔞㔣㔬㔱㔶抂;櫅ot;檽Ā;dᇚ㔚ot;櫃ult;櫁ĀEe㔨㔪;櫋;把lus;檿arr;楹ƀeiu㔽㕒㕕tƀ;en㔎㕅㕋qĀ;qᇚ㔏eqĀ;q㔫㔨m;櫇Ābp㕚㕜;櫕;櫓c̀;acensᇭ㕬㕲㕹㕻㌦pproø㋺urlyeñᇾñᇳƀaes㖂㖈㌛pproø㌚qñ㌗g;晪ڀ123;Edehlmnps㖩㖬㖯ሜ㖲㖴㗀㗉㗕㗚㗟㗨㗭耻¹䂹耻²䂲耻³䂳;櫆Āos㖹㖼t;檾ub;櫘Ā;dሢ㗅ot;櫄sĀou㗏㗒l;柉b;櫗arr;楻ult;櫂ĀEe㗤㗦;櫌;抋lus;櫀ƀeiu㗴㘉㘌tƀ;enሜ㗼㘂qĀ;qሢ㖲eqĀ;q㗧㗤m;櫈Ābp㘑㘓;櫔;櫖ƀAan㘜㘠㘭rr;懙rĀhr㘦㘨ë∮Ā;oਫ਩war;椪lig耻ß䃟௡㙑㙝㙠ዎ㙳㙹\0㙾㛂\0\0\0\0\0㛛㜃\0㜉㝬\0\0\0㞇ɲ㙖\0\0㙛get;挖;䏄rë๟ƀaey㙦㙫㙰ron;䅥dil;䅣;䑂lrec;挕r;쀀𝔱Ȁeiko㚆㚝㚵㚼Dz㚋\0㚑eĀ4fኄኁaƀ;sv㚘㚙㚛䎸ym;䏑Ācn㚢㚲kĀas㚨㚮pproø዁im»ኬsðኞĀas㚺㚮ð዁rn耻þ䃾Ǭ̟㛆⋧es膀×;bd㛏㛐㛘䃗Ā;aᤏ㛕r;樱;樰ƀeps㛡㛣㜀á⩍Ȁ;bcf҆㛬㛰㛴ot;挶ir;櫱Ā;o㛹㛼쀀𝕥rk;櫚á㍢rime;怴ƀaip㜏㜒㝤dåቈ΀adempst㜡㝍㝀㝑㝗㝜㝟ngleʀ;dlqr㜰㜱㜶㝀㝂斵own»ᶻeftĀ;e⠀㜾ñम;扜ightĀ;e㊪㝋ñၚot;旬inus;樺lus;樹b;槍ime;樻ezium;揢ƀcht㝲㝽㞁Āry㝷㝻;쀀𝓉;䑆cy;䑛rok;䅧Āio㞋㞎xô᝷headĀlr㞗㞠eftarro÷ࡏightarrow»ཝऀAHabcdfghlmoprstuw㟐㟓㟗㟤㟰㟼㠎㠜㠣㠴㡑㡝㡫㢩㣌㣒㣪㣶ròϭar;楣Ācr㟜㟢ute耻ú䃺òᅐrǣ㟪\0㟭y;䑞ve;䅭Āiy㟵㟺rc耻û䃻;䑃ƀabh㠃㠆㠋ròᎭlac;䅱aòᏃĀir㠓㠘sht;楾;쀀𝔲rave耻ù䃹š㠧㠱rĀlr㠬㠮»ॗ»ႃlk;斀Āct㠹㡍ɯ㠿\0\0㡊rnĀ;e㡅㡆挜r»㡆op;挏ri;旸Āal㡖㡚cr;䅫肻¨͉Āgp㡢㡦on;䅳f;쀀𝕦̀adhlsuᅋ㡸㡽፲㢑㢠ownáᎳarpoonĀlr㢈㢌efô㠭ighô㠯iƀ;hl㢙㢚㢜䏅»ᏺon»㢚parrows;懈ƀcit㢰㣄㣈ɯ㢶\0\0㣁rnĀ;e㢼㢽挝r»㢽op;挎ng;䅯ri;旹cr;쀀𝓊ƀdir㣙㣝㣢ot;拰lde;䅩iĀ;f㜰㣨»᠓Āam㣯㣲rò㢨l耻ü䃼angle;榧ހABDacdeflnoprsz㤜㤟㤩㤭㦵㦸㦽㧟㧤㧨㧳㧹㧽㨁㨠ròϷarĀ;v㤦㤧櫨;櫩asèϡĀnr㤲㤷grt;榜΀eknprst㓣㥆㥋㥒㥝㥤㦖appá␕othinçẖƀhir㓫⻈㥙opô⾵Ā;hᎷ㥢ïㆍĀiu㥩㥭gmá㎳Ābp㥲㦄setneqĀ;q㥽㦀쀀⊊︀;쀀⫋︀setneqĀ;q㦏㦒쀀⊋︀;쀀⫌︀Āhr㦛㦟etá㚜iangleĀlr㦪㦯eft»थight»ၑy;䐲ash»ံƀelr㧄㧒㧗ƀ;beⷪ㧋㧏ar;抻q;扚lip;拮Ābt㧜ᑨaòᑩr;쀀𝔳tré㦮suĀbp㧯㧱»ജ»൙pf;쀀𝕧roð໻tré㦴Ācu㨆㨋r;쀀𝓋Ābp㨐㨘nĀEe㦀㨖»㥾nĀEe㦒㨞»㦐igzag;榚΀cefoprs㨶㨻㩖㩛㩔㩡㩪irc;䅵Ādi㩀㩑Ābg㩅㩉ar;機eĀ;qᗺ㩏;扙erp;愘r;쀀𝔴pf;쀀𝕨Ā;eᑹ㩦atèᑹcr;쀀𝓌ૣណ㪇\0㪋\0㪐㪛\0\0㪝㪨㪫㪯\0\0㫃㫎\0㫘ៜ៟tré៑r;쀀𝔵ĀAa㪔㪗ròσrò৶;䎾ĀAa㪡㪤ròθrò৫að✓is;拻ƀdptឤ㪵㪾Āfl㪺ឩ;쀀𝕩imåឲĀAa㫇㫊ròώròਁĀcq㫒ីr;쀀𝓍Āpt៖㫜ré។Ѐacefiosu㫰㫽㬈㬌㬑㬕㬛㬡cĀuy㫶㫻te耻ý䃽;䑏Āiy㬂㬆rc;䅷;䑋n耻¥䂥r;쀀𝔶cy;䑗pf;쀀𝕪cr;쀀𝓎Ācm㬦㬩y;䑎l耻ÿ䃿Ԁacdefhiosw㭂㭈㭔㭘㭤㭩㭭㭴㭺㮀cute;䅺Āay㭍㭒ron;䅾;䐷ot;䅼Āet㭝㭡træᕟa;䎶r;쀀𝔷cy;䐶grarr;懝pf;쀀𝕫cr;쀀𝓏Ājn㮅㮇;怍j;怌'.split("").map(e=>e.charCodeAt(0))),g5=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 y5(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=g5.get(e))!==null&&t!==void 0?t:e}var dn;(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"})(dn||(dn={}));const E5=32;var Fi;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})(Fi||(Fi={}));function Ah(e){return e>=dn.ZERO&&e<=dn.NINE}function b5(e){return e>=dn.UPPER_A&&e<=dn.UPPER_F||e>=dn.LOWER_A&&e<=dn.LOWER_F}function w5(e){return e>=dn.UPPER_A&&e<=dn.UPPER_Z||e>=dn.LOWER_A&&e<=dn.LOWER_Z||Ah(e)}function x5(e){return e===dn.EQUALS||w5(e)}var fn;(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"})(fn||(fn={}));var li;(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(li||(li={}));class T5{constructor(t,n,r){this.decodeTree=t,this.emitCodePoint=n,this.errors=r,this.state=fn.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=li.Strict}startEntity(t){this.decodeMode=t,this.state=fn.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,n){switch(this.state){case fn.EntityStart:return t.charCodeAt(n)===dn.NUM?(this.state=fn.NumericStart,this.consumed+=1,this.stateNumericStart(t,n+1)):(this.state=fn.NamedEntity,this.stateNamedEntity(t,n));case fn.NumericStart:return this.stateNumericStart(t,n);case fn.NumericDecimal:return this.stateNumericDecimal(t,n);case fn.NumericHex:return this.stateNumericHex(t,n);case fn.NamedEntity:return this.stateNamedEntity(t,n)}}stateNumericStart(t,n){return n>=t.length?-1:(t.charCodeAt(n)|E5)===dn.LOWER_X?(this.state=fn.NumericHex,this.consumed+=1,this.stateNumericHex(t,n+1)):(this.state=fn.NumericDecimal,this.stateNumericDecimal(t,n))}addToNumericResult(t,n,r,i){if(n!==r){const s=r-n;this.result=this.result*Math.pow(i,s)+Number.parseInt(t.substr(n,s),i),this.consumed+=s}}stateNumericHex(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ah(i)||b5(i))n+=1;else return this.addToNumericResult(t,r,n,16),this.emitNumericEntity(i,3)}return this.addToNumericResult(t,r,n,16),-1}stateNumericDecimal(t,n){const r=n;for(;n<t.length;){const i=t.charCodeAt(n);if(Ah(i))n+=1;else return this.addToNumericResult(t,r,n,10),this.emitNumericEntity(i,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===dn.SEMI)this.consumed+=1;else if(this.decodeMode===li.Strict)return 0;return this.emitCodePoint(y5(this.result),this.consumed),this.errors&&(t!==dn.SEMI&&this.errors.missingSemicolonAfterCharacterReference(),this.errors.validateNumericCharacterReference(this.result)),this.consumed}stateNamedEntity(t,n){const{decodeTree:r}=this;let i=r[this.treeIndex],s=(i&Fi.VALUE_LENGTH)>>14;for(;n<t.length;n++,this.excess++){const u=t.charCodeAt(n);if(this.treeIndex=_5(r,i,this.treeIndex+Math.max(1,s),u),this.treeIndex<0)return this.result===0||this.decodeMode===li.Attribute&&(s===0||x5(u))?0:this.emitNotTerminatedNamedEntity();if(i=r[this.treeIndex],s=(i&Fi.VALUE_LENGTH)>>14,s!==0){if(u===dn.SEMI)return this.emitNamedEntityData(this.treeIndex,s,this.consumed+this.excess);this.decodeMode!==li.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;const{result:n,decodeTree:r}=this,i=(r[n]&Fi.VALUE_LENGTH)>>14;return this.emitNamedEntityData(n,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,n,r){const{decodeTree:i}=this;return this.emitCodePoint(n===1?i[t]&~Fi.VALUE_LENGTH:i[t+1],r),n===3&&this.emitCodePoint(i[t+2],r),r}end(){var t;switch(this.state){case fn.NamedEntity:return this.result!==0&&(this.decodeMode!==li.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case fn.NumericDecimal:return this.emitNumericEntity(0,2);case fn.NumericHex:return this.emitNumericEntity(0,3);case fn.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case fn.EntityStart:return 0}}}function _5(e,t,n,r){const i=(t&Fi.BRANCH_LENGTH)>>7,s=t&Fi.JUMP_TABLE;if(i===0)return s!==0&&r===s?n:-1;if(s){const d=r-s;return d<0||d>=i?-1:e[n+d]-1}let u=n,c=u+i-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+i]}return-1}var we;(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/"})(we||(we={}));var Mo;(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"})(Mo||(Mo={}));var mr;(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(mr||(mr={}));var ne;(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"})(ne||(ne={}));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 v5=new Map([[ne.A,g.A],[ne.ADDRESS,g.ADDRESS],[ne.ANNOTATION_XML,g.ANNOTATION_XML],[ne.APPLET,g.APPLET],[ne.AREA,g.AREA],[ne.ARTICLE,g.ARTICLE],[ne.ASIDE,g.ASIDE],[ne.B,g.B],[ne.BASE,g.BASE],[ne.BASEFONT,g.BASEFONT],[ne.BGSOUND,g.BGSOUND],[ne.BIG,g.BIG],[ne.BLOCKQUOTE,g.BLOCKQUOTE],[ne.BODY,g.BODY],[ne.BR,g.BR],[ne.BUTTON,g.BUTTON],[ne.CAPTION,g.CAPTION],[ne.CENTER,g.CENTER],[ne.CODE,g.CODE],[ne.COL,g.COL],[ne.COLGROUP,g.COLGROUP],[ne.DD,g.DD],[ne.DESC,g.DESC],[ne.DETAILS,g.DETAILS],[ne.DIALOG,g.DIALOG],[ne.DIR,g.DIR],[ne.DIV,g.DIV],[ne.DL,g.DL],[ne.DT,g.DT],[ne.EM,g.EM],[ne.EMBED,g.EMBED],[ne.FIELDSET,g.FIELDSET],[ne.FIGCAPTION,g.FIGCAPTION],[ne.FIGURE,g.FIGURE],[ne.FONT,g.FONT],[ne.FOOTER,g.FOOTER],[ne.FOREIGN_OBJECT,g.FOREIGN_OBJECT],[ne.FORM,g.FORM],[ne.FRAME,g.FRAME],[ne.FRAMESET,g.FRAMESET],[ne.H1,g.H1],[ne.H2,g.H2],[ne.H3,g.H3],[ne.H4,g.H4],[ne.H5,g.H5],[ne.H6,g.H6],[ne.HEAD,g.HEAD],[ne.HEADER,g.HEADER],[ne.HGROUP,g.HGROUP],[ne.HR,g.HR],[ne.HTML,g.HTML],[ne.I,g.I],[ne.IMG,g.IMG],[ne.IMAGE,g.IMAGE],[ne.INPUT,g.INPUT],[ne.IFRAME,g.IFRAME],[ne.KEYGEN,g.KEYGEN],[ne.LABEL,g.LABEL],[ne.LI,g.LI],[ne.LINK,g.LINK],[ne.LISTING,g.LISTING],[ne.MAIN,g.MAIN],[ne.MALIGNMARK,g.MALIGNMARK],[ne.MARQUEE,g.MARQUEE],[ne.MATH,g.MATH],[ne.MENU,g.MENU],[ne.META,g.META],[ne.MGLYPH,g.MGLYPH],[ne.MI,g.MI],[ne.MO,g.MO],[ne.MN,g.MN],[ne.MS,g.MS],[ne.MTEXT,g.MTEXT],[ne.NAV,g.NAV],[ne.NOBR,g.NOBR],[ne.NOFRAMES,g.NOFRAMES],[ne.NOEMBED,g.NOEMBED],[ne.NOSCRIPT,g.NOSCRIPT],[ne.OBJECT,g.OBJECT],[ne.OL,g.OL],[ne.OPTGROUP,g.OPTGROUP],[ne.OPTION,g.OPTION],[ne.P,g.P],[ne.PARAM,g.PARAM],[ne.PLAINTEXT,g.PLAINTEXT],[ne.PRE,g.PRE],[ne.RB,g.RB],[ne.RP,g.RP],[ne.RT,g.RT],[ne.RTC,g.RTC],[ne.RUBY,g.RUBY],[ne.S,g.S],[ne.SCRIPT,g.SCRIPT],[ne.SEARCH,g.SEARCH],[ne.SECTION,g.SECTION],[ne.SELECT,g.SELECT],[ne.SOURCE,g.SOURCE],[ne.SMALL,g.SMALL],[ne.SPAN,g.SPAN],[ne.STRIKE,g.STRIKE],[ne.STRONG,g.STRONG],[ne.STYLE,g.STYLE],[ne.SUB,g.SUB],[ne.SUMMARY,g.SUMMARY],[ne.SUP,g.SUP],[ne.TABLE,g.TABLE],[ne.TBODY,g.TBODY],[ne.TEMPLATE,g.TEMPLATE],[ne.TEXTAREA,g.TEXTAREA],[ne.TFOOT,g.TFOOT],[ne.TD,g.TD],[ne.TH,g.TH],[ne.THEAD,g.THEAD],[ne.TITLE,g.TITLE],[ne.TR,g.TR],[ne.TRACK,g.TRACK],[ne.TT,g.TT],[ne.U,g.U],[ne.UL,g.UL],[ne.SVG,g.SVG],[ne.VAR,g.VAR],[ne.WBR,g.WBR],[ne.XMP,g.XMP]]);function Ms(e){var t;return(t=v5.get(e))!==null&&t!==void 0?t:g.UNKNOWN}const Te=g,S5={[we.HTML]:new Set([Te.ADDRESS,Te.APPLET,Te.AREA,Te.ARTICLE,Te.ASIDE,Te.BASE,Te.BASEFONT,Te.BGSOUND,Te.BLOCKQUOTE,Te.BODY,Te.BR,Te.BUTTON,Te.CAPTION,Te.CENTER,Te.COL,Te.COLGROUP,Te.DD,Te.DETAILS,Te.DIR,Te.DIV,Te.DL,Te.DT,Te.EMBED,Te.FIELDSET,Te.FIGCAPTION,Te.FIGURE,Te.FOOTER,Te.FORM,Te.FRAME,Te.FRAMESET,Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6,Te.HEAD,Te.HEADER,Te.HGROUP,Te.HR,Te.HTML,Te.IFRAME,Te.IMG,Te.INPUT,Te.LI,Te.LINK,Te.LISTING,Te.MAIN,Te.MARQUEE,Te.MENU,Te.META,Te.NAV,Te.NOEMBED,Te.NOFRAMES,Te.NOSCRIPT,Te.OBJECT,Te.OL,Te.P,Te.PARAM,Te.PLAINTEXT,Te.PRE,Te.SCRIPT,Te.SECTION,Te.SELECT,Te.SOURCE,Te.STYLE,Te.SUMMARY,Te.TABLE,Te.TBODY,Te.TD,Te.TEMPLATE,Te.TEXTAREA,Te.TFOOT,Te.TH,Te.THEAD,Te.TITLE,Te.TR,Te.TRACK,Te.UL,Te.WBR,Te.XMP]),[we.MATHML]:new Set([Te.MI,Te.MO,Te.MN,Te.MS,Te.MTEXT,Te.ANNOTATION_XML]),[we.SVG]:new Set([Te.TITLE,Te.FOREIGN_OBJECT,Te.DESC]),[we.XLINK]:new Set,[we.XML]:new Set,[we.XMLNS]:new Set},kh=new Set([Te.H1,Te.H2,Te.H3,Te.H4,Te.H5,Te.H6]);ne.STYLE,ne.SCRIPT,ne.XMP,ne.IFRAME,ne.NOEMBED,ne.NOFRAMES,ne.PLAINTEXT;var F;(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"})(F||(F={}));const Zt={DATA:F.DATA,RCDATA:F.RCDATA,RAWTEXT:F.RAWTEXT,SCRIPT_DATA:F.SCRIPT_DATA,PLAINTEXT:F.PLAINTEXT,CDATA_SECTION:F.CDATA_SECTION};function A5(e){return e>=L.DIGIT_0&&e<=L.DIGIT_9}function du(e){return e>=L.LATIN_CAPITAL_A&&e<=L.LATIN_CAPITAL_Z}function k5(e){return e>=L.LATIN_SMALL_A&&e<=L.LATIN_SMALL_Z}function Bi(e){return k5(e)||du(e)}function Aw(e){return Bi(e)||A5(e)}function _l(e){return e+32}function kw(e){return e===L.SPACE||e===L.LINE_FEED||e===L.TABULATION||e===L.FORM_FEED}function Cw(e){return kw(e)||e===L.SOLIDUS||e===L.GREATER_THAN_SIGN}function C5(e){return e===L.NULL?le.nullCharacterReference:e>1114111?le.characterReferenceOutsideUnicodeRange:Tw(e)?le.surrogateCharacterReference:vw(e)?le.noncharacterCharacterReference:_w(e)||e===L.CARRIAGE_RETURN?le.controlCharacterReference:null}class N5{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=F.DATA,this.returnState=F.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new h5(n),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new T5(m5,(r,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(r)},n.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(le.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:r=>{this._err(le.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+r)},validateNumericCharacterReference:r=>{const i=C5(r);i&&this._err(i,1)}}:void 0)}_err(t,n=0){var r,i;(i=(r=this.handler).onParseError)===null||i===void 0||i.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:pt.START_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(1)}}_createEndTagToken(){this.currentToken={type:pt.END_TAG,tagName:"",tagID:g.UNKNOWN,selfClosing:!1,ackSelfClosing:!1,attrs:[],location:this.getCurrentLocation(2)}}_createCommentToken(t){this.currentToken={type:pt.COMMENT,data:"",location:this.getCurrentLocation(t)}}_createDoctypeToken(t){this.currentToken={type:pt.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(Sw(r,this.currentAttr.name)===null){if(r.attrs.push(this.currentAttr),r.location&&this.currentLocation){const i=(t=(n=r.location).attrs)!==null&&t!==void 0?t:n.attrs=Object.create(null);i[this.currentAttr.name]=this.currentLocation,this._leaveAttrValue()}}else this._err(le.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=Ms(t.tagName),t.type===pt.START_TAG?(this.lastStartTagName=t.tagName,this.handler.onStartTag(t)):(t.attrs.length>0&&this._err(le.endTagWithAttributes),t.selfClosing&&this._err(le.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 pt.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case pt.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case pt.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:pt.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=kw(t)?pt.WHITESPACE_CHARACTER:t===L.NULL?pt.NULL_CHARACTER:pt.CHARACTER;this._appendCharToCurrentCharacterToken(n,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(pt.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=F.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?li.Attribute:li.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===F.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===F.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case F.DATA:{this._stateData(t);break}case F.RCDATA:{this._stateRcdata(t);break}case F.RAWTEXT:{this._stateRawtext(t);break}case F.SCRIPT_DATA:{this._stateScriptData(t);break}case F.PLAINTEXT:{this._statePlaintext(t);break}case F.TAG_OPEN:{this._stateTagOpen(t);break}case F.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case F.TAG_NAME:{this._stateTagName(t);break}case F.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case F.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case F.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case F.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case F.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case F.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case F.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case F.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case F.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case F.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case F.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case F.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case F.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case F.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case F.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case F.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case F.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case F.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case F.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case F.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case F.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case F.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case F.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case F.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case F.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case F.BOGUS_COMMENT:{this._stateBogusComment(t);break}case F.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case F.COMMENT_START:{this._stateCommentStart(t);break}case F.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case F.COMMENT:{this._stateComment(t);break}case F.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case F.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case F.COMMENT_END:{this._stateCommentEnd(t);break}case F.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case F.DOCTYPE:{this._stateDoctype(t);break}case F.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case F.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case F.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case F.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case F.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case F.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case F.CDATA_SECTION:{this._stateCdataSection(t);break}case F.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case F.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case F.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case F.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.TAG_OPEN;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitCodePoint(t);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case L.AMPERSAND:{this._startCharacterReference();break}case L.LESS_THAN_SIGN:{this.state=F.RCDATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.RAWTEXT_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Bi(t))this._createStartTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case L.EXCLAMATION_MARK:{this.state=F.MARKUP_DECLARATION_OPEN;break}case L.SOLIDUS:{this.state=F.END_TAG_OPEN;break}case L.QUESTION_MARK:{this._err(le.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t);break}case L.EOF:{this._err(le.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=F.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Bi(t))this._createEndTagToken(),this.state=F.TAG_NAME,this._stateTagName(t);else switch(t){case L.GREATER_THAN_SIGN:{this._err(le.missingEndTagName),this.state=F.DATA;break}case L.EOF:{this._err(le.eofBeforeTagName),this._emitChars("</"),this._emitEOFToken();break}default:this._err(le.invalidFirstCharacterOfTagName),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t)}}_stateTagName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.tagName+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:n.tagName+=String.fromCodePoint(du(t)?_l(t):t)}}_stateRcdataLessThanSign(t){t===L.SOLIDUS?this.state=F.RCDATA_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRcdataEndTagOpen(t){Bi(t)?(this.state=F.RCDATA_END_TAG_NAME,this._stateRcdataEndTagName(t)):(this._emitChars("</"),this.state=F.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:return this._advanceBy(this.lastStartTagName.length),this.state=F.BEFORE_ATTRIBUTE_NAME,!1;case L.SOLIDUS:return this._advanceBy(this.lastStartTagName.length),this.state=F.SELF_CLOSING_START_TAG,!1;case L.GREATER_THAN_SIGN:return this._advanceBy(this.lastStartTagName.length),this.emitCurrentTagToken(),this.state=F.DATA,!1;default:return!this._ensureHibernation()}}_stateRcdataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RCDATA,this._stateRcdata(t))}_stateRawtextLessThanSign(t){t===L.SOLIDUS?this.state=F.RAWTEXT_END_TAG_OPEN:(this._emitChars("<"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagOpen(t){Bi(t)?(this.state=F.RAWTEXT_END_TAG_NAME,this._stateRawtextEndTagName(t)):(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateRawtextEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.RAWTEXT,this._stateRawtext(t))}_stateScriptDataLessThanSign(t){switch(t){case L.SOLIDUS:{this.state=F.SCRIPT_DATA_END_TAG_OPEN;break}case L.EXCLAMATION_MARK:{this.state=F.SCRIPT_DATA_ESCAPE_START,this._emitChars("<!");break}default:this._emitChars("<"),this.state=F.SCRIPT_DATA,this._stateScriptData(t)}}_stateScriptDataEndTagOpen(t){Bi(t)?(this.state=F.SCRIPT_DATA_END_TAG_NAME,this._stateScriptDataEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStart(t){t===L.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPE_START_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscapeStartDash(t){t===L.HYPHEN_MINUS?(this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-")):(this.state=F.SCRIPT_DATA,this._stateScriptData(t))}_stateScriptDataEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN;break}case L.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===L.SOLIDUS?this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Bi(t)?(this._emitChars("<"),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Bi(t)?(this.state=F.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagName(t){this.handleSpecialEndTag(t)&&(this._emitChars("</"),this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscapeStart(t){if(this.preprocessor.startsWith(Vn.SCRIPT,!1)&&Cw(this.preprocessor.peek(Vn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataDoubleEscaped(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDash(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH,this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedDashDash(t){switch(t){case L.HYPHEN_MINUS:{this._emitChars("-");break}case L.LESS_THAN_SIGN:{this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN,this._emitChars("<");break}case L.GREATER_THAN_SIGN:{this.state=F.SCRIPT_DATA,this._emitChars(">");break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(Bt);break}case L.EOF:{this._err(le.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===L.SOLIDUS?(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Vn.SCRIPT,!1)&&Cw(this.preprocessor.peek(Vn.SCRIPT.length))){this._emitCodePoint(t);for(let n=0;n<Vn.SCRIPT.length;n++)this._emitCodePoint(this._consume());this.state=F.SCRIPT_DATA_ESCAPED}else this._ensureHibernation()||(this.state=F.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateBeforeAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._err(le.unexpectedEqualsSignBeforeAttributeName),this._createAttr("="),this.state=F.ATTRIBUTE_NAME;break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:case L.SOLIDUS:case L.GREATER_THAN_SIGN:case L.EOF:{this._leaveAttrName(),this.state=F.AFTER_ATTRIBUTE_NAME,this._stateAfterAttributeName(t);break}case L.EQUALS_SIGN:{this._leaveAttrName(),this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:{this._err(le.unexpectedCharacterInAttributeName),this.currentAttr.name+=String.fromCodePoint(t);break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.name+=Bt;break}default:this.currentAttr.name+=String.fromCodePoint(du(t)?_l(t):t)}}_stateAfterAttributeName(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.SOLIDUS:{this.state=F.SELF_CLOSING_START_TAG;break}case L.EQUALS_SIGN:{this.state=F.BEFORE_ATTRIBUTE_VALUE;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._createAttr(""),this.state=F.ATTRIBUTE_NAME,this._stateAttributeName(t)}}_stateBeforeAttributeValue(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{this.state=F.ATTRIBUTE_VALUE_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this.state=F.ATTRIBUTE_VALUE_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingAttributeValue),this.state=F.DATA,this.emitCurrentTagToken();break}default:this.state=F.ATTRIBUTE_VALUE_UNQUOTED,this._stateAttributeValueUnquoted(t)}}_stateAttributeValueDoubleQuoted(t){switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueSingleQuoted(t){switch(t){case L.APOSTROPHE:{this.state=F.AFTER_ATTRIBUTE_VALUE_QUOTED;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAttributeValueUnquoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.AMPERSAND:{this._startCharacterReference();break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),this.currentAttr.value+=Bt;break}case L.QUOTATION_MARK:case L.APOSTROPHE:case L.LESS_THAN_SIGN:case L.EQUALS_SIGN:case L.GRAVE_ACCENT:{this._err(le.unexpectedCharacterInUnquotedAttributeValue),this.currentAttr.value+=String.fromCodePoint(t);break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this.currentAttr.value+=String.fromCodePoint(t)}}_stateAfterAttributeValueQuoted(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this._leaveAttrValue(),this.state=F.BEFORE_ATTRIBUTE_NAME;break}case L.SOLIDUS:{this._leaveAttrValue(),this.state=F.SELF_CLOSING_START_TAG;break}case L.GREATER_THAN_SIGN:{this._leaveAttrValue(),this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBetweenAttributes),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateSelfClosingStartTag(t){switch(t){case L.GREATER_THAN_SIGN:{const n=this.currentToken;n.selfClosing=!0,this.state=F.DATA,this.emitCurrentTagToken();break}case L.EOF:{this._err(le.eofInTag),this._emitEOFToken();break}default:this._err(le.unexpectedSolidusInTag),this.state=F.BEFORE_ATTRIBUTE_NAME,this._stateBeforeAttributeName(t)}}_stateBogusComment(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this.emitCurrentComment(n),this._emitEOFToken();break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Bt;break}default:n.data+=String.fromCodePoint(t)}}_stateMarkupDeclarationOpen(t){this._consumeSequenceIfMatch(Vn.DASH_DASH,!0)?(this._createCommentToken(Vn.DASH_DASH.length+1),this.state=F.COMMENT_START):this._consumeSequenceIfMatch(Vn.DOCTYPE,!1)?(this.currentLocation=this.getCurrentLocation(Vn.DOCTYPE.length+1),this.state=F.DOCTYPE):this._consumeSequenceIfMatch(Vn.CDATA_START,!0)?this.inForeignNode?this.state=F.CDATA_SECTION:(this._err(le.cdataInHtmlContent),this._createCommentToken(Vn.CDATA_START.length+1),this.currentToken.data="[CDATA[",this.state=F.BOGUS_COMMENT):this._ensureHibernation()||(this._err(le.incorrectlyOpenedComment),this._createCommentToken(2),this.state=F.BOGUS_COMMENT,this._stateBogusComment(t))}_stateCommentStart(t){switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_START_DASH;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=F.DATA;const n=this.currentToken;this.emitCurrentComment(n);break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentStartDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptClosingOfEmptyComment),this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateComment(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END_DASH;break}case L.LESS_THAN_SIGN:{n.data+="<",this.state=F.COMMENT_LESS_THAN_SIGN;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.data+=Bt;break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+=String.fromCodePoint(t)}}_stateCommentLessThanSign(t){const n=this.currentToken;switch(t){case L.EXCLAMATION_MARK:{n.data+="!",this.state=F.COMMENT_LESS_THAN_SIGN_BANG;break}case L.LESS_THAN_SIGN:{n.data+="<";break}default:this.state=F.COMMENT,this._stateComment(t)}}_stateCommentLessThanSignBang(t){t===L.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH:(this.state=F.COMMENT,this._stateComment(t))}_stateCommentLessThanSignBangDash(t){t===L.HYPHEN_MINUS?this.state=F.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:(this.state=F.COMMENT_END_DASH,this._stateCommentEndDash(t))}_stateCommentLessThanSignBangDashDash(t){t!==L.GREATER_THAN_SIGN&&t!==L.EOF&&this._err(le.nestedComment),this.state=F.COMMENT_END,this._stateCommentEnd(t)}_stateCommentEndDash(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{this.state=F.COMMENT_END;break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="-",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEnd(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentComment(n);break}case L.EXCLAMATION_MARK:{this.state=F.COMMENT_END_BANG;break}case L.HYPHEN_MINUS:{n.data+="-";break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--",this.state=F.COMMENT,this._stateComment(t)}}_stateCommentEndBang(t){const n=this.currentToken;switch(t){case L.HYPHEN_MINUS:{n.data+="--!",this.state=F.COMMENT_END_DASH;break}case L.GREATER_THAN_SIGN:{this._err(le.incorrectlyClosedComment),this.state=F.DATA,this.emitCurrentComment(n);break}case L.EOF:{this._err(le.eofInComment),this.emitCurrentComment(n),this._emitEOFToken();break}default:n.data+="--!",this.state=F.COMMENT,this._stateComment(t)}}_stateDoctype(t){switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t);break}case L.EOF:{this._err(le.eofInDoctype),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingWhitespaceBeforeDoctypeName),this.state=F.BEFORE_DOCTYPE_NAME,this._stateBeforeDoctypeName(t)}}_stateBeforeDoctypeName(t){if(du(t))this._createDoctypeToken(String.fromCharCode(_l(t))),this.state=F.DOCTYPE_NAME;else switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.NULL:{this._err(le.unexpectedNullCharacter),this._createDoctypeToken(Bt),this.state=F.DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeName),this._createDoctypeToken(null);const n=this.currentToken;n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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=F.DOCTYPE_NAME}}_stateDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.AFTER_DOCTYPE_NAME;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.name+=Bt;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:n.name+=String.fromCodePoint(du(t)?_l(t):t)}}_stateAfterDoctypeName(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._consumeSequenceIfMatch(Vn.PUBLIC,!1)?this.state=F.AFTER_DOCTYPE_PUBLIC_KEYWORD:this._consumeSequenceIfMatch(Vn.SYSTEM,!1)?this.state=F.AFTER_DOCTYPE_SYSTEM_KEYWORD:this._ensureHibernation()||(this._err(le.invalidCharacterSequenceAfterDoctypeName),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t))}}_stateAfterDoctypePublicKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypePublicKeyword),n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypePublicIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.publicId="",this.state=F.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypePublicIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypePublicIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_PUBLIC_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.publicId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypePublicIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS;break}case L.GREATER_THAN_SIGN:{this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBetweenDoctypePublicAndSystemIdentifiers(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateAfterDoctypeSystemKeyword(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:{this.state=F.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.QUOTATION_MARK:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{this._err(le.missingWhitespaceAfterDoctypeSystemKeyword),n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBeforeDoctypeSystemIdentifier(t){const n=this.currentToken;switch(t){case L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.QUOTATION_MARK:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED;break}case L.APOSTROPHE:{n.systemId="",this.state=F.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED;break}case L.GREATER_THAN_SIGN:{this._err(le.missingDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.DATA,this.emitCurrentDoctype(n);break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.missingQuoteBeforeDoctypeSystemIdentifier),n.forceQuirks=!0,this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateDoctypeSystemIdentifierDoubleQuoted(t){const n=this.currentToken;switch(t){case L.QUOTATION_MARK:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.APOSTROPHE:{this.state=F.AFTER_DOCTYPE_SYSTEM_IDENTIFIER;break}case L.NULL:{this._err(le.unexpectedNullCharacter),n.systemId+=Bt;break}case L.GREATER_THAN_SIGN:{this._err(le.abruptDoctypeSystemIdentifier),n.forceQuirks=!0,this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.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 L.SPACE:case L.LINE_FEED:case L.TABULATION:case L.FORM_FEED:break;case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.EOF:{this._err(le.eofInDoctype),n.forceQuirks=!0,this.emitCurrentDoctype(n),this._emitEOFToken();break}default:this._err(le.unexpectedCharacterAfterDoctypeSystemIdentifier),this.state=F.BOGUS_DOCTYPE,this._stateBogusDoctype(t)}}_stateBogusDoctype(t){const n=this.currentToken;switch(t){case L.GREATER_THAN_SIGN:{this.emitCurrentDoctype(n),this.state=F.DATA;break}case L.NULL:{this._err(le.unexpectedNullCharacter);break}case L.EOF:{this.emitCurrentDoctype(n),this._emitEOFToken();break}}}_stateCdataSection(t){switch(t){case L.RIGHT_SQUARE_BRACKET:{this.state=F.CDATA_SECTION_BRACKET;break}case L.EOF:{this._err(le.eofInCdata),this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateCdataSectionBracket(t){t===L.RIGHT_SQUARE_BRACKET?this.state=F.CDATA_SECTION_END:(this._emitChars("]"),this.state=F.CDATA_SECTION,this._stateCdataSection(t))}_stateCdataSectionEnd(t){switch(t){case L.GREATER_THAN_SIGN:{this.state=F.DATA;break}case L.RIGHT_SQUARE_BRACKET:{this._emitChars("]");break}default:this._emitChars("]]"),this.state=F.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(L.AMPERSAND),this.state=!this._isCharacterReferenceInAttribute()&&Aw(this.preprocessor.peek(1))?F.AMBIGUOUS_AMPERSAND:this.returnState):this.state=this.returnState}_stateAmbiguousAmpersand(t){Aw(t)?this._flushCodePointConsumedAsCharacterReference(t):(t===L.SEMICOLON&&this._err(le.unknownNamedCharacterReference),this.state=this.returnState,this._callState(t))}}const Nw=new Set([g.DD,g.DT,g.LI,g.OPTGROUP,g.OPTION,g.P,g.RB,g.RP,g.RT,g.RTC]),Iw=new Set([...Nw,g.CAPTION,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]),vl=new Set([g.APPLET,g.CAPTION,g.HTML,g.MARQUEE,g.OBJECT,g.TABLE,g.TD,g.TEMPLATE,g.TH]),I5=new Set([...vl,g.OL,g.UL]),O5=new Set([...vl,g.BUTTON]),Ow=new Set([g.ANNOTATION_XML,g.MI,g.MN,g.MO,g.MS,g.MTEXT]),Pw=new Set([g.DESC,g.FOREIGN_OBJECT,g.TITLE]),P5=new Set([g.TR,g.TEMPLATE,g.HTML]),R5=new Set([g.TBODY,g.TFOOT,g.THEAD,g.TEMPLATE,g.HTML]),L5=new Set([g.TABLE,g.TEMPLATE,g.HTML]),D5=new Set([g.TD,g.TH]);class M5{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)===we.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 i=this._indexOf(t)+1;this.items.splice(i,0,n),this.tagIDs.splice(i,0,r),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.current&&this.currentTagId!==void 0&&this.handler.onItemPush(this.current,this.currentTagId,i===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])!==we.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(kh,we.HTML)}popUntilTableCellPopped(){this.popUntilPopped(D5,we.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(L5,we.HTML)}clearBackToTableBodyContext(){this.clearBackTo(R5,we.HTML)}clearBackToTableRowContext(){this.clearBackTo(P5,we.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 i=this.tagIDs[r];switch(this.treeAdapter.getNamespaceURI(this.items[r])){case we.HTML:{if(i===t)return!0;if(n.has(i))return!1;break}case we.SVG:{if(Pw.has(i))return!1;break}case we.MATHML:{if(Ow.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,vl)}hasInListItemScope(t){return this.hasInDynamicScope(t,I5)}hasInButtonScope(t){return this.hasInDynamicScope(t,O5)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){const n=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case we.HTML:{if(kh.has(n))return!0;if(vl.has(n))return!1;break}case we.SVG:{if(Pw.has(n))return!1;break}case we.MATHML:{if(Ow.has(n))return!1;break}}}return!0}hasInTableScope(t){for(let n=this.stackTop;n>=0;n--)if(this.treeAdapter.getNamespaceURI(this.items[n])===we.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])===we.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])===we.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&&Nw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;this.currentTagId!==void 0&&Iw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==void 0&&this.currentTagId!==t&&Iw.has(this.currentTagId);)this.pop()}}const Ch=3;var Xr;(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(Xr||(Xr={}));const Rw={type:Xr.Marker};class F5{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,n){const r=[],i=n.length,s=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===Xr.Marker)break;const{element:f}=d;if(this.treeAdapter.getTagName(f)===s&&this.treeAdapter.getNamespaceURI(f)===u){const h=this.treeAdapter.getAttrList(f);h.length===i&&r.push({idx:c,attrs:h})}}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 i=new Map(n.map(u=>[u.name,u.value]));let s=0;for(let u=0;u<r.length;u++){const c=r[u];c.attrs.every(d=>i.get(d.name)===d.value)&&(s+=1,s>=Ch&&this.entries.splice(c.idx,1))}}insertMarker(){this.entries.unshift(Rw)}pushElement(t,n){this._ensureNoahArkCondition(t),this.entries.unshift({type:Xr.Element,element:t,token:n})}insertElementAfterBookmark(t,n){const r=this.entries.indexOf(this.bookmark);this.entries.splice(r,0,{type:Xr.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(Rw);t===-1?this.entries.length=0:this.entries.splice(0,t+1)}getElementEntryInScopeWithTagName(t){const n=this.entries.find(r=>r.type===Xr.Marker||this.treeAdapter.getTagName(r.element)===t);return n&&n.type===Xr.Element?n:null}getElementEntry(t){return this.entries.find(n=>n.type===Xr.Element&&n.element===t)}}const Ui={createDocument(){return{nodeName:"#document",mode:mr.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 i=e.childNodes.find(s=>s.nodeName==="#documentType");if(i)i.name=t,i.publicId=n,i.systemId=r;else{const s={nodeName:"#documentType",name:t,publicId:n,systemId:r,parentNode:null};Ui.appendChild(e,s)}},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(Ui.isTextNode(n)){n.value+=t;return}}Ui.appendChild(e,Ui.createTextNode(t))},insertTextBefore(e,t,n){const r=e.childNodes[e.childNodes.indexOf(n)-1];r&&Ui.isTextNode(r)?r.value+=t:Ui.insertBefore(e,Ui.createTextNode(t),n)},adoptAttributes(e,t){const n=new Set(e.attrs.map(r=>r.name));for(let r=0;r<t.length;r++)n.has(t[r].name)||e.attrs.push(t[r])},getFirstChild(e){return e.childNodes[0]},getChildNodes(e){return e.childNodes},getParentNode(e){return e.parentNode},getAttrList(e){return e.attrs},getTagName(e){return e.tagName},getNamespaceURI(e){return e.namespaceURI},getTextNodeContent(e){return e.value},getCommentNodeContent(e){return e.data},getDocumentTypeNodeName(e){return e.name},getDocumentTypeNodePublicId(e){return e.publicId},getDocumentTypeNodeSystemId(e){return e.systemId},isTextNode(e){return e.nodeName==="#text"},isCommentNode(e){return e.nodeName==="#comment"},isDocumentTypeNode(e){return e.nodeName==="#documentType"},isElementNode(e){return Object.prototype.hasOwnProperty.call(e,"tagName")},setNodeSourceCodeLocation(e,t){e.sourceCodeLocation=t},getNodeSourceCodeLocation(e){return e.sourceCodeLocation},updateNodeSourceCodeLocation(e,t){e.sourceCodeLocation=M(M({},e.sourceCodeLocation),t)}},Lw="html",B5="about:legacy-compat",U5="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Dw=["+//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//"],j5=[...Dw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],H5=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Mw=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],$5=[...Mw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"];function Fw(e,t){return t.some(n=>e.startsWith(n))}function z5(e){return e.name===Lw&&e.publicId===null&&(e.systemId===null||e.systemId===B5)}function V5(e){if(e.name!==Lw)return mr.QUIRKS;const{systemId:t}=e;if(t&&t.toLowerCase()===U5)return mr.QUIRKS;let{publicId:n}=e;if(n!==null){if(n=n.toLowerCase(),H5.has(n))return mr.QUIRKS;let r=t===null?j5:Dw;if(Fw(n,r))return mr.QUIRKS;if(r=t===null?Mw:$5,Fw(n,r))return mr.LIMITED_QUIRKS}return mr.NO_QUIRKS}const Bw={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},q5="definitionurl",W5="definitionURL",Y5=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])),G5=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:we.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:we.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:we.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:we.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:we.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:we.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:we.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:we.XML}],["xml:space",{prefix:"xml",name:"space",namespace:we.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:we.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:we.XMLNS}]]),X5=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])),K5=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 Q5(e){const t=e.tagID;return t===g.FONT&&e.attrs.some(({name:r})=>r===Mo.COLOR||r===Mo.SIZE||r===Mo.FACE)||K5.has(t)}function Uw(e){for(let t=0;t<e.attrs.length;t++)if(e.attrs[t].name===q5){e.attrs[t].name=W5;break}}function jw(e){for(let t=0;t<e.attrs.length;t++){const n=Y5.get(e.attrs[t].name);n!=null&&(e.attrs[t].name=n)}}function Nh(e){for(let t=0;t<e.attrs.length;t++){const n=G5.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 J5(e){const t=X5.get(e.tagName);t!=null&&(e.tagName=t,e.tagID=Ms(e.tagName))}function Z5(e,t){return t===we.MATHML&&(e===g.MI||e===g.MO||e===g.MN||e===g.MS||e===g.MTEXT)}function eL(e,t,n){if(t===we.MATHML&&e===g.ANNOTATION_XML){for(let r=0;r<n.length;r++)if(n[r].name===Mo.ENCODING){const i=n[r].value.toLowerCase();return i===Bw.TEXT_HTML||i===Bw.APPLICATION_XML}}return t===we.SVG&&(e===g.FOREIGN_OBJECT||e===g.DESC||e===g.TITLE)}function tL(e,t,n,r){return(!r||r===we.HTML)&&eL(e,t,n)||(!r||r===we.MATHML)&&Z5(e,t)}const nL="hidden",rL=8,iL=3;var z;(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"})(z||(z={}));const oL={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Hw=new Set([g.TABLE,g.TBODY,g.TFOOT,g.THEAD,g.TR]),$w={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Ui,onParseError:null};class zw{constructor(t,n,r=null,i=null){this.fragmentContext=r,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=z.INITIAL,this.originalInsertionMode=z.INITIAL,this.headElement=null,this.formElement=null,this.currentNotInHTML=!1,this.tmplInsertionModeStack=[],this.pendingCharacterTokens=[],this.hasNonWhitespacePendingCharacterToken=!1,this.framesetOk=!0,this.skipNextNewLine=!1,this.fosterParentingEnabled=!1,this.options=M(M({},$w),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 N5(this.options,this),this.activeFormattingElements=new F5(this.treeAdapter),this.fragmentContextID=r?Ms(this.treeAdapter.getTagName(r)):g.UNKNOWN,this._setContextModes(r!=null?r:this.document,this.fragmentContextID),this.openElements=new M5(this.document,this.treeAdapter,this)}static parse(t,n){const r=new this(n);return r.tokenizer.write(t,!0),r.document}static getFragmentParser(t,n){const r=M(M({},$w),n);t!=null||(t=r.treeAdapter.createElement(ne.TEMPLATE,we.HTML,[]));const i=r.treeAdapter.createElement("documentmock",we.HTML,[]),s=new this(r,i,t);return s.fragmentContextID===g.TEMPLATE&&s.tmplInsertionModeStack.unshift(z.IN_TEMPLATE),s._initTokenizerForFragmentParsing(),s._insertFakeRootElement(),s._resetInsertionMode(),s._findFormInFragmentContext(),s}getFragment(){const t=this.treeAdapter.getFirstChild(this.document),n=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,n),n}_err(t,n,r){var i;if(!this.onParseError)return;const s=(i=t.location)!==null&&i!==void 0?i:oL,u={code:n,startLine:s.startLine,startCol:s.startCol,startOffset:s.startOffset,endLine:r?s.startLine:s.endLine,endCol:r?s.startCol:s.endCol,endOffset:r?s.startOffset:s.endOffset};this.onParseError(u)}onItemPush(t,n,r){var i,s;(s=(i=this.treeAdapter).onItemPush)===null||s===void 0||s.call(i,t),r&&this.openElements.stackTop>0&&this._setContextModes(t,n)}onItemPop(t,n){var r,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(r=this.treeAdapter).onItemPop)===null||i===void 0||i.call(r,t,this.openElements.current),n){let s,u;this.openElements.stackTop===0&&this.fragmentContext?(s=this.fragmentContext,u=this.fragmentContextID):{current:s,currentTagId:u}=this.openElements,this._setContextModes(s,u)}}_setContextModes(t,n){const r=t===this.document||t&&this.treeAdapter.getNamespaceURI(t)===we.HTML;this.currentNotInHTML=!r,this.tokenizer.inForeignNode=!r&&t!==void 0&&n!==void 0&&!this._isIntegrationPoint(n,t)}_switchToTextParsing(t,n){this._insertElement(t,we.HTML),this.tokenizer.state=n,this.originalInsertionMode=this.insertionMode,this.insertionMode=z.TEXT}switchToPlaintextParsing(){this.insertionMode=z.TEXT,this.originalInsertionMode=z.IN_BODY,this.tokenizer.state=Zt.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)===ne.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==we.HTML))switch(this.fragmentContextID){case g.TITLE:case g.TEXTAREA:{this.tokenizer.state=Zt.RCDATA;break}case g.STYLE:case g.XMP:case g.IFRAME:case g.NOEMBED:case g.NOFRAMES:case g.NOSCRIPT:{this.tokenizer.state=Zt.RAWTEXT;break}case g.SCRIPT:{this.tokenizer.state=Zt.SCRIPT_DATA;break}case g.PLAINTEXT:{this.tokenizer.state=Zt.PLAINTEXT;break}}}_setDocumentType(t){const n=t.name||"",r=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,n,r,i),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&&ce(M({},n),{startTag:n});this.treeAdapter.setNodeSourceCodeLocation(t,r)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{const r=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(r!=null?r:this.document,t)}}_appendElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location)}_insertElement(t,n){const r=this.treeAdapter.createElement(t.tagName,n,t.attrs);this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID)}_insertFakeElement(t,n){const r=this.treeAdapter.createElement(t,we.HTML,[]);this._attachElementToTree(r,null),this.openElements.push(r,n)}_insertTemplate(t){const n=this.treeAdapter.createElement(t.tagName,we.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(ne.HTML,we.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 i=this.treeAdapter.getChildNodes(n),s=r?i.lastIndexOf(r):i.length,u=i[s-1];if(this.treeAdapter.getNodeSourceCodeLocation(u)){const{endLine:d,endCol:f,endOffset:h}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(u,{endLine:d,endCol:f,endOffset:h})}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,i=this.treeAdapter.getTagName(t),s=n.type===pt.END_TAG&&i===n.tagName?{endTag:M({},r),endLine:r.endLine,endCol:r.endCol,endOffset:r.endOffset}:{endLine:r.startLine,endCol:r.startCol,endOffset:r.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,s)}}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)===ne.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(n)===we.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===g.MGLYPH||t.tagID===g.MALIGNMARK)&&r!==void 0&&!this._isIntegrationPoint(r,n,we.HTML)}_processToken(t){switch(t.type){case pt.CHARACTER:{this.onCharacter(t);break}case pt.NULL_CHARACTER:{this.onNullCharacter(t);break}case pt.COMMENT:{this.onComment(t);break}case pt.DOCTYPE:{this.onDoctype(t);break}case pt.START_TAG:{this._processStartTag(t);break}case pt.END_TAG:{this.onEndTag(t);break}case pt.EOF:{this.onEof(t);break}case pt.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,n,r){const i=this.treeAdapter.getNamespaceURI(n),s=this.treeAdapter.getAttrList(n);return tL(t,i,s,r)}_reconstructActiveFormattingElements(){const t=this.activeFormattingElements.entries.length;if(t){const n=this.activeFormattingElements.entries.findIndex(i=>i.type===Xr.Marker||this.openElements.contains(i.element)),r=n===-1?t-1:n-1;for(let i=r;i>=0;i--){const s=this.activeFormattingElements.entries[i];this._insertElement(s.token,this.treeAdapter.getNamespaceURI(s.element)),s.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=z.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=z.IN_ROW;return}case g.TBODY:case g.THEAD:case g.TFOOT:{this.insertionMode=z.IN_TABLE_BODY;return}case g.CAPTION:{this.insertionMode=z.IN_CAPTION;return}case g.COLGROUP:{this.insertionMode=z.IN_COLUMN_GROUP;return}case g.TABLE:{this.insertionMode=z.IN_TABLE;return}case g.BODY:{this.insertionMode=z.IN_BODY;return}case g.FRAMESET:{this.insertionMode=z.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?z.AFTER_HEAD:z.BEFORE_HEAD;return}case g.TD:case g.TH:{if(t>0){this.insertionMode=z.IN_CELL;return}break}case g.HEAD:{if(t>0){this.insertionMode=z.IN_HEAD;return}break}}this.insertionMode=z.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=z.IN_SELECT_IN_TABLE;return}}this.insertionMode=z.IN_SELECT}_isElementCausesFosterParenting(t){return Hw.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)===we.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 S5[r].has(n)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){DD(this,t);return}switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:{qw(this,t);break}case z.TEXT:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_TABLE_TEXT:{Zw(this,t);break}case z.IN_COLUMN_GROUP:{kl(this,t);break}case z.AFTER_BODY:{Il(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){LD(this,t);return}switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.TEXT:{this._insertCharacters(t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_COLUMN_GROUP:{kl(this,t);break}case z.AFTER_BODY:{Il(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Oh(this,t);return}switch(this.insertionMode){case z.INITIAL:case z.BEFORE_HTML:case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_TEMPLATE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{Oh(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.AFTER_BODY:{fL(this,t);break}case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{pL(this,t);break}}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case z.INITIAL:{hL(this,t);break}case z.BEFORE_HEAD:case z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:{this._err(t,le.misplacedDoctype);break}case z.IN_TABLE_TEXT:{wu(this,t);break}}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,le.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?MD(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{mL(this,t);break}case z.BEFORE_HEAD:{yL(this,t);break}case z.IN_HEAD:{Nr(this,t);break}case z.IN_HEAD_NO_SCRIPT:{wL(this,t);break}case z.AFTER_HEAD:{TL(this,t);break}case z.IN_BODY:{Cn(this,t);break}case z.IN_TABLE:{Fs(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_CAPTION:{ED(this,t);break}case z.IN_COLUMN_GROUP:{Lh(this,t);break}case z.IN_TABLE_BODY:{Cl(this,t);break}case z.IN_ROW:{Nl(this,t);break}case z.IN_CELL:{xD(this,t);break}case z.IN_SELECT:{nx(this,t);break}case z.IN_SELECT_IN_TABLE:{_D(this,t);break}case z.IN_TEMPLATE:{SD(this,t);break}case z.AFTER_BODY:{kD(this,t);break}case z.IN_FRAMESET:{CD(this,t);break}case z.AFTER_FRAMESET:{ID(this,t);break}case z.AFTER_AFTER_BODY:{PD(this,t);break}case z.AFTER_AFTER_FRAMESET:{RD(this,t);break}}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?FD(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{gL(this,t);break}case z.BEFORE_HEAD:{EL(this,t);break}case z.IN_HEAD:{bL(this,t);break}case z.IN_HEAD_NO_SCRIPT:{xL(this,t);break}case z.AFTER_HEAD:{_L(this,t);break}case z.IN_BODY:{Al(this,t);break}case z.TEXT:{uD(this,t);break}case z.IN_TABLE:{Eu(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_CAPTION:{bD(this,t);break}case z.IN_COLUMN_GROUP:{wD(this,t);break}case z.IN_TABLE_BODY:{Dh(this,t);break}case z.IN_ROW:{tx(this,t);break}case z.IN_CELL:{TD(this,t);break}case z.IN_SELECT:{rx(this,t);break}case z.IN_SELECT_IN_TABLE:{vD(this,t);break}case z.IN_TEMPLATE:{AD(this,t);break}case z.AFTER_BODY:{ox(this,t);break}case z.IN_FRAMESET:{ND(this,t);break}case z.AFTER_FRAMESET:{OD(this,t);break}case z.AFTER_AFTER_BODY:{Ol(this,t);break}}}onEof(t){switch(this.insertionMode){case z.INITIAL:{fu(this,t);break}case z.BEFORE_HTML:{pu(this,t);break}case z.BEFORE_HEAD:{hu(this,t);break}case z.IN_HEAD:{mu(this,t);break}case z.IN_HEAD_NO_SCRIPT:{gu(this,t);break}case z.AFTER_HEAD:{yu(this,t);break}case z.IN_BODY:case z.IN_TABLE:case z.IN_CAPTION:case z.IN_COLUMN_GROUP:case z.IN_TABLE_BODY:case z.IN_ROW:case z.IN_CELL:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:{Qw(this,t);break}case z.TEXT:{cD(this,t);break}case z.IN_TABLE_TEXT:{wu(this,t);break}case z.IN_TEMPLATE:{ix(this,t);break}case z.AFTER_BODY:case z.IN_FRAMESET:case z.AFTER_FRAMESET:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{Ph(this,t);break}}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===L.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 z.IN_HEAD:case z.IN_HEAD_NO_SCRIPT:case z.AFTER_HEAD:case z.TEXT:case z.IN_COLUMN_GROUP:case z.IN_SELECT:case z.IN_SELECT_IN_TABLE:case z.IN_FRAMESET:case z.AFTER_FRAMESET:{this._insertCharacters(t);break}case z.IN_BODY:case z.IN_CAPTION:case z.IN_CELL:case z.IN_TEMPLATE:case z.AFTER_BODY:case z.AFTER_AFTER_BODY:case z.AFTER_AFTER_FRAMESET:{Vw(this,t);break}case z.IN_TABLE:case z.IN_TABLE_BODY:case z.IN_ROW:{Rh(this,t);break}case z.IN_TABLE_TEXT:{Jw(this,t);break}}}}function sL(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):Kw(e,t),n}function aL(e,t){let n=null,r=e.openElements.stackTop;for(;r>=0;r--){const i=e.openElements.items[r];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[r])&&(n=i)}return n||(e.openElements.shortenToLength(Math.max(r,0)),e.activeFormattingElements.removeEntry(t)),n}function uL(e,t,n){let r=t,i=e.openElements.getCommonAncestor(t);for(let s=0,u=i;u!==n;s++,u=i){i=e.openElements.getCommonAncestor(u);const c=e.activeFormattingElements.getElementEntry(u),d=c&&s>=iL;!c||d?(d&&e.activeFormattingElements.removeEntry(c),e.openElements.remove(u)):(u=cL(e,c),r===t&&(e.activeFormattingElements.bookmark=c),e.treeAdapter.detachNode(r),e.treeAdapter.appendChild(u,r),r=u)}return r}function cL(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 lL(e,t,n){const r=e.treeAdapter.getTagName(t),i=Ms(r);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(n);else{const s=e.treeAdapter.getNamespaceURI(t);i===g.TEMPLATE&&s===we.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,n)}}function dL(e,t,n){const r=e.treeAdapter.getNamespaceURI(n.element),{token:i}=n,s=e.treeAdapter.createElement(i.tagName,r,i.attrs);e._adoptNodes(t,s),e.treeAdapter.appendChild(t,s),e.activeFormattingElements.insertElementAfterBookmark(s,i),e.activeFormattingElements.removeEntry(n),e.openElements.remove(n.element),e.openElements.insertAfter(t,s,i.tagID)}function Ih(e,t){for(let n=0;n<rL;n++){const r=sL(e,t);if(!r)break;const i=aL(e,r);if(!i)break;e.activeFormattingElements.bookmark=r;const s=uL(e,i,r.element),u=e.openElements.getCommonAncestor(r.element);e.treeAdapter.detachNode(s),u&&lL(e,u,s),dL(e,i,r)}}function Oh(e,t){e._appendCommentNode(t,e.openElements.currentTmplContentOrNode)}function fL(e,t){e._appendCommentNode(t,e.openElements.items[0])}function pL(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],i=e.treeAdapter.getNodeSourceCodeLocation(r);if(i&&!i.endTag&&(e._setEndLocation(r,t),e.openElements.stackTop>=1)){const s=e.openElements.items[1],u=e.treeAdapter.getNodeSourceCodeLocation(s);u&&!u.endTag&&e._setEndLocation(s,t)}}}}function hL(e,t){e._setDocumentType(t);const n=t.forceQuirks?mr.QUIRKS:V5(t);z5(t)||e._err(t,le.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,n),e.insertionMode=z.BEFORE_HTML}function fu(e,t){e._err(t,le.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,mr.QUIRKS),e.insertionMode=z.BEFORE_HTML,e._processToken(t)}function mL(e,t){t.tagID===g.HTML?(e._insertElement(t,we.HTML),e.insertionMode=z.BEFORE_HEAD):pu(e,t)}function gL(e,t){const n=t.tagID;(n===g.HTML||n===g.HEAD||n===g.BODY||n===g.BR)&&pu(e,t)}function pu(e,t){e._insertFakeRootElement(),e.insertionMode=z.BEFORE_HEAD,e._processToken(t)}function yL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.HEAD:{e._insertElement(t,we.HTML),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD;break}default:hu(e,t)}}function EL(e,t){const n=t.tagID;n===g.HEAD||n===g.BODY||n===g.HTML||n===g.BR?hu(e,t):e._err(t,le.endTagWithoutMatchingOpenElement)}function hu(e,t){e._insertFakeElement(ne.HEAD,g.HEAD),e.headElement=e.openElements.current,e.insertionMode=z.IN_HEAD,e._processToken(t)}function Nr(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.TITLE:{e._switchToTextParsing(t,Zt.RCDATA);break}case g.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Zt.RAWTEXT):(e._insertElement(t,we.HTML),e.insertionMode=z.IN_HEAD_NO_SCRIPT);break}case g.NOFRAMES:case g.STYLE:{e._switchToTextParsing(t,Zt.RAWTEXT);break}case g.SCRIPT:{e._switchToTextParsing(t,Zt.SCRIPT_DATA);break}case g.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=z.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(z.IN_TEMPLATE);break}case g.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:mu(e,t)}}function bL(e,t){switch(t.tagID){case g.HEAD:{e.openElements.pop(),e.insertionMode=z.AFTER_HEAD;break}case g.BODY:case g.BR:case g.HTML:{mu(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function Fo(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==g.TEMPLATE&&e._err(t,le.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(g.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,le.endTagWithoutMatchingOpenElement)}function mu(e,t){e.openElements.pop(),e.insertionMode=z.AFTER_HEAD,e._processToken(t)}function wL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BASEFONT:case g.BGSOUND:case g.HEAD:case g.LINK:case g.META:case g.NOFRAMES:case g.STYLE:{Nr(e,t);break}case g.NOSCRIPT:{e._err(t,le.nestedNoscriptInHead);break}default:gu(e,t)}}function xL(e,t){switch(t.tagID){case g.NOSCRIPT:{e.openElements.pop(),e.insertionMode=z.IN_HEAD;break}case g.BR:{gu(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function gu(e,t){const n=t.type===pt.EOF?le.openElementsLeftAfterEof:le.disallowedContentInNoscriptInHead;e._err(t,n),e.openElements.pop(),e.insertionMode=z.IN_HEAD,e._processToken(t)}function TL(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.BODY:{e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=z.IN_BODY;break}case g.FRAMESET:{e._insertElement(t,we.HTML),e.insertionMode=z.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,le.abandonedHeadElementChild),e.openElements.push(e.headElement,g.HEAD),Nr(e,t),e.openElements.remove(e.headElement);break}case g.HEAD:{e._err(t,le.misplacedStartTagForHeadElement);break}default:yu(e,t)}}function _L(e,t){switch(t.tagID){case g.BODY:case g.HTML:case g.BR:{yu(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:e._err(t,le.endTagWithoutMatchingOpenElement)}}function yu(e,t){e._insertFakeElement(ne.BODY,g.BODY),e.insertionMode=z.IN_BODY,Sl(e,t)}function Sl(e,t){switch(t.type){case pt.CHARACTER:{qw(e,t);break}case pt.WHITESPACE_CHARACTER:{Vw(e,t);break}case pt.COMMENT:{Oh(e,t);break}case pt.START_TAG:{Cn(e,t);break}case pt.END_TAG:{Al(e,t);break}case pt.EOF:{Qw(e,t);break}}}function Vw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function qw(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function vL(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function SL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(n,t.attrs))}function AL(e,t){const n=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&n&&(e.treeAdapter.detachNode(n),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_FRAMESET)}function kL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML)}function CL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e.openElements.currentTagId!==void 0&&kh.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,we.HTML)}function NL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function IL(e,t){const n=e.openElements.tmplCount>0;(!e.formElement||n)&&(e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),n||(e.formElement=e.openElements.current))}function OL(e,t){e.framesetOk=!1;const n=t.tagID;for(let r=e.openElements.stackTop;r>=0;r--){const i=e.openElements.tagIDs[r];if(n===g.LI&&i===g.LI||(n===g.DD||n===g.DT)&&(i===g.DD||i===g.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==g.ADDRESS&&i!==g.DIV&&i!==g.P&&e._isSpecialElement(e.openElements.items[r],i))break}e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML)}function PL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.tokenizer.state=Zt.PLAINTEXT}function RL(e,t){e.openElements.hasInScope(g.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.framesetOk=!1}function LL(e,t){const n=e.activeFormattingElements.getElementEntryInScopeWithTagName(ne.A);n&&(Ih(e,t),e.openElements.remove(n.element),e.activeFormattingElements.removeEntry(n)),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function DL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function ML(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(g.NOBR)&&(Ih(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,we.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function FL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function BL(e,t){e.treeAdapter.getDocumentMode(e.document)!==mr.QUIRKS&&e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=z.IN_TABLE}function Ww(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,we.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function Yw(e){const t=Sw(e,Mo.TYPE);return t!=null&&t.toLowerCase()===nL}function UL(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,we.HTML),Yw(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function jL(e,t){e._appendElement(t,we.HTML),t.ackSelfClosing=!0}function HL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._appendElement(t,we.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function $L(e,t){t.tagName=ne.IMG,t.tagID=g.IMG,Ww(e,t)}function zL(e,t){e._insertElement(t,we.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Zt.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=z.TEXT}function VL(e,t){e.openElements.hasInButtonScope(g.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function qL(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Zt.RAWTEXT)}function Gw(e,t){e._switchToTextParsing(t,Zt.RAWTEXT)}function WL(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===z.IN_TABLE||e.insertionMode===z.IN_CAPTION||e.insertionMode===z.IN_TABLE_BODY||e.insertionMode===z.IN_ROW||e.insertionMode===z.IN_CELL?z.IN_SELECT_IN_TABLE:z.IN_SELECT}function YL(e,t){e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML)}function GL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,we.HTML)}function XL(e,t){e.openElements.hasInScope(g.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(g.RTC),e._insertElement(t,we.HTML)}function KL(e,t){e._reconstructActiveFormattingElements(),Uw(t),Nh(t),t.selfClosing?e._appendElement(t,we.MATHML):e._insertElement(t,we.MATHML),t.ackSelfClosing=!0}function QL(e,t){e._reconstructActiveFormattingElements(),jw(t),Nh(t),t.selfClosing?e._appendElement(t,we.SVG):e._insertElement(t,we.SVG),t.ackSelfClosing=!0}function Xw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,we.HTML)}function Cn(e,t){switch(t.tagID){case g.I:case g.S:case g.B:case g.U:case g.EM:case g.TT:case g.BIG:case g.CODE:case g.FONT:case g.SMALL:case g.STRIKE:case g.STRONG:{DL(e,t);break}case g.A:{LL(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{CL(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:{kL(e,t);break}case g.LI:case g.DD:case g.DT:{OL(e,t);break}case g.BR:case g.IMG:case g.WBR:case g.AREA:case g.EMBED:case g.KEYGEN:{Ww(e,t);break}case g.HR:{HL(e,t);break}case g.RB:case g.RTC:{GL(e,t);break}case g.RT:case g.RP:{XL(e,t);break}case g.PRE:case g.LISTING:{NL(e,t);break}case g.XMP:{VL(e,t);break}case g.SVG:{QL(e,t);break}case g.HTML:{vL(e,t);break}case g.BASE:case g.LINK:case g.META:case g.STYLE:case g.TITLE:case g.SCRIPT:case g.BGSOUND:case g.BASEFONT:case g.TEMPLATE:{Nr(e,t);break}case g.BODY:{SL(e,t);break}case g.FORM:{IL(e,t);break}case g.NOBR:{ML(e,t);break}case g.MATH:{KL(e,t);break}case g.TABLE:{BL(e,t);break}case g.INPUT:{UL(e,t);break}case g.PARAM:case g.TRACK:case g.SOURCE:{jL(e,t);break}case g.IMAGE:{$L(e,t);break}case g.BUTTON:{RL(e,t);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{FL(e,t);break}case g.IFRAME:{qL(e,t);break}case g.SELECT:{WL(e,t);break}case g.OPTION:case g.OPTGROUP:{YL(e,t);break}case g.NOEMBED:case g.NOFRAMES:{Gw(e,t);break}case g.FRAMESET:{AL(e,t);break}case g.TEXTAREA:{zL(e,t);break}case g.NOSCRIPT:{e.options.scriptingEnabled?Gw(e,t):Xw(e,t);break}case g.PLAINTEXT:{PL(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:Xw(e,t)}}function JL(e,t){if(e.openElements.hasInScope(g.BODY)&&(e.insertionMode=z.AFTER_BODY,e.options.sourceCodeLocationInfo)){const n=e.openElements.tryPeekProperlyNestedBodyElement();n&&e._setEndLocation(n,t)}}function ZL(e,t){e.openElements.hasInScope(g.BODY)&&(e.insertionMode=z.AFTER_BODY,ox(e,t))}function eD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n))}function tD(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 nD(e){e.openElements.hasInButtonScope(g.P)||e._insertFakeElement(ne.P,g.P),e._closePElement()}function rD(e){e.openElements.hasInListItemScope(g.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(g.LI),e.openElements.popUntilTagNamePopped(g.LI))}function iD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.popUntilTagNamePopped(n))}function oD(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function sD(e,t){const n=t.tagID;e.openElements.hasInScope(n)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(n),e.activeFormattingElements.clearToLastMarker())}function aD(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(ne.BR,g.BR),e.openElements.pop(),e.framesetOk=!1}function Kw(e,t){const n=t.tagName,r=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){const s=e.openElements.items[i],u=e.openElements.tagIDs[i];if(r===u&&(r!==g.UNKNOWN||e.treeAdapter.getTagName(s)===n)){e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(s,u))break}}function Al(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:{Ih(e,t);break}case g.P:{nD(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:{eD(e,t);break}case g.LI:{rD(e);break}case g.DD:case g.DT:{iD(e,t);break}case g.H1:case g.H2:case g.H3:case g.H4:case g.H5:case g.H6:{oD(e);break}case g.BR:{aD(e);break}case g.BODY:{JL(e,t);break}case g.HTML:{ZL(e,t);break}case g.FORM:{tD(e);break}case g.APPLET:case g.OBJECT:case g.MARQUEE:{sD(e,t);break}case g.TEMPLATE:{Fo(e,t);break}default:Kw(e,t)}}function Qw(e,t){e.tmplInsertionModeStack.length>0?ix(e,t):Ph(e,t)}function uD(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 cD(e,t){e._err(t,le.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Rh(e,t){if(e.openElements.currentTagId!==void 0&&Hw.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=z.IN_TABLE_TEXT,t.type){case pt.CHARACTER:{Zw(e,t);break}case pt.WHITESPACE_CHARACTER:{Jw(e,t);break}}else bu(e,t)}function lD(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_CAPTION}function dD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_COLUMN_GROUP}function fD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.COLGROUP,g.COLGROUP),e.insertionMode=z.IN_COLUMN_GROUP,Lh(e,t)}function pD(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_TABLE_BODY}function hD(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(ne.TBODY,g.TBODY),e.insertionMode=z.IN_TABLE_BODY,Cl(e,t)}function mD(e,t){e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function gD(e,t){Yw(t)?e._appendElement(t,we.HTML):bu(e,t),t.ackSelfClosing=!0}function yD(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,we.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function Fs(e,t){switch(t.tagID){case g.TD:case g.TH:case g.TR:{hD(e,t);break}case g.STYLE:case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}case g.COL:{fD(e,t);break}case g.FORM:{yD(e,t);break}case g.TABLE:{mD(e,t);break}case g.TBODY:case g.TFOOT:case g.THEAD:{pD(e,t);break}case g.INPUT:{gD(e,t);break}case g.CAPTION:{lD(e,t);break}case g.COLGROUP:{dD(e,t);break}default:bu(e,t)}}function Eu(e,t){switch(t.tagID){case g.TABLE:{e.openElements.hasInTableScope(g.TABLE)&&(e.openElements.popUntilTagNamePopped(g.TABLE),e._resetInsertionMode());break}case g.TEMPLATE:{Fo(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:bu(e,t)}}function bu(e,t){const n=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,Sl(e,t),e.fosterParentingEnabled=n}function Jw(e,t){e.pendingCharacterTokens.push(t)}function Zw(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function wu(e,t){let n=0;if(e.hasNonWhitespacePendingCharacterToken)for(;n<e.pendingCharacterTokens.length;n++)bu(e,e.pendingCharacterTokens[n]);else for(;n<e.pendingCharacterTokens.length;n++)e._insertCharacters(e.pendingCharacterTokens[n]);e.insertionMode=e.originalInsertionMode,e._processToken(t)}const ex=new Set([g.CAPTION,g.COL,g.COLGROUP,g.TBODY,g.TD,g.TFOOT,g.TH,g.THEAD,g.TR]);function ED(e,t){const n=t.tagID;ex.has(n)?e.openElements.hasInTableScope(g.CAPTION)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(g.CAPTION),e.activeFormattingElements.clearToLastMarker(),e.insertionMode=z.IN_TABLE,Fs(e,t)):Cn(e,t)}function bD(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=z.IN_TABLE,n===g.TABLE&&Eu(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:Al(e,t)}}function Lh(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.COL:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.TEMPLATE:{Nr(e,t);break}default:kl(e,t)}}function wD(e,t){switch(t.tagID){case g.COLGROUP:{e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE);break}case g.TEMPLATE:{Fo(e,t);break}case g.COL:break;default:kl(e,t)}}function kl(e,t){e.openElements.currentTagId===g.COLGROUP&&(e.openElements.pop(),e.insertionMode=z.IN_TABLE,e._processToken(t))}function Cl(e,t){switch(t.tagID){case g.TR:{e.openElements.clearBackToTableBodyContext(),e._insertElement(t,we.HTML),e.insertionMode=z.IN_ROW;break}case g.TH:case g.TD:{e.openElements.clearBackToTableBodyContext(),e._insertFakeElement(ne.TR,g.TR),e.insertionMode=z.IN_ROW,Nl(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=z.IN_TABLE,Fs(e,t));break}default:Fs(e,t)}}function Dh(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=z.IN_TABLE);break}case g.TABLE:{e.openElements.hasTableBodyContextInTableScope()&&(e.openElements.clearBackToTableBodyContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE,Eu(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:Eu(e,t)}}function Nl(e,t){switch(t.tagID){case g.TH:case g.TD:{e.openElements.clearBackToTableRowContext(),e._insertElement(t,we.HTML),e.insertionMode=z.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=z.IN_TABLE_BODY,Cl(e,t));break}default:Fs(e,t)}}function tx(e,t){switch(t.tagID){case g.TR:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY);break}case g.TABLE:{e.openElements.hasInTableScope(g.TR)&&(e.openElements.clearBackToTableRowContext(),e.openElements.pop(),e.insertionMode=z.IN_TABLE_BODY,Dh(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=z.IN_TABLE_BODY,Dh(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:Eu(e,t)}}function xD(e,t){const n=t.tagID;ex.has(n)?(e.openElements.hasInTableScope(g.TD)||e.openElements.hasInTableScope(g.TH))&&(e._closeTableCell(),Nl(e,t)):Cn(e,t)}function TD(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=z.IN_ROW);break}case g.TABLE:case g.TBODY:case g.TFOOT:case g.THEAD:case g.TR:{e.openElements.hasInTableScope(n)&&(e._closeTableCell(),tx(e,t));break}case g.BODY:case g.CAPTION:case g.COL:case g.COLGROUP:case g.HTML:break;default:Al(e,t)}}function nx(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.OPTION:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e._insertElement(t,we.HTML);break}case g.OPTGROUP:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._insertElement(t,we.HTML);break}case g.HR:{e.openElements.currentTagId===g.OPTION&&e.openElements.pop(),e.openElements.currentTagId===g.OPTGROUP&&e.openElements.pop(),e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.INPUT:case g.KEYGEN:case g.TEXTAREA:case g.SELECT:{e.openElements.hasInSelectScope(g.SELECT)&&(e.openElements.popUntilTagNamePopped(g.SELECT),e._resetInsertionMode(),t.tagID!==g.SELECT&&e._processStartTag(t));break}case g.SCRIPT:case g.TEMPLATE:{Nr(e,t);break}}}function rx(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:{Fo(e,t);break}}}function _D(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)):nx(e,t)}function vD(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)):rx(e,t)}function SD(e,t){switch(t.tagID){case g.BASE:case g.BASEFONT:case g.BGSOUND:case g.LINK:case g.META:case g.NOFRAMES:case g.SCRIPT:case g.STYLE:case g.TEMPLATE:case g.TITLE:{Nr(e,t);break}case g.CAPTION:case g.COLGROUP:case g.TBODY:case g.TFOOT:case g.THEAD:{e.tmplInsertionModeStack[0]=z.IN_TABLE,e.insertionMode=z.IN_TABLE,Fs(e,t);break}case g.COL:{e.tmplInsertionModeStack[0]=z.IN_COLUMN_GROUP,e.insertionMode=z.IN_COLUMN_GROUP,Lh(e,t);break}case g.TR:{e.tmplInsertionModeStack[0]=z.IN_TABLE_BODY,e.insertionMode=z.IN_TABLE_BODY,Cl(e,t);break}case g.TD:case g.TH:{e.tmplInsertionModeStack[0]=z.IN_ROW,e.insertionMode=z.IN_ROW,Nl(e,t);break}default:e.tmplInsertionModeStack[0]=z.IN_BODY,e.insertionMode=z.IN_BODY,Cn(e,t)}}function AD(e,t){t.tagID===g.TEMPLATE&&Fo(e,t)}function ix(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 kD(e,t){t.tagID===g.HTML?Cn(e,t):Il(e,t)}function ox(e,t){var n;if(t.tagID===g.HTML){if(e.fragmentContext||(e.insertionMode=z.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 Il(e,t)}function Il(e,t){e.insertionMode=z.IN_BODY,Sl(e,t)}function CD(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.FRAMESET:{e._insertElement(t,we.HTML);break}case g.FRAME:{e._appendElement(t,we.HTML),t.ackSelfClosing=!0;break}case g.NOFRAMES:{Nr(e,t);break}}}function ND(e,t){t.tagID===g.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==g.FRAMESET&&(e.insertionMode=z.AFTER_FRAMESET))}function ID(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function OD(e,t){t.tagID===g.HTML&&(e.insertionMode=z.AFTER_AFTER_FRAMESET)}function PD(e,t){t.tagID===g.HTML?Cn(e,t):Ol(e,t)}function Ol(e,t){e.insertionMode=z.IN_BODY,Sl(e,t)}function RD(e,t){switch(t.tagID){case g.HTML:{Cn(e,t);break}case g.NOFRAMES:{Nr(e,t);break}}}function LD(e,t){t.chars=Bt,e._insertCharacters(t)}function DD(e,t){e._insertCharacters(t),e.framesetOk=!1}function sx(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==we.HTML&&e.openElements.currentTagId!==void 0&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function MD(e,t){if(Q5(t))sx(e),e._startTagOutsideForeignContent(t);else{const n=e._getAdjustedCurrentElement(),r=e.treeAdapter.getNamespaceURI(n);r===we.MATHML?Uw(t):r===we.SVG&&(J5(t),jw(t)),Nh(t),t.selfClosing?e._appendElement(t,r):e._insertElement(t,r),t.ackSelfClosing=!0}}function FD(e,t){if(t.tagID===g.P||t.tagID===g.BR){sx(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)===we.HTML){e._endTagOutsideForeignContent(t);break}const i=e.treeAdapter.getTagName(r);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(n);break}}}ne.AREA,ne.BASE,ne.BASEFONT,ne.BGSOUND,ne.BR,ne.COL,ne.EMBED,ne.FRAME,ne.HR,ne.IMG,ne.INPUT,ne.KEYGEN,ne.LINK,ne.META,ne.PARAM,ne.SOURCE,ne.TRACK,ne.WBR;const BD=/<(\/?)(iframe|noembed|noframes|plaintext|script|style|textarea|title|xmp)(?=[\t\n\f\r />])/gi,UD=new Set(["mdxFlowExpression","mdxJsxFlowElement","mdxJsxTextElement","mdxTextExpression","mdxjsEsm"]),ax={sourceCodeLocationInfo:!0,scriptingEnabled:!1};function ux(e,t){const n=XD(e),r=ww("type",{handlers:{root:jD,element:HD,text:$D,comment:lx,doctype:zD,raw:qD},unknown:WD}),i={parser:n?new zw(ax):zw.getFragmentParser(void 0,ax),handle(c){r(c,i)},stitches:!1,options:t||{}};r(e,i),Bs(i,Yr());const s=n?i.parser.document:i.parser.getFragment(),u=K6(s,{file:i.options.file});return i.stitches&&wl(u,"comment",function(c,d,f){const h=c;if(h.value.stitch&&f&&d!==void 0){const m=f.children;return m[d]=h.value.stitch,d}}),u.type==="root"&&u.children.length===1&&u.children[0].type===e.type?u.children[0]:u}function cx(e,t){let n=-1;if(e)for(;++n<e.length;)t.handle(e[n])}function jD(e,t){cx(e.children,t)}function HD(e,t){YD(e,t),cx(e.children,t),GD(e,t)}function $D(e,t){t.parser.tokenizer.state>4&&(t.parser.tokenizer.state=0);const n={type:pt.CHARACTER,chars:e.value,location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function zD(e,t){const n={type:pt.DOCTYPE,name:"html",forceQuirks:!1,publicId:"",systemId:"",location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=n,t.parser._processToken(t.parser.currentToken)}function VD(e,t){t.stitches=!0;const n=KD(e);if("children"in e&&"children"in n){const r=ux({type:"root",children:e.children},t.options);n.children=r.children}lx({type:"comment",value:{stitch:n}},t)}function lx(e,t){const n=e.value,r={type:pt.COMMENT,data:n,location:xu(e)};Bs(t,Yr(e)),t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken)}function qD(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,dx(t,Yr(e)),t.parser.tokenizer.write(t.options.tagfilter?e.value.replace(BD,"&lt;$1$2"):e.value,!1),t.parser.tokenizer._runParsingLoop(),t.parser.tokenizer.state===72||t.parser.tokenizer.state===78){t.parser.tokenizer.preprocessor.lastChunkWritten=!0;const n=t.parser.tokenizer._consume();t.parser.tokenizer._callState(n)}}function WD(e,t){const n=e;if(t.options.passThrough&&t.options.passThrough.includes(n.type))VD(n,t);else{let r="";throw UD.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 Bs(e,t){dx(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=Zt.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 dx(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 YD(e,t){const n=e.tagName.toLowerCase();if(t.parser.tokenizer.state===Zt.PLAINTEXT)return;Bs(t,Yr(e));const r=t.parser.openElements.current;let i="namespaceURI"in r?r.namespaceURI:Do.html;i===Do.html&&n==="svg"&&(i=Do.svg);const s=t5(ce(M({},e),{children:[]}),{space:i===Do.svg?"svg":"html"}),u={type:pt.START_TAG,tagName:n,tagID:Ms(n),selfClosing:!1,ackSelfClosing:!1,attrs:"attrs"in s?s.attrs:[],location:xu(e)};t.parser.currentToken=u,t.parser._processToken(t.parser.currentToken),t.parser.tokenizer.lastStartTagName=n}function GD(e,t){const n=e.tagName.toLowerCase();if(!t.parser.tokenizer.inForeignNode&&c5.includes(n)||t.parser.tokenizer.state===Zt.PLAINTEXT)return;Bs(t,cl(e));const r={type:pt.END_TAG,tagName:n,tagID:Ms(n),selfClosing:!1,ackSelfClosing:!1,attrs:[],location:xu(e)};t.parser.currentToken=r,t.parser._processToken(t.parser.currentToken),n===t.parser.tokenizer.lastStartTagName&&(t.parser.tokenizer.state===Zt.RCDATA||t.parser.tokenizer.state===Zt.RAWTEXT||t.parser.tokenizer.state===Zt.SCRIPT_DATA)&&(t.parser.tokenizer.state=Zt.DATA)}function XD(e){const t=e.type==="root"?e.children[0]:e;return!!(t&&(t.type==="doctype"||t.type==="element"&&t.tagName.toLowerCase()==="html"))}function xu(e){const t=Yr(e)||{line:void 0,column:void 0,offset:void 0},n=cl(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 KD(e){return"children"in e?Lo(ce(M({},e),{children:[]})):Lo(e)}function fx(e){return function(t,n){return ux(t,ce(M({},e),{file:n}))}}const Bo=["ariaDescribedBy","ariaLabel","ariaLabelledBy"],px={ancestors:{tbody:["table"],td:["table"],th:["table"],thead:["table"],tfoot:["table"],tr:["table"]},attributes:{a:[...Bo,"dataFootnoteBackref","dataFootnoteRef",["className","data-footnote-backref"],"href"],blockquote:["cite"],code:[["className",/^language-./]],del:["cite"],div:["itemScope","itemType"],dl:[...Bo],h2:[["className","sr-only"]],img:[...Bo,"longDesc","src"],input:[["disabled",!0],["type","checkbox"]],ins:["cite"],li:[["className","task-list-item"]],ol:[...Bo,["className","contains-task-list"]],q:["cite"],section:["dataFootnotes",["className","footnotes"]],source:["srcSet"],summary:[...Bo],table:[...Bo],ul:[...Bo,["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"]},ji={}.hasOwnProperty;function QD(e,t){let n={type:"root",children:[]};const r={schema:t?M(M({},px),t):px,stack:[]},i=hx(r,e);return i&&(Array.isArray(i)?i.length===1?n=i[0]:n.children=i:n=i),n}function hx(e,t){if(t&&typeof t=="object"){const n=t;switch(typeof n.type=="string"?n.type:""){case"comment":return JD(e,n);case"doctype":return ZD(e,n);case"element":return e8(e,n);case"root":return t8(e,n);case"text":return n8(e,n)}}}function JD(e,t){if(e.schema.allowComments){const n=typeof t.value=="string"?t.value:"",r=n.indexOf("-->"),s={type:"comment",value:r<0?n:n.slice(0,r)};return Tu(s,t),s}}function ZD(e,t){if(e.schema.allowDoctypes){const n={type:"doctype"};return Tu(n,t),n}}function e8(e,t){const n=typeof t.tagName=="string"?t.tagName:"";e.stack.push(n);const r=mx(e,t.children),i=r8(e,t.properties);e.stack.pop();let s=!1;if(n&&n!=="*"&&(!e.schema.tagNames||e.schema.tagNames.includes(n))&&(s=!0,e.schema.ancestors&&ji.call(e.schema.ancestors,n))){const c=e.schema.ancestors[n];let d=-1;for(s=!1;++d<c.length;)e.stack.includes(c[d])&&(s=!0)}if(!s)return e.schema.strip&&!e.schema.strip.includes(n)?r:void 0;const u={type:"element",tagName:n,properties:i,children:r};return Tu(u,t),u}function t8(e,t){const r={type:"root",children:mx(e,t.children)};return Tu(r,t),r}function n8(e,t){const r={type:"text",value:typeof t.value=="string"?t.value:""};return Tu(r,t),r}function mx(e,t){const n=[];if(Array.isArray(t)){const r=t;let i=-1;for(;++i<r.length;){const s=hx(e,r[i]);s&&(Array.isArray(s)?n.push(...s):n.push(s))}}return n}function r8(e,t){const n=e.stack[e.stack.length-1],r=e.schema.attributes,i=e.schema.required,s=r&&ji.call(r,n)?r[n]:void 0,u=r&&ji.call(r,"*")?r["*"]:void 0,c=t&&typeof t=="object"?t:{},d={};let f;for(f in c)if(ji.call(c,f)){const h=c[f];let m=gx(e,Ex(s,f),f,h);m==null&&(m=gx(e,Ex(u,f),f,h)),m!=null&&(d[f]=m)}if(i&&ji.call(i,n)){const h=i[n];for(f in h)ji.call(h,f)&&!ji.call(d,f)&&(d[f]=h[f])}return d}function gx(e,t,n,r){return t?Array.isArray(r)?i8(e,t,n,r):yx(e,t,n,r):void 0}function i8(e,t,n,r){let i=-1;const s=[];for(;++i<r.length;){const u=yx(e,t,n,r[i]);(typeof u=="number"||typeof u=="string")&&s.push(u)}return s}function yx(e,t,n,r){if(!(typeof r!="boolean"&&typeof r!="number"&&typeof r!="string")&&o8(e,n,r)){if(typeof t=="object"&&t.length>1){let i=!1,s=0;for(;++s<t.length;){const u=t[s];if(u&&typeof u=="object"&&"flags"in u){if(u.test(String(r))){i=!0;break}}else if(u===r){i=!0;break}}if(!i)return}return e.schema.clobber&&e.schema.clobberPrefix&&e.schema.clobber.includes(n)?e.schema.clobberPrefix+r:r}}function o8(e,t,n){const r=e.schema.protocols&&ji.call(e.schema.protocols,t)?e.schema.protocols[t]:void 0;if(!r||r.length===0)return!0;const i=String(n),s=i.indexOf(":"),u=i.indexOf("?"),c=i.indexOf("#"),d=i.indexOf("/");if(s<0||d>-1&&s>d||u>-1&&s>u||c>-1&&s>c)return!0;let f=-1;for(;++f<r.length;){const h=r[f];if(s===h.length&&i.slice(0,h.length)===h)return!0}return!1}function Tu(e,t){const n=ub(t);t.data&&(e.data=Lo(t.data)),n&&(e.position=n)}function Ex(e,t){let n,r=-1;if(e)for(;++r<e.length;){const i=e[r],s=typeof i=="string"?i:i[0];if(s===t)return i;s==="data*"&&(n=i)}if(t.length>4&&t.slice(0,4).toLowerCase()==="data")return n}function s8(e){return function(t){return QD(t,e)}}const bx=({globalClassName:e,openLinksInNewTab:t,href:n,title:r,onClick:i,children:s})=>{const u=/^tel:/i.test(n!=null?n:""),d=n?!!(n&&t&&!u)?"_blank":"_self":void 0;return w.jsx("a",ce(M(M({className:D(e,`${N}-link`)},n?{href:n,target:d,onClick:i}:{}),r?{title:r}:{}),{rel:"noopener noreferrer",children:s}))},a8=()=>{const{disclaimerText:e,disclaimerMarkdown:t,globalClassName:n}=st();return!e&&!t?null:w.jsx("div",{className:D(n,`${N}-disclaimer`),children:t?w.jsx(lw,{rehypePlugins:[fx,s8],components:{ul:({children:r})=>w.jsx("ul",{className:D(n,`${N}-ul`),children:r}),ol:({children:r})=>w.jsx("ol",{className:D(n,`${N}-ol`),children:r}),li:({children:r})=>w.jsx("li",{className:D(n,`${N}-li`),children:r}),a:({href:r,title:i,children:s})=>w.jsx(bx,{globalClassName:n,openLinksInNewTab:!0,href:r,title:i,children:s}),img:({src:r,alt:i})=>w.jsx("img",{className:D(n,`${N}-disclaimer-image`),src:r,alt:i}),p:({children:r})=>w.jsx("p",{className:D(n,`${N}-disclaimer-text`),children:r}),span:({children:r})=>w.jsx("span",{className:D(n,`${N}-disclaimer-text-span`),children:r})},children:t}):w.jsx("p",{className:D(n,`${N}-disclaimer-text`),children:e})})},u8=Math.round(Vf/(1024*1024)),c8=e=>e==="oversize"?`File size exceeds the ${u8}MB limit. Please choose a smaller file.`:"That file type isn't supported. Please choose a PNG, JPG, or GIF image.",Mh=({className:e,isLoading:t,componentType:n,onSubmit:r})=>{var j;const{isConnected:i,sessionExpired:s,canInitialize:u,messages:c}=zt(),{globalClassName:d,searchConfig:f,enableEscalationToAgent:h,enableImageUpload:m,enablePageContext:E}=st(),[,b]=k.useReducer(q=>q+1,0),T=E?y1():null;k.useEffect(()=>{let q=!0;const P=()=>{queueMicrotask(()=>{q&&b()})};return r1(P),h1(P),P(),()=>{q=!1,i1(P),m1(P)}},[]);const _=k.useRef(null),I=k.useCallback(()=>{const q=_.current;if(!q)return;q.style.height="0px";const P=getComputedStyle(q),ge=parseFloat(P.borderTopWidth)+parseFloat(P.borderBottomWidth);q.style.height=`${q.scrollHeight+(ge||0)}px`},[]);k.useLayoutEffect(()=>{const q=_.current;if(!q)return;I();let P=q.getBoundingClientRect().width;const ge=new ResizeObserver(()=>{const Re=q.getBoundingClientRect().width;Re!==P&&(P=Re,I())});return ge.observe(q),()=>ge.disconnect()},[I]);const v=k.useRef(c);v.current=c;const[S,R]=k.useState(!1),[U,B]=k.useState(null),A=m,G=!Zy(i,s,u),W=t||G,re=(f==null?void 0:f.placeholder)||(T==null?void 0:T.placeholder)||"Ask us anything",H=k.useCallback(q=>{var P;q.key!=="Enter"||q.shiftKey||q.nativeEvent.isComposing||q.keyCode===229||(q.preventDefault(),W||(P=q.currentTarget.form)==null||P.requestSubmit())},[W]),ee=k.useCallback(q=>B(c8(q)),[]),{file:Q,attach:me,clear:V}=LO({allowedMime:I1,maxBytes:Number.POSITIVE_INFINITY,onReject:ee});k.useEffect(()=>{Q&&B(null)},[Q]);const ue=k.useCallback(q=>Ie(null,null,function*(){var ge,Re,pe;if(q.preventDefault(),W)return;B(null);const P=(((ge=_.current)==null?void 0:ge.value)||"").trim();if(P||Q){const Ne=!i&&!s&&u===!0,ve=v.current.length;_.current.value="",I(),(Re=_.current)==null||Re.focus({preventScroll:!0});const ze={text:P};Q&&(ze.file=Q),V();const rt=yield r(ze),Ot=!!rt&&rt.outcome!=="success",ct=v.current.length===ve,_t=((pe=_.current)==null?void 0:pe.value)==="";Ot&&(Ne&&ct&&_t)&&(_.current.value=P,I(),ze.file&&me([ze.file]),_.current.disabled||_.current.focus({preventScroll:!0}))}}),[Q,i,s,u,W,V,r,me,I]),fe=k.useCallback(()=>{r({text:"Can you connect me to a human?"})},[r]),ae=k.useCallback(q=>{!A||W||(q.preventDefault(),R(!0))},[A,W]),J=k.useCallback(()=>R(!1),[]),se=k.useCallback(q=>{!A||W||(q.preventDefault(),R(!1),me(q.dataTransfer.files))},[A,W,me]),O=k.useCallback(q=>{!A||W||q.clipboardData.files.length>0&&me(q.clipboardData.files)},[A,W,me]);return w.jsxs("div",{className:D(d,e,`cim-${n}-component`,Q&&"with-attachments",`${N}-search-bar-wrapper`),children:[A&&Q&&w.jsx(DO,{file:Q,componentType:n,globalClassName:d,onRemove:V}),A&&U&&w.jsx("div",{className:D(d,`${N}-attach-error`),role:"alert",children:U}),w.jsxs("form",{className:D(d,e,`cim-${n}-component`,S&&"drag-over",`${N}-search-bar`,T&&`${N}-search-bar-with-context`,h&&`${N}-search-bar-with-escalation`),name:`${N}-search-form`,onSubmit:ue,onDragOver:ae,onDragLeave:J,onDrop:se,children:[T&&w.jsx("div",{className:`${N}-page-context-row`,role:"group","aria-label":"Current page context",children:w.jsxs("span",{className:`${N}-page-context-chip`,children:[T.type==="pdp"&&T.imageUrl&&w.jsx("img",{src:T.imageUrl,alt:"",className:`${N}-page-context-image`}),T.type==="srp"&&w.jsx(HE,{"aria-hidden":"true",className:`${N}-page-context-icon`}),w.jsx("span",{className:`${N}-page-context-name`,title:T.label,children:T.label}),w.jsx("button",{type:"button",className:`${N}-page-context-remove`,"aria-label":T.removeLabel,onClick:Uf,children:w.jsx(OO,{"aria-hidden":"true"})})]})}),w.jsxs("div",{className:D(d,e,`cim-${n}-component`,`${N}-messaging-input-group`,`${N}-messaging-composer-group`),children:[w.jsxs("div",{className:D(d,e,`cim-${n}-component`,`${N}-messaging-input-group`),children:[A&&w.jsx(MO,{componentType:n,accept:Kk,disabled:W,globalClassName:d,className:e,icon:w.jsx(kO,{}),onFiles:me}),w.jsx("textarea",{className:D(d,e,`cim-${n}-component`,`${N}-search-input`),rows:1,ref:_,placeholder:re,"aria-label":(f==null?void 0:f.inputAriaLabel)||re,name:`${N}-user-input`,disabled:G,readOnly:t,onPaste:O,onInput:I,onKeyDown:H})]}),w.jsx(BO,{className:e,globalClassName:d,searchConfig:ce(M({},f),{buttonIcon:(j=f==null?void 0:f.buttonIcon)!=null?j:"arrow"}),componentType:n,isLoading:W})]}),h&&w.jsx(kr,{className:d,ariaLabel:"Connect to a human agent",title:"Connect to a human agent",disabled:W,onClick:fe,icon:w.jsx(gO,{})})]}),w.jsx(a8,{})]})};function l8(e){return ut({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 d8(e){return ut({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 wx=k.createContext({isOpen:!1,panelId:"",triggerId:""}),Fh=k.createContext(null),xx=k.createContext(null),Uo=()=>{var n,r;const e=k.useContext(Fh),t=k.useContext(xx);return(r=(n=e==null?void 0:e.closeMenu)!=null?n:t==null?void 0:t.closeMenu)!=null?r:(()=>{})},Tx=({onClearChat:e,componentType:t})=>{const n=Uo(),r=()=>{e(),n()};return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"clear-chat-button",`cim-${t}-component`),onClick:r,children:[w.jsx(d8,{}),"Clear chat"]})},_x=({onDownloadTranscript:e,componentType:t})=>{const{logger:n}=st(),r=Uo(),[i,s]=k.useState(!1),u=()=>Ie(null,null,function*(){if(!i){s(!0);try{yield e(),r()}catch(c){n==null||n.error("Error downloading transcript:",c)}finally{s(!1)}}});return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"download-transcript-button",`cim-${t}-component`),onClick:u,disabled:i,children:[w.jsx(l8,{}),"Download transcript"]})},vx=({onEndConversation:e,componentType:t})=>{const n=Uo(),r=()=>{e(),n()};return w.jsxs("button",{className:D(`${N}-overflow-menu-button`,"end-conversation-button",`cim-${t}-component`),onClick:r,children:[w.jsx(AO,{}),"End conversation"]})};function f8(e){return e==null?[]:Array.isArray(e)?e:[e]}var p8=(e,...t)=>e.concat(t),h8=(e,...t)=>e.filter(n=>!t.includes(n)),m8=e=>Array.from(new Set(e));function Sx(e,t,n={}){const{step:r=1,loop:i=!0}=n,s=t+r,u=e.length,c=u-1;return t===-1?r>0?0:c:s<0?i?c:0:s>=u?i?0:t>u?u:t:s}function g8(e,t,n={}){const{step:r=1,loop:i=!0}=n;return Sx(e,t,{step:-r,loop:i})}var y8=e=>Array.isArray(e),Ax=e=>e!=null&&typeof e=="object",E8=e=>Ax(e)&&!y8(e),Pl=e=>typeof e=="string",Us=e=>typeof e=="function",b8=e=>e==null,w8=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),x8=e=>Object.prototype.toString.call(e),kx=Function.prototype.toString,T8=kx.call(Object),_8=e=>{if(!Ax(e)||x8(e)!="[object Object]"||A8(e))return!1;const t=Object.getPrototypeOf(e);if(t===null)return!0;const n=w8(t,"constructor")&&t.constructor;return typeof n=="function"&&n instanceof n&&kx.call(n)==T8},v8=e=>typeof e=="object"&&e!==null&&"$$typeof"in e&&"props"in e,S8=e=>typeof e=="object"&&e!==null&&"__v_isVNode"in e,A8=e=>v8(e)||S8(e),k8=e=>e(),C8=()=>{},Bh=(...e)=>(...t)=>{e.forEach(function(n){n==null||n(...t)})};function N8(e,t=0){let n=0,r=null;return((...i)=>{const s=Date.now(),u=s-n;u>=t?(r&&(clearTimeout(r),r=null),e(...i),n=s):r||(r=setTimeout(()=>{e(...i),n=Date.now(),r=null},t-u))})}var{min:I8,max:O8}=Math,P8=e=>Number.isNaN(e),R8=e=>P8(e)?0:e,Cx=(e,t,n)=>I8(O8(R8(e),t),n);function Uh(e){if(!_8(e)||e===void 0)return e;const t=Reflect.ownKeys(e).filter(r=>typeof r=="string"),n={};for(const r of t){const i=e[r];i!==void 0&&(n[r]=Uh(i))}return n}function jh(...e){e.length===1?e[0]:e[1],e.length===2&&e[0]}function L8(e,t){if(e==null)throw new Error(t())}function D8(e,t,n){let r=[];for(const i of t)e[i]==null&&r.push(i);if(r.length>0)throw new Error(`[zag-js${` > ${n}`}] missing required props: ${r.join(", ")}`)}var M8=Object.defineProperty,F8=(e,t,n)=>t in e?M8(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Hh=(e,t,n)=>F8(e,typeof t!="symbol"?t+"":t,n),Nx=()=>{},Rl=e=>typeof e=="object"&&e!==null,js=e=>e?"":void 0,Ix=e=>e?"true":void 0,B8=1,U8=9,j8=11,pn=e=>Rl(e)&&e.nodeType===B8&&typeof e.nodeName=="string",Ll=e=>Rl(e)&&e.nodeType===U8,H8=e=>Rl(e)&&e===e.window,Ox=e=>pn(e)?e.localName||"":"#document";function $8(e){return["html","body","#document"].includes(Ox(e))}var z8=e=>Rl(e)&&e.nodeType!==void 0,jo=e=>z8(e)&&e.nodeType===j8&&"host"in e,V8=e=>pn(e)&&e.localName==="input",q8=e=>pn(e)?e.offsetWidth>0||e.offsetHeight>0||e.getClientRects().length>0:!1;function _u(e){if(!e)return!1;const t=e.getRootNode();return zs(t)===e}var W8=/(textarea|select)/;function Y8(e){if(e==null||!pn(e))return!1;try{return V8(e)&&e.selectionStart!=null||W8.test(e.localName)||e.isContentEditable||e.getAttribute("contenteditable")==="true"||e.getAttribute("contenteditable")===""}catch(t){return!1}}function Hs(e,t){var r;if(!e||!t||!pn(e)||!pn(t))return!1;const n=(r=t.getRootNode)==null?void 0:r.call(t);if(e===t||e.contains(t))return!0;if(n&&jo(n)){let i=t;for(;i;){if(e===i)return!0;i=i.parentNode||i.host}}return!1}function Kr(e){var t;return Ll(e)?e:H8(e)?e.document:(t=e==null?void 0:e.ownerDocument)!=null?t:document}function G8(e){return Kr(e).documentElement}function $s(e){var t,n,r;return jo(e)?$s(e.host):Ll(e)?(t=e.defaultView)!=null?t:window:pn(e)&&(r=(n=e.ownerDocument)==null?void 0:n.defaultView)!=null?r:window}function zs(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 X8(e){if(Ox(e)==="html")return e;const t=e.assignedSlot||e.parentNode||jo(e)&&e.host||G8(e);return jo(t)?t.host:t}function $h(e){var n;let t;try{if(t=e.getRootNode({composed:!0}),Ll(t)||jo(t))return t}catch(r){}return(n=e.ownerDocument)!=null?n:document}var zh=new WeakMap;function Vs(e){return zh.has(e)||zh.set(e,$s(e).getComputedStyle(e)),zh.get(e)}var Vh=new Set(["menu","listbox","dialog","grid","tree","region"]),K8=e=>Vh.has(e),Px=e=>{var t;return((t=e.getAttribute("aria-controls"))==null?void 0:t.split(" "))||[]};function Rx(e,t){const n=new Set,r=$h(e),i=s=>{const u=s.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Px(c);for(const f of d){if(!f||n.has(f))continue;n.add(f);const h=r.getElementById(f);if(h){const m=h.getAttribute("role"),E=h.getAttribute("aria-modal")==="true";if(m&&K8(m)&&!E&&(h===t||h.contains(t)||i(h)))return!0}}}return!1};return i(e)}function Lx(e,t){const n=$h(e),r=new Set,i=s=>{const u=s.querySelectorAll("[aria-controls]");for(const c of u){if(c.getAttribute("aria-expanded")!=="true")continue;const d=Px(c);for(const f of d){if(!f||r.has(f))continue;r.add(f);const h=n.getElementById(f);if(h){const m=h.getAttribute("role"),E=h.getAttribute("aria-modal")==="true";m&&Vh.has(m)&&!E&&(t(h),i(h))}}}};i(e)}function Q8(e){const t=new Set;return Lx(e,n=>{e.contains(n)||t.add(n)}),Array.from(t)}function J8(e){const t=e.getAttribute("role");return!!(t&&Vh.has(t))}function Z8(e){return e.hasAttribute("aria-controls")&&e.getAttribute("aria-expanded")==="true"}function eM(e){var t;return Z8(e)?!0:!!((t=e.querySelector)!=null&&t.call(e,'[aria-controls][aria-expanded="true"]'))}function tM(e){if(!e.id)return!1;const t=$h(e),n=CSS.escape(e.id),r=`[aria-controls~="${n}"][aria-expanded="true"], [aria-controls="${n}"][aria-expanded="true"]`;return!!(t.querySelector(r)&&J8(e))}var qh=()=>typeof document!="undefined";function nM(){var t;const e=navigator.userAgentData;return(t=e==null?void 0:e.platform)!=null?t:navigator.platform}var Wh=e=>qh()&&e.test(nM()),rM=e=>qh()&&e.test(navigator.vendor),Dx=()=>qh()&&!!navigator.maxTouchPoints,iM=()=>Wh(/^iPhone/i),oM=()=>Wh(/^iPad/i)||Yh()&&navigator.maxTouchPoints>1,Dl=()=>iM()||oM(),sM=()=>Yh()||Dl(),Yh=()=>Wh(/^Mac/i),aM=()=>sM()&&rM(/apple/i);function uM(e){var t,n,r,i;return(i=(t=e.composedPath)==null?void 0:t.call(e))!=null?i:(r=(n=e.nativeEvent)==null?void 0:n.composedPath)==null?void 0:r.call(n)}function Ir(e){var n;const t=uM(e);return(n=t==null?void 0:t[0])!=null?n:e.target}var Mx=e=>e.button===0,cM=e=>e.button===2||Yh()&&e.ctrlKey&&e.button===0,lM=e=>"touches"in e&&e.touches.length>0,dM={Up:"ArrowUp",Down:"ArrowDown",Esc:"Escape"," ":"Space",",":"Comma",Left:"ArrowLeft",Right:"ArrowRight"},Fx={ArrowLeft:"ArrowRight",ArrowRight:"ArrowLeft"};function fM(e,t={}){var u;const{dir:n="ltr",orientation:r="horizontal"}=t;let i=e.key;return i=(u=dM[i])!=null?u:i,n==="rtl"&&r==="horizontal"&&i in Fx&&(i=Fx[i]),i}function Bx(e,t="client"){const n=lM(e)?e.touches[0]||e.changedTouches[0]:e;return{x:n[`${t}X`],y:n[`${t}Y`]}}var hn=(e,t,n,r)=>{const i=typeof e=="function"?e():e;return i==null||i.addEventListener(t,n,r),()=>{i==null||i.removeEventListener(t,n,r)}},Ux=e=>pn(e)&&e.tagName==="IFRAME",pM=/^(audio|video|details)$/;function jx(e){const t=e.getAttribute("tabindex");return t?parseInt(t,10):NaN}var hM=e=>!Number.isNaN(jx(e)),mM=e=>jx(e)<0;function gM(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 Hx(e,t,n){const r=[...e],i=[...e],s=new Set,u=new Map;e.forEach((d,f)=>u.set(d,f));let c=0;for(;c<i.length;){const d=i[c++];if(!d||s.has(d))continue;s.add(d);const f=gM(d,t);if(f){const h=Array.from(f.querySelectorAll(Ml)).filter(n),m=u.get(d);if(m!==void 0){const E=m+1;r.splice(E,0,...h),h.forEach((b,T)=>{u.set(b,E+T)});for(let b=E+h.length;b<r.length;b++)u.set(r[b],b)}else{const E=r.length;r.push(...h),h.forEach((b,T)=>{u.set(b,E+T)})}i.push(...h)}}return r}var Ml="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",$x=(e,t={})=>{if(!e)return[];const{includeContainer:n=!1,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Ml));(n==!0||n=="if-empty"&&i.length===0)&&pn(e)&&Qr(e)&&i.unshift(e);const u=[];for(const c of i)if(Qr(c)){if(Ux(c)&&c.contentDocument){const d=c.contentDocument.body;u.push(...$x(d,{getShadowRoot:r}));continue}u.push(c)}return r?Hx(u,r,Qr):u};function Qr(e){return!pn(e)||e.closest("[inert]")?!1:e.matches(Ml)&&q8(e)}function qs(e,t={}){if(!e)return[];const{includeContainer:n,getShadowRoot:r}=t,i=Array.from(e.querySelectorAll(Ml));n&&Ho(e)&&i.unshift(e);const s=[];for(const u of i)if(Ho(u)){if(Ux(u)&&u.contentDocument){const c=u.contentDocument.body;s.push(...qs(c,{getShadowRoot:r}));continue}s.push(u)}if(r){const u=Hx(s,r,Ho);return!u.length&&n?i:u}return!s.length&&n?i:s}function Ho(e){return pn(e)&&e.tabIndex>0?!0:Qr(e)&&!mM(e)}function yM(e,t={}){const n=qs(e,t),r=n[0]||null,i=n[n.length-1]||null;return[r,i]}function EM(e,t={}){const{current:n,getShadowRoot:r}=t,i=qs(e,{getShadowRoot:r}),s=(e==null?void 0:e.ownerDocument)||document,u=n!=null?n:zs(s);if(!u)return null;const c=i.indexOf(u);return i[c+1]||null}function vu(e){return e.tabIndex<0&&(pM.test(e.localName)||Y8(e))&&!hM(e)?0:e.tabIndex}function zx(e){const{root:t,getInitialEl:n,filter:r,enabled:i=!0}=e;if(!i)return;let s=null;if(s||(s=typeof n=="function"?n():n),s||(s=t==null?void 0:t.querySelector("[data-autofocus],[autofocus]")),!s){const u=qs(t);s=r?u.filter(r)[0]:u[0]}return s||t||void 0}var bM=class eA{constructor(){Hh(this,"id",null),Hh(this,"fn_cleanup"),Hh(this,"cleanup",()=>{this.cancel()})}static create(){return new eA}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 sn(e){const t=bM.create();return t.request(e),t.cleanup}function Vx(e){const t=new Set;function n(r){const i=globalThis.requestAnimationFrame(r);t.add(()=>globalThis.cancelAnimationFrame(i))}return n(()=>n(e)),function(){t.forEach(i=>i())}}function Gh(e){const t=X8(e);return $8(t)?Kr(t).body:pn(t)&&TM(t)?t:Gh(t)}var wM=/auto|scroll|overlay|hidden|clip/,xM=new Set(["inline","contents"]);function TM(e){const t=$s(e),{overflow:n,overflowX:r,overflowY:i,display:s}=t.getComputedStyle(e);return wM.test(n+i+r)&&!xM.has(s)}var Ws="default",Xh="",Fl=new WeakMap;function _M(e={}){const{target:t,doc:n}=e,r=n!=null?n:document,i=r.documentElement;return Dl()?(Ws==="default"&&(Xh=i.style.webkitUserSelect,i.style.webkitUserSelect="none"),Ws="disabled"):t&&(Fl.set(t,t.style.userSelect),t.style.userSelect="none"),()=>vM({target:t,doc:r})}function vM(e={}){const{target:t,doc:n}=e,i=(n!=null?n:document).documentElement;if(Dl()){if(Ws!=="disabled")return;Ws="restoring",setTimeout(()=>{Vx(()=>{Ws==="restoring"&&(i.style.webkitUserSelect==="none"&&(i.style.webkitUserSelect=Xh||""),Xh="",Ws="default")})},300)}else if(t&&Fl.has(t)){const s=Fl.get(t);t.style.userSelect==="none"&&(t.style.userSelect=s!=null?s:""),t.getAttribute("style")===""&&t.removeAttribute("style"),Fl.delete(t)}}function SM(e={}){const u=e,{defer:t,target:n}=u,r=_n(u,["defer","target"]),i=t?sn:c=>c(),s=[];return s.push(i(()=>{const c=typeof n=="function"?n():n;s.push(_M(ce(M({},r),{target:c})))})),()=>{s.forEach(c=>c==null?void 0:c())}}function AM(e,t){const{onPointerMove:n,onPointerUp:r}=t,i=c=>{const d=Bx(c),f=Math.sqrt(bf(d.x,2)+bf(d.y,2)),h=c.pointerType==="touch"?10:5;if(!(f<h)){if(c.pointerType==="mouse"&&c.button===0){s(c);return}n({point:d,event:c})}},s=c=>{const d=Bx(c);r({point:d,event:c})},u=[hn(e,"pointermove",i,!1),hn(e,"pointerup",s,!1),hn(e,"pointercancel",s,!1),hn(e,"contextmenu",s,!1),SM({doc:e})];return()=>{u.forEach(c=>c())}}function kM(e,t={}){const{triggerElement:n,onFocus:r,onFocusEnter:i,getShadowRoot:s}=t,u=(e==null?void 0:e.ownerDocument)||document,c=u.body;function d(f){if(f.key!=="Tab")return;let h=null;const[m,E]=yM(e,{includeContainer:!0,getShadowRoot:s}),b=EM(c,{current:n,getShadowRoot:s}),T=!m&&!E;f.shiftKey&&_u(b)?(i==null||i(),h=E):f.shiftKey&&(_u(m)||T)?h=n:!f.shiftKey&&_u(n)?(i==null||i(),h=m):!f.shiftKey&&(_u(E)||T)&&(h=b),h&&(f.preventDefault(),typeof r=="function"?r(h):h.focus())}return hn(u,"keydown",d,!0)}function CM(e,t){const c=t,{defer:n,triggerElement:r}=c,i=_n(c,["defer","triggerElement"]),s=n?sn:d=>d(),u=[];return u.push(s(()=>{const d=typeof e=="function"?e():e,f=typeof r=="function"?r():r;u.push(kM(d,M({triggerElement:f},i)))})),()=>{u.forEach(d=>d==null?void 0:d())}}function NM(e,t){var n;return Array.from((n=e==null?void 0:e.querySelectorAll(t))!=null?n:[])}function Bl(e,t){if(!e)return Nx;const n=Object.keys(t).reduce((r,i)=>(r[i]=e.style.getPropertyValue(i),r),{});return Object.assign(e.style,t),()=>{Object.assign(e.style,n),e.style.length===0&&e.removeAttribute("style")}}function IM(e,t,n){if(!e)return Nx;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 OM(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 PM(e,t){const{timeout:n,rootNode:r}=t,i=$s(r),s=Kr(r),u=new i.AbortController;return OM(new Promise(c=>{const d=e();if(d){c(d);return}const f=new i.MutationObserver(()=>{const h=e();h&&h.isConnected&&(f.disconnect(),c(h))});f.observe(s.body,{childList:!0,subtree:!0})}),u,n)}var RM=(...e)=>e.map(t=>{var n;return(n=t==null?void 0:t.trim)==null?void 0:n.call(t)}).filter(Boolean).join(" "),LM=/((?:--)?(?:\w+-?)+)\s*:\s*([^;]*)/g,qx=e=>{const t={};let n;for(;n=LM.exec(e);)t[n[1]]=n[2];return t},DM=(e,t)=>{if(Pl(e)){if(Pl(t))return`${e};${t}`;e=qx(e)}else Pl(t)&&(t=qx(t));return Object.assign({},e!=null?e:{},t!=null?t:{})};function an(...e){let t={};for(let n of e){if(!n)continue;for(let i in t){if(i.startsWith("on")&&typeof t[i]=="function"&&typeof n[i]=="function"){t[i]=Bh(n[i],t[i]);continue}if(i==="className"||i==="class"){t[i]=RM(t[i],n[i]);continue}if(i==="style"){t[i]=DM(t[i],n[i]);continue}t[i]=n[i]!==void 0?n[i]:t[i]}for(let i in n)t[i]===void 0&&(t[i]=n[i]);const r=Object.getOwnPropertySymbols(n);for(let i of r)t[i]=n[i]}return t}function AV(e){return e}var Ys=(e=>(e.NotStarted="Not Started",e.Started="Started",e.Stopped="Stopped",e))(Ys||{}),Kh="__init__";function MM(e){const t=()=>{var u,c;return(c=(u=e.getRootNode)==null?void 0:u.call(e))!=null?c:document},n=()=>Kr(t()),r=()=>{var u;return(u=n().defaultView)!=null?u:window},i=()=>zs(t()),s=u=>t().getElementById(u);return ce(M({},e),{getRootNode:t,getDoc:n,getWin:r,getActiveElement:i,isActiveElement:_u,getById:s})}function FM(e){return new Proxy({},{get(t,n){return n==="style"?r=>e({style:r}).style:e}})}var Gs=()=>e=>Array.from(new Set(e)),Wx=typeof globalThis.document!="undefined"?k.useLayoutEffect:k.useEffect;function Ul(e){var m,E;const t=(m=e().value)!=null?m:e().defaultValue,n=(E=e().isEqual)!=null?E:Object.is,[r]=k.useState(t),[i,s]=k.useState(r),u=e().value!==void 0,c=k.useRef(i);c.current=u?e().value:i;const d=k.useRef(c.current);Wx(()=>{d.current=c.current},[i,e().value]);const f=b=>{var I,v;const T=d.current,_=Us(b)?b(T):b;e().debug&&console.log(`[bindable > ${e().debug}] setValue`,{next:_,prev:T}),u||s(_),n(_,T)||(v=(I=e()).onChange)==null||v.call(I,_,T)};function h(){return u?e().value:i}return{initial:r,ref:c,get:h,set(b){(e().sync?Ns.flushSync:k8)(()=>f(b))},invoke(b,T){var _,I;(I=(_=e()).onChange)==null||I.call(_,b,T)},hash(b){var T,_,I;return(I=(_=(T=e()).hash)==null?void 0:_.call(T,b))!=null?I:String(b)}}}Ul.cleanup=e=>{k.useEffect(()=>e,[])},Ul.ref=e=>{const t=k.useRef(e);return{get:()=>t.current,set:n=>{t.current=n}}};function BM(e){const t=k.useRef(e);return{get(n){return t.current[n]},set(n,r){t.current[n]=r}}}var UM=(e,t)=>{const n=k.useRef(!1),r=k.useRef(!1);k.useEffect(()=>{if(n.current&&r.current)return t();r.current=!0},[...(e!=null?e:[]).map(i=>typeof i=="function"?i():i)]),k.useEffect(()=>(n.current=!0,()=>{n.current=!1}),[])};function jl(e,t={}){var ee,Q,me,V,ue,fe;const n=k.useMemo(()=>{const{id:ae,ids:J,getRootNode:se}=t;return MM({id:ae,ids:J,getRootNode:se})},[t]),r=(...ae)=>{e.debug&&console.log(...ae)},i=(Q=(ee=e.props)==null?void 0:ee.call(e,{props:Uh(t),scope:n}))!=null?Q:t,s=jM(i),u=(me=e.context)==null?void 0:me.call(e,{prop:s,bindable:Ul,scope:n,flush:Gx,getContext(){return d},getComputed(){return B},getRefs(){return _},getEvent(){return b()}}),c=Yx(u),d={get(ae){var J;return(J=c.current)==null?void 0:J[ae].ref.current},set(ae,J){var se;(se=c.current)==null||se[ae].set(J)},initial(ae){var J;return(J=c.current)==null?void 0:J[ae].initial},hash(ae){var se,O;const J=(se=c.current)==null?void 0:se[ae].get();return(O=c.current)==null?void 0:O[ae].hash(J)}},f=k.useRef(new Map),h=k.useRef(null),m=k.useRef(null),E=k.useRef({type:""}),b=()=>ce(M({},E.current),{current(){return E.current},previous(){return m.current}}),T=()=>ce(M({},A),{matches(...ae){return ae.includes(A.ref.current)},hasTag(ae){var J,se;return!!((se=(J=e.states[A.ref.current])==null?void 0:J.tags)!=null&&se.includes(ae))}}),_=BM((ue=(V=e.refs)==null?void 0:V.call(e,{prop:s,context:d}))!=null?ue:{}),I=()=>({state:T(),context:d,event:b(),prop:s,send:H,action:v,guard:S,track:UM,refs:_,computed:B,flush:Gx,scope:n,choose:U}),v=ae=>{const J=Us(ae)?ae(I()):ae;if(!J)return;const se=J.map(O=>{var q,P;const j=(P=(q=e.implementations)==null?void 0:q.actions)==null?void 0:P[O];return j||jh(`[zag-js] No implementation found for action "${JSON.stringify(O)}"`),j});for(const O of se)O==null||O(I())},S=ae=>{var J,se;return Us(ae)?ae(I()):(se=(J=e.implementations)==null?void 0:J.guards)==null?void 0:se[ae](I())},R=ae=>{const J=Us(ae)?ae(I()):ae;if(!J)return;const se=J.map(j=>{var P,ge;const q=(ge=(P=e.implementations)==null?void 0:P.effects)==null?void 0:ge[j];return q||jh(`[zag-js] No implementation found for effect "${JSON.stringify(j)}"`),q}),O=[];for(const j of se){const q=j==null?void 0:j(I());q&&O.push(q)}return()=>O.forEach(j=>j==null?void 0:j())},U=ae=>f8(ae).find(J=>{let se=!J.guard;return Pl(J.guard)?se=!!S(J.guard):Us(J.guard)&&(se=J.guard(I())),se}),B=ae=>{L8(e.computed,()=>"[zag-js] No computed object found on machine");const J=e.computed[ae];return J({context:d,event:b(),prop:s,refs:_,scope:n,computed:B})},A=Ul(()=>({defaultValue:e.initialState({prop:s}),onChange(ae,J){var O,j,q,P;if(J){const ge=f.current.get(J);ge==null||ge(),f.current.delete(J)}J&&v((O=e.states[J])==null?void 0:O.exit),v((j=h.current)==null?void 0:j.actions);const se=R((q=e.states[ae])==null?void 0:q.effects);if(se&&f.current.set(ae,se),J===Kh){v(e.entry);const ge=R(e.effects);ge&&f.current.set(Kh,ge)}v((P=e.states[ae])==null?void 0:P.entry)}})),G=k.useRef(void 0),W=k.useRef(Ys.NotStarted);Wx(()=>{queueMicrotask(()=>{var j;const se=W.current===Ys.Started;W.current=Ys.Started,r(se?"rehydrating...":"initializing...");const O=(j=G.current)!=null?j:A.initial;A.invoke(O,se?A.get():Kh)});const ae=f.current,J=A.ref.current;return()=>{r("unmounting..."),G.current=J,W.current=Ys.Stopped,ae.forEach(se=>se==null?void 0:se()),f.current=new Map,h.current=null,queueMicrotask(()=>{v(e.exit)})}},[]);const re=()=>"ref"in A?A.ref.current:A.get(),H=ae=>{queueMicrotask(()=>{var P,ge,Re,pe,Ne;if(W.current!==Ys.Started)return;m.current=E.current,E.current=ae;let J=re();const se=(Re=(P=e.states[J].on)==null?void 0:P[ae.type])!=null?Re:(ge=e.on)==null?void 0:ge[ae.type],O=U(se);if(!O)return;h.current=O;const j=(pe=O.target)!=null?pe:J;r("transition",ae.type,O.target||J,`(${O.actions})`);const q=j!==J;q?Ns.flushSync(()=>A.set(j)):O.reenter&&!q?A.invoke(J,J):v((Ne=O.actions)!=null?Ne:[])})};return(fe=e.watch)==null||fe.call(e,I()),{state:T(),send:H,context:d,prop:s,scope:n,refs:_,computed:B,event:b(),getStatus:()=>W.current}}function Yx(e){const t=k.useRef(e);return t.current=e,t}function jM(e){const t=Yx(e);return function(r){return t.current[r]}}function Gx(e){queueMicrotask(()=>{Ns.flushSync(()=>e())})}var Qh=FM(e=>e);function Hl(...e){return t=>{const n=[];for(const r of e)if(typeof r=="function"){const i=r(t);typeof i=="function"&&n.push(i)}else r&&(r.current=t);if(n.length)return()=>{for(const r of n)r()}}}function HM(e){var r,i;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=(i=Object.getOwnPropertyDescriptor(e,"ref"))==null?void 0:i.get,n=t&&"isReactWarning"in t&&t.isReactWarning,n?e.props.ref:e.props.ref||e.ref)}const Jh=e=>{const t=k.memo(k.forwardRef((n,r)=>{const f=n,{asChild:i,children:s}=f,u=_n(f,["asChild","children"]);if(!i)return k.createElement(e,ce(M({},u),{ref:r}),s);if(!k.isValidElement(s))return null;const c=k.Children.only(s),d=HM(c);return k.cloneElement(c,ce(M({},an(u,c.props)),{ref:r?Hl(r,d):d}))}));return t.displayName=e.displayName||e.name,t},Nn=(()=>{const e=new Map;return new Proxy(Jh,{apply(t,n,r){return Jh(r[0])},get(t,n){const r=n;return e.has(r)||e.set(r,Jh(r)),e.get(r)}})})();function $M(e,t){return`${e} returned \`undefined\`. Seems you forgot to wrap component within ${t}`}function $o(e={}){const{name:t,strict:n=!0,hookName:r="useContext",providerName:i="Provider",errorMessage:s,defaultValue:u}=e,c=k.createContext(u);c.displayName=t;function d(){var h;const f=k.useContext(c);if(!f&&n){const m=new Error(s!=null?s:$M(r,i));throw m.name="ContextError",(h=Error.captureStackTrace)==null||h.call(Error,m,d),m}return f}return[c.Provider,d,c]}const[zM,Zh]=$o({name:"PopoverContext",hookName:"usePopoverContext",providerName:"<PopoverProvider />"}),[Xx,Su]=$o({name:"PresenceContext",hookName:"usePresenceContext",providerName:"<PresenceProvider />"}),Kx=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:Hl(r.ref,t)}))});Kx.displayName="PopoverContent";const Qx=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(n.getPositionerProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:t}))});Qx.displayName="PopoverPositioner";const Au=()=>(e,t)=>t.reduce((n,r)=>{const[i,s]=n,u=r;return s[u]!==void 0&&(i[u]=s[u]),delete s[u],[i,s]},[{},M({},e)]),Jx=e=>Au()(e,["immediate","lazyMount","onExitComplete","present","skipAnimationOnMount","unmountOnExit"]);function VM(e,t){const{state:n,send:r,context:i}=e,s=n.matches("mounted","unmountSuspended");return{skip:!i.get("initial"),present:s,setNode(u){u&&r({type:"NODE.SET",node:u})},unmount(){r({type:"UNMOUNT"})}}}var qM={props({props:e}){return ce(M({},e),{present:!!e.present})},initialState({prop:e}){return e("present")?"mounted":"unmounted"},refs(){return{node:null,styles:null}},context({bindable:e}){return{unmountAnimationName:e(()=>({defaultValue:null})),prevAnimationName:e(()=>({defaultValue:null})),present:e(()=>({defaultValue:!1})),initial:e(()=>({sync:!0,defaultValue:!1}))}},exit:["clearInitial","cleanupNode"],watch({track:e,prop:t,send:n}){e([()=>t("present")],()=>{n({type:"PRESENCE.CHANGED"})})},on:{"NODE.SET":{actions:["setupNode"]},"PRESENCE.CHANGED":{actions:["setInitial","syncPresence"]}},states:{mounted:{on:{UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]},"UNMOUNT.SUSPEND":{target:"unmountSuspended"}}},unmountSuspended:{effects:["trackAnimationEvents"],on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]},UNMOUNT:{target:"unmounted",actions:["clearPrevAnimationName","invokeOnExitComplete"]}}},unmounted:{on:{MOUNT:{target:"mounted",actions:["setPrevAnimationName"]}}}},implementations:{actions:{setInitial:({context:e})=>{e.get("initial")||queueMicrotask(()=>{e.set("initial",!0)})},clearInitial:({context:e})=>{e.set("initial",!1)},invokeOnExitComplete:({prop:e})=>{var t;(t=e("onExitComplete"))==null||t()},setupNode:({refs:e,event:t})=>{e.get("node")!==t.node&&(e.set("node",t.node),e.set("styles",Vs(t.node)))},cleanupNode:({refs:e})=>{e.set("node",null),e.set("styles",null)},syncPresence:({context:e,refs:t,send:n,prop:r})=>{const i=r("present");if(i)return n({type:"MOUNT",src:"presence.changed"});const s=t.get("node");if(!i&&(s==null?void 0:s.ownerDocument.visibilityState)==="hidden")return n({type:"UNMOUNT",src:"visibilitychange"});sn(()=>{var c,d;const u=$l(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})=>{sn(()=>{e.set("prevAnimationName",$l(t.get("styles")))})},clearPrevAnimationName:({context:e})=>{e.set("prevAnimationName",null)}},effects:{trackAnimationEvents:({context:e,refs:t,send:n,prop:r})=>{const i=t.get("node");if(!i)return;const s=d=>{var h,m,E;((E=(m=(h=d.composedPath)==null?void 0:h.call(d))==null?void 0:m[0])!=null?E:d.target)===i&&e.set("prevAnimationName",$l(t.get("styles")))},u=d=>{const f=$l(t.get("styles"));Ir(d)===i&&f===e.get("unmountAnimationName")&&!r("present")&&n({type:"UNMOUNT",src:"animationend"})};i.addEventListener("animationstart",s),i.addEventListener("animationcancel",u),i.addEventListener("animationend",u);const c=Bl(i,{animationFillMode:"forwards"});return()=>{i.removeEventListener("animationstart",s),i.removeEventListener("animationcancel",u),i.removeEventListener("animationend",u),Vx(()=>c())}}}}};function $l(e){return(e==null?void 0:e.animationName)||"none"}Gs()(["onExitComplete","present","immediate"]);function WM(e,t={}){const{sync:n=!1}=t,r=YM(e);return k.useCallback((...i)=>{var s;return n?queueMicrotask(()=>{var u;return(u=r.current)==null?void 0:u.call(r,...i)}):(s=r.current)==null?void 0:s.call(r,...i)},[n,r])}function YM(e){const t=k.useRef(e);return t.current=e,t}const em=(e={})=>{const E=e,{lazyMount:t,unmountOnExit:n,present:r,skipAnimationOnMount:i=!1}=E,s=_n(E,["lazyMount","unmountOnExit","present","skipAnimationOnMount"]),u=k.useRef(!1),c=ce(M({},s),{present:r,onExitComplete:WM(e.onExitComplete)}),d=jl(qM,c),f=VM(d);f.present&&(u.current=!0);const h=!f.present&&!u.current&&t||n&&!f.present&&u.current,m=()=>({"data-state":f.skip&&i?void 0:r?"open":"closed",hidden:!f.present});return{ref:f.setNode,getPresenceProps:m,present:f.present,unmounted:h}};var zo=(e,t=[])=>({parts:(...n)=>{if(GM(t))return zo(e,n);throw new Error("createAnatomy().parts(...) should only be called once. Did you mean to use .extendWith(...) ?")},extendWith:(...n)=>zo(e,[...t,...n]),omit:(...n)=>zo(e,t.filter(r=>!n.includes(r))),rename:n=>zo(n,t),keys:()=>t,build:()=>[...new Set(t)].reduce((n,r)=>Object.assign(n,{[r]:{selector:[`&[data-scope="${Xs(e)}"][data-part="${Xs(r)}"]`,`& [data-scope="${Xs(e)}"][data-part="${Xs(r)}"]`].join(", "),attrs:{"data-scope":Xs(e),"data-part":Xs(r)}}}),{})}),Xs=e=>e.replace(/([A-Z])([A-Z])/g,"$1-$2").replace(/([a-z])([A-Z])/g,"$1-$2").replace(/[\s_]+/g,"-").toLowerCase(),GM=e=>e.length===0;const XM=["top","right","bottom","left"],Hi=Math.min,di=Math.max,zl=Math.round,Vl=Math.floor,Jr=e=>({x:e,y:e}),KM={left:"right",right:"left",bottom:"top",top:"bottom"};function Zx(e,t,n){return di(e,Hi(t,n))}function fi(e,t){return typeof e=="function"?e(t):e}function $i(e){return e.split("-")[0]}function Ks(e){return e.split("-")[1]}function tm(e){return e==="x"?"y":"x"}function nm(e){return e==="y"?"height":"width"}function Zr(e){const t=e[0];return t==="t"||t==="b"?"y":"x"}function rm(e){return tm(Zr(e))}function QM(e,t,n){n===void 0&&(n=!1);const r=Ks(e),i=rm(e),s=nm(i);let u=i==="x"?r===(n?"end":"start")?"right":"left":r==="start"?"bottom":"top";return t.reference[s]>t.floating[s]&&(u=ql(u)),[u,ql(u)]}function JM(e){const t=ql(e);return[im(e),t,im(t)]}function im(e){return e.includes("start")?e.replace("start","end"):e.replace("end","start")}const eT=["left","right"],tT=["right","left"],ZM=["top","bottom"],e9=["bottom","top"];function t9(e,t,n){switch(e){case"top":case"bottom":return n?t?tT:eT:t?eT:tT;case"left":case"right":return t?ZM:e9;default:return[]}}function n9(e,t,n,r){const i=Ks(e);let s=t9($i(e),n==="start",r);return i&&(s=s.map(u=>u+"-"+i),t&&(s=s.concat(s.map(im)))),s}function ql(e){const t=$i(e);return KM[t]+e.slice(t.length)}function r9(e){var t,n,r,i;return{top:(t=e.top)!=null?t:0,right:(n=e.right)!=null?n:0,bottom:(r=e.bottom)!=null?r:0,left:(i=e.left)!=null?i:0}}function nT(e){return typeof e!="number"?r9(e):{top:e,right:e,bottom:e,left:e}}function Wl(e){const{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function rT(e,t,n){let{reference:r,floating:i}=e;const s=Zr(t),u=rm(t),c=nm(u),d=$i(t),f=s==="y",h=r.x+r.width/2-i.width/2,m=r.y+r.height/2-i.height/2,E=r[c]/2-i[c]/2;let b;switch(d){case"top":b={x:h,y:r.y-i.height};break;case"bottom":b={x:h,y:r.y+r.height};break;case"right":b={x:r.x+r.width,y:m};break;case"left":b={x:r.x-i.width,y:m};break;default:b={x:r.x,y:r.y}}const T=Ks(t);return T&&(b[u]+=E*(T==="end"?1:-1)*(n&&f?-1:1)),b}function i9(e,t){return Ie(this,null,function*(){var n;t===void 0&&(t={});const{x:r,y:i,platform:s,rects:u,elements:c,strategy:d}=e,{boundary:f="clippingAncestors",rootBoundary:h="viewport",elementContext:m="floating",altBoundary:E=!1,padding:b=0}=fi(t,e),T=nT(b),I=c[E?m==="floating"?"reference":"floating":m],v=Wl(yield s.getClippingRect({element:(n=yield s.isElement==null?void 0:s.isElement(I))==null||n?I:I.contextElement||(yield s.getDocumentElement==null?void 0:s.getDocumentElement(c.floating)),boundary:f,rootBoundary:h,strategy:d})),S=m==="floating"?{x:r,y:i,width:u.floating.width,height:u.floating.height}:u.reference,R=yield s.getOffsetParent==null?void 0:s.getOffsetParent(c.floating),U=(yield s.isElement==null?void 0:s.isElement(R))&&(yield s.getScale==null?void 0:s.getScale(R))||{x:1,y:1},B=Wl(s.convertOffsetParentRelativeRectToViewportRelativeRect?yield s.convertOffsetParentRelativeRectToViewportRelativeRect({elements:c,rect:S,offsetParent:R,strategy:d}):S);return{top:(v.top-B.top+T.top)/U.y,bottom:(B.bottom-v.bottom+T.bottom)/U.y,left:(v.left-B.left+T.left)/U.x,right:(B.right-v.right+T.right)/U.x}})}const o9=50,s9=(e,t,n)=>Ie(null,null,function*(){const{placement:r="bottom",strategy:i="absolute",middleware:s=[],platform:u}=n,c=u.detectOverflow?u:ce(M({},u),{detectOverflow:i9}),d=yield u.isRTL==null?void 0:u.isRTL(t);let f=yield u.getElementRects({reference:e,floating:t,strategy:i}),{x:h,y:m}=rT(f,r,d),E=r,b=0;const T={};for(let _=0;_<s.length;_++){const I=s[_];if(!I)continue;const{name:v,fn:S}=I,{x:R,y:U,data:B,reset:A}=yield S({x:h,y:m,initialPlacement:r,placement:E,strategy:i,middlewareData:T,rects:f,platform:c,elements:{reference:e,floating:t}});h=R!=null?R:h,m=U!=null?U:m,T[v]=M(M({},T[v]),B),A&&b<o9&&(b++,typeof A=="object"&&(A.placement&&(E=A.placement),A.rects&&(f=A.rects===!0?yield u.getElementRects({reference:e,floating:t,strategy:i}):A.rects),{x:h,y:m}=rT(f,E,d)),_=-1)}return{x:h,y:m,placement:E,strategy:i,middlewareData:T}}),a9=e=>({name:"arrow",options:e,fn(n){return Ie(this,null,function*(){const{x:r,y:i,placement:s,rects:u,platform:c,elements:d,middlewareData:f}=n,{element:h,padding:m=0}=fi(e,n)||{};if(h==null)return{};const E=nT(m),b={x:r,y:i},T=rm(s),_=nm(T),I=yield c.getDimensions(h),v=T==="y",S=v?"top":"left",R=v?"bottom":"right",U=v?"clientHeight":"clientWidth",B=u.reference[_]+u.reference[T]-b[T]-u.floating[_],A=b[T]-u.reference[T],G=yield c.getOffsetParent==null?void 0:c.getOffsetParent(h);let W=G?G[U]:0;(!W||!(yield c.isElement==null?void 0:c.isElement(G)))&&(W=d.floating[U]||u.floating[_]);const re=B/2-A/2,H=W/2-I[_]/2-1,ee=Hi(E[S],H),Q=Hi(E[R],H),me=W-I[_]-Q,V=W/2-I[_]/2+re,ue=Zx(ee,V,me),fe=!f.arrow&&Ks(s)!=null&&V!==ue&&u.reference[_]/2-(V<ee?ee:Q)-I[_]/2<0,ae=fe?V<ee?V-ee:V-me:0;return{[T]:b[T]+ae,data:M({[T]:ue,centerOffset:V-ue-ae},fe&&{alignmentOffset:ae}),reset:fe}})}}),u9=function(e){return e===void 0&&(e={}),{name:"flip",options:e,fn(n){return Ie(this,null,function*(){var r,i;const{placement:s,middlewareData:u,rects:c,initialPlacement:d,platform:f,elements:h}=n,ue=fi(e,n),{mainAxis:m=!0,crossAxis:E=!0,fallbackPlacements:b,fallbackStrategy:T="bestFit",fallbackAxisSideDirection:_="none",flipAlignment:I=!0}=ue,v=_n(ue,["mainAxis","crossAxis","fallbackPlacements","fallbackStrategy","fallbackAxisSideDirection","flipAlignment"]);if((r=u.arrow)!=null&&r.alignmentOffset)return{};const S=$i(s),R=Zr(d),U=$i(d)===d,B=yield f.isRTL==null?void 0:f.isRTL(h.floating),A=b||(U||!I?[ql(d)]:JM(d)),G=_!=="none";!b&&G&&A.push(...n9(d,I,_,B));const W=[d,...A],re=yield f.detectOverflow(n,v),H=[];let ee=((i=u.flip)==null?void 0:i.overflows)||[];if(m&&H.push(re[S]),E){const fe=QM(s,c,B);H.push(re[fe[0]],re[fe[1]])}if(ee=[...ee,{placement:s,overflows:H}],!H.every(fe=>fe<=0)){var Q,me;const fe=(((Q=u.flip)==null?void 0:Q.index)||0)+1,ae=W[fe];if(ae&&(!(E==="alignment"?R!==Zr(ae):!1)||ee.every(O=>Zr(O.placement)===R?O.overflows[0]>0:!0)))return{data:{index:fe,overflows:ee},reset:{placement:ae}};let J=(me=ee.filter(se=>se.overflows[0]<=0).sort((se,O)=>se.overflows[1]-O.overflows[1])[0])==null?void 0:me.placement;if(!J)switch(T){case"bestFit":{var V;const se=(V=ee.filter(O=>{if(G){const j=Zr(O.placement);return j===R||j==="y"}return!0}).map(O=>[O.placement,O.overflows.filter(j=>j>0).reduce((j,q)=>j+q,0)]).sort((O,j)=>O[1]-j[1])[0])==null?void 0:V[0];se&&(J=se);break}case"initialPlacement":J=d;break}if(s!==J)return{reset:{placement:J}}}return{}})}}};function iT(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function oT(e){return XM.some(t=>e[t]>=0)}const c9=function(e){return e===void 0&&(e={}),{name:"hide",options:e,fn(n){return Ie(this,null,function*(){const{rects:r,platform:i}=n,c=fi(e,n),{strategy:s="referenceHidden"}=c,u=_n(c,["strategy"]);switch(s){case"referenceHidden":{const d=yield i.detectOverflow(n,ce(M({},u),{elementContext:"reference"})),f=iT(d,r.reference);return{data:{referenceHiddenOffsets:f,referenceHidden:oT(f)}}}case"escaped":{const d=yield i.detectOverflow(n,ce(M({},u),{altBoundary:!0})),f=iT(d,r.floating);return{data:{escapedOffsets:f,escaped:oT(f)}}}default:return{}}})}}},sT=new Set(["left","top"]);function l9(e,t){return Ie(this,null,function*(){const{placement:n,platform:r,elements:i}=e,s=yield r.isRTL==null?void 0:r.isRTL(i.floating),u=$i(n),c=Ks(n),d=Zr(n)==="y",f=sT.has(u)?-1:1,h=s&&d?-1:1,m=fi(t,e);let{mainAxis:E,crossAxis:b,alignmentAxis:T}=typeof m=="number"?{mainAxis:m,crossAxis:0,alignmentAxis:null}:{mainAxis:m.mainAxis||0,crossAxis:m.crossAxis||0,alignmentAxis:m.alignmentAxis};return c&&typeof T=="number"&&(b=c==="end"?T*-1:T),d?{x:b*h,y:E*f}:{x:E*f,y:b*h}})}const d9=function(e){return e===void 0&&(e=0),{name:"offset",options:e,fn(n){return Ie(this,null,function*(){var r,i;const{x:s,y:u,placement:c,middlewareData:d}=n,f=yield l9(n,e);return c===((r=d.offset)==null?void 0:r.placement)&&(i=d.arrow)!=null&&i.alignmentOffset?{}:{x:s+f.x,y:u+f.y,data:ce(M({},f),{placement:c})}})}}},f9=function(e){return e===void 0&&(e={}),{name:"shift",options:e,fn(n){return Ie(this,null,function*(){const{x:r,y:i,placement:s,platform:u}=n,R=fi(e,n),{mainAxis:c=!0,crossAxis:d=!1,limiter:f={fn:U=>{let{x:B,y:A}=U;return{x:B,y:A}}}}=R,h=_n(R,["mainAxis","crossAxis","limiter"]),m={x:r,y:i},E=yield u.detectOverflow(n,h),b=Zr(s),T=tm(b);let _=m[T],I=m[b];const v=(U,B)=>Zx(B+E[U==="y"?"top":"left"],B,B-E[U==="y"?"bottom":"right"]);c&&(_=v(T,_)),d&&(I=v(b,I));const S=f.fn(ce(M({},n),{[T]:_,[b]:I}));return ce(M({},S),{data:{x:S.x-r,y:S.y-i,enabled:{[T]:c,[b]:d}}})})}}},p9=function(e){return e===void 0&&(e={}),{options:e,fn(t){var n,r;const{x:i,y:s,placement:u,rects:c,middlewareData:d}=t,{offset:f=0,mainAxis:h=!0,crossAxis:m=!0}=fi(e,t),E={x:i,y:s},b=Zr(u),T=tm(b);let _=E[T],I=E[b];const v=fi(f,t),S=typeof v=="number"?{mainAxis:v,crossAxis:0}:{mainAxis:(n=v.mainAxis)!=null?n:0,crossAxis:(r=v.crossAxis)!=null?r:0};if(h){const B=T==="y"?"height":"width",A=c.reference[T]-c.floating[B]+S.mainAxis,G=c.reference[T]+c.reference[B]-S.mainAxis;_<A?_=A:_>G&&(_=G)}if(m){var R,U;const B=T==="y"?"width":"height",A=sT.has($i(u)),G=c.reference[b]-c.floating[B]+(A&&((R=d.offset)==null?void 0:R[b])||0)+(A?0:S.crossAxis),W=c.reference[b]+c.reference[B]+(A?0:((U=d.offset)==null?void 0:U[b])||0)-(A?S.crossAxis:0);I<G?I=G:I>W&&(I=W)}return{[T]:_,[b]:I}}}},h9=function(e){return e===void 0&&(e={}),{name:"size",options:e,fn(n){return Ie(this,null,function*(){const{placement:r,rects:i,platform:s,elements:u}=n,H=fi(e,n),{apply:c=()=>{}}=H,d=_n(H,["apply"]),f=yield s.detectOverflow(n,d),h=$i(r),m=Ks(r),E=Zr(r)==="y",{width:b,height:T}=i.floating;let _,I;h==="top"||h==="bottom"?(_=h,I=m===((yield s.isRTL==null?void 0:s.isRTL(u.floating))?"start":"end")?"left":"right"):(I=h,_=m==="end"?"top":"bottom");const v=T-f.top-f.bottom,S=b-f.left-f.right,R=Hi(T-f[_],v),U=Hi(b-f[I],S),B=n.middlewareData.shift,A=!B;let G=R,W=U;B!=null&&B.enabled.x&&(W=S),B!=null&&B.enabled.y&&(G=v),A&&!m&&(E?W=b-2*di(f.left,f.right):G=T-2*di(f.top,f.bottom)),yield c(ce(M({},n),{availableWidth:W,availableHeight:G}));const re=yield s.getDimensions(u.floating);return b!==re.width||T!==re.height?{reset:{rects:!0}}:{}})}}};function Yl(){return typeof window!="undefined"}function Qs(e){return aT(e)?(e.nodeName||"").toLowerCase():"#document"}function or(e){var t;return(e==null||(t=e.ownerDocument)==null?void 0:t.defaultView)||window}function ei(e){var t;return(t=(aT(e)?e.ownerDocument:e.document)||window.document)==null?void 0:t.documentElement}function aT(e){return Yl()?e instanceof Node||e instanceof or(e).Node:!1}function Or(e){return Yl()?e instanceof Element||e instanceof or(e).Element:!1}function ti(e){return Yl()?e instanceof HTMLElement||e instanceof or(e).HTMLElement:!1}function uT(e){return!Yl()||typeof ShadowRoot=="undefined"?!1:e instanceof ShadowRoot||e instanceof or(e).ShadowRoot}function ku(e){const{overflow:t,overflowX:n,overflowY:r,display:i}=Pr(e);return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&i!=="inline"&&i!=="contents"}function m9(e){return/^(table|td|th)$/.test(Qs(e))}function Gl(e){try{if(e.matches(":popover-open"))return!0}catch(t){}try{return e.matches(":modal")}catch(t){return!1}}const g9=/transform|translate|scale|rotate|perspective|filter/,y9=/paint|layout|strict|content/,Vo=e=>!!e&&e!=="none";let om;function sm(e){const t=Or(e)?Pr(e):e;return Vo(t.transform)||Vo(t.translate)||Vo(t.scale)||Vo(t.rotate)||Vo(t.perspective)||!am()&&(Vo(t.backdropFilter)||Vo(t.filter))||g9.test(t.willChange||"")||y9.test(t.contain||"")}function E9(e){let t=zi(e);for(;ti(t)&&!Js(t);){if(sm(t))return t;if(Gl(t))return null;t=zi(t)}return null}function am(){return om==null&&(om=typeof CSS!="undefined"&&CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")),om}function Js(e){return/^(html|body|#document)$/.test(Qs(e))}function Pr(e){return or(e).getComputedStyle(e)}function Xl(e){return Or(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function zi(e){if(Qs(e)==="html")return e;const t=e.assignedSlot||e.parentNode||uT(e)&&e.host||ei(e);return uT(t)?t.host:t}function cT(e){const t=zi(e);return Js(t)?(e.ownerDocument||e).body:ti(t)&&ku(t)?t:cT(t)}function Cu(e,t,n){var r;t===void 0&&(t=[]),n===void 0&&(n=!0);const i=cT(e),s=i===((r=e.ownerDocument)==null?void 0:r.body),u=or(i);if(s){const c=um(u);return t.concat(u,u.visualViewport||[],ku(i)?i:[],c&&n?Cu(c):[])}else return t.concat(i,Cu(i,[],n))}function um(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function lT(e){const t=Pr(e);let n=parseFloat(t.width)||0,r=parseFloat(t.height)||0;const i=ti(e),s=i?e.offsetWidth:n,u=i?e.offsetHeight:r,c=zl(n)!==s||zl(r)!==u;return c&&(n=s,r=u),{width:n,height:r,$:c}}function cm(e){return Or(e)?e:e.contextElement}function Zs(e){const t=cm(e);if(!ti(t))return Jr(1);const n=t.getBoundingClientRect(),{width:r,height:i,$:s}=lT(t);let u=(s?zl(n.width):n.width)/r,c=(s?zl(n.height):n.height)/i;return(!u||!Number.isFinite(u))&&(u=1),(!c||!Number.isFinite(c))&&(c=1),{x:u,y:c}}const b9=Jr(0);function dT(e){const t=or(e);return!am()||!t.visualViewport?b9:{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}}function w9(e,t,n){return t===void 0&&(t=!1),!n||t&&n!==or(e)?!1:t}function qo(e,t,n,r){t===void 0&&(t=!1),n===void 0&&(n=!1);const i=e.getBoundingClientRect(),s=cm(e);let u=Jr(1);t&&(r?Or(r)&&(u=Zs(r)):u=Zs(e));const c=w9(s,n,r)?dT(s):Jr(0);let d=(i.left+c.x)/u.x,f=(i.top+c.y)/u.y,h=i.width/u.x,m=i.height/u.y;if(s){const E=or(s),b=r&&Or(r)?or(r):r;let T=E,_=um(T);for(;_&&r&&b!==T;){const I=Zs(_),v=_.getBoundingClientRect(),S=Pr(_),R=v.left+(_.clientLeft+parseFloat(S.paddingLeft))*I.x,U=v.top+(_.clientTop+parseFloat(S.paddingTop))*I.y;d*=I.x,f*=I.y,h*=I.x,m*=I.y,d+=R,f+=U,T=or(_),_=um(T)}}return Wl({width:h,height:m,x:d,y:f})}function Kl(e,t){const n=Xl(e).scrollLeft;return t?t.left+n:qo(ei(e)).left+n}function fT(e,t){const n=e.getBoundingClientRect(),r=n.left+t.scrollLeft-Kl(e,n),i=n.top+t.scrollTop;return{x:r,y:i}}function x9(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e;const s=i==="fixed",u=ei(r),c=t?Gl(t.floating):!1;if(r===u||c&&s)return n;let d={scrollLeft:0,scrollTop:0},f=Jr(1);const h=Jr(0),m=ti(r);if((m||!m&&!s)&&((Qs(r)!=="body"||ku(u))&&(d=Xl(r)),ti(r))){const b=qo(r);f=Zs(r),h.x=b.x+r.clientLeft,h.y=b.y+r.clientTop}const E=u&&!m&&!s?fT(u,d):Jr(0);return{width:n.width*f.x,height:n.height*f.y,x:n.x*f.x-d.scrollLeft*f.x+h.x+E.x,y:n.y*f.y-d.scrollTop*f.y+h.y+E.y}}function T9(e){return Array.from(e.getClientRects())}function _9(e){const t=ei(e),n=Xl(e),r=e.ownerDocument.body,i=di(t.scrollWidth,t.clientWidth,r.scrollWidth,r.clientWidth),s=di(t.scrollHeight,t.clientHeight,r.scrollHeight,r.clientHeight);let u=-n.scrollLeft+Kl(e);const c=-n.scrollTop;return Pr(r).direction==="rtl"&&(u+=di(t.clientWidth,r.clientWidth)-i),{width:i,height:s,x:u,y:c}}const pT=25;function v9(e,t){const n=or(e),r=ei(e),i=n.visualViewport;let s=r.clientWidth,u=r.clientHeight,c=0,d=0;if(i){s=i.width,u=i.height;const h=am();(!h||h&&t==="fixed")&&(c=i.offsetLeft,d=i.offsetTop)}const f=Kl(r);if(f<=0){const h=r.ownerDocument,m=h.body,E=getComputedStyle(m),b=h.compatMode==="CSS1Compat"&&parseFloat(E.marginLeft)+parseFloat(E.marginRight)||0,T=Math.abs(r.clientWidth-m.clientWidth-b);T<=pT&&(s-=T)}else f<=pT&&(s+=f);return{width:s,height:u,x:c,y:d}}const S9=new Set(["absolute","fixed"]);function A9(e,t){const n=qo(e,!0,t==="fixed"),r=n.top+e.clientTop,i=n.left+e.clientLeft,s=ti(e)?Zs(e):Jr(1),u=e.clientWidth*s.x,c=e.clientHeight*s.y,d=i*s.x,f=r*s.y;return{width:u,height:c,x:d,y:f}}function hT(e,t,n){let r;if(t==="viewport")r=v9(e,n);else if(t==="document")r=_9(ei(e));else if(Or(t))r=A9(t,n);else{const i=dT(e);r={x:t.x-i.x,y:t.y-i.y,width:t.width,height:t.height}}return Wl(r)}function mT(e,t){const n=zi(e);return n===t||!Or(n)||Js(n)?!1:Pr(n).position==="fixed"||mT(n,t)}function k9(e,t){const n=t.get(e);if(n)return n;let r=Cu(e,[],!1).filter(c=>Or(c)&&Qs(c)!=="body"),i=null;const s=Pr(e).position==="fixed";let u=s?zi(e):e;for(;Or(u)&&!Js(u);){const c=Pr(u),d=sm(u);!d&&c.position==="fixed"&&(i=null),(s?!d&&!i:!d&&c.position==="static"&&!!i&&S9.has(i.position)||ku(u)&&!d&&mT(e,u))?r=r.filter(h=>h!==u):i=c,u=zi(u)}return t.set(e,r),r}function C9(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e;const u=[...n==="clippingAncestors"?Gl(t)?[]:k9(t,this._c):[].concat(n),r],c=u[0],d=u.reduce((f,h)=>{const m=hT(t,h,i);return f.top=di(m.top,f.top),f.right=Hi(m.right,f.right),f.bottom=Hi(m.bottom,f.bottom),f.left=di(m.left,f.left),f},hT(t,c,i));return{width:d.right-d.left,height:d.bottom-d.top,x:d.left,y:d.top}}function N9(e){const{width:t,height:n}=lT(e);return{width:t,height:n}}function I9(e,t,n){const r=ti(t),i=ei(t),s=n==="fixed",u=qo(e,!0,s,t);let c={scrollLeft:0,scrollTop:0};const d=Jr(0);function f(){d.x=Kl(i)}if(r||!r&&!s)if((Qs(t)!=="body"||ku(i))&&(c=Xl(t)),r){const b=qo(t,!0,s,t);d.x=b.x+t.clientLeft,d.y=b.y+t.clientTop}else i&&f();s&&!r&&i&&f();const h=i&&!r&&!s?fT(i,c):Jr(0),m=u.left+c.scrollLeft-d.x-h.x,E=u.top+c.scrollTop-d.y-h.y;return{x:m,y:E,width:u.width,height:u.height}}function lm(e){return Pr(e).position==="static"}function gT(e,t){if(!ti(e)||Pr(e).position==="fixed")return null;if(t)return t(e);let n=e.offsetParent;return ei(e)===n&&(n=n.ownerDocument.body),n}function yT(e,t){const n=or(e);if(Gl(e))return n;if(!ti(e)){let i=zi(e);for(;i&&!Js(i);){if(Or(i)&&!lm(i))return i;i=zi(i)}return n}let r=gT(e,t);for(;r&&m9(r)&&lm(r);)r=gT(r,t);return r&&Js(r)&&lm(r)&&!sm(r)?n:r||E9(e)||n}const O9=function(e){return Ie(this,null,function*(){const t=this.getOffsetParent||yT,n=this.getDimensions,r=yield n(e.floating);return{reference:I9(e.reference,yield t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}})};function P9(e){return Pr(e).direction==="rtl"}const R9={convertOffsetParentRelativeRectToViewportRelativeRect:x9,getDocumentElement:ei,getClippingRect:C9,getOffsetParent:yT,getElementRects:O9,getClientRects:T9,getDimensions:N9,getScale:Zs,isElement:Or,isRTL:P9};function ET(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function L9(e,t){let n=null,r;const i=ei(e);function s(){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),s();const f=e.getBoundingClientRect(),{left:h,top:m,width:E,height:b}=f;if(c||t(),!E||!b)return;const T=Vl(m),_=Vl(i.clientWidth-(h+E)),I=Vl(i.clientHeight-(m+b)),v=Vl(h),R={rootMargin:-T+"px "+-_+"px "+-I+"px "+-v+"px",threshold:di(0,Hi(1,d))||1};let U=!0;function B(A){const G=A[0].intersectionRatio;if(G!==d){if(!U)return u();G?u(!1,G):r=setTimeout(()=>{u(!1,1e-7)},1e3)}G===1&&!ET(f,e.getBoundingClientRect())&&u(),U=!1}try{n=new IntersectionObserver(B,ce(M({},R),{root:i.ownerDocument}))}catch(A){n=new IntersectionObserver(B,R)}n.observe(e)}return u(!0),s}function D9(e,t,n,r){r===void 0&&(r={});const{ancestorScroll:i=!0,ancestorResize:s=!0,elementResize:u=typeof ResizeObserver=="function",layoutShift:c=typeof IntersectionObserver=="function",animationFrame:d=!1}=r,f=cm(e),h=i||s?[...f?Cu(f):[],...Cu(t)]:[];h.forEach(v=>{i&&v.addEventListener("scroll",n,{passive:!0}),s&&v.addEventListener("resize",n)});const m=f&&c?L9(f,n):null;let E=-1,b=null;u&&(b=new ResizeObserver(v=>{let[S]=v;S&&S.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(E),E=requestAnimationFrame(()=>{var R;(R=b)==null||R.observe(t)})),n()}),f&&!d&&b.observe(f),b.observe(t));let T,_=d?qo(e):null;d&&I();function I(){const v=qo(e);_&&!ET(_,v)&&n(),_=v,T=requestAnimationFrame(I)}return n(),()=>{var v;h.forEach(S=>{i&&S.removeEventListener("scroll",n),s&&S.removeEventListener("resize",n)}),m==null||m(),(v=b)==null||v.disconnect(),b=null,d&&cancelAnimationFrame(T)}}const M9=d9,F9=f9,B9=u9,U9=h9,j9=c9,H9=a9,$9=p9,z9=(e,t,n)=>{const r=new Map,i=M({platform:R9},n),s=ce(M({},i.platform),{_c:r});return s9(e,t,ce(M({},i),{platform:s}))};function bT(e=0,t=0,n=0,r=0){if(typeof DOMRect=="function")return new DOMRect(e,t,n,r);const i={x:e,y:t,width:n,height:r,top:t,right:e+n,bottom:t+r,left:e};return ce(M({},i),{toJSON:()=>i})}function V9(e){if(!e)return bT();const{x:t,y:n,width:r,height:i}=e;return bT(t,n,r,i)}function q9(e,t){return{contextElement:pn(e)?e:void 0,getBoundingClientRect:()=>{const n=e,r=t==null?void 0:t(n);return r||!n?V9(r):n.getBoundingClientRect()}}}var Nu=e=>({variable:e,reference:`var(${e})`}),pi={arrowSize:Nu("--arrow-size"),arrowSizeHalf:Nu("--arrow-size-half"),arrowBg:Nu("--arrow-background"),transformOrigin:Nu("--transform-origin"),arrowOffset:Nu("--arrow-offset")},W9=e=>e==="top"||e==="bottom"?"y":"x";function Y9(e,t){return{name:"transformOrigin",fn(n){var re,H,ee,Q,me;const{elements:r,middlewareData:i,placement:s,rects:u,y:c}=n,d=s.split("-")[0],f=W9(d),h=((re=i.arrow)==null?void 0:re.x)||0,m=((H=i.arrow)==null?void 0:H.y)||0,E=(t==null?void 0:t.clientWidth)||0,b=(t==null?void 0:t.clientHeight)||0,T=h+E/2,_=m+b/2,I=Math.abs(((ee=i.shift)==null?void 0:ee.y)||0),v=u.reference.height/2,S=b/2,R=(me=(Q=e.offset)==null?void 0:Q.mainAxis)!=null?me:e.gutter,U=typeof R=="number"?R+S:R!=null?R:S,B=I>U,A={top:`${T}px calc(100% + ${U}px)`,bottom:`${T}px ${-U}px`,left:`calc(100% + ${U}px) ${_}px`,right:`${-U}px ${_}px`}[d],G=`${T}px ${u.reference.y+v-c}px`,W=!!e.overlap&&f==="y"&&B;return r.floating.style.setProperty(pi.transformOrigin.variable,W?G:A),{data:{transformOrigin:W?G:A}}}}}var G9={name:"rects",fn({rects:e}){return{data:e}}},X9=e=>{if(e)return{name:"shiftArrow",fn({placement:t,middlewareData:n}){if(!n.arrow)return{};const{x:r,y:i}=n.arrow,s=t.split("-")[0];return Object.assign(e.style,{left:r!=null?`${r}px`:"",top:i!=null?`${i}px`:"",[s]:`calc(100% + ${pi.arrowOffset.reference})`}),{}}}};function K9(e){const[t,n]=e.split("-");return{side:t,align:n,hasAlign:n!=null}}var Q9={strategy:"absolute",placement:"bottom",listeners:!0,gutter:8,flip:!0,slide:!0,overlap:!1,sameWidth:!1,fitViewport:!1,overflowPadding:8,arrowPadding:4};function wT(e,t){const n=e.devicePixelRatio||1;return Math.round(t*n)/n}function dm(e){return typeof e=="function"?e():e==="clipping-ancestors"?"clippingAncestors":e}function J9(e,t,n){const r=e||t.createElement("div");return H9({element:r,padding:n.arrowPadding})}function Z9(e,t){var n;if(!b8((n=t.offset)!=null?n:t.gutter))return M9(({placement:r})=>{var h,m,E,b;const i=((e==null?void 0:e.clientHeight)||0)/2,s=(m=(h=t.offset)==null?void 0:h.mainAxis)!=null?m:t.gutter,u=typeof s=="number"?s+i:s!=null?s:i,{hasAlign:c}=K9(r),d=c?void 0:t.shift,f=(b=(E=t.offset)==null?void 0:E.crossAxis)!=null?b:d;return Uh({crossAxis:f,mainAxis:u,alignmentAxis:t.shift})})}function e7(e){if(!e.flip)return;const t=dm(e.boundary);return B9(ce(M({},t?{boundary:t}:void 0),{padding:e.overflowPadding,fallbackPlacements:e.flip===!0?void 0:e.flip}))}function t7(e){if(!e.slide&&!e.overlap)return;const t=dm(e.boundary);return F9(ce(M({},t?{boundary:t}:void 0),{mainAxis:e.slide,crossAxis:e.overlap,padding:e.overflowPadding,limiter:$9()}))}function n7(e){return U9({padding:e.overflowPadding,apply({elements:t,rects:n,availableHeight:r,availableWidth:i}){const s=t.floating,u=Math.round(n.reference.width),c=Math.round(n.reference.height);i=Math.floor(i),r=Math.floor(r),s.style.setProperty("--reference-width",`${u}px`),s.style.setProperty("--reference-height",`${c}px`),s.style.setProperty("--available-width",`${i}px`),s.style.setProperty("--available-height",`${r}px`)}})}function r7(e){var t;if(e.hideWhenDetached)return j9({strategy:"referenceHidden",boundary:(t=dm(e.boundary))!=null?t:"clippingAncestors"})}function i7(e){return e?e===!0?{ancestorResize:!0,ancestorScroll:!0,elementResize:!0,layoutShift:!0}:e:{}}function o7(e,t,n={}){const r=q9(e,n.getAnchorRect);if(!t||!r)return;const i=Object.assign({},Q9,n),s=t.querySelector("[data-part=arrow]"),u=[Z9(s,i),e7(i),t7(i),J9(s,t.ownerDocument,i),X9(s),Y9({gutter:i.gutter,offset:i.offset,overlap:i.overlap},s),n7(i),r7(i),G9],{placement:c,strategy:d,onComplete:f,onPositioned:h}=i,m=()=>Ie(null,null,function*(){var U;if(!r||!t)return;const _=yield z9(r,t,{placement:c,middleware:u,strategy:d});f==null||f(_),h==null||h({placed:!0});const I=$s(t),v=wT(I,_.x),S=wT(I,_.y);t.style.setProperty("--x",`${v}px`),t.style.setProperty("--y",`${S}px`),i.hideWhenDetached&&(((U=_.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 R=t.firstElementChild;if(R){const B=Vs(R);t.style.setProperty("--z-index",B.zIndex)}}),E=()=>Ie(null,null,function*(){n.updatePosition?(yield n.updatePosition({updatePosition:m,floatingElement:t}),h==null||h({placed:!0})):yield m()}),b=i7(i.listeners),T=i.listeners?D9(r,t,E,b):C8;return E(),()=>{T==null||T(),h==null||h({placed:!1})}}function xT(e,t,n={}){const c=n,{defer:r}=c,i=_n(c,["defer"]),s=r?sn:d=>d(),u=[];return u.push(s(()=>{const d=typeof e=="function"?e():e,f=typeof t=="function"?t():t;u.push(o7(d,f,i))})),()=>{u.forEach(d=>d==null?void 0:d())}}var s7={bottom:"rotate(45deg)",left:"rotate(135deg)",top:"rotate(225deg)",right:"rotate(315deg)"};function a7(e={}){const{placement:t,sameWidth:n,fitViewport:r,strategy:i="absolute"}=e;return{arrow:{position:"absolute",width:pi.arrowSize.reference,height:pi.arrowSize.reference,[pi.arrowSizeHalf.variable]:`calc(${pi.arrowSize.reference} / 2)`,[pi.arrowOffset.variable]:`calc(${pi.arrowSizeHalf.reference} * -1)`},arrowTip:{transform:t?s7[t.split("-")[0]]:void 0,background:pi.arrowBg.reference,top:"0",left:"0",width:"100%",height:"100%",position:"absolute",zIndex:"inherit"},floating:{position:i,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 ea=new WeakMap,Ql=new WeakMap,Jl={},fm=0,TT=e=>e&&(e.host||TT(e.parentNode)),u7=(e,t)=>t.map(n=>{if(e.contains(n))return n;const r=TT(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),c7=new Set(["script","output","status","next-route-announcer"]),l7=e=>c7.has(e.localName)||e.role==="status"||e.hasAttribute("aria-live")?!0:e.matches("[data-live-announcer]"),d7=(e,t)=>{const{parentNode:n,markerName:r,controlAttribute:i,followControlledElements:s=!0}=t,u=u7(n,Array.isArray(e)?e:[e]);Jl[r]||(Jl[r]=new WeakMap);const c=Jl[r],d=[],f=new Set,h=new Set(u),m=b=>{!b||f.has(b)||(f.add(b),m(b.parentNode))};u.forEach(b=>{m(b),s&&pn(b)&&Lx(b,T=>{m(T)})});const E=b=>{!b||h.has(b)||Array.prototype.forEach.call(b.children,T=>{if(f.has(T))E(T);else try{if(l7(T))return;const I=T.getAttribute(i)==="true",v=(ea.get(T)||0)+1,S=(c.get(T)||0)+1;ea.set(T,v),c.set(T,S),d.push(T),v===1&&I&&Ql.set(T,!0),S===1&&T.setAttribute(r,""),I||T.setAttribute(i,"true")}catch(_){console.error("[zag-js > ariaHidden] cannot operate on ",T,_)}})};return E(n),f.clear(),fm++,()=>{d.forEach(b=>{const T=ea.get(b)-1,_=c.get(b)-1;ea.set(b,T),c.set(b,_),T||(Ql.has(b)||b.removeAttribute(i),Ql.delete(b)),_||b.removeAttribute(r)}),fm--,fm||(ea=new WeakMap,ea=new WeakMap,Ql=new WeakMap,Jl={})}},f7=e=>(Array.isArray(e)?e[0]:e).ownerDocument.body,p7=(e,t=f7(e),n="data-aria-hidden",r=!0)=>{if(t)return d7(e,{parentNode:t,markerName:n,controlAttribute:"aria-hidden",followControlledElements:r})},h7=e=>{const t=requestAnimationFrame(()=>e());return()=>cancelAnimationFrame(t)};function _T(e,t={}){const{defer:n=!0}=t,r=n?h7:s=>s(),i=[];return i.push(r(()=>{const u=(typeof e=="function"?e():e).filter(Boolean);u.length!==0&&i.push(p7(u))})),()=>{i.forEach(s=>s==null?void 0:s())}}function m7(e){const t={each(n){var r;for(let i=0;i<((r=e.frames)==null?void 0:r.length);i+=1){const s=e.frames[i];s&&n(s)}},addEventListener(n,r,i){return t.each(s=>{try{s.document.addEventListener(n,r,i)}catch(u){}}),()=>{try{t.removeEventListener(n,r,i)}catch(s){}}},removeEventListener(n,r,i){t.each(s=>{try{s.document.removeEventListener(n,r,i)}catch(u){}})}};return t}function g7(e){const t=e.frameElement!=null?e.parent:null;return{addEventListener:(n,r,i)=>{try{t==null||t.addEventListener(n,r,i)}catch(s){}return()=>{try{t==null||t.removeEventListener(n,r,i)}catch(s){}}},removeEventListener:(n,r,i)=>{try{t==null||t.removeEventListener(n,r,i)}catch(s){}}}}var vT="pointerdown.outside",ST="focus.outside";function y7(e){for(const t of e)if(pn(t)&&Qr(t))return!0;return!1}var AT=e=>"clientY"in e;function E7(e,t){if(!AT(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 b7(e,t){return e.y<=t.y&&t.y<=e.y+e.height&&e.x<=t.x&&t.x<=e.x+e.width}function kT(e,t){if(!t||!AT(e))return!1;const n=t.scrollHeight>t.clientHeight,r=n&&e.clientX>t.offsetLeft+t.clientWidth,i=t.scrollWidth>t.clientWidth,s=i&&e.clientY>t.offsetTop+t.clientHeight,u={x:t.offsetLeft,y:t.offsetTop,width:t.clientWidth+(n?16:0),height:t.clientHeight+(i?16:0)},c={x:e.clientX,y:e.clientY};return b7(u,c)?r||s:!1}function w7(e,t){const{exclude:n,onFocusOutside:r,onPointerDownOutside:i,onInteractOutside:s,defer:u,followControlledElements:c=!0}=t;if(!e)return;const d=Kr(e),f=$s(e),h=m7(f),m=g7(f);function E(R,U){if(!pn(U)||!U.isConnected||Hs(e,U)||E7(e,R)||c&&Rx(e,U))return!1;const B=d.querySelector(`[aria-controls="${e.id}"]`);if(B){const G=Gh(B);if(kT(R,G))return!1}const A=Gh(e);return kT(R,A)?!1:!(n!=null&&n(U))}const b=new Set,T=jo(e==null?void 0:e.getRootNode());function _(R){function U(B){var re,H;const A=u&&!Dx()?sn:ee=>ee(),G=B!=null?B:R,W=(H=(re=G==null?void 0:G.composedPath)==null?void 0:re.call(G))!=null?H:[G==null?void 0:G.target];A(()=>{const ee=T?W[0]:Ir(R);if(!(!e||!E(R,ee))){if(i||s){const Q=Bh(i,s);e.addEventListener(vT,Q,{once:!0})}CT(e,vT,{bubbles:!1,cancelable:!0,detail:{originalEvent:G,contextmenu:cM(G),focusable:y7(W),target:ee}})}})}R.pointerType==="touch"?(b.forEach(B=>B()),b.add(hn(d,"click",U,{once:!0})),b.add(m.addEventListener("click",U,{once:!0})),b.add(h.addEventListener("click",U,{once:!0}))):U()}const I=new Set,v=setTimeout(()=>{I.add(hn(d,"pointerdown",_,!0)),I.add(m.addEventListener("pointerdown",_,!0)),I.add(h.addEventListener("pointerdown",_,!0))},0);function S(R){(u?sn:B=>B())(()=>{var G,W;const B=(W=(G=R==null?void 0:R.composedPath)==null?void 0:G.call(R))!=null?W:[R==null?void 0:R.target],A=T?B[0]:Ir(R);if(!(!e||!E(R,A))){if(r||s){const re=Bh(r,s);e.addEventListener(ST,re,{once:!0})}CT(e,ST,{bubbles:!1,cancelable:!0,detail:{originalEvent:R,contextmenu:!1,focusable:Qr(A),target:A}})}})}return Dx()||(I.add(hn(d,"focusin",S,!0)),I.add(m.addEventListener("focusin",S,!0)),I.add(h.addEventListener("focusin",S,!0))),()=>{clearTimeout(v),b.forEach(R=>R()),I.forEach(R=>R())}}function x7(e,t){const{defer:n}=t,r=n?sn:s=>s(),i=[];return i.push(r(()=>{const s=typeof e=="function"?e():e;i.push(w7(s,t))})),()=>{i.forEach(s=>s==null?void 0:s())}}function CT(e,t,n){const r=e.ownerDocument.defaultView||window,i=new r.CustomEvent(t,n);return e.dispatchEvent(i)}function T7(e,t){const n=r=>{r.key==="Escape"&&(r.isComposing||t==null||t(r))};return hn(Kr(e),"keydown",n,{capture:!0})}var NT="layer:request-dismiss",gr={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=>Hs(n.node,t))},isInBranch(e){return Array.from(this.branches).some(t=>Hs(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=>gr.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];v7(e,NT,i=>{var s;(s=r.requestDismiss)==null||s.call(r,i),i.defaultPrevented||r==null||r.dismiss()}),_7(e,NT,{originalLayer:e,targetLayer:t,originalIndex:n,targetIndex:t?this.indexOf(t):-1}),this.syncLayers()},clear(){this.remove(this.layers[0].node)}};function _7(e,t,n){const r=e.ownerDocument.defaultView||window,i=new r.CustomEvent(t,{cancelable:!0,bubbles:!0,detail:n});return e.dispatchEvent(i)}function v7(e,t,n){e.addEventListener(t,n,{once:!0})}var IT;function OT(){gr.layers.forEach(({node:e})=>{e.style.pointerEvents=gr.isBelowPointerBlockingLayer(e)?"none":"auto"})}function S7(e){e.style.pointerEvents=""}function A7(e,t){const n=Kr(e),r=[];return gr.hasPointerBlockingLayer()&&!n.body.hasAttribute("data-inert")&&(IT=document.body.style.pointerEvents,queueMicrotask(()=>{n.body.style.pointerEvents="none",n.body.setAttribute("data-inert","")})),t==null||t.forEach(i=>{const[s,u]=PM(()=>{const c=i();return pn(c)?c:null},{timeout:1e3});s.then(c=>r.push(Bl(c,{pointerEvents:"auto"}))),r.push(u)}),()=>{gr.hasPointerBlockingLayer()||(queueMicrotask(()=>{n.body.style.pointerEvents=IT,n.body.removeAttribute("data-inert"),n.body.style.length===0&&n.body.removeAttribute("style")}),r.forEach(i=>i()))}}function k7(e,t){const{warnOnMissingNode:n=!0}=t;if(n&&!e){jh("[@zag-js/dismissable] node is `null` or `undefined`");return}if(!e)return;const{onDismiss:r,onRequestDismiss:i,pointerBlocking:s,exclude:u,debug:c,type:d="dialog"}=t,f={dismiss:r,node:e,type:d,pointerBlocking:s,requestDismiss:i};gr.add(f),OT();function h(_){var v,S;const I=Ir(_.detail.originalEvent);gr.isBelowPointerBlockingLayer(e)||gr.isInBranch(I)||((v=t.onPointerDownOutside)==null||v.call(t,_),(S=t.onInteractOutside)==null||S.call(t,_),!_.defaultPrevented&&(c&&console.log("onPointerDownOutside:",_.detail.originalEvent),r==null||r()))}function m(_){var v,S;const I=Ir(_.detail.originalEvent);gr.isInBranch(I)||((v=t.onFocusOutside)==null||v.call(t,_),(S=t.onInteractOutside)==null||S.call(t,_),!_.defaultPrevented&&(c&&console.log("onFocusOutside:",_.detail.originalEvent),r==null||r()))}function E(_){var I;gr.isTopMost(e)&&((I=t.onEscapeKeyDown)==null||I.call(t,_),!_.defaultPrevented&&r&&(_.preventDefault(),r()))}function b(_){var R;if(!e)return!1;const I=typeof u=="function"?u():u,v=Array.isArray(I)?I:[I],S=(R=t.persistentElements)==null?void 0:R.map(U=>U()).filter(pn);return S&&v.push(...S),v.some(U=>Hs(U,_))||gr.isInNestedLayer(e,_)}const T=[s?A7(e,t.persistentElements):void 0,T7(e,E),x7(e,{exclude:b,onFocusOutside:m,onPointerDownOutside:h,defer:t.defer})];return()=>{gr.remove(e),OT(),S7(e),T.forEach(_=>_==null?void 0:_())}}function PT(e,t){const{defer:n}=t,r=n?sn:s=>s(),i=[];return i.push(r(()=>{const s=Us(e)?e():e;i.push(k7(s,t))})),()=>{i.forEach(s=>s==null?void 0:s())}}var C7=Object.defineProperty,N7=(e,t,n)=>t in e?C7(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Ut=(e,t,n)=>N7(e,typeof t!="symbol"?t+"":t,n),RT={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()}},I7=[],O7=class{constructor(e,t){Ut(this,"trapStack"),Ut(this,"config"),Ut(this,"doc"),Ut(this,"state",{containers:[],containerGroups:[],tabbableGroups:[],nodeFocusedBeforeActivation:null,mostRecentlyFocusedNode:null,active:!1,paused:!1,delayInitialFocusTimer:void 0,recentNavEvent:void 0}),Ut(this,"portalContainers",new Set),Ut(this,"listenerCleanups",[]),Ut(this,"handleFocus",r=>{const i=Ir(r),s=this.findContainerIndex(i,r)>=0;if(s||Ll(i))s&&(this.state.mostRecentlyFocusedNode=i);else{r.stopImmediatePropagation();let u,c=!0;if(this.state.mostRecentlyFocusedNode)if(vu(this.state.mostRecentlyFocusedNode)>0){const d=this.findContainerIndex(this.state.mostRecentlyFocusedNode),{tabbableNodes:f}=this.state.containerGroups[d];if(f.length>0){const h=f.findIndex(m=>m===this.state.mostRecentlyFocusedNode);h>=0&&(this.config.isKeyForward(this.state.recentNavEvent)?h+1<f.length&&(u=f[h+1],c=!1):h-1>=0&&(u=f[h-1],c=!1))}}else this.state.containerGroups.some(d=>d.tabbableNodes.some(f=>vu(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}),Ut(this,"handlePointerDown",r=>{const i=Ir(r);if(!(this.findContainerIndex(i,r)>=0)){if(Ou(this.config.clickOutsideDeactivates,r)){this.deactivate({returnFocus:this.config.returnFocusOnDeactivate});return}Ou(this.config.allowOutsideClick,r)||r.preventDefault()}}),Ut(this,"handleClick",r=>{const i=Ir(r);this.findContainerIndex(i,r)>=0||Ou(this.config.clickOutsideDeactivates,r)||Ou(this.config.allowOutsideClick,r)||(r.preventDefault(),r.stopImmediatePropagation())}),Ut(this,"handleTabKey",r=>{if(this.config.isKeyForward(r)||this.config.isKeyBackward(r)){this.state.recentNavEvent=r;const i=this.config.isKeyBackward(r),s=this.findNextNavNode({event:r,isBackward:i});if(!s)return;Iu(r)&&r.preventDefault(),this.tryFocus(s)}}),Ut(this,"handleEscapeKey",r=>{P7(r)&&Ou(this.config.escapeDeactivates,r)!==!1&&(r.preventDefault(),this.deactivate())}),Ut(this,"_mutationObserver"),Ut(this,"setupMutationObserver",()=>{const r=this.doc.defaultView||window;this._mutationObserver=new r.MutationObserver(i=>{i.some(c=>Array.from(c.removedNodes).some(f=>f===this.state.mostRecentlyFocusedNode))&&this.tryFocus(this.getInitialFocusNode()),i.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 eM(f)?!0:f.id&&!this.state.containers.some(h=>h.contains(f))?tM(f):!1}):!1)&&this.state.active&&!this.state.paused&&(this.updateTabbableNodes(),this.updatePortalContainers())})}),Ut(this,"updateObservedNodes",()=>{var r;(r=this._mutationObserver)==null||r.disconnect(),this.state.active&&!this.state.paused&&(this.state.containers.map(i=>{var s;(s=this._mutationObserver)==null||s.observe(i,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["aria-controls","aria-expanded"]})}),this.portalContainers.forEach(i=>{this.observePortalContainer(i)}))}),Ut(this,"getInitialFocusNode",()=>{let r=this.getNodeForOption("initialFocus",{hasFallback:!0});if(r===!1)return!1;if(r===void 0||r&&!Qr(r)){const i=zs(this.doc);if(i&&this.findContainerIndex(i)>=0)r=i;else{const s=this.state.tabbableGroups[0];r=s&&s.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}),Ut(this,"tryFocus",r=>{if(r!==!1&&r!==zs(this.doc)){if(!r||!r.focus){this.tryFocus(this.getInitialFocusNode());return}r.focus({preventScroll:!!this.config.preventScroll}),this.state.mostRecentlyFocusedNode=r,R7(r)&&r.select()}}),Ut(this,"deactivate",r=>{if(!this.state.active)return this;const i=M({onDeactivate:this.config.onDeactivate,onPostDeactivate:this.config.onPostDeactivate,checkCanReturnFocus:this.config.checkCanReturnFocus},r);clearTimeout(this.state.delayInitialFocusTimer),this.state.delayInitialFocusTimer=void 0,this.removeListeners(),this.state.active=!1,this.state.paused=!1,this.updateObservedNodes(),RT.deactivateTrap(this.trapStack,this),this.portalContainers.clear();const s=this.getOption(i,"onDeactivate"),u=this.getOption(i,"onPostDeactivate"),c=this.getOption(i,"checkCanReturnFocus"),d=this.getOption(i,"returnFocus","returnFocusOnDeactivate");s==null||s();const f=()=>{LT(()=>{if(d){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);this.tryFocus(h)}u==null||u()})};if(d&&c){const h=this.getReturnFocusNode(this.state.nodeFocusedBeforeActivation);return c(h).then(f,f),this}return f(),this}),Ut(this,"pause",r=>{if(this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onPause"),s=this.getOption(r,"onPostPause");return this.state.paused=!0,i==null||i(),this.removeListeners(),this.updateObservedNodes(),s==null||s(),this}),Ut(this,"unpause",r=>{if(!this.state.paused||!this.state.active)return this;const i=this.getOption(r,"onUnpause"),s=this.getOption(r,"onPostUnpause");return this.state.paused=!1,i==null||i(),this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),s==null||s(),this}),Ut(this,"updateContainerElements",r=>(this.state.containers=Array.isArray(r)?r.filter(Boolean):[r].filter(Boolean),this.state.active&&this.updateTabbableNodes(),this.updateObservedNodes(),this)),Ut(this,"getReturnFocusNode",r=>{const i=this.getNodeForOption("setReturnFocus",{params:[r]});return i||(i===!1?!1:r)}),Ut(this,"getOption",(r,i,s)=>r&&r[i]!==void 0?r[i]:this.config[s||i]),Ut(this,"getNodeForOption",(r,{hasFallback:i=!1,params:s=[]}={})=>{let u=this.config[r];if(typeof u=="function"&&(u=u(...s)),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&&!i)throw new Error(`\`${r}\` as selector refers to no known node`)}return c}),Ut(this,"findNextNavNode",r=>{const{event:i,isBackward:s=!1}=r,u=r.target||Ir(i);this.updateTabbableNodes();let c=null;if(this.state.tabbableGroups.length>0){const d=this.findContainerIndex(u,i),f=d>=0?this.state.containerGroups[d]:void 0;if(d<0)s?c=this.state.tabbableGroups[this.state.tabbableGroups.length-1].lastTabbableNode:c=this.state.tabbableGroups[0].firstTabbableNode;else if(s){let h=this.state.tabbableGroups.findIndex(({firstTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Qr(u)&&!Ho(u)&&!(f!=null&&f.nextTabbableNode(u,!1)))&&(h=d),h>=0){const m=h===0?this.state.tabbableGroups.length-1:h-1,E=this.state.tabbableGroups[m];c=vu(u)>=0?E.lastTabbableNode:E.lastDomTabbableNode}else Iu(i)||(c=f==null?void 0:f.nextTabbableNode(u,!1))}else{let h=this.state.tabbableGroups.findIndex(({lastTabbableNode:m})=>u===m);if(h<0&&((f==null?void 0:f.container)===u||Qr(u)&&!Ho(u)&&!(f!=null&&f.nextTabbableNode(u)))&&(h=d),h>=0){const m=h===this.state.tabbableGroups.length-1?0:h+1,E=this.state.tabbableGroups[m];c=vu(u)>=0?E.firstTabbableNode:E.firstDomTabbableNode}else Iu(i)||(c=f==null?void 0:f.nextTabbableNode(u))}}else c=this.getNodeForOption("fallbackFocus");return c}),this.trapStack=t.trapStack||I7;const n=M({returnFocusOnDeactivate:!0,escapeDeactivates:!0,delayInitialFocus:!0,followControlledElements:!0,isKeyForward(r){return Iu(r)&&!r.shiftKey},isKeyBackward(r){return Iu(r)&&r.shiftKey}},t);this.doc=n.document||Kr(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=>{Q8(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:i})=>r.contains(e)||(n==null?void 0:n.includes(r))||i.find(s=>s===e)||this.isControlledElement(r,e))}isControlledElement(e,t){return this.config.followControlledElements?Rx(e,t):!1}updateTabbableNodes(){if(this.state.containerGroups=this.state.containers.map(e=>{const t=qs(e,{getShadowRoot:this.config.getShadowRoot}),n=$x(e,{getShadowRoot:this.config.getShadowRoot}),r=t[0],i=t[t.length-1],s=r,u=i;let c=!1;for(let f=0;f<t.length;f++)if(vu(t[f])>0){c=!0;break}function d(f,h=!0){const m=t.indexOf(f);if(m>=0)return t[m+(h?1:-1)];const E=n.indexOf(f);if(!(E<0)){if(h){for(let b=E+1;b<n.length;b++)if(Ho(n[b]))return n[b]}else for(let b=E-1;b>=0;b--)if(Ho(n[b]))return n[b]}}return{container:e,tabbableNodes:t,focusableNodes:n,posTabIndexesFound:c,firstTabbableNode:r,lastTabbableNode:i,firstDomTabbableNode:s,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 RT.activateTrap(this.trapStack,this),this.state.delayInitialFocusTimer=this.config.delayInitialFocus?LT(()=>{this.tryFocus(this.getInitialFocusNode())}):this.tryFocus(this.getInitialFocusNode()),this.listenerCleanups.push(hn(this.doc,"focusin",this.handleFocus,!0),hn(this.doc,"mousedown",this.handlePointerDown,{capture:!0,passive:!1}),hn(this.doc,"touchstart",this.handlePointerDown,{capture:!0,passive:!1}),hn(this.doc,"click",this.handleClick,{capture:!0,passive:!1}),hn(this.doc,"keydown",this.handleTabKey,{capture:!0,passive:!1}),hn(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=zs(this.doc),t==null||t();const i=()=>{r&&this.updateTabbableNodes(),this.addListeners(),this.updateObservedNodes(),n==null||n()};return r?(r(this.state.containers.concat()).then(i,i),this):(i(),this)}},Iu=e=>e.key==="Tab",Ou=(e,...t)=>typeof e=="function"?e(...t):e,P7=e=>!e.isComposing&&e.key==="Escape",LT=e=>setTimeout(e,0),R7=e=>e.localName==="input"&&"select"in e&&typeof e.select=="function";function DT(e,t={}){let n;const r=sn(()=>{const i=typeof e=="function"?e():e;if(i){n=new O7(i,ce(M({escapeDeactivates:!1,allowOutsideClick:!0,preventScroll:!0,returnFocusOnDeactivate:!0,delayInitialFocus:!1,fallbackFocus:i},t),{document:Kr(i)}));try{n.activate()}catch(s){}}});return function(){n==null||n.deactivate(),r()}}var pm="data-scroll-lock";function L7(e){const t=e.getBoundingClientRect().left;return Math.round(t)+e.scrollLeft?"paddingLeft":"paddingRight"}function MT(e){const t=Vs(e),n=t==null?void 0:t.scrollbarGutter;return n==="stable"||(n==null?void 0:n.startsWith("stable "))===!0}function FT(e){var b;const t=e!=null?e:document,n=(b=t.defaultView)!=null?b:window,{documentElement:r,body:i}=t;if(i.hasAttribute(pm))return;const u=MT(r)||MT(i),c=n.innerWidth-r.clientWidth;i.setAttribute(pm,"");const d=()=>IM(r,"--scrollbar-width",`${c}px`),f=L7(r),h=()=>{const T={overflow:"hidden"};return!u&&c>0&&(T[f]=`${c}px`),Bl(i,T)},m=()=>{var B,A;const{scrollX:T,scrollY:_,visualViewport:I}=n,v=(B=I==null?void 0:I.offsetLeft)!=null?B:0,S=(A=I==null?void 0:I.offsetTop)!=null?A:0,R={position:"fixed",overflow:"hidden",top:`${-(_-Math.floor(S))}px`,left:`${-(T-Math.floor(v))}px`,right:"0"};!u&&c>0&&(R[f]=`${c}px`);const U=Bl(i,R);return()=>{U==null||U(),n.scrollTo({left:T,top:_,behavior:"instant"})}},E=[d(),Dl()?m():h()];return()=>{E.forEach(T=>T==null?void 0:T()),i.removeAttribute(pm)}}var D7=zo("popover").parts("arrow","arrowTip","anchor","trigger","indicator","positioner","content","title","description","closeTrigger"),ni=D7.build(),BT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.anchor)!=null?n:`popover:${e.id}:anchor`},UT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`popover:${e.id}:trigger`},hm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`popover:${e.id}:content`},jT=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`popover:${e.id}:popper`},M7=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.arrow)!=null?n:`popover:${e.id}:arrow`},mm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`popover:${e.id}:title`},gm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`popover:${e.id}:desc`},F7=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`popover:${e.id}:close`},HT=e=>e.getById(BT(e)),ta=e=>e.getById(UT(e)),na=e=>e.getById(hm(e)),$T=e=>e.getById(jT(e)),B7=e=>e.getById(mm(e)),U7=e=>e.getById(gm(e));function j7(e,t){const{state:n,context:r,send:i,computed:s,prop:u,scope:c}=e,d=n.matches("open"),f=r.get("currentPlacement"),h=s("currentPortalled"),m=r.get("renderedElements"),E=a7(ce(M({},u("positioning")),{placement:f}));return{portalled:h,open:d,setOpen(b){n.matches("open")!==b&&i({type:b?"OPEN":"CLOSE"})},reposition(b={}){i({type:"POSITIONING.SET",options:b})},getArrowProps(){return t.element(ce(M({id:M7(c)},ni.arrow.attrs),{dir:u("dir"),style:E.arrow}))},getArrowTipProps(){return t.element(ce(M({},ni.arrowTip.attrs),{dir:u("dir"),style:E.arrowTip}))},getAnchorProps(){return t.element(ce(M({},ni.anchor.attrs),{dir:u("dir"),id:BT(c)}))},getTriggerProps(){return t.button(ce(M({},ni.trigger.attrs),{dir:u("dir"),type:"button","data-placement":f,id:UT(c),"aria-haspopup":"dialog","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":hm(c),onPointerDown(b){Mx(b)&&aM()&&b.currentTarget.focus()},onClick(b){b.defaultPrevented||i({type:"TOGGLE"})},onBlur(b){i({type:"TRIGGER_BLUR",target:b.relatedTarget})}}))},getIndicatorProps(){return t.element(ce(M({},ni.indicator.attrs),{dir:u("dir"),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(M({id:jT(c)},ni.positioner.attrs),{dir:u("dir"),style:E.floating}))},getContentProps(){return t.element(ce(M({},ni.content.attrs),{dir:u("dir"),id:hm(c),tabIndex:-1,role:"dialog","aria-modal":Ix(u("modal")),hidden:!d,"data-state":d?"open":"closed","data-expanded":js(d),"aria-labelledby":m.title?mm(c):void 0,"aria-describedby":m.description?gm(c):void 0,"data-placement":f}))},getTitleProps(){return t.element(ce(M({},ni.title.attrs),{id:mm(c),dir:u("dir")}))},getDescriptionProps(){return t.element(ce(M({},ni.description.attrs),{id:gm(c),dir:u("dir")}))},getCloseTriggerProps(){return t.button(ce(M({},ni.closeTrigger.attrs),{dir:u("dir"),id:F7(c),type:"button","aria-label":"close",onClick(b){b.defaultPrevented||(b.stopPropagation(),i({type:"CLOSE"}))}}))}}}var H7={props({props:e}){return ce(M({closeOnInteractOutside:!0,closeOnEscape:!0,autoFocus:!0,modal:!1,portalled:!0},e),{positioning:M({placement:"bottom"},e.positioning)})},initialState({prop:e}){return e("open")||e("defaultOpen")?"open":"closed"},context({bindable:e}){return{currentPlacement:e(()=>({defaultValue:void 0})),renderedElements:e(()=>({defaultValue:{title:!0,description:!0}}))}},computed:{currentPortalled:({prop:e})=>!!e("modal")||!!e("portalled")},watch({track:e,prop:t,action:n}){e([()=>t("open")],()=>{n(["toggleVisibility"])})},entry:["checkRenderedElements"],states:{closed:{on:{"CONTROLLED.OPEN":{target:"open",actions:["setInitialFocus"]},TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}],OPEN:[{guard:"isOpenControlled",actions:["invokeOnOpen"]},{target:"open",actions:["invokeOnOpen","setInitialFocus"]}]}},open:{effects:["trapFocus","preventScroll","hideContentBelow","trackPositioning","trackDismissableElement","proxyTabFocus"],on:{"CONTROLLED.CLOSE":{target:"closed",actions:["setFinalFocus"]},CLOSE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose","setFinalFocus"]}],TOGGLE:[{guard:"isOpenControlled",actions:["invokeOnClose"]},{target:"closed",actions:["invokeOnClose"]}],"POSITIONING.SET":{actions:["reposition"]}}}},implementations:{guards:{isOpenControlled:({prop:e})=>e("open")!=null},effects:{trackPositioning({context:e,prop:t,scope:n}){var s;e.set("currentPlacement",t("positioning").placement);const r=(s=HT(n))!=null?s:ta(n);return xT(r,()=>$T(n),ce(M({},t("positioning")),{defer:!0,onComplete(u){e.set("currentPlacement",u.placement)}}))},trackDismissableElement({send:e,prop:t,scope:n}){const r=()=>na(n);let i=!0;return PT(r,{type:"popover",pointerBlocking:t("modal"),exclude:ta(n),defer:!0,onEscapeKeyDown(s){var u;(u=t("onEscapeKeyDown"))==null||u(s),!t("closeOnEscape")&&s.preventDefault()},onInteractOutside(s){var u;(u=t("onInteractOutside"))==null||u(s),!s.defaultPrevented&&(i=!(s.detail.focusable||s.detail.contextmenu),t("closeOnInteractOutside")||s.preventDefault())},onPointerDownOutside:t("onPointerDownOutside"),onFocusOutside:t("onFocusOutside"),persistentElements:t("persistentElements"),onRequestDismiss:t("onRequestDismiss"),onDismiss(){e({type:"CLOSE",src:"interact-outside",restoreFocus:i})}})},proxyTabFocus({prop:e,scope:t}){return e("modal")||!e("portalled")?void 0:CM(()=>na(t),{triggerElement:ta(t),defer:!0,getShadowRoot:!0,onFocus(r){r.focus({preventScroll:!0})}})},hideContentBelow({prop:e,scope:t}){return e("modal")?_T(()=>[na(t),ta(t)],{defer:!0}):void 0},preventScroll({prop:e,scope:t}){if(e("modal"))return FT(t.getDoc())},trapFocus({prop:e,scope:t}){return e("modal")?DT(()=>na(t),{initialFocus:()=>zx({root:na(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")}),getShadowRoot:!0}):void 0}},actions:{reposition({event:e,prop:t,scope:n,context:r}){var u;const i=(u=HT(n))!=null?u:ta(n);xT(i,()=>$T(n),ce(M(M({},t("positioning")),e.options),{defer:!0,listeners:!1,onComplete(c){r.set("currentPlacement",c.placement)}}))},checkRenderedElements({context:e,scope:t}){sn(()=>{Object.assign(e.get("renderedElements"),{title:!!B7(t),description:!!U7(t)})})},setInitialFocus({prop:e,scope:t}){e("modal")||sn(()=>{const n=zx({root:na(t),getInitialEl:e("initialFocusEl"),enabled:e("autoFocus")});n==null||n.focus({preventScroll:!0})})},setFinalFocus({event:e,scope:t}){var r,i;const n=(i=e.restoreFocus)!=null?i:(r=e.previousEvent)==null?void 0:r.restoreFocus;n!=null&&!n||sn(()=>{const s=ta(t);s==null||s.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})}}}};Gs()(["autoFocus","closeOnEscape","closeOnInteractOutside","dir","getRootNode","id","ids","initialFocusEl","modal","onEscapeKeyDown","onFocusOutside","onInteractOutside","onOpenChange","onPointerDownOutside","onRequestDismiss","defaultOpen","open","persistentElements","portalled","positioning"]);const[CV,Zl]=$o({name:"EnvironmentContext",hookName:"useEnvironmentContext",providerName:"<EnvironmentProvider />",strict:!1,defaultValue:{getRootNode:()=>document,getDocument:()=>document,getWindow:()=>window}}),[NV,ym]=$o({name:"LocaleContext",hookName:"useLocaleContext",providerName:"<LocaleProvider />",strict:!1,defaultValue:{dir:"ltr",locale:"en-US"}}),$7=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,dir:r,getRootNode:n},e),s=jl(H7,i);return j7(s,Qh)},z7=e=>{const[t,u]=Jx(e),c=u,{children:n}=c,r=_n(c,["children"]),i=$7(r),s=em(an({present:i.open},t));return w.jsx(zM,{value:i,children:w.jsx(Xx,{value:s,children:n})})},zT=k.forwardRef((e,t)=>{const n=Zh(),r=Su(),i=an(ce(M({},n.getTriggerProps()),{"aria-controls":r.unmounted?void 0:n.getTriggerProps()["aria-controls"]}),e);return w.jsx(Nn.button,ce(M({},i),{ref:t}))});zT.displayName="PopoverTrigger";function V7(e){return ut({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 q7(e){return ut({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 W7(e){return ut({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 Y7(e){return ut({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 G7(e){return ut({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 X7(e){return ut({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 Em(e){return ut({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 VT(e){return ut({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 K7=({className:e,componentType:t,children:n})=>{const[r,i]=k.useState(!1),{globalClassName:s}=st(),u=f=>{i(f.open)},c=k.useCallback(()=>{i(!1)},[]),d=k.useMemo(()=>({closeMenu:c}),[c]);return w.jsxs(z7,{open:r,onOpenChange:u,positioning:{placement:"bottom-end"},children:[w.jsx(zT,{"aria-label":`Overflow menu for ${t}`,className:D(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,s,e,`cim-${t}-component`),children:w.jsx(VT,{})}),w.jsx(Qx,{children:w.jsx(Kx,{className:D(`${N}-overflow-menu-list`,s,`cim-${t}-component`),children:w.jsx(xx.Provider,{value:d,children:n})})})]})};function qT(e){return ut({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 WT(e){return ut({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[Q7,Wo]=$o({name:"CarouselContext",hookName:"useCarouselContext",providerName:"<CarouselProvider />"}),bm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getControlProps(),e);return w.jsx(Nn.div,ce(M(M({},r),e),{ref:t}))});bm.displayName="CarouselControl";const wm=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["readOnly","index"]),i=Wo(),s=an(i.getIndicatorProps(n),r);return w.jsx(Nn.button,ce(M({},s),{ref:t}))});wm.displayName="CarouselIndicator";const xm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getIndicatorGroupProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});xm.displayName="CarouselIndicatorGroup";const Tm=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["index","snapAlign"]),i=Wo(),s=an(i.getItemProps(n),r);return w.jsx(Nn.div,ce(M({},s),{ref:t}))});Tm.displayName="CarouselItem";const _m=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getItemGroupProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});_m.displayName="CarouselItemGroup";const vm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getNextTriggerProps(),e);return w.jsx(Nn.button,ce(M({},r),{ref:t}))});vm.displayName="CarouselNextTrigger";const Sm=k.forwardRef((e,t)=>{const n=Wo(),r=an(n.getPrevTriggerProps(),e);return w.jsx(Nn.button,ce(M({},r),{ref:t}))});Sm.displayName="CarouselPrevTrigger";function J7(e){const t=Vs(e),n=e.getBoundingClientRect();let r=t.getPropertyValue("scroll-padding-left").replace("auto","0px"),i=t.getPropertyValue("scroll-padding-top").replace("auto","0px"),s=t.getPropertyValue("scroll-padding-right").replace("auto","0px"),u=t.getPropertyValue("scroll-padding-bottom").replace("auto","0px");function c(E,b){let T=parseFloat(E);return/%/.test(E)&&(T/=100,T*=b),Number.isNaN(T)?0:T}let d=c(r,n.width),f=c(i,n.height),h=c(s,n.width),m=c(u,n.height);return{x:{before:d,after:h},y:{before:f,after:m}}}function Z7(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 YT(e){let t=[];for(const n of e.children)t=t.concat(n,YT(n));return t}function GT(e,t=!1){const n=e.getBoundingClientRect(),r={x:{start:[],center:[],end:[]},y:{start:[],center:[],end:[]}},i=t?YT(e):e.children;for(const s of["x","y"]){const u=s==="x"?"y":"x",c=s==="x"?"left":"top",d=s==="x"?"width":"height",f=s==="x"?"scrollLeft":"scrollTop";for(const h of i){const m=h.getBoundingClientRect();if(!Z7(n,m,u))continue;const E=Vs(h);let[b,T]=E.getPropertyValue("scroll-snap-align").split(" ");typeof T=="undefined"&&(T=b);const _=s==="x"?T:b,I=m[c]-n[c]+e[f];switch(_){case"none":break;case"start":r[s].start.push({node:h,position:I});break;case"center":r[s].center.push({node:h,position:I+m[d]/2});break;case"end":r[s].end.push({node:h,position:I+m[d]});break}}}return r}function XT(e){const t=e.getBoundingClientRect(),n=J7(e),r=GT(e),i={x:e.scrollWidth-e.offsetWidth,y:e.scrollHeight-e.offsetHeight};return{x:KT([...r.x.start.map(s=>s.position-n.x.before),...r.x.center.map(s=>s.position-t.width/2),...r.x.end.map(s=>s.position-t.width+n.x.after)].map(QT(0,i.x))),y:KT([...r.y.start.map(s=>s.position-n.y.before),...r.y.center.map(s=>s.position-t.height/2),...r.y.end.map(s=>s.position-t.height+n.y.after)].map(QT(0,i.y)))}}function eF(e,t,n){const r=GT(e),i=[...r[t].start,...r[t].center,...r[t].end];for(const s of i)if(n(s.node))return s.position}var KT=e=>[...new Set(e)],QT=(e,t)=>n=>Math.max(e,Math.min(t,n)),tF=zo("carousel").parts("root","itemGroup","item","control","nextTrigger","prevTrigger","indicatorGroup","indicator","autoplayTrigger"),hi=tF.build(),nF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.root)!=null?n:`carousel:${e.id}`},rF=(e,t)=>{var n,r,i;return(i=(r=(n=e.ids)==null?void 0:n.item)==null?void 0:r.call(n,t))!=null?i:`carousel:${e.id}:item:${t}`},ed=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.itemGroup)!=null?n:`carousel:${e.id}:item-group`},iF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.nextTrigger)!=null?n:`carousel:${e.id}:next-trigger`},oF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.prevTrigger)!=null?n:`carousel:${e.id}:prev-trigger`},sF=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.indicatorGroup)!=null?n:`carousel:${e.id}:indicator-group`},JT=(e,t)=>{var n,r,i;return(i=(r=(n=e.ids)==null?void 0:n.indicator)==null?void 0:r.call(n,t))!=null?i:`carousel:${e.id}:indicator:${t}`},qn=e=>e.getById(ed(e)),ZT=e=>NM(qn(e),"[data-part=item]"),aF=(e,t)=>e.getById(JT(e,t)),e_=e=>{const t=qn(e);if(!t)return;const n=qs(t);t.setAttribute("tabindex",n.length>0?"-1":"0")};function uF(e,t){const{state:n,context:r,computed:i,send:s,scope:u,prop:c}=e,d=n.matches("autoplay"),f=n.matches("dragging"),h=i("canScrollNext"),m=i("canScrollPrev"),E=i("isHorizontal"),b=Array.from(r.get("pageSnapPoints")),T=r.get("page"),_=c("slidesPerPage"),I=c("padding"),v=c("translations");return{isPlaying:d,isDragging:f,page:T,pageSnapPoints:b,canScrollNext:h,canScrollPrev:m,getProgress(){return T/b.length},scrollToIndex(S,R){s({type:"INDEX.SET",index:S,instant:R})},scrollTo(S,R){s({type:"PAGE.SET",index:S,instant:R})},scrollNext(S){s({type:"PAGE.NEXT",instant:S})},scrollPrev(S){s({type:"PAGE.PREV",instant:S})},play(){s({type:"AUTOPLAY.START"})},pause(){s({type:"AUTOPLAY.PAUSE"})},isInView(S){return Array.from(r.get("slidesInView")).includes(S)},refresh(){s({type:"SNAP.REFRESH"})},getRootProps(){return t.element(ce(M({},hi.root.attrs),{id:nF(u),role:"region","aria-roledescription":"carousel","data-orientation":c("orientation"),dir:c("dir"),style:{"--slides-per-page":_,"--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(ce(M({},hi.itemGroup.attrs),{id:ed(u),"data-orientation":c("orientation"),"data-dragging":js(f),dir:c("dir"),"aria-live":d?"off":"polite",onFocus(S){Hs(S.currentTarget,Ir(S))&&s({type:"VIEWPORT.FOCUS"})},onBlur(S){Hs(S.currentTarget,S.relatedTarget)||s({type:"VIEWPORT.BLUR"})},onMouseDown(S){if(S.defaultPrevented||!c("allowMouseDrag")||!Mx(S))return;const R=Ir(S);Qr(R)&&R!==S.currentTarget||(S.preventDefault(),s({type:"DRAGGING.START"}))},onWheel:N8(S=>{const R=c("orientation")==="horizontal"?"deltaX":"deltaY";S[R]<0&&!i("canScrollPrev")||S[R]>0&&!i("canScrollNext")||s({type:"USER.SCROLL"})},150),onTouchStart(){s({type:"USER.SCROLL"})},style:{display:"grid",gap:"var(--slide-spacing)",scrollSnapType:[E?"x":"y",c("snapType")].join(" "),gridAutoFlow:E?"column":"row",scrollbarWidth:"none",overscrollBehaviorX:"contain",[E?"gridAutoColumns":"gridAutoRows"]:"var(--slide-item-size)",[E?"scrollPaddingInline":"scrollPaddingBlock"]:I,[E?"paddingInline":"paddingBlock"]:I,[E?"overflowX":"overflowY"]:"auto"}}))},getItemProps(S){const R=r.get("slidesInView").includes(S.index);return t.element(ce(M({},hi.item.attrs),{id:rF(u,S.index),dir:c("dir"),role:"group","data-index":S.index,"data-inview":js(R),"aria-roledescription":"slide","data-orientation":c("orientation"),"aria-label":v.item(S.index,c("slideCount")),"aria-hidden":Ix(!R),style:{scrollSnapAlign:(()=>{var W;const U=(W=S.snapAlign)!=null?W:"start",B=c("slidesPerMove"),A=B==="auto"?Math.floor(c("slidesPerPage")):B;return(S.index+A)%A===0?U:void 0})()}}))},getControlProps(){return t.element(ce(M({},hi.control.attrs),{"data-orientation":c("orientation")}))},getPrevTriggerProps(){return t.button(ce(M({},hi.prevTrigger.attrs),{id:oF(u),type:"button",disabled:!m,dir:c("dir"),"aria-label":v.prevTrigger,"data-orientation":c("orientation"),"aria-controls":ed(u),onClick(S){S.defaultPrevented||s({type:"PAGE.PREV",src:"trigger"})}}))},getNextTriggerProps(){return t.button(ce(M({},hi.nextTrigger.attrs),{dir:c("dir"),id:iF(u),type:"button","aria-label":v.nextTrigger,"data-orientation":c("orientation"),"aria-controls":ed(u),disabled:!h,onClick(S){S.defaultPrevented||s({type:"PAGE.NEXT",src:"trigger"})}}))},getIndicatorGroupProps(){return t.element(ce(M({},hi.indicatorGroup.attrs),{dir:c("dir"),id:sF(u),"data-orientation":c("orientation"),onKeyDown(S){if(S.defaultPrevented)return;const R="indicator",U={ArrowDown(G){E||(s({type:"PAGE.NEXT",src:R}),G.preventDefault())},ArrowUp(G){E||(s({type:"PAGE.PREV",src:R}),G.preventDefault())},ArrowRight(G){E&&(s({type:"PAGE.NEXT",src:R}),G.preventDefault())},ArrowLeft(G){E&&(s({type:"PAGE.PREV",src:R}),G.preventDefault())},Home(G){s({type:"PAGE.SET",index:0,src:R}),G.preventDefault()},End(G){s({type:"PAGE.SET",index:b.length-1,src:R}),G.preventDefault()}},B=fM(S,{dir:c("dir"),orientation:c("orientation")}),A=U[B];A==null||A(S)}}))},getIndicatorProps(S){return t.button(ce(M({},hi.indicator.attrs),{dir:c("dir"),id:JT(u,S.index),type:"button","data-orientation":c("orientation"),"data-index":S.index,"data-readonly":js(S.readOnly),"data-current":js(S.index===T),"aria-label":v.indicator(S.index),onClick(R){R.defaultPrevented||S.readOnly||s({type:"PAGE.SET",index:S.index,src:"indicator"})}}))},getAutoplayTriggerProps(){return t.button(ce(M({},hi.autoplayTrigger.attrs),{type:"button","data-orientation":c("orientation"),"data-pressed":js(d),"aria-label":d?v.autoplayStop:v.autoplayStart,onClick(S){S.defaultPrevented||s({type:d?"AUTOPLAY.PAUSE":"AUTOPLAY.START"})}}))}}}var cF={props({props:e}){return D8(e,["slideCount"],"carousel"),ce(M({dir:"ltr",defaultPage:0,orientation:"horizontal",snapType:"mandatory",loop:!!e.autoplay,slidesPerPage:1,slidesPerMove:"auto",spacing:"0px",autoplay:!1,allowMouseDrag:!1,inViewThreshold:.6},e),{translations:M({nextTrigger:"Next slide",prevTrigger:"Previous slide",indicator:t=>`Go to slide ${t+1}`,item:(t,n)=>`${t+1} of ${n}`,autoplayStart:"Start slide rotation",autoplayStop:"Stop slide rotation"},e.translations)})},refs(){return{timeoutRef:void 0}},initialState({prop:e}){return e("autoplay")?"autoplay":"idle"},context({prop:e,bindable:t,getContext:n}){return{page:t(()=>({defaultValue:e("defaultPage"),value:e("page"),onChange(r){var u;const s=n().get("pageSnapPoints");(u=e("onPageChange"))==null||u({page:r,pageSnapPoint:s[r]})}})),pageSnapPoints:t(()=>({defaultValue:lF(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 E8(t)?t.delay:4e3}},watch({track:e,action:t,context:n,prop:r,send:i}){e([()=>r("slidesPerPage"),()=>r("slidesPerMove")],()=>{t(["setSnapPoints"])}),e([()=>n.get("page")],()=>{t(["scrollToPage","focusIndicatorEl"])}),e([()=>r("orientation")],()=>{t(["setSnapPoints","scrollToPage"])}),e([()=>r("slideCount")],()=>{i({type:"SNAP.REFRESH",src:"slide.count"})}),e([()=>!!r("autoplay")],()=>{i({type:r("autoplay")?"AUTOPLAY.START":"AUTOPLAY.PAUSE",src:"autoplay.prop.change"})})},on:{"PAGE.NEXT":{target:"idle",actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{target:"idle",actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{target:"idle",actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{target:"idle",actions:["clearScrollEndTimer","setMatchingPage"]},"SNAP.REFRESH":{actions:["setSnapPoints","clampPage"]},"PAGE.SCROLL":{actions:["scrollToPage"]}},effects:["trackSlideMutation","trackSlideIntersections","trackSlideResize"],entry:["setSnapPoints","setPage"],exit:["clearScrollEndTimer"],states:{idle:{on:{"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.START":{target:"autoplay",actions:["invokeAutoplayStart"]},"USER.SCROLL":{target:"userScroll"},"VIEWPORT.FOCUS":{target:"focus"}}},focus:{effects:["trackKeyboardScroll"],on:{"VIEWPORT.BLUR":{target:"idle"},"PAGE.NEXT":{actions:["clearScrollEndTimer","setNextPage"]},"PAGE.PREV":{actions:["clearScrollEndTimer","setPrevPage"]},"PAGE.SET":{actions:["clearScrollEndTimer","setPage"]},"INDEX.SET":{actions:["clearScrollEndTimer","setMatchingPage"]},"USER.SCROLL":{target:"userScroll"}}},dragging:{effects:["trackPointerMove"],entry:["disableScrollSnap"],on:{DRAGGING:{actions:["scrollSlides","invokeDragging"]},"DRAGGING.END":{target:"idle",actions:["endDragging","invokeDraggingEnd"]}}},userScroll:{effects:["trackScroll"],on:{"SCROLL.END":[{guard:"isFocused",target:"focus",actions:["setClosestPage"]},{target:"idle",actions:["setClosestPage"]}]}},autoplay:{effects:["trackDocumentVisibility","trackScroll","autoUpdateSlide"],exit:["invokeAutoplayEnd"],on:{"AUTOPLAY.TICK":{actions:["setNextPage","invokeAutoplay"]},"DRAGGING.START":{target:"dragging",actions:["invokeDragStart"]},"AUTOPLAY.PAUSE":{target:"idle"}}}},implementations:{guards:{isFocused:({scope:e})=>e.isActiveElement(qn(e))},effects:{autoUpdateSlide({computed:e,send:t}){const n=setInterval(()=>{t({type:e("canScrollNext")?"AUTOPLAY.TICK":"AUTOPLAY.PAUSE",src:"autoplay.interval"})},e("autoplayInterval"));return()=>clearInterval(n)},trackSlideMutation({scope:e,send:t}){const n=qn(e);if(!n)return;const r=e.getWin(),i=new r.MutationObserver(()=>{t({type:"SNAP.REFRESH",src:"slide.mutation"}),e_(e)});return e_(e),i.observe(n,{childList:!0,subtree:!0}),()=>i.disconnect()},trackSlideResize({scope:e,send:t}){if(!qn(e))return;const r=e.getWin(),i=()=>{t({type:"SNAP.REFRESH",src:"slide.resize"})};sn(()=>{i(),sn(()=>{t({type:"PAGE.SCROLL",instant:!0})})});const s=new r.ResizeObserver(i);return ZT(e).forEach(u=>s.observe(u)),()=>s.disconnect()},trackSlideIntersections({scope:e,prop:t,context:n}){const r=qn(e),i=e.getWin(),s=new i.IntersectionObserver(u=>{const c=u.reduce((d,f)=>{var E;const h=f.target,m=Number((E=h.dataset.index)!=null?E:"-1");return m==null||Number.isNaN(m)||m===-1?d:f.isIntersecting?p8(d,m):h8(d,m)},n.get("slidesInView"));n.set("slidesInView",m8(c))},{root:r,threshold:t("inViewThreshold")});return ZT(e).forEach(u=>s.observe(u)),()=>s.disconnect()},trackScroll({send:e,refs:t,scope:n}){const r=qn(n);return r?hn(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 hn(n,"visibilitychange",()=>{n.visibilityState!=="visible"&&t({type:"AUTOPLAY.PAUSE",src:"doc.hidden"})})},trackPointerMove({scope:e,send:t}){const n=e.getDoc();return AM(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 hn(r,"keydown",s=>{switch(s.key){case"ArrowRight":s.preventDefault(),t({type:"PAGE.NEXT"});break;case"ArrowLeft":s.preventDefault(),t({type:"PAGE.PREV"});break;case"Home":s.preventDefault(),t({type:"PAGE.SET",index:0});break;case"End":s.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:i}){var f;const s=t.instant?"instant":"smooth",u=Cx((f=t.index)!=null?f:e.get("page"),0,e.get("pageSnapPoints").length-1),c=qn(n);if(!c)return;const d=r("isHorizontal")?"left":"top";i(()=>{c.scrollTo({[d]:e.get("pageSnapPoints")[u],behavior:s})})},setClosestPage({context:e,scope:t,computed:n}){const r=qn(t);if(!r)return;const i=n("isHorizontal")?r.scrollLeft:r.scrollTop,s=e.get("pageSnapPoints").findIndex(u=>Math.abs(u-i)<1);s!==-1&&e.set("page",s)},setNextPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),i=Sx(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",i)},setPrevPage({context:e,prop:t,state:n}){const r=n.matches("autoplay")||t("loop"),i=g8(e.get("pageSnapPoints"),e.get("page"),{loop:r});e.set("page",i)},setMatchingPage({context:e,event:t,computed:n,scope:r}){const i=qn(r);if(!i)return;const s=eF(i,n("isHorizontal")?"x":"y",c=>c.dataset.index===t.index.toString());if(s==null)return;const u=e.get("pageSnapPoints").findIndex(c=>Math.abs(c-s)<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=Cx(e.get("page"),0,e.get("pageSnapPoints").length-1);e.set("page",t)},setSnapPoints({context:e,computed:t,scope:n}){const r=qn(n);if(!r)return;const i=XT(r);e.set("pageSnapPoints",t("isHorizontal")?i.x:i.y)},disableScrollSnap({scope:e}){const t=qn(e);if(!t)return;const n=getComputedStyle(t);t.dataset.scrollSnapType=n.getPropertyValue("scroll-snap-type"),t.style.setProperty("scroll-snap-type","none")},scrollSlides({scope:e,event:t}){const n=qn(e);n==null||n.scrollBy({left:t.left,top:t.top,behavior:"instant"})},endDragging({scope:e,context:t,computed:n}){const r=qn(e);if(!r)return;const i=r.scrollLeft,s=r.scrollTop,u=XT(r),c=u.x.reduce((f,h)=>Math.abs(h-i)<Math.abs(f-i)?h:f,u.x[0]),d=u.y.reduce((f,h)=>Math.abs(h-s)<Math.abs(f-s)?h:f,u.y[0]);sn(()=>{r.scrollTo({left:c,top:d,behavior:"smooth"});const f=n("isHorizontal")?c:d;t.set("page",t.get("pageSnapPoints").indexOf(f));const h=r.dataset.scrollSnapType;h&&(r.style.setProperty("scroll-snap-type",h),delete r.dataset.scrollSnapType)})},focusIndicatorEl({context:e,event:t,scope:n}){if(t.src!=="indicator")return;const r=aF(n,e.get("page"));r&&sn(()=>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 lF(e,t,n){if(e==null||n<=0)return[];const r=[],i=t==="auto"?Math.floor(n):t;if(i<=0)return[];for(let s=0;s<e&&!(s+n>e);s+=i)r.push(s);return r}Gs()(["dir","getRootNode","id","ids","loop","page","defaultPage","onPageChange","orientation","slideCount","slidesPerPage","slidesPerMove","spacing","padding","autoplay","allowMouseDrag","inViewThreshold","translations","snapType","onDragStatusChange","onAutoplayStatusChange"]),Gs()(["index","readOnly"]),Gs()(["index","snapAlign"]);const dF=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,dir:r,getRootNode:n},e),s=jl(cF,i);return uF(s,Qh)},Am=k.forwardRef((e,t)=>{const[n,r]=Au()(e,["allowMouseDrag","autoplay","defaultPage","id","ids","inViewThreshold","loop","onAutoplayStatusChange","onDragStatusChange","onPageChange","orientation","padding","page","slideCount","slidesPerMove","slidesPerPage","snapType","spacing","translations"]),i=dF(n),s=an(i.getRootProps(),r);return w.jsx(Q7,{value:i,children:w.jsx(Nn.div,ce(M({},s),{ref:t}))})});Am.displayName="CarouselRoot";const fF=180,pF=e=>{const t=e.trim(),n=parseFloat(t);return Number.isNaN(n)?0:t.endsWith("rem")?n*16:n},hF=({globalClassName:e,className:t,itemMinWidth:n=fF,spacing:r="0.5rem",loop:i=!1,allowMouseDrag:s=!0,showIndicators:u=!0,showNavigation:c=!0,navigationVariant:d="chevron",onPageChange:f,ariaLabel:h="Product carousel",children:m})=>{const E=Array.from(m).map((H,ee)=>({node:H,key:k.isValidElement(H)&&H.key!=null?H.key:`carousel-item-${ee}`})),b=E.length,T=k.useRef(null),[_,I]=k.useState(0),{width:v}=Gk();k.useLayoutEffect(()=>{T.current&&I(T.current.getBoundingClientRect().width)},[v,b]);const S=pF(r),R=n+S,U=_>0?(_+S)/R:1,B=Math.max(1,Math.floor(U));if(b===0)return null;const A=b>B,G=Math.ceil(b/B),W=A?Math.max(1,U):B,re=d==="circle-arrow";return w.jsxs(Am,{ref:T,className:D(e,t,`${N}-carousel`,{[`${N}-carousel--circle-arrow-navigation`]:re}),slidesPerPage:W,slidesPerMove:B,spacing:r,loop:i,allowMouseDrag:s,slideCount:b,onPageChange:f,"aria-label":h,children:[w.jsx(_m,{className:D(e,`${N}-carousel__item-group`,{"carousel-row-container":!A}),children:E.map(({node:H,key:ee},Q)=>w.jsx(Tm,{index:Q,className:D(e,`${N}-carousel__item`),children:H},ee))}),c&&A&&w.jsxs(bm,{className:D(e,`${N}-carousel__control`),children:[w.jsx(Sm,{className:D(e,`${N}-carousel__prev-trigger`),"aria-label":"Previous slide",children:re?w.jsx(UE,{size:"16px"}):w.jsx(W7,{size:"16px"})}),w.jsx(vm,{className:D(e,`${N}-carousel__next-trigger`),"aria-label":"Next slide",children:re?w.jsx(jE,{size:"16px"}):w.jsx(Y7,{size:"16px"})})]}),u&&A&&w.jsx(xm,{className:D(e,`${N}-carousel__indicator-group`),children:Array.from({length:G},(H,ee)=>w.jsx(wm,{index:ee,className:D(e,`${N}-carousel__indicator`),"aria-label":`Go to slide group ${ee+1}`},ee))})]})},[mF,gF]=$o({name:"RenderStrategyContext",hookName:"useRenderStrategyContext",providerName:"<RenderStrategyPropsProvider />"}),yF=e=>Au()(e,["lazyMount","unmountOnExit"]),[EF,Pu]=$o({name:"DialogContext",hookName:"useDialogContext",providerName:"<DialogProvider />"}),t_=k.forwardRef((e,t)=>{const n=Pu(),r=gF(),i=em(ce(M({},r),{present:n.open})),s=an(n.getBackdropProps(),i.getPresenceProps(),e);return i.unmounted?null:w.jsx(Nn.div,ce(M({},s),{ref:Hl(i.ref,t)}))});t_.displayName="DialogBackdrop";const km=k.forwardRef((e,t)=>{const n=Pu(),r=Su(),i=an(n.getContentProps(),r.getPresenceProps(),e);return r.unmounted?null:w.jsx(Nn.div,ce(M({},i),{ref:Hl(r.ref,t)}))});km.displayName="DialogContent";const Cm=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getDescriptionProps(),e);return w.jsx(Nn.div,ce(M({},r),{ref:t}))});Cm.displayName="DialogDescription";const Nm=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getPositionerProps(),e);return Su().unmounted?null:w.jsx(Nn.div,ce(M({},r),{ref:t}))});Nm.displayName="DialogPositioner";var bF=zo("dialog").parts("trigger","backdrop","positioner","content","title","description","closeTrigger"),Yo=bF.build(),n_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.positioner)!=null?n:`dialog:${e.id}:positioner`},r_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.backdrop)!=null?n:`dialog:${e.id}:backdrop`},Im=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.content)!=null?n:`dialog:${e.id}:content`},i_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.trigger)!=null?n:`dialog:${e.id}:trigger`},Om=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.title)!=null?n:`dialog:${e.id}:title`},Pm=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.description)!=null?n:`dialog:${e.id}:description`},o_=e=>{var t,n;return(n=(t=e.ids)==null?void 0:t.closeTrigger)!=null?n:`dialog:${e.id}:close`},td=e=>e.getById(Im(e)),wF=e=>e.getById(n_(e)),xF=e=>e.getById(r_(e)),TF=e=>e.getById(i_(e)),_F=e=>e.getById(Om(e)),vF=e=>e.getById(Pm(e)),SF=e=>e.getById(o_(e));function AF(e,t){const{state:n,send:r,context:i,prop:s,scope:u}=e,c=s("aria-label"),d=n.matches("open");return{open:d,setOpen(f){n.matches("open")!==f&&r({type:f?"OPEN":"CLOSE"})},getTriggerProps(){return t.button(ce(M({},Yo.trigger.attrs),{dir:s("dir"),id:i_(u),"aria-haspopup":"dialog",type:"button","aria-expanded":d,"data-state":d?"open":"closed","aria-controls":Im(u),onClick(f){f.defaultPrevented||r({type:"TOGGLE"})}}))},getBackdropProps(){return t.element(ce(M({},Yo.backdrop.attrs),{dir:s("dir"),hidden:!d,id:r_(u),"data-state":d?"open":"closed"}))},getPositionerProps(){return t.element(ce(M({},Yo.positioner.attrs),{dir:s("dir"),id:n_(u),style:{pointerEvents:d?void 0:"none"}}))},getContentProps(){const f=i.get("rendered");return t.element(ce(M({},Yo.content.attrs),{dir:s("dir"),role:s("role"),hidden:!d,id:Im(u),tabIndex:-1,"data-state":d?"open":"closed","aria-modal":!0,"aria-label":c||void 0,"aria-labelledby":c||!f.title?void 0:Om(u),"aria-describedby":f.description?Pm(u):void 0}))},getTitleProps(){return t.element(ce(M({},Yo.title.attrs),{dir:s("dir"),id:Om(u)}))},getDescriptionProps(){return t.element(ce(M({},Yo.description.attrs),{dir:s("dir"),id:Pm(u)}))},getCloseTriggerProps(){return t.button(ce(M({},Yo.closeTrigger.attrs),{dir:s("dir"),id:o_(u),type:"button",onClick(f){f.defaultPrevented||(f.stopPropagation(),r({type:"CLOSE"}))}}))}}}var kF={props({props:e,scope:t}){const n=e.role==="alertdialog",r=n?()=>SF(t):void 0,i=typeof e.modal=="boolean"?e.modal:!0;return M({role:"dialog",modal:i,trapFocus:i,preventScroll:i,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 PT(()=>td(e),{type:"dialog",defer:!0,pointerBlocking:n("modal"),exclude:[TF(e)],onInteractOutside(i){var s;(s=n("onInteractOutside"))==null||s(i),n("closeOnInteractOutside")||i.preventDefault()},persistentElements:n("persistentElements"),onFocusOutside:n("onFocusOutside"),onPointerDownOutside:n("onPointerDownOutside"),onRequestDismiss:n("onRequestDismiss"),onEscapeKeyDown(i){var s;(s=n("onEscapeKeyDown"))==null||s(i),n("closeOnEscape")||i.preventDefault()},onDismiss(){t({type:"CLOSE",src:"interact-outside"})}})},preventScroll({scope:e,prop:t}){if(t("preventScroll"))return FT(e.getDoc())},trapFocus({scope:e,prop:t}){return t("trapFocus")?DT(()=>td(e),{preventScroll:!0,returnFocusOnDeactivate:!!t("restoreFocus"),initialFocus:t("initialFocusEl"),setReturnFocus:r=>{var i,s;return(s=(i=t("finalFocusEl"))==null?void 0:i())!=null?s:r},getShadowRoot:!0}):void 0},hideContentBelow({scope:e,prop:t}){return t("modal")?_T(()=>[td(e)],{defer:!0}):void 0}},actions:{checkRenderedElements({context:e,scope:t}){sn(()=>{e.set("rendered",{title:!!_F(t),description:!!vF(t)})})},syncZIndex({scope:e}){sn(()=>{const t=td(e);if(!t)return;const n=Vs(t);[wF(e),xF(e)].forEach(i=>{i==null||i.style.setProperty("--z-index",n.zIndex),i==null||i.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})}}}};Gs()(["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 CF=e=>{const t=k.useId(),{getRootNode:n}=Zl(),{dir:r}=ym(),i=M({id:t,getRootNode:n,dir:r},e),s=jl(kF,i);return AF(s,Qh)},s_=e=>{const[t,c]=Jx(e),d=c,{children:n}=d,r=_n(d,["children"]),[i]=yF(t),s=CF(r),u=em(an({present:s.open},t));return w.jsx(EF,{value:s,children:w.jsx(mF,{value:i,children:w.jsx(Xx,{value:u,children:n})})})},a_=k.forwardRef((e,t)=>{const n=Pu(),r=an(n.getTitleProps(),e);return w.jsx(Nn.h2,ce(M({},r),{ref:t}))});a_.displayName="DialogTitle";const NF=({children:e})=>{const t=k.useId(),n=`overflow-panel-${t}`,r=`overflow-trigger-${t}`,[i,s]=k.useState(!1),u=k.useMemo(()=>({toggleMenu:()=>s(d=>!d),closeMenu:()=>{var f;const d=document.getElementById(n);d!=null&&d.contains(document.activeElement)&&((f=document.getElementById(r))==null||f.focus({preventScroll:!0})),s(!1)}}),[n,r]),c=k.useMemo(()=>({isOpen:i,panelId:n,triggerId:r}),[i,n,r]);return w.jsx(Fh.Provider,{value:u,children:w.jsx(wx.Provider,{value:c,children:e})})},u_=()=>k.useContext(wx),c_=()=>{const e=k.useContext(Fh);if(!e)throw new Error("useOverflowMenuDispatch must be used within an OverflowMenuProvider");return e},IF=({componentType:e,children:t})=>{const{isOpen:n,panelId:r,triggerId:i}=u_(),{closeMenu:s}=c_(),{globalClassName:u}=st(),c=k.useRef(null);return k.useEffect(()=>{var m;if(!n)return;const d=c.current;(m=d==null?void 0:d.querySelector("button:not(:disabled)"))==null||m.focus();const f=E=>{E.key==="Escape"&&(E.preventDefault(),E.stopPropagation(),s())},h=E=>{var T;const b=E.target;(T=document.getElementById(i))!=null&&T.contains(b)||c.current&&!c.current.contains(b)&&s()};return d==null||d.addEventListener("keydown",f),document.addEventListener("mousedown",h),()=>{d==null||d.removeEventListener("keydown",f),document.removeEventListener("mousedown",h)}},[n,s,i]),n?w.jsx("div",{ref:c,id:r,role:"group","aria-label":"More options",className:D(`${N}-overflow-panel`,u,`cim-${e}-component`),children:t}):null},OF=({componentType:e,className:t})=>{const{toggleMenu:n}=c_(),{isOpen:r,panelId:i,triggerId:s}=u_(),{globalClassName:u}=st();return w.jsx("button",{type:"button",id:s,"aria-controls":r?i:void 0,"aria-label":`Overflow menu for ${e}`,title:"More options","aria-expanded":r,className:D(`${N}-overflow-menu-button-trigger`,`${N}-icon-button`,u,t,`cim-${e}-component`),onClick:n,children:w.jsx(VT,{})})};class PF{constructor(){We(this,"initialState",R1);We(this,"promptsStateProxy");We(this,"promptsParamsProxy");We(this,"_fullGet",(t,n)=>Reflect.get(t,n));We(this,"_fullSet",(t,n,r)=>{if(!(n in t))throw new Error(`Property ${n} does not exist on PromptsExtensionState`);return DF(n,r),Reflect.set(t,n,r)});We(this,"_paramsFullGet",(t,n)=>Reflect.get(t,n));We(this,"_paramsFullSet",(t,n,r)=>Reflect.set(t,n,r));We(this,"updatePromptsParamsProxy",t=>new Proxy(M({},t),{get:this._paramsFullGet,set:this._paramsFullSet}));this.promptsStateProxy=new Proxy({isOpen:this.initialState.isOpen,isInline:this.initialState.isInline,elementId:this.initialState.elementId,entryType:this.initialState.entryType},{get:this._fullGet,set:this._fullSet}),this.promptsParamsProxy=this.updatePromptsParamsProxy({})}get isOpen(){return this.promptsStateProxy.isOpen}get isInline(){return this.promptsStateProxy.isInline}get state(){return{isOpen:this.isOpen,isInline:this.isInline}}get params(){return this.promptsParamsProxy}}const Vi=new PF,RF=e=>{window.addEventListener(Mf,e)},LF=e=>{window.removeEventListener(Mf,e)},DF=(e,t)=>{const n=new CustomEvent(Mf,{detail:{property:e,value:t}});window.dispatchEvent(n)},l_=e=>{const t=Vi.isOpen,n=typeof e=="boolean"?e:!t;Vi.promptsStateProxy.isOpen=n},MF=e=>{const t=Vi.isInline,n=typeof e=="boolean"?e:!t;Vi.promptsStateProxy.isInline=n},FF=({elementId:e,entryType:t,params:n,isInline:r})=>{Vi.promptsStateProxy.elementId=e,t&&(Vi.promptsStateProxy.entryType=t),typeof r=="boolean"&&MF(r),n&&Vi.updatePromptsParamsProxy(n),Vi.isOpen||l_(!0)},BF=()=>{u1("resetConversation",!0,Ic.RESET_CONVERSATION)},UF=()=>{u1("endConversation",!0,Ic.END_CONVERSATION)},Rm=()=>{const e=k.useContext(TE);if(!e)throw new Error("usePdp must be used within a PdpProvider");return e},jF=()=>{const e=k.useContext(xE);if(!e)throw new Error("usePromptsExtensionDispatch must be used within a PromptsExtensionProvider");return e||{}},nd=()=>{const e=k.useContext(wE);if(!e)throw new Error("usePromptsExtensionState must be used within a PromptsExtensionProvider");return e||{}},HF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{previousComponentType:r}=tr(),i=Uo(),s=()=>{Es(r||"dialog"),i()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-dialog-button`,`cim-${e}-component`),ariaLabel:"Collapse",title:"Collapse",onClick:s,icon:w.jsx(qT,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-dialog-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(qT,{}),"Show ",r||"dialog"]})},$F=({componentType:e,globalClassName:t,controls:n,showClose:r,closeButtonAriaLabel:i,onClose:s,showOverflowMenu:u,showPrimaryToggle:c})=>{const d=e==="modal"?HF:p_;return w.jsx("div",{className:D(t,`${N}-${e}-controls`),children:n!=null?w.jsxs(w.Fragment,{children:[n,r&&w.jsx(Hp,{className:D(t,`cim-${e}-component`),label:i,onClick:s})]}):w.jsxs(w.Fragment,{children:[u&&w.jsx(OF,{componentType:e}),c&&w.jsx(d,{componentType:e,isIcon:!0}),r&&w.jsx(Hp,{className:D(t,`cim-${e}-component`),label:i,onClick:s})]})})},zF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{isModalFullscreen:r}=tr(),i=Uo(),s=()=>{Rc(!r),i()},u=r?TO:_O,c="Toggle Fullscreen";return t?w.jsx(kr,{ariaLabel:c,title:c,className:D(n,`${N}-modal-fullscreen-button`,`cim-${e}-component`),icon:w.jsx(u,{}),onClick:s}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-modal-fullscreen-button`,`cim-${e}-component`),onClick:s,children:[w.jsx(u,{}),c]})},VF=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),{dialogPosition:r}=tr(),i=Uo(),s=r==="bottom-left",u=()=>{Lc(s?"bottom-right":"bottom-left"),i()},c=s?q7:V7,d=s?"Move right":"Move left";return t?w.jsx(kr,{className:D(n,`${N}-left-right-toggle-button`,`cim-${e}-component`),ariaLabel:d,title:d,onClick:u,icon:w.jsx(c,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-left-right-toggle-button`,`cim-${e}-component`),onClick:u,children:[w.jsx(c,{}),d]})},qF=({componentType:e,controls:t,showOverflowMenu:n,showSecondaryToggle:r,showMinimize:i,showClearChat:s,showEndConversation:u,showDownloadTranscript:c,onClearChat:d,onEndConversation:f,onDownloadTranscript:h})=>{if(t!=null||!n)return null;const m=e==="modal"?zF:VF;return w.jsxs(IF,{componentType:e,children:[r&&w.jsx(m,{componentType:e}),i&&w.jsx(JF,{componentType:e}),s&&w.jsx(Tx,{componentType:e,onClearChat:d}),u&&f&&w.jsx(vx,{componentType:e,onEndConversation:f}),c&&h&&w.jsx(_x,{componentType:e,onDownloadTranscript:h})]})},WF=({componentType:e,overflowActions:t,availableActions:n,controls:r,onClearChat:i,onEndConversation:s,onClose:u,onDownloadTranscript:c})=>{const{headerConfig:d,globalClassName:f,layoutPreset:h}=st(),{mode:m}=tr(),E=m==="standalone",b=e==="modal",T=re=>n===void 0||n[re],_=(re,H=!0)=>t.includes(re)&&T(re)&&H,I=T("toggleExpanded"),v=_(b?"toggleFullscreen":"toggleDialogPosition"),S=_("minimize"),R=_("clearChat"),U=T("close"),B=_("endConversation",!!s),A=_("downloadTranscript",!!c),G=v||S||R||B||A,W=k.useMemo(()=>d?PO(d):{},[d]);return w.jsx(NF,{children:w.jsxs("div",{className:D(f,`${N}-${e}-header-wrapper`),style:{display:"flex",flexDirection:"column",position:"relative"},children:[w.jsxs("div",{className:D(f,`${N}-${e}-header`,{standalone:E,embedded:!E}),style:W,children:[d!=null&&d.logoUrl?w.jsx("img",{alt:"",className:D(f,`${N}-${e}-logo`,{standalone:E,embedded:!E}),src:d.logoUrl}):h==="commerce"?w.jsx("svg",{className:D(f,`${N}-${e}-logo`,{standalone:E,embedded:!E}),viewBox:"0 0 16 16",width:"24",height:"24",fill:"none",children:w.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",stroke:"#ffffff",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})}):null,w.jsx(a_,{className:D(f,`${N}-${e}-title`,{standalone:E,embedded:!E}),children:d==null?void 0:d.headerText}),w.jsx($F,{componentType:e,globalClassName:f,controls:r,showClose:U,closeButtonAriaLabel:d==null?void 0:d.closeButtonAriaLabel,onClose:u,showOverflowMenu:G,showPrimaryToggle:I})]}),w.jsx(qF,{componentType:e,controls:r,showOverflowMenu:G,showSecondaryToggle:v,showMinimize:S,showClearChat:R,showEndConversation:B,showDownloadTranscript:A,onClearChat:i,onEndConversation:s,onDownloadTranscript:c})]})})},ra="USD",Lm=(...e)=>e.flatMap(t=>t!=null?t:[]).reduce((t,n)=>{const r=n.promotionalPrice;return typeof r!="number"||!Number.isFinite(r)?t:t===void 0||r<t?r:t},void 0),mi=(e,t)=>{if(typeof e!="number"||Number.isNaN(e))return null;try{return new Intl.NumberFormat(void 0,{style:"currency",currency:t}).format(e)}catch(n){return`${e}`}},YF=({retailPrice:e,discountPrice:t,currencyCode:n=ra})=>{const r=n||ra,i=typeof t=="number"&&typeof e=="number"&&t<e,s=i?t:e||t||null,u=i?e:null;return{price:mi(s,r),comparePrice:mi(u,r),hasDiscount:i}},rd=e=>typeof e=="number"&&Number.isFinite(e),Dm=e=>rd(e==null?void 0:e.min)&&rd(e==null?void 0:e.max),d_=e=>{const t=e==null?void 0:e.type;return typeof t=="string"&&t.length>0?t:void 0},GF=({min:e,max:t,currencyCode:n=ra})=>{if(!rd(e)||!rd(t))return null;const r=n||ra,i=mi(e,r),s=mi(t,r);if(i===null||s===null)return null;const u=e!==t;return{value:u?`${i} – ${s}`:i,low:i,high:s,isRange:u}},XF=({priceBreakdown:e,currencyCode:t=ra})=>{if(!e)return null;const n=t||ra,r=Dm(e.promotional)?e.promotional:null,i=Dm(e.sales)?e.sales:null,s=Dm(e.original)?e.original:null;if(!r&&!i&&!s)return null;const u=E=>GF({min:E.min,max:E.max,currencyCode:n}),c=(E,b)=>b&&b.value!==E.value?b:null;if(r){const E=u(r);return E?{active:E,compare:c(E,i?u(i):null)}:null}const d=d_(e.sales),f=d_(e.original);if(i&&s&&d&&f&&d!==f){const E=u(i);return E?{active:E,compare:c(E,u(s))}:null}const h=i!=null?i:s;if(!h)return null;const m=u(h);return m?{active:m,compare:null}:null},Mm=({retailPrice:e,discountPrice:t,currencyCode:n,fontSize:r,globalClassName:i,className:s})=>{const{price:u,comparePrice:c,hasDiscount:d}=YF({retailPrice:e,discountPrice:t,currencyCode:n});if(!u)return null;const f=typeof r=="string"?{fontSize:r}:{};return w.jsxs("div",{className:D(i,s,`${N}-price`),style:f,children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:D(i,`${N}-price__amount`),children:u}),d&&c&&w.jsxs("span",{className:D(i,`${N}-price__compare`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Original price: "}),c]})]})},KF={sparkle:Em,plus:G7,"paper-plane":X7},f_=({icon:e,className:t})=>{const n=KF[e];return n?w.jsx(n,{className:t,"aria-hidden":"true"}):null},QF=({className:e,globalClassName:t,suggestions:n,disabled:r,isWidgetStandalone:i,onSuggestionClick:s})=>{var b;const{suggestionButtonConfig:u}=st(),c=u==null?void 0:u.icon,d=(b=u==null?void 0:u.iconPosition)!=null?b:"left",f=i?"standalone":"embedded",h=T=>()=>{s(T)},m={"has-icon":!!c,"icon-right":!!c&&d==="right"},E=T=>w.jsxs(w.Fragment,{children:[c&&w.jsx(f_,{icon:c,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:T})]});return w.jsx("div",{className:D(t,`${N}-suggestion-container ${f}`,e),children:n.map(T=>i?w.jsx($p,{disabled:r,className:D(t,`${N}-suggestion-button standalone`,m),onClick:h(T),children:E(T)},T):w.jsx("button",{disabled:r,className:D(t,`${N}-suggestion-button embedded`,m),onClick:h(T),children:E(T)},T))})},JF=({componentType:e,isIcon:t})=>{const{globalClassName:n,enableMinimize:r}=st();if(!r)return null;const i=()=>{zr(!1),wo(!0),ol()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-minimize-button`,`cim-${e}-component`),ariaLabel:"Toggle Minimize",title:"Minimize",onClick:i,icon:w.jsx(DE,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-minimize-button`,`cim-${e}-component`),onClick:i,children:[w.jsx(DE,{}),"Minimize"]})},p_=({componentType:e,isIcon:t})=>{const{globalClassName:n}=st(),r=Uo(),i=()=>{Es("modal"),r()};return t?w.jsx(kr,{className:D(n,`${N}-toggle-modal-button`,`cim-${e}-component`),ariaLabel:"Expand",title:"Expand",onClick:i,icon:w.jsx(WT,{})}):w.jsxs("button",{className:D(n,`${N}-overflow-menu-button`,`${N}-toggle-modal-button`,`cim-${e}-component`),onClick:i,children:[w.jsx(WT,{}),"Show modal"]})};function ZF(e){return e.includes("-")&&e===e.toLowerCase()}function ri({tagName:e,props:t,label:n,onError:r}){const i=k.useRef(null),s=k.useRef(null),u=k.useRef(e),c=k.useRef(null),d=k.useRef(null),f=k.useRef(r);return f.current=r,k.useEffect(()=>{const h=i.current;if(!h)return;const m=()=>{var b;d.current!==e&&(d.current=e,(b=f.current)==null||b.call(f))};if(u.current!==e&&(u.current=e,s.current=null,d.current=null),!ZF(e)){c.current!==e&&(c.current=e,kt(!0,"error",`[CimulateOverrides] ${n||"Override"} rejected: "${e}" is not a valid custom element name (must contain a hyphen and be lowercase, e.g. "product-card").`),m()),s.current=null,h.replaceChildren();return}const E=s.current;if(E&&E.isConnected)try{E.props=t;return}catch(b){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error during props update:`,b),m(),s.current=null,h.replaceChildren();return}try{const b=document.createElement(e);b.props=t,h.replaceChildren(b);const T=b.localName;s.current=typeof customElements!="undefined"&&customElements.get(T)?b:null}catch(b){kt(!0,"error",`[CimulateOverrides] ${n||"Override"} threw an error:`,b),m(),s.current=null,h.replaceChildren()}},[e,t,n]),k.useEffect(()=>{const h=i.current;return()=>{s.current=null,h==null||h.replaceChildren()}},[]),w.jsx("div",{ref:i,"data-override":n||"custom"})}class id extends k.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){var r,i,s;kt(!0,"error",`Override "${this.props.overrideName}" threw during render:`,t,n.componentStack),(r=this.context)==null||r.failure("override_render_error",{context:{override:this.props.overrideName}}),(s=(i=this.props).onError)==null||s.call(i)}render(){return this.state.hasError?null:this.props.children}}We(id,"contextType",Mc);const Rr=()=>k.useContext(T1),h_=e=>{try{e()}catch(t){}},m_=()=>{const e=k.useContext(Mc);return k.useMemo(()=>({reportFailure:(t,...[n,r])=>h_(()=>e==null?void 0:e.overrideFailure(t,n,r)),reportEvent:(t,...[n,r])=>h_(()=>e==null?void 0:e.overrideEvent(t,n,r))}),[e])},g_=e=>{const t=m_();return k.useMemo(()=>({reportFailure:(n,r)=>t.reportFailure(e,n,r),reportEvent:(n,r)=>t.reportEvent(e,n,r)}),[t,e])},gi=e=>{const{sendMessage:t,loading:n,isConnected:r}=zt(),{mode:i,status:s}=tr(),{reportFailure:u,reportEvent:c}=g_(e);return k.useMemo(()=>({sendMessage:t,isLoading:n,isConnected:r,componentType:s.type,mode:i,reportFailure:u,reportEvent:c}),[t,n,r,s.type,i,u,c])},eB=({componentType:e,availableActions:t,onClose:n,onClearChat:r,onEndConversation:i,onDownloadTranscript:s})=>{const{isModalFullscreen:u,dialogPosition:c,previousComponentType:d}=tr(),{logger:f}=st(),[h,m]=k.useState(!1),E=k.useRef(t);E.current=t;const b=k.useRef(e);b.current=e;const T=k.useRef(n);T.current=n;const _=k.useRef(r);_.current=r;const I=k.useRef(i);I.current=i;const v=k.useRef(s);v.current=s;const S=k.useRef(u);S.current=u;const R=k.useRef(c);R.current=c;const U=k.useRef(d);U.current=d;const B=k.useRef(f);B.current=f;const A=k.useRef(null),G=k.useMemo(()=>{const re=H=>E.current[H];return{close:()=>{var H;re("close")&&((H=T.current)==null||H.call(T))},toggleExpanded:()=>{if(re("toggleExpanded")){if(b.current==="modal"){Es(U.current||"dialog");return}Es("modal")}},toggleFullscreen:H=>{re("toggleFullscreen")&&Rc(typeof H=="boolean"?H:!S.current)},toggleDialogPosition:H=>{if(!re("toggleDialogPosition"))return;let ee;switch(H){case"left":case"bottom-left":ee="bottom-left";break;case"right":case"bottom-right":ee="bottom-right";break;default:ee=R.current==="bottom-left"?"bottom-right":"bottom-left";break}Lc(ee)},minimize:()=>{re("minimize")&&(zr(!1),wo(!0),ol())},clearChat:()=>Ie(null,null,function*(){var H;re("clearChat")&&(yield(H=_.current)==null?void 0:H.call(_))}),endConversation:()=>Ie(null,null,function*(){var H;re("endConversation")&&(yield(H=I.current)==null?void 0:H.call(I))}),downloadTranscript:()=>{if(!re("downloadTranscript"))return Promise.resolve();const H=A.current;if(H)return H;let ee=()=>{};const Q=new Promise(me=>{ee=me});return A.current=Q,Ie(null,null,function*(){var me,V;m(!0);try{yield(me=v.current)==null?void 0:me.call(v)}catch(ue){(V=B.current)==null||V.error("Error downloading transcript:",ue)}finally{m(!1),A.current===Q&&(A.current=null),ee()}}),Q}}},[]),W=k.useMemo(()=>({available:t,isDownloadingTranscript:h,isFullscreen:u,dialogPosition:c}),[t,h,u,c]);return{actions:G,state:W}},y_=()=>{const{overrides:e,isInitialized:t}=Rr(),[n,r]=k.useState(null),i=e.HeaderActions,s=t&&typeof i=="string"&&i.length>0&&i!==n,u=k.useCallback(()=>{typeof i=="string"&&i.length>0&&r(i)},[i]);return{active:s,onError:u}},E_=n=>{var r=n,{onError:e}=r,t=_n(r,["onError"]);const{overrides:i,isInitialized:s}=Rr(),u=i.HeaderActions,{actions:c,state:d}=eB(t),f=gi("HeaderActions"),h=k.useMemo(()=>({name:"HeaderActions",payload:{actions:d},api:ce(M({},f),{actions:c})}),[d,f,c]);return!s||typeof u!="string"||u.length===0?null:w.jsx(id,{overrideName:"HeaderActions",onError:e,children:w.jsx(ri,{tagName:u,props:h,label:"HeaderActions",onError:e})})};function Go(){const{sendMessage:e}=zt(),{productId:t}=Rm(),{enablePageContext:n}=st();return k.useCallback((r,i)=>{var f,h,m;if(n)return e(r,i);const u=((h=(f=r.match(/\[SKU:\s*([^\]]+)\]/i))==null?void 0:f[1])==null?void 0:h.trim())||t,{prompt:c,display:d}=_p(r,u);return e(c,ce(M({},i),{displayContent:(m=i==null?void 0:i.displayContent)!=null?m:d}))},[e,t,n])}function Fm(){const{sendFile:e}=zt(),{productId:t}=Rm();return k.useCallback(n=>{if(!n.file||!t)return e(n);const{prompt:r}=_p(n.text,t);return e(ce(M({},n),{text:r,displayContent:n.text}))},[e,t])}const tB=["Hey there! 👋 Getting things ready for you…","Connecting you to our shopping assistant…","Just a moment…"],nB=3e3,rB=400,Bm=({className:e})=>{const t=k.useId();return w.jsxs("svg",{className:e,viewBox:"0 0 16 16",fill:"none","aria-hidden":"true",children:[w.jsx("defs",{children:w.jsxs("linearGradient",{id:t,x1:"0",y1:"0",x2:"1",y2:"1",children:[w.jsx("stop",{offset:"0",stopColor:"#4f7fce"}),w.jsx("stop",{offset:"1",stopColor:"#c85d94"})]})}),w.jsx("path",{d:"M6.62479 10.3342C6.56527 10.1034 6.44502 9.89289 6.27653 9.72441C6.10805 9.55592 5.8975 9.43567 5.66679 9.37615L1.57679 8.32148C1.50701 8.30168 1.4456 8.25965 1.40186 8.20178C1.35813 8.14391 1.33447 8.07335 1.33447 8.00082C1.33447 7.92828 1.35813 7.85772 1.40186 7.79985C1.4456 7.74198 1.50701 7.69996 1.57679 7.68015L5.66679 6.62482C5.89742 6.56535 6.10792 6.4452 6.27639 6.27684C6.44486 6.10849 6.56517 5.89808 6.62479 5.66748L7.67946 1.57748C7.69906 1.50743 7.74105 1.44571 7.799 1.40175C7.85696 1.35778 7.92771 1.33398 8.00046 1.33398C8.0732 1.33398 8.14395 1.35778 8.20191 1.40175C8.25987 1.44571 8.30185 1.50743 8.32146 1.57748L9.37546 5.66748C9.43497 5.8982 9.55523 6.10875 9.72371 6.27723C9.89219 6.44571 10.1027 6.56597 10.3335 6.62548L14.4235 7.67948C14.4938 7.69888 14.5558 7.74082 14.6 7.79887C14.6442 7.85691 14.6682 7.92786 14.6682 8.00082C14.6682 8.07378 14.6442 8.14472 14.6 8.20277C14.5558 8.26081 14.4938 8.30275 14.4235 8.32215L10.3335 9.37615C10.1027 9.43567 9.89219 9.55592 9.72371 9.72441C9.55523 9.89289 9.43497 10.1034 9.37546 10.3342L8.32079 14.4242C8.30118 14.4942 8.2592 14.5559 8.20124 14.5999C8.14328 14.6439 8.07254 14.6677 7.99979 14.6677C7.92704 14.6677 7.85629 14.6439 7.79834 14.5999C7.74038 14.5559 7.69839 14.4942 7.67879 14.4242L6.62479 10.3342Z",fill:`url(#${t})`,stroke:`url(#${t})`,strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]})},iB=e=>e===null?[]:Array.isArray(e)?e.filter(t=>typeof t=="string"&&t.trim()!==""):tB,oB=({globalClassName:e,isWidgetStandalone:t,messages:n,variant:r="default"})=>{const[i,s]=k.useState(0),[u,c]=k.useState(!0),d=k.useMemo(()=>iB(n),[n]),f=d.length,h=n!==null;return k.useEffect(()=>{if(f<2||!h)return;let m;const E=setInterval(()=>{c(!1),m=setTimeout(()=>{s(b=>(b+1)%f),c(!0)},rB)},nB);return()=>{clearInterval(E),clearTimeout(m),c(!0)}},[f,h]),h?r==="sparkles"?w.jsxs("div",{className:D(e,`${N}-connecting-indicator`,`${N}-connecting-indicator--sparkles`,t?"standalone":"embedded"),role:"status","aria-label":"Loading shopping assistant",children:[w.jsxs("div",{className:`${N}-connecting-sparkles`,"aria-hidden":"true",children:[w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-left`}),w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-main`}),w.jsx(Bm,{className:`${N}-connecting-sparkle sparkle-right`})]}),w.jsx("span",{className:`${N}-connecting-heading`,"aria-hidden":"true",children:"Loading your shopping assistant"}),f>0&&w.jsx("span",{className:D(`${N}-connecting-text`,`${N}-connecting-text--feature`,u&&`${N}-connecting-text--visible`),"aria-hidden":"true",children:d[i%f]})]}):w.jsxs("div",{className:D(e,`${N}-connecting-indicator`,t?"standalone":"embedded"),role:"status","aria-label":"Connecting to assistant",children:[w.jsxs("div",{className:`${N}-connecting-pulse-wrapper`,"aria-hidden":"true",children:[w.jsx("div",{className:`${N}-connecting-pulse`}),w.jsx("div",{className:`${N}-connecting-ring`})]}),f>0&&w.jsx("span",{className:D(`${N}-connecting-text`,u&&`${N}-connecting-text--visible`),"aria-hidden":"true",children:d[i%f]})]}):null},sB=({shouldShow:e,loadingText:t})=>e?w.jsx("span",{className:`${N}-processing-text`,"aria-hidden":"true",children:t}):null,aB=({shouldShow:e})=>e?w.jsxs(w.Fragment,{children:[w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"}),w.jsx("div",{className:`${N}-processing-shimmer-bar`,"aria-hidden":"true"})]}):null,Um=({globalClassName:e,isWidgetStandalone:t,loadingText:n})=>w.jsxs("div",{className:D(e,`${N}-processing-indicator`,t?"standalone":"embedded"),role:"status","aria-label":n||"Loading response",children:[w.jsx(sB,{shouldShow:!!n,loadingText:n}),w.jsx(aB,{shouldShow:!n})]}),uB="(max-width: 576px)";function cB(e){return e?!e.defaultPrevented&&e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey:!0}function lB({event:e,openLinksInNewTab:t,isCartMgmtSupported:n=!1}={}){n||t||cB(e)&&typeof window!="undefined"&&window.matchMedia(uB).matches&&(wo(!0),ek())}function dB(e){return e.button===0&&!e.metaKey&&!e.ctrlKey&&!e.shiftKey&&!e.altKey}function fB(e){if(typeof window=="undefined")return!1;try{return new URL(e,window.location.href).origin===window.location.origin}catch(t){return!1}}function qi({event:e,href:t,openLinksInNewTab:n,onNavigate:r}){if(!r||n||!dB(e)||e.defaultPrevented)return;const i=t||e.currentTarget.href;!i||!fB(i)||r(i,e)}function Ru(n){var r=n,{isCartMgmtSupported:e}=r,t=_n(r,["isCartMgmtSupported"]);lB({event:t.event.nativeEvent,openLinksInNewTab:t.openLinksInNewTab,isCartMgmtSupported:e}),qi(t)}function b_(e,t){const n=String(e);if(typeof t!="string")throw new TypeError("Expected character");let r=0,i=n.indexOf(t);for(;i!==-1;)r++,i=n.indexOf(t,i+t.length);return r}function pB(e){if(typeof e!="string")throw new TypeError("Expected a string");return e.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}function hB(e,t,n){const i=El((n||{}).ignore||[]),s=mB(t);let u=-1;for(;++u<s.length;)Zb(e,"text",c);function c(f,h){let m=-1,E;for(;++m<h.length;){const b=h[m],T=E?E.children:void 0;if(i(b,T?T.indexOf(b):void 0,E))return;E=b}if(E)return d(f,h)}function d(f,h){const m=h[h.length-1],E=s[u][0],b=s[u][1];let T=0;const I=m.children.indexOf(f);let v=!1,S=[];E.lastIndex=0;let R=E.exec(f.value);for(;R;){const U=R.index,B={index:R.index,input:R.input,stack:[...h,f]};let A=b(...R,B);if(typeof A=="string"&&(A=A.length>0?{type:"text",value:A}:void 0),A===!1?E.lastIndex=U+1:(T!==U&&S.push({type:"text",value:f.value.slice(T,U)}),Array.isArray(A)?S.push(...A):A&&S.push(A),T=U+R[0].length,v=!0),!E.global)break;R=E.exec(f.value)}return v?(T<f.value.length&&S.push({type:"text",value:f.value.slice(T)}),m.children.splice(I,1,...S)):S=[f],I+S.length}}function mB(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 i=n[r];t.push([gB(i[0]),yB(i[1])])}return t}function gB(e){return typeof e=="string"?new RegExp(pB(e),"g"):e}function yB(e){return typeof e=="function"?e:function(){return e}}const jm="phrasing",Hm=["autolink","link","image","label"];function EB(){return{transforms:[SB],enter:{literalAutolink:wB,literalAutolinkEmail:$m,literalAutolinkHttp:$m,literalAutolinkWww:$m},exit:{literalAutolink:vB,literalAutolinkEmail:_B,literalAutolinkHttp:xB,literalAutolinkWww:TB}}}function bB(){return{unsafe:[{character:"@",before:"[+\\-.\\w]",after:"[\\-.\\w]",inConstruct:jm,notInConstruct:Hm},{character:".",before:"[Ww]",after:"[\\-.\\w]",inConstruct:jm,notInConstruct:Hm},{character:":",before:"[ps]",after:"\\/",inConstruct:jm,notInConstruct:Hm}]}}function wB(e){this.enter({type:"link",title:null,url:"",children:[]},e)}function $m(e){this.config.enter.autolinkProtocol.call(this,e)}function xB(e){this.config.exit.autolinkProtocol.call(this,e)}function TB(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 _B(e){this.config.exit.autolinkEmail.call(this,e)}function vB(e){this.exit(e)}function SB(e){hB(e,[[/(https?:\/\/|www(?=\.))([-.\w]+)([^ \t\r\n]*)/gi,AB],[new RegExp("(?<=^|\\s|\\p{P}|\\p{S})([-.\\w+]+)@([-\\w]+(?:\\.[-\\w]+)+)","gu"),kB]],{ignore:["link","linkReference"]})}function AB(e,t,n,r,i){let s="";if(!w_(i)||(/^w/i.test(t)&&(n=t+n,t="",s="http://"),!CB(n)))return!1;const u=NB(n+r);if(!u[0])return!1;const c={type:"link",title:null,url:s+t+u[0],children:[{type:"text",value:t+u[0]}]};return u[1]?[c,{type:"text",value:u[1]}]:c}function kB(e,t,n,r){return!w_(r,!0)||/[-\d_]$/.test(n)?!1:{type:"link",title:null,url:"mailto:"+t+"@"+n,children:[{type:"text",value:t+"@"+n}]}}function CB(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 NB(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 i=b_(e,"(");let s=b_(e,")");for(;r!==-1&&i>s;)e+=n.slice(0,r+1),n=n.slice(r+1),r=n.indexOf(")"),s++;return[e,n]}function w_(e,t){const n=e.input.charCodeAt(e.index-1);return(e.index===0||Po(n)||dl(n))&&(!t||n!==47)}x_.peek=BB;function IB(){this.buffer()}function OB(e){this.enter({type:"footnoteReference",identifier:"",label:""},e)}function PB(){this.buffer()}function RB(e){this.enter({type:"footnoteDefinition",identifier:"",label:"",children:[]},e)}function LB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function DB(e){this.exit(e)}function MB(e){const t=this.resume(),n=this.stack[this.stack.length-1];n.type,n.identifier=Cr(this.sliceSerialize(e)).toLowerCase(),n.label=t}function FB(e){this.exit(e)}function BB(){return"["}function x_(e,t,n,r){const i=n.createTracker(r);let s=i.move("[^");const u=n.enter("footnoteReference"),c=n.enter("reference");return s+=i.move(n.safe(n.associationId(e),{after:"]",before:s})),c(),u(),s+=i.move("]"),s}function UB(){return{enter:{gfmFootnoteCallString:IB,gfmFootnoteCall:OB,gfmFootnoteDefinitionLabelString:PB,gfmFootnoteDefinition:RB},exit:{gfmFootnoteCallString:LB,gfmFootnoteCall:DB,gfmFootnoteDefinitionLabelString:MB,gfmFootnoteDefinition:FB}}}function jB(e){let t=!1;return e&&e.firstLineBlank&&(t=!0),{handlers:{footnoteDefinition:n,footnoteReference:x_},unsafe:[{character:"[",inConstruct:["label","phrasing","reference"]}]};function n(r,i,s,u){const c=s.createTracker(u);let d=c.move("[^");const f=s.enter("footnoteDefinition"),h=s.enter("label");return d+=c.move(s.safe(s.associationId(r),{before:d,after:"]"})),h(),d+=c.move("]:"),r.children&&r.children.length>0&&(c.shift(4),d+=c.move((t?`
38
+ `:" ")+s.indentLines(s.containerFlow(r,c.current()),t?T_:HB))),f(),d}}function HB(e,t,n){return t===0?e:T_(e,t,n)}function T_(e,t,n){return(n?"":" ")+e}const $B=["autolink","destinationLiteral","destinationRaw","reference","titleQuote","titleApostrophe"];__.peek=YB;function zB(){return{canContainEols:["delete"],enter:{strikethrough:qB},exit:{strikethrough:WB}}}function VB(){return{unsafe:[{character:"~",inConstruct:"phrasing",notInConstruct:$B}],handlers:{delete:__}}}function qB(e){this.enter({type:"delete",children:[]},e)}function WB(e){this.exit(e)}function __(e,t,n,r){const i=n.createTracker(r),s=n.enter("strikethrough");let u=i.move("~~");return u+=n.containerPhrasing(e,ce(M({},i.current()),{before:u,after:"~"})),u+=i.move("~~"),s(),u}function YB(){return"~"}function GB(e){return e.length}function XB(e,t){const n=t||{},r=(n.align||[]).concat(),i=n.stringLength||GB,s=[],u=[],c=[],d=[];let f=0,h=-1;for(;++h<e.length;){const _=[],I=[];let v=-1;for(e[h].length>f&&(f=e[h].length);++v<e[h].length;){const S=KB(e[h][v]);if(n.alignDelimiters!==!1){const R=i(S);I[v]=R,(d[v]===void 0||R>d[v])&&(d[v]=R)}_.push(S)}u[h]=_,c[h]=I}let m=-1;if(typeof r=="object"&&"length"in r)for(;++m<f;)s[m]=v_(r[m]);else{const _=v_(r);for(;++m<f;)s[m]=_}m=-1;const E=[],b=[];for(;++m<f;){const _=s[m];let I="",v="";_===99?(I=":",v=":"):_===108?I=":":_===114&&(v=":");let S=n.alignDelimiters===!1?1:Math.max(1,d[m]-I.length-v.length);const R=I+"-".repeat(S)+v;n.alignDelimiters!==!1&&(S=I.length+S+v.length,S>d[m]&&(d[m]=S),b[m]=S),E[m]=R}u.splice(1,0,E),c.splice(1,0,b),h=-1;const T=[];for(;++h<u.length;){const _=u[h],I=c[h];m=-1;const v=[];for(;++m<f;){const S=_[m]||"";let R="",U="";if(n.alignDelimiters!==!1){const B=d[m]-(I[m]||0),A=s[m];A===114?R=" ".repeat(B):A===99?B%2?(R=" ".repeat(B/2+.5),U=" ".repeat(B/2-.5)):(R=" ".repeat(B/2),U=R):U=" ".repeat(B)}n.delimiterStart!==!1&&!m&&v.push("|"),n.padding!==!1&&!(n.alignDelimiters===!1&&S==="")&&(n.delimiterStart!==!1||m)&&v.push(" "),n.alignDelimiters!==!1&&v.push(R),v.push(S),n.alignDelimiters!==!1&&v.push(U),n.padding!==!1&&v.push(" "),(n.delimiterEnd!==!1||m!==f-1)&&v.push("|")}T.push(n.delimiterEnd===!1?v.join("").replace(/ +$/,""):v.join(""))}return T.join(`
39
+ `)}function KB(e){return e==null?"":String(e)}function v_(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 QB(e,t,n,r){const i=n.enter("blockquote"),s=n.createTracker(r);s.move("> "),s.shift(2);const u=n.indentLines(n.containerFlow(e,s.current()),JB);return i(),u}function JB(e,t,n){return">"+(n?"":" ")+e}function ZB(e,t){return S_(e,t.inConstruct,!0)&&!S_(e,t.notInConstruct,!1)}function S_(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 A_(e,t,n,r){let i=-1;for(;++i<n.unsafe.length;)if(n.unsafe[i].character===`
40
+ `&&ZB(n.stack,n.unsafe[i]))return/[ \t]/.test(r.before)?"":" ";return`\\
41
+ `}function eU(e,t){const n=String(e);let r=n.indexOf(t),i=r,s=0,u=0;if(typeof t!="string")throw new TypeError("Expected substring");for(;r!==-1;)r===i?++s>u&&(u=s):s=1,i=r+t.length,r=n.indexOf(t,i);return u}function tU(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 nU(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 rU(e,t,n,r){const i=nU(n),s=e.value||"",u=i==="`"?"GraveAccent":"Tilde";if(tU(e,n)){const m=n.enter("codeIndented"),E=n.indentLines(s,iU);return m(),E}const c=n.createTracker(r),d=i.repeat(Math.max(eU(s,i)+1,3)),f=n.enter("codeFenced");let h=c.move(d);if(e.lang){const m=n.enter(`codeFencedLang${u}`);h+=c.move(n.safe(e.lang,M({before:h,after:" ",encode:["`"]},c.current()))),m()}if(e.lang&&e.meta){const m=n.enter(`codeFencedMeta${u}`);h+=c.move(" "),h+=c.move(n.safe(e.meta,M({before:h,after:`
42
42
  `,encode:["`"]},c.current()))),m()}return h+=c.move(`
43
43
  `),s&&(h+=c.move(s+`
44
- `)),h+=c.move(d),f(),h}function oU(e,t,n){return(n?"":" ")+e}function zm(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 sU(e,t,n,r){const i=zm(n),s=i==='"'?"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),M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":`
45
- `},d.current())))),c(),e.title&&(c=n.enter(`title${s}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,M({before:f,after:i},d.current()))),f+=d.move(i),c()),u(),f}function aU(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 Lu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function od(e,t,n){const r=Rs(e),i=Rs(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}k_.peek=uU;function k_(e,t,n,r){const i=aU(n),s=n.enter("emphasis"),u=n.createTracker(r),c=u.move(i);let d=u.move(n.containerPhrasing(e,M({after:i,before:c},u.current())));const f=d.charCodeAt(0),h=od(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(d=Lu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),E=od(r.after.charCodeAt(0),m,i);E.inside&&(d=d.slice(0,-1)+Lu(m));const b=u.move(i);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:h.outside},c+d+b}function uU(e,t,n){return n.options.emphasis||"*"}function cU(e,t){let n=!1;return wl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,lh}),!!((!e.depth||e.depth<3)&&Zp(e)&&(t.options.setext||n))}function lU(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(cU(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),E=n.containerPhrasing(e,ce(M({},s.current()),{before:`
44
+ `)),h+=c.move(d),f(),h}function iU(e,t,n){return(n?"":" ")+e}function zm(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 oU(e,t,n,r){const i=zm(n),s=i==='"'?"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),M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":`
45
+ `},d.current())))),c(),e.title&&(c=n.enter(`title${s}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,M({before:f,after:i},d.current()))),f+=d.move(i),c()),u(),f}function sU(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 Lu(e){return"&#x"+e.toString(16).toUpperCase()+";"}function od(e,t,n){const r=Rs(e),i=Rs(t);return r===void 0?i===void 0?n==="_"?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!0}:r===1?i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!0}:{inside:!1,outside:!1}:i===void 0?{inside:!1,outside:!1}:i===1?{inside:!0,outside:!1}:{inside:!1,outside:!1}}k_.peek=aU;function k_(e,t,n,r){const i=sU(n),s=n.enter("emphasis"),u=n.createTracker(r),c=u.move(i);let d=u.move(n.containerPhrasing(e,M({after:i,before:c},u.current())));const f=d.charCodeAt(0),h=od(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(d=Lu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),E=od(r.after.charCodeAt(0),m,i);E.inside&&(d=d.slice(0,-1)+Lu(m));const b=u.move(i);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:h.outside},c+d+b}function aU(e,t,n){return n.options.emphasis||"*"}function uU(e,t){let n=!1;return wl(e,function(r){if("value"in r&&/\r?\n|\r/.test(r.value)||r.type==="break")return n=!0,lh}),!!((!e.depth||e.depth<3)&&Zp(e)&&(t.options.setext||n))}function cU(e,t,n,r){const i=Math.max(Math.min(6,e.depth||1),1),s=n.createTracker(r);if(uU(e,n)){const h=n.enter("headingSetext"),m=n.enter("phrasing"),E=n.containerPhrasing(e,ce(M({},s.current()),{before:`
46
46
  `,after:`
47
47
  `}));return m(),h(),E+`
48
48
  `+(i===1?"=":"-").repeat(E.length-(Math.max(E.lastIndexOf("\r"),E.lastIndexOf(`
49
49
  `))+1))}const u="#".repeat(i),c=n.enter("headingAtx"),d=n.enter("phrasing");s.move(u+" ");let f=n.containerPhrasing(e,M({before:"# ",after:`
50
- `},s.current()));return/^[\t ]/.test(f)&&(f=Lu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}C_.peek=dU;function C_(e){return e.value||""}function dU(){return"<"}N_.peek=fU;function N_(e,t,n,r){const i=zm(n),s=i==='"'?"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,M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${s}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,M({before:f,after:i},d.current()))),f+=d.move(i),c()),f+=d.move(")"),u(),f}function fU(){return"!"}I_.peek=pU;function I_(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const h=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=h,s(),i==="full"||!f||f!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function pU(){return"!"}O_.peek=hU;function O_(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const u=n.unsafe[s],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 i+r+i}function hU(){return"`"}function P_(e,t){const n=Zp(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))}R_.peek=mU;function R_(e,t,n,r){const i=zm(n),s=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(P_(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,M({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,M({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,M({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${s}`),f+=u.move(" "+i),f+=u.move(n.safe(e.title,M({before:f,after:i},u.current()))),f+=u.move(i),d()),f+=u.move(")"),c(),f}function mU(e,t,n){return P_(e,n)?"<":"["}L_.peek=gU;function L_(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const h=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=h,s(),i==="full"||!f||f!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function gU(){return"["}function Vm(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 yU(e){const t=Vm(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 EU(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 D_(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 bU(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let u=e.ordered?EU(n):Vm(n);const c=e.ordered?u==="."?")":".":yU(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&h&&(!h.children||!h.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),D_(n)===u&&h){let m=-1;for(;++m<e.children.length;){const E=e.children[m];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.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=s,i(),f}function wU(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 xU(e,t,n,r){const i=wU(n);let s=n.bulletCurrent||Vm(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let u=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(u-s.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,E,b){return E?(b?"":" ".repeat(u))+m:(b?s:s+" ".repeat(u-s.length))+m}}function TU(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),u=n.containerPhrasing(e,r);return s(),i(),u}const _U=El(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function vU(e,t,n,r){return(e.children.some(function(u){return _U(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function SU(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}M_.peek=AU;function M_(e,t,n,r){const i=SU(n),s=n.enter("strong"),u=n.createTracker(r),c=u.move(i+i);let d=u.move(n.containerPhrasing(e,M({after:i,before:c},u.current())));const f=d.charCodeAt(0),h=od(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(d=Lu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),E=od(r.after.charCodeAt(0),m,i);E.inside&&(d=d.slice(0,-1)+Lu(m));const b=u.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:h.outside},c+d+b}function AU(e,t,n){return n.options.strong||"*"}function kU(e,t,n,r){return n.safe(e.value,r)}function CU(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 NU(e,t,n){const r=(D_(n)+(n.options.ruleSpaces?" ":"")).repeat(CU(n));return n.options.ruleSpaces?r.slice(0,-1):r}const F_={blockquote:JB,break:A_,code:iU,definition:sU,emphasis:k_,hardBreak:A_,heading:lU,html:C_,image:N_,imageReference:I_,inlineCode:O_,link:R_,linkReference:L_,list:bU,listItem:xU,paragraph:TU,root:vU,strong:M_,text:kU,thematicBreak:NU};function IU(){return{enter:{table:OU,tableData:B_,tableHeader:B_,tableRow:RU},exit:{codeText:LU,table:PU,tableData:qm,tableHeader:qm,tableRow:qm}}}function OU(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 PU(e){this.exit(e),this.data.inTable=void 0}function RU(e){this.enter({type:"tableRow",children:[]},e)}function qm(e){this.exit(e)}function B_(e){this.enter({type:"tableCell",children:[]},e)}function LU(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,DU));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function DU(e,t){return t==="|"?t:e}function MU(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
50
+ `},s.current()));return/^[\t ]/.test(f)&&(f=Lu(f.charCodeAt(0))+f.slice(1)),f=f?u+" "+f:u,n.options.closeAtx&&(f+=" "+u),d(),c(),f}C_.peek=lU;function C_(e){return e.value||""}function lU(){return"<"}N_.peek=dU;function N_(e,t,n,r){const i=zm(n),s=i==='"'?"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,M({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,M({before:f,after:">"},d.current()))),f+=d.move(">")):(c=n.enter("destinationRaw"),f+=d.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},d.current())))),c(),e.title&&(c=n.enter(`title${s}`),f+=d.move(" "+i),f+=d.move(n.safe(e.title,M({before:f,after:i},d.current()))),f+=d.move(i),c()),f+=d.move(")"),u(),f}function dU(){return"!"}I_.peek=fU;function I_(e,t,n,r){const i=e.referenceType,s=n.enter("imageReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("![");const f=n.safe(e.alt,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const h=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=h,s(),i==="full"||!f||f!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function fU(){return"!"}O_.peek=pU;function O_(e,t,n){let r=e.value||"",i="`",s=-1;for(;new RegExp("(^|[^`])"+i+"([^`]|$)").test(r);)i+="`";for(/[^ \r\n]/.test(r)&&(/^[ \r\n]/.test(r)&&/[ \r\n]$/.test(r)||/^`|`$/.test(r))&&(r=" "+r+" ");++s<n.unsafe.length;){const u=n.unsafe[s],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 i+r+i}function pU(){return"`"}function P_(e,t){const n=Zp(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))}R_.peek=hU;function R_(e,t,n,r){const i=zm(n),s=i==='"'?"Quote":"Apostrophe",u=n.createTracker(r);let c,d;if(P_(e,n)){const h=n.stack;n.stack=[],c=n.enter("autolink");let m=u.move("<");return m+=u.move(n.containerPhrasing(e,M({before:m,after:">"},u.current()))),m+=u.move(">"),c(),n.stack=h,m}c=n.enter("link"),d=n.enter("label");let f=u.move("[");return f+=u.move(n.containerPhrasing(e,M({before:f,after:"]("},u.current()))),f+=u.move("]("),d(),!e.url&&e.title||/[\0- \u007F]/.test(e.url)?(d=n.enter("destinationLiteral"),f+=u.move("<"),f+=u.move(n.safe(e.url,M({before:f,after:">"},u.current()))),f+=u.move(">")):(d=n.enter("destinationRaw"),f+=u.move(n.safe(e.url,M({before:f,after:e.title?" ":")"},u.current())))),d(),e.title&&(d=n.enter(`title${s}`),f+=u.move(" "+i),f+=u.move(n.safe(e.title,M({before:f,after:i},u.current()))),f+=u.move(i),d()),f+=u.move(")"),c(),f}function hU(e,t,n){return P_(e,n)?"<":"["}L_.peek=mU;function L_(e,t,n,r){const i=e.referenceType,s=n.enter("linkReference");let u=n.enter("label");const c=n.createTracker(r);let d=c.move("[");const f=n.containerPhrasing(e,M({before:d,after:"]"},c.current()));d+=c.move(f+"]["),u();const h=n.stack;n.stack=[],u=n.enter("reference");const m=n.safe(n.associationId(e),M({before:d,after:"]"},c.current()));return u(),n.stack=h,s(),i==="full"||!f||f!==m?d+=c.move(m+"]"):i==="shortcut"?d=d.slice(0,-1):d+=c.move("]"),d}function mU(){return"["}function Vm(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 gU(e){const t=Vm(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 yU(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 D_(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 EU(e,t,n,r){const i=n.enter("list"),s=n.bulletCurrent;let u=e.ordered?yU(n):Vm(n);const c=e.ordered?u==="."?")":".":gU(n);let d=t&&n.bulletLastUsed?u===n.bulletLastUsed:!1;if(!e.ordered){const h=e.children?e.children[0]:void 0;if((u==="*"||u==="-")&&h&&(!h.children||!h.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),D_(n)===u&&h){let m=-1;for(;++m<e.children.length;){const E=e.children[m];if(E&&E.type==="listItem"&&E.children&&E.children[0]&&E.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=s,i(),f}function bU(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 wU(e,t,n,r){const i=bU(n);let s=n.bulletCurrent||Vm(n);t&&t.type==="list"&&t.ordered&&(s=(typeof t.start=="number"&&t.start>-1?t.start:1)+(n.options.incrementListMarker===!1?0:t.children.indexOf(e))+s);let u=s.length+1;(i==="tab"||i==="mixed"&&(t&&t.type==="list"&&t.spread||e.spread))&&(u=Math.ceil(u/4)*4);const c=n.createTracker(r);c.move(s+" ".repeat(u-s.length)),c.shift(u);const d=n.enter("listItem"),f=n.indentLines(n.containerFlow(e,c.current()),h);return d(),f;function h(m,E,b){return E?(b?"":" ".repeat(u))+m:(b?s:s+" ".repeat(u-s.length))+m}}function xU(e,t,n,r){const i=n.enter("paragraph"),s=n.enter("phrasing"),u=n.containerPhrasing(e,r);return s(),i(),u}const TU=El(["break","delete","emphasis","footnote","footnoteReference","image","imageReference","inlineCode","inlineMath","link","linkReference","mdxJsxTextElement","mdxTextExpression","strong","text","textDirective"]);function _U(e,t,n,r){return(e.children.some(function(u){return TU(u)})?n.containerPhrasing:n.containerFlow).call(n,e,r)}function vU(e){const t=e.options.strong||"*";if(t!=="*"&&t!=="_")throw new Error("Cannot serialize strong with `"+t+"` for `options.strong`, expected `*`, or `_`");return t}M_.peek=SU;function M_(e,t,n,r){const i=vU(n),s=n.enter("strong"),u=n.createTracker(r),c=u.move(i+i);let d=u.move(n.containerPhrasing(e,M({after:i,before:c},u.current())));const f=d.charCodeAt(0),h=od(r.before.charCodeAt(r.before.length-1),f,i);h.inside&&(d=Lu(f)+d.slice(1));const m=d.charCodeAt(d.length-1),E=od(r.after.charCodeAt(0),m,i);E.inside&&(d=d.slice(0,-1)+Lu(m));const b=u.move(i+i);return s(),n.attentionEncodeSurroundingInfo={after:E.outside,before:h.outside},c+d+b}function SU(e,t,n){return n.options.strong||"*"}function AU(e,t,n,r){return n.safe(e.value,r)}function kU(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 CU(e,t,n){const r=(D_(n)+(n.options.ruleSpaces?" ":"")).repeat(kU(n));return n.options.ruleSpaces?r.slice(0,-1):r}const F_={blockquote:QB,break:A_,code:rU,definition:oU,emphasis:k_,hardBreak:A_,heading:cU,html:C_,image:N_,imageReference:I_,inlineCode:O_,link:R_,linkReference:L_,list:EU,listItem:wU,paragraph:xU,root:_U,strong:M_,text:AU,thematicBreak:CU};function NU(){return{enter:{table:IU,tableData:B_,tableHeader:B_,tableRow:PU},exit:{codeText:RU,table:OU,tableData:qm,tableHeader:qm,tableRow:qm}}}function IU(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 OU(e){this.exit(e),this.data.inTable=void 0}function PU(e){this.enter({type:"tableRow",children:[]},e)}function qm(e){this.exit(e)}function B_(e){this.enter({type:"tableCell",children:[]},e)}function RU(e){let t=this.resume();this.data.inTable&&(t=t.replace(/\\([\\|])/g,LU));const n=this.stack[this.stack.length-1];n.type,n.value=t,this.exit(e)}function LU(e,t){return t==="|"?t:e}function DU(e){const t=e||{},n=t.tableCellPadding,r=t.tablePipeAlign,i=t.stringLength,s=n?" ":"|";return{unsafe:[{character:"\r",inConstruct:"tableCell"},{character:`
51
51
  `,inConstruct:"tableCell"},{atBreak:!0,character:"|",after:"[ :-]"},{character:"|",inConstruct:"tableCell"},{atBreak:!0,character:":",after:"-"},{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{inlineCode:E,table:u,tableCell:d,tableRow:c}};function u(b,T,_,I){return f(h(b,_,I),b.align)}function c(b,T,_,I){const v=m(b,_,I),S=f([v]);return S.slice(0,S.indexOf(`
52
- `))}function d(b,T,_,I){const v=_.enter("tableCell"),S=_.enter("phrasing"),R=_.containerPhrasing(b,ce(M({},I),{before:s,after:s}));return S(),v(),R}function f(b,T){return KB(b,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function h(b,T,_){const I=b.children;let v=-1;const S=[],R=T.enter("table");for(;++v<I.length;)S[v]=m(I[v],T,_);return R(),S}function m(b,T,_){const I=b.children;let v=-1;const S=[],R=T.enter("tableRow");for(;++v<I.length;)S[v]=d(I[v],b,T,_);return R(),S}function E(b,T,_){let I=F_.inlineCode(b,T,_);return _.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function FU(){return{exit:{taskListCheckValueChecked:U_,taskListCheckValueUnchecked:U_,paragraph:UU}}}function BU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:jU}}}function U_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function UU(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 i=t.children;let s=-1,u;for(;++s<i.length;){const c=i[s];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 jU(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(u);let d=F_.listItem(e,t,n,M(M({},r),c.current()));return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+u}}function HU(){return[bB(),jB(),VB(),IU(),FU()]}function $U(e){return{extensions:[wB(),HB(e),qB(),MU(e),BU()]}}const zU={tokenize:XU,partial:!0},j_={tokenize:KU,partial:!0},H_={tokenize:QU,partial:!0},$_={tokenize:JU,partial:!0},VU={tokenize:ZU,partial:!0},z_={name:"wwwAutolink",tokenize:YU,previous:q_},V_={name:"protocolAutolink",tokenize:GU,previous:W_},yi={name:"emailAutolink",tokenize:WU,previous:Y_},ii={};function qU(){return{text:ii}}let Xo=48;for(;Xo<123;)ii[Xo]=yi,Xo++,Xo===58?Xo=65:Xo===91&&(Xo=97);ii[43]=yi,ii[45]=yi,ii[46]=yi,ii[95]=yi,ii[72]=[yi,V_],ii[104]=[yi,V_],ii[87]=[yi,z_],ii[119]=[yi,z_];function WU(e,t,n){const r=this;let i,s;return u;function u(m){return!Wm(m)||!Y_.call(r,r.previous)||Ym(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Wm(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(VU,h,f)(m):m===45||m===95||kn(m)?(s=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),i=!0,d}function h(m){return s&&i&&Dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function YU(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!q_.call(r,r.previous)||Ym(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check(zU,e.attempt(j_,e.attempt(H_,s),n),n)(u))}function s(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function GU(e,t,n){const r=this;let i="",s=!1;return u;function u(m){return(m===72||m===104)&&W_.call(r,r.previous)&&!Ym(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Dn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const E=i.toLowerCase();if(E==="http"||E==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),s?f:(s=!0,d)):n(m)}function f(m){return m===null||ll(m)||Nt(m)||Po(m)||dl(m)?n(m):e.attempt(j_,e.attempt(H_,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function XU(e,t,n){let r=0;return i;function i(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),i):u===46&&r===3?(e.consume(u),s):n(u)}function s(u){return u===null?n(u):t(u)}}function KU(e,t,n){let r,i,s;return u;function u(f){return f===46||f===95?e.check($_,d,c)(f):f===null||Nt(f)||Po(f)||f!==45&&dl(f)?d(f):(s=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),u}function d(f){return i||r||!s?n(f):t(f)}}function QU(e,t){let n=0,r=0;return i;function i(u){return u===40?(n++,e.consume(u),i):u===41&&r<n?s(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($_,t,s)(u):u===null||Nt(u)||Po(u)?t(u):(e.consume(u),i)}function s(u){return u===41&&r++,e.consume(u),i}}function JU(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),s):c===93?(e.consume(c),i):c===60||c===null||Nt(c)||Po(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Nt(c)||Po(c)?t(c):r(c)}function s(c){return Dn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):Dn(c)?(e.consume(c),u):n(c)}}function ZU(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kn(s)?n(s):t(s)}}function q_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Nt(e)}function W_(e){return!Dn(e)}function Y_(e){return!(e===47||Wm(e))}function Wm(e){return e===43||e===45||e===46||e===95||kn(e)}function Ym(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 ej={tokenize:uj,partial:!0};function tj(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:oj,continuation:{tokenize:sj},exit:aj}},text:{91:{name:"gfmFootnoteCall",tokenize:ij},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:nj,resolveTo:rj}}}}function nj(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;i--;){const d=r.events[i][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=Cr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!s.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function rj(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",u,t],["exit",u,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function ij(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=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(s>999||m===93&&!u||m===null||m===91||Nt(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return i.includes(Cr(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Nt(m)||(u=!0),s++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function oj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,u=0,c;return d;function d(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(T)}function h(T){if(u>999||T===93&&!c||T===null||T===91||Nt(T))return n(T);if(T===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Cr(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return Nt(T)||(c=!0),u++,e.consume(T),T===92?m:h}function m(T){return T===91||T===92||T===93?(e.consume(T),u++,h):h(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(s)||i.push(s),Et(e,b,"gfmFootnoteDefinitionWhitespace")):n(T)}function b(T){return t(T)}}function sj(e,t,n){return e.check(ou,t,e.attempt(ej,t,n))}function aj(e){e.exit("gfmFootnoteDefinition")}function uj(e,t,n){const r=this;return Et(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(s):n(s)}}function cj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(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 h={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)},E=[["enter",h,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],b=c.parser.constructs.insideSpan.null;b&&ir(E,E.length,0,fl(b,u.slice(f+1,d),c)),ir(E,E.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",h,c]]),ir(u,f-1,d-f+3,E),d=f+E.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function s(u,c,d){const f=this.previous,h=this.events;let m=0;return E;function E(T){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(T):(u.enter("strikethroughSequenceTemporary"),b(T))}function b(T){const _=Rs(f);if(T===126)return m>1?d(T):(u.consume(T),m++,b);if(m<2&&!n)return d(T);const I=u.exit("strikethroughSequenceTemporary"),v=Rs(T);return I._open=!v||v===2&&!!_,I._close=!_||_===2&&!!v,c(T)}}}class lj{constructor(){this.map=[]}add(t,n,r){dj(this,t,n,r)}consume(t){if(this.map.sort(function(s,u){return s[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 i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function dj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function fj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function pj(){return{flow:{null:{name:"table",tokenize:hj,resolveAll:mj}}}}function hj(e,t,n){const r=this;let i=0,s=0,u;return c;function c(H){let ee=r.events.length-1;for(;ee>-1;){const V=r.events[ee][1].type;if(V==="lineEnding"||V==="linePrefix")ee--;else break}const Q=ee>-1?r.events[ee][1].type:null,me=Q==="tableHead"||Q==="tableRow"?A:d;return me===A&&r.parser.lazy[r.now().line]?n(H):me(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),f(H)}function f(H){return H===124||(u=!0,s+=1),h(H)}function h(H){return H===null?n(H):Ye(H)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),b):n(H):mt(H)?Et(e,h,"whitespace")(H):(s+=1,u&&(u=!1,i+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,h):(e.enter("data"),m(H)))}function m(H){return H===null||H===124||Nt(H)?(e.exit("data"),h(H)):(e.consume(H),H===92?E:m)}function E(H){return H===92||H===124?(e.consume(H),m):m(H)}function b(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),u=!1,mt(H)?Et(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):T(H))}function T(H){return H===45||H===58?I(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),_):B(H)}function _(H){return mt(H)?Et(e,I,"whitespace")(H):I(H)}function I(H){return H===58?(s+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),v):H===45?(s+=1,v(H)):H===null||Ye(H)?U(H):B(H)}function v(H){return H===45?(e.enter("tableDelimiterFiller"),S(H)):B(H)}function S(H){return H===45?(e.consume(H),S):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(H))}function R(H){return mt(H)?Et(e,U,"whitespace")(H):U(H)}function U(H){return H===124?T(H):H===null||Ye(H)?!u||i!==s?B(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):B(H)}function B(H){return n(H)}function A(H){return e.enter("tableRow"),G(H)}function G(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),G):H===null||Ye(H)?(e.exit("tableRow"),t(H)):mt(H)?Et(e,G,"whitespace")(H):(e.enter("data"),W(H))}function W(H){return H===null||H===124||Nt(H)?(e.exit("data"),G(H)):(e.consume(H),H===92?re:W)}function re(H){return H===92||H===124?(e.consume(H),W):W(H)}}function mj(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,h,m;const E=new lj;for(;++n<e.length;){const b=e[n],T=b[1];b[0]==="enter"?T.type==="tableHead"?(c=!1,d!==0&&(G_(E,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",f,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,m=void 0,s=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",h,t]])),i=T.type==="tableDelimiterRow"?2:h?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(s[1]!==0&&(u[0]=u[1],m=sd(E,t,s,i,void 0,m),s=[0,0,0,0]),u[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(u[0]=u[1],m=sd(E,t,s,i,void 0,m)),s=u,u=[s[1],n,0,0])):T.type==="tableHead"?(c=!0,d=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(d=n,s[1]!==0?(u[0]=u[1],m=sd(E,t,s,i,n,m)):u[1]!==0&&(m=sd(E,t,u,i,n,m)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&G_(E,t,d,f,h),E.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=fj(t.events,n))}return e}function sd(e,t,n,r,i,s){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},ia(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=ia(t.events,n[1]);if(s={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const f=ia(t.events,n[2]),h=ia(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const E=t.events[n[2]],b=t.events[n[3]];if(E[1].end=Object.assign({},b[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,_=n[3]-n[2]-1;e.add(T,_,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(s.end=Object.assign({},ia(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function G_(e,t,n,r,i){const s=[],u=ia(t.events,n);i&&(i.end=Object.assign({},u),s.push(["exit",i,t])),r.end=Object.assign({},u),s.push(["exit",r,t]),e.add(n+1,0,s)}function ia(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const gj={name:"tasklistCheck",tokenize:Ej};function yj(){return{text:{91:gj}}}function Ej(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Nt(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 Ye(d)?t(d):mt(d)?e.check({tokenize:bj},t,n)(d):n(d)}}function bj(e,t,n){return Et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function wj(e){return bb([qU(),tj(),cj(e),pj(),yj()])}const xj={};function Tj(e){const t=this,n=e||xj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(wj(n)),s.push(HU()),u.push($U(n))}const _j=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function vj(e){return/^tel:/i.test(e)?e:dw(e)}const oa=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:i})=>w.jsx("div",{className:D(e,`${N}-markdown`),children:w.jsx(lw,{remarkPlugins:[Tj],rehypePlugins:[fx],urlTransform:vj,components:{h1:({children:s})=>w.jsx("h1",{className:D(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:D(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:D(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:D(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:D(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:D(e,`${N}-li`),children:s}),a:({href:s,children:u})=>w.jsx(bx,{globalClassName:e,openLinksInNewTab:t,href:s,onClick:i,children:u}),table:({children:s})=>w.jsx("div",{className:D(e,`${N}-table-container`),children:w.jsx("table",{className:D(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:D(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:D(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:D(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:D(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:D(e,`${N}-td`),children:s}),span:({className:s,children:u})=>s===`${N}-blinking-cursor`?w.jsx(_j,{}):w.jsx("span",{children:u})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")})});function Sj(){const{messages:e}=zt();return k.useMemo(()=>gN(e,"cart"),[e])}function Aj(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const kj=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:i,ariaLabel:s,name:u,showInWidgetDetails:c})=>{const{loading:d}=zt(),{onNavigate:f}=st();return w.jsx("div",{className:D(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:D(t,`${N}-msg-product-card__image-button`),onClick:c,disabled:d,"aria-label":s,children:w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:i?"_blank":"_self",rel:"noopener","aria-label":s,onClick:h=>Ru({event:h,href:r,openLinksInNewTab:i,isCartMgmtSupported:n,onNavigate:f}),children:w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:D(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(Aj,{"aria-hidden":"true"})})})},Cj=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:i,ariaLabel:s,showInWidgetDetails:u})=>{const{loading:c}=zt(),{onNavigate:d}=st();return n?w.jsx("button",{type:"button",disabled:c,onClick:u,className:D(t,`${N}-msg-product-card__title-link`),"aria-label":s,children:e}):r?w.jsx("a",{href:r,target:i?"_blank":"_self",rel:"noopener",className:D(t,`${N}-msg-product-card__title-link`),"aria-label":s,onClick:f=>Ru({event:f,href:r,openLinksInNewTab:i,isCartMgmtSupported:n,onNavigate:d}),children:e}):w.jsx("p",{className:D(t,`${N}-msg-product-card__title`),children:e})},Nj=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:i})=>{const{showProductDescription:s,onNavigate:u}=st(),{overrides:c,isInitialized:d}=Rr(),{loading:f}=zt(),h=Go(),m=gi("ProductTile"),E=d?c.ProductTile:void 0;if(E){const Q={name:"ProductTile",payload:i!=null?i:{},api:m};return w.jsx(ri,{tagName:E,props:Q,label:"ProductTile"})}const{id:b,name:T,imageUrl:_,description:I,productPageUrl:v,price:S,priceBreakdown:R,discountPrice:U,listPrice:B,currencyCode:A}=e,G=U!=null?U:S,W=KF({priceBreakdown:R,currencyCode:A}),re=()=>{if(f)return;const Q=T||"this product",me=b?` [SKU: ${b}]`:"";h(`Show me details for ${Q}${me}`)},H=Q=>qi({event:Q,openLinksInNewTab:n,onNavigate:u}),ee=r?`View details for ${T}`:`Go to product page for ${T}`;return w.jsxs("div",{className:D(t,`${N}-msg-product-card`),children:[w.jsx(kj,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:ee,name:T,showInWidgetDetails:re}),w.jsxs("div",{className:D(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:D(t,`${N}-msg-product-card__content-header`),children:[w.jsx(Cj,{name:T||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:ee,showInWidgetDetails:re}),s&&I&&w.jsx("div",{className:D(t,`${N}-msg-product-card__description`),title:I,children:w.jsx(oa,{globalClassName:t,text:I,openLinksInNewTab:n,onLinkClick:H})})]}),w.jsx("div",{className:D(t,`${N}-msg-product-card__price-row`),children:W?w.jsxs("div",{className:D(t,`${N}-msg-product-card__prices`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:D(t,`${N}-msg-product-card__price`),children:W.active.value}),W.compare&&w.jsxs("span",{className:D(t,`${N}-msg-product-card__compare-price`),children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Original price:"," "]}),W.compare.value]})]}):w.jsx(Mm,{globalClassName:t,retailPrice:B,discountPrice:G,currencyCode:A})})]})]})},Ij=e=>{var n,r,i;const t=Lm(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(i=e.data.priceBreakdown)!=null?i:void 0,currencyCode:e.data.currencyCode}},Oj=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:s=!1})=>{const{showProductCaptions:u,layoutPreset:c}=st(),{overrides:d,isInitialized:f}=Rr(),h=gi("ProductCarousel"),m=f?d.ProductCarousel:void 0;if(m){const E={name:"ProductCarousel",payload:{title:e,products:t},api:h};return w.jsx(ri,{tagName:m,props:E,label:"ProductCarousel"})}return w.jsxs("div",{className:D(n,`${N}-product-carousel`),children:[e&&w.jsx("p",{className:D(n,`${N}-product-carousel-title`),children:e}),w.jsx(hF,{globalClassName:n,spacing:c==="commerce"?"12px":i?"0.5rem":"6px",navigationVariant:c==="commerce"?"circle-arrow":"chevron",ariaLabel:e||"Product recommendations",children:t.map(E=>w.jsxs("div",{className:D(n,`${N}-product-carousel-item`),children:[w.jsx(Nj,{product:Ij(E),rawProduct:E,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s}),u&&w.jsx("p",{className:D(n,`${N}-product-carousel-caption`),title:E.caption,children:E.caption})]},E.id))})]})},Gm=44,Pj=400,Rj=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Gm:Math.min(Math.max(Math.round(t),Gm),Pj)},Lj=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},Dj="parentOrigin",Mj=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(Dj,t),n.toString()}catch(n){return e}},Fj=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},Bj="Payment failed. Please try again or choose another method.",Uj="Payment was canceled.",X_=(e,t)=>typeof e!="string"?t:e.trim()||t,K_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=k.useRef(null),[i,s]=k.useState(!1),[u,c]=k.useState(Gm),[d,f]=k.useState(null),h=typeof window!="undefined"?window.location.origin:"",m=Mj(e,h),E=Lj(e);return k.useEffect(()=>{const b=T=>{var I,v,S,R,U;if(E&&T.origin!==E||r.current&&T.source!==r.current.contentWindow)return;const _=T.data;if(!(!_||typeof _.type!="string"))switch(_.type){case"express.payment.available":s(!0),c(Rj((I=_.payload)==null?void 0:I.height));break;case"express.payment.unavailable":s(!1);break;case"express.payment.success":f(null),n==null||n((S=(v=_.payload)==null?void 0:v.orderId)!=null?S:null);break;case"express.payment.failure":f({text:X_((R=_.payload)==null?void 0:R.error,Bj),persist:!0});break;case"express.payment.cancel":{const B=X_((U=_.payload)==null?void 0:U.cancel,Uj);f(A=>A!=null&&A.persist?A:{text:B,persist:!1});break}}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[E,n]),w.jsxs(w.Fragment,{children:[d&&w.jsxs("div",{className:D(t,`${N}-cart-express-error`),role:"alert","data-testid":"express-payment-error",children:[w.jsx(EO,{"aria-hidden":"true"}),w.jsx("span",{children:d.text}),w.jsx("button",{type:"button",className:D(t,`${N}-cart-express-error-dismiss`),onClick:()=>f(null),"aria-label":"Dismiss","data-testid":"express-payment-error-dismiss",children:w.jsx(xO,{"aria-hidden":"true"})})]}),w.jsx("div",{className:D(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:i}),style:i?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!i,children:w.jsx("iframe",{ref:r,className:D(t,`${N}-cart-express-frame`),src:m,title:"Express payment",allow:"payment *",scrolling:"no"})})]})},ad=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:D(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(BE,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Wn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:i,emphasized:s,isDiscount:u,fallback:c,loading:d})=>{let f;if(typeof n=="number")f=mi(u&&n!==0?-Math.abs(n):n,r);else if(c)f=c;else return null;return w.jsxs("div",{className:D(i,`${N}-cart-total-row`,{emphasized:s}),children:[w.jsx("span",{className:D(i,`${N}-cart-total-label`),children:e}),t&&w.jsx("span",{className:D(i,`${N}-cart-total-badge`),children:t}),w.jsx("span",{className:D(i,`${N}-cart-total-value`),children:d?w.jsx("span",{className:D(i,`${N}-cart-total-shimmer`)}):f})]})};function Q_(e){var s;const n=((s=e.variants)!=null?s:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",i=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${i}`}function J_(e){var r;const n=((r=e.variants)!=null?r:[]).filter(i=>i.value).map(i=>i.value).join(", ");return n?`${e.name} (${n})`:e.name}function Xm(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Km(e){return(e!=null?e:[]).map(Xm).filter(t=>t!==null)}function Z_(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function jj(e,t){var i;const n=new Map;for(const s of t!=null?t:[]){const u=Xm(s),c=Z_(s);u!==null&&c!==void 0&&n.set(u.toLowerCase(),c)}const r=[];for(const s of e!=null?e:[]){const u=Xm(s);if(u===null)continue;const c=(i=Z_(s))!=null?i:n.get(u.toLowerCase());r.push({code:u,applied:c==null||c==="applied"})}return r}function ev(e,t,n){const r=new Set((e!=null?e:[]).flatMap(i=>Km(i.coupons)).map(i=>i.toLowerCase()));return jj(t,n).filter(i=>!r.has(i.code.toLowerCase()))}const tv=(e,t)=>{const{sendMessage:n}=zt();return{removeItem:u=>{if(!e)return n(`Remove ${Q_(u)} from my cart`,M({displayContent:`Remove ${J_(u)} from cart`,cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))},changeItemQuantity:(u,c)=>{if(!(e||c<1))return n(`Update ${Q_(u)} quantity to ${c}`,M({displayContent:`Update ${J_(u)} to qty ${c}`,cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))},applyCoupon:u=>{const c=u.trim();if(!(!c||e))return n(`Apply coupon code ${c}`,M({cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))}}},Hj=e=>{const t=M({},e);return delete t.checkoutButtonUrl,delete t.expressPaymentUrl,t},$j=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const{layoutPreset:i}=st(),[s,u]=k.useState(e),[c,d]=k.useState(e.toString()),[f,h]=k.useState(!1);k.useEffect(()=>{u(e),d(e.toString())},[e]);const m=v=>{if(t||f)return;const S=v.target.value;/^\d*$/.test(S)&&d(S)},E=()=>Ie(null,null,function*(){const v=parseInt(c,10);if(!t&&!f&&!isNaN(v)&&v>0&&v!==s){const S=s;u(v),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}else d(s.toString())}),b=v=>{v.key==="Enter"&&(v.preventDefault(),E())},T=()=>Ie(null,null,function*(){if(t||f)return;const v=Math.max(1,s-1);if(v!==s){const S=s;u(v),d(v.toString()),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}}),_=()=>Ie(null,null,function*(){if(t||f)return;const v=s+1,S=s;u(v),d(v.toString()),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}),I=t||f;return i!=="commerce"?w.jsx("div",{className:D(n,`${N}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:D(n,`${N}-cart-qty-input`),value:c,disabled:I,onChange:m,onBlur:E,onKeyDown:b,"aria-label":"Quantity"})}):w.jsxs("div",{className:D(n,`${N}-cart-qty-selector`,I&&"disabled"),style:{position:"relative"},"aria-busy":f?"true":"false","aria-live":"polite",children:[w.jsx("button",{type:"button",className:D(n,`${N}-cart-qty-btn`),onClick:T,disabled:I||s<=1,"aria-label":"Decrease quantity",children:"−"}),f&&w.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:1,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"24px"},children:w.jsxs("svg",{className:D(n,`${N}-cart-qty-spinner`),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",children:[w.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"var(--cim-widget-border-color, #e4e4e7)",opacity:"0.25"}),w.jsx("path",{d:"M12 2C6.47715 2 2 6.47715 2 12",strokeLinecap:"round"})]})}),w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:D(n,`${N}-cart-qty-input`),value:c,disabled:I,onChange:m,onBlur:E,onKeyDown:b,"aria-label":"Quantity",style:f?{opacity:.2,pointerEvents:"none"}:void 0}),w.jsx("button",{type:"button",className:D(n,`${N}-cart-qty-btn`),onClick:_,disabled:I,"aria-label":"Increase quantity",children:"+"})]})},zj=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:i,onQuantityChange:s})=>{var E,b;const[u,c]=k.useState(!1),d=n||u,f=()=>Ie(null,null,function*(){if(!d){c(!0);try{yield i(e)}finally{c(!1)}}}),h=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,m=Km(e.coupons);return w.jsxs("li",{className:D(r,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:D(r,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:D(r,`${N}-cart-item-details`),children:[w.jsx("p",{className:D(r,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:D(r,`${N}-cart-item-attrs`),children:[((E=e.variants)!=null?E:[]).map(T=>w.jsxs("p",{className:D(r,`${N}-cart-item-attr`),children:[T.lbl,": ",T.value]},`${T.type}-${T.value}`)),((b=e.promotions)!=null?b:[]).map(T=>w.jsxs("p",{className:D(r,`${N}-cart-item-attr`),children:["Promotion: ",T]},T))]}),m.length>0&&w.jsx("div",{className:D(r,`${N}-cart-chips`),children:m.map(T=>w.jsx(ad,{code:T,globalClassName:r},T))}),w.jsxs("span",{className:D(r,`${N}-cart-item-price`),children:[w.jsx("span",{className:D(r,`${N}-cart-item-final-price`),children:mi(e.itemSubtotal,t)}),h&&w.jsx("span",{className:D(r,`${N}-cart-item-original-price`),children:mi(e.originalSubtotal,t)})]}),w.jsxs("div",{className:D(r,`${N}-cart-item-footer`),children:[w.jsx("span",{className:D(r,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx($j,{quantity:e.quantity,disabled:d,globalClassName:r,onChange:T=>s(e,T)}),w.jsx("button",{type:"button",className:D(r,`${N}-cart-item-remove`),disabled:d,onClick:f,children:"Remove"})]})]})]})},nv=({expressPaymentUrl:e,checkoutButtonUrl:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:i}=zt(),{onNavigate:s}=st(),u=d=>qi({event:d,href:t!=null?t:void 0,openLinksInNewTab:r,onNavigate:s}),c=d=>{i(d?`I completed the payment using Express Checkout. Show my confirmation for order ${d}.`:"I completed the payment using Express Checkout. Show my order confirmation.")};return w.jsxs(w.Fragment,{children:[e&&w.jsx(K_,{expressPaymentUrl:e,globalClassName:n,onOrderComplete:c}),t&&w.jsxs("a",{className:D(n,`${N}-cart-checkout-button`),href:t,target:r?"_blank":"_self",rel:"noopener noreferrer",onClick:u,children:[w.jsx(yO,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]})]})},Vj=({cartOverrideTag:e,cart:t,productsToHighlight:n,readOnly:r,globalClassName:i,openLinksInNewTab:s,messageId:u})=>{const{loading:c,isConnected:d}=zt(),{mode:f,status:h}=tr(),m=g_("Cart"),E=c||!!r,{removeItem:b,changeItemQuantity:T,applyCoupon:_}=tv(E,u),I=R=>t.items.find(U=>U.itemId===R),v=ce(M({isConnected:d,isLoading:c,componentType:h.type,mode:f},m),{cart:{setQuantity:(R,U)=>{var W,re;const B=I(R);if(!B)return;const A=Math.max(1,(W=B.minQuantity)!=null?W:1),G=(re=B.maxQuantity)!=null?re:1/0;return T(B,Math.min(G,Math.max(A,Math.floor(U))))},remove:R=>{const U=I(R);if(U)return b(U)},applyCoupon:_}}),S={name:"Cart",payload:{cart:Hj(t),productsToHighlight:n,readOnly:r},api:v};return w.jsxs("div",{className:D(i,`${N}-cart`),children:[w.jsx(id,{overrideName:"Cart",children:w.jsx(ri,{tagName:e,props:S,label:"Cart"})}),w.jsx(nv,{expressPaymentUrl:t.expressPaymentUrl,checkoutButtonUrl:t.checkoutButtonUrl,globalClassName:i,openLinksInNewTab:s})]})},qj=({cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:i,messageId:s})=>{var Ne;const{loading:u}=zt(),{onNavigate:c,layoutPreset:d}=st(),[f,h]=k.useState(!1),[m,E]=k.useState(""),[b,T]=k.useState(!1),{overrides:_,isInitialized:I}=Rr(),v=I?_.Cart:void 0,S=u||!!n||b,{removeItem:R,changeItemQuantity:U,applyCoupon:B}=tv(S,s);if(!e.items||e.items.length===0)return null;const A=ve=>qi({event:ve,openLinksInNewTab:i,onNavigate:c});if(v)return w.jsx(Vj,{cartOverrideTag:v,cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:i,messageId:s});if(((Ne=e.items)!=null?Ne:[]).length===0)return null;const{items:G=[],currencyCode:W="USD",subtotal:re,total:H,taxes:ee,taxationMode:Q,shippingCost:me,shippingDiscount:V,shippingPromotions:ue=[],promotionsDiscount:fe,promotions:ae=[],couponsDiscount:J,bodyMessage:se,footerMessage:O,checkoutButtonUrl:j,expressPaymentUrl:q}=e,P=G.reduce((ve,ze)=>ve+(ze.quantity||1),0),ge=ev(G,e.couponsApplied,e.coupons),Re=Q==="gross",pe=()=>Ie(null,null,function*(){const ve=m.trim();if(!(!ve||S)){T(!0),E("");try{yield B(ve)}finally{T(!1)}}});return w.jsxs("div",{className:D(r,`${N}-cart`,S&&`${N}-cart-busy`),children:[w.jsxs("div",{className:D(r,`${N}-cart-box`),children:[se&&w.jsxs("button",{type:"button",className:D(r,`${N}-cart-summary`),"aria-expanded":f,onClick:()=>h(ve=>!ve),children:[w.jsx("span",{className:D(r,`${N}-cart-summary-icon-box`),children:w.jsx(SO,{})}),w.jsx("span",{className:D(r,`${N}-cart-summary-text`),children:w.jsx(oa,{text:se,globalClassName:r,openLinksInNewTab:i,showIsLoading:!1,onLinkClick:A})}),w.jsx("span",{className:D(r,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:f?w.jsx(ME,{}):w.jsx(FE,{})})]}),f&&w.jsxs("div",{className:D(r,`${N}-cart-expanded`),children:[w.jsxs("div",{className:D(r,`${N}-cart-items-section`),children:[w.jsx("ul",{className:D(r,`${N}-cart-items`),children:G.map(ve=>w.jsx(zj,{item:ve,currencyCode:W,disabled:S,globalClassName:r,onRemove:R,onQuantityChange:U},ve.itemId))}),ge.length>0&&w.jsx("div",{className:D(r,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:ge.map(ve=>w.jsx(ad,{code:ve.code,inactive:!ve.applied,globalClassName:r},ve.code))})]}),w.jsxs("div",{className:D(r,`${N}-cart-totals`),children:[w.jsx(Wn,{label:d==="commerce"?P===1?"Subtotal (1 item)":`Subtotal (${P} items)`:"Subtotal",value:re,currencyCode:W,globalClassName:r,loading:!1}),w.jsx(Wn,{label:"Coupon",value:J,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),w.jsx(Wn,{label:"Promotions",badge:ae[0],value:fe,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),w.jsx(Wn,{label:"Shipping",value:me,currencyCode:W,globalClassName:r,fallback:"-",loading:!1}),w.jsx(Wn,{label:"Shipping Discount",badge:ue[0],value:V,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),!Re&&w.jsx(Wn,{label:"Tax",value:ee,currencyCode:W,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Wn,{label:d==="commerce"?"Estimated total":"Total",value:H,currencyCode:W,globalClassName:r,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:D(r,`${N}-cart-coupon`),children:[w.jsxs("div",{className:D(r,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:D(r,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(BE,{})}),w.jsx("input",{type:"text",className:D(r,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:m,disabled:S,onChange:ve=>E(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&(ve.preventDefault(),pe())}})]}),w.jsx("button",{type:"button",className:D(r,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:S||!m.trim(),onClick:pe,children:w.jsx(jp,{"aria-hidden":"true"})})]}),w.jsx(nv,{expressPaymentUrl:q,checkoutButtonUrl:j,globalClassName:r,openLinksInNewTab:i}),w.jsx("p",{className:D(r,`${N}-cart-footer`),children:O||"Shipping and taxes calculated at checkout."})]})},Wj=({item:e,currencyCode:t,globalClassName:n})=>{var s,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,i=Km(e.coupons);return w.jsxs("li",{className:D(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:D(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:D(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:D(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:D(n,`${N}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(c=>w.jsxs("p",{className:D(n,`${N}-cart-item-attr`),children:[c.lbl||c.type,": ",c.value]},`${c.type}-${c.value}`)),((u=e.promotions)!=null?u:[]).map(c=>w.jsxs("p",{className:D(n,`${N}-cart-item-attr`),children:["Promotion: ",c]},c))]}),i.length>0&&w.jsx("div",{className:D(n,`${N}-cart-chips`),children:i.map(c=>w.jsx(ad,{code:c,globalClassName:n},c))}),w.jsxs("span",{className:D(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:D(n,`${N}-cart-item-original-price`),children:mi(e.originalSubtotal,t)}),w.jsx("span",{className:D(n,`${N}-cart-item-final-price`),children:mi(e.itemSubtotal,t)})]}),w.jsx("div",{className:D(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:D(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},Yj=({order:e,globalClassName:t,openLinksInNewTab:n})=>{const{onNavigate:r}=st(),{overrides:i,isInitialized:s}=Rr(),u=gi("OrderConfirmation"),[c,d]=k.useState(!0),f=s?i.OrderConfirmation:void 0;if(f){const V={name:"OrderConfirmation",payload:{order:e},api:u};return w.jsx(ri,{tagName:f,props:V,label:"OrderConfirmation"})}const h=V=>qi({event:V,openLinksInNewTab:n,onNavigate:r}),m=V=>{const ue=new Date(V);return Number.isNaN(ue.getTime())?V:ue.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},{id:E,creationDate:b,items:T=[],currencyCode:_="USD",subtotal:I,total:v,taxes:S,taxationMode:R,shippingCost:U,shippingDiscount:B,shippingPromotions:A=[],promotionsDiscount:G,promotions:W=[],couponsDiscount:re,bodyMessage:H,footerMessage:ee}=e,Q=ev(T,e.couponsApplied),me=R==="gross";return w.jsxs("div",{className:D(t,`${N}-cart`),children:[w.jsxs("div",{className:D(t,`${N}-cart-banner`),children:[w.jsx("span",{className:D(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(wO,{})}),w.jsx("p",{className:D(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:D(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",E]}),b&&w.jsxs("span",{children:["Ordered On: ",m(b)]})]}),w.jsxs("div",{className:D(t,`${N}-cart-box`),children:[H&&w.jsxs("button",{type:"button",className:D(t,`${N}-cart-summary`),"aria-expanded":c,onClick:()=>d(V=>!V),children:[w.jsx("span",{className:D(t,`${N}-cart-summary-text`),children:w.jsx(oa,{text:H,globalClassName:t,showIsLoading:!1,openLinksInNewTab:n,onLinkClick:h})}),w.jsx("span",{className:D(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:c?w.jsx(ME,{}):w.jsx(FE,{})})]}),c&&w.jsxs("div",{className:D(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:D(t,`${N}-cart-items`),children:T.map(V=>w.jsx(Wj,{item:V,currencyCode:_,globalClassName:t},V.itemId))}),Q.length>0&&w.jsx("div",{className:D(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:Q.map(V=>w.jsx(ad,{code:V.code,globalClassName:t},V.code))}),w.jsxs("div",{className:D(t,`${N}-cart-totals`),children:[w.jsx(Wn,{label:"Subtotal",value:I,currencyCode:_,globalClassName:t}),w.jsx(Wn,{label:"Coupon",value:re,currencyCode:_,globalClassName:t,isDiscount:!0}),w.jsx(Wn,{label:"Promotions",badge:W[0],value:G,currencyCode:_,globalClassName:t,isDiscount:!0}),w.jsx(Wn,{label:"Shipping",value:U,currencyCode:_,globalClassName:t,fallback:"TBD"}),w.jsx(Wn,{label:"Shipping Discount",badge:A[0],value:B,currencyCode:_,globalClassName:t,isDiscount:!0}),!me&&w.jsx(Wn,{label:"Tax",value:S,currencyCode:_,globalClassName:t,fallback:"TBD"}),w.jsx(Wn,{label:"Total",value:v,currencyCode:_,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:D(t,`${N}-cart-footer`),children:ee||"Shipping and taxes calculated at checkout."})]})},Gj=({image:e,alt:t,globalClassName:n})=>{const[r,i]=k.useState(e.src),[s,u]=k.useState(!1),c=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&i(e.fallbackSrc)};return w.jsx("img",{className:D(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:s}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:c})},Xj=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(Am,{className:D(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(_m,{className:D(n,`${N}-pdp-gallery__item-group`),children:e.map((i,s)=>w.jsx(Tm,{index:s,className:D(n,`${N}-pdp-gallery__item`),children:w.jsx(Gj,{image:i,alt:t?`${t} (${s+1})`:`Product image ${s+1}`,globalClassName:n})},i.src))}),r&&w.jsxs(bm,{className:D(n,`${N}-pdp-gallery__control`),children:[w.jsx(Sm,{className:D(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(UE,{size:"16px"})}),w.jsx(vm,{className:D(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(jE,{size:"16px"})})]}),r&&w.jsx(xm,{className:D(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(i,s)=>w.jsx(wm,{index:s,className:D(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${s+1}`},s))})]})},Kj="color",ud=e=>(e!=null?e:"").toLowerCase()===Kj,Qj=e=>e.replace(/(^|\/)large\//,"$1medium/"),rv=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>ud(n.id)&&n.vals.includes(t)),iv=(e,t)=>{const n=Qj(t),r=La(e,n);return n===t?{src:r}:{src:r,fallbackSrc:La(e,t)}},Jj=["hi-res","large","medium","small"],ov=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},Zj=e=>Jj.find(t=>e.some(n=>ov(n,t))),eH=(e,t,n)=>{var i;const r=[...t?e.filter(s=>rv(s,t)):[],...e.filter(s=>!s.vattr),...e];for(const s of r){const u=((i=s.imgs)!=null?i:[]).filter(c=>{var d;return((d=c.url)!=null?d:"").trim().length>0}).map(c=>iv(n,c.url));if(u.length>0)return u}return[]},tH=(e,t)=>{var i;const n=(i=e.imgGroups)!=null?i:[],r=Zj(n);if(r){const s=n.filter(c=>ov(c,r)),u=eH(s,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[iv(e.baseUrl,e.imageUrl)]:[]},nH=(e,t)=>{var i,s,u;const n=((i=e.imgGroups)!=null?i:[]).find(c=>c.viewType==="swatch"&&rv(c,t)),r=(u=(s=n==null?void 0:n.imgs)==null?void 0:s[0])==null?void 0:u.url;return r?La(e.baseUrl,r):""},rH=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),i=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(i.every(f=>r.has(f)))return e;const s={},u=new Set;for(const f of i){if(r.has(f)){s[f]=f,u.add(f);continue}const h=new Set(n.map(E=>E.vars[f]).filter(Boolean));if(h.size===0)continue;const m=t.filter(E=>!u.has(E.id)&&E.opts.length>0&&[...h].every(b=>E.opts.some(T=>T.val===b)));m.length===1&&(s[f]=m[0].id,u.add(m[0].id))}const c=i.filter(f=>!r.has(f)).length;return Object.keys(s).filter(f=>s[f]!==f).length<c?e:ce(M({},e),{vmat:n.map(f=>ce(M({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([h,m])=>{var E;return[(E=s[h])!=null?E:h,m]}))}))})},cd=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(i=>{var s;return((s=i.vars)==null?void 0:s[t])!==n||i.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=i.vars)==null?void 0:d[u])===c})}),iH=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(i=>{var s;return((s=r.vars)==null?void 0:s[i])===t[i]}))},oH=(e,t,n,r,i)=>{if(!e||e.length===0)return ce(M({},i),{[n]:r});const s=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(i).every(([f,h])=>{var m;return f===n||((m=c.vars)==null?void 0:m[f])===h})});if(s)return M({},s.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?M({},u.vars):ce(M({},i),{[n]:r})},sv=(e,t)=>{var i,s,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(i=e.id)!=null?i:null;if(!e.vmat||e.vmat.length===0)return(s=e.id)!=null?s:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,h])=>{var m;return((m=d.vars)==null?void 0:m[f])===h}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},sH=(e,t)=>{var s;const n=Lm(e.promotions,(s=e.extendedData)==null?void 0:s.productPromotions),r=typeof n=="number"?ce(M({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const i=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([c,d])=>{var f;return((f=u.vars)==null?void 0:f[c])===d}));return i!=null&&i.pr?i.pr:r},av=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const i=r.opts.find(u=>cd(e.vmat,r.id,u.val)),s=i!=null?i:r.opts[0];s&&(t[r.id]=s.val)}return t},aH=300,uH=e=>{const{overrides:t,isInitialized:n}=Rr(),r=gi("ProductDetailCard"),i=n?t.ProductDetailCard:void 0;if(i){const s={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(ri,{tagName:i,props:s,label:"ProductDetailCard"})}return w.jsx(cH,M({},e))},cH=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var ve,ze,rt,Ot,ct,_t,tt,yt;const{addToCart:i,sendMessage:s,loading:u}=zt(),{onNavigate:c}=st(),d=k.useMemo(()=>rH(e.data),[e.data]),f=(ve=d.vattr)!=null?ve:[],[h,m]=k.useState(()=>av(d));k.useEffect(()=>{m(av(d))},[d,e.id]);const E=iH(d.vmat,h),b=(rt=(ze=d.quantity)==null?void 0:ze.minQuantity)!=null?rt:1,T=(ct=(Ot=d.quantity)==null?void 0:Ot.maxQuantity)!=null?ct:Number.POSITIVE_INFINITY,_=(tt=(_t=d.quantity)==null?void 0:_t.increment)!=null?tt:1,[I,v]=k.useState(b),[S,R]=k.useState(!1),U=k.useRef(!1);k.useEffect(()=>{S&&(u?U.current=!0:U.current&&(U.current=!1,R(!1)))},[S,u]);const B=f.find(De=>ud(De.id)),A=f.filter(De=>!ud(De.id)),G=B?h[B.id]:void 0,W=k.useMemo(()=>tH(d,G),[d,G]),re=k.useMemo(()=>sH(d,h),[d,h]),H=sv(d,h),[ee,Q]=k.useState(I),me=k.useRef(H),V=me.current===H?ee:I;k.useEffect(()=>{if(me.current!==H){me.current=H,Q(I);return}const De=window.setTimeout(()=>Q(I),aH);return()=>window.clearTimeout(De)},[I,H]);const ue=I===ee,fe=k.useMemo(()=>E&&(me.current!==H||ue)?Fj(d.expressPaymentUrl,H,V):null,[d.expressPaymentUrl,H,V,E,ue]),ae=k.useCallback(De=>{s(De?`I completed the payment using Express Checkout. Show my confirmation for order ${De}.`:"I completed the payment using Express Checkout. Show my order confirmation.")},[s]),J=De=>qi({event:De,openLinksInNewTab:n,onNavigate:c}),se=(De,Ve)=>()=>{m(Oe=>{const it=!cd(d.vmat,De,Ve,Oe);return ud(De)||it?oH(d.vmat,f,De,Ve,Oe):ce(M({},Oe),{[De]:Ve})})},O=()=>{if(u)return;const De=sv(d,h);if(!De)return;const Ve=f.map(Oe=>{const it=Oe.opts.find(lt=>lt.val===h[Oe.id]);return it?{label:Oe.lbl||Oe.id,value:it.name||it.val}:null}).filter(Oe=>Oe!==null);R(!0),i({productName:d.name,sku:De,quantity:I,variants:Ve})},j=!E||I-_<b,q=!E||I+_>T,P=De=>{var Oe;const Ve=h[De.id];return(Oe=De.opts.find(it=>it.val===Ve))==null?void 0:Oe.name},ge=()=>v(De=>Math.max(b,De-_)),Re=()=>v(De=>Math.min(T,De+_)),pe=De=>w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__variant-name`),children:De.lbl||De.id}),P(De)&&w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:P(De)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__chips`),children:De.opts.map(Ve=>{const Oe=cd(d.vmat,De.id,Ve.val,h),it=h[De.id]===Ve.val;return w.jsxs("label",{className:D(`${N}-msg-pdp__chip`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Ve.name||Ve.val})]},Ve.val)})})]},De.id),Ne=De=>w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__variant-name`),children:De.lbl||"Color"}),P(De)&&w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:P(De)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__swatches`),children:De.opts.map(Ve=>{const Oe=cd(d.vmat,De.id,Ve.val,h),it=h[De.id]===Ve.val,lt=nH(d,Ve.val);return lt?w.jsxs("label",{className:D(`${N}-msg-pdp__swatch`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-label":Ve.name||Ve.val,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:D(t,`${N}-msg-pdp__swatch-image`),src:lt,alt:Ve.name||Ve.val,loading:"lazy"})]},Ve.val):w.jsxs("label",{className:D(`${N}-msg-pdp__chip`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Ve.name||Ve.val})]},Ve.val)})})]});return w.jsx("div",{className:D(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:D(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:D(t,`${N}-msg-pdp__gallery`),children:w.jsx(Xj,{images:W,altText:d.name,globalClassName:t})}),w.jsxs("div",{className:D(t,`${N}-msg-pdp__content`),children:[d.slugUrl&&!r?w.jsx("a",{href:d.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:D(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${d.name}`,onClick:De=>Ru({event:De,href:d.slugUrl,openLinksInNewTab:n,isCartMgmtSupported:r,onNavigate:c}),children:d.name}):w.jsx("p",{className:D(t,`${N}-msg-pdp__title`),children:d.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:w.jsx(Mm,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:re==null?void 0:re.orig,discountPrice:(yt=re==null?void 0:re.prom)!=null?yt:re==null?void 0:re.cur,currencyCode:d.ccy,fontSize:"14px"})}),d.dscr&&w.jsx("div",{className:D(t,`${N}-msg-pdp__description`),children:w.jsx(oa,{globalClassName:t,text:d.dscr,openLinksInNewTab:n,onLinkClick:J})}),B&&Ne(B),A.map(pe),r&&w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:I})]}),w.jsxs("div",{className:D(t,`${N}-msg-pdp__stepper`),children:[w.jsx(kr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(dO,{}),disabled:j,onClick:ge}),w.jsx("span",{className:D(t,`${N}-msg-pdp__quantity`),children:I}),w.jsx(kr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(LE,{}),disabled:q,onClick:Re})]})]}),r&&w.jsxs("div",{className:D(t,`${N}-msg-pdp__actions`),children:[fe&&w.jsx(K_,{expressPaymentUrl:fe,globalClassName:t,onOrderComplete:ae},fe),w.jsx($p,{className:`${N}-msg-pdp__add-to-cart`,disabled:!E||u||S,onClick:O,children:S?"Adding...":w.jsxs(w.Fragment,{children:[w.jsx(LE,{className:`${N}-msg-pdp__add-to-cart-icon`}),"Add to cart"]})})]})]})]})})},lH=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:i,onNavigate:s}=st(),{overrides:u,isInitialized:c}=Rr(),{loading:d}=zt(),f=Go(),h=gi("ProductComparison"),m=_=>{if(d)return;const I=_.name||"this product",v=_.id?` [ID: ${_.id}]`:"";f(`Show me details for ${I}${v}`)},E=c?u.ProductComparison:void 0;if(E){const _={name:"ProductComparison",payload:{products:e,table:t},api:h};return w.jsx(ri,{tagName:E,props:_,label:"ProductComparison"})}if(!e.length)return null;const b=`auto repeat(${e.length}, 1fr)`,T=`${90+e.length*140}px`;return w.jsx("div",{className:D(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:b,minWidth:T},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(_=>{var S,R,U,B,A,G,W;const I=_.imageUrl?La(_.baseUrl,_.imageUrl):void 0,v=Lm(_.promotions,(S=_.extendedData)==null?void 0:S.productPromotions);return w.jsxs("div",{className:D(n,`${N}-product-comparison__product-col`),children:[I&&(i?w.jsx("button",{type:"button",disabled:d,onClick:()=>m(_),className:D(n,`${N}-product-comparison__image-button`),"aria-label":`View details for ${_.name}`,children:w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:_.name||"Product image",loading:"eager"})}):_.slugUrl?w.jsx("a",{href:_.slugUrl,target:r?"_blank":"_self",rel:"noopener",onClick:re=>Ru({event:re,href:_.slugUrl,openLinksInNewTab:r,isCartMgmtSupported:i,onNavigate:s}),children:w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:_.name||"Product image",loading:"eager"})}):w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:"",loading:"eager"})),i?w.jsx("button",{type:"button",disabled:d,onClick:()=>m(_),className:D(n,`${N}-product-comparison__name`,`${N}-product-comparison__name-button`),"aria-label":`View details for ${_.name}`,children:_.name}):_.slugUrl?w.jsx("a",{href:_.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:D(n,`${N}-product-comparison__name`,`${N}-product-comparison__name-link`),"aria-label":`Go to product page for ${_.name}`,onClick:re=>Ru({event:re,href:_.slugUrl,openLinksInNewTab:r,isCartMgmtSupported:i,onNavigate:s}),children:_.name}):w.jsx("span",{className:D(n,`${N}-product-comparison__name`),children:_.name}),w.jsx(Mm,{globalClassName:n,retailPrice:(B=(R=_.pr)==null?void 0:R.orig)!=null?B:(U=_.pr)==null?void 0:U.cur,discountPrice:(W=v!=null?v:(A=_.pr)==null?void 0:A.prom)!=null?W:(G=_.pr)==null?void 0:G.cur,currencyCode:_.ccy,fontSize:"0.875rem"})]},_.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(_=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:D(n,`${N}-product-comparison__row-label`),children:_.row_name}),e.map((I,v)=>w.jsx("div",{className:D(n,`${N}-product-comparison__row-value`),children:_.values[v]},`${_.row_name}-${I.id}`))]},_.row_name))})]})})},uv=({suggestions:e,disabled:t,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:i})=>{const{overrides:s,isInitialized:u}=Rr(),c=gi("Suggestions"),d=u?s.Suggestions:void 0;if(d){const f={name:"Suggestions",payload:{suggestions:e},api:c};return w.jsx(ri,{tagName:d,props:f,label:"Suggestions"})}return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(JF,{disabled:t,suggestions:e,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:i})})},dH=new Set(["Header","HeaderActions","SubHeader"]),cv=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i})=>{const{loading:s}=zt(),u=Go(),c=Sj(),{layoutPreset:d,isCartMgmtSupported:f,logger:h,onNavigate:m}=st(),{overrides:E,isInitialized:b}=Rr(),T=gi("ToolResult"),_=m_(),I=k.useMemo(()=>e.response.flatMap(lp),[e.response]),v=I.filter(A=>A.type!=="suggestions"),S=I.filter(A=>A.type==="suggestions"),R=d==="commerce"&&v.some(A=>A.type==="product_carousel"||A.type==="product_tile"||A.type==="cart"||A.type==="product_comparison"),U=A=>qi({event:A,openLinksInNewTab:r,onNavigate:m}),B=(A,G)=>{var W,re,H,ee,Q,me,V,ue,fe,ae,J,se,O,j,q,P,ge,Re,pe,Ne,ve,ze,rt,Ot,ct,_t;switch(A.type){case"markdown":{const tt=(re=(W=A.data)==null?void 0:W.content)!=null?re:"";return A.index===Ri&&Ry(tt)?null:w.jsx(oa,{text:tt,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1,onLinkClick:U},`${A.type}-${(H=A.index)!=null?H:G}`)}case"product_carousel":return w.jsx(Oj,{title:(Q=(ee=A.data)==null?void 0:ee.title)!=null?Q:"",products:(V=(me=A.data)==null?void 0:me.products)!=null?V:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:f},`${A.type}-${(ue=A.index)!=null?ue:G}`);case"product_tile":return w.jsx(uH,{product:A.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:f},`${A.type}-${(fe=A.index)!=null?fe:G}`);case"product_comparison":return w.jsx(lH,{products:(J=(ae=A.data)==null?void 0:ae.products)!=null?J:[],table:(O=(se=A.data)==null?void 0:se.table)!=null?O:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i},`${A.type}-${(j=A.index)!=null?j:G}`);case"cart":{const tt=(ge=(P=(q=A.data)==null?void 0:q.cart)==null?void 0:P.cartSummary)==null?void 0:ge.cartDetails;return tt?w.jsx(qj,{cart:tt,productsToHighlight:A.data.products_to_highlight,readOnly:!c||t!==c,globalClassName:n,openLinksInNewTab:r,messageId:t},`${A.type}-${(Re=A.index)!=null?Re:G}`):null}case"order_confirmation":{const tt=A.data,yt=(ve=(pe=tt==null?void 0:tt.order)==null?void 0:pe.orderDetails)!=null?ve:(Ne=tt==null?void 0:tt.data)==null?void 0:Ne.orderConfirmation;return yt?w.jsx(Yj,{order:yt,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i},`${A.type}-${(ze=A.index)!=null?ze:G}`):null}case"tool_results":{const tt=A.data,yt=A.output_name;if(typeof yt=="string"&&dH.has(yt))return null;const De=b&&yt&&Object.prototype.hasOwnProperty.call(E,yt)?E[yt]:void 0,Ve=typeof De=="string"?De:void 0;if(!Ve||!yt)return h!=null&&h.isDevelopment&&(yt?h.warn(`🦜 tool_results "${yt}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${yt}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(E),payload:tt}):h.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:tt})),null;const Oe={name:yt,payload:tt,api:ce(M({},T),{reportFailure:(it,lt)=>_.reportFailure(yt,it,lt),reportEvent:(it,lt)=>_.reportEvent(yt,it,lt)})};return w.jsx(id,{overrideName:yt,children:w.jsx(ri,{tagName:Ve,props:Oe,label:`toolResult:${yt}`})},`${A.type}-${yt}-${(rt=A.index)!=null?rt:G}`)}case"suggestions":return w.jsx(uv,{disabled:s,suggestions:(ct=(Ot=A.data)==null?void 0:Ot.display_text)!=null?ct:[],globalClassName:n,isWidgetStandalone:i,onSuggestionClick:u},`${A.type}-${(_t=A.index)!=null?_t:G}`);default:return null}};return w.jsxs(w.Fragment,{children:[R?w.jsx("div",{className:D(n,`${N}-response-card`),children:v.map(B)}):v.map(B),S.map(B)]})};class Qm extends k.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){var r;kt(!0,"error","Message content threw during render:",t,n.componentStack),(r=this.context)==null||r.failure("render_error")}render(){return this.state.hasError?w.jsx("p",{className:D(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}We(Qm,"contextType",Mc);const fH=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r,layoutPreset:i}=st();return cI(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:D(t,`${N}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:D(t,`${N}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:D(t,`${N}-user-message-row`,n?"standalone":"embedded"),children:[i!=="commerce"&&w.jsx("span",{className:D(t,`${N}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(bO,{})}),w.jsxs("div",{className:D(t,`${N}-user-message-body`,n?"standalone":"embedded"),children:[e.attachmentImageUrl&&w.jsx("img",{src:e.attachmentImageUrl,alt:e.content||"Attachment",className:D(t,`${N}-user-message-image`)}),e.content&&w.jsx("p",{className:D(t,`${N}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})]})})})},pH=({divider:e,globalClassName:t})=>{const n=e.context.type==="srp"?`Search: "${e.label}"`:e.label;return w.jsx("div",{className:D(t,`${N}-page-context-divider`),role:"separator","aria-label":n,children:w.jsxs("span",{className:D(t,`${N}-page-context-divider-pill`),children:[e.context.type==="pdp"&&e.imageUrl&&w.jsx("img",{className:D(t,`${N}-page-context-divider-image`),src:e.imageUrl,alt:""}),e.context.type==="pdp"&&!e.imageUrl&&w.jsx(IO,{className:D(t,`${N}-page-context-divider-icon`),"aria-hidden":"true"}),e.context.type==="srp"&&w.jsx(HE,{className:D(t,`${N}-page-context-divider-icon`),"aria-hidden":"true"}),w.jsx("span",{className:D(t,`${N}-page-context-divider-label`),title:n,children:n})]})})};function hH(e){switch(e==null?void 0:e.toLowerCase()){case"chatbot":return"chatbot";case"agent":return"human-agent";default:return null}}const mH=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{var h;const{logger:i,onNavigate:s,enablePageContext:u}=st(),c=m=>qi({event:m,openLinksInNewTab:n,onNavigate:s}),d=k.useMemo(()=>{if(typeof e.content!="string")return null;const m=Va(e.content);if(m)return m;const E=Gc(e.content);return E?{response:[E]}:null},[e.content]),f=k.useMemo(()=>{var b;const m="Oops, I had trouble with your request.";if(typeof e.content!="string")return i==null||i.warn("Message content is not richtext format. Showing fallback text.",e.content),m;const E=e.content.trim();try{const T=JSON.parse(E);if(typeof T=="object"&&T!==null)return i==null||i.debug("Detected JSON object instead of array of responses in message content",e.content),(b=cp(T))!=null?b:m}catch(T){if(E.startsWith("{")||E.startsWith("["))return i==null||i.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),m}return e.content||m},[i,e.content]);switch(e.role){case"user":return w.jsxs(w.Fragment,{children:[u&&e.pageContextDivider&&w.jsx(pH,{divider:e.pageContextDivider,globalClassName:t}),(!e.pageContextDivider||e.content||e.attachmentImageUrl)&&w.jsx(fH,{message:e,globalClassName:t,isWidgetStandalone:r})]});case"agent":return w.jsx("div",{className:D(t,`${N}-message-group`,hH((h=e.sender)==null?void 0:h.role),r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:d?w.jsx(Qm,{globalClassName:t,children:w.jsx(cv,{content:d,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(oa,{text:f,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1,onLinkClick:c})})});case"system":return w.jsx("div",{className:D(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:D(t,`${N}-reset-message`),children:e.content})})}},gH=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:D(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:D(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:D(n,`${N}-retry-button`),onClick:t,children:[w.jsx(vO,{"aria-hidden":"true"})," Retry"]})]}),yH="What can we help with?",EH="Give me recommendations",bH="Find a gift",lv="Start fresh",wH=[EH,bH,lv],xH=()=>{const{globalClassName:e}=st(),{loading:t,resetConversation:n}=zt(),r=Go(),{mode:i}=tr(),s=i==="standalone";return w.jsxs("div",{className:D(e,`${N}-transcript-placeholder`),children:[w.jsx("p",{className:D(e,`${N}-transcript-placeholder-text`),children:yH}),w.jsx(uv,{suggestions:wH,disabled:t,globalClassName:e,isWidgetStandalone:s,onSuggestionClick:u=>{if(u===lv){n();return}r(u)}})]})},TH=({globalClassName:e,onClick:t})=>w.jsx("div",{className:D(e,`${N}-jump-to-latest`),children:w.jsx("button",{type:"button",className:D(e,`${N}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx(NO,{size:"20"})})}),_H=`${N}-message-container`,vH=24,SH=100,ld=e=>{const t=e==null?void 0:e.closest(`.${_H}`);return t instanceof HTMLElement?t:null},dv=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=vH,AH=()=>typeof window!="undefined"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,kH=(e,t)=>!(e!=null&&e.anchorMessageId)||!t.some(n=>n.id===e.anchorMessageId)?null:e,CH=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:i,isOpen:s,scrollSnapshotRef:u})=>{var re,H,ee;const c=k.useRef(null),d=k.useRef(null),f=k.useRef(!0),h=k.useRef(!1),m=k.useRef(null),E=k.useRef(!1),b=k.useRef((H=(re=t[t.length-1])==null?void 0:re.id)!=null?H:null),T=k.useRef(null),_=k.useRef(!1),I=k.useRef(t);if(I.current=t,!_.current){_.current=!0;const Q=u?kH(u.current,t):null;Q&&(f.current=Q.shouldStickToBottom,E.current=Q.hasSentLiveMessage,Q.shouldStickToBottom||(T.current=Q.scrollTop))}const v=k.useRef(e);v.current=e;const S=k.useRef(!1);S.current=n.length>0;const R=k.useRef(!1);R.current=((ee=t[t.length-1])==null?void 0:ee.restored)===!0;const[U,B]=k.useState(!1),A=k.useCallback((Q="smooth")=>{var ue;const me=(ue=d.current)!=null?ue:ld(c.current);if(!me)return;const V=Q==="smooth"&&AH()?"auto":Q;f.current=!0,V==="smooth"&&(h.current=!0),me.scrollTo({top:me.scrollHeight,behavior:V})},[]),G=k.useCallback(()=>{const Q=d.current;if(!Q||Q.clientHeight===0){Q||B(!1);return}B(!dv(Q))},[]),W=k.useCallback(()=>{const Q=d.current;if(!Q){f.current=!0,B(!1);return}Q.clientHeight!==0&&(f.current=dv(Q),G())},[G]);return k.useLayoutEffect(()=>{const Q=T.current;if(Q==null)return;const me=ld(c.current);d.current=me,me&&(me.scrollTop=Q,f.current=!1,B(!0))},[]),k.useLayoutEffect(()=>{const Q=c.current;return()=>{var ue,fe,ae,J;if(!u)return;const me=(ue=d.current)!=null?ue:ld(Q),V=I.current;u.current={scrollTop:(fe=me==null?void 0:me.scrollTop)!=null?fe:0,shouldStickToBottom:f.current,hasSentLiveMessage:E.current,anchorMessageId:(J=(ae=V[V.length-1])==null?void 0:ae.id)!=null?J:null}}},[u]),k.useEffect(()=>{const Q=ld(c.current);if(d.current=Q,G(),!Q)return;const me=()=>{m.current&&(clearTimeout(m.current),m.current=null)},V=()=>{me(),h.current=!1,W()},ue=()=>{if(!h.current){W();return}me(),m.current=setTimeout(V,SH)},fe=()=>{me(),h.current=!1};Q.addEventListener("scroll",ue,{passive:!0}),Q.addEventListener("scrollend",V),Q.addEventListener("wheel",fe,{passive:!0}),Q.addEventListener("touchstart",fe,{passive:!0});const ae=()=>{if(h.current)return;const O=E.current,j=!O,q=f.current,P=R.current,ge=v.current,Re=S.current;if(q&&(ge||P||j)){A(Re&&O?"smooth":"auto");return}W()},J=new ResizeObserver(ae);J.observe(Q),c.current&&J.observe(c.current);const se=new MutationObserver(ae);return se.observe(Q,{childList:!0,subtree:!0}),()=>{me(),Q.removeEventListener("scroll",ue),Q.removeEventListener("scrollend",V),Q.removeEventListener("wheel",fe),Q.removeEventListener("touchstart",fe),J.disconnect(),se.disconnect()}},[A,G,W]),k.useEffect(()=>{T.current==null&&A("auto")},[A]),k.useEffect(()=>{s&&T.current==null&&A("auto")},[s,A]),k.useEffect(()=>{var j;const Q=t[t.length-1],me=(j=Q==null?void 0:Q.id)!=null?j:null,V=me!==b.current;b.current=me;const ue=(Q==null?void 0:Q.restored)===!0,fe=(Q==null?void 0:Q.role)==="user"&&!ue;fe&&(E.current=!0);const ae=f.current,J=t.length>0,se=!E.current&&J;if(ae&&(e||ue||se)){A(ue||se?"auto":"smooth");return}if(V&&fe){A("smooth");return}W()},[t,e,A,W]),k.useEffect(()=>{if(e&&f.current){A(E.current?"smooth":"auto");return}W()},[n,r,i,e,A,W]),{endRef:c,showJumpToLatest:U,scrollToLatest:A}},NH=4e3,fv=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,NH),Du="Assistant response available",IH=e=>{if(typeof e!="object"||e===null)return"";const t=e;if(t.type!=="product_carousel"||typeof t.data!="object"||t.data===null)return"";const n=t.data.products;if(!Array.isArray(n))return"";if(n.length===0)return"No products found.";const r=n.map(c=>{if(typeof c!="object"||c===null||Array.isArray(c))return"";const d=c,f=typeof d.data=="object"&&d.data!==null&&!Array.isArray(d.data)?d.data:null,h=typeof(f==null?void 0:f.name)=="string"?f.name.trim():"",m=typeof d.id=="string"?d.id.trim():"";return h||m}).filter(Boolean),i=n.length===1?"1 product found.":`${n.length} products found.`;if(r.length===0)return i;const s=n.length===1?"Product title":"Product titles",u=`${i} ${s}: ${r.join("; ")}`;return/[.!?]$/.test(u)?u:`${u}.`},OH=e=>{var s,u;if(typeof e!="string")return Du;const t=Va(e),n=t?null:Gc(e),r=(s=t==null?void 0:t.response)!=null?s:n?[n]:null;if(r)return r.map(d=>d.type==="markdown"?fv(d.data.content):IH(d)).filter(Boolean).join(" ").trim()||Du;const i=e.trim();try{const c=JSON.parse(i);if(typeof c=="object"&&c!==null)return(u=cp(c))!=null?u:Du}catch(c){if(i.startsWith("{")||i.startsWith("["))return Du}return fv(e)||Du},PH=({message:e,announcementKey:t})=>{const[n,r]=k.useState("");return k.useEffect(()=>{if(r(""),!e)return;const i=setTimeout(()=>r(e),100),s=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(i),clearTimeout(s)}},[e,t]),w.jsx("span",{className:`${N}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},RH=()=>{const{messages:e}=zt(),t=[...e].reverse().find(n=>n.role==="agent"&&!n.restored);return w.jsx(PH,{message:t?OH(t.content):"",announcementKey:t==null?void 0:t.id})},LH="You are offline or we couldn't reach the assistant. Check connection and try again.",Jm=({isWidgetStandalone:e,isOpen:t,scrollSnapshotRef:n})=>{var ge,Re;const{layoutPreset:r,globalClassName:i,openLinksInNewTab:s,logger:u,autoScroll:c,connectingMessages:d}=st(),{messages:f,streamingBlocks:h,isAgentTyping:m,loading:E,progressMessage:b,connectionStatus:T,error:_,sendError:I,retryLastMessage:v,retryConnection:S}=zt(),{endRef:R,showJumpToLatest:U,scrollToLatest:B}=CH({autoScroll:c,messages:f,streamingBlocks:h,sendError:I,error:_,isOpen:t,scrollSnapshotRef:n}),A=f.length>0,G=h.some(yN),W=G||f.some(pe=>pe.role==="user"||pe.role==="agent"),re=f.some(pe=>pe.role==="system"&&(pe.content===Qy||pe.content===wp)),H=!W&&!re&&(T==="connecting"||T==="connected"),[ee,Q]=k.useState(!1);k.useEffect(()=>{if(H&&!E){const pe=setTimeout(()=>Q(!0),Jy);return()=>clearTimeout(pe)}Q(!1)},[H,E]);const me=H&&(E||!ee),V=me?f.filter(pe=>pe.role!=="system"):f,ue=f[f.length-1],fe=ue?Py(ue.content,"suggestions"):!1,ae=!me&&A&&(E||m)&&!G&&!fe,J=T==="reconnecting"&&!ae,se=T==="error";let O=null;se?O={message:_!=null?_:LH,kind:"connection",onRetry:S}:I&&(O={message:I.message,kind:"send",onRetry:v});const j=ee&&T==="connected"&&!W&&!re&&!O,q=(ge=O==null?void 0:O.message)!=null?ge:null,P=(Re=O==null?void 0:O.kind)!=null?Re:null;return k.useEffect(()=>{q&&(u==null||u.error("Error message shown to user",{message:q,kind:P}))},[q,P,u]),w.jsxs(w.Fragment,{children:[w.jsx(RH,{}),me&&w.jsx(sB,{globalClassName:i,isWidgetStandalone:e,variant:r==="commerce"?"sparkles":"default",messages:d!==void 0?d:r==="commerce"?["Find the right products faster","Compare your best options","Track and manage your orders"]:void 0}),j&&w.jsx(xH,{}),V.map(pe=>w.jsx(mH,{message:pe,globalClassName:i,openLinksInNewTab:s,isWidgetStandalone:e},pe.id)),O&&w.jsx(gH,{message:O.message,onRetry:O.onRetry,globalClassName:i,isWidgetStandalone:e}),G&&w.jsxs("div",{className:D(i,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Qm,{globalClassName:i,children:w.jsx(cv,{content:{response:h},globalClassName:i,openLinksInNewTab:s,isWidgetStandalone:e})}),(E||m)&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e})]}),ae&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e,loadingText:b}),J&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e,loadingText:"Reconnecting..."}),U&&w.jsx(TH,{globalClassName:i,onClick:()=>B()}),w.jsx("div",{ref:R,"aria-hidden":"true"})]})},DH=()=>w.jsxs("svg",{"aria-hidden":"true",className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),MH=()=>w.jsx("svg",{"aria-hidden":"true",className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),FH=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Zm=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=st(),i=e!=null?e:r,{overrides:s,isInitialized:u}=Rr(),c=gi("ProgressSteps");if(t.length===0||i===0)return null;const d=FH(i,t),f=u?s.ProgressSteps:void 0;if(f){const h={name:"ProgressSteps",payload:{steps:d},api:c};return w.jsx(ri,{tagName:f,props:h,label:"ProgressSteps"})}return w.jsx("div",{className:D(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((h,m)=>{const E=m<d.length-1,b=m===d.length-1;return w.jsxs("li",{className:D(`${N}-progress-step`,b&&"active"),"aria-label":`${h} (${E?"completed":"in progress"})`,children:[b&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:h}),w.jsx("span",{className:D(`${N}-progress-step-icon`,E?"done":"active"),children:E?w.jsx(DH,{}):w.jsx(MH,{})})]},`${m}-${h}`)})})})})},pv=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r,enableMinimize:i,enableDownloadTranscript:s,headerConfig:u}=st(),{isAgentTyping:c,resetConversation:d,endConversation:f,progressSteps:h,downloadTranscript:m}=zt(),E=Go(),b=Fm(),T=c,_=B=>B.file?b(B):E(B.text),{active:I,onError:v}=y_(),S=k.useMemo(()=>x1("chat",u==null?void 0:u.actions,{enableMinimize:!!i,enableDownloadTranscript:s!=null?s:!0}),[u==null?void 0:u.actions,i,s]),R=w1.some(B=>S[B]),U=I||R;return w.jsxs("div",{className:D(t,`${N}-container`,`${N}-embedded-chat`,`${N}-layout-${e}`),style:n,children:[w.jsx("div",{className:D(t,`${N}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:!1})}),w.jsx(Zm,{steps:h,globalClassName:t}),w.jsx(Mh,{componentType:"chat",className:"embedded-chat",isLoading:T,onSubmit:_}),U&&w.jsx("div",{className:D(t,`${N}-embedded-chat-menu`),children:I?w.jsx(E_,{componentType:"chat",availableActions:S,onClearChat:d,onEndConversation:f,onDownloadTranscript:m,onError:v}):w.jsxs(K7,{componentType:"chat",children:[S.toggleExpanded&&w.jsx(p_,{componentType:"chat"}),S.clearChat&&w.jsx(Tx,{componentType:"chat",onClearChat:d}),S.endConversation&&w.jsx(vx,{componentType:"chat",onEndConversation:f}),S.downloadTranscript&&w.jsx(_x,{componentType:"chat",onDownloadTranscript:m})]})})]})},hv=e=>{var d;const{children:t,disabled:n}=e,[r,i]=k.useState((d=e.container)==null?void 0:d.current),s=k.useSyncExternalStore(UH,()=>!1,()=>!0),{getRootNode:u}=Zl();if(k.useEffect(()=>{i(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),s||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:BH(u);return w.jsx(w.Fragment,{children:k.Children.map(t,f=>Ns.createPortal(f,c))})},BH=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return jo(n)?n:Kr(t).body},UH=()=>()=>{},mv=({componentType:e,onClearChat:t,onClose:n,onEndConversation:r,onDownloadTranscript:i})=>{const{headerConfig:s,enableMinimize:u,enableDownloadTranscript:c}=st(),{active:d,onError:f}=y_(),h=k.useMemo(()=>x1(e,s==null?void 0:s.actions,{enableMinimize:!!u,enableDownloadTranscript:c!=null?c:!0}),[e,s==null?void 0:s.actions,u,c]);return w.jsx(YF,M({componentType:e,overflowActions:e==="modal"?b1:E1,availableActions:h,onClearChat:t,onClose:n,onEndConversation:r,onDownloadTranscript:i},d?{controls:w.jsx(E_,{componentType:e,availableActions:h,onClose:n,onClearChat:t,onEndConversation:r,onDownloadTranscript:i,onError:f})}:{}))},gv=({scrollSnapshotRef:e})=>{const{layoutPreset:t,globalClassName:n,themeVariables:r,messageAlignment:i}=st(),{mode:s,status:u,dialogPosition:c,isDialogFullHeight:d,dialogWidth:f}=tr(),{loading:h,isAgentTyping:m,resetConversation:E,endConversation:b,progressSteps:T,downloadTranscript:_}=zt(),I=Go(),v=Fm(),{isOpen:S}=u||{},R=!!u.isOpen,U=s==="standalone",B=m||h,A=()=>{zr(!1),ol()},G=W=>W.file?v(W):I(W.text);return w.jsx(s_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:R,initialFocusEl:Bp,children:w.jsx(hv,{children:w.jsx(Nm,{className:D(n,`${N}-dialog-positioner`),style:r,children:w.jsxs(km,{className:D(n,`${N}-container`,`${N}-dialog`,`${N}-dialog-content`,`${N}-layout-${t}`,c,d&&"full-height",{standalone:U,embedded:!U}),style:f?{width:f}:void 0,children:[w.jsx(mv,{componentType:"dialog",onClearChat:E,onEndConversation:b,onClose:A,onDownloadTranscript:_}),w.jsx(Cm,{className:D(n,`${N}-message-container`,`container-${i}`,{standalone:U,embedded:!U}),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:U,isOpen:S,scrollSnapshotRef:e})}),w.jsx(Zm,{steps:T,globalClassName:n}),w.jsx(Mh,{componentType:"dialog",isLoading:B,onSubmit:G})]})})})})},yv=({scrollSnapshotRef:e})=>{const{layoutPreset:t,globalClassName:n,themeVariables:r,messageAlignment:i}=st(),{mode:s,status:u,isModalFullscreen:c}=tr(),{loading:d,isAgentTyping:f,resetConversation:h,endConversation:m,progressSteps:E,downloadTranscript:b}=zt(),T=Go(),_=Fm(),{isOpen:I}=u||{},v=!!u.isOpen,S=s==="standalone",R=f||d,U=({open:G})=>{if(G){zr(!0);return}B()},B=()=>{zr(!1),ol()},A=G=>G.file?_(G):T(G.text);return v?w.jsx(s_,{lazyMount:!0,unmountOnExit:!0,open:v,onOpenChange:U,initialFocusEl:Bp,children:w.jsx(hv,{children:w.jsxs("div",{className:D(n,`${N}-modal-container`),style:r,children:[w.jsx(t_,{className:D(n,`${N}-modal-backdrop`)}),w.jsx(Nm,{className:D(n,`${N}-container`,`${N}-modal`,`${N}-layout-${t}`,{fullscreen:c,standalone:S,embedded:!S}),children:w.jsxs(km,{className:D(n,`${N}-modal-content`,{standalone:S,embedded:!S}),children:[w.jsx(mv,{componentType:"modal",onClearChat:h,onEndConversation:m,onClose:B,onDownloadTranscript:b}),w.jsx(Cm,{className:D(n,`${N}-message-container`,`container-${i}`,{standalone:S,embedded:!S}),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:S,isOpen:I,scrollSnapshotRef:e})}),w.jsx(Zm,{steps:E,globalClassName:n}),w.jsx(Mh,{componentType:"modal",isLoading:R,onSubmit:A})]})})]})})}):null},jH=()=>{const e=tr(),t=k.useRef(null),{status:{type:n,isMinimized:r}}=e||{status:{}};return r?w.jsx(mO,{}):n==="dialog"?w.jsx(gv,{scrollSnapshotRef:t}):n==="modal"?w.jsx(yv,{scrollSnapshotRef:t}):w.jsx(pv,{})},HH=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:i}=HF();k.useEffect(()=>{const s=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"&&i(d))};return LF(s),()=>{DF(s)}},[e,t,n,r,i])},Ev=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function $H({isReady:e,hasError:t,transmit:n}){const r=k.useRef([]),i=k.useRef(e);i.current=e;const s=k.useRef(n);s.current=n;const u=k.useCallback((c,d)=>{i.current?Ev(s.current,c,d):r.current.push({prompt:c,options:d})},[]);return k.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(({prompt:d,options:f})=>Ev(s.current,d,f))}},[e]),k.useEffect(()=>{t&&(r.current=[])},[t]),u}const bv={copilot:"Ask Copilot",messaging:"Ask a question"},zH=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=st(),{placeholder:i,isResponseLoading:s}=nd(),u=i||bv[r],[c,d]=k.useState(""),f=t||s,h=m=>{const E=c.trim();E&&(m.preventDefault(),e(E),d(""))};return w.jsxs("form",{className:D(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:h,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(Em,{className:D(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:D(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),w.jsx(kr,{className:D(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Up,{}),disabled:f})]})},VH=()=>{const{globalClassName:e,mode:t}=st(),{placeholder:n}=nd(),r=n||bv[t];return w.jsxs("div",{className:D(e,`${N}-prompts-header`),children:[w.jsx(Em,{className:D(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:D(e,`${N}-prompts-header-text`),children:r})]})},wv=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:i}=st(),s=i==null?void 0:i.icon,u=(c=i==null?void 0:i.iconPosition)!=null?c:"left";return w.jsxs("button",{className:D(r,`${N}-prompts-button`,{"has-icon":!!s,"icon-right":!!s&&u==="right"}),disabled:t,onClick:n,children:[s&&w.jsx(f_,{icon:s,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},qH="Ask me something else",WH=({label:e,disabled:t=!1})=>w.jsx(wv,{label:e||qH,disabled:t,onClick:()=>zr(!0)}),YH=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=st(),{staticQuestions:r,askElseButtonLabel:i,disableAskElseButton:s}=nd();if(!(r!=null&&r.length))return null;const u=c=>()=>{const d=c.trim();d&&e(d)};return w.jsxs("div",{className:D(n,`${N}-prompts-button-group`),children:[r.map(c=>w.jsx(wv,{label:c,disabled:t,onClick:u(c)},c)),!s&&w.jsx(WH,{label:i,disabled:t})]})},GH=()=>{const{globalClassName:e,themeVariables:t,enablePageContext:n}=st(),{isOpen:r,elementId:i,promptsDisplay:s}=nd(),{isConnected:u,sessionExpired:c,sendMessage:d,connectionStatus:f}=zt(),{productId:h}=Rm(),m=s!=="buttons",E=s!=="input",[b,T]=k.useState(null),_=f==="error",I=f==="connecting",v=Zy(u,c),S=$H({isReady:v,hasError:_,transmit:d});k.useEffect(()=>{if(!i||b)return;const U=document.getElementById(i);U&&T(U)},[i,b]);const R=k.useCallback(U=>{if(zr(!0),n){S(U);return}const{prompt:B,display:A}=_p(U,h);if(A&&A.length>0){S(B,{displayContent:A});return}S(B)},[S,h,n]);return!r||!b?null:Ns.createPortal(w.jsxs("div",{className:D(e,`${N}-prompts-extension-container`),style:t,children:[m&&w.jsx(zH,{onSubmit:R,disabled:_}),!m&&w.jsx(VH,{}),E&&w.jsx(YH,{onPromptClick:R,disabled:_}),!_&&I&&w.jsx("p",{className:D(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),_&&w.jsx("p",{className:D(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),b)},XH=()=>(HH(),w.jsx(GH,{})),xv=e=>w.jsxs(_E,ce(M({},e),{children:[w.jsx(jH,{}),w.jsx(XH,{})]}));function Tv(e,t){return Ie(this,null,function*(){return oE().sendMessage(e,t)})}const KH={components:{setEntryType:Pc,toggleWidgetOpen:zr,toggleWidgetMinimized:wo,toggleModalFullscreen:Rc,setWidgetType:Es,setWidgetDialogPosition:Lc,loadPromptsComponent:BF,togglePromptsExtensionOpen:l_},session:{resetConversation:UF,endConversation:jF,sendMessage:Tv},pageContext:{set:Dc,get:bs,clear:Uf},cart:{update:kN}};var dd={},_v;function QH(){if(_v)return dd;_v=1;var e=CE();return dd.createRoot=e.createRoot,dd.hydrateRoot=e.hydrateRoot,dd}var JH=QH();const vv=new WeakMap,Sv=(e,t,n,r)=>{var s;(s=vv.get(e))==null||s.unmount();const i=JH.createRoot(e);vv.set(e,i),i.render(w.jsx(xv,ce(M({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},ZH=s=>{var u=s,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,i=_n(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let c;const d=(h,m)=>{for(const E of h)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(kt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(c),Sv(b,i,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),c=setTimeout(()=>{f.disconnect(),kt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},e$=s=>{var u=s,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,i=_n(u,["timeout","elementId","overridesUrl","overrides"]);if(!i.messagingConfig){kt(!0,"error","Messaging Widget requires messagingConfig");return}if(!i.messagingConfig.scrt2Url||!i.messagingConfig.orgId||!i.messagingConfig.esDeveloperName){kt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const c=document.getElementById(t);if(!c){kt(!0,"warn","Container element not found for id:",t),kt(!0,"warn","Beginning observation for element"),ZH(M({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},i));return}Sv(c,i,n,r)};function t$(){return Ie(this,null,function*(){return oE().getAuthLinkKey()})}class n$ extends HTMLElement{constructor(){super(...arguments);We(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}Fe.AgentForceWidget=xv,Fe.AgentforceWidgetProvider=_E,Fe.CART_UPDATE_EVENT=Cc,Fe.CIMULATE_WIDGET_READY_EVENT=l1,Fe.MessagingDialog=gv,Fe.MessagingEmbed=pv,Fe.MessagingModal=yv,Fe.MessagingProvider=uE,Fe.OverrideElement=n$,Fe.addCartUpdateListener=XA,Fe.clearPageContext=Uf,Fe.eventHandlers=KH,Fe.getAuthLinkKey=t$,Fe.getPageContext=bs,Fe.injectMessagingWidget=e$,Fe.removeCartUpdateListener=KA,Fe.sendMessage=Tv,Fe.setPageContext=Dc,Fe.useMessaging=zt,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));
52
+ `))}function d(b,T,_,I){const v=_.enter("tableCell"),S=_.enter("phrasing"),R=_.containerPhrasing(b,ce(M({},I),{before:s,after:s}));return S(),v(),R}function f(b,T){return XB(b,{align:T,alignDelimiters:r,padding:n,stringLength:i})}function h(b,T,_){const I=b.children;let v=-1;const S=[],R=T.enter("table");for(;++v<I.length;)S[v]=m(I[v],T,_);return R(),S}function m(b,T,_){const I=b.children;let v=-1;const S=[],R=T.enter("tableRow");for(;++v<I.length;)S[v]=d(I[v],b,T,_);return R(),S}function E(b,T,_){let I=F_.inlineCode(b,T,_);return _.stack.includes("tableCell")&&(I=I.replace(/\|/g,"\\$&")),I}}function MU(){return{exit:{taskListCheckValueChecked:U_,taskListCheckValueUnchecked:U_,paragraph:BU}}}function FU(){return{unsafe:[{atBreak:!0,character:"-",after:"[:|-]"}],handlers:{listItem:UU}}}function U_(e){const t=this.stack[this.stack.length-2];t.type,t.checked=e.type==="taskListCheckValueChecked"}function BU(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 i=t.children;let s=-1,u;for(;++s<i.length;){const c=i[s];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 UU(e,t,n,r){const i=e.children[0],s=typeof e.checked=="boolean"&&i&&i.type==="paragraph",u="["+(e.checked?"x":" ")+"] ",c=n.createTracker(r);s&&c.move(u);let d=F_.listItem(e,t,n,M(M({},r),c.current()));return s&&(d=d.replace(/^(?:[*+-]|\d+\.)([\r\n]| {1,3})/,f)),d;function f(h){return h+u}}function jU(){return[EB(),UB(),zB(),NU(),MU()]}function HU(e){return{extensions:[bB(),jB(e),VB(),DU(e),FU()]}}const $U={tokenize:GU,partial:!0},j_={tokenize:XU,partial:!0},H_={tokenize:KU,partial:!0},$_={tokenize:QU,partial:!0},zU={tokenize:JU,partial:!0},z_={name:"wwwAutolink",tokenize:WU,previous:q_},V_={name:"protocolAutolink",tokenize:YU,previous:W_},yi={name:"emailAutolink",tokenize:qU,previous:Y_},ii={};function VU(){return{text:ii}}let Xo=48;for(;Xo<123;)ii[Xo]=yi,Xo++,Xo===58?Xo=65:Xo===91&&(Xo=97);ii[43]=yi,ii[45]=yi,ii[46]=yi,ii[95]=yi,ii[72]=[yi,V_],ii[104]=[yi,V_],ii[87]=[yi,z_],ii[119]=[yi,z_];function qU(e,t,n){const r=this;let i,s;return u;function u(m){return!Wm(m)||!Y_.call(r,r.previous)||Ym(r.events)?n(m):(e.enter("literalAutolink"),e.enter("literalAutolinkEmail"),c(m))}function c(m){return Wm(m)?(e.consume(m),c):m===64?(e.consume(m),d):n(m)}function d(m){return m===46?e.check(zU,h,f)(m):m===45||m===95||kn(m)?(s=!0,e.consume(m),d):h(m)}function f(m){return e.consume(m),i=!0,d}function h(m){return s&&i&&Dn(r.previous)?(e.exit("literalAutolinkEmail"),e.exit("literalAutolink"),t(m)):n(m)}}function WU(e,t,n){const r=this;return i;function i(u){return u!==87&&u!==119||!q_.call(r,r.previous)||Ym(r.events)?n(u):(e.enter("literalAutolink"),e.enter("literalAutolinkWww"),e.check($U,e.attempt(j_,e.attempt(H_,s),n),n)(u))}function s(u){return e.exit("literalAutolinkWww"),e.exit("literalAutolink"),t(u)}}function YU(e,t,n){const r=this;let i="",s=!1;return u;function u(m){return(m===72||m===104)&&W_.call(r,r.previous)&&!Ym(r.events)?(e.enter("literalAutolink"),e.enter("literalAutolinkHttp"),i+=String.fromCodePoint(m),e.consume(m),c):n(m)}function c(m){if(Dn(m)&&i.length<5)return i+=String.fromCodePoint(m),e.consume(m),c;if(m===58){const E=i.toLowerCase();if(E==="http"||E==="https")return e.consume(m),d}return n(m)}function d(m){return m===47?(e.consume(m),s?f:(s=!0,d)):n(m)}function f(m){return m===null||ll(m)||Nt(m)||Po(m)||dl(m)?n(m):e.attempt(j_,e.attempt(H_,h),n)(m)}function h(m){return e.exit("literalAutolinkHttp"),e.exit("literalAutolink"),t(m)}}function GU(e,t,n){let r=0;return i;function i(u){return(u===87||u===119)&&r<3?(r++,e.consume(u),i):u===46&&r===3?(e.consume(u),s):n(u)}function s(u){return u===null?n(u):t(u)}}function XU(e,t,n){let r,i,s;return u;function u(f){return f===46||f===95?e.check($_,d,c)(f):f===null||Nt(f)||Po(f)||f!==45&&dl(f)?d(f):(s=!0,e.consume(f),u)}function c(f){return f===95?r=!0:(i=r,r=void 0),e.consume(f),u}function d(f){return i||r||!s?n(f):t(f)}}function KU(e,t){let n=0,r=0;return i;function i(u){return u===40?(n++,e.consume(u),i):u===41&&r<n?s(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($_,t,s)(u):u===null||Nt(u)||Po(u)?t(u):(e.consume(u),i)}function s(u){return u===41&&r++,e.consume(u),i}}function QU(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),s):c===93?(e.consume(c),i):c===60||c===null||Nt(c)||Po(c)?t(c):n(c)}function i(c){return c===null||c===40||c===91||Nt(c)||Po(c)?t(c):r(c)}function s(c){return Dn(c)?u(c):n(c)}function u(c){return c===59?(e.consume(c),r):Dn(c)?(e.consume(c),u):n(c)}}function JU(e,t,n){return r;function r(s){return e.consume(s),i}function i(s){return kn(s)?n(s):t(s)}}function q_(e){return e===null||e===40||e===42||e===95||e===91||e===93||e===126||Nt(e)}function W_(e){return!Dn(e)}function Y_(e){return!(e===47||Wm(e))}function Wm(e){return e===43||e===45||e===46||e===95||kn(e)}function Ym(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 ZU={tokenize:aj,partial:!0};function ej(){return{document:{91:{name:"gfmFootnoteDefinition",tokenize:ij,continuation:{tokenize:oj},exit:sj}},text:{91:{name:"gfmFootnoteCall",tokenize:rj},93:{name:"gfmPotentialFootnoteCall",add:"after",tokenize:tj,resolveTo:nj}}}}function tj(e,t,n){const r=this;let i=r.events.length;const s=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let u;for(;i--;){const d=r.events[i][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=Cr(r.sliceSerialize({start:u.end,end:r.now()}));return f.codePointAt(0)!==94||!s.includes(f.slice(1))?n(d):(e.enter("gfmFootnoteCallLabelMarker"),e.consume(d),e.exit("gfmFootnoteCallLabelMarker"),t(d))}}function nj(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)},i={type:"gfmFootnoteCallMarker",start:Object.assign({},e[n+3][1].end),end:Object.assign({},e[n+3][1].end)};i.end.column++,i.end.offset++,i.end._bufferIndex++;const s={type:"gfmFootnoteCallString",start:Object.assign({},i.end),end:Object.assign({},e[e.length-1][1].start)},u={type:"chunkString",contentType:"string",start:Object.assign({},s.start),end:Object.assign({},s.end)},c=[e[n+1],e[n+2],["enter",r,t],e[n+3],e[n+4],["enter",i,t],["exit",i,t],["enter",s,t],["enter",u,t],["exit",u,t],["exit",s,t],e[e.length-2],e[e.length-1],["exit",r,t]];return e.splice(n,e.length-n+1,...c),e}function rj(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s=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(s>999||m===93&&!u||m===null||m===91||Nt(m))return n(m);if(m===93){e.exit("chunkString");const E=e.exit("gfmFootnoteCallString");return i.includes(Cr(r.sliceSerialize(E)))?(e.enter("gfmFootnoteCallLabelMarker"),e.consume(m),e.exit("gfmFootnoteCallLabelMarker"),e.exit("gfmFootnoteCall"),t):n(m)}return Nt(m)||(u=!0),s++,e.consume(m),m===92?h:f}function h(m){return m===91||m===92||m===93?(e.consume(m),s++,f):f(m)}}function ij(e,t,n){const r=this,i=r.parser.gfmFootnotes||(r.parser.gfmFootnotes=[]);let s,u=0,c;return d;function d(T){return e.enter("gfmFootnoteDefinition")._container=!0,e.enter("gfmFootnoteDefinitionLabel"),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),f}function f(T){return T===94?(e.enter("gfmFootnoteDefinitionMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionMarker"),e.enter("gfmFootnoteDefinitionLabelString"),e.enter("chunkString").contentType="string",h):n(T)}function h(T){if(u>999||T===93&&!c||T===null||T===91||Nt(T))return n(T);if(T===93){e.exit("chunkString");const _=e.exit("gfmFootnoteDefinitionLabelString");return s=Cr(r.sliceSerialize(_)),e.enter("gfmFootnoteDefinitionLabelMarker"),e.consume(T),e.exit("gfmFootnoteDefinitionLabelMarker"),e.exit("gfmFootnoteDefinitionLabel"),E}return Nt(T)||(c=!0),u++,e.consume(T),T===92?m:h}function m(T){return T===91||T===92||T===93?(e.consume(T),u++,h):h(T)}function E(T){return T===58?(e.enter("definitionMarker"),e.consume(T),e.exit("definitionMarker"),i.includes(s)||i.push(s),Et(e,b,"gfmFootnoteDefinitionWhitespace")):n(T)}function b(T){return t(T)}}function oj(e,t,n){return e.check(ou,t,e.attempt(ZU,t,n))}function sj(e){e.exit("gfmFootnoteDefinition")}function aj(e,t,n){const r=this;return Et(e,i,"gfmFootnoteDefinitionIndent",5);function i(s){const u=r.events[r.events.length-1];return u&&u[1].type==="gfmFootnoteDefinitionIndent"&&u[2].sliceSerialize(u[1],!0).length===4?t(s):n(s)}}function uj(e){let n=(e||{}).singleTilde;const r={name:"strikethrough",tokenize:s,resolveAll:i};return n==null&&(n=!0),{text:{126:r},insideSpan:{null:[r]},attentionMarkers:{null:[126]}};function i(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 h={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)},E=[["enter",h,c],["enter",u[f][1],c],["exit",u[f][1],c],["enter",m,c]],b=c.parser.constructs.insideSpan.null;b&&ir(E,E.length,0,fl(b,u.slice(f+1,d),c)),ir(E,E.length,0,[["exit",m,c],["enter",u[d][1],c],["exit",u[d][1],c],["exit",h,c]]),ir(u,f-1,d-f+3,E),d=f+E.length-2;break}}for(d=-1;++d<u.length;)u[d][1].type==="strikethroughSequenceTemporary"&&(u[d][1].type="data");return u}function s(u,c,d){const f=this.previous,h=this.events;let m=0;return E;function E(T){return f===126&&h[h.length-1][1].type!=="characterEscape"?d(T):(u.enter("strikethroughSequenceTemporary"),b(T))}function b(T){const _=Rs(f);if(T===126)return m>1?d(T):(u.consume(T),m++,b);if(m<2&&!n)return d(T);const I=u.exit("strikethroughSequenceTemporary"),v=Rs(T);return I._open=!v||v===2&&!!_,I._close=!_||_===2&&!!v,c(T)}}}class cj{constructor(){this.map=[]}add(t,n,r){lj(this,t,n,r)}consume(t){if(this.map.sort(function(s,u){return s[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 i=r.pop();for(;i;){for(const s of i)t.push(s);i=r.pop()}this.map.length=0}}function lj(e,t,n,r){let i=0;if(!(n===0&&r.length===0)){for(;i<e.map.length;){if(e.map[i][0]===t){e.map[i][1]+=n,e.map[i][2].push(...r);return}i+=1}e.map.push([t,n,r])}}function dj(e,t){let n=!1;const r=[];for(;t<e.length;){const i=e[t];if(n){if(i[0]==="enter")i[1].type==="tableContent"&&r.push(e[t+1][1].type==="tableDelimiterMarker"?"left":"none");else if(i[1].type==="tableContent"){if(e[t-1][1].type==="tableDelimiterMarker"){const s=r.length-1;r[s]=r[s]==="left"?"center":"right"}}else if(i[1].type==="tableDelimiterRow")break}else i[0]==="enter"&&i[1].type==="tableDelimiterRow"&&(n=!0);t+=1}return r}function fj(){return{flow:{null:{name:"table",tokenize:pj,resolveAll:hj}}}}function pj(e,t,n){const r=this;let i=0,s=0,u;return c;function c(H){let ee=r.events.length-1;for(;ee>-1;){const V=r.events[ee][1].type;if(V==="lineEnding"||V==="linePrefix")ee--;else break}const Q=ee>-1?r.events[ee][1].type:null,me=Q==="tableHead"||Q==="tableRow"?A:d;return me===A&&r.parser.lazy[r.now().line]?n(H):me(H)}function d(H){return e.enter("tableHead"),e.enter("tableRow"),f(H)}function f(H){return H===124||(u=!0,s+=1),h(H)}function h(H){return H===null?n(H):Ye(H)?s>1?(s=0,r.interrupt=!0,e.exit("tableRow"),e.enter("lineEnding"),e.consume(H),e.exit("lineEnding"),b):n(H):mt(H)?Et(e,h,"whitespace")(H):(s+=1,u&&(u=!1,i+=1),H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),u=!0,h):(e.enter("data"),m(H)))}function m(H){return H===null||H===124||Nt(H)?(e.exit("data"),h(H)):(e.consume(H),H===92?E:m)}function E(H){return H===92||H===124?(e.consume(H),m):m(H)}function b(H){return r.interrupt=!1,r.parser.lazy[r.now().line]?n(H):(e.enter("tableDelimiterRow"),u=!1,mt(H)?Et(e,T,"linePrefix",r.parser.constructs.disable.null.includes("codeIndented")?void 0:4)(H):T(H))}function T(H){return H===45||H===58?I(H):H===124?(u=!0,e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),_):B(H)}function _(H){return mt(H)?Et(e,I,"whitespace")(H):I(H)}function I(H){return H===58?(s+=1,u=!0,e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),v):H===45?(s+=1,v(H)):H===null||Ye(H)?U(H):B(H)}function v(H){return H===45?(e.enter("tableDelimiterFiller"),S(H)):B(H)}function S(H){return H===45?(e.consume(H),S):H===58?(u=!0,e.exit("tableDelimiterFiller"),e.enter("tableDelimiterMarker"),e.consume(H),e.exit("tableDelimiterMarker"),R):(e.exit("tableDelimiterFiller"),R(H))}function R(H){return mt(H)?Et(e,U,"whitespace")(H):U(H)}function U(H){return H===124?T(H):H===null||Ye(H)?!u||i!==s?B(H):(e.exit("tableDelimiterRow"),e.exit("tableHead"),t(H)):B(H)}function B(H){return n(H)}function A(H){return e.enter("tableRow"),G(H)}function G(H){return H===124?(e.enter("tableCellDivider"),e.consume(H),e.exit("tableCellDivider"),G):H===null||Ye(H)?(e.exit("tableRow"),t(H)):mt(H)?Et(e,G,"whitespace")(H):(e.enter("data"),W(H))}function W(H){return H===null||H===124||Nt(H)?(e.exit("data"),G(H)):(e.consume(H),H===92?re:W)}function re(H){return H===92||H===124?(e.consume(H),W):W(H)}}function hj(e,t){let n=-1,r=!0,i=0,s=[0,0,0,0],u=[0,0,0,0],c=!1,d=0,f,h,m;const E=new cj;for(;++n<e.length;){const b=e[n],T=b[1];b[0]==="enter"?T.type==="tableHead"?(c=!1,d!==0&&(G_(E,t,d,f,h),h=void 0,d=0),f={type:"table",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",f,t]])):T.type==="tableRow"||T.type==="tableDelimiterRow"?(r=!0,m=void 0,s=[0,0,0,0],u=[0,n+1,0,0],c&&(c=!1,h={type:"tableBody",start:Object.assign({},T.start),end:Object.assign({},T.end)},E.add(n,0,[["enter",h,t]])),i=T.type==="tableDelimiterRow"?2:h?3:1):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")?(r=!1,u[2]===0&&(s[1]!==0&&(u[0]=u[1],m=sd(E,t,s,i,void 0,m),s=[0,0,0,0]),u[2]=n)):T.type==="tableCellDivider"&&(r?r=!1:(s[1]!==0&&(u[0]=u[1],m=sd(E,t,s,i,void 0,m)),s=u,u=[s[1],n,0,0])):T.type==="tableHead"?(c=!0,d=n):T.type==="tableRow"||T.type==="tableDelimiterRow"?(d=n,s[1]!==0?(u[0]=u[1],m=sd(E,t,s,i,n,m)):u[1]!==0&&(m=sd(E,t,u,i,n,m)),i=0):i&&(T.type==="data"||T.type==="tableDelimiterMarker"||T.type==="tableDelimiterFiller")&&(u[3]=n)}for(d!==0&&G_(E,t,d,f,h),E.consume(t.events),n=-1;++n<t.events.length;){const b=t.events[n];b[0]==="enter"&&b[1].type==="table"&&(b[1]._align=dj(t.events,n))}return e}function sd(e,t,n,r,i,s){const u=r===1?"tableHeader":r===2?"tableDelimiter":"tableData",c="tableContent";n[0]!==0&&(s.end=Object.assign({},ia(t.events,n[0])),e.add(n[0],0,[["exit",s,t]]));const d=ia(t.events,n[1]);if(s={type:u,start:Object.assign({},d),end:Object.assign({},d)},e.add(n[1],0,[["enter",s,t]]),n[2]!==0){const f=ia(t.events,n[2]),h=ia(t.events,n[3]),m={type:c,start:Object.assign({},f),end:Object.assign({},h)};if(e.add(n[2],0,[["enter",m,t]]),r!==2){const E=t.events[n[2]],b=t.events[n[3]];if(E[1].end=Object.assign({},b[1].end),E[1].type="chunkText",E[1].contentType="text",n[3]>n[2]+1){const T=n[2]+1,_=n[3]-n[2]-1;e.add(T,_,[])}}e.add(n[3]+1,0,[["exit",m,t]])}return i!==void 0&&(s.end=Object.assign({},ia(t.events,i)),e.add(i,0,[["exit",s,t]]),s=void 0),s}function G_(e,t,n,r,i){const s=[],u=ia(t.events,n);i&&(i.end=Object.assign({},u),s.push(["exit",i,t])),r.end=Object.assign({},u),s.push(["exit",r,t]),e.add(n+1,0,s)}function ia(e,t){const n=e[t],r=n[0]==="enter"?"start":"end";return n[1][r]}const mj={name:"tasklistCheck",tokenize:yj};function gj(){return{text:{91:mj}}}function yj(e,t,n){const r=this;return i;function i(d){return r.previous!==null||!r._gfmTasklistFirstContentOfListItem?n(d):(e.enter("taskListCheck"),e.enter("taskListCheckMarker"),e.consume(d),e.exit("taskListCheckMarker"),s)}function s(d){return Nt(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 Ye(d)?t(d):mt(d)?e.check({tokenize:Ej},t,n)(d):n(d)}}function Ej(e,t,n){return Et(e,r,"whitespace");function r(i){return i===null?n(i):t(i)}}function bj(e){return bb([VU(),ej(),uj(e),fj(),gj()])}const wj={};function xj(e){const t=this,n=e||wj,r=t.data(),i=r.micromarkExtensions||(r.micromarkExtensions=[]),s=r.fromMarkdownExtensions||(r.fromMarkdownExtensions=[]),u=r.toMarkdownExtensions||(r.toMarkdownExtensions=[]);i.push(bj(n)),s.push(jU()),u.push(HU(n))}const Tj=()=>w.jsx("span",{className:`${N}-blinking-cursor`,children:w.jsx("svg",{"aria-hidden":"true",height:"16px",width:"16px",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("circle",{r:"0.45rem",cx:"0.5rem",cy:"0.55rem",fill:"black"})})});function _j(e){return/^tel:/i.test(e)?e:dw(e)}const oa=({globalClassName:e,openLinksInNewTab:t,showIsLoading:n,text:r,onLinkClick:i})=>w.jsx("div",{className:D(e,`${N}-markdown`),children:w.jsx(lw,{remarkPlugins:[xj],rehypePlugins:[fx],urlTransform:_j,components:{h1:({children:s})=>w.jsx("h1",{className:D(e,`${N}-header h1`),children:s}),h2:({children:s})=>w.jsx("h2",{className:D(e,`${N}-header h2`),children:s}),h3:({children:s})=>w.jsx("h3",{className:D(e,`${N}-header h3`),children:s}),ul:({children:s})=>w.jsx("ul",{className:D(e,`${N}-ul`),children:s}),ol:({children:s})=>w.jsx("ol",{className:D(e,`${N}-ol`),children:s}),li:({children:s})=>w.jsx("li",{className:D(e,`${N}-li`),children:s}),a:({href:s,children:u})=>w.jsx(bx,{globalClassName:e,openLinksInNewTab:t,href:s,onClick:i,children:u}),table:({children:s})=>w.jsx("div",{className:D(e,`${N}-table-container`),children:w.jsx("table",{className:D(e,`${N}-table`),children:s})}),thead:({children:s})=>w.jsx("thead",{className:D(e,`${N}-thead`),children:s}),tbody:({children:s})=>w.jsx("tbody",{className:D(e,`${N}-tbody`),children:s}),tr:({children:s})=>w.jsx("tr",{className:D(e,`${N}-tr`),children:s}),th:({children:s})=>w.jsx("th",{className:D(e,`${N}-th`),children:s}),td:({children:s})=>w.jsx("td",{className:D(e,`${N}-td`),children:s}),span:({className:s,children:u})=>s===`${N}-blinking-cursor`?w.jsx(Tj,{}):w.jsx("span",{children:u})},children:r+(n?`<span className='${N}-blinking-cursor'></span>`:"")})});function vj(){const{messages:e}=zt();return k.useMemo(()=>gN(e,"cart"),[e])}function Sj(e){return ut({attr:{viewBox:"0 0 24 24"},child:[{tag:"g",attr:{id:"Image_Off"},child:[{tag:"path",attr:{d:"M19.937,14.218l0,-8.654c0,-0.829 -0.672,-1.5 -1.5,-1.5l-10.628,-0c-0.276,-0 -0.5,-0.225 -0.5,-0.5c0,-0.276 0.224,-0.5 0.5,-0.5l10.628,-0c1.38,-0 2.5,1.118 2.5,2.5l0,10.624c0,0.276 -0.224,0.5 -0.5,0.501c-0.276,-0 -0.5,-0.225 -0.5,-0.5l0,-0.556l-4.583,-4.584c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.162,0.162 2.37,2.37 3.876,3.876Zm-0.121,6.304c-0.395,0.262 -0.869,0.415 -1.379,0.415l-12.874,-0c-1.381,-0 -2.5,-1.119 -2.5,-2.5l0,-12.873c0,-0.51 0.153,-0.984 0.414,-1.38l-0.263,-0.263c-0.456,-0.456 0.251,-1.163 0.707,-0.707c0.088,0.088 0.176,0.176 0.263,0.263c0.245,0.245 16.095,16.094 16.339,16.338l0.263,0.263c0.455,0.456 -0.252,1.163 -0.707,0.707c-0.088,-0.087 -0.175,-0.175 -0.263,-0.263Zm-11.104,-11.103l-2.001,-2.001c-0.094,0.196 -0.146,0.415 -0.146,0.647c-0,0.829 0.672,1.5 1.5,1.5c0.232,-0 0.451,-0.052 0.647,-0.146Zm-2.733,-2.733l-1.77,-1.77c-0.093,0.196 -0.146,0.416 -0.146,0.648l0,10.717l1.926,-1.926c0.587,-0.586 1.536,-0.586 2.122,-0l0.555,0.554c0.195,0.196 0.511,0.196 0.706,0l2.415,-2.415l-2.343,-2.343c-0.395,0.262 -0.869,0.414 -1.379,0.414c-1.38,-0 -2.5,-1.119 -2.5,-2.5c-0,-0.509 0.152,-0.983 0.414,-1.379Zm-1.916,11.009l0,0.741c0,0.829 0.671,1.5 1.5,1.5l12.874,0c0.232,0 0.451,-0.052 0.647,-0.145c-0.165,-0.165 -3.264,-3.263 -6.59,-6.59l-2.414,2.415c-0.585,0.586 -1.537,0.586 -2.122,0l-0.554,-0.554c-0.195,-0.196 -0.512,-0.196 -0.708,0l-2.633,2.633Z"},child:[]}]}]})(e)}const Aj=({imageUrl:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:i,ariaLabel:s,name:u,showInWidgetDetails:c})=>{const{loading:d}=zt(),{onNavigate:f}=st();return w.jsx("div",{className:D(t,`${N}-msg-product-card__image-wrapper`),children:e?n?w.jsx("button",{type:"button",className:D(t,`${N}-msg-product-card__image-button`),onClick:c,disabled:d,"aria-label":s,children:w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):r?w.jsx("a",{href:r,target:i?"_blank":"_self",rel:"noopener","aria-label":s,onClick:h=>Ru({event:h,href:r,openLinksInNewTab:i,isCartMgmtSupported:n,onNavigate:f}),children:w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"})}):w.jsx("img",{className:D(t,`${N}-msg-product-card__image`),src:e,alt:u||"Product image",loading:"lazy"}):w.jsx("div",{className:D(t,`${N}-msg-product-card__image-placeholder`),"aria-label":u?`No image for ${u}`:"No product image",role:"img",children:w.jsx(Sj,{"aria-hidden":"true"})})})},kj=({name:e,globalClassName:t,isCartMgmtSupported:n,productPageUrl:r,openLinksInNewTab:i,ariaLabel:s,showInWidgetDetails:u})=>{const{loading:c}=zt(),{onNavigate:d}=st();return n?w.jsx("button",{type:"button",disabled:c,onClick:u,className:D(t,`${N}-msg-product-card__title-link`),"aria-label":s,children:e}):r?w.jsx("a",{href:r,target:i?"_blank":"_self",rel:"noopener",className:D(t,`${N}-msg-product-card__title-link`),"aria-label":s,onClick:f=>Ru({event:f,href:r,openLinksInNewTab:i,isCartMgmtSupported:n,onNavigate:d}),children:e}):w.jsx("p",{className:D(t,`${N}-msg-product-card__title`),children:e})},Cj=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1,rawProduct:i})=>{const{showProductDescription:s,onNavigate:u}=st(),{overrides:c,isInitialized:d}=Rr(),{loading:f}=zt(),h=Go(),m=gi("ProductTile"),E=d?c.ProductTile:void 0;if(E){const Q={name:"ProductTile",payload:i!=null?i:{},api:m};return w.jsx(ri,{tagName:E,props:Q,label:"ProductTile"})}const{id:b,name:T,imageUrl:_,description:I,productPageUrl:v,price:S,priceBreakdown:R,discountPrice:U,listPrice:B,currencyCode:A}=e,G=U!=null?U:S,W=XF({priceBreakdown:R,currencyCode:A}),re=()=>{if(f)return;const Q=T||"this product",me=b?` [SKU: ${b}]`:"";h(`Show me details for ${Q}${me}`)},H=Q=>qi({event:Q,openLinksInNewTab:n,onNavigate:u}),ee=r?`View details for ${T}`:`Go to product page for ${T}`;return w.jsxs("div",{className:D(t,`${N}-msg-product-card`),children:[w.jsx(Aj,{imageUrl:_||"",globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:ee,name:T,showInWidgetDetails:re}),w.jsxs("div",{className:D(t,`${N}-msg-product-card__content`),children:[w.jsxs("div",{className:D(t,`${N}-msg-product-card__content-header`),children:[w.jsx(kj,{name:T||b,globalClassName:t,isCartMgmtSupported:r,productPageUrl:v,openLinksInNewTab:n,ariaLabel:ee,showInWidgetDetails:re}),s&&I&&w.jsx("div",{className:D(t,`${N}-msg-product-card__description`),title:I,children:w.jsx(oa,{globalClassName:t,text:I,openLinksInNewTab:n,onLinkClick:H})})]}),w.jsx("div",{className:D(t,`${N}-msg-product-card__price-row`),children:W?w.jsxs("div",{className:D(t,`${N}-msg-product-card__prices`),children:[w.jsx("span",{className:`${N}-visually-hidden`,children:"Current price: "}),w.jsx("span",{className:D(t,`${N}-msg-product-card__price`),children:W.active.value}),W.compare&&w.jsxs("span",{className:D(t,`${N}-msg-product-card__compare-price`),children:[w.jsxs("span",{className:`${N}-visually-hidden`,children:["Original price:"," "]}),W.compare.value]})]}):w.jsx(Mm,{globalClassName:t,retailPrice:B,discountPrice:G,currencyCode:A})})]})]})},Nj=e=>{var n,r,i;const t=Lm(e.data.promotions,(n=e.data.extendedData)==null?void 0:n.productPromotions);return{id:e.id,name:e.data.name,label:e.caption,description:e.data.description,imageUrl:e.data.imageUrl,productPageUrl:e.data.productPageUrl,price:e.data.price,discountPrice:t!=null?t:e.data.discountPrice,listPrice:(r=e.data.listPrice)!=null?r:t===void 0?void 0:e.data.price,priceBreakdown:(i=e.data.priceBreakdown)!=null?i:void 0,currencyCode:e.data.currencyCode}},Ij=({title:e,products:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:s=!1})=>{const{showProductCaptions:u,layoutPreset:c}=st(),{overrides:d,isInitialized:f}=Rr(),h=gi("ProductCarousel"),m=f?d.ProductCarousel:void 0;if(m){const E={name:"ProductCarousel",payload:{title:e,products:t},api:h};return w.jsx(ri,{tagName:m,props:E,label:"ProductCarousel"})}return w.jsxs("div",{className:D(n,`${N}-product-carousel`),children:[e&&w.jsx("p",{className:D(n,`${N}-product-carousel-title`),children:e}),w.jsx(hF,{globalClassName:n,spacing:c==="commerce"?"12px":i?"0.5rem":"6px",navigationVariant:c==="commerce"?"circle-arrow":"chevron",ariaLabel:e||"Product recommendations",children:t.map(E=>w.jsxs("div",{className:D(n,`${N}-product-carousel-item`),children:[w.jsx(Cj,{product:Nj(E),rawProduct:E,globalClassName:n,openLinksInNewTab:r,isCartMgmtSupported:s}),u&&w.jsx("p",{className:D(n,`${N}-product-carousel-caption`),title:E.caption,children:E.caption})]},E.id))})]})},Gm=44,Oj=400,Pj=e=>{const t=typeof e=="number"?e:Number(e);return!Number.isFinite(t)||t<=0?Gm:Math.min(Math.max(Math.round(t),Gm),Oj)},Rj=e=>{try{return new URL(e,window.location.href).origin}catch(t){return null}},Lj="parentOrigin",Dj=(e,t)=>{if(!t)return e;try{const n=new URL(e,window.location.href);return n.searchParams.set(Lj,t),n.toString()}catch(n){return e}},Mj=(e,t,n)=>{if(!e||!t)return null;try{const r=new URL(e,window.location.href);return r.origin!==window.location.origin||!/\/Payments-Express\/?$/.test(r.pathname)?null:(r.pathname=r.pathname.replace(/\/Payments-Express\/?$/,"/Payments-ExpressProduct"),r.searchParams.set("pid",t),r.searchParams.set("quantity",String(n)),r.toString())}catch(r){return null}},Fj="Payment failed. Please try again or choose another method.",Bj="Payment was canceled.",X_=(e,t)=>typeof e!="string"?t:e.trim()||t,K_=({expressPaymentUrl:e,globalClassName:t,onOrderComplete:n})=>{const r=k.useRef(null),[i,s]=k.useState(!1),[u,c]=k.useState(Gm),[d,f]=k.useState(null),h=typeof window!="undefined"?window.location.origin:"",m=Dj(e,h),E=Rj(e);return k.useEffect(()=>{const b=T=>{var I,v,S,R,U;if(E&&T.origin!==E||r.current&&T.source!==r.current.contentWindow)return;const _=T.data;if(!(!_||typeof _.type!="string"))switch(_.type){case"express.payment.available":s(!0),c(Pj((I=_.payload)==null?void 0:I.height));break;case"express.payment.unavailable":s(!1);break;case"express.payment.success":f(null),n==null||n((S=(v=_.payload)==null?void 0:v.orderId)!=null?S:null);break;case"express.payment.failure":f({text:X_((R=_.payload)==null?void 0:R.error,Fj),persist:!0});break;case"express.payment.cancel":{const B=X_((U=_.payload)==null?void 0:U.cancel,Bj);f(A=>A!=null&&A.persist?A:{text:B,persist:!1});break}}};return window.addEventListener("message",b),()=>window.removeEventListener("message",b)},[E,n]),w.jsxs(w.Fragment,{children:[d&&w.jsxs("div",{className:D(t,`${N}-cart-express-error`),role:"alert","data-testid":"express-payment-error",children:[w.jsx(EO,{"aria-hidden":"true"}),w.jsx("span",{children:d.text}),w.jsx("button",{type:"button",className:D(t,`${N}-cart-express-error-dismiss`),onClick:()=>f(null),"aria-label":"Dismiss","data-testid":"express-payment-error-dismiss",children:w.jsx(xO,{"aria-hidden":"true"})})]}),w.jsx("div",{className:D(t,`${N}-cart-express`,{[`${N}-cart-express-ready`]:i}),style:i?{height:u}:void 0,"data-testid":"express-payment","aria-hidden":!i,children:w.jsx("iframe",{ref:r,className:D(t,`${N}-cart-express-frame`),src:m,title:"Express payment",allow:"payment *",scrolling:"no"})})]})},ad=({code:e,globalClassName:t,inactive:n})=>w.jsxs("span",{className:D(t,`${N}-cart-chip`,{inactive:n}),title:n?"Not applied":void 0,children:[w.jsx(BE,{"aria-hidden":"true"}),w.jsx("span",{children:e})]}),Wn=({label:e,badge:t,value:n,currencyCode:r,globalClassName:i,emphasized:s,isDiscount:u,fallback:c,loading:d})=>{let f;if(typeof n=="number")f=mi(u&&n!==0?-Math.abs(n):n,r);else if(c)f=c;else return null;return w.jsxs("div",{className:D(i,`${N}-cart-total-row`,{emphasized:s}),children:[w.jsx("span",{className:D(i,`${N}-cart-total-label`),children:e}),t&&w.jsx("span",{className:D(i,`${N}-cart-total-badge`),children:t}),w.jsx("span",{className:D(i,`${N}-cart-total-value`),children:d?w.jsx("span",{className:D(i,`${N}-cart-total-shimmer`)}):f})]})};function Q_(e){var s;const n=((s=e.variants)!=null?s:[]).filter(u=>u.value).map(u=>`${u.lbl}: ${u.value}`).join(", "),r=n?` (${n})`:"",i=e.productId?` [SKU: ${e.productId}]`:"";return`${e.name}${r}${i}`}function J_(e){var r;const n=((r=e.variants)!=null?r:[]).filter(i=>i.value).map(i=>i.value).join(", ");return n?`${e.name} (${n})`:e.name}function Xm(e){return typeof e=="string"?e:e&&typeof e.code=="string"?e.code:null}function Km(e){return(e!=null?e:[]).map(Xm).filter(t=>t!==null)}function Z_(e){return e&&typeof e=="object"&&typeof e.status=="string"?e.status:void 0}function Uj(e,t){var i;const n=new Map;for(const s of t!=null?t:[]){const u=Xm(s),c=Z_(s);u!==null&&c!==void 0&&n.set(u.toLowerCase(),c)}const r=[];for(const s of e!=null?e:[]){const u=Xm(s);if(u===null)continue;const c=(i=Z_(s))!=null?i:n.get(u.toLowerCase());r.push({code:u,applied:c==null||c==="applied"})}return r}function ev(e,t,n){const r=new Set((e!=null?e:[]).flatMap(i=>Km(i.coupons)).map(i=>i.toLowerCase()));return Uj(t,n).filter(i=>!r.has(i.code.toLowerCase()))}const tv=(e,t)=>{const{sendMessage:n}=zt();return{removeItem:u=>{if(!e)return n(`Remove ${Q_(u)} from my cart`,M({displayContent:`Remove ${J_(u)} from cart`,cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))},changeItemQuantity:(u,c)=>{if(!(e||c<1))return n(`Update ${Q_(u)} quantity to ${c}`,M({displayContent:`Update ${J_(u)} to qty ${c}`,cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))},applyCoupon:u=>{const c=u.trim();if(!(!c||e))return n(`Apply coupon code ${c}`,M({cartMutation:!0},t?{silent:!0,reconcileMessageId:t}:{}))}}},jj=e=>{const t=M({},e);return delete t.checkoutButtonUrl,delete t.expressPaymentUrl,t},Hj=({quantity:e,disabled:t,globalClassName:n,onChange:r})=>{const{layoutPreset:i}=st(),[s,u]=k.useState(e),[c,d]=k.useState(e.toString()),[f,h]=k.useState(!1);k.useEffect(()=>{u(e),d(e.toString())},[e]);const m=v=>{if(t||f)return;const S=v.target.value;/^\d*$/.test(S)&&d(S)},E=()=>Ie(null,null,function*(){const v=parseInt(c,10);if(!t&&!f&&!isNaN(v)&&v>0&&v!==s){const S=s;u(v),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}else d(s.toString())}),b=v=>{v.key==="Enter"&&(v.preventDefault(),E())},T=()=>Ie(null,null,function*(){if(t||f)return;const v=Math.max(1,s-1);if(v!==s){const S=s;u(v),d(v.toString()),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}}),_=()=>Ie(null,null,function*(){if(t||f)return;const v=s+1,S=s;u(v),d(v.toString()),h(!0);try{const R=yield r(v);if(R&&R.outcome&&R.outcome!=="success")throw new Error("Failed to update quantity")}catch(R){u(S),d(S.toString())}finally{h(!1)}}),I=t||f;return i!=="commerce"?w.jsx("div",{className:D(n,`${N}-cart-qty-input-wrapper`),children:w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:D(n,`${N}-cart-qty-input`),value:c,disabled:I,onChange:m,onBlur:E,onKeyDown:b,"aria-label":"Quantity"})}):w.jsxs("div",{className:D(n,`${N}-cart-qty-selector`,I&&"disabled"),style:{position:"relative"},"aria-busy":f?"true":"false","aria-live":"polite",children:[w.jsx("button",{type:"button",className:D(n,`${N}-cart-qty-btn`),onClick:T,disabled:I||s<=1,"aria-label":"Decrease quantity",children:"−"}),f&&w.jsx("div",{style:{position:"absolute",left:"50%",top:"50%",transform:"translate(-50%, -50%)",zIndex:1,pointerEvents:"none",display:"flex",alignItems:"center",justifyContent:"center",width:"36px",height:"24px"},children:w.jsxs("svg",{className:D(n,`${N}-cart-qty-spinner`),viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3.5",children:[w.jsx("circle",{cx:"12",cy:"12",r:"10",stroke:"var(--cim-widget-border-color, #e4e4e7)",opacity:"0.25"}),w.jsx("path",{d:"M12 2C6.47715 2 2 6.47715 2 12",strokeLinecap:"round"})]})}),w.jsx("input",{type:"text",inputMode:"numeric",pattern:"[0-9]*",className:D(n,`${N}-cart-qty-input`),value:c,disabled:I,onChange:m,onBlur:E,onKeyDown:b,"aria-label":"Quantity",style:f?{opacity:.2,pointerEvents:"none"}:void 0}),w.jsx("button",{type:"button",className:D(n,`${N}-cart-qty-btn`),onClick:_,disabled:I,"aria-label":"Increase quantity",children:"+"})]})},$j=({item:e,currencyCode:t,disabled:n,globalClassName:r,onRemove:i,onQuantityChange:s})=>{var E,b;const[u,c]=k.useState(!1),d=n||u,f=()=>Ie(null,null,function*(){if(!d){c(!0);try{yield i(e)}finally{c(!1)}}}),h=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,m=Km(e.coupons);return w.jsxs("li",{className:D(r,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:D(r,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:D(r,`${N}-cart-item-details`),children:[w.jsx("p",{className:D(r,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:D(r,`${N}-cart-item-attrs`),children:[((E=e.variants)!=null?E:[]).map(T=>w.jsxs("p",{className:D(r,`${N}-cart-item-attr`),children:[T.lbl,": ",T.value]},`${T.type}-${T.value}`)),((b=e.promotions)!=null?b:[]).map(T=>w.jsxs("p",{className:D(r,`${N}-cart-item-attr`),children:["Promotion: ",T]},T))]}),m.length>0&&w.jsx("div",{className:D(r,`${N}-cart-chips`),children:m.map(T=>w.jsx(ad,{code:T,globalClassName:r},T))}),w.jsxs("span",{className:D(r,`${N}-cart-item-price`),children:[w.jsx("span",{className:D(r,`${N}-cart-item-final-price`),children:mi(e.itemSubtotal,t)}),h&&w.jsx("span",{className:D(r,`${N}-cart-item-original-price`),children:mi(e.originalSubtotal,t)})]}),w.jsxs("div",{className:D(r,`${N}-cart-item-footer`),children:[w.jsx("span",{className:D(r,`${N}-cart-qty-heading`),children:"Quantity"}),w.jsx(Hj,{quantity:e.quantity,disabled:d,globalClassName:r,onChange:T=>s(e,T)}),w.jsx("button",{type:"button",className:D(r,`${N}-cart-item-remove`),disabled:d,onClick:f,children:"Remove"})]})]})]})},nv=({expressPaymentUrl:e,checkoutButtonUrl:t,globalClassName:n,openLinksInNewTab:r})=>{const{sendMessage:i}=zt(),{onNavigate:s}=st(),u=d=>qi({event:d,href:t!=null?t:void 0,openLinksInNewTab:r,onNavigate:s}),c=d=>{i(d?`I completed the payment using Express Checkout. Show my confirmation for order ${d}.`:"I completed the payment using Express Checkout. Show my order confirmation.")};return w.jsxs(w.Fragment,{children:[e&&w.jsx(K_,{expressPaymentUrl:e,globalClassName:n,onOrderComplete:c}),t&&w.jsxs("a",{className:D(n,`${N}-cart-checkout-button`),href:t,target:r?"_blank":"_self",rel:"noopener noreferrer",onClick:u,children:[w.jsx(yO,{"aria-hidden":"true"}),w.jsx("span",{children:"Checkout"})]})]})},zj=({cartOverrideTag:e,cart:t,productsToHighlight:n,readOnly:r,globalClassName:i,openLinksInNewTab:s,messageId:u})=>{const{loading:c,isConnected:d}=zt(),{mode:f,status:h}=tr(),m=g_("Cart"),E=c||!!r,{removeItem:b,changeItemQuantity:T,applyCoupon:_}=tv(E,u),I=R=>t.items.find(U=>U.itemId===R),v=ce(M({isConnected:d,isLoading:c,componentType:h.type,mode:f},m),{cart:{setQuantity:(R,U)=>{var W,re;const B=I(R);if(!B)return;const A=Math.max(1,(W=B.minQuantity)!=null?W:1),G=(re=B.maxQuantity)!=null?re:1/0;return T(B,Math.min(G,Math.max(A,Math.floor(U))))},remove:R=>{const U=I(R);if(U)return b(U)},applyCoupon:_}}),S={name:"Cart",payload:{cart:jj(t),productsToHighlight:n,readOnly:r},api:v};return w.jsxs("div",{className:D(i,`${N}-cart`),children:[w.jsx(id,{overrideName:"Cart",children:w.jsx(ri,{tagName:e,props:S,label:"Cart"})}),w.jsx(nv,{expressPaymentUrl:t.expressPaymentUrl,checkoutButtonUrl:t.checkoutButtonUrl,globalClassName:i,openLinksInNewTab:s})]})},Vj=({cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:i,messageId:s})=>{var Ne;const{loading:u}=zt(),{onNavigate:c,layoutPreset:d}=st(),[f,h]=k.useState(!1),[m,E]=k.useState(""),[b,T]=k.useState(!1),{overrides:_,isInitialized:I}=Rr(),v=I?_.Cart:void 0,S=u||!!n||b,{removeItem:R,changeItemQuantity:U,applyCoupon:B}=tv(S,s);if(!e.items||e.items.length===0)return null;const A=ve=>qi({event:ve,openLinksInNewTab:i,onNavigate:c});if(v)return w.jsx(zj,{cartOverrideTag:v,cart:e,productsToHighlight:t,readOnly:n,globalClassName:r,openLinksInNewTab:i,messageId:s});if(((Ne=e.items)!=null?Ne:[]).length===0)return null;const{items:G=[],currencyCode:W="USD",subtotal:re,total:H,taxes:ee,taxationMode:Q,shippingCost:me,shippingDiscount:V,shippingPromotions:ue=[],promotionsDiscount:fe,promotions:ae=[],couponsDiscount:J,bodyMessage:se,footerMessage:O,checkoutButtonUrl:j,expressPaymentUrl:q}=e,P=G.reduce((ve,ze)=>ve+(ze.quantity||1),0),ge=ev(G,e.couponsApplied,e.coupons),Re=Q==="gross",pe=()=>Ie(null,null,function*(){const ve=m.trim();if(!(!ve||S)){T(!0),E("");try{yield B(ve)}finally{T(!1)}}});return w.jsxs("div",{className:D(r,`${N}-cart`,S&&`${N}-cart-busy`),children:[w.jsxs("div",{className:D(r,`${N}-cart-box`),children:[se&&w.jsxs("button",{type:"button",className:D(r,`${N}-cart-summary`),"aria-expanded":f,onClick:()=>h(ve=>!ve),children:[w.jsx("span",{className:D(r,`${N}-cart-summary-icon-box`),children:w.jsx(SO,{})}),w.jsx("span",{className:D(r,`${N}-cart-summary-text`),children:w.jsx(oa,{text:se,globalClassName:r,openLinksInNewTab:i,showIsLoading:!1,onLinkClick:A})}),w.jsx("span",{className:D(r,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:f?w.jsx(ME,{}):w.jsx(FE,{})})]}),f&&w.jsxs("div",{className:D(r,`${N}-cart-expanded`),children:[w.jsxs("div",{className:D(r,`${N}-cart-items-section`),children:[w.jsx("ul",{className:D(r,`${N}-cart-items`),children:G.map(ve=>w.jsx($j,{item:ve,currencyCode:W,disabled:S,globalClassName:r,onRemove:R,onQuantityChange:U},ve.itemId))}),ge.length>0&&w.jsx("div",{className:D(r,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:ge.map(ve=>w.jsx(ad,{code:ve.code,inactive:!ve.applied,globalClassName:r},ve.code))})]}),w.jsxs("div",{className:D(r,`${N}-cart-totals`),children:[w.jsx(Wn,{label:d==="commerce"?P===1?"Subtotal (1 item)":`Subtotal (${P} items)`:"Subtotal",value:re,currencyCode:W,globalClassName:r,loading:!1}),w.jsx(Wn,{label:"Coupon",value:J,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),w.jsx(Wn,{label:"Promotions",badge:ae[0],value:fe,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),w.jsx(Wn,{label:"Shipping",value:me,currencyCode:W,globalClassName:r,fallback:"-",loading:!1}),w.jsx(Wn,{label:"Shipping Discount",badge:ue[0],value:V,currencyCode:W,globalClassName:r,isDiscount:!0,loading:!1,fallback:"-"}),!Re&&w.jsx(Wn,{label:"Tax",value:ee,currencyCode:W,globalClassName:r,fallback:"TBD",loading:!1}),w.jsx(Wn,{label:d==="commerce"?"Estimated total":"Total",value:H,currencyCode:W,globalClassName:r,emphasized:!0,loading:!1})]})]})]}),w.jsxs("div",{className:D(r,`${N}-cart-coupon`),children:[w.jsxs("div",{className:D(r,`${N}-cart-coupon-field`),children:[w.jsx("span",{className:D(r,`${N}-cart-coupon-icon`),"aria-hidden":"true",children:w.jsx(BE,{})}),w.jsx("input",{type:"text",className:D(r,`${N}-cart-coupon-input`),placeholder:"Enter coupon code","aria-label":"Enter coupon code",value:m,disabled:S,onChange:ve=>E(ve.target.value),onKeyDown:ve=>{ve.key==="Enter"&&(ve.preventDefault(),pe())}})]}),w.jsx("button",{type:"button",className:D(r,`${N}-cart-coupon-submit`),"aria-label":"Apply coupon",disabled:S||!m.trim(),onClick:pe,children:w.jsx(jp,{"aria-hidden":"true"})})]}),w.jsx(nv,{expressPaymentUrl:q,checkoutButtonUrl:j,globalClassName:r,openLinksInNewTab:i}),w.jsx("p",{className:D(r,`${N}-cart-footer`),children:O||"Shipping and taxes calculated at checkout."})]})},qj=({item:e,currencyCode:t,globalClassName:n})=>{var s,u;const r=typeof e.originalSubtotal=="number"&&typeof e.itemSubtotal=="number"&&e.originalSubtotal>e.itemSubtotal,i=Km(e.coupons);return w.jsxs("li",{className:D(n,`${N}-cart-item`),children:[e.imageUrl&&w.jsx("div",{className:D(n,`${N}-cart-item-image`),children:w.jsx("img",{src:e.imageUrl,alt:e.name||"Product image",loading:"lazy"})}),w.jsxs("div",{className:D(n,`${N}-cart-item-details`),children:[w.jsx("p",{className:D(n,`${N}-cart-item-name`),children:e.name}),w.jsxs("div",{className:D(n,`${N}-cart-item-attrs`),children:[((s=e.variants)!=null?s:[]).map(c=>w.jsxs("p",{className:D(n,`${N}-cart-item-attr`),children:[c.lbl||c.type,": ",c.value]},`${c.type}-${c.value}`)),((u=e.promotions)!=null?u:[]).map(c=>w.jsxs("p",{className:D(n,`${N}-cart-item-attr`),children:["Promotion: ",c]},c))]}),i.length>0&&w.jsx("div",{className:D(n,`${N}-cart-chips`),children:i.map(c=>w.jsx(ad,{code:c,globalClassName:n},c))}),w.jsxs("span",{className:D(n,`${N}-cart-item-price`),children:[r&&w.jsx("span",{className:D(n,`${N}-cart-item-original-price`),children:mi(e.originalSubtotal,t)}),w.jsx("span",{className:D(n,`${N}-cart-item-final-price`),children:mi(e.itemSubtotal,t)})]}),w.jsx("div",{className:D(n,`${N}-cart-item-footer`),children:w.jsxs("span",{className:D(n,`${N}-cart-item-qty`),children:["Qty: ",e.quantity]})})]})]})},Wj=({order:e,globalClassName:t,openLinksInNewTab:n})=>{const{onNavigate:r}=st(),{overrides:i,isInitialized:s}=Rr(),u=gi("OrderConfirmation"),[c,d]=k.useState(!0),f=s?i.OrderConfirmation:void 0;if(f){const V={name:"OrderConfirmation",payload:{order:e},api:u};return w.jsx(ri,{tagName:f,props:V,label:"OrderConfirmation"})}const h=V=>qi({event:V,openLinksInNewTab:n,onNavigate:r}),m=V=>{const ue=new Date(V);return Number.isNaN(ue.getTime())?V:ue.toLocaleDateString(void 0,{year:"numeric",month:"long",day:"numeric"})},{id:E,creationDate:b,items:T=[],currencyCode:_="USD",subtotal:I,total:v,taxes:S,taxationMode:R,shippingCost:U,shippingDiscount:B,shippingPromotions:A=[],promotionsDiscount:G,promotions:W=[],couponsDiscount:re,bodyMessage:H,footerMessage:ee}=e,Q=ev(T,e.couponsApplied),me=R==="gross";return w.jsxs("div",{className:D(t,`${N}-cart`),children:[w.jsxs("div",{className:D(t,`${N}-cart-banner`),children:[w.jsx("span",{className:D(t,`${N}-cart-banner-icon`),"aria-hidden":"true",children:w.jsx(wO,{})}),w.jsx("p",{className:D(t,`${N}-cart-banner-text`),children:"Your order is confirmed!"})]}),w.jsxs("div",{className:D(t,`${N}-order-confirmation-meta`),children:[w.jsxs("span",{children:["Order No: ",E]}),b&&w.jsxs("span",{children:["Ordered On: ",m(b)]})]}),w.jsxs("div",{className:D(t,`${N}-cart-box`),children:[H&&w.jsxs("button",{type:"button",className:D(t,`${N}-cart-summary`),"aria-expanded":c,onClick:()=>d(V=>!V),children:[w.jsx("span",{className:D(t,`${N}-cart-summary-text`),children:w.jsx(oa,{text:H,globalClassName:t,showIsLoading:!1,openLinksInNewTab:n,onLinkClick:h})}),w.jsx("span",{className:D(t,`${N}-cart-summary-toggle`),"aria-hidden":"true",children:c?w.jsx(ME,{}):w.jsx(FE,{})})]}),c&&w.jsxs("div",{className:D(t,`${N}-cart-expanded`),children:[w.jsx("ul",{className:D(t,`${N}-cart-items`),children:T.map(V=>w.jsx(qj,{item:V,currencyCode:_,globalClassName:t},V.itemId))}),Q.length>0&&w.jsx("div",{className:D(t,`${N}-cart-chips`,`${N}-cart-applied-coupons`),children:Q.map(V=>w.jsx(ad,{code:V.code,globalClassName:t},V.code))}),w.jsxs("div",{className:D(t,`${N}-cart-totals`),children:[w.jsx(Wn,{label:"Subtotal",value:I,currencyCode:_,globalClassName:t}),w.jsx(Wn,{label:"Coupon",value:re,currencyCode:_,globalClassName:t,isDiscount:!0}),w.jsx(Wn,{label:"Promotions",badge:W[0],value:G,currencyCode:_,globalClassName:t,isDiscount:!0}),w.jsx(Wn,{label:"Shipping",value:U,currencyCode:_,globalClassName:t,fallback:"TBD"}),w.jsx(Wn,{label:"Shipping Discount",badge:A[0],value:B,currencyCode:_,globalClassName:t,isDiscount:!0}),!me&&w.jsx(Wn,{label:"Tax",value:S,currencyCode:_,globalClassName:t,fallback:"TBD"}),w.jsx(Wn,{label:"Total",value:v,currencyCode:_,globalClassName:t,emphasized:!0})]})]})]}),w.jsx("p",{className:D(t,`${N}-cart-footer`),children:ee||"Shipping and taxes calculated at checkout."})]})},Yj=({image:e,alt:t,globalClassName:n})=>{const[r,i]=k.useState(e.src),[s,u]=k.useState(!1),c=()=>{e.fallbackSrc&&r!==e.fallbackSrc&&i(e.fallbackSrc)};return w.jsx("img",{className:D(n,`${N}-pdp-gallery__image`,{[`${N}-pdp-gallery__image--loaded`]:s}),src:r,alt:t,loading:"lazy",onLoad:()=>u(!0),onError:c})},Gj=({images:e,altText:t,globalClassName:n})=>{if(e.length===0)return null;const r=e.length>1;return w.jsxs(Am,{className:D(n,`${N}-pdp-gallery`),slidesPerPage:1,slidesPerMove:1,slideCount:e.length,loop:!0,"aria-label":t||"Product images",children:[w.jsx(_m,{className:D(n,`${N}-pdp-gallery__item-group`),children:e.map((i,s)=>w.jsx(Tm,{index:s,className:D(n,`${N}-pdp-gallery__item`),children:w.jsx(Yj,{image:i,alt:t?`${t} (${s+1})`:`Product image ${s+1}`,globalClassName:n})},i.src))}),r&&w.jsxs(bm,{className:D(n,`${N}-pdp-gallery__control`),children:[w.jsx(Sm,{className:D(n,`${N}-pdp-gallery__prev-trigger`),"aria-label":"Previous image",children:w.jsx(UE,{size:"16px"})}),w.jsx(vm,{className:D(n,`${N}-pdp-gallery__next-trigger`),"aria-label":"Next image",children:w.jsx(jE,{size:"16px"})})]}),r&&w.jsx(xm,{className:D(n,`${N}-pdp-gallery__indicator-group`),children:Array.from({length:e.length},(i,s)=>w.jsx(wm,{index:s,className:D(n,`${N}-pdp-gallery__indicator`),"aria-label":`Go to image ${s+1}`},s))})]})},Xj="color",ud=e=>(e!=null?e:"").toLowerCase()===Xj,Kj=e=>e.replace(/(^|\/)large\//,"$1medium/"),rv=(e,t)=>!e.vattr||!t?!1:e.vattr.some(n=>ud(n.id)&&n.vals.includes(t)),iv=(e,t)=>{const n=Kj(t),r=La(e,n);return n===t?{src:r}:{src:r,fallbackSrc:La(e,t)}},Qj=["hi-res","large","medium","small"],ov=(e,t)=>{var n;return((n=e.viewType)!=null?n:"").toLowerCase()===t},Jj=e=>Qj.find(t=>e.some(n=>ov(n,t))),Zj=(e,t,n)=>{var i;const r=[...t?e.filter(s=>rv(s,t)):[],...e.filter(s=>!s.vattr),...e];for(const s of r){const u=((i=s.imgs)!=null?i:[]).filter(c=>{var d;return((d=c.url)!=null?d:"").trim().length>0}).map(c=>iv(n,c.url));if(u.length>0)return u}return[]},eH=(e,t)=>{var i;const n=(i=e.imgGroups)!=null?i:[],r=Jj(n);if(r){const s=n.filter(c=>ov(c,r)),u=Zj(s,t,e.baseUrl);if(u.length>0)return u}return e.imageUrl?[iv(e.baseUrl,e.imageUrl)]:[]},tH=(e,t)=>{var i,s,u;const n=((i=e.imgGroups)!=null?i:[]).find(c=>c.viewType==="swatch"&&rv(c,t)),r=(u=(s=n==null?void 0:n.imgs)==null?void 0:s[0])==null?void 0:u.url;return r?La(e.baseUrl,r):""},nH=e=>{const t=e.vattr,n=e.vmat;if(!t||t.length===0||!n||n.length===0)return e;const r=new Set(t.map(f=>f.id)),i=[...new Set(n.flatMap(f=>Object.keys(f.vars)))];if(i.every(f=>r.has(f)))return e;const s={},u=new Set;for(const f of i){if(r.has(f)){s[f]=f,u.add(f);continue}const h=new Set(n.map(E=>E.vars[f]).filter(Boolean));if(h.size===0)continue;const m=t.filter(E=>!u.has(E.id)&&E.opts.length>0&&[...h].every(b=>E.opts.some(T=>T.val===b)));m.length===1&&(s[f]=m[0].id,u.add(m[0].id))}const c=i.filter(f=>!r.has(f)).length;return Object.keys(s).filter(f=>s[f]!==f).length<c?e:ce(M({},e),{vmat:n.map(f=>ce(M({},f),{vars:Object.fromEntries(Object.entries(f.vars).map(([h,m])=>{var E;return[(E=s[h])!=null?E:h,m]}))}))})},cd=(e,t,n,r={})=>!e||e.length===0||!t||!n?!1:e.some(i=>{var s;return((s=i.vars)==null?void 0:s[t])!==n||i.ord===!1?!1:Object.entries(r).every(([u,c])=>{var d;return u===t||((d=i.vars)==null?void 0:d[u])===c})}),rH=(e,t)=>{const n=Object.keys(t);return n.length===0?!0:!e||e.length===0?!1:e.some(r=>r.ord!==!1&&n.every(i=>{var s;return((s=r.vars)==null?void 0:s[i])===t[i]}))},iH=(e,t,n,r,i)=>{if(!e||e.length===0)return ce(M({},i),{[n]:r});const s=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length&&Object.entries(i).every(([f,h])=>{var m;return f===n||((m=c.vars)==null?void 0:m[f])===h})});if(s)return M({},s.vars);const u=e.find(c=>{var d;return((d=c.vars)==null?void 0:d[n])===r&&c.ord!==!1&&Object.keys(c.vars).length>=t.length});return u?M({},u.vars):ce(M({},i),{[n]:r})},sv=(e,t)=>{var i,s,u,c;if(!(Array.isArray(e.vattr)&&e.vattr.length>0))return(i=e.id)!=null?i:null;if(!e.vmat||e.vmat.length===0)return(s=e.id)!=null?s:null;const r=e.vmat.find(d=>d.ord!==!1&&Object.entries(t).every(([f,h])=>{var m;return((m=d.vars)==null?void 0:m[f])===h}));return(c=(u=r==null?void 0:r.pid)!=null?u:e.id)!=null?c:null},oH=(e,t)=>{var s;const n=Lm(e.promotions,(s=e.extendedData)==null?void 0:s.productPromotions),r=typeof n=="number"?ce(M({},e.pr),{prom:n}):e.pr;if(!e.vmat||e.vmat.length===0||Object.keys(t).length===0)return r;const i=e.vmat.find(u=>u.ord!==!1&&Object.entries(t).every(([c,d])=>{var f;return((f=u.vars)==null?void 0:f[c])===d}));return i!=null&&i.pr?i.pr:r},av=e=>{var n;const t={};for(const r of(n=e.vattr)!=null?n:[]){const i=r.opts.find(u=>cd(e.vmat,r.id,u.val)),s=i!=null?i:r.opts[0];s&&(t[r.id]=s.val)}return t},sH=300,aH=e=>{const{overrides:t,isInitialized:n}=Rr(),r=gi("ProductDetailCard"),i=n?t.ProductDetailCard:void 0;if(i){const s={name:"ProductDetailCard",payload:e.product,api:r};return w.jsx(ri,{tagName:i,props:s,label:"ProductDetailCard"})}return w.jsx(uH,M({},e))},uH=({product:e,globalClassName:t,openLinksInNewTab:n,isCartMgmtSupported:r=!1})=>{var ve,ze,rt,Ot,ct,_t,tt,yt;const{addToCart:i,sendMessage:s,loading:u}=zt(),{onNavigate:c}=st(),d=k.useMemo(()=>nH(e.data),[e.data]),f=(ve=d.vattr)!=null?ve:[],[h,m]=k.useState(()=>av(d));k.useEffect(()=>{m(av(d))},[d,e.id]);const E=rH(d.vmat,h),b=(rt=(ze=d.quantity)==null?void 0:ze.minQuantity)!=null?rt:1,T=(ct=(Ot=d.quantity)==null?void 0:Ot.maxQuantity)!=null?ct:Number.POSITIVE_INFINITY,_=(tt=(_t=d.quantity)==null?void 0:_t.increment)!=null?tt:1,[I,v]=k.useState(b),[S,R]=k.useState(!1),U=k.useRef(!1);k.useEffect(()=>{S&&(u?U.current=!0:U.current&&(U.current=!1,R(!1)))},[S,u]);const B=f.find(De=>ud(De.id)),A=f.filter(De=>!ud(De.id)),G=B?h[B.id]:void 0,W=k.useMemo(()=>eH(d,G),[d,G]),re=k.useMemo(()=>oH(d,h),[d,h]),H=sv(d,h),[ee,Q]=k.useState(I),me=k.useRef(H),V=me.current===H?ee:I;k.useEffect(()=>{if(me.current!==H){me.current=H,Q(I);return}const De=window.setTimeout(()=>Q(I),sH);return()=>window.clearTimeout(De)},[I,H]);const ue=I===ee,fe=k.useMemo(()=>E&&(me.current!==H||ue)?Mj(d.expressPaymentUrl,H,V):null,[d.expressPaymentUrl,H,V,E,ue]),ae=k.useCallback(De=>{s(De?`I completed the payment using Express Checkout. Show my confirmation for order ${De}.`:"I completed the payment using Express Checkout. Show my order confirmation.")},[s]),J=De=>qi({event:De,openLinksInNewTab:n,onNavigate:c}),se=(De,Ve)=>()=>{m(Oe=>{const it=!cd(d.vmat,De,Ve,Oe);return ud(De)||it?iH(d.vmat,f,De,Ve,Oe):ce(M({},Oe),{[De]:Ve})})},O=()=>{if(u)return;const De=sv(d,h);if(!De)return;const Ve=f.map(Oe=>{const it=Oe.opts.find(lt=>lt.val===h[Oe.id]);return it?{label:Oe.lbl||Oe.id,value:it.name||it.val}:null}).filter(Oe=>Oe!==null);R(!0),i({productName:d.name,sku:De,quantity:I,variants:Ve})},j=!E||I-_<b,q=!E||I+_>T,P=De=>{var Oe;const Ve=h[De.id];return(Oe=De.opts.find(it=>it.val===Ve))==null?void 0:Oe.name},ge=()=>v(De=>Math.max(b,De-_)),Re=()=>v(De=>Math.min(T,De+_)),pe=De=>w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__variant-name`),children:De.lbl||De.id}),P(De)&&w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:P(De)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__chips`),children:De.opts.map(Ve=>{const Oe=cd(d.vmat,De.id,Ve.val,h),it=h[De.id]===Ve.val;return w.jsxs("label",{className:D(`${N}-msg-pdp__chip`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Ve.name||Ve.val})]},Ve.val)})})]},De.id),Ne=De=>w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{id:`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__variant-name`),children:De.lbl||"Color"}),P(De)&&w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:P(De)})]}),w.jsx("div",{role:"radiogroup","aria-labelledby":`variant-label-${De.id}`,className:D(t,`${N}-msg-pdp__swatches`),children:De.opts.map(Ve=>{const Oe=cd(d.vmat,De.id,Ve.val,h),it=h[De.id]===Ve.val,lt=tH(d,Ve.val);return lt?w.jsxs("label",{className:D(`${N}-msg-pdp__swatch`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-label":Ve.name||Ve.val,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("img",{className:D(t,`${N}-msg-pdp__swatch-image`),src:lt,alt:Ve.name||Ve.val,loading:"lazy"})]},Ve.val):w.jsxs("label",{className:D(`${N}-msg-pdp__chip`,{selected:it,unavailable:!Oe}),children:[w.jsx("input",{type:"radio",name:`variant-${De.id}`,value:Ve.val,checked:it,"aria-description":Oe?void 0:"unavailable",onChange:se(De.id,Ve.val),className:`${N}-msg-pdp__radio-input`}),w.jsx("span",{children:Ve.name||Ve.val})]},Ve.val)})})]});return w.jsx("div",{className:D(t,`${N}-msg-pdp`),children:w.jsxs("div",{className:D(t,`${N}-msg-pdp__card`),children:[w.jsx("div",{className:D(t,`${N}-msg-pdp__gallery`),children:w.jsx(Gj,{images:W,altText:d.name,globalClassName:t})}),w.jsxs("div",{className:D(t,`${N}-msg-pdp__content`),children:[d.slugUrl&&!r?w.jsx("a",{href:d.slugUrl,target:n?"_blank":"_self",rel:"noopener noreferrer",className:D(t,`${N}-msg-pdp__title-link`),"aria-label":`Go to product page for ${d.name}`,onClick:De=>Ru({event:De,href:d.slugUrl,openLinksInNewTab:n,isCartMgmtSupported:r,onNavigate:c}),children:d.name}):w.jsx("p",{className:D(t,`${N}-msg-pdp__title`),children:d.name}),w.jsx("div",{"aria-live":"polite","aria-atomic":"true",children:w.jsx(Mm,{globalClassName:t,className:`${N}-msg-pdp__price`,retailPrice:re==null?void 0:re.orig,discountPrice:(yt=re==null?void 0:re.prom)!=null?yt:re==null?void 0:re.cur,currencyCode:d.ccy,fontSize:"14px"})}),d.dscr&&w.jsx("div",{className:D(t,`${N}-msg-pdp__description`),children:w.jsx(oa,{globalClassName:t,text:d.dscr,openLinksInNewTab:n,onLinkClick:J})}),B&&Ne(B),A.map(pe),r&&w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant`),children:[w.jsxs("div",{className:D(t,`${N}-msg-pdp__variant-label`),children:[w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-name`),children:"Quantity"}),w.jsx("span",{className:D(t,`${N}-msg-pdp__variant-value`),children:I})]}),w.jsxs("div",{className:D(t,`${N}-msg-pdp__stepper`),children:[w.jsx(kr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Decrease quantity",icon:w.jsx(dO,{}),disabled:j,onClick:ge}),w.jsx("span",{className:D(t,`${N}-msg-pdp__quantity`),children:I}),w.jsx(kr,{className:`${N}-msg-pdp__stepper-btn`,ariaLabel:"Increase quantity",icon:w.jsx(LE,{}),disabled:q,onClick:Re})]})]}),r&&w.jsxs("div",{className:D(t,`${N}-msg-pdp__actions`),children:[fe&&w.jsx(K_,{expressPaymentUrl:fe,globalClassName:t,onOrderComplete:ae},fe),w.jsx($p,{className:`${N}-msg-pdp__add-to-cart`,disabled:!E||u||S,onClick:O,children:S?"Adding...":w.jsxs(w.Fragment,{children:[w.jsx(LE,{className:`${N}-msg-pdp__add-to-cart-icon`}),"Add to cart"]})})]})]})]})})},cH=({products:e,table:t,globalClassName:n,openLinksInNewTab:r})=>{const{isCartMgmtSupported:i,onNavigate:s}=st(),{overrides:u,isInitialized:c}=Rr(),{loading:d}=zt(),f=Go(),h=gi("ProductComparison"),m=_=>{if(d)return;const I=_.name||"this product",v=_.id?` [ID: ${_.id}]`:"";f(`Show me details for ${I}${v}`)},E=c?u.ProductComparison:void 0;if(E){const _={name:"ProductComparison",payload:{products:e,table:t},api:h};return w.jsx(ri,{tagName:E,props:_,label:"ProductComparison"})}if(!e.length)return null;const b=`auto repeat(${e.length}, 1fr)`,T=`${90+e.length*140}px`;return w.jsx("div",{className:D(n,`${N}-product-comparison`),children:w.jsxs("div",{className:`${N}-product-comparison__grid`,style:{gridTemplateColumns:b,minWidth:T},children:[w.jsxs("div",{className:`${N}-product-comparison__header`,children:[w.jsx("div",{className:`${N}-product-comparison__header-spacer`}),e.map(_=>{var S,R,U,B,A,G,W;const I=_.imageUrl?La(_.baseUrl,_.imageUrl):void 0,v=Lm(_.promotions,(S=_.extendedData)==null?void 0:S.productPromotions);return w.jsxs("div",{className:D(n,`${N}-product-comparison__product-col`),children:[I&&(i?w.jsx("button",{type:"button",disabled:d,onClick:()=>m(_),className:D(n,`${N}-product-comparison__image-button`),"aria-label":`View details for ${_.name}`,children:w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:_.name||"Product image",loading:"eager"})}):_.slugUrl?w.jsx("a",{href:_.slugUrl,target:r?"_blank":"_self",rel:"noopener",onClick:re=>Ru({event:re,href:_.slugUrl,openLinksInNewTab:r,isCartMgmtSupported:i,onNavigate:s}),children:w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:_.name||"Product image",loading:"eager"})}):w.jsx("img",{className:D(n,`${N}-product-comparison__image`),src:I,alt:"",loading:"eager"})),i?w.jsx("button",{type:"button",disabled:d,onClick:()=>m(_),className:D(n,`${N}-product-comparison__name`,`${N}-product-comparison__name-button`),"aria-label":`View details for ${_.name}`,children:_.name}):_.slugUrl?w.jsx("a",{href:_.slugUrl,target:r?"_blank":"_self",rel:"noopener",className:D(n,`${N}-product-comparison__name`,`${N}-product-comparison__name-link`),"aria-label":`Go to product page for ${_.name}`,onClick:re=>Ru({event:re,href:_.slugUrl,openLinksInNewTab:r,isCartMgmtSupported:i,onNavigate:s}),children:_.name}):w.jsx("span",{className:D(n,`${N}-product-comparison__name`),children:_.name}),w.jsx(Mm,{globalClassName:n,retailPrice:(B=(R=_.pr)==null?void 0:R.orig)!=null?B:(U=_.pr)==null?void 0:U.cur,discountPrice:(W=v!=null?v:(A=_.pr)==null?void 0:A.prom)!=null?W:(G=_.pr)==null?void 0:G.cur,currencyCode:_.ccy,fontSize:"0.875rem"})]},_.id)})]}),w.jsx("div",{className:`${N}-product-comparison__table`,children:t.map(_=>w.jsxs("div",{className:`${N}-product-comparison__row`,children:[w.jsx("div",{className:D(n,`${N}-product-comparison__row-label`),children:_.row_name}),e.map((I,v)=>w.jsx("div",{className:D(n,`${N}-product-comparison__row-value`),children:_.values[v]},`${_.row_name}-${I.id}`))]},_.row_name))})]})})},uv=({suggestions:e,disabled:t,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:i})=>{const{overrides:s,isInitialized:u}=Rr(),c=gi("Suggestions"),d=u?s.Suggestions:void 0;if(d){const f={name:"Suggestions",payload:{suggestions:e},api:c};return w.jsx(ri,{tagName:d,props:f,label:"Suggestions"})}return w.jsx("div",{style:{marginTop:"0.5rem"},children:w.jsx(QF,{disabled:t,suggestions:e,globalClassName:n,isWidgetStandalone:r,onSuggestionClick:i})})},lH=new Set(["Header","HeaderActions","SubHeader"]),cv=({content:e,messageId:t,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i})=>{const{loading:s}=zt(),u=Go(),c=vj(),{layoutPreset:d,isCartMgmtSupported:f,logger:h,onNavigate:m}=st(),{overrides:E,isInitialized:b}=Rr(),T=gi("ToolResult"),_=m_(),I=k.useMemo(()=>e.response.flatMap(lp),[e.response]),v=I.filter(A=>A.type!=="suggestions"),S=I.filter(A=>A.type==="suggestions"),R=d==="commerce"&&v.some(A=>A.type==="product_carousel"||A.type==="product_tile"||A.type==="cart"||A.type==="product_comparison"),U=A=>qi({event:A,openLinksInNewTab:r,onNavigate:m}),B=(A,G)=>{var W,re,H,ee,Q,me,V,ue,fe,ae,J,se,O,j,q,P,ge,Re,pe,Ne,ve,ze,rt,Ot,ct,_t;switch(A.type){case"markdown":{const tt=(re=(W=A.data)==null?void 0:W.content)!=null?re:"";return A.index===Ri&&Ry(tt)?null:w.jsx(oa,{text:tt,globalClassName:n,openLinksInNewTab:r,showIsLoading:!1,onLinkClick:U},`${A.type}-${(H=A.index)!=null?H:G}`)}case"product_carousel":return w.jsx(Ij,{title:(Q=(ee=A.data)==null?void 0:ee.title)!=null?Q:"",products:(V=(me=A.data)==null?void 0:me.products)!=null?V:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:f},`${A.type}-${(ue=A.index)!=null?ue:G}`);case"product_tile":return w.jsx(aH,{product:A.data,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i,isCartMgmtSupported:f},`${A.type}-${(fe=A.index)!=null?fe:G}`);case"product_comparison":return w.jsx(cH,{products:(J=(ae=A.data)==null?void 0:ae.products)!=null?J:[],table:(O=(se=A.data)==null?void 0:se.table)!=null?O:[],globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i},`${A.type}-${(j=A.index)!=null?j:G}`);case"cart":{const tt=(ge=(P=(q=A.data)==null?void 0:q.cart)==null?void 0:P.cartSummary)==null?void 0:ge.cartDetails;return tt?w.jsx(Vj,{cart:tt,productsToHighlight:A.data.products_to_highlight,readOnly:!c||t!==c,globalClassName:n,openLinksInNewTab:r,messageId:t},`${A.type}-${(Re=A.index)!=null?Re:G}`):null}case"order_confirmation":{const tt=A.data,yt=(ve=(pe=tt==null?void 0:tt.order)==null?void 0:pe.orderDetails)!=null?ve:(Ne=tt==null?void 0:tt.data)==null?void 0:Ne.orderConfirmation;return yt?w.jsx(Wj,{order:yt,globalClassName:n,openLinksInNewTab:r,isWidgetStandalone:i},`${A.type}-${(ze=A.index)!=null?ze:G}`):null}case"tool_results":{const tt=A.data,yt=A.output_name;if(typeof yt=="string"&&lH.has(yt))return null;const De=b&&yt&&Object.prototype.hasOwnProperty.call(E,yt)?E[yt]:void 0,Ve=typeof De=="string"?De:void 0;if(!Ve||!yt)return h!=null&&h.isDevelopment&&(yt?h.warn(`🦜 tool_results "${yt}" rendered nothing — no override registered for that key. Register one in the overrides map: { "${yt}": "<your-tag-name>" }.`,{registeredKeys:Object.keys(E),payload:tt}):h.warn("🦜 tool_results block has no output_name — nothing to route on",{payload:tt})),null;const Oe={name:yt,payload:tt,api:ce(M({},T),{reportFailure:(it,lt)=>_.reportFailure(yt,it,lt),reportEvent:(it,lt)=>_.reportEvent(yt,it,lt)})};return w.jsx(id,{overrideName:yt,children:w.jsx(ri,{tagName:Ve,props:Oe,label:`toolResult:${yt}`})},`${A.type}-${yt}-${(rt=A.index)!=null?rt:G}`)}case"suggestions":return w.jsx(uv,{disabled:s,suggestions:(ct=(Ot=A.data)==null?void 0:Ot.display_text)!=null?ct:[],globalClassName:n,isWidgetStandalone:i,onSuggestionClick:u},`${A.type}-${(_t=A.index)!=null?_t:G}`);default:return null}};return w.jsxs(w.Fragment,{children:[R?w.jsx("div",{className:D(n,`${N}-response-card`),children:v.map(B)}):v.map(B),S.map(B)]})};class Qm extends k.Component{constructor(t){super(t),this.state={hasError:!1}}static getDerivedStateFromError(){return{hasError:!0}}componentDidCatch(t,n){var r;kt(!0,"error","Message content threw during render:",t,n.componentStack),(r=this.context)==null||r.failure("render_error")}render(){return this.state.hasError?w.jsx("p",{className:D(this.props.globalClassName,`${N}-reset-message`),children:"Oops, I had trouble displaying this response."}):this.props.children}}We(Qm,"contextType",Mc);const dH=({message:e,globalClassName:t,isWidgetStandalone:n})=>{const{logger:r,layoutPreset:i}=st();return cI(e.content)?(r==null||r.debug("Omitting structured user message from transcript",e.content),null):w.jsx("div",{className:D(t,`${N}-message`,n?"standalone":"embedded"),children:w.jsx("div",{className:D(t,`${N}-user-message`,n?"standalone":"embedded"),children:w.jsxs("div",{className:D(t,`${N}-user-message-row`,n?"standalone":"embedded"),children:[i!=="commerce"&&w.jsx("span",{className:D(t,`${N}-message-icon user-message-icon`,n?"standalone":"embedded"),children:w.jsx(bO,{})}),w.jsxs("div",{className:D(t,`${N}-user-message-body`,n?"standalone":"embedded"),children:[e.attachmentImageUrl&&w.jsx("img",{src:e.attachmentImageUrl,alt:e.content||"Attachment",className:D(t,`${N}-user-message-image`)}),e.content&&w.jsx("p",{className:D(t,`${N}-user-message-text`,n?"standalone":"embedded"),children:e.content})]})]})})})},fH=({divider:e,globalClassName:t})=>{const n=e.context.type==="srp"?`Search: "${e.label}"`:e.label;return w.jsx("div",{className:D(t,`${N}-page-context-divider`),role:"separator","aria-label":n,children:w.jsxs("span",{className:D(t,`${N}-page-context-divider-pill`),children:[e.context.type==="pdp"&&e.imageUrl&&w.jsx("img",{className:D(t,`${N}-page-context-divider-image`),src:e.imageUrl,alt:""}),e.context.type==="pdp"&&!e.imageUrl&&w.jsx(IO,{className:D(t,`${N}-page-context-divider-icon`),"aria-hidden":"true"}),e.context.type==="srp"&&w.jsx(HE,{className:D(t,`${N}-page-context-divider-icon`),"aria-hidden":"true"}),w.jsx("span",{className:D(t,`${N}-page-context-divider-label`),title:n,children:n})]})})};function pH(e){switch(e==null?void 0:e.toLowerCase()){case"chatbot":return"chatbot";case"agent":return"human-agent";default:return null}}const hH=({message:e,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})=>{var h;const{logger:i,onNavigate:s,enablePageContext:u}=st(),c=m=>qi({event:m,openLinksInNewTab:n,onNavigate:s}),d=k.useMemo(()=>{if(typeof e.content!="string")return null;const m=Va(e.content);if(m)return m;const E=Gc(e.content);return E?{response:[E]}:null},[e.content]),f=k.useMemo(()=>{var b;const m="Oops, I had trouble with your request.";if(typeof e.content!="string")return i==null||i.warn("Message content is not richtext format. Showing fallback text.",e.content),m;const E=e.content.trim();try{const T=JSON.parse(E);if(typeof T=="object"&&T!==null)return i==null||i.debug("Detected JSON object instead of array of responses in message content",e.content),(b=cp(T))!=null?b:m}catch(T){if(E.startsWith("{")||E.startsWith("["))return i==null||i.warn("Failed to parse JSON-like message content. Showing fallback text.",e.content),m}return e.content||m},[i,e.content]);switch(e.role){case"user":return w.jsxs(w.Fragment,{children:[u&&e.pageContextDivider&&w.jsx(fH,{divider:e.pageContextDivider,globalClassName:t}),(!e.pageContextDivider||e.content||e.attachmentImageUrl)&&w.jsx(dH,{message:e,globalClassName:t,isWidgetStandalone:r})]});case"agent":return w.jsx("div",{className:D(t,`${N}-message-group`,pH((h=e.sender)==null?void 0:h.role),r?"standalone":"embedded"),children:w.jsx("div",{className:`${N}-message-group-child`,children:d?w.jsx(Qm,{globalClassName:t,children:w.jsx(cv,{content:d,messageId:e.id,globalClassName:t,openLinksInNewTab:n,isWidgetStandalone:r})}):w.jsx(oa,{text:f,globalClassName:t,openLinksInNewTab:n,showIsLoading:!1,onLinkClick:c})})});case"system":return w.jsx("div",{className:D(t,`${N}-message`,r?"standalone":"embedded"),children:w.jsx("p",{className:D(t,`${N}-reset-message`),children:e.content})})}},mH=({message:e,onRetry:t,globalClassName:n,isWidgetStandalone:r})=>w.jsxs("div",{className:D(n,`${N}-send-error`,r?"standalone":"embedded"),role:"alert",children:[w.jsx("span",{className:D(n,`${N}-send-error-text`),children:e}),w.jsxs("button",{type:"button",className:D(n,`${N}-retry-button`),onClick:t,children:[w.jsx(vO,{"aria-hidden":"true"})," Retry"]})]}),gH="What can we help with?",yH="Give me recommendations",EH="Find a gift",lv="Start fresh",bH=[yH,EH,lv],wH=()=>{const{globalClassName:e}=st(),{loading:t,resetConversation:n}=zt(),r=Go(),{mode:i}=tr(),s=i==="standalone";return w.jsxs("div",{className:D(e,`${N}-transcript-placeholder`),children:[w.jsx("p",{className:D(e,`${N}-transcript-placeholder-text`),children:gH}),w.jsx(uv,{suggestions:bH,disabled:t,globalClassName:e,isWidgetStandalone:s,onSuggestionClick:u=>{if(u===lv){n();return}r(u)}})]})},xH=({globalClassName:e,onClick:t})=>w.jsx("div",{className:D(e,`${N}-jump-to-latest`),children:w.jsx("button",{type:"button",className:D(e,`${N}-jump-to-latest-button`),"aria-label":"Jump to latest message",title:"Jump to latest message",onClick:t,children:w.jsx(NO,{size:"20"})})}),TH=`${N}-message-container`,_H=24,vH=100,ld=e=>{const t=e==null?void 0:e.closest(`.${TH}`);return t instanceof HTMLElement?t:null},dv=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=_H,SH=()=>typeof window!="undefined"&&typeof window.matchMedia=="function"&&window.matchMedia("(prefers-reduced-motion: reduce)").matches,AH=(e,t)=>!(e!=null&&e.anchorMessageId)||!t.some(n=>n.id===e.anchorMessageId)?null:e,kH=({autoScroll:e,messages:t,streamingBlocks:n,sendError:r,error:i,isOpen:s,scrollSnapshotRef:u})=>{var re,H,ee;const c=k.useRef(null),d=k.useRef(null),f=k.useRef(!0),h=k.useRef(!1),m=k.useRef(null),E=k.useRef(!1),b=k.useRef((H=(re=t[t.length-1])==null?void 0:re.id)!=null?H:null),T=k.useRef(null),_=k.useRef(!1),I=k.useRef(t);if(I.current=t,!_.current){_.current=!0;const Q=u?AH(u.current,t):null;Q&&(f.current=Q.shouldStickToBottom,E.current=Q.hasSentLiveMessage,Q.shouldStickToBottom||(T.current=Q.scrollTop))}const v=k.useRef(e);v.current=e;const S=k.useRef(!1);S.current=n.length>0;const R=k.useRef(!1);R.current=((ee=t[t.length-1])==null?void 0:ee.restored)===!0;const[U,B]=k.useState(!1),A=k.useCallback((Q="smooth")=>{var ue;const me=(ue=d.current)!=null?ue:ld(c.current);if(!me)return;const V=Q==="smooth"&&SH()?"auto":Q;f.current=!0,V==="smooth"&&(h.current=!0),me.scrollTo({top:me.scrollHeight,behavior:V})},[]),G=k.useCallback(()=>{const Q=d.current;if(!Q||Q.clientHeight===0){Q||B(!1);return}B(!dv(Q))},[]),W=k.useCallback(()=>{const Q=d.current;if(!Q){f.current=!0,B(!1);return}Q.clientHeight!==0&&(f.current=dv(Q),G())},[G]);return k.useLayoutEffect(()=>{const Q=T.current;if(Q==null)return;const me=ld(c.current);d.current=me,me&&(me.scrollTop=Q,f.current=!1,B(!0))},[]),k.useLayoutEffect(()=>{const Q=c.current;return()=>{var ue,fe,ae,J;if(!u)return;const me=(ue=d.current)!=null?ue:ld(Q),V=I.current;u.current={scrollTop:(fe=me==null?void 0:me.scrollTop)!=null?fe:0,shouldStickToBottom:f.current,hasSentLiveMessage:E.current,anchorMessageId:(J=(ae=V[V.length-1])==null?void 0:ae.id)!=null?J:null}}},[u]),k.useEffect(()=>{const Q=ld(c.current);if(d.current=Q,G(),!Q)return;const me=()=>{m.current&&(clearTimeout(m.current),m.current=null)},V=()=>{me(),h.current=!1,W()},ue=()=>{if(!h.current){W();return}me(),m.current=setTimeout(V,vH)},fe=()=>{me(),h.current=!1};Q.addEventListener("scroll",ue,{passive:!0}),Q.addEventListener("scrollend",V),Q.addEventListener("wheel",fe,{passive:!0}),Q.addEventListener("touchstart",fe,{passive:!0});const ae=()=>{if(h.current)return;const O=E.current,j=!O,q=f.current,P=R.current,ge=v.current,Re=S.current;if(q&&(ge||P||j)){A(Re&&O?"smooth":"auto");return}W()},J=new ResizeObserver(ae);J.observe(Q),c.current&&J.observe(c.current);const se=new MutationObserver(ae);return se.observe(Q,{childList:!0,subtree:!0}),()=>{me(),Q.removeEventListener("scroll",ue),Q.removeEventListener("scrollend",V),Q.removeEventListener("wheel",fe),Q.removeEventListener("touchstart",fe),J.disconnect(),se.disconnect()}},[A,G,W]),k.useEffect(()=>{T.current==null&&A("auto")},[A]),k.useEffect(()=>{s&&T.current==null&&A("auto")},[s,A]),k.useEffect(()=>{var j;const Q=t[t.length-1],me=(j=Q==null?void 0:Q.id)!=null?j:null,V=me!==b.current;b.current=me;const ue=(Q==null?void 0:Q.restored)===!0,fe=(Q==null?void 0:Q.role)==="user"&&!ue;fe&&(E.current=!0);const ae=f.current,J=t.length>0,se=!E.current&&J;if(ae&&(e||ue||se)){A(ue||se?"auto":"smooth");return}if(V&&fe){A("smooth");return}W()},[t,e,A,W]),k.useEffect(()=>{if(e&&f.current){A(E.current?"smooth":"auto");return}W()},[n,r,i,e,A,W]),{endRef:c,showJumpToLatest:U,scrollToLatest:A}},CH=4e3,fv=e=>(typeof e=="string"?e:"").replace(/<[^>]*>/g," ").replace(/!\[([^\]]*)\]\([^)]*\)/g,"$1").replace(/\[([^\]]+)\]\([^)]*\)/g,"$1").replace(/[`*_~#>|]+/g," ").replace(/\s+/g," ").trim().slice(0,CH),Du="Assistant response available",NH=e=>{if(typeof e!="object"||e===null)return"";const t=e;if(t.type!=="product_carousel"||typeof t.data!="object"||t.data===null)return"";const n=t.data.products;if(!Array.isArray(n))return"";if(n.length===0)return"No products found.";const r=n.map(c=>{if(typeof c!="object"||c===null||Array.isArray(c))return"";const d=c,f=typeof d.data=="object"&&d.data!==null&&!Array.isArray(d.data)?d.data:null,h=typeof(f==null?void 0:f.name)=="string"?f.name.trim():"",m=typeof d.id=="string"?d.id.trim():"";return h||m}).filter(Boolean),i=n.length===1?"1 product found.":`${n.length} products found.`;if(r.length===0)return i;const s=n.length===1?"Product title":"Product titles",u=`${i} ${s}: ${r.join("; ")}`;return/[.!?]$/.test(u)?u:`${u}.`},IH=e=>{var s,u;if(typeof e!="string")return Du;const t=Va(e),n=t?null:Gc(e),r=(s=t==null?void 0:t.response)!=null?s:n?[n]:null;if(r)return r.map(d=>d.type==="markdown"?fv(d.data.content):NH(d)).filter(Boolean).join(" ").trim()||Du;const i=e.trim();try{const c=JSON.parse(i);if(typeof c=="object"&&c!==null)return(u=cp(c))!=null?u:Du}catch(c){if(i.startsWith("{")||i.startsWith("["))return Du}return fv(e)||Du},OH=({message:e,announcementKey:t})=>{const[n,r]=k.useState("");return k.useEffect(()=>{if(r(""),!e)return;const i=setTimeout(()=>r(e),100),s=setTimeout(()=>r(""),1e4);return()=>{clearTimeout(i),clearTimeout(s)}},[e,t]),w.jsx("span",{className:`${N}-visually-hidden`,role:"status","aria-atomic":"true",children:n})},PH=()=>{const{messages:e}=zt(),t=[...e].reverse().find(n=>n.role==="agent"&&!n.restored);return w.jsx(OH,{message:t?IH(t.content):"",announcementKey:t==null?void 0:t.id})},RH="You are offline or we couldn't reach the assistant. Check connection and try again.",Jm=({isWidgetStandalone:e,isOpen:t,scrollSnapshotRef:n})=>{var ge,Re;const{layoutPreset:r,globalClassName:i,openLinksInNewTab:s,logger:u,autoScroll:c,connectingMessages:d}=st(),{messages:f,streamingBlocks:h,isAgentTyping:m,loading:E,progressMessage:b,connectionStatus:T,error:_,sendError:I,retryLastMessage:v,retryConnection:S}=zt(),{endRef:R,showJumpToLatest:U,scrollToLatest:B}=kH({autoScroll:c,messages:f,streamingBlocks:h,sendError:I,error:_,isOpen:t,scrollSnapshotRef:n}),A=f.length>0,G=h.some(yN),W=G||f.some(pe=>pe.role==="user"||pe.role==="agent"),re=f.some(pe=>pe.role==="system"&&(pe.content===Qy||pe.content===wp)),H=!W&&!re&&(T==="connecting"||T==="connected"),[ee,Q]=k.useState(!1);k.useEffect(()=>{if(H&&!E){const pe=setTimeout(()=>Q(!0),Jy);return()=>clearTimeout(pe)}Q(!1)},[H,E]);const me=H&&(E||!ee),V=me?f.filter(pe=>pe.role!=="system"):f,ue=f[f.length-1],fe=ue?Py(ue.content,"suggestions"):!1,ae=!me&&A&&(E||m)&&!G&&!fe,J=T==="reconnecting"&&!ae,se=T==="error";let O=null;se?O={message:_!=null?_:RH,kind:"connection",onRetry:S}:I&&(O={message:I.message,kind:"send",onRetry:v});const j=ee&&T==="connected"&&!W&&!re&&!O,q=(ge=O==null?void 0:O.message)!=null?ge:null,P=(Re=O==null?void 0:O.kind)!=null?Re:null;return k.useEffect(()=>{q&&(u==null||u.error("Error message shown to user",{message:q,kind:P}))},[q,P,u]),w.jsxs(w.Fragment,{children:[w.jsx(PH,{}),me&&w.jsx(oB,{globalClassName:i,isWidgetStandalone:e,variant:r==="commerce"?"sparkles":"default",messages:d!==void 0?d:r==="commerce"?["Find the right products faster","Compare your best options","Track and manage your orders"]:void 0}),j&&w.jsx(wH,{}),V.map(pe=>w.jsx(hH,{message:pe,globalClassName:i,openLinksInNewTab:s,isWidgetStandalone:e},pe.id)),O&&w.jsx(mH,{message:O.message,onRetry:O.onRetry,globalClassName:i,isWidgetStandalone:e}),G&&w.jsxs("div",{className:D(i,`${N}-message-group`,e?"standalone":"embedded"),children:[w.jsx(Qm,{globalClassName:i,children:w.jsx(cv,{content:{response:h},globalClassName:i,openLinksInNewTab:s,isWidgetStandalone:e})}),(E||m)&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e})]}),ae&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e,loadingText:b}),J&&w.jsx(Um,{globalClassName:i,isWidgetStandalone:e,loadingText:"Reconnecting..."}),U&&w.jsx(xH,{globalClassName:i,onClick:()=>B()}),w.jsx("div",{ref:R,"aria-hidden":"true"})]})},LH=()=>w.jsxs("svg",{"aria-hidden":"true",className:`${N}-progress-step-check`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[w.jsx("circle",{cx:"8",cy:"8",r:"7",stroke:"currentColor",strokeWidth:"1.5"}),w.jsx("path",{d:"M5 8.5L7 10.5L11 6",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})]}),DH=()=>w.jsx("svg",{"aria-hidden":"true",className:`${N}-progress-step-starburst`,viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:w.jsx("path",{d:"M8 1v3M8 12v3M1 8h3M12 8h3M3.05 3.05l2.12 2.12M10.83 10.83l2.12 2.12M3.05 12.95l2.12-2.12M10.83 5.17l2.12-2.12",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round"})}),MH=(e,t)=>e===0?[]:e<0?t:t.slice(-e),Zm=({progressStepsLimit:e,steps:t,globalClassName:n})=>{const{progressStepsLimit:r}=st(),i=e!=null?e:r,{overrides:s,isInitialized:u}=Rr(),c=gi("ProgressSteps");if(t.length===0||i===0)return null;const d=MH(i,t),f=u?s.ProgressSteps:void 0;if(f){const h={name:"ProgressSteps",payload:{steps:d},api:c};return w.jsx(ri,{tagName:f,props:h,label:"ProgressSteps"})}return w.jsx("div",{className:D(n,`${N}-progress-steps-panel`),children:w.jsx("div",{className:`${N}-progress-steps`,children:w.jsx("ul",{className:`${N}-progress-steps-list`,children:d.map((h,m)=>{const E=m<d.length-1,b=m===d.length-1;return w.jsxs("li",{className:D(`${N}-progress-step`,b&&"active"),"aria-label":`${h} (${E?"completed":"in progress"})`,children:[b&&w.jsx("span",{className:`${N}-progress-step-arc`}),w.jsx("span",{className:`${N}-progress-step-text`,children:h}),w.jsx("span",{className:D(`${N}-progress-step-icon`,E?"done":"active"),children:E?w.jsx(LH,{}):w.jsx(DH,{})})]},`${m}-${h}`)})})})})},pv=()=>{const{layoutPreset:e,globalClassName:t,themeVariables:n,messageAlignment:r,enableMinimize:i,enableDownloadTranscript:s,headerConfig:u}=st(),{isAgentTyping:c,resetConversation:d,endConversation:f,progressSteps:h,downloadTranscript:m}=zt(),E=Go(),b=Fm(),T=c,_=B=>B.file?b(B):E(B.text),{active:I,onError:v}=y_(),S=k.useMemo(()=>x1("chat",u==null?void 0:u.actions,{enableMinimize:!!i,enableDownloadTranscript:s!=null?s:!0}),[u==null?void 0:u.actions,i,s]),R=w1.some(B=>S[B]),U=I||R;return w.jsxs("div",{className:D(t,`${N}-container`,`${N}-embedded-chat`,`${N}-layout-${e}`),style:n,children:[w.jsx("div",{className:D(t,`${N}-message-container`,`container-${r}`,"embedded"),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:!1})}),w.jsx(Zm,{steps:h,globalClassName:t}),w.jsx(Mh,{componentType:"chat",className:"embedded-chat",isLoading:T,onSubmit:_}),U&&w.jsx("div",{className:D(t,`${N}-embedded-chat-menu`),children:I?w.jsx(E_,{componentType:"chat",availableActions:S,onClearChat:d,onEndConversation:f,onDownloadTranscript:m,onError:v}):w.jsxs(K7,{componentType:"chat",children:[S.toggleExpanded&&w.jsx(p_,{componentType:"chat"}),S.clearChat&&w.jsx(Tx,{componentType:"chat",onClearChat:d}),S.endConversation&&w.jsx(vx,{componentType:"chat",onEndConversation:f}),S.downloadTranscript&&w.jsx(_x,{componentType:"chat",onDownloadTranscript:m})]})})]})},hv=e=>{var d;const{children:t,disabled:n}=e,[r,i]=k.useState((d=e.container)==null?void 0:d.current),s=k.useSyncExternalStore(BH,()=>!1,()=>!0),{getRootNode:u}=Zl();if(k.useEffect(()=>{i(()=>{var f;return(f=e.container)==null?void 0:f.current})},[e.container]),s||n)return w.jsx(w.Fragment,{children:t});const c=r!=null?r:FH(u);return w.jsx(w.Fragment,{children:k.Children.map(t,f=>Ns.createPortal(f,c))})},FH=e=>{const t=e==null?void 0:e(),n=t.getRootNode();return jo(n)?n:Kr(t).body},BH=()=>()=>{},mv=({componentType:e,onClearChat:t,onClose:n,onEndConversation:r,onDownloadTranscript:i})=>{const{headerConfig:s,enableMinimize:u,enableDownloadTranscript:c}=st(),{active:d,onError:f}=y_(),h=k.useMemo(()=>x1(e,s==null?void 0:s.actions,{enableMinimize:!!u,enableDownloadTranscript:c!=null?c:!0}),[e,s==null?void 0:s.actions,u,c]);return w.jsx(WF,M({componentType:e,overflowActions:e==="modal"?b1:E1,availableActions:h,onClearChat:t,onClose:n,onEndConversation:r,onDownloadTranscript:i},d?{controls:w.jsx(E_,{componentType:e,availableActions:h,onClose:n,onClearChat:t,onEndConversation:r,onDownloadTranscript:i,onError:f})}:{}))},gv=({scrollSnapshotRef:e})=>{const{layoutPreset:t,globalClassName:n,themeVariables:r,messageAlignment:i}=st(),{mode:s,status:u,dialogPosition:c,isDialogFullHeight:d,dialogWidth:f}=tr(),{loading:h,isAgentTyping:m,resetConversation:E,endConversation:b,progressSteps:T,downloadTranscript:_}=zt(),I=Go(),v=Fm(),{isOpen:S}=u||{},R=!!u.isOpen,U=s==="standalone",B=m||h,A=()=>{zr(!1),ol()},G=W=>W.file?v(W):I(W.text);return w.jsx(s_,{lazyMount:!0,unmountOnExit:!0,modal:!1,closeOnEscape:!1,closeOnInteractOutside:!1,open:R,initialFocusEl:Bp,children:w.jsx(hv,{children:w.jsx(Nm,{className:D(n,`${N}-dialog-positioner`),style:r,children:w.jsxs(km,{className:D(n,`${N}-container`,`${N}-dialog`,`${N}-dialog-content`,`${N}-layout-${t}`,c,d&&"full-height",{standalone:U,embedded:!U}),style:f?{width:f}:void 0,children:[w.jsx(mv,{componentType:"dialog",onClearChat:E,onEndConversation:b,onClose:A,onDownloadTranscript:_}),w.jsx(Cm,{className:D(n,`${N}-message-container`,`container-${i}`,{standalone:U,embedded:!U}),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:U,isOpen:S,scrollSnapshotRef:e})}),w.jsx(Zm,{steps:T,globalClassName:n}),w.jsx(Mh,{componentType:"dialog",isLoading:B,onSubmit:G})]})})})})},yv=({scrollSnapshotRef:e})=>{const{layoutPreset:t,globalClassName:n,themeVariables:r,messageAlignment:i}=st(),{mode:s,status:u,isModalFullscreen:c}=tr(),{loading:d,isAgentTyping:f,resetConversation:h,endConversation:m,progressSteps:E,downloadTranscript:b}=zt(),T=Go(),_=Fm(),{isOpen:I}=u||{},v=!!u.isOpen,S=s==="standalone",R=f||d,U=({open:G})=>{if(G){zr(!0);return}B()},B=()=>{zr(!1),ol()},A=G=>G.file?_(G):T(G.text);return v?w.jsx(s_,{lazyMount:!0,unmountOnExit:!0,open:v,onOpenChange:U,initialFocusEl:Bp,children:w.jsx(hv,{children:w.jsxs("div",{className:D(n,`${N}-modal-container`),style:r,children:[w.jsx(t_,{className:D(n,`${N}-modal-backdrop`)}),w.jsx(Nm,{className:D(n,`${N}-container`,`${N}-modal`,`${N}-layout-${t}`,{fullscreen:c,standalone:S,embedded:!S}),children:w.jsxs(km,{className:D(n,`${N}-modal-content`,{standalone:S,embedded:!S}),children:[w.jsx(mv,{componentType:"modal",onClearChat:h,onEndConversation:m,onClose:B,onDownloadTranscript:b}),w.jsx(Cm,{className:D(n,`${N}-message-container`,`container-${i}`,{standalone:S,embedded:!S}),role:"region","aria-label":"Conversation",children:w.jsx(Jm,{isWidgetStandalone:S,isOpen:I,scrollSnapshotRef:e})}),w.jsx(Zm,{steps:E,globalClassName:n}),w.jsx(Mh,{componentType:"modal",isLoading:R,onSubmit:A})]})})]})})}):null},UH=()=>{const e=tr(),t=k.useRef(null),{status:{type:n,isMinimized:r}}=e||{status:{}};return r?w.jsx(mO,{}):n==="dialog"?w.jsx(gv,{scrollSnapshotRef:t}):n==="modal"?w.jsx(yv,{scrollSnapshotRef:t}):w.jsx(pv,{})},jH=()=>{const{setIsOpen:e,setIsInline:t,setElementId:n,setEntryType:r,setParams:i}=jF();k.useEffect(()=>{const s=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"&&i(d))};return RF(s),()=>{LF(s)}},[e,t,n,r,i])},Ev=(e,t,n)=>{n!==void 0?e(t,n):e(t)};function HH({isReady:e,hasError:t,transmit:n}){const r=k.useRef([]),i=k.useRef(e);i.current=e;const s=k.useRef(n);s.current=n;const u=k.useCallback((c,d)=>{i.current?Ev(s.current,c,d):r.current.push({prompt:c,options:d})},[]);return k.useEffect(()=>{if(e&&r.current.length){const c=r.current;r.current=[],c.forEach(({prompt:d,options:f})=>Ev(s.current,d,f))}},[e]),k.useEffect(()=>{t&&(r.current=[])},[t]),u}const bv={copilot:"Ask Copilot",messaging:"Ask a question"},$H=({onSubmit:e,disabled:t=!1})=>{const{globalClassName:n,mode:r}=st(),{placeholder:i,isResponseLoading:s}=nd(),u=i||bv[r],[c,d]=k.useState(""),f=t||s,h=m=>{const E=c.trim();E&&(m.preventDefault(),e(E),d(""))};return w.jsxs("form",{className:D(n,`${N}-prompts-input-container`),name:`${N}-prompts-form`,onSubmit:h,children:[w.jsx("label",{htmlFor:`${N}-prompts-input`,"aria-label":u,children:w.jsx(Em,{className:D(n,`${N}-prompts-input-icon`)})}),w.jsx("input",{id:`${N}-prompts-input`,className:D(n,`${N}-prompts-input`),name:`${N}-prompts-input`,placeholder:u,type:"text",disabled:f,value:c,onChange:m=>d(m.target.value)}),w.jsx(kr,{className:D(n,`${N}-prompts-input-submit-button`),type:"submit",ariaLabel:"Submit Prompt",icon:w.jsx(Up,{}),disabled:f})]})},zH=()=>{const{globalClassName:e,mode:t}=st(),{placeholder:n}=nd(),r=n||bv[t];return w.jsxs("div",{className:D(e,`${N}-prompts-header`),children:[w.jsx(Em,{className:D(e,`${N}-prompts-input-icon`),"aria-hidden":"true"}),w.jsx("span",{className:D(e,`${N}-prompts-header-text`),children:r})]})},wv=({label:e,disabled:t=!1,onClick:n})=>{var c;const{globalClassName:r,suggestionButtonConfig:i}=st(),s=i==null?void 0:i.icon,u=(c=i==null?void 0:i.iconPosition)!=null?c:"left";return w.jsxs("button",{className:D(r,`${N}-prompts-button`,{"has-icon":!!s,"icon-right":!!s&&u==="right"}),disabled:t,onClick:n,children:[s&&w.jsx(f_,{icon:s,className:`${N}-suggestion-button-icon`}),w.jsx("span",{children:e})]})},VH="Ask me something else",qH=({label:e,disabled:t=!1})=>w.jsx(wv,{label:e||VH,disabled:t,onClick:()=>zr(!0)}),WH=({onPromptClick:e,disabled:t=!1})=>{const{globalClassName:n}=st(),{staticQuestions:r,askElseButtonLabel:i,disableAskElseButton:s}=nd();if(!(r!=null&&r.length))return null;const u=c=>()=>{const d=c.trim();d&&e(d)};return w.jsxs("div",{className:D(n,`${N}-prompts-button-group`),children:[r.map(c=>w.jsx(wv,{label:c,disabled:t,onClick:u(c)},c)),!s&&w.jsx(qH,{label:i,disabled:t})]})},YH=()=>{const{globalClassName:e,themeVariables:t,enablePageContext:n}=st(),{isOpen:r,elementId:i,promptsDisplay:s}=nd(),{isConnected:u,sessionExpired:c,sendMessage:d,connectionStatus:f}=zt(),{productId:h}=Rm(),m=s!=="buttons",E=s!=="input",[b,T]=k.useState(null),_=f==="error",I=f==="connecting",v=Zy(u,c),S=HH({isReady:v,hasError:_,transmit:d});k.useEffect(()=>{if(!i||b)return;const U=document.getElementById(i);U&&T(U)},[i,b]);const R=k.useCallback(U=>{if(zr(!0),n){S(U);return}const{prompt:B,display:A}=_p(U,h);if(A&&A.length>0){S(B,{displayContent:A});return}S(B)},[S,h,n]);return!r||!b?null:Ns.createPortal(w.jsxs("div",{className:D(e,`${N}-prompts-extension-container`),style:t,children:[m&&w.jsx($H,{onSubmit:R,disabled:_}),!m&&w.jsx(zH,{}),E&&w.jsx(WH,{onPromptClick:R,disabled:_}),!_&&I&&w.jsx("p",{className:D(e,`${N}-prompts-connecting-message`),children:"Connecting to agent..."}),_&&w.jsx("p",{className:D(e,`${N}-prompts-error-message`),children:"Oops, an error occurred with our agent."})]}),b)},GH=()=>(jH(),w.jsx(YH,{})),xv=e=>w.jsxs(_E,ce(M({},e),{children:[w.jsx(UH,{}),w.jsx(GH,{})]}));function Tv(e,t){return Ie(this,null,function*(){return oE().sendMessage(e,t)})}const XH={components:{setEntryType:Pc,toggleWidgetOpen:zr,toggleWidgetMinimized:wo,toggleModalFullscreen:Rc,setWidgetType:Es,setWidgetDialogPosition:Lc,loadPromptsComponent:FF,togglePromptsExtensionOpen:l_},session:{resetConversation:BF,endConversation:UF,sendMessage:Tv},pageContext:{set:Dc,get:bs,clear:Uf},cart:{update:kN}};var dd={},_v;function KH(){if(_v)return dd;_v=1;var e=CE();return dd.createRoot=e.createRoot,dd.hydrateRoot=e.hydrateRoot,dd}var QH=KH();const vv=new WeakMap,Sv=(e,t,n,r)=>{var s;(s=vv.get(e))==null||s.unmount();const i=QH.createRoot(e);vv.set(e,i),i.render(w.jsx(xv,ce(M({},t),{overridesUrl:n,inlineOverrides:r,mode:"messaging"})))},JH=s=>{var u=s,{elementId:e,timeout:t=5e3,overridesUrl:n,inlineOverrides:r}=u,i=_n(u,["elementId","timeout","overridesUrl","inlineOverrides"]);let c;const d=(h,m)=>{for(const E of h)if(E.type==="childList"&&E.addedNodes.length)for(const b of E.addedNodes)b.nodeType===Node.ELEMENT_NODE&&b.id===e&&(kt(!0,"log","Target element found, rendering Messaging Widget"),m.disconnect(),clearTimeout(c),Sv(b,i,n,r))},f=new MutationObserver(d);return f.observe(document.body,{childList:!0,subtree:!0}),c=setTimeout(()=>{f.disconnect(),kt(!0,"error",`Element with id: ${e} not found within ${t} milliseconds, stopping observation`)},t),f},ZH=s=>{var u=s,{timeout:e,elementId:t,overridesUrl:n,overrides:r}=u,i=_n(u,["timeout","elementId","overridesUrl","overrides"]);if(!i.messagingConfig){kt(!0,"error","Messaging Widget requires messagingConfig");return}if(!i.messagingConfig.scrt2Url||!i.messagingConfig.orgId||!i.messagingConfig.esDeveloperName){kt(!0,"error","Messaging Widget requires messagingConfig.scrt2Url, messagingConfig.orgId, and messagingConfig.esDeveloperName");return}const c=document.getElementById(t);if(!c){kt(!0,"warn","Container element not found for id:",t),kt(!0,"warn","Beginning observation for element"),JH(M({elementId:t,timeout:e,overridesUrl:n,inlineOverrides:r},i));return}Sv(c,i,n,r)};function e$(){return Ie(this,null,function*(){return oE().getAuthLinkKey()})}class t$ extends HTMLElement{constructor(){super(...arguments);We(this,"_props",null)}set props(n){this._props=n,this.render()}get props(){return this._props}connectedCallback(){this.render()}render(){}}Fe.AgentForceWidget=xv,Fe.AgentforceWidgetProvider=_E,Fe.CART_UPDATE_EVENT=Cc,Fe.CIMULATE_WIDGET_READY_EVENT=l1,Fe.MessagingDialog=gv,Fe.MessagingEmbed=pv,Fe.MessagingModal=yv,Fe.MessagingProvider=uE,Fe.OverrideElement=t$,Fe.addCartUpdateListener=XA,Fe.clearPageContext=Uf,Fe.eventHandlers=XH,Fe.getAuthLinkKey=e$,Fe.getPageContext=bs,Fe.injectMessagingWidget=ZH,Fe.removeCartUpdateListener=KA,Fe.sendMessage=Tv,Fe.setPageContext=Dc,Fe.useMessaging=zt,Object.defineProperty(Fe,Symbol.toStringTag,{value:"Module"})}));