(()=>{"use strict";var e={};function t(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);t&&(o=o.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,o)}return r}function r(e){for(var r=1;r<arguments.length;r++){var i=null!=arguments[r]?arguments[r]:{};r%2?t(Object(i),!0).forEach(function(t){o(e,t,i[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):t(Object(i)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(i,t))})}return e}function o(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function i(e){let t=e.replace(/[^\d.,]/g,"").trim();const r=t.lastIndexOf(","),o=t.lastIndexOf(".");return r>-1&&o>-1?t=r>o?t.replace(/\./g,"").replace(",","."):t.replace(/,/g,""):r>-1?t=3===t.length-r?t.replace(",","."):t.replace(/,/g,""):o>-1&&3!==t.length-o&&(t=t.replace(/\./g,"")),parseFloat(t)||0}e.d=(t,r)=>{for(var o in r)e.o(r,o)&&!e.o(t,o)&&Object.defineProperty(t,o,{enumerable:!0,get:r[o]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),((e,t)=>{if(!e)return;const o=e("body"),n=globalThis._googlesitekit.easyDigitalDownloadsCurrency;var l,a;o.on("edd_cart_item_added",(e,t)=>{var r,o;const l=i(t.total),a=function(e){var t,r,o;const n=(new DOMParser).parseFromString(e,"text/html");return{id:(null===(t=n.querySelector(".edd-remove-from-cart"))||void 0===t?void 0:t.dataset.downloadId)||"",name:(null===(r=n.querySelector(".edd-cart-item-title"))||void 0===r?void 0:r.textContent.trim())||"",price:i((null===(o=n.querySelector(".edd-cart-item-price"))||void 0===o?void 0:o.textContent.trim())||"")}}(t.cart_item),c=a.id,d=a.name,u=a.price;null===(r=globalThis._googlesitekit)||void 0===r||null===(o=r.gtagEvent)||void 0===o||o.call(r,"add_to_cart",{currency:n,value:l,items:[{item_id:c,item_name:d,price:u}],googlesitekit_event_provider:"easy-digital-downloads"})}),null!==(t=globalThis._googlesitekit)&&void 0!==t&&null!==(t=t.edddata)&&void 0!==t&&t.purchase&&(null===(l=globalThis._googlesitekit)||void 0===l||null===(a=l.gtagEvent)||void 0===a||a.call(l,"purchase",r(r({currency:n},globalThis._googlesitekit.edddata.purchase),{},{googlesitekit_event_provider:"easy-digital-downloads"})))})(globalThis.jQuery)})();