vendor: 5,964 bytes, line 1
1import{r as d,j as i,a as X,R as kr,g as Ml}from"./jsx-runtime-D2HyDbKh.js";import{u as Je,D as Ge,A as Tl,C as Ol,s as Dl}from"./CartProvider-DRDkNzgb.js";import{z as Vr}from"./index-DXqQCM1T.js";import{e as Al,d as Ns,c as St,a as Nt,O as Wn}from"./index-OGzYKti1.js";import{u as js}from"./useFirstRender-BfqRfFrL.js";import{L as Pr,B as _e,a as Rl,C as Ll,c as le}from"./Button-DN0gBET_.js";import{P as Pl,T as it,t as $l,f as Fl,O as Ei,d as ki,g as Ii,X as Mi,e as Ti,D as Oi,c as Ul,R as Bl,u as Hl,h as ql,C as Di}from"./index-CSgRVgty.js";import{J as zl,a as xe,b as tt,N as Wl,r as Cs,L as Ao,M as Ro,S as Lo}from"./components-SDhFL-zL.js";import{a as Ir,d as Gl,f as Ai,F as $r,b as Ri,C as Yl}from"./formatProductVariantAttributes-B4dzlm21.js";import{e as Vl,d as Ql}from"./index.esm--4BB0KQy.js";import{auth as er}from"./firebase.client-CKNaDRR2.js";import{am as Kl}from"./performance-0E6KhFrC.js";import{A as Ke}from"./index-C9Ymd-py.js";import{m as pe}from"./motion-FGmiHZpJ.js";import{S as Zl}from"./scroll-restoration-z6xYfQi5.js";import{I as _r}from"./Input-CZhQOuOd.js";import{c as Fr}from"./createLucideIcon-iJ9pEJd7.js";import{D as Ft}from"./Divider-DTIW_4YD.js";import{A as Li}from"./arrow-left-6qDR8OYQ.js";import{L as Pi}from"./Loader-B3AeGKAp.js";import{C as Po}from"./circle-alert-9e1ZjEZ4.js";import{C as Jl}from"./index-BzOSxPQb.js";var Ae;(function(e){e[e.Document=0]="Document",e[e.DocumentType=1]="DocumentType",e[e.Element=2]="Element",e[e.Text=3]="Text",e[e.CDATA=4]="CDATA",e[e.Comment=5]="Comment"})(Ae||(Ae={}));function Xl(e){return e.nodeType===e.ELEMENT_NODE}function Sr(e){const t=e==null?void 0:e.host;return(t==null?void 0:t.shadowRoot)===e}function Nr(e){return Object.prototype.toString.call(e)==="[object ShadowRoot]"}function ec(e){return e.includes(" background-clip: text;")&&!e.includes(" -webkit-background-clip: text;")&&(e=e.replace(" background-clip: text;"," -webkit-background-clip: text; background-clip: text;")),e}function tc(e){const{cssText:t}=e;if(t.split('"').length<3)return t;const r=["@import",`url(${JSON.stringify(e.href)})`];return e.layerName===""?r.push("layer"):e.layerName&&r.push(`layer(${e.layerName})`),e.supportsText&&r.push(`supports(${e.supportsText})`),e.media.length&&r.push(e.media.mediaText),r.join(" ")+";"}function cn(e){try{const t=e.rules||e.cssRules;return t?ec(Array.from(t,$i).join("")):null}catch{return null}}function $i(e){let t;if(nc(e))try{t=cn(e.styleSheet)||tc(e)}catch{}else if(sc(e)&&e.selectorText.includes(":"))return rc(e.cssText);return t||e.cssText}function rc(e){const t=/(\[(?:[\w-]+)[^\\])(:(?:[\w-]+)\])/gm;return e.replace(t,"$1\\$2")}function nc(e){return"styleSheet"in e}function sc(e){return"selectorText"in e}class Fi{constructor(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}getId(t){var r;if(!t)return-1;const n=(r=this.getMeta(t))===null||r===void 0?void 0:r.id;return n??-1}getNode(t){return this.idNodeMap.get(t)||null}getIds(){return Array.from(this.idNodeMap.keys())}getMeta(t){return this.nodeMetaMap.get(t)||null}removeNodeFromMap(t){const r=this.getId(t);this.idNodeMap.delete(r),t.childNodes&&t.childNodes.forEach(n=>this.removeNodeFromMap(n))}has(t){return this.idNodeMap.has(t)}hasNode(t){return this.nodeMetaMap.has(t)}add(t,r){const n=r.id;this.idNodeMap.set(n,t),this.nodeMetaMap.set(t,r)}replace(t,r){const n=this.getNode(t);if(n){const s=this.nodeMetaMap.get(n);s&&this.nodeMetaMap.set(r,s)}this.idNodeMap.set(t,r)}reset(){this.idNodeMap=new Map,this.nodeMetaMap=new WeakMap}}function oc(){return new Fi}function Es({element:e,maskInputOptions:t,tagName:r,type:n,value:s,maskInputFn:o}){let a=s||"";const l=n&&Vt(n);return(t[r.toLowerCase()]||l&&t[l])&&(o?a=o(a,e):a="*".repeat(a.length)),a}function Vt(e){return e.toLowerCase()}const $o="__rrweb_original__";function ic(e){const t=e.getContext("2d");if(!t)return!0;const r=50;for(let n=0;n<e.width;n+=r)for(let s=0;s<e.height;s+=r){const o=t.getImageData,a=$o in o?o[$o]:o;if(new Uint32Array(a.call(t,n,s,Math.min(r,e.width-n),Math.min(r,e.height-s)).data.buffer).some(c=>c!==0))return!1}return!0}function ks(e){const t=e.type;return e.hasAttribute("data-rr-is-password")?"password":t?Vt(t):null}function Ui(e,t){var r;let n;try{n=new URL(e,t??window.location.href)}catch{return null}const s=/\.([0-9a-z]+)(?:$)/i,o=n.pathname.match(s);return(r=o==null?void 0:o[1])!==null&&r!==void 0?r:null}let ac=1;const lc=new RegExp("[^a-z0-9-_:]"),Mr=-2;function Bi(){return ac++}function cc(e){if(e instanceof HTMLFormElement)return"form";const t=Vt(e.tagName);return lc.test(t)?"div":t}function uc(e){let t="";return e.indexOf("//")>-1?t=e.split("/").slice(0,3).join("/"):t=e.split("/")[0],t=t.split("?")[0],t}let Zt,Fo;const dc=/url\((?:(')([^']*)'|(")(.*?)"|([^)]*))\)/gm,fc=/^(?:[a-z+]+:)?\/\//i,pc=/^www\..*/i,hc=/^(data:)([^,]*),(.*)/i;function un(e,t){return(e||"").replace(dc,(r,n,s,o,a,l)=>{const c=s||a||l,f=n||o||"";if(!c)return r;if(fc.test(c)||pc.test(c))return`url(${f}${c}${f})`;if(hc.test(c))return`url(${f}${c}${f})`;if(c[0]==="/")return`url(${f}${uc(t)+c}${f})`;const u=t.split("/"),p=c.split("/");u.pop();for(const h of p)h!=="."&&(h===".."?u.pop():u.push(h));return`url(${f}${u.join("/")}${f})`})}const mc=/^[^ \t\n\r\u000c]+/,gc=/^[, \t\n\r\u000c]+/;function yc(e,t){if(t.trim()==="")return t;let r=0;function n(o){let a;const l=o.exec(t.substring(r));return l?(a=l[0],r+=a.length,a):""}const s=[];for(;n(gc),!(r>=t.length);){let o=n(mc);if(o.slice(-1)===",")o=tr(e,o.substring(0,o.length-1)),s.push(o);else{let a="";o=tr(e,o);let l=!1;for(;;){const c=t.charAt(r);if(c===""){s.push((o+a).trim());break}else if(l)c===")"&&(l=!1);else if(c===","){r+=1,s.push((o+a).trim());break}else c==="("&&(l=!0);a+=c,r+=1}}}return s.join(", ")}function tr(e,t){if(!t||t.trim()==="")return t;const r=e.createElement("a");return r.href=t,r.href}function xc(e){return!!(e.tagName==="svg"||e.ownerSVGElement)}function Is(){const e=document.createElement("a");return e.href="",e.href}
vendor: 4,677 bytes, line 1
1function Hi(e,t,r,n){return n&&(r==="src"||r==="href"&&!(t==="use"&&n[0]==="#")||r==="xlink:href"&&n[0]!=="#"||r==="background"&&(t==="table"||t==="td"||t==="th")?tr(e,n):r==="srcset"?yc(e,n):r==="style"?un(n,Is()):t==="object"&&r==="data"?tr(e,n):n)}function qi(e,t,r){return(e==="video"||e==="audio")&&t==="autoplay"}function vc(e,t,r){try{if(typeof t=="string"){if(e.classList.contains(t))return!0}else for(let n=e.classList.length;n--;){const s=e.classList[n];if(t.test(s))return!0}if(r)return e.matches(r)}catch{}return!1}function dn(e,t,r){if(!e)return!1;if(e.nodeType!==e.ELEMENT_NODE)return r?dn(e.parentNode,t,r):!1;for(let n=e.classList.length;n--;){const s=e.classList[n];if(t.test(s))return!0}return r?dn(e.parentNode,t,r):!1}function zi(e,t,r,n){try{const s=e.nodeType===e.ELEMENT_NODE?e:e.parentElement;if(s===null)return!1;if(typeof t=="string"){if(n){if(s.closest(`.${t}`))return!0}else if(s.classList.contains(t))return!0}else if(dn(s,t,n))return!0;if(r){if(n){if(s.closest(r))return!0}else if(s.matches(r))return!0}}catch{}return!1}function bc(e,t,r){const n=e.contentWindow;if(!n)return;let s=!1,o;try{o=n.document.readyState}catch{return}if(o!=="complete"){const l=setTimeout(()=>{s||(t(),s=!0)},r);e.addEventListener("load",()=>{clearTimeout(l),s=!0,t()});return}const a="about:blank";if(n.location.href!==a||e.src===a||e.src==="")return setTimeout(t,0),e.addEventListener("load",t);e.addEventListener("load",t)}function wc(e,t,r){let n=!1,s;try{s=e.sheet}catch{return}if(s)return;const o=setTimeout(()=>{n||(t(),n=!0)},r);e.addEventListener("load",()=>{clearTimeout(o),n=!0,t()})}function _c(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:a,inlineStylesheet:l,maskInputOptions:c={},maskTextFn:f,maskInputFn:u,dataURLOptions:p={},inlineImages:h,recordCanvas:v,keepIframeSrcFn:g,newlyAddedElement:m=!1}=t,y=Sc(r,n);switch(e.nodeType){case e.DOCUMENT_NODE:return e.compatMode!=="CSS1Compat"?{type:Ae.Document,childNodes:[],compatMode:e.compatMode}:{type:Ae.Document,childNodes:[]};case e.DOCUMENT_TYPE_NODE:return{type:Ae.DocumentType,name:e.name,publicId:e.publicId,systemId:e.systemId,rootId:y};case e.ELEMENT_NODE:return jc(e,{doc:r,blockClass:s,blockSelector:o,inlineStylesheet:l,maskInputOptions:c,maskInputFn:u,dataURLOptions:p,inlineImages:h,recordCanvas:v,keepIframeSrcFn:g,newlyAddedElement:m,rootId:y});case e.TEXT_NODE:return Nc(e,{needsMask:a,maskTextFn:f,rootId:y});case e.CDATA_SECTION_NODE:return{type:Ae.CDATA,textContent:"",rootId:y};case e.COMMENT_NODE:return{type:Ae.Comment,textContent:e.textContent||"",rootId:y};default:return!1}}function Sc(e,t){if(!t.hasNode(e))return;const r=t.getId(e);return r===1?void 0:r}function Nc(e,t){var r;const{needsMask:n,maskTextFn:s,rootId:o}=t,a=e.parentNode&&e.parentNode.tagName;let l=e.textContent;const c=a==="STYLE"?!0:void 0,f=a==="SCRIPT"?!0:void 0;if(c&&l){try{e.nextSibling||e.previousSibling||!((r=e.parentNode.sheet)===null||r===void 0)&&r.cssRules&&(l=cn(e.parentNode.sheet))}catch(u){console.warn(`Cannot get CSS styles from text's parentNode. Error: ${u}`,e)}l=un(l,Is())}return f&&(l="SCRIPT_PLACEHOLDER"),!c&&!f&&l&&n&&(l=s?s(l,e.parentElement):l.replace(/[\S]/g,"*")),{type:Ae.Text,textContent:l||"",isStyle:c,rootId:o}}function jc(e,t){const{doc:r,blockClass:n,blockSelector:s,inlineStylesheet:o,maskInputOptions:a={},maskInputFn:l,dataURLOptions:c={},inlineImages:f,recordCanvas:u,keepIframeSrcFn:p,newlyAddedElement:h=!1,rootId:v}=t,g=vc(e,n,s),m=cc(e);let y={};const C=e.attributes.length;for(let S=0;S<C;S++){const k=e.attributes[S];qi(m,k.name,k.value)||(y[k.name]=Hi(r,m,Vt(k.name),k.value))}if(m==="link"&&o){const S=Array.from(r.styleSheets).find(O=>O.href===e.href);let k=null;S&&(k=cn(S)),k&&(delete y.rel,delete y.href,y._cssText=un(k,S.href))}if(m==="style"&&e.sheet&&!(e.innerText||e.textContent||"").trim().length){const S=cn(e.sheet);S&&(y._cssText=un(S,Is()))}if(m==="input"||m==="textarea"||m==="select"){const S=e.value,k=e.checked;y.type!=="radio"&&y.type!=="checkbox"&&y.type!=="submit"&&y.type!=="button"&&S?y.value=Es({element:e,type:ks(e),tagName:m,value:S,maskInputOptions:a,maskInputFn:l}):k&&(y.checked=k)}if(m==="option"&&(e.selected&&!a.select?y.selected=!0:delete y.selected),m==="canvas"&&u){if(e.__context==="2d")ic(e)||(y.rr_dataURL=e.toDataURL(c.type,c.quality));else if(!("__context"in e)){const S=e.toDataURL(c.type,c.quality),k=document.createElement("canvas");k.width=e.width,k.height=e.height;const O=k.toDataURL(c.type,c.quality);S!==O&&(y.rr_dataURL=S)}}if(m==="img"&&f){Zt||(Zt=r.createElement("canvas"),Fo=Zt.getContext("2d"));const S=e,k=S.crossOrigin;S.crossOrigin="anonymous";const O=()=>{S.removeEventListener("load",O);
1try{Zt.width=S.naturalWidth,Zt.height=S.naturalHeight,Fo.drawImage(S,0,0),y.rr_dataURL=Zt.toDataURL(c.type,c.quality)}catch(w){console.warn(`Cannot inline img src=${S.currentSrc}! Error: ${w}`)}k?y.crossOrigin=k:S.removeAttribute("crossorigin")};S.complete&&S.naturalWidth!==0?O():S.addEventListener("load",O)}if(m==="audio"||m==="video"){const S=y;S.rr_mediaState=e.paused?"paused":"played",S.rr_mediaCurrentTime=e.currentTime,S.rr_mediaPlaybackRate=e.playbackRate,S.rr_mediaMuted=e.muted,S.rr_mediaLoop=e.loop,S.rr_mediaVolume=e.volume}if(h||(e.scrollLeft&&(y.rr_scrollLeft=e.scrollLeft),e.scrollTop&&(y.rr_scrollTop=e.scrollTop)),g){const{width:S,height:k}=e.getBoundingClientRect();y={class:y.class,rr_width:`${S}px`,rr_height:`${k}px`}}m==="iframe"&&!p(y.src)&&(e.contentDocument||(y.rr_src=y.src),delete y.src);let I;try{customElements.get(m)&&(I=!0)}catch{}return{type:Ae.Element,tagName:m,attributes:y,childNodes:[],isSVG:xc(e)||void 0,needBlock:g,rootId:v,isCustom:I}}function ye(e){return e==null?"":e.toLowerCase()}function Cc(e,t){if(t.comment&&e.type===Ae.Comment)return!0;if(e.type===Ae.Element){if(t.script&&(e.tagName==="script"||e.tagName==="link"&&(e.attributes.rel==="preload"||e.attributes.rel==="modulepreload")&&e.attributes.as==="script"||e.tagName==="link"&&e.attributes.rel==="prefetch"&&typeof e.attributes.href=="string"&&Ui(e.attributes.href)==="js"))return!0;if(t.headFavicon&&(e.tagName==="link"&&e.attributes.rel==="shortcut icon"||e.tagName==="meta"&&(ye(e.attributes.name).match(/^msapplication-tile(image|color)$/)||ye(e.attributes.name)==="application-name"||ye(e.attributes.rel)==="icon"||ye(e.attributes.rel)==="apple-touch-icon"||ye(e.attributes.rel)==="shortcut icon")))return!0;if(e.tagName==="meta"){if(t.headMetaDescKeywords&&ye(e.attributes.name).match(/^description|keywords$/))return!0;if(t.headMetaSocial&&(ye(e.attributes.property).match(/^(og|twitter|fb):/)||ye(e.attributes.name).match(/^(og|twitter):/)||ye(e.attributes.name)==="pinterest"))return!0;if(t.headMetaRobots&&(ye(e.attributes.name)==="robots"||ye(e.attributes.name)==="googlebot"||ye(e.attributes.name)==="bingbot"))return!0;if(t.headMetaHttpEquiv&&e.attributes["http-equiv"]!==void 0)return!0;if(t.headMetaAuthorship&&(ye(e.attributes.name)==="author"||ye(e.attributes.name)==="generator"||ye(e.attributes.name)==="framework"||ye(e.attributes.name)==="publisher"||ye(e.attributes.name)==="progid"||ye(e.attributes.property).match(/^article:/)||ye(e.attributes.property).match(/^product:/)))return!0;if(t.headMetaVerification&&(ye(e.attributes.name)==="google-site-verification"||ye(e.attributes.name)==="yandex-verification"||ye(e.attributes.name)==="csrf-token"||ye(e.attributes.name)==="p:domain_verify"||ye(e.attributes.name)==="verify-v1"||ye(e.attributes.name)==="verification"||ye(e.attributes.name)==="shopify-checkout-api-token"))return!0}}return!1}function rr(e,t){const{doc:r,mirror:n,blockClass:s,blockSelector:o,maskTextClass:a,maskTextSelector:l,skipChild:c=!1,inlineStylesheet:f=!0,maskInputOptions:u={},maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:g={},inlineImages:m=!1,recordCanvas:y=!1,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S=5e3,onStylesheetLoad:k,stylesheetLoadTimeout:O=5e3,keepIframeSrcFn:w=()=>!1,newlyAddedElement:T=!1}=t;let{needsMask:b}=t,{preserveWhiteSpace:_=!0}=t;!b&&e.childNodes&&(b=zi(e,a,l,b===void 0));const x=_c(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:b,inlineStylesheet:f,maskInputOptions:u,maskTextFn:p,maskInputFn:h,dataURLOptions:g,inlineImages:m,recordCanvas:y,keepIframeSrcFn:w,newlyAddedElement:T});if(!x)return console.warn(e,"not serialized"),null;let j;n.hasNode(e)?j=n.getId(e):Cc(x,v)||!_&&x.type===Ae.Text&&!x.isStyle&&!x.textContent.replace(/^\s+|\s+$/gm,"").length?j=Mr:j=Bi();const M=Object.assign(x,{id:j});if(n.add(e,M),j===Mr)return null;C&&C(e);let $=!c;if(M.type===Ae.Element){$=$&&!M.needBlock,delete M.needBlock;const L=e.shadowRoot;L&&Nr(L)&&(M.isShadowHost=!0)}if((M.type===Ae.Document||M.type===Ae.Element)&&$){v.headWhitespace&&M.type===Ae.Element&&M.tagName==="head"&&(_=!1);const L={doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:b,maskTextClass:a,maskTextSelector:l,skipChild:c,inlineStylesheet:f,maskInputOptions:u,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:w};if(!(M.type===Ae.Element&&M.tagName==="textarea"&&M.attributes.value!==void 0))for(const P of Array.from(e.childNodes)){const R=rr(P,L);R&&M.childNodes.push(R)}if(Xl(e)&&e.shadowRoot)for(const P of Array.from(e.shadowRoot.childNodes)){const R=rr(P,L);R&&(Nr(e.shadowRoot)&&(R.isShadow=!0),M.childNodes.push(R))}}return e.parentNode&&Sr(e.parentNode)&&Nr(e.parentNode)&&(M.isShadow=!0),M.type===Ae.Element&&M.tagName==="iframe"&&bc(e,()=>{const L=e.contentDocument;if(L&&I){const P=rr(L,{doc:L,mirror:n,blockClass:s,blockSelector:o,needsMask:b,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:u,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:w});P&&I(e,P)}},S),M.type===Ae.Element&&M.tagName==="link"&&typeof M.attributes.rel=="string"&&(M.attributes.rel==="stylesheet"||M.attributes.rel==="preload"&&typeof M.attributes.href=="string"&&Ui(M.attributes.href)==="css")&&wc(e,()=>{if(k){const L=rr(e,{doc:r,mirror:n,blockClass:s,blockSelector:o,needsMask:b,maskTextClass:a,maskTextSelector:l,skipChild:!1,inlineStylesheet:f,maskInputOptions:u,maskTextFn:p,maskInputFn:h,slimDOMOptions:v,dataURLOptions:g,inlineImages:m,recordCanvas:y,preserveWhiteSpace:_,onSerialize:C,onIframeLoad:I,iframeLoadTimeout:S,onStylesheetLoad:k,stylesheetLoadTimeout:O,keepIframeSrcFn:w});L&&k(e,L)}},O),M}
vendor: 19,814 bytes, lines 1-3
1function Ec(e,t){const{mirror:r=new Fi,blockClass:n="rr-block",blockSelector:s=null,maskTextClass:o="rr-mask",maskTextSelector:a=null,inlineStylesheet:l=!0,inlineImages:c=!1,recordCanvas:f=!1,maskAllInputs:u=!1,maskTextFn:p,maskInputFn:h,slimDOM:v=!1,dataURLOptions:g,preserveWhiteSpace:m,onSerialize:y,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:O=()=>!1}=t||{};return rr(e,{doc:e,mirror:r,blockClass:n,blockSelector:s,maskTextClass:o,maskTextSelector:a,skipChild:!1,inlineStylesheet:l,maskInputOptions:u===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:u===!1?{password:!0}:u,maskTextFn:p,maskInputFn:h,slimDOMOptions:v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaDescKeywords:v==="all",headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaAuthorship:!0,headMetaVerification:!0}:v===!1?{}:v,dataURLOptions:g,inlineImages:c,recordCanvas:f,preserveWhiteSpace:m,onSerialize:y,onIframeLoad:C,iframeLoadTimeout:I,onStylesheetLoad:S,stylesheetLoadTimeout:k,keepIframeSrcFn:O,newlyAddedElement:!1})}function Ye(e,t,r=document){const n={capture:!0,passive:!0};return r.addEventListener(e,t,n),()=>r.removeEventListener(e,t,n)}const Xt=`Please stop import mirror directly. Instead of that,\r 2now you can use replayer.getMirror() to access the mirror instance of a replayer,\r 3or you can use record.mirror to access the mirror instance during recording.`;let Uo={map:{},getId(){return console.error(Xt),-1},getNode(){return console.error(Xt),null},removeNodeFromMap(){console.error(Xt)},has(){return console.error(Xt),!1},reset(){console.error(Xt)}};typeof window<"u"&&window.Proxy&&window.Reflect&&(Uo=new Proxy(Uo,{get(e,t,r){return t==="map"&&console.error(Xt),Reflect.get(e,t,r)}}));function Tr(e,t,r={}){let n=null,s=0;return function(...o){const a=Date.now();!s&&r.leading===!1&&(s=a);const l=t-(a-s),c=this;l<=0||l>t?(n&&(clearTimeout(n),n=null),s=a,e.apply(c,o)):!n&&r.trailing!==!1&&(n=setTimeout(()=>{s=r.leading===!1?0:Date.now(),n=null,e.apply(c,o)},l))}}function jn(e,t,r,n,s=window){const o=s.Object.getOwnPropertyDescriptor(e,t);return s.Object.defineProperty(e,t,n?r:{set(a){setTimeout(()=>{r.set.call(this,a)},0),o&&o.set&&o.set.call(this,a)}}),()=>jn(e,t,o||{},!0)}function dr(e,t,r){try{if(!(t in e))return()=>{};const n=e[t],s=r(n);return typeof s=="function"&&(s.prototype=s.prototype||{},Object.defineProperties(s,{__rrweb_original__:{enumerable:!1,value:n}})),e[t]=s,()=>{e[t]=n}}catch{return()=>{}}}let fn=Date.now;/[1-9][0-9]{12}/.test(Date.now().toString())||(fn=()=>new Date().getTime());function Wi(e){var t,r,n,s,o,a;const l=e.document;return{left:l.scrollingElement?l.scrollingElement.scrollLeft:e.pageXOffset!==void 0?e.pageXOffset:(l==null?void 0:l.documentElement.scrollLeft)||((r=(t=l==null?void 0:l.body)===null||t===void 0?void 0:t.parentElement)===null||r===void 0?void 0:r.scrollLeft)||((n=l==null?void 0:l.body)===null||n===void 0?void 0:n.scrollLeft)||0,top:l.scrollingElement?l.scrollingElement.scrollTop:e.pageYOffset!==void 0?e.pageYOffset:(l==null?void 0:l.documentElement.scrollTop)||((o=(s=l==null?void 0:l.body)===null||s===void 0?void 0:s.parentElement)===null||o===void 0?void 0:o.scrollTop)||((a=l==null?void 0:l.body)===null||a===void 0?void 0:a.scrollTop)||0}}function Gi(){return window.innerHeight||document.documentElement&&document.documentElement.clientHeight||document.body&&document.body.clientHeight}function Yi(){return window.innerWidth||document.documentElement&&document.documentElement.clientWidth||document.body&&document.body.clientWidth}function Vi(e){return e?e.nodeType===e.ELEMENT_NODE?e:e.parentElement:null}function Ve(e,t,r,n){if(!e)return!1;const s=Vi(e);if(!s)return!1;try{if(typeof t=="string"){if(s.classList.contains(t)||n&&s.closest("."+t)!==null)return!0}else if(dn(s,t,n))return!0}catch{}return!!(r&&(s.matches(r)||n&&s.closest(r)!==null))}function kc(e,t){return t.getId(e)!==-1}function Gn(e,t){return t.getId(e)===Mr}function Qi(e,t){if(Sr(e))return!1;const r=t.getId(e);return t.has(r)?e.parentNode&&e.parentNode.nodeType===e.DOCUMENT_NODE?!1:e.parentNode?Qi(e.parentNode,t):!0:!0}function us(e){return!!e.changedTouches}function Ic(e=window){"NodeList"in e&&!e.NodeList.prototype.forEach&&(e.NodeList.prototype.forEach=Array.prototype.forEach),"DOMTokenList"in e&&!e.DOMTokenList.prototype.forEach&&(e.DOMTokenList.prototype.forEach=Array.prototype.forEach),Node.prototype.contains||(Node.prototype.contains=(...t)=>{let r=t[0];if(!(0 in t))throw new TypeError("1 argument is required");do if(this===r)return!0;while(r=r&&r.parentNode);return!1})}function Ki(e,t){return!!(e.nodeName==="IFRAME"&&t.getMeta(e))}function Zi(e,t){return!!(e.nodeName==="LINK"&&e.nodeType===e.ELEMENT_NODE&&e.getAttribute&&e.getAttribute("rel")==="stylesheet"&&t.getMeta(e))}function ds(e){return!!(e!=null&&e.shadowRoot)}class Mc{constructor(){this.id=1,this.styleIDMap=new WeakMap,this.idStyleMap=new Map}getId(t){var r;return(r=this.styleIDMap.get(t))!==null&&r!==void 0?r:-1}has(t){return this.styleIDMap.has(t)}add(t,r){if(this.has(t))return this.getId(t);let n;return r===void 0?n=this.id++:n=r,this.styleIDMap.set(t,n),this.idStyleMap.set(n,t),n}getStyle(t){return this.idStyleMap.get(t)||null}reset(){this.styleIDMap=new WeakMap,this.idStyleMap=new Map,this.id=1}generateId(){return this.id++}}function Ji(e){var t,r;let n=null;return((r=(t=e.getRootNode)===null||t===void 0?void 0:t.call(e))===null||r===void 0?void 0:r.nodeType)===Node.DOCUMENT_FRAGMENT_NODE&&e.getRootNode().host&&(n=e.getRootNode().host),n}function Tc(e){let t=e,r;for(;r=Ji(t);)t=r;return t}function Oc(e){const t=e.ownerDocument;if(!t)return!1;const r=Tc(e);return t.contains(r)}function Xi(e){const t=e.ownerDocument;return t?t.contains(e)||Oc(e):!1}var de=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(de||{}),ae=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(ae||{}),Qe=(e=>(e[e.MouseUp=0]="MouseUp",e[e.MouseDown=1]="MouseDown",e[e.Click=2]="Click",e[e.ContextMenu=3]="ContextMenu",e[e.DblClick=4]="DblClick",e[e.Focus=5]="Focus",e[e.Blur=6]="Blur",e[e.TouchStart=7]="TouchStart",e[e.TouchMove_Departed=8]="TouchMove_Departed",e[e.TouchEnd=9]="TouchEnd",e[e.TouchCancel=10]="TouchCancel",e))(Qe||{}),yt=(e=>(e[e.Mouse=0]="Mouse",e[e.Pen=1]="Pen",e[e.Touch=2]="Touch",e))(yt||{}),ir=(e=>(e[e["2D"]=0]="2D",e[e.WebGL=1]="WebGL",e[e.WebGL2=2]="WebGL2",e))(ir||{});function Bo(e){return"__ln"in e}class Dc{constructor(){this.length=0,this.head=null,this.tail=null}get(t){if(t>=this.length)throw new Error("Position outside of list range");let r=this.head;for(let n=0;n<t;n++)r=(r==null?void 0:r.next)||null;return r}addNode(t){const r={value:t,previous:null,next:null};if(t.__ln=r,t.previousSibling&&Bo(t.previousSibling)){const n=t.previousSibling.__ln.next;r.next=n,r.previous=t.previousSibling.__ln,t.previousSibling.__ln.next=r,n&&(n.previous=r)}else if(t.nextSibling&&Bo(t.nextSibling)&&t.nextSibling.__ln.previous){const n=t.nextSibling.__ln.previous;r.previous=n,r.next=t.nextSibling.__ln,t.nextSibling.__ln.previous=r,n&&(n.next=r)}else this.head&&(this.head.previous=r),r.next=this.head,this.head=r;r.next===null&&(this.tail=r),this.length++}removeNode(t){const r=t.__ln;this.head&&(r.previous?(r.previous.next=r.next,r.next?r.next.previous=r.previous:this.tail=r.previous):(this.head=r.next,this.head?this.head.previous=null:this.tail=null),t.__ln&&delete t.__ln,this.length--)}}const Ho=(e,t)=>`${e}@${t}`;class Ac{constructor(){this.frozen=!1,this.locked=!1,this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.mapRemoves=[],this.movedMap={},this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.processMutations=t=>{t.forEach(this.processMutation),this.emit()},this.emit=()=>{if(this.frozen||this.locked)return;const t=[],r=new Set,n=new Dc,s=c=>{let f=c,u=Mr;for(;u===Mr;)f=f&&f.nextSibling,u=f&&this.mirror.getId(f);return u},o=c=>{if(!c.parentNode||!Xi(c)||c.parentNode.tagName==="TEXTAREA")return;const f=Sr(c.parentNode)?this.mirror.getId(Ji(c)):this.mirror.getId(c.parentNode),u=s(c);if(f===-1||u===-1)return n.addNode(c);const p=rr(c,{doc:this.doc,mirror:this.mirror,blockClass:this.blockClass,blockSelector:this.blockSelector,maskTextClass:this.maskTextClass,maskTextSelector:this.maskTextSelector,skipChild:!0,newlyAddedElement:!0,inlineStylesheet:this.inlineStylesheet,maskInputOptions:this.maskInputOptions,maskTextFn:this.maskTextFn,maskInputFn:this.maskInputFn,slimDOMOptions:this.slimDOMOptions,dataURLOptions:this.dataURLOptions,recordCanvas:this.recordCanvas,inlineImages:this.inlineImages,onSerialize:h=>{Ki(h,this.mirror)&&this.iframeManager.addIframe(h),Zi(h,this.mirror)&&this.stylesheetManager.trackLinkElement(h),ds(c)&&this.shadowDomManager.addShadowRoot(c.shadowRoot,this.doc)},onIframeLoad:(h,v)=>{this.iframeManager.attachIframe(h,v),this.shadowDomManager.observeAttachShadow(h)},onStylesheetLoad:(h,v)=>{this.stylesheetManager.attachLinkElement(h,v)}});p&&(t.push({parentId:f,nextId:u,node:p}),r.add(p.id))};for(;this.mapRemoves.length;)this.mirror.removeNodeFromMap(this.mapRemoves.shift());for(const c of this.movedSet)qo(this.removes,c,this.mirror)&&!this.movedSet.has(c.parentNode)||o(c);for(const c of this.addedSet)!zo(this.droppedSet,c)&&!qo(this.removes,c,this.mirror)||zo(this.movedSet,c)?o(c):this.droppedSet.add(c);let a=null;for(;n.length;){let c=null;if(a){const f=this.mirror.getId(a.value.parentNode),u=s(a.value);f!==-1&&u!==-1&&(c=a)}if(!c){let f=n.tail;for(;f;){const u=f;if(f=f.previous,u){const p=this.mirror.getId(u.value.parentNode);if(s(u.value)===-1)continue;if(p!==-1){c=u;break}else{const v=u.value;if(v.parentNode&&v.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE){const g=v.parentNode.host;if(this.mirror.getId(g)!==-1){c=u;break}}}}}}if(!c){for(;n.head;)n.removeNode(n.head.value);break}a=c.previous,n.removeNode(c.value),o(c.value)}const l={texts:this.texts.map(c=>{const f=c.node;return f.parentNode&&f.parentNode.tagName==="TEXTAREA"&&this.genTextAreaValueMutation(f.parentNode),{id:this.mirror.getId(f),value:c.value}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),attributes:this.attributes.map(c=>{const{attributes:f}=c;if(typeof f.style=="string"){const u=JSON.stringify(c.styleDiff),p=JSON.stringify(c._unchangedStyles);u.length<f.style.length&&(u+p).split("var(").length===f.style.split("var(").length&&(f.style=c.styleDiff)}return{id:this.mirror.getId(c.node),attributes:f}}).filter(c=>!r.has(c.id)).filter(c=>this.mirror.has(c.id)),removes:this.removes,adds:t};!l.texts.length&&!l.attributes.length&&!l.removes.length&&!l.adds.length||(this.texts=[],this.attributes=[],this.attributeMap=new WeakMap,this.removes=[],this.addedSet=new Set,this.movedSet=new Set,this.droppedSet=new Set,this.movedMap={},this.mutationCb(l))},this.genTextAreaValueMutation=t=>{let r=this.attributeMap.get(t);r||(r={node:t,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(r),this.attributeMap.set(t,r)),r.attributes.value=Array.from(t.childNodes,n=>n.textContent||"").join("")},this.processMutation=t=>{if(!Gn(t.target,this.mirror))switch(t.type){case"characterData":{const r=t.target.textContent;!Ve(t.target,this.blockClass,this.blockSelector,!1)&&r!==t.oldValue&&this.texts.push({value:zi(t.target,this.maskTextClass,this.maskTextSelector,!0)&&r?this.maskTextFn?this.maskTextFn(r,Vi(t.target)):r.replace(/[\S]/g,"*"):r,node:t.target});break}case"attributes":{const r=t.target;let n=t.attributeName,s=t.target.getAttribute(n);if(n==="value"){const a=ks(r);s=Es({element:r,maskInputOptions:this.maskInputOptions,tagName:r.tagName,type:a,value:s,maskInputFn:this.maskInputFn})}if(Ve(t.target,this.blockClass,this.blockSelector,!1)||s===t.oldValue)return;let o=this.attributeMap.get(t.target);if(r.tagName==="IFRAME"&&n==="src"&&!this.keepIframeSrcFn(s))if(!r.contentDocument)n="rr_src";else return;if(o||(o={node:t.target,attributes:{},styleDiff:{},_unchangedStyles:{}},this.attributes.push(o),this.attributeMap.set(t.target,o)),n==="type"&&r.tagName==="INPUT"&&(t.oldValue||"").toLowerCase()==="password"&&r.setAttribute("data-rr-is-password","true"),!qi(r.tagName,n)&&(o.attributes[n]=Hi(this.doc,Vt(r.tagName),Vt(n),s),n==="style")){if(!this.unattachedDoc)try{this.unattachedDoc=document.implementation.createHTMLDocument()}catch{this.unattachedDoc=this.doc}const a=this.unattachedDoc.createElement("span");t.oldValue&&a.setAttribute("style",t.oldValue);for(const l of Array.from(r.style)){const c=r.style.getPropertyValue(l),f=r.style.getPropertyPriority(l);c!==a.style.getPropertyValue(l)||f!==a.style.getPropertyPriority(l)?f===""?o.styleDiff[l]=c:o.styleDiff[l]=[c,f]:o._unchangedStyles[l]=[c,f]}for(const l of Array.from(a.style))r.style.getPropertyValue(l)===""&&(o.styleDiff[l]=!1)}break}case"childList":{if(Ve(t.target,this.blockClass,this.blockSelector,!0))return;if(t.target.tagName==="TEXTAREA"){this.genTextAreaValueMutation(t.target);return}t.addedNodes.forEach(r=>this.genAdds(r,t.target)),t.removedNodes.forEach(r=>{const n=this.mirror.getId(r),s=Sr(t.target)?this.mirror.getId(t.target.host):this.mirror.getId(t.target);Ve(t.target,this.blockClass,this.blockSelector,!1)||Gn(r,this.mirror)||!kc(r,this.mirror)||(this.addedSet.has(r)?(fs(this.addedSet,r),this.droppedSet.add(r)):this.addedSet.has(t.target)&&n===-1||Qi(t.target,this.mirror)||(this.movedSet.has(r)&&this.movedMap[Ho(n,s)]?fs(this.movedSet,r):this.removes.push({parentId:s,id:n,isShadow:Sr(t.target)&&Nr(t.target)?!0:void 0})),this.mapRemoves.push(r))});break}}},this.genAdds=(t,r)=>{if(!this.processedNodeManager.inOtherBuffer(t,this)&&!(this.addedSet.has(t)||this.movedSet.has(t))){if(this.mirror.hasNode(t)){if(Gn(t,this.mirror))return;this.movedSet.add(t);let n=null;r&&this.mirror.hasNode(r)&&(n=this.mirror.getId(r)),n&&n!==-1&&(this.movedMap[Ho(this.mirror.getId(t),n)]=!0)}else this.addedSet.add(t),this.droppedSet.delete(t);Ve(t,this.blockClass,this.blockSelector,!1)||(t.childNodes.forEach(n=>this.genAdds(n)),ds(t)&&t.shadowRoot.childNodes.forEach(n=>{this.processedNodeManager.add(n,this),this.genAdds(n,t)}))}}}init(t){["mutationCb","blockClass","blockSelector","maskTextClass","maskTextSelector","inlineStylesheet","maskInputOptions","maskTextFn","maskInputFn","keepIframeSrcFn","recordCanvas","inlineImages","slimDOMOptions","dataURLOptions","doc","mirror","iframeManager","stylesheetManager","shadowDomManager","canvasManager","processedNodeManager"].forEach(r=>{this[r]=t[r]})}freeze(){this.frozen=!0,this.canvasManager.freeze()}unfreeze(){this.frozen=!1,this.canvasManager.unfreeze(),this.emit()}isFrozen(){return this.frozen}lock(){this.locked=!0,this.canvasManager.lock()}unlock(){this.locked=!1,this.canvasManager.unlock(),this.emit()}reset(){this.shadowDomManager.reset(),this.canvasManager.reset()}}function fs(e,t){e.delete(t),t.childNodes.forEach(r=>fs(e,r))}function qo(e,t,r){return e.length===0?!1:ea(e,t,r)}function ea(e,t,r){const{parentNode:n}=t;if(!n)return!1;const s=r.getId(n);return e.some(o=>o.id===s)?!0:ea(e,n,r)}function zo(e,t){return e.size===0?!1:ta(e,t)}function ta(e,t){const{parentNode:r}=t;return r?e.has(r)?!0:ta(e,r):!1}let jr;function Rc(e){jr=e}function Lc(){jr=void 0}const ce=e=>jr?(...r)=>{try{return e(...r)}catch(n){if(jr&&jr(n)===!0)return;throw n}}:e,Wt=[];function Ur(e){try{if("composedPath"in e){const t=e.composedPath();if(t.length)return t[0]}else if("path"in e&&e.path.length)return e.path[0]}catch{}return e&&e.target}function ra(e,t){var r,n;const s=new Ac;Wt.push(s),s.init(e);let o=window.MutationObserver||window.__rrMutationObserver;const a=(n=(r=window==null?void 0:window.Zone)===null||r===void 0?void 0:r.__symbol__)===null||n===void 0?void 0:n.call(r,"MutationObserver");a&&window[a]&&(o=window[a]);const l=new o(ce(s.processMutations.bind(s)));return l.observe(t,{attributes:!0,attributeOldValue:!0,characterData:!0,characterDataOldValue:!0,childList:!0,subtree:!0}),l}function Pc({mousemoveCb:e,sampling:t,doc:r,mirror:n}){if(t.mousemove===!1)return()=>{};const s=typeof t.mousemove=="number"?t.mousemove:50,o=typeof t.mousemoveCallback=="number"?t.mousemoveCallback:500;let a=[],l;const c=Tr(ce(p=>{const h=Date.now()-l;e(a.map(v=>(v.timeOffset-=h,v)),p),a=[],l=null}),o),f=ce(Tr(ce(p=>{const h=Ur(p),{clientX:v,clientY:g}=us(p)?p.changedTouches[0]:p;l||(l=fn()),a.push({x:v,y:g,id:n.getId(h),timeOffset:fn()-l}),c(typeof DragEvent<"u"&&p instanceof DragEvent?ae.Drag:p instanceof MouseEvent?ae.MouseMove:ae.TouchMove)}),s,{trailing:!1})),u=[Ye("mousemove",f,r),Ye("touchmove",f,r),Ye("drag",f,r)];return ce(()=>{u.forEach(p=>p())})}function $c({mouseInteractionCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){if(o.mouseInteraction===!1)return()=>{};const a=o.mouseInteraction===!0||o.mouseInteraction===void 0?{}:o.mouseInteraction,l=[];let c=null;const f=u=>p=>{const h=Ur(p);if(Ve(h,n,s,!0))return;let v=null,g=u;if("pointerType"in p){switch(p.pointerType){case"mouse":v=yt.Mouse;break;case"touch":v=yt.Touch;break;case"pen":v=yt.Pen;break}v===yt.Touch?Qe[u]===Qe.MouseDown?g="TouchStart":Qe[u]===Qe.MouseUp&&(g="TouchEnd"):yt.Pen}else us(p)&&(v=yt.Touch);v!==null?(c=v,(g.startsWith("Touch")&&v===yt.Touch||g.startsWith("Mouse")&&v===yt.Mouse)&&(v=null)):Qe[u]===Qe.Click&&(v=c,c=null);const m=us(p)?p.changedTouches[0]:p;if(!m)return;const y=r.getId(h),{clientX:C,clientY:I}=m;ce(e)(Object.assign({type:Qe[g],id:y,x:C,y:I},v!==null&&{pointerType:v}))};return Object.keys(Qe).filter(u=>Number.isNaN(Number(u))&&!u.endsWith("_Departed")&&a[u]!==!1).forEach(u=>{let p=Vt(u);const h=f(u);if(window.PointerEvent)switch(Qe[u]){case Qe.MouseDown:case Qe.MouseUp:p=p.replace("mouse","pointer");break;case Qe.TouchStart:case Qe.TouchEnd:return}l.push(Ye(p,h,t))}),ce(()=>{l.forEach(u=>u())})}function na({scrollCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,sampling:o}){const a=ce(Tr(ce(l=>{const c=Ur(l);if(!c||Ve(c,n,s,!0))return;const f=r.getId(c);if(c===t&&t.defaultView){const u=Wi(t.defaultView);e({id:f,x:u.left,y:u.top})}else e({id:f,x:c.scrollLeft,y:c.scrollTop})}),o.scroll||100));return Ye("scroll",a,t)}function Fc({viewportResizeCb:e},{win:t}){let r=-1,n=-1;const s=ce(Tr(ce(()=>{const o=Gi(),a=Yi();(r!==o||n!==a)&&(e({width:Number(a),height:Number(o)}),r=o,n=a)}),200));return Ye("resize",s,t)}const Uc=["INPUT","TEXTAREA","SELECT"],Wo=new WeakMap;function Bc({inputCb:e,doc:t,mirror:r,blockClass:n,blockSelector:s,ignoreClass:o,ignoreSelector:a,maskInputOptions:l,maskInputFn:c,sampling:f,userTriggeredOnInput:u}){function p(I){let S=Ur(I);const k=I.isTrusted,O=S&&S.tagName;if(S&&O==="OPTION"&&(S=S.parentElement),!S||!O||Uc.indexOf(O)<0||Ve(S,n,s,!0)||S.classList.contains(o)||a&&S.matches(a))return;let w=S.value,T=!1;const b=ks(S)||"";b==="radio"||b==="checkbox"?T=S.checked:(l[O.toLowerCase()]||l[b])&&(w=Es({element:S,maskInputOptions:l,tagName:O,type:b,value:w,maskInputFn:c})),h(S,u?{text:w,isChecked:T,userTriggered:k}:{text:w,isChecked:T});const _=S.name;b==="radio"&&_&&T&&t.querySelectorAll(`input[type="radio"][name="${_}"]`).forEach(x=>
vendor: 4,501 bytes, line 3
3{if(x!==S){const j=x.value;h(x,u?{text:j,isChecked:!T,userTriggered:!1}:{text:j,isChecked:!T})}})}function h(I,S){const k=Wo.get(I);if(!k||k.text!==S.text||k.isChecked!==S.isChecked){Wo.set(I,S);const O=r.getId(I);ce(e)(Object.assign(Object.assign({},S),{id:O}))}}const g=(f.input==="last"?["change"]:["input","change"]).map(I=>Ye(I,ce(p),t)),m=t.defaultView;if(!m)return()=>{g.forEach(I=>I())};const y=m.Object.getOwnPropertyDescriptor(m.HTMLInputElement.prototype,"value"),C=[[m.HTMLInputElement.prototype,"value"],[m.HTMLInputElement.prototype,"checked"],[m.HTMLSelectElement.prototype,"value"],[m.HTMLTextAreaElement.prototype,"value"],[m.HTMLSelectElement.prototype,"selectedIndex"],[m.HTMLOptionElement.prototype,"selected"]];return y&&y.set&&g.push(...C.map(I=>jn(I[0],I[1],{set(){ce(p)({target:this,isTrusted:!1})}},!1,m))),ce(()=>{g.forEach(I=>I())})}function pn(e){const t=[];function r(n,s){if(Qr("CSSGroupingRule")&&n.parentRule instanceof CSSGroupingRule||Qr("CSSMediaRule")&&n.parentRule instanceof CSSMediaRule||Qr("CSSSupportsRule")&&n.parentRule instanceof CSSSupportsRule||Qr("CSSConditionRule")&&n.parentRule instanceof CSSConditionRule){const a=Array.from(n.parentRule.cssRules).indexOf(n);s.unshift(a)}else if(n.parentStyleSheet){const a=Array.from(n.parentStyleSheet.cssRules).indexOf(n);s.unshift(a)}return s}return r(e,t)}function kt(e,t,r){let n,s;return e?(e.ownerNode?n=t.getId(e.ownerNode):s=r.getId(e),{styleId:s,id:n}):{}}function Hc({styleSheetRuleCb:e,mirror:t,stylesheetManager:r},{win:n}){if(!n.CSSStyleSheet||!n.CSSStyleSheet.prototype)return()=>{};const s=n.CSSStyleSheet.prototype.insertRule;n.CSSStyleSheet.prototype.insertRule=new Proxy(s,{apply:ce((u,p,h)=>{const[v,g]=h,{id:m,styleId:y}=kt(p,t,r.styleMirror);return(m&&m!==-1||y&&y!==-1)&&e({id:m,styleId:y,adds:[{rule:v,index:g}]}),u.apply(p,h)})});const o=n.CSSStyleSheet.prototype.deleteRule;n.CSSStyleSheet.prototype.deleteRule=new Proxy(o,{apply:ce((u,p,h)=>{const[v]=h,{id:g,styleId:m}=kt(p,t,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,removes:[{index:v}]}),u.apply(p,h)})});let a;n.CSSStyleSheet.prototype.replace&&(a=n.CSSStyleSheet.prototype.replace,n.CSSStyleSheet.prototype.replace=new Proxy(a,{apply:ce((u,p,h)=>{const[v]=h,{id:g,styleId:m}=kt(p,t,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replace:v}),u.apply(p,h)})}));let l;n.CSSStyleSheet.prototype.replaceSync&&(l=n.CSSStyleSheet.prototype.replaceSync,n.CSSStyleSheet.prototype.replaceSync=new Proxy(l,{apply:ce((u,p,h)=>{const[v]=h,{id:g,styleId:m}=kt(p,t,r.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,replaceSync:v}),u.apply(p,h)})}));const c={};Kr("CSSGroupingRule")?c.CSSGroupingRule=n.CSSGroupingRule:(Kr("CSSMediaRule")&&(c.CSSMediaRule=n.CSSMediaRule),Kr("CSSConditionRule")&&(c.CSSConditionRule=n.CSSConditionRule),Kr("CSSSupportsRule")&&(c.CSSSupportsRule=n.CSSSupportsRule));const f={};return Object.entries(c).forEach(([u,p])=>{f[u]={insertRule:p.prototype.insertRule,deleteRule:p.prototype.deleteRule},p.prototype.insertRule=new Proxy(f[u].insertRule,{apply:ce((h,v,g)=>{const[m,y]=g,{id:C,styleId:I}=kt(v.parentStyleSheet,t,r.styleMirror);return(C&&C!==-1||I&&I!==-1)&&e({id:C,styleId:I,adds:[{rule:m,index:[...pn(v),y||0]}]}),h.apply(v,g)})}),p.prototype.deleteRule=new Proxy(f[u].deleteRule,{apply:ce((h,v,g)=>{const[m]=g,{id:y,styleId:C}=kt(v.parentStyleSheet,t,r.styleMirror);return(y&&y!==-1||C&&C!==-1)&&e({id:y,styleId:C,removes:[{index:[...pn(v),m]}]}),h.apply(v,g)})})}),ce(()=>{n.CSSStyleSheet.prototype.insertRule=s,n.CSSStyleSheet.prototype.deleteRule=o,a&&(n.CSSStyleSheet.prototype.replace=a),l&&(n.CSSStyleSheet.prototype.replaceSync=l),Object.entries(c).forEach(([u,p])=>{p.prototype.insertRule=f[u].insertRule,p.prototype.deleteRule=f[u].deleteRule})})}function sa({mirror:e,stylesheetManager:t},r){var n,s,o;let a=null;r.nodeName==="#document"?a=e.getId(r):a=e.getId(r.host);const l=r.nodeName==="#document"?(n=r.defaultView)===null||n===void 0?void 0:n.Document:(o=(s=r.ownerDocument)===null||s===void 0?void 0:s.defaultView)===null||o===void 0?void 0:o.ShadowRoot,c=l!=null&&l.prototype?Object.getOwnPropertyDescriptor(l==null?void 0:l.prototype,"adoptedStyleSheets"):void 0;return a===null||a===-1||!l||!c?()=>{}:(Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get(){var f;return(f=c.get)===null||f===void 0?void 0:f.call(this)},set(f){var u;const p=(u=c.set)===null||u===void 0?void 0:u.call(this,f);
vendor: 8,301 bytes, line 3
3if(a!==null&&a!==-1)try{t.adoptStyleSheets(f,a)}catch{}return p}}),ce(()=>{Object.defineProperty(r,"adoptedStyleSheets",{configurable:c.configurable,enumerable:c.enumerable,get:c.get,set:c.set})}))}function qc({styleDeclarationCb:e,mirror:t,ignoreCSSAttributes:r,stylesheetManager:n},{win:s}){const o=s.CSSStyleDeclaration.prototype.setProperty;s.CSSStyleDeclaration.prototype.setProperty=new Proxy(o,{apply:ce((l,c,f)=>{var u;const[p,h,v]=f;if(r.has(p))return o.apply(c,[p,h,v]);const{id:g,styleId:m}=kt((u=c.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,n.styleMirror);return(g&&g!==-1||m&&m!==-1)&&e({id:g,styleId:m,set:{property:p,value:h,priority:v},index:pn(c.parentRule)}),l.apply(c,f)})});const a=s.CSSStyleDeclaration.prototype.removeProperty;return s.CSSStyleDeclaration.prototype.removeProperty=new Proxy(a,{apply:ce((l,c,f)=>{var u;const[p]=f;if(r.has(p))return a.apply(c,[p]);const{id:h,styleId:v}=kt((u=c.parentRule)===null||u===void 0?void 0:u.parentStyleSheet,t,n.styleMirror);return(h&&h!==-1||v&&v!==-1)&&e({id:h,styleId:v,remove:{property:p},index:pn(c.parentRule)}),l.apply(c,f)})}),ce(()=>{s.CSSStyleDeclaration.prototype.setProperty=o,s.CSSStyleDeclaration.prototype.removeProperty=a})}function zc({mediaInteractionCb:e,blockClass:t,blockSelector:r,mirror:n,sampling:s,doc:o}){const a=ce(c=>Tr(ce(f=>{const u=Ur(f);if(!u||Ve(u,t,r,!0))return;const{currentTime:p,volume:h,muted:v,playbackRate:g,loop:m}=u;e({type:c,id:n.getId(u),currentTime:p,volume:h,muted:v,playbackRate:g,loop:m})}),s.media||500)),l=[Ye("play",a(0),o),Ye("pause",a(1),o),Ye("seeked",a(2),o),Ye("volumechange",a(3),o),Ye("ratechange",a(4),o)];return ce(()=>{l.forEach(c=>c())})}function Wc({fontCb:e,doc:t}){const r=t.defaultView;if(!r)return()=>{};const n=[],s=new WeakMap,o=r.FontFace;r.FontFace=function(c,f,u){const p=new o(c,f,u);return s.set(p,{family:c,buffer:typeof f!="string",descriptors:u,fontSource:typeof f=="string"?f:JSON.stringify(Array.from(new Uint8Array(f)))}),p};const a=dr(t.fonts,"add",function(l){return function(c){return setTimeout(ce(()=>{const f=s.get(c);f&&(e(f),s.delete(c))}),0),l.apply(this,[c])}});return n.push(()=>{r.FontFace=o}),n.push(a),ce(()=>{n.forEach(l=>l())})}function Gc(e){const{doc:t,mirror:r,blockClass:n,blockSelector:s,selectionCb:o}=e;let a=!0;const l=ce(()=>{const c=t.getSelection();if(!c||a&&(c!=null&&c.isCollapsed))return;a=c.isCollapsed||!1;const f=[],u=c.rangeCount||0;for(let p=0;p<u;p++){const h=c.getRangeAt(p),{startContainer:v,startOffset:g,endContainer:m,endOffset:y}=h;Ve(v,n,s,!0)||Ve(m,n,s,!0)||f.push({start:r.getId(v),startOffset:g,end:r.getId(m),endOffset:y})}o({ranges:f})});return l(),Ye("selectionchange",l)}function Yc({doc:e,customElementCb:t}){const r=e.defaultView;return!r||!r.customElements?()=>{}:dr(r.customElements,"define",function(s){return function(o,a,l){try{t({define:{name:o}})}catch{console.warn(`Custom element callback failed for ${o}`)}return s.apply(this,[o,a,l])}})}function Vc(e,t){const{mutationCb:r,mousemoveCb:n,mouseInteractionCb:s,scrollCb:o,viewportResizeCb:a,inputCb:l,mediaInteractionCb:c,styleSheetRuleCb:f,styleDeclarationCb:u,canvasMutationCb:p,fontCb:h,selectionCb:v,customElementCb:g}=e;e.mutationCb=(...m)=>{t.mutation&&t.mutation(...m),r(...m)},e.mousemoveCb=(...m)=>{t.mousemove&&t.mousemove(...m),n(...m)},e.mouseInteractionCb=(...m)=>{t.mouseInteraction&&t.mouseInteraction(...m),s(...m)},e.scrollCb=(...m)=>{t.scroll&&t.scroll(...m),o(...m)},e.viewportResizeCb=(...m)=>{t.viewportResize&&t.viewportResize(...m),a(...m)},e.inputCb=(...m)=>{t.input&&t.input(...m),l(...m)},e.mediaInteractionCb=(...m)=>{t.mediaInteaction&&t.mediaInteaction(...m),c(...m)},e.styleSheetRuleCb=(...m)=>{t.styleSheetRule&&t.styleSheetRule(...m),f(...m)},e.styleDeclarationCb=(...m)=>{t.styleDeclaration&&t.styleDeclaration(...m),u(...m)},e.canvasMutationCb=(...m)=>{t.canvasMutation&&t.canvasMutation(...m),p(...m)},e.fontCb=(...m)=>{t.font&&t.font(...m),h(...m)},e.selectionCb=(...m)=>{t.selection&&t.selection(...m),v(...m)},e.customElementCb=(...m)=>{t.customElement&&t.customElement(...m),g(...m)}}function Qc(e,t={}){const r=e.doc.defaultView;if(!r)return()=>{};Vc(e,t);let n;e.recordDOM&&(n=ra(e,e.doc));const s=Pc(e),o=$c(e),a=na(e),l=Fc(e,{win:r}),c=Bc(e),f=zc(e);let u=()=>{},p=()=>{},h=()=>{},v=()=>{};e.recordDOM&&(u=Hc(e,{win:r}),p=sa(e,e.doc),h=qc(e,{win:r}),e.collectFonts&&(v=Wc(e)));const g=Gc(e),m=Yc(e),y=[];for(const C of e.plugins)y.push(C.observer(C.callback,r,C.options));return ce(()=>{Wt.forEach(C=>C.reset()),n==null||n.disconnect(),s(),o(),a(),l(),c(),f(),u(),p(),h(),v(),g(),m(),y.forEach(C=>C())})}function Qr(e){return typeof window[e]<"u"}function Kr(e){return!!(typeof window[e]<"u"&&window[e].prototype&&"insertRule"in window[e].prototype&&"deleteRule"in window[e].prototype)}class Go{constructor(t){this.generateIdFn=t,this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap}getId(t,r,n,s){const o=n||this.getIdToRemoteIdMap(t),a=s||this.getRemoteIdToIdMap(t);let l=o.get(r);return l||(l=this.generateIdFn(),o.set(r,l),a.set(l,r)),l}getIds(t,r){const n=this.getIdToRemoteIdMap(t),s=this.getRemoteIdToIdMap(t);return r.map(o=>this.getId(t,o,n,s))}getRemoteId(t,r,n){const s=n||this.getRemoteIdToIdMap(t);if(typeof r!="number")return r;const o=s.get(r);return o||-1}getRemoteIds(t,r){const n=this.getRemoteIdToIdMap(t);return r.map(s=>this.getRemoteId(t,s,n))}reset(t){if(!t){this.iframeIdToRemoteIdMap=new WeakMap,this.iframeRemoteIdToIdMap=new WeakMap;return}this.iframeIdToRemoteIdMap.delete(t),this.iframeRemoteIdToIdMap.delete(t)}getIdToRemoteIdMap(t){let r=this.iframeIdToRemoteIdMap.get(t);return r||(r=new Map,this.iframeIdToRemoteIdMap.set(t,r)),r}getRemoteIdToIdMap(t){let r=this.iframeRemoteIdToIdMap.get(t);return r||(r=new Map,this.iframeRemoteIdToIdMap.set(t,r)),r}}class Kc{constructor(t){this.iframes=new WeakMap,this.crossOriginIframeMap=new WeakMap,this.crossOriginIframeMirror=new Go(Bi),this.crossOriginIframeRootIdMap=new WeakMap,this.mutationCb=t.mutationCb,this.wrappedEmit=t.wrappedEmit,this.stylesheetManager=t.stylesheetManager,this.recordCrossOriginIframes=t.recordCrossOriginIframes,this.crossOriginIframeStyleMirror=new Go(this.stylesheetManager.styleMirror.generateId.bind(this.stylesheetManager.styleMirror)),this.mirror=t.mirror,this.recordCrossOriginIframes&&window.addEventListener("message",this.handleMessage.bind(this))}addIframe(t){this.iframes.set(t,!0),t.contentWindow&&this.crossOriginIframeMap.set(t.contentWindow,t)}addLoadListener(t){this.loadListener=t}attachIframe(t,r){var n;this.mutationCb({adds:[{parentId:this.mirror.getId(t),nextId:null,node:r}],removes:[],texts:[],attributes:[],isAttachIframe:!0}),(n=this.loadListener)===null||n===void 0||n.call(this,t),t.contentDocument&&t.contentDocument.adoptedStyleSheets&&t.contentDocument.adoptedStyleSheets.length>0&&this.stylesheetManager.adoptStyleSheets(t.contentDocument.adoptedStyleSheets,this.mirror.getId(t.contentDocument))}handleMessage(t){const r=t;if(r.data.type!=="rrweb"||r.origin!==r.data.origin||!t.source)return;const s=this.crossOriginIframeMap.get(t.source);if(!s)return;const o=this.transformCrossOriginEvent(s,r.data.event);o&&this.wrappedEmit(o,r.data.isCheckout)}transformCrossOriginEvent(t,r){var n;switch(r.type){case de.FullSnapshot:{this.crossOriginIframeMirror.reset(t),this.crossOriginIframeStyleMirror.reset(t),this.replaceIdOnNode(r.data.node,t);const s=r.data.node.id;return this.crossOriginIframeRootIdMap.set(t,s),this.patchRootIdOnNode(r.data.node,s),{timestamp:r.timestamp,type:de.IncrementalSnapshot,data:{source:ae.Mutation,adds:[{parentId:this.mirror.getId(t),nextId:null,node:r.data.node}],removes:[],texts:[],attributes:[],isAttachIframe:!0}}}case de.Meta:case de.Load:case de.DomContentLoaded:return!1;case de.Plugin:return r;case de.Custom:return this.replaceIds(r.data.payload,t,["id","parentId","previousId","nextId"]),r;case de.IncrementalSnapshot:switch(r.data.source){case ae.Mutation:return r.data.adds.forEach(s=>{this.replaceIds(s,t,["parentId","nextId","previousId"]),this.replaceIdOnNode(s.node,t);const o=this.crossOriginIframeRootIdMap.get(t);o&&this.patchRootIdOnNode(s.node,o)}),r.data.removes.forEach(s=>{this.replaceIds(s,t,["parentId","id"])}),r.data.attributes.forEach(s=>{this.replaceIds(s,t,["id"])}
3),r.data.texts.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case ae.Drag:case ae.TouchMove:case ae.MouseMove:return r.data.positions.forEach(s=>{this.replaceIds(s,t,["id"])}),r;case ae.ViewportResize:return!1;case ae.MediaInteraction:case ae.MouseInteraction:case ae.Scroll:case ae.CanvasMutation:case ae.Input:return this.replaceIds(r.data,t,["id"]),r;case ae.StyleSheetRule:case ae.StyleDeclaration:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleId"]),r;case ae.Font:return r;case ae.Selection:return r.data.ranges.forEach(s=>{this.replaceIds(s,t,["start","end"])}),r;case ae.AdoptedStyleSheet:return this.replaceIds(r.data,t,["id"]),this.replaceStyleIds(r.data,t,["styleIds"]),(n=r.data.styles)===null||n===void 0||n.forEach(s=>{this.replaceStyleIds(s,t,["styleId"])}),r}}return!1}replace(t,r,n,s){for(const o of s)!Array.isArray(r[o])&&typeof r[o]!="number"||(Array.isArray(r[o])?r[o]=t.getIds(n,r[o]):r[o]=t.getId(n,r[o]));return r}replaceIds(t,r,n){return this.replace(this.crossOriginIframeMirror,t,r,n)}replaceStyleIds(t,r,n){return this.replace(this.crossOriginIframeStyleMirror,t,r,n)}replaceIdOnNode(t,r){this.replaceIds(t,r,["id","rootId"]),"childNodes"in t&&t.childNodes.forEach(n=>{this.replaceIdOnNode(n,r)})}patchRootIdOnNode(t,r){t.type!==Ae.Document&&!t.rootId&&(t.rootId=r),"childNodes"in t&&t.childNodes.forEach(n=>{this.patchRootIdOnNode(n,r)})}}class Zc{constructor(t){this.shadowDoms=new WeakSet,this.restoreHandlers=[],this.mutationCb=t.mutationCb,this.scrollCb=t.scrollCb,this.bypassOptions=t.bypassOptions,this.mirror=t.mirror,this.init()}init(){this.reset(),this.patchAttachShadow(Element,document)}addShadowRoot(t,r){if(!Nr(t)||this.shadowDoms.has(t))return;this.shadowDoms.add(t);const n=ra(Object.assign(Object.assign({},this.bypassOptions),{doc:r,mutationCb:this.mutationCb,mirror:this.mirror,shadowDomManager:this}),t);this.restoreHandlers.push(()=>n.disconnect()),this.restoreHandlers.push(na(Object.assign(Object.assign({},this.bypassOptions),{scrollCb:this.scrollCb,doc:t,mirror:this.mirror}))),setTimeout(()=>{t.adoptedStyleSheets&&t.adoptedStyleSheets.length>0&&this.bypassOptions.stylesheetManager.adoptStyleSheets(t.adoptedStyleSheets,this.mirror.getId(t.host)),this.restoreHandlers.push(sa({mirror:this.mirror,stylesheetManager:this.bypassOptions.stylesheetManager},t))},0)}observeAttachShadow(t){!t.contentWindow||!t.contentDocument||this.patchAttachShadow(t.contentWindow.Element,t.contentDocument)}patchAttachShadow(t,r){const n=this;this.restoreHandlers.push(dr(t.prototype,"attachShadow",function(s){return function(o){const a=s.call(this,o);return this.shadowRoot&&Xi(this)&&n.addShadowRoot(this.shadowRoot,r),a}}))}reset(){this.restoreHandlers.forEach(t=>{try{t()}catch{}}),this.restoreHandlers=[],this.shadowDoms=new WeakSet}}/*! ***************************************************************************** 4Copyright (c) Microsoft Corporation. 5 6Permission to use, copy, modify, and/or distribute this software for any 7purpose with or without fee is hereby granted. 8 9THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 10REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 11AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 12INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 13LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 14OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 15PERFORMANCE OF THIS SOFTWARE. 16***************************************************************************** */function Jc(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(e!=null&&typeof Object.getOwnPropertySymbols=="function")for(var s=0,n=Object.getOwnPropertySymbols(e);s<n.length;s++)t.indexOf(n[s])<0&&Object.prototype.propertyIsEnumerable.call(e,n[s])&&(r[n[s]]=e[n[s]]);return r}function Xc(e,t,r,n){function s(o){return o instanceof r?o:new r(function(a){a(o)})}return new(r||(r=Promise))(function(o,a){function l(u){try{f(n.next(u))}catch(p){a(p)}}function c(u){try{f(n.throw(u))}catch(p){a(p)}}function f(u){u.done?o(u.value):s(u.value).then(l,c)}f((n=n.apply(e,[])).next())})}var nr="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
16+/",eu=typeof Uint8Array>"u"?[]:new Uint8Array(256);for(var Zr=0;Zr<nr.length;Zr++)eu[nr.charCodeAt(Zr)]=Zr;var tu=function(e){var t=new Uint8Array(e),r,n=t.length,s="";for(r=0;r<n;r+=3)s+=nr[t[r]>>2],s+=nr[(t[r]&3)<<4|t[r+1]>>4],s+=nr[(t[r+1]&15)<<2|t[r+2]>>6],s+=nr[t[r+2]&63];return n%3===2?s=s.substring(0,s.length-1)+"=":n%3===1&&(s=s.substring(0,s.length-2)+"=="),s};const Yo=new Map;function ru(e,t){let r=Yo.get(e);return r||(r=new Map,Yo.set(e,r)),r.has(t)||r.set(t,[]),r.get(t)}const oa=(e,t,r)=>{if(!e||!(aa(e,t)||typeof e=="object"))return;const n=e.constructor.name,s=ru(r,n);let o=s.indexOf(e);return o===-1&&(o=s.length,s.push(e)),o};function sn(e,t,r){if(e instanceof Array)return e.map(n=>sn(n,t,r));if(e===null)return e;if(e instanceof Float32Array||e instanceof Float64Array||e instanceof Int32Array||e instanceof Uint32Array||e instanceof Uint8Array||e instanceof Uint16Array||e instanceof Int16Array||e instanceof Int8Array||e instanceof Uint8ClampedArray)return{rr_type:e.constructor.name,args:[Object.values(e)]};if(e instanceof ArrayBuffer){const n=e.constructor.name,s=tu(e);return{rr_type:n,base64:s}}else{if(e instanceof DataView)return{rr_type:e.constructor.name,args:[sn(e.buffer,t,r),e.byteOffset,e.byteLength]};if(e instanceof HTMLImageElement){const n=e.constructor.name,{src:s}=e;return{rr_type:n,src:s}}else if(e instanceof HTMLCanvasElement){const n="HTMLImageElement",s=e.toDataURL();return{rr_type:n,src:s}}else{if(e instanceof ImageData)return{rr_type:e.constructor.name,args:[sn(e.data,t,r),e.width,e.height]};if(aa(e,t)||typeof e=="object"){const n=e.constructor.name,s=oa(e,t,r);return{rr_type:n,index:s}}}}return e}const ia=(e,t,r)=>e.map(n=>sn(n,t,r)),aa=(e,t)=>!!["WebGLActiveInfo","WebGLBuffer","WebGLFramebuffer","WebGLProgram","WebGLRenderbuffer","WebGLShader","WebGLShaderPrecisionFormat","WebGLTexture","WebGLUniformLocation","WebGLVertexArrayObject","WebGLVertexArrayObjectOES"].filter(s=>typeof t[s]=="function").find(s=>e instanceof t[s]);function nu(e,t,r,n){const s=[],o=Object.getOwnPropertyNames(t.CanvasRenderingContext2D.prototype);for(const a of o)try{if(typeof t.CanvasRenderingContext2D.prototype[a]!="function")continue;const l=dr(t.CanvasRenderingContext2D.prototype,a,function(c){return function(...f){return Ve(this.canvas,r,n,!0)||setTimeout(()=>{const u=ia(f,t,this);e(this.canvas,{type:ir["2D"],property:a,args:u})},0),c.apply(this,f)}});s.push(l)}catch{const c=jn(t.CanvasRenderingContext2D.prototype,a,{set(f){e(this.canvas,{type:ir["2D"],property:a,args:[f],setter:!0})}});s.push(c)}return()=>{s.forEach(a=>a())}}function su(e){return e==="experimental-webgl"?"webgl":e}function Vo(e,t,r,n){const s=[];try{const o=dr(e.HTMLCanvasElement.prototype,"getContext",function(a){return function(l,...c){if(!Ve(this,t,r,!0)){const f=su(l);if("__context"in this||(this.__context=f),n&&["webgl","webgl2"].includes(f))if(c[0]&&typeof c[0]=="object"){const u=c[0];u.preserveDrawingBuffer||(u.preserveDrawingBuffer=!0)}else c.splice(0,1,{preserveDrawingBuffer:!0})}return a.apply(this,[l,...c])}});s.push(o)}catch{console.error("failed to patch HTMLCanvasElement.prototype.getContext")}return()=>{s.forEach(o=>o())}}function Qo(e,t,r,n,s,o,a){const l=[],c=Object.getOwnPropertyNames(e);for(const f of c)if(!["isContextLost","canvas","drawingBufferWidth","drawingBufferHeight"].includes(f))try{if(typeof e[f]!="function")continue;const u=dr(e,f,function(p){return function(...h){const v=p.apply(this,h);if(oa(v,a,this),"tagName"in this.canvas&&!Ve(this.canvas,n,s,!0)){const g=ia(h,a,this),m={type:t,property:f,args:g};r(this.canvas,m)}return v}});l.push(u)}catch{const p=jn(e,f,{set(h){r(this.canvas,{type:t,property:f,args:[h],setter:!0})}});l.push(p)}return l}function ou(e,t,r,n,s){const o=[];return o.push(...Qo(t.WebGLRenderingContext.prototype,ir.WebGL,e,r,n,s,t)),typeof t.WebGL2RenderingContext<"u"&&o.push(...Qo(t.WebGL2RenderingContext.prototype,ir.WebGL2,e,r,n,s,t)),()=>{o.forEach(a=>a())}}function iu(e,t){var r=e.toString(),n=r.split(` 17`);n.pop(),n.shift();for(var s=n[0].search(/\S/),o=/(['"])__worker_loader_strict__(['"])/g,a=0,l=n.length;a<l;++a)n[a]=n[a].substring(s).replace(o,"$1use strict$2")+` 18`;return n}function au(e,t){var r=iu(e),n=new Blob(r,{type:"application/javascript"});return URL.createObjectURL(n)}function lu(e,t){var r;return function(s){return r=r||au(e),new Worker(r,s)}}var cu=lu(function(){(function(){"__worker_loader_strict__";/*! ***************************************************************************** 19 Copyright (c) Microsoft Corporation. 20 21 Permission to use, copy, modify, and/or distribute this software for any 22 purpose with or without fee is hereby granted. 23 24 THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH 25 REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY 26 AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, 27 INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM 28 LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR 29 OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR 30 PERFORMANCE OF THIS SOFTWARE. 31 ***************************************************************************** */function e(f,u,p,h){function v(g){return g instanceof p?g
31:new p(function(m){m(g)})}return new(p||(p=Promise))(function(g,m){function y(S){try{I(h.next(S))}catch(k){m(k)}}function C(S){try{I(h.throw(S))}catch(k){m(k)}}function I(S){S.done?g(S.value):v(S.value).then(y,C)}I((h=h.apply(f,[])).next())})}for(var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",r=typeof Uint8Array>"u"?[]:new Uint8Array(256),n=0;n<t.length;n++)r[t.charCodeAt(n)]=n;var s=function(f){var u=new Uint8Array(f),p,h=u.length,v="";for(p=0;p<h;p+=3)v+=t[u[p]>>2],v+=t[(u[p]&3)<<4|u[p+1]>>4],v+=t[(u[p+1]&15)<<2|u[p+2]>>6],v+=t[u[p+2]&63];return h%3===2?v=v.substring(0,v.length-1)+"=":h%3===1&&(v=v.substring(0,v.length-2)+"=="),v};const o=new Map,a=new Map;function l(f,u,p){return e(this,void 0,void 0,function*(){const h=`${f}-${u}`;if("OffscreenCanvas"in globalThis){if(a.has(h))return a.get(h);const v=new OffscreenCanvas(f,u);v.getContext("2d");const m=yield(yield v.convertToBlob(p)).arrayBuffer(),y=s(m);return a.set(h,y),y}else return""})}const c=self;c.onmessage=function(f){return e(this,void 0,void 0,function*(){if("OffscreenCanvas"in globalThis){const{id:u,bitmap:p,width:h,height:v,dataURLOptions:g}=f.data,m=l(h,v,g),y=new OffscreenCanvas(h,v);y.getContext("2d").drawImage(p,0,0),p.close();const I=yield y.convertToBlob(g),S=I.type,k=yield I.arrayBuffer(),O=s(k);if(!o.has(u)&&(yield m)===O)return o.set(u,O),c.postMessage({id:u});if(o.get(u)===O)return c.postMessage({id:u});c.postMessage({id:u,type:S,base64:O,width:h,height:v}),o.set(u,O)}else return c.postMessage({id:f.data.id})})}})()});class uu{reset(){this.pendingCanvasMutations.clear(),this.resetObservers&&this.resetObservers()}freeze(){this.frozen=!0}unfreeze(){this.frozen=!1}lock(){this.locked=!0}unlock(){this.locked=!1}constructor(t){this.pendingCanvasMutations=new Map,this.rafStamps={latestId:0,invokeId:null},this.frozen=!1,this.locked=!1,this.processMutation=(c,f)=>{(this.rafStamps.invokeId&&this.rafStamps.latestId!==this.rafStamps.invokeId||!this.rafStamps.invokeId)&&(this.rafStamps.invokeId=this.rafStamps.latestId),this.pendingCanvasMutations.has(c)||this.pendingCanvasMutations.set(c,[]),this.pendingCanvasMutations.get(c).push(f)};const{sampling:r="all",win:n,blockClass:s,blockSelector:o,recordCanvas:a,dataURLOptions:l}=t;this.mutationCb=t.mutationCb,this.mirror=t.mirror,a&&r==="all"&&this.initCanvasMutationObserver(n,s,o),a&&typeof r=="number"&&this.initCanvasFPSObserver(r,n,s,o,{dataURLOptions:l})}initCanvasFPSObserver(t,r,n,s,o){const a=Vo(r,n,s,!0),l=new Map,c=new cu;c.onmessage=g=>{const{id:m}=g.data;if(l.set(m,!1),!("base64"in g.data))return;const{base64:y,type:C,width:I,height:S}=g.data;this.mutationCb({id:m,type:ir["2D"],commands:[{property:"clearRect",args:[0,0,I,S]},{property:"drawImage",args:[{rr_type:"ImageBitmap",args:[{rr_type:"Blob",data:[{rr_type:"ArrayBuffer",base64:y}],type:C}]},0,0]}]})};const f=1e3/t;let u=0,p;const h=()=>{const g=[];return r.document.querySelectorAll("canvas").forEach(m=>{Ve(m,n,s,!0)||g.push(m)}),g},v=g=>{if(u&&g-u<f){p=requestAnimationFrame(v);return}u=g,h().forEach(m=>Xc(this,void 0,void 0,function*(){var y;const C=this.mirror.getId(m);if(l.get(C)||m.width===0||m.height===0)return;if(l.set(C,!0),["webgl","webgl2"].includes(m.__context)){const S=m.getContext(m.__context);((y=S==null?void 0:S.getContextAttributes())===null||y===void 0?void 0:y.preserveDrawingBuffer)===!1&&S.clear(S.COLOR_BUFFER_BIT)}const I=yield createImageBitmap(m);c.postMessage({id:C,bitmap:I,width:m.width,height:m.height,dataURLOptions:o.dataURLOptions},[I])}
vendor: 5,610 bytes, line 31
31)),p=requestAnimationFrame(v)};p=requestAnimationFrame(v),this.resetObservers=()=>{a(),cancelAnimationFrame(p)}}initCanvasMutationObserver(t,r,n){this.startRAFTimestamping(),this.startPendingCanvasMutationFlusher();const s=Vo(t,r,n,!1),o=nu(this.processMutation.bind(this),t,r,n),a=ou(this.processMutation.bind(this),t,r,n,this.mirror);this.resetObservers=()=>{s(),o(),a()}}startPendingCanvasMutationFlusher(){requestAnimationFrame(()=>this.flushPendingCanvasMutations())}startRAFTimestamping(){const t=r=>{this.rafStamps.latestId=r,requestAnimationFrame(t)};requestAnimationFrame(t)}flushPendingCanvasMutations(){this.pendingCanvasMutations.forEach((t,r)=>{const n=this.mirror.getId(r);this.flushPendingCanvasMutationFor(r,n)}),requestAnimationFrame(()=>this.flushPendingCanvasMutations())}flushPendingCanvasMutationFor(t,r){if(this.frozen||this.locked)return;const n=this.pendingCanvasMutations.get(t);if(!n||r===-1)return;const s=n.map(a=>Jc(a,["type"])),{type:o}=n[0];this.mutationCb({id:r,type:o,commands:s}),this.pendingCanvasMutations.delete(t)}}class du{constructor(t){this.trackedLinkElements=new WeakSet,this.styleMirror=new Mc,this.mutationCb=t.mutationCb,this.adoptedStyleSheetCb=t.adoptedStyleSheetCb}attachLinkElement(t,r){"_cssText"in r.attributes&&this.mutationCb({adds:[],removes:[],texts:[],attributes:[{id:r.id,attributes:r.attributes}]}),this.trackLinkElement(t)}trackLinkElement(t){this.trackedLinkElements.has(t)||(this.trackedLinkElements.add(t),this.trackStylesheetInLinkElement(t))}adoptStyleSheets(t,r){if(t.length===0)return;const n={id:r,styleIds:[]},s=[];for(const o of t){let a;this.styleMirror.has(o)?a=this.styleMirror.getId(o):(a=this.styleMirror.add(o),s.push({styleId:a,rules:Array.from(o.rules||CSSRule,(l,c)=>({rule:$i(l),index:c}))})),n.styleIds.push(a)}s.length>0&&(n.styles=s),this.adoptedStyleSheetCb(n)}reset(){this.styleMirror.reset(),this.trackedLinkElements=new WeakSet}trackStylesheetInLinkElement(t){}}class fu{constructor(){this.nodeMap=new WeakMap,this.loop=!0,this.periodicallyClear()}periodicallyClear(){requestAnimationFrame(()=>{this.clear(),this.loop&&this.periodicallyClear()})}inOtherBuffer(t,r){const n=this.nodeMap.get(t);return n&&Array.from(n).some(s=>s!==r)}add(t,r){this.nodeMap.set(t,(this.nodeMap.get(t)||new Set).add(r))}clear(){this.nodeMap=new WeakMap}destroy(){this.loop=!1}}function De(e){return Object.assign(Object.assign({},e),{timestamp:fn()})}let ke,on,Yn,hn=!1;const rt=oc();function Br(e={}){const{emit:t,checkoutEveryNms:r,checkoutEveryNth:n,blockClass:s="rr-block",blockSelector:o=null,ignoreClass:a="rr-ignore",ignoreSelector:l=null,maskTextClass:c="rr-mask",maskTextSelector:f=null,inlineStylesheet:u=!0,maskAllInputs:p,maskInputOptions:h,slimDOMOptions:v,maskInputFn:g,maskTextFn:m,hooks:y,packFn:C,sampling:I={},dataURLOptions:S={},mousemoveWait:k,recordDOM:O=!0,recordCanvas:w=!1,recordCrossOriginIframes:T=!1,recordAfter:b=e.recordAfter==="DOMContentLoaded"?e.recordAfter:"load",userTriggeredOnInput:_=!1,collectFonts:x=!1,inlineImages:j=!1,plugins:M,keepIframeSrcFn:$=()=>!1,ignoreCSSAttributes:L=new Set([]),errorHandler:P}=e;Rc(P);const R=T?window.parent===window:!0;let H=!1;if(!R)try{window.parent.document&&(H=!1)}catch{H=!0}if(R&&!t)throw new Error("emit function is required");k!==void 0&&I.mousemove===void 0&&(I.mousemove=k),rt.reset();const Y=p===!0?{color:!0,date:!0,"datetime-local":!0,email:!0,month:!0,number:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0,textarea:!0,select:!0,password:!0}:h!==void 0?h:{password:!0},z=v===!0||v==="all"?{script:!0,comment:!0,headFavicon:!0,headWhitespace:!0,headMetaSocial:!0,headMetaRobots:!0,headMetaHttpEquiv:!0,headMetaVerification:!0,headMetaAuthorship:v==="all",headMetaDescKeywords:v==="all"}:v||{};Ic();let V,G=0;const Q=A=>{for(const U of M||[])U.eventProcessor&&(A=U.eventProcessor(A));return C&&!H&&(A=C(A)),A};ke=(A,U)=>{var F;if(!((F=Wt[0])===null||F===void 0)&&F.isFrozen()&&A.type!==de.FullSnapshot&&!(A.type===de.IncrementalSnapshot&&A.data.source===ae.Mutation)&&Wt.forEach(W=>W.unfreeze()),R)t==null||t(Q(A),U);else if(H){const W={type:"rrweb",event:Q(A),origin:window.location.origin,isCheckout:U};window.parent.postMessage(W,"*")}if(A.type===de.FullSnapshot)V=A,G=0;else if(A.type===de.IncrementalSnapshot){if(A.data.source===ae.Mutation&&A.data.isAttachIframe)return;G++;const W=n&&G>=n,ne=r&&A.timestamp-V.timestamp>r;(W||ne)&&on(!0)}};const K=A=>{ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.Mutation},A)}))},J=A=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.Scroll},A)})),ue=A=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.CanvasMutation},A)})),Z=A=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.AdoptedStyleSheet},A)})),te=new du({mutationCb:K,adoptedStyleSheetCb:Z}),q=new Kc({mirror:rt,mutationCb:K,stylesheetManager:te,recordCrossOriginIframes:T,wrappedEmit:ke});for(const A of M||[])A.getMirror&&A.getMirror({nodeMirror:rt,crossOriginIframeMirror:q.crossOriginIframeMirror,crossOriginIframeStyleMirror:q.crossOriginIframeStyleMirror});const E=new fu;Yn=new uu({recordCanvas:w,mutationCb:ue,win:window,blockClass:s,blockSelector:o,mirror:rt,sampling:I.canvas,dataURLOptions:S});const D=new Zc({mutationCb:K,scrollCb:J,bypassOptions:{blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:u,maskInputOptions:Y,dataURLOptions:S,maskTextFn:m,maskInputFn:g,recordCanvas:w,inlineImages:j,sampling:I,slimDOMOptions:z,iframeManager:q,stylesheetManager:te,canvasManager:Yn,keepIframeSrcFn:$,processedNodeManager:E},mirror:rt});on=(A=!1)=>
31{if(!O)return;ke(De({type:de.Meta,data:{href:window.location.href,width:Yi(),height:Gi()}}),A),te.reset(),D.init(),Wt.forEach(F=>F.lock());const U=Ec(document,{mirror:rt,blockClass:s,blockSelector:o,maskTextClass:c,maskTextSelector:f,inlineStylesheet:u,maskAllInputs:Y,maskTextFn:m,slimDOM:z,dataURLOptions:S,recordCanvas:w,inlineImages:j,onSerialize:F=>{Ki(F,rt)&&q.addIframe(F),Zi(F,rt)&&te.trackLinkElement(F),ds(F)&&D.addShadowRoot(F.shadowRoot,document)},onIframeLoad:(F,W)=>{q.attachIframe(F,W),D.observeAttachShadow(F)},onStylesheetLoad:(F,W)=>{te.attachLinkElement(F,W)},keepIframeSrcFn:$});if(!U)return console.warn("Failed to snapshot the document");ke(De({type:de.FullSnapshot,data:{node:U,initialOffset:Wi(window)}}),A),Wt.forEach(F=>F.unlock()),document.adoptedStyleSheets&&document.adoptedStyleSheets.length>0&&te.adoptStyleSheets(document.adoptedStyleSheets,rt.getId(document))};try{const A=[],U=W=>{var ne;return ce(Qc)({mutationCb:K,mousemoveCb:(re,we)=>ke(De({type:de.IncrementalSnapshot,data:{source:we,positions:re}})),mouseInteractionCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.MouseInteraction},re)})),scrollCb:J,viewportResizeCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.ViewportResize},re)})),inputCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.Input},re)})),mediaInteractionCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.MediaInteraction},re)})),styleSheetRuleCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.StyleSheetRule},re)})),styleDeclarationCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.StyleDeclaration},re)})),canvasMutationCb:ue,fontCb:re=>ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.Font},re)})),selectionCb:re=>{ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.Selection},re)}))},customElementCb:re=>{ke(De({type:de.IncrementalSnapshot,data:Object.assign({source:ae.CustomElement},re)}))},blockClass:s,ignoreClass:a,ignoreSelector:l,maskTextClass:c,maskTextSelector:f,maskInputOptions:Y,inlineStylesheet:u,sampling:I,recordDOM:O,recordCanvas:w,inlineImages:j,userTriggeredOnInput:_,collectFonts:x,doc:W,maskInputFn:g,maskTextFn:m,keepIframeSrcFn:$,blockSelector:o,slimDOMOptions:z,dataURLOptions:S,mirror:rt,iframeManager:q,stylesheetManager:te,shadowDomManager:D,processedNodeManager:E,canvasManager:Yn,ignoreCSSAttributes:L,plugins:((ne=M==null?void 0:M.filter(re=>re.observer))===null||ne===void 0?void 0:ne.map(re=>({observer:re.observer,options:re.options,callback:we=>ke(De({type:de.Plugin,data:{plugin:re.name,payload:we}}))})))||[]},y)};q.addLoadListener(W=>{try{A.push(U(W.contentDocument))}catch(ne){console.warn(ne)}});const F=()=>{on(),A.push(U(document)),hn=!0};return document.readyState==="interactive"||document.readyState==="complete"?F():(A.push(Ye("DOMContentLoaded",()=>{ke(De({type:de.DomContentLoaded,data:{}})),b==="DOMContentLoaded"&&F()})),A.push(Ye("load",()=>{ke(De({type:de.Load,data:{}})),b==="load"&&F()},window))),()=>{A.forEach(W=>W()),E.destroy(),hn=!1,Lc()}}catch(A){console.warn(A)}}Br.addCustomEvent=(e,t)=>{if(!hn)throw new Error("please add custom event after start recording");ke(De({type:de.Custom,data:{tag:e,payload:t}}))};Br.freezePage=()=>{Wt.forEach(e=>e.freeze())};Br.takeFullSnapshot=e=>{if(!hn)throw new Error("please take full snapshot after start recording");on(e)};Br.mirror=rt;var la=(e=>(e[e.DomContentLoaded=0]="DomContentLoaded",e[e.Load=1]="Load",e[e.FullSnapshot=2]="FullSnapshot",e[e.IncrementalSnapshot=3]="IncrementalSnapshot",e[e.Meta=4]="Meta",e[e.Custom=5]="Custom",e[e.Plugin=6]="Plugin",e))(la||{}),dt=(e=>(e[e.Mutation=0]="Mutation",e[e.MouseMove=1]="MouseMove",e[e.MouseInteraction=2]="MouseInteraction",e[e.Scroll=3]="Scroll",e[e.ViewportResize=4]="ViewportResize",e[e.Input=5]="Input",e[e.TouchMove=6]="TouchMove",e[e.MediaInteraction=7]="MediaInteraction",e[e.StyleSheetRule=8]="StyleSheetRule",e[e.CanvasMutation=9]="CanvasMutation",e[e.Font=10]="Font",e[e.Log=11]="Log",e[e.Drag=12]="Drag",e[e.StyleDeclaration=13]="StyleDeclaration",e[e.Selection=14]="Selection",e[e.AdoptedStyleSheet=15]="AdoptedStyleSheet",e[e.CustomElement=16]="CustomElement",e))(dt||{}),vt={DEBUG:!1,LIB_VERSION:"2.55.1"},se;if(typeof window>"u"){var Ko={hostname:""};se={navigator:{userAgent:"",onLine:!0},document:{location:Ko,referrer:""},screen:{width:0,height:0},location:Ko}}else se=window;var Cr=24*60*60*1e3,Vn=8*1e3,Cn=Array.prototype,pu=Function.prototype,ca=Object.prototype,Ot=Cn.slice,Hr=ca.toString,En=ca.hasOwnProperty,Oe=se.console,Dt=se.navigator,ge=se.document,Jr=se.opera,mn=se.screen,ft=Dt.userAgent,Qn=pu.bind,Zo=Cn.forEach,Jo=Cn.indexOf,Xo=Cn.map,hu=Array.isArray,ps={},N={trim:function(e){return e.replace(/^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,"")}},fe={log:function(){if(vt.DEBUG&&!N.isUndefined(Oe)&&Oe)try{Oe.log.apply(Oe,arguments)}catch{N.each(arguments,function(t){Oe.log(t)})}},warn:function(){if(vt.DEBUG&&!N.isUndefined(Oe)&&Oe){var e=["Mixpanel warning:"].
vendor: 5,288 bytes, lines 31-35
31concat(N.toArray(arguments));try{Oe.warn.apply(Oe,e)}catch{N.each(e,function(r){Oe.warn(r)})}}},error:function(){if(vt.DEBUG&&!N.isUndefined(Oe)&&Oe){var e=["Mixpanel error:"].concat(N.toArray(arguments));try{Oe.error.apply(Oe,e)}catch{N.each(e,function(r){Oe.error(r)})}}},critical:function(){if(!N.isUndefined(Oe)&&Oe){var e=["Mixpanel error:"].concat(N.toArray(arguments));try{Oe.error.apply(Oe,e)}catch{N.each(e,function(r){Oe.error(r)})}}}},Kn=function(e,t){return function(){return arguments[0]="["+t+"] "+arguments[0],e.apply(fe,arguments)}},kn=function(e){return{log:Kn(fe.log,e),error:Kn(fe.error,e),critical:Kn(fe.critical,e)}};N.bind=function(e,t){var r,n;if(Qn&&e.bind===Qn)return Qn.apply(e,Ot.call(arguments,1));if(!N.isFunction(e))throw new TypeError;return r=Ot.call(arguments,2),n=function(){if(!(this instanceof n))return e.apply(t,r.concat(Ot.call(arguments)));var s={};s.prototype=e.prototype;var o=new s;s.prototype=null;var a=e.apply(o,r.concat(Ot.call(arguments)));return Object(a)===a?a:o},n};N.each=function(e,t,r){if(e!=null){if(Zo&&e.forEach===Zo)e.forEach(t,r);else if(e.length===+e.length){for(var n=0,s=e.length;n<s;n++)if(n in e&&t.call(r,e[n],n,e)===ps)return}else for(var o in e)if(En.call(e,o)&&t.call(r,e[o],o,e)===ps)return}};N.extend=function(e){return N.each(Ot.call(arguments,1),function(t){for(var r in t)t[r]!==void 0&&(e[r]=t[r])}),e};N.isArray=hu||function(e){return Hr.call(e)==="[object Array]"};N.isFunction=function(e){try{return/^\s*\bfunction\b/.test(e)}catch{return!1}};N.isArguments=function(e){return!!(e&&En.call(e,"callee"))};N.toArray=function(e){return e?e.toArray?e.toArray():N.isArray(e)||N.isArguments(e)?Ot.call(e):N.values(e):[]};N.map=function(e,t,r){if(Xo&&e.map===Xo)return e.map(t,r);var n=[];return N.each(e,function(s){n.push(t.call(r,s))}),n};N.keys=function(e){var t=[];return e===null||N.each(e,function(r,n){t[t.length]=n}),t};N.values=function(e){var t=[];return e===null||N.each(e,function(r){t[t.length]=r}),t};N.include=function(e,t){var r=!1;return e===null?r:Jo&&e.indexOf===Jo?e.indexOf(t)!=-1:(N.each(e,function(n){if(r||(r=n===t))return ps}),r)};N.includes=function(e,t){return e.indexOf(t)!==-1};N.inherit=function(e,t){return e.prototype=new t,e.prototype.constructor=e,e.superclass=t.prototype,e};N.isObject=function(e){return e===Object(e)&&!N.isArray(e)};N.isEmptyObject=function(e){if(N.isObject(e)){for(var t in e)if(En.call(e,t))return!1;return!0}return!1};N.isUndefined=function(e){return e===void 0};N.isString=function(e){return Hr.call(e)=="[object String]"};N.isDate=function(e){return Hr.call(e)=="[object Date]"};N.isNumber=function(e){return Hr.call(e)=="[object Number]"};N.isElement=function(e){return!!(e&&e.nodeType===1)};N.encodeDates=function(e){return N.each(e,function(t,r){N.isDate(t)?e[r]=N.formatDate(t):N.isObject(t)&&(e[r]=N.encodeDates(t))}),e};N.timestamp=function(){return Date.now=Date.now||function(){return+new Date},Date.now()};N.formatDate=function(e){function t(r){return r<10?"0"+r:r}return e.getUTCFullYear()+"-"+t(e.getUTCMonth()+1)+"-"+t(e.getUTCDate())+"T"+t(e.getUTCHours())+":"+t(e.getUTCMinutes())+":"+t(e.getUTCSeconds())};N.strip_empty_properties=function(e){var t={};return N.each(e,function(r,n){N.isString(r)&&r.length>0&&(t[n]=r)}),t};N.truncate=function(e,t){var r;return typeof e=="string"?r=e.slice(0,t):N.isArray(e)?(r=[],N.each(e,function(n){r.push(N.truncate(n,t))})):N.isObject(e)?(r={},N.each(e,function(n,s){r[s]=N.truncate(n,t)})):r=e,r};N.JSONEncode=function(){return function(e){var t=e,r=function(s){var o=/[\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b"," ":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"};return o.lastIndex=0,o.test(s)?'"'+s.replace(o,function(l){var c=a[l];return typeof c=="string"?c:"\\u"+("0000"+l.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+s+'"'},n=function(s,o){var a="",l=" ",c=0,f="",u="",p=0,h=a,v=[],g=o[s];switch(g&&typeof g=="object"&&typeof g.toJSON=="function"&&(g=g.toJSON(s)),typeof g){case"string":return r(g);case"number":return isFinite(g)?String(g):"null";case"boolean":case"null":return String(g);case"object":if(!g)return"null";if(a+=l,v=[],Hr.apply(g)==="[object Array]"){for(p=g.length,c=0;c<p;c+=1)v[c]=n(c,g)||"null";return u=v.length===0?"[]":a?`[ 32`+a+v.join(`, 33`+a)+` 34`+h+"]":"["+v.join(",")+"]",a=h,u}for(f in g)En.call(g,f)&&(u=n(f,g),u&&v.push(r(f)+(a?": ":":")+u));return u=v.length===0?"{}":a?"{"+v.join(",")+h+"}":"{"+v.join(",")+"}",a=h,u}};return n("",{"":t})}}();N.JSONDecode=function(){var e,t,r={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:` 35`,r:"\r",t:" "},n,s=function(v){var g=new SyntaxError(v);throw g.at=e,g.text=n,g},o=function(v){return v&&v!==t&&s("Expected '"+v+"' instead of '"+t+"'"),t=n.charAt(e),e+=1,t},a=function(){var v,g="";for(t==="-"&&(g="-",o("-"));t>="0"&&t<="9";)g+=t,o();if(t===".")for(g+=".";o()&&t>="0"&&t<="9";)g+=t;if(t==="e"||t==="E")for(g+=t,o(),(t==="-"||t==="+")&&(g+=t,o());t>="0"&&t<="9";)g+=t,o();if(v=+g,!isFinite(v))s("Bad number");else return v},l=function(){var v,g,m="",y;if(t==='"')for(;o();){if(t==='"')return o(),m;if(t==="\\")if(o(),t==="u"){for(y=0,g=0;g<4&&(v=parseInt(o(),16),!!isFinite(v));g+=1)y=y*16+v;m+=String.fromCharCode(y)}
35else if(typeof r[t]=="string")m+=r[t];else break;else m+=t}s("Bad string")},c=function(){for(;t&&t<=" ";)o()},f=function(){switch(t){case"t":return o("t"),o("r"),o("u"),o("e"),!0;case"f":return o("f"),o("a"),o("l"),o("s"),o("e"),!1;case"n":return o("n"),o("u"),o("l"),o("l"),null}s('Unexpected "'+t+'"')},u,p=function(){var v=[];if(t==="["){if(o("["),c(),t==="]")return o("]"),v;for(;t;){if(v.push(u()),c(),t==="]")return o("]"),v;o(","),c()}}s("Bad array")},h=function(){var v,g={};if(t==="{"){if(o("{"),c(),t==="}")return o("}"),g;for(;t;){if(v=l(),c(),o(":"),Object.hasOwnProperty.call(g,v)&&s('Duplicate key "'+v+'"'),g[v]=u(),c(),t==="}")return o("}"),g;o(","),c()}}s("Bad object")};return u=function(){switch(c(),t){case"{":return h();case"[":return p();case'"':return l();case"-":return a();default:return t>="0"&&t<="9"?a():f()}},function(v){var g;return n=v,e=0,t=" ",g=u(),c(),t&&s("Syntax error"),g}}();N.base64Encode=function(e){var t="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",r,n,s,o,a,l,c,f,u=0,p=0,h="",v=[];if(!e)return e;e=N.utf8Encode(e);do r=e.charCodeAt(u++),n=e.charCodeAt(u++),s=e.charCodeAt(u++),f=r<<16|n<<8|s,o=f>>18&63,a=f>>12&63,l=f>>6&63,c=f&63,v[p++]=t.charAt(o)+t.charAt(a)+t.charAt(l)+t.charAt(c);while(u<e.length);switch(h=v.join(""),e.length%3){case 1:h=h.slice(0,-2)+"==";break;case 2:h=h.slice(0,-1)+"=";break}return h};N.utf8Encode=function(e){e=(e+"").replace(/\r\n/g,` 36`).replace(/\r/g,` 37`);var t="",r,n,s=0,o;for(r=n=0,s=e.length,o=0;o<s;o++){var a=e.charCodeAt(o),l=null;a<128?n++:a>127&&a<2048?l=String.fromCharCode(a>>6|192,a&63|128):l=String.fromCharCode(a>>12|224,a>>6&63|128,a&63|128),l!==null&&(n>r&&(t+=e.substring(r,n)),t+=l,r=n=o+1)}return n>r&&(t+=e.substring(r,e.length)),t};N.UUID=function(){var e=function(){var n=1*new Date,s;if(se.performance&&se.performance.now)s=se.performance.now();else for(s=0;n==1*new Date;)s++;return n.toString(16)+Math.floor(s).toString(16)},t=function(){return Math.random().toString(16).replace(".","")},r=function(){var n=ft,s,o,a=[],l=0;function c(f,u){var p,h=0;for(p=0;p<u.length;p++)h|=a[p]<<p*8;return f^h}for(s=0;s<n.length;s++)o=n.charCodeAt(s),a.unshift(o&255),a.length>=4&&(l=c(l,a),a=[]);return a.length>0&&(l=c(l,a)),l.toString(16)};return function(){var n=(mn.height*mn.width).toString(16);return e()+"-"+t()+"-"+r()+"-"+n+"-"+e()}}();var ei=["ahrefsbot","ahrefssiteaudit","baiduspider","bingbot","bingpreview","chrome-lighthouse","facebookexternal","petalbot","pinterest","screaming frog","yahoo! slurp","yandexbot","adsbot-google","apis-google","duplexweb-google","feedfetcher-google","google favicon","google web preview","google-read-aloud","googlebot","googleweblight","mediapartners-google","storebot-google"];N.isBlockedUA=function(e){var t;for(e=e.toLowerCase(),t=0;t<ei.length;t++)if(e.indexOf(ei[t])!==-1)return!0;return!1};N.HTTPBuildQuery=function(e,t){var r,n,s=[];return N.isUndefined(t)&&(t="&"),N.each(e,function(o,a){r=encodeURIComponent(o.toString()),n=encodeURIComponent(a),s[s.length]=n+"="+r}),s.join(t)};N.getQueryParam=function(e,t){t=t.replace(/[[]/g,"\\[").replace(/[\]]/g,"\\]");var r="[\\?&]"+t+"=([^&#]*)",n=new RegExp(r),s=n.exec(e);if(s===null||s&&typeof s[1]!="string"&&s[1].length)return"";var o=s[1];try{o=decodeURIComponent(o)}catch{fe.error("Skipping decoding for malformed query param: "+o)}return o.replace(/\+/g," ")};N.cookie={get:function(e){for(var t=e+"=",r=ge.cookie.split(";"),n=0;n<r.length;n++){for(var s=r[n];s.charAt(0)==" ";)s=s.substring(1,s.length);if(s.indexOf(t)===0)return decodeURIComponent(s.substring(t.length,s.length))}return null},parse:function(e){var t;try{t=N.JSONDecode(N.cookie.get(e))||{}}catch{}return t},set_seconds:function(e,t,r,n,s,o,a){var l="",c="",f="";if(a)l="; domain="+a;else if(n){var u=ti(ge.location.hostname);l=u?"; domain=."+u:""}if(r){var p=new Date;p.setTime(p.getTime()+r*1e3),c="; expires="+p.toGMTString()}o&&(s=!0,f="; SameSite=None"),s&&(f+="; secure"),ge.cookie=e+"="+encodeURIComponent(t)+c+"; path=/"+l+f},set:function(e,t,r,n,s,o,a){var l="",c="",f="";if(a)l="; domain="+a;else if(n){var u=ti(ge.location.hostname);l=u?"; domain=."+u:""}if(r){var p=new Date;p.setTime(p.getTime()+r*24*60*60*1e3),c="; expires="+p.toGMTString()}o&&(s=!0,f="; SameSite=None"),s&&(f+="; secure");var h=e+"="+encodeURIComponent(t)+c+"; path=/"+l+f;return ge.cookie=h,h},remove:function(e,t,r){N.cookie.set(e,"",-1,t,!1,!1,r)}};var Zn=null,gn=function(e,t){if(Zn!==null&&!t)return Zn;var r=!0;try{e=e||window.localStorage;var n="__mplss_"+Ms(8),s="xyz";e.setItem(n,s),e.getItem(n)!==s&&(r=!1),e.removeItem(n)}catch{r=!1}return Zn=r,r};N.localStorage={is_supported:function(e){var t=gn(null,e);return t||fe.error("localStorage unsupported; falling back to cookie store"),t},error:function(e){fe.error("localStorage error: "+e)},get:function(e){try{return window.localStorage.getItem(e)}
vendor: 6,802 bytes, line 37
37catch(t){N.localStorage.error(t)}return null},parse:function(e){try{return N.JSONDecode(N.localStorage.get(e))||{}}catch{}return null},set:function(e,t){try{window.localStorage.setItem(e,t)}catch(r){N.localStorage.error(r)}},remove:function(e){try{window.localStorage.removeItem(e)}catch(t){N.localStorage.error(t)}}};N.register_event=function(){var e=function(n,s,o,a,l){if(!n){fe.error("No valid element provided to register_event");return}if(n.addEventListener&&!a)n.addEventListener(s,o,!!l);else{var c="on"+s,f=n[c];n[c]=t(n,o,f)}};function t(n,s,o){var a=function(l){if(l=l||r(window.event),!!l){var c=!0,f,u;return N.isFunction(o)&&(f=o(l)),u=s.call(n,l),(f===!1||u===!1)&&(c=!1),c}};return a}function r(n){return n&&(n.preventDefault=r.preventDefault,n.stopPropagation=r.stopPropagation),n}return r.preventDefault=function(){this.returnValue=!1},r.stopPropagation=function(){this.cancelBubble=!0},e}();var mu=new RegExp('^(\\w*)\\[(\\w+)([=~\\|\\^\\$\\*]?)=?"?([^\\]"]*)"?\\]$');N.dom_query=function(){function e(s){return s.all?s.all:s.getElementsByTagName("*")}var t=/[\t\r\n]/g;function r(s,o){var a=" "+o+" ";return(" "+s.className+" ").replace(t," ").indexOf(a)>=0}function n(s){if(!ge.getElementsByTagName)return[];var o=s.split(" "),a,l,c,f,u,p,h,v,g,m,y=[ge];for(p=0;p<o.length;p++){if(a=o[p].replace(/^\s+/,"").replace(/\s+$/,""),a.indexOf("#")>-1){l=a.split("#"),c=l[0];var C=l[1],I=ge.getElementById(C);if(!I||c&&I.nodeName.toLowerCase()!=c)return[];y=[I];continue}if(a.indexOf(".")>-1){l=a.split("."),c=l[0];var S=l[1];for(c||(c="*"),f=[],u=0,h=0;h<y.length;h++)for(c=="*"?g=e(y[h]):g=y[h].getElementsByTagName(c),v=0;v<g.length;v++)f[u++]=g[v];for(y=[],m=0,h=0;h<f.length;h++)f[h].className&&N.isString(f[h].className)&&r(f[h],S)&&(y[m++]=f[h]);continue}var k=a.match(mu);if(k){c=k[1];var O=k[2],w=k[3],T=k[4];for(c||(c="*"),f=[],u=0,h=0;h<y.length;h++)for(c=="*"?g=e(y[h]):g=y[h].getElementsByTagName(c),v=0;v<g.length;v++)f[u++]=g[v];y=[],m=0;var b;switch(w){case"=":b=function(_){return _.getAttribute(O)==T};break;case"~":b=function(_){return _.getAttribute(O).match(new RegExp("\\b"+T+"\\b"))};break;case"|":b=function(_){return _.getAttribute(O).match(new RegExp("^"+T+"-?"))};break;case"^":b=function(_){return _.getAttribute(O).indexOf(T)===0};break;case"$":b=function(_){return _.getAttribute(O).lastIndexOf(T)==_.getAttribute(O).length-T.length};break;case"*":b=function(_){return _.getAttribute(O).indexOf(T)>-1};break;default:b=function(_){return _.getAttribute(O)}}for(y=[],m=0,h=0;h<f.length;h++)b(f[h])&&(y[m++]=f[h]);continue}for(c=a,f=[],u=0,h=0;h<y.length;h++)for(g=y[h].getElementsByTagName(c),v=0;v<g.length;v++)f[u++]=g[v];y=f}return y}return function(s){return N.isElement(s)?[s]:N.isObject(s)&&!N.isUndefined(s.length)?s:n.call(this,s)}}();var gu=["utm_source","utm_medium","utm_campaign","utm_content","utm_term","utm_id","utm_source_platform","utm_campaign_id","utm_creative_format","utm_marketing_tactic"],yu=["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"];N.info={campaignParams:function(e){var t="",r={};return N.each(gu,function(n){t=N.getQueryParam(ge.URL,n),t.length?r[n]=t:e!==void 0&&(r[n]=e)}),r},clickParams:function(){var e="",t={};return N.each(yu,function(r){e=N.getQueryParam(ge.URL,r),e.length&&(t[r]=e)}),t},marketingParams:function(){return N.extend(N.info.campaignParams(),N.info.clickParams())},searchEngine:function(e){return e.search("https?://(.*)google.([^/?]*)")===0?"google":e.search("https?://(.*)bing.com")===0?"bing":e.search("https?://(.*)yahoo.com")===0?"yahoo":e.search("https?://(.*)duckduckgo.com")===0?"duckduckgo":null},searchInfo:function(e){var t=N.info.searchEngine(e),r=t!="yahoo"?"q":"p",n={};if(t!==null){n.$search_engine=t;var s=N.getQueryParam(e,r);s.length&&(n.mp_keyword=s)}return n},browser:function(e,t,r){return t=t||"",r||N.includes(e," OPR/")?N.includes(e,"Mini")?"Opera Mini":"Opera":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":N.includes(e,"IEMobile")||N.includes(e,"WPDesktop")?"Internet Explorer Mobile":N.includes(e,"SamsungBrowser/")?"Samsung Internet":N.includes(e,"Edge")||N.includes(e,"Edg/")?"Microsoft Edge":N.includes(e,"FBIOS")?"Facebook Mobile":N.includes(e,"Chrome")?"Chrome":N.includes(e,"CriOS")?"Chrome iOS":N.includes(e,"UCWEB")||N.includes(e,"UCBrowser")?"UC Browser":N.includes(e,"FxiOS")?"Firefox iOS":N.includes(t,"Apple")?N.includes(e,"Mobile")?"Mobile Safari":"Safari":N.includes(e,"Android")?"Android Mobile":N.includes(e,"Konqueror")?"Konqueror":N.includes(e,"Firefox")?"Firefox":N.includes(e,"MSIE")||N.includes(e,"Trident/")?"Internet Explorer":N.includes(e,"Gecko")?"Mozilla":""},browserVersion:function(e,t,r){var n=N.info.browser(e,t,r),s={"Internet Explorer Mobile":/rv:(\d+(\.\d+)?)/,"Microsoft Edge":/Edge?\/(\d+(\.\d+)?)/,Chrome:/Chrome\/(\d+(\.\d+)?)/,"Chrome iOS":/CriOS\/(\d+(\.\d+)?)/,"UC Browser":/(UCBrowser|UCWEB)\/(\d+(\.\d+)?)/,Safari:/Version\/(\d+(\.\d+)?)/,"Mobile Safari":/Version\/(\d+(\.\d+)?)/,Opera:/(Opera|OPR)\/(\d+(\.\d+)?)/,Firefox:/Firefox\/(\d+(\.\d+)?)/,"Firefox iOS":/FxiOS\/(\d+(\.\d+)?)/,Konqueror:/Konqueror:(\d+(\.\d+)?)/,BlackBerry:/BlackBerry (\d+(\.\d+)?)/,"Android Mobile":/android\s(\d+(\.\d+)?)/,"Samsung Internet":/SamsungBrowser\/(\d+(\.\d+)?)/,"Internet Explorer":/(rv:|MSIE )(\d+(\.\d+)?)/,Mozilla:/rv:(\d+(\.\d+)?)/},o=s[n];if(o===void 0)return null;var a=e.match(o);return a?parseFloat(a[a.length-2]):null},os:function(){var e=ft;return/Windows/i.test(e)?/Phone/.test(e)||/WPDesktop/.test(e)?"Windows Phone":"Windows":/(iPhone|iPad|iPod)/.test(e)?"iOS":/Android/.test(e)?"Android":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Mac/i.test(e)?"Mac OS X":/Linux/.test(e)?"Linux":/CrOS/.test(e)?"Chrome OS":""},device:function(e){return/Windows Phone/i.test(e)||/WPDesktop/.test(e)?"Windows Phone":/iPad/.test(e)?"iPad":/iPod/.test(e)?"iPod Touch":/iPhone/.test(e)?"iPhone":/(BlackBerry|PlayBook|BB10)/i.test(e)?"BlackBerry":/Android/.test(e)?"Android":""},referringDomain:function(e){var t=e.split("/");return t.length>=3?t[2]:""},currentUrl:function(){return se.location.href},properties:function(e){return typeof e!="object"&&(e={}),N.extend(N.strip_empty_properties({$os:N.info.os(),$browser:N.info.browser(ft,Dt.vendor,Jr),$referrer:ge.referrer,$referring_domain:N.info.referringDomain(ge.referrer),$device:N.info.device(ft)}),{$current_url:N.info.currentUrl(),$browser_version:N.info.browserVersion(ft,Dt.vendor,Jr),$screen_height:mn.height,$screen_width:mn.width,mp_lib:"web",$lib_version:vt.LIB_VERSION,$insert_id:Ms(),time:N.timestamp()/1e3},N.strip_empty_properties(e))},people_properties:function(){return N.extend(N.strip_empty_properties({$os:N.info.os(),$browser:N.info.browser(ft,Dt.vendor,Jr)}),{$browser_version:N.info.browserVersion(ft,Dt.vendor,Jr)})}
37,mpPageViewProperties:function(){return N.strip_empty_properties({current_page_title:ge.title,current_domain:se.location.hostname,current_url_path:se.location.pathname,current_url_protocol:se.location.protocol,current_url_search:se.location.search})}};var Ms=function(e){var t=Math.random().toString(36).substring(2,10)+Math.random().toString(36).substring(2,10);return e?t.substring(0,e):t},xu=/[a-z0-9][a-z0-9-]*\.[a-z]+$/i,vu=/[a-z0-9][a-z0-9-]+\.[a-z.]{2,6}$/i,ti=function(e){var t=vu,r=e.split("."),n=r[r.length-1];(n.length>4||n==="com"||n==="org")&&(t=xu);var s=e.match(t);return s?s[0]:""},bu=function(){var e=se.navigator.onLine;return N.isUndefined(e)||e},yn=null,xn=null;typeof JSON<"u"&&(yn=JSON.stringify,xn=JSON.parse);yn=yn||N.JSONEncode;xn=xn||N.JSONDecode;N.toArray=N.toArray;N.isObject=N.isObject;N.JSONEncode=N.JSONEncode;N.JSONDecode=N.JSONDecode;N.isBlockedUA=N.isBlockedUA;N.isEmptyObject=N.isEmptyObject;N.info=N.info;N.info.device=N.info.device;N.info.browser=N.info.browser;N.info.browserVersion=N.info.browserVersion;N.info.properties=N.info.properties;var wu="__mp_opt_in_out_";function _u(e,t){fa(!0,e,t)}function Su(e,t){fa(!1,e,t)}function Nu(e,t){return da(e,t)==="1"}function ua(e,t){if(Cu(t))return fe.warn('This browser has "Do Not Track" enabled. This will prevent the Mixpanel SDK from sending any data. To ignore the "Do Not Track" browser setting, initialize the Mixpanel instance with the config "ignore_dnt: true"'),!0;var r=da(e,t)==="0";return r&&fe.warn("You are opted out of Mixpanel tracking. This will prevent the Mixpanel SDK from sending any data."),r}function Ut(e){return Ds(e,function(t){return this.get_config(t)})}function Bt(e){return Ds(e,function(t){return this._get_config(t)})}function fr(e){return Ds(e,function(t){return this._get_config(t)})}function ju(e,t){t=t||{},Ts(t).remove(Os(e,t),!!t.crossSubdomainCookie,t.cookieDomain)}function Ts(e){return e=e||{},e.persistenceType==="localStorage"?N.localStorage:N.cookie}function Os(e,t){return t=t||{},(t.persistencePrefix||wu)+e}function da(e,t){return Ts(t).get(Os(e,t))}function Cu(e){if(e&&e.ignoreDnt)return!1;var t=e&&e.window||se,r=t.navigator||{},n=!1;return N.each([r.doNotTrack,r.msDoNotTrack,t.doNotTrack],function(s){N.includes([!0,1,"1","yes"],s)&&(n=!0)}),n}function fa(e,t,r){if(!N.isString(t)||!t.length){fe.error("gdpr."+(e?"optIn":"optOut")+" called with an invalid token");return}r=r||{},Ts(r).set(Os(t,r),e?1:0,N.isNumber(r.cookieExpiration)?r.cookieExpiration:null,!!r.crossSubdomainCookie,!!r.secureCookie,!!r.crossSiteCookie,r.cookieDomain),r.track&&e&&r.track(r.trackEventName||"$opt_in",r.trackProperties,{send_immediately:!0})}function Ds(e,t){return function(){var r=!1;try{var n=t.call(this,"token"),s=t.call(this,"ignore_dnt"),o=t.call(this,"opt_out_tracking_persistence_type"),a=t.call(this,"opt_out_tracking_cookie_prefix"),l=t.call(this,"window");n&&(r=ua(n,{ignoreDnt:s,persistenceType:o,persistencePrefix:a,window:l}))}catch(f){fe.error("Unexpected error when checking tracking opt-out status: "+f)}if(!r)return e.apply(this,arguments);var c=arguments[arguments.length-1];typeof c=="function"&&c(0)}}var Eu=kn("lock"),pa=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.pollIntervalMS=t.pollIntervalMS||100,this.timeoutMS=t.timeoutMS||2e3};pa.prototype.withLock=function(e,t,r){!r&&typeof t!="function"&&(r=t,t=null);var n=r||new Date().getTime()+"|"+Math.random(),s=new Date().getTime(),o=this.storageKey,a=this.pollIntervalMS,l=this.timeoutMS,c=this.storage,f=o+":X",u=o+":Y",p=o+":Z",h=function(I){t&&t(I)},v=function(I){if(new Date().getTime()-s>l){Eu.error("Timeout waiting for mutex on "+o+"; clearing lock. ["+n+"]"),c.removeItem(p),c.removeItem(u),y();return}setTimeout(function(){try{I()}catch(S){h(S)}},a*(Math.random()+.1))},g=function(I,S){I()?S():v(function(){g(I,S)})},m=function(){var I=c.getItem(u);if(I&&I!==n)return!1;if(c.setItem(u,n),c.getItem(u)===n)return!0;if(!gn(c,!0))throw new Error("localStorage support dropped while acquiring lock");return!1},y=function(){c.setItem(f,n),g(m,function(){if(c.getItem(f)===n){C();return}v(function(){if(c.getItem(u)!==n){y();return}g(function(){return!c.getItem(p)},C)})})},C=function(){c.setItem(p,"1");try{e()}finally{c.removeItem(p),c.getItem(u)===n&&c.removeItem(u),c.getItem(f)===n&&c.removeItem(f)}};try{if(gn(c,!0))y();else throw new Error("localStorage support check failed")}catch(I){h(I)}};var ri=kn("batch"),Ht=function(e,t){t=t||{},this.storageKey=e,this.storage=t.storage||window.localStorage,this.reportError=t.errorReporter||N.bind(ri.error,ri),this.lock=new pa(e,{storage:this.storage}),this.usePersistence=t.usePersistence,this.pid=t.pid||null,this.memQueue=[]};Ht.prototype.enqueue=function(e,t,r){var n={id:Ms(),flushAfter:new Date().getTime()+t*2,payload:e};this.usePersistence?this.lock.withLock(N.bind(function(){var o;try{var a=this.readFromStorage();a.push(n),o=this.saveToStorage(a),o&&this.memQueue.push(n)}catch{this.reportError("Error enqueueing item",e),o=!1}r&&r(o)},this),N.bind(function(o){this.reportError("Error acquiring storage lock",o),r&&r(!1)},this),this.pid):(this.memQueue.push(n),r&&r(!0))};Ht.prototype.fillBatch=function(e){var t=this.memQueue.slice(0,e);if(this.usePersistence&&t.length<e){var r=this.readFromStorage();if(r.length){var n={};N.each(t,function(a){n[a.id]=!0});for(var s=0;s<r.length;s++){var o=r[s];if(new Date().getTime()>o.flushAfter&&!n[o.id]&&(o.orphaned=!0,t.push(o),t.length>=e))break}}}return t};var ni=function(e,t){var r=[];return N.each(e,function(n){n.id&&!t[n.id]&&r.push(n)}),r};Ht.prototype.removeItemsByID=function(e,t){var r={};if(N.each(e,function(s){r[s]=!0}),this.memQueue=ni(this.memQueue,r),!this.usePersistence)t&&t(!0);else{var n=N.bind(function(){var s;try{var o=this.readFromStorage();if(o=ni(o,r),s=this.saveToStorage(o),s){o=this.readFromStorage();for(var a=0;a<o.length;a++){var l=o[a];if(l.id&&r[l.id])return this.reportError("Item not removed from storage"),!1}}}catch{this.reportError("Error removing items",e),s=!1}return s},this);this.lock.withLock(function(){var o=n();t&&t(o)},N.bind(function(o){var a=!1;if(this.reportError("Error acquiring storage lock",o),!gn(this.storage,!0)&&(a=n(),!a))try{this.storage.removeItem(this.storageKey)}catch(l){this.reportError("Error clearing queue",l)}t&&t(a)},this),this.pid)}};var si=function(e,t){var r=[];return N.each(e,function(n){var s=n.id;if(s in t){var o=t[s];o!==null&&(n.payload=o,r.push(n))}else r.push(n)}),r};Ht.prototype.updatePayloads=function(e,t){this.memQueue=si(this.memQueue,e),this.usePersistence?this.lock.withLock(N.bind(function(){var n;try{var s=this.readFromStorage();s=si(s,e),n=this.saveToStorage(s)}catch{this.reportError("Error updating items",e),n=!1}t&&t(n)},this),N.bind(function(n){this.reportError("Error acquiring storage lock",n),t&&t(!1)},this),this.pid):t&&t(!0)};Ht.prototype.readFromStorage=function(){var e;try{e=this.storage.getItem(this.storageKey),e&&(e=xn(e),N.isArray(e)||(this.reportError("Invalid storage entry:",e),e=null))}catch(t){this.reportError("Error retrieving queue",t),e=null}return e||[]};Ht.prototype.saveToStorage=function(e){try{return this.storage.setItem(this.storageKey,yn(e)),!0}catch(t){return this.reportError("Error saving queue",t),!1}};Ht.prototype.clear=function(){this.memQueue=[],this.usePersistence&&this.storage.removeItem(this.storageKey)};var ku=10*60*1e3,Er=kn("batch"),lt=function(e,t){this.errorReporter=t.errorReporter,this.queue=new Ht(e,{errorReporter:N.bind(this.reportError,this),storage:t.storage,usePersistence:t.usePersistence}),this.libConfig=t.libConfig,this.sendRequest=t.sendRequestFunc,this.beforeSendHook=t.beforeSendHook,this.stopAllBatching=t.stopAllBatchingFunc,this.batchSize=this.libConfig.batch_size,this.flushInterval=this.libConfig.batch_flush_interval_ms,this.stopped=!this.libConfig.batch_autostart,this.consecutiveRemovalFailures=0,this.itemIdsSentSuccessfully={},this.flushOnlyOnInterval=t.flushOnlyOnInterval||!1};lt.prototype.enqueue=function(e,t){this.queue.enqueue(e,this.flushInterval,t)};lt.prototype.start=function(){this.stopped=!1,this.consecutiveRemovalFailures=0,this.flush()};lt.prototype.stop=function(){this.stopped=!0,this.timeoutID&&(clearTimeout(this.timeoutID),this.timeoutID=null)};lt.prototype.clear=function(){this.queue.clear()};lt.prototype.resetBatchSize=function(){this.batchSize=this.libConfig.batch_size};lt.prototype.resetFlush=function(){this.scheduleFlush(this.libConfig.batch_flush_interval_ms)};lt.prototype.scheduleFlush=function(e){this.flushInterval=e,this.stopped||(this.timeoutID=setTimeout(N.bind(function(){this.stopped||this.flush()},this),this.flushInterval))};lt.prototype.flush=function(e){try{if(this.requestInProgress){Er.log("Flush: Request already in progress");return}e=e||{};var t=this.libConfig.batch_request_timeout_ms,r=new Date().getTime(),n=this.batchSize,s=this.queue.fillBatch(n),o=s.length===n,a=[],l={};if(N.each(s,function(u){var p=u.payload;if(this.beforeSendHook&&!u.orphaned&&(p=this.beforeSendHook(p)),p){p.event&&p.properties&&(p.properties=N.extend({},p.properties,{mp_sent_by_lib_version:vt.LIB_VERSION}));var h=!0,v=u.id;v?(this.itemIdsSentSuccessfully[v]||0)>5&&(this.reportError("[dupe] item ID sent too many times, not sending",{item:u,batchSize:s.length,timesSent:this.itemIdsSentSuccessfully[v]}),h=!1):this.reportError("[dupe] found item with no ID",{item:u}),h&&a.push(p)}l[u.id]=p},this),a.length<1){this.resetFlush();return}this.requestInProgress=!0;var c=N.bind(function(u){this.requestInProgress=!1;try{var p=!1;if(e.unloading)this.queue.updatePayloads(l);else if(N.isObject(u)&&u.error==="timeout"&&new Date().getTime()-r>=t)this.reportError("Network timeout; retrying"),this.flush();else if(N.isObject(u)&&(u.httpStatusCode>=500||u.httpStatusCode===429||u.httpStatusCode<=0&&!bu()||u.error==="timeout")){var h=this.flushInterval*2;u.retryAfter&&(h=parseInt(u.retryAfter,10)*1e3||h),h=Math.min(ku,h),this.reportError("Error; retry in "+h+" ms"),this.scheduleFlush(h)}else if(N.isObject(u)&&u.httpStatusCode===413)if(s.length>1){var v=Math.max(1,Math.floor(n/2));this.batchSize=Math.min(this.batchSize,v,s.length-1),this.reportError("413 response; reducing batch size to "+this.batchSize),this.resetFlush()}else this.reportError("Single-event request too large; dropping",s),this.resetBatchSize(),p=!0;else p=!0;p&&(this.queue.removeItemsByID(N.map(s,function(g){return g.id}),N.bind(function(g){g?(this.consecutiveRemovalFailures=0,this.flushOnlyOnInterval&&!o?this.resetFlush():this.flush()):(this.reportError("Failed to remove items from queue"),++this.consecutiveRemovalFailures>5?(this.reportError("Too many queue failures; disabling batching system."),this.stopAllBatching()):this.resetFlush())},this)),N.each(s,N.bind(function(g){var m=g.id;m?(this.itemIdsSentSuccessfully[m]=this.itemIdsSentSuccessfully[m]||0,this.itemIdsSentSuccessfully[m]++,this.itemIdsSentSuccessfully[m]>5&&this.reportError("[dupe] item ID sent too many times",{item:g,batchSize:s.length,timesSent:this.itemIdsSentSuccessfully[m]})):this.reportError("[dupe] found item with no ID while removing",{item:g})},this)))}catch(g){this.reportError("Error handling API response",g),this.resetFlush()}},this),f={method:"POST",verbose:!0,ignore_json_errors:!0,timeout_ms:t};e.unloading&&(f.transport="sendBeacon"),Er.log("MIXPANEL REQUEST:",a),this.sendRequest(a,f,c)}catch(u){this.reportError("Error flushing request queue",u),this.resetFlush()}};lt.prototype.reportError=function(e,t){if(Er.error.apply(Er.error,arguments),this.errorReporter)try{t instanceof Error||(t=new Error(e)),this.errorReporter(e,t)}catch(r){Er.error(r)}};var Gt=kn("recorder"),oi=se.CompressionStream,Iu={batch_size:1e3,batch_flush_interval_ms:10*1e3,batch_request_timeout_ms:90*1e3,batch_autostart:!0},Mu=new Set([dt.MouseMove,dt.MouseInteraction,dt.Scroll,dt.ViewportResize,dt.Input,dt.TouchMove,dt.MediaInteraction,dt.Drag,dt.Selection]);function Tu(e){return e.type===la.IncrementalSnapshot&&Mu.has(e.data.source)}var ct=function(e){this._mixpanel=e,this._stopRecording=null,this.recEvents=[],this.seqNo=0,this.replayId=null,this.replayStartTime=null,this.sendBatchId=null,this.idleTimeoutId=null,this.maxTimeoutId=null,this.recordMaxMs=Cr,this.recordMinMs=0,this._initBatcher()};ct.prototype._initBatcher=function(){this.batcher=new lt("__mprec",{libConfig:Iu,sendRequestFunc:N.bind(this.flushEventsWithOptOut,this),errorReporter:N.bind(this.reportError,this),flushOnlyOnInterval:!0,usePersistence:!1})};ct.prototype.get_config=function(e){return this._mixpanel.get_config(e)};ct.prototype.startRecording=function(e){if(this._stopRecording!==null){Gt.log("Recording already in progress, skipping startRecording.");return}this.recordMaxMs=this.get_config("record_max_ms"),this.recordMaxMs>Cr&&(this.recordMaxMs=Cr,Gt.critical("record_max_ms cannot be greater than "+Cr+"ms. Capping value.")),this.recordMinMs=this.get_config("record_min_ms"),this.recordMinMs>Vn&&(this.recordMinMs=Vn,Gt.critical("record_min_ms cannot be greater than "+Vn+"ms. Capping value.")),this.recEvents=[],this.seqNo=0,this.replayStartTime=new Date().getTime(),this.replayId=N.UUID(),e||this.recordMinMs>0?this.batcher.stop():this.batcher.start();var t=N.bind(function(){clearTimeout(this.idleTimeoutId),this.idleTimeoutId=setTimeout(N.bind(function(){Gt.log("Idle timeout reached, restarting recording."),this.resetRecording()},this),this.get_config("record_idle_timeout_ms"))},this),r=this.get_config("record_block_selector");(r===""||r===null)&&(r=void 0),this._stopRecording=Br({emit:N.bind(function(n){this.batcher.enqueue(n),Tu(n)&&(this.batcher.stopped&&new Date().getTime()-this.replayStartTime>=this.recordMinMs&&this.batcher.start(),t())},this),blockClass:this.get_config("record_block_class"),blockSelector:r,collectFonts:this.get_config("record_collect_fonts"),inlineImages:this.get_config("record_inline_images"),maskAllInputs:!0,maskTextClass:this.get_config("record_mask_text_class"),maskTextSelector:this.get_config("record_mask_text_selector")}),t(),this.maxTimeoutId=setTimeout(N.bind(this.resetRecording,this),this.recordMaxMs)};ct.prototype.resetRecording=function(){this.stopRecording(),this.startRecording(!0)};ct.prototype.stopRecording=function(){this._stopRecording!==null&&(this._stopRecording(),this._stopRecording=null),this.batcher.stopped?this.batcher.clear():(this.batcher.flush(),this.batcher.stop()),this.replayId=null,clearTimeout(this.idleTimeoutId),clearTimeout(this.maxTimeoutId)};ct.prototype.flushEventsWithOptOut=function(e,t,r){this._flushEvents(e,t,r,N.bind(this._onOptOut,this))};ct.prototype._onOptOut=function(e){e===0&&(this.recEvents=[],this.stopRecording())};ct.prototype._sendRequest=function(e,t,r,n){var s=N.bind(function(o,a){o.status===200&&this.replayId===e&&this.seqNo++,n({status:0,httpStatusCode:o.status,responseBody:a,retryAfter:o.headers.get("Retry-After")})},this);se.fetch(this.get_config("api_host")+"/"+this.get_config("api_routes").record+"?"+new URLSearchParams(t),{method:"POST",headers:{Authorization:"Basic "+btoa(this.get_config("token")+":"),"Content-Type":"application/octet-stream"},body:r}).then(function(o){o.json().then(function(a){s(o,a)}).catch(function(a){n({error:a})})}).catch(function(o){n({error:o,httpStatusCode:0})})};ct.prototype._flushEvents=Ut(function(e,t,r){const n=e.length;if(n>0){var s=this.replayId,o=e[0].timestamp;(this.seqNo===0||!this.replayStartTime)&&(this.seqNo!==0&&this.reportError("Replay start time not set but seqNo is not 0. Using current batch start time as a fallback."),this.replayStartTime=o);var a=e[n-1].timestamp-this.replayStartTime,l={distinct_id:String(this._mixpanel.get_distinct_id()),seq:this.seqNo,batch_start_time:o/1e3,replay_id:s,replay_length_ms:a,replay_start_time:this.replayStartTime/1e3},c=N.JSONEncode(e),f=this._mixpanel.get_property("$device_id");f&&(l.$device_id=f);var u=this._mixpanel.get_property("$user_id");
vendor: 16,571 bytes, line 37
37if(u&&(l.$user_id=u),oi){var p=new Blob([c],{type:"application/json"}).stream(),h=p.pipeThrough(new oi("gzip"));new Response(h).blob().then(N.bind(function(v){l.format="gzip",this._sendRequest(s,l,v,r)},this))}else l.format="body",this._sendRequest(s,l,c,r)}});ct.prototype.reportError=function(e,t){Gt.error.apply(Gt.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){Gt.error(r)}};se.__mp_recorder=ct;var jt=function(){};jt.prototype.create_properties=function(){};jt.prototype.event_handler=function(){};jt.prototype.after_track_handler=function(){};jt.prototype.init=function(e){return this.mp=e,this};jt.prototype.track=function(e,t,r,n){var s=this,o=N.dom_query(e);if(o.length===0){fe.error("The DOM query ("+e+") returned 0 elements");return}return N.each(o,function(a){N.register_event(a,this.override_event,function(l){var c={},f=s.create_properties(r,this),u=s.mp.get_config("track_links_timeout");s.event_handler(l,this,c),window.setTimeout(s.track_callback(n,f,c,!0),u),s.mp.track(t,f,s.track_callback(n,f,c))})},this),!0};jt.prototype.track_callback=function(e,t,r,n){n=n||!1;var s=this;return function(){r.callback_fired||(r.callback_fired=!0,!(e&&e(n,t)===!1)&&s.after_track_handler(t,r,n))}};jt.prototype.create_properties=function(e,t){var r;return typeof e=="function"?r=e(t):r=N.extend({},e),r};var ar=function(){this.override_event="click"};N.inherit(ar,jt);ar.prototype.create_properties=function(e,t){var r=ar.superclass.create_properties.apply(this,arguments);return t.href&&(r.url=t.href),r};ar.prototype.event_handler=function(e,t,r){r.new_tab=e.which===2||e.metaKey||e.ctrlKey||t.target==="_blank",r.href=t.href,r.new_tab||e.preventDefault()};ar.prototype.after_track_handler=function(e,t){t.new_tab||setTimeout(function(){window.location=t.href},0)};var In=function(){this.override_event="submit"};N.inherit(In,jt);In.prototype.event_handler=function(e,t,r){r.element=t,e.preventDefault()};In.prototype.after_track_handler=function(e,t){setTimeout(function(){t.element.submit()},0)};var Pt="$set",lr="$set_once",nt="$unset",Qt="$add",ht="$append",Kt="$union",bt="$remove",Ou="$delete",ha={set_action:function(e,t){var r={},n={};return N.isObject(e)?N.each(e,function(s,o){this._is_reserved_property(o)||(n[o]=s)},this):n[e]=t,r[Pt]=n,r},unset_action:function(e){var t={},r=[];return N.isArray(e)||(e=[e]),N.each(e,function(n){this._is_reserved_property(n)||r.push(n)},this),t[nt]=r,t},set_once_action:function(e,t){var r={},n={};return N.isObject(e)?N.each(e,function(s,o){this._is_reserved_property(o)||(n[o]=s)},this):n[e]=t,r[lr]=n,r},union_action:function(e,t){var r={},n={};return N.isObject(e)?N.each(e,function(s,o){this._is_reserved_property(o)||(n[o]=N.isArray(s)?s:[s])},this):n[e]=N.isArray(t)?t:[t],r[Kt]=n,r},append_action:function(e,t){var r={},n={};return N.isObject(e)?N.each(e,function(s,o){this._is_reserved_property(o)||(n[o]=s)},this):n[e]=t,r[ht]=n,r},remove_action:function(e,t){var r={},n={};return N.isObject(e)?N.each(e,function(s,o){this._is_reserved_property(o)||(n[o]=s)},this):n[e]=t,r[bt]=n,r},delete_action:function(){var e={};return e[Ou]="",e}},be=function(){};N.extend(be.prototype,ha);be.prototype._init=function(e,t,r){this._mixpanel=e,this._group_key=t,this._group_id=r};be.prototype.set=fr(function(e,t,r){var n=this.set_action(e,t);return N.isObject(e)&&(r=t),this._send_request(n,r)});be.prototype.set_once=fr(function(e,t,r){var n=this.set_once_action(e,t);return N.isObject(e)&&(r=t),this._send_request(n,r)});be.prototype.unset=fr(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});be.prototype.union=fr(function(e,t,r){N.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});be.prototype.delete=fr(function(e){var t=this.delete_action();return this._send_request(t,e)});be.prototype.remove=fr(function(e,t,r){var n=this.remove_action(e,t);return this._send_request(n,r)});be.prototype._send_request=function(e,t){e.$group_key=this._group_key,e.$group_id=this._group_id,e.$token=this._get_config("token");var r=N.encodeDates(e);return this._mixpanel._track_or_batch({type:"groups",data:r,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").groups,batcher:this._mixpanel.request_batchers.groups},t)};be.prototype._is_reserved_property=function(e){return e==="$group_key"||e==="$group_id"};be.prototype._get_config=function(e){return this._mixpanel.get_config(e)};be.prototype.toString=function(){return this._mixpanel.toString()+".group."+this._group_key+"."+this._group_id};be.prototype.remove=be.prototype.remove;be.prototype.set=be.prototype.set;be.prototype.set_once=be.prototype.set_once;be.prototype.union=be.prototype.union;be.prototype.unset=be.prototype.unset;be.prototype.toString=be.prototype.toString;var oe=function(){};N.extend(oe.prototype,ha);oe.prototype._init=function(e){this._mixpanel=e};oe.prototype.set=Bt(function(e,t,r){var n=this.set_action(e,t);return N.isObject(e)&&(r=t),this._get_config("save_referrer")&&this._mixpanel.persistence.update_referrer_info(document.referrer),n[Pt]=N.extend({},N.info.people_properties(),n[Pt]),this._send_request(n,r)});oe.prototype.set_once=Bt(function(e,t,r){var n=this.set_once_action(e,t);return N.isObject(e)&&(r=t),this._send_request(n,r)});oe.prototype.unset=Bt(function(e,t){var r=this.unset_action(e);return this._send_request(r,t)});oe.prototype.increment=Bt(function(e,t,r){var n={},s={};return N.isObject(e)?(N.each(e,function(o,a){if(!this._is_reserved_property(a))if(isNaN(parseFloat(o))){fe.error("Invalid increment value passed to mixpanel.people.increment - must be a number");return}else s[a]=o},this),r=t):(N.isUndefined(t)&&(t=1),s[e]=t),n[Qt]=s,this._send_request(n,r)});oe.prototype.append=Bt(function(e,t,r){N.isObject(e)&&(r=t);var n=this.append_action(e,t);return this._send_request(n,r)});oe.prototype.remove=Bt(function(e,t,r){N.isObject(e)&&(r=t);var n=this.remove_action(e,t);return this._send_request(n,r)});oe.prototype.union=Bt(function(e,t,r){N.isObject(e)&&(r=t);var n=this.union_action(e,t);return this._send_request(n,r)});oe.prototype.track_charge=Bt(function(e,t,r){if(!N.isNumber(e)&&(e=parseFloat(e),isNaN(e))){fe.error("Invalid value passed to mixpanel.people.track_charge - must be a number");return}return this.append("$transactions",N.extend({$amount:e},t),r)});oe.prototype.clear_charges=function(e){return this.set("$transactions",[],e)};oe.prototype.delete_user=function(){if(!this._identify_called()){fe.error("mixpanel.people.delete_user() requires you to call identify() first");return}var e={$delete:this._mixpanel.get_distinct_id()};return this._send_request(e)};oe.prototype.toString=function(){return this._mixpanel.toString()+".people"};oe.prototype._send_request=function(e,t){e.$token=this._get_config("token"),e.$distinct_id=this._mixpanel.get_distinct_id();var r=this._mixpanel.get_property("$device_id"),n=this._mixpanel.get_property("$user_id"),s=this._mixpanel.get_property("$had_persisted_distinct_id");r&&(e.$device_id=r),n&&(e.$user_id=n),s&&(e.$had_persisted_distinct_id=s);var o=N.encodeDates(e);return this._identify_called()?this._mixpanel._track_or_batch({type:"people",data:o,endpoint:this._get_config("api_host")+"/"+this._get_config("api_routes").engage,batcher:this._mixpanel.request_batchers.people},t):(this._enqueue(e),N.isUndefined(t)||(this._get_config("verbose")?t({status:-1,error:null}):t(-1)),N.truncate(o,255))};oe.prototype._get_config=function(e){return this._mixpanel.get_config(e)};oe.prototype._identify_called=function(){return this._mixpanel._flags.identify_called===!0};oe.prototype._enqueue=function(e){Pt in e?this._mixpanel.persistence._add_to_people_queue(Pt,e):lr in e?this._mixpanel.persistence._add_to_people_queue(lr,e):nt in e?this._mixpanel.persistence._add_to_people_queue(nt,e):Qt in e?this._mixpanel.persistence._add_to_people_queue(Qt,e):ht in e?this._mixpanel.persistence._add_to_people_queue(ht,e):bt in e?this._mixpanel.persistence._add_to_people_queue(bt,e):Kt in e?this._mixpanel.persistence._add_to_people_queue(Kt,e):fe.error("Invalid call to _enqueue():",e)};oe.prototype._flush_one_queue=function(e,t,r,n){var s=this,o=N.extend({},this._mixpanel.persistence.load_queue(e)),a=o;!N.isUndefined(o)&&N.isObject(o)&&!N.isEmptyObject(o)&&(s._mixpanel.persistence._pop_from_people_queue(e,o),s._mixpanel.persistence.save(),n&&(a=n(o)),t.call(s,a,function(l,c){l===0&&s._mixpanel.persistence._add_to_people_queue(e,o),N.isUndefined(r)||r(l,c)}))};oe.prototype._flush=function(e,t,r,n,s,o,a){var l=this;this._flush_one_queue(Pt,this.set,e),this._flush_one_queue(lr,this.set_once,n),this._flush_one_queue(nt,this.unset,o,function(y){return N.keys(y)}),this._flush_one_queue(Qt,this.increment,t),this._flush_one_queue(Kt,this.union,s);var c=this._mixpanel.persistence.load_queue(ht);if(!N.isUndefined(c)&&N.isArray(c)&&c.length)for(var f,u=function(y,C){y===0&&l._mixpanel.persistence._add_to_people_queue(ht,f),N.isUndefined(r)||r(y,C)},p=c.length-1;p>=0;p--)c=this._mixpanel.persistence.load_queue(ht),f=c.pop(),l._mixpanel.persistence.save(),N.isEmptyObject(f)||l.append(f,u);var h=this._mixpanel.persistence.load_queue(bt);if(!N.isUndefined(h)&&N.isArray(h)&&h.length)for(var v,g=function(y,C){y===0&&l._mixpanel.persistence._add_to_people_queue(bt,v),N.isUndefined(a)||a(y,C)},m=h.length-1;m>=0;m--)h=this._mixpanel.persistence.load_queue(bt),v=h.pop(),l._mixpanel.persistence.save(),N.isEmptyObject(v)||l.remove(v,g)};oe.prototype._is_reserved_property=function(e){return e==="$distinct_id"||e==="$token"||e==="$device_id"||e==="$user_id"||e==="$had_persisted_distinct_id"};oe.prototype.set=oe.prototype.set;oe.prototype.set_once=oe.prototype.set_once;oe.prototype.unset=oe.prototype.unset;oe.prototype.increment=oe.prototype.increment;oe.prototype.append=oe.prototype.append;oe.prototype.remove=oe.prototype.remove;oe.prototype.union=oe.prototype.union;oe.prototype.track_charge=oe.prototype.track_charge;oe.prototype.clear_charges=oe.prototype.clear_charges;oe.prototype.delete_user=oe.prototype.delete_user;oe.prototype.toString=oe.prototype.toString;var As="__mps",Rs="__mpso",Ls="__mpus",Ps="__mpa",$s="__mpap",Fs="__mpr",Us="__mpu",ma="$people_distinct_id",vn="__alias",Or="__timers",Du=[As,Rs,Ls,Ps,$s,Fs,Us,ma,vn,Or],ie=function(e){this.props={},this.campaign_params_saved=!1,e.persistence_name?this.name="mp_"+e.persistence_name:this.name="mp_"+e.token+"_mixpanel";var t=e.persistence;t!=="cookie"&&t!=="localStorage"&&(fe.critical("Unknown persistence type "+t+"; falling back to cookie"),t=e.persistence="cookie"),t==="localStorage"&&N.localStorage.is_supported()?this.storage=N.localStorage:this.storage=N.cookie,this.load(),this.update_config(e),this.upgrade(),this.save()};ie.prototype.properties=function(){var e={};return this.load(),N.each(this.props,function(t,r){N.include(Du,r)||(e[r]=t)}),e};ie.prototype.load=function(){if(!this.disabled){var e=this.storage.parse(this.name);e&&(this.props=N.extend({},e))}};ie.prototype.upgrade=function(){var e,t;this.storage===N.localStorage?(e=N.cookie.parse(this.name),N.cookie.remove(this.name),N.cookie.remove(this.name,!0),e&&this.register_once(e)):this.storage===N.cookie&&(t=N.localStorage.parse(this.name),N.localStorage.remove(this.name),t&&this.register_once(t))};ie.prototype.save=function(){this.disabled||this.storage.set(this.name,N.JSONEncode(this.props),this.expire_days,this.cross_subdomain,this.secure,this.cross_site,this.cookie_domain)};ie.prototype.load_prop=function(e){return this.load(),this.props[e]};ie.prototype.remove=function(){this.storage.remove(this.name,!1,this.cookie_domain),this.storage.remove(this.name,!0,this.cookie_domain)};ie.prototype.clear=function(){this.remove(),this.props={}};ie.prototype.register_once=function(e,t,r){return N.isObject(e)?(typeof t>"u"&&(t="None"),this.expire_days=typeof r>"u"?this.default_expiry:r,this.load(),N.each(e,function(n,s){(!this.props.hasOwnProperty(s)||this.props[s]===t)&&(this.props[s]=n)},this),this.save(),!0):!1};ie.prototype.register=function(e,t){return N.isObject(e)?(this.expire_days=typeof t>"u"?this.default_expiry:t,this.load(),N.extend(this.props,e),this.save(),!0):!1};ie.prototype.unregister=function(e){this.load(),e in this.props&&(delete this.props[e],this.save())};ie.prototype.update_search_keyword=function(e){this.register(N.info.searchInfo(e))};ie.prototype.update_referrer_info=function(e){this.register_once({$initial_referrer:e||"$direct",$initial_referring_domain:N.info.referringDomain(e)||"$direct"},"")};ie.prototype.get_referrer_info=function(){return N.strip_empty_properties({$initial_referrer:this.props.$initial_referrer,$initial_referring_domain:this.props.$initial_referring_domain})};ie.prototype.update_config=function(e){this.default_expiry=this.expire_days=e.cookie_expiration,this.set_disabled(e.disable_persistence),this.set_cookie_domain(e.cookie_domain),this.set_cross_site(e.cross_site_cookie),this.set_cross_subdomain(e.cross_subdomain_cookie),this.set_secure(e.secure_cookie)};ie.prototype.set_disabled=function(e){this.disabled=e,this.disabled?this.remove():this.save()};ie.prototype.set_cookie_domain=function(e){e!==this.cookie_domain&&(this.remove(),this.cookie_domain=e,this.save())};ie.prototype.set_cross_site=function(e){e!==this.cross_site&&(this.cross_site=e,this.remove(),this.save())};ie.prototype.set_cross_subdomain=function(e){e!==this.cross_subdomain&&(this.cross_subdomain=e,this.remove(),this.save())};ie.prototype.get_cross_subdomain=function(){return this.cross_subdomain};ie.prototype.set_secure=function(e){e!==this.secure&&(this.secure=!!e,this.remove(),this.save())};ie.prototype._add_to_people_queue=function(e,t){var r=this._get_queue_key(e),n=t[e],s=this._get_or_create_queue(Pt),o=this._get_or_create_queue(lr),a=this._get_or_create_queue(nt),l=this._get_or_create_queue(Qt),c=this._get_or_create_queue(Kt),f=this._get_or_create_queue(bt,[]),u=this._get_or_create_queue(ht,[]);r===As?(N.extend(s,n),this._pop_from_people_queue(Qt,n),this._pop_from_people_queue(Kt,n),this._pop_from_people_queue(nt,n)):r===Rs?(N.each(n,function(p,h){h in o||(o[h]=p)}),this._pop_from_people_queue(nt,n)):r===Ls?N.each(n,function(p){N.each([s,o,l,c],function(h){p in h&&delete h[p]}),N.each(u,function(h){p in h&&delete h[p]}),a[p]=!0}):r===Ps?(N.each(n,function(p,h){h in s?s[h]+=p:(h in l||(l[h]=0),l[h]+=p)},this),this._pop_from_people_queue(nt,n)):r===Us?(N.each(n,function(p,h){N.isArray(p)&&(h in c||(c[h]=[]),c[h]=c[h].concat(p))}),this._pop_from_people_queue(nt,n)):r===Fs?(f.push(n),this._pop_from_people_queue(ht,n)):r===$s&&(u.push(n),this._pop_from_people_queue(nt,n)),fe.log("MIXPANEL PEOPLE REQUEST (QUEUED, PENDING IDENTIFY):"),fe.log(t),this.save()};ie.prototype._pop_from_people_queue=function(e,t){var r=this.props[this._get_queue_key(e)];N.isUndefined(r)||N.each(t,function(n,s){e===ht||e===bt?N.each(r,function(o){o[s]===n&&delete o[s]}):delete r[s]},this)};ie.prototype.load_queue=function(e){return this.load_prop(this._get_queue_key(e))};ie.prototype._get_queue_key=function(e){if(e===Pt)return As;if(e===lr)return Rs;if(e===nt)return Ls;if(e===Qt)return Ps;if(e===ht)return $s;if(e===bt)return Fs;if(e===Kt)return Us;fe.error("Invalid queue:",e)};ie.prototype._get_or_create_queue=function(e,t){var r=this._get_queue_key(e);return t=N.isUndefined(t)?{}:t,this.props[r]||(this.props[r]=t)};ie.prototype.set_event_timer=function(e,t){var r=this.load_prop(Or)||{};r[e]=t,this.props[Or]=r,this.save()};ie.prototype.remove_event_timer=function(e){var t=this.load_prop(Or)||{},r=t[e];return N.isUndefined(r)||(delete this.props[Or][e],this.save()),r};var Bs,ga=function(e,t){throw new Error(e+" not available in this build.")},qe,ya=0,Au=1,Ru=function(e){return e},Dr=function(){},Xe="mixpanel",xa="base64",Lu="json",Hs="$device:",or=se.XMLHttpRequest&&"withCredentials"in new XMLHttpRequest,va=!or&&ft.indexOf("MSIE")===-1&&ft.indexOf("Mozilla")===-1,bn=null;Dt.sendBeacon&&(bn=function(){return Dt.sendBeacon.apply(Dt,arguments)});var ba={track:"track/",engage:"engage/",groups:"groups/",record:"record/"},ii={api_host:"https://api-js.mixpanel.com",api_routes:ba,api_method:"POST",api_transport:"XHR",api_payload_format:xa,app_host:"https://mixpanel.com",cdn:"https://cdn.mxpnl.com",cross_site_cookie:!1,cross_subdomain_cookie:!0,error_reporter:Dr,persistence:"cookie",persistence_name:"",cookie_domain:"",cookie_name:"",loaded:Dr,mp_loader:null,track_marketing:!0,track_pageview:!1,skip_first_touch_marketing:!1,store_google:!0,stop_utm_persistence:!1,save_referrer:!0,test:!1,verbose
37:!1,img:!1,debug:!1,track_links_timeout:300,cookie_expiration:365,upgrade:!1,disable_persistence:!1,disable_cookie:!1,secure_cookie:!1,ip:!0,opt_out_tracking_by_default:!1,opt_out_persistence_by_default:!1,opt_out_tracking_persistence_type:"localStorage",opt_out_tracking_cookie_prefix:null,property_blacklist:[],xhr_headers:{},ignore_dnt:!1,batch_requests:!0,batch_size:50,batch_flush_interval_ms:5e3,batch_request_timeout_ms:9e4,batch_autostart:!0,hooks:{},record_block_class:new RegExp("^(mp-block|fs-exclude|amp-block|rr-block|ph-no-capture)$"),record_block_selector:"img, video",record_collect_fonts:!1,record_idle_timeout_ms:30*60*1e3,record_inline_images:!1,record_mask_text_class:new RegExp("^(mp-mask|fs-mask|amp-mask|rr-mask|ph-mask)$"),record_mask_text_selector:"*",record_max_ms:Cr,record_min_ms:0,record_sessions_percent:0,recorder_src:"https://cdn.mxpnl.com/libs/mixpanel-recorder.min.js"},wa=!1,B=function(){},hs=function(e,t,r){var n,s=r===Xe?qe:qe[r];if(s&&Bs===ya)n=s;else{if(s&&!N.isArray(s)){fe.error("You have already initialized "+r);return}n=new B}if(n._cached_groups={},n._init(e,t,r),n.people=new oe,n.people._init(n),!n.get_config("skip_first_touch_marketing")){var o=N.info.campaignParams(null),a={},l=!1;N.each(o,function(c,f){a["initial_"+f]=c,c&&(l=!0)}),l&&n.people.set_once(a)}return vt.DEBUG=vt.DEBUG||n.get_config("debug"),!N.isUndefined(s)&&N.isArray(s)&&(n._execute_array.call(n.people,s.people),n._execute_array(s)),n};B.prototype.init=function(e,t,r){if(N.isUndefined(r)){this.report_error("You must name your new library: init(token, config, name)");return}if(r===Xe){this.report_error("You must initialize the main mixpanel object right after you include the Mixpanel js snippet");return}var n=hs(e,t,r);return qe[r]=n,n._loaded(),n};B.prototype._init=function(e,t,r){t=t||{},this.__loaded=!0,this.config={};var n={};if(!("api_payload_format"in t)){var s=t.api_host||ii.api_host;s.match(/\.mixpanel\.com/)&&(n.api_payload_format=Lu)}if(this.set_config(N.extend({},ii,n,t,{name:r,token:e,callback_fn:(r===Xe?r:Xe+"."+r)+"._jsc"})),this._jsc=Dr,this.__dom_loaded_queue=[],this.__request_queue=[],this.__disabled_events=[],this._flags={disable_all_events:!1,identify_called:!1},this.request_batchers={},this._batch_requests=this.get_config("batch_requests"),this._batch_requests){if(!N.localStorage.is_supported(!0)||!or)this._batch_requests=!1,fe.log("Turning off Mixpanel request-queueing; needs XHR and localStorage support"),N.each(this.get_batcher_configs(),function(c){fe.log("Clearing batch queue "+c.queue_key),N.localStorage.remove(c.queue_key)});else if(this.init_batchers(),bn&&se.addEventListener){var o=N.bind(function(){this.request_batchers.events.stopped||this.request_batchers.events.flush({unloading:!0})},this);se.addEventListener("pagehide",function(c){c.persisted&&o()}),se.addEventListener("visibilitychange",function(){ge.visibilityState==="hidden"&&o()})}}this.persistence=this.cookie=new ie(this.config),this.unpersisted_superprops={},this._gdpr_init();var a=N.UUID();this.get_distinct_id()||this.register_once({distinct_id:Hs+a,$device_id:a},"");var l=this.get_config("track_pageview");l&&this._init_url_change_tracking(l),this.get_config("record_sessions_percent")>0&&Math.random()*100<=this.get_config("record_sessions_percent")&&this.start_session_recording()};B.prototype.start_session_recording=Ut(function(){if(!se.MutationObserver){fe.critical("Browser does not support MutationObserver; skipping session recording");return}var e=N.bind(function(){this._recorder=this._recorder||new se.__mp_recorder(this),this._recorder.startRecording()},this);N.isUndefined(se.__mp_recorder)?ga(this.get_config("recorder_src"),e):e()});B.prototype.stop_session_recording=function(){this._recorder?this._recorder.stopRecording():fe.critical("Session recorder module not loaded")};B.prototype.get_session_recording_properties=function(){var e={};if(this._recorder){var t=this._recorder.replayId;t&&(e.$mp_replay_id=t)}return e};B.prototype._loaded=function(){if(this.get_config("loaded")(this),this._set_default_superprops(),this.people.set_once(this.persistence.get_referrer_info()),this.get_config("store_google")&&this.get_config("stop_utm_persistence")){var e=N.info.campaignParams(null);N.each(e,(function(t,r){this.unregister(r)}).bind(this))}};B.prototype._set_default_superprops=function(){this.persistence.update_search_keyword(ge.referrer),this.get_config("store_google")&&!this.get_config("stop_utm_persistence")&&this.register(N.info.campaignParams()),this.get_config("save_referrer")&&this.persistence.update_referrer_info(ge.referrer)};B.prototype._dom_loaded=function(){N.each(this.__dom_loaded_queue,function(e){this._track_dom.apply(this,e)},this),this.has_opted_out_tracking()||N.each(this.__request_queue,function(e){this._send_request.apply(this,e)},this),delete this.__dom_loaded_queue,delete this.__request_queue};B.prototype._track_dom=function(e,t){if(this.get_config("img"))return this.report_error("You can't use DOM tracking functions with img = true."),!1;if(!wa)return this.__dom_loaded_queue.push([e,t]),!1;var r=new e().init(this);return r.track.apply(r,t)};B.prototype._init_url_change_tracking=function(e){var t="",r=this.track_pageview();if(r&&(t=N.info.currentUrl()),N.include(["full-url","url-with-path-and-query-string","url-with-path"],e)){se.addEventListener("popstate",function(){se.dispatchEvent(new Event("mp_locationchange"))}),se.addEventListener("hashchange",function(){se.dispatchEvent(new Event("mp_locationchange"))});var n=se.history.pushState;typeof n=="function"&&(se.history.pushState=function(o,a,l){n.call(se.history,o,a,l),se.dispatchEvent(new Event("mp_locationchange"))});var s=se.history.replaceState;typeof s=="function"&&(se.history.replaceState=function(o,a,l){s.call(se.history,o,a,l),se.dispatchEvent(new Event("mp_locationchange"))}),se.addEventListener("mp_locationchange",(function(){var o=N.info.currentUrl(),a=!1;if(e==="full-url"?a=o!==t:e==="url-with-path-and-query-string"?a=o.split("#")[0]!==t.split("#")[0]:e==="url-with-path"&&(a=o.split("#")[0].split("?")[0]!==t.split("#")[0].split("?")[0]),a){var l=this.track_pageview();l&&(t=o)}}).bind(this))}};B.prototype._prepare_callback=function(e,t){if(N.isUndefined(e))return null;if(or){var r=function(a){e(a,t)};return r}else{var n=this._jsc,s=""+Math.floor(Math.random()*1e8),o=this.get_config("callback_fn")+"["+s+"]";return n[s]=function(a){delete n[s],e(a,t)},o}};B.prototype._send_request=function(e,t,r,n){var s=!0;if(va)return this.__request_queue.push(arguments),s;var o={method:this.get_config("api_method"),transport:this.get_config("api_transport"),verbose
vendor: 8,029 bytes, line 37
37:this.get_config("verbose")},a=null;!n&&(N.isFunction(r)||typeof r=="string")&&(n=r,r=null),r=N.extend(o,r||{}),or||(r.method="GET");var l=r.method==="POST",c=bn&&l&&r.transport.toLowerCase()==="sendbeacon",f=r.verbose;t.verbose&&(f=!0),this.get_config("test")&&(t.test=1),f&&(t.verbose=1),this.get_config("img")&&(t.img=1),or||(n?t.callback=n:(f||this.get_config("test"))&&(t.callback="(function(){})")),t.ip=this.get_config("ip")?1:0,t._=new Date().getTime().toString(),l&&(a="data="+encodeURIComponent(t.data),delete t.data),e+="?"+N.HTTPBuildQuery(t);var u=this;if("img"in t){var p=ge.createElement("img");p.src=e,ge.body.appendChild(p)}else if(c){try{s=bn(e,a)}catch(C){u.report_error(C),s=!1}try{n&&n(s?1:0)}catch(C){u.report_error(C)}}else if(or)try{var h=new XMLHttpRequest;h.open(r.method,e,!0);var v=this.get_config("xhr_headers");if(l&&(v["Content-Type"]="application/x-www-form-urlencoded"),N.each(v,function(C,I){h.setRequestHeader(I,C)}),r.timeout_ms&&typeof h.timeout<"u"){h.timeout=r.timeout_ms;var g=new Date().getTime()}h.withCredentials=!0,h.onreadystatechange=function(){if(h.readyState===4)if(h.status===200){if(n)if(f){var C;try{C=N.JSONDecode(h.responseText)}catch(k){if(u.report_error(k),r.ignore_json_errors)C=h.responseText;else return}n(C)}else n(Number(h.responseText))}else{var I;if(h.timeout&&!h.status&&new Date().getTime()-g>=h.timeout?I="timeout":I="Bad HTTP status: "+h.status+" "+h.statusText,u.report_error(I),n)if(f){var S=h.responseHeaders||{};n({status:0,httpStatusCode:h.status,error:I,retryAfter:S["Retry-After"]})}else n(0)}},h.send(a)}catch(C){u.report_error(C),s=!1}else{var m=ge.createElement("script");m.type="text/javascript",m.async=!0,m.defer=!0,m.src=e;var y=ge.getElementsByTagName("script")[0];y.parentNode.insertBefore(m,y)}return s};B.prototype._execute_array=function(e){var t,r=[],n=[],s=[];N.each(e,function(a){a&&(t=a[0],N.isArray(t)?s.push(a):typeof a=="function"?a.call(this):N.isArray(a)&&t==="alias"?r.push(a):N.isArray(a)&&t.indexOf("track")!==-1&&typeof this[t]=="function"?s.push(a):n.push(a))},this);var o=function(a,l){N.each(a,function(c){if(N.isArray(c[0])){var f=l;N.each(c,function(u){f=f[u[0]].apply(f,u.slice(1))})}else this[c[0]].apply(this,c.slice(1))},l)};o(r,this),o(n,this),o(s,this)};B.prototype.are_batchers_initialized=function(){return!!this.request_batchers.events};B.prototype.get_batcher_configs=function(){var e="__mpq_"+this.get_config("token"),t=this.get_config("api_routes");return this._batcher_configs=this._batcher_configs||{events:{type:"events",endpoint:"/"+t.track,queue_key:e+"_ev"},people:{type:"people",endpoint:"/"+t.engage,queue_key:e+"_pp"},groups:{type:"groups",endpoint:"/"+t.groups,queue_key:e+"_gr"}},this._batcher_configs};B.prototype.init_batchers=function(){if(!this.are_batchers_initialized()){var e=N.bind(function(r){return new lt(r.queue_key,{libConfig:this.config,errorReporter:this.get_config("error_reporter"),sendRequestFunc:N.bind(function(n,s,o){this._send_request(this.get_config("api_host")+r.endpoint,this._encode_data_for_request(n),s,this._prepare_callback(o,n))},this),beforeSendHook:N.bind(function(n){return this._run_hook("before_send_"+r.type,n)},this),stopAllBatchingFunc:N.bind(this.stop_batch_senders,this),usePersistence:!0})},this),t=this.get_batcher_configs();this.request_batchers={events:e(t.events),people:e(t.people),groups:e(t.groups)}}this.get_config("batch_autostart")&&this.start_batch_senders()};B.prototype.start_batch_senders=function(){this._batchers_were_started=!0,this.are_batchers_initialized()&&(this._batch_requests=!0,N.each(this.request_batchers,function(e){e.start()}))};B.prototype.stop_batch_senders=function(){this._batch_requests=!1,N.each(this.request_batchers,function(e){e.stop(),e.clear()})};B.prototype.push=function(e){this._execute_array([e])};B.prototype.disable=function(e){typeof e>"u"?this._flags.disable_all_events=!0:this.__disabled_events=this.__disabled_events.concat(e)};B.prototype._encode_data_for_request=function(e){var t=N.JSONEncode(e);return this.get_config("api_payload_format")===xa&&(t=N.base64Encode(t)),{data:t}};B.prototype._track_or_batch=function(e,t){var r=N.truncate(e.data,255),n=e.endpoint,s=e.batcher,o=e.should_send_immediately,a=e.send_request_options||{};t=t||Dr;var l=!0,c=N.bind(function(){return a.skip_hooks||(r=this._run_hook("before_send_"+e.type,r)),r?(fe.log("MIXPANEL REQUEST:"),fe.log(r),this._send_request(n,this._encode_data_for_request(r),a,this._prepare_callback(t,r))):null},this);return this._batch_requests&&!o?s.enqueue(r,function(f){f?t(1,r):c()}):l=c(),l&&r};B.prototype.track=Ut(function(e,t,r,n){!n&&typeof r=="function"&&(n=r,r=null),r=r||{};var s=r.transport;s&&(r.transport=s);var o=r.send_immediately;if(typeof n!="function"&&(n=Dr),N.isUndefined(e)){this.report_error("No event name provided to mixpanel.track");return}if(this._event_is_disabled(e)){n(0);return}t=N.extend({},t),t.token=this.get_config("token");var a=this.persistence.remove_event_timer(e);if(!N.isUndefined(a)){var l=new Date().getTime()-a;t.$duration=parseFloat((l/1e3).toFixed(3))}this._set_default_superprops();var c=this.get_config("track_marketing")?N.info.marketingParams():{};t=N.extend({},N.info.properties({mp_loader:this.get_config("mp_loader")}),c,this.persistence.properties(),this.unpersisted_superprops,this.get_session_recording_properties(),t);var f=this.get_config("property_blacklist");N.isArray(f)?N.each(f,function(h){delete t[h]}):this.report_error("Invalid value for property_blacklist config: "+f);var u={event:e,properties:t},p=this._track_or_batch({type:"events",data:u,endpoint:this.get_config("api_host")+"/"+this.get_config("api_routes").track,batcher:this.request_batchers.events,should_send_immediately:o,send_request_options:r},n);return p});B.prototype.set_group=Ut(function(e,t,r){N.isArray(t)||(t=[t]);var n={};return n[e]=t,this.register(n),this.people.set(e,t,r)});B.prototype.add_group=Ut(function(e,t,r){var n=this.get_property(e),s={};return n===void 0?(s[e]=[t],this.register(s)):n.indexOf(t)===-1&&(n.push(t),s[e]=n,this.register(s)),this.people.union(e,t,r)});B.prototype.remove_group=Ut(function(e,t,r){var n=this.get_property(e);if(n!==void 0){var s=n.indexOf(t);s>-1&&(n.splice(s,1),this.register({group_key:n})),n.length===0&&this.unregister(e)}return this.people.remove(e,t,r)});B.prototype.track_with_groups=Ut(function(e,t,r,n){var s=N.extend({},t||{});return N.each(r,function(o,a){o!=null&&(s[a]=o)}),this.track(e,s,n)});B.prototype._create_map_key=function(e,t){return e+"_"+JSON.stringify(t)};B.prototype._remove_group_from_cache=function(e,t){delete this._cached_groups[this._create_map_key(e,t)]};B.prototype.get_group=function(e,t){var r=this._create_map_key(e,t),n=this._cached_groups[r];return(n===void 0||n._group_key!==e||n._group_id!==t)&&(n=new be,n._init(this,e,t),this._cached_groups[r]=n),n};B.prototype.track_pageview=Ut(function(e,t){typeof e!="object"&&(e={}),t=t||{};var r=t.event_name||"$mp_web_page_view",n=N.extend(N.info.mpPageViewProperties(),N.info.campaignParams(),N.info.clickParams()),s=N.extend({},n,e);return this.track(r,s)});B.prototype.track_links=function(){return this._track_dom.call(this,ar,arguments)};B.prototype.track_forms=function(){return this._track_dom.call(this,In,arguments)};B.prototype.time_event=function(e){if(N.isUndefined(e)){this.report_error("No event name provided to mixpanel.time_event");return}this._event_is_disabled(e)||this.persistence.set_event_timer(e,new Date().getTime())};var Pu={persistent:!0},qs=function(e){var t;return N.isObject(e)?t=e:N.isUndefined(e)?t={}:t={days:e},N.extend({},Pu,t)};B.prototype.register=function(e,t){var r=qs(t);r.persistent?this.persistence.register(e,r.days):N.extend(this.unpersisted_superprops,e)};B.prototype.register_once=function(e,t,r){var n=qs(r);n.persistent?this.persistence.register_once(e,t,n.days):(typeof t>"u"&&(t="None"),N.each(e,function(s,o){(!this.unpersisted_superprops.hasOwnProperty(o)||this.unpersisted_superprops[o]===t)&&(this.unpersisted_superprops[o]=s)},this))};
37B.prototype.unregister=function(e,t){t=qs(t),t.persistent?this.persistence.unregister(e):delete this.unpersisted_superprops[e]};B.prototype._register_single=function(e,t){var r={};r[e]=t,this.register(r)};B.prototype.identify=function(e,t,r,n,s,o,a,l){var c=this.get_distinct_id();if(e&&c!==e){if(typeof e=="string"&&e.indexOf(Hs)===0)return this.report_error("distinct_id cannot have $device: prefix"),-1;this.register({$user_id:e})}if(!this.get_property("$device_id")){var f=c;this.register_once({$had_persisted_distinct_id:!0,$device_id:f},"")}e!==c&&e!==this.get_property(vn)&&(this.unregister(vn),this.register({distinct_id:e})),this._flags.identify_called=!0,this.people._flush(t,r,n,s,o,a,l),e!==c&&this.track("$identify",{distinct_id:e,$anon_distinct_id:c},{skip_hooks:!0})};B.prototype.reset=function(){this.persistence.clear(),this._flags.identify_called=!1;var e=N.UUID();this.register_once({distinct_id:Hs+e,$device_id:e},"")};B.prototype.get_distinct_id=function(){return this.get_property("distinct_id")};B.prototype.alias=function(e,t){if(e===this.get_property(ma))return this.report_error("Attempting to create alias for existing People user - aborting."),-2;var r=this;return N.isUndefined(t)&&(t=this.get_distinct_id()),e!==t?(this._register_single(vn,e),this.track("$create_alias",{alias:e,distinct_id:t},{skip_hooks:!0},function(){r.identify(e)})):(this.report_error("alias matches current distinct_id - skipping api call."),this.identify(e),-1)};B.prototype.name_tag=function(e){this._register_single("mp_name_tag",e)};B.prototype.set_config=function(e){if(N.isObject(e)){N.extend(this.config,e);var t=e.batch_size;t&&N.each(this.request_batchers,function(r){r.resetBatchSize()}),this.get_config("persistence_name")||(this.config.persistence_name=this.config.cookie_name),this.get_config("disable_persistence")||(this.config.disable_persistence=this.config.disable_cookie),this.persistence&&this.persistence.update_config(this.config),vt.DEBUG=vt.DEBUG||this.get_config("debug")}};B.prototype.get_config=function(e){return this.config[e]};B.prototype._run_hook=function(e){var t=(this.config.hooks[e]||Ru).apply(this,Ot.call(arguments,1));return typeof t>"u"&&(this.report_error(e+" hook did not return a value"),t=null),t};B.prototype.get_property=function(e){return this.persistence.load_prop([e])};B.prototype.toString=function(){var e=this.get_config("name");return e!==Xe&&(e=Xe+"."+e),e};B.prototype._event_is_disabled=function(e){return N.isBlockedUA(ft)||this._flags.disable_all_events||N.include(this.__disabled_events,e)};B.prototype._gdpr_init=function(){var e=this.get_config("opt_out_tracking_persistence_type")==="localStorage";e&&N.localStorage.is_supported()&&(!this.has_opted_in_tracking()&&this.has_opted_in_tracking({persistence_type:"cookie"})&&this.opt_in_tracking({enable_persistence:!1}),!this.has_opted_out_tracking()&&this.has_opted_out_tracking({persistence_type:"cookie"})&&this.opt_out_tracking({clear_persistence:!1}),this.clear_opt_in_out_tracking({persistence_type:"cookie",enable_persistence:!1})),this.has_opted_out_tracking()?this._gdpr_update_persistence({clear_persistence:!0}):!this.has_opted_in_tracking()&&(this.get_config("opt_out_tracking_by_default")||N.cookie.get("mp_optout"))&&(N.cookie.remove("mp_optout"),this.opt_out_tracking({clear_persistence:this.get_config("opt_out_persistence_by_default")}))};B.prototype._gdpr_update_persistence=function(e){var t;if(e&&e.clear_persistence)t=!0;else if(e&&e.enable_persistence)t=!1;else return;!this.get_config("disable_persistence")&&this.persistence.disabled!==t&&this.persistence.set_disabled(t),t?this.stop_batch_senders():this._batchers_were_started&&this.start_batch_senders()};B.prototype._gdpr_call_func=function(e,t){return t=N.extend({track:N.bind(this.track,this),persistence_type:this.get_config("opt_out_tracking_persistence_type"),cookie_prefix:this.get_config("opt_out_tracking_cookie_prefix"),cookie_expiration:this.get_config("cookie_expiration"),cross_site_cookie:this.get_config("cross_site_cookie"),cross_subdomain_cookie:this.get_config("cross_subdomain_cookie"),cookie_domain:this.get_config("cookie_domain"),secure_cookie:this.get_config("secure_cookie"),ignore_dnt:this.get_config("ignore_dnt")},t),N.localStorage.is_supported()||(t.persistence_type="cookie"),e(this.get_config("token"),{track:t.track,trackEventName:t.track_event_name,trackProperties:t.track_properties,persistenceType:t.persistence_type,persistencePrefix:t.cookie_prefix,cookieDomain:t.cookie_domain,cookieExpiration:t.cookie_expiration,crossSiteCookie
37:t.cross_site_cookie,crossSubdomainCookie:t.cross_subdomain_cookie,secureCookie:t.secure_cookie,ignoreDnt:t.ignore_dnt})};B.prototype.opt_in_tracking=function(e){e=N.extend({enable_persistence:!0},e),this._gdpr_call_func(_u,e),this._gdpr_update_persistence(e)};B.prototype.opt_out_tracking=function(e){e=N.extend({clear_persistence:!0,delete_user:!0},e),e.delete_user&&this.people&&this.people._identify_called()&&(this.people.delete_user(),this.people.clear_charges()),this._gdpr_call_func(Su,e),this._gdpr_update_persistence(e)};B.prototype.has_opted_in_tracking=function(e){return this._gdpr_call_func(Nu,e)};B.prototype.has_opted_out_tracking=function(e){return this._gdpr_call_func(ua,e)};B.prototype.clear_opt_in_out_tracking=function(e){e=N.extend({enable_persistence:!0},e),this._gdpr_call_func(ju,e),this._gdpr_update_persistence(e)};B.prototype.report_error=function(e,t){fe.error.apply(fe.error,arguments);try{!t&&!(e instanceof Error)&&(e=new Error(e)),this.get_config("error_reporter")(e,t)}catch(r){fe.error(r)}};B.prototype.init=B.prototype.init;B.prototype.reset=B.prototype.reset;B.prototype.disable=B.prototype.disable;B.prototype.time_event=B.prototype.time_event;B.prototype.track=B.prototype.track;B.prototype.track_links=B.prototype.track_links;B.prototype.track_forms=B.prototype.track_forms;B.prototype.track_pageview=B.prototype.track_pageview;B.prototype.register=B.prototype.register;B.prototype.register_once=B.prototype.register_once;B.prototype.unregister=B.prototype.unregister;B.prototype.identify=B.prototype.identify;B.prototype.alias=B.prototype.alias;B.prototype.name_tag=B.prototype.name_tag;B.prototype.set_config=B.prototype.set_config;B.prototype.get_config=B.prototype.get_config;B.prototype.get_property=B.prototype.get_property;B.prototype.get_distinct_id=B.prototype.get_distinct_id;B.prototype.toString=B.prototype.toString;B.prototype.opt_out_tracking=B.prototype.opt_out_tracking;B.prototype.opt_in_tracking=B.prototype.opt_in_tracking;B.prototype.has_opted_out_tracking=B.prototype.has_opted_out_tracking;B.prototype.has_opted_in_tracking=B.prototype.has_opted_in_tracking;B.prototype.clear_opt_in_out_tracking=B.prototype.clear_opt_in_out_tracking;B.prototype.get_group=B.prototype.get_group;B.prototype.set_group=B.prototype.set_group;B.prototype.add_group=B.prototype.add_group;B.prototype.remove_group=B.prototype.remove_group;B.prototype.track_with_groups=B.prototype.track_with_groups;B.prototype.start_batch_senders=B.prototype.start_batch_senders;B.prototype.stop_batch_senders=B.prototype.stop_batch_senders;B.prototype.start_session_recording=B.prototype.start_session_recording;B.prototype.stop_session_recording=B.prototype.stop_session_recording;B.prototype.get_session_recording_properties=B.prototype.get_session_recording_properties;B.prototype.DEFAULT_API_ROUTES=ba;ie.prototype.properties=ie.prototype.properties;ie.prototype.update_search_keyword=ie.prototype.update_search_keyword;ie.prototype.update_referrer_info=ie.prototype.update_referrer_info;ie.prototype.get_cross_subdomain=ie.prototype.get_cross_subdomain;ie.prototype.clear=ie.prototype.clear;var sr={},$u=function(){N.each(sr,function(e,t){t!==Xe&&(qe[t]=e)}),qe._=N},Fu=function(){qe.init=function(e,t,r){if(r)return qe[r]||(qe[r]=sr[r]=hs(e,t,r),qe[r]._loaded()),qe[r];var n=qe;sr[Xe]?n=sr[Xe]:e&&(n=hs(e,t,Xe),n._loaded(),sr[Xe]=n),qe=n,Bs===Au&&(se[Xe]=qe),$u()}},Uu=function(){function e(){e.done||(e.done=!0,wa=!0,va=!1,N.each(sr,function(n){n._dom_loaded()}))}function t(){try{ge.documentElement.doScroll("left")}catch{setTimeout(t,1);return}e()}if(ge.addEventListener)ge.readyState==="complete"?e():ge.addEventListener("DOMContentLoaded",e,!1);else if(ge.attachEvent){ge.attachEvent("onreadystatechange",e);var r=!1;try{r=se.frameElement===null}catch{}ge.documentElement.doScroll&&r&&t()}N.register_event(se,"load",e,!0)};function Bu(e){return ga=e,Bs=ya,qe=new B,Fu(),qe.init(),Uu(),qe}function Hu(e,t){t()}var ze=Bu(Hu);function Xr(e){throw new Error('Could not dynamically require "'+e+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}function Fe(){return Ie().isMultiStoreEnabled??!1}const _a=d.createContext(void 0),qu=({children:e})=>{var _;const t=Fe(),r=Ie(),n=t&&"selectedStore"in r?r.selectedStore??null:null,s=t&&"storeCoordinates"in r?r.storeCoordinates??null:null,[o,a]=d.useState(n),[l,c]=d.use
37State(s),[f,u]=d.useState(!1),p=d.useRef(s),h=d.useRef(0),v=d.useRef(null),g=Al(),m=d.useCallback(async x=>{var L;const j=h.current+1;h.current=j,(L=v.current)==null||L.abort();const M=new AbortController;v.current=M;const $=new FormData;for(const[P,R]of Object.entries(x))$.set(P,R);try{const P=await fetch("/api/store/session",{method:"POST",body:$,credentials:"same-origin",signal:M.signal});if(!(h.current===j))return!1;if(!P.ok){const H=await P.text().catch(()=>P.statusText);return console.error("[StoreContext] Failed to persist store selection",{status:P.status,details:H}),!1}return!0}catch(P){return(P==null?void 0:P.name)==="AbortError"||console.error("[StoreContext] Failed to persist store selection",P),!1}finally{v.current===M&&(v.current=null)}},[]),y=d.useCallback(x=>({storeId:x.storeId,storeName:x.storeName,fulfillmentTypes:x.fulfillmentTypes.join(","),isOpen:String(x.isOpen)}),[]),C=d.useCallback(()=>{var x;(x=v.current)==null||x.abort(),h.current+=1},[]),I="selectedStore"in r?(_=r.selectedStore)==null?void 0:_.isOpen:void 0,S=o==null?void 0:o.storeId,k=o==null?void 0:o.isOpen;d.useEffect(()=>{!S||!t||I===void 0||I!==k&&a(x=>x&&{...x,isOpen:I})},[I,S,k,t]);const O=d.useCallback(async(x,j={persist:!0})=>{if(!t)return!1;const M={action:"select",...y(x)};if(p.current&&(M.latitude=String(p.current.latitude),M.longitude=String(p.current.longitude)),j.persist!==!1){if(!await m(M))return!1}else C();return a(x),g.revalidate(),!0},[y,C,t,g,m]),w=d.useCallback(x=>{if(!t||(c(x),p.current=x,!x))return;const j={action:"coordinates",latitude:String(x.latitude),longitude:String(x.longitude)};o&&Object.assign(j,y(o)),m(j).then(M=>{M&&g.revalidate()})},[y,t,g,o,m]),T=d.useCallback(()=>{t&&u(!0)},[t]),b=d.useCallback(()=>u(!1),[]);return i.jsx(_a.Provider,{value:{selectedStore:o,coordinates:l,selectStore:O,setCoordinates:w,cancelPendingStoreSession:C,isSelectorOpen:f,openSelector:T,closeSelector:b},children:e})},Ue=()=>{const e=d.useContext(_a);if(e===void 0)throw new Error("useStore must be used within a StoreProvider");return e};var zu=Object.defineProperty,Wu=(e,t,r)=>t in e?zu(e,t,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[t]=r,Jn=(e,t,r)=>(Wu(e,typeof t!="symbol"?t+"":t,r),r);let Gu=class{constructor(){Jn(this,"current",this.detect()),Jn(this,"handoffState","pending"),Jn(this,"currentId",0)}set(t){this.current!==t&&(this.handoffState="pending",this.currentId=0,this.current=t)}reset(){this.set(this.detect())}nextId(){return++this.currentId}get isServer(){return this.current==="server"}get isClient(){return this.current==="client"}detect(){return typeof window>"u"||typeof document>"u"?"server":"client"}handoff(){this.handoffState==="pending"&&(this.handoffState="complete")}get isHandoffComplete(){return this.handoffState==="complete"}},wt=new Gu,Re=(e,t)=>{wt.isServer?d.useEffect(e,t):d.useLayoutEffect(e,t)};function ot(e){let t=d.useRef(e);return Re(()=>{t.current=e},[e]),t}let ee=function(e){let t=ot(e);return X.useCallback((...r)=>t.current(...r),[t])};function Yu(e,t,r){let[n,s]=d.useState(r),o=e!==void 0,a=d.useRef(o),l=d.useRef(!1),c=d.useRef(!1);return o&&!a.current&&!l.current?(l.current=!0,a.current=o,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")):!o&&a.current&&!c.current&&(c.current=!0,a.current=o,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")),[o?e:n,ee(f=>(o||s(f),t==null?void 0:t(f)))]}function Mn(e){typeof queueMicrotask=="function"?queueMicrotask(e):Promise.resolve().then(e).catch(t=>setTimeout(()=>{throw t}))}function at(){let e=[],t={addEventListener(r,n,s,o){return r.addEventListener(n,s,o),t.add(()=>r.removeEventListener(n,s,o))},requestAnimationFrame(...r){let n=requestAnimationFrame(...r);return t.add(()=>cancelAnimationFrame(n))},nextFrame(...r){return t.requestAnimationFrame(()=>t.requestAnimationFrame(...r))},setTimeout(...r){let n=setTimeout(...r);return t.add(()=>clearTimeout(n))},microTask(...r){let n={current:!0};return Mn(()=>{n.current&&r[0]()}),t.add(()=>{n.current=!1})},style(r,n,s){let o=r.style.getPropertyValue(n);return Object.assign(r.style,{[n]:s}
37),this.add(()=>{Object.assign(r.style,{[n]:o})})},group(r){let n=at();return r(n),this.add(()=>n.dispose())},add(r){return e.push(r),()=>{let n=e.indexOf(r);if(n>=0)for(let s of e.splice(n,1))s()}},dispose(){for(let r of e.splice(0))r()}};return t}function pr(){let[e]=d.useState(at);return d.useEffect(()=>()=>e.dispose(),[e]),e}function Vu(){let e=typeof document>"u";return"useSyncExternalStore"in kr?(t=>t.useSyncExternalStore)(kr)(()=>()=>{},()=>!1,()=>!e):!1}function hr(){let e=Vu(),[t,r]=d.useState(wt.isHandoffComplete);return t&&wt.isHandoffComplete===!1&&r(!1),d.useEffect(()=>{t!==!0&&r(!0)},[t]),d.useEffect(()=>wt.handoff(),[]),e?!1:t}var ai;let $e=(ai=X.useId)!=null?ai:function(){let e=hr(),[t,r]=X.useState(e?()=>wt.nextId():null);return Re(()=>{t===null&&r(wt.nextId())},[t]),t!=null?""+t:void 0};function ve(e,t,...r){if(e in t){let s=t[e];return typeof s=="function"?s(...r):s}let n=new Error(`Tried to handle "${e}" but there is no handler defined. Only defined handlers are: ${Object.keys(t).map(s=>`"${s}"`).join(", ")}.`);throw Error.captureStackTrace&&Error.captureStackTrace(n,ve),n}function qr(e){return wt.isServer?null:e instanceof Node?e.ownerDocument:e!=null&&e.hasOwnProperty("current")&&e.current instanceof Node?e.current.ownerDocument:document}let ms=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var Pe=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(Pe||{}),Ar=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(Ar||{}),Qu=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(Qu||{});function zr(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(ms)).sort((t,r)=>Math.sign((t.tabIndex||Number.MAX_SAFE_INTEGER)-(r.tabIndex||Number.MAX_SAFE_INTEGER)))}var Tn=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(Tn||{});function On(e,t=0){var r;return e===((r=qr(e))==null?void 0:r.body)?!1:ve(t,{0(){return e.matches(ms)},1(){let n=e;for(;n!==null;){if(n.matches(ms))return!0;n=n.parentElement}return!1}})}function Sa(e){let t=qr(e);at().nextFrame(()=>{t&&!On(t.activeElement,0)&&Rt(e)})}var Ku=(e=>(e[e.Keyboard=0]="Keyboard",e[e.Mouse=1]="Mouse",e))(Ku||{});typeof window<"u"&&typeof document<"u"&&(document.addEventListener("keydown",e=>{e.metaKey||e.altKey||e.ctrlKey||(document.documentElement.dataset.headlessuiFocusVisible="")},!0),document.addEventListener("click",e=>{e.detail===1?delete document.documentElement.dataset.headlessuiFocusVisible:e.detail===0&&(document.documentElement.dataset.headlessuiFocusVisible="")},!0));function Rt(e){e==null||e.focus({preventScroll:!0})}let Zu=["textarea","input"].join(",");function Ju(e){var t,r;return(r=(t=e==null?void 0:e.matches)==null?void 0:t.call(e,Zu))!=null?r:!1}function Na(e,t=r=>r){return e.slice().sort((r,n)=>{let s=t(r),o=t(n);if(s===null||o===null)return 0;let a=s.compareDocumentPosition(o);return a&Node.DOCUMENT_POSITION_FOLLOWING?-1:a&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function Xu(e,t){return et(zr(),t,{relativeTo:e})}function et(e,t,{sorted:r=!0,relativeTo:n=null,skipElements:s=[]}={}){let o=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e.ownerDocument,a=Array.isArray(e)?r?Na(e):e:zr(e);s.length>0&&a.length>1&&(a=a.filter(v=>!s.includes(v))),n=n??o.activeElement;let l=(()=>{if(t&5)return 1;if(t&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),c=(()=>{if(t&1)return 0;if(t&2)return Math.max(0,a.indexOf(n))-1;if(t&4)return Math.max(0,a.indexOf(n))+1;if(t&8)return a.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),f=t&32?{preventScroll:!0}:{},u=0,p=a.length,h;do{if(u>=p||u+p<=0)return 0;let v=c+u;if(t&16)v=(v+p)%p;else{if(v<0)return 3;if(v>=p)return 1}h=a[v],h==null||h.focus(f),u+=l}while(h!==o.activeElement);return t&6&&Ju(h)&&h.select(),2}function ja(){return/iPhone/gi.test(window.navigator.platform)||/Mac/gi.test(window.navigator.platform)&&window.navigator.maxTouchPoints>0}function ed(){return/Android/gi.test(window.navigator.userAgent)}function td(){return ja()||ed()}function en(e,t,r){let n=ot(t);d.useEffect(()=>{function s(o){n.current(o)}return document.addEventListener(e,s,r),()=>document.removeEventListener(e,s,r)},[e,r])}function Ca(e,t,r){let n=ot(t);d.useEffect(()=>{function s(o){n.current(o)}return window.addEventListener(e,s,r),()=>window.removeEventListener(e,s,r)},[e,r])}function zs(e,t,r=!0){let n=d.useRef(!1);d.useEffect(()=>{requestAnimationFrame(()=>{n.current=r})},[r]);function s(a,l){if(!n.current||a.defaultPrevented)return;let c=l(a);if(c===null||!c.getRootNode().contains(c)||!c.isConnected)return;let f=function u(p){return typeof p=="function"?u(p()):Array.isArray(p)||p instanceof Set?p:[p]}(e);for(let u of f){if(u===null)continue;let p=u instanceof HTMLElement?u:u.current;if(p!=null&&p.contains(c)||a.composed&&a.composedPath().includes(p))return}return!On(c,Tn.Loose)&&c.tabIndex!==-1&&a.preventDefault(),t(a,c)}let o=d.useRef(null);en("pointerdown",a=>{var l,c;n.current&&(o.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),en("mousedown",a=>{var l,c;n.current&&(o.current=((c=(l=a.composedPath)==null?void 0:l.call(a))==null?void 0:c[0])||a.target)},!0),en("click",a=>{td()||o.current&&(s(a,()=>o.current),o.current=null)},!0),en("touchend",a=>s(a,()=>a.target instanceof HTMLElement?a.target:null),!0),Ca("blur",a=>s(a,()=>window.document.activeElement instanceof HTMLIFrameElement?window.document.activeElement:null),!0)}function Ct(...e){return d.useMemo(()=>qr(...e),[...e])}function li(e){var t;if(e.type)return e.type;let r=(t=e.as)!=null?t:"button";if(typeof r=="string"&&r.toLowerCase()==="button")return"button"}
37function Ws(e,t){let[r,n]=d.useState(()=>li(e));return Re(()=>{n(li(e))},[e.type,e.as]),Re(()=>{r||t.current&&t.current instanceof HTMLButtonElement&&!t.current.hasAttribute("type")&&n("button")},[r,t]),r}let Ea=Symbol();function ka(e,t=!0){return Object.assign(e,{[Ea]:t})}function Ee(...e){let t=d.useRef(e);d.useEffect(()=>{t.current=e},[e]);let r=ee(n=>{for(let s of t.current)s!=null&&(typeof s=="function"?s(n):s.current=n)});return e.every(n=>n==null||(n==null?void 0:n[Ea]))?void 0:r}function ci(e){return[e.screenX,e.screenY]}function rd(){let e=d.useRef([-1,-1]);return{wasMoved(t){let r=ci(t);return e.current[0]===r[0]&&e.current[1]===r[1]?!1:(e.current=r,!0)},update(t){e.current=ci(t)}}}function nd({container:e,accept:t,walk:r,enabled:n=!0}){let s=d.useRef(t),o=d.useRef(r);d.useEffect(()=>{s.current=t,o.current=r},[t,r]),Re(()=>{if(!e||!n)return;let a=qr(e);if(!a)return;let l=s.current,c=o.current,f=Object.assign(p=>l(p),{acceptNode:l}),u=a.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,f,!1);for(;u.nextNode();)c(u.currentNode)},[e,n,s,o])}function Gs(e,t){let r=d.useRef([]),n=ee(e);d.useEffect(()=>{let s=[...r.current];for(let[o,a]of t.entries())if(r.current[o]!==a){let l=n(t,s);return r.current=t,l}},[n,...t])}function wn(...e){return Array.from(new Set(e.flatMap(t=>typeof t=="string"?t.split(" "):[]))).filter(Boolean).join(" ")}var mt=(e=>(e[e.None=0]="None",e[e.RenderStrategy=1]="RenderStrategy",e[e.Static=2]="Static",e))(mt||{}),At=(e=>(e[e.Unmount=0]="Unmount",e[e.Hidden=1]="Hidden",e))(At||{});function Se({ourProps:e,theirProps:t,slot:r,defaultTag:n,features:s,visible:o=!0,name:a,mergeRefs:l}){l=l??od;let c=Ia(t,e);if(o)return tn(c,r,n,a,l);let f=s??0;if(f&2){let{static:u=!1,...p}=c;if(u)return tn(p,r,n,a,l)}if(f&1){let{unmount:u=!0,...p}=c;return ve(u?0:1,{0(){return null},1(){return tn({...p,hidden:!0,style:{display:"none"}},r,n,a,l)}})}return tn(c,r,n,a,l)}function tn(e,t={},r,n,s){let{as:o=r,children:a,refName:l="ref",...c}=Xn(e,["unmount","static"]),f=e.ref!==void 0?{[l]:e.ref}:{},u=typeof a=="function"?a(t):a;"className"in c&&c.className&&typeof c.className=="function"&&(c.className=c.className(t));let p={};if(t){let h=!1,v=[];for(let[g,m]of Object.entries(t))typeof m=="boolean"&&(h=!0),m===!0&&v.push(g);h&&(p["data-headlessui-state"]=v.join(" "))}if(o===d.Fragment&&Object.keys(gs(c)).length>0){if(!d.isValidElement(u)||Array.isArray(u)&&u.length>1)throw new Error(['Passing props on "Fragment"!',"",`The current component <${n} /> is rendering a "Fragment".`,"However we need to passthrough the following props:",Object.keys(c).map(m=>` - ${m}`).join(` 38`),"","You can apply a few solutions:",['Add an `as="..."` prop, to ensure that we render an actual element instead of a "Fragment".',"Render a single element as the child so that we can forward the props onto that element."].map(m=>` - ${m}`).join(` 39`)].join(` 40`));let h=u.props,v=typeof(h==null?void 0:h.className)=="function"?(...m)=>wn(h==null?void 0:h.className(...m),c.className):wn(h==null?void 0:h.className,c.className),g=v?{className:v}:{};return d.cloneElement(u,Object.assign({},Ia(u.props,gs(Xn(c,["ref"]))),p,f,{ref:s(u.ref,f.ref)},g))}return d.createElement(o,Object.assign({},Xn(c,["ref"]),o!==d.Fragment&&f,o!==d.Fragment&&p),u)}function sd(){let e=d.useRef([]),t=d.useCallback(r=>{for(let n of e.current)n!=null&&(typeof n=="function"?n(r):n.current=r)},[]);return(...r)=>{if(!r.every(n=>n==null))return e.current=r,t}}function od(...e){return e.every(t=>t==null)?void 0:t=>{for(let r of e)r!=null&&(typeof r=="function"?r(t):r.current=t)}}function Ia(...e){if(e.length===0)return{};if(e.length===1)return e[0];let t={},r={};for(let n of e)for(let s in n)s.startsWith("on")&&typeof n[s]=="function"?(r[s]!=null||(r[s]=[]),r[s].push(n[s])):t[s]=n[s];if(t.disabled||t["aria-disabled"])return Object.assign(t,Object.fromEntries(Object.keys(r).map(n=>[n,void 0])));for(let n in r)Object.assign(t,{[n](s,...o){let a=r[n];for(let l of a){if((s instanceof Event||(s==null?void 0:s.nativeEvent)instanceof Event)&&s.defaultPrevented)return;l(s,...o)}}});return t}function Ne(e){var t;return Object.assign(d.forwardRef(e),{displayName:(t=e.displayName)!=null?t:e.name})}function gs(e){let t=Object.assign({},e);for(let r in t)t[r]===void 0&&delete t[r];return t}function Xn(e,t=[]){let r=Object.assign({},e);for(let n of t)n in r&&delete r[n];return r}let id="div";var _t=(e=>(e[e.None=1]="None",e[e.Focusable=2]="Focusable",e[e.Hidden=4]="Hidden",e))(_t||{});function ad(e,t){var r;let{features:n=1,...s}=e,o={ref:t,"aria-hidden":(n&2)===2?!0:(r=s["aria-hidden"])!=null?r:void 0,hidden:(n&4)===4?!0:void 0,style:{position:"fixed",top:1,left:1,width:1,height:0,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",borderWidth:"0",...(n&4)===4&&(n&2)!==2&&{display:"none"}}};return Se({ourProps:o,theirProps:s,slot:{},defaultTag:id,name:"Hidden"})}let $t=Ne(ad),Ys=d.createContext(null);Ys.displayName="OpenClosedContext";var Ce=(e=>(e[e.Open=1]="Open",e[e.Closed=2]="Closed",e[e.Closing=4]="Closing",e[e.Opening=8]="Opening",e))(Ce||{});function mr(){return d.useContext(Ys)}function Vs({value:e,children:t}){return X.createElement(Ys.Provider,{value:e},t)}function ld(e){function t(){document.readyState!=="loading"&&(e(),document.removeEventListener("DOMContentLoaded",t))}typeof window<"u"&&typeof document<"u"&&(document.addEventListener("DOMContentLoaded",t),t())}let It=[];ld(()=>{function e(t){t.target instanceof HTMLElement&&t.target!==document.body&&It[0]!==t.target&&(It.unshift(t.target),It=It.filter(r=>r!=null&&r.isConnected),It.splice(10))}window.addEventListener("click",e,{capture:!0}),window.addEventListener("mousedown",e,{capture:!0}),window.addEventListener("focus",e,{capture:!0}),document.body.addEventListener("click",e,{capture:!0}),document.body.addEventListener("mousedown",e,{capture:!0}),document.body.addEventListener("focus",e,{capture:!0})});function Wr(e){let t=e.parentElement,r=null;for(;t&&!(t instanceof HTMLFieldSetElement);)t instanceof HTMLLegendElement&&(r=t),t=t.parentElement;let n=(t==null?void 0:t.getAttribute("disabled"))==="";return n&&cd(r)?!1:n}function cd(e){if(!e)return!1;let t=e.previousElementSibling;for(;t!==null;){if(t instanceof HTMLLegendElement)return!1;t=t.previousElementSibling}return!0}function ud(e){throw new Error("Unexpected object: "+e)}var st=(e=>(e[e.First=0]="First",e[e.Previous=1]="Previous",e[e.Next=2]="Next",e[e.Last=3]="Last",e[e.Specific=4]="Specific",e[e.Nothing=5]="Nothing",e))(st||{});function dd(e,t){let r=t.resolveItems();if(r.length<=0)return null;let n=t.resolveActiveIndex(),s=n??-1;switch(e.focus){case 0:{for(let o=0;o<r.length;++o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 1:{for(let o=s-1;o>=0;--o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 2:{for(let o=s+1;o<r.length;++o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 3:{for(let o=r.length-1;o>=0;--o)if(!t.resolveDisabled(r[o],o,r))return o;return n}case 4:{for(let o=0;o<r.length;++o)if(t.resolveId(r[o],o,r)===e.id)return o;return n}case 5:return null;default:ud(e)}}function fd(e={},t=null,r=[]){for(let[n,s]of Object.entries(e))Ta(r,Ma(t,n),s);return r}function Ma(e,t){return e?e+"["+t+"]":t}function Ta(e,t,r){if(Array.isArray(r))for(let[n,s]of r.entries())Ta(e,Ma(t,n.toString()),s);else r instanceof Date?e.push([t,r.toISOString()]):typeof r=="boolean"?e.push([t,r?"1":"0"]):typeof r=="string"?e.push([t,r]):typeof r=="number"?e.push([t,`${r}`]):r==null?e.push([t,""]):fd(r,t,e)}function pd(e){var t,r;let n=(t=e==null?void 0:e.form)!=null?t:e.closest("form");if(n){for(let s of n.elements)if(s!==e&&(s.tagName==="INPUT"&&s.type==="submit"||s.tagName==="BUTTON"&&s.type==="submit"||s.nodeName==="INPUT"&&s.type==="image")){s.click();return}(r=n.requestSubmit)==null||r.call(n)}}var me=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(me||{});function Qs(e,t,r,n){let s=ot(r);d.useEffect(()=>{e=e??window;function o(a){s.current(a)}return e.addEventListener(t,o,n),()=>e.removeEventListener(t,o,n)},[e,t,n])}function Gr(){let e=d.useRef(!1);return Re(()=>(e.current=!0,()=>{e.current=!1}),[]),e}function Oa(e){let t=ee(e),r=d.useRef(!1);d.useEffect(()=>(r.current=!1,()=>{r.current=!0,Mn(()=>{r.current&&t()})}),[t])}var Ze=(e=>(e[e.Forwards=0]="Forwards",e[e.Backwards=1]="Backwards",e))(Ze||{});function Ks(){let e=d.useRef(0);return Ca("keydown",t=>{t.key==="Tab"&&(e.current=t.shiftKey?1:0)},!0),e}function Da(e){if(!e)return new Set;if(typeof e=="function")return new Set(e());let t=new Set;for(let r of e.current)r.current instanceof HTMLElement&&t.add(r.current);return t}let hd="div";var Aa=(e=>(e[e.None=1]="None",e[e.InitialFocus=2]="InitialFocus",e[e.TabLock=4]="TabLock",e[e.FocusLock=8]="FocusLock",e[e.Re
40storeFocus=16]="RestoreFocus",e[e.All=30]="All",e))(Aa||{});function md(e,t){let r=d.useRef(null),n=Ee(r,t),{initialFocus:s,containers:o,features:a=30,...l}=e;hr()||(a=1);let c=Ct(r);xd({ownerDocument:c},!!(a&16));let f=vd({ownerDocument:c,container:r,initialFocus:s},!!(a&2));bd({ownerDocument:c,container:r,containers:o,previousActiveElement:f},!!(a&8));let u=Ks(),p=ee(m=>{let y=r.current;y&&(C=>C())(()=>{ve(u.current,{[Ze.Forwards]:()=>{et(y,Pe.First,{skipElements:[m.relatedTarget]})},[Ze.Backwards]:()=>{et(y,Pe.Last,{skipElements:[m.relatedTarget]})}})})}),h=pr(),v=d.useRef(!1),g={ref:n,onKeyDown(m){m.key=="Tab"&&(v.current=!0,h.requestAnimationFrame(()=>{v.current=!1}))},onBlur(m){let y=Da(o);r.current instanceof HTMLElement&&y.add(r.current);let C=m.relatedTarget;C instanceof HTMLElement&&C.dataset.headlessuiFocusGuard!=="true"&&(Ra(y,C)||(v.current?et(r.current,ve(u.current,{[Ze.Forwards]:()=>Pe.Next,[Ze.Backwards]:()=>Pe.Previous})|Pe.WrapAround,{relativeTo:m.target}):m.target instanceof HTMLElement&&Rt(m.target)))}};return X.createElement(X.Fragment,null,!!(a&4)&&X.createElement($t,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:_t.Focusable}),Se({ourProps:g,theirProps:l,defaultTag:hd,name:"FocusTrap"}),!!(a&4)&&X.createElement($t,{as:"button",type:"button","data-headlessui-focus-guard":!0,onFocus:p,features:_t.Focusable}))}let gd=Ne(md),yr=Object.assign(gd,{features:Aa});function yd(e=!0){let t=d.useRef(It.slice());return Gs(([r],[n])=>{n===!0&&r===!1&&Mn(()=>{t.current.splice(0)}),n===!1&&r===!0&&(t.current=It.slice())},[e,It,t]),ee(()=>{var r;return(r=t.current.find(n=>n!=null&&n.isConnected))!=null?r:null})}function xd({ownerDocument:e},t){let r=yd(t);Gs(()=>{t||(e==null?void 0:e.activeElement)===(e==null?void 0:e.body)&&Rt(r())},[t]),Oa(()=>{t&&Rt(r())})}function vd({ownerDocument:e,container:t,initialFocus:r},n){let s=d.useRef(null),o=Gr();return Gs(()=>{if(!n)return;let a=t.current;a&&Mn(()=>{if(!o.current)return;let l=e==null?void 0:e.activeElement;if(r!=null&&r.current){if((r==null?void 0:r.current)===l){s.current=l;return}}else if(a.contains(l)){s.current=l;return}r!=null&&r.current?Rt(r.current):et(a,Pe.First)===Ar.Error&&console.warn("There are no focusable elements inside the <FocusTrap />"),s.current=e==null?void 0:e.activeElement})},[n]),s}function bd({ownerDocument:e,container:t,containers:r,previousActiveElement:n},s){let o=Gr();Qs(e==null?void 0:e.defaultView,"focus",a=>{if(!s||!o.current)return;let l=Da(r);t.current instanceof HTMLElement&&l.add(t.current);let c=n.current;if(!c)return;let f=a.target;f&&f instanceof HTMLElement?Ra(l,f)?(n.current=f,Rt(f)):(a.preventDefault(),a.stopPropagation(),Rt(c)):Rt(n.current)},!0)}function Ra(e,t){for(let r of e)if(r.contains(t))return!0;return!1}let La=d.createContext(!1);function wd(){return d.useContext(La)}function ys(e){return X.createElement(La.Provider,{value:e.force},e.children)}function _d(e){let t=wd(),r=d.useContext(Pa),n=Ct(e),[s,o]=d.useState(()=>{if(!t&&r!==null||wt.isServer)return null;let a=n==null?void 0:n.getElementById("headlessui-portal-root");if(a)return a;if(n===null)return null;let l=n.createElement("div");return l.setAttribute("id","headlessui-portal-root"),n.body.appendChild(l)});return d.useEffect(()=>{s!==null&&(n!=null&&n.body.contains(s)||n==null||n.body.appendChild(s))},[s,n]),d.useEffect(()=>{t||r!==null&&o(r.current)},[r,o,t]),s}let Sd=d.Fragment;function Nd(e,t){let r=e,n=d.useRef(null),s=Ee(ka(u=>{n.current=u}),t),o=Ct(n),a=_d(n),[l]=d.useState(()=>{var u;return wt.isServer?null:(u=o==null?void 0:o.createElement("div"))!=null?u:null}),c=d.useContext(xs),f=hr();return Re(()=>{!a||!l||a.contains(l)||(l.setAttribute("data-headlessui-portal",""),a.appendChild(l))},[a,l]),Re(()=>{if(l&&c)return c.register(l)},[c,l]),Oa(()=>{var u;!a||!l||(l instanceof Node&&a.contains(l)&&a.removeChild(l),a.childNodes.length<=0&&((u=a.parentElement)==null||u.removeChild(a)))}),f?!a||!l?null:zl.createPortal(Se({ourProps:{ref:s},theirProps:r,defaultTag:Sd,name:"Portal"}),l):null}let jd=d.Fragment,Pa=d.createContext(null);function Cd(e,t){let{target:r,...n}=e,s={ref:Ee(t)};return X.createElement(Pa.Provider,{value:r},Se({ourProps:s,theirProps:n,defaultTag:jd,name:"Popover.Group"}))}let xs=d.createContext(null);function $a(){let e=d.useContext(xs),t=d.useRef([]),r=ee(o=>(t.current.push(o),e&&e.register(o),()=>n(o))),n=ee(o=>{let a=t.current.indexOf(o);a!==-1&&t.current.splice(a,1),e&&e.unregister(o)}),s=d.useMemo(()=>({register:r,unregister:n,portals:t}),[r,n,t]);return[t,d.useMemo(()=>function({children:o}){return X.createElement(xs.Provider,{value:s},o)},[s])]}let Ed=Ne(Nd),kd=Ne(Cd),vs=Object.assign(Ed,{Group:kd});function Id(e,t){return e===t&&(e!==0||1/e===1/t)||e!==e&&t!==t}const Md=typeof Object.is=="function"?Object.is:Id,{useState:Td,useEffect:Od,useLayoutEffect:Dd,useDebugValue:Ad}=kr;function Rd(e,t,r){const n=t(),[{inst:s},o]=Td({inst:{value:n,getSnapshot:t}});return Dd(()=>{s.value=n,s.getSnapshot=t,es(s)&&o({inst:s})},[e,n,t]),Od(()=>(es(s)&&o({inst:s}),e(()=>{es(s)&&o({inst:s})}
40)),[e]),Ad(n),n}function es(e){const t=e.getSnapshot,r=e.value;try{const n=t();return!Md(r,n)}catch{return!0}}function Ld(e,t,r){return t()}const Pd=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",$d=!Pd,Fd=$d?Ld:Rd,Ud="useSyncExternalStore"in kr?(e=>e.useSyncExternalStore)(kr):Fd;function Bd(e){return Ud(e.subscribe,e.getSnapshot,e.getSnapshot)}function Hd(e,t){let r=e(),n=new Set;return{getSnapshot(){return r},subscribe(s){return n.add(s),()=>n.delete(s)},dispatch(s,...o){let a=t[s].call(r,...o);a&&(r=a,n.forEach(l=>l()))}}}function qd(){let e;return{before({doc:t}){var r;let n=t.documentElement;e=((r=t.defaultView)!=null?r:window).innerWidth-n.clientWidth},after({doc:t,d:r}){let n=t.documentElement,s=n.clientWidth-n.offsetWidth,o=e-s;r.style(n,"paddingRight",`${o}px`)}}}function zd(){return ja()?{before({doc:e,d:t,meta:r}){function n(s){return r.containers.flatMap(o=>o()).some(o=>o.contains(s))}t.microTask(()=>{var s;if(window.getComputedStyle(e.documentElement).scrollBehavior!=="auto"){let l=at();l.style(e.documentElement,"scrollBehavior","auto"),t.add(()=>t.microTask(()=>l.dispose()))}let o=(s=window.scrollY)!=null?s:window.pageYOffset,a=null;t.addEventListener(e,"click",l=>{if(l.target instanceof HTMLElement)try{let c=l.target.closest("a");if(!c)return;let{hash:f}=new URL(c.href),u=e.querySelector(f);u&&!n(u)&&(a=u)}catch{}},!0),t.addEventListener(e,"touchstart",l=>{if(l.target instanceof HTMLElement)if(n(l.target)){let c=l.target;for(;c.parentElement&&n(c.parentElement);)c=c.parentElement;t.style(c,"overscrollBehavior","contain")}else t.style(l.target,"touchAction","none")}),t.addEventListener(e,"touchmove",l=>{if(l.target instanceof HTMLElement)if(n(l.target)){let c=l.target;for(;c.parentElement&&c.dataset.headlessuiPortal!==""&&!(c.scrollHeight>c.clientHeight||c.scrollWidth>c.clientWidth);)c=c.parentElement;c.dataset.headlessuiPortal===""&&l.preventDefault()}else l.preventDefault()},{passive:!1}),t.add(()=>{var l;let c=(l=window.scrollY)!=null?l:window.pageYOffset;o!==c&&window.scrollTo(0,o),a&&a.isConnected&&(a.scrollIntoView({block:"nearest"}),a=null)})})}}:{}}function Wd(){return{before({doc:e,d:t}){t.style(e.documentElement,"overflow","hidden")}}}function Gd(e){let t={};for(let r of e)Object.assign(t,r(t));return t}let Yt=Hd(()=>new Map,{PUSH(e,t){var r;let n=(r=this.get(e))!=null?r:{doc:e,count:0,d:at(),meta:new Set};return n.count++,n.meta.add(t),this.set(e,n),this},POP(e,t){let r=this.get(e);return r&&(r.count--,r.meta.delete(t)),this},SCROLL_PREVENT({doc:e,d:t,meta:r}){let n={doc:e,d:t,meta:Gd(r)},s=[zd(),qd(),Wd()];s.forEach(({before:o})=>o==null?void 0:o(n)),s.forEach(({after:o})=>o==null?void 0:o(n))},SCROLL_ALLOW({d:e}){e.dispose()},TEARDOWN({doc:e}){this.delete(e)}});Yt.subscribe(()=>{let e=Yt.getSnapshot(),t=new Map;for(let[r]of e)t.set(r,r.documentElement.style.overflow);for(let r of e.values()){let n=t.get(r.doc)==="hidden",s=r.count!==0;(s&&!n||!s&&n)&&Yt.dispatch(r.count>0?"SCROLL_PREVENT":"SCROLL_ALLOW",r),r.count===0&&Yt.dispatch("TEARDOWN",r)}});function Yd(e,t,r){let n=Bd(Yt),s=e?n.get(e):void 0,o=s?s.count>0:!1;return Re(()=>{if(!(!e||!t))return Yt.dispatch("PUSH",e,r),()=>Yt.dispatch("POP",e,r)},[t,e]),o}let ts=new Map,xr=new Map;function ui(e,t=!0){Re(()=>{var r;if(!t)return;let n=typeof e=="function"?e():e.current;if(!n)return;function s(){var a;if(!n)return;let l=(a=xr.get(n))!=null?a:1;if(l===1?xr.delete(n):xr.set(n,l-1),l!==1)return;let c=ts.get(n);c&&(c["aria-hidden"]===null?n.removeAttribute("aria-hidden"):n.setAttribute("aria-hidden",c["aria-hidden"]),n.inert=c.inert,ts.delete(n))}let o=(r=xr.get(n))!=null?r:0;return xr.set(n,o+1),o!==0||(ts.set(n,{"aria-hidden":n.getAttribute("aria-hidden"),inert:n.inert}),n.setAttribute("aria-hidden","true"),n.inert=!0),s},[e,t])}function Fa({defaultContainers:e=[],portals:t,mainTreeNodeRef:r}={}){var n;let s=d.useRef((n=r==null?void 0:r.current)!=null?n:null),o=Ct(s),a=ee(()=>{var l,c,f;let u=[];for(let p of e)p!==null&&(p instanceof HTMLElement?u.push(p):"current"in p&&p.current instanceof HTMLElement&&u.push(p.current));if(t!=null&&t.current)for(let p of t.current)u.push(p);for(let p of(l=o==null?void 0:o.querySelectorAll("html > *, body > *"))!=null?l:[])p!==document.body&&p!==document.head&&p instanceof HTMLElement&&p.id!=="headlessui-portal-root"&&(p.contains(s.current)||p.contains((f=(c=s.current)==null?void 0:c.getRootNode())==null?void 0:f.host)||u.some(h=>p.contains(h))||u.push(p));return u});
40return{resolveContainers:a,contains:ee(l=>a().some(c=>c.contains(l))),mainTreeNodeRef:s,MainTreeNode:d.useMemo(()=>function(){return r!=null?null:X.createElement($t,{features:_t.Hidden,ref:s})},[s,r])}}function Vd(){let e=d.useRef(null);return{mainTreeNodeRef:e,MainTreeNode:d.useMemo(()=>function(){return X.createElement($t,{features:_t.Hidden,ref:e})},[e])}}let Zs=d.createContext(()=>{});Zs.displayName="StackContext";var bs=(e=>(e[e.Add=0]="Add",e[e.Remove=1]="Remove",e))(bs||{});function Qd(){return d.useContext(Zs)}function Kd({children:e,onUpdate:t,type:r,element:n,enabled:s}){let o=Qd(),a=ee((...l)=>{t==null||t(...l),o(...l)});return Re(()=>{let l=s===void 0||s===!0;return l&&a(0,r,n),()=>{l&&a(1,r,n)}},[a,r,n,s]),X.createElement(Zs.Provider,{value:a},e)}let Ua=d.createContext(null);function Ba(){let e=d.useContext(Ua);if(e===null){let t=new Error("You used a <Description /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ba),t}return e}function Ha(){let[e,t]=d.useState([]);return[e.length>0?e.join(" "):void 0,d.useMemo(()=>function(r){let n=ee(o=>(t(a=>[...a,o]),()=>t(a=>{let l=a.slice(),c=l.indexOf(o);return c!==-1&&l.splice(c,1),l}))),s=d.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return X.createElement(Ua.Provider,{value:s},r.children)},[t])]}let Zd="p";function Jd(e,t){let r=$e(),{id:n=`headlessui-description-${r}`,...s}=e,o=Ba(),a=Ee(t);Re(()=>o.register(n),[n,o.register]);let l={ref:a,...o.props,id:n};return Se({ourProps:l,theirProps:s,slot:o.slot||{},defaultTag:Zd,name:o.name||"Description"})}let Xd=Ne(Jd),qa=Object.assign(Xd,{});var ef=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(ef||{}),tf=(e=>(e[e.SetTitleId=0]="SetTitleId",e))(tf||{});let rf={0(e,t){return e.titleId===t.id?e:{...e,titleId:t.id}}},_n=d.createContext(null);_n.displayName="DialogContext";function Yr(e){let t=d.useContext(_n);if(t===null){let r=new Error(`<${e} /> is missing a parent <Dialog /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Yr),r}return t}function nf(e,t,r=()=>[document.body]){Yd(e,t,n=>{var s;return{containers:[...(s=n.containers)!=null?s:[],r]}})}function sf(e,t){return ve(t.type,rf,e,t)}let of="div",af=mt.RenderStrategy|mt.Static;function lf(e,t){let r=$e(),{id:n=`headlessui-dialog-${r}`,open:s,onClose:o,initialFocus:a,role:l="dialog",__demoMode:c=!1,...f}=e,[u,p]=d.useState(0),h=d.useRef(!1);l=function(){return l==="dialog"||l==="alertdialog"?l:(h.current||(h.current=!0,console.warn(`Invalid role [${l}] passed to <Dialog />. Only \`dialog\` and and \`alertdialog\` are supported. Using \`dialog\` instead.`)),"dialog")}();let v=mr();s===void 0&&v!==null&&(s=(v&Ce.Open)===Ce.Open);let g=d.useRef(null),m=Ee(g,t),y=Ct(g),C=e.hasOwnProperty("open")||v!==null,I=e.hasOwnProperty("onClose");if(!C&&!I)throw new Error("You have to provide an `open` and an `onClose` prop to the `Dialog` component.");if(!C)throw new Error("You provided an `onClose` prop to the `Dialog`, but forgot an `open` prop.");if(!I)throw new Error("You provided an `open` prop to the `Dialog`, but forgot an `onClose` prop.");if(typeof s!="boolean")throw new Error(`You provided an \`open\` prop to the \`Dialog\`, but the value is not a boolean. Received: ${s}`);if(typeof o!="function")throw new Error(`You provided an \`onClose\` prop to the \`Dialog\`, but the value is not a function. Received: ${o}`);let S=s?0:1,[k,O]=d.useReducer(sf,{titleId:null,descriptionId:null,panelRef:d.createRef()}),w=ee(()=>o(!1)),T=ee(A=>O({type:0,id:A})),b=hr()?c?!1:S===0:!1,_=u>1,x=d.useContext(_n)!==null,[j,M]=$a(),$={get current(){var A;return(A=k.panelRef.current)!=null?A:g.current}},{resolveContainers:L,mainTreeNodeRef:P,MainTreeNode:R}=Fa({portals:j,defaultContainers:[$]}),H=_?"parent":"leaf",Y=v!==null?(v&Ce.Closing)===Ce.Closing:!1,z=x||Y?!1:b,V=d.useCallback(()=>{var A,U;return(U=Array.from((A=y==null?void 0:y.querySelectorAll("body > *"))!=null?A:[]).find(F=>F.id==="headlessui-portal-root"?!1:F.contains(P.current)&&F instanceof HTMLElement))!=null?U:null},[P]);ui(V,z);let G=_?!0:b,Q=d.useCallback(()=>{var A,U;return(U=Array.from((A=y==null?void 0:y.querySelectorAll("[data-headlessui-portal]"))!=null?A:[]).find(F=>F.contains(P.current)&&F instanceof HTMLElement))!=null?U:null},[P]);ui(Q,G),zs(L,A=>{A.preventDefault(),w()},!(!b||_));let J=!(_||S!==0);Qs(y==null?void 0:y.defaultView,"keydown",A=>{J&&(A.defaultPrevented||A.key===me.Escape&&(A.preventDefault(),A.stopPropagation(),w()))}),nf(y,!(Y||S!==0||x),L),d.useEffect(()=>{if(S!==0||!g.current)return;let A=new ResizeObserver(U=>{for(let F of U){let W=F.target.getBoundingClientRect();W.x===0&&W.y===0&&W.width===0&&W.height===0&&w()}});return A.observe(g.current),()=>A.disconnect()},[S,g,w]);let[Z,te]=Ha(),q=d.useMemo(()=>[{dialogState:S,close:w,setTitleId:T},k],[S,k,w,T]),E=d.useMemo(()=>({open:S===0}),[S]),D={ref:m,id:n,role:l,"aria-modal":S===0?!0:void 0,"aria-labelledby":k.titleId,"aria-describedby":Z};
40return X.createElement(Kd,{type:"Dialog",enabled:S===0,element:g,onUpdate:ee((A,U)=>{U==="Dialog"&&ve(A,{[bs.Add]:()=>p(F=>F+1),[bs.Remove]:()=>p(F=>F-1)})})},X.createElement(ys,{force:!0},X.createElement(vs,null,X.createElement(_n.Provider,{value:q},X.createElement(vs.Group,{target:g},X.createElement(ys,{force:!1},X.createElement(te,{slot:E,name:"Dialog.Description"},X.createElement(yr,{initialFocus:a,containers:L,features:b?ve(H,{parent:yr.features.RestoreFocus,leaf:yr.features.All&~yr.features.FocusLock}):yr.features.None},X.createElement(M,null,Se({ourProps:D,theirProps:f,slot:E,defaultTag:of,features:af,visible:S===0,name:"Dialog"}))))))))),X.createElement(R,null))}let cf="div";function uf(e,t){let r=$e(),{id:n=`headlessui-dialog-overlay-${r}`,...s}=e,[{dialogState:o,close:a}]=Yr("Dialog.Overlay"),l=Ee(t),c=ee(u=>{if(u.target===u.currentTarget){if(Wr(u.currentTarget))return u.preventDefault();u.preventDefault(),u.stopPropagation(),a()}}),f=d.useMemo(()=>({open:o===0}),[o]);return Se({ourProps:{ref:l,id:n,"aria-hidden":!0,onClick:c},theirProps:s,slot:f,defaultTag:cf,name:"Dialog.Overlay"})}let df="div";function ff(e,t){let r=$e(),{id:n=`headlessui-dialog-backdrop-${r}`,...s}=e,[{dialogState:o},a]=Yr("Dialog.Backdrop"),l=Ee(t);d.useEffect(()=>{if(a.panelRef.current===null)throw new Error("A <Dialog.Backdrop /> component is being used, but a <Dialog.Panel /> component is missing.")},[a.panelRef]);let c=d.useMemo(()=>({open:o===0}),[o]);return X.createElement(ys,{force:!0},X.createElement(vs,null,Se({ourProps:{ref:l,id:n,"aria-hidden":!0},theirProps:s,slot:c,defaultTag:df,name:"Dialog.Backdrop"})))}let pf="div";function hf(e,t){let r=$e(),{id:n=`headlessui-dialog-panel-${r}`,...s}=e,[{dialogState:o},a]=Yr("Dialog.Panel"),l=Ee(t,a.panelRef),c=d.useMemo(()=>({open:o===0}),[o]),f=ee(u=>{u.stopPropagation()});return Se({ourProps:{ref:l,id:n,onClick:f},theirProps:s,slot:c,defaultTag:pf,name:"Dialog.Panel"})}let mf="h2";function gf(e,t){let r=$e(),{id:n=`headlessui-dialog-title-${r}`,...s}=e,[{dialogState:o,setTitleId:a}]=Yr("Dialog.Title"),l=Ee(t);d.useEffect(()=>(a(n),()=>a(null)),[n,a]);let c=d.useMemo(()=>({open:o===0}),[o]);return Se({ourProps:{ref:l,id:n},theirProps:s,slot:c,defaultTag:mf,name:"Dialog.Title"})}let yf=Ne(lf),xf=Ne(ff),vf=Ne(hf),bf=Ne(uf),wf=Ne(gf),Te=Object.assign(yf,{Backdrop:xf,Panel:vf,Overlay:bf,Title:wf,Description:qa}),di=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function fi(e){var t,r;let n=(t=e.innerText)!=null?t:"",s=e.cloneNode(!0);if(!(s instanceof HTMLElement))return n;let o=!1;for(let l of s.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))l.remove(),o=!0;let a=o?(r=s.innerText)!=null?r:"":n;return di.test(a)&&(a=a.replace(di,"")),a}function _f(e){let t=e.getAttribute("aria-label");if(typeof t=="string")return t.trim();let r=e.getAttribute("aria-labelledby");if(r){let n=r.split(" ").map(s=>{let o=document.getElementById(s);if(o){let a=o.getAttribute("aria-label");return typeof a=="string"?a.trim():fi(o).trim()}return null}).filter(Boolean);if(n.length>0)return n.join(", ")}return fi(e).trim()}function Sf(e){let t=d.useRef(""),r=d.useRef("");return ee(()=>{let n=e.current;if(!n)return"";let s=n.innerText;if(t.current===s)return r.current;let o=_f(n).trim().toLowerCase();return t.current=s,r.current=o,o})}var Nf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Nf||{}),jf=(e=>(e[e.Pointer=0]="Pointer",e[e.Other=1]="Other",e))(jf||{}),Cf=(e=>(e[e.OpenMenu=0]="OpenMenu",e[e.CloseMenu=1]="CloseMenu",e[e.GoToItem=2]="GoToItem",e[e.Search=3]="Search",e[e.ClearSearch=4]="ClearSearch",e[e.RegisterItem=5]="RegisterItem",e[e.UnregisterItem=6]="UnregisterItem",e))(Cf||{});function rs(e,t=r=>r){let r=e.activeItemIndex!==null?e.items[e.activeItemIndex]:null,n=Na(t(e.items.slice()),o=>o.dataRef.current.domRef.current),s=r?n.indexOf(r):null;return s===-1&&(s=null),{items:n,activeItemIndex:s}}let Ef={1(e){return e.menuState===1?e:{...e,activeItemIndex:null,menuState:1}},0(e){return e.menuState===0?e:{...e,__demoMode:!1,menuState:0}},2:(e,t)=>{var r;let n=rs(e),s=dd(t,{resolveItems:()=>n.items,resolveActiveIndex:()=>n.activeItemIndex,resolveId:o=>o.id,resolveDisabled:o=>o.dataRef.current.disabled});return{...e,...n,searchQuery:"",activeItemIndex:s,activationTrigger:(r=t.trigger)!=null?r:1}},3:(e,t)=>
40{let r=e.searchQuery!==""?0:1,n=e.searchQuery+t.value.toLowerCase(),s=(e.activeItemIndex!==null?e.items.slice(e.activeItemIndex+r).concat(e.items.slice(0,e.activeItemIndex+r)):e.items).find(a=>{var l;return((l=a.dataRef.current.textValue)==null?void 0:l.startsWith(n))&&!a.dataRef.current.disabled}),o=s?e.items.indexOf(s):-1;return o===-1||o===e.activeItemIndex?{...e,searchQuery:n}:{...e,searchQuery:n,activeItemIndex:o,activationTrigger:1}},4(e){return e.searchQuery===""?e:{...e,searchQuery:"",searchActiveItemIndex:null}},5:(e,t)=>{let r=rs(e,n=>[...n,{id:t.id,dataRef:t.dataRef}]);return{...e,...r}},6:(e,t)=>{let r=rs(e,n=>{let s=n.findIndex(o=>o.id===t.id);return s!==-1&&n.splice(s,1),n});return{...e,...r,activationTrigger:1}}},Js=d.createContext(null);Js.displayName="MenuContext";function Dn(e){let t=d.useContext(Js);if(t===null){let r=new Error(`<${e} /> is missing a parent <Menu /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,Dn),r}return t}function kf(e,t){return ve(t.type,Ef,e,t)}let If=d.Fragment;function Mf(e,t){let{__demoMode:r=!1,...n}=e,s=d.useReducer(kf,{__demoMode:r,menuState:r?0:1,buttonRef:d.createRef(),itemsRef:d.createRef(),items:[],searchQuery:"",activeItemIndex:null,activationTrigger:1}),[{menuState:o,itemsRef:a,buttonRef:l},c]=s,f=Ee(t);zs([l,a],(v,g)=>{var m;c({type:1}),On(g,Tn.Loose)||(v.preventDefault(),(m=l.current)==null||m.focus())},o===0);let u=ee(()=>{c({type:1})}),p=d.useMemo(()=>({open:o===0,close:u}),[o,u]),h={ref:f};return X.createElement(Js.Provider,{value:s},X.createElement(Vs,{value:ve(o,{0:Ce.Open,1:Ce.Closed})},Se({ourProps:h,theirProps:n,slot:p,defaultTag:If,name:"Menu"})))}let Tf="button";function Of(e,t){var r;let n=$e(),{id:s=`headlessui-menu-button-${n}`,...o}=e,[a,l]=Dn("Menu.Button"),c=Ee(a.buttonRef,t),f=pr(),u=ee(m=>{switch(m.key){case me.Space:case me.Enter:case me.ArrowDown:m.preventDefault(),m.stopPropagation(),l({type:0}),f.nextFrame(()=>l({type:2,focus:st.First}));break;case me.ArrowUp:m.preventDefault(),m.stopPropagation(),l({type:0}),f.nextFrame(()=>l({type:2,focus:st.Last}));break}}),p=ee(m=>{switch(m.key){case me.Space:m.preventDefault();break}}),h=ee(m=>{if(Wr(m.currentTarget))return m.preventDefault();e.disabled||(a.menuState===0?(l({type:1}),f.nextFrame(()=>{var y;return(y=a.buttonRef.current)==null?void 0:y.focus({preventScroll:!0})}
40)):(m.preventDefault(),l({type:0})))}),v=d.useMemo(()=>({open:a.menuState===0}),[a]),g={ref:c,id:s,type:Ws(e,a.buttonRef),"aria-haspopup":"menu","aria-controls":(r=a.itemsRef.current)==null?void 0:r.id,"aria-expanded":a.menuState===0,onKeyDown:u,onKeyUp:p,onClick:h};return Se({ourProps:g,theirProps:o,slot:v,defaultTag:Tf,name:"Menu.Button"})}let Df="div",Af=mt.RenderStrategy|mt.Static;function Rf(e,t){var r,n;let s=$e(),{id:o=`headlessui-menu-items-${s}`,...a}=e,[l,c]=Dn("Menu.Items"),f=Ee(l.itemsRef,t),u=Ct(l.itemsRef),p=pr(),h=mr(),v=h!==null?(h&Ce.Open)===Ce.Open:l.menuState===0;d.useEffect(()=>{let I=l.itemsRef.current;I&&l.menuState===0&&I!==(u==null?void 0:u.activeElement)&&I.focus({preventScroll:!0})},[l.menuState,l.itemsRef,u]),nd({container:l.itemsRef.current,enabled:l.menuState===0,accept(I){return I.getAttribute("role")==="menuitem"?NodeFilter.FILTER_REJECT:I.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT},walk(I){I.setAttribute("role","none")}});let g=ee(I=>{var S,k;switch(p.dispose(),I.key){case me.Space:if(l.searchQuery!=="")return I.preventDefault(),I.stopPropagation(),c({type:3,value:I.key});case me.Enter:if(I.preventDefault(),I.stopPropagation(),c({type:1}),l.activeItemIndex!==null){let{dataRef:O}=l.items[l.activeItemIndex];(k=(S=O.current)==null?void 0:S.domRef.current)==null||k.click()}Sa(l.buttonRef.current);break;case me.ArrowDown:return I.preventDefault(),I.stopPropagation(),c({type:2,focus:st.Next});case me.ArrowUp:return I.preventDefault(),I.stopPropagation(),c({type:2,focus:st.Previous});case me.Home:case me.PageUp:return I.preventDefault(),I.stopPropagation(),c({type:2,focus:st.First});case me.End:case me.PageDown:return I.preventDefault(),I.stopPropagation(),c({type:2,focus:st.Last});case me.Escape:I.preventDefault(),I.stopPropagation(),c({type:1}),at().nextFrame(()=>{var O;return(O=l.buttonRef.current)==null?void 0:O.focus({preventScroll:!0})});break;case me.Tab:I.preventDefault(),I.stopPropagation(),c({type:1}),at().nextFrame(()=>{Xu(l.buttonRef.current,I.shiftKey?Pe.Previous:Pe.Next)});break;default:I.key.length===1&&(c({type:3,value:I.key}),p.setTimeout(()=>c({type:4}),350));break}}),m=ee(I=>{switch(I.key){case me.Space:I.preventDefault();break}}),y=d.useMemo(()=>({open:l.menuState===0}),[l]),C={"aria-activedescendant":l.activeItemIndex===null||(r=l.items[l.activeItemIndex])==null?void 0:r.id,"aria-labelledby":(n=l.buttonRef.current)==null?void 0:n.id,id:o,onKeyDown:g,onKeyUp:m,role:"menu",tabIndex:0,ref:f};return Se({ourProps:C,theirProps:a,slot:y,defaultTag:Df,features:Af,visible:v,name:"Menu.Items"})}let Lf=d.Fragment;function Pf(e,t){let r=$e(),{id:n=`headlessui-menu-item-${r}`,disabled:s=!1,...o}=e,[a,l]=Dn("Menu.Item"),c=a.activeItemIndex!==null?a.items[a.activeItemIndex].id===n:!1,f=d.useRef(null),u=Ee(t,f);Re(()=>{if(a.__demoMode||a.menuState!==0||!c||a.activationTrigger===0)return;let O=at();return O.requestAnimationFrame(()=>{var w,T;(T=(w=f.current)==null?void 0:w.scrollIntoView)==null||T.call(w,{block:"nearest"})}),O.dispose},[a.__demoMode,f,c,a.menuState,a.activationTrigger,a.activeItemIndex]);let p=Sf(f),h=d.useRef({disabled:s,domRef:f,get textValue(){return p()}});Re(()=>{h.current.disabled=s},[h,s]),Re(()=>(l({type:5,id:n,dataRef:h}),()=>l({type:6,id:n})),[h,n]);let v=ee(()=>{l({type:1})}),g=ee(O=>{if(s)return O.preventDefault();l({type:1}),Sa(a.buttonRef.current)}),m=ee(()=>{if(s)return l({type:2,focus:st.Nothing});l({type:2,focus:st.Specific,id:n})}),y=rd(),C=ee(O=>y.update(O)),I=ee(O=>{y.wasMoved(O)&&(s||c||l({type:2,focus:st.Specific,id:n,trigger:0}))}),S=ee(O=>{y.wasMoved(O)&&(s||c&&l({type:2,focus:st.Nothing}))}),k=d.useMemo(()=>({active:c,disabled:s,close:v}),[c,s,v]);return Se({ourProps:{id:n,ref:u,role:"menuitem",tabIndex:s===!0?void 0:-1,"aria-disabled":s===!0?!0:void 0,disabled:void 0,onClick:g,onFocus:m,onPointerEnter:C,onMouseEnter:C,onPointerMove:I,onMouseMove:I,onPointerLeave:S,onMouseLeave:S},theirProps:o,slot:k,defaultTag:Lf,name:"Menu.Item"})}let $f=Ne(Mf),Ff=Ne(Of),Uf=Ne(Rf),Bf=Ne(Pf),Lt=Object.assign($f,{Button:Ff,Items:Uf,Item:Bf});var Hf=(e=>(e[e.Open=0]="Open",e[e.Closed=1]="Closed",e))(Hf||{}),qf=(e=>(e[e.TogglePopover=0]="TogglePopover",e[e.ClosePopover=1]="ClosePopover",e[e.SetButton=2]="SetButton",e[e.SetButtonId=3]="SetButtonId",e[e.SetPanel=4]="SetPanel",e[e.SetPanelId=5]="SetPanelId",e))(qf||{});let zf={0:e=>{let t={...e,popoverState:ve(e.popoverState,{0:1,1:0})};return t.popoverState===0&&(t.__demoMode=!1),t},1(e){return e.popoverState===1?e:{...e,popoverState:1}},2(e,t){return e.button===t.button?e:{...e,button:t.button}},3(e,t){return e.buttonId===t.buttonId?e:{...e,buttonId:t.buttonId}},4(e,t){return e.panel===t.panel?e:{...e,panel:t.panel}},5(e,t){return e.panelId===t.panelId?e:{...e,panelId:t.panelId}}},Xs=d.createContext(null);Xs.displayName="PopoverContext";function An(e){let t=d.useContext(Xs);if(t===null){let r=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,An),r}return t}let eo=d.createContext(null);eo.displayName="PopoverAPIContext";function to(e){let t=d.useContext(eo);if(t===null){let r=new Error(`<${e} /> is missing a parent <Popover /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(r,to),r}return t}let ro=d.createContext(null);ro.displayName="PopoverGroupContext";function za(){return d.useContext(ro)}let Rn=d.createContext(null);Rn.displayName="PopoverPanelContext";function Wf(){return d.useContext(Rn)}function Gf(e,t){return ve(t.type,zf,e,t)}let Yf="div";function Vf(e,t){var r;let{__demoMode:n=!1,...s}=e,o=d.useRef(null),a=Ee(t,ka(R=>{o.current=R})),l=d.useRef([]),c=d.useReducer(Gf,{__demoMode:n,popoverState:n?0:1,buttons:l,button:null,buttonId:null,panel:null,panelId:null,beforePanelSentinel:d.createRef(),afterPanelSentinel:d.createRef()}),[{popoverState:f,button:u,buttonId:p,panel:h,panelId:v,beforePanelSentinel:g,afterPanelSentinel:m},y]=c,C=Ct((r=o.current)!=null?r:u),I=d.useMemo(()=>
40{if(!u||!h)return!1;for(let Q of document.querySelectorAll("body > *"))if(Number(Q==null?void 0:Q.contains(u))^Number(Q==null?void 0:Q.contains(h)))return!0;let R=zr(),H=R.indexOf(u),Y=(H+R.length-1)%R.length,z=(H+1)%R.length,V=R[Y],G=R[z];return!h.contains(V)&&!h.contains(G)},[u,h]),S=ot(p),k=ot(v),O=d.useMemo(()=>({buttonId:S,panelId:k,close:()=>y({type:1})}),[S,k,y]),w=za(),T=w==null?void 0:w.registerPopover,b=ee(()=>{var R;return(R=w==null?void 0:w.isFocusWithinPopoverGroup())!=null?R:(C==null?void 0:C.activeElement)&&((u==null?void 0:u.contains(C.activeElement))||(h==null?void 0:h.contains(C.activeElement)))});d.useEffect(()=>T==null?void 0:T(O),[T,O]);let[_,x]=$a(),j=Fa({mainTreeNodeRef:w==null?void 0:w.mainTreeNodeRef,portals:_,defaultContainers:[u,h]});Qs(C==null?void 0:C.defaultView,"focus",R=>{var H,Y,z,V;R.target!==window&&R.target instanceof HTMLElement&&f===0&&(b()||u&&h&&(j.contains(R.target)||(Y=(H=g.current)==null?void 0:H.contains)!=null&&Y.call(H,R.target)||(V=(z=m.current)==null?void 0:z.contains)!=null&&V.call(z,R.target)||y({type:1})))},!0),zs(j.resolveContainers,(R,H)=>{y({type:1}),On(H,Tn.Loose)||(R.preventDefault(),u==null||u.focus())},f===0);let M=ee(R=>{y({type:1});let H=R?R instanceof HTMLElement?R:"current"in R&&R.current instanceof HTMLElement?R.current:u:u;H==null||H.focus()}),$=d.useMemo(()=>({close:M,isPortalled:I}),[M,I]),L=d.useMemo(()=>({open:f===0,close:M}),[f,M]),P={ref:a};return X.createElement(Rn.Provider,{value:null},X.createElement(Xs.Provider,{value:c},X.createElement(eo.Provider,{value:$},X.createElement(Vs,{value:ve(f,{0:Ce.Open,1:Ce.Closed})},X.createElement(x,null,Se({ourProps:P,theirProps:s,slot:L,defaultTag:Yf,name:"Popover"}),X.createElement(j.MainTreeNode,null))))))}let Qf="button";function Kf(e,t){let r=$e(),{id:n=`headlessui-popover-button-${r}`,...s}=e,[o,a]=An("Popover.Button"),{isPortalled:l}=to("Popover.Button"),c=d.useRef(null),f=`headlessui-focus-sentinel-${$e()}`,u=za(),p=u==null?void 0:u.closeOthers,h=Wf()!==null;d.useEffect(()=>{if(!h)return a({type:3,buttonId:n}),()=>{a({type:3,buttonId:null})}},[h,n,a]);let[v]=d.useState(()=>Symbol()),g=Ee(c,t,h?null:j=>{if(j)o.buttons.current.push(v);else{let M=o.buttons.current.indexOf(v);M!==-1&&o.buttons.current.splice(M,1)}o.buttons.current.length>1&&console.warn("You are already using a <Popover.Button /> but only 1 <Popover.Button /> is supported."),j&&a({type:2,button:j})}),m=Ee(c,t),y=Ct(c),C=ee(j=>{var M,$,L;if(h){if(o.popoverState===1)return;switch(j.key){case me.Space:case me.Enter:j.preventDefault(),($=(M=j.target).click)==null||$.call(M),a({type:1}),(L=o.button)==null||L.focus();break}}else switch(j.key){case me.Space:case me.Enter:j.preventDefault(),j.stopPropagation(),o.popoverState===1&&(p==null||p(o.buttonId)),a({type:0});break;case me.Escape:if(o.popoverState!==0)return p==null?void 0:p(o.buttonId);if(!c.current||y!=null&&y.activeElement&&!c.current.contains(y.activeElement))return;j.preventDefault(),j.stopPropagation(),a({type:1});break}}),I=ee(j=>{h||j.key===me.Space&&j.preventDefault()}),S=ee(j=>{var M,$;Wr(j.currentTarget)||e.disabled||(h?(a({type:1}),(M=o.button)==null||M.focus()):(j.preventDefault(),j.stopPropagation(),o.popoverState===1&&(p==null||p(o.buttonId)),a({type:0}),($=o.button)==null||$.focus()))}),k=ee(j=>{j.preventDefault(),j.stopPropagation()}),O=o.popoverState===0,w=d.useMemo(()=>({open:O}),[O]),T=Ws(e,c),b=h?{ref:m,type:T,onKeyDown:C,onClick:S}:{ref:g,id:o.buttonId,type:T,"aria-expanded":o.popoverState===0,"aria-controls":o.panel?o.panelId:void 0,onKeyDown:C,onKeyUp:I,onClick:S,onMouseDown:k},_=Ks(),x=ee(()=>{let j=o.panel;if(!j)return;function M(){ve(_.current,{[Ze.Forwards]:()=>et(j,Pe.First),[Ze.Backwards]:()=>et(j,Pe.Last)})===Ar.Error&&et(zr().filter($=>$.dataset.headlessuiFocusGuard!=="true"),ve(_.current,{[Ze.Forwards]:Pe.Next,[Ze.Backwards]:Pe.Previous}),{relativeTo:o.button})}M()});return X.createElement(X.Fragment,null,Se({ourProps:b,theirProps:s,slot:w,defaultTag:Qf,name:"Popover.Button"}),O&&!h&&l&&X.createElement($t,{id:f,features:_t.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:x}))}let Zf="div",Jf=mt.RenderStrategy|mt.Static;function Xf(e,t){let r=$e(),{id:n=`headlessui-popover-overlay-${r}`,...s}=e,[{popoverState:o},a]=An("Popover.Overlay"),l=Ee(t),c=mr(),f=c!==null?(c&Ce.Open)===Ce.Open:o===0,u=ee(h=>
40{if(Wr(h.currentTarget))return h.preventDefault();a({type:1})}),p=d.useMemo(()=>({open:o===0}),[o]);return Se({ourProps:{ref:l,id:n,"aria-hidden":!0,onClick:u},theirProps:s,slot:p,defaultTag:Zf,features:Jf,visible:f,name:"Popover.Overlay"})}let ep="div",tp=mt.RenderStrategy|mt.Static;function rp(e,t){let r=$e(),{id:n=`headlessui-popover-panel-${r}`,focus:s=!1,...o}=e,[a,l]=An("Popover.Panel"),{close:c,isPortalled:f}=to("Popover.Panel"),u=`headlessui-focus-sentinel-before-${$e()}`,p=`headlessui-focus-sentinel-after-${$e()}`,h=d.useRef(null),v=Ee(h,t,b=>{l({type:4,panel:b})}),g=Ct(h),m=sd();Re(()=>(l({type:5,panelId:n}),()=>{l({type:5,panelId:null})}),[n,l]);let y=mr(),C=y!==null?(y&Ce.Open)===Ce.Open:a.popoverState===0,I=ee(b=>{var _;switch(b.key){case me.Escape:if(a.popoverState!==0||!h.current||g!=null&&g.activeElement&&!h.current.contains(g.activeElement))return;b.preventDefault(),b.stopPropagation(),l({type:1}),(_=a.button)==null||_.focus();break}});d.useEffect(()=>{var b;e.static||a.popoverState===1&&((b=e.unmount)==null||b)&&l({type:4,panel:null})},[a.popoverState,e.unmount,e.static,l]),d.useEffect(()=>{if(a.__demoMode||!s||a.popoverState!==0||!h.current)return;let b=g==null?void 0:g.activeElement;h.current.contains(b)||et(h.current,Pe.First)},[a.__demoMode,s,h,a.popoverState]);let S=d.useMemo(()=>({open:a.popoverState===0,close:c}),[a,c]),k={ref:v,id:n,onKeyDown:I,onBlur:s&&a.popoverState===0?b=>{var _,x,j,M,$;let L=b.relatedTarget;L&&h.current&&((_=h.current)!=null&&_.contains(L)||(l({type:1}),((j=(x=a.beforePanelSentinel.current)==null?void 0:x.contains)!=null&&j.call(x,L)||($=(M=a.afterPanelSentinel.current)==null?void 0:M.contains)!=null&&$.call(M,L))&&L.focus({preventScroll:!0})))}:void 0,tabIndex:-1},O=Ks(),w=ee(()=>{let b=h.current;if(!b)return;function _(){ve(O.current,{[Ze.Forwards]:()=>{var x;et(b,Pe.First)===Ar.Error&&((x=a.afterPanelSentinel.current)==null||x.focus())},[Ze.Backwards]:()=>{var x;(x=a.button)==null||x.focus({preventScroll:!0})}})}_()}),T=ee(()=>{let b=h.current;if(!b)return;function _(){ve(O.current,{[Ze.Forwards]:()=>{var x;if(!a.button)return;let j=zr(),M=j.indexOf(a.button),$=j.slice(0,M+1),L=[...j.slice(M+1),...$];for(let P of L.slice())if(P.dataset.headlessuiFocusGuard==="true"||(x=a.panel)!=null&&x.contains(P)){let R=L.indexOf(P);R!==-1&&L.splice(R,1)}et(L,Pe.First,{sorted:!1})},[Ze.Backwards]:()=>{var x;et(b,Pe.Previous)===Ar.Error&&((x=a.button)==null||x.focus())}})}_()});return X.createElement(Rn.Provider,{value:n},C&&f&&X.createElement($t,{id:u,ref:a.beforePanelSentinel,features:_t.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:w}),Se({mergeRefs:m,ourProps:k,theirProps:o,slot:S,defaultTag:ep,features:tp,visible:C,name:"Popover.Panel"}),C&&f&&X.createElement($t,{id:p,ref:a.afterPanelSentinel,features:_t.Focusable,"data-headlessui-focus-guard":!0,as:"button",type:"button",onFocus:T}))}let np="div";function sp(e,t){let r=d.useRef(null),n=Ee(r,t),[s,o]=d.useState([]),a=Vd(),l=ee(m=>{o(y=>{let C=y.indexOf(m);if(C!==-1){let I=y.slice();return I.splice(C,1),I}return y})}),c=ee(m=>(o(y=>[...y,m]),()=>l(m))),f=ee(()=>{var m;let y=qr(r);if(!y)return!1;let C=y.activeElement;return(m=r.current)!=null&&m.contains(C)?!0:s.some(I=>{var S,k;return((S=y.getElementById(I.buttonId.current))==null?void 0:S.contains(C))||((k=y.getElementById(I.panelId.current))==null?void 0:k.contains(C))})}),u=ee(m=>{for(let y of s)y.buttonId.current!==m&&y.close()}),p=d.useMemo(()=>({registerPopover:c,unregisterPopover:l,isFocusWithinPopoverGroup:f,closeOthers:u,mainTreeNodeRef:a.mainTreeNodeRef}),[c,l,f,u,a.mainTreeNodeRef]),h=d.useMemo(()=>({}),[]),v=e,g={ref:n};return X.createElement(ro.Provider,{value:p},Se({ourProps:g,theirProps:v,slot:h,defaultTag:np,name:"Popover.Group"}),X.createElement(a.MainTreeNode,null))}let op=Ne(Vf),ip=Ne(Kf),ap=Ne(Xf),lp=Ne(rp),cp=Ne(sp),Mt=Object.assign(op,{Button:ip,Overlay:ap,Panel:lp,Group:cp}),Wa=d.createContext(null);function Ga(){let e=d.useContext(Wa);if(e===null){let t=new Error("You used a <Label /> component, but it is not inside a relevant parent.");throw Error.captureStackTrace&&Error.captureStackTrace(t,Ga),t}return e}function up(){let[e,t]=d.useState([]);return[e.length>0?e.join(" "):void 0,d.useMemo(()=>function(r){let n=ee(o=>(t(a=>[...a,o]),()=>t(a=>{let l=a.slice(),c=l.indexOf(o);return c!==-1&&l.splice(c,1),l}
40))),s=d.useMemo(()=>({register:n,slot:r.slot,name:r.name,props:r.props}),[n,r.slot,r.name,r.props]);return X.createElement(Wa.Provider,{value:s},r.children)},[t])]}let dp="label";function fp(e,t){let r=$e(),{id:n=`headlessui-label-${r}`,passive:s=!1,...o}=e,a=Ga(),l=Ee(t);Re(()=>a.register(n),[n,a.register]);let c={ref:l,...a.props,id:n};return s&&("onClick"in c&&(delete c.htmlFor,delete c.onClick),"onClick"in o&&delete o.onClick),Se({ourProps:c,theirProps:o,slot:a.slot||{},defaultTag:dp,name:a.name||"Label"})}let pp=Ne(fp),hp=Object.assign(pp,{});function mp(e=0){let[t,r]=d.useState(e),n=Gr(),s=d.useCallback(c=>{n.current&&r(f=>f|c)},[t,n]),o=d.useCallback(c=>!!(t&c),[t]),a=d.useCallback(c=>{n.current&&r(f=>f&~c)},[r,n]),l=d.useCallback(c=>{n.current&&r(f=>f^c)},[r]);return{flags:t,addFlag:s,hasFlag:o,removeFlag:a,toggleFlag:l}}let no=d.createContext(null);no.displayName="GroupContext";let gp=d.Fragment;function yp(e){var t;let[r,n]=d.useState(null),[s,o]=up(),[a,l]=Ha(),c=d.useMemo(()=>({switch:r,setSwitch:n,labelledby:s,describedby:a}),[r,n,s,a]),f={},u=e;return X.createElement(l,{name:"Switch.Description"},X.createElement(o,{name:"Switch.Label",props:{htmlFor:(t=c.switch)==null?void 0:t.id,onClick(p){r&&(p.currentTarget.tagName==="LABEL"&&p.preventDefault(),r.click(),r.focus({preventScroll:!0}))}}},X.createElement(no.Provider,{value:c},Se({ourProps:f,theirProps:u,defaultTag:gp,name:"Switch.Group"}))))}let xp="button";function vp(e,t){var r;let n=$e(),{id:s=`headlessui-switch-${n}`,checked:o,defaultChecked:a=!1,onChange:l,disabled:c=!1,name:f,value:u,form:p,...h}=e,v=d.useContext(no),g=d.useRef(null),m=Ee(g,t,v===null?null:v.setSwitch),[y,C]=Yu(o,l,a),I=ee(()=>C==null?void 0:C(!y)),S=ee(_=>{if(Wr(_.currentTarget))return _.preventDefault();_.preventDefault(),I()}),k=ee(_=>{_.key===me.Space?(_.preventDefault(),I()):_.key===me.Enter&&pd(_.currentTarget)}),O=ee(_=>_.preventDefault()),w=d.useMemo(()=>({checked:y}),[y]),T={id:s,ref:m,role:"switch",type:Ws(e,g),tabIndex:e.tabIndex===-1?0:(r=e.tabIndex)!=null?r:0,"aria-checked":y,"aria-labelledby":v==null?void 0:v.labelledby,"aria-describedby":v==null?void 0:v.describedby,disabled:c,onClick:S,onKeyUp:k,onKeyPress:O},b=pr();return d.useEffect(()=>{var _;let x=(_=g.current)==null?void 0:_.closest("form");x&&a!==void 0&&b.addEventListener(x,"reset",()=>{C(a)})},[g,C]),X.createElement(X.Fragment,null,f!=null&&y&&X.createElement($t,{features:_t.Hidden,...gs({as:"input",type:"checkbox",hidden:!0,readOnly:!0,disabled:c,form:p,checked:y,name:f,value:u})}),Se({ourProps:T,theirProps:h,slot:w,defaultTag:xp,name:"Switch"}))}let bp=Ne(vp),wp=yp,_p=Object.assign(bp,{Group:wp,Label:hp,Description:qa});function Sp(e){let t={called:!1};return(...r)=>{if(!t.called)return t.called=!0,e(...r)}}function ns(e,...t){e&&t.length>0&&e.classList.add(...t)}function ss(e,...t){e&&t.length>0&&e.classList.remove(...t)}function Np(e,t){let r=at();if(!e)return r.dispose;let{transitionDuration:n,transitionDelay:s}=getComputedStyle(e),[o,a]=[n,s].map(c=>{let[f=0]=c.split(",").filter(Boolean).map(u=>u.includes("ms")?parseFloat(u):parseFloat(u)*1e3).sort((u,p)=>p-u);return f}),l=o+a;if(l!==0){r.group(f=>{f.setTimeout(()=>{t(),f.dispose()},l),f.addEventListener(e,"transitionrun",u=>{u.target===u.currentTarget&&f.dispose()})});let c=r.addEventListener(e,"transitionend",f=>{f.target===f.currentTarget&&(t(),c())})}else t();return r.add(()=>t()),r.dispose}function jp(e,t,r,n){let s=r?"enter":"leave",o=at(),a=n!==void 0?Sp(n):()=>{};s==="enter"&&(e.removeAttribute("hidden"),e.style.display="");let l=ve(s,{enter:()=>t.enter,leave:()=>t.leave}),c=ve(s,{enter:()=>t.enterTo,leave:()=>t.leaveTo}),f=ve(s,{enter:()=>t.enterFrom,leave:()=>t.leaveFrom});return ss(e,...t.base,...t.enter,...t.enterTo,...t.enterFrom,...t.leave,...t.leaveFrom,...t.leaveTo,...t.entered),ns(e,...t.base,...l,...f),o.nextFrame(()=>{ss(e,...t.base,...l,...f),ns(e,...t.base,...l,...c),Np(e,()=>(ss(e,...t.base,...l),ns(e,...t.base,...t.entered),a()))}),o.dispose}function Cp({immediate:e,container:t,direction:r,classes:n,onStart:s,onStop:o}){let a=Gr(),l=pr(),c=ot(r);Re(()=>{e&&(c.current="enter")},[e]),Re(()=>{let f=at();l.add(f.dispose);let u=t.current;if(u&&c.current!=="idle"&&a.current)return f.dispose(),s.current(c.current),f.add(jp(u,n.current,c.current==="enter",()=>{f.dispose(),o.current(c.current)})),f.dispose},[r])}function Et(e=""){return e.split(/\s+/).filter(t=>t.length>1)}let Ln=d.createContext(null);Ln.displayName="TransitionContext";var Ep=(e=>(e.Visible="visible",e.Hidden="hidden",e))(Ep||{});function kp(){let e=d.useContext(Ln);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}function Ip(){let e=d.useContext(Pn);if(e===null)throw new Error("A <Transition.Child /> is used but it is missing a parent <Transition /> or <Transition.Root />.");return e}let Pn=d.createContext(null);Pn.displayName="NestingContext";function $n(e){return"children"in e?$n(e.children):e.current.filter(({el:t})=>t.current!==null).filter(({state:t})=>t==="visible").length>0}function Ya(e,t){let r=ot(e),n=d.useRef([]),s=Gr(),o=pr(),a=ee((v,g=At.Hidden)=>{let m=n.current.findIndex(({el:y})=>y===v);m!==-1&&(ve(g,{[At.Unmount](){n.current.splice(m,1)},[At.Hidden](){n.current[m].state="hidden"}}),o.microTask(()=>{var y;!$n(n)&&s.current&&((y=r.current)==null||y.call(r))}))}),l=ee(v=>{let g=n.current.find(({el:m})=>m===v);return g?g.state!=="visible"&&(g.state="visible"):n.current.push({el:v,state:"visible"}),()=>a(v,At.Unmount)}),c=d.useRef([]),f=d.useRef(Promise.resolve()),u=d.useRef({enter:[],leave:[],idle:[]}),p=ee((v,g,m)=>{c.current.splice(0),t&&(t.chains.current[g]=t.chains.current[g].filter(([y])=>y!==v)),t==null||t.chains.current[g].push([v,new Promise(y=>{c.current.push(y)})]),t==null||t.chains.current[g].push([v,new Promise(y=>{Promise.all(u.current[g].map(([C,I])=>I)).then(()=>y())})]),g==="enter"?f.current=f.current.then(()=>t==null?void 0:t.wait.current).then(()=>m(g)):m(g)}),h=ee((v,g,m)=>{Promise.all(u.current[g].splice(0).map(([y,C])=>C)).then(()=>{var y;(y=c.current.shift())==null||y()}).then(()=>m(g))});return d.useMemo(()=>({children:n,register:l,unregister:a,onStart:p,onStop:h,wait:f,chains:u}),[l,a,n,p,h,u,f])}function Mp(){}let Tp=["beforeEnter","afterEnter","beforeLeave","afterLeave"];function pi(e){var t;let r={};for(let n of Tp)r[n]=(t=e[n])!=null?t:Mp;return r}function Op(e){let t=d.useRef(pi(e));return d.useEffect(()=>{t.current=pi(e)},[e]),t}let Dp="div",Va=mt.RenderStrategy;function Ap(e,t){var r,n;
40let{beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l,enter:c,enterFrom:f,enterTo:u,entered:p,leave:h,leaveFrom:v,leaveTo:g,...m}=e,y=d.useRef(null),C=Ee(y,t),I=(r=m.unmount)==null||r?At.Unmount:At.Hidden,{show:S,appear:k,initial:O}=kp(),[w,T]=d.useState(S?"visible":"hidden"),b=Ip(),{register:_,unregister:x}=b;d.useEffect(()=>_(y),[_,y]),d.useEffect(()=>{if(I===At.Hidden&&y.current){if(S&&w!=="visible"){T("visible");return}return ve(w,{hidden:()=>x(y),visible:()=>_(y)})}},[w,y,_,x,S,I]);let j=ot({base:Et(m.className),enter:Et(c),enterFrom:Et(f),enterTo:Et(u),entered:Et(p),leave:Et(h),leaveFrom:Et(v),leaveTo:Et(g)}),M=Op({beforeEnter:s,afterEnter:o,beforeLeave:a,afterLeave:l}),$=hr();d.useEffect(()=>{if($&&w==="visible"&&y.current===null)throw new Error("Did you forget to passthrough the `ref` to the actual DOM node?")},[y,w,$]);let L=O&&!k,P=k&&S&&O,R=!$||L?"idle":S?"enter":"leave",H=mp(0),Y=ee(J=>ve(J,{enter:()=>{H.addFlag(Ce.Opening),M.current.beforeEnter()},leave:()=>{H.addFlag(Ce.Closing),M.current.beforeLeave()},idle:()=>{}})),z=ee(J=>ve(J,{enter:()=>{H.removeFlag(Ce.Opening),M.current.afterEnter()},leave:()=>{H.removeFlag(Ce.Closing),M.current.afterLeave()},idle:()=>{}})),V=Ya(()=>{T("hidden"),x(y)},b),G=d.useRef(!1);Cp({immediate:P,container:y,classes:j,direction:R,onStart:ot(J=>{G.current=!0,V.onStart(y,J,Y)}),onStop:ot(J=>{G.current=!1,V.onStop(y,J,z),J==="leave"&&!$n(V)&&(T("hidden"),x(y))})});let Q=m,K={ref:C};return P?Q={...Q,className:wn(m.className,...j.current.enter,...j.current.enterFrom)}:G.current&&(Q.className=wn(m.className,(n=y.current)==null?void 0:n.className),Q.className===""&&delete Q.className),X.createElement(Pn.Provider,{value:V},X.createElement(Vs,{value:ve(w,{visible:Ce.Open,hidden:Ce.Closed})|H.flags},Se({ourProps:K,theirProps:Q,defaultTag:Dp,features:Va,visible:w==="visible",name:"Transition.Child"})))}function Rp(e,t){let{show:r,appear:n=!1,unmount:s=!0,...o}=e,a=d.useRef(null),l=Ee(a,t);hr();let c=mr();if(r===void 0&&c!==null&&(r=(c&Ce.Open)===Ce.Open),![!0,!1].includes(r))throw new Error("A <Transition /> is used but it is missing a `show={true | false}` prop.");let[f,u]=d.useState(r?"visible":"hidden"),p=Ya(()=>{u("hidden")}),[h,v]=d.useState(!0),g=d.useRef([r]);Re(()=>{h!==!1&&g.current[g.current.length-1]!==r&&(g.current.push(r),v(!1))},[g,r]);let m=d.useMemo(()=>({show:r,appear:n,initial:h}),[r,n,h]);d.useEffect(()=>{if(r)u("visible");else if(!$n(p))u("hidden");else{let S=a.current;if(!S)return;let k=S.getBoundingClientRect();k.x===0&&k.y===0&&k.width===0&&k.height===0&&u("hidden")}},[r,p]);let y={unmount:s},C=ee(()=>{var S;h&&v(!1),(S=e.beforeEnter)==null||S.call(e)}),I=ee(()=>{var S;h&&v(!1),(S=e.beforeLeave)==null||S.call(e)});return X.createElement(Pn.Provider,{value:p},X.createElement(Ln.Provider,{value:m},Se({ourProps:{...y,as:d.Fragment,children:X.createElement(Qa,{ref:l,...y,...o,beforeEnter:C,beforeLeave:I})},theirProps:{},defaultTag:d.Fragment,features:Va,visible:f==="visible",name:"Transition"})))}function Lp(e,t){let r=d.useContext(Ln)!==null,n=mr()!==null;return X.createElement(X.Fragment,null,!r&&n?X.createElement(ws,{ref:t,...e}):X.createElement(Qa,{ref:t,...e}))}let ws=Ne(Rp),Qa=Ne(Ap),Pp=Ne(Lp),he=Object.assign(ws,{Child:Pp,Root:ws});function $p({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m4.5 12.75 6 6 9-13.5"}))}const Fp=d.forwardRef($p);function Up({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m19.5 8.25-7.5 7.5-7.5-7.5"}))}const Ka=d.forwardRef(Up);function Bp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m21 21-5.197-5.197m0 0A7.5 7.5 0 1 0 5.196 5.196a7.5 7.5 0 0 0 10.607 10.607Z"}))}const Fn=d.forwardRef(Bp);function Hp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15 10.5a3 3 0 1 1-6 0 3 3 0 0 1 6 0Z"}),d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M19.5 10.5c0 7.142-7.5 11.25-7.5 11.25S4.5 17.642 4.5 10.5a7.5 7.5 0 1 1 15 0Z"}))}const so=d.forwardRef(Hp);function qp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M5 12h14"}))}const oo=d.forwardRef(qp);function zp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M12 4.5v15m7.5-7.5h-15"}))}const io=d.forwardRef(zp);function Wp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 10.5V6a3.75 3.75 0 1 0-7.5 0v4.5m11.356-1.993 1.263 12c.07.665-.45 1.243-1.119 1.243H4.25a1.125 1.125 0 0 1-1.12-1.243l1.264-12A1.125 1.125 0 0 1 5.513 7.5
40h12.974c.576 0 1.059.435 1.119 1.007ZM8.625 10.5a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Zm7.5 0a.375.375 0 1 1-.75 0 .375.375 0 0 1 .75 0Z"}))}const ao=d.forwardRef(Wp);function Gp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"m14.74 9-.346 9m-4.788 0L9.26 9m9.968-3.21c.342.052.682.107 1.022.166m-1.022-.165L18.16 19.673a2.25 2.25 0 0 1-2.244 2.077H8.084a2.25 2.25 0 0 1-2.244-2.077L4.772 5.79m14.456 0a48.108 48.108 0 0 0-3.478-.397m-12 .562c.34-.059.68-.114 1.022-.165m0 0a48.11 48.11 0 0 1 3.478-.397m7.5 0v-.916c0-1.18-.91-2.164-2.09-2.201a51.964 51.964 0 0 0-3.32 0c-1.18.037-2.09 1.022-2.09 2.201v.916m7.5 0a48.667 48.667 0 0 0-7.5 0"}))}const lo=d.forwardRef(Gp);function Yp({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24",strokeWidth:1.5,stroke:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",d:"M15.75 6a3.75 3.75 0 1 1-7.5 0 3.75 3.75 0 0 1 7.5 0ZM4.501 20.118a7.5 7.5 0 0 1 14.998 0A17.933 17.933 0 0 1 12 21.75c-2.676 0-5.216-.584-7.499-1.632Z"}))}const Vp=d.forwardRef(Yp);function Qp(){const t=Ns().state==="loading",[r,n]=d.useState(!1),[s,o]=d.useState("idle"),a=d.useRef(),l=d.useRef();return d.useEffect(()=>(t?a.current=setTimeout(()=>{n(!0),o("growing")},150):s==="growing"?(clearTimeout(a.current),o("complete"),l.current=setTimeout(()=>{n(!1),o("idle")},400)):(clearTimeout(a.current),n(!1),o("idle")),()=>{clearTimeout(a.current),clearTimeout(l.current)}),[t]),r?i.jsxs("div",{className:"fixed top-0 left-0 right-0 z-50 h-[3px] pointer-events-none",role:"progressbar","aria-label":"Page loading",children:[i.jsx("div",{className:"h-full",style:{backgroundColor:"var(--cta-primary-500, #6366f1)",width:s==="complete"?"100%":void 0,transition:s==="complete"?"width 150ms ease-out, opacity 300ms ease-out 100ms":void 0,opacity:s==="complete"?0:1,...s==="growing"?{animation:"nav-progress 8s cubic-bezier(0.2, 0.8, 0.4, 1) forwards"}:{}}}),i.jsx("style",{children:` 41 @keyframes nav-progress { 42 0% { width: 0%; } 43 10% { width: 30%; } 44 30% { width: 60%; } 45 50% { width: 70%; } 46 70% { width: 80%; } 47 100% { width: 90%; } 48 } 49 `})]}):null}/** 50 * @license lucide-react v0.429.0 - ISC 51 * 52 * This source code is licensed under the ISC license. 53 * See the LICENSE file in the root directory of this source tree. 54 */const Kp=Fr("BadgeDollarSign",[["path",{d:"M3.85 8.62a4 4 0 0 1 4.78-4.77 4 4 0 0 1 6.74 0 4 4 0 0 1 4.78 4.78 4 4 0 0 1 0 6.74 4 4 0 0 1-4.77 4.78 4 4 0 0 1-6.75 0 4 4 0 0 1-4.78-4.77 4 4 0 0 1 0-6.76Z",key:"3c2336"}],["path",{d:"M16 8h-6a2 2 0 1 0 0 4h4a2 2 0 1 1 0 4H8",key:"1h4pet"}],["path",{d:"M12 18V6",key:"zqpxq5"}]]);/** 55 * @license lucide-react v0.429.0 - ISC 56 * 57 * This source code is licensed under the ISC license. 58 * See the LICENSE file in the root directory of this source tree. 59 */const Za=Fr("ChevronUp",[["path",{d:"m18 15-6-6-6 6",key:"153udz"}]]);/** 60 * @license lucide-react v0.429.0 - ISC 61 * 62 * This source code is licensed under the ISC license. 63 * See the LICENSE file in the root directory of this source tree. 64 */const Zp=Fr("PartyPopper",[["path",{d:"M5.8 11.3 2 22l10.7-3.79",key:"gwxi1d"}],["path",{d:"M4 3h.01",key:"1vcuye"}],["path",{d:"M22 8h.01",key:"1mrtc2"}],["path",{d:"M15 2h.01",key:"1cjtqr"}],["path",{d:"M22 20h.01",key:"1mrys2"}],["path",{d:"m22 2-2.24.75a2.9 2.9 0 0 0-1.96 3.12c.1.86-.57 1.63-1.45 1.63h-.38c-.86 0-1.6.6-1.76 1.44L14 10",key:"hbicv8"}],["path",{d:"m22 13-.82-.33c-.86-.34-1.82.2-1.98 1.11c-.11.7-.72 1.22-1.43 1.22H17",key:"1i94pl"}],["path",{d:"m11 2 .33.82c.34.86-.2 1.82-1.11 1.98C9.52 4.9 9 5.52 9 6.23V7",key:"1cofks"}],["path",{d:"M11 13c1.93 1.93 2.83 4.17 2 5-.83.83-3.07-.07-5-2-1.93-1.93-2.83-4.17-2-5 .83-.83 3.07.07 5 2Z",key:"4kbmks"}]]);/** 65 * @license lucide-react v0.429.0 - ISC 66 * 67 * This source code is licensed under the ISC license. 68 * See the LICENSE file in the root directory of this source tree. 69 */const Jp=Fr("Search",[["circle",{cx:"11",cy:"11",r:"8",key:"4ej97u"}],["path",{d:"m21 21-4.3-4.3",key:"1qie3q"}]]);/** 70 * @license lucide-react v0.429.0 - ISC 71 * 72 * This source code is licensed under the ISC license. 73 * See the LICENSE file in the root directory of this source tree. 74 */const Xp=Fr("ShoppingBasket",[["path",{d:"m15 11-1 9",key:"5wnq3a"}],["path",{d:"m19 11-4-7",key:"cnml18"}],["path",{d:"M2 11h20",key:"3eubbj"}],["path",{d:"m3.5 11 1.6 7.4a2 2 0 0 0 2 1.6h9.8a2 2 0 0 0 2-1.6l1.7-7.4",key:"yiazzp"}],["path",{d:"M4.5 15.5h15",key:"13mye1"}],["path",{d:"m5 11 4-7",key:"116ra9"}],["path",{d:"m9 11 1 9",key:"1ojof7"}]]);function eh(e,t){let r;return(...n)=>{clearTimeout(r),r=setTimeout(()=>{e(...n)},t)}}const hi="pp_ga_last_engagement_ts",th="pp_ga_prev_engagement_ts";function cr(e){if(typeof window>"u")return!1;try{window.dataLayer=window.dataLayer||[],"ecommerce"in e&&window.dataLayer.push({ecommerce:null}),window.dataLayer.push(e)}catch(t){return console.warn("[gtmPush] dataLayer push failed:",t),!1}try{const t=Date.now(),r=window.sessionStorage.getItem(hi);r!=null&&window.sessionStorage.setItem(th,r),window.sessionStorage.setItem(hi,String(t))}catch(t){console.warn("[gtmPush] sessionStorage write failed:",t)}return!0}const Rr=(e,t)=>
74{var r;try{(r=ze==null?void 0:ze.track)==null||r.call(ze,e,t)}catch{console.error(`Failed to track ${e}:`,"Mixpanel disabled")}},Ja=()=>{var e;try{(e=ze==null?void 0:ze.start_session_recording)==null||e.call(ze)}catch{console.error("Failed to start session:","Mixpanel disabled")}},tg=()=>{var e;try{(e=ze==null?void 0:ze.stop_session_recording)==null||e.call(ze)}catch{console.error("Failed to stop session:","Mixpanel disabled")}},qt=99,Un=(e,t,r,n,s,o,a)=>{const{addToCart:l,adjustQuantity:c,carts:f}=Je(),[u,p]=d.useState(e),[h,v]=d.useState(!1),[g,m]=d.useState(!1),[y,C]=d.useState(null),I=d.useRef(null),S=d.useRef(null),k=d.useRef(t);k.current=t;const O=d.useRef(c);O.current=c;const w=d.useRef(f);w.current=f;const T=d.useCallback((L,P)=>{var ue,Z,te,q,E,D,A;if(P<=0)return;const R=(Z=(ue=f==null?void 0:f.find(U=>{var F;return((F=U==null?void 0:U.merchant)==null?void 0:F.storeID)===n}))==null?void 0:ue.cartLines)==null?void 0:Z.find(U=>{var F;return r?(U==null?void 0:U.id)===r:((F=U==null?void 0:U.merchandise)==null?void 0:F.id)===t}),H=((te=R==null?void 0:R.merchandise)==null?void 0:te.id)??(o==null?void 0:o.itemId)??t??"Not provided",Y=((q=R==null?void 0:R.merchandise)==null?void 0:q.name)??(o==null?void 0:o.itemName)??"Not provided",z=((E=R==null?void 0:R.merchandise)==null?void 0:E.size)??(o==null?void 0:o.itemVariant),V=((A=(D=R==null?void 0:R.cost)==null?void 0:D.amountPerQuantity)==null?void 0:A.amount)??(o==null?void 0:o.unitPrice)??0,G=new Ge(V).toDecimalPlaces(2).toNumber(),Q=o==null?void 0:o.compareAtPrice,K=Q!=null?new Ge(Q).toDecimalPlaces(2).toNumber():void 0,J={id:H,item_id:H,item_name:Y,price:G,item_variant:z??void 0,quantity:P,google_business_vertical:"retail"};if(K!=null&&(J.compare_at_price=K),cr({event:L,ecommerce:{currency:"USD",value:new Ge(G).mul(P).toDecimalPlaces(2).toNumber(),items:[J]}}),L==="add_to_cart"){const U={id:H,name:Y,price:G,quantity:P,metadata:(o==null?void 0:o.mixpanelMetadata)??null};K!=null&&(U.compareAtPrice=K),z!=null&&(U.itemVariant=z),Rr("Add to Cart",U)}},[o,r,f,n,t]),b=d.useRef(T);b.current=T;const _=d.useCallback(eh((L,P,R,H,Y)=>{(async()=>{try{const z=await O.current(L,P,R,H,Y);z.success&&z.quantityDelta!=null&&z.quantityDelta!==0&&(z.quantityDelta>0?b.current("add_to_cart",z.quantityDelta):b.current("remove_from_cart",Math.abs(z.quantityDelta)))}finally{m(!1)}})()},500),[]),x=d.useRef(t);d.useEffect(()=>{const L=x.current!==t;x.current=t,!(h&&!L)&&p(e)},[h,e,t]),d.useEffect(()=>{if(!y)return;const L=setTimeout(()=>C(null),2e3);return()=>clearTimeout(L)},[y]);const j=L=>{var z,V,G;if(L&&(I.current=L),((f==null?void 0:f.reduce((Q,K)=>{var J;return Q+(((J=K==null?void 0:K.cartLines)==null?void 0:J.reduce((ue,Z)=>ue+((Z==null?void 0:Z.quantity)??0),0))??0)},0))??0)+1>qt){C("Maximum quantity reached");return}const R=L??n,H=((G=(V=(z=f==null?void 0:f.find(Q=>{var K;return((K=Q.merchant)==null?void 0:K.storeID)===R}))==null?void 0:z.cartLines)==null?void 0:V.find(Q=>{var K;return((K=Q.merchandise)==null?void 0:K.id)===t}))==null?void 0:G.quantity)??u,Y=Math.min(H+1,qt);S.current={variantId:t,merchantId:R,requestKey:s,previousQuantity:H,optimisticQuantity:Y},p(Y),v(!0)};d.useEffect(()=>{var Y,z,V;let L,P=!1;const R=new AbortController,H=async()=>{const G=S.current,Q=(G==null?void 0:G.variantId)??t,K=I.current??(G==null?void 0:G.merchantId)??n,J=(G==null?void 0:G.requestKey)??s,ue=(G==null?void 0:G.previousQuantity)??0,Z=`add-${J}`;I.current=null,S.current=null;try{const te=await l(Q,1,K,Z,[],void 0,()=>{P||p(ue)},R.signal);if(P)return;const q=Q===k.current;if(te.success)T("add_to_cart",1),q&&p((G==null?void 0:G.optimisticQuantity)??1);else{const E=te.errorCode==="CART_QUANTITY_MAXIMUM_EXCEEDED"||te.errorCode==="CART_LINE_QUANTITY_MAXIMUM_EXCEEDED"?"Maximum quantity reached":"Item not available";q&&C(E)}}catch(te){P||(console.error("Failed to add to cart:",te),Q===k.current&&C("Failed to add item to cart"))}finally{P||(v(!1),clearTimeout(L))}};if(h){const G=S.current,Q=(G==null?void 0:G.variantId)??t,K=I.current??(G==null?void 0:G.merchantId)??n,J=(V=(z=(Y=w.current)==null?void 0:Y.find(Z=>{var te;return((te=Z.merchant)==null?void 0:te.storeID)===K}))==null?void 0:z.cartLines)==null?void 0:V.find(Z=>{var te;return((te=Z.merchandise)==null?void 0:te.id)===Q});J&&J.quantity>0&&J.id?(async()=>{const q=`add-${(G==null?void 0:G.requestKey)??s}`,E=J.quantity+1,D=(G==null?void 0:G.previousQuantity)??J.quantity;I.current=null,S.current=null;try{const A=await O.current(Q,J.id,E,K,q);if(P)return;
74A.success?(b.current("add_to_cart",1),Q===k.current&&p(E)):Q===k.current&&(p(D),C(A.errorCode==="CART_QUANTITY_MAXIMUM_EXCEEDED"?"Maximum quantity reached":"Item not available"))}catch(A){P||(console.error("Failed to increment cart line:",A),Q===k.current&&(p(D),C("Failed to add item to cart")))}finally{P||(v(!1),clearTimeout(L))}})():H(),L=setTimeout(()=>{P||v(!1)},5e3)}return()=>{P=!0,R.abort(),clearTimeout(L),typeof window<"u"&&R.signal.aborted&&queueMicrotask(()=>{window.dispatchEvent(new CustomEvent("cart.add.abort",{detail:{variantId:t}}))})}},[h]);const M=d.useCallback(()=>{var z,V,G;C(null);const L=a!=null?Math.min(a,qt):qt;if(u>=L){C(a!=null&&a<qt?`Only ${a} available in stock`:`Maximum quantity is ${qt}`);return}const P=(f==null?void 0:f.reduce((Q,K)=>{var J;return Q+(((J=K==null?void 0:K.cartLines)==null?void 0:J.reduce((ue,Z)=>ue+((Z==null?void 0:Z.quantity)??0),0))??0)},0))??0,R=((G=(V=(z=f==null?void 0:f.find(Q=>{var K;return((K=Q.merchant)==null?void 0:K.storeID)===n}))==null?void 0:z.cartLines)==null?void 0:V.find(Q=>{var K;return r?Q.id===r:((K=Q.merchandise)==null?void 0:K.id)===t}))==null?void 0:G.quantity)??0,H=u+1;if(P-R+H>qt){C("Maximum quantity reached");return}p(H),_(t,r,H,n,`adjust-${s}`)},[f,r,u,a,t,n,s,_]),$=d.useCallback(()=>{C(null);const L=Math.max(0,u-1);p(L),L===0&&m(!0),_(t,r,L,n,`adjust-${s}`)},[u,t,n,r,s,_]);return{localQuantity:u,addLoading:h,removeLoading:g,quantityError:y,setQuantityError:C,onQuickAdd:j,onIncrement:M,onDecrement:$}};function co(e){const{selectedStore:t}=Ue();return(t==null?void 0:t.storeId)??e??void 0}const rh=({product:e,to:t,className:r="",border:n=!1,addToCartCallback:s,maxStockQuantity:o})=>{var $,L,P,R,H,Y,z,V;const{inFlightRequests:a,carts:l,ready:c}=Je(),{selectedStore:f}=Ue(),u=Fe(),{defaultAvailableVariant:p}=e??{},h=co(($=p==null?void 0:p.store)==null?void 0:$.storeID)??"",v=((L=p==null?void 0:p.store)==null?void 0:L.storeID)??null,g=!!(f&&(!v||f.storeId!==v)),m=`${p==null?void 0:p.id}-${h}`,C=!u||!!f?(P=l.find(G=>{var Q;return((Q=G==null?void 0:G.merchant)==null?void 0:Q.storeID)===h}))==null?void 0:P.cartLines.find(G=>{var Q;return((Q=G==null?void 0:G.merchandise)==null?void 0:Q.id)===(p==null?void 0:p.id)}):void 0,{localQuantity:I,addLoading:S,removeLoading:k,quantityError:O,setQuantityError:w,onQuickAdd:T,onIncrement:b,onDecrement:_}=Un((C==null?void 0:C.quantity)??0,(p==null?void 0:p.id)??"",(C==null?void 0:C.id)??"",h,m,{itemId:(p==null?void 0:p.id)??"Not provided",itemName:(p==null?void 0:p.name)??"Not provided",unitPrice:Number(((R=p==null?void 0:p.price)==null?void 0:R.amount)??0),compareAtPrice:Number(((H=p==null?void 0:p.compareAtPrice)==null?void 0:H.amount)??0),itemVariant:(p==null?void 0:p.size)!=null?String(p.size):"Not provided",mixpanelMetadata:{type:"COLLECTION_PAGE",store:(p==null?void 0:p.store)??null}},o),x=()=>{g||(T(),s==null||s())},j=!c||S||k||g||((Y=a==null?void 0:a.current)==null?void 0:Y.has(`add-${m}`))||((z=a==null?void 0:a.current)==null?void 0:z.has(`adjust-${m}`)),M=n?"lg:px-6 px-3 py-4 border border-collection-atc-border":"lg:px-6 px-3 py-4";
74return!p||((V=e==null?void 0:e.modifierGroup)==null?void 0:V.length)>0?i.jsx(xe,{className:"w-full",viewTransition:!0,to:t,prefetch:"intent",children:i.jsx("div",{className:`${M} w-full h-[52px] font-medium p-4 text-center text-collection-atc-text`,children:i.jsx("span",{className:"text-collection-atc-text lg:text-sm text-xs transition ease-in-out font-medium uppercase lg:tracking-[4px] tracking-[2px] lg:-translate-x-4 group-hover:translate-x-1 duration-200",children:"View Product"})})}):I<=0||S?i.jsxs("div",{className:"relative w-full flex flex-col items-center gap-1",children:[i.jsxs("button",{className:`group ${M} border-collection-atc-border hover:bg-atc-background-hover min-h-[52px] transition ease-in-out flex justify-center items-center gap-3 duration-300 border lg:mt-4 relative ${r} ${(S||k||!c)&&"opacity-30"}`,onClick:x,disabled:j,"aria-label":"Add to Cart",children:[i.jsx(Xp,{className:"hidden lg:flex opacity-0 h-5 w-5 transition text-collection-atc-text duration-300 group-hover:opacity-100 group-hover:-translate-x-1"}),i.jsx("span",{className:"text-collection-atc-text lg:text-sm text-xs transition ease-in-out font-medium uppercase lg:tracking-[4px] tracking-[2px] lg:-translate-x-4 group-hover:translate-x-1 duration-200",children:g?"Unavailable":"Add to Cart"})]}),S&&i.jsx("div",{className:"absolute top-2 left-0 w-full h-full flex items-center justify-center z-[1]",children:i.jsx(Pr,{className:"w-4 h-4 animate-spin text-collection-atc-text"})}),i.jsx(Ke,{initial:!1,children:O&&!S&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-500 text-xs text-center leading-tight",children:O})})]}):i.jsxs("div",{className:"flex flex-col items-center gap-1 max-w-[100%]",children:[i.jsxs("div",{className:`flex justify-between w-full items-center gap-6 h-[50px] lg:mt-4 border-collection-atc-border border ${j?"opacity-50":""} ${O?"border-red-300":""}`,children:[i.jsx("button",{type:"button",className:"h-full p-2 px-4 transition-all hover:bg-atc-background-hover disabled:opacity-50 disabled:cursor-not-allowed",onClick:_,disabled:j,"aria-label":I<=1?"Remove from cart":"Decrement quantity",children:I<=1?i.jsx(lo,{className:"lg:w-6 lg:h-6 w-4 h-4 text-collection-price"}):i.jsx(oo,{className:"lg:w-6 lg:h-6 w-4 h-4 text-collection-price"})}),i.jsx("div",{className:"flex items-center justify-center h-8 w-8",children:i.jsx("p",{className:"font-semibold text-center text-collection-price",children:I})}),i.jsx("button",{type:"button",className:"h-full p-2 px-4 transition-all hover:bg-atc-background-hover disabled:opacity-50 disabled:cursor-not-allowed",onClick:b,disabled:j||I>=99,"aria-label":"Increment quantity",children:i.jsx(io,{className:"lg:w-6 lg:h-6 w-4 h-4 text-collection-price"})})]}),i.jsx(Ke,{initial:!1,children:O&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-500 text-xs text-center leading-tight",children:O})})]})},Xa="(max-width: 767px)",nh=e=>{if(typeof window>"u")return()=>{};const t=window.matchMedia(Xa);return t.addEventListener("change",e),()=>t.removeEventListener("change",e)},sh=()=>typeof window>"u"?!1:window.matchMedia(Xa).matches,oh=()=>!1,ih=()=>d.useSyncExternalStore(nh,sh,oh),ah=({isOpen:e,children:t,onClose:r})=>i.jsx(he,{appear:!0,show:e,as:d.Fragment,children:i.jsxs(Te,{as:"div",className:"relative z-10",onClose:r,children:[i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx("div",{className:"fixed inset-0 bg-black/25"})}),i.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:i.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:i.jsxs(Te.Panel,{className:"w-full max-w-xl transform overflow-hidden bg-white text-left align-middle shadow-xl transition-all",children:[t,i.jsx("button",{"data-testid":"close-modal",onClick:r,className:"hidden","aria-label":"Close modal",children:"Close"})]})})})})]})}),lh=({product:e,variantOverride:t})=>{var O,w,T,b,_;const{carts:r}=Je(),{selectedStore:n}=Ue(),s=Fe(),{defaultAvailableVariant:o}=e??{},a=t??o,l=(t==null?void 0:t.merchantId)??((O=o==null?void 0:o.store)==null?void 0:O.storeID),c=(t==null?void 0:t.merchantName)??((w=o==null?void 0:o.store)==null?void 0:w.storeName),f=co(l)??"",u=l??null,p=!!(n&&(!u||n.storeId!==u)),h=`${a==null?void 0:a.id}-${f}`,g=!s||!!n?(T=r.find(x=>{var j;return((j=x==null?void 0:x.merchant)==null?void 0:j.storeID)===f}))==null?void 0:T.cartLines.find(x=>{var j;return((j=x==null?void 0:x.merchandise)==null?void 0:j.id)===(a==null?void 0:a.id)}):void 0,{localQuantity:m,onQuickAdd:y,onIncrement:C,quantityError:I,setQuantityError:S}=Un((g==null?void 0:g.quantity)??0,a==null?void 0:a.id,(g==null?void 0:g.id)??"",f,h,{itemId:(a==null?void 0:a.id)??"Not provided",itemName:(a==null?void 0:a.name)??"Not provided",unitPrice:Number(((b=a==null?void 0:a.price)==null?void 0:b.amount)??0),compareAtPrice:Number(((_=a==null?void 0:a.compareAtPrice)==null?void 0:_.amount)??0),itemVariant:(a==null?void 0:a.size)!=null?String(a.size):"Not provided",mixpanelMetadata:{type:"COLLECTION_PAGE",store:l?{storeID:l,storeName:c}:null}}),k=()=>{p||!a||(m===0?y():C())};return i.jsxs("div",{className:"absolute top-2 right-2 flex flex-col items-end gap-1",children:[i.jsx(_e,{type:"button",onClick:k,className:"p-2 h-fit shadow-md hover:shadow-lg transition-shadow","aria-label":"Add to cart",disabled:p||!a,children:i.jsx(Pl,{className:"w-4 h-4"})}),i.jsx(Ke,{initial:!1,children:I&&i.jsx(pe.div,{initial:{opacity:0,height:0}
74,animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-600 text-xs bg-white/90 px-2 py-1 rounded shadow",children:I})})]})};function ch(e){const t=Fe(),{selectedStore:r}=Ue(),n=t?!r:!1,s=d.useMemo(()=>!r||!e?null:e.find(l=>l.storeID===r.storeId)??null,[r,e]),o=d.useMemo(()=>{if(!s||s.continueSellingWhenOutOfStock)return null;const l=s.stockCount;return l!=null&&l>0&&l<5?l:null},[s]),a=d.useMemo(()=>{if(!s||s.continueSellingWhenOutOfStock)return 99;const l=s.stockCount;return l!=null&&l>0?l:l===0?0:99},[s]);return{isUnifiedMode:n,selectedStoreEntry:s,lowStockCount:o,maxQuantity:a}}function uh({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M3 6.75A.75.75 0 0 1 3.75 6h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 6.75ZM3 12a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75A.75.75 0 0 1 3 12Zm0 5.25a.75.75 0 0 1 .75-.75h16.5a.75.75 0 0 1 0 1.5H3.75a.75.75 0 0 1-.75-.75Z",clipRule:"evenodd"}))}const dh=d.forwardRef(uh);function fh({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"m11.54 22.351.07.04.028.016a.76.76 0 0 0 .723 0l.028-.015.071-.041a16.975 16.975 0 0 0 1.144-.742 19.58 19.58 0 0 0 2.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 0 0-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 0 0 2.682 2.282 16.975 16.975 0 0 0 1.145.742ZM12 13.5a3 3 0 1 0 0-6 3 3 0 0 0 0 6Z",clipRule:"evenodd"}))}const el=d.forwardRef(fh);function ph({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M7.5 6v.75H5.513c-.96 0-1.764.724-1.865 1.679l-1.263 12A1.875 1.875 0 0 0 4.25 22.5h15.5a1.875 1.875 0 0 0 1.865-2.071l-1.263-12a1.875 1.875 0 0 0-1.865-1.679H16.5V6a4.5 4.5 0 1 0-9 0ZM12 3a3 3 0 0 0-3 3v.75h6V6a3 3 0 0 0-3-3Zm-3 8.25a3 3 0 1 0 6 0v-.75a.75.75 0 0 1 1.5 0v.75a4.5 4.5 0 1 1-9 0v-.75a.75.75 0 0 1 1.5 0v.75Z",clipRule:"evenodd"}))}const tl=d.forwardRef(ph);function hh({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M12 2.25c-5.385 0-9.75 4.365-9.75 9.75s4.365 9.75 9.75 9.75 9.75-4.365 9.75-9.75S17.385 2.25 12 2.25Zm-1.72 6.97a.75.75 0 1 0-1.06 1.06L10.94 12l-1.72 1.72a.75.75 0 1 0 1.06 1.06L12 13.06l1.72 1.72a.75.75 0 1 0 1.06-1.06L13.06 12l1.72-1.72a.75.75 0 1 0-1.06-1.06L12 10.94l-1.72-1.72Z",clipRule:"evenodd"}))}const mh=d.forwardRef(hh);function gh({title:e,titleId:t,...r},n){return d.createElement("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true","data-slot":"icon",ref:n,"aria-labelledby":t},r),e?d.createElement("title",{id:t},e):null,d.createElement("path",{fillRule:"evenodd",d:"M5.47 5.47a.75.75 0 0 1 1.06 0L12 10.94l5.47-5.47a.75.75 0 1 1 1.06 1.06L13.06 12l5.47 5.47a.75.75 0 1 1-1.06 1.06L12 13.06l-5.47 5.47a.75.75 0 0 1-1.06-1.06L10.94 12 5.47 6.53a.75.75 0 0 1 0-1.06Z",clipRule:"evenodd"}))}const uo=d.forwardRef(gh);var rl={exports:{}};(function(e,t){(function(r){e.exports=r()})(function(){return function r(n,s,o){function a(f,u){if(!s[f]){if(!n[f]){var p=typeof Xr=="function"&&Xr;if(!u&&p)return p(f,!0);if(l)return l(f,!0);throw new Error("Cannot find module '"+f+"'")}u=s[f]={exports:{}},n[f][0].call(u.exports,function(h){var v=n[f][1][h];return a(v||h)},u,u.exports,r,n,s,o)}return s[f].exports}for(var l=typeof Xr=="function"&&Xr,c=0;c<o.length;c++)a(o[c]);return a}({1:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){var g=r("crypto");function m(w,T){T=I(w,T);var b;return(b=T.algorithm!=="passthrough"?g.createHash(T.algorithm):new O).write===void 0&&(b.write=b.update,b.end=b.update),k(T,b).dispatch(w),b.update||b.end(""),b.digest?b.digest(T.encoding==="buffer"?void 0:T.encoding):(w=b.read(),T.encoding!=="buffer"?w.toString(T.encoding):w)}(s=n.exports=m).sha1=function(w){return m(w)},s.keys=function(w){return m(w,{excludeValues:!0,algorithm:"sha1",encoding:"hex"})},s.MD5=function(w){return m(w,{algorithm:"md5",encoding:"hex"})},s.keysMD5=function(w){return m(w,{algorithm:"md5",encoding:"hex",excludeValues:!0})};var y=g.getHashes?g.getHashes().slice():["sha1","md5"],C=(y.push("passthrough"),["buffer","hex","binary","base64"]);function I(w,T){var b={};if(b.algorithm=(T=T||{}).algorithm||"sha1",b.encoding=T.encoding||"hex",b.excludeValues=!!T.excludeValues,b.algorithm=b.algorithm.toLowerCase(),b.encoding=b.encoding.toLowerCase(),b.ignoreUnknown=T.ignoreUnknown===!0,b.respectType=T.respectType!==!1,b.respectFunctionNames=T.respectFunctionNames!==!1,b.respectFunctionProperties=T.respectFunctionProperties!==!1,b.unorderedArrays=T.unorderedArrays===!0,b.unorderedSets=T.unorderedSets!==!1,b.unorderedObjects=T.unorderedObjects!==!1,b.replacer=T.replacer||void 0,b.excludeKeys=T.excludeKeys||void 0,w===void 0)throw new Error("Object argument required.");for(var _=0;_<y.length;++_)y[_].toLowerCase()===b.algorithm.toLowerCase()&&(b.algorithm=y[_]);if(y.indexOf(b.algorithm)===-1)throw new Error('Algorithm "'+b.algorithm+'" not supported. supported values: '+y.join(", "));if(C.indexOf(b.encoding)===-1&&b.algorithm!=="passthrough")throw new Error('Encoding "'+b.encoding+'" not supported. supported values: '+C.join(", "));return b}function S(w){if(typeof w=="function")return/^function\s+\w*\s*\(\s*\)\s*{\s+\[native code\]\s+}$/i.exec(Function.prototype.toString.call(w))!=null}function k(w,T,b){b=b||[];function _(x){return T.update?T.update(x,"utf8"):T.write(x,"utf8")}return{dispatch:function(x){return this["_"+((x=w.replacer?w.replacer(x):x)===null?"null":typeof x)](x)},_object:function(x){var j,M=Object.prototype.toString.call(x),$=/\[object (.*)\]/i.exec(M);if($=($=$?$[1]:"unknown:["+M+"]").toLowerCase(),0<=(M=b.indexOf(x)))return this.dispatch("[CIRCULAR:"+M+"]");if(b.push(x),l!==void 0&&l.isBuffer&&l.isBuffer(x))return _("buffer:"),_(x);if($==="object"||$==="function"||$==="asyncfunction")return M=Object.keys(x),w.unorderedObjects&&(M=M.sort()),w.respectType===!1||S(x)||M.splice(0,0,"prototype","__proto__","constructor"),w.excludeKeys&&(M=M.filter(function(L){return!w.excludeKeys(L)})),_("object:"+M.length+":"),j=this,M.forEach(function(L){j.dispatch(L),_(":"),w.excludeValues||j.dispatch(x[L]),_(",")});if(!this["_"+$]){if(w.ignoreUnknown)return _("["+$+"]");throw new Error('Unknown object type "'+$+'"')}this["_"+$](x)},_array:function(x,L){L=L!==void 0?L:w.unorderedArrays!==!1;var M=this;if(_("array:"+x.length+":"),!L||x.length<=1)return x.forEach(function(P){return M.dispatch(P)});var $=[],L=x.map(function(P){var R=new O,H=b.slice();return k(w,R,H).dispatch(P),$=$.concat(H.slice(b.length)),R.read().toString()});return b=b.concat($),L.sort(),this._array(L,!1)},_date:function(x){return _("date:"+x.toJSON())},_symbol:function(x){return _("symbol:"+x.toString())},_error:function(x){return _("error:"+x.toString())},_boolean:function(x){return _("bool:"+x.toString())}
vendor: 4,168 bytes, lines 74-77
74,_string:function(x){_("string:"+x.length+":"),_(x.toString())},_function:function(x){_("fn:"),S(x)?this.dispatch("[native]"):this.dispatch(x.toString()),w.respectFunctionNames!==!1&&this.dispatch("function-name:"+String(x.name)),w.respectFunctionProperties&&this._object(x)},_number:function(x){return _("number:"+x.toString())},_xml:function(x){return _("xml:"+x.toString())},_null:function(){return _("Null")},_undefined:function(){return _("Undefined")},_regexp:function(x){return _("regex:"+x.toString())},_uint8array:function(x){return _("uint8array:"),this.dispatch(Array.prototype.slice.call(x))},_uint8clampedarray:function(x){return _("uint8clampedarray:"),this.dispatch(Array.prototype.slice.call(x))},_int8array:function(x){return _("int8array:"),this.dispatch(Array.prototype.slice.call(x))},_uint16array:function(x){return _("uint16array:"),this.dispatch(Array.prototype.slice.call(x))},_int16array:function(x){return _("int16array:"),this.dispatch(Array.prototype.slice.call(x))},_uint32array:function(x){return _("uint32array:"),this.dispatch(Array.prototype.slice.call(x))},_int32array:function(x){return _("int32array:"),this.dispatch(Array.prototype.slice.call(x))},_float32array:function(x){return _("float32array:"),this.dispatch(Array.prototype.slice.call(x))},_float64array:function(x){return _("float64array:"),this.dispatch(Array.prototype.slice.call(x))},_arraybuffer:function(x){return _("arraybuffer:"),this.dispatch(new Uint8Array(x))},_url:function(x){return _("url:"+x.toString())},_map:function(x){return _("map:"),x=Array.from(x),this._array(x,w.unorderedSets!==!1)},_set:function(x){return _("set:"),x=Array.from(x),this._array(x,w.unorderedSets!==!1)},_file:function(x){return _("file:"),this.dispatch([x.name,x.size,x.type,x.lastModfied])},_blob:function(){if(w.ignoreUnknown)return _("[blob]");throw Error(`Hashing Blob objects is currently not supported 75(see https://github.com/puleos/object-hash/issues/26) 76Use "options.replacer" or "options.ignoreUnknown" 77`)},_domwindow:function(){return _("domwindow")},_bigint:function(x){return _("bigint:"+x.toString())},_process:function(){return _("process")},_timer:function(){return _("timer")},_pipe:function(){return _("pipe")},_tcp:function(){return _("tcp")},_udp:function(){return _("udp")},_tty:function(){return _("tty")},_statwatcher:function(){return _("statwatcher")},_securecontext:function(){return _("securecontext")},_connection:function(){return _("connection")},_zlib:function(){return _("zlib")},_context:function(){return _("context")},_nodescript:function(){return _("nodescript")},_httpparser:function(){return _("httpparser")},_dataview:function(){return _("dataview")},_signal:function(){return _("signal")},_fsevent:function(){return _("fsevent")},_tlswrap:function(){return _("tlswrap")}}}function O(){return{buf:"",write:function(w){this.buf+=w},end:function(w){this.buf+=w},read:function(){return this.buf}}}s.writeToStream=function(w,T,b){return b===void 0&&(b=T,T={}),k(T=I(w,T),b).dispatch(w)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/fake_9a5aa49d.js","/")},{buffer:3,crypto:5,lYpoI2:11}],2:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){(function(g){var m=typeof Uint8Array<"u"?Uint8Array:Array,y=43,C=47,I=48,S=97,k=65,O=45,w=95;function T(b){return b=b.charCodeAt(0),b===y||b===O?62:b===C||b===w?63:b<I?-1:b<I+10?b-I+26+26:b<k+26?b-k:b<S+26?b-S+26:void 0}g.toByteArray=function(b){var _,x;if(0<b.length%4)throw new Error("Invalid string. Length must be a multiple of 4");var j=b.length,j=b.charAt(j-2)==="="?2:b.charAt(j-1)==="="?1:0,M=new m(3*b.length/4-j),$=0<j?b.length-4:b.length,L=0;function P(R){M[L++]=R}for(_=0;_<$;_+=4,0)P((16711680&(x=T(b.charAt(_))<<18|T(b.charAt(_+1))<<12|T(b.charAt(_+2))<<6|T(b.charAt(_+3))))>>16),P((65280&x)>>8),P(255&x);return j==2?P(255&(x=T(b.charAt(_))<<2|T(b.charAt(_+1))>>4)):j==1&&(P((x=T(b.charAt(_))<<10|T(b.charAt(_+1))<<4|T(b.charAt(_+2))>>2)>>8&255),P(255&x)),M},g.fromByteArray=function(b){var _,x,j,M,$=b.length%3,L="";function P(R){return"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
77+/".charAt(R)}for(_=0,j=b.length-$;_<j;_+=3)x=(b[_]<<16)+(b[_+1]<<8)+b[_+2],L+=P((M=x)>>18&63)+P(M>>12&63)+P(M>>6&63)+P(63&M);switch($){case 1:L=(L+=P((x=b[b.length-1])>>2))+P(x<<4&63)+"==";break;case 2:L=(L=(L+=P((x=(b[b.length-2]<<8)+b[b.length-1])>>10))+P(x>>4&63))+P(x<<2&63)+"="}return L}})(s===void 0?this.base64js={}:s)}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/base64-js/lib/b64.js","/node_modules/gulp-browserify/node_modules/base64-js/lib")},{buffer:3,lYpoI2:11}],3:[function(r,n,s){(function(o,a,y,c,f,u,p,h,v){var g=r("base64-js"),m=r("ieee754");function y(E,D,A){if(!(this instanceof y))return new y(E,D,A);var U,F,W,ne,re=typeof E;if(D==="base64"&&re=="string")for(E=(ne=E).trim?ne.trim():ne.replace(/^\s+|\s+$/g,"");E.length%4!=0;)E+="=";if(re=="number")U=Y(E);else if(re=="string")U=y.byteLength(E,D);else{if(re!="object")throw new Error("First argument needs to be a number, array or string.");U=Y(E.length)}if(y._useTypedArrays?F=y._augment(new Uint8Array(U)):((F=this).length=U,F._isBuffer=!0),y._useTypedArrays&&typeof E.byteLength=="number")F._set(E);else if(z(ne=E)||y.isBuffer(ne)||ne&&typeof ne=="object"&&typeof ne.length=="number")for(W=0;W<U;W++)y.isBuffer(E)?F[W]=E.readUInt8(W):F[W]=E[W];else if(re=="string")F.write(E,0,D);else if(re=="number"&&!y._useTypedArrays&&!A)for(W=0;W<U;W++)F[W]=0;return F}function C(E,D,A,U){return y._charsWritten=K(function(F){for(var W=[],ne=0;ne<F.length;ne++)W.push(255&F.charCodeAt(ne));return W}(D),E,A,U)}function I(E,D,A,U){return y._charsWritten=K(function(F){for(var W,ne,re=[],we=0;we<F.length;we++)ne=F.charCodeAt(we),W=ne>>8,ne=ne%256,re.push(ne),re.push(W);return re}(D),E,A,U)}function S(E,D,A){var U="";A=Math.min(E.length,A);for(var F=D;F<A;F++)U+=String.fromCharCode(E[F]);return U}function k(E,D,A,W){W||(q(typeof A=="boolean","missing or invalid endian"),q(D!=null,"missing offset"),q(D+1<E.length,"Trying to read beyond buffer length"));var F,W=E.length;if(!(W<=D))return A?(F=E[D],D+1<W&&(F|=E[D+1]<<8)):(F=E[D]<<8,D+1<W&&(F|=E[D+1])),F}function O(E,D,A,W){W||(q(typeof A=="boolean","missing or invalid endian"),q(D!=null,"missing offset"),q(D+3<E.length,"Trying to read beyond buffer length"));var F,W=E.length;if(!(W<=D))return A?(D+2<W&&(F=E[D+2]<<16),D+1<W&&(F|=E[D+1]<<8),F|=E[D],D+3<W&&(F+=E[D+3]<<24>>>0)):(D+1<W&&(F=E[D+1]<<16),D+2<W&&(F|=E[D+2]<<8),D+3<W&&(F|=E[D+3]),F+=E[D]<<24>>>0),F}function w(E,D,A,U){if(U||(q(typeof A=="boolean","missing or invalid endian"),q(D!=null,"missing offset"),q(D+1<E.length,"Trying to read beyond buffer length")),!(E.length<=D))return U=k(E,D,A,!0),32768&U?-1*(65535-U+1):U}function T(E,D,A,U){if(U||(q(typeof A=="boolean","missing or invalid endian"),q(D!=null,"missing offset"),q(D+3<E.length,"Trying to read beyond buffer length")),!(E.length<=D))return U=O(E,D,A,!0),2147483648&U?-1*(4294967295-U+1):U}function b(E,D,A,U){return U||(q(typeof A=="boolean","missing or invalid endian"),q(D+3<E.length,"Trying to read beyond buffer length")),m.read(E,D,A,23,4)}function _(E,D,A,U){return U||(q(typeof A=="boolean","missing or invalid endian"),q(D+7<E.length,"Trying to read beyond buffer length")),m.read(E,D,A,52,8)}function x(E,D,A,U,F){if(F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+1<E.length,"trying to write beyond buffer length"),ue(D,65535)),F=E.length,!(F<=A))for(var W=0,ne=Math.min(F-A,2);W<ne;W++)E[A+W]=(D&255<<8*(U?W:1-W))>>>8*(U?W:1-W)}function j(E,D,A,U,F){if(F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+3<E.length,"trying to write beyond buffer length"),ue(D,4294967295)),F=E.length,!(F<=A))for(var W=0,ne=Math.min(F-A,4);W<ne;W++)E[A+W]=D>>>8*(U?W:3-W)&255}function M(E,D,A,U,F){F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+1<E.length,"Trying to write beyond buffer length"),Z(D,32767,-32768)),E.length<=A||x(E,0<=D?D:65535+D+1,A,U,F)}function $(E,D,A,U,F){F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+3<E.length,"Trying to write beyond buffer length"),Z(D,2147483647,-2147483648)),E.length<=A||j(E,0<=D?D:4294967295+D+1,A,U,F)}function L(E,D,A,U,F){F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+3<E.length,"Trying to write beyond buffer length"),te(D,34028234663852886e22,-34028234663852886e22)),E.length<=A||m.write(E,D,A,U,23,4)}function P(E,D,A,U,F){F||(q(D!=null,"missing value"),q(typeof U=="boolean","missing or invalid endian"),q(A!=null,"missing offset"),q(A+7<E.length,"Trying to write beyond buffer length"),te(D,17976931348623157e292,-17976931348623157e292)),E.length<=A||m.write(E,D,A,U,52,8)}s.Buffer=y,s.SlowBuffer=y,s.INSPECT_MAX_BYTES=50,y.poolSize=8192,y._useTypedArrays=function(){try{var E=new ArrayBuffer(0),D=new Uint8Array(E);return D.foo=function(){return 42},D.foo()===42&&typeof D.subarray=="function"}catch{return!1}}(),y.isEncoding=function(E){switch(String(E).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"raw":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},y.isBuffer=function(E){return!(E==null||!E._isBuffer)},y.byteLength=function(E,D){var A;switch(E+="",D||"utf8"){case"hex":A=E.length/2;break;case"utf8":case"utf-8":A=G(E).length;break;case"ascii":case"binary":case"raw":A=E.length;break;case"base64":A=Q(E).length;break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":A=2*E.length;break;default:throw new Error("Unknown encoding")}return A},y.concat=function(E,D){if(q(z(E),`Usage: Buffer.concat(list, [totalLength]) 78list should be an Array.`),E.length===0)return new y(0);if(E.length===1)return E[0];if(typeof D!="number")for(F=D=0;F<E.length;F++)D+=E[F].length;for(var A=new y(D),U=0,F=0;F<E.length;F++){var W=E[F];W.copy(A,U),U+=W.length}return A}
vendor: 16,719 bytes, lines 78-79
78,y.prototype.write=function(E,D,A,U){isFinite(D)?isFinite(A)||(U=A,A=void 0):(we=U,U=D,D=A,A=we),D=Number(D)||0;var F,W,ne,re,we=this.length-D;switch((!A||we<(A=Number(A)))&&(A=we),U=String(U||"utf8").toLowerCase()){case"hex":F=function(Be,He,Le,Me){Le=Number(Le)||0;var je=Be.length-Le;(!Me||je<(Me=Number(Me)))&&(Me=je),q((je=He.length)%2==0,"Invalid hex string"),je/2<Me&&(Me=je/2);for(var gt=0;gt<Me;gt++){var gr=parseInt(He.substr(2*gt,2),16);q(!isNaN(gr),"Invalid hex string"),Be[Le+gt]=gr}return y._charsWritten=2*gt,gt}(this,E,D,A);break;case"utf8":case"utf-8":W=this,ne=D,re=A,F=y._charsWritten=K(G(E),W,ne,re);break;case"ascii":case"binary":F=C(this,E,D,A);break;case"base64":W=this,ne=D,re=A,F=y._charsWritten=K(Q(E),W,ne,re);break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":F=I(this,E,D,A);break;default:throw new Error("Unknown encoding")}return F},y.prototype.toString=function(E,D,A){var U,F,W,ne,re=this;if(E=String(E||"utf8").toLowerCase(),D=Number(D)||0,(A=A!==void 0?Number(A):re.length)===D)return"";switch(E){case"hex":U=function(we,Be,He){var Le=we.length;(!Be||Be<0)&&(Be=0),(!He||He<0||Le<He)&&(He=Le);for(var Me="",je=Be;je<He;je++)Me+=V(we[je]);return Me}(re,D,A);break;case"utf8":case"utf-8":U=function(we,Be,He){var Le="",Me="";He=Math.min(we.length,He);for(var je=Be;je<He;je++)we[je]<=127?(Le+=J(Me)+String.fromCharCode(we[je]),Me=""):Me+="%"+we[je].toString(16);return Le+J(Me)}(re,D,A);break;case"ascii":case"binary":U=S(re,D,A);break;case"base64":F=re,ne=A,U=(W=D)===0&&ne===F.length?g.fromByteArray(F):g.fromByteArray(F.slice(W,ne));break;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":U=function(we,Be,He){for(var Le=we.slice(Be,He),Me="",je=0;je<Le.length;je+=2)Me+=String.fromCharCode(Le[je]+256*Le[je+1]);return Me}(re,D,A);break;default:throw new Error("Unknown encoding")}return U},y.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}},y.prototype.copy=function(E,D,A,U){if(D=D||0,(U=U||U===0?U:this.length)!==(A=A||0)&&E.length!==0&&this.length!==0){q(A<=U,"sourceEnd < sourceStart"),q(0<=D&&D<E.length,"targetStart out of bounds"),q(0<=A&&A<this.length,"sourceStart out of bounds"),q(0<=U&&U<=this.length,"sourceEnd out of bounds"),U>this.length&&(U=this.length);var F=(U=E.length-D<U-A?E.length-D+A:U)-A;if(F<100||!y._useTypedArrays)for(var W=0;W<F;W++)E[W+D]=this[W+A];else E._set(this.subarray(A,A+F),D)}},y.prototype.slice=function(E,D){var A=this.length;if(E=H(E,A,0),D=H(D,A,A),y._useTypedArrays)return y._augment(this.subarray(E,D));for(var U=D-E,F=new y(U,void 0,!0),W=0;W<U;W++)F[W]=this[W+E];return F},y.prototype.get=function(E){return console.log(".get() is deprecated. Access using array indexes instead."),this.readUInt8(E)},y.prototype.set=function(E,D){return console.log(".set() is deprecated. Access using array indexes instead."),this.writeUInt8(E,D)},y.prototype.readUInt8=function(E,D){if(D||(q(E!=null,"missing offset"),q(E<this.length,"Trying to read beyond buffer length")),!(E>=this.length))return this[E]},y.prototype.readUInt16LE=function(E,D){return k(this,E,!0,D)},y.prototype.readUInt16BE=function(E,D){return k(this,E,!1,D)},y.prototype.readUInt32LE=function(E,D){return O(this,E,!0,D)},y.prototype.readUInt32BE=function(E,D){return O(this,E,!1,D)},y.prototype.readInt8=function(E,D){if(D||(q(E!=null,"missing offset"),q(E<this.length,"Trying to read beyond buffer length")),!(E>=this.length))return 128&this[E]?-1*(255-this[E]+1):this[E]},y.prototype.readInt16LE=function(E,D){return w(this,E,!0,D)},y.prototype.readInt16BE=function(E,D){return w(this,E,!1,D)},y.prototype.readInt32LE=function(E,D){return T(this,E,!0,D)},y.prototype.readInt32BE=function(E,D){return T(this,E,!1,D)},y.prototype.readFloatLE=function(E,D){return b(this,E,!0,D)},y.prototype.readFloatBE=function(E,D){return b(this,E,!1,D)},y.prototype.readDoubleLE=function(E,D){return _(this,E,!0,D)},y.prototype.readDoubleBE=function(E,D){return _(this,E,!1,D)},y.prototype.writeUInt8=function(E,D,A){A||(q(E!=null,"missing value"),q(D!=null,"missing offset"),q(D<this.length,"trying to write beyond buffer length"),ue(E,255)),D>=this.length||(this[D]=E)},y.prototype.writeUInt16LE=function(E,D,A){x(this,E,D,!0,A)},y.prototype.writeUInt16BE=function(E,D,A){x(this,E,D,!1,A)},y.prototype.writeUInt32LE=function(E,D,A){j(this,E,D,!0,A)},y.prototype.writeUInt32BE=function(E,D,A){j(this,E,D,!1,A)},y.prototype.writeInt8=function(E,D,A){A||(q(E!=null,"missing value"),q(D!=null,"missing offset"),q(D<this.length,"Trying to write beyond buffer length"),Z(E,127,-128)),D>=this.length||(0<=E?this.writeUInt8(E,D,A):this.writeUInt8(255+E+1,D,A))},y.prototype.writeInt16LE=function(E,D,A){M(this,E,D,!0,A)},y.prototype.writeInt16BE=function(E,D,A){M(this,E,D,!1,A)},y.prototype.writeInt32LE=function(E,D,A){$(this,E,D,!0,A)},y.prototype.writeInt32BE=function(E,D,A){$(this,E,D,!1,A)},y.prototype.writeFloatLE=function(E,D,A){L(this,E,D,!0,A)},y.prototype.writeFloatBE=function(E,D,A){L(this,E,D,!1,A)},y.prototype.writeDoubleLE=function(E,D,A){P(this,E,D,!0,A)},y.prototype.writeDoubleBE=function(E,D,A){P(this,E,D,!1,A)},y.prototype.fill=function(E,D,A){if(D=D||0,A=A||this.length,q(typeof(E=typeof(E=E||0)=="string"?E.charCodeAt(0):E)=="number"&&!isNaN(E),"value is not a number"),q(D<=A,"end < start"),A!==D&&this.length!==0){q(0<=D&&D<this.length,"start out of bounds"),q(0<=A&&A<=this.length,"end out of bounds");for(var U=D;U<A;U++)this[U]=E}},y.prototype.inspect=function(){for(var E=[],D=this.length,A=0;A<D;A++)if(E[A]=V(this[A]),A===s.INSPECT_MAX_BYTES){E[A+1]="...";break}return"<Buffer "+E.join(" ")+">"},y.prototype.toArrayBuffer=function(){if(typeof Uint8Array>"u")throw new Error("Buffer.toArrayBuffer not supported in this browser");if(y._useTypedArrays)return new y(this).buffer;for(var E=new Uint8Array(this.length),D=0,A=E.length;D<A;D+=1)E[D]=this[D];return E.buffer};var R=y.prototype;function H(E,D,A){return typeof E!="number"?A:D<=(E=~~E)?D:0<=E||0<=(E+=D)?E:0}function Y(E){return(E=~~Math.ceil(+E))<0?0:E}function z(E){return(Array.isArray||function(D){return Object.prototype.toString.call(D)==="[object Array]"})(E)}function V(E){return E<16?"0"+E.toString(16):E.toString(16)}function G(E){for(var D=[],A=0;A<E.length;A++){var U=E.charCodeAt(A);if(U<=127)D.push(E.charCodeAt(A));else for(var F=A,W=(55296<=U&&U<=57343&&A++,encodeURIComponent(E.slice(F,A+1)).substr(1).split("%")),ne=0;ne<W.length;ne++)D.push(parseInt(W[ne],16))}return D}function Q(E){return g.toByteArray(E)}function K(E,D,A,U){for(var F=0;F<U&&!(F+A>=D.length||F>=E.length);F++)D[F+A]=E[F];return F}function J(E){try{return decodeURIComponent(E)}catch{return"�"}}function ue(E,D){q(typeof E=="number","cannot write a non-number as a number"),q(0<=E,"specified a negative value for writing an unsigned value"),q(E<=D,"value is larger than maximum value for type"),q(Math.floor(E)===E,"value has a fractional component")}function Z(E,D,A){q(typeof E=="number","cannot write a non-number as a number"),q(E<=D,"value larger than maximum allowed value"),q(A<=E,"value smaller than minimum allowed value"),q(Math.floor(E)===E,"value has a fractional component")}function te(E,D,A){q(typeof E=="number","cannot write a non-number as a number"),q(E<=D,"value larger than maximum allowed value"),q(A<=E,"value smaller than minimum allowed value")}function q(E,D){if(!E)throw new Error(D||"Failed assertion")}y._augment=function(E){return E._isBuffer=!0,E._get=E.get,E._set=E.set,E.get=R.get,E.set=R.set,E.write=R.write,E.toString=R.toString,E.toLocaleString=R.toString,E.toJSON=R.toJSON,E.copy=R.copy,E.slice=R.slice,E.readUInt8=R.readUInt8,E.readUInt16LE=R.readUInt16LE,E.readUInt16BE=R.readUInt16BE,E.readUInt32LE=R.readUInt32LE,E.readUInt32BE=R.readUInt32BE,E.readInt8=R.readInt8,E.readInt16LE=R.readInt16LE,E.readInt16BE=R.readInt16BE,E.readInt32LE=R.readInt32LE,E.readInt32BE=R.readInt32BE,E.readFloatLE=R.readFloatLE,E.readFloatBE=R.readFloatBE,E.readDoubleLE=R.readDoubleLE,E.readDoubleBE=R.readDoubleBE,E.writeUInt8=R.writeUInt8,E.writeUInt16LE=R.writeUInt16LE,E.writeUInt16BE=R.writeUInt16BE,E.writeUInt32LE=R.writeUInt32LE,E.writeUInt32BE=R.writeUInt32BE,E.writeInt8=R.writeInt8,E.writeInt16LE=R.writeInt16LE,E.writeInt16BE=R.writeInt16BE,E.writeInt32LE=R.writeInt32LE,E.writeInt32BE=R.writeInt32BE,E.writeFloatLE=R.writeFloatLE,E.writeFloatBE=R.writeFloatBE,E.writeDoubleLE=R.writeDoubleLE,E.writeDoubleBE=R.writeDoubleBE,E.fill=R.fill,E.inspect=R.inspect,E.toArrayBuffer=R.toArrayBuffer,E}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/buffer/index.js","/node_modules/gulp-browserify/node_modules/buffer")},{"base64-js":2,buffer:3,ieee754:10,lYpoI2:11}],4:[function(r,n,s){(function(o,a,g,c,f,u,p,h,v){var g=r("buffer").Buffer,m=4,y=new g(m);y.fill(0),n.exports={hash:function(C,I,S,k){for(var O=I(function(x,j){x.length%m!=0&&(M=x.length+(m-x.length%m),x=g.concat([x,y],M));for(var M,$=[],L=j?x.readInt32BE:x.readInt32LE,P=0;P<x.length;P+=m)$.push(L.call(x,P));return $}(C=g.isBuffer(C)?C:new g(C),k),8*C.length),I=k,w=new g(S),T=I?w.writeInt32BE:w.writeInt32LE,b=0;b<O.length;b++)T.call(w,O[b],4*b,!0);return w}}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/helpers.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],5:[function(r,n,s){(function(o,a,g,c,f,u,p,h,v){var g=r("buffer").Buffer,m=r("./sha"),y=r("./sha256"),C=r("./rng"),I={sha1:m,sha256:y,md5:r("./md5")},S=64,k=new g(S);function O(x,j){var M=I[x=x||"sha1"],$=[];return M||w("algorithm:",x,"is not yet supported"),{update:function(L){return g.isBuffer(L)||(L=new g(L)),$.push(L),L.length,this},digest:function(L){var P=g.concat($),P=j?function(R,H,Y){g.isBuffer(H)||(H=new g(H)),g.isBuffer(Y)||(Y=new g(Y)),H.length>S?H=R(H):H.length<S&&(H=g.concat([H,k],S));for(var z=new g(S),V=new g(S),G=0;G<S;G++)z[G]=54^H[G],V[G]=92^H[G];return Y=R(g.concat([z,Y])),R(g.concat([V,Y]))}(M,j,P):M(P);return $=null,L?P.toString(L):P}}}function w(){var x=[].slice.call(arguments).join(" ");throw new Error([x,"we accept pull requests","http://github.com/dominictarr/crypto-browserify"].join(` 79`))}k.fill(0),s.createHash=function(x){return O(x)},s.createHmac=O,s.randomBytes=function(x,j){if(!j||!j.call)return new g(C(x));try{j.call(this,void 0,new g(C(x)))}catch(M){j(M)}};var T,b=["createCredentials","createCipher","createCipheriv","createDecipher","createDecipheriv","createSign","createVerify","createDiffieHellman","pbkdf2"],_=function(x){s[x]=function(){w("sorry,",x,"is not implemented yet")}};for(T in b)_(b[T])}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/index.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./md5":6,"./rng":7,"./sha":8,"./sha256":9,buffer:3,lYpoI2:11}],6:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){var g=r("./helpers");function m(w,T){w[T>>5]|=128<<T%32,w[14+(T+64>>>9<<4)]=T;for(var b=1732584193,_=-271733879,x=-1732584194,j=271733878,M=0;M<w.length;M+=16){var $=b,L=_,P=x,R=j,b=C(b,_,x,j,w[M+0],7,-680876936),j=C(j,b,_,x,w[M+1],12,-389564586),x=C(x,j,b,_,w[M+2],17,606105819),_=C(_,x,j,b,w[M+3],22,-1044525330);b=C(b,_,x,j,w[M+4],7,-176418897),j=C(j,b,_,x,w[M+5],12,1200080426),x=C(x,j,b,_,w[M+6],17,-1473231341),_=C(_,x,j,b,w[M+7],22,-45705983),b=C(b,_,x,j,w[M+8],7,1770035416),j=C(j,b,_,x,w[M+9],12,-1958414417),x=C(x,j,b,_,w[M+10],17,-42063),_=C(_,x,j,b,w[M+11],22,-1990404162),b=C(b,_,x,j,w[M+12],7,1804603682),j=C(j,b,_,x,w[M+13],12,-40341101),x=C(x,j,b,_,w[M+14],17,-1502002290),b=I(b,_=C(_,x,j,b,w[M+15],22,1236535329),x,j,w[M+1],5,-165796510),j=I(j,b,_,x,w[M+6],9,-1069501632),x=I(x,j,b,_,w[M+11],14,643717713),_=I(_,x,j,b,w[M+0],20,-373897302),b=I(b,_,x,j,w[M+5],5,-701558691),j=I(j,b,_,x,w[M+10],9,38016083),x=I(x,j,b,_,w[M+15],14,-660478335),_=I(_,x,j,b,w[M+4],20,-405537848),b=I(b,_,x,j,w[M+9],5,568446438),j=I(j,b,_,x,w[M+14],9,-1019803690),x=I(x,j,b,_,w[M+3],14,-187363961),_=I(_,x,j,b,w[M+8],20,1163531501),b=I(b,_,x,j,w[M+13],5,-1444681467),j=I(j,b,_,x,w[M+2],9,-51403784),x=I(x,j,b,_,w[M+7],14,1735328473),b=S(b,_=I(_,x,j,b,w[M+12],20,-1926607734),x,j,w[M+5],4,-378558),j=S(j,b,_,x,w[M+8],11,-2022574463),x=S(x,j,b,_,w[M+11],16,1839030562),_=S(_,x,j,b,w[M+14],23,-35309556),b=S(b,_,x,j,w[M+1],4,-1530992060),j=S(j,b,_,x,w[M+4],11,1272893353),x=S(x,j,b,_,w[M+7],16,-155497632),_=S(_,x,j,b,w[M+10],23,-1094730640),b=S(b,_,x,j,w[M+13],4,681279174),j=S(j,b,_,x,w[M+0],11,-358537222),x=S(x,j,b,_,w[M+3],16,-722521979),_=S(_,x,j,b,w[M+6],23,76029189),b=S(b,_,x,j,w[M+9],4,-640364487),j=S(j,b,_,x,w[M+12],11,-421815835),x=S(x,j,b,_,w[M+15],16,530742520),b=k(b,_=S(_,x,j,b,w[M+2],23,-995338651),x,j,w[M+0],6,-198630844),j=k(j,b,_,x,w[M+7],10,1126891415),x=k(x,j,b,_,w[M+14],15,-1416354905),_=k(_,x,j,b,w[M+5],21,-57434055),b=k(b,_,x,j,w[M+12],6,1700485571),j=k(j,b,_,x,w[M+3],10,-1894986606),x=k(x,j,b,_,w[M+10],15,-1051523),_=k(_,x,j,b,w[M+1],21,-2054922799),b=k(b,_,x,j,w[M+8],6,1873313359),j=k(j,b,_,x,w[M+15],10,-30611744),x=k(x,j,b,_,w[M+6],15,-1560198380),_=k(_,x,j,b,w[M+13],21,1309151649),b=k(b,_,x,j,w[M+4],6,-145523070),j=k(j,b,_,x,w[M+11],10,-1120210379),x=k(x,j,b,_,w[M+2],15,718787259),_=k(_,x,j,b,w[M+9],21,-343485551),b=O(b,$),_=O(_,L),x=O(x,P),j=O(j,R)}return Array(b,_,x,j)}function y(w,T,b,_,x,j){return O((T=O(O(T,w),O(_,j)))<<x|T>>>32-x,b)}function C(w,T,b,_,x,j,M){return y(T&b|~T&_,w,T,x,j,M)}function I(w,T,b,_,x,j,M){return y(T&_|b&~_,w,T,x,j,M)}function S(w,T,b,_,x,j,M){return y(T^b^_,w,T,x,j,M)}function k(w,T,b,_,x,j,M){return y(b^(T|~_),w,T,x,j,M)}function O(w,T){var b=(65535&w)+(65535&T);return(w>>16)+(T>>16)+(b>>16)<<16|65535&b}n.exports=function(w){return g.hash(w,m,16)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/md5.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],7:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){n.exports=function(g){for(var m,y=new Array(g),C=0;C<g;C++)!(3&C)&&(m=4294967296*Math.random()),y[C]=m>>>((3&C)<<3)&255;return y}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/rng.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{buffer:3,lYpoI2:11}],8:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){var g=r("./helpers");function m(I,S){I[S>>5]|=128<<24-S%32,I[15+(S+64>>9<<4)]=S;for(var k,O,w,T=Array(80),b=1732584193,_=-271733879,x=-1732584194,j=271733878,M=-1009589776,$=0;$<I.length;$+=16){for(var L=b,P=_,R=x,H=j,Y=M,z=0;z<80;z++){T[z]=z<16?I[$+z]:C(T[z-3]^T[z-8]^T[z-14]^T[z-16],1);var V=y(y(C(b,5),(V=_,O=x,w=j,(k=z)<20?V&O|~V&w:!(k<40)&&k<60?V&O|V&w|O&w:V^O^w)),y(y(M,T[z]),(k=z)<20?1518500249:k<40?1859775393:k<60?-1894007588:-899497514)),M=j,j=x,x=C(_,30),_=b,b=V}b=y(b,L),_=y(_,P),x=y(x,R),j=y(j,H),M=y(M,Y)}return Array(b,_,x,j,M)}function y(I,S){var k=(65535&I)+(65535&S);return(I>>16)+(S>>16)+(k>>16)<<16|65535&k}function C(I,S){return I<<S|I>>>32-S}n.exports=function(I){return g.hash(I,m,20,!0)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],9:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){function g(S,k){var O=(65535&S)+(65535&k);return(S>>16)+(k>>16)+(O>>16)<<16|65535&O}function m(S,k){var O,w=new Array(1116352408,1899447441,3049323471,3921009573,961987163,1508970993,2453635748,2870763221,3624381080,310598401,607225278,1426881987,1925078388,2162078206,2614888103,3248222580,3835390401,4022224774,264347078,604807628,770255983,1249150122,1555081692,1996064986,2554220882,2821834349,2952996808,3210313671,3336571891,3584528711,113926993,338241895,666307205,773529912,1294757372,1396182291,1695183700,1986661051,2177026350,2456956037,2730485921,2820302411,3259730800,3345764771,3516065817,3600352804,4094571909,275423344,430227734,506948616,659060556,883997877,958139571,1322822218,1537002063,1747873779,1955562222,2024104815,2227730452,2361852424,2428436474,2756
79734187,3204031479,3329325298),T=new Array(1779033703,3144134277,1013904242,2773480762,1359893119,2600822924,528734635,1541459225),b=new Array(64);S[k>>5]|=128<<24-k%32,S[15+(k+64>>9<<4)]=k;for(var _,x,j=0;j<S.length;j+=16){for(var M=T[0],$=T[1],L=T[2],P=T[3],R=T[4],H=T[5],Y=T[6],z=T[7],V=0;V<64;V++)b[V]=V<16?S[V+j]:g(g(g((x=b[V-2],C(x,17)^C(x,19)^I(x,10)),b[V-7]),(x=b[V-15],C(x,7)^C(x,18)^I(x,3))),b[V-16]),O=g(g(g(g(z,C(x=R,6)^C(x,11)^C(x,25)),R&H^~R&Y),w[V]),b[V]),_=g(C(_=M,2)^C(_,13)^C(_,22),M&$^M&L^$&L),z=Y,Y=H,H=R,R=g(P,O),P=L,L=$,$=M,M=g(O,_);T[0]=g(M,T[0]),T[1]=g($,T[1]),T[2]=g(L,T[2]),T[3]=g(P,T[3]),T[4]=g(R,T[4]),T[5]=g(H,T[5]),T[6]=g(Y,T[6]),T[7]=g(z,T[7])}return T}var y=r("./helpers"),C=function(S,k){return S>>>k|S<<32-k},I=function(S,k){return S>>>k};n.exports=function(S){return y.hash(S,m,32,!0)}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/crypto-browserify/sha256.js","/node_modules/gulp-browserify/node_modules/crypto-browserify")},{"./helpers":4,buffer:3,lYpoI2:11}],10:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){s.read=function(g,m,y,C,j){var S,k,O=8*j-C-1,w=(1<<O)-1,T=w>>1,b=-7,_=y?j-1:0,x=y?-1:1,j=g[m+_];for(_+=x,S=j&(1<<-b)-1,j>>=-b,b+=O;0<b;S=256*S+g[m+_],_+=x,b-=8);for(k=S&(1<<-b)-1,S>>=-b,b+=C;0<b;k=256*k+g[m+_],_+=x,b-=8);if(S===0)S=1-T;else{if(S===w)return k?NaN:1/0*(j?-1:1);k+=Math.pow(2,C),S-=T}return(j?-1:1)*k*Math.pow(2,S-C)},s.write=function(g,m,y,C,I,M){var k,O,w=8*M-I-1,T=(1<<w)-1,b=T>>1,_=I===23?Math.pow(2,-24)-Math.pow(2,-77):0,x=C?0:M-1,j=C?1:-1,M=m<0||m===0&&1/m<0?1:0;for(m=Math.abs(m),isNaN(m)||m===1/0?(O=isNaN(m)?1:0,k=T):(k=Math.floor(Math.log(m)/Math.LN2),m*(C=Math.pow(2,-k))<1&&(k--,C*=2),2<=(m+=1<=k+b?_/C:_*Math.pow(2,1-b))*C&&(k++,C/=2),T<=k+b?(O=0,k=T):1<=k+b?(O=(m*C-1)*Math.pow(2,I),k+=b):(O=m*Math.pow(2,b-1)*Math.pow(2,I),k=0));8<=I;g[y+x]=255&O,x+=j,O/=256,I-=8);for(k=k<<I|O,w+=I;0<w;g[y+x]=255&k,x+=j,k/=256,w-=8);g[y+x-j]|=128*M}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/ieee754/index.js","/node_modules/gulp-browserify/node_modules/ieee754")},{buffer:3,lYpoI2:11}],11:[function(r,n,s){(function(o,a,l,c,f,u,p,h,v){var g,m,y;function C(){}(o=n.exports={}).nextTick=(m=typeof window<"u"&&window.setImmediate,y=typeof window<"u"&&window.postMessage&&window.addEventListener,m?function(I){return window.setImmediate(I)}:y?(g=[],window.addEventListener("message",function(I){var S=I.source;S!==window&&S!==null||I.data!=="process-tick"||(I.stopPropagation(),0<g.length&&g.shift()())},!0),function(I){g.push(I),window.postMessage("process-tick","*")}):function(I){setTimeout(I,0)}),o.title="browser",o.browser=!0,o.env={},o.argv=[],o.on=C,o.addListener=C,o.once=C,o.off=C,o.removeListener=C,o.removeAllListeners=C,o.emit=C,o.binding=function(I){throw new Error("process.binding is not supported")},o.cwd=function(){return"/"},o.chdir=function(I){throw new Error("process.chdir is not supported")}}).call(this,r("lYpoI2"),typeof self<"u"?self:typeof window<"u"?window:{},r("buffer").Buffer,arguments[3],arguments[4],arguments[5],arguments[6],"/node_modules/gulp-browserify/node_modules/process/browser.js","/node_modules/gulp-browserify/node_modules/process")},{buffer:3,lYpoI2:11}]},{},[1])(1)})})(rl);var yh=rl.exports;const Jt=Ml(yh);function an(e,t){return{storeID:e,storeName:t,price:{amount:0,amountInt:0,currencyCode:Ir.Usd,presentation:""},deliveryFee:{amount:0,amountInt:0,currencyCode:Ir.Usd,presentation:"$0.00"},fulfillmentOptions:[],isAvailable:!1,reasonForUnavailability:"This item is not available at this store"}}const nl=d.createContext({product:null,variants:[],stores:[],defaultVariant:null,selectedVariant:null,selectedStore:null,isUnifiedMode:!0,variantsToMedia:new Map,setStores:()=>{},setSelectedStore:()=>{},setSelectedVariant:()=>{}}),mi=(e,t,r,n)=>{var f,u,p,h,v,g,m,y,C,I;let s=null,o=[],a=null;const l=S=>{var k;return S.isAvailable===!0&&(!(n!=null&&n.storeId)||((k=S.store)==null?void 0:k.storeID)===n.storeId)},c=((f=e==null?void 0:e.variants.edges.find(S=>S.node.availability.some(l)))==null?void 0:f.node)??null;if(c){o=((u=c.availability)==null?void 0:u.filter(k=>{var O;return!(n!=null&&n.storeId)||((O=k.store)==null?void 0:O.storeID)===n.storeId}).map(k=>{var O,w;return{deliveryFee:k.deliveryFee,price:k.price,storeID:((O=k.store)==null?void 0:O.storeID)??"",storeName:((w=k.store)==null?void 0:w.storeName)??"",fulfillmentOptions:(k==null?void 0:k.fulfillmentOptions)??[],isAvailable:k.isAvailable,reasonForUnavailability:k.reasonForUnavailability??"",...k.compareAtPrice&&{compareAtPrice:k.compareAtPrice}}}))??[];const S=(h=(p=c.description)==null?void 0:p.trim())!=null&&h.length?c.description:(g=(v=e==null?void 0:e.description)==null?void 0:v.trim())!=null&&g.length?e.description:"";s={id:c.id??"",name:c.name??"",size:c.size,uom:c.uom,packSize:c.packSize,containerType:c.containerType,description:S,image:c.image}}if(a=o.find(S=>S.isAvailable)??o[0]??(r==null?void 0:r.store)??null,s==null){const S=t.find(k=>k.node.availability.some(O=>O.store!=null));if(s=S?{id:S.node.id??"",name:S.node.name??"",size:S.node.size,uom:S.node.uom,packSize:S.node.packSize,containerType:S.node.containerType,description:S.node.description??void 0,image:S.node.image}:null,a==null){const k=S==null?void 0:S.node.availability.find(O=>O.store!=null);a={deliveryFee:(k==null?void 0:k.deliveryFee)??{amount:0,amountInt:0,currencyCode:((m=k==null?void 0:k.price)==null?void 0:m.currencyCode)??Ir.Usd,presentation:"$0.00"},price:(k==null?void 0:k.price)??{amount:0,amountInt:0,currencyCode:((y=k==null?void 0:k.price)==null?void 0:y.currencyCode)??Ir.Usd,presentation:"$0.00"},storeID:((C=k==null?void 0:k.store)==null?void 0:C.storeID)??"",storeName:((I=k==null?void 0:k.store)==null?void 0:I.storeName)??"",fulfillmentOptions:(k==null?void 0:k.fulfillmentOptions)??[],isAvailable:(k==null?void 0:k.isAvailable)??!1,reasonForUnavailability:(k==null?void 0:k.reasonForUnavailability)??"",...(k==null?void 0:k.compareAtPrice)&&{compareAtPrice:k.compareAtPrice}}}}return{initialSelectedVariant:s,initialStores:o,initialSelectedStore:a}},gi=(e,t)=>{if(!(t!=null&&t.storeId))return e;const r=e.initialStores.find(s=>s.storeID===t.storeId);if(r)return e.initialSelectedStore=r,e;const n=an(t.storeId,t.storeName??t.storeId);return e.initialStores=[n],e.initialSelectedStore=n,e},rg=({product:e,children:t})=>{var I;const r=Fe(),{selectedStore:n}=Ue(),s=r?n:null,o=d.useMemo(()=>{var S;
79return((S=e==null?void 0:e.variants)==null?void 0:S.edges)??[]},[(I=e==null?void 0:e.variants)==null?void 0:I.edges]),a=d.useMemo(()=>new Map(o.map(S=>[S.node.id,S.node.media])),[o]),l=d.useMemo(()=>{var S;try{let k=null;const O=((S=e==null?void 0:e.variants.edges.find(w=>w.node.availability.some(T=>(T.isAvailable===!0&&(k=T),T.isAvailable===!0))))==null?void 0:S.node)??null;return O?{compareAtPrice:k.compareAtPrice,containerType:O.containerType,description:O.description,displayName:O.displayName,fulfillmentOptions:k.fulfillmentOptions,id:O.id,image:O.image,name:O.name,packSize:O.packSize,price:k.price,size:O.size,store:k.store,uom:O.uom}:null}catch(k){return console.error(k),null}},[e==null?void 0:e.variants.edges]),{initialSelectedVariant:c,initialStores:f,initialSelectedStore:u}=d.useMemo(()=>{const S=mi(e,o,l,s);return gi(S,s)},[e,o,l,s]),[p,h]=d.useState(c),[v,g]=d.useState(f),[m,y]=d.useState(u),C=d.useRef(null);return d.useEffect(()=>{const S=e==null?void 0:e.id;if(C.current!==null&&C.current!==S){const{initialSelectedVariant:k,initialStores:O,initialSelectedStore:w}=gi(mi(e,o,l,s),s);h(k),g(O),y(w)}C.current=S},[e,o,l,s]),d.useEffect(()=>{var k;if(!p||p.id===(c==null?void 0:c.id)){(p==null?void 0:p.id)===(c==null?void 0:c.id)&&Jt(v)!==Jt(f)&&g(f);return}const S=o==null?void 0:o.find(O=>{var w;return O.node.id===p.id&&((w=O.node.availability)==null?void 0:w.length)>0});if(S!=null&&S.node){let O=((k=S.node.availability)==null?void 0:k.map(w=>{var T,b;return{deliveryFee:w.deliveryFee,price:w.price,storeID:((T=w.store)==null?void 0:T.storeID)??"",storeName:((b=w.store)==null?void 0:b.storeName)??"",fulfillmentOptions:(w==null?void 0:w.fulfillmentOptions)??[],isAvailable:w.isAvailable,reasonForUnavailability:w.reasonForUnavailability??"",...w.compareAtPrice&&{compareAtPrice:w.compareAtPrice}}}))??[];s!=null&&s.storeId&&(O.find(T=>T.storeID===s.storeId)||(O=[an(s.storeId,s.storeName??s.storeId)])),Jt(O)!==Jt(v)&&g(O)}else v.length>0&&g([])},[c==null?void 0:c.id,o,v,f,p,s]),d.useEffect(()=>{var k,O,w,T;if(Jt(v)===Jt(f)&&(m==null?void 0:m.storeID)===(u==null?void 0:u.storeID))return;if(v.find(b=>b.storeID===(m==null?void 0:m.storeID))){const b=o==null?void 0:o.find(x=>x.node.id===(p==null?void 0:p.id)),_=(O=(k=b==null?void 0:b.node)==null?void 0:k.availability)==null?void 0:O.find(x=>{var j;return((j=x.store)==null?void 0:j.storeID)===(m==null?void 0:m.storeID)});_&&y({deliveryFee:_.deliveryFee,price:_.price,storeID:((w=_.store)==null?void 0:w.storeID)??"",storeName:((T=_.store)==null?void 0:T.storeName)??"",fulfillmentOptions:_.fulfillmentOptions??[],isAvailable:_.isAvailable,reasonForUnavailability:_.reasonForUnavailability??"",..._.compareAtPrice&&{compareAtPrice:_.compareAtPrice}})}else{const b=v[0]??null;(b==null?void 0:b.storeID)!==(m==null?void 0:m.storeID)&&y(b)}},[v,m==null?void 0:m.storeID,f,u==null?void 0:u.storeID,p,o]),d.useEffect(()=>{if(!(s!=null&&s.storeId))return;if(v.length===0){(m==null?void 0:m.storeID)!==s.storeId&&y(an(s.storeId,s.storeName));return}if((m==null?void 0:m.storeID)===s.storeId)return;const S=v.find(k=>k.storeID===s.storeId);y(S||an(s.storeId,s.storeName))},[s==null?void 0:s.storeId,s==null?void 0:s.storeName,m==null?void 0:m.storeID,v]),i.jsx(nl.Provider,{value:{product:e,defaultVariant:l,selectedStore:m,selectedVariant:p,stores:v,variants:o,isUnifiedMode:!s,variantsToMedia:a,setSelectedStore:y,setSelectedVariant:h,setStores:g},children:t})},xh=()=>{const{defaultVariant:e,variants:t,stores:r,selectedStore:n,isUnifiedMode:s,product:o,selectedVariant:a,variantsToMedia:l,setSelectedVariant:c,setSelectedStore:f,setStores:u}=d.useContext(nl),p=C=>{f(C)},h=C=>{c(C)},v=d.useMemo(()=>(t==null?void 0:t.find(C=>{var I,S;return((S=(I=C.node)==null?void 0:I.availability)==null?void 0:S.length)>0}))??null,[t]),{displayPrice:g,effectiveStore:m}=d.useMemo(()=>{if(!s||r.length===0)return{displayPrice:{price:(n==null?void 0:n.price)??null,compareAtPrice:(n==null?void 0:n.compareAtPrice)??null,isFromPrice:!1},effectiveStore:n};const C=r.filter(k=>k.isAvailable);if(C.length===0)return{displayPrice:{price:(n==null?void 0:n.price)??null,compareAtPrice:(n==null?void 0:n.compareAtPrice)??null,isFromPrice:!1},effectiveStore:n};const S=[...C].sort((k,O)=>{var w,T;return(((w=k.price)==null?void 0:w.amount)??0)-(((T=O.price)==null?void 0:T.amount)??0)})[0];return{displayPrice:{price:S.price,compareAtPrice:S.compareAtPrice??null,isFromPrice:C.length>1},effectiveStore:S}},[s,r,n]);return{variants:t,stores:r,product:o,firstVariant:v,defaultVariant:e,selectedVariant:a,selectedStore:n,isUnifiedMode:s,displayPrice:g,effectiveStore:m,selectStore:p,selectVariant:h,setStores:u,tags:[],variantsToMedia:l}},vh=({label:e,imageUrl:t,quantity:r})=>{const n=(e==null?void 0:e[0])??null;return i.jsxs("div",{className:"relative flex flex-col gap-1 justify-center items-center lg:px-3 p-2 bg-white border border-primary-75 lg:text-sm text-xs rounded-sm w-fit lg:w-[120px] min-w-[96px] lg:min-h-[120px] min-h-[96px]",children:[i.jsx("div",{className:"lg:w-[72px] lg:h-[72px] w-[60px] h-[60px] flex-shrink-0 bg-neutral-50 rounded-full overflow-hidden",children:t?i.jsx("img",{src:t,alt:`${e} modifier`,width:64,height:64,loading:"lazy",className:"w-full h-full object-cover",decoding:"async"}):i.jsx("div",{className:"w-full h-full bg-neutral-50 rounded-full flex items-center justify-center",children:!!n&&i.jsx("span",{className:"text-primary-500 text-2xl font-bold",children:n})})}),i.jsx(it,{as:"span",variant:"body-xs",className:"text-primary-900 whitespace-nowrap text-center leading-tight truncate w-full",children:$l(e??"")}),r&&i.jsx("div",{className:"absolute flex items-center justify-center bg-primary-500 text-white rounded-full h-5 w-5 top-0 right-0 z-[5] mr-2 mt-2",children:i.jsx(it,{as:"span",variant:"body-xs",className:"text-white text-center leading-tight truncate w-full",children:r})})]})},bh=({selections:e=[],isModifiable:t=!1})=>
79{const[r,n]=d.useState(!1),[s,o]=d.useState(!1),a=d.useRef(null),l=()=>{a.current&&a.current.scrollBy({left:-200,behavior:"smooth"})},c=()=>{a.current&&a.current.scrollBy({left:200,behavior:"smooth"})},f=d.useCallback(()=>{if(a.current){const{scrollLeft:p,scrollWidth:h,clientWidth:v}=a.current;n(p>0),o(Math.abs(p)<h-v-1)}},[]);d.useEffect(()=>{const p=a.current;if(!p)return;const h=new ResizeObserver(()=>{setTimeout(f,100)}),v=p.getElementsByTagName("img"),g=Array.from(v).map(m=>m.complete?Promise.resolve():new Promise(y=>{m.addEventListener("load",y,{once:!0}),m.addEventListener("error",y,{once:!0})}));return Promise.all(g).then(()=>{setTimeout(f,100)}),h.observe(p),()=>{h.disconnect(),window.removeEventListener("resize",f)}},[e,f]),d.useEffect(()=>{const p=a.current;if(p)return p.addEventListener("scroll",f,{passive:!0}),()=>p.removeEventListener("scroll",f)},[f]);const u=d.useMemo(()=>e!=null&&e.length?[...e].sort((h,v)=>{const g=e.findIndex(y=>y.modifierGroupId===h.modifierGroupId),m=e.findIndex(y=>y.modifierGroupId===v.modifierGroupId);return g-m}).flatMap(h=>[...h.modifiers].sort((g,m)=>{const y=h.modifiers.findIndex(I=>I.id===g.id),C=h.modifiers.findIndex(I=>I.id===m.id);return y-C}).filter(g=>g.quantity>0).map(g=>{var y,C;let m=g.name;return((y=g==null?void 0:g.option)==null?void 0:y.name)!=null&&((C=g.option)==null?void 0:C.name)!==g.name&&(m=`${g.name} | ${g.option.name}`),{value:g.id,label:m,image:g==null?void 0:g.image,groupName:h.modifierGroupId,quantity:g.quantity}})):[],[e]);return t?u.length>0&&i.jsxs("div",{className:"relative overflow-x-hidden",children:[(u==null?void 0:u.length)&&i.jsx("div",{children:i.jsx(it,{weight:"semibold",className:"text font-medium",children:"Your order includes:"})}),i.jsx("div",{ref:a,className:"flex gap-2 overflow-x-auto scrollbar-none py-1 relative noScrollBar",children:u.map(p=>{var h;return i.jsx(vh,{imageUrl:(h=p.image)==null?void 0:h.url,label:p.quantity>1?`${p.label} (${p.quantity})`:p.label,quantity:p.quantity},`${p.value}-${p.quantity}`)})}),s&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute right-0 top-[24px] bottom-0 w-20 bg-gradient-to-l from-white/50 to-transparent pointer-events-none"}),i.jsx("button",{onClick:c,className:"absolute right-2 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-0.5 shadow-sm transition-colors cursor-pointer","aria-label":"Scroll right",children:i.jsx(Rl,{className:"w-4 h-4 text-neutral-400"})})]}),r&&i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"absolute left-0 top-[24px] bottom-0 w-20 bg-gradient-to-r from-white/50 to-transparent pointer-events-none"}),i.jsx("button",{onClick:l,className:"absolute left-2 top-1/2 -translate-y-1/2 bg-white/80 hover:bg-white rounded-full p-0.5 shadow-sm transition-colors cursor-pointer","aria-label":"Scroll left",children:i.jsx(Ll,{className:"w-4 h-4 text-neutral-400"})})]})]}):null},wh=({product:e,selections:t,setSelection:r,preSelectedOptions:n})=>{var c;const{selectedVariant:s}=xh(),o=d.useMemo(()=>{var u,p,h;const f=((u=e==null?void 0:e.variants)==null?void 0:u.edges)??[];return((p=f.find(v=>v.node.id===(s==null?void 0:s.id)))==null?void 0:p.node)||((h=f[0])==null?void 0:h.node)},[(c=e==null?void 0:e.variants)==null?void 0:c.edges,s==null?void 0:s.id]),a=d.useMemo(()=>{var f,u;return((u=(f=o==null?void 0:o.availability)==null?void 0:f[0])==null?void 0:u.modifierGroups)??[]},[o]),l=d.useMemo(()=>a.length>0,[a]);return d.useEffect(()=>{a.length&&a.forEach(f=>{var u;(u=f.modifier)==null||u.forEach(p=>{var h;if((h=p.image)!=null&&h.url){const v=new Image;v.src=p.image.url}})})},[a]),d.useEffect(()=>{n&&n.forEach(f=>{f.modifiers.forEach(u=>{r(f.modifierGroupId,{id:u.id,name:u.name,title:u.title,cost:u.cost,quantity:u.quantity,option:u.option,image:u.image},u.quantity,f.totalQuantity,f.modifiers[0].title)})})},[n,r]),i.jsxs("div",{className:"flex flex-col bg-white",children:[l&&i.jsx("div",{className:"flex flex-col gap-4 bg-white lg:py-0 py-3 px-4 lg:px-0 border-b border-neutral-200 lg:border-none","data-sticky-header":!0,children:i.jsx(bh,{selections:t,isModifiable:!0})}),a.map(f=>i.jsx(Fl,{modifier:f,selections:t,setSelection:r},f.id))]})};async function _h(e,t){try{const r=await fetch(e,t);if(!r.ok){const s=await r.text().catch(()=>"");return{ok:!1,error:`${r.status}: ${s||r.statusText}`}}return{ok:!0,data:await r.json()}}catch(r){return{ok:!1,error:r instanceof Error?r.message:String(r)}}}const os={isOpen:!1,targetStore:null,currentStoreName:"",currentCartItemCount:0};function sl(){const{selectedStore:e,coordinates:t,selectStore:r,cancelPendingStoreSession:n}=Ue(),{carts:s,refreshCartsFromCookie:o}=Je(),[a,l]=d.useState(os),c=d.useCallback(g=>{if(!g)return 0;const m=s.find(y=>{var C;return((C=y.merchant)==null?void 0:C.storeID)===g});return m!=null&&m.cartLines?m.cartLines.reduce((y,C)=>y+((C==null?void 0:C.quantity)??0),0):0},[s]),f=d.useCallback(async g=>{const m=new FormData;m.append("action","switch"),m.append("storeId",g.storeId),m.append("storeName",g.storeName),m.append("fulfillmentTypes",g.fulfillmentTypes.join(",")),m.append("isOpen",String(g.isOpen)),t&&(m.append("latitude",String(t.latitude)),m.append("longitude",String(t.longitude))),n();const y=await _h("/api/store/switch",{method:"POST",body:m});return y.ok?await r(g,{persist:!1})?(await o(),!0):!1:(console.error(`[useStoreSwitch] switch failed: ${y.error}`),!1)},[t,r,n,o]),u=d.useCallback(async g=>{if(!e)return f(g);const m=c(e.storeId);return m===0?f(g):(l({isOpen:!0,targetStore:g,currentStoreName:e.storeName,currentCartItemCount:m}),!0)},[e,c,f]),p=d.useCallback(async()=>
79{a.targetStore&&(await f(a.targetStore),l(os))},[a.targetStore,f]),h=d.useCallback(()=>{l(os)},[]),v=d.useCallback(g=>{if(e)return e;if(!t)return null;const m=g.storeAvailability??[];if(m.length===0)return null;const C=[...m].sort((I,S)=>(I.distance??1/0)-(S.distance??1/0))[0];return{storeId:C.storeId,storeName:C.storeName,fulfillmentTypes:C.fulfillmentTypes?C.fulfillmentTypes.split(","):[],isOpen:C.isOpen}},[e,t]);return{requestStoreSwitch:u,executeSwitch:f,warningState:a,confirmSwitch:p,cancelSwitch:h,resolveStoreForAddToCart:v}}function Sh({cta:e}){const t=e.label?e.label:"SHOP NOW",r=e.variant?e.variant:"outline",n=e.decorator?e.decorator:"CHEVRON_RIGHT",s=e.decoratorPosition?e.decoratorPosition:"RIGHT";return i.jsx(xe,{to:e.slug,className:"text-sm text-active lg:font-medium lg:block",children:i.jsx(_e,{label:t,variant:r,spacing:"custom",decorator:n,decoratorPosition:s,className:e.tailwindClasses??""})})}const ol=(e=null,t)=>{var r,n;return((r=e==null?void 0:e.trim())==null?void 0:r.length)===0||!e?"":(e=e.toLowerCase(),e=e.replace("-","_"),t&&((n=t==null?void 0:t.trim())==null?void 0:n.length)>0?`${t}-${e.replace("_","-")}`:e)},ur=({color:e="primary-500",href:t=null,size:r="body",styles:n={},value:s,weight:o="normal",className:a,tailwindClasses:l=""})=>{const c=ol(e,"text");return t?i.jsx(xe,{to:t,className:"w-auto",children:i.jsx(it,{variant:r,className:le(c,"mt-0",a,l),weight:o,style:n??{},children:s})}):i.jsx(it,{variant:r,className:le(c,"mt-0",a,l),weight:o,style:n??{},children:s})},Nh=({header:e,cta:t,variants:r})=>e==null?null:i.jsx("div",{className:"flex justify-between items-center w-full p-4 lg:gap-8",children:i.jsxs("div",{className:`flex items-center justify-between w-full gap-4 py-6 border-feat-col-header-border ${(r==null?void 0:r.length)===0?"":"border-b"}`,children:[i.jsx(ur,{...e,color:"feat-col-header-text"}),!!(t!=null&&t.slug)&&i.jsx(Sh,{cta:t})]})}),il=d.createContext({storeAvailabilityByProductId:{}}),jh=e=>Array.from(new Set(e.filter(Boolean))).sort(),ng=({children:e,productIds:t})=>{const r=tt(),[n,s]=d.useState({}),o=d.useRef(null),a=d.useMemo(()=>jh(t).join("|"),[t]),l=d.useMemo(()=>a?a.split("|"):[],[a]);d.useEffect(()=>{var u;const f=(u=r.data)==null?void 0:u.storeAvailabilityByProductId;f&&s(p=>({...p,...f}))},[r.data]),d.useEffect(()=>{if(l.length===0||o.current===a)return;let f=0;const u=window.requestAnimationFrame(()=>{f=window.requestAnimationFrame(()=>{o.current=a,r.submit({productIds:JSON.stringify(l)},{method:"POST",action:"/api/store-availability"})})});return()=>{window.cancelAnimationFrame(u),f&&window.cancelAnimationFrame(f)}},[r,l,a]);const c=d.useMemo(()=>({storeAvailabilityByProductId:n}),[n]);return i.jsx(il.Provider,{value:c,children:e})},Ch=(e,t)=>{const{storeAvailabilityByProductId:r}=d.useContext(il);return!e||!Object.prototype.hasOwnProperty.call(r,e)?t:r[e]??[]},al=d.createContext({selectedProductVariant:null,setSelectedProductVariant:()=>{}}),sg=({children:e})=>{const[t,r]=d.useState(null);return i.jsx(al.Provider,{value:{selectedProductVariant:t,setSelectedProductVariant:r},children:e})},Eh=()=>{const e=X.useContext(al);if(e==null)throw new Error("useFeaturedCollectionsQuickAdd must be used within a FeaturedCollectionsQuickAddProvider");const{selectedProductVariant:t,setSelectedProductVariant:r}=e;return{selectedProductVariant:t,handleSelectProductVariant:s=>{r(o=>o&&o===s?null:s)}}},kh=({isAvailable:e,quantity:t=0,slug:r,loading:n,disabled:s,quantityError:o,staticMessage:a,onClickCallback:l,onIncrement:c,onDecrement:f,onQuickAdd:u})=>{const[p,h]=d.useState(!1),v=n||p,g=t>0?t:p?1:t,m=g>0,y=()=>{p||(h(!0),(async()=>{try{if(await(l==null?void 0:l())===!1)return;u==null||u()}finally{h(!1)}})())};return v&&!m?i.jsx("div",{className:"relative flex flex-col items-center gap-1",children:i.jsx("div",{className:"w-full flex justify-center items-center h-10 border border-feat-col-atc-border opacity-50",children:i.jsx(Pr,{className:"w-4 h-4 animate-spin text-feat-col-atc-text"})})}):!e&&!m?i.jsx(xe,{to:r,className:"w-full",children:i.jsx(pe.div,{initial:{opacity:0}
79,animate:{opacity:1},transition:{duration:.22,ease:[.22,1,.36,1]},className:"group hover:bg-primary-50 h-10 w-full transition-colors duration-300 ease-in-out flex justify-center items-center gap-3",children:i.jsx("span",{className:"text-primary-500 text-sm transition ease-in-out font-medium uppercase lg:tracking-[4px] tracking-[2px] duration-200",children:"View Product"})})}):m?i.jsxs("div",{className:"relative flex flex-col items-center gap-1",children:[i.jsxs("div",{className:"flex justify-center w-full items-center gap-2 h-auto",children:[i.jsx(_e,{variant:"ghost",className:"h-10 hover:bg-feat-col-atc-quan-hover disabled:opacity-50 disabled:cursor-not-allowed",onClick:f,disabled:s||p,"aria-label":g<=1?"Remove from cart":"Decrement quantity",children:g<=1?i.jsx(lo,{className:"w-4 text-feat-col-atc-quan-text"}):i.jsx(oo,{className:"w-4 text-feat-col-atc-quan-text"})}),i.jsx("div",{className:`flex items-center justify-center h-10 w-12 lg:border-[1px] ${o?"lg:border-red-300":"lg:border-primary-100"}`,children:i.jsx("p",{className:"font-semibold text-center text-feat-col-atc-text",children:g})}),i.jsx(_e,{variant:"ghost",className:"h-10 hover:bg-feat-col-atc-quan-hover disabled:opacity-50 disabled:cursor-not-allowed",onClick:c,disabled:s||p||g>=99,"aria-label":"Increment quantity",children:i.jsx(io,{className:"w-4 h-4 text-feat-col-atc-quan-text"})})]}),i.jsx(Ke,{initial:!1,children:o&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-500 text-xs text-center leading-tight",children:o})})]}):i.jsxs("div",{className:"relative flex flex-col items-center gap-1",children:[i.jsx(Ke,{initial:!1,children:a&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-slate-400 text-xs text-center leading-tight",children:a})}),i.jsx(_e,{type:"button",disabled:s,onClick:y,variant:"outline",spacing:"custom",label:"ADD TO CART",className:"w-full text-feat-col-atc-text border-feat-col-atc-border hover:text-feat-col-atc-hover-text hover:border-feat-col-atc-border-hover hover:bg-feat-col-atc-hover"}),i.jsx(Ke,{initial:!1,children:o&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-500 text-xs text-center leading-tight",children:o})})]})},Ih=({variant:e,slug:t,productImagesPadding:r,addToCartVariant:n,imageLoading:s="lazy",addToCartCallback:o})=>{var Le,Me,je,gt,gr,yo,xo,vo,bo,wo,_o,So,No,jo,Co,Eo,ko,Io,Mo,To,Oo,Do;const{ENV:a}=Ie(),{carts:l,ready:c,addingToCart:f}=Je();Ue();const{handleSelectProductVariant:u}=Eh(),p=co(e.merchantId)??"",v=((e==null?void 0:e.merchantId)!=null?String(e.merchantId).trim():"").length>0,g=p,m=`${e.id}-${g}`,y=Ch((Le=e==null?void 0:e.product)==null?void 0:Le.id,(Me=e==null?void 0:e.product)==null?void 0:Me.storeAvailability),{selectedStoreEntry:C}=ch(y),[I,S]=d.useState(!1),[k,O]=d.useState(!1),w=(je=l.find(ut=>(ut==null?void 0:ut.merchant.storeID)===g))==null?void 0:je.cartLines.find(ut=>ut.merchandise.id===(e==null?void 0:e.id)),T=Gl(e==null?void 0:e.size,e==null?void 0:e.uom)||"",b=Ai((e==null?void 0:e.packSize)??1,e==null?void 0:e.containerType)||"",_=(e==null?void 0:e.price)??(C==null?void 0:C.price),x=(_==null?void 0:_.amount)??0,j=(gt=e==null?void 0:e.compareAtPrice)==null?void 0:gt.amount,M=(_==null?void 0:_.presentation)??`$${new Ge(x).toFixed(2)}`,$=d.useMemo(()=>{if(j&&x&&j>x){const ut=j-x;return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD"}).format(ut)}return null},[j,x]),L=((yo=(gr=e==null?void 0:e.product)==null?void 0:gr.modifierGroup)==null?void 0:yo.length)>1,P=(_o=(wo=(bo=(vo=(xo=e==null?void 0:e.product)==null?void 0:xo.variants)==null?void 0:vo.edges)==null?void 0:bo[0])==null?void 0:wo.node)==null?void 0:_o.description,R=P||((e==null?void 0:e.description)??""),H=e!=null&&e.merchantId?`${((e==null?void 0:e.packSize)??1)>1?`${(e==null?void 0:e.packSize)??1} x `:""}${T} ${b}`:(e==null?void 0:e.description)??"",Y=L||(a==null?void 0:a.STORE_MODE)==="DELI"?R:H,z=((So=e==null?void 0:e.image)==null?void 0:So.scale1x)!=null,V=(e==null?void 0:e.medias)&&e.medias.length>1,Q=z?(No=e==null?void 0:e.image)==null?void 0:No.scale1x:"https://d3gevp8yznwb3s.cloudfront.net/images/UNAVAILABLE.png?width=200&height=200",K=z?"(max-width: 768px) 600px, 400px":"200px",J=z?`${((jo=e==null?void 0:e.image)==null?void 0:jo.scale1x)??""} 300w, ${((Co=e==null?void 0:e.image)==null?void 0:Co.scale2x)??""} 600w, ${((Eo=e==null?void 0:e.image)==null?void 0:Eo.scale3x)??""} 1200w`:"",ue=V?(ko=e.medias)==null?void 0:ko[1]:null,Z=ue==null?void 0:ue.scale1x,te=ue?`${ue.scale1x??""} 300w, ${ue.scale2x??""} 600w, ${ue.scale3x??""} 900w`:"",q=d.useMemo(()=>w&&(w==null?void 0:w.quantity)>0?w==null?void 0:w.quantity:0,[w,f]),{localQuantity:E,addLoading:D,removeLoading:A,quantityError:U,onQuickAdd:F,onIncrement:W,onDecrement:ne}=Un(q,e.id,(w==null?void 0:w.id)??"",g,m,{itemId:(e==null?void 0:e.id)??"
79Not provided",itemName:(e==null?void 0:e.name)??"Not provided",unitPrice:Number(((Io=e==null?void 0:e.price)==null?void 0:Io.amount)??0),compareAtPrice:Number(((Mo=e==null?void 0:e.compareAtPrice)==null?void 0:Mo.amount)??0),itemVariant:(e==null?void 0:e.size)!=null?String(e.size):"Not provided",mixpanelMetadata:{type:"FEATURED_COLLECTION_COMPONENT",merchantId:g??"Not provided"}}),re=d.useCallback(async()=>(o==null||o(),u((e==null?void 0:e.id)??null),!0),[u,e,o]),we=!!(v&&(((To=e==null?void 0:e.product)==null?void 0:To.modifierGroup)==null||((Do=(Oo=e==null?void 0:e.product)==null?void 0:Oo.modifierGroup)==null?void 0:Do.length)===0)),Be=!!(v&&(e!=null&&e.isAvailable)),He=d.useMemo(()=>{switch(n){case"button":return i.jsx("div",{className:"p-2 pt-0",children:i.jsx(kh,{loading:D,onClickCallback:re,onIncrement:W,onDecrement:ne,onQuickAdd:F,quantity:E,disabled:!c||D||A||!Be,staticMessage:Be?void 0:"This item is not available",isAvailable:Be,slug:t??"",quantityError:U})});case"floating":return i.jsx(lh,{product:e==null?void 0:e.product,variantOverride:e});default:return null}},[E,D,n,e,t,c,A,U,re,W,ne,F,Be]);return i.jsxs(pe.div,{layout:!0,className:"group relative border-[1px] border-feat-col-border flex flex-col h-full w-full transition-[border-color,box-shadow] duration-300 ease-out hover:border-feat-col-border-hover hover:shadow-[0_8px_24px_-12px_rgba(0,0,0,0.18)] motion-reduce:transition-none",initial:{opacity:0,y:0},animate:{opacity:1,y:0},whileHover:{y:-2},transition:{layout:{duration:.32,ease:"easeOut"},y:{duration:.22,ease:"easeOut"}},onMouseEnter:()=>O(!0),onMouseLeave:()=>O(!1),children:[i.jsx("div",{className:"flex flex-1 flex-col",children:i.jsxs("a",{href:t??"",rel:"prefetch",onClick:()=>{var ut;cr({event:"select_item",ecommerce:{item_list_id:"featured_collection",item_list_name:"Featured Collection",items:[{id:(e==null?void 0:e.id)??"Not provided",item_id:(e==null?void 0:e.id)??"Not provided",item_name:(e==null?void 0:e.name)??"Not provided",price:new Ge(((ut=e==null?void 0:e.price)==null?void 0:ut.amount)??0).toDecimalPlaces(2).toNumber(),item_variant:(e==null?void 0:e.size)??void 0,quantity:1,google_business_vertical:"retail"}]}})},children:[i.jsx("div",{className:"w-full flex aspect-square relative",children:i.jsxs("div",{className:"relative w-full h-full",children:[i.jsx("img",{loading:s,src:Q,srcSet:J,sizes:K,alt:(e==null?void 0:e.name)??"",className:"w-full h-full object-cover border-[1px] border-feat-col-img-border bg-feat-col-img-background",width:250,height:150,style:{pointerEvents:"none",padding:`${r}px`}}),V&&Z&&i.jsxs(i.Fragment,{children:[i.jsx("img",{src:Z,srcSet:te,alt:"",style:{display:"none"},onLoad:()=>S(!0)}),i.jsx(pe.img,{initial:{opacity:0}
79,animate:{opacity:k&&I?1:0},transition:{duration:.3,ease:"easeInOut"},src:Z,srcSet:te,sizes:K,alt:(e==null?void 0:e.name)??"",className:"absolute inset-0 w-full h-full object-cover border-[1px] border-feat-col-img-border bg-feat-col-img-background",width:250,height:150,style:{pointerEvents:"none"}})]})]})}),i.jsxs("div",{className:"flex flex-col p-2 px-3 w-full min-h-[100px] overflow-hidden",children:[i.jsx(it,{as:"span",className:"text-sm lg:text-md font-semibold leading-tight text-feat-col-title",style:{display:"-webkit-box",overflow:"hidden",textOverflow:"ellipsis",WebkitBoxOrient:"vertical",WebkitLineClamp:2},children:(e==null?void 0:e.rootName)??(e==null?void 0:e.name)}),i.jsxs("div",{className:"flex flex-col gap-y-1",children:[i.jsx("span",{className:"text-sm lg:text-md text-feat-col-subtitle line-clamp-2",children:Y??""}),i.jsxs("div",{className:"flex flex-col items-left text-left min-h-[2.75rem]",children:[i.jsxs("div",{className:"flex items-baseline gap-1",children:[j&&j>x&&i.jsxs("span",{className:"text-sm text-feat-col-price-discounted line-through",children:["$",new Ge(j).toFixed(2)]}),i.jsx("span",{className:`text-sm lg:text-md ${j&&j>x?"text-red-600 font-semibold":"text-feat-col-price"}`,children:M})]}),$&&i.jsxs("span",{className:"text-xs text-feat-col-subtitle italic",children:["You save ",$,"!"]})]})]})]})]})}),we&&He]})},ll=d.forwardRef(({variants:e,collectionSlug:t,className:r,outerClassName:n,indicatorVariant:s,showControls:o,productImagesPadding:a,addToCartVariant:l,visibleSlides:c={def:1.5,md:3,lg:5,xl:7},imageLoading:f="lazy",addToCartCallback:u},p)=>i.jsx(Jl,{ref:p,outerClassName:n,type:"featured-collection",className:le("px-4 pb-4 lg:pb-0",r),indicatorVariant:s,controls:o,visibleSlides:c,slides:e.map((h,v)=>{const g=t&&(h!=null&&h.slug)?`/collections/${t}/${h.slug}`:h!=null&&h.slug?`/products/${h.slug}`:"";return i.jsx(Ih,{slug:g,variant:{...h,isAvailable:(h==null?void 0:h.isAvailable)==null?!0:h==null?void 0:h.isAvailable},productImagesPadding:a,addToCartVariant:l,addToCartCallback:u,imageLoading:f},(h==null?void 0:h.id)??(h==null?void 0:h.slug)??`idx-${v}`)})}));ll.displayName="ProductSlider";const Mh=({slug:e,label:t="SHOP NOW",variant:r="outline",tailwindClasses:n=""})=>i.jsx("div",{className:"p-4 pt-0 w-full",children:i.jsx(xe,{to:`${e}`,className:"text-sm text-active w-full lg:font-medium lg:hidden",children:i.jsx(_e,{variant:r,size:"default",label:t,spacing:"custom",className:le("duration-300",n),fullWidth:!0})})}),Th=({header:e,cta:t,collectionSlug:r,variants:n,hideHeader:s,anchorId:o,BottomCTA:a,indicatorVariant:l,addToCartVariant:c,productImagesPadding:f,showControls:u,visibleSlides:p,sliderClassName:h,sliderOuterClassName:v,imageLoading:g="lazy",addToCartCallback:m})=>{const y=d.useRef(null),C=n??[],I=d.useRef(C.length);d.useEffect(()=>{var T;const O=I.current,w=C.length;I.current=w,w!==O&&((T=y.current)==null||T.reInit())},[C.length]);const S=()=>{var O;(O=y.current)==null||O.next()},k=()=>{var O;(O=y.current)==null||O.prev()};return C.length===0?null:i.jsx("div",{className:"flex justify-center relative",id:o,children:i.jsxs("div",{className:"w-full max-w-[1440px] min-h-[300px] relative",children:[(!s||e==null)&&i.jsx(Nh,{header:e,cta:t,slideNext:S,slidePrev:k,variants:C}),i.jsx("div",{className:"px-4 my-4",children:i.jsx(ll,{outerClassName:v,className:h,variants:C,ref:y,collectionSlug:r,indicatorVariant:l,showControls:u,productImagesPadding:f,addToCartVariant:c,visibleSlides:p,addToCartCallback:m,imageLoading:g})}),(a==null?void 0:a.slug)&&i.jsx(Mh,{slug:a.slug,label:a.label,variant:a.variant,tailwindClasses:a.tailwindClasses??""})]})})},Oh=Th,Dh=({name:e,img:t,description:r})=>i.jsxs("div",{className:"w-full p-4 border transition-color border-search-panel-border hover:cursor-pointer md:p-4 sm:p-1 flex md:gap-4 sm:gap-2 sm:border-0 space-y-2 space-x-2 md:space-x-0 md:space-y-0",children:[i.jsx("img",{className:"md:flex min-w-16 max-h-20 object-contain",width:65,alt:e??"Product Image",src:t??"https://d3gevp8yznwb3s.cloudfront.net/images/UNAVAILABLE.png"}),i.jsxs("div",{className:"flex flex-col md:justify-between justify-center overflow-hidden gap-2",children:[i.jsx("h1",{className:"text-sm lg:text-lg font-medium line-clamp-1 text-search-panel-heading",children:e}),i.jsx("p",{className:"invisible font-light text-search-panel-text line-clamp-2 md:visible h-0 md:h-min",children:r})]})]}),fo=d.forwardRef(({searchTerm:e,loading:t,products:r,inputUnderline:n,onChange:s,onClose:o,onClear:a,shouldFocus:l},c)=>{var C,I;const f=St(),{siteConfigs:u}=Ie(),p=(I=(C=u==null?void 0:u.customConfigurations)==null?void 0:C.product)==null?void 0:I.imageBackgroun
79dColor,h=p?`&background=${p}`:"",v=d.useCallback(()=>{var S;a==null||a(),(S=c==null?void 0:c.current)==null||S.focus()},[a]),g=d.useCallback(()=>{o==null||o(),v()},[v,o]),m=d.useMemo(()=>r!=null&&r.length?r==null?void 0:r.map(S=>{var _,x,j,M,$,L,P,R,H,Y,z,V;const k=(j=(x=(_=S.node)==null?void 0:_.variants)==null?void 0:x.edges[0])==null?void 0:j.node,O=(M=k==null?void 0:k.image)!=null&&M.url?`${($=k==null?void 0:k.image)==null?void 0:$.url}?width=150&height=150${h}`:"https://d3gevp8yznwb3s.cloudfront.net/images/UNAVAILABLE.png",w=S.node.name,T=(P=(L=S==null?void 0:S.node)==null?void 0:L.description)!=null&&P.length?S.node.description:null,b=(V=(z=(Y=(H=(R=S==null?void 0:S.node)==null?void 0:R.variants)==null?void 0:H.edges[0])==null?void 0:Y.node)==null?void 0:z.description)!=null&&V.length?S.node.variants.edges[0].node.description:null;return i.jsx(xe,{onClick:g,to:`/products/${S.node.slug}`,children:i.jsx(Dh,{name:w,description:T||b||"",img:O})},S.node.id)}):null,[g,r]),y=S=>{(S==null?void 0:S.key)==="Enter"&&(e!=null&&e.length)&&(g(),f({pathname:"/search/",search:`?search=${encodeURIComponent(e)}`}))};return d.useEffect(()=>{l&&(c!=null&&c.current)&&(c==null||c.current.focus())},[l]),d.useEffect(()=>{if(!e||!r||r.length===0||t)return;const S={event:"view_search_results",search_term:e,ecommerce:{currency:"USD",items:r.map((k,O)=>{var b,_,x;const w=(x=(_=(b=k.node)==null?void 0:b.variants)==null?void 0:_.edges[0])==null?void 0:x.node,T=(w==null?void 0:w.id)??k.node.id;return{id:T,item_id:T,item_name:k.node.name??"Not provided",item_variant:(w==null?void 0:w.size)??void 0,index:O+1,quantity:1,google_business_vertical:"retail"}})}};cr(S)},[e,r,t]),i.jsx(pe.div,{className:"flex w-full max-w-[1280px] max-h-[85vh] lg:max-h-[75vh]",children:i.jsxs("div",{className:"w-[100%] flex flex-col flex-1 overflow-hidden gap-4",children:[i.jsxs("div",{className:"w-full",children:[i.jsx("div",{className:"hidden lg:flex w-full h-1 overflow-hidden relative",children:i.jsx(pe.div,{initial:{opacity:0}
79,animate:{opacity:t?1:0},exit:{opacity:0},className:"h-[.5px] animate-ping bg-blue-500 w-full"})}),i.jsxs("div",{className:"flex lg:gap-4 items-center px-0 lg:px-2",children:[i.jsx("label",{id:"site-search",className:"absolute left-[10000px]",htmlFor:"search-input",children:"Search"}),i.jsx(Fn,{className:"lg:h-8 lg:w-8 hidden lg:flex text-search-panel-icons lg:stroke-[4px] stroke-[3px]","aria-hidden":"true"}),i.jsxs("div",{className:"flex relative w-full",children:[i.jsx("input",{className:`text-[1.5rem] md:text-[2.5rem] flex-1 text-search-panel-heading font-bold border-0 border-gray-200 outline-none w-full focus:ring-0 focus:border-black p-4 flex bg-transparent ${n?"border-b":"border-b-0"}`,onKeyDown:y,value:e,placeholder:"Search",onChange:s,ref:c,"aria-labelledby":"site-search"}),i.jsx("button",{type:"button",onClick:v,className:"absolute lg:static right-0 py-4","aria-label":"Search",children:i.jsx(mh,{className:"w-6 h-6 text-search-panel-icons transition-colors ease-in-out"})})]})]})]}),e!=null&&e.length?i.jsxs("div",{className:"lg:px-4 flex justify-between",children:[i.jsx("p",{className:"text-sm text-gray-500 text-light",children:t?"Searching...":`Results for "${e}"`}),i.jsx("button",{className:"lg:text-md text-sm text-utility",onClick:()=>{g(),f({pathname:"/search/",search:`?search=${encodeURIComponent(e)}`})},children:"View All"})]}):null,!!e.trim().length&&i.jsx(pe.div,{className:"flex flex-1 w-full overflow-hidden",initial:{opacity:0}
79,animate:{opacity:1},exit:{opacity:0},children:i.jsx("div",{className:"w-full h-full flex pt-0",children:i.jsx("div",{className:`flex-1 overflow-auto noScrollBar ${t?"loading":""}`,children:i.jsx("div",{className:"flex flex-col lg:gap-2 gap-2",children:m})})})})]})})});fo.displayName="SearchPanel";const po=()=>{const[e,t]=d.useState(""),r=tt(),n=l=>{t(l.target.value)},s=()=>{t("")};d.useEffect(()=>{const l=setTimeout(()=>{e.trim().length&&r.submit({search:e},{preventScrollReset:!0,navigate:!1,action:"/api/products/search",method:"GET"})},150);return()=>{clearTimeout(l)}},[e]);const o=r.data,a=r.state!=="idle";return{onChange:n,onClear:s,searchTerm:e,searchResults:o,loading:a}},Ah=()=>{var f;const[e,t]=d.useState(!1),{onChange:r,onClear:n,searchResults:s,loading:o,searchTerm:a}=po(),l=(f=s==null?void 0:s.products)==null?void 0:f.products,c=d.useRef(null);return i.jsx(Mt.Group,{children:i.jsx("div",{className:"flex h-full justify-center space-x-8",children:i.jsx(Mt,{className:"flex",children:({close:u})=>{var p;return i.jsxs(i.Fragment,{children:[i.jsx(Mt.Overlay,{className:"fixed inset-0 bg-black opacity-50 z-[2]",style:{to
79p:165}}),i.jsx("div",{className:"relative lg:flex hidden",children:i.jsxs(Mt.Button,{className:"relative z-100 gap-2 transition-colors duration-200 ease-out border pl-6 lg:pl-8 px-3 py-2 mr-2","aria-label":"Search products",onClick:()=>t(!0),children:[i.jsx("span",{className:"sr-only",children:"Search Products"}),i.jsx("p",{className:"text-sm text-gray-700 whitespace-nowrap",children:"Looking for something?"}),i.jsx("div",{className:"absolute left-2 top-0 h-full flex items-center justify-center",children:i.jsx(Fn,{className:"h-4 w-4 text-gray-400","aria-hidden":"true"})})]})}),i.jsx(he,{as:d.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Mt.Panel,{className:"absolute z-[2] inset-x-0 top-full sm:text-sm bg-search-panel-background flex justify-center items-center w-full overflow-hidden border-t border-search-panel-border",children:i.jsx(fo,{ref:c,searchTerm:a,collections:((p=s==null?void 0:s.collections)==null?void 0:p.value)??[],products:l,defaultValue:a,loading:o,onChange:r,onClose:u,onClear:n,shouldFocus:e})})})]})}})})})},og=({placeholderText:e})=>{const{onChange:t,searchTerm:r}=po(),n=St(),s=d.useCallback(o=>{r.trim().length!==0&&((o==null?void 0:o.type)==="keydown"&&o.key==="Enter"&&r!=null&&r.length&&n({pathname:"/search/",search:`?search=${encodeURIComponent(r)}`}),(o==null?void 0:o.type)==="click"&&n({pathname:"/search/",search:`?search=${encodeURIComponent(r)}`}))},[n,r]);return i.jsxs("div",{className:"relative w-full lg:w-2/5",children:[i.jsx("input",{placeholder:e??"Looking for something?",onChange:t,className:"text-input-box-text placeholder:text-input-box-placeholder placeholder:truncate relative w-full shadow-sm border-[0.5px] border-input-box-border placeholder:text-xl border-0 p-4 text-xl bg-transparent",onKeyDown:s}),i.jsx("div",{className:"absolute h-full flex items-center justify-center right-0 top-0 transform px-4",children:i.jsx(pe.button,{initial:{rotate:0},animate:{rotate:r?180:0},transition:{duration:.3},onClick:s,children:r?i.jsx(Li,{className:"h-6 w-6 text-input-box-text transition duration-200",strokeWidth:2.5}):i.jsx(Jp,{className:"h-6 w-6 text-input-box-text transition duration-200",strokeWidth:2.5})})})]})},cl=d.createContext(void 0),Rh=({children:e})=>{const[t,r]=d.useState(!1),[n,s]=d.useState(!1),o=()=>r(!0),a=()=>r(!1),l=()=>s(!0),c=()=>s(!1);return i.jsx(cl.Provider,{value:{isAddressModalOpen:t,isScheduledFulfillmentModalOpen:n,openAddressModal:o,closeAddressModal:a,openScheduledFulfillmentModal:l,closeScheduledFulfillmentModal:c},children:e})},ul=()=>{const e=d.useContext(cl);if(e===void 0)throw new Error("useModal must be used within a ModalProvider");return e},pt=({image:e,strapiUrl:t,strapiUploadUrl:r,presetType:n="medium",options:s={}})=>{var y,C,I;const o=t===r;if(!e)return{src:"",srcset:"",sizes:""};const{width:a,height:l,formats:c}=((y=e==null?void 0:e.data)==null?void 0:y.attributes)??{},f=a/l;let u,p,h;const v=(I=(C=e.data)==null?void 0:C.attributes)==null?void 0:I.url.match(/https:\/\/project-platform-strapi-images\.s3\.us-west-1\.amazonaws\.com(\/[^?]*)/),g=v?v[1]:"";switch(n){case"original":{u=`${r}${g}?format=webp`,p=[],h="";break}case"small":p=[100,200,400],h="(max-width: 768px) 100px, 200px";break;case"medium":p=[300,600,800],h="(max-width: 768px) 300px, (max-width: 1200px) 600px, 600px";break;case"large":{p=[800,1200,1600,2e3],h=`(max-width: 768px) 768px, (max-width: 1200px) 1200px, ${s.maxWidth||2e3}px`;break}default:console.warn(`Invalid presetType "${n}". Falling back to "medium".`),p=[300,600,900,1200],h="(max-width: 768px) 300px, (max-width: 1200px) 600px, 900px"}if(o){const S=Object.values(c??{}).map(({url:w,width:T})=>`${r}${w} ${T}w`).join(", "),k=Object.values(c??{}).map(({width:w})=>`(max-width: ${w*1.5}px) ${w}px`).join(", ");return{src:S.split(",")[0].split(" ")[0],srcset:S,sizes:k}}const m=p.map(S=>{const k=Math.round(S/f);return`${r}${g}?format=webp&width=${S}&height=${k} ${S}w`}).join(", ");if(!u){const S=Math.round(p[1]/f);u=`${r}${g}?format=webp&width=${p[1]}&height=${S}`}return{src:u,srcset:m,sizes:h}},ig=({video:e,strapiUploadUrl:t})=>{var a,l,c,f,u;if(!e)return{src:"",srcset:"",sizes:""};if(!e)return{src:"",srcset:"",sizes:""};let r="";
79const n=(l=(a=e.data)==null?void 0:a.attributes)==null?void 0:l.url.match(/https:\/\/project-platform-strapi-images\.s3\.us-west-1\.amazonaws\.com(\/[^?]*)/),s=n?n[1]:"",o=(u=(f=(c=e==null?void 0:e.data)==null?void 0:c.attributes)==null?void 0:f.ext)==null?void 0:u.replace(".","").toLowerCase();return r=`${t}${s}?format=${o}`,{src:r,srcset:"",sizes:""}},Lh=({onConsent:e,onCookieSetup:t,onAcceptAllCookies:r,onDismiss:n})=>{const s=()=>{r({necessary:!0,performance:!0,functional:!0,advertising:!0}),e==null||e()};return i.jsx(Ke,{children:i.jsxs(pe.div,{initial:{y:300},animate:{y:0},exit:{y:300},transition:{type:"spring",duration:.7},className:"fixed z-[100] bottom-0 left-0 bg-neutral-50 w-full flex justify-center shadow-[0_-2px_10px_rgba(0,0,0,0.1)]",children:[i.jsx("button",{type:"button",onClick:n,className:"absolute top-2 right-2 p-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-200 rounded-full transition-colors","aria-label":"Dismiss cookie banner",children:i.jsx($r,{className:"h-5 w-5"})}),i.jsxs("div",{className:"flex lg:flex-row flex-col max-w-[1440px] items-center lg:gap-16 gap-4 p-4 pr-10",children:[i.jsxs("span",{className:"text-xs text-gray-700 flex items-start gap-2",children:[i.jsxs("svg",{className:"h-5 w-5 shrink-0 text-gray-500",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[i.jsx("circle",{cx:"12",cy:"12",r:"10"}),i.jsx("circle",{cx:"8",cy:"9",r:"1",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"13",cy:"14",r:"1",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"16",cy:"8",r:"1",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"9",cy:"15",r:"1",fill:"currentColor",stroke:"none"}),i.jsx("circle",{cx:"14",cy:"6",r:"0.7",fill:"currentColor",stroke:"none"})]}),i.jsx("span",{children:"We use cookies to personalize your experience, including content and ads, and to analyze site traffic. We may share your usage data with partners to enhance your experience and improve our services."})]}),i.jsxs("div",{className:"flex lg:flex-row flex-col items-center gap-2 w-full md:w-auto shrink-0",children:[i.jsx(_e,{label:"Accept All",size:"lg",className:"bg-black border-0 hover:bg-[#333] w-full md:w-auto px-10 text-sm font-semibold",onClick:s}),i.jsx("button",{type:"button",className:"text-xs text-gray-500 hover:text-gray-800 underline underline-offset-2 transition-colors whitespace-nowrap",onClick:t,children:"Set my Cookies"})]})]})]},"cookie-consent-banner")})},yi=({title:e,id:t,checked:r,onToggle:n,className:s})=>{const[o,a]=d.useState(r),l=c=>{a(c),n==null||n()};return d.useEffect(()=>{a(r)},[r]),i.jsxs("div",{className:`flex flex-row lg:flex-col gap-3 items-center justify-between px-6 py-4 ${s}`,children:[i.jsx("label",{className:"text-left lg:text-center font-medium",htmlFor:t,children:e}),i.jsx(_p,{disabled:e==="Necessary Cookies",checked:o,onChange:l,className:`${e==="Necessary Cookies"&&"cursor-not-allowed"} ${o?"bg-active":"bg-gray-200"} relative inline-flex h-6 w-11 items-center rounded-full`,children:i.jsx("span",{className:`${o?"translate-x-6":"translate-x-1"} inline-block h-4 w-4 transform rounded-full bg-white transition`})})]})},Ph=({onConsent:e,handleResetDialog:t,cookiePreferences:r,handleCookiePreferences:n,setCookiePreferences:s})=>{const[o,a]=d.useState(!0),l=()=>{typeof document<"u"&&(localStorage.setItem("cookie_consent",JSON.stringify(r)),a(!1),e(),t())},c=()=>{a(!1),t()},f=u=>{s(p=>({...p,...u}))};return o?i.jsx(he.Root,{show:o,as:d.Fragment,children:i.jsx(Te,{as:"div",className:"fixed inset-0 z-50 overflow-y-auto",onClose:()=>{},children:i.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0",children:[i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te.Overlay,{className:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75"})}),i.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"â"}),i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:i.jsxs("div",{className:"relative inline-block overflow-hidden text-left align-bottom transition-all transform bg-white shadow-xl sm:my-8 sm:align-middle max-w-md lg:max-w-2xl sm:w-full",children:[i.jsx("button",{type:"button",onClick:c,className:"absolute top-3 right-3 p-1.5 text-gray-600 hover:text-gray-900 hover:bg-gray-200 rounded-full transition-colors z-10","aria-label":"Close cookie settings",children:i.jsx($r,{className:"h-5 w-5"})}),i.jsxs("div",{children:[i.jsxs("div",{className:"p-6 pr-10",children:[i.jsx(Te.Title,{as:"h3",className:"text-lg text-left font-bold text-gray-900",children:"Cookie Consent"}),i.jsx("div",{className:"mt-2",children:i.jsx("p",{className:"text-sm text-left text-gray-500",children:"We use cookies to personalize your experience, including content and ads, and to analyze site traffic. We may share your usage data with partners to enhance your experience and improve our services."})})]}),i.jsx(Ft,{className:"bg-neutral-200"})]}),i.jsxs("div",{className:"flex lg:flex-row flex-col border-b-[1px] border-neutral-200",children:[i.jsx(yi,{checked:r.necessary,title:"Necessary Cookies",id:"necessary-cookies",className:"lg:border-r-[1px] border-b-[1px] border-neutral-100"}),["performance","functional","advertising"].map(u=>i.jsx(yi,{checked:r[u],title:`${u.charAt(0).toUpperCase()+u.slice(1)} Cookies`,id:`${u}-cookies`,onToggle:()=>n(u)},u))]}),i.jsxs("div",{className:"flex flex-col lg:flex-row border-b-[1px] border-neutral-200 items-center gap-3 p-4",children:[i.jsx(_e,{type:"button",variant:"default",className:"inline-flex w-full border-black bg-transparent hover:bg-black hover:text-white text-black justify-center px-4 py-2 text-base font-medium sm:text-sm",onClick:()=>f({necessary:!0,performance:!1,functional:!1,advertising:!1}),children:"Use necessary cookies only"}),i.jsx(_e,{type:"button",className:"inline-flex w-full border-black bg-transparent hover:bg-black hover:text-white text-black justify-center px-4 py-2 text-base font-medium sm:text-sm",onClick:()=>f({necessary:!0,performance:!0,functional:!0,advertising:!0}),children:"Use all cookies"})]}),i.jsx("div",{className:"flex flex-col lg:flex-row items-center gap-3 p-4",children:i.jsx(_e,{type:"button",className:"inline-flex w-full bg-black justify-center hover:bg-[#333] px-4 py-2 text-base font-medium text-white border border-transparent shadow-sm focus:outline-none focus:ring-2 focus:ring-offset-2 sm:text-sm",onClick:l,children:"Save preferences"})})]})})]})})}):null},$h=({toggleCookieModal:e})=>{const t=()=>{e==null||e()};return i.jsx(pe.button,{"data-cookie-toggle":!0,onClick:t,children:i.jsx("span",{className:"text-sm text-gray-500 font-light transition duration-200",children:"Cookie Preferences"})})};var We=(e=>(e.AgeVerification="age",e.CookieConsent="cookieModal",e.AddressCollection="address",e.Welcome="welcome",e.Promo="promo",e.None="none",e))(We||{}),wr=(e=>(e.CookieConsent="cookieBanner",e))(wr||{});const dl=d.createContext(null),Fh=({children:e})=>{const[t,r]=d.useState(!1),{data:n,load:s}=tt(),{data:o,submit:a}=tt(),l=js();d.useEffect(()=>{s("/api/promo")},[]),d.useEffect(()=>{var f;n&&!l&&r(((f=n==null?void 0:n.storedPromo)==null?void 0:f.dismissed)===!1)},[l,n]);const c=d.useCallback(()=>{const f=new FormData,u=(n==null?void 0:n.uuid)??null;f.set("uuid",u),a(f,{action:"/api/promo",method:"POST"})},[n,a]);return i.jsx(dl.Provider,{value:{promo:n,dismissData:o,show:t,dismiss:c,setShow:r},children:e})},ho=()=>d.useContext(dl),Uh=()=>{var f,u,p,h;const{promo:e,show:t,dismiss:r,setShow:n}=ho()??{promo:null},s=St(),{ENV:o}=Ie(),a=d.useMemo(()=>{var v;return(v=e==null?void 0:e.content)==null?void 0:v.map((g,m)=>
79{switch(g==null?void 0:g.__typename){case"ComponentBaseHeader":return i.jsx(ur,{...g},`promo-${m}`);case"ComponentBaseButton":{const y=g;return i.jsx(_e,{label:y.label,decorator:y.decorator,decoratorPosition:y.decoratorPosition,className:y.tailwindClasses??"",onClick:()=>{y!=null&&y.slug&&s(y.slug),c()}},`promo-${m}`)}default:return null}})},[e==null?void 0:e.content]),l=pt({image:(f=e==null?void 0:e.image)==null?void 0:f.image,strapiUrl:o.STRAPI_URL,strapiUploadUrl:o.STRAPI_UPLOAD_URL,presetType:"large"}),c=()=>{r==null||r(),n==null||n(!1)};return i.jsx(he.Root,{show:t,as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te,{as:"div",className:"fixed inset-0 z-50 overflow-y-auto",onClose:()=>{},children:i.jsxs("div",{className:"flex items-center justify-center min-h-screen px-4 pt-4 pb-20 text-center sm:block sm:p-0",children:[i.jsx(he.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te.Overlay,{className:"fixed inset-0 transition-opacity bg-gray-500 bg-opacity-75"})}),i.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"â"}),i.jsx(he.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:i.jsx("div",{className:"inline-block overflow-hidden text-left align-bottom transition-all transform bg-background shadow-xl sm:my-8 sm:align-middle max-w-md lg:max-w-4xl sm:w-full",children:i.jsxs("div",{className:"max-w-4xl w-full max-h-[650px] md:max-h-[400px] h-[85vh] relative",children:[i.jsx("button",{className:"absolute top-0 right-0 w-12 h-12 flex items-center justify-center p-2 bg-transparent md:bg-neutral-100 outline-none",onClick:c,"aria-label":"Close promotion",children:i.jsx(uo,{className:"text-background md:text-primary-500 w-12 h-12"})}),i.jsxs("div",{className:"w-full h-full flex flex-col md:flex-row",children:[((u=l==null?void 0:l.src)==null?void 0:u.length)>0&&i.jsx("div",{className:le("flex-1 h-full",((p=e==null?void 0:e.image)==null?void 0:p.containerTailwindClasses)??""),children:i.jsx("img",{src:l.src,alt:(e==null?void 0:e.previewText)??"",loading:"eager",className:le("w-full h-full object-cover",((h=e==null?void 0:e.image)==null?void 0:h.tailwindClasses)??"")})}),i.jsx("div",{className:"flex-1 w-full h-full p-4 flex flex-col items-center justify-center",children:a})]})]})})})]})})})},fl=d.createContext({isVerified:!1,hasCheckedVerification:!1,setIsVerified:()=>{},setHasCheckedVerification:()=>{}}),Bh=({children:e})=>{const[t,r]=d.useState(!0),[n,s]=d.useState(!1),{data:o,submit:a}=tt(),l=()=>{const c=new FormData;c.set("method","GET"),a(c,{action:"/api/age-verification",method:"post"})};return d.useEffect(()=>{l()},[]),d.useEffect(()=>{if(o==null){s(!1);return}o&&(s(!0),r(o.status===200))},[o]),i.jsx(fl.Provider,{value:{isVerified:t,hasCheckedVerification:n,setIsVerified:r,setHasCheckedVerification:s},children:e})},pl=()=>{const{isVerified:e,setIsVerified:t,hasCheckedVerification:r}=d.useContext(fl),{data:n,submit:s}=tt(),o=({dob:a,isOver21:l})=>{const c=new FormData;c.set("dob",String(a)),c.set("isOver21",l===!0?"true":"false"),c.set("method","POST"),s(c,{action:"/api/age-verification",method:"post"})};return d.useEffect(()=>{n&&t((n==null?void 0:n.status)===200)},[n]),{isVerified:e,hasCheckedVerification:r,updateData:n,updateAgeVerification:o}},ln=99,Hh=({quantity:e,amountPerQuantity:t,totalCostPerUnit:r,attribute:n,description:s,imageUrl:o,loading:a,image:l,slug:c,name:f,productName:u,hasControls:p,modifiers:h,onEdit:v,onIncrement:g,onDecrement:m,onItemSelect:y,quantityError:C,onQuantityError:I})=>{var j;const[S,k]=d.useState(null),{carts:O}=Je(),w=C!==void 0?C:S,T=I||k,b=()=>{if(T(null),e>=ln){T(`Maximum quantity is ${ln}`);return}if(((O==null?void 0:O.reduce(($,L)=>{var P;return $+(((P=L==null?void 0:L.cartLines)==null?void 0:P.reduce((R,H)=>R+((H==null?void 0:H.quantity)??0),0))??0)},0))??0)>=ln){T("Maximum cart quantity reached");return}g()};d.useEffect(()=>{if(!w)return;const M=setTimeout(()=>T(null),2e3);return()=>
79clearTimeout(M)},[w,T]);const _=()=>{T(null),m()},x=d.useMemo(()=>l?`${l==null?void 0:l.scale1x} 1x, ${l==null?void 0:l.scale2x} 2x, ${l==null?void 0:l.scale3x} 3x`:"",[l]);return i.jsxs(i.Fragment,{children:[i.jsxs("div",{className:"h-fit p-1 w-fit overflow-hidden min-w-[50px] min-h-[50px]",children:[i.jsx("img",{src:(j=l==null?void 0:l.scale1x)!=null&&j.length?l==null?void 0:l.scale1x:o,srcSet:x,sizes:"(max-width: 768px) 100px, (max-width: 1200px) 150px, 200px",alt:f,className:"p-1 object-contain rounded-lg overflow-hidden",width:80,height:80}),v&&i.jsx("button",{className:"w-full flex items-center justify-center",onClick:v,children:i.jsx("span",{className:"text-sm text-primary-500 font-light uppercase tracking-[.2em]",children:"EDIT"})})]}),i.jsx("div",{className:"flex w-full h-full gap-3 overflow-hidden opacity-1 lg:gap-4",children:i.jsx("div",{className:"flex items-center justify-between w-full gap-2 overflow-hidden lg:gap-4",children:i.jsxs("div",{className:"flex w-full gap-2 overflow-hidden lg:justify-between",children:[i.jsxs("div",{className:"flex flex-col w-full gap-1 overflow-hidden",children:[i.jsx(xe,{className:"flex flex-col w-full",to:c?`/products/${c}`:"#",onClick:y,children:i.jsx("span",{className:"text-sm font-bold leading-tight line-clamp-2",children:u})}),i.jsx("span",{className:"text-sm leading-tight text-gray-500 line-clamp-2",children:h!=null&&h.length?h.map(M=>{var $;return($=M.modifier)==null?void 0:$.name}).join(", "):n}),(s==null?void 0:s.trim().length)&&i.jsx("span",{className:"text-xs leading-tight text-gray-600 line-clamp-2",children:s}),i.jsxs("span",{className:"text-sm font-medium",children:[r??t,!p&&` x ${e}`]})]}),i.jsx("div",{className:"flex flex-col items-end justify-between gap-2 lg:justify-normal lg:gap-4",children:i.jsx(hl,{hasControls:p,quantity:e,loading:a,onIncrement:b,onDecrement:_,quantityError:w})})]})})})]})},hl=({quantity:e,loading:t,onIncrement:r,onDecrement:n,hasControls:s,quantityError:o})=>i.jsxs("div",{className:"flex flex-col items-center gap-1",children:[i.jsxs("div",{className:`h-auto ${s?"border border-cart-border":""} flex justify-between items-center max-w-[110px] ${t&&"loading"} ${o?"border-red-300":""}`,children:[s?i.jsx("button",{type:"button","aria-label":"decrement quantity by 1",disabled:!s||t,className:"p-2 transition-colors rounded-full hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed",onClick:n,children:e<=1?i.jsx(lo,{className:"w-4 h-4"}):i.jsx(oo,{className:"w-4 h-4"})}):null,s&&i.jsx("div",{className:"px-3 max-h-[27px]",children:t?i.jsx(Pi,{}):e}),s?i.jsx("button",{type:"button",disabled:t||e>=ln,className:"p-2 transition-colors rounded-full hover:cursor-pointer disabled:opacity-50 disabled:cursor-not-allowed","aria-label":"increment quantity by 1",onClick:r,children:i.jsx(io,{className:"w-4 h-4"})}):null]}),i.jsx(Ke,{initial:!1,children:o&&i.jsx(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"text-red-500 text-xs text-center max-w-[110px] leading-tight",children:o})})]}),qh=({totalCostPerUnit:e,amountPerQuantity:t,containerType:r,packSize:n,uom:s,size:o,imageUrl:a="https://d3gevp8yznwb3s.cloudfront.net/images/UNAVAILABLE.png",slug:l,name:c,image:f,productName:u,loading:p,quantity:h,expanded:v,hasControls:g,ingredientsList:m,onEdit:y,onIncrement:C,onDecrement:I,onRemove:S,onItemSelect:k,modifiers:O})=>{const{sizeString:w,packString:T}=Ri({size:o,uom:s,packSize:n,containerType:r}),b=`${n>1?`${n} Ã `:""}${w} ${T}`;return i.jsx(pe.div,{initial:{height:"auto",opacity:0}
79,animate:{height:v?"auto":0,opacity:v?1:0},exit:{height:0,opacity:0},className:"flex gap-2 overflow-hidden items-center",children:i.jsx(Hh,{quantity:h,image:f,imageUrl:a,amountPerQuantity:t,totalCostPerUnit:e,attribute:m||b,loading:!!p,slug:l??"",name:c,productName:u,hasControls:g,onEdit:y,onIncrement:()=>C==null?void 0:C(),onDecrement:()=>I==null?void 0:I(),onRemove:()=>S==null?void 0:S(),modifiers:O,onItemSelect:k})})},zh=({code:e,message:t,warning:r,disabled:n,name:s,loading:o,hideCloseButton:a,onDelete:l,isValid:c})=>i.jsx(pe.div,{initial:{height:0,opacity:0},animate:{height:"auto",opacity:1},exit:{height:0,opacity:0},className:`flex items-center gap-2 overflow-hidden ${c?"bg-primary-50 border border-primary-700 text-primary-800":"bg-primary-50 text-gray-500"}`,children:i.jsx("div",{className:"w-full",children:i.jsxs("div",{className:"h-fit p-4 flex-row justify-between items-center flex overflow-hidden w-full",children:[i.jsxs("div",{className:"flex gap-3 items-center",children:[i.jsx(Kp,{className:"h-6 w-6"}),i.jsxs("span",{className:"flex flex-col leading-tight",children:[i.jsxs("p",{className:"text-sm font-bold leading-tight",children:[s?`${s} | `:"",`"${e}"`]}),i.jsx("p",{className:"text-sm",children:t}),i.jsx("p",{className:"text-xs",children:r})]})]}),a?null:i.jsx("button",{type:"button",className:"flex items-center gap-x-2 relative",disabled:o||n,onClick:()=>l==null?void 0:l(e),children:o?i.jsx(Pi,{}):i.jsx(uo,{className:"w-5 h-5 transition-all"})})]})})}),mo=Bl,Wh=Ul,Gh=Ii,ml=d.forwardRef(({className:e,...t},r)=>i.jsx(Ei,{ref:r,className:le("fixed inset-0 z-50 bg-black/80 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0",e),...t}));ml.displayName=Ei.displayName;const Bn=d.forwardRef(({className:e,children:t,...r},n)=>i.jsxs(Wh,{children:[i.jsx(ml,{}),i.jsxs(ki,{ref:n,className:le("fixed left-[50%] top-[50%] z-50 grid w-full max-w-lg translate-x-[-50%] translate-y-[-50%] gap-4 border bg-background p-6 shadow-lg duration-200 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 data-[state=closed]:slide-out-to-left-1/2 data-[state=closed]:slide-out-to-top-[48%] data-[state=open]:slide-in-from-left-1/2 data-[state=open]:slide-in-from-top-[48%] sm:rounded-lg",e),...r,children:[t,i.jsxs(Ii,{className:"absolute right-4 top-4 roun
79ded-sm opacity-70 ring-offset-background transition-opacity hover:opacity-100 focus:outline-none focus:ring-2 focus:ring-ring focus:ring-offset-2 disabled:pointer-events-none data-[state=open]:bg-accent data-[state=open]:text-muted-foreground",children:[i.jsx(Mi,{className:"h-4 w-4"}),i.jsx("span",{className:"sr-only",children:"Close"})]})]})]}));Bn.displayName=ki.displayName;const Hn=({className:e,...t})=>i.jsx("div",{className:le("flex flex-col space-y-1.5 text-center sm:text-left",e),...t});Hn.displayName="DialogHeader";const qn=({className:e,...t})=>i.jsx("div",{className:le("flex flex-col-reverse sm:flex-row sm:justify-end sm:space-x-2",e),...t});qn.displayName="DialogFooter";const zn=d.forwardRef(({className:e,...t},r)=>i.jsx(Ti,{ref:r,className:le("text-lg font-semibold leading-none tracking-tight",e),...t}));zn.displayName=Ti.displayName;const gl=d.forwardRef(({className:e,...t},r)=>i.jsx(Oi,{ref:r,className:le("text-sm text-muted-foreground",e),...t}));gl.displayName=Oi.displayName;const Yh=e=>{var r,n,s,o,a,l;return!e||(l=(a=(o=(s=(n=(r=e==null?void 0:e.variants)==null?void 0:r.edges)==null?void 0:n[0])==null?void 0:s.node)==null?void 0:o.availability)==null?void 0:a[0])!=null&&l.modifierGroups?e:{...e,variants:{edges:[{node:{availability:[{modifierGroups:e.modifierGroup||[]}]}}],pageInfo:{hasNextPage:!1,hasPreviousPage:!1,__typename:"PageInfo"},__typename:"ProductVariantConnection"}}};function Vh({showEdit:e,setShowEdit:t,containerType:r,packSize:n,uom:s,size:o,imageUrl:a,product:l,cartLineModifiers:c,cartLineId:f,quantity:u,updateModifiers:p,storeID:h,requestKey:v,loading:g,description:m}){var M,$;const{selections:y,setSelection:C}=Hl(),[I,S]=d.useState(u);d.useEffect(()=>{S(u)},[u]);const k=d.useMemo(()=>c.map(P=>{var R;return{modifierGroupId:P.modifier.modifierGroup.id??"",totalQuantity:P.quantity,modifiers:[{id:P.modifierId,name:P.name,title:P.name,cost:((R=P==null?void 0:P.price)==null?void 0:R.amount)??0,quantity:P.quantity,...P.modifier.image&&{image:P.modifier.image},option:{id:P.modifierId,name:P.name}}]}}),[c]),{sizeString:O,packString:w}=Ri({size:o,uom:s,packSize:n,containerType:r}),T=!!((M=l==null?void 0:l.modifierGroup)!=null&&M.length),b=($=l==null?void 0:l.modifierGroup)==null?void 0:$.some(L=>L.min>0),_=d.useMemo(()=>!b||!(l!=null&&l.modifierGroup)?!0:l.modifierGroup.every(L=>{if(L.min<=0)return!0;const P=y.find(R=>R.modifierGroupId===L.id);return P?P.totalQuantity>=L.min:!1}),[b,l==null?void 0:l.modifierGroup,y]),x=d.useCallback(async()=>{await p(f,I,h,`adjust-${v}`,y),t("")},[p,f,I,h,y,v,t]),j=d.useMemo(()=>Yh(l),[l]);return i.jsx(mo,{open:!!e,onOpenChange:L=>{L||t("")},children:i.jsxs(Bn,{className:"max-h-[85vh] lg:max-h-[70vh] lg:min-w-[80vw] overflow-y-auto overflow-x-hidden p-0 no-scrollbar flex flex-col",onPointerDownOutside:L=>L.preventDefault(),onInteractOutside:L=>L.preventDefault(),onFocusOutside:L=>L.preventDefault(),children:[i.jsx(Hn,{className:"sticky top-0 z-[100] bg-white",children:i.jsxs(zn,{className:"font-normal text-sm tracking-normal border-b border-neutral-200 p-4 flex items-center justify-between",children:[i.jsx(it,{className:"text-lg font-medium",children:"Edit your item"}),i.jsx(Gh,{children:i.jsx(Mi,{className:"w-4 h-4"})})]})}),i.jsxs(ql,{className:"",children:[i.jsxs("div",{className:"flex gap-4 mb-4 px-4",children:[i.jsx("img",{alt:"",src:a,width:"80"}),i.jsxs("div",{children:[i.jsx(it,{className:"font-medium text-lg",children:l.name}),i.jsx("p",{className:"text-neutral-400 text-sm font-light",children:T?m:`${O} ${w}`})]})]}),i.jsx("div",{className:"lg:w-full w-[100vw] lg:p-4",children:i.jsx(wh,{product:j,selections:y,setSelection:C,preSelectedOptions:k})})]}),i.jsx(qn,{className:"p-4 sticky bottom-0 bg-white border-t border-neutral-200",children:i.jsxs("div",{className:"flex gap-2",children:[i.jsx(hl,{hasControls:!0,loading:!1,quantity:I,onIncrement:()=>S(L=>L+1),onDecrement:()=>S(L=>L-1<=0?1:Math.max(0,L-1))}),i.jsx(_e,{className:"grow",variant:"default",spacing:"custom","aria-label":"Update item",onClick:x,disabled:g||b&&!_,children:i.jsxs("div",{className:"flex flex-row items-center justify-center gap-2",children:[g&&i.jsx(Pr,{className:"w-4 h-4 animate-spin"}),i.jsx("p",{children:g?"UPDATING":"UPDATE ITEM"})]})})]})})]})})}const Qh=({storeID:e,id:t,cartLineModifiers:r,cartLineId:n,product:s,description:o,...a})=>{var T;const l=`${t}-${e}
79`,c=Number(String(a.amountPerQuantity??"").replace(/[^0-9.-]/g,"")),f=Number.isFinite(c)?c:void 0,{inFlightRequests:u,updateModifiers:p,closeCartPopUp:h,loading:v}=Je(),{localQuantity:g,removeLoading:m,onIncrement:y,onDecrement:C}=Un(a.quantity??0,t,n,e,l,{itemId:t,itemName:a.name,unitPrice:f,itemVariant:a.size!=null||a.uom!=null?`${a.size??""}${a.uom??""}`.trim():void 0}),[I,S]=d.useState(""),k=((T=s==null?void 0:s.modifierGroup)==null?void 0:T.length)>0,O=()=>S(n),w=r!=null&&r.length?r==null?void 0:r.reduce((b,_)=>{const x=(_==null?void 0:_.quantity)>1?`${_.name} (${_.quantity})`:_.name;return b.length?`${b}, ${x}`:x},""):null;return i.jsxs(i.Fragment,{children:[i.jsx(qh,{...a,quantity:g,loading:u.current.has(`adjust-${l}`)||m||v,onDecrement:C,onIncrement:y,onRemove:C,onEdit:k?O:void 0,ingredientsList:w,onItemSelect:h}),k&&i.jsx(Vh,{imageUrl:a.imageUrl??"",packSize:a.packSize,size:a.size,uom:a.uom,containerType:a.containerType,showEdit:I,setShowEdit:S,product:s,quantity:g,cartLineId:n,cartLineModifiers:r??[],updateModifiers:p,storeID:e,loading:u.current.has(`adjust-${l}`),requestKey:l,description:o},`dialog-${n}`)]})},Kh=({expanded:e,cart:t})=>{var n;const r=(n=t==null?void 0:t.cartLines)==null?void 0:n.sort((s,o)=>{var a,l,c;return(c=(a=s.merchandise)==null?void 0:a.name)==null?void 0:c.localeCompare((l=o.merchandise)==null?void 0:l.name)});return i.jsx("div",{className:`grid grid-cols-1 gap-${e?"6":"0"}`,children:r==null?void 0:r.map((s,o)=>{var p,h,v,g,m,y,C,I,S,k;const{cost:a,id:l,merchandise:c,quantity:f,cartLineModifiers:u}=s;return i.jsx(Qh,{id:c.id,amountPerQuantity:((p=s==null?void 0:s.totalCostPerUnit)==null?void 0:p.presentation)??"",totalCostPerUnit:((h=s==null?void 0:s.totalCostPerUnit)==null?void 0:h.presentation)??"",totalPrice:((v=a==null?void 0:a.subtotalAmount)==null?void 0:v.presentation)??"",containerType:((g=c.attributes)==null?void 0:g.container_type)??"",imageUrl:(m=c.image)==null?void 0:m.url,image:c==null?void 0:c.image,name:c.name,productName:(y=c.product)==null?void 0:y.name,packSize:((C=c.attributes)==null?void 0:C.pack_size)??0,size:((I=c.attributes)==null?void 0:I.size)??0,uom:((S=c.attributes)==null?void 0:S.uom)??"",slug:((k=c.product)==null?void 0:k.slug)??"",quantity:f,expanded:e,hasControls:!0,storeID:t.merchant.storeID,cartLineModifiers:u??[],cartLineId:l,product:c.product,description:(c==null?void 0:c.description)??void 0},`${l} ${o}`)})})};function Zh(e){return e.discountType==="PERCENTAGE_OFF_TOTAL"?e.discountPercentage==null?"":`${e.discountPercentage*100}% off total.`:e.discountType==="AMOUNT_OFF_TOTAL"?e.discountAmount==null?"":`-$${new Ge(e.discountAmount).toFixed(2)}`:e.discountType==="AMOUNT_OFF_PRODUCT_VARIANT"?`${e.name}`:""}const Jh=({onConfirm:e})=>{var _;const{ageVerificationConfig:t}=Ie(),r=d.useMemo(()=>!!(t!=null&&t.enabled),[t==null?void 0:t.enabled]),n=d.useMemo(()=>t!=null&&t.delay?t.delay:0,[t==null?void 0:t.delay]),[s,o]=d.useState(!1),[a,l]=d.useState({month:"",day:"",year:""}),[c,f]=d.useState(""),{day:u,month:p,year:h}=a,v=d.useRef(null),g=d.useRef(null),m=d.useRef(null),{isVerified:y,updateData:C,updateAgeVerification:I}=pl(),S=x=>{I({isOver21:x})},k=x=>/^[0-9]*$/.test(x),O=x=>{const{value:j,name:M}=x.target;if(k(j))switch(f(""),M){case"month":if(parseInt(j)>=12){l($=>({...$,[M]:"12"})),b(x,g);break}l($=>({...$,[M]:j})),b(x,g);break;case"day":if(parseInt(j)>=31){l($=>({...$,[M]:"31"})),b(x,m);break}l($=>({...$,[M]:j})),b(x,m);break;case"year":l($=>({...$,[M]:j})),b(x,m);break}},w=d.useCallback(()=>{const{day:x,month:j,year:M}=a,$=parseInt(x),L=parseInt(j),P=parseInt(M),R=new Date(P,L-1,$),H=R.getMonth()+1,Y=R.getDate(),z=R.getFullYear();if(H!==L||Y!==$||z!==P){f(`${j}/${x}/${M} is not a valid date.`);return}else I({dob:R});Rr("Age Verification - Submitted",{dob:`${j}/${x}/${M}`})},[a,I]),T=d.useMemo(()=>Object.values(a).every(x=>{const j=!!x.trim().length,M=x.trim().length>0&&x!=null&&!isNaN(parseInt(x));return j&&M}),[a]),b=(x,j)=>{var M,$;x.target.value.length===2&&j&&(j!=null&&j.current)&&(($=(M=j==null?void 0:j.current)==null?void 0:M.focus)==null||$.call(M))};return d.useEffect(()=>
79{if(!r||r&&y)o(!1),e==null||e();else if(!y){const x=setTimeout(()=>{o(!0),f((C==null?void 0:C.message)??"You must be 21 or older to access this site.")},n);return()=>clearTimeout(x)}},[r,C,y,e,n]),d.useEffect(()=>{const x=setTimeout(()=>{Rr("Age Verification - Opened")},2e3);return()=>clearTimeout(x)},[]),i.jsx(he.Root,{show:s,as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te,{as:"div",className:"fixed z-50 inset-0 overflow-y-hidden",onClose:()=>{},children:i.jsxs("div",{className:"flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","data-testid":"overlay"})}),i.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"â"}),i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:i.jsx("div",{className:"inline-block align-bottom bg-age-verification-modal-background text-age-verification-modal-text rounded-md px-4 pt-5 pb-4 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6",children:(t==null?void 0:t.formType)==="date_form"?i.jsxs("div",{className:"flex flex-col w-full gap-y-4",children:[i.jsxs("div",{className:"text-center",children:[i.jsx(Te.Title,{as:"h3",className:"text-lg leading-6 font-medium text-age-verification-modal-text",children:"You must be of legal drinking age to enter this site."}),i.jsxs("div",{className:"mt-2",children:[i.jsx("p",{className:"text-sm text-age-verification-modal-text",children:'Please enter your date of birth below and press "Enter"'}),i.jsx("p",{className:"text-sm text-age-verification-modal-text",children:"(MM/DD/YYYY)"})]})]}),i.jsxs("div",{className:"w-full flex items-center justify-center gap-x-2",children:[i.jsx(_r,{ref:v,label:"Month",input:{inputMode:"numeric",name:"month",value:p,placeholder:"MM",maxLength:2,onChange:O}}),i.jsx(_r,{ref:g,label:"Day",input:{inputMode:"numeric",name:"day",value:u,placeholder:"DD",maxLength:2,onChange:O}}),i.jsx(_r,{ref:m,label:"Year",input:{inputMode:"numeric",name:"year",value:h,placeholder:"YYYY",maxLength:4,onChange:O}})]}),i.jsx("div",{className:"",children:i.jsx(_e,{disabled:!T||c.length>0||((_=a.year)==null?void 0:_.length)!==4,label:"Enter",type:"button",className:"w-full inline-flex justify-center border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 sm:text-sm",onClick:w})}),c.length>0&&i.jsx("div",{className:"w-full flex gap-x-1 justify-center",children:i.jsx("p",{className:"text-red-400 text-sm",children:c})})]}):i.jsxs("div",{className:"flex flex-col w-full gap-y-4 justify-center items-center",children:[i.jsxs("div",{className:"flex flex-col justify-center items-center gap-y-2",children:[i.jsx(it,{variant:"h2",weight:"medium",align:"center",className:"text-age-verification-modal-text",children:"Just Checking"}),i.jsx(it,{variant:"body",align:"center",className:"leading-tight text-sm text-age-verification-modal-text",children:"Please verify that you are 21 years of age or older"})]}),i.jsxs("div",{className:"flex flex-col gap-2 w-full",children:[i.jsx(_e,{label:"Yes",className:"w-full text-md p-6",onClick:()=>S(!0)}),i.jsx(_e,{label:"No",variant:"outline",className:"w-full text-md p-6",onClick:()=>S(!1)})]})]})})})]})})})},Xh=({title:e,description:t,onClose:r,show:n})=>i.jsx(he.Root,{show:n,as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te,{as:"div",className:"fixed z-50 inset-0 overflow-y-hidden",onClose:()=>{},children:i.jsxs("div",{className:"flex items-center justify-center min-h-screen pt-4 px-4 pb-20 text-center sm:block sm:p-0",children:[i.jsx(he.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx(Te.Overlay,{className:"fixed inset-0 bg-gray-500 bg-opacity-75 transition-opacity","data-testid":"overlay"})}),i.jsx("span",{className:"hidden sm:inline-block sm:align-middle sm:h-screen","aria-hidden":"true",children:"â"}),i.jsx(he.Child,{as:i.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",enterTo:"opacity-100 translate-y-0 sm:scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 translate-y-0 sm:scale-100",leaveTo:"opacity-0 translate-y-4 sm:translate-y-0 sm:scale-95",children:i.jsx("div",{className:"inline-block align-bottom bg-white p-6 text-left overflow-hidden shadow-xl transform transition-all sm:my-8 sm:align-middle sm:max-w-lg sm:w-full sm:p-6 lg:min-w-[600px]",children:i.jsxs("div",{className:"flex flex-col w-full gap-y-4",children:[i.jsxs("div",{className:"text-center",children:[i.jsx("div",{className:"w-full flex items-center justify-center mb-6",children:i.jsx(Zp,{size:80,className:"text-primary-400"})}),i.jsx(Te.Title,{as:"h3",className:"text-3xl leading-6 font-bold mb-6",children:e}),i.jsx("p",{className:"text-gray-500",children:t})]}),i.jsx("div",{className:"w-full flex items-center justify-center gap-x-2"}),i.jsx("div",{className:"",children:i.jsx(_e,{label:"CONTINUE",labelWeight:"semibold",type:"button",width:"full",backgroundColor:"primary-500",className:"w-full tracking-[.2em] inline-flex justify-center border border-transparent shadow-sm px-4 py-2 text-base font-medium text-white focus:outline-none focus:ring-2 focus:ring-offset-2 sm:text-sm",onClick:r})})]})})})]})})}),em=({line1:e,line2:t,city:r,state:n,zip:s,country:o,coordinates:a,disabled:l,onClick:c,active:f})=>{const u=()=>{c&&(c==null||c({line1:e,line2:t,city:r,state:n,zip:s,country:o,coordinates:a??{latitude:null,longitude:null}}))},p=!e&&!r&&!n&&!s&&!o;return i.jsxs("button",{type:"button",disabled:l,className:`w-full border p-4 flex items-center gap-2 text-left ${l!==!0?"hover:bg-gray-50 hover:cursor-pointer":"cursor-default text-black"} 80 ${f?"bg-blue-50 border-blue-500 text-blue-500":""} 81 `,onClick:u,children:[i.jsx("div",{children:i.jsx(so,{className:"text-primary-900 w-6 h-6"})}),i.jsx("div",{className:"flex flex-col text-address-search-text",children:p?i.jsx("h3",{className:"text-sm text-left",children:"Set address here"}):i.jsxs(i.Fragment,{children:[i.jsxs("h3",{className:"text-sm font-medium text-left",children:[e,t&&(t!=null&&t.trim().length)?` | ${t}`:""]}),i.jsxs("p",{className:"text-sm font-light",children:[r,", ",n," ",s]})]})})]})},xi=({label:e,navLength:t,selected:r,onClick:n})=>{const s=()=>{n==null||n()},o=r?"text-primary":"text-black",a=r?"text-white":"text-black",l=r?"bg-primary":"bg-white",c=r?"border-primary border-b-2":"border-0";return i.jsx("button",{type:"button",className:"w-full",onClick:s,children:i.jsxs("div",{className:`flex items-center gap-2 justify-center ${c} py-2`,children:[i.jsx("span",{className:`text-sm lg:text-md font-bold ${o}`,children:e}),i.jsx("div",{className:`flex justify-center items-center rounded-full ${l} ${t===0||(t===""?"bg-transparent w-[0.1px] h-[32px]":"p-2 max-w-[32px] max-h-[32px] flex-1")}`,children:i.jsx("span",{className:`text-sm lg:text-md font-bold ${a}`,children:t})})]})})},tm=({savedAddressesLength:e,resultsLength:t,isLoggedIn:r,onSelect:n,selected:s})=>r&&i.jsxs("div",{className:"flex flex-col pb-4",children:[i.jsxs("div",{className:"flex",children:[i.jsx(xi,{label:"Your Addresses",navLength:e===0?"":e,selected:s==="SAVED",onClick:()=>n("SAVED")}),i.jsx(xi,{label:"Results",navLength:t===0?"":t,selected:s==="RESULTS",onClick:()=>n("RESULTS")})]}),i.jsx(Ft,{boldness:"medium"})]}),rm=({headerText:e,inputClassNameOverride:t,resultsClassNameOverride:r,hideDeliveryAddress:n,hideNav:s,onAddressSelect:o,onClose:a,userSavedAddress:l})=>{const{customer:c,deliveryAddress:f}=Ie(),[u,p]=d.useState("SAVED"),[h,v]=d.useState(""),[g,m]=d.useState([]),y=d.useRef(null),C=(()=>{const w=JSON.parse(f??"{}");return Object.keys(w).length?w:null})(),I=w=>{v(w.target.value)},S=w=>{o==null||o(w)},k=w=>{p(w)};d.useEffect(()=>{if(h.length<=2)return;p("RESULTS");const w=setTimeout(()=>{var _;(_=y.current)==null||_.abort();const T=new AbortController;y.current=T;const b=new FormData;b.set("address-search",h),fetch("/api/addresses/search",{method:"POST",body:b,signal:T.signal}).then(x=>x.json()).then(x=>{m((x==null?void 0:x.data)??[])}).catch(x=>{x.name!=="AbortError"&&console.error("Address search error:",x)})},350);return()=>clearTimeout(w)}
81,[h]),d.useEffect(()=>()=>{var w;(w=y.current)==null||w.abort()},[]),d.useEffect(()=>{c==null&&p("RESULTS")},[c]);const O=w=>{var T,b;return(b=(T=w==null?void 0:w.filter(_=>{var x;return!isNaN(Number((x=_==null?void 0:_.line1)==null?void 0:x[0]))}))==null?void 0:T.map)==null?void 0:b.call(T,(_,x)=>i.jsx(em,{city:_.city,country:_.country,line1:_.line1,line2:(_==null?void 0:_.line2)??"",state:_.state,zip:_.zip,coordinates:_.coordinates,onClick:S},x))};return i.jsxs("div",{className:"flex flex-col w-full h-full","aria-label":"Input Delivery Address",children:[i.jsxs("div",{className:"w-full flex flex-col gap-2",children:[i.jsxs("div",{children:[i.jsxs("div",{className:"flex items-center justify-between text-address-search-text",children:[e&&i.jsx("h1",{className:"text-lg text-center font-medium pt-1 pb-4",children:e}),i.jsx("button",{type:"button",onClick:a,className:"pr-2",children:i.jsx(uo,{className:"w-6 h-6 text-gray-400 active:text-gray-500 transition-colors ease-in-out"})})]}),i.jsx(Ft,{})]}),i.jsx("div",{className:"flex gap-2 py-2",children:i.jsx(_r,{label:"Search Address",className:"text-address-search-input-text",input:{value:h,onChange:I,placeholder:"Search Address",name:"address-search",autoComplete:"off",className:`${t}`}})}),!!(C&&!n)&&i.jsxs("div",{className:"flex items-center gap-4 p-4 bg-neutral-50",children:[i.jsx(el,{className:"w-5 h-5 text-black","aria-hidden":"true"}),i.jsxs("div",{className:"flex-1",children:[i.jsx("p",{className:"text-xs text-neutral-500 leading-1",children:"Delivery Address"}),i.jsx("p",{className:"text-sm leading-1",children:`${C==null?void 0:C.line1} ${C==null?void 0:C.line2}`}),i.jsxs("p",{className:"text-sm leading-1",children:[`${C==null?void 0:C.city},`," ",`${C==null?void 0:C.state}`," ",`${C==null?void 0:C.zip}`]})]})]}),s?null:i.jsx(tm,{isLoggedIn:c!=null,resultsLength:g.length,savedAddressesLength:(l==null?void 0:l.length)??"",onSelect:k,selected:u}),i.jsx("div",{className:`w-full flex flex-col overflow-auto max-h-[40vh] gap-2 ${r??""} noScrollBar`,children:u==="RESULTS"&&(g.length?O(g):null)})]}),c!=null&&i.jsx("div",{className:"pb-4",children:i.jsx("div",{className:"w-full flex flex-col overflow-auto max-h-[40vh] gap-2 noScrollBar",children:u==="SAVED"&&(l&&l.length?O(l.map(w=>({...w.node,coordinates:{latitude:w.node.latitude,longitude:w.node.longitude}}))):null)})})]})},vi={line1:"",line2:"",city:"",state:"",zip:"",country:"",coordinates:{latitude:null,longitude:null}},nm=()=>{const e=tt();return{updateDeliveryAddress:s=>{typeof document<"u"&&window.localStorage&&(window.localStorage.setItem("deliveryAddress",JSON.stringify(s)),e.submit({deliveryAddress:JSON.stringify(s),actionType:"setDeliveryAddress"},{method:"POST",action:"/api/customers/addresses"}))},getDeliveryAddress:()=>{var s;if(typeof document<"u"&&window.localStorage){const o=window.localStorage.getItem("deliveryAddress"),a=o==null||((s=o==null?void 0:o.trim())==null?void 0:s.length)<1?JSON.parse("{}"):JSON.parse(o);return Object.keys(a).length===0?(window.localStorage.setItem("deliveryAddress",JSON.stringify(vi)),vi):a}},deleteDeliveryAddress:()=>{typeof document<"u"&&window.localStorage&&window.localStorage.removeItem("deliveryAddress")}}},sm=({open:e,onClose:t,onSelect:r})=>{const{savedAddresses:n}=Ie(),{updateDeliveryAddress:s}=nm(),o=a=>{s(a),r()};return i.jsx(ah,{isOpen:e,onClose:t,"aria-label":"Address Search Modal",children:i.jsx("div",{className:"p-4 text-address-collection-text","aria-label":"Address Search Panel",children:i.jsx(rm,{onClose:t,onAddressSelect:o,headerText:"Set your delivery address",userSavedAddress:n})})})};function zt(e){try{return localStorage.getItem(e)}catch(t){return console.warn(`[safe-storage] Failed to read "${e}":`,t),null}}function rn(e,t){try{return localStorage.setItem(e,t),!0}catch(r){return console.warn(`[safe-storage] Failed to write "${e}":`,r),!1}}function bi(e){try{return localStorage.removeItem(e),!0}catch(t){return console.warn(`[safe-storage] Failed to remove "${e}":`,t),!1}}function om(e){return typeof e=="object"&&e!==null&&e.necessary===!0&&typeof e.performance=="boolean"&&typeof e.functional=="boolean"&&typeof e.advertising=="boolean"}const wi=e=>{if(!(typeof window>"u")){if(typeof window.gtag!="function"){console.warn("[DialogManager] gtag not available, consent update skipped");return}try{window.gtag("consent","update",{ad_storage:e.advertising?"granted":"denied",ad_user_data:e.advertising?"granted":"denied",ad_personalization:e.advertising?"granted":"denied",analytics_storage:e.performance?"granted":"denied"})}catch(t){console.warn("[DialogManager] gtag consent update failed:",t)}}},im=()=>{var j,M,$,L;const{welcomeConfig:e,ageVerificationConfig:t}=Ie(),{closeAddressModal:r,isAddressModalOpen:n}=ul(),{isVerified:s}
81=pl(),[o,a]=d.useState(!1),[l,c]=d.useState(!1),[f,u]=d.useState(We.None),[p,h]=d.useState({necessary:!0,performance:!0,functional:!0,advertising:!0}),v=Nt(),g=js(),{promo:m,show:y}=ho(),C=/^\/products\/[^/]+$/.test(v.pathname)||/^\/collections\/[^/]+\/[^/]+$/.test(v.pathname),I=d.useCallback(()=>{const P=zt("cookiesAccepted")==="true";u(P?We.None:wr.CookieConsent)},[]),S=P=>{c(!0),h(P),k(P)},k=d.useCallback(P=>{const R=P?{...p,...P}:p;rn("cookiesAccepted","true"),rn("cookie_consent",JSON.stringify(R)),wi(R),a(!0),I()},[p,I]),O=d.useCallback(()=>{S({necessary:!0,performance:!0,functional:!0,advertising:!0})},[S]),w=()=>{rn("addressSet","true"),I(),r()},T=()=>u(We.None),b=d.useCallback(P=>{h(R=>({...R,[P]:!R[P]}))},[]),_=()=>{zt("cookie_consent")&&u(We.CookieConsent)},x=d.useCallback(()=>{var H,Y;const P=((Y=(H=e==null?void 0:e.data)==null?void 0:H.attributes)==null?void 0:Y.versionId)??null;if(!P)return;rn(P,"true"),u(We.None),zt("cookiesAccepted")==="true"||u(wr.CookieConsent)},[e]);return d.useEffect(()=>{var Y,z,V,G,Q;if(g)return;const P=zt("cookiesAccepted")==="true",R=(z=(Y=e==null?void 0:e.data)==null?void 0:Y.attributes)==null?void 0:z.versionId,H=R?zt(R):null;if((t==null?void 0:t.enabled)===!0&&!s){u(We.AgeVerification);return}if(H!=="true"&&((G=(V=e==null?void 0:e.data)==null?void 0:V.attributes)==null?void 0:G.show)===!0&&!C){u(We.Welcome);return}if((m==null?void 0:m.uuid)!=null&&(y===!0||((Q=m==null?void 0:m.storedPromo)==null?void 0:Q.dismissed)===!1)&&!C&&u(We.Promo),!P&&!C){u(wr.CookieConsent);return}},[e,g,l,m,y,t,s,C]),d.useEffect(()=>{const P=zt("cookie_consent");if(P)try{const R=JSON.parse(P);om(R)?(h(R),wi(R)):(console.warn("[DialogManager] Invalid cookie_consent shape, removing"),bi("cookie_consent"))}catch(R){console.warn("[DialogManager] Corrupt cookie_consent data, removing:",R),bi("cookie_consent")}zt("cookiesAccepted")==="true"&&a(!0)},[]),d.useEffect(()=>{h({necessary:!0,performance:!0,functional:!0,advertising:!0})},[l]),g?null:i.jsxs(i.Fragment,{children:[i.jsx(d.Suspense,{fallback:i.jsx("div",{children:"Loading..."}),children:f===We.Welcome&&i.jsx(Xh,{show:f===We.Welcome,title:(M=(j=e==null?void 0:e.data)==null?void 0:j.attributes)==null?void 0:M.title,description:(L=($=e==null?void 0:e.data)==null?void 0:$.attributes)==null?void 0:L.description,onClose:x})}),f===We.AgeVerification&&i.jsx(Jh,{}),f===We.Promo&&i.jsx(Uh,{}),f===wr.CookieConsent&&i.jsx(Lh,{onConsent:k,onCookieSetup:()=>u(We.CookieConsent),onAcceptAllCookies:S,onDismiss:O}),f===We.CookieConsent&&i.jsx(Ph,{onConsent:k,handleResetDialog:T,cookiePreferences:p,handleCookiePreferences:b,setCookiePreferences:h}),i.jsx(d.Suspense,{fallback:i.jsx("div",{children:"Loading..."}),children:i.jsx(sm,{open:n,onClose:r,onSelect:w})}),o&&i.jsx($h,{toggleCookieModal:_})]})},am="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%20role='none'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='%231F72CD'%20stroke='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M12.5493%2017L6%2031.4935H13.8405L14.8125%2029.1826H17.0342L18.0062%2031.4935H26.6364V29.7298L27.4054%2031.4935H31.8696L32.6386%2029.6925V31.4935H50.587L52.7695%2029.2426L54.813%2031.4935L64.0317%2031.5121L57.4617%2024.2872L64.0317%2017H54.956L52.8315%2019.2093L50.8523%2017H31.3268L29.6501%2020.7409L27.9341%2017H20.11V18.7037L19.2396%2017H12.5493ZM14.0664%2019.0581H17.8883L22.2324%2028.8862V19.0581H26.4191L29.7745%2026.1048L32.8668%2019.0581H37.0326V29.4581H34.4978L34.4771%2021.3087L30.7817%2029.4581H28.5142L24.7981%2021.3087V29.4581H19.5836L18.595%2027.1266H13.254L12.2675%2029.4561H9.47358L14.0664%2019.0581ZM49.6584%2019.0581H39.3516V29.452H49.4989L52.7695%2026.0073L55.9218%2029.452H59.2172L54.4275%2024.2852L59.2172%2019.0581H56.0648L52.8108%2022.4633L49.6584%2019.0581ZM15.9256%2020.8177L14.166%2024.9712H17.6832L15.9256%2020.8177ZM41.8968%2023.1099V21.2114V21.2096H48.328L51.1342%2024.2458L48.2036%2027.2986H41.8968V25.226H47.5197V23.1099H41.8968Z'%20fill='white'/%3e%3c/svg%3e",lm="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='white'%20stroke='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M32.1081%2039H37.27C45.3274%2039%2051.7482%2032.57%2052%2024.627V24.5009C51.8741%2016.4318%2045.3274%209.87571%2037.27%2010.0018H31.4787C23.7989%2010.2539%2017.7558%2016.8101%2018.0076%2024.627C18.0076%2032.4439%2024.3025%2038.8739%2032.1081%2039ZM20.5255%2024.5009C20.5255%2017.9448%2025.9392%2012.5234%2032.4858%2012.5234C39.0325%2012.5234%2044.4461%2017.9448%2044.4461%2024.5009C44.4461%2031.057%2039.0325%2036.4784%2032.4858%2036.4784C25.9392%2036.4784%2020.5255%2031.057%2020.5255%2024.5009ZM34.3743%2032.57V16.5579C38.7807%2017.6926%2041.5505%2022.1054%2040.4174%2026.5182C39.662%2029.5441%2037.3959%2031.8135%2034.3743%2032.57ZM24.6802%2022.4836C23.5471%2026.8964%2026.1909%2031.4352%2030.5974%2032.57V16.5579C27.7017%2017.3144%2025.4356%2019.5838%2024.6802%2022.4836Z'%20fill='%23145095'/%3e%3c/svg%3e",cm="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='white'%20stroke='%23D9D9D9'/%3e%3cpath%20d='M29.5%2047L69%2035.5V42C69%2044.7614%2066.7614%2047%2064%2047H29.5Z'%20fill='%23FD6020'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M61.5027%2019.2217C63.6758%2019.2217%2064.871%2020.1888%2064.871%2022.0155C64.9797%2023.4124%2064.0018%2024.5944%2062.6979%2024.8093L65.6316%2028.7851H63.3498L60.8507%2024.9168H60.6334V28.7851H58.7863V19.2217H61.5027ZM60.6334%2023.6273H61.1767C62.3719%2023.6273%2062.9152%2023.09%2062.9152%2022.1229C62.9152%2021.2633%2062.3719%2020.726%2061.1767%2020.726H60.
816334V23.6273ZM52.3756%2028.7851H57.5911V27.1733H54.2228V24.5944H57.4824V22.9826H54.2228V20.8335H57.5911V19.2217H52.3756V28.7851ZM46.9428%2025.6689L44.4437%2019.2217H42.4879L46.5082%2029H47.4861L51.5064%2019.2217H49.5506L46.9428%2025.6689ZM24.8857%2024.0571C24.8857%2026.7435%2027.0588%2029%2029.7752%2029C30.6445%2029%2031.4051%2028.7851%2032.1657%2028.4627V26.3137C31.6224%2026.9584%2030.8618%2027.3882%2029.9925%2027.3882C28.2541%2027.3882%2026.8415%2026.0987%2026.8415%2024.3795V24.1646C26.7329%2022.4453%2028.1454%2020.941%2029.8839%2020.8335C30.7531%2020.8335%2031.6224%2021.2633%2032.1657%2021.908V19.759C31.5137%2019.3291%2030.6445%2019.2217%2029.8839%2019.2217C27.0588%2019.0068%2024.8857%2021.2633%2024.8857%2024.0571ZM21.5174%2022.8751C20.4309%2022.4453%2020.1049%2022.2304%2020.1049%2021.6931C20.2135%2021.0484%2020.7568%2020.5111%2021.4088%2020.6186C21.952%2020.6186%2022.4953%2020.941%2022.9299%2021.3708L23.9078%2020.0813C23.1472%2019.4366%2022.1693%2019.0068%2021.1914%2019.0068C19.6703%2018.8993%2018.3664%2020.0813%2018.2577%2021.5857V21.6931C18.2577%2022.9826%2018.801%2023.7348%2020.5395%2024.272C20.9741%2024.3795%2021.4088%2024.5944%2021.8434%2024.8093C22.1693%2025.0242%2022.3867%2025.3466%2022.3867%2025.7764C22.3867%2026.5286%2021.7347%2027.1733%2021.0828%2027.1733H20.9741C20.1049%2027.1733%2019.3443%2026.636%2019.0183%2025.8838L17.8231%2027.0658C18.4751%2028.2478%2019.7789%2028.8925%2021.0828%2028.8925C22.8213%2029%2024.2338%2027.7106%2024.3425%2025.9913V25.6689C24.2338%2024.3795%2023.6905%2023.7348%2021.5174%2022.8751ZM15.2154%2028.7851H17.0625V19.2217H15.2154V28.7851ZM6.63159%2019.2217H9.34798H9.89126C12.499%2019.3292%2014.5635%2021.4782%2014.4548%2024.0571C14.4548%2025.454%2013.8029%2026.7435%2012.7163%2027.7106C11.7384%2028.4627%2010.5432%2028.8926%209.34798%2028.7851H6.63159V19.2217ZM9.02201%2027.1733C9.89125%2027.2807%2010.8692%2026.9584%2011.5211%2026.4211C12.173%2025.7764%2012.499%2024.9168%2012.499%2023.9497C12.499%2023.09%2012.173%2022.2304%2011.5211%2021.5857C10.8692%2021.0484%209.89125%2020.7261%209.02201%2020.8335H8.47873V27.1733H9.02201Z'%20fill='black'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M37.7071%2019C34.9907%2019%2032.709%2021.1491%2032.709%2023.9429C32.709%2026.6292%2034.8821%2028.8858%2037.7071%2028.9932C40.5322%2029.1007%2042.7053%2026.8441%2042.8139%2024.0503C42.7053%2021.2565%2040.5322%2019%2037.7071%2019V19Z'%20fill='%23FD6020'/%3e%3c/svg%3e",um="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='white'%20stroke='%23D9D9D9'/%3e%3cpath%20d='M44.6363%2024.5746C45.6637%2024.5969%2046.6969%2024.5292%2047.7201%2024.6098C48.7564%2024.8031%2049.0061%2026.3718%2048.0855%2026.8856C47.4573%2027.2241%2046.7111%2027.0117%2046.0301%2027.0714H44.6363V24.5746ZM48.3142%2021.7486C48.5424%2022.5542%2047.7657%2023.2776%2046.9898%2023.1666H44.6363C44.6529%2022.4069%2044.6041%2021.5822%2044.6602%2020.8625C45.603%2020.889%2046.5545%2020.8083%2047.4919%2020.9047C47.8946%2021.0058%2048.2317%2021.3369%2048.3142%2021.7486ZM53.9781%209.80088C54.0219%2011.3395%2053.9844%2012.9594%2053.997%2014.5292C53.9941%2020.9115%2054.0031%2027.2936%2053.992%2033.6763C53.9506%2036.0682%2051.8308%2038.1466%2049.4555%2038.1943C47.0778%2038.204%2044.6998%2038.1958%2042.3218%2038.1985V28.5498C44.9127%2028.5364%2047.505%2028.5769%2050.0949%2
81028.5295C51.2963%2028.4541%2052.6123%2027.6614%2052.6682%2026.3392C52.8097%2025.0114%2051.5578%2024.0929%2050.3692%2023.9478C49.9123%2023.936%2049.9256%2023.8146%2050.3692%2023.7617C51.5028%2023.5167%2052.3931%2022.3434%2052.0595%2021.1683C51.7753%2019.9324%2050.4093%2019.4541%2049.273%2019.4564C46.9563%2019.4407%2044.6391%2019.4542%2042.3223%2019.4497C42.3373%2017.6484%2042.2911%2015.8451%2042.3472%2014.0452C42.5308%2011.6964%2044.7039%209.75947%2047.0459%209.8015C49.3569%209.80115%2051.6676%209.80115%2053.9781%209.80106V9.80088Z'%20fill='url(%23paint0_linear)'/%3e%3cpath%20d='M16.1412%2014.2885C16.2003%2011.9003%2018.3292%209.83898%2020.7015%209.80408C23.0704%209.79678%2025.4396%209.80303%2027.8085%209.80092C27.802%2017.7911%2027.8213%2025.7821%2027.7987%2033.7719C27.7075%2036.131%2025.6018%2038.153%2023.2554%2038.1948C20.882%2038.2034%2018.5084%2038.196%2016.1349%2038.1984V28.2244C18.4403%2028.7691%2020.8579%2029.0009%2023.2098%2028.6396C24.6157%2028.4134%2026.1538%2027.723%2026.6298%2026.2645C26.9801%2025.0169%2026.7829%2023.7039%2026.835%2022.4234V19.4497H22.7648C22.7465%2021.4164%2022.8023%2023.3866%2022.7353%2025.351C22.6256%2026.5584%2021.4299%2027.3256%2020.2911%2027.2846C18.8789%2027.2996%2016.0803%2026.2611%2016.0803%2026.2611C16.0732%2022.5762%2016.1212%2017.9615%2016.1412%2014.2888V14.2885Z'%20fill='url(%23paint1_linear)'/%3e%3cpath%20d='M29.3264%2020.6492C29.1121%2020.6946%2029.2833%2019.9194%2029.2285%2019.6253C29.2431%2017.7659%2029.198%2015.9045%2029.2534%2014.0464C29.4365%2011.6877%2031.6263%209.74596%2033.9778%209.80117H40.9026C40.8961%2017.7913%2040.9154%2025.7824%2040.8929%2033.7721C40.8015%2036.1312%2038.6957%2038.1532%2036.3492%2038.195C33.9757%2038.204%2031.6021%2038.1965%2029.2284%2038.1987V27.2709C30.8495%2028.601%2033.0527%2028.808%2035.0723%2028.8116C36.5948%2028.8111%2038.1084%2028.5763%2039.587%2028.2252V26.2232C37.9207%2027.0536%2035.962%2027.5811%2034.1149%2027.104C32.8264%2026.7833%2031.8911%2025.5381%2031.912%2024.2084C31.7627%2022.8255%2032.5732%2021.3656%2033.9321%2020.9545C35.6193%2020.4263%2037.4581%2020.8303%2039.0396%2021.517C39.3784%2021.6944%2039.7224%2021.9145%2039.5869%2021.3481V19.7745C36.9419%2019.1452%2034.127%2018.9137%2031.4697%2019.5983C30.7006%2019.8152%2029.9512%2020.1443%2029.3264%2020.6494V20.6492Z'%20fill='url(%23paint2_linear)'/%3e%3cdefs%3e%3clinearGradient%20id='paint0_linear'%20x1='42.2421'%20y1='23.3925'%20x2='53.9233'%20y2='23.3925'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%23007B40'/%3e%3cstop%20offset='1'%20stop-color='%2355B330'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint1_linear'%20x1='15.8866'%20y1='24.2716'%20x2='27.6171'%20y2='24.2716'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%231D2970'/%3e%3cstop%20offset='1'%20stop-color='%23006DBA'/%3e%3c/linearGradient%3e%3clinearGradient%20id='paint2_linear'%20x1='29.2113'%20y1='23.6679'%20x2='40.9004'%20y2='23.6679'%20gradientUnits='userSpaceOnUse'%3e%3cstop%20stop-color='%236E2B2F'/%3e%3cstop%20offset='1'%20stop-color='%23E30138'/%3e%3c/linearGradient%3e%3c/defs%3e%3c/svg%3e",dm="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='white'%20stroke='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M35.3685%2034.7618C32.9881%2036.8184%2029.9004%2038.0599%2026.5264%2038.0599C18.9979%2038.0599%2012.8948%2031.8787%2012.8948%2024.2539C12.8948%2016.6291%2018.9979%2010.4479%2026.5264%2010.4479C29.9004%2010.4479%2032.9881%2011.6894%2035.3685%2013.746C37.7488%2011.6894%2040.8365%2010.4479%2044.2106%2010.4479C51.7391%2010.4479%2057.8422%2016.6291%2057.8422%2024.2539C57.8422%2031.8787%2051.7391%2038.0599%2044.2106%2038.0599C40.8365%2038.0599%2037.7488%2036.8184%2035.3685%2034.7618Z'%20fill='%23ED0006'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M35.3685%2034.7618C38.2994%2032.2295%2040.1579%2028.4615%2040.1579%2024.2539C40.1579%2020.0463%2038.2994%2016.2783%2035.3685%2013.746C37.7488%2011.6894%2040.8365%2010.4479%2044.2106%2010.4479C51.7391%2010.4479%2057.8422%2016.6291%2057.8422%2024.2539C57.8422%2031.8787%2051.7391%2038.0599%2044.2106%2038.0599C40.8365%2038.0599%2037.7488%2036.8184%2035.3685%2034.7618Z'%20fill='%23F9A000'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M35.3685%2034.7618C38.2995%2032.2295%2040.1579%2028.4615%2040.1579%2024.2539C40.1579%2020.0463%2038.2995%2016.2783%2035.3685%2013.7461C32.4376%2016.2783%2030.5791%2020.0463%2030.5791%2024.2539C30.5791%2028.4615%2032.4376%2032.2295%2035.3685%2034.7618Z'%20fill='%23FF5E00'/%3e%3c/svg%3e",fm="data:image/svg+xml,%3csvg%20width='70'%20height='48'%20viewBox='0%200%2070%2048'%20fill='none'%20xmlns='http://www.w3.org/2000/svg'%3e%3crect%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20fill='white'%20stroke='%23D9D9D9'/%3e%3cpath%20fill-rule='evenodd'%20clip-rule='evenodd'%20d='M21.2505%2032.5165H17.0099L13.8299%2020.3847C13.679%2019.8267%2013.3585%2019.3333%2012.8871%2019.1008C11.7106%2018.5165%2010.4142%2018.0514%209%2017.8169V17.3498H15.8313C16.7742%2017.3498%2017.4813%2018.0514%2017.5991%2018.8663L19.2491%2027.6173L23.4877%2017.3498H27.6104L21.2505%2032.5165ZM29.9675%2032.5165H25.9626L29.2604%2017.3498H33.2653L29.9675%2032.5165ZM38.4467%2021.5514C38.5646%2020.7346%2039.2717%2020.2675%2040.0967%2020.2675C41.3931%2020.1502%2042.8052%2020.3848%2043.9838%2020.9671L44.6909%2017.7016C43.5123
81%2017.2345%2042.216%2017%2041.0395%2017C37.1524%2017%2034.3239%2019.1008%2034.3239%2022.0165C34.3239%2024.2346%2036.3274%2025.3992%2037.7417%2026.1008C39.2717%2026.8004%2039.861%2027.2675%2039.7431%2027.9671C39.7431%2029.0165%2038.5646%2029.4836%2037.3881%2029.4836C35.9739%2029.4836%2034.5596%2029.1338%2033.2653%2028.5494L32.5582%2031.8169C33.9724%2032.3992%2035.5025%2032.6338%2036.9167%2032.6338C41.2752%2032.749%2043.9838%2030.6502%2043.9838%2027.5C43.9838%2023.5329%2038.4467%2023.3004%2038.4467%2021.5514ZM58%2032.5165L54.82%2017.3498H51.4044C50.6972%2017.3498%2049.9901%2017.8169%2049.7544%2018.5165L43.8659%2032.5165H47.9887L48.8116%2030.3004H53.8772L54.3486%2032.5165H58ZM51.9936%2021.4342L53.1701%2027.1502H49.8723L51.9936%2021.4342Z'%20fill='%23172B85'/%3e%3c/svg%3e",pm="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20viewBox='0%200%2070%2048'%3e%3cdefs%3e%3cstyle%3e.cls-1{fill:%23fff;stroke:%23d9d9d9;}%3c/style%3e%3c/defs%3e%3cg%20id='Layer_2'%20data-name='Layer%202'%3e%3cg%20id='Layer_1-2'%20data-name='Layer%201'%3e%3crect%20class='cls-1'%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20/%3e%3cpath%20d='M19.17,17a3.93,3.93,0,0,0,.9-2.79,3.88,3.88,0,0,0-2.57,1.33,3.61,3.61,0,0,0-.92,2.68A3.27,3.27,0,0,0,19.17,17'%20/%3e%3cpath%20d='M20.06,18.41c-1.44-.09-2.65.81-3.33.81s-1.73-.77-2.86-.75a4.24,4.24,0,0,0-3.59,2.18c-1.54,2.65-.42,6.58,1.09,8.74.72,1.06,1.6,2.24,2.75,2.19s1.52-.7,2.84-.7,1.69.7,2.86.68,1.94-1.06,2.67-2.11A9.84,9.84,0,0,0,23.69,27a3.86,3.86,0,0,1-2.33-3.52,3.92,3.92,0,0,1,1.88-3.31,4.08,4.08,0,0,0-3.18-1.75'%20/%3e%3cpath%20d='M32.51,15.42a5,5,0,0,1,5.27,5.27A5.08,5.08,0,0,1,32.43,26H29v5.47H26.5v-16ZM29,23.9h2.85c2.17,0,3.39-1.16,3.39-3.18S34,17.54,31.84,17.54H29Z'%20/%3e%3cpath%20d='M38.43,28.13c0-2,1.57-3.29,4.34-3.45l3.2-.19v-.91c0-1.29-.88-2.07-2.34-2.07a2.25,2.25,0,0,0-2.47,1.69H38.9c.13-2.12,1.93-3.66,4.82-3.66s4.65,1.49,4.65,3.84v8h-2.3V29.52h0a4.19,4.19,0,0,1-3.69,2.12C40,31.64,38.43,30.22,38.43,28.13ZM46,27.08v-.93l-2.88.18c-1.43.1-2.24.73-2.24,1.73s.84,1.69,2.11,1.69a2.82,2.82,0,0,0,3-2.68Z'%20/%3e%3cpath%20d='M50.52,35.74V33.8a5.11,5.11,0,0,0,.78.05c1.11,0,1.69-.47,2.08-1.67l.21-.72L49.36,19.77H52l3,9.5h0l3-9.5h2.54L56.08,32.05c-1,2.84-2.16,3.75-4.58,3.75A8.06,8.06,0,0,1,50.52,35.74Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e",hm="data:image/svg+xml,%3csvg%20class='icon%20icon--full-color'%20xmlns='http://www.w3.org/2000/svg'%20role='img'%20viewBox='0%200%2070%2048'%20width='38'%20height='30'%20aria-labelledby='pi-google_pay'%3e%3cdefs%3e%3cstyle%3e.googlepay-logo-1{fill:%23fff;stroke:%23d9d9d9;}%3c/style%3e%3cstyle%3e.googlepay-icon{transform:%20scale(1.9)%20translateY(1px)%20translateX(-1px);}%3c/style%3e%3c/defs%3e%3crect%20class='googlepay-logo-1'%20x='0.5'%20y='0.5'%20width='69'%20height='47'%20rx='5.5'%20/%3e%3cpath%20class='googlepay-icon'%20d='M18.093%2011.976v3.2h-1.018v-7.9h2.691a2.447%202.447%200%200%201%201.747.692%202.28%202.28%200%200%201%20.11%203.224l-.11.116c-.47.447-1.098.69-1.747.674l-1.673-.006zm0-3.732v2.788h1.698c.377.012.741-.135%201.005-.404a1.391%201.391%200%200%200-1.005-2.354l-1.698-.03zm6.484%201.348c.65-.03%201.286.188%201.778.613.445.43.682%201.03.65%201.649v3.334h-.969v-.766h-.049a1.93%201.93%200%200%201-1.673.931%202.17%202.17%200%200%201-1.496-.533%201.667%201.667%200%200%201-.613-1.324%201.606%201.606%200%200%201%20.613-1.336%202.746%202.746%200%200%201%201.698-.515c.517-.02%201.03.093%201.49.331v-.208a1.134%201.134%200%200%200-.417-.901%201.416%201.416%200%200%200-.98-.368%201.545%201.545%200%200%200-1.319.717l-.895-.564a2.488%202.488%200%200%201%202.182-1.06zM23.29%2013.52a.79.79%200%200%200%20.337.662c.223.176.5.269.785.263.429-.001.84-.17%201.146-.472.305-.286.478-.685.478-1.103a2.047%202.047%200%200%200-1.324-.374%201.716%201.716%200%200%200-1.03.294.883.883%200%200%200-.392.73zm9.286-3.75l-3.39%207.79h-1.048l1.281-2.728-2.224-5.062h1.103l1.612%203.885%201.569-3.885h1.097z'%20fill='%235F6368'%3e%3c/path%3e%3cpath%20class='googlepay-icon'%20d='M13.986%2011.284c0-.308-.024-.616-.073-.92h-4.29v1.747h2.451a2.096%202.096%200%200%201-.9%201.373v1.134h1.464a4.433%204.433%200%200%200%201.348-3.334z'%20fill='%234285F4'%3e%3c/path%3e%3cpath%20class='googlepay-icon'%20d='M9.629%2015.721a4.352%204.352%200%200%200%203.01-1.097l-1.466-1.14a2.752%202.752%200%200%201-4.094-1.44H5.577v1.17a4.53%204.53%200%200%200%204.052%202.507z'%20fill='%2334A853'%3e%3c/path%3e%3cpath%20class='googlepay-icon'%20d='M7.079%2012.05a2.709%202.709%200%200%201%200-1.735v-1.17H5.577a4.505%204.505%200%200%200%200%204.075l1.502-1.17z'%20fill='%23FBBC04'%3e%3c/path%3e%3cpath%20class='googlepay-icon'%20d='M9.629%208.44a2.452%202.452%200%200%201%201.74.68l1.3-1.293a4.37%204.37%200%200%200-3.065-1.183%204.53%204.53%200%200%200-4.027%202.5l1.502%201.171a2.715%202.715%200%200%201%202.55-1.875z'%20fill='%23EA4335'%3e%3c/path%3e%3c/svg%3e",mm=()=>{var v,g,m,y,C,I,S,k;const{ENV:e,siteFooter:t}
81=Ie(),r=e==null?void 0:e.STRAPI_URL,n=e==null?void 0:e.STRAPI_UPLOAD_URL,s=pt({image:(v=t==null?void 0:t.backgroundImage)==null?void 0:v.image,strapiUrl:r,strapiUploadUrl:n,presetType:"original"}),o=St(),a=d.useMemo(()=>{var O;return(O=t==null?void 0:t.callToAction)==null?void 0:O.map((w,T)=>{const b=w.__typename;switch(b){case"ComponentBaseHeader":{const _=w;return i.jsx(ur,{..._},`footer-${T}-${b}`)}case"ComponentBaseButton":{const _=w;return i.jsx(_e,{label:_.label,decorator:_.decorator,decoratorPosition:_.decoratorPosition,className:_.tailwindClasses??"",onClick:()=>{_!=null&&_.slug&&o(_.slug)}},`${T}-${b}`)}case"ComponentBaseImage":{const _=w;return i.jsx("p",{children:_.image.data.attributes.name},T)}default:return null}})},[t==null?void 0:t.callToAction]),l=d.useMemo(()=>{var O;return(O=t==null?void 0:t.columns)==null?void 0:O.map((w,T)=>i.jsx("div",{className:"flex flex-col flex-1 max-w-[250px]",children:w==null?void 0:w.rows.map((b,_)=>i.jsx(ur,{...b},`footer-column-${T}-row-${_}`))},`footer-column-${T}`))},[t==null?void 0:t.columns]),c=ol((g=t==null?void 0:t.privacyPolicy)==null?void 0:g.color,"text"),f=(m=t==null?void 0:t.privacyPolicy)==null?void 0:m.weight,u=(y=t==null?void 0:t.privacyPolicy)==null?void 0:y.align,p=(t==null?void 0:t.callToActionPosition)??"left",h=p==="left"?"flex-row":p==="right"?"flex-row-reverse":"flex-row";return i.jsx("footer",{className:le("min-h-[33vh] pb-16 lg:pb-0",t==null?void 0:t.tailwindClasses),style:{backgroundImage:`url(${s.src})`,backgroundSize:"cover",backgroundPosition:"center",backgroundRepeat:"no-repeat"},children:i.jsxs("div",{className:"mx-auto max-w-[1440px] px-6 py-8 lg:px-8 flex flex-col",children:[i.jsx("div",{className:"flex gap-3 items-center w-max py-4",children:(C=t==null?void 0:t.icons)==null?void 0:C.map(O=>{const w=pt({image:O.image,strapiUrl:r,strapiUploadUrl:n,presetType:"original"});return i.jsx("div",{children:O!=null&&O.href?i.jsx(xe,{to:O.href,children:i.jsx("img",{src:w.src,alt:"Icon",className:O.tailwindClasses??""})}):i.jsx("img",{src:w.src,alt:"Icon",className:O.tailwindClasses??""})},O.href)})}),i.jsxs("div",{className:`flex flex-col gap-2 justify-between gap-y-8 mb-4 lg:flex-row lg:${h}`,children:[!!(t!=null&&t.callToAction&&p==="left")&&i.jsx("div",{className:"flex flex-col w-full lg:max-w-[360px] gap-y-2",children:a}),i.jsx("div",{className:"flex flex-wrap gap-4 lg:gap-16",children:i.jsx("div",{className:"flex flex-wrap flex-1 gap-x-16 gap-y-8 max-w-[700px]",children:l})}),!!(t!=null&&t.callToAction&&p==="right")&&i.jsx("div",{className:"flex flex-col w-full lg:max-w-[360px] gap-y-2",children:a})]}),(t==null?void 0:t.privacyPolicy)&&i.jsx("div",{className:"text-gray-400 text-xs my-4",children:i.jsx(it,{variant:(I=t==null?void 0:t.privacyPolicy)==null?void 0:I.size,className:`${c} text-center`,weight:f,style:{...(S=t==null?void 0:t.privacyPolicy)==null?void 0:S.styles,textAlign:u??"left"},children:(k=t==null?void 0:t.privacyPolicy)==null?void 0:k.value})}),i.jsxs("div",{className:"w-full flex flex-col gap-4 lg:flex-row items-center justify-between border-t-[1px] border-gray-500 pt-4",children:[i.jsxs("div",{className:"flex items-center gap-x-2 flex-wrap",children:[i.jsx("a",{href:"https://pos360.com",className:"w-max text-sm text-gray-500 font-light hover:text-footer-text-hover transition duration-200",children:"Powered by POS360"}),i.jsx("p",{className:"font-thin text-primary-500",children:"|"}),i.jsx(im,{})]}),i.jsx(gm,{})]})]})})},gm=()=>{const e=[am,lm,cm,um,dm,fm,pm,hm];return i.jsx("div",{className:"flex gap-1 flex-wrap justify-center items-center",children:e.map((t,r)=>i.jsx("img",{src:t,alt:"Payment Method",width:48},r))})},ym=X.memo(mm);var xt;(function(e){e.X="x",e.Y="y"})(xt||(xt={}));var Tt;(function(e){e.Up="up",e.Down="down",e.Left="left",e.Right="right",e.Still="still"})(Tt||(Tt={}));function xm(e={}){const{target:t=typeof window<"u"?window:void 0,thr:r=0,axis:n=xt.Y,scrollUp:s=n===xt.Y?Tt.Up:Tt.Left,scrollDown:o=n===xt.Y?Tt.Down:Tt.Right,still:a=Tt.Still}=e,[l,c]=d.useState(a),[f,u]=d.useState({top:0,bottom:0,left:0,right:0}),p=Math.max(0,r),h=d.useRef(!1),v=d.useRef(0),g=d.useCallback(()=>
81{if(!t)return;let m;t instanceof Window?m=n===xt.Y?t.scrollY:t.scrollX:m=n===xt.Y?t.scrollTop:t.scrollLeft,Math.abs(m-v.current)>=p&&(c(m>v.current?o:s),v.current=Math.max(0,m)),h.current=!1},[t,n,p,o,s]);return d.useEffect(()=>{if(!t){console.warn("useDetectScroll: target is not set. Falling back to window.");return}const m=()=>{if(!t)return;const C=t instanceof Window?t.scrollY:t.scrollTop,I=t instanceof Window?t.scrollX:t.scrollLeft,S=(t instanceof Window?document.documentElement.scrollHeight-t.innerHeight:t.scrollHeight-t.clientHeight)-C,k=(t instanceof Window?document.documentElement.scrollWidth-t.innerWidth:t.scrollWidth-t.clientWidth)-I;u({top:C,bottom:S,left:I,right:k})};m();const y=t;return y.addEventListener("scroll",m),()=>{y.removeEventListener("scroll",m)}},[t]),d.useEffect(()=>{if(!t){console.warn("useDetectScroll: target is not set. Falling back to window.");return}t instanceof Window?v.current=n===xt.Y?t.scrollY:t.scrollX:v.current=n===xt.Y?t.scrollTop:t.scrollLeft;const m=()=>{h.current||(window.requestAnimationFrame(g),h.current=!0)},y=t;return y.addEventListener("scroll",m),()=>y.removeEventListener("scroll",m)},[t,n,g]),{scrollDir:l,scrollPosition:f}}function vm({announcementText:e}){return!e||e.length===0?null:i.jsx("div",{className:"border-b-[1px] border-announcement-border bg-announcement-background","aria-label":`Announcement: ${e}`,children:i.jsx("div",{className:"mx-auto flex h-10 max-w-7xl items-center justify-between px-4 sm:px-6 lg:px-8",children:i.jsx("p",{className:"flex-1 text-center text-sm font-medium text-announcement-text lg:flex-none",children:e})})})}const bm=({onApply:e,disabled:t,loading:r,error:n,inputClassNameOverride:s})=>{const[o,a]=d.useState(""),[l,c]=d.useState(""),{cartLinesCount:f}=Je();return t=!!(t||r||f===0),i.jsxs("div",{className:"flex flex-col w-full mt-4",children:[i.jsxs("div",{className:"flex flex-row items-center gap-2 relative",children:[i.jsx(Ke,{children:r&&i.jsx(pe.div,{initial:{opacity:0}
81,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"linear"},className:"absolute inset-0 bg-gray-200/50 z-50 flex items-center justify-center rounded",children:i.jsx(Pr,{className:"w-6 h-6 animate-spin text-primary-500"})})}),i.jsx(_r,{input:{value:l,type:"text",name:"discountCode",placeholder:"Apply discount code",disabled:t,onChange:u=>c(u.target.value)},className:le("border-cart-border text-cart-heading",s)}),i.jsx(_e,{type:"button","aria-label":"Apply discount code button",label:"APPLY",className:"h-[55px] bg-cart-button text-cart-button-text hover:bg-cart-button relative",spacing:"custom",variant:"default",disabled:t||!(l!=null&&l.length),onClick:()=>{e==null||e(l),a(l)}})]}),i.jsx(Ke,{children:n&&i.jsx(pe.div,{initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},className:"bg-red-50 p-2 px-3 mt-4",children:i.jsxs("p",{className:"text-red-500 text-xs",children:["Failed to apply discount code",o&&!r&&i.jsxs("span",{className:"font-semibold",children:[": ",o]})]})},"discount-code-error")})]})},yl=()=>{var l;const{selectedStore:e}=Ue(),t=tt({key:"discount-code"}),{data:r,state:n,submit:s}=t,o=c=>s({actionType:"apply",discountCode:c,...(e==null?void 0:e.storeId)&&{storeId:e.storeId}},{method:"POST",action:"/api/cart/discount-code"}),a=c=>s({actionType:"delete",discountCode:c,...(e==null?void 0:e.storeId)&&{storeId:e.storeId}},{method:"POST",action:"/api/cart/discount-code"});return{data:r,errors:(l=r==null?void 0:r.cartUserErrors)==null?void 0:l.map(c=>c==null?void 0:c.message),state:n,loading:n!=="idle",applyDiscount:o,deleteDiscount:a,fetcher:t}},_i=99,xl=({showHeader:e=!0})=>{var O;const[t,r]=d.useState(!1),{refreshCartsFromCookie:n,loading:s,carts:o}=Je(),a=Fe(),{selectedStore:l}=Ue(),{applyDiscount:c,deleteDiscount:f,loading:u,errors:p}=yl(),h=d.useMemo(()=>!a||!l?o:o.filter(w=>{var T;return((T=w.merchant)==null?void 0:T.storeID)===l.storeId}),[o,a,l]),v=d.useMemo(()=>h==null?void 0:h.reduce((w,T)=>(w.has(T.id)||w.set(T.id,(T==null?void 0:T.discountCodes)??[]),w),new Map),[h]),g=d.useMemo(()=>Array.from(v.values()).flat(),[v]),m=d.useMemo(()=>h==null?void 0:h.reduce((w,T)=>{var b,_;return w.plus(((_=(b=T==null?void 0:T.cost)==null?void 0:b.discountAmount)==null?void 0:_.amount)??0)},new Ge(0)),[h]),y=g==null?void 0:g.some(w=>w.isValidOnCart),C=d.useMemo(()=>{const w=h==null?void 0:h.reduce((_,x)=>{var j,M;return _.plus(((M=(j=x==null?void 0:x.cost)==null?void 0:j.subtotalAmount)==null?void 0:M.amount)??0)},new Ge(0)),T=m.toDecimalPlaces(2,Ge.ROUND_DOWN);let b=h==null?void 0:h.reduce((_,x)=>{var j,M;return _.plus(((M=(j=x==null?void 0:x.cost)==null?void 0:j.subtotalAmount)==null?void 0:M.amount)??0)},new Ge(0));return y&&(b=b.minus(T)),{subtotal:{amount:w,presentation:`$${w.toDecimalPlaces(2,Ge.ROUND_DOWN).toFixed(2)}`},estimatedTax:"Calculated at checkout",discount:{amount:m,presentation:`-$${T.toFixed(2)}`},total:{amount:b,presentation:`$${b.toDecimalPlaces(2,Ge.ROUND_DOWN).toFixed(2)}`}}},[h,m,y]),I=d.useMemo(()=>(h==null?void 0:h.reduce((w,T)=>{var b;return w+(((b=T==null?void 0:T.cartLines)==null?void 0:b.reduce((_,x)=>_+((x==null?void 0:x.quantity)??0),0))??0)},0))??0,[h]),S=w=>{c(w),r(!0)},k=w=>{f(w),r(!0)};return d.useEffect(()=>{t&&!u&&(async()=>{await n(),r(!1)})()},[t,u,n]),i.jsxs("div",{className:"relative flex flex-col gap-2 w-full lg:overflow-auto lg:max-w-[1/3] lg:h-full text-cart-heading",children:[i.jsx(Ke,{children:s&&i.jsx(pe.div,{initial:{opacity:0}
81,animate:{opacity:1},exit:{opacity:0},transition:{duration:.2,ease:"linear"},className:"absolute inset-0 bg-gray-200/50 z-50 flex items-center justify-center",children:i.jsx(Pr,{className:"w-8 h-8 animate-spin text-cart-heading text-primary-500"})})}),i.jsxs("div",{className:"flex flex-col gap-2",children:[e&&i.jsx("h2",{className:"text-lg font-semibold",children:"Summary"}),i.jsx(Ke,{initial:!1,children:I>=_i&&i.jsxs(pe.div,{initial:{opacity:0,height:0},animate:{opacity:1,height:"auto"},exit:{opacity:0,height:0},transition:{duration:.2},className:"flex items-start gap-2 p-3 rounded-md border border-red-200 bg-red-50 text-red-700",children:[i.jsx(Po,{className:"text-red-600 w-4 h-4 mt-[2px]"}),i.jsxs("span",{className:"text-sm",children:["You've reached the maximum cart quantity of"," ",_i,". Remove items to add more."]})]})}),i.jsxs("div",{className:"flex flex-col gap-2 p-4 bg-cart-panel-background",children:[i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm",children:"Subtotal"}),s?i.jsx("div",{className:"h-5 w-16 bg-gray-300 animate-pulse rounded"}):i.jsx("span",{className:"text-sm",children:C.subtotal.presentation})]}),!!((g==null?void 0:g.length)>0&&y&&m.greaterThan(0))&&i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"text-sm text-green-500",children:"Discounts"}),s?i.jsx("div",{className:"h-5 w-16 bg-gray-300 animate-pulse rounded"}):i.jsxs("span",{className:"text-sm text-green-500",children:["-$",new Ge(m??0).toDecimalPlaces(2,Ge.ROUND_DOWN).toFixed(2)]})]}),i.jsxs("div",{className:"flex justify-between",children:[i.jsx("span",{className:"font-semibold",children:"Est. Total"}),s?i.jsx("div",{className:"h-5 w-20 bg-gray-300 animate-pulse rounded"}):i.jsx("span",{className:"font-semibold",children:(O=C==null?void 0:C.total)==null?void 0:O.presentation})]})]})]}),(g==null?void 0:g.length)>0?i.jsxs("div",{className:"flex flex-col gap-2",children:[e&&i.jsx("h2",{className:"text-lg font-semibold",children:"Discount"}),g==null?void 0:g.map((w,T)=>i.jsx(zh,{code:w.code,name:w.name,message:Zh(w),onDelete:k,isValid:!!(w!=null&&w.isValidOnCart),loading:u,disabled:u},`${w.code}-${T}`)),!!(!y&&(g!=null&&g.length))&&i.jsxs("div",{className:"w-full p-4 flex gap-x-2",children:[i.jsx(Po,{className:"text-blue-600"}),g==null?void 0:g.map(w=>{var T;return(T=w==null?void 0:w.warnings)==null?void 0:T.map((b,_)=>i.jsx("div",{className:"flex justify-between text-blue-500",children:i.jsx("span",{className:"text-sm",children:b})},`warnings-${w.code}-${_}`))})]})]}):i.jsx(bm,{loading:u,disabled:!!(u||g!=null&&g.length),onApply:S,error:(p==null?void 0:p[0])??""})]})},wm=({cart:e,expanded:t,onToggleExpand:r})=>{var n,s,o;return i.jsxs("button",{onClick:r,className:"flex justify-between w-full items-center py-2",children:[i.jsxs("div",{className:"flex flex-col",children:[i.jsx("p",{className:"text-left font-bold",children:(n=e==null?void 0:e.merchant)==null?void 0:n.storeName}),i.jsx("p",{className:"text-md text-left text-gray-700 font-medium",children:(o=(s=e==null?void 0:e.cost)==null?void 0:s.subtotalAmount)==null?void 0:o.presentation})]}),i.jsx(pe.div,{className:"flex self-center",animate:{rotate:t?180:0},children:i.jsx(Ka,{className:"h-4 w-4 text-black"})})]})},vl=({carts:e,store:t,storefront:r})=>{var l,c;const n=d.useMemo(()=>t?e.filter(f=>{var u;return((u=f.merchant)==null?void 0:u.storeID)===t.storeID}):e==null?void 0:e.filter(f=>{var u;return((u=f==null?void 0:f.cartLines)==null?void 0:u.length)>0}),[e,t]),s=d.useMemo(()=>n==null?void 0:n.reduce((f,u)=>{var p;return f+((p=u==null?void 0:u.cartLines)==null?void 0:p.reduce((h,v)=>h+v.quantity,0))},0),[n]),o=d.useMemo(()=>r==="PLATFORM"?`Your Carts (${n.length??0})`:"Your Cart",[r,n]),a=r!=="PLATFORM"&&(n==null?void 0:n.length)===1?(c=(l=n[0])==null?void 0:l.merchant)==null?void 0:c.storeName:null;return i.jsxs("div",{className:"flex flex-col gap-4 w-full text-cart-heading",children:[i.jsxs("div",{className:"flex flex-col gap-0.5",children:[i.jsxs("div",{className:"flex gap-2 items-baseline",children:[i.jsx("h2",{className:"text-lg font-semibold",children:o}),i.jsxs("p",{className:"text-md font-light text-cart-text",children:[s," items"]})]}),a&&i.jsxs("p",{className:"flex items-center gap-1.5 text-xs text-cart-text/70",children:[i.jsx(so,{className:"h-3.5 w-3.5 text-cart-text/60 flex-shrink-0","aria-hidden":"true"}),i.jsxs("span",{children:["Fulfilled by"," ",i.jsx("span",{className:"font-semibold text-cart-text tracking-tight",children:a})]})]})]}),s===0?i.jsx(_m,{}):n==null?void 0:n.map((f,u)=>i.jsx(Sm,{cart:f},`${f.id} ${u}`))]})},_m=()=>i.jsxs("div",{className:"w-full h-[50vh] flex items-center justify-center flex-col gap-2",children:[i.jsx("h1",{className:"text-xl lg:text-4xl font-bold leading-tight",children:"Let's shop!"}),i.jsx("p",{className:"text-sm lg:text-lg font-light text-gray-500 leading-tight",children:"Add items to your cart to see them here."})]}),Sm=({cart:e})=>{const{ENV:{STOREFRONT:t="PLATFORM"}}
81=Ie(),[r,n]=d.useState(!0),s=()=>{t==="PLATFORM"&&n(o=>!o)};return i.jsxs(d.Fragment,{children:[i.jsx(Ft,{}),i.jsxs("div",{className:`flex flex-col ${r?"gap-2":"gap-0"}`,children:[t==="PLATFORM"&&i.jsx(wm,{cart:e,expanded:r,onToggleExpand:s}),i.jsx(Kh,{cart:e,expanded:r})]})]})},Nm=()=>{var s;const e=tt(),t=tt();d.useEffect(()=>{e.load("/api/pre-checkout-upsell")},[]);const r=()=>{e.load("/api/pre-checkout-upsell")},n=o=>{t.submit({value:o.toString()},{method:"POST",action:"/api/pre-checkout-upsell"})};return{reload:r,data:((s=e.data)==null?void 0:s.value)??!1,loadingState:e.state,actionState:t.state,actionData:t.data,load:e.load,update:n,loading:e.state==="loading",submitting:t.state==="submitting"}};let vr=null,Si=null;const bl=()=>{var h,v;const e=tt({key:"nearest-stores"}),t=Ie(),r=("nearestStores"in t?t.nearestStores:null)??null,n="storeCoordinates"in t?t.storeCoordinates:null,s=n?`${n.latitude},${n.longitude}`:null;d.useEffect(()=>{!r||!s||Si!==s&&(Si=s,vr=s)},[r,s]);const o=d.useMemo(()=>e.state==="loading"||e.state==="submitting",[e.state]),a=d.useCallback(g=>{vr=`${g.latitude},${g.longitude}`,e.submit({latitude:String(g.latitude),longitude:String(g.longitude)},{method:"POST",action:"/api/stores/nearest"})},[e]),l=d.useCallback(()=>{vr="all",e.submit({},{method:"POST",action:"/api/stores/nearest"})},[e]),c=d.useCallback(g=>{const m=`${g.latitude},${g.longitude}`;vr!==m&&a(g)},[a]),f=d.useCallback(g=>{vr=`${g.latitude},${g.longitude}`},[]),u=((h=e.data)==null?void 0:h.data)??r??[],p=(v=e.data)==null?void 0:v.error;return{stores:u,loading:o,error:p,fetchStores:a,fetchAllStores:l,prefetch:c,markFetched:f}},jm=({warningState:e,onConfirm:t,onCancel:r})=>{var l;if(!Fe())return null;const s=e.targetStore===null,o=s?"Browse all stores?":`Switch to ${(l=e.targetStore)==null?void 0:l.storeName}?`,a=s?"Browse All Stores":"Switch Store";return i.jsx(mo,{open:e.isOpen,onOpenChange:c=>{c||r()},children:i.jsxs(Bn,{children:[i.jsxs(Hn,{children:[i.jsx(zn,{children:o}),i.jsxs(gl,{children:["You have ",e.currentCartItemCount," item",e.currentCartItemCount!==1?"s":""," in your"," ",e.currentStoreName," cart. Your cart will be saved and you can return to it anytime."]})]}),i.jsxs(qn,{children:[i.jsx("button",{type:"button",onClick:r,className:"inline-flex items-center justify-center rounded-md border border-gray-300 bg-white px-4 py-2 text-sm font-medium text-gray-700 shadow-sm hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2",children:"Cancel"}),i.jsx("button",{type:"button",onClick:t,className:"inline-flex items-center justify-center rounded-md bg-red-600 px-4 py-2 text-sm font-medium text-white shadow-sm hover:bg-red-700 focus:outline-none focus:ring-2 focus:ring-red-500 focus:ring-offset-2",children:a})]})]})})},Cm=({product:e,to:t=`/products/${e.slug}`.replace(/\/+/g,"/"),CollectionCardConfig:r,addToCartCallback:n})=>{var S,k,O,w,T,b,_,x,j,M,$,L,P,R,H,Y,z,V,G,Q,K;const{defaultAvailableVariant:s,name:o,variants:a}=e,l=(k=(S=a==null?void 0:a.edges)==null?void 0:S[0])==null?void 0:k.node,c="https://d3gevp8yznwb3s.cloudfront.net/images/UNAVAILABLE.png",f=((O=s==null?void 0:s.image)==null?void 0:O.scale1x)||((w=l==null?void 0:l.image)==null?void 0:w.scale1x)||c,u=(T=s==null?void 0:s.image)!=null&&T.scale1x?`${(b=s==null?void 0:s.image)==null?void 0:b.scale1x} 1x, ${(_=s==null?void 0:s.image)==null?void 0:_.scale2x} 2x, ${(x=s==null?void 0:s.image)==null?void 0:x.scale3x} 3x`:(j=l==null?void 0:l.image)!=null&&j.scale1x?`${l.image.scale1x} 1x, ${l.image.scale2x} 2x, ${l.image.scale3x} 3x`:`${c}?width=200&height=200 1x, ${c}?width=400&height=400 2x, ${c}?width=600&height=600 3x`,p=s!=null&&s.packSize&&(s!=null&&s.containerType)?Ai(s.packSize,s.containerType):"",h=(s==null?void 0:s.containerType)===Yl.Bundle?`Bundle${s!=null&&s.size?` #${s==null?void 0:s.size}`:""}`:`${(s==null?void 0:s.size)??""}${(s==null?void 0:s.uom)??""} ${p??""}`.trim(),v=s!=null&&s.packSize&&(s==null?void 0:s.packSize)>1?`${s==null?void 0:s.packSize} x ${h}`:h,g=s==null?void 0:s.price,m=s==null?void 0:s.compareAtPrice,C=(e==null?void 0:e.modifierGroup)&&e.modifierGroup.length>0&&((P=(L=($=(M=e==null?void 0:e.variants)==null?void 0:M.edges)==null?void 0:$[0])==null?void 0:L.node)!=null&&P.description)?(z=(Y=(H=(R=e==null?void 0:e.variants)==null?void 0:R.edges)==null?void 0:H[0])==null?void 0:Y.node)==null?void 0:z.description:v!=null&&v.trim().length?v:e==null?void 0:e.description,I=!!(s&&(!(e!=null&&e.modifierGroup)||e.modifierGroup.length===0));return i.jsx("li",{className:le("bg-background transition duration-200 relative w-full flex flex-col justify-between items-center min-h-[230px] border border-collection-border duration-300 hover:border-collection-border-hover group",(V=r==null?void 0:r.GridStyles)==null?void 0:V.tailwindClassesContainer),children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"flex w-full",children:i.jsxs(xe,{to:t,className:"flex flex-col w-full justify-between h-full",prefetch:"intent",children:[i.jsx("img",{src:f,alt:o,srcSet:u,className:le("object-cover transition-transform duration-200 bg-feat-col-img-background w-full h-[200px] object-cover",(G=r==null?void 0:r.GridStyles)==null?void 0:G.tailwindClassesImage)}),i.jsxs("div",{className:"flex flex-col gap-1 flex flex-col p-2 pb-1 w-full",children:[i.jsx("h3",{className:le("font-medium text-collection-title line-clamp-2 transition-colors duration-200 text-sm",(Q=r==null?void 0:r.GridStyles)==null?void 0:Q.tailwindClassesTitle),children:o}),C&&i.jsx("p",{className:le("text-collection-subtitle line-clamp-2 text-sm",(K=r==null?void 0:r.GridStyles)==null?void 0:K.tailwindClassesDescription),children:C}),g&&i.jsxs("div",{className:"flex items-baseline mt-1 gap-1",children:[m&&m.amount>g.amount&&i.jsx("span",{className:le("text-xs text-gray-500 line-through"),children:m.presentation}),i.jsx("span",{className:le("font-semibold transition-colors duration-200 text-sm",m&&m.amount>
81g.amount?"text-red-600":"text-collection-price"),children:g.presentation})]})]})]})}),i.jsx("div",{className:"w-full h-fit mt-4",children:!!I&&i.jsx("div",{className:"flex justify-center items-center w-full",children:i.jsx(rh,{to:t,product:e,className:"text-xs h-[52px] w-full",addToCartCallback:n})})})]})})},Em=({isOpen:e,preCheckoutPopup:t,onOpenChange:r,onContinue:n})=>{var o,a,l;const{siteConfigs:s}=Ie();return i.jsx(mo,{open:e,onOpenChange:r,children:i.jsxs(Bn,{children:[i.jsx(Hn,{children:i.jsxs(zn,{className:"text-center",children:[(t==null?void 0:t.title)&&i.jsx(ur,{...t==null?void 0:t.title}),(t==null?void 0:t.description)&&i.jsx(ur,{...t==null?void 0:t.description})]})}),i.jsx("div",{className:"max-h-[77vh] overflow-y-auto",children:i.jsx(pe.ul,{variants:km,initial:"hidden",animate:"visible",className:"grid grid-cols-2 gap-collection-grid-gap","aria-label":"Product List",children:(l=(a=(o=t==null?void 0:t.resolvedCollection)==null?void 0:o.products)==null?void 0:a.edges)==null?void 0:l.map((c,f)=>{const u=`/products/${c.node.slug}`;return i.jsx(Cm,{to:u,addToCartCallback:()=>{console.log("addToCartCallback for ItemPreview")},product:{id:c.node.id,name:c.node.name,slug:c.node.slug,description:c.node.description,modifierGroup:c.node.modifierGroup,defaultAvailableVariant:c.node.defaultAvailableVariant||void 0,variants:c.node.variants},CollectionCardConfig:s==null?void 0:s.CollectionCardConfig},`pre-checkout-${f}-${c.node.id}`)})})}),i.jsx(qn,{className:"flex flex-col mb-2",children:i.jsx(_e,{label:"CONTINUE TO CHECKOUT",onClick:n,className:"w-full tracking-[.2em]"})})]})})},km={hidden:{opacity:0},visible:{opacity:1,transition:{delayChildren:0,staggerChildren:0}}},wl=()=>{var l;const e=Fe(),{selectedStore:t}=Ue(),{carts:r}=Je();let n=0;if(e){if(t){const c=r.find(f=>{var u;return((u=f.merchant)==null?void 0:u.storeID)===t.storeId});n=((l=c==null?void 0:c.cartLines)==null?void 0:l.reduce((f,u)=>f+((u==null?void 0:u.quantity)??0),0))??0}}else n=r.reduce((c,f)=>{var u;return c+(((u=f.cartLines)==null?void 0:u.reduce((p,h)=>p+((h==null?void 0:h.quantity)??0),0))??0)},0);const[s,o]=d.useState(!1),a=d.useRef(n);return d.useEffect(()=>{if(a.current!==n&&n>0){o(!0);const c=setTimeout(()=>o(!1),200);return a.current=n,()=>clearTimeout(c)}a.current=n},[n]),n<1?null:i.jsx("div",{className:le("absolute z-20 flex items-center justify-center min-w-5 max-w-[30px] h-5 bg-red-600 rounded-full translate-x-1/2 -translate-y-1/2 transition-all duration-200",s&&"animate-badge-bounce"),children:i.jsx("span",{className:"text-xs font-bold leading-none text-white line-clamp-1",children:n})})},Im=()=>{var f,u,p,h;const{carts:e}=Je(),{selectedStore:t}=Ue(),r=Fe(),{siteConfigs:n}=Ie(),{cart:s}=n==null?void 0:n.customConfigurations,o=Ns(),a=Nt(),l=o.state!=="idle";let c=0;if(r){if(t){const v=e.find(g=>{var m;return((m=g==null?void 0:g.merchant)==null?void 0:m.storeID)===t.storeId});c=((f=v==null?void 0:v.cartLines)==null?void 0:f.reduce((g,m)=>g+((m==null?void 0:m.quantity)??0),0))??0}}else c=e.filter(g=>{var m;return((m=g==null?void 0:g.cartLines)==null?void 0:m.length)>0}).reduce((g,m)=>g+(m==null?void 0:m.cartLines.reduce((y,C)=>y+C.quantity,0)),0);return a.pathname.includes("/checkout")||a.pathname.includes("/cart")||c===0?null:i.jsx(Ke,{children:i.jsx(xe,{to:"/cart",preventScrollReset:!1,children:i.jsx(pe.div,{initial:{opacity:0,y:50},animate:{opacity:1,y:0},exit:{opacity:0,y:50},transition:{duration:.5},className:"fixed w-fit p-4 pt-2 z-[3] bottom-0 lg:hidden",children:i.jsxs("div",{className:`w-full shadow-md border-[1px] border-cta-primary-500 flex justify-center items-center transition-colors ${l?"bg-gray-400":""}`,style:{borderColor:(u=s==null?void 0:s.mobileFloatingCartConfig)==null?void 0:u.borderColor},children:[i.jsx("div",{className:"flex bg-cta-primary-500 gap-3 p-5 items-center",style:{backgroundColor:(p=s==null?void 0:s.mobileFloatingCartConfig)==null?void 0:p.backgroundColor},children:i.jsx("p",{className:"text-white text-xs uppercase font-medium tracking-[.2em]",style:{color:(h=s==null?void 0:s.mobileFloatingCartConfig)==null?void 0:h.textColor},children:"View Cart"})}),i.jsx("p",{className:"flex justify-center h-[56px] min-w-[56px] items-center text-cta-primary-500 bg-white bg-opacity-95 backdrop-blur-sm text-md font-normal p-2",children:c})]})},"mobile-cart-popup")})})},Mm=({carts:e})=>{const[t,r]=d.useState(!1),n=Fe(),{selectedStore:s}=Ue(),o=d.useMemo(()=>!n||!s?null:{storeID:s.storeId,storeName:s.storeName},[n,s]),a=()=>{r(!1)},l=d.useMemo(()=>e.reduce((f,u)=>{var p;return f+(((p=u==null?void 0:u.cartLines)==null?void 0:p.reduce((h,v)=>h+v.quantity,0))??0)},0),[e]),c=()=>{Ja(),Rr("Checkout Started",{carts:e})};return i.jsxs("div",{className:"lg:hidden",style:{margin:0},children:[i.jsxs("button",{onClick:()=>r(!0),children:[i.jsx("span",{className:"sr-only",children:"Open Shopping Cart"}),t?i.jsx(tl,{className:"h-6 w-6 text-gray-400","aria-hidden":"true"}):i.jsx(ao,{className:"h-6 w-6 text-gray-400","aria-hidden":"true"}),i.jsx(wl,{})]}),i.jsx(he,{appear:!0,show:t,as:d.Fragment,children:i.jsxs(Te,{as:"div",className:"relative z-10",onClose:a,children:[i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx("div",{className:"fixed inset-0 bg-black/25"})}),i.jsx("div",{className:"fixed inset-0 overflow-y-auto",children:i.jsx("div",{className:"flex min-h-full items-center justify-center p-4 text-center",children:i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0 scale-95",enterTo:"opacity-100 scale-100",leave:"ease-in duration-200",leaveFrom:"opacity-100 scale-100",leaveTo:"opacity-0 scale-95",children:i.jsxs(Te.Panel,{className:"w-[100vw] h-[95vh] flex flex-col max-w-2xl transform overflow-hidden rounded-2xl bg-white text-left align-middle shadow-xl transition-all",children:[i.jsxs("div",{className:"w-full flex justify-between items-center p-4 border-b border-gray-200",children:[i.jsx("h1",{className:"text-xl font-semibold text-center",children:"Cart Overview"}),i.jsx($r,{className:"h-6 w-6 text-gray-500 cursor-pointer",onClick:a})]}),l<1?i.jsx(Tm,{}):i.jsxs(d.Fragment,{children:[i.jsxs("div",{className:"p-4 overflow-auto flex-1 gap-2 flex flex-col noScrollBar",children:[i.jsx(vl,{carts:e,store:o}),i.jsx(Ft,{}),i.jsx(xl,{carts:e,showHeader:!1})]}),i.jsxs("div",{className:"w-full mt-4 flex flex-col justify-center items-center gap-4 p-4 pt-0",children:[i.jsx(xe,{to:"/checkout",className:"w-full",children:i.jsx(_e,{label:"Proceed to checkout",className:"w-full bg-black text-white tracking-[.2rem]",onClick:c})}),l>0&&i.jsx(xe,{to:"/cart",className:"text-active text-sm flex py-2 text-center",children:i.jsx("button",{onClick:a,"aria-label":"Open additional cart info",children:"Go to cart"})})]})]})]})})})})]})})]})},Tm=()=>i.jsxs("div",{className:"w-full flex flex-col justify-center items-center h-full",children:[i.jsx(ao,{className:"w-12 h-12 text-primary-500 mb-2"}),i.jsx("h1",{className:"text-lg font-semibold text-center",children:"Your cart is empty"}),i.jsx("p",{className:"font-light text-center text-gray-600",children:"Start shopping now!"})]}),Sn=e=>{var t,r;return((t=e==null?void 0:e.price)==null?void 0:t.amountInt)??Math.round((((r=e==null?void 0:e.price)==null?void 0:r.amount)??Number.MAX_SAFE_INTEGER)*100)},Om=(e,t)=>
81{var n;const r=(n=e==null?void 0:e.storeAvailability)==null?void 0:n.find(s=>s.storeID===t);return{merchantName:r==null?void 0:r.storeName,fulfillmentTypes:(r==null?void 0:r.fulfillmentTypes)??[],isOpen:(r==null?void 0:r.isOpen)??!0}},_s=(e,t)=>{const r=(e??[]).filter(o=>{var a;return!t||((a=o.store)==null?void 0:a.storeID)===t});if(r.length===0)return null;const n=r.filter(o=>o==null?void 0:o.isAvailable),s=n.length>0?n:r;return t?s[0]:[...s].sort((o,a)=>Sn(o)-Sn(a))[0]},Dm=e=>{var t,r,n,s,o;return{amount:((t=e.price)==null?void 0:t.amount)??0,amountInt:((r=e.price)==null?void 0:r.amountInt)??Math.round((((n=e.price)==null?void 0:n.amount)??0)*100),currencyCode:((s=e.price)==null?void 0:s.currencyCode)??Ir.Usd,presentation:((o=e.price)==null?void 0:o.presentation)??"$0.00"}},Ni=(e,t)=>{const r=e.map(n=>({edge:n,availability:_s(n.node.availability,t)})).filter(n=>n.availability!=null);return r.length===0?null:[...r].sort((n,s)=>Sn(n.availability)-Sn(s.availability))[0]},is=({product:e,variant:t,availability:r,variantToMedias:n,isAvailable:s,isAvailableAtAnyStore:o=s})=>{var f,u,p,h,v,g;const a=((f=r==null?void 0:r.store)==null?void 0:f.storeID)??((u=t==null?void 0:t.store)==null?void 0:u.storeID)??"",l=Om(e.node,a||void 0),c=((p=t==null?void 0:t.fulfillmentOptions)==null?void 0:p.filter(m=>(m==null?void 0:m.isAvailable)!==!1).map(m=>m==null?void 0:m.type).filter(Boolean))??[];return{product:e.node,id:t.id,merchantId:a,rootName:e.node.name,name:t.name,slug:e.node.slug,price:r?Dm(r):t.price,compareAtPrice:(r==null?void 0:r.compareAtPrice)??(t==null?void 0:t.compareAtPrice),containerType:t.containerType,packSize:t.packSize,size:t.size,uom:t.uom,image:t.image,medias:n.get(t.id)??[],description:((h=e==null?void 0:e.node)==null?void 0:h.description)??"",isAvailable:s,isAvailableAtAnyStore:o,merchantName:((v=r==null?void 0:r.store)==null?void 0:v.storeName)??((g=t==null?void 0:t.store)==null?void 0:g.storeName)??l.merchantName,fulfillmentTypes:l.fulfillmentTypes.length>0?l.fulfillmentTypes:c,isOpen:l.isOpen}},Am=(e,t={})=>{const{selectedStoreId:r=null,preserveUnavailableProducts:n=!1}=t;return e==null?void 0:e.reduce((s,o)=>{var I,S,k,O,w,T,b;const a=((I=o==null?void 0:o.node)==null?void 0:I.defaultAvailableVariant)??null,l=((k=(S=o==null?void 0:o.node)==null?void 0:S.variants)==null?void 0:k.edges)??[],c=new Map(l.map(_=>[_.node.id,_.node.media])),f=((O=a==null?void 0:a.store)==null?void 0:O.storeID)??null,u=!r||f===r;if(a!=null&&u){const _=(w=l.find(j=>j.node.id===a.id))==null?void 0:w.node,x=_s(_==null?void 0:_.availability,r);return s.push(is({product:o,variant:a,availability:x,variantToMedias:c,isAvailable:!0})),s}const p=Ni(l,r),h=((T=p==null?void 0:p.edge)==null?void 0:T.node)??null;if(h==null&&!n)return s;const v=(p==null?void 0:p.availability)??null;if(h!=null&&v!=null)return s.push(is({product:o,variant:h,availability:v,variantToMedias:c,isAvailable:v.isAvailable===!0})),s;if(!n||!r)return s;const g=_s(a==null?void 0:a.availability,null),m=Ni(l,null),y=((b=m==null?void 0:m.edge)==null?void 0:b.node)??a??null,C=(m==null?void 0:m.availability)??g??null;return y==null||s.push(is({product:o,variant:y,availability:C,variantToMedias:c,isAvailable:!1,isAvailableAtAnyStore:C!=null})),s},[])},ji=[],as=()=>{},Rm=async()=>{};function _l(){const e=Fe(),{selectedStore:t}=Ue(),{carts:r,refreshCartsFromCookie:n}=Je(),{stores:s}=bl(),{requestStoreSwitch:o}=sl(),[a,l]=d.useState(!1),[c,f]=d.useState(null),[u,p]=d.useState(!1),[h,v]=d.useState(!1),g=d.useRef((t==null?void 0:t.storeId)??null),m=d.useRef(null),y=d.useRef(8e3),C=d.useRef(0),I=d.useRef(null),S=d.useRef(r);S.current=r;const k=d.useMemo(()=>e?r.filter(x=>{var $,L;const j=((($=x.cartLines)==null?void 0:$.length)??0)>0,M=t&&((L=x.merchant)==null?void 0:L.storeID)===t.storeId;return j&&!M}).map(x=>{var j,M,$,L,P;return{cartId:x.id,storeId:((j=x.merchant)==null?void 0:j.storeID)??"",storeName:((M=x.merchant)==null?void 0:M.storeName)??"Unknown Store",itemCount:(($=x.cartLines)==null?void 0:$.reduce((R,H)=>R+((H==null?void 0:H.quantity)??0),0))??0,subtotal:((P=(L=x.cost)==null?void 0:L.subtotalAmount)==null?void 0:P.presentation)??"$0.00",topItemNames:(x.cartLines??[]).slice(0,3).map(R=>{var H;return((H=R.merchandise)==null?void 0:H.name)??"Item"}
81).filter(Boolean)}}):ji,[r,t,e]),O=d.useMemo(()=>k.reduce((x,j)=>x+j.itemCount,0),[k]);d.useEffect(()=>{var M,$,L,P;const x=g.current,j=(t==null?void 0:t.storeId)??null;if(x&&x!==j){const R=S.current.find(H=>{var Y,z;return((Y=H.merchant)==null?void 0:Y.storeID)===x&&(((z=H.cartLines)==null?void 0:z.length)??0)>0});if(R){const H=((M=R.cartLines)==null?void 0:M.reduce((Y,z)=>Y+((z==null?void 0:z.quantity)??0),0))??0;f({cartId:R.id,storeId:x,storeName:(($=R.merchant)==null?void 0:$.storeName)??"Unknown Store",itemCount:H,subtotal:((P=(L=R.cost)==null?void 0:L.subtotalAmount)==null?void 0:P.presentation)??"$0.00",topItemNames:(R.cartLines??[]).slice(0,3).map(Y=>{var z;return((z=Y.merchandise)==null?void 0:z.name)??"Item"}).filter(Boolean)}),l(!0),y.current=8e3,C.current=Date.now(),m.current&&clearTimeout(m.current),m.current=setTimeout(()=>{l(!1)},8e3)}}return g.current=j,()=>{m.current&&clearTimeout(m.current)}},[t==null?void 0:t.storeId]);const w=d.useCallback(()=>{l(!1),m.current&&clearTimeout(m.current)},[]),T=d.useCallback(()=>{m.current&&(clearTimeout(m.current),m.current=null,y.current-=Date.now()-C.current)},[]),b=d.useCallback(()=>{a&&y.current>0&&(C.current=Date.now(),m.current=setTimeout(()=>{l(!1)},y.current))},[a]),_=d.useCallback(async x=>{p(!0);try{const j=s.find($=>$.storeID===x.storeId);if(!await o({storeId:x.storeId,storeName:x.storeName,fulfillmentTypes:(j==null?void 0:j.fulfillmentTypes)??["SHIPPING","PICKUP","DELIVERY"],isOpen:(j==null?void 0:j.isOpen)??!0}))return;await n(),(c==null?void 0:c.cartId)===x.cartId&&w()}catch(j){console.warn("[useDormantCart] restore failed:",j)}finally{p(!1)}},[o,n,c,w,s]);return d.useEffect(()=>(!a&&k.length>0?I.current=setTimeout(()=>v(!0),600):(v(!1),I.current&&clearTimeout(I.current)),()=>{I.current&&clearTimeout(I.current)}),[a,k.length]),e?{dormantCarts:k,totalDormantItems:O,hasDormantCarts:k.length>0,toastEntry:c,isToastVisible:a,dismissToast:w,isPillReady:h,restoreCart:_,isRestoring:u,pauseToastTimer:T,resumeToastTimer:b}:{dormantCarts:ji,totalDormantItems:0,hasDormantCarts:!1,toastEntry:null,isToastVisible:!1,dismissToast:as,isPillReady:!1,restoreCart:Rm,isRestoring:!1,pauseToastTimer:as,resumeToastTimer:as}}const Lm=()=>i.jsx("svg",{className:"w-4 h-4 text-cta-primary-500",fill:"currentColor",viewBox:"0 0 24 24","aria-hidden":"true",children:i.jsx("path",{d:"M5 5a2 2 0 012-2h10a2 2 0 012 2v16l-7-3.5L5 21V5z"})});function Pm({entry:e,onRestore:t,isRestoring:r}){return i.jsxs("div",{className:"flex items-center gap-3 rounded-lg border border-dashed border-cart-border px-3 py-2.5 hover:border-border transition-colors",children:[i.jsx(Lm,{}),i.jsxs("div",{className:"flex-1 min-w-0",children:[i.jsx("p",{className:"text-sm font-medium text-cart-heading truncate",children:e.storeName}),i.jsxs("p",{className:"text-xs text-cart-text",children:[e.itemCount," ",e.itemCount===1?"item":"items"," ·"," ",e.subtotal]})]}),i.jsx("button",{type:"button",onClick:()=>t(e),disabled:r,className:"flex-shrink-0 text-xs font-medium text-cta-primary-500 hover:text-cta-primary-700 disabled:opacity-50 transition-colors duration-150",children:"Resume"})]})}const $m=()=>{const e=Fe(),{dormantCarts:t,hasDormantCarts:r,restoreCart:n,isRestoring:s}=_l();return!e||!r?null:i.jsxs("div",{className:"hidden md:block border-t border-cart-border pt-3 mt-3 motion-safe:animate-fade-in-up",children:[i.jsx("h3",{className:"text-xs font-semibold uppercase tracking-wider text-body-subheading mb-2 px-1",children:"Saved Carts"}),i.jsx("div",{className:"space-y-2",children:t.map(o=>i.jsx(Pm,{entry:o,onRestore:n,isRestoring:s},o.cartId))})]})},Fm=()=>{var H,Y,z,V,G;const e=Ns(),t=St(),r=Nt(),{loading:n}=yl(),s=d.useRef(null),o=d.useRef(null),{carts:a,loading:l,cartSessionReady:c,isCartPopUpOpen:f,cartLinesCount:u,closeCartPopUp:p,openCartPopUp:h,refreshCartsFromCookie:v}=Je(),g=Fe(),{selectedStore:m}=Ue(),{data:y,update:C,reload:I}=Nm(),[S,k]=d.useState(!1),{siteConfigs:O,cartUpsellCollection:w,preCheckoutPopup:T}=Ie(),b=d.useMemo(()=>{var Q,K;return(K=(Q=O==null?void 0:O.customConfigurations)==null?void 0:Q.cart)==null?void 0:K.additionalCta},[O]),_=d.useMemo(()=>!g||!m?null:{storeID:m.storeId,storeName:m.storeName},[g,m]),x=d.useMemo(()=>_?a.filter(Q=>{var K;return((K=Q.merchant)==null?void 0:K.storeID)===_.storeID}):a,[a,_]),j=d.useMemo(()=>x.some(Q=>{var K;return((K=Q==null?void 0:Q.cartLines)==null?void 0:K.length)>0}),[x]),M=e.state!=="idle",$=()=>{k(!0)},L=()=>{I(),k(!1),C(!0)},P=()=>{C(!0),t("/checkout"),R()},R=()=>{Ja(),Rr("Checkout Started",{carts:a})};return d.useEffect(()=>{c&&v!=null&&v()},[]),d.useEffect(()=>{const Q=K=>{var q,E,D;if(!f||!document)return;const J=K.target,ue=(q=s.current)==null?void 0:q.contains(J),Z=(E=o.current)==null?void 0:E.
81contains(J),te=(D=J==null?void 0:J.closest)==null?void 0:D.call(J,'[role="dialog"]');!ue&&!Z&&!te&&p()};return f&&document.addEventListener("mousedown",Q),()=>{document.removeEventListener("mousedown",Q)}},[f,p]),i.jsxs(d.Fragment,{children:[i.jsx(Mt,{as:"div",className:"hidden lg:inline-block",style:{margin:0},children:i.jsxs(i.Fragment,{children:[i.jsxs(Mt.Button,{className:"text-gray-400 hover:text-gray-500",disabled:r.pathname==="/cart",ref:s,onClick:f?p:h,children:[i.jsx("span",{className:"sr-only",children:"Open Shopping Cart"}),f?i.jsx(tl,{className:"h-6 w-6","aria-hidden":"true"}):i.jsx(ao,{className:"h-6 w-6","aria-hidden":"true"}),i.jsx(wl,{})]}),i.jsx(he,{show:f,as:d.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:i.jsx(Mt.Panel,{ref:o,static:!0,className:"absolute right-0 z-[50] mt-5 w-5/12 noScrollBar h-[90vh] origin-top-right divide-y divide-cart-border border border-cart-border bg-background shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none flex flex-col items-center justify-center",children:i.jsxs(d.Fragment,{children:[i.jsxs("div",{className:"p-4 overflow-auto flex flex-col flex-1 w-full noScrollBar",children:[i.jsx(vl,{carts:a,store:_}),i.jsx($m,{}),w&&i.jsxs("div",{className:"pt-4 border-t mt-4",children:[i.jsx("p",{className:"text-lg text-primary-500 font-semibold",children:"You Might Like"}),i.jsx(Oh,{sliderOuterClassName:"pb-0",header:null,hideHeader:!1,productImagesPadding:(H=w==null?void 0:w.image)==null?void 0:H.padding,addToCartVariant:w==null?void 0:w.addToCartVariant,productImagesHeight:(Y=w==null?void 0:w.image)==null?void 0:Y.height,productImagesWidth:(z=w==null?void 0:w.image)==null?void 0:z.width,variants:Am(((G=(V=w==null?void 0:w.collection)==null?void 0:V.products)==null?void 0:G.edges)??[],{selectedStoreId:(m==null?void 0:m.storeId)??null}),addToCartCallback:()=>C(!0),visibleSlides:{def:3.2,md:3.2,lg:3.2,xl:3.2}})]})]}),!!(b!=null&&b.toUrl&&(b!=null&&b.text))&&i.jsx("div",{className:`w-full p-4 ${w?"pb-0":""}`,children:i.jsx(xe,{to:b==null?void 0:b.toUrl,className:"w-full",onClick:p,children:i.jsx(_e,{variant:"outline",label:b.text,disabled:M||l,className:"w-full uppercase",style:{letterSpacing:".2em"}})})}),i.jsxs("div",{className:"w-full flex flex-col justify-center gap-2 p-4",children:[i.jsx(xl,{carts:a,showHeader:!1}),i.jsx(Ft,{}),!y&&T?i.jsx(_e,{onClick:$,type:"button",label:"PROCEED TO CHECKOUT",spacing:"custom",variant:"default",className:le("text-cart-button-text bg-cart-button hover:bg-cart-button-hover",(M||l||n||u===0)&&"opacity-50 cursor-not-allowed"),disabled:M||l||n||u===0,fullWidth:!0}):i.jsx(xe,{to:"/checkout",className:le((M||l||n||u===0)&&"cursor-not-allowed"),children:i.jsx(_e,{type:"button",label:"PROCEED TO CHECKOUT",spacing:"custom",variant:"default",className:le("text-cart-button-text bg-cart-button hover:bg-cart-button-hover",(M||l||n||u===0)&&"opacity-50 cursor-not-allowed"),disabled:M||l||n||u===0,onClick:R,fullWidth:!0})}),i.jsx(xe,{to:"/cart",className:"text-active text-sm flex justify-center text-center self-start w-full",preventScrollReset:!1,children:i.jsx(_e,{type:"button",label:"GO TO CART",variant:"ghost",spacing:"custom",disabled:M,onClick:p,fullWidth:!0,className:"text-cart-button hover:bg-cart-button hover:bg-cart-button-light"})})]})]})})})]})}),i.jsx(Mm,{carts:j?x.map(Q=>JSON.parse(JSON.stringify(Q))):[]}),!!T&&i.jsx(Em,{isOpen:S,onOpenChange:L,onContinue:P,preCheckoutPopup:T})]})};function Lr(...e){return e.filter(Boolean).join(" ")}const Sl=d.forwardRef(({customer:e},t)=>{const r=d.useCallback(async()=>{try{await er.authStateReady(),await er.signOut(),window.location.href="/api/auth/logout"}catch(n){console.error("Error during logout process:",n,new Date().toISOString()),window.location.href="/api/auth/logout"}},[]);return i.jsx("div",{ref:t,className:"menu-items",children:i.jsxs(Lt.Items,{className:"absolute right-0 z-10 mt-2 w-56 origin-top-right divide-y divide-dropdown-menu-divider rounded-md border border-dropdown-menu-border bg-dropdown-menu-background shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:[i.jsxs("div",{className:"px-4 py-3",children:[i.jsx("p",{className:"text-sm",children:"Signed in as"}),i.jsx("p",{className:"truncate text-sm font-medium text-dropdown-menu-active",children:(e==null?void 0:e.email)??"NO E
81MAIL"})]}),i.jsxs("div",{className:"py-1",children:[i.jsx(Lt.Item,{children:({active:n})=>i.jsx(xe,{to:"/profile/orders",className:Lr(n?" bg-dropdown-menu-background-hover text-dropdown-menu-active":"text-dropdown-menu-text","block px-4 py-2 text-sm"),children:"Order History"})}),i.jsx(Lt.Item,{children:({active:n})=>i.jsx(xe,{to:"/profile",className:Lr(n?"bg-dropdown-menu-background-hover text-dropdown-menu-active":"text-dropdown-menu-text","block px-4 py-2 text-sm"),children:"Profile"})})]}),i.jsx("div",{className:"py-1",children:i.jsx("button",{type:"button",className:"block w-full px-4 py-2 text-left text-sm hover:bg-dropdown-menu-background-hover transitions-color text-danger",onClick:r,children:"Sign out"})})]})})});Sl.displayName="LoggedInMenuItems";const Nl=d.forwardRef((e,t)=>i.jsx("div",{className:"menu-items",ref:t,children:i.jsx(Lt.Items,{className:"absolute right-0 z-10 w-56 mt-2 origin-top-right bg-background divide-y divide-navigation-menu-divider border border-dropdown-menu-border rounded-md shadow-lg ring-1 ring-black ring-opacity-5 focus:outline-none",children:i.jsxs("div",{className:"py-1",children:[i.jsx(Lt.Item,{children:({active:r})=>i.jsx(xe,{to:"/login",className:Lr(r?"bg-navigation-menu-background text-navigation-menu-heading":"text-navigation-menu-text","block px-4 py-2 text-sm"),children:"Login"})}),i.jsx(Lt.Item,{children:({active:r})=>i.jsx(xe,{to:"signup",className:Lr(r?"bg-navigation-menu-background text-navigation-menu-heading":"text-navigation-menu-text","block px-4 py-2 text-sm"),children:"Create An Account"})})]})})}));Nl.displayName="LoggedOutMenuItems";const jl=()=>{const e=Ie(),{isLoggedIn:t,isAnonymous:r,customer:n,sessionExists:s}=e,o=d.useMemo(()=>t?i.jsx(Sl,{customer:n}):i.jsx(Nl,{}),[n,t]);return i.jsxs(Lt,{as:"div",className:"relative inline-block text-left",style:{margin:0},children:[i.jsxs(Lt.Button,{className:"text-gray-400 hover:text-gray-500",children:[i.jsx("span",{className:"sr-only","aria-label":"Open Account Menu",children:"Account"}),i.jsx(Vp,{className:"h-6 w-6","aria-hidden":"true"}),r&&s&&i.jsx("span",{className:"absolute right-0 top-0 h-2 w-2 rounded-full bg-gray-300","aria-label":"Using anonymous account"})]}),i.jsx(he,{as:d.Fragment,enter:"transition ease-out duration-100",enterFrom:"transform opacity-0 scale-95",enterTo:"transform opacity-100 scale-100",leave:"transition ease-in duration-75",leaveFrom:"transform opacity-100 scale-100",leaveTo:"transform opacity-0 scale-95",children:o})]})},Cl=({title:e,links:t,onClose:r})=>i.jsx("div",{className:"relative flex-1 bg-navigation-menu-background",children:i.jsx("div",{className:"px-8 mx-auto max-w-7xl",children:i.jsx("div",{className:"items-start grid-cols-1 pt-10 pb-12 gap-x-8 gap-y-10",children:i.jsx("div",{className:"grid grid-cols-1 gap-x-8 gap-y-4",children:i.jsxs("div",{children:[i.jsx("p",{className:"text-navigation-menu-heading text-md uppercase tracking-[2px]","aria-label":`${e} Section Title with ${t.length} Categories`,children:e}),i.jsx("ul",{className:"mt-6 space-y-6 sm:mt-4 sm:space-y-4","aria-label":`${e} Section Categories`,children:t.map(n=>{var a,l,c,f,u,p;const{linkType:s}=n;let o="";switch(s){case"page":o=((c=(l=(a=n==null?void 0:n.page)==null?void 0:a.data)==null?void 0:l.attributes)==null?void 0:c.slug)??"";break;case"product":o=`products/${n==null?void 0:n.product}`??"";break;case"collection":o=`collections/${(p=(u=(f=n==null?void 0:n.collection)==null?void 0:f.data)==null?void 0:u.attributes)==null?void 0:p.slug}`??"";break}return i.jsx("li",{"aria-label":n.title,children:i.jsx(xe,{onClick:()=>r==null?void 0:r(),to:o,className:"text-sm text-navigation-menu-text transition-all",children:n.title})},n.id)})})]})})})})}),El=({links:e,onClose:t})=>i.jsx("div",{className:"relative flex-1 bg-navigation-menu-background",children:i.jsx("div",{className:"px-8 mx-auto max-w-7xl",children:i.jsx("div",{className:"items-start grid-cols-1 pt-10 pb-12 gap-x-8 gap-y-10",children:i.jsx("div",{className:"grid grid-cols-1 gap-x-8 gap-y-4",children:i.jsx("div",{children:i.jsx("ul",{className:"mt-6 space-y-6 sm:mt-4 sm:space-y-4",children:e.map(r=>{var o,a,l;const{linkType:n}=r;let s="";switch(n){case"product":s=`products/${r==null?void 0:r.product}`??"";break;case"collection":s=`collections/${(l=(a=(o=r==null?void 0:r.collection)==null?void 0:o.data)==null?void 0:a.attributes)==null?void 0:l.slug}`??"";break}return i.jsx("li",{children:i.jsx(xe,{onClick:()=>t==null?void 0:t(),to:s,className:"font-bold text-navigation-menu-text text-md",children:r.title})},r.id)})})})})})})}),Um=e=>{var t;return i.jsx("div",{children:(t=e==null?void 0:e.data)==null?void 0:t.attributes.columns.map(r=>r.columnType==="nested"?i.jsx("div",{style:{display:"none"},children:i.jsx(Cl,{links:r.navColumnLinks,title:r.title})},r.id??String(Math.random())):i.jsx("div",{style:{display:"none"},children:i.jsx(El,{links:r.navColumnLinks})},r==null?void 0:r.id))})},Bm=(e,t)=>e==null?void 0:e.map((r,n)=>{switch(r.columnType){case"nested":return r&&(r!=null&&r.title)?i.jsx(Cl,{links:(r==null?void 0:r.navColumnLinks)??[],title:r==null?void 0:r.title,onClose:t},n):null;case"primaries":return r?i.jsx(El,{links:(r==null?void 0:r.navColumnLinks)??[],onClose:t},n):null;default:return null}});function Hm(e){var C,I,S,k,O,w,T,b,_,x,j,M,$,L,P,R,H,Y,z;const{menu:t,rootHref:r}=(e==null?void 0:e.attributes)??{}
81,n=Nt(),s=r?n.pathname===r:!1,[o,a]=d.useState(!1),[l,c]=d.useState(!0),[f,u]=d.useState(null),p=(S=(I=(C=t==null?void 0:t.data)==null?void 0:C.attributes)==null?void 0:I.columns)==null?void 0:S.filter(V=>V.columnType!=null),h=d.useCallback(V=>Bm(p,V),[p]);d.useEffect(()=>{c(typeof window>"u")},[]);const v=St(),g=()=>{r&&v(r),a(!1)},m=()=>{f&&clearTimeout(f),a(!0)},y=()=>{const V=setTimeout(()=>{a(!1)},200);u(V)};return l?i.jsx(Um,{menu:t}):i.jsx("div",{className:"hidden h-full lg:flex","aria-label":"Expand "+((O=(k=t==null?void 0:t.data)==null?void 0:k.attributes)==null?void 0:O.title)+" Menu",children:i.jsx("div",{className:"ml-8",children:i.jsx("div",{className:"flex justify-center h-full space-x-8",children:i.jsx("div",{className:"flex",children:i.jsxs(i.Fragment,{children:[i.jsx("div",{className:"relative flex",children:i.jsx("button",{className:Lr(o||s?"border-primary-500 text-navigation-text-hover":"border-transparent text-navigation-text hover:text-navigation-text-hover","relative text-navigation-text z-100 -mb-px flex items-center border-b-2 border-b-navigation-hover pt-px text-sm uppercase tracking-[2px] transition-colors duration-200 ease-out",o||s?((w=e==null?void 0:e.attributes)==null?void 0:w.linkActiveTailwindClasses)??"":((T=e==null?void 0:e.attributes)==null?void 0:T.linkTailwindClasses)??""),onClick:()=>g(),onMouseEnter:m,onMouseLeave:y,children:(b=e==null?void 0:e.attributes)!=null&&b.rootTitle&&((_=e==null?void 0:e.attributes)!=null&&_.rootHref)?(x=e==null?void 0:e.attributes)==null?void 0:x.rootTitle:(j=e==null?void 0:e.attributes)!=null&&j.title?(M=e==null?void 0:e.attributes)==null?void 0:M.title:((R=(P=(L=($=e==null?void 0:e.attributes)==null?void 0:$.collection)==null?void 0:L.data)==null?void 0:P.attributes)==null?void 0:R.name)??""})}),o&&i.jsx(he,{...qm,show:o,children:i.jsx("div",{onMouseEnter:m,onMouseLeave:y,className:"absolute inset-x-0 border-t border-b border-t-header-border border-b-navigation-menu-border top-full sm:text-sm z-50",children:i.jsxs("div",{className:"flex flex-col bg-navigation-menu-background",children:[i.jsx("div",{className:"w-full flex justify-center",children:i.jsxs("div",{className:"w-full max-w-7xl px-8 pt-6",children:[i.jsx("h2",{className:"text-navigation-menu-heading text-3xl font-bold",children:(Y=(H=t==null?void 0:t.data)==null?void 0:H.attributes)==null?void 0:Y.title}),i.jsx(Ft,{className:"mt-4 bg-navigation-menu-divider"})]})}),i.jsx("div",{className:"absolute inset-0 bg-navigation-menu-background shadow top-1/2","aria-hidden":"true"}),i.jsx("div",{className:"flex justify-center w-full",children:i.jsx("div",{className:"w-full max-w-7xl flex",children:h(()=>a(!1))})})]})})})]})},(z=e==null?void 0:e.attributes)==null?void 0:z.title)})})})}const qm={as:d.Fragment,enter:"transition ease-out duration-200",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition ease-in duration-150",leaveFrom:"opacity-100",leaveTo:"opacity-0"},kl=d.createContext({isOpen:!1,toggleOpen:()=>{}}),zm=({children:e})=>{const[t,r]=d.useState(!1);d.useEffect(()=>{window.matchMedia("(max-width: 1024px)").matches&&r(!1)},[]);function n(s){r(o=>s??!o)}return i.jsx(kl.Provider,{value:{isOpen:t,toggleOpen:n},children:e})},go=()=>{const{isOpen:e,toggleOpen:t}=d.useContext(kl);return{isOpen:e,toggleOpen:t}},Wm=()=>{const{toggleOpen:e}=go(),t=()=>{e(!0)};return i.jsx(i.Fragment,{children:i.jsx("div",{className:"items-center flex lg:hidden",children:i.jsxs("button",{type:"button",onClick:t,className:"rounded-full",children:[i.jsx("span",{className:"sr-only",children:"Search Products"}),i.jsx(Fn,{className:"h-6 w-6 text-gray-400 mb-1","aria-hidden":"true",width:48,height:48})]})})})},Gm=({logo:e,onClick:t})=>{const{siteConfigs:r,ENV:n}=Ie(),s=n==null?void 0:n.STRAPI_URL,o=n==null?void 0:n.STRAPI_UPLOAD_URL,{src:a}=pt({image:e==null?void 0:e.image,strapiUrl:s,strapiUploadUrl:o,presetType:"original"}),l=(r==null?void 0:r.storeName)??"";return i.jsx("div",{className:"lg:hidden flex w-full flex-col gap-y-2 py-2",children:i.jsxs("div",{className:"flex flex-row justify-between",children:[i.jsx("div",{className:"flex flex-1",children:i.jsxs("button",{type:"button","aria-label":"Open menu",onClick:t,className:"-ml-2 roun
81ded-md p-2 text-navigation-text",children:[i.jsx("span",{className:"sr-only",children:"Open menu"}),i.jsx(dh,{className:"h-6 w-6","aria-hidden":"true"})]})}),i.jsx("span",{className:"sr-only",children:l}),i.jsx("div",{className:"max-w-[160px] flex justify-center items-center",children:i.jsx(xe,{to:(e==null?void 0:e.href)||"/",children:i.jsx("img",{src:a,alt:"Logo",className:le("w-full",e==null?void 0:e.tailwindClasses)})})}),i.jsx("div",{className:"lg:hidden flex flex-1 items-center justify-end",children:i.jsxs("div",{className:"flex gap-4 items-center",children:[i.jsx(jl,{}),i.jsx(Wm,{})]})})]})})},Ym=()=>i.jsx(he.Child,{as:d.Fragment,...Vm,children:i.jsx("div",{className:"fixed inset-0 bg-gray-600 bg-opacity-75"})}),Vm={enter:"transition-opacity ease-linear duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"transition-opacity ease-linear duration-300",leaveFrom:"opacity-100",leaveTo:"opacity-0"},Qm=({logo:e,navigationItems:t,onClose:r,currentPathname:n})=>{const[s,o]=d.useState(!1),[a,l]=d.useState(null),[c,f]=d.useState(null),[u,p]=d.useState(!1),h=d.useRef([]),v=St();Nt();const{siteConfigs:g,ENV:m}=Ie(),y=(g==null?void 0:g.storeName)??"",C=m==null?void 0:m.STRAPI_URL,I=m==null?void 0:m.STRAPI_UPLOAD_URL,{src:S}=pt({image:e==null?void 0:e.image,strapiUrl:C,strapiUploadUrl:I,presetType:"original"}),k=d.useCallback((j,M)=>{f(j===c?null:j),l(M??null),setTimeout(()=>{const $=b.current;if($){const{scrollTop:L,scrollHeight:P,clientHeight:R}=$;p(j!==c&&L+R<P-20)}},300)},[c]),O=d.useMemo(()=>c!==null,[c]),w=(j,M)=>{j===M&&o(!1)},T=(j,M)=>{j===M&&o(!0)};d.useEffect(()=>{var j;c!==null&&h.current[c]&&((j=h.current[c])==null||j.scrollIntoView({behavior:"smooth",block:"center"}))},[c]);const b=d.useRef(null),_=()=>{if(!b.current)return;const{scrollTop:j,clientHeight:M}=b.current;b.current.scrollTo({top:j+M,behavior:"smooth"})};d.useEffect(()=>{const j=b.current;if(!j)return;const M=()=>{const{scrollTop:L,scrollHeight:P,clientHeight:R}=j;p(c!==null&&L+R<P-20)};j.addEventListener("scroll",M);const $=setTimeout(M,300);return()=>{j.removeEventListener("scroll",M),clearTimeout($)}},[c]);const x=d.useMemo(()=>t==null?void 0:t.map((j,M)=>{var L,P,R,H,Y,z,V,G,Q,K,J,ue;const $=((L=j.attributes)==null?void 0:L.url)===n||((P=j.attributes)==null?void 0:P.rootHref)===n||((R=j.attributes)==null?void 0:R.linkType)==="collection"&&`/collections/${(V=(z=(Y=(H=j.attributes)==null?void 0:H.collection)==null?void 0:Y.data)==null?void 0:z.attributes)==null?void 0:V.slug}`===n;switch((G=j==null?void 0:j.attributes)==null?void 0:G.linkType){case"menu":return i.jsx(Nn,{item:j,index:M,isActive:c===M,isSelected:$,isAnyParentActive:O,onClick:k,activeParentIndex:c,url:j.attributes.url,onClose:r,onViewPortEnter:w,onViewPortLeave:T,ref:Z=>h.current[M]=Z},`link-${M}-${(Q=j==null?void 0:j.attributes)==null?void 0:Q.title}`);case"collection":return i.jsx(Nn,{item:j,index:M,isActive:c===M,isSelected:$,isAnyParentActive:O,onClick:k,activeParentIndex:c,url:j.attributes.url,onClose:r,onViewPortEnter:w,onViewPortLeave:T,ref:Z=>h.current[M]=Z},`link-${M}-${(K=j==null?void 0:j.attributes)==null?void 0:K.title}`);case"url":return i.jsx("button",{onClick:()=>{var Z;v(((Z=j==null?void 0:j.attributes)==null?void 0:Z.url)??"/"),r()},className:"font-semibold text-xl text-start px-2",children:j.attributes.title},`${M}-${(J=j==null?void 0:j.attributes)==null?void 0:J.title}`);case"page":return i.jsx("button",{onClick:()=>{var te,q,E,D;const Z=(D=(E=(q=(te=j==null?void 0:j.attributes)==null?void 0:te.page)==null?void 0:q.data)==null?void 0:E.attributes)==null?void 0:D.slug;v(Z?`${Z}`:"/"),r()},className:"font-semibold text-xl text-start px-2",children:j.attributes.title},`${M}-${(ue=j==null?void 0:j.attributes)==null?void 0:ue.title}`);default:return null}}),[t,c,O,k,r,v,n]);return i.jsxs("div",{className:"flex flex-col h-[92vh] relative",children:[i.jsxs("div",{className:"top-0 fixed z-[80] flex items-center px-6 py-4 pt-6 justify-end w-full bg-navigation-background text-navigation-text max-h-[85px]",children:[i.jsx("div",{className:"flex items-center justify-between w-full",children:i.jsxs("div",{className:"flex-shrink-0",children:[i.jsx("span",{className:"sr-only",children:y}),!!(S!=null&&S.length)&&i.jsx("div",{className:"max-w-[100px]",children:i.jsx(xe,{to:(e==null?void 0:e.href)||"/",children:i.jsx("img",{src:S,alt:"Logo",className:le("w-full",e==null?void 0:e.tailwindClasses)})})})]})}),i.jsx("button",{onClick:()=>r(),children:i.jsx($r,{className:"h-6 w-6","aria-hidden":"true"})})]}),i.jsxs("div",{className:"relative flex-1 mt-[85px] pb-20",children:[i.jsx("div",{ref:b,className:"absolute inset-0 overflow-y-auto noScrollBar",children:i.jsxs("div",{className:"relative",children:[i.jsxs(pe.button,{type:"button",onClick:()=>{f(null),l(null),o(!1)},initial:{opacity:0}
81,animate:{opacity:s?1:0},exit:{opacity:0},className:`fixed top-[85px]left-0 w-full z-50 shadow-sm bg-mobile-menu-background p-4 flex items-center justify-between ${s?"":"pointer-events-none"}`,children:[i.jsx("p",{className:"font-semibold text-2xl",children:a}),i.jsx(Za,{className:"h-5 w-5"})]}),i.jsx("div",{className:"flex flex-col gap-2 px-4 py-4",children:x})]})}),i.jsxs(pe.div,{initial:{opacity:0},animate:{opacity:u?1:0},className:"fixed bottom-0 left-0 right-0 z-50",children:[i.jsx("div",{className:"w-full h-12 bg-gradient-to-t from-mobile-menu-background from-50% via-mobile-menu-background/50 to-transparent pointer-events-none absolute bottom-0 left-0 right-0"}),i.jsxs("button",{onClick:_,className:"w-full h-16 flex flex-col items-center justify-end gap-2 pb-4 relative",children:[i.jsx("span",{className:"text-sm text-blue-500",children:"View more"}),i.jsx(Di,{className:"h-5 w-5 text-blue-500"})]})]})]})]})},Nn=d.forwardRef(({item:e,index:t,isActive:r,isSelected:n,onClick:s,onClose:o,onViewPortLeave:a,onViewPortEnter:l,isAnyParentActive:c,activeParentIndex:f,url:u,className:p},h)=>{var y,C,I,S,k,O,w,T,b,_;const v=St(),g=()=>{o==null||o()},m=()=>{var x,j;if(u)v(u),g();else if(e.attributes.linkType==="collection"){const M=(x=e.attributes.collection)==null?void 0:x.data.attributes.slug;v(`/collections/${M}`),g()}s(t,(j=e.attributes)==null?void 0:j.title)};return i.jsxs(Ke,{initial:!1,children:[i.jsxs(pe.button,{initial:{opacity:0}
81,animate:{opacity:1},onViewportEnter:()=>{l==null||l(f??null,t)},onViewportLeave:()=>{a==null||a(f??null,t)},exit:{opacity:0},transition:{ease:"easeInOut"},ref:h,onClick:m,className:le(`px-2 text-left transition-all ${f===null||r?"text-mobile-menu-heading":c&&!r?"text-mobile-menu-text-inactive":"text-mobile-menu-text"} text-xl font-semibold w-full justify-between flex items-center`,n&&"text-mobile-menu-heading-active",n&&((y=e.attributes)==null?void 0:y.linkActiveTailwindClasses),p),children:[(C=e.attributes)==null?void 0:C.title,((I=e==null?void 0:e.attributes)==null?void 0:I.linkType)==="menu"&&(f===t?i.jsx(Za,{className:"h-4 w-4 text-mobile-menu-icons"}):i.jsx(Di,{className:"h-4 w-4 text-mobile-menu-icons"}))]}),e.attributes.linkType==="menu"&&i.jsxs(pe.div,{initial:{height:0},animate:{height:r?"auto":0},exit:{height:0},className:"flex flex-col gap-2 overflow-hidden",children:[((S=e.attributes)==null?void 0:S.rootHref)&&i.jsx(xe,{to:e.attributes.rootHref,className:"mt-4 ml-2 text-2xl font-semibold text-mobile-menu-text",onClick:g,children:((k=e.attributes)==null?void 0:k.rootTitle)??"Shop All"}),(_=(b=(T=(w=(O=e.attributes)==null?void 0:O.menu)==null?void 0:w.data)==null?void 0:T.attributes)==null?void 0:b.columns)==null?void 0:_.map((x,j)=>i.jsx(Km,{column:x,activeParentIndex:f,onClose:g},`main-${x==null?void 0:x.title}-${j}`))]})]})});Nn.displayName="NavItem";const Km=({column:e,activeParentIndex:t,onClose:r})=>{var s;const n=Nt();return i.jsxs("div",{className:"flex flex-col gap-y-1",children:[(e==null?void 0:e.title)&&i.jsxs("div",{className:"flex px-2 items-center gap-x-4 text-left mt-4",children:[i.jsx("p",{className:"uppercase text-sm font-semibold tracking-[.2em] text-mobile-menu-heading",children:e.title}),i.jsx(Ft,{className:"bg-mobile-menu-border"})]}),i.jsx("div",{className:"flex flex-col gap-y-2",children:(s=e.navColumnLinks)==null?void 0:s.map((o,a)=>{var f,u,p,h,v,g;const l={id:o.id,attributes:{linkType:o.linkType,title:o.title,collection:o.collection,page:o.page,product:o.product,url:o.url}},c=o.url===n.pathname||o.linkType==="collection"&&`/collections/${(p=(u=(f=o.collection)==null?void 0:f.data)==null?void 0:u.attributes)==null?void 0:p.slug}`===n.pathname;return i.jsx(Nn,{item:l,index:a,isActive:!1,isSelected:c,onClick:()=>console.log(),onClose:r,activeParentIndex:t,url:o.url??((g=(v=(h=o.page)==null?void 0:h.data)==null?void 0:v.attributes)==null?void 0:g.slug)},a)})})]})},Zm=({logo:e,navigationItems:t,openDeliveryAddressModal:r})=>{const[n,s]=d.useState(!1),o=Nt();return i.jsxs(i.Fragment,{children:[i.jsx(Gm,{onClick:()=>s(!0),logo:e,openDeliveryAddressModal:r}),i.jsx(he.Root,{show:n,as:d.Fragment,children:i.jsxs(Te,{as:"div",className:"relative z-40 lg:hidden",onClose:()=>s(!1),children:[i.jsx(Ym,{}),i.jsx(Jm,{children:i.jsx(Te.Panel,{className:"relative flex w-full max-w-full flex-col overflow-y-auto bg-mobile-menu-background pb-8 shadow-xl",children:i.jsx(Qm,{logo:e,navigationItems:t??[],onClose:()=>s(!1),currentPathname:o.pathname})})})]})})]})},Jm=({children:e})=>i.jsx("div",{className:"fixed inset-0 z-40 flex",children:i.jsx(he.Child,{as:d.Fragment,...Xm,children:e})}),Xm={enter:"transition ease-in-out duration-300 transform",enterFrom:"-translate-y-full",enterTo:"translate-y-0",leave:"transition ease-in-out duration-300 transform",leaveFrom:"translate-y-0 opacity-100",leaveTo:"-translate-y-full opacity-0"},e0=({children:e})=>i.jsx("div",{className:"flex justify-center relative bg-navigation-background text-navigation-text",children:i.jsx("div",{className:"max-w-[1440px] flex-1 ",children:i.jsx("div",{className:"lg:py-2 px-4",children:i.jsx("div",{className:"flex min-h-20 items-center justify-between",children:e})})})});function Ci(e){return e.replace(/\/+/g,"/")}const t0=({navigationItems:e})=>i.jsx("div",{className:"hidden space-x-4 lg:flex lg:ml-10 lg:pr-4 flex-wrap gap-y-2",children:e==null?void 0:e.map((t,r)=>{var s;const n=r0(t);return i.jsx("div",{className:le("flex",((s=t==null?void 0:t.attributes)==null?void 0:s.tailwindClasses)??""),children:n},r)})}),r0=e=>{var s,o,a,l,c,f,u,p,h,v,g,m,y,C,I,S,k,O,w,T,b,_,x,j,M,$,L,P,R,H,Y,z,V,G,Q;const{attributes:{linkType:t}}=e,r=((s=e==null?void 0:e.attributes)==null?void 0:s.linkTailwindClasses)??"",n=((o=e==null?void 0:e.attributes)==null?void 0:o.linkActiveTailwindClasses)??"";switch(t){case"page":{const K=((f=(c=(l=(a=e==null?void 0:e.attributes)==null?void 0:a.page)==null?void 0:l.data)==null?void 0:c.attributes)==null?void 0:f.slug)??"",J=((v=(h=(p=(u=e==null?void 0:e.attributes)==null?void 0:u.page)==null?void 0:p.data)==null?void 0:h.attributes)==null?void 0:v.title)??"";return((g=K==null?void 0:K.trim())==null?void 0:g.length)===0&&((m=J==null?void 0:J.trim())==null?void 0:m.length)===0?null:i.jsx(ls,{link:K==="home"?"/":Ci(K),title:J,linkTailwindClasses:r,linkActiveTailwindClasses:n})}case"collection":{const K=(S=(I=(C=(y=e==null?void 0:e.attributes)==null?void 0:y.collection)==null?void 0:C.data)==null?void 0:I.attributes)!=null&&S.slug?`collections/${(T=(w=(O=(k=e==null?void 0:e.attributes)==null?void 0:k.collection)==null?void 0:O.data)==null?void 0:w.attributes)==null?void 0:T.slug}`:"",J=(b=e==null?void 0:e.attributes)!=null&&b.rootTitle&&((_=e==null?void 0:e.attributes)!=null&&_.rootHref)?(x=e==null?void 0:e.attributes)==null?void 0:x.rootTitle:(j=e==null?void 0:e.attributes)!=null&&j.title?(M=e==null?void 0:e.attributes)==null?void 0:M.title:((R=(P=(L=($=e==null?void 0:e.attributes)==null?void 0:$.collection)==null?void 0:L.data)==null?void 0:P.attributes)==null?void 0:R.name)??"";return((H=K==null?void 0:K.trim())==null?void 0:H.length)===0&&((Y=J==null?void 0:J.trim())==null?void 0:Y.length)===0?null:i.jsx(ls,{link:K,title:J,linkTailwindClasses:r})}case"menu":return i.jsx(Hm,{...e});default:return null;case"url":{const K=((z=e==null?void 0:e.attributes)==null?void 0:z.url)??"",J=((V=e==null?void 0:e.attributes)==null?void 0:V.title)??"";return((G=K==null?void 0:K.trim())==null?void 0:G.length)===0&&((Q=J==null?void 0:J.trim())==null?void 0:Q.length)===0?null:i.jsx(ls,{link:K==="home"?"/":Ci(K),title:J,linkTailwindClasses:r,linkActiveTailwindClasses:n})}}},ls=({link:e,title:t,linkTailwindClasses:r,linkActiveTailwindClasses:n})=>i.jsx(Wl,{to:`${e}`,className:({isActive:s})=>`focus:outline-none ${s?"text-primary":"text-navigation-text"}`,children:({isActive:s})=>i.jsx("div",{className:"hidden h-full lg:flex",children:i.jsx("div",{className:"flex justify-center h-full ml-8 space-x-8",children:i.jsx("div",{className:"relative flex items-center",children:i.jsx("span",{className:le("pt-px text-sm uppercase tracking-[2px] text-navigation-text hover:text-navigation-text-hover border-b-2 border-transparent hover:border-primary-500 hover:border-b-2",s?n:r),children:t})})})})}),n0=({storeName:e})=>{const{openAddressModal:t}=ul(),{ENV:r,siteNavigation:n}=Ie(),s=(n==null?void 0:n.logo)??null,o=r==null?void 0:r.STRAPI_URL,a=r==null?void 0:r.STRAPI_UPLOAD_URL,{src:l}=pt({image:(s==null?void 0:s.image)??null,strapiUrl:o,strapiUploadUrl:a,presetType:"original"}),c=d.useMemo(()=>{var f;return(f=n==null?void 0:n.data)==null?void 0:f.map(u=>{const{id:p=null,...h}=u??{id:null};return p==null?null:{id:p,attributes:{...h}}})},[n]);return i.jsxs(e0,{children:[i.jsxs("div",{className:"hidden lg:flex lg:items-center",children:[i.jsx("span",{className:"sr-only",children:e}),!!(s!=null&&s.image)&&i.jsx("div",{className:"max-w-[350px]",children:s!=null&&s.href?i.jsx(xe,{to:s.href,children:i.jsx("img",{src:l,alt:"Logo",className:le("w-full",s==null?void 0:s.tailwindClasses)})}):i.jsx(xe,{to:"/",className:"flex-shrink-0",children:i.jsx("img",{src:l,alt:"Logo",className:le("w-full",s==null?void 0:s.tailwindClasses)})})})]}),i.jsx(Zm,{navigationItems:c??[],logo:s,openDeliveryAddressModal:t}),i.jsx(t0,{navigationItems:[...c??[]]}),i.jsx(Ah,{}),i.jsx("div",{className:"hidden lg:flex justify-end",children:i.jsxs("div",{className:"flex items-center gap-4",children:[i.jsx(Fm,{}),i.jsx(jl,{})]})})]})},s0=e=>e.charAt(0).toUpperCase()+e.slice(1).toLowerCase(),o0=()=>{const e=Fe(),{selectedStore:t,openSelector:r}=Ue();return!e||!t?null:i.jsx("div",{className:"flex w-full py-2.5 px-4 justify-center items-center border-t border-address-set-border bg-address-set-background",children:i.jsxs("button",{type:"button",onClick:r,"aria-label":`Change store (currently ${t.storeName})`,title:"Change store",className:"group flex flex-col md:inline-flex md:flex-row md:items-center md:gap-2 rounded-2xl md:rounded-full px-3 py-1 text-center md:text-left hover:bg-address-set-icons/5 transition-colors cursor-pointer",children:[i.jsxs("span",{className:"inline-flex items-center justify-center gap-2 flex-wrap",children:[i.jsx(el,{className:"w-4 h-4 text-address-set-icons flex-shrink-0"}),i.jsx("span",{className:"text-xs md:text-sm text-gray-500",children:"Shopping at"}),i.jsx("span",{className:"text-sm md:text-base font-semibold text-address-set-text",children:t.storeName}),t.address&&i.jsxs("span",{className:"hidden md:inline-flex items-center gap-2",children:[i.jsx("span",{className:"text-gray-400",children:"·"}),i.jsxs("span",{className:"text-sm text-gray-500",children:[t.address.line1,", ",t.address.city,","," ",t.address.state]})]}),t.fulfillmentTypes.length>0&&i.jsxs("span",{className:"hidden md:inline-flex items-center gap-2",children:[i.jsx("span",{className:"text-gray-400",children:"·"}),i.jsx("span",{className:"text-xs md:text-sm text-gray-500",children:t.fulfillmentTypes.map(s0).join(" & ")})]}),!t.isOpen&&i.jsx("span",{className:"text-xs font-medium text-red-600 bg-red-50 px-2 py-0.5 rounded-full",children:"Closed"}),i.jsxs("span",{className:"ml-1 inline-flex items-center gap-0.5 text-xs md:text-sm font-medium text-address-set-icons group-hover:underline underline-offset-2",children:["Change",i.jsx(Ka,{className:"w-3.5 h-3.5 transition-transform group-hover:translate-y-0.5","aria-hidden":"true"})]})]}),t.address&&i.jsxs("span",{className:"md:hidden text-xs text-gray-500 mt-0.5",children:[t.address.city,", ",t.address.state]})]})})},i0=()=>Fe()?i.jsx(o0,{}):null,Il=d.createContext({isMobileHeaderRevealed:!1,setIsMobileHeaderRevealed:()=>{}}),a0=({children:e})=>{const[t,r]=d.useState(!1);return i.jsx(Il.Provider,{value:{isMobileHeaderRevealed:t,setIsMobileHeaderRevealed:r},children:e})},l0=()=>{const{isMobileHeaderRevealed:e,setIsMobileHeaderRevealed:t}=d.useContext(Il);return{isMobileHeaderRevealed:e,setIsMobileHeaderRevealed:t}}
81,c0=({storeName:e,announcementText:t,logo:r,isErrorHeader:n=!1})=>{const{scrollDir:s,scrollPosition:o}=xm({thr:20}),[a,l]=d.useState(!1),c=d.useRef(null),f=200,{setIsMobileHeaderRevealed:u}=l0();d.useEffect(()=>{const h=window.matchMedia("(max-width: 1024px)");l(h.matches);const v=g=>{l(g.matches)};return h.addEventListener("change",v),()=>{h.removeEventListener("change",v)}},[]),d.useEffect(()=>{if(!c.current)return;const h=()=>{var m;const g=(m=c.current)==null?void 0:m.offsetHeight;g&&document.documentElement.style.setProperty("--header-height",`${g}px`)};h();const v=new ResizeObserver(h);return v.observe(c.current),()=>{c.current&&v.unobserve(c.current),v.disconnect()}},[]);const p=d.useMemo(()=>a?{transform:s===Tt.Up&&o.top>f||o.top<f?"translateY(0)":`translateY(-${f}px)`}:{},[a,s,o.top,f]);return d.useEffect(()=>{a?p!=null&&p.transform&&(p==null?void 0:p.transform)===`translateY(-${f}px)`?u(!1):u(!0):u(!1)},[p,f]),i.jsxs("header",{ref:c,className:`${n?"":"fixed"} top-0 left-0 w-full z-10 shadow-md transition-transform border-b border-header-border`,"aria-label":"Header",style:{...p},children:[i.jsx(vm,{announcementText:t??""}),i.jsx(n0,{storeName:e??"",logo:r}),i.jsx(i0,{})]})},u0=()=>{var f;const{isOpen:e,toggleOpen:t}=go(),r=d.useRef(null),{loading:n,searchResults:s,searchTerm:o,onChange:a,onClear:l}=po(),c=(f=s==null?void 0:s.products)==null?void 0:f.products;return d.useEffect(()=>{var u,p;e?(u=r.current)==null||u.focus():(p=r.current)==null||p.blur()},[e]),i.jsx(pe.div,{initial:{opacity:0}
81,animate:{opacity:e?1:0},exit:{opacity:0},transition:{duration:.25},className:`lg:hidden ${e?"w-[100%] h-[100%]":"w-[0px]"} fixed left-0 top-0 z-[10] overflow-hidden bg-background`,children:i.jsxs("div",{className:"w-full p-4",children:[i.jsx("div",{className:"w-full mt",children:i.jsx("button",{className:"p-3 rounded-sm bg-search-panel-icon-background",onClick:()=>t(!1),children:i.jsx(Li,{className:"h-6 w-6",width:"3",strokeWidth:3})})}),i.jsx(fo,{ref:r,products:c,searchTerm:o,loading:n,onChange:a,onClear:l,onClose:()=>t(!1),inputUnderline:!0})]})})},d0=()=>{const[e,t]=d.useState(!1),[r,n]=d.useState({overflow:"",position:"",width:"",height:"",top:""}),s=()=>({x:window.pageXOffset||window.scrollX,y:window.pageYOffset||window.scrollY}),o=d.useCallback(()=>{if(!e){const l=s(),c={overflow:document.body.style.overflow,position:document.body.style.position,width:document.body.style.width,height:document.body.style.height,top:document.body.style.top};n(c),document.body.style.overflow="hidden",document.body.style.position="fixed",document.body.style.width="100%",document.body.style.height="100%",document.body.style.top=`-${l.y}px`,t(!0)}},[e]),a=d.useCallback(()=>{if(e){const l=parseInt(document.body.style.top||"0",10)*-1;document.body.style.overflow=r.overflow,document.body.style.position=r.position,document.body.style.width=r.width,document.body.style.height=r.height,document.body.style.top=r.top,window.scrollTo(0,l),t(!1)}},[e,r]);return d.useEffect(()=>()=>{a()},[a]),{lockScroll:o,unlockScroll:a,isLocked:e}},f0=()=>{var r,n;const{promo:e,setShow:t}=ho()??{promo:null};return(e==null?void 0:e.uuid)==null||!(e!=null&&e.allowFloat)||e!=null&&e.previewText&&((n=(r=e==null?void 0:e.previewText)==null?void 0:r.trim())==null?void 0:n.length)<1?null:i.jsx("div",{className:"fixed bottom-4 right-4 shadow-md z-[1]",children:i.jsx("button",{className:"px-6 p-4 bg-primary-500",onClick:()=>{t==null||t(!0)},children:i.jsx("p",{className:"text-background font-bold",children:e==null?void 0:e.previewText})})})};async function nn(e){const t=e.trim().toLowerCase();if(t){if(typeof crypto>"u"||!crypto.subtle){console.warn("[hash-pii] crypto.subtle unavailable; PII will not be hashed");return}try{const n=new TextEncoder().encode(t),s=await crypto.subtle.digest("SHA-256",n);return Array.from(new Uint8Array(s)).map(a=>a.toString(16).padStart(2,"0")).join("")}catch(r){console.warn("[hash-pii] SHA-256 hashing failed:",r);return}}}async function p0(e){const t={};if(e.email_address){const r=await nn(e.email_address);r&&(t.sha256_email_address=r)}if(e.phone_number){const r=await nn(e.phone_number);r&&(t.sha256_phone_number=r)}if(e.address){const r={};if(e.address.first_name){const n=await nn(e.address.first_name);n&&(r.sha256_first_name=n)}if(e.address.last_name){const n=await nn(e.address.last_name);n&&(r.sha256_last_name=n)}e.address.street&&(r.street=e.address.street),e.address.city&&(r.city=e.address.city),e.address.region&&(r.region=e.address.region),e.address.postal_code&&(r.postal_code=e.address.postal_code),e.address.country&&(r.country=e.address.country),Object.keys(r).length>0&&(t.address=r)}return t}const h0=({children:e})=>{const{siteConfigs:t}=Ie(),{isOpen:r}=go(),{lockScroll:n,unlockScroll:s}=d0(),o=Ie(),{customer:a}=o,l=(t==null?void 0:t.announcementText)??"",c=t==null?void 0:t.logo,f=(t==null?void 0:t.storeName)??"";return d.useEffect(()=>{r?n():s()},[r]),d.useEffect(()=>{if(!(a!=null&&a.email))return;let p=!1;return p0({email_address:a.email,address:{first_name:a.firstName??"",last_name:a.lastName??""}}).then(h=>{p||cr({event:"userDataReady",user_data:h})}).catch(h=>{console.warn("[Layout] Failed to hash user data for GTM:",h),p||cr({event:"userDataReady"})}),()=>{p=!0}},[a]),i.jsxs("div",{children:[i.jsxs("div",{className:`bg-background pt-[var(--header-height,5rem)] ${r?"h-[50px]":""}`,children:[i.jsx(c0,{announcementText:l,logo:c,storeName:f}),e,i.jsx(ym,{})]}),i.jsx(u0,{}),i.jsx(f0,{})]})},m0=["PRESET","CUSTOM"],g0=Vr.object({presetTipIndex:Vr.number(),customTip:Vr.number(),tipType:Vr.enum(m0)}),y0=e=>{const t=g0.safeParse(e);return t.success?{isValid:!0,errors:[]}:{isValid:!1,errors:t.error.errors.map(r=>({field:r.path.join("."),message:r.message}))}},x0=()=>({updatePresetIndex:o=>{if(window&&window.localStorage){const a=JSON.parse(window.localStorage.getItem("tipDetails")??"{}");a.presetTipIndex=o,window.localStorage.setItem("tipDetails",JSON.stringify(a))}},updateCustomTip:o=>
81{if(window&&window.localStorage){const a=JSON.parse(window.localStorage.getItem("tipDetails")??"{}");a.customTip=o,window.localStorage.setItem("tipDetails",JSON.stringify(a))}},updateTipType:o=>{if(window&&window.localStorage){const a=JSON.parse(window.localStorage.getItem("tipDetails")??"{}");a.tipType=o?"CUSTOM":"PRESET",window.localStorage.setItem("tipDetails",JSON.stringify(a))}},destroyTipDetails:()=>{window&&window.localStorage&&window.localStorage.removeItem("tipDetails")},checkValidTipDetails:()=>window&&window.localStorage?y0(JSON.parse(window.localStorage.getItem("tipDetails")??"{}")).isValid:!1}),v0=()=>{const[e,t]=d.useState({loading:!1,error:null,coordinates:null}),r=d.useCallback(()=>{t(s=>s.error?{...s,error:null}:s)},[]);d.useEffect(()=>{if(!e.error)return;const s=setTimeout(r,6e3);return()=>clearTimeout(s)},[e.error,r]);const n=d.useCallback(()=>{if(!navigator.geolocation){t(s=>({...s,error:"Geolocation not supported"}));return}t(s=>({...s,loading:!0,error:null})),navigator.geolocation.getCurrentPosition(s=>{t({loading:!1,error:null,coordinates:{latitude:s.coords.latitude,longitude:s.coords.longitude}})},s=>{let o;switch(s.code){case 1:o="Location access was denied. You can enter your address instead.";break;case 2:o="Unable to determine your location";break;case 3:o="Location request timed out";break;default:o="Unable to determine your location"}t({loading:!1,error:o,coordinates:null})},{enableHighAccuracy:!1,timeout:1e4,maximumAge:3e5})},[]);return{...e,requestLocation:n,clearError:r}},b0=({store:e,isSelected:t,onSelect:r,animationDelay:n})=>{const s=n!==void 0;return i.jsxs("button",{type:"button",onClick:()=>r(e),className:le("w-full rounded-lg border p-4 text-left transition-all active:scale-[0.98] duration-100",t?"border-l-4 border-l-blue-500 border-blue-500 bg-blue-50":"border-gray-200 hover:border-gray-300 hover:shadow-sm",s&&"opacity-0 motion-safe:animate-slide-up"),style:s?{animationDelay:`${n}ms`}:void 0,children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[i.jsx("span",{className:"text-sm font-semibold text-gray-900",children:e.storeName}),t&&i.jsx("span",{className:"flex items-center justify-center w-5 h-5 rounded-full bg-blue-500 text-white animate-badge-bounce",children:i.jsx(Fp,{className:"h-3 w-3"})})]}),e.distanceMiles!=null&&i.jsxs("span",{className:"flex-shrink-0 text-xs text-gray-500",children:[e.distanceMiles.toFixed(1)," mi"]})]}),i.jsxs("p",{className:"mt-1 text-xs text-gray-500",children:[e.address.line1,", ",e.address.city,", ",e.address.state," ",e.address.zip]}),i.jsxs("div",{className:"mt-2.5 flex items-center justify-between gap-2",children:[i.jsxs("div",{className:"flex items-center gap-2",children:[e.isOpen?i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-emerald-500"}),i.jsx("span",{className:"text-xs font-medium text-emerald-600",children:"Open"})]}):i.jsxs("span",{className:"inline-flex items-center gap-1",children:[i.jsx("span",{className:"h-1.5 w-1.5 rounded-full bg-red-400"}),i.jsx("span",{className:"text-xs font-medium text-red-500",children:"Closed"})]}),e.fulfillmentTypes.length>0?i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-gray-300","aria-hidden":"true",children:"·"}),i.jsx("div",{className:"flex flex-wrap gap-1",children:e.fulfillmentTypes.map(o=>i.jsx("span",{className:"rounded-full bg-gray-100 px-2 py-0.5 text-[11px] font-medium text-gray-600",children:o.charAt(0).toUpperCase()+o.slice(1).toLowerCase()},o))})]}):i.jsxs(i.Fragment,{children:[i.jsx("span",{className:"text-gray-300","aria-hidden":"true",children:"·"}),i.jsx("span",{className:"text-[11px] font-medium text-gray-400",children:"Contact store"})]})]}),!t&&i.jsx("span",{className:"text-sm font-medium text-blue-600",children:"Select"})]})]})},br=({width:e,height:t="h-3"})=>i.jsx("div",{className:le("rounded",t,e,"bg-gray-200 motion-safe:animate-store-shimmer"),style:{backgroundImage:"linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.5) 50%, transparent 100%)",backgroundSize:"200% 100%"}}),cs=({className:e})=>i.jsxs("div",{className:le("w-full rounded-lg border border-gray-200 p-4",e),"aria-hidden":"true",children:[i.jsxs("div",{className:"flex items-start justify-between gap-2",children:[i.jsx(br,{width:"w-[155px]",height:"h-4"}),i.jsx(br,{width:"w-[38px]",height:"h-3"})]}),i.jsx("div",{className:"mt-2",children:i.jsx(br,{width:"w-[200px]"})}),i.jsxs("div",{className:"mt-3 flex gap-1",children:[i.jsx(br,{width:"w-[60px]",height:"h-5"}),i.jsx(br,{width:"w-[52px]",height:"h-5"})]})]}),w0=({className:e,style:t})=>i.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"
81currentColor",className:e,style:t,"aria-hidden":"true",children:i.jsx("path",{fillRule:"evenodd",d:"m11.54 22.351.07.04.028.016a.76.76 0 0 0 .723 0l.028-.015.071-.041a16.975 16.975 0 0 0 1.144-.742 19.58 19.58 0 0 0 2.683-2.282c1.944-1.99 3.963-4.98 3.963-8.827a8.25 8.25 0 0 0-16.5 0c0 3.846 2.02 6.837 3.963 8.827a19.58 19.58 0 0 0 3.69 2.92l.137.093.054.034Zm.617-16.228a4.125 4.125 0 1 0 0 8.25 4.125 4.125 0 0 0 0-8.25Z",clipRule:"evenodd"})}),_0=()=>i.jsxs("div",{className:"flex items-center gap-2.5 py-3",role:"status","aria-busy":"true",children:[i.jsx("span",{className:"sr-only",children:"Loading nearby stores"}),i.jsx("div",{className:"flex items-center gap-1","aria-hidden":"true",children:[0,1,2].map(e=>i.jsx(w0,{className:"h-4 w-4 text-blue-500 motion-safe:animate-pin-bounce",style:{animationDelay:`${e*120}ms`}},e))}),i.jsx("span",{className:"text-sm font-medium text-gray-500",children:"Searching nearby stores..."})]}),S0=()=>{const e=Fe(),{isSelectorOpen:t,closeSelector:r,selectedStore:n,coordinates:s,setCoordinates:o}=Ue(),{requestStoreSwitch:a,warningState:l,confirmSwitch:c,cancelSwitch:f}=sl(),{coordinates:u,loading:p,error:h,requestLocation:v,clearError:g}=v0(),{stores:m,loading:y,error:C,fetchStores:I,fetchAllStores:S,prefetch:k}=bl(),[O,w]=d.useState(!1),T=d.useRef(null),b=d.useRef(!1);d.useEffect(()=>(y?(w(!0),b.current=!0,T.current&&clearTimeout(T.current)):b.current&&(b.current=!1,T.current=setTimeout(()=>w(!1),600)),()=>{T.current&&clearTimeout(T.current)}),[y]);const[_,x]=d.useState(""),[j,M]=d.useState([]),[$,L]=d.useState(!1),P=ih(),R=d.useRef(!1);d.useEffect(()=>{if(!t){R.current=!1;return}R.current||(R.current=!0,s?k(s):S())},[t]),d.useEffect(()=>{s&&k(s)},[s]),d.useEffect(()=>{u&&(o(u),k(u))},[u]),d.useEffect(()=>{if($&&_.length>2){const Z=setTimeout(()=>{const te=new FormData;te.set("address-search",_),fetch("/api/addresses/search",{method:"POST",body:te}).then(q=>{if(!q.ok)throw new Error(`Address search failed (${q.status})`);return q.json()}).then(q=>{M((q==null?void 0:q.data)??[])}).catch(()=>{M([])}),L(!1)},250);return()=>clearTimeout(Z)}},[_,$]);const H=d.useRef(null),Y=d.useRef(0),z=d.useRef(0),V=d.useCallback(Z=>{Y.current=Z.touches[0].clientY,z.current=0,H.current&&(H.current.style.transition="none")},[]),G=d.useCallback(Z=>{const te=Z.touches[0].clientY-Y.current;te>0&&(z.current=te,H.current&&(H.current.style.transform=`translateY(${te}px)`))},[]),Q=d.useCallback(()=>{H.current&&(z.current>150?r():(H.current.style.transition="transform 200ms ease-out",H.current.style.transform="translateY(0)")),z.current=0},[r]);if(!e)return null;const K=Z=>{var te,q;if(g(),((te=Z.coordinates)==null?void 0:te.latitude)!=null&&((q=Z.coordinates)==null?void 0:q.longitude)!=null){const E={latitude:Z.coordinates.latitude,longitude:Z.coordinates.longitude};o(E),I(E)}M([]),x(`${Z.line1}, ${Z.city}, ${Z.state} ${Z.zip}`)},J=Z=>{a({storeId:Z.storeID,storeName:Z.storeName,fulfillmentTypes:Z.fulfillmentTypes,isOpen:Z.isOpen,address:Z.address}),r()},ue=i.jsxs(i.Fragment,{children:[P&&i.jsx("div",{className:"flex justify-center pt-3 pb-1",style:{touchAction:"none"},onTouchStart:V,onTouchMove:G,onTouchEnd:Q,children:i.jsx("div",{className:"w-10 h-1 rounded-full bg-gray-300"})}),i.jsxs("div",{className:"border-b border-gray-200 px-4 py-4",children:[i.jsxs("div",{className:"flex items-center justify-between",children:[i.jsx(Te.Title,{className:"text-lg font-semibold",children:"Select a Store"}),i.jsx("button",{type:"button",onClick:r,className:"rounded-md p-1 hover:bg-gray-100","aria-label":"Close store selector",children:i.jsx($r,{className:"h-5 w-5 text-gray-500"})})]}),i.jsx("p",{className:"mt-1 text-xs text-gray-400",children:"Choose a location for local pricing and availability"}),i.jsxs("div",{className:"mt-3 flex gap-2",children:[i.jsxs("div",{className:"relative flex-1",children:[i.jsx(Fn,{className:"absolute left-3 top-2.5 h-4 w-4 text-gray-400"}),i.jsx("input",{type:"text",placeholder:"Search by address to sort by distance...",value:_,onChange:Z=>{g(),x(Z.target.value),L(!0)},className:"w-full rounded-lg border border-gray-300 py-2 pl-9 pr-3 text-sm focus:border-blue-500 focus:outline-none focus:ring-1 focus:ring-blue-500"}),j.length>0&&i.jsx("div",{className:"absolute left-0 right-0 top-full z-10 mt-1 max-h-48 overflow-y-auto rounded-lg border border-gray-200 bg-white shadow-lg",children:j.filter(Z=>{var te;return!isNaN(Number((te=Z==null?void 0:Z.line1)==null?void 0:te[0]))}).map((Z,te)=>i.jsxs("button",{type:"button",onClick:()=>K(Z),className:"w-full px-3 py-2 text-left text-sm hover:bg-gray-50",children:[i.jsx("span",{className:"font-medium",children:Z.line1}),i.jsxs("span",{className:"text-gray-500",children:[", ",Z.city,", ",Z.state," ",Z.zip]})]},`${te}-${Z.line1}-${Z.city}`))})]}),i.jsx("button",{type:"button",onClick:v,disabled:p||y,title:"Use my location","aria-label":"Use my location",className:le("rounded-lg border border-gray-300 p-2 hover:bg-gray-50",(p||y)&&"cursor-wait opacity-50"),children:i.jsx(so,{className:"h-5 w-5 text-gray-600"})})]}),h&&i.jsx("p",{className:"mt-2 text-xs text-red-600",children:h})]}),i.jsx("div",{className:"flex-1 space-y-3 overflow-y-auto px-4 py-3",children:O?i.jsxs("div",{children:[i.jsx(_0,{}),i.jsxs("div",{className:"space-y-3",children:[i.jsx(cs,{}),i.jsx(cs,{}),!P&&i.jsx(cs,{className:"opacity-50"})]})]}):m.length===0?i.jsx("div",{className:"py-8 text-center text-sm text-gray-500",children:C?"Unable to load stores. Please try again.":"No stores available."}):i.jsxs(i.Fragment,{children:[i.jsxs("p",{className:"text-xs font-medium text-gray-400 motion-safe:animate-slide-up","aria-live":"polite",children:[m.length," ",m.length===1?"store":"stores"]}),m.map((Z,te)=>i.jsx(b0,{store:Z,isSelected:(n==null?void 0:n.storeId)===Z.storeID,onSelect:J,animationDelay:te*80},Z.storeID))]})})]});return i.jsxs(i.Fragment,{children:[i.jsx(jm,{warningState:l,onConfirm:c,onCancel:f}),i.jsx(he,{appear:!0,show:t,as:d.Fragment,children:i.jsxs(Te,{as:"div",className:"relative z-50",onClose:r,children:[i.jsx(he.Child,{as:d.Fragment,enter:"ease-out duration-300",enterFrom:"opacity-0",enterTo:"opacity-100",leave:"ease-in duration-200",leaveFrom:"opacity-100",leaveTo:"opacity-0",children:i.jsx("div",{className:"fixed inset-0 bg-black/25"})}),i.jsx("div",{className:"fixed inset-0 overflow-hidden",children:i.jsx("div",{className:"absolute inset-0 overflow-hidden",children:P?i.jsx(he.Child,{as:d.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-y-full",enterTo:"translate-y-0",leave:"transform transition ease-in-out duration-200",leaveFrom:"translate-y-0",leaveTo:"translate-y-full",children:i.jsx(Te.Panel,{ref:H,className:"fixed inset-x-0 bottom-0 flex h-[85vh] flex-col rounded-t-2xl bg-white shadow-xl",children:ue})}):i.jsx("div",{className:"fixed inset-y-0 right-0 flex max-w-full pl-10",children:i.jsx(he.Child,{as:d.Fragment,enter:"transform transition ease-in-out duration-300",enterFrom:"translate-x-full",enterTo:"translate-x-0",leave:"transform transition ease-in-out duration-200",leaveFrom:"translate-x-0",leaveTo:"translate-x-full",children:i.jsx(Te.Panel,{className:"flex h-full w-screen max-w-md flex-col bg-white shadow-xl",children:ue})})})})})]})})]})},N0=()=>{const e=Fe(),{selectedStore:t}=Ue(),{dormantCarts:r,hasDormantCarts:n,isPillReady:s,restoreCart:o,isRestoring:a}=_l();if(!e||!n||!s||t)return null;const l=r[0];return i.jsx("div",{className:"md:hidden fixed bottom-0 left-0 right-0 z-[3] motion-safe:animate-pill-in motion-reduce:animate-none",style:{paddingBottom:"env(safe-area-inset-bottom)"},children:i.jsxs("button",{type:"button",onClick:()=>o(l),disabled:a,"aria-label":`Resume saved cart at ${l.storeName}`,className:"flex w-full items-center justify-between bg-navigation-background/95 backdrop-blur-xl border-t border-white/[0.12] shadow-pill disabled:opacity-50 disabled:cursor-wait",children:[i.jsxs("div",{className:"flex items-center gap-2.5 px-4 py-3 min-w-0 flex-1",children:[i.jsx("span",{className:"w-2 h-2 rounded-full bg-cta-primary-500 flex-shrink-0","aria-hidden":"true"}),i.jsx("span",{className:"text-navigation-text text-[13px] font-medium truncate",children:l.storeName}),i.jsx("span",{className:"text-muted-foreground flex-shrink-0","aria-hidden":"true",children:"·"}),i.jsx("span",{className:"text-muted-foreground text-xs flex-shrink-0",children:l.subtotal})]}),i.jsx("span",{className:"flex-shrink-0 text-cta-primary-500 text-[13px] font-bold px-4 py-3",children:"Resume"})]})})};var Ss=(e=>(e.COMPONENT_LAYOUT_PROMOS="ComponentLayoutPromos",e.COMPONENT_LAYOUT_CATERING_FORM="ComponentLayoutCateringForm",e.COMPONENT_LAYOUT_IMAGE_CAROUSEL="ComponentLayoutImageCarousel",e.COMPONENT_LAYOUT_FEATURED_COLLECTION="ComponentLayoutFeaturedCollection",e.COMPONENT_LAYOUT_HERO_CAROUSEL="ComponentLayoutHeroCarousel",e.COMPONENT_LAYOUT_GRI
81D_IMAGES="ComponentLayoutGridImages",e.COMPONENT_LAYOUT_HERO_SPLIT="ComponentLayoutHeroSplit",e.COMPONENT_LAYOUT_SUB_NAVIGATION="ComponentLayoutSubNavigation",e.COMPONENT_LAYOUT_FEATURED_COLLECTION_GRID="ComponentLayoutFeaturedCollectionGrid",e.COMPONENT_LAYOUT_ITEM_IMAGE_SLIDER="ComponentLayoutItemImageSlider",e))(Ss||{});function j0(e,t,r){if(!e||!Array.isArray(e))return[];const n=[];return e.forEach(s=>{var o,a,l,c,f,u;switch(s.__typename){case"ComponentUiComponentsHeroBanner":{const p=(o=s==null?void 0:s.backgroundImage)==null?void 0:o.image;if((l=(a=p==null?void 0:p.data)==null?void 0:a.attributes)!=null&&l.url){const h=pt({image:p,strapiUploadUrl:r,strapiUrl:t,presetType:"large"});h!=null&&h.src&&n.push({src:h.src,srcset:h.srcset,sizes:h.sizes,type:p.data.attributes.mime||"image/jpeg"})}break}case"ComponentUiComponentsHeroCarousel":{((s==null?void 0:s.slides)||[]).forEach(h=>{var g,m,y;const v=(g=h==null?void 0:h.backgroundImage)==null?void 0:g.image;if((y=(m=v==null?void 0:v.data)==null?void 0:m.attributes)!=null&&y.url){const C=pt({image:v,strapiUploadUrl:r,strapiUrl:t,presetType:"large"});C!=null&&C.src&&n.push({src:C.src,srcset:C.srcset,sizes:C.sizes,type:v.data.attributes.mime||"image/jpeg"})}});break}case Ss.COMPONENT_LAYOUT_HERO_CAROUSEL:{((s==null?void 0:s.slides)||[]).forEach(h=>{var g,m,y,C;const v=(g=h==null?void 0:h.backgroundImage)==null?void 0:g.image;if((y=(m=v==null?void 0:v.data)==null?void 0:m.attributes)!=null&&y.url&&!((C=v.data.attributes.mime)!=null&&C.includes("video"))){const I=pt({image:v,strapiUploadUrl:r,strapiUrl:t,presetType:"large"});I!=null&&I.src&&n.push({src:I.src,srcset:I.srcset,sizes:I.sizes,type:v.data.attributes.mime||"image/jpeg"})}});break}case Ss.COMPONENT_LAYOUT_HERO_SPLIT:{const p=(c=s==null?void 0:s.image)==null?void 0:c.image;if((u=(f=p==null?void 0:p.data)==null?void 0:f.attributes)!=null&&u.url){const h=pt({image:p,strapiUploadUrl:r,strapiUrl:t,presetType:"large"});h!=null&&h.src&&n.push({src:h.src,srcset:h.srcset,sizes:h.sizes,type:p.data.attributes.mime||"image/jpeg"})}break}}}),n.slice(0,3)}function C0(e={}){const{enabled:t=!0,maxImages:r=1,priority:n="high"}=e,s=Cs(),o=d.useRef(new Set);return d.useEffect(()=>{if(!t)return;const a=s.find(h=>h.id==="root"),l=a==null?void 0:a.data;if(!(l!=null&&l.ENV))return;const c=l.ENV.STRAPI_URL,f=l.ENV.STRAPI_UPLOAD_URL;if(!c||!f)return;const u=[];s.forEach(h=>{const v=h.data;if(v!=null&&v.pageContent){const g=j0(v.pageContent,c,f);u.push(...g)}}),u.slice(0,r).forEach((h,v)=>{if(!h.src||o.current.has(h.src))return;o.current.add(h.src);const g=new Image;h.srcset&&(g.srcset=h.srcset,h.sizes&&(g.sizes=h.sizes)),v===0&&n==="high"&&(g.loading="eager",g.fetchPriority="high"),g.src=h.src;const m=document.createElement("link");m.rel="preload",m.as="image",m.href=h.src,h.type&&(m.type=h.type),v===0&&n==="high"&&m.setAttribute("fetchpriority","high"),document.querySelector(`link[rel="preload"][href="${h.src}"]`)||document.head.appendChild(m)})},[s,t,r,n]),{preloadedCount:o.current.size,preloadedUrls:Array.from(o.current)}}const E0="/assets/swiper-bundle.min-BwYzHBUD.css",k0="/assets/tailwind-c9Uizt3Z.css",I0="/assets/global-BJquoDhZ.css",ag=()=>[{rel:"shortcut icon",href:"/favicon.ico"},{rel:"stylesheet",href:E0},{rel:"stylesheet",href:k0},{rel:"stylesheet",href:I0},{rel:"preconnect",href:"https://fonts.googleapis.com"},{rel:"preconnect",href:"https://fonts.gstatic.com",crossOrigin:"anonymous"},{rel:"stylesheet",href:"https://fonts.googleapis.com/css2?family=Bricolage+Grotesque:opsz,[email protected],200..800&display=swap"}],lg=({data:e})=>e?[{name:"sentry-trace",content:e.sentryTrace},{name:"baggage",content:e.sentryBaggage}]:[],Ie=()=>{const[e]=Cs(),{data:t}=e,{ENV:r,isLoggedIn:n,isAnonymous:s}=t;return typeof window<"u"&&(localStorage.setItem("ENV",JSON.stringify(r)),localStorage.setItem("isLoggedIn",JSON.stringify(n)),localStorage.setItem("isAnonymous",JSON.stringify(s))),e==null?void 0:e.data};function M0(){const e=Nt(),t=d.useRef(e.pathname);return d.useEffect(()=>{t.current=e.pathname},[e]),t.current}function T0(){const{ENV:e,authorized:t,uiTheme:r,siteConfigs:n}=Ie(),s=(r==null?void 0:r.themeName)??"lux",o=Cs(),a=o.some(O=>O.id.includes("routes/checkout")),l=o.some(O=>O.id.includes("routes/_kiosk")),c=Nt();C0({enabled:!0,maxImages:1,priority:"high"});const f=/^\/(?:collections\/[^/]+\/[^/]+|products\/[^/]+)/.test(c.pathname),u=M0(),p=js(),h=St(),v=d.useRef(c.pathname+c.search);d.useEffect(()=>{const O=c.pathname+c.search;if(O===v.current)return;v.current=O;const w=requestAnimationFrame(()=>{cr({event:"page_view",page_location:window.location.href,page_title:document.title})});return()=>cancelAnimationFrame(w)},[c.pathname,c.search]);const{load:g}=tt({key:"carts"});d.useEffect(()=>{u==="/login"&&(console.log("re-loaded carts"),g("/cart"))},[u,g]);
81const{destroyTipDetails:m,checkValidTipDetails:y}=x0();d.useEffect(()=>{const O=y();!a&&O&&m()},[a]);const C=e==null?void 0:e.MIXPANEL_TOKEN;d.useEffect(()=>{!p&&(C!=null&&C.length)&&ze.init(C??"",{debug:!0,track_pageview:!0,persistence:"localStorage",record_sessions_percent:2})},[p,C]),d.useEffect(()=>{(async()=>{if(typeof window>"u")return;await er.authStateReady();const b=(await(await fetch("/api/auth/check-cookie",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}})).json()).firebaseSessionToken!==null;try{const _=er.currentUser;if(!b&&_&&(console.log("Signing out current user",_.uid),await er.signOut(),await fetch("/api/cart/clear",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"}}),h(".",{replace:!0,relative:"path"})),!_){const{user:x}=await Vl(er);Dl(x.uid);const j=await Ql(x,!0);(await fetch("/api/auth/update-token",{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded"},body:new URLSearchParams({token:j,action:"recovery"})})).ok?console.log("Anonymous session cookie created successfully",new Date().toISOString()):console.error("Failed to create anonymous session cookie",new Date().toISOString())}}catch(_){console.error("Session recovery failed:",_,new Date().toISOString())}})()},[c.pathname,h]);const I=d.useMemo(()=>{const O=(n==null?void 0:n.ldjson)??{};return Object.entries(O).map(([w,T],b)=>i.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(T)}},`${b}-ldjson-${w}`))},[n==null?void 0:n.ldjson]),S=d.useMemo(()=>{const O=(r==null?void 0:r.fontConfig)??{},w=new Set;return Object.entries(O).filter(([,T])=>!(T!=null&&T.href)||w.has(T.href)?!1:(w.add(T.href),!0)).map(([T,b])=>i.jsx("link",{rel:"stylesheet",href:b.href},`font-${T}`))},[r==null?void 0:r.fontConfig]),k=o.some(O=>O.id.includes("routes/maintenance"));return!t||k?i.jsxs("html",{lang:"en","data-theme":s,children:[i.jsxs("head",{children:[i.jsx(Ao,{}),S,i.jsx(Ro,{}),i.jsx("link",{rel:"stylesheet",href:r}),i.jsx("meta",{charSet:"utf-8"}),i.jsx("meta",{name:"viewport",content:"width=device-width, initial-scale=1"}),I]}),i.jsxs("body",{children:[i.jsx(Wn,{}),i.jsx(Lo,{})]})]}):i.jsx(d.StrictMode,{children:i.jsxs("html",{lang:"en","data-theme":s,children:[i.jsxs("head",{children:[i.jsx("meta",{charSet:"utf-8"}),i.jsx("meta",{name:"viewport",content:`width=device-width, initial-scale=1${l?", maximum-scale=1, user-scalable=no, viewport-fit=cover":""}`}),I,i.jsx(Ro,{}),i.jsx(Ao,{}),S,(e==null?void 0:e.GTM_ID)&&i.jsx("script",{id:"consent-default",dangerouslySetInnerHTML:{__html:"window.dataLayer=window.dataLayer||[];function gtag(){dataLayer.push(arguments);}gtag('consent','default',{'ad_storage':'denied','ad_user_data':'denied','ad_personalization':'denied','analytics_storage':'denied','url_passthrough':true,'ads_data_redaction':true,'wait_for_update':500,'region':['AT','BE','BG','CY','CZ','DE','DK','EE','ES','FI','FR','GR','HR','HU','IE','IT','LT','LU','LV','MT','NL','PL','PT','RO','SE','SI','SK','GB','IS','LI','NO']});gtag('consent','default',{'ad_storage':'granted','ad_user_data':'granted','ad_personalization':'granted','analytics_storage':'granted','url_passthrough':true,'ads_data_redaction':true});if(navigator.globalPrivacyControl){gtag('consent','update',{'ad_storage':'denied','ad_user_data':'denied','ad_personalization':'denied'});}try{var c=localStorage.getItem('cookie_consent');if(c){var p=JSON.parse(c);gtag('consent','update',{'ad_storage':p.advertising?'granted':'denied','ad_user_data':p.advertising?'granted':'denied','ad_personalization':p.advertising?'granted':'denied','analytics_storage':p.performance?'granted':'denied'});}}catch(e){console.warn('[consent-init]',e);try{localStorage.removeItem('cookie_consent');}catch(r){}}"}}),(e==null?void 0:e.GTM_ID)&&i.jsx("script",{id:"gtag-init",dangerouslySetInnerHTML:{__html:`(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': 82new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], 83j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
84'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); 85})(window,document,'script','dataLayer','${e==null?void 0:e.GTM_ID}');`}})]}),i.jsx(zm,{children:i.jsx(a0,{children:i.jsxs("body",{children:[i.jsx(Qp,{}),i.jsxs(Tl,{children:[(e==null?void 0:e.GTM_ID)&&i.jsx("noscript",{children:i.jsx("iframe",{src:`https://www.googletagmanager.com/ns.html?id=${e.GTM_ID}`,height:"0",width:"0",style:{display:"none",visibility:"hidden"},title:"Google Tag Manager"})}),i.jsx(qu,{children:i.jsxs(Ol,{children:[i.jsx(S0,{}),i.jsx(Rh,{children:i.jsx(Bh,{children:a||l?i.jsx(Wn,{}):i.jsx(Fh,{children:i.jsxs(h0,{children:[i.jsx(Wn,{}),!f&&i.jsx(Im,{}),i.jsx(N0,{})]})})})})]})})]}),i.jsx(Zl,{getKey:O=>O.pathname.includes("/collections/")?O.pathname+O.search:O.key}),i.jsx("script",{dangerouslySetInnerHTML:{__html:`window.ENV = ${JSON.stringify(e)}`}}),i.jsx(Lo,{})]})})})]})})}const cg=Kl(T0);export{nm as $,rh as A,sl as B,Mt as C,vl as D,xl as E,lo as F,jm as G,Ja as H,Am as I,qh as J,zh as K,Zh as L,Rh as M,uo as N,em as O,el as P,Lt as Q,Ka as R,og as S,he as T,Em as U,bm as V,ur as W,Jp as X,ao as Y,_l as Z,gm as _,oo as a,rm as a0,ah as a1,Fp as a2,ot as a3,Re as a4,mt as a5,Ne as a6,Ee as a7,Yu as a8,ee as a9,xh as aA,bh as aB,wh as aC,rg as aD,nl as aE,ul as aF,_p as aG,ol as aH,ig as aI,xm as aJ,l0 as aK,Tt as aL,ll as aM,Mh as aN,Ss as aO,ve as aa,zs as ab,On as ac,Tn as ad,pr as ae,Vs as af,Ce as ag,fd as ah,$t as ai,_t as aj,gs as ak,Se as al,$e as am,Ws as an,mr as ao,qr as ap,Sf as aq,rd as ar,st as as,me as at,Wr as au,at as av,dd as aw,Na as ax,hi as ay,th as az,io as b,ih as c,ch as d,lh as e,sg as f,cr as g,j0 as h,ng as i,Za as j,Rr as k,ag as l,lg as m,tg as n,p0 as o,pt as p,rn as q,cg as r,zt as s,Oh as t,Ie as u,Fe as v,bl as w,yl as x,Nm as y,Ue as z};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.