(()=>{(function(b){var d={};function e(t){if(d[t])return d[t].exports;var s=d[t]={i:t,l:!1,exports:{}};return b[t].call(s.exports,s,s.exports,e),s.l=!0,s.exports}return e.m=b,e.c=d,e.d=function(t,s,p){e.o(t,s)||Object.defineProperty(t,s,{enumerable:!0,get:p})},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 p=Object.create(null);if(e.r(p),Object.defineProperty(p,"default",{enumerable:!0,value:t}),s&2&&typeof t!="string")for(var f in t)e.d(p,f,function(A){return t[A]}.bind(null,f));return p},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(b,d,e){"use strict";e.d(d,"h",function(){return s}),e.d(d,"d",function(){return p}),e.d(d,"e",function(){return f}),e.d(d,"j",function(){return A}),e.d(d,"g",function(){return w}),e.d(d,"c",function(){return I}),e.d(d,"f",function(){return P}),e.d(d,"i",function(){return L}),e.d(d,"k",function(){return N}),e.d(d,"b",function(){return S}),e.d(d,"a",function(){return D});var t=function(l,E,a,T){function v(O){return O instanceof a?O:new a(function(y){y(O)})}return new(a||(a=Promise))(function(O,y){function x(r){try{o(T.next(r))}catch(i){y(i)}}function C(r){try{o(T.throw(r))}catch(i){y(i)}}function o(r){r.done?O(r.value):v(r.value).then(x,C)}o((T=T.apply(l,E||[])).next())})};function s(l){return typeof l=="undefined"}function p(l){return typeof l=="function"}function f(l){return l===null}const A=(l,E={})=>{if(Number.isFinite(+l))return E;try{return JSON.parse(l)}catch(a){}return E};function w(l){const E=function(){return t(this,void 0,void 0,function*(){})}.constructor;return typeof l=="object"&&!f(l)&&!Array.isArray(l)&&!(l instanceof E)&&l.constructor!=="function"&&Object.prototype.toString.call(l)==="[object Object]"}function I(l,E,a=void 0){if(f(l)||s(l))return a;const v=(E!=null?E:"").replace(/\[([^[\]]*)]/g,".$1.").split(".").filter(O=>O!=="").reduce((O,y)=>O&&O[y],l);return s(v)?a:v}function P(l){return typeof l=="number"&&Number.isFinite(l)}function L(l){return typeof l=="string"&&l.length>0}const N=(l,E="",a)=>{const T=E&&E.length>0?E.split("."):[];let v=l;return T.slice(0,T.length-1).forEach(O=>{let y=v[O];(f(y)||s(y))&&(y={}),v[O]=y,v=v[O]}),v[T.pop()]=a,l};function S(l,E){let a;return(...T)=>{clearTimeout(a),a=setTimeout(()=>{l(...T)},E)}}const D=l=>{var E,a,T;return(T=(a=(E=l.match(/[A-Z]{2,}(?=[A-Z][a-z]+[0-9]*|\b)|[A-Z]?[a-z]+[0-9]*|[A-Z]|[0-9]+/g))===null||E===void 0?void 0:E.map(v=>v.toLowerCase()))===null||a===void 0?void 0:a.join("_"))!==null&&T!==void 0?T:l}},function(b,d,e){(function(t,s){s(d)})(this,function(t){"use strict";var s,p,f,A,w,I,P,L,N,S,D,l,E,a,T;t.AlignValue=void 0,(s=t.AlignValue||(t.AlignValue={})).LEFT="left",s.RIGHT="right",s.CENTER="center",t.AlignPosition=void 0,(p=t.AlignPosition||(t.AlignPosition={})).NATURAL="natural",p.CANVAS="canvas",t.ShapeKind=void 0,(f=t.ShapeKind||(t.ShapeKind={})).CIRCLE="circle",f.RECTANGLE="rectangle",f.POLYGON="polygon",t.ObjectType=void 0,(A=t.ObjectType||(t.ObjectType={})).TEXT="text",A.SHAPE="shape",A.IMAGE="image",A.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,(P=t.ComparisonOp||(t.ComparisonOp={})).GT="gt",P.LT="lt",P.GE="ge",P.LE="le",P.EQ="eq",P.NE="ne",t.ConditionVariable=void 0,(L=t.ConditionVariable||(t.ConditionVariable={})).H="h",L.W="w",L.AR="ar",t.CartUpdateAction=void 0,(N=t.CartUpdateAction||(t.CartUpdateAction={})).ADD_TO_CART="addToCart",N.INCREMENT_QUANTITY="increaseQuantity",N.DECREMENT_QUANTITY="decreaseQuantity",N.UPDATE_QUANTITY="updateQuantity",N.CHANGE_QUANTITY="changeQuantity",N.CHANGE_CART="changeCart",t.WidgetFeature=void 0,(S=t.WidgetFeature||(t.WidgetFeature={})).AUTOMATED_DISCOUNTS="cart_discounts_inclusion",S.MANUAL_DISCOUNT_ALLOCATIONS="allow_manual_discount_allocations",S.PRODUCT_VARIANTS="product_variants",S.EXCLUDE_OOS="exclude_oos",S.TIMER="timer",S.EMBEDDED_PRICE_DROP="embed-price-drop",S.PRODUCT_SELECTION="product_selection",S.RECOMMENDATION_REMINDER="recommendation_reminder",S.QUIZ_TIMER="quiz-timer",S.FS_FLOATING="fullscreen-floating",S.FLOATING_LAUNCHER="floating-launcher",S.SINGLE_SELECTION_DISCOUNT="single_selection_discount",S.EXCLUDE_DOUBLE_SELECTION_DISCOUNT="exclude_double_selection_discount",S.TIERED_DISCOUNT="tiered_discount",S.NO_DEFAULT_SELECTION="no_default_selection",S.PRODUCT_DISCOUNT="product_discount",S.NEW_USER_VIEW="new_user_view",S.TIMED_VIEW="timed_view",S.MOBILE_BOTTOM_DRAWER="mobile_bottom_drawer",S.USER_SPECIFIC="user-specific",S.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,(l=t.WidgetType||(t.WidgetType={})).STORE_BANNER="store",l.PRODUCT_BANNER="product",l.WIDGET="widget",t.InsertType=void 0,(E=t.InsertType||(t.InsertType={})).ABOVE="above",E.BELOW="below",E.REPLACE_CHILDREN="replaceChildren",E.LAST_CHILD="lastChild",E.FIRST_CHILD="firstChild",E.PAGE_TOP="pageTop",E.PAGE_BOTTOM="pageBottom",E.PAGE_HOVER_TOP="pageHoverTop",E.PAGE_HOVER_BOTTOM="pageHoverBottom",E.FLOATING="floating",E.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,(T=t.TargetType||(t.TargetType={})).PAGES="pages",T.PRODUCTS="products",T.COLLECTIONS="collections";var v,O,y,x,C,o,r,i,n,m;t.BreakpointId=void 0,(v=t.BreakpointId||(t.BreakpointId={})).XS="xs",v.M="m",v.L="l",v.XL="xl",t.FloatingPositionTypes=void 0,(O=t.FloatingPositionTypes||(t.FloatingPositionTypes={})).TOP="top",O.RIGHT="right",O.BOTTOM="bottom",O.LEFT="left",t.AddOn=void 0,(y=t.AddOn||(t.AddOn={})).RECOMMENDED="recommended",y.UPSELL="upsell",y.FBT="fbt",t.WidgetEntityState=void 0,(x=t.WidgetEntityState||(t.WidgetEntityState={})).ENABLED="enabled",x.DISABLED="disabled",x.SYSTEM_DISABLED="system_disabled",x.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,(m=t.CheckoutType||(t.CheckoutType={})).SWIFT="swift",m.FASTRR="fastrr",m.DEFAULT="default";var h,U,W,Q;t.ScriptName=void 0,(h=t.ScriptName||(t.ScriptName={})).ANALYTICS="analytics",h.LOADER="loader",h.LOFOODS="lofoods",h.OVERLAY="overlay",h.PREVIEW="preview",h.REPLACE="replace",h.SIDECART="sidecart",h.THANKYOU="thankyou",h.TRUSTBADGES="trustbadges",h.WIDGETS="widgets",h.QUIZ="quiz",t.FeaturesAPIApp=void 0,(U=t.FeaturesAPIApp||(t.FeaturesAPIApp={})).MODEMAGIC="modemagic",U.QUIZ_MASTER="quizmaster",t.CacheEntryVersion=void 0,(W=t.CacheEntryVersion||(t.CacheEntryVersion={})).ONE="1.0",W.TWO="2.0",t.TBAlign=void 0,(Q=t.TBAlign||(t.TBAlign={})).CENTER="center",Q.RIGHT="right",Q.LEFT="left",t.LauncherPositions={BOTTOM_LEFT:"bottomLeft",BOTTOM_RIGHT:"bottomRight"},t.Platforms={SHOPIFY:"shopify",BIGCOMMERCE:"bigcommerce",UNKNOWN:"--unknown--"}})},function(b,d,e){"use strict";e.d(d,"a",function(){return p});var t=e(4);const p=["info","debug","error","log","group","groupEnd"].reduce((f,A)=>(f[A]=(...w)=>{t.h||window.console[A](...w)},f),{})},,function(b,d,e){"use strict";(function(t){e.d(d,"h",function(){return P}),e.d(d,"a",function(){return N}),e.d(d,"f",function(){return l}),e.d(d,"j",function(){return y}),e.d(d,"e",function(){return o}),e.d(d,"b",function(){return i}),e.d(d,"c",function(){return n}),e.d(d,"d",function(){return m}),e.d(d,"i",function(){return h}),e.d(d,"g",function(){return W}),e.d(d,"k",function(){return Q});var s=e(2),p=e(5),f,A,w,I;const P=((f=t==null?void 0:{USER_FEATURES_API:"https://app.getmodemagic.com/api/features",APP_URL:"https://app.getmodemagic.com",NODE_ENV:"production"})===null||f===void 0?void 0:f.NODE_ENV)==="production",L=((A=t==null?void 0:{USER_FEATURES_API:"https://app.getmodemagic.com/api/features",APP_URL:"https://app.getmodemagic.com",NODE_ENV:"production"})===null||A===void 0?void 0:A.NODE_ENV)==="test",N=(I=(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)!==null&&I!==void 0?I:"development",S=["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"],D=new Set(S),l=new RegExp(`((.${S.join("|.")})+)$`,"i"),E=["pico","icon","thumb","small","compact","medium","large","grande","original","master"],a=["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})|(?:${E.join("|")})))?(_crop_(?:${a.join("|")}))?(@[23]x)?(.(?:${T.join("|")}))?$`),O=(()=>{let u=[];return c=>{let g=c.replace(/\.([^.]+?)$/,"");u=g.split(".");let R=-1;for(let M=0;M0?R:void 0).join("."),g}})(),y=(()=>{const u={};return c=>{const g=u[c];if(typeof g=="string")return g;let R=c;R=R.replace(/\?v=.*/g,"");const F=O(R).match(v);if(F){const{index:B=0}=F,j=R.slice(0,B),_=R.slice(B+F[0].length);R=`${j}${_}`}return u[c]=R,R}})(),x=(()=>{const u={};return c=>{let g=u[c];return typeof g=="string"||(g=O(c),u[c]=g),g}})();function C(u,c){return x(u)===x(c)}function o(u,c){return c.find(g=>C(u,g))||""}function r(u){var c,g;return(g=(c=u.split("/").pop())===null||c===void 0?void 0:c.split("?"))===null||g===void 0?void 0:g[0]}const i=(()=>{const u=new Map([]);return(c,g)=>{var R;if(u.has(c))return u.get(c);const M=y(c),F=M.match(l);if(!c.startsWith("/")&&Array.isArray(F)&&F.length>0){const B=r(M);if(typeof B=="string"){const j=`${g}/${B}`;u.set(c,j)}}return(R=u.get(c))!==null&&R!==void 0?R:c}})();function n(u,c="/cdn"){return`${u}${c}`}function m(){const{store:u}=Object(p.b)(),c=window.location.pathname;return c.match(/^\/(?:[a-z]{2})?$/)?"home":c.match(/\/products\/.+?$/)?"product":c.match(/\/pages\/.+?$/)?"page":c.includes("collection")||c.includes("search")?"collection":u==="venustahome"&&c.includes("campaign")?"home":"_not_supported_"}const h=window.modeMagicPreviewSettings||window.modeMagicSettings||{},U=u=>{const c=M=>{const{visibility:F,display:B,opacity:j}=getComputedStyle(M);return!(document.hidden||F==="hidden"||B==="none"||+j==0)};let g=u,R=c(g);for(;R&&g.parentElement;)g=g.parentElement,R=c(g);return R},W=(u,{areaCheck:c}={areaCheck:!0})=>{if(!U(u))return!1;const{top:g,left:R,bottom:M,right:F}=u.getBoundingClientRect(),B={x:0,y:0},j={x:window.innerWidth||document.documentElement.clientWidth,y:window.innerHeight||document.documentElement.clientHeight},_=($,K)=>{const z=B[$],Y=j[$];return KY?Y:K},V=_("y",M)-_("y",g),G=_("x",F)-_("x",R),H=V*G;return c?H>0:V>0||G>0},Q=u=>{let{logs:c}=u!=null?u:{};c||({logs:c}=u==null?void 0:u.constructor);let g=["",""];return c&&(g=[Object.keys(c).reduce((R,M)=>`${R}${M}: ${c[M]}; `,""),"background-color: rgb(76, 136, 255);color:white;","color: rgb(76, 136, 255)"]),P||L?u:new Proxy(u,{get(R,M,F){const B=Reflect.get(R,M,F);return typeof B=="function"?function(...j){var _,V;const G=`%c[${(_=u==null?void 0:u.name)!==null&&_!==void 0?_:(V=u==null?void 0:u.constructor)===null||V===void 0?void 0:V.name}]%c[${M.toString()}]%c: `;s.a.group(G,...g),j.length>0&&s.a.debug("Called with: ",...j);const H=B.apply(this,j);return s.a.debug("Returning",H),s.a.groupEnd(),H}:B}})}}).call(this,e(15))},function(b,d,e){"use strict";e.d(d,"a",function(){return p}),e.d(d,"b",function(){return f});var t=e(0),s=e(10);const p={SHOPIFY:"shopify",BIGCOMMERCE:"bigcommerce",UNKNOWN:"--unknown--"},f=()=>{var A,w,I;const P={cart:null,platform:p.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({},P),window.__store_context__)),Object(t.g)(window.Shopify)){const L=Object(s.a)(),N=window.Shopify.shop.split(".")[0];Object.assign(window.__store_context__,{platform:p.SHOPIFY,store:N,dumps:{},currency:{active_currency_code:(w=(A=window.Shopify.currency)===null||A===void 0?void 0:A.active)!==null&&w!==void 0?w:"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:N,channel_id:1},cart:null,urls:{home:(I=window.Shopify.routes)===null||I===void 0?void 0:I.root},product:L.product})}return window.__store_context__}return P}},function(b,d,e){"use strict";e.d(d,"d",function(){return l}),e.d(d,"b",function(){return a}),e.d(d,"c",function(){return T}),e.d(d,"a",function(){return x});const t="__SECRET_INTERNALS_DO_NOT_USE__";var s=e(12),p=e(4),f=e(2),A=e(7),w=e(0),I=e(11),P=e(13),L=e(5),N=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{f.a.debug("MM:Clearing impressions cache"),o.impressionsCache=new Set,o.viewsCache=new Set,o.stats=v}),o.addOrderCompletionListener()}addOrderCompletionListener(){window.addEventListener("message",o=>{const{data:r}=o,{messageType:i,messageData:{actionType:n}={}}=r,m=Object(w.c)(r,"messageAuth.source",null),h=Object(w.c)(r,"messageData.payload.order",null),{id:U,line_items:W=[],cart_token:Q="",email:u="",customer:c,customer_locale:g=""}=h!=null?h:{},{id:R=-1}=c!=null?c:{};i==="MODEMAGIC_CONVERSION_EVENT"&&n==="ORDER_CREATE"&&!Object(w.e)(m)&&D.has(m)&&!Object(w.h)(U)&&Object(I.b)({email:u,orderId:U,customerId:R,cartToken:Q,customerLocale:g,source:m!=null?m:void 0,lineItems:W})})}flushQueue(){var o,r,i;const n=y.getInstance(),m=n.eventQueue.get(O.FLUSH_QUEUE);if(!Object(w.e)(m)&&!Object(w.h)(m)){const U=new Date().getTime();if(U-m.queued>n.queWaitTime){if(m.counter>=n.maxRetries){n.eventQueue.set(O.ACTIVE_QUEUE,[...(o=n.eventQueue.get(O.ACTIVE_QUEUE))!==null&&o!==void 0?o:[],...m.events]),n.eventQueue.set(O.FLUSH_QUEUE,void 0),n.flushQueue();return}n.eventQueue.set(O.FLUSH_QUEUE,Object.assign(Object.assign({},m),{queued:new Date().getTime(),counter:m.counter+1}))}else{if(n.retryQueTimeout!==-1)return;const W=n.queWaitTime-(U-m.queued)+1e3;n.retryQueTimeout=window.setTimeout(()=>{n.retryQueTimeout=-1,n.flushQueue()},W);return}}else{const U=(r=n.eventQueue.get(O.ACTIVE_QUEUE))!==null&&r!==void 0?r:[];Array.isArray(U)&&U.length>0&&(n.eventQueue.set(O.ACTIVE_QUEUE,[]),n.eventQueue.set(O.FLUSH_QUEUE,{events:U,queued:new Date().getTime(),counter:1}))}const h=(i=n.eventQueue.get(O.FLUSH_QUEUE))===null||i===void 0?void 0:i.events;if(Array.isArray(h)&&h.length>0){const U=JSON.stringify(h);fetch(l,{method:"POST",body:U}).then(()=>{n.eventQueue.set(O.FLUSH_QUEUE,void 0)}).catch(()=>{})}}queueEvent(o){var r;const i=y.getInstance(),n=[...(r=i.eventQueue.get(O.ACTIVE_QUEUE))!==null&&r!==void 0?r:[],o];i.eventQueue.set(O.ACTIVE_QUEUE,n),i.queTimeout>0&&(window.clearTimeout(i.queTimeout),i.queTimeout=-1),n.length>=E?i.flushQueue():i.queTimeout=window.setTimeout(()=>{i.flushQueue()},1e3)}raiseEvent(o){const{store:r}=Object(L.b)(),{appName:i=P.a,entity:n,eventType:m,data:h,element:U}=o,W=h!=null?h:{},{product:Q,storyboard:u,template:c,impressionsData:g,widgets:R,playbookId:M}=W,F=N(W,["product","storyboard","template","impressionsData","widgets","playbookId"]),B=new Date().getTime()/1e3,j=y.getInstance();j.stats[m]+=1,j.log(n,m,h,U),j.queueEvent(Object.assign(Object.assign({app_name:i,store_id:r,product_id:Q,storyboard_id:u,widget_ids:R,template_id:c,category:n,action:m,time:B,playbook_id:M,device_id:Object(A.a)()},F),g))}log(o,r,i,n){f.a.debug(`MM:${o}:${r}`),n&&f.a.debug("src element: ",n),f.a.debug("data: ",JSON.stringify(i)),f.a.debug("stats: ",JSON.stringify(y.getInstance().stats))}click(o){const{entity:r,element:i,data:n,appName:m}=o;y.getInstance().raiseEvent({appName:m,entity:r,eventType:a.CLICK,data:n,element:i})}impression(o){const{entity:r,element:i,data:n,appName:m}=o,h=y.getInstance();h.impressionsCache.has(i)||(h.raiseEvent({appName:m,entity:r,eventType:a.IMPRESSION,data:n,element:i}),h.impressionsCache.add(i))}view(o){const{entity:r,element:i,data:n,appName:m}=o,h=y.getInstance();h.viewsCache.has(i)||(h.raiseEvent({appName:m,entity:r,eventType:a.VIEW,data:n,element:i}),h.viewsCache.add(i))}hide(o){const{entity:r,element:i,data:n,appName:m}=o;y.getInstance().raiseEvent({appName:m,entity:r,eventType:a.HIDE,data:n,element:i})}conversion(o){const{data:r,appName:i}=o;y.getInstance().raiseEvent({appName:i,entity:T.WIDGET,eventType:a.CONVERSION,data:r})}}const x=y.getInstance()},function(b,d,e){"use strict";e.d(d,"a",function(){return p});var t=e(0);const s="mm.userDeviceID",p=()=>{const f=window.localStorage.getItem(s);if(Object(t.e)(f)){const A=JSON.stringify(performance.now())+Math.random().toString(36).substring(2,11);return window.localStorage.setItem(s,A),A}return f}},,,function(b,d,e){"use strict";e.d(d,"a",function(){return t});function t(){const s=document.querySelectorAll("[data-app='mm']");let p={};return s.forEach(f=>{p=Object.assign(Object.assign({},p),f.dataset)}),p}},function(b,d,e){"use strict";e.d(d,"a",function(){return p}),e.d(d,"b",function(){return f});var t=e(6),s=e(0);const p={swift:!0,shopflo:!0,fastrr:!0};function f(A){const{customerLocale:w,customerId:I,orderId:P,lineItems:L,email:N,cartToken:S,source:D}=A,l=L.reduce((E,{properties:a={}})=>{const T=a.__mmWidget,v=Object(s.j)(T,null);return v!==null&&!Array.isArray(v)&&typeof v=="object"&&E.push(v),E},[]);t.a.conversion({appName:"shopify",data:{widgets:l,meta:{source:D,line_items:L,order:P,cartToken:S,src:window.location.href,customer:{id:I,locale:w,email:N}},impressionsData:{apply_type:"manual"}}})}},function(b,d,e){"use strict";e.d(d,"a",function(){return s});var t=e(0);class s{constructor(f=!0){this.sessionKey="",this.cache=new Map,this.persistent=!0,this.persistent=!!f}init(f){this.sessionKey=`${f}-cache`,this.cache=new Map(Object(t.j)(this.persistent?window.localStorage.getItem(this.sessionKey):window.sessionStorage.getItem(this.sessionKey),[]))}get(f){return this.cache.get(f)}set(f,A){if(this.cache.set(f,A),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(b,d,e){"use strict";e.d(d,"a",function(){return t});const t="-- empty --"},,function(b,d){var e=b.exports={},t,s;function p(){throw new Error("setTimeout has not been defined")}function f(){throw new Error("clearTimeout has not been defined")}(function(){try{typeof setTimeout=="function"?t=setTimeout:t=p}catch(a){t=p}try{typeof clearTimeout=="function"?s=clearTimeout:s=f}catch(a){s=f}})();function A(a){if(t===setTimeout)return setTimeout(a,0);if((t===p||!t)&&setTimeout)return t=setTimeout,setTimeout(a,0);try{return t(a,0)}catch(T){try{return t.call(null,a,0)}catch(v){return t.call(this,a,0)}}}function w(a){if(s===clearTimeout)return clearTimeout(a);if((s===f||!s)&&clearTimeout)return s=clearTimeout,clearTimeout(a);try{return s(a)}catch(T){try{return s.call(null,a)}catch(v){return s.call(this,a)}}}var I=[],P=!1,L,N=-1;function S(){!P||!L||(P=!1,L.length?I=L.concat(I):N=-1,I.length&&D())}function D(){if(!P){var a=A(S);P=!0;for(var T=I.length;T;){for(L=I,I=[];++N1)for(var v=1;v{const[,,w]=A;p.apply(f,A),t.listeners.forEach(I=>typeof w=="string"&&I(w.split("?")[1]||""))}})}static listen(p){t.unlisten(p),t.listeners.push(p)}static unlisten(p){t.listeners=t.listeners.filter(f=>f!==p)}}t.listeners=[]},,,,,,function(b,d,e){"use strict";e.r(d),e.d(d,"addFeatureSettings",function(){return l});var t=e(0),s=e(2),p=e(7),f=e(6),A=e(10),w=e(5),I=e(1),P=e.n(I),L=e(16),N=function(o,r,i,n){function m(h){return h instanceof i?h:new i(function(U){U(h)})}return new(i||(i=Promise))(function(h,U){function W(c){try{u(n.next(c))}catch(g){U(g)}}function Q(c){try{u(n.throw(c))}catch(g){U(g)}}function u(c){c.done?h(c.value):m(c.value).then(W,Q)}u((n=n.apply(o,r||[])).next())})};const S="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(S)?"true":"false")}},100)});function l(o,r,i="modeMagic"){const n=`${i}Settings`;typeof window[n]=="undefined"&&(window[n]={}),typeof r!="undefined"&&(window[n][o]=r)}function E(o){o.forEach(({name:r,src:i,data:n})=>{l(r,n,"modeMagic");const m=document.createElement("script");m.setAttribute("data-mm-script",r),m.setAttribute("type","text/javascript"),m.setAttribute("src",i),m.setAttribute("fetchPriority","high"),document.body.appendChild(m)})}function a(o){try{const i=JSON.parse(o.responseText).data;E(i)}catch(r){s.a.debug(r)}}function T(o,r){Object.entries(r).forEach(([i,n])=>{n&&o.searchParams.set(i,n)})}const v=()=>{const{store:o,product:r}=Object(w.b)(),i=new Date().getTime()/1e3;fetch(f.d,{method:"POST",body:JSON.stringify({device_id:Object(p.a)(),meta:{url:window.location.href},product_id:r!=null?r:"",action:f.b.PAGE_VIEW,time:i,store_id:o,category:"price_drop"})})},O=()=>N(void 0,void 0,void 0,function*(){var o,r;let i=null;try{const n=yield fetch(`${window.location.pathname}.json`).then(m=>m.json());i=(r=(o=n==null?void 0:n.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}),y=()=>N(void 0,void 0,void 0,function*(){const o=Object(A.a)();if(!o.product&&Object(t.g)(window.Shopify)){const r=yield O();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 x(){var o,r;return N(this,void 0,void 0,function*(){let i=!1;const{store:n,product:m}=Object(w.b)(),h=!Object(t.h)(window.Shopflo),U=typeof((o=window.Shopify)===null||o===void 0?void 0:o.checkout)!="undefined"||h&&new URLSearchParams(window.location.search).get("page")==="thank_you"?"true":"false";let W="false",Q=-1;U==="true"&&(W=yield D(),Q=(r=+Object(t.c)(window,"Shopflo.order.total_price","0"))!==null&&r!==void 0?r:-1);const u={shop:n,path:window.location.pathname,domain:window.location.host,product:m,app:I.FeaturesAPIApp.MODEMAGIC,hash:window.location.hash,device_id:Object(p.a)(),thankyou:U,shopflo_cod:W,cart_value:`${Q}`};i||(v(),i=!0,window==null||window.addEventListener("popstate",()=>{i&&v()}));const c=new URL("https://app.getmodemagic.com/api/features");T(c,u);const g=new XMLHttpRequest;g.addEventListener("load",a.bind(null,g)),window!=null&&window.MMScriptLoaded||(g.open("GET",c.toString(),!0),g.send(),window.MMScriptLoaded=!0)})}const C=()=>N(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 y(),document.readyState==="loading"?document.addEventListener("DOMContentLoaded",C):yield x())});s.a.debug("[loader] starting initialization"),C(),L.a.init(),L.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())})}]);})();