(()=>{(()=>{var j={72087(o,u,a){"use strict";a.r(u),a.d(u,{getCookie:()=>g,setCookie:()=>v});function g(h){let t=h+"=",s=decodeURIComponent(document.cookie).split(";");for(let m=0;m<s.length;m++){let n=s[m].trim();if(n.indexOf(t)==0)return n.substring(t.length,n.length)}return null}function v(h,t,r){r=r||{};let s=r.domain,m=r.expiresIn||31*1e3*3600*24,n=r.path||"/";const f=new Date;f.setTime(f.getTime()+m);let S="; expires="+f.toUTCString(),C=s!=null?"; domain="+s:"",b=n!=null?"; path="+n:"";document.cookie=h+"="+t+S+b+C}},25187(o){function u(){return new URLSearchParams(window.location.search).get("profiling")==="1"}o.exports.start=function(a){u()&&performance.mark(`${a}-start`)},o.exports.end=function(a){if(u())try{performance.mark(`${a}-end`);const g=performance.measure(a,`${a}-start`,`${a}-end`);console.log(`Profiling result (${a}):`,g)}catch(g){console.log("Error profiling",g)}}},22914(o,u,a){"use strict";a.r(u),a.d(u,{getAPIServerEndpoint:()=>v,getServerEndpoint:()=>g});function g(h){if(!h)return"";let t=new URL(h),r=`${t.protocol}//${t.host}`;return r.match("snapppt")&&(r=r.replace("snapppt","app.addsauce")),r}function v(h){let t=g(h);return t.includes(".melon.")||t.includes("recomelon.com")?t:t.replace("app.","client.")}},11581(o,u,a){const g=a(72087),v="snpt-tracking-v2-session",h="snpt_sess",t=744*60*60*1e3,r="snpt_visit",s=14400*1e3,m={};function n(){return window.location.search.includes("tracking=true")?!1:window.location.hostname==="app.addsauce.com"||window.location.hostname==="app.addsauce.test"}function f(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(I){var p=Math.random()*16|0,x=I==="x"?p:p&3|8;return x.toString(16)})}function S(){return typeof crypto.randomUUID=="function"?crypto.randomUUID():f()}async function C(I,p){if(p==null&&(p=window.location.hostname),p==="")return null;if(m[p])return m[p];try{let T=localStorage.getItem(`root_domain[${p}]`);if(T)return T}catch(T){console.log("Unable to get cached root domain",T)}let x=new AbortController,N=5*1e3,R=setTimeout(()=>x.abort(),N);try{let T=`${I}/root_domain?hostname=${encodeURIComponent(p)}`,D=await fetch(T,{signal:x.signal});clearTimeout(R);let U=(await D.json()).root_domain;if(U!=null){m[p]=U;try{localStorage.setItem(`root_domain[${p}]`,U)}catch(M){console.log("Unable to set cached root domain",M)}}return U}catch(T){return clearTimeout(R),console.error("Error getting root domain",T),p}}class b{constructor(p,x){this.cookieKey=p,this.cookieExpiresIn=x}getCookie(){return g.getCookie(this.cookieKey)}async setCookie(p,x,N){N={expiresIn:this.cookieExpiresIn,...N||{}};let R=await C(p,window.location.hostname);return R!=null&&(N.domain="."+R),g.setCookie(this.cookieKey,x,N)}async getOrCreate(p){if(n())return null;let x=this.getCookie();return(x==null||x==="")&&(x=S()),await this.setCookie(p,x),x}}class k extends b{constructor(){super(r,s)}}class E extends b{constructor(){super(h,t)}}class $ extends b{constructor(){super(v,t)}}function A(){let I=new E().getCookie();if(I!=null&&I!=="")return I;let p=new $().getCookie();return p!=null&&p!==""?p:null}class O{static getCurrentSessionID(){return A()}static getCurrentVisitID(){return new k().getCookie()}static isShopifyWebPixelAvailable(){try{return typeof window!="undefined"&&window.Shopify!=null&&window.Shopify.analytics!=null}catch{return!1}}constructor(p){this.apiEndpoint=p}getCurrentSessionIDIfPresent(){return n()?null:A()}getCurrentVisitIDIfPresent(){if(n())return null;let p=new k().getCookie();return p!=null&&p!==""?p:null}async getOrCreateCurrentSessionID(){if(O.isShopifyWebPixelAvailable())return this.getCurrentSessionIDIfPresent();let p=new $().getCookie();return p!=null&&p!==""&&await new E().setCookie(this.apiEndpoint,p),await new E().getOrCreate(this.apiEndpoint)}async getOrCreateCurrentVisitID(){return O.isShopifyWebPixelAvailable()?this.getCurrentVisitIDIfPresent():await new k().getOrCreate(this.apiEndpoint)}}o.exports=O},36437(o,u,a){"use strict";a.d(u,{Ki:()=>v,O5:()=>g,at:()=>h});const g=t=>(t||"").includes(".melon.")||(t||"").includes("recomelon.com"),v=t=>{const r={uid:null,type:null,name:null};try{if(!t)return r;const s=decodeURI(new URL(t).pathname),m=[];g(t)?m.push({regex:/widgets\/([^/]+)\/([^/]+)\/([^/]+)\/index\.js$/,uid:1,type:n=>n[2],name:n=>n[3]}):m.push({regex:/widgets\/picture-card\/(.*)/,uid:1,type:"picture_card",name:null},{regex:/widgets\/loop_clips\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"loop_clips",name:2},{regex:/widgets\/highlight_reels\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"highlight_reels",name:2},{regex:/widgets\/tv\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"sauce_tv_gallery",name:2},{regex:/widgets\/product_page_highlight_reels\/([^\/]+)\/index\.js/,uid:1,type:"product_page_highlight_reels",name:"product_page_highlight_reels"},{regex:/widgets\/ppg\/([^\/]+)/,uid:1,type:"product_page_gallery",name:null},{regex:/widgets\/upsell\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"upsell_gallery",name:n=>n[2]||"_product_page_upsell_gallery"},{regex:/widgets\/basket_upsell\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"basket_upsell_gallery",name:n=>n[2]||"_basket_upsell_gallery"},{regex:/widgets\/upsell_similar\/([^\/]+)\/([\w\-]+)\.js$/,uid:1,type:"upsell_similar_gallery",name:n=>n[2]||"_product_page_upsell_similar_gallery"},{regex:/widgets\/liveig\/([^\/]+)/,uid:1,type:"live_ig_feed",name:null},{regex:/widgets\/shop_minis_store_page_gallery\/([^\/]+)/,uid:1,type:"shop_minis_store_page_gallery",name:null},{regex:/loader[^\/]*\/([^\/]+)\/([\w\- ]+)\.js$/,uid:1,type:"shoppable",name:n=>n[2].replace(" ","-")});for(const n of m){const f=s.match(n.regex);f&&(r.uid=typeof n.uid=="number"?f[n.uid]:null,r.type=typeof n.type=="function"?n.type(f):n.type,r.name=typeof n.name=="function"?n.name(f):typeof n.name=="number"?f[n.name]:n.name)}}catch{}return r},h=t=>t&&(t._snptResolvedSrc||t.src||t.getAttribute("src")||t.getAttribute("data-src"))||""}},W={};function c(o){var u=W[o];if(u!==void 0)return u.exports;var a=W[o]={exports:{}};return j[o](a,a.exports,c),a.exports}c.m=j,c.n=o=>{var u=o&&o.__esModule?()=>o.default:()=>o;return c.d(u,{a:u}),u},c.d=(o,u)=>{for(var a in u)c.o(u,a)&&!c.o(o,a)&&Object.defineProperty(o,a,{enumerable:!0,get:u[a]})},c.f={},c.e=o=>Promise.all(Object.keys(c.f).reduce((u,a)=>(c.f[a](o,u),u),[])),c.u=o=>""+{3925:"preloader-prefetch-symphony",6939:"preloader-prefetch-legacy"}[o]+"-"+{3925:"579596c4",6939:"b3439d64"}[o]+"-chunk.js",c.o=(o,u)=>Object.prototype.hasOwnProperty.call(o,u),(()=>{var o={},u="snpt:";c.l=(a,g,v,h)=>{if(o[a]){o[a].push(g);return}var t,r;if(v!==void 0)for(var s=document.getElementsByTagName("script"),m=0;m<s.length;m++){var n=s[m];if(n.getAttribute("src")==a||n.getAttribute("data-webpack")==u+v){t=n;break}}t||(r=!0,t=document.createElement("script"),t.charset="utf-8",c.nc&&t.setAttribute("nonce",c.nc),t.setAttribute("data-webpack",u+v),t.src=a),o[a]=[g];var f=(C,b)=>{t.onerror=t.onload=null,clearTimeout(S);var k=o[a];if(delete o[a],t.parentNode&&t.parentNode.removeChild(t),k&&k.forEach(E=>E(b)),C)return C(b)},S=setTimeout(f.bind(null,void 0,{type:"timeout",target:t}),12e4);t.onerror=f.bind(null,t.onerror),t.onload=f.bind(null,t.onload),r&&document.head.appendChild(t)}})(),c.r=o=>{typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(o,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(o,"__esModule",{value:!0})},c.p="/assets/build/",(()=>{var o={277:0};c.f.j=(g,v)=>{var h=c.o(o,g)?o[g]:void 0;if(h!==0)if(h)v.push(h[2]);else{var t=new Promise((n,f)=>h=o[g]=[n,f]);v.push(h[2]=t);var r=c.p+c.u(g),s=new Error,m=n=>{if(c.o(o,g)&&(h=o[g],h!==0&&(o[g]=void 0),h)){var f=n&&(n.type==="load"?"missing":n.type),S=n&&n.target&&n.target.src;s.message="Loading chunk "+g+` failed.
(`+f+": "+S+")",s.name="ChunkLoadError",s.type=f,s.request=S,h[1](s)}};c.l(r,m,"chunk-"+g,g)}};var u=(g,v)=>{var[h,t,r]=v,s,m,n=0;if(h.some(S=>o[S]!==0)){for(s in t)c.o(t,s)&&(c.m[s]=t[s]);if(r)var f=r(c)}for(g&&g(v);n<h.length;n++)m=h[n],c.o(o,m)&&o[m]&&o[m][0](),o[m]=0},a=self.webpackChunksnpt=self.webpackChunksnpt||[];a.forEach(u.bind(null,0)),a.push=u.bind(null,a.push.bind(a))})();var ee={};(()=>{"use strict";var o=c(11581),u=c.n(o),a=c(22914);(function(t,r){var s,m=function(f,S,C){var b=this.endpoint+"/widgets/beacon/"+this.profile,k={event:f,message:S,page_url:t.location.origin+t.location.pathname,in_preview:t.SNPTEmbedLayer!=null};fetch(b,{method:"POST",credentials:"omit",keepalive:!!(C&&C.keepalive),headers:{"Content-Type":"application/json"},body:JSON.stringify(k)}).catch(function(E){console.warn("Beacon tracking failed:",E)})},n=function(){var f=this;for(var S in f.attributes)f[S]=f.attributes[S]};s=function(f){this.attributes=f,this.init()},s.prototype={init:function(){n.call(this)},track:async function(f,S,C){let b=a.getAPIServerEndpoint(this.endpoint),k=await new(u())(b).getOrCreateCurrentSessionID();k&&(S.snpt_sess=k);let E=await new(u())(b).getOrCreateCurrentVisitID();E&&(S.snpt_visit=E),m.call(this,f,S,C)}},t.SNPTBeacon=s})(window,document);var g=c(25187);function v(){try{const r=(new Error().stack||"").match(/https?:\/\/[^\s)'"`]+\/widgets\/[^\s)'"`]+/);return r?r[0].replace(/:\d+(?::\d+)?$/,""):null}catch{return null}}var h=c(36437);c.p="https://cdn.addsauce.com/e/",(function(){const t={cdn:{root:"https://cdn.addsauce.com/",staticFonts:"https://addsauce-static-alt.b-cdn.net/",widgetLoadSegment:"load",symphonyLoadSegment:"load-symphony"},observer:{rootMargin:"1000px",threshold:0},loadingIndicatorCSS:`
      .snptwdgt_init_prldr:not(.snptwdgt_init) {
        width: 100%;
        height: 100px;
        background-image: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 200 200"><circle cx="100" cy="100" r="0" fill="none" stroke="%23CCC" stroke-width=".5"><animate attributeName="r" calcMode="spline" dur="2" keySplines="0 .2 .5 1" keyTimes="0;1" repeatCount="indefinite" values="1;80"/><animate attributeName="stroke-width" calcMode="spline" dur="2" keySplines="0 .2 .5 1" keyTimes="0;1" repeatCount="indefinite" values="0;25"/><animate attributeName="stroke-opacity" calcMode="spline" dur="2" keySplines="0 .2 .5 1" keyTimes="0;1" repeatCount="indefinite" values="1;0"/></circle></svg>');
        background-size: 50px;
        background-position: center;
        background-repeat: no-repeat;
        display: inline-block;
      }
    `},r={head:document.head,placeholderDiv:null,currentScript:window.CURRENT_SNPT_SCRIPT||document.currentScript,isDebugMode:window.location.search.includes("debug=1"),isXpMode:window.location.search.includes("xp=1"),isIE:navigator.userAgent.includes("MSIE")||navigator.userAgent.includes("Trident")};let s="",m=null,n=null,f=null,S=null;const C=(e,l)=>{const i=e.lastIndexOf("/");return`${e.substring(0,i+1)}${l}${e.substring(i)}`},b={shoppable:{cdnSentinel:"https://cdn.addsauce.com/e/shoppable-widget-cac5f9db0598722b76ee.js",loaderUrl:e=>C(e,t.cdn.symphonyLoadSegment)},similar_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/similar-gallery-9567beea8fcc64db1db6.js",loaderUrl:e=>`${e.substring(0,e.lastIndexOf("/")+1)}${t.cdn.symphonyLoadSegment}/loader.js`,defaultOn:!0},reveal_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/reveal-gallery-73307712f3d0d307979f.js",loaderUrl:e=>`${e.substring(0,e.lastIndexOf("/")+1)}${t.cdn.symphonyLoadSegment}/loader.js`,defaultOn:!0},sauce_tv_gallery:{cdnSentinel:"https://cdn.addsauce.com/e/tv-widget-1784c5ac379313106211.js",loaderUrl:e=>C(e,t.cdn.symphonyLoadSegment)},product_finder:{cdnSentinel:"https://cdn.addsauce.com/e/product-finder-bc980b1e8a8c0a0e992c.js",loaderUrl:e=>`${e.substring(0,e.lastIndexOf("/")+1)}${t.cdn.symphonyLoadSegment}/loader.js`,defaultOn:!0}},k=()=>{try{return new URLSearchParams(window.location.search).get("__widget_engine")==="symphony"}catch{return!1}},E=(e,l)=>{try{const i=e&&e.dataset&&e.dataset.renderEngine;if(i)return i==="symphony";if(k())return!0;const d=b[l];return!!(d&&d.defaultOn)}catch{return!1}};let $=()=>E(r.currentScript,n);const A=(e,l)=>e==null||l==null||l.trim()===""?!1:e.toLowerCase().includes(l.toLowerCase()),O=()=>{const e=(0,h.Ki)(s);m=e.uid,n=e.type,f=e.name},I=()=>{const e=r.currentScript.getAttribute("data-exclude-url"),l=r.currentScript.getAttribute("data-exclude-user-agent");if(A(location.href,e)||A(window.navigator.userAgent,l))return;D(t.cdn.root),D(t.cdn.staticFonts);let i=new URLSearchParams(window.location.search).get("__addsauce_items_api_endpoint");if(i&&i.length>0&&(i.startsWith("https://")||(i=`https://${i}`),D(i,!0)),Y(),M(),!s){const d=r.currentScript;console.warn("[Sauce] preloader: script src unresolved, aborting widget mount.",{hasElement:!!d,idlSrc:d&&d.src,attrSrc:d&&d.getAttribute&&d.getAttribute("src"),outerHTMLSample:d&&d.outerHTML&&d.outerHTML.slice(0,200)});return}O(),i||D(a.getAPIServerEndpoint(s),!0),U(),new(u())(a.getAPIServerEndpoint(s)).getOrCreateCurrentSessionID(),S=z(),$()&&!(n in b)&&console.warn("[Sauce] preloader: symphony unsupported for widget type \u2014 falling back to legacy bundle.",{widgetType:n,src:s}),V(),Z()},p=()=>(s||"").match(t.matchers.sauceTv),x=()=>p()&&r.currentScript.parentElement.getAttribute("data-sauce-tv-embedded")!=="1",N=()=>(s||"").match(t.matchers.highlightReels),R=()=>(s||"").match(t.matchers.productPageHighlightReels),T=()=>x()||N()||R(),D=(e,l=!1)=>{const i=e.endsWith("/")?e:`${e}/`;if([...document.querySelectorAll('link[rel="preconnect"]')].some(_=>_.href===i&&_.crossOrigin==="anonymous"===l))return;const w=document.createElement("link");w.rel="preconnect",w.href=i,l&&(w.crossOrigin="anonymous"),r.head.appendChild(w)},Y=()=>{if(document.getElementById("snptwdgt_init_prldr_indctor_css"))return;const e=document.createElement("style");e.id="snptwdgt_init_prldr_indctor_css",e.appendChild(document.createTextNode(t.loadingIndicatorCSS)),r.head.appendChild(e)},U=()=>{try{const e=a.getServerEndpoint(s);if(m==null)return;const l=new window.SNPTBeacon({profile:m,endpoint:e}),i={src:s,source:n,widget_type:n,widget_name:f,in_preview:window.SNPTEmbedLayer!=null};n=="picture_card"&&(i.item_id=m);let d=!1;const w=y=>{if(!d){d=!0,document.removeEventListener("visibilitychange",_);try{l.track("widget_initialised",i,y)}catch{}}},_=()=>{document.visibilityState==="hidden"&&w({keepalive:!0})};document.addEventListener("visibilitychange",_),window.addEventListener("pagehide",()=>w({keepalive:!0}),{once:!0}),"requestIdleCallback"in window?requestIdleCallback(()=>w(),{timeout:5e3}):setTimeout(()=>w(),1500)}catch{}},M=()=>{!r.currentScript&&r.isIE&&(r.currentScript=Array.from(document.getElementsByTagName("script")).find(e=>e.className.includes("snapppt-widget"))),r.currentScript=r.currentScript||window.CURRENT_SNPT_SCRIPT,s=r.currentScript.src||r.currentScript.getAttribute("src")||r.currentScript.getAttribute("data-src")||v()||window.CURRENT_SNPT_EMBED,r.currentScript._snptResolvedSrc=s,r.currentScript.loadNow=K(),r.isDebugMode&&(console.log(`Sauce current script: ${s}`),console.log(`Load now: ${r.currentScript.loadNow}`))},K=()=>r.currentScript.dataset.loadr==="instant"||B(r.currentScript)?!0:!!(s||"").match("campaign-signup"),G=(e,l,i)=>{const d=new URL(e),w=d.host.match(/\.(test|ci)/),_=i?b[l]:null,y=w?_?_.loaderUrl(e):(0,h.O5)(e)?`${e.substring(0,e.lastIndexOf("/")+1)}loader.js`:C(e,t.cdn.widgetLoadSegment):_?_.cdnSentinel:"https://cdn.addsauce.com/e/snap-widget-69ce7c34ccd0cd79d4e5.js",L=_?null:w?`${d.origin}/widgets/widget_loader/snap-vendor-bundle.js`:"https://cdn.addsauce.com/e/snap-widget-vendor-4b49d263da4bdec5349d.js";return{widgetSrc:y,vendorSrc:L,key:_?l:"legacy"}},q=e=>{const l=(0,h.at)(e),{type:i}=(0,h.Ki)(l);return G(l,i,E(e,i))},X=new Set(["highlight_reels","product_page_highlight_reels","reveal_gallery","product_finder"]),B=e=>{var l;const{type:i}=(0,h.Ki)((0,h.at)(e));return X.has(i)?!0:i==="sauce_tv_gallery"&&((l=e.parentElement)==null?void 0:l.getAttribute("data-sauce-tv-embedded"))!=="1"},H=(e,l="")=>{g.start("snap-widget-script-load");const i=document.createElement("script");return i.src=e,i.async=!0,i.fetchPriority="high",l&&(i.className=l),i},J=(e,l,i)=>{if(i.has(e))return;i.add(e);const d=H(e,"snapppt-widget"),w=l?H(l):null,_=document.createDocumentFragment();w?_.append(d,w):_.append(d),r.head.appendChild(_)},z=()=>{if(window.SNPT||(window.SNPT={}),window.SNPT.widgetManager)return window.SNPT.widgetManager;const e={},l={},i=new Set;return window.SNPT.widgetManager={widgetReady(d){const{key:w,widgetSrc:_,vendorSrc:y}=q(d);w==="legacy"?c.e(6939).then(c.bind(c,44321)).then(P=>P.prefetchLegacyData(d)).catch(()=>{}):c.e(3925).then(c.bind(c,83535)).then(P=>P.prefetchSymphonyData(d,w)).catch(()=>{}),B(d)||(d.className="snptwdgt_init_prldr");const L=e[w];L?L(d):(l[w]||(l[w]=[])).push(d),J(_,y,i)},loaderReady(d,w="legacy"){e[w]=d;const _=l[w];if(_){for(;_.length;)d(_.shift());delete l[w]}}},window.SNPT.widgetManager},V=()=>{if(location.href.includes("lemieux")||r.currentScript.loadNow||(s||"").match("campaign-signup")||typeof window.IntersectionObserver!="function")return F();if(r.placeholderDiv!=null)return;const e=Q();let l=!1;const i=new IntersectionObserver(d=>{const w=d[0];!l&&w.isIntersecting&&(l=!0,i.disconnect(),w.target.remove(),r.placeholderDiv=null,F())},t.observer);i.observe(e),setTimeout(()=>{l||!e.isConnected||(i.unobserve(e),i.observe(e))},1e3)},F=()=>S.widgetReady(r.currentScript),Q=()=>{const e=document.createElement("div");return e.innerHTML="&nbsp;",r.currentScript.after(e),r.placeholderDiv=e,e},Z=()=>{if(!(!(r.currentScript.getAttribute("data-handle-url-change")==="1")&&!(n==="upsell_similar_gallery"||n==="similar_gallery"||n==="reveal_gallery")))try{let i=function(){const y=new Event("self-destruct-on-url-change.sauce.embed");window.dispatchEvent(y),V()};const d=history.pushState,w=history.replaceState,_=y=>{try{if(y==null)return y;const L=new URLSearchParams(window.location.search).get("__widget_engine");if(!L)return y;const P=new URL(y,window.location.href);return P.origin!==window.location.origin||P.searchParams.has("__widget_engine")?y:(P.searchParams.set("__widget_engine",L),P.pathname+P.search+P.hash)}catch{return y}};history.pushState=function(...y){y.length>2&&(y[2]=_(y[2])),d.apply(this,y),i()},history.replaceState=function(...y){y.length>2&&(y[2]=_(y[2])),w.apply(this,y),i()},window.addEventListener("popstate",i)}catch(i){console.error("Failure to detect url change",i)}};I(),g.end("preloader")})()})()})();})();
