(()=>{var e={n:t=>{var o=t&&t.__esModule?()=>t.default:()=>t;return e.d(o,{a:o}),o},d:(t,o)=>{for(var r in o)e.o(o,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:o[r]})}};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),(()=>{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 t=window.wp.i18n,o=window.wp.hooks,r=e=>"undefined"!=typeof wcpayConfig&&void 0!==wcpayConfig[e]?wcpayConfig[e]:n(e),n=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},a=e=>"object"==typeof wcpayExpressCheckoutParams&&wcpayExpressCheckoutParams.hasOwnProperty(e)?wcpayExpressCheckoutParams[e]:null,i=(e,t,o="wcpay_")=>e.toString().replace("%%endpoint%%",o+t);function s(e){return s="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},s(e)}var c=/^\s+/,l=/\s+$/;function u(e,t){if(t=t||{},(e=e||"")instanceof u)return e;if(!(this instanceof u))return new u(e,t);var o=function(e){var t,o,r,n={r:0,g:0,b:0},a=1,i=null,u=null,d=null,p=!1,h=!1;return"string"==typeof e&&(e=function(e){e=e.replace(c,"").replace(l,"").toLowerCase();var t,o=!1;if(I[e])e=I[e],o=!0;else if("transparent"==e)return{r:0,g:0,b:0,a:0,format:"name"};return(t=N.rgb.exec(e))?{r:t[1],g:t[2],b:t[3]}:(t=N.rgba.exec(e))?{r:t[1],g:t[2],b:t[3],a:t[4]}:(t=N.hsl.exec(e))?{h:t[1],s:t[2],l:t[3]}:(t=N.hsla.exec(e))?{h:t[1],s:t[2],l:t[3],a:t[4]}:(t=N.hsv.exec(e))?{h:t[1],s:t[2],v:t[3]}:(t=N.hsva.exec(e))?{h:t[1],s:t[2],v:t[3],a:t[4]}:(t=N.hex8.exec(e))?{r:R(t[1]),g:R(t[2]),b:R(t[3]),a:j(t[4]),format:o?"name":"hex8"}:(t=N.hex6.exec(e))?{r:R(t[1]),g:R(t[2]),b:R(t[3]),format:o?"name":"hex"}:(t=N.hex4.exec(e))?{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),a:j(t[4]+""+t[4]),format:o?"name":"hex8"}:!!(t=N.hex3.exec(e))&&{r:R(t[1]+""+t[1]),g:R(t[2]+""+t[2]),b:R(t[3]+""+t[3]),format:o?"name":"hex"}}(e)),"object"==s(e)&&(z(e.r)&&z(e.g)&&z(e.b)?(t=e.r,o=e.g,r=e.b,n={r:255*P(t,255),g:255*P(o,255),b:255*P(r,255)},p=!0,h="%"===String(e.r).substr(-1)?"prgb":"rgb"):z(e.h)&&z(e.s)&&z(e.v)?(i=L(e.s),u=L(e.v),n=function(e,t,o){e=6*P(e,360),t=P(t,100),o=P(o,100);var r=Math.floor(e),n=e-r,a=o*(1-t),i=o*(1-n*t),s=o*(1-(1-n)*t),c=r%6;return{r:255*[o,i,a,a,s,o][c],g:255*[s,o,o,i,a,a][c],b:255*[a,a,s,o,o,i][c]}}(e.h,i,u),p=!0,h="hsv"):z(e.h)&&z(e.s)&&z(e.l)&&(i=L(e.s),d=L(e.l),n=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=P(e,360),t=P(t,100),o=P(o,100),0===t)r=n=a=o;else{var s=o<.5?o*(1+t):o+t-o*t,c=2*o-s;r=i(c,s,e+1/3),n=i(c,s,e),a=i(c,s,e-1/3)}return{r:255*r,g:255*n,b:255*a}}(e.h,i,d),p=!0,h="hsl"),e.hasOwnProperty("a")&&(a=e.a)),a=M(a),{ok:p,format:e.format||h,r:Math.min(255,Math.max(n.r,0)),g:Math.min(255,Math.max(n.g,0)),b:Math.min(255,Math.max(n.b,0)),a}}(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 d(e,t,o){e=P(e,255),t=P(t,255),o=P(o,255);var r,n,a=Math.max(e,t,o),i=Math.min(e,t,o),s=(a+i)/2;if(a==i)r=n=0;else{var c=a-i;switch(n=s>.5?c/(2-a-i):c/(a+i),a){case e:r=(t-o)/c+(t<o?6:0);break;case t:r=(o-e)/c+2;break;case o:r=(e-t)/c+4}r/=6}return{h:r,s:n,l:s}}function p(e,t,o){e=P(e,255),t=P(t,255),o=P(o,255);var r,n,a=Math.max(e,t,o),i=Math.min(e,t,o),s=a,c=a-i;if(n=0===a?0:c/a,a==i)r=0;else{switch(a){case e:r=(t-o)/c+(t<o?6:0);break;case t:r=(o-e)/c+2;break;case o:r=(e-t)/c+4}r/=6}return{h:r,s:n,v:s}}function h(e,t,o,r){var n=[E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(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 m(e,t,o,r){return[E(F(r)),E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(Math.round(o).toString(16))].join("")}function f(e,t){t=0===t?0:t||10;var o=u(e).toHsl();return o.s-=t/100,o.s=q(o.s),u(o)}function y(e,t){t=0===t?0:t||10;var o=u(e).toHsl();return o.s+=t/100,o.s=q(o.s),u(o)}function b(e){return u(e).desaturate(100)}function g(e,t){t=0===t?0:t||10;var o=u(e).toHsl();return o.l+=t/100,o.l=q(o.l),u(o)}function _(e,t){t=0===t?0:t||10;var o=u(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))),u(o)}function w(e,t){t=0===t?0:t||10;var o=u(e).toHsl();return o.l-=t/100,o.l=q(o.l),u(o)}function k(e,t){var o=u(e).toHsl(),r=(o.h+t)%360;return o.h=r<0?360+r:r,u(o)}function v(e){var t=u(e).toHsl();return t.h=(t.h+180)%360,u(t)}function S(e,t){if(isNaN(t)||t<=0)throw new Error("Argument to polyad must be a positive number");for(var o=u(e).toHsl(),r=[u(e)],n=360/t,a=1;a<t;a++)r.push(u({h:(o.h+a*n)%360,s:o.s,l:o.l}));return r}function x(e){var t=u(e).toHsl(),o=t.h;return[u(e),u({h:(o+72)%360,s:t.s,l:t.l}),u({h:(o+216)%360,s:t.s,l:t.l})]}function C(e,t,o){t=t||6,o=o||30;var r=u(e).toHsl(),n=360/o,a=[u(e)];for(r.h=(r.h-(n*t>>1)+720)%360;--t;)r.h=(r.h+n)%360,a.push(u(r));return a}function T(e,t){t=t||6;for(var o=u(e).toHsv(),r=o.h,n=o.s,a=o.v,i=[],s=1/t;t--;)i.push(u({h:r,s:n,v:a})),a=(a+s)%1;return i}u.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=M(e),this._roundA=Math.round(100*this._a)/100,this},toHsv:function(){var e=p(this._r,this._g,this._b);return{h:360*e.h,s:e.s,v:e.v,a:this._a}},toHsvString:function(){var e=p(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=d(this._r,this._g,this._b);return{h:360*e.h,s:e.s,l:e.l,a:this._a}},toHslString:function(){var e=d(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 h(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=[E(Math.round(e).toString(16)),E(Math.round(t).toString(16)),E(Math.round(o).toString(16)),E(F(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*P(this._r,255))+"%",g:Math.round(100*P(this._g,255))+"%",b:Math.round(100*P(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+Math.round(100*P(this._r,255))+"%, "+Math.round(100*P(this._g,255))+"%, "+Math.round(100*P(this._b,255))+"%)":"rgba("+Math.round(100*P(this._r,255))+"%, "+Math.round(100*P(this._g,255))+"%, "+Math.round(100*P(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(A[h(this._r,this._g,this._b,!0)]||!1)},toFilter:function(e){var t="#"+m(this._r,this._g,this._b,this._a),o=t,r=this._gradientType?"GradientType=1, ":"";if(e){var n=u(e);o="#"+m(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 u(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(g,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(f,arguments)},saturate:function(){return this._applyModification(y,arguments)},greyscale:function(){return this._applyModification(b,arguments)},spin:function(){return this._applyModification(k,arguments)},_applyCombination:function(e,t){return e.apply(null,[this].concat([].slice.call(t)))},analogous:function(){return this._applyCombination(C,arguments)},complement:function(){return this._applyCombination(v,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(x,arguments)},triad:function(){return this._applyCombination(S,[3])},tetrad:function(){return this._applyCombination(S,[4])}},u.fromRatio=function(e,t){if("object"==s(e)){var o={};for(var r in e)e.hasOwnProperty(r)&&(o[r]="a"===r?e[r]:L(e[r]));e=o}return u(e,t)},u.equals=function(e,t){return!(!e||!t)&&u(e).toRgbString()==u(t).toRgbString()},u.random=function(){return u.fromRatio({r:Math.random(),g:Math.random(),b:Math.random()})},u.mix=function(e,t,o){o=0===o?0:o||50;var r=u(e).toRgb(),n=u(t).toRgb(),a=o/100;return u({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})},u.readability=function(e,t){var o=u(e),r=u(t);return(Math.max(o.getLuminance(),r.getLuminance())+.05)/(Math.min(o.getLuminance(),r.getLuminance())+.05)},u.isReadable=function(e,t,o){var r,n,a,i,s,c=u.readability(e,t);switch(n=!1,(a=o,"AA"!==(i=((a=a||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==i&&(i="AA"),"small"!==(s=(a.size||"small").toLowerCase())&&"large"!==s&&(s="small"),r={level:i,size:s}).level+r.size){case"AAsmall":case"AAAlarge":n=c>=4.5;break;case"AAlarge":n=c>=3;break;case"AAAsmall":n=c>=7}return n},u.mostReadable=function(e,t,o){var r,n,a,i,s=null,c=0;n=(o=o||{}).includeFallbackColors,a=o.level,i=o.size;for(var l=0;l<t.length;l++)(r=u.readability(e,t[l]))>c&&(c=r,s=u(t[l]));return u.isReadable(e,s,{level:a,size:i})||!n?s:(o.includeFallbackColors=!1,u.mostReadable(e,["#fff","#000"],o))};var I=u.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"},A=u.hexNames=function(e){var t={};for(var o in e)e.hasOwnProperty(o)&&(t[e[o]]=o);return t}(I);function M(e){return e=parseFloat(e),(isNaN(e)||e<0||e>1)&&(e=1),e}function P(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 q(e){return Math.min(1,Math.max(0,e))}function R(e){return parseInt(e,16)}function E(e){return 1==e.length?"0"+e:""+e}function L(e){return e<=1&&(e=100*e+"%"),e}function F(e){return Math.round(255*parseFloat(e)).toString(16)}function j(e){return R(e)/255}var B,H,$,N=(H="[\\s|\\(]+("+(B="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",$="[\\s|\\(]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")[,|\\s]+("+B+")\\s*\\)?",{CSS_UNIT:new RegExp(B),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+$),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+$),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+$),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 z(e){return!!N.CSS_UNIT.exec(e)}const O=["color","padding","paddingTop","paddingRight","paddingBottom","paddingLeft"],W=["fontFamily","fontSize","lineHeight","letterSpacing","fontWeight","fontVariation","textDecoration","textShadow","textTransform","-webkit-font-smoothing","-moz-osx-font-smoothing","transition"],Q=["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"],U={".Label":[...O,...W],".Text":[...O,...W],".Input":[...O,...W,...Q],".Error":[...O,...W,...Q],".Tab":[...O,...W,...Q],".TabIcon":[...O],".TabLabel":[...O,...W],".Block":[...O.slice(1),...Q.slice(1)],".Container":[...Q],".Header":[...O,...Q,...W],".Footer":[...O,...Q,...W]},D={".Label":U[".Label"],".Label--floating":[...U[".Label"],"transform"],".Input":[...U[".Input"],"outlineColor","outlineWidth","outlineStyle"],".Error":U[".Error"],".Tab":["backgroundColor","color","fontFamily"],".Tab--selected":["outlineColor","outlineWidth","outlineStyle","backgroundColor","color",...Q],".TabIcon":U[".TabIcon"],".TabIcon--selected":["color"],".TabLabel":U[".TabLabel"],".Block":U[".Block"],".Container":U[".Container"],".Header":U[".Header"],".Footer":U[".Footer"],".Footer--link":U[".Text"],".Text":U[".Text"],".Text--redirect":U[".Text"]},V=(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&&u(a).getAlpha()>=.5&&(o=a),r++}return o||"#ffffff"},X=e=>{const t=u(e),o=t.getAlpha();if(o<1){const e=t.toRgb();return u({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},G={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)}}},J={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=G.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 s=this.createRow(o.rowElement,o.invalidClasses,t);a.appendChild(s),this.appendClone(i,o.upeThemeInputSelector,o.hiddenInput,t),this.appendClone(i,o.upeThemeLabelSelector,o.hiddenValidActiveLabel,t),this.appendClone(s,o.upeThemeInputSelector,o.hiddenInvalidInput,t),this.appendClone(s,o.upeThemeLabelSelector,o.hiddenInvalidInput,t),t.querySelector(o.hiddenInput).style.transition="none"},cleanup:function(e){const t=e.querySelector(G.default.hiddenContainer);t&&t.remove()}},K=(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=D[t],s=n[0],c=a.getComputedStyle(s),l={};if(i.forEach((e=>{const t=e.replace(/[A-Z]/g,(e=>`-${e.toLowerCase()}`)),o=c.getPropertyValue(t);if(o)if("color"!==e)if("lineHeight"!==e||"0"!==o&&"0px"!==o)l[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){l[e]=o;break}}else l[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(" "):"")(l.outlineWidth,l.outlineStyle,l.outlineColor);""!==e&&(l.outline=e),delete l.outlineWidth,delete l.outlineColor,delete l.outlineStyle}const u=c.getPropertyValue("text-indent");return"0px"!==u&&"0px"===l.paddingLeft&&"0px"===l.paddingRight&&(l.paddingLeft=u,l.paddingRight=u),".Block"===t&&(l.backgroundColor=o),l},Z={blocks_checkout:"woopay_blocks_checkout",shortcode_checkout:"woopay_shortcode_checkout"},Y=(e,t=!1,o=document)=>{var r;const n=t&&null!==(r=Z[e])&&void 0!==r?r:e,a=G.getSelectors(n,o);J.init(n,o);const i=K(a.hiddenInput,".Input",null,o),s=K(a.hiddenInvalidInput,".Input",null,o),c=K(a.upeThemeLabelSelector,".Label",null,o),l={fontSize:c.fontSize},d=K(a.upeThemeTextSelectors,".Text",null,o),p=K(a.upeThemeInputSelector,".Tab",null,o),h=K(a.hiddenInput,".Tab--selected",null,o),m=(e=>{const t=Object.assign({},e);if(!e.backgroundColor||!e.color)return e;const o=((e,t)=>{const o={backgroundColor:e,color:t},r=u(e),n=u(t);if(!r.isValid()||!n.isValid())return{backgroundColor:"",color:""};const a=r.getBrightness()>50?u(r).darken(7):u(r).lighten(7),i=u.mostReadable(a,[n],{includeFallbackColors:!0});return o.backgroundColor=a.toRgbString(),o.color=i.toRgbString(),o})(e.backgroundColor,e.color);return t.backgroundColor=o.backgroundColor,t.color=o.color,t})(p),f={color:m.color},y={color:h.color},b=V(a.backgroundSelectors,o),g=K(a.upeThemeLabelSelector,".Block",b,o),_={colorBackground:b,colorText:d.color,fontFamily:d.fontFamily,fontSizeBase:d.fontSize};a.pmmeRelativeTextSizeSelector&&_.fontSizeBase&&(_.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"),s=parseFloat(i)*o;return isNaN(s)?t:n>s?`${s}px`:`${n}px`}(a.pmmeRelativeTextSizeSelector,d.fontSize,.875,o));const w="blocks_checkout"===e||"woopay_blocks_checkout"===n;let k={variables:_,theme:X(b)?"stripe":"night",labels:w?"floating":"above",rules:JSON.parse(JSON.stringify({".Input":i,".Input--invalid":s,".Label":c,".Label--resting":l,".Block":g,".Tab":p,".Tab:hover":m,".Tab--selected":h,".TabIcon:hover":f,".TabIcon--selected":y,".Text":d,".Text--redirect":d}))};if(w&&(k=((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})(k,K(a.hiddenValidActiveLabel,".Label--floating",null,o))),t){const e=K(a.headerSelectors,".Header",null,o),t=K(a.footerSelectors,".Footer",null,o);var v,S;(!e.backgroundColor||u(e.backgroundColor).getAlpha()<.5)&&(e.backgroundColor=V([...null!==(v=a.headerSelectors)&&void 0!==v?v:[],"body"],o)),(!t.backgroundColor||u(t.backgroundColor).getAlpha()<.5)&&(t.backgroundColor=V([...null!==(S=a.footerSelectors)&&void 0!==S?S:[],"body"],o)),k.rules={...k.rules,".Heading":K(a.headingSelectors,".Label",null,o),".Header":e,".Footer":t,".Footer-link":K(a.footerLink,".Footer--link",null,o),".Button":K(a.buttonSelectors,".Input",null,o),".Link":K(a.linkSelectors,".Label",null,o),".Container":K(a.containerSelectors,".Container",null,o)}}return J.cleanup(o),k};class ee{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=n("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(e,t=!1){const o=e.match(/#wcpay-confirm-(pi|si):([^:]+):([^:]+):([^:]+)(?::(.+))?$/);if(!o)return!0;const n="si"===o[1];let i=o[2];const s=o[3],c=o[4],l=o[5]||null,u=e.indexOf("order-pay"),d=u>-1&&e.substring(u).match(/\d+/);return d&&(i=d[0]),(async()=>{const{locale:e,publishableKey:t}=this.options,o=r("accountIdForIntentConfirmation");if(n){const e=await this.getStripe(!0);return l?e.confirmSetup({clientSecret:s,confirmParams:{confirmation_token:l},redirect:"if_required"}):e.handleNextAction({clientSecret:s})}return o?this.createStripe(t,e,o).confirmCardPayment(s):(await this.getStripe(!0)).handleNextAction({clientSecret:s})})().then((e=>{var o;let n=null;e.paymentIntent?.last_payment_error&&(n={message:e.paymentIntent.last_payment_error.message}),"requires_action"===e.paymentIntent?.status&&(n={message:"Payment requires additional action."});const s=e.paymentIntent&&e.paymentIntent.id||e.setupIntent&&e.setupIntent.id||e.error&&e.error.payment_intent&&e.error.payment_intent.id||e.error.setup_intent&&e.error.setup_intent.id,l=null!==(o=a("ajax_url"))&&void 0!==o?o:r("ajaxUrl"),u=r("isChangingPayment");return[this.request(l,{action:"update_order_status",order_id:i,_ajax_nonce:c,intent_id:s,should_save_payment_method:t?"true":"false",is_changing_payment:u?"true":"false"}),n,e.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(e){const t=await this.request(r("ajaxUrl"),{action:"create_setup_intent","wcpay-payment-method":e,_ajax_nonce:r("createSetupIntentNonce")});if(!t.success)throw t.data.error;if("succeeded"===t.data.status)return t.data;const o=await this.getStripe(),n=await o.confirmCardSetup(t.data.client_secret),{setupIntent:a,error:i}=n;if(i)throw i;return a}initWooPay(e,t){if(!this.isWooPayRequesting){this.isWooPayRequesting=!0;const o=r("wcAjaxUrl"),n=r("initWooPayNonce");let a=null,s=null;if(r("isWooPayGlobalThemeSupportEnabled"))if(r("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;a=Y(e,!0),s=((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})()}else a=r("woopayAppearance"),s=r("woopayFontRules");return this.request(i(o,"init_woopay"),{_wpnonce:n,appearance:a,font_rules:s,email:e,user_session:t,order_id:r("order_id"),key:r("key"),billing_email:r("billing_email")}).finally((()=>{this.isWooPayRequesting=!1}))}}expressCheckoutAddToCart(e){const t=r("wcAjaxUrl"),o=r("addToCartNonce");return this.request(i(t,"add_to_cart"),{security:o,...e})}}jQuery((e=>{e("input[name=wc_deposit_option],input[name=wc_deposit_payment_plan]").on("change",(()=>{(0,o.doAction)("wcpay.express-checkout.update-button-data")}))})),(0,o.addFilter)("wcpay.express-checkout.cart-add-item","automattic/wcpay/express-checkout",(e=>{const t={};return jQuery("input[name=wc_deposit_option]").length&&(t.wc_deposit_option=jQuery("input[name=wc_deposit_option]:checked").val()),jQuery("input[name=wc_deposit_payment_plan]").length&&(t.wc_deposit_payment_plan=jQuery("input[name=wc_deposit_payment_plan]:checked").val()),{...e,...t}}));const te="wcpay-express-checkout__order-attribution-inputs",oe=()=>{(()=>{if(document.getElementById(te))return;const e=document.createElement("wc-order-attribution-inputs");e.id=te,document.body.appendChild(e)})(),window?.wc_order_attribution?.setOrderTracking(window?.wc_order_attribution?.params?.allowTracking)};"loading"===document.readyState?document.addEventListener("DOMContentLoaded",oe):oe(),(0,o.addFilter)("wcpay.express-checkout.cart-place-order-extension-data","automattic/wcpay/express-checkout",(e=>{const t=jQuery("#wcpay-express-checkout__order-attribution-inputs input");if(!t.length)return e;const o={};return t.each((function(){const e=jQuery(this).attr("name").replace("wc_order_attribution_",""),t=jQuery(this).val();e&&t&&(o[e]=t)})),{...e,"woocommerce/order-attribution":o}}));let re=null,ne=null;const ae=()=>jQuery(ne),ie={init:({elementId:e,$separator:t})=>{ne=e,re=t},getButtonSeparator:()=>re,blockButton:()=>{ae().data("blockUI.isBlocked")||ae().block({message:null})},unblockButton:()=>{ie.showContainer(),ae().unblock()},renderButton:e=>{ae()?.length&&e.mount(ne)},hideContainer:()=>{ae().removeClass("is-ready").hide()},showContainer:()=>{ae().addClass("is-ready").show()}},se=ie,ce=(e,t,o=!1)=>{let r;return function(){const n=this,a=arguments,i=o&&!r;clearTimeout(r),r=setTimeout((()=>{r=null,o||t.apply(n,a)}),e),i&&t.apply(n,a)}},le=e=>{var t,o;return void 0!==window.wcpayExpressCheckoutParams?null!==(t=window.wcpayExpressCheckoutParams[e])&&void 0!==t?t:null:void 0!==window.wc?.wcSettings&&null!==(o=window.wc.wcSettings.getSetting("ece_data")?.[e])&&void 0!==o?o:null};jQuery((e=>{e(document.body).on("woocommerce_variation_has_changed",(async()=>{(0,o.doAction)("wcpay.express-checkout.update-button-data")}))})),jQuery((e=>{if("product"!==le("button_context"))return;const t=e(".quantity");t.on("input",".qty",(()=>{se.blockButton()})),t.on("input",".qty",ce(250,(async()=>{(0,o.doAction)("wcpay.express-checkout.update-button-data")})))})),(0,o.addFilter)("wcpay.express-checkout.cart-add-item","automattic/wcpay/express-checkout",(e=>{const t=document.querySelector(".single_variation_wrap");if(!t)return e;const o=t.querySelector('input[name="product_id"]').value;return{...e,id:parseInt(o,10)}})),(0,o.addFilter)("wcpay.express-checkout.cart-add-item","automattic/wcpay/express-checkout",(e=>{const t=document.querySelector(".variations_form");if(!t)return e;const o=[],r=t.querySelectorAll(".variations select");return Array.from(r).forEach((function(e){const t=e.dataset.attribute_name||e.dataset.name;o.push({attribute:Array.from(document.querySelector(`label[for="${t.replace("attribute_","")}"]`).childNodes)[0].textContent,value:e.value||""}),o.push({attribute:t,value:e.value||""})})),{...e,variation:[...e.variation,...o]}})),(0,o.addFilter)("wcpay.express-checkout.map-line-items","automattic/wcpay/express-checkout",(e=>({...e,items:e.items.filter((e=>!e.extensions?.bundles?.bundled_by))})));const ue=window.wp.htmlEntities,de=(e,t)=>{var o;return e*10**((null!==(o=le("checkout")?.currency_decimals)&&void 0!==o?o:2)-t.currency_minor_unit)},pe=e=>{const r=le("checkout").display_prices_with_tax,n=(0,o.applyFilters)("wcpay.express-checkout.map-line-items",e),a=n.items.map((e=>({amount:de(r&&e.totals?parseInt(e.totals.line_subtotal,10)+parseInt(e.totals.line_subtotal_tax,10):parseInt(e.totals?.line_subtotal||e.prices.price,10),e.totals||e.prices),name:[e.name,e.quantity>1&&`(x${e.quantity})`,e.variation&&e.variation.length>0&&"-",e.variation&&e.variation.map((e=>`${e.attribute}: ${e.value}`)).join(", "),e.item_data&&e.item_data.length>0&&"-",e.item_data&&e.item_data.map((e=>`${e.name||e.key}: ${e.value}`)).join(", ")].filter(Boolean).map(ue.decodeEntities).join(" ")}))),i=parseInt(n.totals.total_shipping||"0",10);i&&a.push({amount:de(r?i+parseInt(n.totals.total_shipping_tax||"0",10):i,n.totals),name:(0,t.__)("Shipping","woocommerce-payments")});const s=parseInt(n.totals.total_discount||"0",10);s&&a.push({amount:-de(r?s+parseInt(n.totals.total_discount_tax||"0",10):s,n.totals),name:(0,t.__)("Discount","woocommerce-payments")});const c=parseInt(n.totals.total_fees||"0",10);c&&a.push({amount:de(r?c+parseInt(n.totals.total_fees_tax||"0",10):c,n.totals),name:(0,t.__)("Fees","woocommerce-payments")});const l=parseInt(n.totals.total_tax||"0",10);l&&!r&&a.push({amount:de(l,n.totals),name:(0,t.__)("Tax","woocommerce-payments")});const u=parseInt(n.totals.total_refund||"0",10);return u&&a.push({amount:-de(u,n.totals),name:(0,t.__)("Refund","woocommerce-payments")}),de(parseInt(n.totals.total_price,10)-parseInt(n.totals.total_refund||0,10),n.totals)<a.reduce(((e,{amount:t})=>e+t),0)?[]:a},he=e=>{const t=le("checkout").display_prices_with_tax,r=e.shipping_rates?.[0]?.shipping_rates||[],n=(0,o.applyFilters)("wcpay.express-checkout.shipping-rates",r,e);return n&&0!==n.length?n.sort(((e,t)=>e.selected===t.selected?0:e.selected?-1:1)).slice(0,9).map((e=>({id:e.rate_id,displayName:(0,ue.decodeEntities)(e.name),amount:de(t?parseInt(e.price,10)+parseInt(e.taxes,10):parseInt(e.price,10),e),deliveryEstimate:[e.meta_data.find((e=>"pickup_address"===e.key))?.value,e.meta_data.find((e=>"pickup_details"===e.key))?.value].filter(Boolean).map(ue.decodeEntities).join(" - ")}))):[]},me=e=>{const t=e?.extensions?.subscriptions;return!!t&&t.trial_length>0},fe=e=>{const t=e?.extensions?.subscriptions;if(!t||!Array.isArray(t))return null;for(const e of t){const t=e.shipping_rates?.[0]?.shipping_rates;if(t?.length>0)return t}return null},ye=e=>!(!e?.items||!e?.extensions?.subscriptions)&&(!!e.items.some(me)&&(!(e.shipping_rates?.[0]?.shipping_rates?.length>0)&&null!==fe(e))),be=e=>!(!e?.items||!e?.extensions?.subscriptions)&&e.items.some(me),ge=e=>!!be(e)&&0===parseInt(e.totals?.total_price||"0",10),_e=e=>{const t=e?.extensions?.subscriptions;if(!t||!Array.isArray(t))return null;let o=0,r=0,n=0,a=0,i=0,s=2;const c=[];if(t.forEach((e=>{var t;if(!e.totals?.total_price)return;o+=parseInt(e.totals.total_price,10),r+=parseInt(e.totals.total_items||"0",10),n+=parseInt(e.totals.total_tax||"0",10);const l=e.shipping_rates?.[0]?.shipping_rates?.find((e=>e.selected));l?(a+=parseInt(l.price||"0",10),i+=parseInt(l.taxes||"0",10)):(a+=parseInt(e.totals.total_shipping||"0",10),i+=parseInt(e.totals.total_shipping_tax||"0",10)),s=null!==(t=e.totals.currency_minor_unit)&&void 0!==t?t:s,e.totals.tax_lines&&c.push(...e.totals.tax_lines)})),0===o)return null;const l=t[0]?.totals||e.totals;return{amount:o,currencyMinorUnit:s,totals:{...l,total_price:String(o),total_items:String(r),total_tax:String(n),total_shipping:String(a),total_shipping_tax:String(i),tax_lines:c}}},we=e=>{var o,r,n,a,i,s;const c=e.totals,l=parseInt(c.total_price,10),u=null!==(o=c.currency_minor_unit)&&void 0!==o?o:2,d=null!==(r=c.currency_prefix)&&void 0!==r?r:"",p=null!==(n=c.currency_suffix)&&void 0!==n?n:"",h=null!==(a=c.currency_decimal_separator)&&void 0!==a?a:".",m=null!==(i=c.currency_thousand_separator)&&void 0!==i?i:",",f=(l/Math.pow(10,u)).toFixed(u).split("."),y=f[0].replace(/\B(?=(\d{3})+(?!\d))/g,m),b=`${d}${f[1]?`${y}${h}${f[1]}`:y}${p}`,g=(_=e.billing_period,(w=null!==(s=e.billing_interval)&&void 0!==s?s:1)>1?{day:(0,t.sprintf)((0,t._n)("%d day","%d days",w,"woocommerce-payments"),w),week:(0,t.sprintf)((0,t._n)("%d week","%d weeks",w,"woocommerce-payments"),w),month:(0,t.sprintf)((0,t._n)("%d month","%d months",w,"woocommerce-payments"),w),year:(0,t.sprintf)((0,t._n)("%d year","%d years",w,"woocommerce-payments"),w)}[_]||`${w} ${_}s`:{day:(0,t.__)("day","woocommerce-payments"),week:(0,t.__)("week","woocommerce-payments"),month:(0,t.__)("month","woocommerce-payments"),year:(0,t.__)("year","woocommerce-payments")}[_]||_);var _,w;return(0,t.sprintf)((0,t.__)("%1$s / %2$s","woocommerce-payments"),b,g)};(0,o.addFilter)("wcpay.express-checkout.total-amount","automattic/wcpay/express-checkout/wc-subscriptions",((e,t)=>{if(!ge(t))return e;const o=_e(t);return o?de(o.amount,o.totals):e})),(0,o.addFilter)("wcpay.express-checkout.is-cart-eligible","automattic/wcpay/express-checkout/wc-subscriptions",((e,t)=>{if(e)return!0;if(ge(t)){const e=_e(t);return null!==e&&e.amount>0}return e})),(0,o.addFilter)("wcpay.express-checkout.shipping-rates","automattic/wcpay/express-checkout/wc-subscriptions",((e,t)=>e&&e.length>0?e:ye(t)&&fe(t)||e)),(0,o.addFilter)("wcpay.express-checkout.shipping-package-id","automattic/wcpay/express-checkout/wc-subscriptions",((e,t,o)=>{if(!ye(t))return e;const r=t?.extensions?.subscriptions;if(!r||!Array.isArray(r))return e;for(const e of r){const t=e.shipping_rates;if(t&&Array.isArray(t))for(const e of t){const t=e?.shipping_rates?.some((e=>e.rate_id===o));if(t&&e.package_id)return e.package_id}}return e})),(0,o.addFilter)("wcpay.express-checkout.map-line-items","automattic/wcpay/express-checkout/wc-subscriptions",(e=>{if(!be(e))return e;const o=e?.extensions?.subscriptions;if(!o||!Array.isArray(o))return e;const r=0===parseInt(e.totals?.total_price||"0",10),n=[...e.items],a=(0,t.__)("Recurring total","woocommerce-payments");if(o.forEach((o=>{const i=e.items.filter((e=>e.extensions?.subscriptions?.billing_period===o.billing_period)).length;if(0===i)return;const s=Math.round(parseInt(o.totals?.total_items||"0",10)/i);n.forEach(((e,i)=>{const c=e.extensions?.subscriptions;c&&c.trial_length>0&&c.billing_period===o.billing_period&&((e.item_data||[]).some((e=>e.name===a))||(n[i]={...e,name:`${e.name} (${(0,t.__)("recurring","woocommerce-payments")})`,...r&&{totals:{...e.totals,line_subtotal:String(s),line_total:String(s)}},item_data:[...e.item_data||[],{name:(0,t.__)("Recurring total","woocommerce-payments"),value:(0,t.sprintf)((0,t.__)("%1$s on %2$s","woocommerce-payments"),we(o),o.next_payment_date)}]}))}))})),!r)return{...e,items:n};const i=_e(e);return i?{...e,items:n,totals:{...e.totals,total_price:String(i.amount),total_items:i.totals.total_items||"0",total_tax:i.totals.total_tax||"0",total_shipping:i.totals.total_shipping||"0",total_shipping_tax:i.totals.total_shipping_tax||"0",tax_lines:i.totals.tax_lines||[]}}:{...e,items:n}}));const ke=e=>{var t;let o="undefined"==typeof wcpaySettings?4:parseInt(window?.wcpaySettings?.defaultExpressCheckoutBorderRadius||4,10);const r=le("button");var n;return o=null!==(t=r?.radius)&&void 0!==t?t:o,void 0!==e&&(o=null!==(n=Number(e?.borderRadius))&&void 0!==n?n:o),{variables:{borderRadius:`${o}px`,spacingUnit:"6px"}}},ve=e=>{if(!e)return"";const t=document.createElement("div");return t.innerHTML=e.trim(),t.firstChild?t.firstChild.textContent:""},Se=(e,t,o)=>{const r=document.querySelector(`${e} [name="${t}"]`);if(r)if("SELECT"===r.tagName&&/country|state/.test(t)){const e=Array.from(r.options).find((e=>e.value===o||e.textContent.trim().toLowerCase()===o.toLowerCase()));e&&(r.value=e.value,jQuery(r).trigger("change").trigger("close"))}else r.value=o,jQuery(r).trigger("change")},xe=window.lodash,Ce=(window.wp.domReady,(e,t={})=>{var o,n,i;if(!1===(null!==(o=r("isShopperTrackingEnabled"))&&void 0!==o?o:a("is_shopper_tracking_enabled")))return;const s=null!==(n=r("platformTrackerNonce"))&&void 0!==n?n:a("nonce")?.platform_tracker,c=null!==(i=r("ajaxUrl"))&&void 0!==i?i:a("ajax_url"),l=new FormData;l.append("tracksNonce",s),l.append("action","platform_tracks"),l.append("tracksEventName",e),l.append("tracksEventProp",JSON.stringify(t)),fetch(c,{method:"post",body:l}).then((e=>e.json()))}),Te=(0,xe.debounce)((({source:e})=>{Ce("applepay_button_load",{source:e})}),1e3),Ie=(0,xe.debounce)((({source:e})=>{Ce("gpay_button_load",{source:e})}),1e3),Ae=window.wp.apiFetch;var Me=e.n(Ae);const Pe=window.wp.url,qe=()=>document.querySelector(".single_add_to_cart_button")||document.querySelector('.wp-block-add-to-cart-with-options button[type="submit"]'),Re=()=>{const e=document.querySelector(".single_add_to_cart_button");if(e)return e.value;const t=document.querySelector('.wp-block-add-to-cart-with-options input[name="add-to-cart"]');return t?.value},Ee=()=>{const e=document.querySelector(".quantity .qty");return e&&parseInt(e.value,10)||1};class Le{cartRequestHeaders={};async _request(e){const t=await Me()({...e,parse:!1,path:(0,Pe.addQueryArgs)(e.path,{currency:le("checkout").currency_code.toUpperCase()}),headers:{Nonce:le("nonce").store_api_nonce,"X-WooPayments-Tokenized-Cart-Nonce":le("nonce").tokenized_cart_nonce||void 0,"X-WooPayments-Tokenized-Cart-Session-Nonce":"product"===le("button_context")?le("nonce").tokenized_cart_session_nonce:void 0,...this.cartRequestHeaders,...e.headers}});return this.cartRequestHeaders={Nonce:t.headers.get("Nonce"),"X-WooPayments-Tokenized-Cart-Session":t.headers.get("X-WooPayments-Tokenized-Cart-Session")},t.json()}async placeOrder(e){return await this._request({method:"POST",path:"/wc/store/v1/checkout",headers:{"X-WooPayments-Tokenized-Cart":!0,...this.cartRequestHeaders},data:e})}async getCart(){return await this._request({method:"GET",path:"/wc/store/v1/cart"})}useSeparateCart(){this.cartRequestHeaders={"X-WooPayments-Tokenized-Cart-Session":""}}deleteAfterRequest(){this.cartRequestHeaders={"X-WooPayments-Tokenized-Cart-Is-Ephemeral-Cart":"1"}}async updateCustomer(e){return await this._request({method:"POST",path:"/wc/store/v1/cart/update-customer",headers:{"X-WooPayments-Tokenized-Cart":!0,...this.cartRequestHeaders},data:e})}async selectShippingRate(e){return await this._request({method:"POST",path:"/wc/store/v1/cart/select-shipping-rate",data:e})}async addProductToCart(){const e={id:Re(),quantity:Ee(),variation:[]};return await this._request({method:"POST",path:"/wc/store/v1/cart/add-item",data:(0,o.applyFilters)("wcpay.express-checkout.cart-add-item",e)})}async emptyCart(){try{let e=await this._request({method:"GET",path:"/wc/store/v1/cart"});for(;e.items.length>0;)e=await this._request({method:"POST",path:"/wc/store/v1/cart/remove-item",data:{key:e.items[0].key}})}catch(e){}}}const Fe=(e,t)=>{var o,r,n,a,i,s,c,l,u;return{first_name:null!==(o=e?.split(" ")?.slice(0,1)?.join(" "))&&void 0!==o?o:"",last_name:null!==(r=e?.split(" ")?.slice(1)?.join(" "))&&void 0!==r?r:"",company:null!==(n=t.organization)&&void 0!==n?n:"",address_1:null!==(a=t.line1)&&void 0!==a?a:"",address_2:null!==(i=t.line2)&&void 0!==i?i:"",city:null!==(s=t.city)&&void 0!==s?s:"",state:null!==(c=t.state)&&void 0!==c?c:"",postcode:null!==(l=t.postal_code?.replace(" ",""))&&void 0!==l?l:"",country:null!==(u=t.country)&&void 0!==u?u:""}},je=(e,t,o=!0,r=[])=>{var n,a,i,s,c,l,u,d,p,h,m,f,y;const b=e.billingDetails?.name||"",g=null!==(n=e.billingDetails?.address)&&void 0!==n?n:{},_=null!==(a=null!==(i=e.billingDetails?.phone?.replace(/[() -]/g,""))&&void 0!==i?i:e.payerPhone?.replace(/[() -]/g,""))&&void 0!==a?a:"";return{customer_note:e.order_comments,billing_address:{first_name:null!==(s=b.split(" ")?.slice(0,1)?.join(" "))&&void 0!==s?s:"",last_name:b.split(" ")?.slice(1)?.join(" ")||"-",company:null!==(c=g.organization)&&void 0!==c?c:"",address_1:null!==(l=g.line1)&&void 0!==l?l:"",address_2:null!==(u=g.line2)&&void 0!==u?u:"",city:null!==(d=g.city)&&void 0!==d?d:"",state:null!==(p=g.state)&&void 0!==p?p:"",postcode:null!==(h=g.postal_code)&&void 0!==h?h:"",country:null!==(m=g.country)&&void 0!==m?m:"",email:null!==(f=e.billingDetails?.email)&&void 0!==f?f:"",phone:_},shipping_address:e.shippingAddress?{...Fe(e.shippingAddress.name||"",e.shippingAddress.address),phone:_}:void 0,payment_method:"woocommerce_payments",payment_data:[{key:"payment_method",value:"card"},{key:"wcpay-fraud-prevention-token",value:null!==(y=window.wcpayFraudPreventionToken)&&void 0!==y?y:""},{key:o?"wcpay-confirmation-token":"wcpay-payment-method",value:t},{key:"express_payment_type",value:e.expressPaymentType},{key:"wcpay-express-payment-method-types",value:JSON.stringify(r)}]}};let Be=null,He=null,$e=new Le;const Ne=()=>$e,ze=()=>{jQuery.blockUI({message:null,overlayCSS:{background:"#fff",opacity:.6}})},Oe=()=>{jQuery.unblockUI()};class We{orderId;key;billingEmail="";cachedCartData={};constructor({orderId:e,key:t,billingEmail:o=""}){this.orderId=e,this.key=t,this.billingEmail=o}async placeOrder(e){return await Me()({method:"POST",path:`/wc/store/v1/checkout/${this.orderId}`,headers:{Nonce:le("nonce").store_api_nonce},data:{...e,key:this.key,billing_email:this.billingEmail,billing_address:this.cachedCartData.billing_address,shipping_address:this.cachedCartData.shipping_address}})}async getCart(){return this.cachedCartData=await Me()({method:"GET",path:(0,Pe.addQueryArgs)(`/wc/store/v1/order/${this.orderId}`,{key:this.key,billing_email:this.billingEmail})})}}let Qe=null;const Ue=async()=>{if("product"!==le("button_context"))return await Ne().getCart();const e=new Le;return e.useSeparateCart(),e.deleteAfterRequest(),await e.addProductToCart()},De=()=>Qe?(0,o.applyFilters)("wcpay.express-checkout.total-amount",de(parseInt(Qe.totals.total_price,10)-parseInt(Qe.totals.total_refund||0,10),Qe.totals),Qe):"product"===le("button_context")&&le("product")?le("product")?.total.amount:void 0;let Ve;jQuery((e=>{if(le("has_block")&&"pay_for_order"!==le("button_context"))return;const n=le("stripe").publishableKey;if(!n)return;const a=new ee({publishableKey:n,accountId:le("stripe").accountId,locale:le("stripe").locale},((e,t)=>new Promise(((o,r)=>{jQuery.post(e,t).then(o).fail(r)}))));var i;"pay_for_order"===le("button_context")&&(i=new We({orderId:r("order_id"),key:r("key"),billingEmail:r("billing_email")}),$e=i),se.init({elementId:"#wcpay-express-checkout-element",$separator:jQuery("#wcpay-express-checkout-button-separator")});const s={abortPayment:t=>{Oe(),e(".woocommerce-error").remove();const o=e(".woocommerce-notices-wrapper").first();o.length&&(o.append(e('<div class="woocommerce-error" />').text(t)),e("html, body").animate({scrollTop:o.find(".woocommerce-error").offset().top},600))},completePayment:e=>{ze(),window.location=e},startExpressCheckoutElement:async e=>{var r,n,i,c,l;let u="",d=Promise.resolve();const p=await a.getStripe(),h=null===(r=le("flags")?.isEceUsingConfirmationTokens)||void 0===r||r,m=null!==(n=le("is_manual_capture"))&&void 0!==n&&n,f=null!==(i=le("has_subscription"))&&void 0!==i&&i,y=null!==(c=le("enabled_methods"))&&void 0!==c?c:[],b=[y.includes("payment_request")&&"card",y.includes("amazon_pay")&&"amazon_pay"].filter(Boolean);Ve=p.elements({mode:"payment",amount:e.total,currency:e.currency,...h?{paymentMethodTypes:b}:{paymentMethodCreation:"manual"},...h&&m?{captureMethod:"manual"}:{},...h&&f?{setupFutureUsage:"off_session"}:{},appearance:ke(),locale:null!==(l=le("stripe")?.locale)&&void 0!==l?l:"en"});const g=Ve.create("expressCheckout",(()=>{var e,t,o,r,n,a;const i=le("button"),s=null!==(e=le("enabled_methods"))&&void 0!==e?e:[],c=(e,t)=>{switch(t){case"dark":default:return"black";case"light":return"white";case"light-outline":return"googlePay"===e?"white":"white-outline"}},l="default"===i?.type?"plain":null!==(t=i?.type)&&void 0!==t?t:"buy",u="default"===i?.type?"plain":null!==(o=i?.type)&&void 0!==o?o:"plain",d=s.includes("payment_request");return{paymentMethods:{applePay:d?"always":"never",googlePay:d?"always":"never",amazonPay:s.includes("amazon_pay")?"auto":"never",link:"never",paypal:"never",klarna:"never"},layout:{overflow:"never"},buttonTheme:{googlePay:c("googlePay",null!==(r=i?.theme)&&void 0!==r?r:"black"),applePay:c("applePay",null!==(n=i?.theme)&&void 0!==n?n:"black")},buttonType:{googlePay:l,applePay:u},buttonHeight:Math.min(Math.max(parseInt(null!==(a=i?.height)&&void 0!==a?a:"48",10),40),55)}})());se.renderButton(g),g.on("loaderror",(()=>{document.getElementById("wcpay-woopay-button")||se.getButtonSeparator().hide()})),g.on("click",(function(e){if(u="",le("login_confirmation"))return void(e=>{const t=le("login_confirmation");if(!t)return;let o=t.message;o=o.replace(/\*\*.*?\*\*/,{apple_pay:"Apple Pay",google_pay:"Google Pay",amazon_pay:"Amazon Pay",paypal:"PayPal",link:"Link"}[e]),o=o.replace(/\*\*/g,""),confirm(o)&&(window.location.href=t.redirect_url)})(e.expressPaymentType);if("product"===le("button_context")){const e=jQuery(qe());if(e.is(".disabled"))return void(e.is(".wc-variation-is-unavailable")?window.alert(window?.wc_add_to_cart_variation_params?.i18n_unavailable_text||(0,t.__)("Sorry, this product is unavailable. Please choose a different combination.","woocommerce-payments")):window.alert((0,t.__)("Please select your product options before proceeding.","woocommerce-payments")));Ne().useSeparateCart(),d=Ne().addProductToCart(),d.catch((()=>{u=(0,t.__)("There was an error processing the product with this payment method. Please add the product to the cart, instead.","woocommerce-payments"),Ne().emptyCart(),g.unmount(),Ve=null,s.abortPayment(u),se.hideContainer(),se.getButtonSeparator().hide()})).finally((()=>{d=Promise.resolve()}))}const o=Qe?{shippingAddressRequired:"pay_for_order"!==le("button_context")&&Qe.needs_shipping,shippingRates:he(Qe),phoneNumberRequired:null!==(r=le("checkout")?.needs_payer_phone)&&void 0!==r&&r,lineItems:pe(Qe)}:"product"===le("button_context")&&le("product")?{shippingAddressRequired:null!==(n=le("product")?.needs_shipping)&&void 0!==n&&n,phoneNumberRequired:null!==(a=le("checkout")?.needs_payer_phone)&&void 0!==a&&a,lineItems:(null!==(i=le("product")?.displayItems)&&void 0!==i?i:[]).map((({label:e,amount:t})=>({name:e,amount:t})))}:void 0;var r,n,a,i;const c=o.shippingRates&&0!==o.shippingRates.length?o.shippingRates:[{id:"pending",displayName:(0,t.__)("Pending","woocommerce-payments"),amount:0}];(async function({expressPaymentType:e}){ze(),((e,t)=>{const o={google_pay:"gpay_button_click",apple_pay:"applepay_button_click"}[e];o&&Ce(o,{source:t})})(e,le("button_context"))})(e),e.resolve({business:{name:le("store_name")},emailRequired:!0,...o,shippingRates:o.shippingAddressRequired?c:void 0,allowedShippingCountries:le("checkout").allowed_shipping_countries})})),g.on("shippingaddresschange",(async e=>(await d,u?e.resolve():(async(e,t)=>{Be=e.address;try{const r=await $e.updateCustomer({shipping_address:Fe(e.name,e.address)}),n=he(r);if(0===n.length)return void e.reject();t.update({amount:(0,o.applyFilters)("wcpay.express-checkout.total-amount",de(parseInt(r.totals.total_price,10)-parseInt(r.totals.total_refund||0,10),r.totals),r)}),He=r,e.resolve({shippingRates:n,lineItems:pe(r)})}catch(t){e.reject()}})(e,Ve)))),g.on("shippingratechange",(async e=>(async(e,t,r=null)=>{const n=He||r;try{const r=await $e.selectShippingRate({package_id:(0,o.applyFilters)("wcpay.express-checkout.shipping-package-id",0,n,e.shippingRate.id),rate_id:e.shippingRate.id});He=r,t.update({amount:(0,o.applyFilters)("wcpay.express-checkout.total-amount",de(parseInt(r.totals.total_price,10)-parseInt(r.totals.total_refund||0,10),r.totals),r)}),e.resolve({lineItems:pe(r)})}catch(t){e.reject()}})(e,Ve,Qe))),g.on("confirm",(async e=>{if(!u)return(async(e,r,n,a,i,s,c=[])=>{const{error:l}=await n.submit();if(l)return i(l.message);const u=null===(d=le("flags")?.isEceUsingConfirmationTokens)||void 0===d||d;var d;let p;try{p=await async function(e,t,o){if(o){const{confirmationToken:o,error:r}=await e.createConfirmationToken({elements:t});if(r)throw r;return o.id}const{paymentMethod:r,error:n}=await e.createPaymentMethod({elements:t});if(n)throw n;return r.id}(r,n,u)}catch(e){return i(e.message)}try{const t=await $e.placeOrder({...je(s,p,u,c),extensions:(0,o.applyFilters)("wcpay.express-checkout.cart-place-order-extension-data",{})});var h,m;if("success"!==t.payment_result.payment_status)return i(ve(null!==(h=null!==(m=t.message)&&void 0!==m?m:t.payment_result?.payment_details.find((e=>"errorMessage"===e.key))?.value)&&void 0!==h?h:""));let r=t.payment_result.redirect_url;if(!r){const e=t.payment_result.payment_details?.find((e=>"redirect"===e.key));r=e?.value||""}const n=e.confirmIntent(r);a(!0===n?r:await n)}catch(e){return e.json&&(e=await Promise.resolve(e.json())),i(ve(e.message||e.payment_result?.payment_details.find((e=>"errorMessage"===e.key))?.value||(0,t.__)("There was a problem processing the order.","woocommerce-payments")))}})(a,p,Ve,s.completePayment,s.abortPayment,e,b);s.abortPayment(u)})),g.on("cancel",(()=>{"product"===le("button_context")&&d.finally((()=>{Ne().emptyCart()})),Be&&(e=>{const t=le("button_context"),o=le("has_block");var r;["cart","checkout"].includes(t)&&(o?wc?.blocksCheckout?.extensionCartUpdate({namespace:"woopayments/express-checkout/refresh-ui",data:{}}):(r=e.country,["CA","GB"].includes(r)||(e=>{const t=le("button_context"),o=(r=e,{first_name:null!==(n=r?.recipient?.split(" ")?.slice(0,1)?.join(" "))&&void 0!==n?n:"",last_name:null!==(a=r?.recipient?.split(" ")?.slice(1)?.join(" "))&&void 0!==a?a:"",company:"",address_1:null!==(i=r?.addressLine?.[0])&&void 0!==i?i:"",address_2:null!==(s=r?.addressLine?.[1])&&void 0!==s?s:"",city:null!==(c=r?.city)&&void 0!==c?c:"",state:null!==(l=r?.state)&&void 0!==l?l:"",country:null!==(u=r?.country)&&void 0!==u?u:"",postcode:null!==(d=r?.postal_code)&&void 0!==d?d:""});var r,n,a,i,s,c,l,u,d;const p=["country","state","city","postcode"];"cart"===t?(p.forEach((e=>{o[e]&&Se("form.woocommerce-shipping-calculator",`calc_shipping_${e}`,o[e])})),document.querySelector('form.woocommerce-shipping-calculator [name="calc_shipping"]')?.click()):"checkout"===t&&p.forEach((e=>{o[e]&&Se("form.woocommerce-checkout",`billing_${e}`,o[e])}))})(e)))})(Be),Be=null,Oe()})),g.on("ready",(e=>{(async function({availablePaymentMethods:e}){e&&(({paymentMethods:e,source:t})=>{const o={googlePay:Ie,applePay:Te};for(const r of e){const e=o[r];e&&e({source:t})}})({paymentMethods:Object.entries(e).filter((([e,t])=>t)).map((([e,t])=>e)),source:le("button_context")})})(e),e?.availablePaymentMethods&&Object.values(e.availablePaymentMethods).filter(Boolean).length&&(se.showContainer(),se.getButtonSeparator().show())}))},init:async()=>{if((0,o.removeAction)("wcpay.express-checkout.update-button-data","automattic/wcpay/express-checkout"),"product"===le("button_context")&&"bundle"===le("product")?.product_type&&(wcpayExpressCheckoutParams.product=void 0),!le("product")&&!Qe)try{Qe=await Ue()}catch(e){}Qe&&(wcpayExpressCheckoutParams.product=void 0);const t=De();(0,o.applyFilters)("wcpay.express-checkout.is-cart-eligible",t>0,Qe)?Qe?await s.startExpressCheckoutElement({total:t,currency:Qe.totals.currency_code.toLowerCase()}):"product"===le("button_context")&&le("product")?await s.startExpressCheckoutElement({total:t,currency:le("product")?.currency}):(se.hideContainer(),se.getButtonSeparator().hide()):(se.hideContainer(),se.getButtonSeparator().hide()),(0,o.addAction)("wcpay.express-checkout.update-button-data","automattic/wcpay/express-checkout",(async()=>{if("product"===le("button_context")&&jQuery(qe()).is(".disabled"))se.unblockButton();else{e(".woocommerce-error").remove();try{se.blockButton();const e=De();Qe=await Ue(),wcpayExpressCheckoutParams.product=null,se.unblockButton();const t=De();Ve?t!==e&&t>0&&Ve.update({amount:t}):s.init(),(0,o.applyFilters)("wcpay.express-checkout.is-cart-eligible",t>0,Qe)?(se.showContainer(),se.getButtonSeparator().show()):(se.hideContainer(),se.getButtonSeparator().hide())}catch(e){se.hideContainer()}}}))}};"checkout"===le("button_context")&&"pay_for_order"!==le("button_context")||s.init(),e(document.body).on("updated_cart_totals",(()=>{Qe=null,s.init()})),e(document.body).on("updated_checkout",(()=>{Qe=null,s.init()}))}))})()})();
jQuery(function(d){function t(t,a){var e;return function(){clearTimeout(e),e=setTimeout(function(){e=void 0,t.call()},a)}}var m,u;function a(){try{return generateWooCommerce.hooks.generateQuantityButtons()}catch(t){}var a,e;if(d(".woocommerce div.product form.cart").first().closest(".elementor-add-to-cart").length)d(".elementor.product").removeClass("do-quantity-buttons");else{try{a=generateWooCommerce.selectors.generateQuantityButtons.quantityBoxes}catch(t){a=d(".cart div.quantity:not(.buttons-added), .cart td.quantity:not(.buttons-added)").find(".qty")}try{if(0===a.length)return}catch(t){return}try{e=generateWooCommerce.callbacks.generateQuantityButtons.quantityBoxes}catch(t){e=function(t,a){var s=d(a);-1===["date","hidden"].indexOf(s.prop("type"))&&(s.parent().addClass("buttons-added").prepend('<a href="javascript:void(0)" class="minus">-</a>'),s.after('<a href="javascript:void(0)" class="plus">+</a>'),(a=parseFloat(d(this).attr("min")))&&0<a&&parseFloat(d(this).val())<a&&d(this).val(a),s.parent().find(".plus, .minus").on("click",function(){var t=parseFloat(s.val()),a=parseFloat(s.attr("max")),e=parseFloat(s.attr("min")),o=s.attr("step");t&&""!==t&&"NaN"!==t||(t=0),""!==a&&"NaN"!==a||(a=""),""!==e&&"NaN"!==e||(e=0),"any"!==o&&""!==o&&void 0!==o&&"NaN"!==parseFloat(o)||(o=1),d(this).is(".plus")?a&&(a===t||a<t)?s.val(a):s.val(t+parseFloat(o)):e&&(e===t||t<e)?s.val(e):0<t&&s.val(t-parseFloat(o)),s.trigger("change")}))}}d.each(a,e)}}d("body").on("added_to_cart",function(){d(".wc-menu-item").hasClass("has-items")||d(".wc-menu-item").addClass("has-items"),d(".wc-mobile-cart-items").hasClass("has-items")||d(".wc-mobile-cart-items").addClass("has-items")}),d("body").on("removed_from_cart",function(){var t=d(".number-of-items");t.length&&t.hasClass("no-items")&&(d(".wc-menu-item").removeClass("has-items"),d(".wc-mobile-cart-items").removeClass("has-items"))}),generateWooCommerce.addToCartPanel&&(d(document.body).on("added_to_cart",function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=0;t.length&&(e=t.outerHeight()),a.length&&"0px"===a.css("top")&&(e+=a.outerHeight()),d(".add-to-cart-panel").addClass("item-added").css({"-webkit-transform":"translateY("+e+"px)","-ms-transform":"translateY("+e+"px)",transform:"translateY("+e+"px)"})}),d(".add-to-cart-panel .continue-shopping").on("click",function(t){t.preventDefault(),d(".add-to-cart-panel").removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})}),d(window).on("scroll",t(function(){var t=d(".add-to-cart-panel");t.hasClass("item-added")&&t.removeClass("item-added").css({"-webkit-transform":"translateY(-100%)","-ms-transform":"translateY(-100%)",transform:"translateY(-100%)"})},250))),generateWooCommerce.stickyAddToCart&&(m=0,u=300,d(window).on("scroll",t(function(){var t=d("#wpadminbar"),a=d(".navigation-stick"),e=d(".stuckElement"),o=0,s=d(window).scrollTop(),r=d(".add-to-cart-panel"),n=r.offset().top+r.outerHeight(),i=d(".single_add_to_cart_button"),c=i.offset().top,i=i.outerHeight(),l=d(".site-footer").offset().top;0===e.length&&(u=0),c+i<s&&n<l?setTimeout(function(){t.length&&(o=t.outerHeight()),a.length&&(a.hasClass("auto-hide-sticky")?(s<m&&"0px"===a.css("top")&&(o+=a.outerHeight()),m=s):o+=a.outerHeight()),r.addClass("show-sticky-add-to-cart").css({"-webkit-transform":"translateY("+o+"px)","-ms-transform":"translateY("+o+"px)",transform:"translateY("+o+"px)"})},u):r.removeClass("show-sticky-add-to-cart").css({"-webkit-transform":"","-ms-transform":"",transform:""})},50)),d(".go-to-variables").on("click",function(t){t.preventDefault();var t=0,a=d(".navigation-stick"),e=d("#wpadminbar");a.length&&(t=a.outerHeight()),e.length&&(t+=e.outerHeight()),d("html, body").animate({scrollTop:d(".variations").offset().top-t},250)})),d(function(){"use strict";generateWooCommerce.quantityButtons&&a()}),d(document).ajaxComplete(function(){"use strict";generateWooCommerce.quantityButtons&&a()})});
let cmplz_cookie_data=[],cmplzCleanCookieInterval;function cmplz_create_element(e,t){e=document.createElement(e);return e.innerHtml=t,e}function cmplz_add_event(e,t,c){document.addEventListener(e,e=>{e.target.closest(t)&&c(e)})}function cmplz_is_hidden(e){return null===e.offsetParent}function cmplz_html_decode(e){return(new DOMParser).parseFromString(e,"text/html").documentElement.textContent}function cmplz_trap_focus(){var e;cmplz_banner&&complianz.soft_cookiewall&&(cmplz_original_active_element=document.activeElement,document.body.classList.add("cmplz-banner-active"),cmplz_banner.addEventListener("keydown",cmplz_handle_tab_navigation),0<(e=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length)&&e[0].focus()}function cmplz_handle_tab_navigation(e){var t,c;"Tab"===e.key&&0!==(c=cmplz_banner.querySelectorAll('button, [href], input, select, textarea, [tabindex]:not([tabindex="-1"])')).length&&(t=c[0],c=c[c.length-1],e.shiftKey?document.activeElement===t&&(e.preventDefault(),c.focus()):document.activeElement===c&&(e.preventDefault(),t.focus()))}function cmplz_release_focus_trap(){if(cmplz_banner&&cmplz_banner.removeEventListener("keydown",cmplz_handle_tab_navigation),document.body.classList.remove("cmplz-banner-active"),cmplz_original_active_element&&cmplz_original_active_element.focus)try{cmplz_original_active_element.focus()}catch(e){document.body.focus()}}function cmplzLoadConsentAreaContent(e,l){document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(t=>{let c=t.getAttribute("data-category"),n=t.getAttribute("data-service");var o=t.getAttribute("data-post_id"),a=t.getAttribute("data-block_id");if(e===c||l===n){let e=new XMLHttpRequest;e.open("GET",complianz.url+"consent-area/"+o+"/"+a,!0),e.setRequestHeader("Content-type","application/json"),e.send(),t.classList.remove("cmplz-placeholder"),e.onload=function(){t.innerHTML=JSON.parse(e.response),t.querySelectorAll("script").forEach(e=>{cmplz_run_script(e.innerHTML,c,n,"inline",e)})}}})}document.querySelectorAll(".cmplz-consent-area.cmplz-placeholder").forEach(e=>{e.addEventListener("click",e=>{let t=e.target;(t=t.classList.contains("cmplz-consent-area")?t:e.target.closest(".cmplz-consent-area.cmplz-placeholder"))&&(cmplz_set_service_consent(e=t.getAttribute("data-service"),!0),cmplzLoadConsentAreaContent(!1,e),cmplz_enable_category(null,e),cmplz_set_banner_status("dismissed"))}),document.addEventListener("cmplz_enable_category",function(e){cmplzLoadConsentAreaContent(e.detail.category,e.detail.service)})}),document.addEventListener("cmplz_manage_consent_container_loaded",function(){var e,t=window.location.href;-1!=t.indexOf("#")&&(e=-1!=t.lastIndexOf("?")?t.lastIndexOf("?"):void 0,t=t.substring(t.indexOf("#")+1,e),e=document.getElementById(t))&&(t=e.getBoundingClientRect().top+window.pageYOffset-200,window.scrollTo({top:t,behavior:"smooth"}))}),complianz.locale=complianz.locale+"&token="+Math.random().toString(36).replace(/[^a-z]+/g,"").substr(0,5),(()=>{function e(e,t){t=t||{bubbles:!1,cancelable:!1,detail:void 0};var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,t.bubbles,t.cancelable,t.detail),c}"function"!=typeof window.CustomEvent&&(e.prototype=window.Event.prototype,window.CustomEvent=e)})();let cmplz_banner,cmplz_banner_container=document.getElementById("cmplz-cookiebanner-container"),cmplz_manage_consent_button,cmplz_waiting_inline_scripts=[],cmplz_waiting_scripts=[],cmplz_fired_scripts=[],cmplz_placeholder_class_index=0,cmplz_all_scripts_hook_fired=!1,cmplz_consent_stored_once=!1,cmplz_fired_category_events=["functional"],cmplz_fired_service_events=[],cmplz_categories=["functional","preferences","statistics","marketing"];var cmplz_original_active_element=null;window.cmplz_get_cookie=function(t){if("undefined"!=typeof document){t=complianz.prefix+t;var c=document.cookie.split(";");for(let e=0;e<c.length;e++){var n=c[e].trim();if(n.startsWith(t+"="))return n.substring(t.length+1)}}return""},window.cmplz_set_cookie=function(e,t,c){var n,o,a,l;"undefined"!=typeof document&&(c=void 0===c||c,n="https:"===window.location.protocol?";secure":"",(o=new Date).setTime(o.getTime()+24*complianz.cookie_expiry*60*60*1e3),o=";expires="+o.toGMTString(),a=0<(a=cmplz_get_cookie_domain()).length?";domain="+a:"",c=c?complianz.prefix:"",l=cmplz_get_cookie_path(),document.cookie=""+c+e+`=${t};SameSite=Lax${n}${o}${a};path=`+l)},window.cmplz_in_array=function(e,t){return t.includes(e)},window.cmplz_highest_accepted_category=function(){var t=cmplz_accepted_categories(),c=["marketing","statistics","preferences"];for(let e=0;e<c.length;e++)if(cmplz_in_array(c[e],t))return c[e];return"functional"};let cmplz_set_category_as_body_class=()=>{let c=document.body.classList;for(let e=c.length-1;0<=e;e--)c[e].startsWith("cmplz-")&&"cmplz-document"!==c[e]&&c.remove(c[e]);var e=cmplz_accepted_categories(),e=(Object.values(e).forEach(e=>{"string"==typeof e&&c.add("cmplz-"+e)}),cmplz_get_all_service_consents()),e=(Object.entries(e).forEach(([e,t])=>{t&&c.add("cmplz-"+e)}),c.add("cmplz-"+complianz.region,"cmplz-"+complianz.consenttype),new CustomEvent("cmplz_set_category_as_bodyclass"));document.dispatchEvent(e)},cmplz_append_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("style");c.setAttribute("type","text/css"),c.appendChild(document.createTextNode(e)),t.appendChild(c)},cmplz_load_css=e=>{var t=document.head||document.getElementsByTagName("head")[0],c=document.createElement("link");c.rel="stylesheet",c.type="text/css",c.href=e,t.appendChild(c)};function cmplz_run_script(t,c,n,e,o){var a=document.createElement("script");if("inline"!==e?a.src=t:("string"!=typeof t&&(t=t.innerHTML),a.innerHTML=[t,"cmplzScriptLoaded();"].join("\n")),!cmplz_in_array(t,cmplz_fired_scripts)){cmplzCopyAttributes(o,a);try{"inline"!==e?a.onload=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)}:window.cmplzScriptLoaded=function(){cmplz_run_after_all_scripts(c,n),cmplz_maybe_run_waiting_scripts(t,c,n,o)},document.head.appendChild(a)}catch(e){throw cmplz_run_after_all_scripts(c,n),"Something went wrong "+e+" while loading "+t}}}function cmplz_maybe_run_waiting_scripts(e,t,c,n){var o=cmplz_get_waiting_script(cmplz_waiting_scripts,e),o=(o&&cmplz_run_script(o,t,c,"src",n),cmplz_get_waiting_script(cmplz_waiting_inline_scripts,e));o&&cmplz_run_script(o,t,c,"inline",n)}let cmplzLazyLoader=()=>{var e=document.querySelectorAll(".cmplz-blocked-content-container");let t=new IntersectionObserver((e,n)=>{e.forEach(e=>{var t,c;e.isIntersecting&&((t=(e=e.target).getAttribute("data-placeholder-image"))&&(c=e.getAttribute("data-placeholder_class_index"),cmplz_append_css(".cmplz-placeholder-"+c+" {background-image: url("+t+") !important;}"),cmplz_set_blocked_content_container_aspect_ratio(e,t,c)),n.unobserve(e))})});e.forEach(e=>{t.observe(e)})};function cmplz_set_blocked_content_container(){document.querySelectorAll(".cmplz-image").forEach(e=>{var t,c,n,o;e.classList.contains("cmplz-processed")||(e.classList.add("cmplz-processed"),t=e.getAttribute("data-service"),c=e.getAttribute("data-category"),(n=e.parentElement).classList.add("cmplz-blocked-content-container"),o=n.getAttribute("data-placeholder_class_index"),"lazy"===e.getAttribute("loading")&&(e.removeAttribute("loading"),e.setAttribute("data-deferlazy",1)),null==o&&(cmplz_placeholder_class_index++,n.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),n.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(n,c,t)))}),document.querySelectorAll(".cmplz-placeholder-element").forEach(t=>{if(!t.classList.contains("cmplz-processed")){t.classList.add("cmplz-processed");var c=t.getAttribute("data-service"),n=t.getAttribute("data-category");let e;null===(e=t.classList.contains("cmplz-iframe")?("lazy"===t.getAttribute("loading")&&(t.removeAttribute("loading"),t.setAttribute("data-deferlazy",1)),t.parentElement):t).getAttribute("data-placeholder_class_index")&&(cmplz_placeholder_class_index++,e.classList.add("cmplz-placeholder-"+cmplz_placeholder_class_index,"cmplz-blocked-content-container"),e.setAttribute("data-placeholder_class_index",cmplz_placeholder_class_index),cmplz_insert_placeholder_text(e,n,c),n=t.getAttribute("data-placeholder-image"))&&void 0!==n&&n.length&&e.setAttribute("data-placeholder-image",n)}}),cmplzLazyLoader(),cmplz_has_consent("statistics")&&cmplz_enable_category("statistics"),cmplz_has_consent("marketing")&&cmplz_enable_category("marketing")}function cmplz_insert_placeholder_text(e,n,o){if(!e.querySelector(".cmplz-blocked-content-notice")){let t=complianz.placeholdertext;n=n||"marketing";let c;if(void 0!==t){if(1==complianz.clean_cookies){let e=o?o.replace("-"," "):"";e=e.charAt(0).toUpperCase()+e.slice(1),t=t.replace("{service}",e),(c=cmplz_create_element("div",t)).innerHTML=t,c.classList.add("cmplz-blocked-content-notice");var a=c.querySelector("button"),a=(a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{service}",e)),complianz.page_links[complianz.region]),l=c.querySelector(".cmplz-links a");a&&a.hasOwnProperty("cookie-statement")?(l.setAttribute("href",a["cookie-statement"].url),"{title}"===l.innerText&&(l.innerText=a["cookie-statement"].title)):l&&(l.parentElement.style.display="none")}else{a=cmplz_create_element("button",""),l=complianz.categories.hasOwnProperty(n)?complianz.categories[n]:"marketing";a.innerText=t.replace("{category}",l),a.classList.add("cmplz-blocked-content-notice","cmplz-accept-category","cmplz-accept-"+n),a.setAttribute("data-service",o),a.setAttribute("data-category",n),a.setAttribute("aria-label",complianz.aria_label.replace("{category}",n)),c=a}("VIDEO"!==e.tagName?e:e.parentElement).appendChild(c)}}}function cmplz_set_blocked_content_container_aspect_ratio(t,c,n){var e;null!=t&&((e=new Image).addEventListener("load",function(){var e=this.naturalWidth||1,e=this.naturalHeight*(t.clientWidth/e),e=-1===c.indexOf("placeholder.jpg")?"height:"+e+"px;":"";cmplz_append_css(".cmplz-placeholder-"+n+" {"+e+"}")}),e.src=c)}let cmplzResizeTimer;function cmplz_has_blocked_scripts(){return 0<document.querySelectorAll("script[data-category], script[data-service]").length}function cmplz_enable_category(o,a){1==complianz.tm_categories&&""!==o&&cmplz_run_tm_event(o);var t={},t=(t.category=o,t.categories=cmplz_accepted_categories(),t.region=complianz.region,new CustomEvent("cmplz_before_category",{detail:t}));if(document.dispatchEvent(t),a=void 0!==a?a:"do_not_match","functional"!==(o=""===o?"do_not_match":o)){"marketing"===o&&cmplz_set_integrations_cookies();let e;e="do_not_match"!==a?'.cmplz-blocked-content-notice [data-service="'+a+'"]':1!=complianz.clean_cookies?".cmplz-blocked-content-notice.cmplz-accept-"+o:'.cmplz-blocked-content-notice [data-category="'+o+'"]',document.querySelectorAll(e).forEach(e=>{var t=e.getAttribute("data-service");e.parentNode.classList.contains("cmplz-blocked-content-notice")&&(e=e.parentNode),cmplz_is_service_denied(t)||e.parentNode.removeChild(e)}),document.querySelectorAll('[data-category="'+o+'"], [data-service="'+a+'"]').forEach(t=>{var e=t.getAttribute("data-service");if(!cmplz_is_service_denied(e)&&"functional"!==t.getAttribute("data-category")&&!t.classList.contains("cmplz-activated")){var e=t.tagName;if("LINK"===e){t.classList.add("cmplz-activated");var c=t.getAttribute("data-href");cmplz_load_css(c,o)}else if("IMG"===e){t.classList.add("cmplz-activated");c=t.getAttribute("data-src-cmplz");t.setAttribute("src",c),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),cmplz_remove_placeholder(t)}else if("IFRAME"===e){t.classList.add("cmplz-activated");let e=t.getAttribute("data-src-cmplz");c=t.getAttribute("data-cmplz-target")?t.getAttribute("data-cmplz-target"):"src";"1"===cmplz_get_url_parameter(t.getAttribute(c),"autoplay")&&(e+="&autoplay=1"),t.getAttribute("data-deferlazy")&&t.setAttribute("loading","lazy"),t.addEventListener("load",()=>{cmplz_remove_placeholder(t)}),t.setAttribute(c,e)}else t.classList.contains("cmplz-placeholder-element")&&(t.classList.add("cmplz-activated"),e=t.getAttribute("data-placeholder_class_index"),t.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+e))}});t=document.querySelectorAll('script[data-category="'+o+'"], script[data-service="'+a+'"]');t.forEach(e=>{var t=e.getAttribute("data-waitfor"),c=e.getAttribute("data-cmplz-src");t&&(c?cmplz_waiting_scripts[t]=c:0<e.innerText.length&&(cmplz_waiting_inline_scripts[t]=e)),e.parentElement&&e.parentElement.removeChild(e)}),t.forEach(e=>{var t,c,n=e.getAttribute("type");!e.classList.contains("cmplz-activated")&&n&&"text/javascript"!==n&&(e.classList.add("cmplz-activated"),(n=e.getAttribute("data-cmplz-src"))?(e.removeAttribute("type"),cmplz_is_waiting_script(cmplz_waiting_scripts,n)||(e.getAttribute("data-post_scribe_id")?(t="#"+e.getAttribute("data-post_scribe_id"),(c=document.querySelector(t))&&(c.innerHtml(""),postscribe(t,"<script src="+n+"><\/script>"))):cmplz_run_script(n,o,a,"src",e))):0<e.innerText.length&&(cmplz_is_waiting_script(cmplz_waiting_inline_scripts,e.innerText)||cmplz_run_script(e.innerText,o,a,"inline",e)))}),cmplz_run_after_all_scripts(o,a)}}function cmplz_remove_placeholder(e){var t,c=e.closest(".cmplz-blocked-content-container");c&&(t=c.getAttribute("data-placeholder_class_index"),c.classList.remove("cmplz-blocked-content-container","cmplz-placeholder-"+t)),e.classList.remove("cmplz-iframe-styles","cmplz-iframe","video-wrap")}function cmplz_get_waiting_script(e,t){for(var c in e){var n;if(e.hasOwnProperty(c))if(-1!==t.indexOf(c))return n=e[c],delete e[c],n}return!1}function cmplz_array_is_empty(e){for(var t in e)if(e.hasOwnProperty(t))return!1;return!0}function cmplz_is_waiting_script(t,c){for(var n in t)if(t.hasOwnProperty(n)){let e=t[n];if("string"!=typeof e&&(e=e.innerText),-1!==c.indexOf(e)||-1!==e.indexOf(c))return!0}return!1}function cmplz_run_after_all_scripts(e,t){var c="do_not_match"!==t&&!cmplz_in_array(t,cmplz_fired_service_events),n="do_not_match"!==e&&!cmplz_in_array(e,cmplz_fired_category_events);(n||c)&&(n&&cmplz_fired_category_events.push(e),c&&cmplz_fired_service_events.push(t),(n={}).category=e,n.service=t,n.categories=cmplz_accepted_categories(),n.services=cmplz_get_all_service_consents(),n.region=complianz.region,c=new CustomEvent("cmplz_enable_category",{detail:n}),document.dispatchEvent(c)),!cmplz_all_scripts_hook_fired&&cmplz_array_is_empty(cmplz_waiting_inline_scripts)&&cmplz_array_is_empty(cmplz_waiting_scripts)&&(n=new CustomEvent("cmplz_run_after_all_scripts",{detail:e,service:t}),document.dispatchEvent(n),cmplz_all_scripts_hook_fired=!0)}window.addEventListener("resize",function(){clearTimeout(cmplzResizeTimer),cmplzResizeTimer=setTimeout(cmplz_set_blocked_content_container,500)},!0),1==complianz.block_ajax_content&&setInterval(function(){cmplz_set_blocked_content_container()},2e3);let cmplz_fired_events=[];function cmplz_run_tm_event(e){-1===cmplz_fired_events.indexOf(e)&&(cmplz_fired_events.push(e),window.dataLayer=window.dataLayer||[],window.dataLayer.push({event:"cmplz_event_"+e}),e=new CustomEvent("cmplz_tag_manager_event",{detail:e}),document.dispatchEvent(e))}function cmplz_fire_before_categories_consent(e){var t={},e=(t.categories=e,t.region=complianz.region,new CustomEvent("cmplz_before_categories_consent",{detail:t}));document.dispatchEvent(e)}function cmplz_check_cookie_policy_id(){var e=cmplz_get_cookie("policy_id");e&&parseInt(complianz.current_policy_id)!==parseInt(e)&&(cmplz_deny_all(),cmplz_set_banner_status("show"),cmplz_clear_cookies("cmplz"))}function cmplz_do_not_track(){var e="doNotTrack"in navigator&&"1"===navigator.doNotTrack,t="globalPrivacyControl"in navigator&&navigator.globalPrivacyControl;return!(!complianz.do_not_track_enabled||!t&&!e)}function cmplz_get_services_on_page(){let c=[];return document.querySelectorAll("[data-service]").forEach(e=>{var t=e.getAttribute("data-service"),e=e.getAttribute("data-category");-1==c.indexOf(t)&&c.push({category:e,service:t})}),c}function cmplz_is_bot(){var e=new RegExp("(googlebot/|Googlebot-Mobile|Google-InspectionTool|Googlebot-Image|Google favicon|Mediapartners-Google|bingbot|slurp|java|wget|curl|Commons-HttpClient|Python-urllib|libwww|httpunit|nutch|phpcrawl|msnbot|jyxobot|FAST-WebCrawler|FAST Enterprise Crawler|biglotron|teoma|convera|seekbot|gigablast|exabot|ngbot|ia_archiver|GingerCrawler|webmon |httrack|webcrawler|grub.org|UsineNouvelleCrawler|antibot|netresearchserver|speedy|fluffy|bibnum.bnf|findlink|msrbot|panscient|yacybot|AISearchBot|IOI|ips-agent|tagoobot|MJ12bot|dotbot|woriobot|yanga|buzzbot|mlbot|yandexbot|purebot|Linguee Bot|Voyager|CyberPatrol|voilabot|baiduspider|citeseerxbot|spbot|twengabot|postrank|turnitinbot|scribdbot|page2rss|sitebot|linkdex|Adidxbot|blekkobot|ezooms|dotbot|Mail.RU_Bot|discobot|heritrix|findthatfile|europarchive.org|NerdByNature.Bot|sistrix crawler|ahrefsbot|Aboundex|domaincrawler|wbsearchbot|summify|ccbot|edisterbot|seznambot|ec2linkfinder|gslfbot|aihitbot|intelium_bot|facebookexternalhit|yeti|RetrevoPageAnalyzer|lb-spider|sogou|lssbot|careerbot|wotbox|wocbot|ichiro|DuckDuckBot|lssrocketcrawler|drupact|webcompanycrawler|acoonbot|openindexspider|gnam gnam spider|web-archive-net.com.bot|backlinkcrawler|coccoc|integromedb|content crawler spider|toplistbot|seokicks-robot|it2media-domain-crawler|ip-web-crawler.com|siteexplorer.info|elisabot|proximic|changedetection|blexbot|arabot|WeSEE:Search|niki-bot|CrystalSemanticsBot|rogerbot|360Spider|psbot|InterfaxScanBot|Lipperhey SEO Service|CC Metadata Scaper|g00g1e.net|GrapeshotCrawler|urlappendbot|brainobot|fr-crawler|binlar|SimpleCrawler|Livelapbot|Twitterbot|cXensebot|smtbot|bnf.fr_bot|A6-Indexer|ADmantX|Facebot|Twitterbot|OrangeBot|memorybot|AdvBot|MegaIndex|SemanticScholarBot|ltx71|nerdybot|xovibot|BUbiNG|Qwantify|archive.org_bot|Applebot|TweetmemeBot|crawler4j|findxbot|SemrushBot|yoozBot|lipperhey|y!j-asr|Domain Re-Animator Bot|AddThis)","i"),t=navigator.userAgent;return e.test(t)}function cmplz_is_speedbot(){var e=navigator.userAgent;return new RegExp("(GTmetrix|pingdom|pingbot|Lighthouse)","i").test(e)}function cmplz_exists_service_consent(){var e,t=cmplz_get_cookie("consented_services");try{for(var c in e=JSON.parse(t))if(e.hasOwnProperty(c)&&1==e[c])return!0}catch(e){}return!1}function cmplz_set_service_consent(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}n[e]=t,cmplz_set_cookie("consented_services",JSON.stringify(n));c={},c.service=e,c.value=t,c.region=complianz.region,cmplz_all_scripts_hook_fired=!1,e=new CustomEvent("cmplz_status_change_service",{detail:c});document.dispatchEvent(e)}function cmplz_clear_all_service_consents(){cmplz_set_cookie("consented_services","")}function cmplz_get_all_service_consents(){var e=cmplz_get_cookie("consented_services");let t;try{t=JSON.parse(e)}catch(e){t={}}return t}function cmplz_get_cookie_path(){return void 0!==complianz.cookie_path&&""!==complianz.cookie_path?complianz.cookie_path:"/"}function cmplz_get_cookie_domain(){return 1==complianz.set_cookies_on_root&&3<complianz.cookie_domain.length&&!complianz.cookie_domain.includes("localhost")?complianz.cookie_domain:""}function cmplz_reload_browser_compatible(){var e;-1<navigator.userAgent.toLowerCase().indexOf("firefox")?((e=new URL(window.location.href)).searchParams.set("cmplz-force-reload",Date.now().toString()),window.location.href=e.toString()):window.location.reload()}window.cmplz_accept_all=function(){for(var e in cmplz_clear_all_service_consents(),cmplz_fire_before_categories_consent(cmplz_categories),cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"allow");cmplz_sync_category_checkboxes()},window.cmplz_deny_all=function(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&cmplz_set_consent(cmplz_categories[e],"deny");let t=!1;"functional"===cmplz_highest_accepted_category()&&!cmplz_exists_service_consent()||(t=!0),cmplz_clear_cookies("cmplz_service")&&(t=!0),cmplz_clear_all_service_consents(),cmplz_integrations_revoke(),cmplz_fire_categories_event(),cmplz_track_status();var c=new CustomEvent("cmplz_revoke",{detail:t});document.dispatchEvent(c),!complianz.tcf_active&&t&&cmplz_reload_browser_compatible()},window.conditionally_show_banner=function(){complianz=cmplz_merge_object(complianz,cmplz_user_data),cmplz_maybe_auto_redirect(),cmplz_set_blocked_content_container(),window.wp_consent_type=complianz.consenttype;var e,t,c,n=new CustomEvent("wp_consent_type_defined"),o=(document.dispatchEvent(n),n=new CustomEvent("cmplz_before_cookiebanner"),document.dispatchEvent(n),1==complianz.forceEnableStats&&"optin"===complianz.consenttype&&cmplz_set_consent("statistics","allow"),cmplz_categories.reverse()),a=[];for(e in o)o.hasOwnProperty(e)&&(t=cmplz_categories[e],cmplz_has_consent(t))&&a.push(t);for(c in cmplz_fire_before_categories_consent(a),a)o.hasOwnProperty(c)&&cmplz_enable_category(a[c]);if(cmplz_exists_service_consent()){cmplz_enable_category("","general");var l,r,i,s=cmplz_get_services_on_page();for(l in s)s.hasOwnProperty(l)&&(r=s[l].service,i=s[l].category,cmplz_has_service_consent(r,i))&&(document.querySelectorAll('.cmplz-accept-service[data-service="'+r+'"]').forEach(e=>{e.checked=!0}),cmplz_enable_category("",r))}cmplz_sync_category_checkboxes(),cmplz_integrations_init(),cmplz_check_cookie_policy_id(),cmplz_set_up_auto_dismiss(),cmplz_load_manage_consent_container(),n=new CustomEvent("cmplz_cookie_banner_data",{detail:complianz}),document.dispatchEvent(n),""===cmplz_get_cookie("saved_categories")&&("optin"!==complianz.consenttype&&"optout"!==complianz.consenttype?cmplz_track_status("no_warning"):cmplz_do_not_track()&&cmplz_track_status("do_not_track")),cmplz_set_category_as_body_class(),cmplz_fire_categories_event(),cmplz_do_not_track()?(console.log("global privacy control or do not track detected: no banner."),cmplz_track_status("do_not_track")):("optin"===complianz.consenttype?(complianz.forceEnableStats&&cmplz_enable_category("statistics"),console.log("opt-in"),show_cookie_banner):"optout"===complianz.consenttype?(console.log("opt-out"),show_cookie_banner):(console.log("other consent type, no cookie warning"),cmplz_accept_all))()},window.show_cookie_banner=function(){let t=complianz.disable_cookiebanner||cmplz_is_speedbot(),e=!1;(document.querySelector("#cmplz-manage-consent-container")||document.querySelector(".cmplz-dropdown-cookiepolicy"))&&(e=!0);var c=document.getElementById("cmplz-cookiebanner-container"),c=(c&&document.body.prepend(c),document.createElement("link"));let n=complianz.page_links[complianz.region];(cmplz_banner=document.querySelector(".cmplz-cookiebanner.banner-"+complianz.user_banner_id+"."+complianz.consenttype))||(t=!0),cmplz_manage_consent_button=document.querySelector("#cmplz-manage-consent .cmplz-manage-consent.manage-consent-"+complianz.user_banner_id);var o=complianz.css_file.replace("{type}",complianz.consenttype).replace("{banner_id}",complianz.user_banner_id),o=(-1!==complianz.css_file.indexOf("cookiebanner/css/defaults/banner")&&console.log("Fallback default css file used. Please re-save banner settings, or check file writing permissions in uploads directory"),c.href=o,c.type="text/css",c.rel="stylesheet",c.onload=function(){var e;t||(cmplz_banner.classList.remove("cmplz-hidden"),cmplz_manage_consent_button.classList.remove("cmplz-hidden"),"show"===cmplz_get_banner_status()&&(cmplz_trap_focus(),e=cmplz_banner.querySelector(".cmplz-close"))&&e.focus())},document.getElementsByTagName("head")[0].appendChild(c),cmplz_banner&&!t&&(cmplz_banner.querySelectorAll(".cmplz-links a:not(.cmplz-external), .cmplz-buttons a:not(.cmplz-external)").forEach(e=>{var t,c=e;for(t in c.classList.add("cmplz-hidden"),n)n.hasOwnProperty(t)&&c.classList.contains(t)&&(c.setAttribute("href",n[t].url+c.getAttribute("data-relative_url")),"{title}"===c.innerText&&(c.innerText=cmplz_html_decode(n[t].title)),c.classList.remove("cmplz-hidden"))}),cmplz_set_banner_status(),e)&&(cmplz_banner.classList.remove("cmplz-show"),cmplz_banner.classList.add("cmplz-dismissed"),cmplz_manage_consent_button.classList.remove("cmplz-dismissed"),cmplz_manage_consent_button.classList.add("cmplz-show")),new CustomEvent("cmplz_cookie_warning_loaded",{detail:complianz.region}));document.dispatchEvent(o)},window.cmplz_get_banner_status=function(){return cmplz_get_cookie("banner-status")},window.cmplz_set_banner_status=function(e){let t=cmplz_get_cookie("banner-status");(e=void 0!==e?e:t)!==t&&cmplz_set_cookie("banner-status",e),0===e.length&&(e="show"),t="show"===e?"dismissed":"show",cmplz_banner&&0<e.length&&(cmplz_banner.classList.remove("cmplz-"+t),cmplz_banner.classList.add("cmplz-"+e),cmplz_manage_consent_button)&&(cmplz_manage_consent_button.classList.add("cmplz-"+t),cmplz_manage_consent_button.classList.remove("cmplz-"+e)),cmplz_banner_container&&complianz.soft_cookiewall&&(cmplz_banner_container.classList.remove("cmplz-"+t),cmplz_banner_container.classList.add("cmplz-"+e,"cmplz-soft-cookiewall"));var c=new CustomEvent("cmplz_banner_status",{detail:e});document.dispatchEvent(c),cmplz_start_clean(),"show"===e?(cmplz_trap_focus(),(c=cmplz_banner.querySelector(".cmplz-close"))&&c.focus()):cmplz_release_focus_trap()},window.cmplz_has_consent=function(e){if(cmplz_is_bot())return!0;if("functional"===e)return!0;let t,c;return t=cmplz_do_not_track()?(c=cmplz_get_cookie(e),"allow"===c):(c=cmplz_get_cookie(e),("optout"===complianz.consenttype||"other"===complianz.consenttype)&&""===c||"allow"===c)},window.cmplz_is_service_denied=function(e){var t=cmplz_get_cookie("consented_services");let c;try{c=JSON.parse(t)}catch(e){c={}}return!!c.hasOwnProperty(e)&&!c[e]},window.cmplz_has_service_consent=function(e,t){var c=cmplz_get_cookie("consented_services");let n;try{n=JSON.parse(c)}catch(e){n={}}return n.hasOwnProperty(e)?n[e]:cmplz_has_consent(t)},window.cmplz_set_consent=function(e,t){cmplz_set_accepted_cookie_policy_id(),t="functional"===e?"allow":t;var c,n=cmplz_get_cookie(e);let o="allow"===t;document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=o}),n!==t&&(cmplz_set_cookie(e,t),"allow"===t&&cmplz_enable_category(e),cmplz_wp_set_consent(e,t),"statistics"===e&&cmplz_wp_set_consent("statistics-anonymous","allow"),(c=new Object).category=e,c.value=t,c.region=complianz.region,c.categories=cmplz_accepted_categories(),cmplz_all_scripts_hook_fired=!1,c=new CustomEvent("cmplz_status_change",{detail:c}),document.dispatchEvent(c),"marketing"===e)&&"deny"===t&&"allow"===n&&(cmplz_integrations_revoke(),setTimeout(function(){cmplz_reload_browser_compatible()},500))};let cmplz_user_data=[];if("undefined"!=typeof Storage&&sessionStorage.cmplz_user_data&&(cmplz_user_data=JSON.parse(sessionStorage.cmplz_user_data)),1!=complianz.geoip||0!=cmplz_user_data.length&&cmplz_user_data.version===complianz.version&&cmplz_user_data.banner_version===complianz.banner_version)conditionally_show_banner();else{let e=new XMLHttpRequest,t=cmplz_get_url_parameter(window.location.href,"cmplz_user_region");t=t?"&cmplz_user_region="+t:"",e.open("GET",complianz.url+"banner?"+complianz.locale+t,!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_user_data=JSON.parse(e.response),sessionStorage.cmplz_user_data=JSON.stringify(cmplz_user_data),conditionally_show_banner()}}if(1==complianz.store_consent){let e=cmplz_get_cookie("id"),t="",c="";"undefined"!=typeof Storage&&sessionStorage.cmplz_id&&(t=JSON.parse(sessionStorage.cmplz_id)),0==e.length&&0<t.length&&(c=t,cmplz_set_cookie("id",c)),0<e.length&&0==t.length&&(c=e),"undefined"!=typeof Storage&&(sessionStorage.cmplz_id=JSON.stringify(c))}function cmplz_track_status_end(){cmplz_consent_stored_once||cmplz_track_status()}function cmplz_set_up_auto_dismiss(){if("dismissed"!==cmplz_get_banner_status()){if("optout"===complianz.consenttype&&1==complianz.dismiss_on_scroll){let e=function(){window.pageYOffset>Math.floor(400)&&(window.removeEventListener("scroll",e),this.onWindowScroll=null,"dismissed"!==cmplz_get_banner_status())&&(cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())};window.addEventListener("scroll",e)}var e=parseInt(complianz.dismiss_timeout);"optout"===complianz.consenttype&&0<e&&window.setTimeout(function(){"dismissed"!==cmplz_get_banner_status()&&(cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())},Math.floor(e))}}function cmplz_fire_categories_event(){var e=new Object,e=(e.category=cmplz_highest_accepted_category(),e.categories=cmplz_accepted_categories(),e.region=complianz.region,new CustomEvent("cmplz_fire_categories",{detail:e}));document.dispatchEvent(e)}function cmplz_track_status(e){let t=[];e=void 0!==e&&e;var c=new CustomEvent("cmplz_track_status",{detail:e});document.dispatchEvent(c),t=e?[e]:cmplz_accepted_categories(),cmplz_set_category_as_body_class();let n,o;try{n=JSON.parse(cmplz_get_cookie("saved_categories"))}catch(e){n={}}try{o=JSON.parse(cmplz_get_cookie("saved_services"))}catch(e){o={}}var c=cmplz_get_all_service_consents();cmplz_equals(n,t)&&cmplz_equals(o,c)||1!=complianz.store_consent||cmplz_is_bot()||cmplz_is_speedbot()||(cmplz_set_cookie("saved_categories",JSON.stringify(t)),cmplz_set_cookie("saved_services",JSON.stringify(c)),cmplz_consent_stored_once=!0,e={consented_categories:t,consented_services:c,consenttype:window.wp_consent_type},(c=new XMLHttpRequest).open("POST",complianz.url+"track",!0),c.setRequestHeader("Content-type","application/json"),c.send(JSON.stringify(e)))}function cmplz_accepted_categories(){let e=cmplz_categories,t=[];for(var c in e)e.hasOwnProperty(c)&&(c=e[c],cmplz_has_consent(c))&&t.push(c);return e=e.filter(function(e){return cmplz_in_array(e,t)})}function cmplz_sync_category_checkboxes(){for(var e in cmplz_categories)cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],cmplz_has_consent(e)||"functional"===e?document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!0}):document.querySelectorAll("input.cmplz-"+e).forEach(e=>{e.checked=!1})),document.querySelectorAll(".cmplz-accept-service").forEach(e=>{var t=e.getAttribute("data-service"),c=e.getAttribute("data-category");cmplz_has_service_consent(t,c)?e.checked=!0:cmplz_is_service_denied(t)?e.checked=!1:e.checked=!!cmplz_has_consent(c)})}function cmplz_merge_object(e,t){var c,n,o={};for(c in t)t.hasOwnProperty(c)&&(o[c]=t[c]);for(n in e)t.hasOwnProperty(n)&&void 0!==t[n]||e.hasOwnProperty(n)&&(o[n]=e[n]);return o}function cmplz_clear_cookies(t){if("undefined"==typeof document)return!1;let a=!1,l="https:"===window.location.protocol?";secure":"",r="expires="+(new Date).toGMTString(),i=location.pathname.replace(/^\/|\/$/g,"").split("/");return document.cookie.split("; ").forEach(function(e){let n=e.split(";")[0].split("=")[0];if(-1!==n.indexOf(t)){a=!0;let c=window.location.hostname.split(".");var o=1<c.length;for(i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain=."+c.join(".")+";path="+e+"/"});0<c.length;){let t="."+c.join(".");c.shift(),o&&1===c.length&&c.shift(),i.forEach(function(e){e="/"+e;document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e,document.cookie=encodeURIComponent(n)+"=;SameSite=Lax"+l+";"+r+";domain="+t+";path="+e+"/"})}}}),cmplz_set_accepted_cookie_policy_id(),a}function cmplz_set_accepted_cookie_policy_id(){cmplz_set_cookie("policy_id",complianz.current_policy_id)}function cmplz_integrations_init(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&"1"===t[e][1]&&cmplz_set_cookie(e,t[e][1],!1)}function cmplz_integrations_revoke(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&(cmplz_set_cookie(e,t[e][1],!1),0==t[e][1])&&cmplz_clear_cookies(e)}function cmplz_set_integrations_cookies(){var e,t=complianz.set_cookies;for(e in t)t.hasOwnProperty(e)&&cmplz_set_cookie(e,t[e][0],!1)}function cmplz_get_url_parameter(e,t){if(e&&void 0!==e&&-1!==e.indexOf("?")){e=e.split("?")[1];if(e){var c=e.split("&");for(let e=0;e<c.length;e++){var n=c[e].split("=");if(n[0]===t)return void 0===n[1]||decodeURIComponent(n[1])}}}return!1}function cmplz_maybe_auto_redirect(){var e=cmplz_get_url_parameter(window.location.href,"cmplz_region_redirect"),t=cmplz_get_url_parameter(window.location.href,"cmplz-region");e&&!t&&(e=window.location.href.split("#")[0]+"&cmplz-region="+complianz.region,t=window.location.hash,window.location.href=e+t)}function cmplz_wp_set_consent(e,t){"function"==typeof wp_set_consent&&wp_set_consent(e,t)}function cmplz_start_clean(){if(1==complianz.clean_cookies)if((cmplz_cookie_data="undefined"!=typeof Storage?JSON.parse(sessionStorage.getItem("cmplz_cookie_data")):cmplz_cookie_data)&&0!==cmplz_cookie_data.length)cmplz_setup_clean_interval();else{let e=new XMLHttpRequest;e.open("GET",complianz.url+"cookie_data",!0),e.setRequestHeader("Content-type","application/json"),e.send(),e.onload=function(){cmplz_cookie_data=JSON.parse(e.response),sessionStorage.setItem("cmplz_cookie_data",JSON.stringify(cmplz_cookie_data)),cmplz_setup_clean_interval()}}}function cmplz_do_cleanup(){var e;for(e of["preferences","statistics","marketing"])if(!cmplz_has_consent(e)&&cmplz_cookie_data.hasOwnProperty(e)){var t,c,n=cmplz_cookie_data[e];for(t in n)if(!cmplz_has_service_consent(t,e))for(c of n[t])cmplz_clear_cookies(c),cmplz_clear_storage(c)}}function cmplz_setup_clean_interval(){!cmplz_cookie_data||cmplzCleanCookieInterval||(cmplz_do_cleanup(),cmplzCleanCookieInterval=setInterval(cmplz_do_cleanup,1e3))}function cmplz_clear_storage(e){"undefined"!=typeof Storage&&(localStorage.getItem(e)&&localStorage.removeItem(e),sessionStorage.getItem(e))&&sessionStorage.removeItem(e)}function cmplz_load_manage_consent_container(){let c=document.querySelector(".cmplz-manage-consent-container");if(c){let t=new XMLHttpRequest;t.open("GET",complianz.url+"manage_consent_html?"+complianz.locale,!0),t.setRequestHeader("Content-type","application/json"),t.send(),t.onload=function(){var e=JSON.parse(t.response);c.insertAdjacentHTML("beforeend",e),cmplz_sync_category_checkboxes();document.querySelector("#cmplz-manage-consent-container-nojavascript").style.display="none",c.style.display="block";e=new CustomEvent("cmplz_manage_consent_container_loaded");document.dispatchEvent(e)}}}function cmplz_equals(c,n){if("object"!=typeof c||null===c||Array.isArray(c)||"object"!=typeof n||null===n||Array.isArray(n)){if(Array.isArray(c)||(c=Object.keys(c),n=Object.keys(n)),!c||!n)return!1;if(c.length!==n.length)return!1;for(let e=0,t=c.length;e<t;e++)if(c[e]instanceof Array&&n[e]instanceof Array){if(!cmplz_equals(c[e],n[e]))return!1}else if(c[e]!==n[e])return!1}else{var e;for(e of[...new Set([...Object.keys(c),...Object.keys(n)])])if(c[e]!==n[e])return!1}return!0}function cmplzCopyAttributes(e,t){let c=["type","data-service","data-category","async"];Array.from(e.attributes).forEach(e=>{"data-script-type"===e.nodeName&&"module"===e.nodeValue?(t.setAttribute("type","module"),t.removeAttribute("data-script-type")):c.includes(e.nodeName)||t.setAttribute(e.nodeName,e.nodeValue)})}document.addEventListener("visibilitychange",function(){"hidden"===document.visibilityState&&cmplz_track_status_end()}),window.addEventListener("pagehide",cmplz_track_status_end,!1),window.addEventListener("beforeunload",cmplz_track_status_end,!1),document.addEventListener("cmplz_consent_action",function(e){cmplz_set_consent(e.detail.category,"allow"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept",function(e){e.preventDefault(),setTimeout(()=>{cmplz_accept_all(),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()},0)}),cmplz_add_event("click",".cmplz-accept-category, .cmplz-accept-marketing",function(e){e.preventDefault();var e=e.target,t=e.getAttribute("data-service"),e=e.getAttribute("data-category")||"marketing";1==complianz.clean_cookies&&void 0!==t&&t?(cmplz_set_service_consent(t,!0),cmplz_enable_category("","general"),cmplz_enable_category("",t)):cmplz_set_consent(e,"allow"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-accept-service",function(e){var e=e.target;"INPUT"!==e.tagName&&(void 0!==(e=e.getAttribute("data-service"))&&(cmplz_set_service_consent(e,!0),cmplz_enable_category("","general"),cmplz_enable_category("",e)),cmplz_fire_categories_event(),cmplz_track_status())}),cmplz_add_event("change",".cmplz-accept-service",function(e){var t=e.target,c=t.tagName,n=t.getAttribute("data-service");void 0!==n&&("INPUT"===c?(cmplz_set_banner_status("dismissed"),t.checked?(cmplz_set_service_consent(n,!0),cmplz_enable_category("",n)):(cmplz_set_service_consent(n,!1),setTimeout(function(){cmplz_reload_browser_compatible()},500))):(e.preventDefault(),cmplz_set_service_consent(n,!0),cmplz_enable_category("","general"),cmplz_enable_category("",n),setTimeout(function(){cmplz_reload_browser_compatible()},500))),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-save-preferences",function(e){var t,c,n,o,a,e=e.target,l=(cmplz_banner=e.closest(".cmplz-cookiebanner"),[]);for(t in cmplz_categories)cmplz_categories.hasOwnProperty(t)&&(c=cmplz_categories[t],n=cmplz_banner.querySelector("input.cmplz-"+c))&&n.checked&&l.push(c);for(o in cmplz_fire_before_categories_consent(l),cmplz_categories)cmplz_categories.hasOwnProperty(o)&&(a=cmplz_categories[o],l.includes(a)?cmplz_set_consent(a,"allow"):cmplz_set_consent(a,"deny"));cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status()}),cmplz_add_event("click",".cmplz-close",function(){cmplz_set_banner_status("dismissed")}),cmplz_add_event("click",".cmplz-view-preferences",function(e){var e=e.target;(cmplz_banner=e.closest(".cmplz-cookiebanner")).querySelector(".cmplz-categories").classList.contains("cmplz-fade-in")?(cmplz_banner.classList.remove("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.remove("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="block",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="none"):(cmplz_banner.classList.add("cmplz-categories-visible"),cmplz_banner.querySelector(".cmplz-categories").classList.add("cmplz-fade-in"),cmplz_banner.querySelector(".cmplz-view-preferences").style.display="none",cmplz_banner.querySelector(".cmplz-save-preferences").style.display="block",(e=cmplz_banner.querySelector(".cmplz-categories .cmplz-category"))&&(e=e.querySelector("summary"))&&(e.setAttribute("tabindex","0"),e.focus()))}),cmplz_add_event("change",".cmplz-manage-consent-container .cmplz-category",function(){for(var e in cmplz_categories){var t;cmplz_categories.hasOwnProperty(e)&&(e=cmplz_categories[e],t=document.querySelector(".cmplz-manage-consent-container input.cmplz-"+e))&&(t.checked?cmplz_set_consent(e,"allow"):cmplz_set_consent(e,"deny"),cmplz_set_banner_status("dismissed"),cmplz_fire_categories_event(),cmplz_track_status())}}),cmplz_add_event("click",".cmplz-deny",function(e){e.preventDefault(),cmplz_set_banner_status("dismissed"),cmplz_deny_all()}),cmplz_add_event("click","button.cmplz-manage-settings",function(e){e.preventDefault();var e=document.querySelector(".cmplz-cookiebanner .cmplz-categories"),t=document.querySelector(".cmplz-save-settings"),c=document.querySelector("button.cmplz-manage-settings");cmplz_is_hidden(e)?(t.style.display="block",c.style.display="none",e.style.display="block"):(t.style.display="none",c.style.display="block",e.style.display="none")}),cmplz_add_event("click","button.cmplz-manage-consent",function(e){e.preventDefault(),cmplz_set_banner_status("show")}),cmplz_add_event("keypress",".cmplz-banner-slider label",function(e){32==(e.keyCode||e.which)&&document.activeElement.click()}),cmplz_add_event("keypress",".cmplz-cookiebanner .cmplz-header .cmplz-close",function(e){13==(e.keyCode||e.which)&&document.activeElement.click()});let cmplz_has_wp_video=document.querySelector(".cmplz-wp-video-shortcode"),cmplz_times_checked=0;void 0!==window.jQuery&&jQuery(document).ready(function(i){if(cmplz_has_wp_video){document.addEventListener("cmplz_enable_category",function(){t()});let e=setInterval(function(){cmplz_times_checked+=1,document.querySelector(".cmplz-wp-video-shortcode")&&cmplz_times_checked<100?t():clearInterval(e)},500)}function t(){if(document.querySelector(".cmplz-wp-video-shortcode")){var e,t,n,o=cmplz_accepted_categories(),a=cmplz_get_all_service_consents(),l=[];for(e in o)if(o.hasOwnProperty(e)){var r=o[e];if("functional"===r)break;l.push('.cmplz-wp-video-shortcode[data-category="'+r+'"]')}for(t in a)a.hasOwnProperty(t)&&l.push('.cmplz-wp-video-shortcode[data-service="'+t+'"]');n=l.join(",");let c=!1;0<n.length&&document.querySelectorAll(n).forEach(e=>{c=!0,e.setAttribute("controls","controls"),e.classList.add("wp-video-shortcode","cmplz-processed"),e.classList.remove("cmplz-wp-video-shortcode"),e.closest(".cmplz-wp-video").classList.remove("cmplz-wp-video");var t=e.closest(".wp-video").querySelector(".cmplz-blocked-content-notice");t&&t.parentElement.removeChild(t),e.classList.remove("cmplz-blocked-content-container")}),c&&(window.wp.mediaelement?window.wp.mediaelement.initialize():(n={videoWidth:"100%",videoHeight:"100%",enableAutosize:!0},i(".wp-video-shortcode").mediaelementplayer(n)))}}function c(e){e=i(e);"function"==typeof e.parent().fitVids&&e.parent().fitVids()}document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)}),document.addEventListener("cmplz_enable_category",function(){document.querySelectorAll(".cmplz-video.cmplz-activated").forEach(e=>{c(e)})})});
(()=>{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))}))})()})();
(()=>{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=[]}})()})();