(function(shopify) { (()=>{var Ue=Object.defineProperty,Me=Object.defineProperties;var De=Object.getOwnPropertyDescriptors;var ge=Object.getOwnPropertySymbols;var Ge=Object.prototype.hasOwnProperty,Le=Object.prototype.propertyIsEnumerable;var ye=(t,i,c)=>i in t?Ue(t,i,{enumerable:!0,configurable:!0,writable:!0,value:c}):t[i]=c,I=(t,i)=>{for(var c in i||(i={}))Ge.call(i,c)&&ye(t,c,i[c]);if(ge)for(var c of ge(i))Le.call(i,c)&&ye(t,c,i[c]);return t},W=(t,i)=>Me(t,De(i));var Ae="WebPixel::Render";var j=t=>shopify.extend(Ae,t);var ve=!1,x=null;function Ye(t){let i=0;if(t.length===0)return i.toString();for(let c=0;cMath.random()*100}function b(t){return ve||(ve=!0,ze()),be[t].enabled}var be={0:{percent:0,enabled:!1},1:{percent:0,enabled:!1},2:{percent:100,enabled:!1},3:{percent:100,enabled:!0},4:{percent:0,enabled:!1},5:{percent:1,enabled:!1},6:{percent:0,enabled:!1,allowlist:new Set(["-277581468","-1995663228"])}};var qe="developer_id.dYmNjMT",S="dNzYwYj";function Fe(t){let i=t.init.customerPrivacy;if(i===void 0||i.marketingAllowed||i.analyticsProcessingAllowed)Te(t,i);else{let c=!1;t.customerPrivacy.subscribe("visitorConsentCollected",A=>{let T=A.customerPrivacy;!c&&(T.marketingAllowed||T.analyticsProcessingAllowed)&&(Te(t,T),c=!0)})}}function Te(t,i){var X,Z,J,V,K,Q,h,k,ee,te,ne,ae,re,ie,oe;let c=window.dataLayer=window.dataLayer||[],A=JSON.parse(t.settings.config),T=[],Pe=(J=(Z=(X=t.init)==null?void 0:X.data)==null?void 0:Z.shop)==null?void 0:J.myshopifyDomain;if(Re(Pe),A.google_tag_ids&&A.google_tag_ids.length>0){let e=A.google_tag_ids;T.push(...e)}else T.push(A.pixel_id);let u=window.gtag=window.gtag||function(){c.push(arguments)};i&&(u("consent","default",we(i)),u("set",Ne(i))),M(t)&&(u("set",{ignore_referrer:"true"}),u("policy","detect_click_events",()=>!1),u("policy","detect_element_visibility_events",()=>!1),u("policy","detect_history_change_events",()=>!1),u("policy","detect_link_click_events",()=>!1),u("policy","detect_timer_events",()=>!1),u("policy","detect_youtube_activity_events",()=>!1),u("policy","detect_scroll_events",()=>!1),b(5)||(u("policy","detect_form_submit_events",()=>!1),u("policy","detect_form_interaction_events",()=>!1))),u("policy","internal_sw_allowed",()=>!1),u("policy","inject_cmp_banner",()=>!1),u("set",qe,!0),u("js",new Date);let B={send_page_view:!1};M(t)&&(B.ignore_referrer="true");for(let e of T){let r=document.createElement("script");r.src=`https://www.googletagmanager.com/gtag/js?id=${e}`,document.body.appendChild(r),u("config",e,B)}let w=A.gtag_events,P=e=>{var r;return"shopify_"+(A.target_country||"US")+"_"+String((r=e==null?void 0:e.product)==null?void 0:r.id)+"_"+String(e==null?void 0:e.id)},U=e=>{let r=e==null?void 0:e.title;return["default","title","default title",""].includes(String(r).toLowerCase())?null:r},H=e=>{var E,f,p,a,g,m,v,R,l,_,F,y;let n={value:(E=e==null?void 0:e.subtotalPrice)==null?void 0:E.amount},s=(p=(f=e==null?void 0:e.totalPrice)==null?void 0:f.amount)!=null?p:0;s-=(g=(a=e==null?void 0:e.totalTax)==null?void 0:a.amount)!=null?g:0,s-=(R=(v=(m=e==null?void 0:e.shippingLine)==null?void 0:m.price)==null?void 0:v.amount)!=null?R:0;let d=0,o=(l=e==null?void 0:e.lineItems)!=null?l:[];for(let C of o){let N=(F=(_=C.variant)==null?void 0:_.price.amount)!=null?F:0;N*=C.quantity;for(let O of C.discountAllocations)N-=(y=O.amount.amount)!=null?y:0;d+=N}return b(3)&&(n.google_analysis_params={lineItemValue:d,totalPriceValue:s}),n},z=(e,r)=>r?`${e} - ${r}`:e,Oe=(e,r)=>{var n;if(e==="/search"){let s=(n=document.querySelector("link[rel='canonical']"))==null?void 0:n.getAttribute("href");if(s)return s}return r},$=e=>e&&e.endsWith("thank_you"),Ie=(e,r,n)=>$(e)?z(r,n):r,q=e=>{var r,n,s,d,o,E,f;return{email:e==null?void 0:e.email,phone_number:e==null?void 0:e.phone,address:{first_name:(r=e==null?void 0:e.billingAddress)==null?void 0:r.firstName,last_name:(n=e==null?void 0:e.billingAddress)==null?void 0:n.lastName,street:(s=e==null?void 0:e.billingAddress)==null?void 0:s.address1,city:(d=e==null?void 0:e.billingAddress)==null?void 0:d.city,region:(o=e==null?void 0:e.billingAddress)==null?void 0:o.province,postal_code:(E=e==null?void 0:e.billingAddress)==null?void 0:E.zip,country:(f=e==null?void 0:e.billingAddress)==null?void 0:f.country}}},Se=(e,r)=>{var d,o,E,f,p,a,g,m,v,R,l,_,F;let n=(d=r.data)==null?void 0:d.checkout;return I(W(I({send_to:e,developer_id:{[S]:!0},transaction_id:(o=n==null?void 0:n.order)==null?void 0:o.id,new_customer:((f=(E=n==null?void 0:n.order)==null?void 0:E.customer)==null?void 0:f.isFirstOrder)==null||(a=(p=n==null?void 0:n.order)==null?void 0:p.customer)==null?void 0:a.isFirstOrder},H(n)),{customer_type:We((m=(g=n==null?void 0:n.order)==null?void 0:g.customer)==null?void 0:m.isFirstOrder),currency:((v=n==null?void 0:n.subtotalPrice)==null?void 0:v.currencyCode)||"USD",tax:(R=n==null?void 0:n.totalTax)==null?void 0:R.amount,shipping:(_=(l=n==null?void 0:n.shippingLine)==null?void 0:l.price)==null?void 0:_.amount,items:(F=n==null?void 0:n.lineItems)==null?void 0:F.map(y=>{var C,N,O,D,G,L,se,le,de,_e,ue,Ee,ce,me,fe,pe;return{id:P(y.variant),name:b(6)?(N=(C=y.variant)==null?void 0:C.product)==null?void 0:N.title:Ie((G=(D=(O=r.context)==null?void 0:O.window)==null?void 0:D.location)==null?void 0:G.pathname,(se=(L=y.variant)==null?void 0:L.product)==null?void 0:se.title,U(y.variant)),brand:(de=(le=y.variant)==null?void 0:le.product)==null?void 0:de.vendor,category:(ue=(_e=y.variant)==null?void 0:_e.product)==null?void 0:ue.type,coupon:(me=(ce=(Ee=y.discountAllocations)==null?void 0:Ee[0])==null?void 0:ce.discountApplication)==null?void 0:me.title,price:(pe=(fe=y.variant)==null?void 0:fe.price)==null?void 0:pe.amount,quantity:y.quantity,variant:U(y.variant)}}),user_data:q(n)}),!b(2)&&M(t)&&{ignore_referrer:"true"})},Y={email:(Q=(K=(V=t.init)==null?void 0:V.data)==null?void 0:K.customer)==null?void 0:Q.email,phone_number:(ee=(k=(h=t.init)==null?void 0:h.data)==null?void 0:k.customer)==null?void 0:ee.phone,address:{first_name:(ae=(ne=(te=t.init)==null?void 0:te.data)==null?void 0:ne.customer)==null?void 0:ae.firstName,last_name:(oe=(ie=(re=t.init)==null?void 0:re.data)==null?void 0:ie.customer)==null?void 0:oe.lastName}};t.analytics.subscribe("page_viewed",e=>{var n,s,d,o,E,f,p,a;let r=w.find(g=>g.type==="page_view");if(r&&r.action_label){let g=(d=(s=(n=e.context)==null?void 0:n.window)==null?void 0:s.location)==null?void 0:d.pathname,m=I({send_to:r.action_label,developer_id:{[S]:!0},page_path:g,page_title:je((E=(o=e.context)==null?void 0:o.document)==null?void 0:E.title,g),page_location:Oe(g,(a=(p=(f=e.context)==null?void 0:f.window)==null?void 0:p.location)==null?void 0:a.href),user_data:Y},!b(2)&&M(t)&&{ignore_referrer:"true"});u("event","page_view",m)}}),t.analytics.subscribe("product_viewed",e=>{var n,s,d,o,E,f,p;let r=w.find(a=>a.type==="view_item");if(r&&r.action_label){let a=(n=e.data)==null?void 0:n.productVariant;u("event","view_item",{send_to:r.action_label,developer_id:{[S]:!0},ecomm_prodid:[P(a)],ecomm_totalvalue:(s=a==null?void 0:a.price)==null?void 0:s.amount,ecomm_pagetype:"product",items:[{id:P(a),name:b(6)?(d=a==null?void 0:a.product)==null?void 0:d.title:z((o=a==null?void 0:a.product)==null?void 0:o.title,U(a)),brand:(E=a==null?void 0:a.product)==null?void 0:E.vendor,category:(f=a==null?void 0:a.product)==null?void 0:f.type,price:(p=a==null?void 0:a.price)==null?void 0:p.amount,variant:U(a)}],user_data:Y})}}),t.analytics.subscribe("product_added_to_cart",e=>{var n,s,d,o,E,f,p,a,g,m,v,R;let r=w.find(l=>l.type==="add_to_cart");if(r&&r.action_label){let l=(n=e.data)==null?void 0:n.cartLine,_=l==null?void 0:l.merchandise;u("event","add_to_cart",{send_to:r.action_label,developer_id:{[S]:!0},ecomm_prodid:[P(l==null?void 0:l.merchandise)],ecomm_totalvalue:(d=(s=l==null?void 0:l.cost)==null?void 0:s.totalAmount)==null?void 0:d.amount,ecomm_pagetype:"cart",value:(E=(o=l==null?void 0:l.cost)==null?void 0:o.totalAmount)==null?void 0:E.amount,currency:((p=(f=l==null?void 0:l.cost)==null?void 0:f.totalAmount)==null?void 0:p.currencyCode)||"USD",items:[{id:P(_),name:b(6)?(a=_==null?void 0:_.product)==null?void 0:a.title:z((g=_==null?void 0:_.product)==null?void 0:g.title,U(_)),brand:(m=_==null?void 0:_.product)==null?void 0:m.vendor,category:(v=_==null?void 0:_.product)==null?void 0:v.type,price:(R=_==null?void 0:_.price)==null?void 0:R.amount,quantity:l==null?void 0:l.quantity,variant:U(_)}],user_data:Y})}}),t.analytics.subscribe("checkout_completed",e=>{var s,d,o;let r=[],n=w.find(E=>E.type==="purchase");Ce(n,r),b(4)&&!$((o=(d=(s=e.context)==null?void 0:s.window)==null?void 0:d.location)==null?void 0:o.pathname)&&(n=w.find(E=>E.type==="purchase_new_page_only"),Ce(n,r)),r.length>0&&u("event","purchase",Se(r,e))}),t.analytics.subscribe("checkout_started",e=>{var n,s,d,o,E,f,p;let r=w.find(a=>a.type==="begin_checkout");if(r&&r.action_label){let a=(n=e.data)==null?void 0:n.checkout,g=I(W(I({send_to:r.action_label,developer_id:{[S]:!0},ecomm_prodid:(s=a==null?void 0:a.lineItems)==null?void 0:s.map(m=>P(m.variant)),ecomm_totalvalue:(d=a==null?void 0:a.subtotalPrice)==null?void 0:d.amount,ecomm_pagetype:"cart"},H(a)),{currency:((o=a==null?void 0:a.subtotalPrice)==null?void 0:o.currencyCode)||"USD",coupon:(f=(E=a==null?void 0:a.discountApplications)==null?void 0:E[0])==null?void 0:f.title,items:(p=a==null?void 0:a.lineItems)==null?void 0:p.map(m=>{var v,R,l,_,F,y,C,N,O,D,G,L;return{id:P(m.variant),name:(R=(v=m.variant)==null?void 0:v.product)==null?void 0:R.title,brand:(_=(l=m.variant)==null?void 0:l.product)==null?void 0:_.vendor,category:(y=(F=m.variant)==null?void 0:F.product)==null?void 0:y.type,coupon:(O=(N=(C=m.discountAllocations)==null?void 0:C[0])==null?void 0:N.discountApplication)==null?void 0:O.title,price:(G=(D=m.variant)==null?void 0:D.price)==null?void 0:G.amount,quantity:m.quantity,variant:(L=m.variant)==null?void 0:L.title}}),user_data:q(a)}),!b(2)&&M(t)&&{ignore_referrer:"true"});u("event","begin_checkout",g)}}),t.analytics.subscribe("search_submitted",e=>{var n,s;let r=w.find(d=>d.type==="search");r&&r.action_label&&u("event","search",{send_to:r.action_label,developer_id:{[S]:!0},search_term:(s=(n=e.data)==null?void 0:n.searchResult)==null?void 0:s.query,user_data:Y})}),t.analytics.subscribe("payment_info_submitted",e=>{var n,s,d;let r=w.find(o=>o.type==="add_payment_info");if(r&&r.action_label){let o=(n=e.data)==null?void 0:n.checkout,E=I({send_to:r.action_label,developer_id:{[S]:!0},currency:((s=o==null?void 0:o.totalPrice)==null?void 0:s.currencyCode)||"USD",total:(d=o==null?void 0:o.totalPrice)==null?void 0:d.amount,user_data:q(o)},!b(2)&&M(t)&&{ignore_referrer:"true"});u("event","add_payment_info",E)}}),t.customerPrivacy.subscribe("visitorConsentCollected",e=>{let r=e.customerPrivacy;u("consent","update",we(r)),u("set",Ne(r))})}function Ce(t,i){if(t&&t.action_label){let c=Array.isArray(t.action_label)?t.action_label:[t.action_label];for(let A of c)i.includes(A)||i.push(A)}}function Ne(t){return{restricted_data_processing:!t.saleOfDataAllowed}}function we(t){return{ad_storage:t.marketingAllowed?"granted":"denied",ad_user_data:t.marketingAllowed?"granted":"denied",ad_personalization:t.marketingAllowed?"granted":"denied",analytics_storage:t.analyticsProcessingAllowed?"granted":"denied"}}function We(t){if(t!=null)return t?"new":"returning"}function M(t){var i;return((i=t==null?void 0:t._pixelInfo)==null?void 0:i.surfaceNext)==="checkout"}function je(t,i){if(!i)return t;let c=[["/information","Checkout - Contact Information"],["/shipping","Checkout - Shipping"],["/payment","Checkout - Payment"],["/review","Checkout - Review"],["/processing","Checkout - Processing"],["/thank-you","Checkout - Receipt"],["/stock-problems","Checkout - Stock problems"],["/error","Checkout - Error"]];for(let[A,T]of c)if(i.endsWith(A))return T;return/^\/checkouts\/[A-Za-z0-9]+\/[A-Za-z0-9]+$/.test(i)?"Checkout - Contact Information":t}j(Fe);})(); })(self.webPixelsManager.createShopifyExtend('812712153', 'app'));