!function(t){var n={};function e(o){if(n[o])return n[o].exports;var r=n[o]={i:o,l:!1,exports:{}};return t[o].call(r.exports,r,r.exports,e),r.l=!0,r.exports}e.m=t,e.c=n,e.d=function(t,n,o){e.o(t,n)||Object.defineProperty(t,n,{enumerable:!0,get:o})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},e.t=function(t,n){if(1&n&&(t=e(t)),8&n)return t;if(4&n&&"object"==typeof t&&t&&t.__esModule)return t;var o=Object.create(null);if(e.r(o),Object.defineProperty(o,"default",{enumerable:!0,value:t}),2&n&&"string"!=typeof t)for(var r in t)e.d(o,r,function(n){return t[n]}.bind(null,r));return o},e.n=function(t){var n=t&&t.__esModule?function(){return t.default}:function(){return t};return e.d(n,"a",n),n},e.o=function(t,n){return Object.prototype.hasOwnProperty.call(t,n)},e.p="",e(e.s=10)}({0:function(t,n){var e;e=function(){return this}();try{e=e||new Function("return this")()}catch(t){"object"==typeof window&&(e=window)}t.exports=e},10:function(t,n,e){(function(t){((n,e)=>{if(!n)return;const{currency:o,products:r,purchase:i,add_to_cart:c,eventsToTrack:l}=(null===(e=t._googlesitekit)||void 0===e?void 0:e.wcdata)||{},u=null==l?void 0:l.includes("add_to_cart"),a=null==l?void 0:l.includes("purchase");if(c&&u){var d,s;const{price:n}=c,e=v(n,o,c);null===(d=t._googlesitekit)||void 0===d||null===(s=d.gtagEvent)||void 0===s||s.call(d,"add_to_cart",e)}if(i&&a){var p,f;const{id:n,totals:e,items:o}=i,r=v(e.total_price,e.currency_code,o,n,e.shipping_total,e.tax_total);null===(p=t._googlesitekit)||void 0===p||null===(f=p.gtagEvent)||void 0===f||f.call(p,"purchase",r)}const _=n("body");function v(t,n,e,o=null,r=null,i=null){const c={value:y(t),currency:n,items:[]};if(o&&(c.transaction_id=o),"number"==typeof r&&(c.shipping=r),"number"==typeof i&&(c.tax=i),e&&e.length)for(const t of e)c.items.push(g(t));else e&&e.id&&(c.items=[g(e)]);return c}function g(t){const{id:n,name:e,price:o,variation:r,quantity:i,categories:c}=t,l={item_id:n,item_name:e,price:y(o)};if(i&&(l.quantity=i),r&&(l.item_variant=r),c&&(null==c?void 0:c.length)){let t=1;for(const n of c)l[t>1?"item_category"+t:"item_category"]=n.name,t++}return l}function y(t,n=2){return parseInt(t,10)/10**n}u&&(_.on("added_to_cart",(n,e,i,c)=>{var l,u;const a=parseInt(c.data("product_id"),10);if(!a)return;const d=(null==r?void 0:r.find(t=>(null==t?void 0:t.id)===a))||{},{price:s}=d,p=v(s,o,d);null===(l=t._googlesitekit)||void 0===l||null===(u=l.gtagEvent)||void 0===u||u.call(l,"add_to_cart",p)}),n(".products-block-post-template .product, .wc-block-product-template .product").each((function(){const e=n(this),i=parseInt(e.find("[data-product_id]").attr("data-product_id"),10);i&&e.on("click",(function(e){var c,l;const u=n(e.target).closest(".wc-block-components-product-button [data-product_id]");if(!(u.length&&u.hasClass("add_to_cart_button")&&!u.hasClass("product_type_variable")))return;const a=(null==r?void 0:r.find(t=>(null==t?void 0:t.id)===i))||{},{price:d}=a,s=v(d,o,a);null===(c=t._googlesitekit)||void 0===c||null===(l=c.gtagEvent)||void 0===l||l.call(c,"add_to_cart",s)}))})))})(t.jQuery)}).call(this,e(0))}});