1(()=>{"use strict";var t={d:(e,r)=>{for(var o in r)t.o(r,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:r[o]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{add_payment_info:()=>k,add_shipping_info:()=>v,add_to_cart:()=>w,begin_checkout:()=>b,purchase:()=>E,remove_from_cart:()=>g,search:()=>q,select_content:()=>A,view_item:()=>S,view_item_list:()=>f});const r=window.wp.i18n,o=window.wp.hooks,n=[],c=(t,e)=>null!=t&&null!=e&&String(t)===String(e),i=(t,e)=>{const r={};var o;t.variation&&(r.item_variant=(o=t.variation,Array.isArray(o)?o.map(({attribute:t,value:e})=>t&&e?`${t.toLowerCase()}: ${e}`:null).filter(Boolean).join(", "):o));const n={item_id:u(t),item_name:t.name,...m(t),quantity:t.quantity??e,price:s(t.totals?.line_total||t.prices.price,t.prices.currency_minor_unit),...r};return t?.price_after_coupon_discount<t.prices.price&&(n.discount=s(t.prices.price-t.price_after_coupon_discount,t.prices.currency_minor_unit),n.price=s(t.price_after_coupon_discount,t.prices.currency_minor_unit)),n},a=(t,e)=>({item_id:u(t),item_name:t.name,item_list_name:e,...m(t),price:s(t.prices.price,t.prices.currency_minor_unit)}),s=(t,e=2)=>parseInt(t,10)/10**e,d=(t,e,r)=>{(0,o.removeAction)(t,e),(0,o.addAction)(t,e,r)},u=t=>{const e=t.extensions?.woocommerce_google_analytics_integration?.identifier;return void 0!==e?e:"product_sku"===window.ga4w?.settings?.identifier?t.sku?t.sku:"#"+t.id:t.id},l=t=>t.coupons[0]?.code?{coupon:t.coupons[0]?.code}:{},m=t=>"categories"in t&&t.categories.length?p(t.categories):{},p=t=>Object.fromEntries(t.slice(0,5).map((t,e)=>[_(e),t.name])),_=t=>"item_category"+(t>0?t+1:""),y=(t,e,r)=>e?.find(({id:e})=>c(e,t))??r?.items?.find(({id:e})=>c(e,t))??n.find(({id:e})=>c(e,t)),f=({products:t,listName:e=(0,r.__)("Product List","woocommerce-google-analytics-integration")})=>!!t?.length&&{item_list_id:e.toLowerCase().replace(/[^a-z0-9]+/g,"_").replace(/(^_+|_+$)/g,""),item_list_name:e,items:t.map((t,r)=>({...a(t,e),index:r+1}))},w=({product:t,quantity:e=1})=>({items:t?[i(t,e)]:[]}),g=({product:t,quantity:e=1})=>({items:t?[i(t,e)]:[]}),h=t=>{if(!t?.items?.length)return!1;const e=t.totals,r=t.items.reduce((t,e)=>t+parseInt(e.totals?.line_total??e.prices.price,10),0);return{currency:e.currency_code,value:s(r,e.currency_minor_unit),...l(t),items:t.items.map(i)}},b=({storeCart:t})=>h(t),v=({storeCart:t,shippingTier:e})=>{const r=h(t);return!!r&&{...r,...e?{shipping_tier:e}:{}}},k=({storeCart:t,paymentType:e})=>{const r=h(t);return!!r&&{...r,...e?{payment_type:e}:{}}},A=({product:t})=>!!t&&{content_type:"product",content_id:u(t)},q=({searchTerm:t})=>({search_term:t}),S=({product:t,listName:e=(0,r.__)("Product List","woocommerce-google-analytics-integration")})=>!!t&&{items:[a(t,e)]},E=({order:t})=>{if(void 0===t)return!1;const e=t.items.map(t=>i(t)),r=t.totals.currency_minor_unit;return{transaction_id:t.id,affiliation:t.affiliation,currency:t.totals.currency_code,value:s(e.reduce((t,{price:e=0,quantity:o=1})=>t+Math.round(Math.round(e*10**r)*o),0),r),tax:s(t.totals.tax_total,r),shipping:s(t.totals.shipping_total,r),items:e}},I='input[name="payment_method"]',C='input[name^="shipping_method"], select[name^="shipping_method"]',N=".woocommerce-cart-form .woocommerce-cart-form__cart-item, .woocommerce-cart-form .cart_item",$=t=>Array.from(document.querySelectorAll(t)).find(t=>t.checked||"SELECT"===t.tagName),L=t=>{if(!t)return;if("SELECT"===t.tagName){const e=t.options[t.selectedIndex];return e?.text?.trim()||t.value}const e=t.labels?.[0]||t.closest("label");return e?.textContent?.trim()||t.value},O=t=>{if(!t)return;const e=t.labels?.[0]||t.closest("label");if(e){const t=e.cloneNode(!0);t.querySelectorAll(".woocommerce-Price-amount").forEach(t=>t.remove());const r=t.textContent.replace(/[\s:]+$/,"").trim();if(r)return r}return L(t)};function j(t,{events:e,cart:r,products:o,product:n,added_to_cart:c,order:i,list_name:a}){let s=!1,d=!1,u=r;const l=new WeakSet,m=e=>{s=!0,t("add_shipping_info")({storeCart:r,shippingTier:e})},p=e=>{d=!0,t("add_payment_info")({storeCart:r,paymentType:e})};function _(e,i,a,s){const d=s?.[0]??s,u=parseInt(d?.dataset.product_id||d?.value);if(Number.isNaN(u)){const e=c??n;
1return e?void(Array.isArray(e)?e:[e]).filter(Boolean).forEach(e=>{t("add_to_cart")({product:e})}):void console.error("Google Analytics for WooCommerce: Could not read product ID from the button given in `added_to_cart` event. Check whether WooCommerce Core events or elements are malformed by other extensions.")}const l=n?.id===u?n:y(u,o,r);l&&t("add_to_cart")({product:l})}Object.values(e??{}).forEach(e=>{"add_to_cart"===e?(Array.isArray(c)?c:[c]).filter(Boolean).forEach(r=>{t(e)({product:r})}):t(e)({storeCart:r,products:o,product:n,order:i,listName:a})}),document.body.addEventListener("change",t=>{r?.items?.length&&t.target.closest?.("form.checkout")&&(t.target.matches(C)&&m(O(t.target)),t.target.matches(I)&&p(L(t.target)))}),document.querySelector("form.checkout")?.addEventListener("submit",()=>{if(r?.items?.length){if(!s){const t=$(C);t&&m(O(t))}d||p(L($(I)))}}),document.body.addEventListener("added_to_cart",t=>{_(t,...Array.isArray(t.detail)?t.detail:[t.detail?.fragments,t.detail?.cartHash,t.detail?.button])}),window.jQuery?.(document.body)?.on("added_to_cart",_);const f=()=>{document.querySelectorAll(".woocommerce-cart-form .woocommerce-cart-form__cart-item .remove[data-product_id]").forEach(t=>t.addEventListener("click",w))};function w(e){const r=parseInt(e.target?.dataset.product_id);Number.isNaN(r)?console.error("Google Analytics for WooCommerce: Could not read product ID from the target element given to remove from cart event. Check whether WooCommerce Core events or elements are malformed by other extensions."):t("remove_from_cart")({product:y(r,o,u)})}function g(t){const e=parseInt(t?.quantity,10),r=parseInt(t?.prices?.price,10);return!Number.isFinite(e)||e<1||!Number.isFinite(r)?null:r/e}function h(t,e){const r=g(t);return null===r?{...t,quantity:e}:{...t,quantity:e,prices:{...t.prices,price:Math.round(r)}}}function b(t,e){const r=function(t){const e=t.querySelector("input.qty")?.name;return e?.match(/^cart\[([^\]]+)\]\[qty]$/)?.[1]}(t),n=u?.items??[];if(r){const t=n.find(({key:t})=>t===r);if(t)return t}if(!Number.isNaN(e))return n.filter(({id:t})=>String(t)===String(e)).length>1?void 0:y(e,n,{items:o})}function v(){u?.items?.length&&document.querySelectorAll(N).forEach(e=>{const r=parseInt(e.querySelector("input.qty")?.value,10);if(!Number.isFinite(r))return;const o=parseInt(e.querySelector(".remove[data-product_id]")?.dataset.product_id,10),n=b(e,o),c=parseInt(n?.quantity,10);if(!n||!Number.isFinite(c)||r===c)return;const i=r>c?"add_to_cart":"remove_from_cart",a=Math.abs(r-c);t(i)({product:h(n,a)})})}function k(){const t=document.querySelector(".woocommerce-cart-form");t&&!l.has(t)&&(l.add(t),t.addEventListener("submit",v))}f(),k();const A=document.body.onupdated_wc_div;document.body.onupdated_wc_div=function(){"function"==typeof A&&A.apply(this,arguments),function(){if(!u?.items?.length)return;if(!document.querySelector(".woocommerce-cart-form"))return;const t=[];document.querySelectorAll(N).forEach(e=>{const r=parseInt(e.querySelector("input.qty")?.value,10),o=parseInt(e.querySelector(".remove[data-product_id]")?.dataset.product_id,10),n=b(e,o);n&&Number.isFinite(r)&&t.push(function(t,e){const r=g(t);return null===r?{...t,quantity:e}:{...t,quantity:e,prices:{...t.prices,price:Math.round(r*e)}}}(n,r))}),u={...u,items:t}}(),f(),k()};const q=document.body.onremoved_from_cart;document.body.onremoved_from_cart=function(t,e,r,o){"function"==typeof q&&q.apply(this,arguments),w({target:o?.[0]})},document.querySelectorAll(".products .product:not(.wp-block-post)")?.forEach(e=>{const n=e.querySelector("a[data-product_id]")?.getAttribute("data-product_id");n&&e.addEventListener("click",e=>{const c=e.target.closest(".woocommerce-loop-product__link"),i=e.target.classList.contains("button")&&e.target.hasAttribute("data-product_id"),a=e.target.classList.contains("add_to_cart_button")&&!e.target.classList.contains("product_type_variable");(c||i&&!a)&&t("select_content")({product:y(parseInt(n),o,r)})})}),document.querySelectorAll(".products-block-post-template .product, .wc-block-product-template .product, .wc-block-grid__product")?.forEach(e
1=>{const n=e.querySelector("[data-product_id]")?.getAttribute("data-product_id");n&&e.addEventListener("click",c=>{const i=c.target,a=i.closest(".wc-block-components-product-image a, .wc-block-grid__product-link"),s=i.closest(".wp-block-post-title a"),d=i.closest(".wc-block-components-product-button [data-product_id]");d&&d.classList.contains("add_to_cart_button")&&!d.classList.contains("product_type_variable")?t("add_to_cart")({product:y(parseInt(n),o,r)}):!e.closest(".wc-block-product-template")&&(a||d||s)&&t("select_content")({product:y(parseInt(n),o,r)})})})}const P="woocommerce-google-analytics",T="experimental__woocommerce_blocks",x=new Set;let M=!1,F=!1;const B=new Set;let G=!1,W=null;const D=new Map,R=t=>{Array.isArray(t?.items)&&t.items.forEach(t=>{null!=t?.key&&D.set(t.key,t)})},U=(t,e)=>{console.warn(`Google Analytics for WooCommerce: ${t}`,e)},z=(t,e,r)=>{try{t(e)(r)}catch(t){U(`could not track the ${e} event.`,t)}},J=t=>{const e=[];return null!=t?.key&&e.push(`key:${t.key}`),(t?.id||t?.name)&&e.push(`id:${t?.id??""}|${t?.name??""}`),e},H=t=>{J(t).forEach(t=>{B.add(t),setTimeout(()=>B.delete(t),200)})},Q=t=>J(t).some(t=>B.has(t));let K=null;const V=()=>window.ga4w?.settings?.currency,X=()=>{try{if(window.wp?.data?.select?.("wc/store/cart")){const t=window.wp.data.select("wc/store/cart").getCartData();if(t?.items?.length>0)return t}return window.ga4w?.data?.cart??null}catch(t){return U("could not read cart data.",t),null}},Y=t=>t?.key??t?.id??t?.name,Z=t=>t?.items?.length>0?t:window.ga4w?.data?.cart,tt=t=>t?.shippingRates??t?.shipping_rates??[],et=t=>window.wc?.wcSettings?.getSetting?.("paymentMethodData")?.[t]?.title||t,rt=t=>{const e=tt(window.wp?.data?.select?.("wc/store/cart")?.getCartData?.());return(e.length?e:tt(t)).flatMap(t=>t.shipping_rates??[])},ot=(t,e)=>rt(t).find(t=>t.rate_id===e)?.name,nt=(t,e,r={})=>{try{const o=Z(r.storeCart);return!!o?.items?.length&&(z(e,t,{...r,storeCart:o}),!0)}catch(e){return U(`could not prepare the ${t} event.`,e),!1}},ct=/\/wc\/store(?:\/v\d+)?\/cart\/add-item/,it=/\/wc\/store(?:\/v\d+)?\/cart\/update-item/,at=/\/wc\/store(?:\/v\d+)?\/batch/,st=(t,e={})=>{let r;try{r=new URL(t?.url??t?.toString?.(),window.location.origin)}catch{return null}return r.origin!==window.location.origin?null:{method:(e?.method??t?.method??"GET").toUpperCase(),pathname:r.searchParams.get("rest_route")??r.pathname}},dt=t=>{if(t instanceof FormData||t instanceof URLSearchParams)return Object.fromEntries(t.entries());if("string"==typeof t)try{return JSON.parse(t)}catch{return Object.fromEntries(new URLSearchParams(t).entries())}return t&&"object"==typeof t?t:{}},ut=(t,e=null)=>{const r=parseInt(t,10);return Number.isFinite(r)&&r>0?r:e},lt=t=>t?.key??t?.id,mt=(t,e)=>{const r=parseInt(t?.quantity,10),o=parseInt(t?.totals?.line_total,10);return Number.isFinite(o)&&Number.isFinite(r)&&Number.isFinite(e)&&r?{...t,totals:{...t.totals,line_total:String(Math.round(o*e/r))}}:t},pt=(t,e,r)=>{const{productId:o,quantity:n}=(t=>{const e=dt(t);return{productId:ut(e.id),quantity:ut(e.quantity,1)}})(t),c=((t,e,r)=>{if(Array.isArray(t?.items)&&t.items.length){if(Array.isArray(e?.items)){const r=t.items.find(t=>{const r=e.items.find(e=>lt(e)===lt(t));return!r||t.quantity>r.quantity});if(r)return r}return r?t.items.find(t=>parseInt(t.id,10)===r):void 0}})(e,r,o),i=c?((t,e,r)=>{const o=parseInt(t?.quantity,10);if(Array.isArray(e?.items)&&Number.isFinite(o)){const r=e.items.find(e=>lt(e)===lt(t)),n=parseInt(r?.quantity??0,10);if(Number.isFinite(n)){const t=o-n;if(t>0)return t}}return Number.isFinite(o)?Math.min(r,o):r})(c,r,n):n;return c?{eventName:"add_to_cart",product:mt(c,i),quantity:i,isAddItem:!0}:null},_t=(t,e,r)=>{const o=(n=t,dt(n)?.key??null);var n;if(!o)return null;const c=Array.isArray(e?.items)?e.items.find(t=>t.key===o):null,i=Array.isArray(r?.items)?r.items.find(t=>t.key===o):null,a=D.get(o);let s=0;a?s=a.quantity??0:i&&(s=i.quantity??0);const d=parseInt(c?.quantity??0,10)-parseInt(s,10);if(!Number.isFinite(d)||0===d)return null;const u=d>0?c:i??a;if(!u)return null;const l=Math.abs(d);return{eventName:d>0?"add_to_cart":"remove_from_cart",product:mt(u,l),quantity:l}},yt=t=>{if(W=(e,r)=>z(t,e,r),G||"function"!=typeof window.fetch)return;G=!0;const e=window.fetch;window.fetch=async function(...t){const[r,o]=t,n=((t,e={})=>{const r=st(t,e);return!!r&&"POST"===r.method&&ct.test(r.pathname)})(r,o),c=!n&&((t,e={})=>{const r=st(t,e);return!!r&&"POST"===r.method&&it.test(r.pathname)})(r,o),i=!n&&!c&&((t,e={})=>{const r=st(t,e);return!!r&&"POST"===r.method&&at.test(r.pathname)})(r,o),a=n||c||i,s=a?X():null,d=a?(async(t,e={})=>e?.body?e.body:"function"==typeof t?.clone?await t.clone().text():null)(r,o):null,u=await e.apply(this,t);if(!a||!u?.ok)return u;try{const t=await d,e=await u.clone().json();let r;i?r=((t,e,r)=>{const o=(t=>{if("string"==typeof t)try{return JSON.parse(t)}catch{return null}return t&&"object"==typeof t?t:null})(t)?.requests,n=e?.responses;if(!Array.isArray(o)||!Array.isArray(n))return[];const c=[];let i=r;return o.forEach((t,e)=>{const r=t?.path??"",o=ct.test(r),a=it.test(r);if(!o&&!a)return;const s=n[e],d=s?.status;if(!s||d<200||d>=300)return;const u=s.body,l=o?pt(t.body,u,i):_t(t.body,u,i);l&&c.push(l),R(u),i=u}),c}
1)(t,e,s):c?(r=[_t(t,e,s)].filter(Boolean),R(e)):(r=[pt(t,e,s)].filter(Boolean),R(e));const o=i?25:0;r.forEach(({eventName:t,product:e,quantity:r,isAddItem:n})=>{"remove_from_cart"!==t&&n?setTimeout(()=>{Q(e)||(H(e),W(t,{product:{...e,quantity:r}}))},o):W(t,{product:{...e,quantity:r}})})}catch(t){return U("could not parse the Store API cart response for cart change tracking.",t),u}return u}},ft=t=>{d(`${T}-product-render`,P,e=>z(t,"view_item",e)),d(`${T}-cart-remove-item`,P,e=>{try{const r=Y(e?.product);r&&(x.add(r),setTimeout(()=>x.delete(r),200)),z(t,"remove_from_cart",e)}catch(t){U("could not process Blocks remove_from_cart tracking.",t)}}),(t=>{document.body.addEventListener("click",e=>{try{const r=e.target?.closest?.(".wc-block-cart-item__remove-link");if(!r)return;const o=r.closest(".wc-block-cart-items__row");if(!o)return;let n=null;const c=o.querySelector(".wc-block-components-product-name"),i=c?.getAttribute("href"),a=c?.textContent?.trim();let s=null;if(i){const t=i.match(/[?&]p=(\d+)/);t&&(s=parseInt(t[1],10))}const d=X();if(Array.isArray(d?.items)&&(s?n=y(s,[],d):a&&(n=d.items.find(t=>t.name===a))),n||(n=(t=>{const e=t.querySelector(".wc-block-components-product-name"),r=e?.textContent?.trim();if(!r)return null;const o=t.querySelector(".wc-block-components-quantity-selector__input"),n=o&&parseInt(o.value,10)||1,c=t.querySelector(".wc-block-components-product-price__value ins .woocommerce-Price-amount")||t.querySelector(".wc-block-components-product-price__value .woocommerce-Price-amount")||t.querySelector(".wc-block-components-product-price__value"),i=X(),a=V(),s=i?.totals?.currency_minor_unit??a?.precision??2,d=c?(t=>{if(!t)return 0;const e=V();if(!e)return 0;const{decimalSeparator:r=".",thousandSeparator:o=","}=e;if("function"==typeof window.accounting?.unformat)return window.accounting.unformat(t,r);let n=t.replace(/[^\d.,]/g,"").trim();if(o){const t=o.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp(t,"g"),"")}return"."!==r&&(n=n.replace(r,".")),parseFloat(n)||0})(c.textContent):0;return{name:r,quantity:n,prices:{price:Math.round(d*10**s),currency_minor_unit:s}}})(o)),n){const e=Y(n);setTimeout(()=>{e&&x.has(e)||z(t,"remove_from_cart",{product:n})},0)}}catch(t){U("could not read mini-cart remove_from_cart data.",t)}})})(t),d(`${T}-checkout-render-checkout-form`,P,e=>{M=!1,F=!1,nt("begin_checkout",t,e)}),d(`${T}-checkout-set-selected-shipping-rate`,P,e=>{try{const r=Z(e.storeCart),o=e.shippingRateId;M=nt("add_shipping_info",t,{...e,shippingTier:ot(r,o)??o})}catch(t){M=!1,U("could not prepare the add_shipping_info event.",t)}}),d(`${T}-checkout-set-active-payment-method`,P,e=>{try{F=nt("add_payment_info",t,{...e,paymentType:et(e.paymentMethodSlug)})}catch(t){F=!1,U("could not prepare the add_payment_info event.",t)}}),d(`${T}-checkout-submit`,P,e=>{try{const r=(t=>{const e=rt(t).find(t=>t.selected);return e?.name??e?.rate_id})(e.storeCart);if(!M&&r&&(M=nt("add_shipping_info",t,{...e,shippingTier:r})),F)return;F=nt("add_payment_info",t,{...e,paymentType:et(window.wp?.data?.select?.("wc/store/payment")?.getActivePaymentMethod?.())})}catch(t){U("could not prepare checkout submit tracking.",t)}}),d(`${T}-cart-add-item`,P,e=>{try{const r=e?.product;if(Q(r))return;H(r),z(t,"add_to_cart",{product:r})}catch(t){U("could not process Blocks add_to_cart tracking.",t)}}),yt(t),d(`${T}-product-list-render`,P,e=>{var r;e?.products&&(r=e.products,Array.isArray(r)&&r.forEach(t=>{null==t?.id||n.some(({id:e})=>c(e,t.id))||n.push(t)})),z(t,"view_item_list",e)}),d(`${T}-product-view-link`,P,e=>z(t,"select_content",e)),K&&document.body.removeEventListener("wc-blocks_viewed_product",K),K=e=>{const{productId:r}=e.detail??{},o=String(r??"");if(/^[1-9]\d*$/.test(o)){const e=parseInt(o,10).toString(),r=y(e,[],null)??{id:e};z(t,"select_content",{product:r})}},document.body.addEventListener("wc-blocks_viewed_product",K)};(0,o.removeAction)(`${T}-checkout-submit`,P),(0,o.removeAction)(`${T}-checkout-set-email-address`,P),(0,o.removeAction)(`${T}-checkout-set-phone-number`,P),(0,o.removeAction)(`${T}-checkout-set-billing-address`,P),(0,o.removeAction)(`${T}-cart-set-item-quantity`,P),(0,o.removeAction)(`${T}-product-search`,P),(0,o.removeAction)(`${T}-store-notice-create`,P);const wt={statistics:["analytics_storage"],marketing:["ad_storage","ad_user_data","ad_personalization"]},gt={formatters:e,utils:{getProductFieldObject:i,getProductImpressionObject:a,formatPrice:s,getProductId:u,getCartCoupon:l}};function ht(){window.wcGoogleAnalyticsIntegration={...window.wcGoogleAnalyticsIntegration??{},...gt},Object.assign(window.ga4w,gt),(({tracker_function_name:t})=>{if("function"!=typeof wp_has_consent)return;const e=(()=>{const{wp_consent_type:t,wp_fallback_consent_type:e}=window;return null!=t?String(t):e?String(e):""})(),r=""!==e&&!e.includes("optout");
1""===e&&(window.wp_consent_type="optin");const o={};for(const[t,e]of Object.entries(wt)){let n;if(""!==consent_api_get_cookie(window.consent_api.cookie_prefix+"_"+t))n=wp_has_consent(t)?"granted":"denied";else{if(!r)continue;n="denied"}e.forEach(t=>{o[t]=n})}Object.keys(o).length>0&&window[t]("consent","update",o)})(window.ga4w.settings),(({tracker_function_name:t})=>{document.addEventListener("wp_listen_for_consent_change",e=>{const r={},o=wt[Object.keys(e.detail)[0]],n="allow"===Object.values(e.detail)[0]?"granted":"denied";void 0!==o&&(o.forEach(t=>{r[t]=n}),Object.keys(r).length>0&&window[t]("consent","update",r))})})(window.ga4w.settings);const t=function({events:t,tracker_function_name:r}){return function(o){const n=e[o];if("function"!=typeof n)throw new Error(`Event ${o} is not supported.`);return function(e){const c=n(e);t.includes(o)&&c&&window[r]("event",o,c)}}}(window.ga4w.settings);j(t,window.ga4w.data),ft(t)}function bt(){window.ga4w||console.warn("Google Analytics for WooCommerce: Configuration and tracking data not found after the page was fully loaded. Make sure the `woocommerce-google-analytics-integration-data` script gets eventually loaded.")}window.ga4w?ht():(document.addEventListener("ga4w:ready",ht),"complete"===document.readyState?bt():window.addEventListener("load",bt))})(); 2jQuery(document).ready(function($){function get_cookie(name){if(typeof Cookies!="undefined"){return Cookies.get(name)}if(typeof $.cookie!="undefined"){return $.cookie(name)}return null}function remove_cookie(name,cookie_path){if(typeof Cookies!="undefined"){return Cookies.remove(name,{path:cookie_path})}if(typeof $.cookie!="undefined"){return $.removeCookie(name,{path:cookie_path})}return false}try{var supports_html5_storage="sessionStorage"in window&&window["sessionStorage"]!==null;if(supports_html5_storage&&get_cookie("aelia_user_logged_in")){var fragment_name="wc_fragments";if(typeof wc_cart_fragments_params!=="undefined"&&wc_cart_fragments_params&&wc_cart_fragments_params.fragment_name){fragment_name=wc_cart_fragments_params.fragment_name}console.log("User logged in, refreshing cart fragments");sessionStorage.removeItem(fragment_name,"");var cookie_path=get_cookie("aelia_user_logged_in");remove_cookie("aelia_user_logged_in",cookie_path)}}catch(exception){var error_msg="Aelia - Exception occurred while accessing window.sessionStorage. "+"This could be caused by the browser disabling cookies. "+"COOKIES MUST BE ENABLED for the site to work correctly. "+"Exception details below.";console.log(error_msg);console.log(exception)}}); 3function on_keydown_remove_from_cart(e){" "===e.key&&(e.preventDefault(),e.currentTarget.click())}function focus_populate_live_region(){var e=["woocommerce-message","woocommerce-error","wc-block-components-notice-banner"].map(function(e){return"."+e+'[role="alert"]'}).join(", "),o=document.querySelectorAll(e);if(0!==o.length){var t=o[0];t.setAttribute("tabindex","-1");var n=setTimeout(function(){t.focus(),clearTimeout(n)},500)}}function refresh_sorted_by_live_region(){var e=document.querySelector(".woocommerce-result-count"),o=document.querySelector('[data-wp-interactive="woocommerce/product-filters"]');if(e&&window.location.search&&!o){var t=e.innerHTML;e.setAttribute("role","alert"),e.setAttribute("aria-hidden","true");var n=setTimeout(function(){e.setAttribute("aria-hidden","false"),e.innerHTML="",e.innerHTML=t,clearTimeout(n)},2e3)}}function on_document_ready(){focus_populate_live_region(),refresh_sorted_by_live_region()}jQuery(function(e){e(".woocommerce-ordering").on("change","select.orderby",function(){e(this).closest("form").trigger("submit")}),e("input.qty:not(.product-quantity input.qty)").each(function(){var o=parseFloat(e(this).attr("min"));o>=0&&parseFloat(e(this).val())<o&&e(this).val(o)});var o="store_notice"+(e(".woocommerce-store-notice").data("noticeId")||"");if("hidden"===Cookies.get(o))e(".woocommerce-store-notice").hide();else{function t(o){["Enter"," "].includes(o.key)&&(o.preventDefault(),e(".woocommerce-store-notice__dismiss-link").click())}e(".woocommerce-store-notice").show(),e(".woocommerce-store-notice__dismiss-link").on("click",function n(r){Cookies.set(o,"hidden",{path:"/"}),e(".woocommerce-store-notice").hide(),r.preventDefault(),e(".woocommerce-store-notice__dismiss-link").off("
3click",n).off("keydown",t)}).on("keydown",t)}e(".woocommerce-input-wrapper span.description").length&&e(document.body).on("click",function(){e(".woocommerce-input-wrapper span.description:visible").prop("aria-hidden",!0).slideUp(250)}),e(".woocommerce-input-wrapper").on("click",function(e){e.stopPropagation()}),e(".woocommerce-input-wrapper :input").on("keydown",function(o){var t=e(this).parent().find("span.description");if(27===o.which&&t.length&&t.is(":visible"))return t.prop("aria-hidden",!0).slideUp(250),o.preventDefault(),!1}).on("click focus",function(){var o=e(this).parent(),t=o.find("span.description");o.addClass("currentTarget"),e(".woocommerce-input-wrapper:not(.currentTarget) span.description:visible").prop("aria-hidden",!0).slideUp(250),t.length&&t.is(":hidden")&&t.prop("aria-hidden",!1).slideDown(250),o.removeClass("currentTarget")}),e.scroll_to_notices=function(o){o.length&&e("html, body").animate({scrollTop:o.offset().top-100},1e3)},e('.woocommerce form .woocommerce-Input[type="password"]').wrap('<span class="password-input"></span>'),e(".woocommerce form input").filter(":password").parent("span").addClass("password-input"),e(".password-input").each(function(){const o=e(this).find("input").attr("id"),t=e("<button>",{type:"button","class":"show-password-input","aria-label":woocommerce_params.i18n_password_show});t.attr("aria-describedby",o),e(this).append(t)}),e(".show-password-input").on("click",function(o){o.preventDefault(),e(this).hasClass("display-password")?(e(this).removeClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_show)):(e(this).addClass("display-password"),e(this).attr("aria-label",woocommerce_params.i18n_password_hide)),e(this).hasClass("display-password")?e(this).siblings(['input[type="password"]']).prop("type","text"):e(this).siblings('input[type="text"]').prop("type","password"),e(this).siblings("input").trigger("focus")}),e("a.coming-soon-footer-banner-dismiss").on("click",function(o){var t=e(o.target);e.ajax({type:"post",url:t.data("rest-url"),data:{woocommerce_meta:{coming_soon_banner_dismissed:"yes"}},beforeSend:function(e){e.setRequestHeader("X-WP-Nonce",t.data("rest-nonce"))},complete:function(){e("#coming-soon-footer-banner").hide()}})}),"undefined"==typeof wc_add_to_cart_params&&e(document.body).on("keydown",".remove_from_cart_button",on_keydown_remove_from_cart),e(document.body).on("item_removed_from_classic_cart updated_wc_div",focus_populate_live_region)}),document.addEventListener("DOMContentLoaded",on_document_ready); 4(()=>{"use strict";function e(e){let t=e;return"string"==typeof t?(t=parseFloat(t),isNaN(t)&&(t=0)):"number"!=typeof t&&(t=0),t=parseFloat(t.toFixed(2)),t}function t(t,n=["productlink","internal_id"]){try{const o=JSON.parse(t);if(o){if(o.price&&(o.price=e(o.price)),n&&n.length>0){const e=n.length;for(let t=0;t<e;t++)delete o[n[t]]}return o}}catch(e){console&&console.error&&console.error(e.message)}return!1}const n="gtm4wp_item_list_attr";function o(){try{const e=function(e){const t=("; "+document.cookie).split("; "+e+"=");return 2===t.length?t.pop().split(";").shift():""}(n);if(!e)return{};const t=JSON.parse(decodeURIComponent(e));return t&&"object"==typeof t?t:{}}catch(e){return{}}}function i(e,t){if(!e||!t||e.item_list_name)return e;const n=o()[t];return n&&n.item_list_name&&(e.item_list_name=n.item_list_name,n.item_list_id&&(e.item_list_id=n.item_list_id)),e}window.gtm4wp_make_sure_is_float=e,window.gtm4wp_push_ecommerce=function(e,t,n,o=!1,i=2e3){const r=n||{};r.items=t,gtm4wp_clear_ecommerce&&window[gtm4wp_datalayer_name].push({ecommerce:null});const s={event:e,ecommerce:r};o&&(s.eventCallback=o,s.eventTimeout=i),"undefined"!=typeof gtm4wp_console_log&>m4wp_console_log&&"undefined"!=typeof console&&console.log&&console.log("[GTM4WP] Pushing ecommerce event: "+e,s),window[gtm4wp_datalayer_name].push(s)},window.gtm4wp_read_from_json=t,window.gtm4wp_read_json_from_node=function(e,n,o=["productlink","internal_id"]){return!!(e&&e.dataset&&e.dataset[n])&&t(e.dataset[n],o)},window.gtm4wp_update_json_in_node=function(t,n,o,i){if(t&&t.dataset&&t.dataset[n])try{const r=JSON.parse(t.dataset[n]);if(r)return r.price&&(r.price=e(r.price)),r[o]=i,t.dataset[n]=JSON.stringify(r),!0}catch(e){console&&console.error&&console.error(e.message)}return!1},window.gtm4wp_read_item_list_cookie=o,window.gtm4wp_store_item_list_attribution=function(e,t,i){if(!e||!t)return;const r=o();delete r[e];const s=e=>r[e]&&parseInt(r[e].t,10)||0,c=Object.keys(r).sort((e,t)=>
4s(e)-s(t));for(;c.length>=20;)delete r[c.shift()];const m=Object.keys(r).reduce((e,t)=>Math.max(e,s(t)),0)+1;r[e]={item_list_name:t,t:m},i&&(r[e].item_list_id=i);const _=e=>21+e.length<=3900;let a=encodeURIComponent(JSON.stringify(r));for(;!_(a)&&c.length;)delete r[c.shift()],a=encodeURIComponent(JSON.stringify(r));_(a)&&function(e,t,n,o=!1){const i=new Date;i.setTime(i.getTime()+24*n*60*60*1e3),document.cookie=e+"="+t+";expires="+i.toUTCString()+";path=/"+(o?";SameSite=Lax":"")}(n,a,3,!0)},window.gtm4wp_apply_stored_item_list=i,window.gtm4wp_apply_stored_item_list_to_event=function(e,t){try{const n=e&&e.ecommerce&&Array.isArray(e.ecommerce.items)?e.ecommerce.items[0]:null;n&&i(n,t)}catch(e){}return e}})();
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.