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