document.body.classList.contains("woocommerce-cart")||document.body.classList.contains("woocommerce-checkout")||window.innerWidth<768||!document.getElementById("site-header-cart")||window.addEventListener("load",function(){document.querySelector(".site-header-cart").addEventListener("mouseover",function(){var e=window.outerHeight,t=this.querySelector(".widget_shopping_cart_content").getBoundingClientRect().bottom+this.offsetHeight,o=this.querySelector(".cart_list");e<t&&(o.style.maxHeight="15em",o.style.overflowY="auto")})});
document.addEventListener("DOMContentLoaded",function(){if(0!==document.getElementsByClassName("storefront-handheld-footer-bar").length){[].forEach.call(document.querySelectorAll(".storefront-handheld-footer-bar .search > a"),function(t){t.addEventListener("click",function(e){t.parentElement.classList.toggle("active"),e.preventDefault()})});var t=document.getElementsByClassName("storefront-handheld-footer-bar"),n=document.forms,o=function(t){return function(e){t&&-1!==e.target.tabIndex?document.body.classList.add("sf-input-focused"):document.body.classList.remove("sf-input-focused")}};if(t.length&&n.length)for(let e=0;e<n.length;e++)t[0].contains(n[e])||(n[e].addEventListener("focus",o(!0),!0),n[e].addEventListener("blur",o(!1),!0))}});
document.addEventListener("DOMContentLoaded",function(){let i=document.getElementsByClassName("brands_index");if(i.length){let n=document.body.classList.contains("admin-bar")?32:0,t=document.getElementById("brands_a_z").scrollHeight,e=i[0].scrollHeight+40,d=function(){768<window.innerWidth&&i[0].getBoundingClientRect().top<0?i[0].style.paddingTop=Math.min(Math.abs(i[0].getBoundingClientRect().top)+20+n,t-e)+"px":i[0].style.paddingTop=0};d(),window.addEventListener("scroll",function(){d()})}});
(()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var o=e.g.document;if(!t&&o&&(o.currentScript&&(t=o.currentScript.src),!t)){var r=o.getElementsByTagName("script");if(r.length)for(var n=r.length-1;n>-1&&(!t||!/^http(s?):/.test(t));)t=r[n--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";const e=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:t(e),t=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null},o=(e,t,o="wcpay_")=>e.toString().replace("%%endpoint%%",o+t);function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}var n=/^\s+/,a=/\s+$/;function i(e,t){if(t=t||{},(e=e||"")instanceof i)return e;if(!(this instanceof i))return new i(e,t);var o=function(e){var t,o,i,c={r:0,g:0,b:0},l=1,s=null,u=null,h=null,d=!1,p=!1;return"string"==typeof e&&(e=function(e){e=e.replace(n,"").replace(a,"").toLowerCase();var t,o=!1;if(v[e])e=v[e],o=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=H.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=H.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=H.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=H.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=H.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=H.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=H.hex8.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),a:P(t[4]),format:o?"name":"hex8"}:(t=H.hex6.exec(e))?{r:A(t[1]),g:A(t[2]),b:A(t[3]),format:o?"name":"hex"}:(t=H.hex4.exec(e))?{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),a:P(t[4]+""+t[4]),format:o?"name":"hex8"}:!!(t=H.hex3.exec(e))&&{r:A(t[1]+""+t[1]),g:A(t[2]+""+t[2]),b:A(t[3]+""+t[3]),format:o?"name":"hex"}}(e)),"object"==r(e)&&(B(e.r)&&B(e.g)&&B(e.b)?(t=e.r,o=e.g,i=e.b,c={r:255*T(t,255),g:255*T(o,255),b:255*T(i,255)},d=!0,p="%"===String(e.r).substr(-1)?"prgb":"rgb"):B(e.h)&&B(e.s)&&B(e.v)?(s=L(e.s),u=L(e.v),c=function(e,t,o){e=6*T(e,360),t=T(t,100),o=T(o,100);var r=Math.floor(e),n=e-r,a=o*(1-t),i=o*(1-n*t),c=o*(1-(1-n)*t),l=r%6;return{r:255*[o,i,a,a,c,o][l],g:255*[c,o,o,i,a,a][l],b:255*[a,a,c,o,o,i][l]}}(e.h,s,u),d=!0,p="hsv"):B(e.h)&&B(e.s)&&B(e.l)&&(s=L(e.s),h=L(e.l),c=function(e,t,o){var r,n,a;function i(e,t,o){return o<0&&(o+=1),o>1&&(o-=1),o<1/6?e+6*(t-e)*o:o<.5?t:o<2/3?e+(t-e)*(2/3-o)*6:e}if(e=T(e,360),t=T(t,100),o=T(o,100),0===t)r=n=a=o;else{var c=o<.5?o*(1+t):o+t-o*t,l=2*o-c;r=i(l,c,e+1/3),n=i(l,c,e),a=i(l,c,e-1/3)}return{r:255*r,g:255*n,b:255*a}}(e.h,s,h),d=!0,p="hsl"),e.hasOwnProperty("a")&&(l=e.a)),l=C(l),{ok:d,format:e.format||p,r:Math.min(255,Math.max(c.r,0)),g:Math.min(255,Math.max(c.g,0)),b:Math.min(255,Math.max(c.b,0)),a:l}}(e);this._originalInput=e,this._r=o.r,this._g=o.g,this._b=o.b,this._a=o.a,this._roundA=Math.round(100*this._a)/100,this._format=t.format||o.format,this._gradientType=t.gradientType,this._r<1&&(this._r=Math.round(this._r)),this._g<1&&(this._g=Math.round(this._g)),this._b<1&&(this._b=Math.round(this._b)),this._ok=o.ok}function c(e,t,o){e=T(e,255),t=T(t,255),o=T(o,255);var r,n,a=Math.max(e,t,o),i=Math.min(e,t,o),c=(a+i)/2;if(a==i)r=n=0;else{var l=a-i;switch(n=c>.5?l/(2-a-i):l/(a+i),a){case e:r=(t-o)/l+(t<o?6:0);break;case t:r=(o-e)/l+2;break;case o:r=(e-t)/l+4}r/=6}return{h:r,s:n,l:c}}function l(e,t,o){e=T(e,255),t=T(t,255),o=T(o,255);var r,n,a=Math.max(e,t,o),i=Math.min(e,t,o),c=a,l=a-i;if(n=0===a?0:l/a,a==i)r=0;else{switch(a){case e:r=(t-o)/l+(t<o?6:0);break;case t:r=(o-e)/l+2;break;case o:r=(e-t)/l+4}r/=6}return{h:r,s:n,v:c}}function s(e,t,o,r){var n=[I(Math.round(e).toString(16)),I(Math.round(t).toString(16)),I(Math.round(o).toString(16))];return r&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function u(e,t,o,r){return[I(q(r)),I(Math.round(e).toString(16)),I(Math.round(t).toString(16)),I(Math.round(o).toString(16))].join("")}function h(e,t){t=0===t?0:t||10;var o=i(e).toHsl();return o.s-=t/100,o.s=M(o.s),i(o)}function d(e,t){t=0===t?0:t||10;var o=i(e).toHsl();return o.s+=t/100,o.s=M(o.s),i(o)}function p(e){return i(e).desaturate(100)}function f(e,t){t=0===t?0:t||10;var o=i(e).toHsl();return o.l+=t/100,o.l=M(o.l),i(o)}function m(e,t){t=0===t?0:t||10;var o=i(e).toRgb();return o.r=Math.max(0,Math.min(255,o.r-Math.round(-t/100*255))),o.g=Math.max(0,Math.min(255,o.g-Math.round(-t/100*255))),o.b=Math.max(0,Math.min(255,o.b-Math.round(-t/100*255))),i(o)}function b(e,t){t=0===t?0:t||10;var o=i(e).toHsl();return o.l-=t/100,o.l=M(o.l),i(o)}function g(e,t){var o=i(e).toHsl(),r=(o.h+t)%360;return o.h=r<0?360+r:r,i(o)}function y(e){var t=i(e).toHsl();return t.h=(t.h+180)%360,i(t)}function w(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var o=i(e).toHsl(),r=[i(e)],n=360/t,a=1;a<t;a++)r.push(i({h:(o.h+a*n)%360,s:o.s,l:o.l}));return r}function _(e){var t=i(e).toHsl(),o=t.h;return[i(e),i({h:(o+72)%360,s:t.s,l:t.l}),i({h:(o+216)%360,s:t.s,l:t.l})]}function S(e,t,o){t=t||6,o=o||30;var r=i(e).toHsl(),n=360/o,a=[i(e)];for(r.h=(r.h-(n*t>>1)+720)%360;--t;)r.h=(r.h+n)%360,a.push(i(r));return a}function k(e,t){t=t||6;for(var o=i(e).toHsv(),r=o.h,n=o.s,a=o.v,c=[],l=1/t;t--;)c.push(i({h:r,s:n,v:a})),a=(a+l)%1;return c}i.prototype={isDark:function(){return this.getBrightness()<128},isLight:function(){return!this.isDark()},isValid:function(){return this._ok},getOriginalInput:function(){return this._originalInput},getFormat:function(){return this._format},getAlpha:function(){return this._a},getBrightness:function(){var e=this.toRgb();return(299*e.r+587*e.g+114*e.b)/1e3},getLuminance:function(){var e,t,o,r=this.toRgb();return e=r.r/255,t=r.g/255,o=r.b/255,.2126*(e<=.03928?e/12.92:Math.pow((e+.055)/1.055,2.4))+.7152*(t<=.03928?t/12.92:Math.pow((t+.055)/1.055,2.4))+.0722*(o<=.03928?o/12.92:Math.pow((o+.055)/1.055,2.4))},setAlpha:function(e){return this._a=C(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=l(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=l(this._r,this._g,this._b),t=Math.round(360*e.h),o=Math.round(100*e.s),r=Math.round(100*e.v);return 1==this._a?"hsv("+t+", "+o+"%, "+r+"%)":"hsva("+t+", "+o+"%, "+r+"%, "+this._roundA+")"},toHsl:function(){var e=c(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=c(this._r,this._g,this._b),t=Math.round(360*e.h),o=Math.round(100*e.s),r=Math.round(100*e.l);return 1==this._a?"hsl("+t+", "+o+"%, "+r+"%)":"hsla("+t+", "+o+"%, "+r+"%, "+this._roundA+")"},toHex:function(e){return s(this._r,this._g,this._b,e)},toHexString:function(e){return"#"+this.toHex(e)},toHex8:function(e){return function(e,t,o,r,n){var a=[I(Math.round(e).toString(16)),I(Math.round(t).toString(16)),I(Math.round(o).toString(16)),I(q(r))];return n&&a[0].charAt(0)==a[0].charAt(1)&&a[1].charAt(0)==a[1].charAt(1)&&a[2].charAt(0)==a[2].charAt(1)&&a[3].charAt(0)==a[3].charAt(1)?a[0].charAt(0)+a[1].charAt(0)+a[2].charAt(0)+a[3].charAt(0):a.join("")}(this._r,this._g,this._b,this._a,e)},toHex8String:function(e){return"#"+this.toHex8(e)},toRgb:function(){return{r:Math.round(this._r),g:Math.round(this._g),b:Math.round(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+")":"rgba("+Math.round(this._r)+", "+Math.round(this._g)+", "+Math.round(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:Math.round(100*T(this._r,255))+"%",g:Math.round(100*T(this._g,255))+"%",b:Math.round(100*T(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*T(this._r,255))+"%, "+Math.round(100*T(this._g,255))+"%, "+Math.round(100*T(this._b,255))+"%)":"rgba("+Math.round(100*T(this._r,255))+"%, "+Math.round(100*T(this._g,255))+"%, "+Math.round(100*T(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(x[s(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+u(this._r,this._g,this._b,this._a),o=t,r=this._gradientType?"GradientType=1, ":"";if(e){var n=i(e);o="#"+u(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+r+"startColorstr="+t+",endColorstr="+o+")"},toString:function(e){var t=!!e;e=e||this._format;var o=!1,r=this._a<1&&this._a>=0;return t||!r||"hex"!==e&&"hex6"!==e&&"hex3"!==e&&"hex4"!==e&&"hex8"!==e&&"name"!==e?("rgb"===e&&(o=this.toRgbString()),"prgb"===e&&(o=this.toPercentageRgbString()),"hex"!==e&&"hex6"!==e||(o=this.toHexString()),"hex3"===e&&(o=this.toHexString(!0)),"hex4"===e&&(o=this.toHex8String(!0)),"hex8"===e&&(o=this.toHex8String()),"name"===e&&(o=this.toName()),"hsl"===e&&(o=this.toHslString()),"hsv"===e&&(o=this.toHsvString()),o||this.toHexString()):"name"===e&&0===this._a?this.toName():this.toRgbString()},clone:function(){return i(this.toString())},_applyModification:function(e,t){var o=e.apply(null,[this].concat([].slice.call(t)));return this._r=o._r,this._g=o._g,this._b=o._b,this.setAlpha(o._a),this},lighten:function(){return this._applyModification(f,arguments)},brighten:function(){return this._applyModification(m,arguments)},darken:function(){return this._applyModification(b,arguments)},desaturate:function(){return this._applyModification(h,arguments)},saturate:function(){return this._applyModification(d,arguments)},greyscale:function(){return this._applyModification(p,arguments)},spin:function(){return this._applyModification(g,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(S,arguments)},complement:function(){return this._applyCombination(y,arguments)},monochromatic:function(){return this._applyCombination(k,arguments)},splitcomplement:function(){return this._applyCombination(_,arguments)},triad:function(){return this._applyCombination(w,[3])},tetrad:function(){return this._applyCombination(w,[4])}},i.fromRatio=function(e,t){if("object"==r(e)){var o={};for(var n in e)e.hasOwnProperty(n)&&(o[n]="a"===n?e[n]:L(e[n]));e=o}return i(e,t)},i.equals=function(e,t){return!(!e||!t)&&i(e).toRgbString()==i(t).toRgbString()},i.random=function(){return i.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},i.mix=function(e,t,o){o=0===o?0:o||50;var r=i(e).toRgb(),n=i(t).toRgb(),a=o/100;return i({r:(n.r-r.r)*a+r.r,g:(n.g-r.g)*a+r.g,b:(n.b-r.b)*a+r.b,a:(n.a-r.a)*a+r.a})},i.readability=function(e,t){var o=i(e),r=i(t);return(Math.max(o.getLuminance(),r.getLuminance())+.05)/(Math.min(o.getLuminance(),r.getLuminance())+.05)},i.isReadable=function(e,t,o){var r,n,a,c,l,s=i.readability(e,t);switch(n=!1,(a=o,"AA"!==(c=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==c&&(c="AA"),"small"!==(l=(a.size||"small").toLowerCase())&&"large"!==l&&(l="small"),r={level:c,size:l}).level+r.size){case"AAsmall":case"AAAlarge":n=s>=4.5;break;case"AAlarge":n=s>=3;break;case"AAAsmall":n=s>=7}return n},i.mostReadable=function(e,t,o){var r,n,a,c,l=null,s=0;n=(o=o||{}).includeFallbackColors,a=o.level,c=o.size;for(var u=0;u<t.length;u++)(r=i.readability(e,t[u]))>s&&(s=r,l=i(t[u]));return i.isReadable(e,l,{level:a,size:c})||!n?l:(o.includeFallbackColors=!1,i.mostReadable(e,["#fff","#000"],o))};var v=i.names={aliceblue:"f0f8ff",antiquewhite:"faebd7",aqua:"0ff",aquamarine:"7fffd4",azure:"f0ffff",beige:"f5f5dc",bisque:"ffe4c4",black:"000",blanchedalmond:"ffebcd",blue:"00f",blueviolet:"8a2be2",brown:"a52a2a",burlywood:"deb887",burntsienna:"ea7e5d",cadetblue:"5f9ea0",chartreuse:"7fff00",chocolate:"d2691e",coral:"ff7f50",cornflowerblue:"6495ed",cornsilk:"fff8dc",crimson:"dc143c",cyan:"0ff",darkblue:"00008b",darkcyan:"008b8b",darkgoldenrod:"b8860b",darkgray:"a9a9a9",darkgreen:"006400",darkgrey:"a9a9a9",darkkhaki:"bdb76b",darkmagenta:"8b008b",darkolivegreen:"556b2f",darkorange:"ff8c00",darkorchid:"9932cc",darkred:"8b0000",darksalmon:"e9967a",darkseagreen:"8fbc8f",darkslateblue:"483d8b",darkslategray:"2f4f4f",darkslategrey:"2f4f4f",darkturquoise:"00ced1",darkviolet:"9400d3",deeppink:"ff1493",deepskyblue:"00bfff",dimgray:"696969",dimgrey:"696969",dodgerblue:"1e90ff",firebrick:"b22222",floralwhite:"fffaf0",forestgreen:"228b22",fuchsia:"f0f",gainsboro:"dcdcdc",ghostwhite:"f8f8ff",gold:"ffd700",goldenrod:"daa520",gray:"808080",green:"008000",greenyellow:"adff2f",grey:"808080",honeydew:"f0fff0",hotpink:"ff69b4",indianred:"cd5c5c",indigo:"4b0082",ivory:"fffff0",khaki:"f0e68c",lavender:"e6e6fa",lavenderblush:"fff0f5",lawngreen:"7cfc00",lemonchiffon:"fffacd",lightblue:"add8e6",lightcoral:"f08080",lightcyan:"e0ffff",lightgoldenrodyellow:"fafad2",lightgray:"d3d3d3",lightgreen:"90ee90",lightgrey:"d3d3d3",lightpink:"ffb6c1",lightsalmon:"ffa07a",lightseagreen:"20b2aa",lightskyblue:"87cefa",lightslategray:"789",lightslategrey:"789",lightsteelblue:"b0c4de",lightyellow:"ffffe0",lime:"0f0",limegreen:"32cd32",linen:"faf0e6",magenta:"f0f",maroon:"800000",mediumaquamarine:"66cdaa",mediumblue:"0000cd",mediumorchid:"ba55d3",mediumpurple:"9370db",mediumseagreen:"3cb371",mediumslateblue:"7b68ee",mediumspringgreen:"00fa9a",mediumturquoise:"48d1cc",mediumvioletred:"c71585",midnightblue:"191970",mintcream:"f5fffa",mistyrose:"ffe4e1",moccasin:"ffe4b5",navajowhite:"ffdead",navy:"000080",oldlace:"fdf5e6",olive:"808000",olivedrab:"6b8e23",orange:"ffa500",orangered:"ff4500",orchid:"da70d6",palegoldenrod:"eee8aa",palegreen:"98fb98",paleturquoise:"afeeee",palevioletred:"db7093",papayawhip:"ffefd5",peachpuff:"ffdab9",peru:"cd853f",pink:"ffc0cb",plum:"dda0dd",powderblue:"b0e0e6",purple:"800080",rebeccapurple:"663399",red:"f00",rosybrown:"bc8f8f",royalblue:"4169e1",saddlebrown:"8b4513",salmon:"fa8072",sandybrown:"f4a460",seagreen:"2e8b57",seashell:"fff5ee",sienna:"a0522d",silver:"c0c0c0",skyblue:"87ceeb",slateblue:"6a5acd",slategray:"708090",slategrey:"708090",snow:"fffafa",springgreen:"00ff7f",steelblue:"4682b4",tan:"d2b48c",teal:"008080",thistle:"d8bfd8",tomato:"ff6347",turquoise:"40e0d0",violet:"ee82ee",wheat:"f5deb3",white:"fff",whitesmoke:"f5f5f5",yellow:"ff0",yellowgreen:"9acd32"},x=i.hexNames=function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[e[o]]=o);return t}(v);function C(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function T(e,t){(function(e){return"string"==typeof e&&-1!=e.indexOf(".")&&1===parseFloat(e)})(e)&&(e="100%");var o=function(e){return"string"==typeof e&&-1!=e.indexOf("%")}(e);return e=Math.min(t,Math.max(0,parseFloat(e))),o&&(e=parseInt(e*t,10)/100),Math.abs(e-t)<1e-6?1:e%t/parseFloat(t)}function M(e){return Math.min(1,Math.max(0,e))}function A(e){return parseInt(e,16)}function I(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function q(e){return Math.round(255*parseFloat(e)).toString(16)}function P(e){return A(e)/255}var R,F,E,H=(F="[\\s|\\(]+("+(R="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",E="[\\s|\\(]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")[,|\\s]+("+R+")\\s*\\)?",{CSS_UNIT:new RegExp(R),rgb:new RegExp("rgb"+F),rgba:new RegExp("rgba"+E),hsl:new RegExp("hsl"+F),hsla:new RegExp("hsla"+E),hsv:new RegExp("hsv"+F),hsva:new RegExp("hsva"+E),hex3:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex6:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/,hex4:/^#?([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,hex8:/^#?([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})([0-9a-fA-F]{2})$/});function B(e){return!!H.CSS_UNIT.exec(e)}const N=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],j=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],z=["backgroundColor","border","borderTop","borderRight","borderBottom","borderLeft","borderRadius","borderWidth","borderColor","borderStyle","borderTopWidth","borderTopColor","borderTopStyle","borderRightWidth","borderRightColor","borderRightStyle","borderBottomWidth","borderBottomColor","borderBottomStyle","borderLeftWidth","borderLeftColor","borderLeftStyle","borderTopLeftRadius","borderTopRightRadius","borderBottomRightRadius","borderBottomLeftRadius","outline","outlineOffset","boxShadow"],O={".Label":[...N,...j],".Text":[...N,...j],".Input":[...N,...j,...z],".Error":[...N,...j,...z],".Tab":[...N,...j,...z],".TabIcon":[...N],".TabLabel":[...N,...j],".Block":[...N.slice(1),...z.slice(1)],".Container":[...z],".Header":[...N,...z,...j],".Footer":[...N,...z,...j]},W={".Label":O[".Label"],".Label--floating":[...O[".Label"],"transform"],".Input":[...O[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":O[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",...z],".TabIcon":O[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":O[".TabLabel"],".Block":O[".Block"],".Container":O[".Container"],".Header":O[".Header"],".Footer":O[".Footer"],".Footer--link":O[".Text"],".Text":O[".Text"],".Text--redirect":O[".Text"]},$=(e,t=document)=>{let o=null,r=0;for(;!o&&r<e.length;){let n;try{n=t.querySelector(e[r])}catch(e){r++;continue}if(!n){r++;continue}const a=(t.defaultView||window).getComputedStyle(n).backgroundColor;a&&i(a).getAlpha()>=.5&&(o=a),r++}return o||"#ffffff"},V=e=>{const t=i(e),o=t.getAlpha();if(o<1){const e=t.toRgb();return i({r:Math.round(e.r*o+255*(1-o)),g:Math.round(e.g*o+255*(1-o)),b:Math.round(e.b*o+255*(1-o))}).getBrightness()>125}return t.getBrightness()>125},U={default:{hiddenContainer:"#wcpay-hidden-div",hiddenInput:"#wcpay-hidden-input",hiddenInvalidInput:"#wcpay-hidden-invalid-input",hiddenValidActiveLabel:"#wcpay-hidden-valid-active-label"},classicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:["#payment .payment_methods li .payment_box fieldset",".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["li.wc_payment_method .wc-payment-form","li.wc_payment_method .payment_box","#payment","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"],pmmeRelativeTextSizeSelector:".wc_payment_method > label"},blocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"],pmmeRelativeTextSizeSelector:".wc-block-components-radio-control__label-group"},bnplProductPage:{appendTarget:".product .cart .quantity",upeThemeInputSelector:".product .cart .quantity .qty",upeThemeLabelSelector:".product .cart .quantity label",upeThemeTextSelectors:[".product .cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main > .product > div.summary.entry-summary","#main > .product","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".single_add_to_cart_button"]},bnplClassicCart:{appendTarget:".cart .quantity",upeThemeInputSelector:".cart .quantity .qty",upeThemeLabelSelector:".cart .quantity label",upeThemeTextSelectors:[".cart .quantity"],rowElement:"div",validClasses:["input-text"],invalidClasses:["input-text","has-error"],backgroundSelectors:["#payment-method-message","#main .entry-content .cart_totals","#main .entry-content","#main","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".checkout-button"],containerSelectors:[".shop_table"]},bnplCartBlock:{appendTarget:".wc-block-cart .wc-block-components-quantity-selector",upeThemeInputSelector:".wc-block-cart .wc-block-components-quantity-selector .wc-block-components-quantity-selector__input",upeThemeLabelSelector:".wc-block-components-text-input",upeThemeTextSelectors:[".wc-block-components-text-input"],rowElement:"div",validClasses:["wc-block-components-text-input"],invalidClasses:["wc-block-components-text-input","has-error"],backgroundSelectors:[".wc-block-components-bnpl-wrapper",".wc-block-components-order-meta",".wc-block-components-totals-wrapper",".wp-block-woocommerce-cart-order-summary-block",".wp-block-woocommerce-cart-totals-block",".wp-block-woocommerce-cart .wc-block-cart",".wp-block-woocommerce-cart","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-cart__submit-button"],containerSelectors:[".wp-block-woocommerce-cart-line-items-block"]},wooPayClassicCheckout:{appendTarget:".woocommerce-billing-fields__field-wrapper",upeThemeInputSelector:"#billing_first_name",upeThemeLabelSelector:".woocommerce-checkout .form-row label",upeThemeTextSelectors:[".woocommerce-checkout .form-row"],rowElement:"p",validClasses:["form-row"],invalidClasses:["form-row","woocommerce-invalid","woocommerce-invalid-required-field"],alternateSelectors:{appendTarget:"form.checkout",upeThemeInputSelector:'form.checkout input[type="text"]',upeThemeLabelSelector:"form.checkout label",upeThemeTextSelectors:["form.checkout",".woocommerce"]},backgroundSelectors:["#customer_details","#order_review","form.checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:["#place_order"],linkSelectors:["form.checkout a",".woocommerce a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".woocommerce-checkout-review-order-table"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},wooPayBlocksCheckout:{appendTarget:".wc-block-checkout__contact-fields",upeThemeInputSelector:".wc-block-components-text-input #email",upeThemeLabelSelector:".wc-block-components-text-input label",upeThemeTextSelectors:[".wc-block-components-checkout-step__description",".wc-block-components-text-input",".wc-block-components-radio-control__label",".wc-block-checkout__terms"],rowElement:"div",validClasses:["wc-block-components-text-input","is-active"],invalidClasses:["wc-block-components-text-input","has-error"],alternateSelectors:{appendTarget:"#billing.wc-block-components-address-form",upeThemeInputSelector:"#billing-first_name",upeThemeLabelSelector:".wc-block-components-checkout-step__description"},backgroundSelectors:["#payment-method .wc-block-components-radio-control-accordion-option","#payment-method","form.wc-block-checkout__form",".wc-block-checkout","body"],headingSelectors:["h1","h2","h3","h4","h5","h6"],buttonSelectors:[".wc-block-components-checkout-place-order-button"],linkSelectors:[".wc-block-checkout a",".wc-block-components-main a","main a",".entry-content a",".site-content a","#content a","#primary a","a"],containerSelectors:[".wp-block-woocommerce-checkout-order-summary-block"],headerSelectors:["header > div:has(nav)","header > div:has(.site-logo)","header > div:has(.custom-logo)",".site-header","#masthead","header > div:last-of-type","header"],footerSelectors:[".site-footer","#colophon","footer > div","footer"],footerLink:[".site-footer a","footer a"]},updateSelectors:function(e,t){return e.hasOwnProperty("alternateSelectors")&&(Object.entries(e.alternateSelectors).forEach((o=>{const[r,n]=o,a=e[r];if(Array.isArray(a))a.some((e=>{try{return t.querySelector(e)}catch(e){return!1}}))||(e[r]=n);else try{t.querySelector(e[r])||(e[r]=n)}catch(t){e[r]=n}})),delete e.alternateSelectors),e},getSelectors:function(e,t){let o=this.blocksCheckout;switch(e){case"blocks_checkout":o=this.blocksCheckout;break;case"shortcode_checkout":o=this.classicCheckout;break;case"bnpl_product_page":o=this.bnplProductPage;break;case"bnpl_classic_cart":o=this.bnplClassicCart;break;case"bnpl_cart_block":o=this.bnplCartBlock;break;case"woopay_shortcode_checkout":o=this.wooPayClassicCheckout;break;case"woopay_blocks_checkout":o=this.wooPayBlocksCheckout}return{...this.default,...this.updateSelectors(o,t)}}},D={getHiddenContainer:function(e,t){const o=t.createElement("div");return o.setAttribute("id",this.getIDFromSelector(e)),o.style.border=0,o.style.clip="rect(0 0 0 0)",o.style.height="1px",o.style.margin="-1px",o.style.overflow="hidden",o.style.padding="0",o.style.position="absolute",o.style.width="1px",o},createRow:function(e,t=[],o){const r=o.createElement(e);return t.length&&r.classList.add(...t),r},appendClone:function(e,t,o,r){const n=r.querySelector(t);if(n){const t=n.cloneNode(!0);t.id=this.getIDFromSelector(o),t.value="",e.appendChild(t)}},getIDFromSelector:function(e){return e.startsWith("#")||e.startsWith(".")?e.slice(1):e},init:function(e,t){const o=U.getSelectors(e),r=t.querySelector(o.appendTarget),n=t.querySelector(o.upeThemeInputSelector);if(!r||!n)return;t.querySelector(o.hiddenContainer)&&this.cleanup(t);const a=this.getHiddenContainer(o.hiddenContainer,t);r.appendChild(a);const i=this.createRow(o.rowElement,o.validClasses,t);a.appendChild(i);const c=this.createRow(o.rowElement,o.invalidClasses,t);a.appendChild(c),this.appendClone(i,o.upeThemeInputSelector,o.hiddenInput,t),this.appendClone(i,o.upeThemeLabelSelector,o.hiddenValidActiveLabel,t),this.appendClone(c,o.upeThemeInputSelector,o.hiddenInvalidInput,t),this.appendClone(c,o.upeThemeLabelSelector,o.hiddenInvalidInput,t),t.querySelector(o.hiddenInput).style.transition="none"},cleanup:function(e){const t=e.querySelector(U.default.hiddenContainer);t&&t.remove()}},J=(e,t,o=null,r)=>{const n=(Array.isArray(e)?e:[e]).map((e=>{try{return r.querySelector(e)}catch(e){return null}})).filter(Boolean);if(!n.length)return{};const a=r.defaultView||window,i=W[t],c=n[0],l=a.getComputedStyle(c),s={};if(i.forEach((e=>{const t=e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),o=l.getPropertyValue(t);if(o)if("color"!==e)if("lineHeight"!==e||"0"!==o&&"0px"!==o)s[e]=o;else for(let t=1;t<n.length;t++){const o=a.getComputedStyle(n[t]).getPropertyValue("line-height");if("0"!==o&&"0px"!==o){s[e]=o;break}}else s[e]=(e=>{const t=e.match(/^rgba\(\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(\d{1,3})\s*,\s*(0?(\.\d+)?|1?(\.0+)?)\s*\)$/);if(t){const o=t[4]||1;e=`rgb(${t.slice(1,4).map((e=>Math.round(e*o+255*(1-o)))).join(", ")})`}return e})(o)})),".Input"===t||".Tab--selected"===t){const e=((e,t="solid",o)=>e&&o?[e,t,o].join(" "):"")(s.outlineWidth,s.outlineStyle,s.outlineColor);""!==e&&(s.outline=e),delete s.outlineWidth,delete s.outlineColor,delete s.outlineStyle}const u=l.getPropertyValue("text-indent");return"0px"!==u&&"0px"===s.paddingLeft&&"0px"===s.paddingRight&&(s.paddingLeft=u,s.paddingRight=u),".Block"===t&&(s.backgroundColor=o),s},K=(e=document)=>{const t=[],o=e.styleSheets,r=["fonts.googleapis.com","fonts.gstatic.com","use.typekit.net","fonts.bunny.net","fonts.wp.com"];for(let e=0;e<o.length;e++){if(!o[e].href)continue;const n=new URL(o[e].href);-1!==r.indexOf(n.hostname)&&t.push({cssSrc:o[e].href})}return t},G={blocks_checkout:"woopay_blocks_checkout",shortcode_checkout:"woopay_shortcode_checkout"},Q=(e,t=!1,o=document)=>{var r;const n=t&&null!==(r=G[e])&&void 0!==r?r:e,a=U.getSelectors(n,o);D.init(n,o);const c=J(a.hiddenInput,".Input",null,o),l=J(a.hiddenInvalidInput,".Input",null,o),s=J(a.upeThemeLabelSelector,".Label",null,o),u={fontSize:s.fontSize},h=J(a.upeThemeTextSelectors,".Text",null,o),d=J(a.upeThemeInputSelector,".Tab",null,o),p=J(a.hiddenInput,".Tab--selected",null,o),f=(e=>{const t=Object.assign({},e);if(!e.backgroundColor||!e.color)return e;const o=((e,t)=>{const o={backgroundColor:e,color:t},r=i(e),n=i(t);if(!r.isValid()||!n.isValid())return{backgroundColor:"",color:""};const a=r.getBrightness()>50?i(r).darken(7):i(r).lighten(7),c=i.mostReadable(a,[n],{includeFallbackColors:!0});return o.backgroundColor=a.toRgbString(),o.color=c.toRgbString(),o})(e.backgroundColor,e.color);return t.backgroundColor=o.backgroundColor,t.color=o.color,t})(d),m={color:f.color},b={color:p.color},g=$(a.backgroundSelectors,o),y=J(a.upeThemeLabelSelector,".Block",g,o),w={colorBackground:g,colorText:h.color,fontFamily:h.fontFamily,fontSizeBase:h.fontSize};a.pmmeRelativeTextSizeSelector&&w.fontSizeBase&&(w.fontSizeBase=function(e,t,o=.875,r){const n=parseFloat(t);if(isNaN(n))return t;const a=r.querySelector(e);if(!a)return n*o+"px";const i=window.getComputedStyle(a).getPropertyValue("font-size"),c=parseFloat(i)*o;return isNaN(c)?t:n>c?`${c}px`:`${n}px`}(a.pmmeRelativeTextSizeSelector,h.fontSize,.875,o));const _="blocks_checkout"===e||"woopay_blocks_checkout"===n;let S={variables:w,theme:V(g)?"stripe":"night",labels:_?"floating":"above",rules:JSON.parse(JSON.stringify({".Input":c,".Input--invalid":l,".Label":s,".Label--resting":u,".Block":y,".Tab":d,".Tab:hover":f,".Tab--selected":p,".TabIcon:hover":m,".TabIcon--selected":b,".Text":h,".Text--redirect":h}))};if(_&&(S=((e,t)=>{if(e.rules[".Label--floating"]=t,e.rules[".Label--floating"].transform&&"none"!==e.rules[".Label--floating"].transform){const t=e.rules[".Label--floating"].transform.match(/matrix\((.+)\)/);if(t&&t[1]){const o=t[1].split(", "),r=(parseFloat(o[0])+parseFloat(o[3]))/2,n=parseFloat(e.rules[".Label--floating"].lineHeight),a=Math.floor(n*r);e.rules[".Label--floating"].lineHeight=`${a}px`,e.rules[".Label--floating"].fontSize=`${a}px`}delete e.rules[".Label--floating"].transform}if(e.rules[".Input"].paddingTop&&(e.rules[".Input"].paddingTop=`calc(${e.rules[".Input"].paddingTop} - ${e.rules[".Label--floating"].lineHeight} - 4px - 1px)`),e.rules[".Input"].paddingBottom){var o;const t=parseFloat(e.rules[".Input"].paddingBottom);e.rules[".Input"].paddingBottom=t-1+"px";const r=null!==(o=e.rules[".Label"].marginTop)&&void 0!==o?o:"0";e.rules[".Label"].marginTop=`${Math.floor((t-1)/3)}px`,e.rules[".Label--floating"].marginTop=r}return e})(S,J(a.hiddenValidActiveLabel,".Label--floating",null,o))),t){const e=J(a.headerSelectors,".Header",null,o),t=J(a.footerSelectors,".Footer",null,o);var k,v;(!e.backgroundColor||i(e.backgroundColor).getAlpha()<.5)&&(e.backgroundColor=$([...null!==(k=a.headerSelectors)&&void 0!==k?k:[],"body"],o)),(!t.backgroundColor||i(t.backgroundColor).getAlpha()<.5)&&(t.backgroundColor=$([...null!==(v=a.footerSelectors)&&void 0!==v?v:[],"body"],o)),S.rules={...S.rules,".Heading":J(a.headingSelectors,".Label",null,o),".Header":e,".Footer":t,".Footer-link":J(a.footerLink,".Footer--link",null,o),".Button":J(a.buttonSelectors,".Input",null,o),".Link":J(a.linkSelectors,".Label",null,o),".Container":J(a.containerSelectors,".Container",null,o)}}return D.cleanup(o),S};class X{constructor(e,t){this.options=e,this.stripe=null,this.stripePlatform=null,this.request=t,this.isWooPayRequesting=!1}createStripe(e,t,o="",r=[]){const n={locale:t};return o&&(n.stripeAccount=o),r&&(n.betas=r),new Stripe(e,n)}async getStripeForUPE(e){return this.options.forceNetworkSavedCards=t("paymentMethodsConfig")[e].forceNetworkSavedCards,this.getStripe()}async getStripe(e=!1){let t=0;for(;!window.Stripe;)if(await new Promise((e=>setTimeout(e,100))),t+=100,t>6e5)throw new Error("Stripe object not found");return this.__getStripe(e)}__getStripe(e=!1){const{publishableKey:t,accountId:o,forceNetworkSavedCards:r,locale:n,isStripeLinkEnabled:a}=this.options;if(r&&!e)return this.stripePlatform||(this.stripePlatform=this.createStripe(t,n)),this.stripePlatform;if(!this.stripe){let e=["card_country_event_beta_1"];a&&(e=e.concat(["link_autofill_modal_beta_1"])),this.stripe=this.createStripe(t,n,o,e)}return this.stripe}async loadStripeForExpressCheckout(){try{return this.getStripe(!0)}catch(e){return{error:e}}}confirmIntent(t,o=!1){const r=t.match(/#wcpay-confirm-(pi|si):([^:]+):([^:]+):([^:]+)(?::(.+))?$/);if(!r)return!0;const n="si"===r[1];let a=r[2];const i=r[3],c=r[4],l=r[5]||null,s=t.indexOf("order-pay"),u=s>-1&&t.substring(s).match(/\d+/);return u&&(a=u[0]),(async()=>{const{locale:t,publishableKey:o}=this.options,r=e("accountIdForIntentConfirmation");if(n){const e=await this.getStripe(!0);return l?e.confirmSetup({clientSecret:i,confirmParams:{confirmation_token:l},redirect:"if_required"}):e.handleNextAction({clientSecret:i})}return r?this.createStripe(o,t,r).confirmCardPayment(i):(await this.getStripe(!0)).handleNextAction({clientSecret:i})})().then((t=>{var r;let n=null;t.paymentIntent?.last_payment_error&&(n={message:t.paymentIntent.last_payment_error.message}),"requires_action"===t.paymentIntent?.status&&(n={message:"Payment requires additional action."});const i=t.paymentIntent&&t.paymentIntent.id||t.setupIntent&&t.setupIntent.id||t.error&&t.error.payment_intent&&t.error.payment_intent.id||t.error.setup_intent&&t.error.setup_intent.id,l=null!==(s="ajax_url",r="object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(s)?wcpayExpressCheckoutParams[s]:null)&&void 0!==r?r:e("ajaxUrl");var s;const u=e("isChangingPayment");return[this.request(l,{action:"update_order_status",order_id:a,_ajax_nonce:c,intent_id:i,should_save_payment_method:o?"true":"false",is_changing_payment:u?"true":"false"}),n,t.error]})).then((([e,t,o])=>{if(o)throw o;return e.then((e=>{const o="string"==typeof e?JSON.parse(e):e;if(o.error)throw o.error;if(t)throw t;return o.return_url}))}))}async setupIntent(t){const o=await this.request(e("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":t,_ajax_nonce:e("createSetupIntentNonce")});if(!o.success)throw o.data.error;if("succeeded"===o.data.status)return o.data;const r=await this.getStripe(),n=await r.confirmCardSetup(o.data.client_secret),{setupIntent:a,error:i}=n;if(i)throw i;return a}initWooPay(t,r){if(!this.isWooPayRequesting){this.isWooPayRequesting=!0;const n=e("wcAjaxUrl"),a=e("initWooPayNonce");let i=null,c=null;if(e("isWooPayGlobalThemeSupportEnabled"))if(e("isShortcodeCheckout")){const e=document.querySelector(".wp-block-woocommerce-checkout")?"blocks_checkout":document.querySelector(".woocommerce-billing-fields")?"woopay_shortcode_checkout":document.querySelector(".wp-block-woocommerce-cart")?"bnpl_cart_block":document.querySelector(".woocommerce-cart-form")?"bnpl_classic_cart":document.querySelector(".single-product")?"bnpl_product_page":void 0;i=Q(e,!0),c=K()}else i=e("woopayAppearance"),c=e("woopayFontRules");return this.request(o(n,"init_woopay"),{_wpnonce:a,appearance:i,font_rules:c,email:t,user_session:r,order_id:e("order_id"),key:e("key"),billing_email:e("billing_email")}).finally((()=>{this.isWooPayRequesting=!1}))}}expressCheckoutAddToCart(t){const r=e("wcAjaxUrl"),n=e("addToCartNonce");return this.request(o(r,"add_to_cart"),{security:n,...t})}}const Z="wcpay_appearance_";function Y(e){return Z+e}function ee(e,t="",o){for(const r in e){const n=e[r],a=t?t+"["+r+"]":r;"string"==typeof n||"number"==typeof n?o.append(a,n):"object"==typeof n&&ee(n,a,o)}return o}async function te(e,t,o){const r=ee(t,"",new FormData),n=await fetch(e,{method:"POST",body:r,...o});return await n.json()}const oe={bnplProductPage:"bnpl_product_page",bnplClassicCart:"bnpl_classic_cart"},re=async()=>{const{productVariations:e,country:t,locale:o,accountId:r,publishableKey:n,paymentMethods:a,currencyCode:i,isCart:c,cartTotal:l,shouldShowPMME:s}=window.wcpayStripeSiteMessaging;let u,h="bnplProductPage";const d=document.getElementById("payment-method-message");c?(u=parseInt(l,10)||0,h="bnplClassicCart"):(u=parseInt(e.base_product.amount,10)||0,s||d.style.setProperty("display","none"));const p=new X({publishableKey:n,accountId:r,locale:o},te),f={amount:u,currency:i||"USD",paymentMethodTypes:a||[],countryCode:t},m=oe[h],b=window.wcpayStripeSiteMessaging.stylesCacheVersion;let g=function(e,t){try{const o=localStorage.getItem(Y(e));if(!o)return null;const r=JSON.parse(o);if(r?.version===t)return r.appearance}catch{}return null}(m,b);g||(g=Q(m),function(e,t){document.dispatchEvent(new CustomEvent("wcpay_elements_appearance",{detail:{appearance:e,elementsLocation:t}}))}(g,m),function(e,t,o){try{localStorage.setItem(Y(e),JSON.stringify({version:t,appearance:o}))}catch{}}(m,b,g));const y={appearance:g,fonts:K()},w=(await p.getStripe()).elements(y).create("paymentMethodMessaging",f);function _(e,t){const o=e.slice(-2),r=parseFloat(e);switch(o){case"em":return r*t+"px";case"px":return e;default:return"0px"}}w.mount("#payment-method-message");const S=document.querySelector(".price")||document.querySelector(".wp-block-woocommerce-product-price"),k=document.querySelector(".cart_totals .shop_table");if(S||k){const e=S||k,t=window.getComputedStyle(e);let o=t.marginBottom;const r=parseFloat(t.fontSize),n=parseFloat(window.getComputedStyle(document.documentElement).fontSize);let a;o.endsWith("em")?o=_(o,r):o.endsWith("rem")&&(o=_(o,n)),d.style.setProperty("--wc-bnpl-margin-bottom",o),c||(a=document.createElement("div"),a.classList.add("pmme-loading"),d.prepend(a)),w.on("ready",(()=>{if(c){d.classList.add("ready");const e=document.querySelector(".cart-collaterals");if(getComputedStyle(e).getPropertyValue("--wc-bnpl-height").trim())return;const t=document.getElementById("payment-method-message"),r=document.querySelector(".cart_totals .__PrivateStripeElement");setTimeout((()=>{const n=window.getComputedStyle(t),a=parseFloat(n.height),i=parseFloat(o),c=a+i,l=window.getComputedStyle(r),s=parseFloat(l.height);e.style.setProperty("--wc-bnpl-height",c+"px"),e.style.setProperty("--wc-bnpl-container-height",s-12+"px"),e.style.setProperty("--wc-bnpl-loader-margin",i+2+"px"),t.style.setProperty("--wc-bnpl-margin-bottom","-4px")}),2e3)}else a?.remove()}))}return w};jQuery((async function(e){if(!window.wcpayStripeSiteMessaging||window.wcpayStripeSiteMessaging.isCartBlock)return;const{shouldInitializePMME:t}=window.wcpayStripeSiteMessaging;if(!t)return void document.getElementById("payment-method-message").style.setProperty("display","none");const{productVariations:r,productId:n,isCart:a}=window.wcpayStripeSiteMessaging;let i,c;if(!a){const{amount:e,currency:t}=r[n];i=e||0,c=t}const l=e(".quantity input[type=number]"),s=await re(),u=Object.keys(r).length>1,h=e=>{const t=parseInt(e,10);return isNaN(t)?0:t},d=(e,t,o=1)=>{const r=h(e)*h(o);r<=0||!t||s?.update({amount:r,currency:t})},p=()=>{d(i,c,l.val())};l.on("change",(async t=>{let n=i;const a=e('input[name="variation_id"]').val();u&&r.hasOwnProperty(a)&&(n=r[a]?.amount),d(n,c,t.target.value);try{const r=await(l=n*t.target.value,s=c,h=window.wcpayStripeSiteMessaging.country,te(o(window.wcpayStripeSiteMessaging.wcAjaxUrl,"check_bnpl_availability"),{security:window.wcpayStripeSiteMessaging.nonce.is_bnpl_available,price:l,currency:s,country:h}));r.success&&r.data.is_available?e("#payment-method-message").slideDown():e("#payment-method-message").slideUp()}catch{}var l,s,h})),e(document.body).on("updated_cart_totals",(()=>{e("#payment-method-message").before('<div class="pmme-loading"></div>'),e("#payment-method-message").hide(),te(o(window.wcpayStripeSiteMessaging.wcAjaxUrl,"get_cart_total"),{security:window.wcpayStripeSiteMessaging.nonce.get_cart_total}).then((t=>{window.wcpayStripeSiteMessaging.cartTotal=t.total,re().then((()=>{setTimeout((()=>{e(".pmme-loading").remove(),e("#payment-method-message").show(),e("#payment-method-message").addClass("pmme-updated")}),1e3)}))}))})),u&&(e(".single_variation_wrap").on("show_variation",((e,t)=>{r[t.variation_id]&&d(r[t.variation_id].amount,c,l.val())})),e(".variations").on("change",(e=>{""===e.target.value&&p()})),e(".reset_variations").on("click",p))}))})()})();
!function(n,t){var r,e;"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define("underscore",t):(n="undefined"!=typeof globalThis?globalThis:n||self,r=n._,(e=n._=t()).noConflict=function(){return n._=r,e})}(this,function(){var n="1.13.7",t="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},e=Array.prototype,V=Object.prototype,F="undefined"!=typeof Symbol?Symbol.prototype:null,P=e.push,f=e.slice,s=V.toString,q=V.hasOwnProperty,r="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,U=Array.isArray,W=Object.keys,z=Object.create,L=r&&ArrayBuffer.isView,$=isNaN,C=isFinite,K=!{toString:null}.propertyIsEnumerable("toString"),J=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],G=Math.pow(2,53)-1;function l(u,o){return o=null==o?u.length-1:+o,function(){for(var n=Math.max(arguments.length-o,0),t=Array(n),r=0;r<n;r++)t[r]=arguments[r+o];switch(o){case 0:return u.call(this,t);case 1:return u.call(this,arguments[0],t);case 2:return u.call(this,arguments[0],arguments[1],t)}for(var e=Array(o+1),r=0;r<o;r++)e[r]=arguments[r];return e[o]=t,u.apply(this,e)}}function o(n){var t=typeof n;return"function"==t||"object"==t&&!!n}function H(n){return void 0===n}function Q(n){return!0===n||!1===n||"[object Boolean]"===s.call(n)}function i(n){var t="[object "+n+"]";return function(n){return s.call(n)===t}}var X=i("String"),Y=i("Number"),Z=i("Date"),nn=i("RegExp"),tn=i("Error"),rn=i("Symbol"),en=i("ArrayBuffer"),a=i("Function"),t=t.document&&t.document.childNodes,p=a="function"!=typeof/./&&"object"!=typeof Int8Array&&"function"!=typeof t?function(n){return"function"==typeof n||!1}:a,t=i("Object"),un=u&&(!/\[native code\]/.test(String(DataView))||t(new DataView(new ArrayBuffer(8)))),a="undefined"!=typeof Map&&t(new Map),u=i("DataView");var h=un?function(n){return null!=n&&p(n.getInt8)&&en(n.buffer)}:u,v=U||i("Array");function y(n,t){return null!=n&&q.call(n,t)}var on=i("Arguments"),an=(!function(){on(arguments)||(on=function(n){return y(n,"callee")})}(),on);function fn(n){return Y(n)&&$(n)}function cn(n){return function(){return n}}function ln(t){return function(n){n=t(n);return"number"==typeof n&&0<=n&&n<=G}}function sn(t){return function(n){return null==n?void 0:n[t]}}var d=sn("byteLength"),pn=ln(d),hn=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;var vn=r?function(n){return L?L(n)&&!h(n):pn(n)&&hn.test(s.call(n))}:cn(!1),g=sn("length");function yn(n,t){t=function(t){for(var r={},n=t.length,e=0;e<n;++e)r[t[e]]=!0;return{contains:function(n){return!0===r[n]},push:function(n){return r[n]=!0,t.push(n)}}}(t);var r=J.length,e=n.constructor,u=p(e)&&e.prototype||V,o="constructor";for(y(n,o)&&!t.contains(o)&&t.push(o);r--;)(o=J[r])in n&&n[o]!==u[o]&&!t.contains(o)&&t.push(o)}function b(n){if(!o(n))return[];if(W)return W(n);var t,r=[];for(t in n)y(n,t)&&r.push(t);return K&&yn(n,r),r}function dn(n,t){var r=b(t),e=r.length;if(null==n)return!e;for(var u=Object(n),o=0;o<e;o++){var i=r[o];if(t[i]!==u[i]||!(i in u))return!1}return!0}function m(n){return n instanceof m?n:this instanceof m?void(this._wrapped=n):new m(n)}function gn(n){return new Uint8Array(n.buffer||n,n.byteOffset||0,d(n))}m.VERSION=n,m.prototype.valueOf=m.prototype.toJSON=m.prototype.value=function(){return this._wrapped},m.prototype.toString=function(){return String(this._wrapped)};var bn="[object DataView]";function mn(n,t,r,e){var u;return n===t?0!==n||1/n==1/t:null!=n&&null!=t&&(n!=n?t!=t:("function"==(u=typeof n)||"object"==u||"object"==typeof t)&&function n(t,r,e,u){t instanceof m&&(t=t._wrapped);r instanceof m&&(r=r._wrapped);var o=s.call(t);if(o!==s.call(r))return!1;if(un&&"[object Object]"==o&&h(t)){if(!h(r))return!1;o=bn}switch(o){case"[object RegExp]":case"[object String]":return""+t==""+r;case"[object Number]":return+t!=+t?+r!=+r:0==+t?1/+t==1/r:+t==+r;case"[object Date]":case"[object Boolean]":return+t==+r;case"[object Symbol]":return F.valueOf.call(t)===F.valueOf.call(r);case"[object ArrayBuffer]":case bn:return n(gn(t),gn(r),e,u)}o="[object Array]"===o;if(!o&&vn(t)){var i=d(t);if(i!==d(r))return!1;if(t.buffer===r.buffer&&t.byteOffset===r.byteOffset)return!0;o=!0}if(!o){if("object"!=typeof t||"object"!=typeof r)return!1;var i=t.constructor,a=r.constructor;if(i!==a&&!(p(i)&&i instanceof i&&p(a)&&a instanceof a)&&"constructor"in t&&"constructor"in r)return!1}e=e||[];u=u||[];var f=e.length;for(;f--;)if(e[f]===t)return u[f]===r;e.push(t);u.push(r);if(o){if((f=t.length)!==r.length)return!1;for(;f--;)if(!mn(t[f],r[f],e,u))return!1}else{var c,l=b(t);if(f=l.length,b(r).length!==f)return!1;for(;f--;)if(c=l[f],!y(r,c)||!mn(t[c],r[c],e,u))return!1}e.pop();u.pop();return!0}(n,t,r,e))}function c(n){if(!o(n))return[];var t,r=[];for(t in n)r.push(t);return K&&yn(n,r),r}function jn(e){var u=g(e);return function(n){if(null==n)return!1;var t=c(n);if(g(t))return!1;for(var r=0;r<u;r++)if(!p(n[e[r]]))return!1;return e!==_n||!p(n[wn])}}var wn="forEach",t=["clear","delete"],u=["get","has","set"],U=t.concat(wn,u),_n=t.concat(u),r=["add"].concat(t,wn,"has"),u=a?jn(U):i("Map"),t=a?jn(_n):i("WeakMap"),U=a?jn(r):i("Set"),a=i("WeakSet");function j(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=n[t[u]];return e}function An(n){for(var t={},r=b(n),e=0,u=r.length;e<u;e++)t[n[r[e]]]=r[e];return t}function xn(n){var t,r=[];for(t in n)p(n[t])&&r.push(t);return r.sort()}function Sn(f,c){return function(n){var t=arguments.length;if(c&&(n=Object(n)),!(t<2||null==n))for(var r=1;r<t;r++)for(var e=arguments[r],u=f(e),o=u.length,i=0;i<o;i++){var a=u[i];c&&void 0!==n[a]||(n[a]=e[a])}return n}}var On=Sn(c),w=Sn(b),Mn=Sn(c,!0);function En(n){var t;return o(n)?z?z(n):((t=function(){}).prototype=n,n=new t,t.prototype=null,n):{}}function Bn(n){return v(n)?n:[n]}function _(n){return m.toPath(n)}function Nn(n,t){for(var r=t.length,e=0;e<r;e++){if(null==n)return;n=n[t[e]]}return r?n:void 0}function In(n,t,r){n=Nn(n,_(t));return H(n)?r:n}function Tn(n){return n}function A(t){return t=w({},t),function(n){return dn(n,t)}}function kn(t){return t=_(t),function(n){return Nn(n,t)}}function x(u,o,n){if(void 0===o)return u;switch(null==n?3:n){case 1:return function(n){return u.call(o,n)};case 3:return function(n,t,r){return u.call(o,n,t,r)};case 4:return function(n,t,r,e){return u.call(o,n,t,r,e)}}return function(){return u.apply(o,arguments)}}function Dn(n,t,r){return null==n?Tn:p(n)?x(n,t,r):(o(n)&&!v(n)?A:kn)(n)}function Rn(n,t){return Dn(n,t,1/0)}function S(n,t,r){return m.iteratee!==Rn?m.iteratee(n,t):Dn(n,t,r)}function Vn(){}function Fn(n,t){return null==t&&(t=n,n=0),n+Math.floor(Math.random()*(t-n+1))}m.toPath=Bn,m.iteratee=Rn;var O=Date.now||function(){return(new Date).getTime()};function Pn(t){function r(n){return t[n]}var n="(?:"+b(t).join("|")+")",e=RegExp(n),u=RegExp(n,"g");return function(n){return e.test(n=null==n?"":""+n)?n.replace(u,r):n}}var r={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#x27;","`":"&#x60;"},qn=Pn(r),r=Pn(An(r)),Un=m.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g},Wn=/(.)^/,zn={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Ln=/\\|'|\r|\n|\u2028|\u2029/g;function $n(n){return"\\"+zn[n]}var Cn=/^\s*(\w|\$)+\s*$/;var Kn=0;function Jn(n,t,r,e,u){return e instanceof t?(e=En(n.prototype),o(t=n.apply(e,u))?t:e):n.apply(r,u)}var M=l(function(u,o){function i(){for(var n=0,t=o.length,r=Array(t),e=0;e<t;e++)r[e]=o[e]===a?arguments[n++]:o[e];for(;n<arguments.length;)r.push(arguments[n++]);return Jn(u,i,this,this,r)}var a=M.placeholder;return i}),Gn=(M.placeholder=m,l(function(t,r,e){var u;if(p(t))return u=l(function(n){return Jn(t,u,r,this,e.concat(n))});throw new TypeError("Bind must be called on a function")})),E=ln(g);function B(n,t,r,e){if(e=e||[],t||0===t){if(t<=0)return e.concat(n)}else t=1/0;for(var u=e.length,o=0,i=g(n);o<i;o++){var a=n[o];if(E(a)&&(v(a)||an(a)))if(1<t)B(a,t-1,r,e),u=e.length;else for(var f=0,c=a.length;f<c;)e[u++]=a[f++];else r||(e[u++]=a)}return e}var Hn=l(function(n,t){var r=(t=B(t,!1,!1)).length;if(r<1)throw new Error("bindAll must be passed function names");for(;r--;){var e=t[r];n[e]=Gn(n[e],n)}return n});var Qn=l(function(n,t,r){return setTimeout(function(){return n.apply(null,r)},t)}),Xn=M(Qn,m,1);function Yn(n){return function(){return!n.apply(this,arguments)}}function Zn(n,t){var r;return function(){return 0<--n&&(r=t.apply(this,arguments)),n<=1&&(t=null),r}}var nt=M(Zn,2);function tt(n,t,r){t=S(t,r);for(var e,u=b(n),o=0,i=u.length;o<i;o++)if(t(n[e=u[o]],e,n))return e}function rt(o){return function(n,t,r){t=S(t,r);for(var e=g(n),u=0<o?0:e-1;0<=u&&u<e;u+=o)if(t(n[u],u,n))return u;return-1}}var et=rt(1),ut=rt(-1);function ot(n,t,r,e){for(var u=(r=S(r,e,1))(t),o=0,i=g(n);o<i;){var a=Math.floor((o+i)/2);r(n[a])<u?o=a+1:i=a}return o}function it(o,i,a){return function(n,t,r){var e=0,u=g(n);if("number"==typeof r)0<o?e=0<=r?r:Math.max(r+u,e):u=0<=r?Math.min(r+1,u):r+u+1;else if(a&&r&&u)return n[r=a(n,t)]===t?r:-1;if(t!=t)return 0<=(r=i(f.call(n,e,u),fn))?r+e:-1;for(r=0<o?e:u-1;0<=r&&r<u;r+=o)if(n[r]===t)return r;return-1}}var at=it(1,et,ot),ft=it(-1,ut);function ct(n,t,r){t=(E(n)?et:tt)(n,t,r);if(void 0!==t&&-1!==t)return n[t]}function N(n,t,r){if(t=x(t,r),E(n))for(u=0,o=n.length;u<o;u++)t(n[u],u,n);else for(var e=b(n),u=0,o=e.length;u<o;u++)t(n[e[u]],e[u],n);return n}function I(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=Array(u),i=0;i<u;i++){var a=e?e[i]:i;o[i]=t(n[a],a,n)}return o}function lt(f){return function(n,t,r,e){var u=3<=arguments.length;return function(n,t,r,e){var u=!E(n)&&b(n),o=(u||n).length,i=0<f?0:o-1;for(e||(r=n[u?u[i]:i],i+=f);0<=i&&i<o;i+=f){var a=u?u[i]:i;r=t(r,n[a],a,n)}return r}(n,x(t,e,4),r,u)}}var st=lt(1),pt=lt(-1);function T(n,e,t){var u=[];return e=S(e,t),N(n,function(n,t,r){e(n,t,r)&&u.push(n)}),u}function ht(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(!t(n[i],i,n))return!1}return!0}function vt(n,t,r){t=S(t,r);for(var e=!E(n)&&b(n),u=(e||n).length,o=0;o<u;o++){var i=e?e[o]:o;if(t(n[i],i,n))return!0}return!1}function k(n,t,r,e){return E(n)||(n=j(n)),0<=at(n,t,r="number"==typeof r&&!e?r:0)}var yt=l(function(n,r,e){var u,o;return p(r)?o=r:(r=_(r),u=r.slice(0,-1),r=r[r.length-1]),I(n,function(n){var t=o;if(!t){if(null==(n=u&&u.length?Nn(n,u):n))return;t=n[r]}return null==t?t:t.apply(n,e)})});function dt(n,t){return I(n,kn(t))}function gt(n,e,t){var r,u,o=-1/0,i=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&o<r&&(o=r);else e=S(e,t),N(n,function(n,t,r){u=e(n,t,r),(i<u||u===-1/0&&o===-1/0)&&(o=n,i=u)});return o}var bt=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function mt(n){return n?v(n)?f.call(n):X(n)?n.match(bt):E(n)?I(n,Tn):j(n):[]}function jt(n,t,r){if(null==t||r)return(n=E(n)?n:j(n))[Fn(n.length-1)];for(var e=mt(n),r=g(e),u=(t=Math.max(Math.min(t,r),0),r-1),o=0;o<t;o++){var i=Fn(o,u),a=e[o];e[o]=e[i],e[i]=a}return e.slice(0,t)}function D(o,t){return function(r,e,n){var u=t?[[],[]]:{};return e=S(e,n),N(r,function(n,t){t=e(n,t,r);o(u,n,t)}),u}}var wt=D(function(n,t,r){y(n,r)?n[r].push(t):n[r]=[t]}),_t=D(function(n,t,r){n[r]=t}),At=D(function(n,t,r){y(n,r)?n[r]++:n[r]=1}),xt=D(function(n,t,r){n[r?0:1].push(t)},!0);function St(n,t,r){return t in r}var Ot=l(function(n,t){var r={},e=t[0];if(null!=n){p(e)?(1<t.length&&(e=x(e,t[1])),t=c(n)):(e=St,t=B(t,!1,!1),n=Object(n));for(var u=0,o=t.length;u<o;u++){var i=t[u],a=n[i];e(a,i,n)&&(r[i]=a)}}return r}),Mt=l(function(n,r){var t,e=r[0];return p(e)?(e=Yn(e),1<r.length&&(t=r[1])):(r=I(B(r,!1,!1),String),e=function(n,t){return!k(r,t)}),Ot(n,e,t)});function Et(n,t,r){return f.call(n,0,Math.max(0,n.length-(null==t||r?1:t)))}function Bt(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[0]:Et(n,n.length-t)}function R(n,t,r){return f.call(n,null==t||r?1:t)}var Nt=l(function(n,t){return t=B(t,!0,!0),T(n,function(n){return!k(t,n)})}),It=l(function(n,t){return Nt(n,t)});function Tt(n,t,r,e){Q(t)||(e=r,r=t,t=!1),null!=r&&(r=S(r,e));for(var u=[],o=[],i=0,a=g(n);i<a;i++){var f=n[i],c=r?r(f,i,n):f;t&&!r?(i&&o===c||u.push(f),o=c):r?k(o,c)||(o.push(c),u.push(f)):k(u,f)||u.push(f)}return u}var kt=l(function(n){return Tt(B(n,!0,!0))});function Dt(n){for(var t=n&&gt(n,g).length||0,r=Array(t),e=0;e<t;e++)r[e]=dt(n,e);return r}var Rt=l(Dt);function Vt(n,t){return n._chain?m(t).chain():t}function Ft(r){return N(xn(r),function(n){var t=m[n]=r[n];m.prototype[n]=function(){var n=[this._wrapped];return P.apply(n,arguments),Vt(this,t.apply(m,n))}}),m}N(["pop","push","reverse","shift","sort","splice","unshift"],function(t){var r=e[t];m.prototype[t]=function(){var n=this._wrapped;return null!=n&&(r.apply(n,arguments),"shift"!==t&&"splice"!==t||0!==n.length||delete n[0]),Vt(this,n)}}),N(["concat","join","slice"],function(n){var t=e[n];m.prototype[n]=function(){var n=this._wrapped;return Vt(this,n=null!=n?t.apply(n,arguments):n)}});n=Ft({__proto__:null,VERSION:n,restArguments:l,isObject:o,isNull:function(n){return null===n},isUndefined:H,isBoolean:Q,isElement:function(n){return!(!n||1!==n.nodeType)},isString:X,isNumber:Y,isDate:Z,isRegExp:nn,isError:tn,isSymbol:rn,isArrayBuffer:en,isDataView:h,isArray:v,isFunction:p,isArguments:an,isFinite:function(n){return!rn(n)&&C(n)&&!isNaN(parseFloat(n))},isNaN:fn,isTypedArray:vn,isEmpty:function(n){var t;return null==n||("number"==typeof(t=g(n))&&(v(n)||X(n)||an(n))?0===t:0===g(b(n)))},isMatch:dn,isEqual:function(n,t){return mn(n,t)},isMap:u,isWeakMap:t,isSet:U,isWeakSet:a,keys:b,allKeys:c,values:j,pairs:function(n){for(var t=b(n),r=t.length,e=Array(r),u=0;u<r;u++)e[u]=[t[u],n[t[u]]];return e},invert:An,functions:xn,methods:xn,extend:On,extendOwn:w,assign:w,defaults:Mn,create:function(n,t){return n=En(n),t&&w(n,t),n},clone:function(n){return o(n)?v(n)?n.slice():On({},n):n},tap:function(n,t){return t(n),n},get:In,has:function(n,t){for(var r=(t=_(t)).length,e=0;e<r;e++){var u=t[e];if(!y(n,u))return!1;n=n[u]}return!!r},mapObject:function(n,t,r){t=S(t,r);for(var e=b(n),u=e.length,o={},i=0;i<u;i++){var a=e[i];o[a]=t(n[a],a,n)}return o},identity:Tn,constant:cn,noop:Vn,toPath:Bn,property:kn,propertyOf:function(t){return null==t?Vn:function(n){return In(t,n)}},matcher:A,matches:A,times:function(n,t,r){var e=Array(Math.max(0,n));t=x(t,r,1);for(var u=0;u<n;u++)e[u]=t(u);return e},random:Fn,now:O,escape:qn,unescape:r,templateSettings:Un,template:function(o,n,t){n=Mn({},n=!n&&t?t:n,m.templateSettings);var r,t=RegExp([(n.escape||Wn).source,(n.interpolate||Wn).source,(n.evaluate||Wn).source].join("|")+"|$","g"),i=0,a="__p+='";if(o.replace(t,function(n,t,r,e,u){return a+=o.slice(i,u).replace(Ln,$n),i=u+n.length,t?a+="'+\n((__t=("+t+"))==null?'':_.escape(__t))+\n'":r?a+="'+\n((__t=("+r+"))==null?'':__t)+\n'":e&&(a+="';\n"+e+"\n__p+='"),n}),a+="';\n",t=n.variable){if(!Cn.test(t))throw new Error("variable is not a bare identifier: "+t)}else a="with(obj||{}){\n"+a+"}\n",t="obj";a="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+a+"return __p;\n";try{r=new Function(t,"_",a)}catch(n){throw n.source=a,n}function e(n){return r.call(this,n,m)}return e.source="function("+t+"){\n"+a+"}",e},result:function(n,t,r){var e=(t=_(t)).length;if(!e)return p(r)?r.call(n):r;for(var u=0;u<e;u++){var o=null==n?void 0:n[t[u]];void 0===o&&(o=r,u=e),n=p(o)?o.call(n):o}return n},uniqueId:function(n){var t=++Kn+"";return n?n+t:t},chain:function(n){return(n=m(n))._chain=!0,n},iteratee:Rn,partial:M,bind:Gn,bindAll:Hn,memoize:function(e,u){function o(n){var t=o.cache,r=""+(u?u.apply(this,arguments):n);return y(t,r)||(t[r]=e.apply(this,arguments)),t[r]}return o.cache={},o},delay:Qn,defer:Xn,throttle:function(r,e,u){function o(){l=!1===u.leading?0:O(),i=null,c=r.apply(a,f),i||(a=f=null)}function n(){var n=O(),t=(l||!1!==u.leading||(l=n),e-(n-l));return a=this,f=arguments,t<=0||e<t?(i&&(clearTimeout(i),i=null),l=n,c=r.apply(a,f),i||(a=f=null)):i||!1===u.trailing||(i=setTimeout(o,t)),c}var i,a,f,c,l=0;return u=u||{},n.cancel=function(){clearTimeout(i),l=0,i=a=f=null},n},debounce:function(t,r,e){function u(){var n=O()-i;n<r?o=setTimeout(u,r-n):(o=null,e||(f=t.apply(c,a)),o||(a=c=null))}var o,i,a,f,c,n=l(function(n){return c=this,a=n,i=O(),o||(o=setTimeout(u,r),e&&(f=t.apply(c,a))),f});return n.cancel=function(){clearTimeout(o),o=a=c=null},n},wrap:function(n,t){return M(t,n)},negate:Yn,compose:function(){var r=arguments,e=r.length-1;return function(){for(var n=e,t=r[e].apply(this,arguments);n--;)t=r[n].call(this,t);return t}},after:function(n,t){return function(){if(--n<1)return t.apply(this,arguments)}},before:Zn,once:nt,findKey:tt,findIndex:et,findLastIndex:ut,sortedIndex:ot,indexOf:at,lastIndexOf:ft,find:ct,detect:ct,findWhere:function(n,t){return ct(n,A(t))},each:N,forEach:N,map:I,collect:I,reduce:st,foldl:st,inject:st,reduceRight:pt,foldr:pt,filter:T,select:T,reject:function(n,t,r){return T(n,Yn(S(t)),r)},every:ht,all:ht,some:vt,any:vt,contains:k,includes:k,include:k,invoke:yt,pluck:dt,where:function(n,t){return T(n,A(t))},max:gt,min:function(n,e,t){var r,u,o=1/0,i=1/0;if(null==e||"number"==typeof e&&"object"!=typeof n[0]&&null!=n)for(var a=0,f=(n=E(n)?n:j(n)).length;a<f;a++)null!=(r=n[a])&&r<o&&(o=r);else e=S(e,t),N(n,function(n,t,r){((u=e(n,t,r))<i||u===1/0&&o===1/0)&&(o=n,i=u)});return o},shuffle:function(n){return jt(n,1/0)},sample:jt,sortBy:function(n,e,t){var u=0;return e=S(e,t),dt(I(n,function(n,t,r){return{value:n,index:u++,criteria:e(n,t,r)}}).sort(function(n,t){var r=n.criteria,e=t.criteria;if(r!==e){if(e<r||void 0===r)return 1;if(r<e||void 0===e)return-1}return n.index-t.index}),"value")},groupBy:wt,indexBy:_t,countBy:At,partition:xt,toArray:mt,size:function(n){return null==n?0:(E(n)?n:b(n)).length},pick:Ot,omit:Mt,first:Bt,head:Bt,take:Bt,initial:Et,last:function(n,t,r){return null==n||n.length<1?null==t||r?void 0:[]:null==t||r?n[n.length-1]:R(n,Math.max(0,n.length-t))},rest:R,tail:R,drop:R,compact:function(n){return T(n,Boolean)},flatten:function(n,t){return B(n,t,!1)},without:It,uniq:Tt,unique:Tt,union:kt,intersection:function(n){for(var t=[],r=arguments.length,e=0,u=g(n);e<u;e++){var o=n[e];if(!k(t,o)){for(var i=1;i<r&&k(arguments[i],o);i++);i===r&&t.push(o)}}return t},difference:Nt,unzip:Dt,transpose:Dt,zip:Rt,object:function(n,t){for(var r={},e=0,u=g(n);e<u;e++)t?r[n[e]]=t[e]:r[n[e][0]]=n[e][1];return r},range:function(n,t,r){null==t&&(t=n||0,n=0),r=r||(t<n?-1:1);for(var e=Math.max(Math.ceil((t-n)/r),0),u=Array(e),o=0;o<e;o++,n+=r)u[o]=n;return u},chunk:function(n,t){if(null==t||t<1)return[];for(var r=[],e=0,u=n.length;e<u;)r.push(f.call(n,e,e+=t));return r},mixin:Ft,default:m});return n._=n});
window.wp=window.wp||{},function(r){var t="undefined"==typeof _wpUtilSettings?{}:_wpUtilSettings;wp.template=_.memoize(function(a){var n,s={evaluate:/<#([\s\S]+?)#>/g,interpolate:/\{\{\{([\s\S]+?)\}\}\}/g,escape:/\{\{([^\}]+?)\}\}(?!\})/g,variable:"data"};return function(t){var e=document.querySelector("script#tmpl-"+a);if(e)return(n=n||_.template(r(e).html(),s))(t);throw new Error("Template not found: #tmpl-"+a)}}),wp.ajax={settings:t.ajax||{},post:function(t,e){return wp.ajax.send({data:_.isObject(t)?t:_.extend(e||{},{action:t})})},send:function(n,t){var e,a;return _.isObject(n)?t=n:(t=t||{}).data=_.extend(t.data||{},{action:n}),t=_.defaults(t||{},{type:"POST",url:wp.ajax.settings.url,context:this}),(e=(a=r.Deferred(function(a){t.success&&a.done(t.success),t.error&&a.fail(t.error),delete t.success,delete t.error,a.jqXHR=r.ajax(t).done(function(t){var e;"1"!==t&&1!==t||(t={success:!0}),_.isObject(t)&&!_.isUndefined(t.success)?(e=this,a.done(function(){n&&n.data&&"query-attachments"===n.data.action&&a.jqXHR.hasOwnProperty("getResponseHeader")&&a.jqXHR.getResponseHeader("X-WP-Total")?e.totalAttachments=parseInt(a.jqXHR.getResponseHeader("X-WP-Total"),10):e.totalAttachments=0}),a[t.success?"resolveWith":"rejectWith"](this,[t.data])):a.rejectWith(this,[t])}).fail(function(){a.rejectWith(this,arguments)})})).promise()).abort=function(){return a.jqXHR.abort(),this},e}}}(jQuery);
(function(){
var __webpack_exports__={};
;
(function ($, window, document, undefined){
var GermanizedVariationForm=function ($form){
var self=this;
self.params=wc_gzd_add_to_cart_variation_params;
self.$form=$form;
self.$wrapper=$form.closest(self.params.wrapper);
self.$product=$form.closest('.product');
self.variationData=$form.data('product_variations');
self.$singleVariation=$form.find('.single_variation');
self.$singleVariationWrap=$form.find('.single_variation_wrap');
self.$resetVariations=$form.find('.reset_variations');
self.$button=$form.find('.single_add_to_cart_button');
self.$form.addClass('has-gzd-variation-form');
self.$form.off('.wc-gzd-variation-form');
if(self.$wrapper.length <=0){
self.$wrapper=self.$product;
}
self.showOrHideTabs(self);
var $priceElement=self.getPriceElement(self);
self.isBlockLayout=self.$wrapper.find('.wp-block-woocommerce-product-price').length > 0;
self.replacePrice=self.$wrapper.hasClass('bundled_product') ? false:self.params.replace_price;
if($priceElement.length <=0){
self.replacePrice=false;
}
$form.on('click.wc-gzd-variation-form', '.reset_variations', {
GermanizedvariationForm: self
}, self.onReset);
$form.on('reset_data.wc-gzd-variation-form', {
GermanizedvariationForm: self
}, self.onReset);
$form.on('show_variation.wc-gzd-variation-form', {
GermanizedvariationForm: self
}, self.onShowVariation);
if(self.replacePrice){
self.$form.addClass('wc-gzd-replace-price');
}
self.$wrapper.find('' + '.woocommerce-product-attributes-item--food_description, ' + '.woocommerce-product-attributes-item--alcohol_content, ' + '.woocommerce-product-attributes-item--net_filling_quantity, ' + '.woocommerce-product-attributes-item--drained_weight, ' + '.woocommerce-product-attributes-item--food_place_of_origin, ' + '.woocommerce-product-attributes-item--nutri_score, ' + '.woocommerce-product-attributes-item--food_distributor').each(function (){
var $tr=$(this);
if($tr.find('.woocommerce-product-attributes-item__value').is(':empty')||$tr.find('.woocommerce-product-attributes-item__value .wc-gzd-additional-info-placeholder').is(':empty')){
$tr.attr('aria-hidden', 'true').addClass('wc-gzd-additional-info-placeholder');
}});
};
GermanizedVariationForm.prototype.showOrHideTabs=function (self, has_product_safety_information=undefined){
var $defaultWrapper=$('body').hasClass('type-product') ? $('body'):self.$product;
has_product_safety_information=undefined===has_product_safety_information ? $defaultWrapper.hasClass('has-product-safety-information'):has_product_safety_information;
if(has_product_safety_information){
self.$product.find('.product_safety_tab').show().css('display', 'inline-block');
}else{
self.$product.find('.product_safety_tab').hide();
}};
GermanizedVariationForm.prototype.getPriceElement=function (self){
var $wrapper=self.$wrapper;
return $wrapper.find(self.params.price_selector + ':not(.price-unit):visible').not('.variations_form .single_variation .price').first();
};
GermanizedVariationForm.prototype.onReset=function (event){
var form=event.data.GermanizedvariationForm,
$wrapper=form.$wrapper;
$wrapper.find('.variation_gzd_modified').each(function (){
$(this).wc_gzd_reset_content();
});
$wrapper.find('.variation_gzd_modified').remove();
form.showOrHideTabs(form);
event.data.GermanizedvariationForm.$form.trigger('germanized_reset_data');
};
GermanizedVariationForm.prototype.getElementOrBlock=function (self, element, innerElement){
var $wrapper=self.$wrapper;
var blockSearch='.wp-block-woocommerce-gzd-product-' + element + '[data-is-descendent-of-single-product-template]';
if($wrapper.find(blockSearch).length > 0){
return $wrapper.find(blockSearch + ' ' + innerElement);
}else{
return $wrapper.find(innerElement);
}};
GermanizedVariationForm.prototype.onUpdate=function (event){
setTimeout(function (){
if(typeof event.data==='undefined'||!event.data.hasOwnProperty('GermanizedvariationForm')){
return;
}else if(typeof event.data.GermanizedvariationForm==='undefined'){
return;
}
if(event.data.GermanizedvariationForm.$button.is('[disabled]')||event.data.GermanizedvariationForm.$button.hasClass('disabled')){
event.data.GermanizedvariationForm.onReset(event);
}}, 250);
};
GermanizedVariationForm.prototype.onShowVariation=function (event, variation, purchasable){
var form=event.data.GermanizedvariationForm,
$wrapper=form.$wrapper,
hasCustomPrice=variation.hasOwnProperty('price_html')&&variation.price_html!=='',
hasDisplayPrice=variation.hasOwnProperty('display_price')&&variation.display_price!=='';
if(hasCustomPrice&&form.replacePrice){
var $priceElement=form.getPriceElement(form);
form.$singleVariation.find('.price').hide();
$priceElement.wc_gzd_set_content(variation.price_html);
$priceElement.find('.price').contents().unwrap();
}
form.getElementOrBlock(form, 'delivery-time', '.delivery-time-info').wc_gzd_set_content(variation.delivery_time);
form.getElementOrBlock(form, 'defect-description', '.defect-description').wc_gzd_set_content(variation.defect_description);
form.getElementOrBlock(form, 'tax-info', '.tax-info').wc_gzd_set_content(hasDisplayPrice ? variation.tax_info:'');
form.getElementOrBlock(form, 'manufacturer', '.manufacturer').wc_gzd_set_content(variation.manufacturer);
form.getElementOrBlock(form, 'manufacturer-heading', '.wc-gzd-product-manufacturer-heading').wc_gzd_set_content(variation.manufacturer_heading);
form.getElementOrBlock(form, 'product_safety_attachments', '.product-safety-attachments').wc_gzd_set_content(variation.product_safety_attachments);
form.getElementOrBlock(form, 'product-safety-attachments-heading', '.wc-gzd-product-safety-attachments-heading').wc_gzd_set_content(variation.product_safety_attachments_heading);
form.getElementOrBlock(form, 'safety_instructions', '.safety-instructions').wc_gzd_set_content(variation.safety_instructions);
form.getElementOrBlock(form, 'safety-instructions-heading', '.wc-gzd-product-safety-instructions-heading').wc_gzd_set_content(variation.safety_instructions_heading);
form.getElementOrBlock(form, 'power_supply', '.wc-gzd-power-supply').wc_gzd_set_content(variation.power_supply);
form.getElementOrBlock(form, 'deposit', '.deposit-amount').wc_gzd_set_content(hasDisplayPrice ? variation.deposit_amount:'');
form.getElementOrBlock(form, 'deposit-packaging-type', '.deposit-packaging-type').wc_gzd_set_content(hasDisplayPrice ? variation.deposit_packaging_type:'');
form.getElementOrBlock(form, 'food-description', '.wc-gzd-food-description').wc_gzd_set_content(variation.food_description);
form.getElementOrBlock(form, 'nutri-score', '.wc-gzd-nutri-score').wc_gzd_set_content(variation.nutri_score);
form.getElementOrBlock(form, 'food-distributor', '.wc-gzd-food-distributor').wc_gzd_set_content(variation.food_distributor);
form.getElementOrBlock(form, 'food-place-of-origin', '.wc-gzd-food-place-of-origin').wc_gzd_set_content(variation.food_place_of_origin);
form.getElementOrBlock(form, 'net-filling-quantity', '.wc-gzd-net-filling-quantity').wc_gzd_set_content(variation.net_filling_quantity);
form.getElementOrBlock(form, 'drained-weight', '.wc-gzd-drained-weight').wc_gzd_set_content(variation.drained_weight);
form.getElementOrBlock(form, 'alcohol-content', '.wc-gzd-alcohol-content').wc_gzd_set_content('no'===variation.includes_alcohol ? '':variation.alcohol_content);
form.getElementOrBlock(form, 'nutrients', '.wc-gzd-nutrients').wc_gzd_set_content(variation.nutrients);
form.getElementOrBlock(form, 'nutrients-heading', '.wc-gzd-nutrients-heading').wc_gzd_set_content(variation.nutrients_heading);
form.getElementOrBlock(form, 'ingredients', '.wc-gzd-ingredients').wc_gzd_set_content(variation.ingredients);
form.getElementOrBlock(form, 'ingredients-heading', '.wc-gzd-ingredients-heading').wc_gzd_set_content(variation.ingredients_heading);
form.getElementOrBlock(form, 'allergenic', '.wc-gzd-allergenic').wc_gzd_set_content(variation.allergenic);
form.getElementOrBlock(form, 'allergenic-heading', '.wc-gzd-allergenic-heading').wc_gzd_set_content(variation.allergenic_heading);
form.getElementOrBlock(form, 'shipping-costs-info', '.shipping-costs-info').wc_gzd_set_content(hasDisplayPrice ? variation.shipping_costs_info:'');
form.getElementOrBlock(form, 'unit-price', '.price-unit').wc_gzd_set_content(hasDisplayPrice ? variation.unit_price:'');
form.getElementOrBlock(form, 'unit-product', '.product-units').wc_gzd_set_content(hasDisplayPrice ? variation.product_units:'');
form.showOrHideTabs(form, variation.has_product_safety_information);
form.$form.trigger('germanized_variation_data', variation, $wrapper);
};
$.fn.wc_germanized_variation_form=function (){
new GermanizedVariationForm(this);
return this;
};
$.fn.wc_gzd_set_content=function (content){
var $this=this.not('.wc-gzd-additional-info-loop');
content=undefined===content ? '':content;
if(undefined===$this.attr('data-o_content')){
$this.attr('data-o_content', $this.html());
}
$this.html(content);
$this.addClass('variation_modified variation_gzd_modified').attr('aria-hidden', 'false').removeClass('wc-gzd-additional-info-placeholder').show();
if($this.is(':empty')){
$this.attr('aria-hidden', 'true').hide();
if($this.parents('.wp-block-woocommerce-gzd-product-price-label').length > 0){
$this.parents('.wp-block-woocommerce-gzd-product-price-label').attr('aria-hidden', 'true').addClass('wp-block-woocommerce-gzd-product-is-empty');
}
if($this.parents('.woocommerce-product-attributes-item').length > 0){
$this.parents('.woocommerce-product-attributes-item').attr('aria-hidden', 'true').hide();
}}else{
if($this.parents('.wp-block-woocommerce-gzd-product-price-label').length > 0){
$this.parents('.wp-block-woocommerce-gzd-product-price-label').attr('aria-hidden', 'false').removeClass('wp-block-woocommerce-gzd-product-is-empty');
}
if($this.parents('.woocommerce-product-attributes-item').length > 0){
$this.parents('.woocommerce-product-attributes-item').attr('aria-hidden', 'false').show();
}}
};
$.fn.wc_gzd_reset_content=function (){
var $this=this.not('.wc-gzd-additional-info-loop');
if(undefined!==$this.attr('data-o_content')){
$this.html($this.attr('data-o_content'));
$this.removeClass('variation_modified variation_gzd_modified').show();
}
if($this.is(':empty')){
$this.addClass('wc-gzd-additional-info-placeholder').attr('aria-hidden', 'true').hide();
if($this.parents('.wp-block-woocommerce-gzd-product-price-label').length > 0){
$this.parents('.wp-block-woocommerce-gzd-product-price-label').addClass('wp-block-woocommerce-gzd-product-is-empty').attr('aria-hidden', 'true');
}
if($this.parents('.woocommerce-product-attributes-item').length > 0){
$this.parents('.woocommerce-product-attributes-item').hide();
}}else{
if($this.parents('.wp-block-woocommerce-gzd-product-price-label').length > 0){
$this.parents('.wp-block-woocommerce-gzd-product-price-label').removeClass('wp-block-woocommerce-gzd-product-is-empty').attr('aria-hidden', 'false');
}
if($this.parents('.woocommerce-product-attributes-item').length > 0){
$this.parents('.woocommerce-product-attributes-item').show();
}}
};
$(function (){
if(typeof wc_gzd_add_to_cart_variation_params!=='undefined'){
$('.variations_form').each(function (){
$(this).wc_germanized_variation_form();
});
$(document.body).on('wc_variation_form', function (e, variationForm){
var $form;
if(typeof variationForm==='undefined'){
$form=$(e.target);
}else{
$form=$(variationForm.$form);
}
if($form.length > 0){
if(!$form.hasClass('has-gzd-variation-form')){
$form.wc_germanized_variation_form();
$form.trigger('check_variations');
}}
});
}});
})(jQuery, window, document);
((window.germanized=window.germanized||{})["static"]=window.germanized["static"]||{})["add-to-cart-variation"]=__webpack_exports__;
})()
;
document.addEventListener("DOMContentLoaded",function(){let n=document.getElementsByClassName("storefront-sticky-add-to-cart");if(n.length&&"undefined"!=typeof storefront_sticky_add_to_cart_params){let s=document.getElementsByClassName(storefront_sticky_add_to_cart_params.trigger_class);if(0<s.length){let t=function(){s[0].getBoundingClientRect().top+s[0].scrollHeight<0?(n[0].classList.add("storefront-sticky-add-to-cart--slideInDown"),n[0].classList.remove("storefront-sticky-add-to-cart--slideOutUp")):n[0].classList.contains("storefront-sticky-add-to-cart--slideInDown")&&(n[0].classList.add("storefront-sticky-add-to-cart--slideOutUp"),n[0].classList.remove("storefront-sticky-add-to-cart--slideInDown"))},e=(t(),window.addEventListener("scroll",function(){t()}),null);var o;document.body.classList.forEach(function(t){"postid-"===t.substring(0,7)&&(e=t.replace(/[^0-9]/g,""))}),!e||!(o=document.getElementById("product-"+e))||o.classList.contains("product-type-simple")||o.classList.contains("product-type-external")||document.getElementsByClassName("storefront-sticky-add-to-cart__content-button")[0].addEventListener("click",function(t){t.preventDefault(),document.getElementById("product-"+e).scrollIntoView()})}}});
(()=>{var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),(()=>{var t;e.g.importScripts&&(t=e.g.location+"");var r=e.g.document;if(!t&&r&&(r.currentScript&&(t=r.currentScript.src),!t)){var n=r.getElementsByTagName("script");if(n.length)for(var o=n.length-1;o>-1&&(!t||!/^http(s?):/.test(t));)t=n[o--].src}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),e.p=t})(),e.p=window.wcpayAssets.url,(()=>{"use strict";window.wp.domReady;const e=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:t(e),t=e=>{let t=null;if("undefined"!=typeof wcpay_upe_config)t=wcpay_upe_config;else{if("object"!=typeof wc||void 0===wc.wcSettings)return null;t=wc.wcSettings.getSetting("woocommerce_payments_data")||{}}return t[e]||null},r=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:null,n=(t,n={})=>{var o,a,c;if(!1===(null!==(o=e("isShopperTrackingEnabled"))&&void 0!==o?o:r("is_shopper_tracking_enabled")))return;const i=null!==(a=e("platformTrackerNonce"))&&void 0!==a?a:r("nonce")?.platform_tracker,p=null!==(c=e("ajaxUrl"))&&void 0!==c?c:r("ajax_url"),s=new FormData;s.append("tracksNonce",i),s.append("action","platform_tracks"),s.append("tracksEventName",t),s.append("tracksEventProp",JSON.stringify(n)),fetch(p,{method:"post",body:s}).then((e=>e.json()))};if(window.wcPayFrontendTracks&&window.wcPayFrontendTracks.length){for(const e of window.wcPayFrontendTracks)n(e.event,e.properties);window.wcPayFrontendTracks=[]}})()})();