(()=>{(function(W){var d={};function e(t){if(d[t])return d[t].exports;var s=d[t]={i:t,l:!1,exports:{}};return W[t].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=W,e.c=d,e.d=function(t,s,m){e.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:m})},e.r=function(t){typeof Symbol!="undefined"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,s){if(s&1&&(t=e(t)),s&8||s&4&&typeof t=="object"&&t&&t.__esModule)return t;var m=Object.create(null);if(e.r(m),Object.defineProperty(m,"default",{enumerable:!0,value:t}),s&2&&typeof t!="string")for(var E in t)e.d(m,E,function(S){return t[S]}.bind(null,E));return m},e.n=function(t){var s=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(s,"a",s),s},e.o=function(t,s){return Object.prototype.hasOwnProperty.call(t,s)},e.p="",e(e.s=22)})([function(W,d,e){"use strict";e.d(d,"h",function(){return s}),e.d(d,"d",function(){return m}),e.d(d,"e",function(){return E}),e.d(d,"j",function(){return S}),e.d(d,"g",function(){return w}),e.d(d,"c",function(){return I}),e.d(d,"f",function(){return R}),e.d(d,"i",function(){return N}),e.d(d,"k",function(){return L}),e.d(d,"b",function(){return O}),e.d(d,"a",function(){return D});var t=function(u,l,a,h){function T(v){return v instanceof a?v:new a(function(A){A(v)})}return new(a||(a=Promise))(function(v,A){function Q(r){try{o(h.next(r))}catch(i){A(i)}}function C(r){try{o(h.throw(r))}catch(i){A(i)}}function o(r){r.done?v(r.value):T(r.value).then(Q,C)}o((h=h.apply(u,l||[])).next())})};function s(u){return typeof u=="undefined"}function m(u){return typeof u=="function"}function E(u){return u===null}const S=(u,l={})=>{if(Number.isFinite(+u))return l;try{return JSON.parse(u)}catch(a){}return l};function w(u){const l=function(){return t(this,void 0,void 0,function*(){})}.constructor;return typeof u=="object"&&!E(u)&&!Array.isArray(u)&&!(u instanceof l)&&u.constructor!=="function"&&Object.prototype.toString.call(u)==="[object Object]"}function I(u,l,a=void 0){if(E(u)||s(u))return a;const T=(l!=null?l:"").replace(/\[([^[\]]*)]/g,".$1.").split(".").filter(v=>v!=="").reduce((v,A)=>v&&v[A],u);return s(T)?a:T}function R(u){return typeof u=="number"&&Number.isFinite(u)}function N(u){return typeof u=="string"&&u.length>0}const L=(u,l="",a)=>{const h=l&&l.length>0?l.split("."):[];let T=u;return h.slice(0,h.length-1).forEach(v=>{let A=T[v];(E(A)||s(A))&&(A={}),T[v]=A,T=T[v]}),T[h.pop()]=a,u};function O(u,l){let a;return(...h)=>{clearTimeout(a),a=setTimeout(()=>{u(...h)},l)}}const D=u=>{var l,a,h;return(h=(a=(l=u.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))===null||l===void 0?void 0:l.map(T=>T.toLowerCase()))===null||a===void 0?void 0:a.join("_"))!==null&&h!==void 0?h:u}},function(W,d,e){(function(t,s){s(d)})(this,function(t){"use strict";var s,m,E,S,w,I,R,N,L,O,D,u,l,a,h;t.AlignValue=void 0,(s=t.AlignValue||(t.AlignValue={})).LEFT="left",s.RIGHT="right",s.CENTER="center",t.AlignPosition=void 0,(m=t.AlignPosition||(t.AlignPosition={})).NATURAL="natural",m.CANVAS="canvas",t.ShapeKind=void 0,(E=t.ShapeKind||(t.ShapeKind={})).CIRCLE="circle",E.RECTANGLE="rectangle",E.POLYGON="polygon",t.ObjectType=void 0,(S=t.ObjectType||(t.ObjectType={})).TEXT="text",S.SHAPE="shape",S.IMAGE="image",S.GROUP="group",t.SizeUnit=void 0,(w=t.SizeUnit||(t.SizeUnit={})).PX="px",w.PERCENT="%",t.LogicalOp=void 0,(I=t.LogicalOp||(t.LogicalOp={})).AND="and",I.OR="or",t.ComparisonOp=void 0,(R=t.ComparisonOp||(t.ComparisonOp={})).GT="gt",R.LT="lt",R.GE="ge",R.LE="le",R.EQ="eq",R.NE="ne",t.ConditionVariable=void 0,(N=t.ConditionVariable||(t.ConditionVariable={})).H="h",N.W="w",N.AR="ar",t.CartUpdateAction=void 0,(L=t.CartUpdateAction||(t.CartUpdateAction={})).ADD_TO_CART="addToCart",L.INCREMENT_QUANTITY="increaseQuantity",L.DECREMENT_QUANTITY="decreaseQuantity",L.UPDATE_QUANTITY="updateQuantity",L.CHANGE_QUANTITY="changeQuantity",L.CHANGE_CART="changeCart",t.WidgetFeature=void 0,(O=t.WidgetFeature||(t.WidgetFeature={})).AUTOMATED_DISCOUNTS="cart_discounts_inclusion",O.MANUAL_DISCOUNT_ALLOCATIONS="allow_manual_discount_allocations",O.PRODUCT_VARIANTS="product_variants",O.EXCLUDE_OOS="exclude_oos",O.TIMER="timer",O.EMBEDDED_PRICE_DROP="embed-price-drop",O.PRODUCT_SELECTION="product_selection",O.RECOMMENDATION_REMINDER="recommendation_reminder",O.QUIZ_TIMER="quiz-timer",O.FS_FLOATING="fullscreen-floating",O.FLOATING_LAUNCHER="floating-launcher",O.SINGLE_SELECTION_DISCOUNT="single_selection_discount",O.EXCLUDE_DOUBLE_SELECTION_DISCOUNT="exclude_double_selection_discount",O.TIERED_DISCOUNT="tiered_discount",O.NO_DEFAULT_SELECTION="no_default_selection",O.PRODUCT_DISCOUNT="product_discount",O.NEW_USER_VIEW="new_user_view",O.TIMED_VIEW="timed_view",O.MOBILE_BOTTOM_DRAWER="mobile_bottom_drawer",O.USER_SPECIFIC="user-specific",O.COD_HIDDEN="cod_hidden",t.WidgetCategory=void 0,(D=t.WidgetCategory||(t.WidgetCategory={})).CUSTOM_QUIZ="custom_recommendation-quiz",D.QUIZ="quiz",D.PRODUCT_BUNDLE="bundle",D.AB_CART="cart",D.SIDE_CART="side-cart",D.FORM="form",D.PRICE_DROP="price-drop",D.NEW_ARRIVALS="newarrivals",D.BESTSELLER="recommended",D.GENERIC="generic",D.FBT="fbt",D.REWARD_QUIZ="reward-quiz",D.BULK_BUY="bulk-buy",D.SPIN_WHEEL="spin-the-wheel",D.STICKY_CART_BUTTON="sticky-cart-button",D.PLAYBOOK="playbook",D.PRODUCT_INFO="info",t.WidgetType=void 0,(u=t.WidgetType||(t.WidgetType={})).STORE_BANNER="store",u.PRODUCT_BANNER="product",u.WIDGET="widget",t.InsertType=void 0,(l=t.InsertType||(t.InsertType={})).ABOVE="above",l.BELOW="below",l.REPLACE_CHILDREN="replaceChildren",l.LAST_CHILD="lastChild",l.FIRST_CHILD="firstChild",l.PAGE_TOP="pageTop",l.PAGE_BOTTOM="pageBottom",l.PAGE_HOVER_TOP="pageHoverTop",l.PAGE_HOVER_BOTTOM="pageHoverBottom",l.FLOATING="floating",l.SLIDE_IN="slideIn",t.WidgetTimingAction=void 0,(a=t.WidgetTimingAction||(t.WidgetTimingAction={})).CLICK="click",a.SCROLL="scroll",a.DELAY="delay",a.AB_CART="abcart",t.TargetType=void 0,(h=t.TargetType||(t.TargetType={})).PAGES="pages",h.PRODUCTS="products",h.COLLECTIONS="collections";var T,v,A,Q,C,o,r,i,n,p;t.BreakpointId=void 0,(T=t.BreakpointId||(t.BreakpointId={})).XS="xs",T.M="m",T.L="l",T.XL="xl",t.FloatingPositionTypes=void 0,(v=t.FloatingPositionTypes||(t.FloatingPositionTypes={})).TOP="top",v.RIGHT="right",v.BOTTOM="bottom",v.LEFT="left",t.AddOn=void 0,(A=t.AddOn||(t.AddOn={})).RECOMMENDED="recommended",A.UPSELL="upsell",A.FBT="fbt",t.WidgetEntityState=void 0,(Q=t.WidgetEntityState||(t.WidgetEntityState={})).ENABLED="enabled",Q.DISABLED="disabled",Q.SYSTEM_DISABLED="system_disabled",Q.DELETED="deleted",t.ApplyType=void 0,(C=t.ApplyType||(t.ApplyType={})).MANUAL="manual",C.AUTOMATION="automation",t.PublishAs=void 0,(o=t.PublishAs||(t.PublishAs={})).BADGE="badge",o.FEATURE_CARD="feature-card",o.TRUST_BADGE="trust-badges",o.STORE_BANNER="store-banner",o.PRODUCT_BANNER="product-banner",o.STANDALONE="standalone",o.WIDGET="widget",t.AddonStatus=void 0,(r=t.AddonStatus||(t.AddonStatus={})).ENABLED="enabled",r.DISABLED="disabled",t.DiscountType=void 0,(i=t.DiscountType||(t.DiscountType={})).FIXED="fixed_amount",i.PERCENTAGE="percentage",i.TIERED="tiered",i.BXGY_PRODUCTS="bxgy::products",t.ChannelMethod=void 0,(n=t.ChannelMethod||(t.ChannelMethod={})).INITIALIZE="initialize",n.RESIZE="resize",n.TIMER_EXPIRED="timerExpired",n.CART_UPDATE="onCartUpdate",n.ORDER_CREATED="orderCreated",n.DISCOUNT_UPDATION="discountUpdation",n.FETCH_CART="getCart",n.CLOSE="closeWidget",n.CHANGE_VARIANT="onChangeVariant",n.SELECT_PRODUCT="onProductSelect",n.FORM_SUBMIT="onFormSubmit",n.FORM_RESET="onFormReset",n.UPDATE_WIDGET="update",n.URL_CHANGE="urlchange",n.WINDOW_RESIZED="window-resized",n.TIMER_STATE_UPDATE="timer-state-update",n.SPIN_WHEEL_STATE_UPDATE="spin-wheel-state-update",n.QUIZ_STATE_UPDATE="quiz-state-update",n.IN_VIEW="in-view",n.OUT_OF_VIEW="out-of-view",n.GET_QUERY_PARAMS="get-query-params",n.LINK_DATA_UPDATE="link-data-update",n.GET_STOREFRONT_DATA="get-storefront-data",t.CheckoutType=void 0,(p=t.CheckoutType||(t.CheckoutType={})).SWIFT="swift",p.FASTRR="fastrr",p.DEFAULT="default";var g,U,j,F;t.ScriptName=void 0,(g=t.ScriptName||(t.ScriptName={})).ANALYTICS="analytics",g.LOADER="loader",g.LOFOODS="lofoods",g.OVERLAY="overlay",g.PREVIEW="preview",g.REPLACE="replace",g.SIDECART="sidecart",g.THANKYOU="thankyou",g.TRUSTBADGES="trustbadges",g.WIDGETS="widgets",g.QUIZ="quiz",t.FeaturesAPIApp=void 0,(U=t.FeaturesAPIApp||(t.FeaturesAPIApp={})).MODEMAGIC="modemagic",U.QUIZ_MASTER="quizmaster",t.CacheEntryVersion=void 0,(j=t.CacheEntryVersion||(t.CacheEntryVersion={})).ONE="1.0",j.TWO="2.0",t.TBAlign=void 0,(F=t.TBAlign||(t.TBAlign={})).CENTER="center",F.RIGHT="right",F.LEFT="left",t.LauncherPositions={BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:"bottomRight"},t.Platforms={SHOPIFY:"shopify",BIGCOMMERCE:"bigcommerce",UNKNOWN:"--unknown--"}})},function(W,d,e){"use strict";e.d(d,"a",function(){return m});var t=e(4);const m=["info","debug","error","log","group","groupEnd"].reduce((E,S)=>(E[S]=(...w)=>{t.i||window.console[S](...w)},E),{})},,function(W,d,e){"use strict";(function(t){e.d(d,"i",function(){return N}),e.d(d,"a",function(){return O}),e.d(d,"g",function(){return l}),e.d(d,"k",function(){return Q}),e.d(d,"e",function(){return r}),e.d(d,"b",function(){return n}),e.d(d,"c",function(){return p}),e.d(d,"d",function(){return g}),e.d(d,"j",function(){return U}),e.d(d,"h",function(){return F}),e.d(d,"l",function(){return V}),e.d(d,"f",function(){return b});var s=e(2),m=e(0),E=e(5),S,w,I,R;const N=((S=t==null?void 0:{USER_FEATURES_API:"https://app.getmodemagic.com/api/features",APP_URL:"https://app.getmodemagic.com",NODE_ENV:"production"})===null||S===void 0?void 0:S.NODE_ENV)==="production",L=((w=t==null?void 0:{USER_FEATURES_API:"https://app.getmodemagic.com/api/features",APP_URL:"https://app.getmodemagic.com",NODE_ENV:"production"})===null||w===void 0?void 0:w.NODE_ENV)==="test",O=(R=(I=t==null?void 0:{USER_FEATURES_API:"https://app.getmodemagic.com/api/features",APP_URL:"https://app.getmodemagic.com",NODE_ENV:"production"})===null||I===void 0?void 0:I.NODE_ENV)!==null&&R!==void 0?R:"development",D=["ase","art","bmp","blp","cd5","cit","cpt","cr2","cut","dds","dib","djvu","egt","exif","gif","gpl","grf","icns","ico","iff","jng","jpeg","jpg","jfif","jp2","jps","lbm","max","miff","mng","msp","nef","nitf","ota","pbm","pc1","pc2","pc3","pcf","pcx","pdn","pgm","PI1","PI2","PI3","pict","pct","pnm","pns","ppm","psb","psd","pdd","psp","px","pxm","pxr","qfx","raw","rle","sct","sgi","rgb","int","bw","tga","tiff","tif","vtf","xbm","xcf","xpm","3dv","amf","ai","awg","cgm","cdr","cmx","dxf","e2d","egt","eps","fs","gbr","odg","svg","stl","vrml","x3d","sxd","v2d","vnd","wmf","emf","art","xar","png","webp","jxr","hdp","wdp","cur","ecw","iff","lbm","liff","nrrd","pam","pcx","pgf","sgi","rgb","rgba","bw","int","inta","sid","ras","sun","tga","heic","heif"],u=new Set(D),l=new RegExp(`((.${D.join("|.")})+)$`,"i"),a=["pico","icon","thumb","small","compact","medium","large","grande","original","master"],h=["center","top","right","bottom","left"],T=["progressive"],v=new RegExp(`((?:_(?:x|X)?)(?:(?:\\d{1,4}(?:x|X)\\d{0,4}|(?:x|X)\\d{1,4})|(?:${a.join("|")})))?(_crop_(?:${h.join("|")}))?(@[23]x)?(.(?:${T.join("|")}))?$`),A=(()=>{let c=[];return f=>{let y=f.replace(/\.([^.]+?)$/,"");c=y.split(".");let P=-1;for(let M=0;M0?P:void 0).join("."),y}})(),Q=(()=>{const c={};return f=>{const y=c[f];if(typeof y=="string")return y;let P=f;P=P.replace(/\?v=.*/g,"");const x=A(P).match(v);if(x){const{index:B=0}=x,_=P.slice(0,B),G=P.slice(B+x[0].length);P=`${_}${G}`}return c[f]=P,P}})(),C=(()=>{const c={};return f=>{let y=c[f];return typeof y=="string"||(y=A(f),c[f]=y),y}})();function o(c,f){return C(c)===C(f)}function r(c,f){return f.find(y=>o(c,y))||""}function i(c){var f,y;return(y=(f=c.split("/").pop())===null||f===void 0?void 0:f.split("?"))===null||y===void 0?void 0:y[0]}const n=(()=>{const c=new Map([]);return(f,y)=>{var P;if(c.has(f))return c.get(f);const M=Q(f),x=M.match(l);if(!f.startsWith("/")&&Array.isArray(x)&&x.length>0){const B=i(M);if(typeof B=="string"){const _=`${y}/${B}`;c.set(f,_)}}return(P=c.get(f))!==null&&P!==void 0?P:f}})();function p(c,f="/cdn"){return`${c}${f}`}function g(){const{store:c}=Object(E.a)(),f=window.location.pathname;return f.match(/^\/(?:[a-z]{2})?$/)?"home":f.match(/\/products\/.+?$/)?"product":f.match(/\/pages\/.+?$/)?"page":f.includes("collection")||f.includes("search")?"collection":c==="venustahome"&&f.includes("campaign")?"home":"_not_supported_"}const U=window.modeMagicPreviewSettings||window.modeMagicSettings||{},j=c=>{const f=M=>{const{visibility:x,display:B,opacity:_}=getComputedStyle(M);return!(document.hidden||x==="hidden"||B==="none"||+_==0)};let y=c,P=f(y);for(;P&&y.parentElement;)y=y.parentElement,P=f(y);return P},F=(c,{areaCheck:f}={areaCheck:!0})=>{if(!j(c))return!1;const{top:y,left:P,bottom:M,right:x}=c.getBoundingClientRect(),B={x:0,y:0},_={x:window.innerWidth||document.documentElement.clientWidth,y:window.innerHeight||document.documentElement.clientHeight},G=(Y,z)=>{const X=B[Y],Z=_[Y];return zZ?Z:z},H=G("y",M)-G("y",y),K=G("x",x)-G("x",P),$=H*K;return f?$>0:H>0||K>0},V=c=>{let{logs:f}=c!=null?c:{};f||({logs:f}=c==null?void 0:c.constructor);let y=["",""];return f&&(y=[Object.keys(f).reduce((P,M)=>`${P}${M}: ${f[M]}; `,""),"background-color: rgb(76, 136, 255);color:white;","color: rgb(76, 136, 255)"]),N||L?c:new Proxy(c,{get(P,M,x){const B=Reflect.get(P,M,x);return typeof B=="function"?function(..._){var G,H;const K=`%c[${(G=c==null?void 0:c.name)!==null&&G!==void 0?G:(H=c==null?void 0:c.constructor)===null||H===void 0?void 0:H.name}]%c[${M.toString()}]%c: `;s.a.group(K,...y),_.length>0&&s.a.debug("Called with: ",..._);const $=B.apply(this,_);return s.a.debug("Returning",$),s.a.groupEnd(),$}:B}})},b=()=>{const{search:c}=window.location;return Object(m.i)(c)?JSON.parse(`{"${c.slice(1).replace(/&/g,'","').replace(/=/g,'":"')}"}`,(f,y)=>f===""?y:decodeURIComponent(y)):{}}}).call(this,e(15))},function(W,d,e){"use strict";e.d(d,"a",function(){return S});var t=e(1),s=e.n(t),m=e(0),E=e(10);const S=()=>{var w,I,R;const N={cart:null,platform:t.Platforms.UNKNOWN,product:"",store:"",currency:{active_currency_code:"",active_currency_id:1},settings:{store_hash:"",secure_host:"",cdn_url:"",secure_base_url:"",channel_id:1},customer:null,dumps:{},urls:{home:""}};if(typeof window!="undefined"){if(typeof window.__store_context__=="undefined"&&(window.__store_context__={}),Object.assign(window.__store_context__,Object.assign(Object.assign({},N),window.__store_context__)),Object(m.g)(window.Shopify)){const L=Object(E.a)(),O=window.Shopify.shop.split(".")[0];Object.assign(window.__store_context__,{platform:t.Platforms.SHOPIFY,store:O,dumps:{},currency:{active_currency_code:(I=(w=window.Shopify.currency)===null||w===void 0?void 0:w.active)!==null&&I!==void 0?I:"USD",active_currency_id:1},settings:{secure_base_url:`https://${window.Shopify.shop}`,secure_host:window.Shopify.shop,cdn_url:window.Shopify.cdnHost,store_hash:O,channel_id:1},cart:null,urls:{home:(R=window.Shopify.routes)===null||R===void 0?void 0:R.root},product:L.product})}return window.__store_context__}return N}},function(W,d,e){"use strict";e.d(d,"d",function(){return u}),e.d(d,"b",function(){return a}),e.d(d,"c",function(){return h}),e.d(d,"a",function(){return Q});const t="__SECRET_INTERNALS_DO_NOT_USE__";var s=e(12),m=e(4),E=e(2),S=e(7),w=e(0),I=e(11),R=e(13),N=e(5),L=function(C,o){var r={};for(var i in C)Object.prototype.hasOwnProperty.call(C,i)&&o.indexOf(i)<0&&(r[i]=C[i]);if(C!=null&&typeof Object.getOwnPropertySymbols=="function")for(var n=0,i=Object.getOwnPropertySymbols(C);n{E.a.debug("MM:Clearing impressions cache"),o.impressionsCache=new Set,o.viewsCache=new Set,o.stats=T}),o.addOrderCompletionListener()}addOrderCompletionListener(){window.addEventListener("message",o=>{const{data:r}=o,{messageType:i,messageData:{actionType:n}={}}=r,p=Object(w.c)(r,"messageAuth.source",null),g=Object(w.c)(r,"messageData.payload.order",null),{id:U,line_items:j=[],cart_token:F="",email:V="",customer:b,customer_locale:c=""}=g!=null?g:{},{id:f=-1}=b!=null?b:{};i==="MODEMAGIC_CONVERSION_EVENT"&&n==="ORDER_CREATE"&&!Object(w.e)(p)&&D.has(p)&&!Object(w.h)(U)&&Object(I.b)({email:V,orderId:U,customerId:f,cartToken:F,customerLocale:c,source:p!=null?p:void 0,lineItems:j})})}flushQueue(){var o,r,i;const n=A.getInstance(),p=n.eventQueue.get(v.FLUSH_QUEUE);if(!Object(w.e)(p)&&!Object(w.h)(p)){const U=new Date().getTime();if(U-p.queued>n.queWaitTime){if(p.counter>=n.maxRetries){n.eventQueue.set(v.ACTIVE_QUEUE,[...(o=n.eventQueue.get(v.ACTIVE_QUEUE))!==null&&o!==void 0?o:[],...p.events]),n.eventQueue.set(v.FLUSH_QUEUE,void 0),n.flushQueue();return}n.eventQueue.set(v.FLUSH_QUEUE,Object.assign(Object.assign({},p),{queued:new Date().getTime(),counter:p.counter+1}))}else{if(n.retryQueTimeout!==-1)return;const j=n.queWaitTime-(U-p.queued)+1e3;n.retryQueTimeout=window.setTimeout(()=>{n.retryQueTimeout=-1,n.flushQueue()},j);return}}else{const U=(r=n.eventQueue.get(v.ACTIVE_QUEUE))!==null&&r!==void 0?r:[];Array.isArray(U)&&U.length>0&&(n.eventQueue.set(v.ACTIVE_QUEUE,[]),n.eventQueue.set(v.FLUSH_QUEUE,{events:U,queued:new Date().getTime(),counter:1}))}const g=(i=n.eventQueue.get(v.FLUSH_QUEUE))===null||i===void 0?void 0:i.events;if(Array.isArray(g)&&g.length>0){const U=JSON.stringify(g);fetch(u,{method:"POST",body:U}).then(()=>{n.eventQueue.set(v.FLUSH_QUEUE,void 0)}).catch(()=>{})}}queueEvent(o){var r;const i=A.getInstance(),n=[...(r=i.eventQueue.get(v.ACTIVE_QUEUE))!==null&&r!==void 0?r:[],o];i.eventQueue.set(v.ACTIVE_QUEUE,n),i.queTimeout>0&&(window.clearTimeout(i.queTimeout),i.queTimeout=-1),n.length>=l?i.flushQueue():i.queTimeout=window.setTimeout(()=>{i.flushQueue()},1e3)}raiseEvent(o){const{store:r}=Object(N.a)(),{appName:i=R.a,entity:n,eventType:p,data:g,element:U}=o,j=window.location.href,F=Object(m.f)(),V=g!=null?g:{},{product:b,storyboard:c,template:f,impressionsData:y,widgets:P,playbookId:M}=V,x=L(V,["product","storyboard","template","impressionsData","widgets","playbookId"]),B=new Date().getTime()/1e3,_=A.getInstance();_.stats[p]+=1,_.log(n,p,g,U),_.queueEvent(Object.assign(Object.assign({app_name:i,store_id:r,product_id:b,storyboard_id:c,widget_ids:P,template_id:f,category:n,action:p,time:B,playbook_id:M,device_id:Object(S.a)(),full_url:j,query:F},x),y))}log(o,r,i,n){E.a.debug(`MM:${o}:${r}`),n&&E.a.debug("src element: ",n),E.a.debug("data: ",JSON.stringify(i)),E.a.debug("stats: ",JSON.stringify(A.getInstance().stats))}click(o){const{entity:r,element:i,data:n,appName:p}=o;A.getInstance().raiseEvent({appName:p,entity:r,eventType:a.CLICK,data:n,element:i})}impression(o){const{entity:r,element:i,data:n,appName:p}=o,g=A.getInstance();g.impressionsCache.has(i)||(g.raiseEvent({appName:p,entity:r,eventType:a.IMPRESSION,data:n,element:i}),g.impressionsCache.add(i))}view(o){const{entity:r,element:i,data:n,appName:p}=o,g=A.getInstance();g.viewsCache.has(i)||(g.raiseEvent({appName:p,entity:r,eventType:a.VIEW,data:n,element:i}),g.viewsCache.add(i))}hide(o){const{entity:r,element:i,data:n,appName:p}=o;A.getInstance().raiseEvent({appName:p,entity:r,eventType:a.HIDE,data:n,element:i})}conversion(o){const{data:r,appName:i}=o;A.getInstance().raiseEvent({appName:i,entity:h.WIDGET,eventType:a.CONVERSION,data:r})}}const Q=A.getInstance()},function(W,d,e){"use strict";e.d(d,"a",function(){return m});var t=e(0);const s="mm.userDeviceID",m=()=>{const E=window.localStorage.getItem(s);if(Object(t.e)(E)){const S=JSON.stringify(performance.now())+Math.random().toString(36).substring(2,11);return window.localStorage.setItem(s,S),S}return E}},,,function(W,d,e){"use strict";e.d(d,"a",function(){return t});function t(){const s=document.querySelectorAll("[data-app='mm']");let m={};return s.forEach(E=>{m=Object.assign(Object.assign({},m),E.dataset)}),m}},function(W,d,e){"use strict";e.d(d,"a",function(){return m}),e.d(d,"b",function(){return E});var t=e(6),s=e(0);const m={swift:!0,shopflo:!0,fastrr:!0};function E(S){const{customerLocale:w,customerId:I,orderId:R,lineItems:N,email:L,cartToken:O,source:D}=S,u=N.reduce((l,{properties:a={}})=>{const h=a.__mmWidget,T=Object(s.j)(h,null);return T!==null&&!Array.isArray(T)&&typeof T=="object"&&l.push(T),l},[]);t.a.conversion({appName:"shopify",data:{widgets:u,meta:{source:D,line_items:N,order:R,cartToken:O,src:window.location.href,customer:{id:I,locale:w,email:L}},impressionsData:{apply_type:"manual"}}})}},function(W,d,e){"use strict";e.d(d,"a",function(){return s});var t=e(0);class s{constructor(E=!0){this.sessionKey="",this.cache=new Map,this.persistent=!0,this.persistent=!!E}init(E){this.sessionKey=`${E}-cache`,this.cache=new Map(Object(t.j)(this.persistent?window.localStorage.getItem(this.sessionKey):window.sessionStorage.getItem(this.sessionKey),[]))}get(E){return this.cache.get(E)}set(E,S){if(this.cache.set(E,S),this.persistent){window.localStorage.setItem(this.sessionKey,JSON.stringify(Array.from(this.cache.entries())));return}window.sessionStorage.setItem(this.sessionKey,JSON.stringify(Array.from(this.cache.entries())))}}},function(W,d,e){"use strict";e.d(d,"a",function(){return t});const t="-- empty --"},,function(W,d){var e=W.exports={},t,s;function m(){throw new Error("setTimeout has not been defined")}function E(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=m}catch(a){t=m}try{typeof clearTimeout=="function"?s=clearTimeout:s=E}catch(a){s=E}})();function S(a){if(t===setTimeout)return setTimeout(a,0);if((t===m||!t)&&setTimeout)return t=setTimeout,setTimeout(a,0);try{return t(a,0)}catch(h){try{return t.call(null,a,0)}catch(T){return t.call(this,a,0)}}}function w(a){if(s===clearTimeout)return clearTimeout(a);if((s===E||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(a);try{return s(a)}catch(h){try{return s.call(null,a)}catch(T){return s.call(this,a)}}}var I=[],R=!1,N,L=-1;function O(){!R||!N||(R=!1,N.length?I=N.concat(I):L=-1,I.length&&D())}function D(){if(!R){var a=S(O);R=!0;for(var h=I.length;h;){for(N=I,I=[];++L1)for(var T=1;T{const[,,w]=S;m.apply(E,S),t.listeners.forEach(I=>typeof w=="string"&&I(w.split("?")[1]||""))}})}static listen(m){t.unlisten(m),t.listeners.push(m)}static unlisten(m){t.listeners=t.listeners.filter(E=>E!==m)}}t.listeners=[]},,,,,,function(W,d,e){"use strict";e.r(d),e.d(d,"addFeatureSettings",function(){return u});var t=e(0),s=e(2),m=e(7),E=e(6),S=e(10),w=e(5),I=e(1),R=e.n(I),N=e(16),L=function(o,r,i,n){function p(g){return g instanceof i?g:new i(function(U){U(g)})}return new(i||(i=Promise))(function(g,U){function j(b){try{V(n.next(b))}catch(c){U(c)}}function F(b){try{V(n.throw(b))}catch(c){U(c)}}function V(b){b.done?g(b.value):p(b.value).then(j,F)}V((n=n.apply(o,r||[])).next())})};const O="COD",D=()=>new Promise(o=>{const r=setInterval(()=>{const i=Object(t.c)(window,"Shopflo.order.tags","").split(",").map(n=>n.trim()).filter(n=>n.length>0);if(i.length>0){const n=new Set(i);clearInterval(r),o(n.has(O)?"true":"false")}},100)});function u(o,r,i="modeMagic"){const n=`${i}Settings`;typeof window[n]=="undefined"&&(window[n]={}),typeof r!="undefined"&&(window[n][o]=r)}function l(o){o.forEach(({name:r,src:i,data:n})=>{u(r,n,"modeMagic");const p=document.createElement("script");p.setAttribute("data-mm-script",r),p.setAttribute("type","text/javascript"),p.setAttribute("src",i),p.setAttribute("fetchPriority","high"),document.body.appendChild(p)})}function a(o){try{const i=JSON.parse(o.responseText).data;l(i)}catch(r){s.a.debug(r)}}function h(o,r){Object.entries(r).forEach(([i,n])=>{n&&o.searchParams.set(i,n)})}const T=()=>{const{store:o,product:r}=Object(w.a)(),i=new Date().getTime()/1e3;fetch(E.d,{method:"POST",body:JSON.stringify({device_id:Object(m.a)(),meta:{url:window.location.href},product_id:r!=null?r:"",action:E.b.PAGE_VIEW,time:i,store_id:o,category:"price_drop"})})},v=()=>L(void 0,void 0,void 0,function*(){var o,r;let i=null;try{if(window.location.pathname.includes("/products/")){const p=yield fetch(`${window.location.pathname}.json`).then(g=>g.json());i=(r=(o=p==null?void 0:p.product)===null||o===void 0?void 0:o.id)===null||r===void 0?void 0:r.toString()}}catch(n){s.a.debug(n)}return i!=null?i:null}),A=()=>L(void 0,void 0,void 0,function*(){const o=Object(S.a)();if(!o.product&&Object(t.g)(window.Shopify)){const r=yield v();if(typeof r=="string"){o.product=r;const i=document.createElement("div");i.setAttribute("data-app","mm"),i.setAttribute("data-product",r),document.body.appendChild(i)}}return Promise.resolve()});function Q(){var o,r;return L(this,void 0,void 0,function*(){let i=!1;const{store:n,product:p}=Object(w.a)(),g=!Object(t.h)(window.Shopflo),U=typeof((o=window.Shopify)===null||o===void 0?void 0:o.checkout)!="undefined"||g&&new URLSearchParams(window.location.search).get("page")==="thank_you"?"true":"false";let j="false",F=-1;U==="true"&&(j=yield D(),F=(r=+Object(t.c)(window,"Shopflo.order.total_price","0"))!==null&&r!==void 0?r:-1);const V={shop:n,path:window.location.pathname,domain:window.location.host,product:p,app:I.FeaturesAPIApp.MODEMAGIC,hash:window.location.hash,device_id:Object(m.a)(),thankyou:U,shopflo_cod:j,cart_value:`${F}`};i||(T(),i=!0,window==null||window.addEventListener("popstate",()=>{i&&T()}));const b=new URL("https://app.getmodemagic.com/api/features");h(b,V);const c=new XMLHttpRequest;c.addEventListener("load",a.bind(null,c)),window!=null&&window.MMScriptLoaded||(c.open("GET",b.toString(),!0),c.send(),window.MMScriptLoaded=!0)})}const C=()=>L(void 0,void 0,void 0,function*(){var o;window!=null&&window.MMScriptLoaded||(window.MMScriptLoaded=(o=window==null?void 0:window.MMScriptLoaded)!==null&&o!==void 0?o:!1,yield A(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",Q):yield Q())});s.a.debug("[loader] starting initialization"),C(),N.a.init(),N.a.listen(()=>{typeof window!="undefined"&&window.MMScriptLoaded&&typeof window.Shopflo!="undefined"&&new URLSearchParams(window.location.search).get("page")==="thank_you"&&(s.a.debug("[loader] re-initializing as shopflo integration changed query param in thank you page"),window.MMScriptLoaded=!1,C())})}]);})();