(function () { window.MaestraScripts = window.MaestraScripts || {};window.MaestraEndpointSettings = {"viewProductOperationSystemName":"!SdkMethod","viewCategoryOperationSystemName":"!SdkMethod","setCartOperationSystemName":"!SdkMethod","isSessionAllowed":true,"features":{"isNewWebPushDeliveryTrackingEnabled":false,"isNewWebPushClickTrackingEnabled":true,"isNewServiceWorkerRegistrationEnabled":true,"isNewWebPushCustomerActionEnabled":true,"useFirebaseJsSdkV10":true,"useWebpushErrorLogging":false,"useWebpushFirebaseInitializationLogging":true,"useClientScriptsErrorLogging":false,"persoSitePreventAutoErase":true},"botProtection":{"enabled":false,"widgets":[]}};window.MaestraActualEndpointId = "instantfunding.dashboard";window.MindboxActualEndpointId = window.MaestraActualEndpointId;window.MindboxEndpointSettings = window.MaestraEndpointSettings;window.MindboxScripts = window.MaestraScripts;window.maestraCreateCompatibilityTracker && window.maestraCreateCompatibilityTracker(); })(); (function () { window.MaestraScripts.executeStylesCss = function () {const personalizationStyles = document.createElement("style");personalizationStyles.textContent = `@charset "UTF-8";@-webkit-keyframes popmechanic-fadeIn{0%{opacity:0}to{opacity:1}}@keyframes popmechanic-fadeIn{0%{opacity:0}to{opacity:1}}.popmechanic-fadeIn{-webkit-animation-name:popmechanic-fadeIn;animation-name:popmechanic-fadeIn}@-webkit-keyframes popmechanic-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes popmechanic-fadeInDown{0%{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.popmechanic-fadeInDown{-webkit-animation-name:popmechanic-fadeInDown;animation-name:popmechanic-fadeInDown}@-webkit-keyframes popmechanic-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes popmechanic-fadeInLeft{0%{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.popmechanic-fadeInLeft{-webkit-animation-name:popmechanic-fadeInLeft;animation-name:popmechanic-fadeInLeft}@-webkit-keyframes popmechanic-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes popmechanic-fadeInRight{0%{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.popmechanic-fadeInRight{-webkit-animation-name:popmechanic-fadeInRight;animation-name:popmechanic-fadeInRight}@-webkit-keyframes popmechanic-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}@keyframes popmechanic-fadeInUp{0%{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}to{opacity:1;-webkit-transform:translateZ(0);transform:translateZ(0)}}.popmechanic-fadeInUp{-webkit-animation-name:popmechanic-fadeInUp;animation-name:popmechanic-fadeInUp}@-webkit-keyframes popmechanic-fadeOut{0%{opacity:1}to{opacity:0}}@keyframes popmechanic-fadeOut{0%{opacity:1}to{opacity:0}}.popmechanic-fadeOut{-webkit-animation-name:popmechanic-fadeOut;animation-name:popmechanic-fadeOut}@-webkit-keyframes popmechanic-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}@keyframes popmechanic-fadeOutDown{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,100%,0);transform:translate3d(0,100%,0)}}.popmechanic-fadeOutDown{-webkit-animation-name:popmechanic-fadeOutDown;animation-name:popmechanic-fadeOutDown}@-webkit-keyframes popmechanic-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}@keyframes popmechanic-fadeOutLeft{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(-100%,0,0);transform:translate3d(-100%,0,0)}}.popmechanic-fadeOutLeft{-webkit-animation-name:popmechanic-fadeOutLeft;animation-name:popmechanic-fadeOutLeft}@-webkit-keyframes popmechanic-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}@keyframes popmechanic-fadeOutRight{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(100%,0,0);transform:translate3d(100%,0,0)}}.popmechanic-fadeOutRight{-webkit-animation-name:popmechanic-fadeOutRight;animation-name:popmechanic-fadeOutRight}@-webkit-keyframes popmechanic-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}@keyframes popmechanic-fadeOutUp{0%{opacity:1}to{opacity:0;-webkit-transform:translate3d(0,-100%,0);transform:translate3d(0,-100%,0)}}.popmechanic-fadeOutUp{-webkit-animation-name:popmechanic-fadeOutUp;animation-name:popmechanic-fadeOutUp}.popmechanic-animated{-webkit-animation-duration:1s;animation-duration:1s;-webkit-animation-fill-mode:both;animation-fill-mode:both}.popmechanic-animated.popmechanic-infinite{-webkit-animation-iteration-count:infinite;animation-iteration-count:infinite}.popmechanic-animated.popmechanic-delay-1s{-webkit-animation-delay:1s;animation-delay:1s}.popmechanic-animated.popmechanic-delay-2s{-webkit-animation-delay:2s;animation-delay:2s}.popmechanic-animated.popmechanic-delay-3s{-webkit-animation-delay:3s;animation-delay:3s}.popmechanic-animated.popmechanic-delay-4s{-webkit-animation-delay:4s;animation-delay:4s}.popmechanic-animated.popmechanic-delay-5s{-webkit-animation-delay:5s;animation-delay:5s}.popmechanic-animated.popmechanic-fast{-webkit-animation-duration:.8s;animation-duration:.8s}.popmechanic-animated.popmechanic-faster{-webkit-animation-duration:.5s;animation-duration:.5s}.popmechanic-animated.popmechanic-fastest{-webkit-animation-duration:.2s;animation-duration:.2s}.popmechanic-animated.popmechanic-slow{-webkit-animation-duration:2s;animation-duration:2s}.popmechanic-animated.popmechanic-slower{-webkit-animation-duration:3s;animation-duration:3s}@media(prefers-reduced-motion),(print){.popmechanic-animated{-webkit-animation:unset!important;animation:unset!important;-webkit-transition:none!important;transition:none!important}}.popmechanic-disable-scroll{overflow:hidden!important}.popmechanic-auto-height{height:auto!important}.popmechanic-ios-scroll-fix{width:var(--popmechanic-ios-scroll-fix-width, 100vw)}.popmechanic-transition{transition:all .2s}.popmechanic-js-clickable-overlay{position:fixed;inset:0;height:auto;min-height:0;overflow:auto;z-index:100000000}div.popmechanic-close:empty{display:block} `;document.head.appendChild(personalizationStyles);}; window.MaestraScripts.executeFormsJs = function() {!function(){"use strict";var t="1.13.8",e="object"==typeof self&&self.self===self&&self||"object"==typeof global&&global.global===global&&global||Function("return this")()||{},n=Array.prototype,i=Object.prototype,r="undefined"!=typeof Symbol?Symbol.prototype:null,o=n.push,s=n.slice,a=i.toString,c=i.hasOwnProperty,l="undefined"!=typeof ArrayBuffer,u="undefined"!=typeof DataView,d=Array.isArray,h=Object.keys,f=Object.create,m=l&&ArrayBuffer.isView,p=isNaN,g=isFinite,y=!{toString:null}.propertyIsEnumerable("toString"),v=["valueOf","isPrototypeOf","toString","propertyIsEnumerable","hasOwnProperty","toLocaleString"],w=Math.pow(2,53)-1;function b(t,e){return e=null==e?t.length-1:+e,function(){for(var n=Math.max(arguments.length-e,0),i=Array(n),r=0;r=0&&n<=w}}function G(t){return function(e){return null==e?void 0:e[t]}}const V=G("byteLength"),Q=X(V);var J=/\[object ((I|Ui)nt(8|16|32)|Float(32|64)|Uint8Clamped|Big(I|Ui)nt64)Array\]/;const K=l?function(t){return m?m(t)&&!N(t):Q(t)&&J.test(a.call(t))}:W(!1),Z=G("length");function Y(t,e){e=function(t){for(var e={},n=t.length,i=0;i=0))if(i.push(t),o.push(e),n.push(!0),u){if((f=t.length)!==e.length)return!1;for(;f--;)n.push({a:t[f],b:e[f]})}else{var m,p=tt(t);if(f=p.length,tt(e).length!==f)return!1;for(;f--;){if(!B(e,m=p[f]))return!1;n.push({a:t[m],b:e[m]})}}}else i.pop(),o.pop()}return!0}function st(t){if(!_(t))return[];var e=[];for(var n in t)e.push(n);return y&&Y(t,e),e}function at(t){var e=Z(t);return function(n){if(null==n)return!1;var i=st(n);if(Z(i))return!1;for(var r=0;r":">",'"':""","'":"'","`":"`"},Ut=zt(Ht),Wt=zt(wt(Ht)),Xt=nt.templateSettings={evaluate:/<%([\s\S]+?)%>/g,interpolate:/<%=([\s\S]+?)%>/g,escape:/<%-([\s\S]+?)%>/g};var Gt=/(.)^/,Vt={"'":"'","\\":"\\","\r":"r","\n":"n","\u2028":"u2028","\u2029":"u2029"},Qt=/\\|'|\r|\n|\u2028|\u2029/g;function Jt(t){return"\\"+Vt[t]}var Kt=/^\s*(\w|\$)+\s*$/;function Zt(t,e,n){!e&&n&&(e=n),e=kt({},e,nt.templateSettings);var i=RegExp([(e.escape||Gt).source,(e.interpolate||Gt).source,(e.evaluate||Gt).source].join("|")+"|$","g"),r=0,o="__p+='";t.replace(i,function(e,n,i,s,a){return o+=t.slice(r,a).replace(Qt,Jt),r=a+e.length,n?o+="'+\n((__t=("+n+"))==null?'':_.escape(__t))+\n'":i?o+="'+\n((__t=("+i+"))==null?'':__t)+\n'":s&&(o+="';\n"+s+"\n__p+='"),e}),o+="';\n";var s,a=e.variable;if(a){if(!Kt.test(a))throw new Error("variable is not a bare identifier: "+a)}else o="with(obj||{}){\n"+o+"}\n",a="obj";o="var __t,__p='',__j=Array.prototype.join,print=function(){__p+=__j.call(arguments,'');};\n"+o+"return __p;\n";try{s=new Function(a,"_",o)}catch(l){throw l.source=o,l}var c=function(t){return s.call(this,t,nt)};return c.source="function("+a+"){\n"+o+"}",c}var Yt=0;function te(t){var e=++Yt+"";return t?t+e:e}function ee(t,e,n,i,r){if(!(i instanceof e))return t.apply(n,r);var o=Pt(t.prototype),s=t.apply(o,r);return _(s)?s:o}var ne=b(function(t,e){var n=ne.placeholder,i=function(){for(var r=0,o=e.length,s=Array(o),a=0;a=s){if(!a.length)break;var c=a.pop();o=c.i,t=c.v,s=Z(t)}else{var l=t[o++];a.length>=e?i[r++]=l:re(l)&&(L(l)||H(l))?(a.push({i:o,v:t}),o=0,s=Z(t=l)):n||(i[r++]=l)}return i}const se=b(function(t,e){var n=(e=oe(e,!1,!1)).length;if(n<1)throw new Error("bindAll must be passed function names");for(;n--;){var i=e[n];t[i]=ie(t[i],t)}return t});const ae=b(function(t,e,n){return setTimeout(function(){return t.apply(null,n)},e)}),ce=ne(ae,nt,1);function le(t,e,n){var i,r,o,s,a=0;n||(n={});var c=function(){a=!1===n.leading?0:Bt(),i=null,s=t.apply(r,o),i||(r=o=null)},l=function(){var l=Bt();a||!1!==n.leading||(a=l);var u=e-(l-a);return r=this,o=arguments,u<=0||u>e?(i&&(clearTimeout(i),i=null),a=l,s=t.apply(r,o),i||(r=o=null)):i||!1===n.trailing||(i=setTimeout(c,u)),s};return l.cancel=function(){clearTimeout(i),a=0,i=r=o=null},l}function ue(t,e,n){var i,r,o,s,a,c=function(){var l=Bt()-r;e>l?i=setTimeout(c,e-l):(i=null,n||(s=t.apply(a,o)),i||(o=a=null))},l=b(function(l){return a=this,o=l,r=Bt(),i||(i=setTimeout(c,e),n&&(s=t.apply(a,o))),s});return l.cancel=function(){clearTimeout(i),i=o=a=null},l}function de(t){return function(){return!t.apply(this,arguments)}}function he(t,e){var n;return function(){return--t>0&&(n=e.apply(this,arguments)),t<=1&&(e=null),n}}const fe=ne(he,2);function me(t,e,n){e=Dt(e,n);for(var i,r=tt(t),o=0,s=r.length;o0?0:r-1;o>=0&&o0?a=o>=0?o:Math.max(o+c,a):c=o>=0?Math.min(o+1,c):o+c+1;else if(n&&o&&c)return i[o=n(i,r)]===r?o:-1;if(r!=r)return(o=e(s.call(i,a,c),U))>=0?o+a:-1;for(o=t>0?a:c-1;o>=0&&o=3;return function(e,n,i,r){var o=!re(e)&&tt(e),s=(o||e).length,a=t>0?0:s-1;for(r||(i=e[o?o[a]:a],a+=t);a>=0&&a=0}const Oe=b(function(t,e,n){var i,r;return A(e)?r=e:(e=xt(e),i=e.slice(0,-1),e=e[e.length-1]),ke(t,function(t){var o=r;if(!o){if(i&&i.length&&(t=Tt(t,i)),null==t)return;o=t[e]}return null==o?o:o.apply(t,n)})});function Fe(t,e){return ke(t,Ft(e))}function Ae(t,e,n){var i,r,o=-1/0,s=-1/0;if(null==e||"number"==typeof e&&"object"!=typeof t[0]&&null!=t)for(var a=0,c=(t=re(t)?t:vt(t)).length;ao&&(o=i);else e=Dt(e,n),Ie(t,function(t,n,i){((r=e(t,n,i))>s||r===-1/0&&o===-1/0)&&(o=t,s=r)});return o}var Me=/[^\ud800-\udfff]|[\ud800-\udbff][\udc00-\udfff]|[\ud800-\udfff]/g;function je(t){return t?L(t)?s.call(t):P(t)?t.match(Me):re(t)?ke(t,Rt):vt(t):[]}function De(t,e,n){if(null==e||n)return re(t)||(t=vt(t)),t[Lt(t.length-1)];var i=je(t),r=Z(i);e=Math.max(Math.min(e,r),0);for(var o=r-1,s=0;s1&&(i=At(i,e[1])),e=st(t)):(i=He,e=oe(e,!1,!1),t=Object(t));for(var r=0,o=e.length;r1&&(n=e[1])):(e=ke(oe(e,!1,!1),String),i=function(t,n){return!Re(e,n)}),Ue(t,i,n)});function Xe(t,e,n){return s.call(t,0,Math.max(0,t.length-(null==e||n?1:e)))}function Ge(t,e,n){return null==t||t.length<1?null==e||n?void 0:[]:null==e||n?t[0]:Xe(t,t.length-e)}function Ve(t,e,n){return s.call(t,null==e||n?1:e)}const Qe=b(function(t,e){return e=oe(e,!0,!0),xe(t,function(t){return!Re(e,t)})}),Je=b(function(t,e){return Qe(t,e)});function Ke(t,e,n,i){I(e)||(i=n,n=e,e=!1),null!=n&&(n=Dt(n,i));for(var r=[],o=[],s=0,a=Z(t);si||void 0===n)return 1;if(n/,$n=/^\w+$/;function Rn(t,e){const n=!!(i=e)&&11===i.nodeType;var i;return t&&(n||Dn(e)||qn(e))?!n&&xn.test(t)?e.getElementsByClassName(t.slice(1).replace(/\\/g,"")):!n&&$n.test(t)?e.getElementsByTagName(t):e.querySelectorAll(t):[]}class On{constructor(t,e){if(!t)return;if(Mn(t))return t;let n=t;if(Ln(t)){const i=e||ln;if(n=En.test(t)&&Dn(i)?i.getElementById(t.slice(1).replace(/\\/g,"")):Tn.test(t)?si(t):Mn(i)?i.find(t):Ln(i)?An(i).find(t):Rn(t,i),!n)return}else if(Nn(t))return this.ready(t);(n.nodeType||n===un)&&(n=[n]),this.length=n.length;for(let i=0,r=this.length;i{for(;e.firstChild;)e.removeChild(e.firstChild)})},An.extend=Xn,Fn.extend=function(t){return Xn(Fn,t)};const Gn=/\S+/g;function Vn(t){return Ln(t)&&t.match(Gn)||[]}function Qn(t,e,n){if(!qn(t))return;const i=un.getComputedStyle(t,null);return n?i.getPropertyValue(e)||void 0:i[e]||t.style[e]}function Jn(t,e){return parseInt(Qn(t,e),10)||0}function Kn(t,e){return Jn(t,`border${e?"Left":"Top"}Width`)+Jn(t,"padding"+(e?"Left":"Top"))+Jn(t,"padding"+(e?"Right":"Bottom"))+Jn(t,`border${e?"Right":"Bottom"}Width`)}Fn.toggleClass=function(t,e){const n=Vn(t),i=!Bn(e);return this.each((t,r)=>{qn(r)&&Wn(n,(t,n)=>{i?e?r.classList.add(n):r.classList.remove(n):r.classList.toggle(n)})})},Fn.addClass=function(t){return this.toggleClass(t,!0)},Fn.removeAttr=function(t){const e=Vn(t);return this.each((t,n)=>{qn(n)&&Wn(e,(t,e)=>{n.removeAttribute(e)})})},Fn.attr=function(t,e){if(t){if(Ln(t)){if(arguments.length<2){if(!this[0]||!qn(this[0]))return;const e=this[0].getAttribute(t);return zn(e)?void 0:e}return Bn(e)?this:zn(e)?this.removeAttr(t):this.each((n,i)=>{qn(i)&&i.setAttribute(t,e)})}for(const e in t)this.attr(e,t[e]);return this}},Fn.removeClass=function(t){return arguments.length?this.toggleClass(t,!1):this.attr("class","")},Fn.hasClass=function(t){return!!t&&Pn.call(this,e=>qn(e)&&e.classList.contains(t))},Fn.get=function(t){return Bn(t)?kn.call(this):this[(t=Number(t))<0?t+this.length:t]},Fn.eq=function(t){return An(this.get(t))},Fn.first=function(){return this.eq(0)},Fn.last=function(){return this.eq(-1)},Fn.text=function(t){return Bn(t)?this.get().map(t=>{return qn(t)||(e=t)&&3===e.nodeType?t.textContent:"";var e}).join(""):this.each((e,n)=>{qn(n)&&(n.textContent=t)})};const Zn={};function Yn(t){return"none"===Qn(t,"display")}function ti(t,e){const n=t&&(t.matches||t.webkitMatchesSelector||t.msMatchesSelector);return!!n&&!!e&&n.call(t,e)}function ei(t){return Ln(t)?(e,n)=>ti(n,t):Nn(t)?t:Mn(t)?(e,n)=>t.is(n):t?(e,n)=>n===t:()=>!1}function ni(t,e){return e?t.filter(e):t}Fn.filter=function(t){const e=ei(t);return An(bn.call(this,(t,n)=>e.call(t,n,t)))},Fn.detach=function(t){return ni(this,t).each((t,e)=>{e.parentNode&&e.parentNode.removeChild(e)}),this};const ii=/^\s*<(\w+)[^>]*>/,ri=/^<(\w+)\s*\/?>(?:<\/\1>)?$/,oi={"*":fn,tr:pn,td:gn,th:gn,thead:mn,tbody:mn,tfoot:mn};function si(t){if(!Ln(t))return[];if(ri.test(t))return[hn(RegExp.$1)];const e=ii.test(t)&&RegExp.$1,n=oi[e]||oi["*"];return n.innerHTML=t,An(n.childNodes).detach().get()}function ai(t,e,n,i){const r=[],o=Nn(e),s=i&&ei(i);for(let a=0,c=t.length;at.selected&&!t.disabled&&!t.parentNode.disabled),"value"):t.value||""}function li(t){return t.length>1?bn.call(t,(t,e,n)=>_n.call(n,t)===e):t}An.parseHTML=si,Fn.has=function(t){const e=Ln(t)?(e,n)=>Rn(t,n).length:(e,n)=>n.contains(t);return this.filter(e)},Fn.not=function(t){const e=ei(t);return this.filter((n,i)=>(!Ln(t)||qn(i))&&!e.call(i,n,i))},Fn.val=function(t){return arguments.length?this.each((e,n)=>{const i=n.multiple&&n.options;if(i||Bi.test(n.type)){const e=yn(t)?Sn.call(t,String):zn(t)?[]:[String(t)];i?Wn(n.options,(t,n)=>{n.selected=e.indexOf(n.value)>=0},!0):n.checked=e.indexOf(n.value)>=0}else n.value=Bn(t)||zn(t)?"":t}):this[0]&&ci(this[0])},Fn.is=function(t){const e=ei(t);return Pn.call(this,(t,n)=>e.call(t,n,t))},An.guid=1,An.unique=li,Fn.add=function(t,e){return An(li(this.get().concat(An(t,e).get())))},Fn.children=function(t){return ni(An(li(ai(this,t=>t.children))),t)},Fn.parent=function(t){return ni(An(li(ai(this,"parentNode"))),t)},Fn.index=function(t){const e=t?An(t)[0]:this[0],n=t?this:An(e).parent().children();return _n.call(n,e)},Fn.closest=function(t){const e=this.filter(t);if(e.length)return e;const n=this.parent();return n.length?n.closest(t):e},Fn.siblings=function(t){return ni(An(li(ai(this,t=>An(t).parent().children().not(t)))),t)},Fn.find=function(t){return An(li(ai(this,e=>Rn(t,e))))};const ui=/^\s*\s*$/g,di=/^$|^module$|\/(java|ecma)script/i,hi=["type","src","nonce","noModule"];function fi(t,e,n,i,r){i?t.insertBefore(e,n?t.firstChild:null):"HTML"===t.nodeName?t.parentNode.replaceChild(e,t):t.parentNode.insertBefore(e,n?t:t.nextSibling),r&&function(t,e){const n=An(t);n.filter("script").add(n.find("script")).each((t,n)=>{if(di.test(n.type)&&dn.contains(n)){const t=hn("script");t.text=n.textContent.replace(ui,""),Wn(hi,(e,i)=>{n[i]&&(t[i]=n[i])}),e.head.insertBefore(t,null),e.head.removeChild(t)}})}(e,t.ownerDocument)}function mi(t,e,n,i,r,o,s,a){return Wn(t,(t,o)=>{Wn(An(o),(t,o)=>{Wn(An(e),(e,s)=>{const a=n?s:o,c=n?t:e;fi(n?o:s,c?a.cloneNode(!0):a,i,r,!c)},a)},s)},o),e}Fn.after=function(){return mi(arguments,this,!1,!1,!1,!0,!0)},Fn.append=function(){return mi(arguments,this,!1,!1,!0)},Fn.html=function(t){if(!arguments.length)return this[0]&&this[0].innerHTML;if(Bn(t))return this;const e=/]/.test(t);return this.each((n,i)=>{qn(i)&&(e?An(i).empty().append(t):i.innerHTML=t)})},Fn.appendTo=function(t){return mi(arguments,this,!0,!1,!0)},Fn.wrapInner=function(t){return this.each((e,n)=>{const i=An(n),r=i.contents();r.length?r.wrapAll(t):i.append(t)})},Fn.before=function(){return mi(arguments,this,!1,!0)},Fn.wrapAll=function(t){let e=An(t),n=e[0];for(;n.children.length;)n=n.firstElementChild;return this.first().before(e),this.appendTo(n)},Fn.wrap=function(t){return this.each((e,n)=>{const i=An(t)[0];An(n).wrapAll(e?i.cloneNode(!0):i)})},Fn.insertAfter=function(t){return mi(arguments,this,!0,!1,!1,!1,!1,!0)},Fn.insertBefore=function(t){return mi(arguments,this,!0,!0)},Fn.prepend=function(){return mi(arguments,this,!1,!0,!0,!0,!0)},Fn.prependTo=function(t){return mi(arguments,this,!0,!0,!0,!1,!1,!0)},Fn.contents=function(){return An(li(ai(this,t=>"IFRAME"===t.tagName?[t.contentDocument]:"TEMPLATE"===t.tagName?t.content.childNodes:t.childNodes)))},Fn.next=function(t,e,n){return ni(An(li(ai(this,"nextElementSibling",e,n))),t)},Fn.nextAll=function(t){return this.next(t,!0)},Fn.nextUntil=function(t,e){return this.next(e,!0,t)},Fn.parents=function(t,e){return ni(An(li(ai(this,"parentElement",!0,e))),t)},Fn.parentsUntil=function(t,e){return this.parents(e,t)},Fn.prev=function(t,e,n){return ni(An(li(ai(this,"previousElementSibling",e,n))),t)},Fn.prevAll=function(t){return this.prev(t,!0)},Fn.prevUntil=function(t,e){return this.prev(e,!0,t)},Fn.map=function(t){return An(wn.apply([],Sn.call(this,(e,n)=>t.call(e,n,e))))},Fn.clone=function(){return this.map((t,e)=>e.cloneNode(!0))},Fn.offsetParent=function(){return this.map((t,e)=>{let n=e.offsetParent;for(;n&&"static"===Qn(n,"position");)n=n.offsetParent;return n||dn})},Fn.slice=function(t,e){return An(kn.call(this,t,e))};const pi=/-([a-z])/g;function gi(t){return t.replace(pi,(t,e)=>e.toUpperCase())}Fn.ready=function(t){const e=()=>setTimeout(t,0,An);return"loading"!==ln.readyState?e():ln.addEventListener("DOMContentLoaded",e),this},Fn.unwrap=function(){return this.parent().each((t,e)=>{if("BODY"===e.tagName)return;const n=An(e);n.replaceWith(n.children())}),this},Fn.offset=function(){const t=this[0];if(!t)return;const e=t.getBoundingClientRect();return{top:e.top+un.pageYOffset,left:e.left+un.pageXOffset}},Fn.position=function(){const t=this[0];if(!t)return;const e="fixed"===Qn(t,"position"),n=e?t.getBoundingClientRect():this.offset();if(!e){const e=t.ownerDocument;let i=t.offsetParent||e.documentElement;for(;(i===e.body||i===e.documentElement)&&"static"===Qn(i,"position");)i=i.parentNode;if(i!==t&&qn(i)){const t=An(i).offset();n.top-=t.top+Jn(i,"borderTopWidth"),n.left-=t.left+Jn(i,"borderLeftWidth")}}return{top:n.top-Jn(t,"marginTop"),left:n.left-Jn(t,"marginLeft")}};const yi={class:"className",contenteditable:"contentEditable",for:"htmlFor",readonly:"readOnly",maxlength:"maxLength",tabindex:"tabIndex",colspan:"colSpan",rowspan:"rowSpan",usemap:"useMap"};Fn.prop=function(t,e){if(t){if(Ln(t))return t=yi[t]||t,arguments.length<2?this[0]&&this[0][t]:this.each((n,i)=>{i[t]=e});for(const e in t)this.prop(e,t[e]);return this}},Fn.removeProp=function(t){return this.each((e,n)=>{delete n[yi[t]||t]})};const vi=/^--/;function wi(t){return vi.test(t)}const bi={},{style:_i}=fn,Si=["webkit","moz","ms"];const Ii={animationIterationCount:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,widows:!0,zIndex:!0};function ki(t,e,n=wi(t)){return n||Ii[t]||!Hn(e)?e:`${e}px`}function Pi(t,e){try{return t(e)}catch(n){return e}}Fn.css=function(t,e){if(Ln(t)){const n=wi(t);return t=function(t,e=wi(t)){if(e)return t;if(!bi[t]){const e=gi(t),n=`${e[0].toUpperCase()}${e.slice(1)}`;Wn(`${e} ${Si.join(`${n} `)}${n}`.split(" "),(e,n)=>{if(n in _i)return bi[t]=n,!1})}return bi[t]}(t,n),arguments.length<2?this[0]&&Qn(this[0],t,n):t?(e=ki(t,e,n),this.each((i,r)=>{qn(r)&&(n?r.style.setProperty(t,e):r.style[t]=e)})):this}for(const n in t)this.css(n,t[n]);return this};const Ci=/^\s+|\s+$/;function Ei(t,e){const n=t.dataset[e]||t.dataset[gi(e)];return Ci.test(n)?n:Pi(JSON.parse,n)}function xi(t,e){const n=t.documentElement;return Math.max(t.body[`scroll${e}`],n[`scroll${e}`],t.body[`offset${e}`],n[`offset${e}`],n[`client${e}`])}Fn.data=function(t,e){if(!t){if(!this[0])return;const t={};for(const e in this[0].dataset)t[e]=Ei(this[0],e);return t}if(Ln(t))return arguments.length<2?this[0]&&Ei(this[0],t):Bn(e)?this:this.each((n,i)=>{!function(t,e,n){n=Pi(JSON.stringify,n),t.dataset[gi(e)]=n}(i,t,e)});for(const n in t)this.data(n,t[n]);return this},Wn([!0,!1],(t,e)=>{Wn(["Width","Height"],(t,n)=>{Fn[`${e?"outer":"inner"}${n}`]=function(i){if(this[0])return jn(this[0])?e?this[0][`inner${n}`]:this[0].document.documentElement[`client${n}`]:Dn(this[0])?xi(this[0],n):this[0][`${e?"offset":"client"}${n}`]+(i&&e?Jn(this[0],"margin"+(t?"Top":"Left"))+Jn(this[0],"margin"+(t?"Bottom":"Right")):0)}})}),Wn(["Width","Height"],(t,e)=>{const n=e.toLowerCase();Fn[n]=function(i){if(!this[0])return Bn(i)?void 0:this;if(!arguments.length)return jn(this[0])?this[0].document.documentElement[`client${e}`]:Dn(this[0])?xi(this[0],e):this[0].getBoundingClientRect()[n]-Kn(this[0],!t);const r=parseInt(i,10);return this.each((e,i)=>{if(!qn(i))return;const o=Qn(i,"boxSizing");i.style[n]=ki(n,r+("border-box"===o?Kn(i,!t):0))})}});const Ti="___cd";Fn.toggle=function(t){return this.each((e,n)=>{if(!qn(n))return;const i=Yn(n);(Bn(t)?i:t)?(n.style.display=n[Ti]||"",Yn(n)&&(n.style.display=function(t){if(Zn[t])return Zn[t];const e=hn(t);ln.body.insertBefore(e,null);const n=Qn(e,"display");return ln.body.removeChild(e),Zn[t]="none"!==n?n:"block"}(n.tagName))):i||(n[Ti]=Qn(n,"display"),n.style.display="none")})},Fn.hide=function(){return this.toggle(!1)},Fn.show=function(){return this.toggle(!0)};const $i="___ce",Ri={focus:"focusin",blur:"focusout"},Oi={mouseenter:"mouseover",mouseleave:"mouseout"},Fi=/^(mouse|pointer|contextmenu|drag|drop|click|dblclick)/i;function Ai(t){return Oi[t]||Ri[t]||t}function Mi(t){const e=t.split(".");return[e[0],e.slice(1).sort()]}function ji(t){return t[$i]=t[$i]||{}}function Di(t,e){return!e||!Pn.call(e,e=>t.indexOf(e)<0)}function qi(t,e,n,i,r){const o=ji(t);if(e)o[e]&&(o[e]=o[e].filter(([o,s,a])=>{if(r&&a.guid!==r.guid||!Di(o,n)||i&&i!==s)return!0;t.removeEventListener(e,a)}));else for(e in o)qi(t,e,n,i,r)}Fn.trigger=function(t,e){if(Ln(t)){const[e,n]=Mi(t),i=Ai(e);if(!i)return this;const r=Fi.test(i)?"MouseEvents":"HTMLEvents";(t=ln.createEvent(r)).initEvent(i,!0,!0),t.namespace=n.join("."),t.___ot=e}t.___td=e;const n=t.___ot in Ri;return this.each((e,i)=>{n&&Nn(i[t.___ot])&&(i[`___i${t.type}`]=!0,i[t.___ot](),i[`___i${t.type}`]=!1),i.dispatchEvent(t)})},Fn.off=function(t,e,n){if(Bn(t))this.each((t,e)=>{(qn(e)||Dn(e)||jn(e))&&qi(e)});else if(Ln(t))Nn(e)&&(n=e,e=""),Wn(Vn(t),(t,i)=>{const[r,o]=Mi(i),s=Ai(r);this.each((t,i)=>{(qn(i)||Dn(i)||jn(i))&&qi(i,s,o,e,n)})});else for(const i in t)this.off(i,t[i]);return this},Fn.remove=function(t){return ni(this,t).detach().off(),this},Fn.replaceWith=function(t){return this.before(t).remove()},Fn.replaceAll=function(t){return An(t).replaceWith(this),this},Fn.on=function(t,e,n,i,r){if(!Ln(t)){for(const i in t)this.on(i,e,n,t[i],r);return this}return Ln(e)||(Bn(e)||zn(e)?e="":Bn(n)?(n=e,e=""):(i=n,n=e,e="")),Nn(i)||(i=n,n=void 0),i?(Wn(Vn(t),(t,o)=>{const[s,a]=Mi(o),c=Ai(s),l=s in Oi,u=s in Ri;c&&this.each((t,o)=>{if(!qn(o)&&!Dn(o)&&!jn(o))return;const s=function(t){if(t.target[`___i${t.type}`])return t.stopImmediatePropagation();if(t.namespace&&!Di(a,t.namespace.split(".")))return;if(!e&&(u&&(t.target!==o||t.___ot===c)||l&&t.relatedTarget&&o.contains(t.relatedTarget)))return;let d=o;if(e){let n=t.target;for(;!ti(n,e);){if(n===o)return;if(n=n.parentNode,!n)return}d=n}Object.defineProperty(t,"currentTarget",{configurable:!0,get:()=>d}),Object.defineProperty(t,"delegateTarget",{configurable:!0,get:()=>o}),Object.defineProperty(t,"data",{configurable:!0,get:()=>n});const h=i.call(d,t,t.___td);r&&qi(o,c,a,e,s),!1===h&&(t.preventDefault(),t.stopPropagation())};s.guid=i.guid=i.guid||An.guid++,function(t,e,n,i,r){const o=ji(t);o[e]=o[e]||[],o[e].push([n,i,r]),t.addEventListener(e,r)}(o,c,a,e,s)})}),this):this},Fn.one=function(t,e,n,i){return this.on(t,e,n,i,!0)};const Ni=/\r?\n/g;const Li=/file|reset|submit|button|image/i,Bi=/radio|checkbox/i;Fn.serialize=function(){let t="";return this.each((e,n)=>{Wn(n.elements||[n],(e,n)=>{if(n.disabled||!n.name||"FIELDSET"===n.tagName||Li.test(n.type)||Bi.test(n.type)&&!n.checked)return;const i=ci(n);if(!Bn(i)){Wn(yn(i)?i:[i],(e,i)=>{t+=function(t,e){return`&${encodeURIComponent(t)}=${encodeURIComponent(e.replace(Ni,"\r\n"))}`}(n.name,i)})}})}),t.slice(1)},An.parseJSON=JSON?JSON.parse:()=>{},An.inArray=function(t,e,n){return[].indexOf.call(e,t,n)};const zi={};An.each("Boolean Number String Function Array Date RegExp Object Error".split(" "),function(t,e){zi["[object "+e+"]"]=e.toLowerCase()}),An.type=function(t){return null==t?String(t):zi[toString.call(t)]||"object"},An.contains=document.documentElement.contains?function(t,e){return t!==e&&t.contains(e)}:function(t,e){for(;e&&(e=e.parentNode);)if(e===t)return!0;return!1},An.fn.filterVisible=function(){return this.filter(function(t,e){const n=An(e).css("visibility"),i=An(e).css("display"),r=parseInt(An(e).css("opacity"),10);return"hidden"!==n&&"none"!==i&&r>0})},An.fn.animate=function(t,e){const n=this;return n.addClass("popmechanic-transition"),n.css(t),setTimeout(function(){n.removeClass("popmechanic-transition"),"function"==typeof e&&e.call(n)},cn.ANIMATION_SPEED),n},An.data=function(t,e,n){return An(t).data(e,n)},An.noop=function(){},function(t){var e,n=1,i=Array.prototype.slice,r=t.isFunction,o=function(t){return"string"==typeof t},s={},a={},c="onfocusin"in window,l={focus:"focusin",blur:"focusout"},u={mouseenter:"mouseover",mouseleave:"mouseout"};function d(t){return t._zid||(t._zid=n++)}function h(t,e,n,i){if((e=f(e)).ns)var r=(o=e.ns,new RegExp("(?:^| )"+o.replace(" "," .* ?")+"(?: |$)"));var o;return(s[d(t)]||[]).filter(function(t){return t&&(!e.e||t.e==e.e)&&(!e.ns||r.test(t.ns))&&(!n||d(t.fn)===d(n))&&(!i||t.sel==i)})}function f(t){var e=(""+t).split(".");return{e:e[0],ns:e.slice(1).sort().join(" ")}}function m(t,e){return t.del&&!c&&t.e in l||!!e}function p(t){return u[t]||c&&l[t]||t}function g(n,i,r,o,a,c,l){var h=d(n),g=s[h]||(s[h]=[]);i.split(/\s/).forEach(function(i){if("ready"==i)return t(document).ready(r);var s=f(i);s.fn=r,s.sel=a,s.e in u&&(r=function(e){var n=e.relatedTarget;if(!n||n!==this&&!t.contains(this,n))return s.fn.apply(this,arguments)}),s.del=c;var d=c||r;s.proxy=function(t){if((t=S(t)).isImmediatePropagationStopped&&!t.isImmediatePropagationStopped()){t.data=o;var i=d.apply(n,t._args==e?[t]:[t].concat(t._args));return!1===i&&(t.preventDefault(),t.stopPropagation()),i}},s.i=g.length,g.push(s),"addEventListener"in n&&n.addEventListener(p(s.e),s.proxy,m(s,l))})}function y(t,e,n,i,r){var o=d(t);(e||"").split(/\s/).forEach(function(e){h(t,e,n,i).forEach(function(e){delete s[o][e.i],"removeEventListener"in t&&t.removeEventListener(p(e.e),e.proxy,m(e,r))})})}a.click=a.mousedown=a.mouseup=a.mousemove="MouseEvents",t.event={add:g,remove:y},t.proxy=function(e,n){var s=2 in arguments&&i.call(arguments,2);if(r(e)){var a=function(){return e.apply(n,s?s.concat(i.call(arguments)):arguments)};return a._zid=d(e),a}if(o(n))return s?(s.unshift(e[n],e),t.proxy.apply(null,s)):t.proxy(e[n],e);throw new TypeError("expected function")},t.fn.bind=function(t,e,n){return this.on(t,e,n)},t.fn.unbind=function(t,e){return this.off(t,e)},t.fn.one=function(t,e,n,i){return this.on(t,e,n,i,1)};var v=function(){return!0},w=function(){return!1},b=/^([A-Z]|returnValue$|layer[XY]$|webkitMovement[XY]$)/,_={preventDefault:"isDefaultPrevented",stopImmediatePropagation:"isImmediatePropagationStopped",stopPropagation:"isPropagationStopped"};function S(n,i){if(i||!n.isDefaultPrevented){i||(i=n),t.each(_,function(t,e){var r=i[t];n[t]=function(){return this[e]=v,r&&r.apply(i,arguments)},n[e]=w});try{n.timeStamp||(n.timeStamp=Date.now())}catch(r){}(i.defaultPrevented!==e?i.defaultPrevented:"returnValue"in i?!1===i.returnValue:i.getPreventDefault&&i.getPreventDefault())&&(n.isDefaultPrevented=v)}return n}function I(t){var n,i={originalEvent:t};for(n in t)b.test(n)||t[n]===e||(i[n]=t[n]);return S(i,t)}t.fn.delegate=function(t,e,n){return this.on(e,t,n)},t.fn.undelegate=function(t,e,n){return this.off(e,t,n)},t.fn.live=function(e,n){return t(document.body).delegate(this.selector,e,n),this},t.fn.die=function(e,n){return t(document.body).undelegate(this.selector,e,n),this},t.fn.on=function(n,s,a,c,l){var u,d,h=this;return n&&!o(n)?(t.each(n,function(t,e){h.on(t,s,a,e,l)}),h):(o(s)||r(c)||!1===c||(c=a,a=s,s=e),c!==e&&!1!==a||(c=a,a=e),!1===c&&(c=w),h.each(function(e,r){l&&(u=function(t){return y(r,t.type,c),c.apply(this,arguments)}),s&&(d=function(e){var n,o=t(e.target).closest(s,r).get(0);if(o&&o!==r)return n=t.extend(I(e),{currentTarget:o,liveFired:r}),(u||c).apply(o,[n].concat(i.call(arguments,1)))}),g(r,n,c,a,s,d||u)}))},t.fn.off=function(n,i,s){var a=this;return n&&!o(n)?(t.each(n,function(t,e){a.off(t,i,e)}),a):(o(i)||r(s)||!1===s||(s=i,i=e),!1===s&&(s=w),a.each(function(){y(this,n,s,i)}))},t.fn.trigger=function(e,n){return(e=o(e)||t.isPlainObject(e)?t.Event(e):S(e))._args=n,this.each(function(){e.type in l&&"function"==typeof this[e.type]?this[e.type]():"dispatchEvent"in this?this.dispatchEvent(e):t(this).triggerHandler(e,n)})},t.fn.triggerHandler=function(e,n){var i,r;return this.each(function(s,a){(i=I(o(e)?t.Event(e):e))._args=n,i.target=a,t.each(h(a,e.type||e),function(t,e){if(r=e.proxy(i),i.isImmediatePropagationStopped())return!1})}),r},"focusin focusout focus blur load resize scroll unload click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select keydown keypress keyup error".split(" ").forEach(function(e){t.fn[e]=function(t){return 0 in arguments?this.bind(e,t):this.trigger(e)}}),t.Event=function(t,e){o(t)||(t=(e=t).type);var n=document.createEvent(a[t]||"Events"),i=!0;if(e)for(var r in e)"bubbles"==r?i=!!e[r]:n[r]=e[r];return n.initEvent(t,i,!0),S(n)}}(An),function(t){var e,n,i=+new Date,r=window.document,o=/)<[^<]*)*<\/script>/gi,s=/^(?:text|application)\/javascript/i,a=/^(?:text|application)\/xml/i,c="application/json",l="text/html",u=/^\s*$/,d=r.createElement("a");function h(e,n,i,o){if(e.global)return function(e,n,i){var r=t.Event(n);return t(e).trigger(r,i),!r.isDefaultPrevented()}(n||r,i,o)}function f(t,e){var n=e.context;if(!1===e.beforeSend.call(n,t,e)||!1===h(e,n,"ajaxBeforeSend",[t,e]))return!1;h(e,n,"ajaxSend",[t,e])}function m(t,e,n,i){var r=n.context,o="success";n.success.call(r,t,o,e),i&&i.resolveWith(r,[t,o,e]),h(n,r,"ajaxSuccess",[e,n,t]),g(o,e,n)}function p(t,e,n,i,r){var o=i.context;i.error.call(o,n,e,t),r&&r.rejectWith(o,[n,e,t]),h(i,o,"ajaxError",[n,i,t||e]),g(e,n,i)}function g(e,n,i){var r=i.context;i.complete.call(r,n,e),h(i,r,"ajaxComplete",[n,i]),function(e){e.global&&! --t.active&&h(e,null,"ajaxStop")}(i)}function y(){}function v(t,e){return""==e?t:(t+"&"+e).replace(/[&?]{1,2}/,"?")}function w(e,n,i,r){return t.isFunction(n)&&(r=i,i=n,n=void 0),t.isFunction(i)||(r=i,i=void 0),{url:e,data:n,success:i,dataType:r}}d.href=window.location.href,t.active=0,t.ajaxJSONP=function(e,n){if(!("type"in e))return t.ajax(e);var o,s,a=e.jsonpCallback,c=(t.isFunction(a)?a():a)||"Zepto"+i++,l=r.createElement("script"),u=window[c],d=function(e){t(l).triggerHandler("error",e||"abort")},h={abort:d};return n&&n.promise(h),t(l).on("load error",function(i,r){clearTimeout(s),t(l).off().remove(),"error"!=i.type&&o?m(o[0],h,e,n):p(null,r||"error",h,e,n),window[c]=u,o&&t.isFunction(u)&&u(o[0]),u=o=void 0}),!1===f(h,e)?(d("abort"),h):(window[c]=function(){o=arguments},l.src=e.url.replace(/\?(.+)=\?/,"?$1="+c),r.head.appendChild(l),e.timeout>0&&(s=setTimeout(function(){d("timeout")},e.timeout)),h)},t.ajaxSettings={type:"GET",beforeSend:y,success:y,error:y,complete:y,context:null,global:!0,xhr:function(){return new window.XMLHttpRequest},accepts:{script:"text/javascript, application/javascript, application/x-javascript",json:c,xml:"application/xml, text/xml",html:l,text:"text/plain"},crossDomain:!1,timeout:0,processData:!0,cache:!0,dataFilter:y},t.ajax=function(i){var o,g,w=t.extend({},i||{}),b=t.Deferred&&t.Deferred();for(e in t.ajaxSettings)void 0===w[e]&&(w[e]=t.ajaxSettings[e]);!function(e){e.global&&0===t.active++&&h(e,null,"ajaxStart")}(w),w.crossDomain||((o=r.createElement("a")).href=w.url,o.href=o.href,w.crossDomain=d.protocol+"//"+d.host!=o.protocol+"//"+o.host),w.url||(w.url=window.location.toString()),(g=w.url.indexOf("#"))>-1&&(w.url=w.url.slice(0,g)),function(e){e.processData&&e.data&&"string"!=t.type(e.data)&&(e.data=t.param(e.data,e.traditional)),!e.data||e.type&&"GET"!=e.type.toUpperCase()&&"jsonp"!=e.dataType||(e.url=v(e.url,e.data),e.data=void 0)}(w);var _=w.dataType,S=/\?.+=\?/.test(w.url);if(S&&(_="jsonp"),!1!==w.cache&&(i&&!0===i.cache||"script"!=_&&"jsonp"!=_)||(w.url=v(w.url,"_="+Date.now())),"jsonp"==_)return S||(w.url=v(w.url,w.jsonp?w.jsonp+"=?":!1===w.jsonp?"":"callback=?")),t.ajaxJSONP(w,b);var I,k=w.accepts[_],P={},C=function(t,e){P[t.toLowerCase()]=[t,e]},E=/^([\w-]+:)\/\//.test(w.url)?RegExp.$1:window.location.protocol,x=w.xhr(),T=x.setRequestHeader;if(b&&b.promise(x),w.crossDomain||C("X-Requested-With","XMLHttpRequest"),C("Accept",k||"*/*"),(k=w.mimeType||k)&&(k.indexOf(",")>-1&&(k=k.split(",",2)[0]),x.overrideMimeType&&x.overrideMimeType(k)),(w.contentType||!1!==w.contentType&&w.data&&"GET"!=w.type.toUpperCase())&&C("Content-Type",w.contentType||"application/x-www-form-urlencoded"),w.headers)for(n in w.headers)C(n,w.headers[n]);if(x.setRequestHeader=C,x.onreadystatechange=function(){if(4==x.readyState){x.onreadystatechange=y,clearTimeout(I);var e,n=!1;if(x.status>=200&&x.status<300||304==x.status||0==x.status&&"file:"==E){if(_=_||function(t){return t&&(t=t.split(";",2)[0]),t&&(t==l?"html":t==c?"json":s.test(t)?"script":a.test(t)&&"xml")||"text"}(w.mimeType||x.getResponseHeader("content-type")),"arraybuffer"==x.responseType||"blob"==x.responseType)e=x.response;else{e=x.responseText;try{e=function(t,e,n){if(n.dataFilter==y)return t;var i=n.context;return n.dataFilter.call(i,t,e)}(e,_,w),"script"==_?(0,eval)(e):"xml"==_?e=x.responseXML:"json"==_&&(e=u.test(e)?null:t.parseJSON(e))}catch(i){n=i}if(n)return p(n,"parsererror",x,w,b)}m(e,x,w,b)}else p(x.statusText||null,x.status?"error":"abort",x,w,b)}},!1===f(x,w))return x.abort(),p(null,"abort",x,w,b),x;var $=!("async"in w)||w.async;if(x.open(w.type,w.url,$,w.username,w.password),w.xhrFields)for(n in w.xhrFields)x[n]=w.xhrFields[n];for(n in P)T.apply(x,P[n]);return w.timeout>0&&(I=setTimeout(function(){x.onreadystatechange=y,x.abort(),p(null,"timeout",x,w,b)},w.timeout)),x.send(w.data?w.data:null),x},t.get=function(){return t.ajax(w.apply(null,arguments))},t.post=function(){var e=w.apply(null,arguments);return e.type="POST",t.ajax(e)},t.getJSON=function(){var e=w.apply(null,arguments);return e.dataType="json",t.ajax(e)},t.fn.load=function(e,n,i){if(!this.length)return this;var r,s=this,a=e.split(/\s/),c=w(e,n,i),l=c.success;return a.length>1&&(c.url=a[0],r=a[1]),c.success=function(e){s.html(r?t("
").html(e.replace(o,"")).find(r):e),l&&l.apply(s,arguments)},t.ajax(c),this};var b=encodeURIComponent;function _(e,n,i,r){var o,s=t.isArray(n),a=t.isPlainObject(n);t.each(n,function(n,c){o=t.type(c),r&&(n=i?r:r+"["+(a||"object"==o||"array"==o?n:"")+"]"),!r&&s?e.add(c.name,c.value):"array"==o||!i&&"object"==o?_(e,c,i,n):e.add(n,c)})}t.param=function(e,n){var i=[];return i.add=function(e,n){t.isFunction(n)&&(n=n()),null==n&&(n=""),this.push(b(e)+"="+b(n))},_(i,e,n),i.join("&").replace(/%20/g,"+")}}(An);const Hi={utm:"utm",organic:"organic",referral:"referral",typein:"typein"},Ui={referral:"referral",organic:"organic"},Wi="(none)",Xi="(Houston, we have a problem)",Gi={escapeRegexp:function(t){return t.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g,"\\$&")},setDate:function(t,e){var n=t.getTimezoneOffset()/60,i=t.getHours(),r=e||0===e?e:-n;return t.setHours(i+n+r),t.getFullYear()+"-"+this.setLeadingZeroToInt(t.getMonth()+1,2)+"-"+this.setLeadingZeroToInt(t.getDate(),2)+" "+this.setLeadingZeroToInt(t.getHours(),2)+":"+this.setLeadingZeroToInt(t.getMinutes(),2)+":"+this.setLeadingZeroToInt(t.getSeconds(),2)},setLeadingZeroToInt:function(t,e){for(var n=t+"";n.length0)for(var i=0;i0)for(var r=0;r0))return n=Zi.getHost(t),!0;for(var e=0;e{location.href!==t&&(t=location.href,this.addToHistory(t))},1e3)}idArrayChanged(t,e){const n=(t||[]).map(t=>t.id);return n.sort(),n.join()!==(e||[]).sort().join()}getIdArray(t){return t.map(t=>t.id)}getItem(t,e){const n=localStorage.getItem(cn.JS_PREFIX+t);if(n)try{return JSON.parse(n)}catch{return e}return e}setItem(t,e){localStorage.setItem(cn.JS_PREFIX+t,JSON.stringify(e))}setHostReported(){this.setItem("host-reported",1)}isHostReported(){return this.getItem("host-reported")}setForm(t,e){this.setItem("form-"+t,e)}getForm(t){return this.getItem("form-"+t)}formsChanged(t,e){return this.idArrayChanged(e,this.getItem("forms-"+t))}setForms(t,e){this.setItem("forms-"+t,this.getIdArray(e))}clearLegacyConditionsSplitData(){const t=[],e=["conditions-split-","conditions-splits-","settings-split-","settings-splits-"];for(let n=0;ni.startsWith(cn.JS_PREFIX+t))&&t.push(i)}t.forEach(t=>localStorage.removeItem(t))}setContactsSent(t){t=t||"lead",this.setItem("contacts-sent-"+t,"1")}isContactsSent(t){return"lead"===(t=t||"lead")?"1"===this.getItem("contacts-sent")||this.getItem("contacts-sent-lead"):"1"===this.getItem("contacts-sent-"+t)}setLastShownWithId(t){const e=(new Date).valueOf();this.setItem("last-shown-"+t,e)}setLastShown(t){this.setLastShownWithId(t),this.setItem("last-shown",(new Date).valueOf())}getLastShown(t){const e=t?"last-shown-"+t:"last-shown",n=this.getItem(e,null);return null===n?null:new Date(+n||0)}isShown(t){return t?!!this.getItem("last-shown-"+t):!!this.getItem("last-shown")}setLastButtonClose(t){this.setItem("last-button-close-"+t,(new Date).valueOf())}getLastButtonClose(t){const e=this.getItem("last-button-close-"+t,null);return null===e?null:new Date(+e||0)}setLastButtonShown(t){const e=(new Date).valueOf();this.setItem("last-button-show-"+t,e),this.setItem("last-button-show",e)}getLastButtonShown(t){const e=this.getItem("last-button-show-"+t,null);return null===e?null:new Date(+e||0)}getAnyLastButtonShown(){const t=this.getItem("last-button-show",null);return null===t?null:new Date(+t||0)}getNeedButtonFrequencyCheck(t){return!0===this.getItem("button-need-frequency-check-"+t,null)}setNeedButtonFrequencyCheck(t,e){this.setItem("button-need-frequency-check-"+t,e)}getCollapsed(t){return this.getItem("collapsed-"+t,null)}setCollapsed(t){const e=this.getCollapsed(t);e&&0!==e.length?(e.push((new Date).valueOf()),this.setItem("collapsed-"+t,e)):this.setItem("collapsed-"+t,[(new Date).valueOf()])}setCompleted(t){const e=(new Date).valueOf();this.setItem("completed-"+t,e),this.setItem("completed",e)}getCompleted(t){const e=this.getItem(t?"completed-"+t:"completed",null);return null===e?null:new Date(+e||0)}setUncompleted(t){const e=(new Date).valueOf();this.setItem("uncompleted-"+t,e),this.setItem("uncompleted",e)}getUncompleted(t){const e=t?"uncompleted-"+t:"uncompleted",n=this.getItem(e,null);return null===n?null:new Date(+n||0)}setSkipped(t){const e=(new Date).valueOf();this.setItem("lead-skipped-"+t,e)}getSkipped(t){const e="lead-skipped-"+t,n=this.getItem(e,null);return null===n?null:new Date(+n||0)}set(t,e){this.setItem(t,e)}get(t){return this.getItem(t)}addToHistory(t){const e="history",n=this.getItem(e,[]);n.push(t),n.splice(0,Math.max(n.length-10,0)),this.setItem(e,n),this.history=n}get history(){return this._history}onHistoryChange(t){return this._onHistoryChangeCallbacks.add(t),()=>{this._onHistoryChangeCallbacks.delete(t)}}set history(t){this._history=t,this._onHistoryChangeCallbacks.forEach(e=>{e(t)})}clearHistory(){this.history=[],this.setItem("history",[]),this._onHistoryChangeCallbacks.clear()}},ar=`${cn.CSS_PREFIX}-init-at`;function cr(){const t=ur();if(or.get.current_add.fb&&"string"==typeof or.get.current_add.fb){const e=new Date(or.get.current_add.fb.replace(" ","T")).valueOf();return localStorage[ar]=`${t}:${e}`,e}if(localStorage[ar]){const[e,n]=localStorage[ar].split(":");if(parseInt(e,10)===t)return parseInt(n,10)}return localStorage[ar]=`${t}:${window.PopMechanic.initStartedAt}`,window.PopMechanic.initStartedAt}const lr=cr;function ur(){const t=or.get.udata.vst;try{return parseInt(t)}catch{return 0}}const dr={getVisit:ur},hr="h",fr="e",mr="ps",pr="f",gr=[{version:1,up:t=>{const e=t.createObjectStore(hr,{autoIncrement:!0});e.createIndex("url","url",{unique:!1}),e.createIndex("vst","vst",{unique:!1})}},{version:2,up:t=>{const e=t.createObjectStore(fr,{autoIncrement:!0});e.createIndex("type","type",{unique:!1}),e.createIndex("vst","vst",{unique:!1}),e.createIndex("form","form",{unique:!1})}},{version:4,up:(t,e)=>{const n=e.objectStore(fr);n.indexNames.contains("ts")||n.createIndex("ts","ts",{unique:!1})}},{version:5,up:(t,e)=>{const n=e.objectStore(hr);n.indexNames.contains("pagetype")||n.createIndex("pagetype","pagetype",{unique:!1})}},{version:7,up:(t,e,n)=>{6===n&&t.objectStoreNames.contains(mr)&&t.deleteObjectStore(mr);const i=t.createObjectStore(mr,{autoIncrement:!0});i.createIndex("productIds","productIds",{unique:!1}),i.createIndex("segmentationId","segmentationId",{unique:!1}),i.createIndex("segmentId","segmentId",{unique:!1}),i.createIndex("ts","ts",{unique:!1})}},{version:8,up:(t,e)=>{const n=e.objectStore(hr);n.indexNames.contains("productIds")||n.createIndex("productIds","productIds",{unique:!1}),n.indexNames.contains("categoryIds")||n.createIndex("categoryIds","categoryIds",{unique:!1})}},{version:9,up:(t,e)=>{e.objectStore(hr).createIndex("productItem","productItem",{unique:!1});e.objectStore(mr).createIndex("productItem","productItem",{unique:!1})}},{version:10,up:t=>{const e=t.createObjectStore(pr,{autoIncrement:!0});e.createIndex("id","id",{unique:!0}),e.createIndex("form","form",{unique:!1})}}];const yr={openDb:(t,e,n)=>new Promise((i,r)=>{const o=indexedDB.open(t,e);o.onerror=()=>{r(new Error("Failed to open IndexedDB"))},o.onupgradeneeded=t=>{const e=t.target;if(e)try{n(e.result,o.transaction,t.oldVersion)}catch(i){r(i)}},o.onsuccess=t=>{const e=t.target;e?i(e.result):r(new Error("No target in success event"))}}),storage:localStorage,nowMs:()=>Date.now(),runMigrations:function(t,e,n){gr.filter(t=>n{try{i.up(t,e,n)}catch(r){throw console.error(`Migration ${i.version} failed:`,r),r}})},pruneStore:function(t,e,n){return new Promise(i=>{const{deleteOlderThanTs:r,maxRecordsToDelete:o}=n,s=t.transaction(e,"readwrite");let a=0;s.objectStore(e).openCursor().onsuccess=t=>{const e=t.target.result;e&&a{i(a)}})},logger:console,jsPrefix:cn.JS_PREFIX};const vr={dbName:"db",version:10,persistForMonths:6,pruneCooldownMs:864e5,pruneUpTo:1e3},wr=new class{constructor(t,e=yr){this.config=t,this.deps=e,this.db=null,this.connectionPromise=null}async connect(){return this.db?this.db:(this.connectionPromise||(this.connectionPromise=this.initConnection()),this.connectionPromise)}async initConnection(){try{const t=this.deps.jsPrefix+this.config.dbName,e=await this.deps.openDb(t,this.config.version,(t,e,n)=>{this.deps.runMigrations(t,e,n)});if(this.db)throw new Error("Database already initialized");return this.db=e,this.setupEventHandlers(this.db),await this.performPruningIfNeeded(this.db),this.db}catch(t){throw this.deps.logger.error("Error opening indexedDB"),t}}setupEventHandlers(t){t.onversionchange=()=>{this.close()},t.onclose=()=>{this.db=null,this.connectionPromise=null},t.onerror=t=>{const e=t.target,n=e?.error;this.deps.logger.error("PopMechanic IDB error "+(n?.message||"unknown"))}}async performPruningIfNeeded(t){const e=this.deps.jsPrefix+"pruned-at",n=this.deps.storage.getItem(e);if(!function(t,e,n=Date.now()){return!t||n-t>e}(n?1e3*parseInt(n,10):null,this.config.pruneCooldownMs,this.deps.nowMs()))return;this.deps.storage.setItem(e,Math.floor(this.deps.nowMs()/1e3).toString());const i=new Date(this.deps.nowMs());i.setMonth(i.getMonth()-this.config.persistForMonths);const r={deleteOlderThanTs:i.valueOf(),maxRecordsToDelete:this.config.pruneUpTo};await Promise.all([this.deps.pruneStore(t,hr,r),this.deps.pruneStore(t,fr,r),this.deps.pruneStore(t,mr,r),this.deps.pruneStore(t,pr,r)])}close(){this.db?.close(),this.db=null,this.connectionPromise=null}}(vr),br={async getIdb(){try{return await wr.connect()}catch(t){return console.error("Failed to get IDB:",t),null}},async push(t,e){const n=await br.getIdb();return n?new Promise((i,r)=>{const o=n.transaction([t],"readwrite").objectStore(t).add(e);o.onsuccess=()=>i(o.result),o.onerror=()=>r(o.error)}):null}},_r={push(t){if(!t||!t.type)return null;const e={...t};return"number"!=typeof t.vst&&(e.vst=ur()),"number"!=typeof t.ts&&(e.ts=Date.now()),br.push(fr,{type:e.type,form:e.form,ts:e.ts,vst:e.vst,behaviors:e.behaviors})},async last(t,e){const n=await br.getIdb();if(!n)throw void 0;return new Promise(i=>{const r=n.transaction(fr).objectStore(fr).index(t.form?"form":"type"),o=t.form?IDBKeyRange.only(t.form):t.type?IDBKeyRange.only(t.type):null;let s=null;r.openCursor(o,"prev").onsuccess=n=>{const r=n.target.result;if(r){if(t.form&&r.value.form!==t.form)return r.continue();if(t.type&&r.value.type!==t.type)return r.continue();if("function"==typeof e&&!e(r.value))return r.continue();(!s||s&&s.ts{o.openCursor(e||null).onsuccess=e=>{const i=e.target.result;i?(n(i.value),i.continue()):t()}})}};function Sr(t){"url"in t?_r.push({type:t.type,vst:ur(),ts:Date.now(),form:void 0}):_r.push({type:t.type,vst:ur(),ts:Date.now(),form:t.form})}const Ir=t=>{const{description:e,data:n,time:i}=t,r={description:e,ts:i.valueOf()-window.PopMechanic.initAt};return n&&(r.data=n),r};const kr=new class{constructor(){this.events=[]}hasBeenTracked(t){return this.events.some(e=>e.key===t)}add(t){const{formId:e,type:n="event",description:i,data:r}=t,o=new Date,s=t.key??te();this.events.push({formId:e,description:i,data:r,time:o,type:n,key:s})}addOnce(t){this.hasBeenTracked(t.key)||this.add(t)}getLifecycle(t){return this.events.filter(e=>e.formId===t).map(Ir)}getRejectInfo(t){if(this.events.find(e=>e.formId===t&&"show"===e.type))return"The form has been shown";const e=this.events.filter(e=>e.formId==t&&"reject"===e.type).map(Ir);return e.length>0?e:"There is no specific reject reason. The form is still pending..."}reset(){this.events=[]}};class Pr{constructor(){this.events=[],this.handleVisibilityChange=this.handleVisibilityChange.bind(this)}log(t){this.events.push({type:t,ts:Date.now()})}targetSearchStart(){this.logInitialVisibility(),this.log("targetSearchStarted"),document.addEventListener("visibilitychange",this.handleVisibilityChange)}targetSearchEnd(){this.log("targetSearchEnded"),document.removeEventListener("visibilitychange",this.handleVisibilityChange)}conditionsStart(){this.log("conditionsStarted")}conditionsEnd(){this.log("conditionsEnded")}logInitialVisibility(){"hidden"===document.visibilityState?this.log("tabInactivityStarted"):this.log("tabInactivityEnded")}handleVisibilityChange(){"hidden"===document.visibilityState?this.log("tabInactivityStarted"):this.log("tabInactivityEnded")}valueOf(){return this.getBlockSearchDuration()}getEvents(){return this.events}getBlockSearchDuration(){return this.events.reduce((t,e)=>{switch(e.type){case"targetSearchStarted":return{...t,isSearching:!0,lastTs:e.ts};case"targetSearchEnded":return t.isTabActive?{...t,isSearching:!1,duration:t.duration+e.ts-t.lastTs,lastTs:e.ts}:{...t,isSearching:!1,lastTs:e.ts};case"tabInactivityStarted":return t.isSearching?{...t,isTabActive:!1,duration:t.duration+e.ts-t.lastTs,lastTs:e.ts}:{...t,isTabActive:!1,lastTs:e.ts};case"tabInactivityEnded":return{...t,isTabActive:!0,lastTs:e.ts};default:return t}},{isTabActive:!0,isSearching:!1,duration:0,lastTs:0}).duration}getConditionsDuration(){return this.events.reduce((t,e)=>{switch(e.type){case"conditionsStarted":return{...t,lastTs:e.ts};case"conditionsEnded":return{...t,duration:e.ts-t.lastTs};default:return t}},{duration:0,lastTs:0}).duration}}const Cr="https://pw.maestra-static.io/js",Er="Personalization",xr="maestra";function Tr(...t){return!!window[xr]&&(window[xr].apply(window[xr],t),!0)}function $r(){return!!window[xr]}const Rr=["no data from mindbox"],Or=t=>{if(t instanceof Error)return t;if("string"==typeof t)return new Error(t);if("number"==typeof t)return new Error(String(t));if(null==t)return new Error("Unknown error");if("object"==typeof t&&!Array.isArray(t)){const e=t;return e.message?new Error(String(e.message)):new Error("Unknown error")}return new Error(String(t))},Fr=(t,e)=>{const n=(i=t.message,`${Er}: ${i}`);var i;return e?(t.message=`${n} Caused by: ${e.message}`,t):(t.message=n,t)},Ar=({error:t,context:e})=>{if(!$r())return;const n=e?.cause,i=Or(t),r=n?Or(n):void 0,o=Fr(i,r);(t=>{const e=t.toLowerCase();return Rr.some(t=>e.includes(t.toLowerCase()))})(o.message)||Tr("logError",o,e)},Mr=function(...t){console.log(`[${Er}]`,...t)},jr=function(...t){console.error(`[${Er}]`,...t)};let Dr=!1;function qr(){try{return!!Dr||(!!window.PopMechanic.isTesting||(-1!==location.toString().indexOf("pm-test-form")||(-1!==location.hash.indexOf("pm-debug")||!!localStorage["pm-debug"])))}catch{return!1}}window.addEventListener("message",function(t){t.source===window&&t.data&&"popmechanic-extension"===t.data.source&&(Dr=!0)});const Nr={isDebugging:qr,log:function(...t){qr()&&Mr(...t)},error:function({error:t,context:e}){const n=window.PopMechanic?.client;Ar({error:t,context:Object.assign({},e,{clientId:n})}),qr()&&(e?.cause?jr(t,e?.cause):jr(t))}},Lr={},Br=t=>(Lr[t]||(Lr[t]=new Promise((e,n)=>{const i=document.createElement("script");i.onload=e,i.onerror=t=>n(t),i.src=t,document.head.appendChild(i)})),Lr[t]),zr=new TextEncoder;function Hr(t){return crypto.subtle.digest("SHA-256",zr.encode(t)).then(t=>{const e=new Uint8Array(t);return Array.from(e)})}const Ur=Cr+"/media/popmechanic/jssha256.js";function Wr(t){return window.PopMechanic.sha256q=window.PopMechanic.sha256q||[],new Promise((e,n)=>{Br(Ur).catch(t=>{Nr.log(t),n(new Error("Error loading SHA256 script, AB tests might not work as expected"))}),window.PopMechanic.sha256q.push(function(n){const i=n.digest(t);e(i)})})}function Xr(t,e){const n=crypto&&crypto.subtle&&crypto.subtle.digest?Hr:Wr;return Promise.resolve().then(()=>{const i=t.toString().toUpperCase()+e.toUpperCase();return n(i)}).then(t=>((t[28]<<24|t[29]<<16|t[30]<<8|t[31])>>>0)%100).catch(t=>(Nr.log(t),null))}function Gr(t,e,n){if(e<0||n>100)throw new Error("[modulusLower, modulusUpper) should be within [0, 100).");if(e>=n)throw new Error("Modulus lower bound can't be more or equal to modulus upper bound.");if(null===t)throw new Error("Couldn't calculate modulus hash for A/B test");return e<=t&&t{const o=n.transaction([pr],"readwrite").objectStore(pr).put(e,t);o.onsuccess=()=>i(),o.onerror=r})},async getById(t){const e=await br.getIdb();if(!e)throw void 0;return new Promise(function(n,i){const r=e.transaction([pr]).objectStore(pr).get(t);r.onsuccess=()=>n(r.result),r.onerror=i})}};const Qr={all:Jr=Jr||new Map,on:function(t,e){var n=Jr.get(t);n?n.push(e):Jr.set(t,[e])},off:function(t,e){var n=Jr.get(t);n&&(e?n.splice(n.indexOf(e)>>>0,1):Jr.set(t,[]))},emit:function(t,e){var n=Jr.get(t);n&&n.slice().map(function(t){t(e)}),(n=Jr.get("*"))&&n.slice().map(function(n){n(t,e)})}};var Jr;const Kr={on(t,e){Qr.on(t,e)},one(t,e){const n=i=>{e(i),Qr.off(t,n)};Qr.on(t,n)},off(t,e){Qr.off(t,e)},offAll:function(){Qr.all.clear()},trigger(t,e){Qr.emit(t,e)}};let Zr=class{constructor(t){this.form=t}terminate(){}},Yr=window.queueMicrotask;"function"!=typeof Yr&&(Yr=function(t){Promise.resolve().then(t).catch(t=>setTimeout(()=>{throw t}))});function to(t){const{selector:e,stopOnFirstMatch:n=!1,onFound:i,onLost:r,onInvalidSelector:o}=t;let s,a=null,c=!1,l=10;const u=()=>{null!==a&&(clearTimeout(a),a=null),s=void 0,c=!0},d=()=>{if(c)return;a=null;const t=!!s;let h;try{h=function(t){const e=t.trim();if(e)return document.querySelectorAll(e),An(e)[0]}(e)}catch(f){return o?.(f),void u()}if(h){if(!s&&(i(h),n))return void u();s=h}else s&&r?.(),s=void 0;t!==!!s&&(l=10),c||(()=>{if(c)return;const t=Math.min(l,500);l*=2,a=setTimeout(d,t)})()};return{start(){c||null!==a||(l=10,d())},stop:u}}function eo(){return window?.__PRELOADED_QUIZZES_CONFIG}const no="qz-test-quiz",io="qz-test-quiz-structure";const ro="https://quizzes.maestra.io";const oo=(t=>{const e=t.globalUtils;return delete t.globalUtils,e||{getIntegrationPromise:()=>null,waitPromisesOrDelay:()=>null,getMindboxIsReadyPromise:()=>null,getMindboxSettings:()=>null,reportFailure:()=>null,getSettings:()=>null,getDeviceType:()=>"unknown",getTabVisibilityDuration:()=>null,getTabInvisibilityDuration:()=>null,resetTabVisibilityDuration:()=>null,recoSlaState:{}}})(window.PopMechanic);const so={embedded:class extends Zr{constructor(t){super(t),this.targetElementWatcher=null,t.embed_selector&&t.selector?this.selector=t.selector:this.selector="[data-"+cn.CSS_PREFIX+"embed='"+t.id+"']",this.getTargetElement=this.getTargetElement.bind(this)}getTargetElement(){return new Promise(t=>{const e=this.form.slaTimer;e.targetSearchStart(),kr.add({formId:this.form.id,description:"Waiting for target element..."});const n=to({selector:this.selector,stopOnFirstMatch:!0,onFound:n=>{Yr(()=>{this.targetElementWatcher=null,e.targetSearchEnd(),kr.add({formId:this.form.id,description:"Target element found"}),t(An(this.selector))})},onInvalidSelector:t=>{this.targetElementWatcher=null,Nr.log("form #"+this.form.id+" embed selector error:",t),kr.addOnce({formId:this.form.id,description:"Embed selector error",key:`embed-selector-error-${this.form.id}`,data:{error:t}})}});this.targetElementWatcher=n,n.start()})}terminate(){this.targetElementWatcher&&(this.targetElementWatcher.stop(),this.targetElementWatcher=null)}},quiz:class extends Zr{constructor(t){super(t),this.configPromise=this.loadConfig(),t.quizConfigPromise=this.configPromise}getConfig(){return this.configPromise}async loadConfig(){if(function(){const t=new URL(window.location.href).searchParams;return t.has(no)&&t.has(io)}()){const{endpointId:t}=await oo.getMindboxSettings();if(!t)return;return await async function(t){try{const e=new URL(window.location.href),n=e.searchParams.get(no),i=e.searchParams.get(io);if(!n||!i)return Nr.error({error:"loadTestQuizData: missing qz-test-quiz or qz-test-quiz-structure params"}),null;const r=new URL(`${ro}/api/v1/test/quiz`);r.searchParams.set("endpoint",t),r.searchParams.set("quiz",n),r.searchParams.set("structure",i);const o=await fetch(r.toString());return o.ok?o.json():(Nr.error({error:`loadTestQuizData: fetch failed with status ${o.status}`,context:{url:r.toString()}}),null)}catch(e){return Nr.error({error:"loadTestQuizData: unexpected error",context:{cause:e instanceof Error?e:new Error(String(e))}}),null}}(t)??void 0}return eo()?.quizzes.find(t=>t.formId===this.form.id)}},"reco-sla":class extends Zr{constructor(t){super(t),this.form.needsSla=!0}}};const ao={getInstances:function(t,e){return t.reduce((t,n)=>(so[n]&&(t[n]=new so[n](e)),t),{})}};const co=cn.JS_PREFIX+"la";let lo,uo=[];const ho=function(t){lo=t;try{sessionStorage[co]=t}catch{}},fo=function(){try{return parseInt(sessionStorage[co],10)}catch{}return lo},mo=le(function(){ho(Date.now())},500);setInterval(function(){if(!uo.length)return;const t=Date.now()-fo(),e=uo.filter(function(e){return e.delay<=t});uo=uo.filter(function(e){return e.delay>t}),e.forEach(function(t){Yr(function(){t.handler.apply(null,t.args)})})},500),document.addEventListener("mousemove",mo,!1),document.addEventListener("mousedown",mo,!1),document.addEventListener("keydown",mo,!1),document.addEventListener("touchmove",mo,!1),document.addEventListener("touchstart",mo,!1),document.addEventListener("scroll",mo,!1),mo(),Kr.on("destroy",function(){uo=[]});const po={setTimeout:function(t,e,n){const i={handler:t,delay:e,args:n};return uo.push(i),i},clearTimeout:function(t){t.handler=()=>{}}};const go=[function(t){if(t.delay)return function(e){setTimeout(e,1e3*parseInt(t.delay,10),!0)}},function(t){if(t.inactive)return function(e){try{po.setTimeout(e,1e3*parseInt(t.inactive,10),[!0])}catch(n){console.log(n)}}},function(t){if(t.mouseleave&&"0"!==t.mouseleave)return function(t){const e=ue(function(){t(!1)},100),n=function(e){!e.relatedTarget&&"nodeName"in e.target&&"INPUT"!==e.target.nodeName&&t(!0)};An(document).on("mouseout",n),An(document).on("mouseenter",e),An(document).on("mousemove",e),Kr.one("destroy",function(){An(document).off("mouseout",n),An(document).off("mouseenter",e),An(document).off("mousemove",e)})}},function(t){if(!t.pages)return;const e=parseInt(t.pages,10);return sr.history.length>=e?vo(!0):function(t){const n=sr.onHistoryChange(i=>{i.length>=e&&(t(!0),n())})}},function(t){if(!t.pages_session)return;const e=parseInt(t.pages_session,10);return or.get.session.pgs>=e?vo(!0):function(t){const n=setInterval(function(){or.get.session.pgs>=e&&(clearInterval(n),t(!0))},1e3);Kr.one("destroy",function(){clearInterval(n)})}},function(t){if(!t.read)return;const e=parseInt(t.read,10);return function(t){const n=ue(function(){const n=window.pageYOffset,i=An(document).height()-window.innerHeight;(0===i||n/i*100>e)&&t(!0)},100);An(window).on("scroll",n),An(document).height()-window.innerHeight>0?window.pageYOffset/An(document).height()*100>=e&&t(!0):t(!0)}},function(t){if(t.returned&&"0"!==t.returned)return function(t){return or.get.udata.vst>1?t(!0):t(!1)}},function(t){if(!t.session_time)return;let e;try{e=parseInt(sessionStorage[cn.JS_PREFIX+"session-start"],10)}catch{}e||(e=Date.now()),sessionStorage[cn.JS_PREFIX+"session-start"]=e;const n=1e3*parseInt(t.session_time,10)-(Date.now()-e);return function(t){setTimeout(t,Math.max(n,0),!0)}}];function yo(t={},e="or"){if(t.only_forced)return vo(!1);if(t.immediate)return vo(!0);const n=go.map(e=>e(t)).filter(Boolean);return 0===n.length?vo(!0):"and"===e?function(t){return function(e){const n=t.map(()=>!1);let i=n.every(Boolean);t.forEach((t,r)=>{t(t=>{n[r]=t;const o=n.every(Boolean);o!==i&&(i=o,e(i))})})}}(n):"or"===e?function(t){return function(e){const n=t.map(()=>!1);let i=n.some(Boolean);t.forEach((t,r)=>{t(t=>{n[r]=t;const o=n.some(Boolean);o!==i&&(i=o,e(i))})})}}(n):void 0}function vo(t){return function(e){e(t)}}function wo(t){return!t||!t.once_lifetime&&!t.once_session&&!t.minimal_timeout}function bo(t,e){return t.once_lifetime&&e.lastEvent?{allowed:!1,reason:"once_lifetime"}:t.once_session&&e.lastEvent&&e.lastEvent.vst===e.currentVst?{allowed:!1,reason:"once_session"}:t.minimal_timeout&&e.now-e.ts<1e3*t.minimal_timeout?{allowed:!1,reason:"minimal_timeout"}:{allowed:!0,reason:null}}function _o(t,e){const{sessionTs:n,now:i}=e;return t.once_lifetime&&n?{allowed:!1,reason:"once_lifetime"}:t.once_session&&i-n<18e5?{allowed:!1,reason:"once_session"}:t.minimal_timeout&&i-n<1e3*t.minimal_timeout?{allowed:!1,reason:"minimal_timeout"}:{allowed:!0,reason:null}}async function So(t,e,n){if(wo(t))return!0;const i=t=>{kr.add({formId:e,description:`${n.lifecycleDescriptionPrefix} "${t}" frequency exceeded`,type:n.lifecycleType})};try{const r=await _r.last({form:e,type:n.eventType}),o=dr.getVisit(),s=r?r.ts:+n.fallbackDateGetter(),a=Date.now(),{allowed:c,reason:l}=bo(t,{lastEvent:r,ts:s,currentVst:o,now:a});return!c&&l&&i(l),c}catch(r){Nr.log("Error checking frequency:",r);const e=+n.fallbackDateGetter(),o=Date.now(),{allowed:s,reason:a}=_o(t,{sessionTs:e,now:o});return!s&&a&&i(a),s}}async function Io(t){const e=window.PopMechanic.getModel(t);if(e)return e.containerId||null;const n=await Vr.getById(t);return n?.containerId||null}function ko(t){return+t.fallbackDateGetter()}async function Po(t,e,n){if(!(t&&(t.session||t.day||t.week||t.month||t.minimal_timeout)))return!0;if(await Io(e))return!0;const i=dr.getVisit(),r=t=>{kr.add({formId:e,description:`${n.lifecycleDescriptionPrefix} "${t}" frequency exceeded`,type:"reject"})};try{const e=Date.now(),o=e-864e5,s=e-6048e5,a=e-2592e6,c=(await async function(t,e,n){const i=[];return await _r.forEach(t,e,function(t){i.push(n(t))}),Promise.all(i)}("ts",IDBKeyRange.lowerBound(a),async t=>await async function(t,e){return t.type===e.eventType&&(!e.ignoreEvent?.(t)&&!(await Io(t.form)))}(t,n)?t:null)).filter(t=>null!==t),l=c.reduce((t,e)=>(e.ts>o&&(t.day+=1),e.ts>s&&(t.week+=1),e.ts>a&&(t.month+=1),e.vst===i&&(t.session+=1),t),{day:0,week:0,month:0,session:0});if(t.session&&l.session>=t.session)return r("session"),!1;if(t.day&&l.day>=t.day)return r("day"),!1;if(t.week&&l.week>=t.week)return r("week"),!1;if(t.month&&l.month>=t.month)return r("month"),!1;if(t.minimal_timeout){const i=c.reduce((t,e)=>!t||e.ts>t.ts?e:t,null);if(e-(i?i.ts:ko(n))<1e3*t.minimal_timeout)return r("minimal_timeout"),!1}return!0}catch(o){Nr.error({error:"Error checking frequency:",context:{cause:o}});const e=ko(n),i=18e5,s=864e5,a=7*s,c=30*s,l=Date.now()-e;return t.session&&e&&lsr.getLastShown(e),lifecycleDescriptionPrefix:"Form",lifecycleType:"reject"})},checkButtonClose:async function(t,e){if(wo(t))return!0;const n=t=>{kr.add({formId:e,description:`Button "${t}" frequency exceeded`,type:"event"})};try{const i=await _r.last({form:e,type:"button_close"}),r=dr.getVisit(),o=i?i.ts:+sr.getLastButtonClose(e),s=Date.now(),{allowed:a,reason:c}=bo(t,{lastEvent:i,ts:o,currentVst:r,now:s});return!a&&c&&n(c),a}catch(i){Nr.log("Error checking button frequency:",i);const r=+sr.getLastButtonClose(e),o=Date.now(),{allowed:s,reason:a}=_o(t,{sessionTs:r,now:o});return!s&&a&&n(a),s}},checkButtonShow:async function(t,e){return So(t,e,{eventType:"button_show",fallbackDateGetter:()=>sr.getLastButtonShown(e),lifecycleDescriptionPrefix:"Button show",lifecycleType:"reject"})},checkButtonAccountShow:async function(t,e){return Po(t,e,{eventType:"button_show",fallbackDateGetter:()=>sr.getAnyLastButtonShown(),lifecycleDescriptionPrefix:"Button account show"})},checkAccount:async function(t,e){return Po(t,e,{eventType:"show_start",fallbackDateGetter:()=>sr.getLastShown(),lifecycleDescriptionPrefix:"Account",ignoreEvent:t=>!!t.behaviors&&t.behaviors.includes("embedded")})}};class Eo{constructor(t){this.data=t,this.filters=t.filter,this.filterType=t.filter_type,this.form=t.form}shouldRunForControlGroup(){return!1}isLeadRelevant(t){if(this.form&&this.form!==t.form)return!1;if(this.filters){const e=this.filterType||"all",n=Object.keys(this.filters);for(const i in n){if("all"===e&&t.customs[n[i]]!==this.filters[n[i]])return!1;if("any"===e&&t.customs[n[i]]===this.filters[n[i]])return!0}}return!0}skipForm(t){return!1}onQuizAnswer(t){}onMatcherProductClick(t){}_interpolate(t,{form:e,lead:n}){let i=t;return i=i.replace("%url%",location.href),i=i.replace("%domain%",location.host),i=i.replace("%utm_source%",or.get.current.src),i=i.replace("%utm_medium%",or.get.current.mdm),i=i.replace("%utm_campaign%",or.get.current.cmp),i=i.replace("%utm_term%",or.get.current.trm),i=i.replace("%utm_content%",or.get.current.cnt),e&&(i=i.replace("%form_id%",e.id.toString()),i=i.replace("%form_name%",e.name)),n&&(Object.keys(n).forEach(t=>{"customs"===t?Object.keys(n.customs).forEach(t=>{i=i.replace(new RegExp("%customs."+t+"%","g"),String(n.customs[t]))}):i=i.replace(new RegExp("%"+t+"%","g"),n[t])}),i=i.replace(new RegExp("%name%","g"),[n.first_name," ",n.last_name].join(" "))),i}}class xo extends Eo{}const To=(t,e={})=>{const{common:n,ecommerce:i}=e;if(window.gtag){const e={};return n&&Object.assign(e,n),i&&Object.assign(e,i),Object.keys(e).length?void window.gtag("event",t,e):void window.gtag("event",t)}if(window.dataLayer){const e={};return n&&Object.assign(e,n),i&&Object.assign(e,{ecommerce:i}),void window.dataLayer.push(Object.assign({event:t},e))}throw Error("no google analytics on site")};class $o extends Eo{constructor(t,e={}){super(t),this.trySendGa4Event=e.trySendGa4Event||To}onShow(t){if(!this.data.events||!this.data.events.open)return;const e=this.data.events.open;this.send(e,t)}onClose(t){if(!this.data.events||!this.data.events.close)return;const e=this.data.events.close;this.send(e,t)}onContactsSent(t){if(!this.data.events||!this.data.events.lead)return;const e=this.data.events.lead;this.send(e,t)}onTargetingReady(){}onRender(){}getEventParameters(t,e){return t.parameters.reduce((t,n)=>(t[n.name]=this._interpolate(n.value,e).slice(0,100),t),{})}send(t,e){const n=this._interpolate(t.name,e),i=this.getEventParameters(t,e),r={};this.data.measurement_id&&(r.send_to=this.data.measurement_id),Object.assign(r,i);try{this.trySendGa4Event(n,{common:r})}catch(o){Mr(`form #${this.data.form} Google Analytics integration failed:`,o)}}}const Ro=`No${xr}Tracker`;async function Oo(t){if(await oo.getMindboxIsReadyPromise(),!$r())return{type:Ro};Tr("personalization.invokeWithPageData",t),Tr("personalization.registerOnPageChangeCallback",t)}async function Fo(){try{return(await new Promise((t,e)=>{Oo(n=>{n&&(n.type===Ro&&e(new Error(Ro)),t(n))})})).cart||[]}catch{return[]}}function Ao(t){return t.product?t.product.ids:t.productGroup?t.productGroup.ids:null}function Mo(t){const e=function(t){return Object.keys(t)[0]||null}(t);return e?t[e].toString():""}function jo(){return new Promise(function(t,e){Oo(n=>{n&&(n.type===Ro&&e(new Error(Ro)),"unknown"!==n.type&&t(n))})})}async function Do(){try{return await jo()}catch{return null}}function qo(t){if(!t||"object"!=typeof t)return!1;const e="product"in t?t.product:null,n="productGroup"in t?t.productGroup:null,i=e||n;return!!i&&!!((r=i)&&"object"==typeof r&&"ids"in r&&r.ids&&"object"==typeof r.ids&&0!==Object.keys(r.ids).length);var r}function No(t){if(!t)return null;const e=t.product?{product:t.product}:t.productGroup?{productGroup:t.productGroup}:null;return e&&qo(e)?e:null}function Lo(t,e){const n=Object.keys(t),i=Object.keys(e);return n.some(n=>{const r=n.toLowerCase(),o=i.find(t=>t.toLowerCase()===r);return!!o&&e[o].toString()===t[n].toString()})}function Bo(t,e){return t.product&&e.product?Lo(t.product.ids,e.product.ids):!(!t.productGroup||!e.productGroup)&&Lo(t.productGroup.ids,e.productGroup.ids)}const zo=t=>{const e=Number(t);return isNaN(e)?0:e},Ho=()=>Fo().then(t=>t.reduce((t,e)=>t+=zo(e.priceOfLine)||zo(e.pricePerItem)*zo(e.count)||0,0));async function Uo(){return(await async function(){if(!window.Shopify)throw new Error("NoShopifyInstance");return(await fetch(window.Shopify.routes.root+"cart.js")).json()}()).total_price/100}const Wo={getCartSum:async()=>("undefined"!=typeof window&&window.Shopify?Uo:Ho)()},Xo=[{key:"product_id",fetch:async()=>{const t=await jo();return t.product?t.product.ids:t.productGroup?t.productGroup.ids:null}},{key:"product_id_value",fetch:async()=>{const t=await jo();return t.product?Mo(t.product.ids):t.productGroup?Mo(t.productGroup.ids):null}},{key:"category_id",fetch:async()=>{const t=await jo();return t.category?t.category.ids:null}},{key:"category_id_value",fetch:async()=>{const t=await jo();return t.category?Mo(t.category.ids):null}},{key:"cart_sum",fetch:Wo.getCartSum},{key:"cart_products",fetch:Fo}];function Go({error:t,source:e,form:n}){if("function"!=typeof window.PopMechanic.onFormError)return;const i=t instanceof Error?t:new Error(String("object"==typeof t&&null!==t&&"message"in t?t.message:t));window.PopMechanic.onFormError({error:i,source:e,context:{lifecycle:kr.getLifecycle(n.id)},form:n})}class Vo extends Eo{constructor(){super(...arguments),this.variables=Xo,this.success=void 0}onRender(t,e){return this.executeLifecycleMethod("on_render",{form:t,view:e})}onShow(t){return this.executeLifecycleMethod("on_show",{form:t.form})}onClose(t){return this.success?this.executeLifecycleMethod("on_close_success",{form:t.form}):this.executeLifecycleMethod("on_close_fail",{form:t.form})}onContactsSent(t){return this.success=!0,this.executeLifecycleMethod("on_success",{form:t.form,lead:t.lead})}onTargetingReady(t){return this.executeLifecycleMethod("on_targeting",{form:t.form})}stringHasVariable(t,e){return-1!==t.indexOf("%"+e+"%")}getRequiredVariables(t){return this.variables.filter(({key:e})=>this.stringHasVariable(t,e))}async getVariablesValues(t){const e=this.getRequiredVariables(t),n=e.map(t=>Promise.resolve(t.fetch())),i=await Promise.all(n);return e.reduce((t,e,n)=>(t[e.key]=i[n],t),{})}interpolateWithVariables(t,e,n){let i=this._interpolate(t,e);return Object.keys(n).forEach(t=>{i=i.replace(new RegExp("%"+t+"%","g"),"(JSON.parse('"+JSON.stringify(n[t])+"'))")}),i}async executeLifecycleMethod(t,e){const n=this.data[t]||"";if(n&&(!e.form||!e.form.isControlGroup))try{const t=await this.getVariablesValues(n),i=this.interpolateWithVariables(n,e,t);return e.lead?await new Function("lead","form",i)(e.lead,e.form):e.view?await new Function("form","view",i)(e.form,e.view):await new Function("form",i)(e.form)}catch(i){const n=`${t} error in integration#${this.data.id}, form#${e.form.id}`;Nr.log(n,i),Go({error:i,source:`integration.javascript.${t}`,form:e.form})}}}class Qo extends Eo{constructor(t){super(t),this.provider=t.provider,this.operation=t.operation}async onContactsSent(t){const e=t.lead,n={};let i;i="email"===this.provider?"email":"phone"===this.provider?"phone":"id",e.first_name&&(n.firstName=e.first_name),e.last_name&&(n.lastName=e.last_name),e.email&&(n.email=e.email),e.phone&&(n.phone=e.phone),await oo.getMindboxIsReadyPromise(),$r()||console.log("PopMechanic Mindbox integration error: no counter presented"),Tr("identify",{operation:this.operation,identificator:{provider:this.provider,identity:e[i]},data:n})}onRender(){}onTargetingReady(){}onShow(){}onClose(){}}function Jo(){return!("undefined"!=typeof window&&"object"==typeof window.process&&"renderer"===window.process.type||"undefined"!=typeof process&&"object"==typeof process.versions&&process.versions.electron||"object"==typeof navigator&&"string"==typeof navigator.userAgent&&navigator.userAgent.indexOf("Electron")>=0)&&(!function(t=navigator.userAgent){return/webview|wv|ip((?!.*Safari)|(?=.*like Safari))/i.test(t)}()&&(window.PushManager&&window.Notification&&"default"===window.Notification.permission||!1))}class Ko extends Eo{constructor(t){super(t)}shouldRunForControlGroup(){return!0}skipForm(){return!Jo()}async onContactsSent(){await oo.getMindboxIsReadyPromise(),$r()&&Tr("webpush.subscribe",{onGranted:()=>{},onDenied:()=>{}})}onRender(){}onTargetingReady(){}onShow(){}onClose(){}}function Zo(t){t().catch(t=>{("string"==typeof t||t instanceof Error)&&Nr.error({error:t})})}class Yo extends Eo{constructor(t){super(t),this.isLead=!1}shouldRunForControlGroup(){return!0}isLeadRelevant(t){return(!this.data.form||this.data.form===t.form)&&!this.isLead}onTargetingReady(t){this.trackTargeting(t)}onRender(t){t.template&&t.template.behaviors&&(this.isLead=["lead-on-close","lead-partial-submit","lead"].some(e=>t.template.behaviors.includes(e)))}onShow(t){this.trackShow(t)}onContactsSent(t){this.trackClick(t)}onClose(){}async trackTargeting(t){if(this.data&&this.data.targeting_operation){if(await oo.getMindboxIsReadyPromise(),!$r())return;Zo(()=>this.sendAsync(this.data.targeting_operation,{omitCdpAction:t.form.isControlGroup}))}}async trackShow(t){if(this.data&&this.data.show_operation){if(await oo.getMindboxIsReadyPromise(),!$r())return;Zo(()=>this.sendAsync(this.data.show_operation,{omitCdpAction:t.form.isControlGroup}))}}async trackClick(t){if(this.data.form===t.form.id&&this.data&&this.data.click_operation){if(await oo.getMindboxIsReadyPromise(),!$r())return;Zo(()=>this.sendAsync(this.data.click_operation,{}))}}sendAsync(t,e){return new Promise((n,i)=>{Tr("async",{operation:t,data:e,onSuccess:n,onValidationError:i})})}}function ts(t){const e=t.toLowerCase();return["name","email","phone","first_name","last_name"].includes(e)?e:t}const es=t=>null===t?"None":!0===t?"True":!1===t?"False":String(t),ns=(t,e,n)=>{const i=e.split(".");let r=t;i.forEach((t,e)=>{e===i.length-1?r[t]=n:r=r[t]?r[t]:r[t]={}})};let is=null;function rs(){return is||(window.__PERSONALIZATION_GEO?Promise.resolve(window.__PERSONALIZATION_GEO):(is=new Promise((t,e)=>{An.ajax({type:"GET",url:cn.GEO_URL,data:{domain:location.hostname,extend:!0},dataType:"json",success:t,error:e})}),is))}const os={getGeo:rs},ss="MaestraEndpointSettings";function as(t){return cn.CSS_PREFIX+"container-"+t}const cs={};let ls,us,ds,hs,fs,ms,ps,gs,ys;function vs(t){cs.mobile()&&t.addClass(cn.CSS_PREFIX+"mobile"),cs.tablet()&&t.addClass(cn.CSS_PREFIX+"tablet"),cs.desktop()&&t.addClass(cn.CSS_PREFIX+"desktop"),cs.television()&&t.addClass(cn.CSS_PREFIX+"television")}function ws(t){const e=as(t),n=An('
');return vs(n),n}function bs(t){const e=t[0];return e instanceof HTMLElement?e.shadowRoot:null}function _s(t){const e=bs(t);return e?An(e):t}function Ss({$container:t,selector:e}){const n=bs(t);return n?An(n.querySelectorAll(e)):t.find(e)}function Is({shadowHost:t,$renderedContent:e}){const n=(e.get()??[]).filter(t=>t instanceof HTMLElement);const i=!t.shadowRoot;(i?t.attachShadow({mode:"open"}):t.shadowRoot).append(...n),i&&t.appendChild(document.createElement("div"))}function ks({cssString:t,formId:e,forShadowHost:n}){const i=n?":host":`#${as(e)}`;return t.replace(/\/\*.*?\*\//gm,"").replace(/(#popmechanic-(?:form|button))(\s|\.|:|{|,)/g,` $1-${e}$2`).replace(/(#popmechanic-container)(\s|\.|:|{|,)/g,n?":host$2":` $1-${e}$2`).replace(Cs,function(t,e,r){const o=r.split(",");for(let s=0;s{+~,(]|\([^)]*\))+)/,"$1:host($2)")}ls=window.device,window.device=cs,ds=window.document.documentElement,ys=function(){return window.navigator.userAgent.toLowerCase()},cs.ios=function(){return cs.iphone()||cs.ipod()||cs.ipad()},cs.iphone=function(){return!cs.windows()&&hs("iphone")},cs.ipod=function(){return hs("ipod")},cs.ipad=function(){return hs("ipad")||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform)},cs.android=function(){return!cs.windows()&&hs("android")},cs.androidPhone=function(){return cs.android()&&hs("mobile")},cs.androidTablet=function(){return cs.android()&&!hs("mobile")},cs.blackberry=function(){return hs("blackberry")||hs("bb10")||hs("rim")},cs.blackberryPhone=function(){return cs.blackberry()&&!hs("tablet")},cs.blackberryTablet=function(){return cs.blackberry()&&hs("tablet")},cs.windows=function(){return hs("windows")},cs.macosx=function(){return hs("mac os x")},cs.linux=function(){return hs("linux")},cs.windowsPhone=function(){return cs.windows()&&hs("phone")},cs.windowsTablet=function(){return cs.windows()&&hs("touch")&&!cs.windowsPhone()},cs.fxos=function(){return(hs("(mobile;")||hs("(tablet;"))&&hs("; rv:")},cs.fxosPhone=function(){return cs.fxos()&&hs("mobile")},cs.fxosTablet=function(){return cs.fxos()&&hs("tablet")},cs.meego=function(){return hs("meego")},cs.cordova=function(){return window.cordova&&"file:"===location.protocol},cs.nodeWebkit=function(){return"object"==typeof window.process},cs.mobile=function(){return cs.androidPhone()||cs.iphone()||cs.ipod()||cs.windowsPhone()||cs.blackberryPhone()||cs.fxosPhone()||cs.meego()},cs.tablet=function(){return!cs.mobile()&&(cs.ipad()||cs.androidTablet()||cs.blackberryTablet()||cs.windowsTablet()||cs.fxosTablet())},cs.desktop=function(){return!cs.tablet()&&!cs.mobile()},cs.television=function(){let t,e;for(e=["googletv","viera","smarttv","internet.tv","netcast","nettv","appletv","boxee","kylo","roku","dlnadoc","roku","pov_tv","hbbtv","ce-html","android tv","google_atv","tizen","smart-tv","web0s","webos.tv","crkey","fire tv"],t=0;t1},cs.landscape=function(){return window.innerHeight/window.innerWidth<1},cs.noConflict=function(){return window.device=ls,this},hs=function(t){return-1!==ys().indexOf(t)},ms=function(t){let e;return e=new RegExp(t,"i"),ds.className.match(e)},us=function(t){let e,n;n=t.split(/\s+/).map(function(t){return cn.CSS_PREFIX+t}).filter(function(t){return!ms(t)}).join(" "),e=ds.className.replace(/^\s+|\s+$/g,""),ds.className=e+" "+n},gs=function(t){const e=cn.CSS_PREFIX+t;ms(e)&&(ds.className=ds.className.replace(" "+e,""))},cs.ios()?cs.ipad()?us("ios ipad tablet"):cs.iphone()?us("ios iphone mobile"):cs.ipod()&&us("ios ipod mobile"):cs.android()?cs.androidTablet()?us("android tablet"):us("android mobile"):cs.blackberry()?cs.blackberryTablet()?us("blackberry tablet"):us("blackberry mobile"):cs.windows()?cs.windowsTablet()?us("windows tablet"):cs.windowsPhone()?us("windows mobile"):us("desktop"):cs.fxos()?cs.fxosTablet()?us("fxos tablet"):us("fxos mobile"):cs.meego()?us("meego mobile"):cs.nodeWebkit()?us("node-webkit"):cs.television()?us("television"):cs.desktop()&&us("desktop"),cs.cordova()&&us("cordova"),fs=function(){cs.landscape()?(gs("portrait"),us("landscape")):(gs("landscape"),us("portrait"))},ps=Object.prototype.hasOwnProperty.call(window,"onorientationchange")?"orientationchange":"resize",window.addEventListener?window.addEventListener(ps,fs,!1):window.attachEvent?window.attachEvent(ps,fs):window[ps]=fs,fs();const Cs=/((?:^|})[\s\n]*)((?:(?:(?:[.#:][_a-zA-Z0-9-.:]+)|\*|\+|~|>)[^{]*)+{)/gm,Es=/\.popmechanic-(?:success|error|pending|submitted|desktop|tablet|mobile|fullscreen)(\s|\.|#|:)/g;function xs(t,e,n){return""+t.replace(/id=["']popmechanic-(form|button)["']/g,`id="${cn.CSS_PREFIX}$1-${e}"`)}function Ts(t){return cn.CSS_PREFIX+"form-"+t}let $s;const Rs=new class{init(){const t=An("#"+cn.CSS_PREFIX+"snippet");if(t.length>0)$s=t;else{$s=this.createSnippet();const t=()=>{An("body").length?$s.prependTo("body"):setTimeout(t,100)};t()}window.PopMechanic.getContainer=this.getContainer.bind(this),window.PopMechanic.getContainerId=as}getContainer(t){const e=as(t);let n=$s.find(`#${e}`);return 0!==n.length||(n=ws(t),n.appendTo($s)),n}snippetHasForm(t){const e=`#${cn.CSS_PREFIX}form-${t}`;return 0!==$s.find(e).length||0!==Ss({$container:$s.find(`#${as(t)}`),selector:e}).length}createSnippet(){return An(`
`)}};function Os(t){return Rs.getContainer(t)}Rs.init();const Fs={geo_city_ru:"city_ru",geo_city_en:"city_en",geo_country_ru:"country_ru",geo_country_en:"country_en",geo_geoname_id:"city_id"},As=Object.keys(Fs),Ms=As.map(t=>`%${t}%`),js=[{pointOfContact:"Email",systemName:"email"},{pointOfContact:"Sms",systemName:"mobilePhone"}],Ds=/date/i,qs=["day","month","year"],Ns=["createddate","createdtime"];class Ls extends xo{constructor(t){super(t),this.geoData=null,this.needsGeo=this.getNeedsGeo()}async sendContacts(t){if(await this.getGeoPromise(),await oo.getMindboxIsReadyPromise(),!$r())return;const e={};if(function(){const t=window[ss];return Boolean(t?.botProtection?.enabled)}()){const t=Os(this.form),n=`${cn.CSS_PREFIX}-bot-protection-${this.form}-${Date.now()}`,i=An(`
`);t.append(i),e.botProtection={enabled:!0,selector:`#${n}`},e.onSuccess=()=>{i.remove()}}return await this.sendAsync({operation:this.data.operation,data:this.getOperationData(t),...e}),t}onShow(){this.getGeoPromise()}sendAsync(t){return new Promise((e,n)=>{Tr("async",{...t,onSuccess:()=>{"function"==typeof t.onSuccess&&t.onSuccess(),e()},onValidationError:t=>{n(t)},onError:t=>{n(t)}})})}getNeedsGeo(){const t=[];return this.data.send_customer&&this.data.customer_extended&&this.data.customer_extended.length&&t.push(...this.data.customer_extended),this.data.issue_action&&this.data.customer_action_extended&&this.data.customer_action_extended.length&&t.push(...this.data.customer_action_extended),t.some(({value:t})=>Ms.includes(t))}getOperationData(t){const e=this.data,n={};if(e.send_customer){const i=e.customer_extended;if(i&&i.length){if(n.customer=i.reduce((e,{value:n,systemName:i})=>this.addOperationFieldValue(e,t,i,n),{}),"create"===e.mode){const t=this.filterSubscriptionsByRequiredContact(e.subscriptions,n.customer);n.customer.subscriptions=this.deleteRequireContactField(t)}0===Object.keys(n.customer).length&&delete n.customer}}if(e.issue_action&&e.customer_action_extended){const i=e.customer_action_extended;i&&i.length&&(n.customerAction=i.reduce((e,{value:n,systemName:i})=>this.addOperationFieldValue(e,t,i,n),{}),0===Object.keys(n.customerAction).length&&delete n.customerAction)}return n}getDateFromDayMonthYear(t){const e=qs.map(e=>null!=t.customs?.[e]?String(t.customs[e]).trim():"");if(e.some(t=>!t))return null;const[n,i,r]=e;return`${r}-${i.padStart(2,"0")}-${n.padStart(2,"0")}`}addOperationFieldValue(t,e,n,i){if(function(t){const e=t.split(".").map(t=>t.toLowerCase());return!e.some(t=>Ns.includes(t))&&e.some(t=>Ds.test(t))}(n)){const i=this.getDateFromDayMonthYear(e);if(i)return ns(t,n,i),t}const r=ts(i.replace(/%/g,""));let o;if("customs."===r.slice(0,8)){const t=r.slice(8);t in e.customs&&(o=e.customs[t])}else r in e?o=e[r]:"created_date"===r?o=(new Date).toISOString().split("T")[0]:"created_time"===r?o=(new Date).toISOString():As.includes(r)&&(o=this.geoData[Fs[r]]);if(void 0!==o)if(Array.isArray(o))ns(t,n,o.map(t=>es(t)));else{const i=es(o),r=this._interpolate(i,{lead:e});ns(t,n,r)}else console.warn(`Mindbox personalization module: couldn't retrieve value for field "${i}". Skipping the field. It may lead to the inconsistency or data losses. Check the form template settings.`);return t}async getGeoPromise(){if(this.needsGeo){const t=await rs();this.geoData=t}}filterSubscriptionsByRequiredContact(t,e){if(!t||!Array.isArray(t))return t||[];return t.some(t=>t&&!0===t.requireContact)?t.filter(t=>{if(!t||!t.pointOfContact||!0!==t.requireContact)return!0;const n=t.pointOfContact.toLowerCase(),i=js.find(t=>t.pointOfContact.toLowerCase()===n);if(!i)return!0;const r=e[i.systemName];return null!=r&&""!==r&&"None"!==r}):t}deleteRequireContactField(t){return t.map(t=>{const{requireContact:e,...n}=t;return{...n}})}onRender(){}onTargetingReady(){}onClose(){}onContactsSent(){}}const Bs=t=>"single"===t.type||"multiple"===t.type||"scale"===t.type,zs=(t,e,n)=>{if(!n||0===n.length)return;if(1===n.length)return n[0];const i=((t,e)=>{const n=[];for(const{question:i,answer:r}of e){const e=t.find(t=>t.systemName===i);if(!e||!Bs(e))continue;const o=Array.isArray(r)?r:[r];for(const t of o){const i=e.options.find(e=>e.value===t);i?.tags&&n.push(...i.tags)}}return n})(e,t),r=new Set(i.map(t=>t.id)),o=[];for(const a of n){if(!a.tags||0===a.tags.length)continue;if(!a.tags.every(t=>r.has(t)))continue;const t=i.filter(t=>a.tags.includes(t.id)).reduce((t,e)=>t+e.weight,0);o.push({weight:t,final:a})}if(0===o.length)return n[0];o.sort((t,e)=>e.weight-t.weight);const s=o[0].weight;return o.filter(t=>t.weight===s).length>1?n[0]:o[0].final};function Hs(t,e){switch(t.type){case"single":case"scale":{const n=Array.isArray(e)?e[0]:e;return t.options.find(t=>String(t.value)===String(n))?.nextSystemName??null}case"multiple":case"freeform":return t.nextSystemName??null;case"system":return null;default:throw new Error(`Unsupported question type: ${t.type}`)}}function Us(t,e){for(const n of e){const e=t.find(t=>t.systemName===n.question);if(!e)continue;if("finish"===Hs(e,n.answer))return!0}return!1}function Ws(){return"desktop"===oo.getDeviceType()?"desktop":"mobile"}const Xs=class t extends Eo{shouldRunForControlGroup(){return!0}onTargetingReady(e){Zo(async()=>{const n=await e.form.quizConfigPromise;if(n&&(await oo.getMindboxIsReadyPromise(),$r()))return this.sendAsync(t.TARGETING_OPERATION,{deviceType:Ws(),quizInternalId:n.internalId,structureInternalId:n.structure.internalId})})}onQuizAnswer(e){if(!e.quizConfig)return;if(!e.actUuid||!e.actUuidDateTimeUtc)return;const n=function(t){const{quiz:e,answers:n,actUuid:i,actUuidDateTimeUtc:r,deviceType:o}=t,s=zs(n,e.structure.questions,e.finals)?.externalId;return{deviceType:o,quizInternalId:e.internalId,structureInternalId:e.structure.internalId,traceId:i,traceDateTimeUtc:r,pageUrl:window.location.href,...void 0!==s&&{finalsExternalId:s},finished:Us(e.structure.questions,n),answers:e.structure.questions.map(t=>function(t,e){const n=e.find(e=>e.question===t.systemName);return{question:{type:t.type,systemName:t.systemName,customField:t.customField??null},value:n?.answer??null}}(t,n))}}({quiz:e.quizConfig,answers:e.answers,actUuid:e.actUuid,actUuidDateTimeUtc:e.actUuidDateTimeUtc,deviceType:Ws()});Zo(async()=>{if(await oo.getMindboxIsReadyPromise(),$r())return this.sendAsync(t.ANSWERS_OPERATION,n)})}onMatcherProductClick(e){if(!e.quizConfig)return;const n={deviceType:Ws(),quizInternalId:e.quizConfig.internalId,productInternalId:e.productInternalId};Zo(async()=>{if(await oo.getMindboxIsReadyPromise(),$r())return this.sendAsync(t.CLICK_OPERATION,n)})}onShow(){}onClose(){}onContactsSent(){}onRender(){}sendAsync(t,e){return new Promise((n,i)=>{Tr("async",{operation:t,data:e,onSuccess:n,onValidationError:i})})}};Xs.TARGETING_OPERATION="Quiz.Targeting",Xs.ANSWERS_OPERATION="Quiz.Answers",Xs.CLICK_OPERATION="Quiz.Click";let Gs=Xs;function Vs(){return function(t){return t({result:!1,final:!0}),Js}}function Qs(){return!1}function Js(){}function Ks(t){return t.final&&t.result}function Zs(t){return t.final&&!t.result}const Ys=t=>"object"==typeof t&&null!==t&&"segment"in t,ta=t=>"object"==typeof t&&null!==t&&("forms"in t||"formsAny"in t||"interval"in t),ea={$exists:(t,e)=>{if(!Ys(t))return!1;const n=t.segment;return"$any"===n?!!e:"$none"===n?!e:n.externalId===e},$not_exists:(t,e)=>{if(!Ys(t))return!1;const n=t.segment;return"$any"===n?!e:"$none"===n?!!e:n.externalId!==e}};function na(t){return function(e,n,i,r){return ea[e.operator]?function(n,i){if("object"!=typeof(o=e.value)||null===o||!("segmentation"in o))return void n({result:!1,final:!0});var o;const s=t(e.id+"."+i.id,r,e.value.segmentation.externalId);return s.promise.then(t=>ea[e.operator](e.value,t)).catch(Qs).then(t=>{n({result:t,final:!0})}),function(){s.cancel&&s.cancel()}}:Vs()}}const ia={_segments:[],get:function(t,e){return this._segments.find(n=>n.segmentationId===e&&Bo(n.productItem,t))},set:function({productItem:t,segmentationId:e,segmentId:n,ts:i}){const r=this._segments.filter(n=>!(n.segmentationId===e&&Bo(n.productItem,t)));r.push({productItem:t,segmentationId:e,segmentId:n,ts:i}),this._segments=r},clear:function(){this._segments=[]}};function ra(t,e){return Bo(t.productItem,e.productItem)&&t.segmentationId===e.segmentationId}Kr.on("destroy",()=>{ia.clear()});class oa{constructor(t=50,e=10){this.productItems=[],this.segmentations=[],this.items=[],this.maxProducts=t,this.maxSegmentations=e}addItem(t){const e=!this.productItems.find(e=>Bo(e,t.productItemSegmentation.productItem)),n=!this.segmentations.find(e=>e.ids.externalId==t.productItemSegmentation.segmentationId),i=this.productItems.length({ids:qt(t.ids,t=>null==t?t:t.toString())}))),n&&this.segmentations.push({ids:{externalId:t.productItemSegmentation.segmentationId}}),this.items.push(t)),!1}getFullResponse(t){const e=+Date.now();return this.productItems.reduce((n,i)=>{const r=t.find(t=>Bo(t,i))||{segmentations:[]};return[...n,...this.segmentations.map(t=>{const n=r.segmentations.find(e=>e.ids.externalId===t.ids.externalId);return{productItem:i,segmentationId:t.ids.externalId,segmentId:n&&n.segment&&(n.segment.externalId||n.segment.ids&&n.segment.ids.externalId)||null,ts:e}})]},[])}hasItems(){return this.items.length>0}hasItemWithSameSegmentation(t){return this.items.some(e=>ra(t.productItemSegmentation,e.productItemSegmentation))}getItems(){return this.items}getProducts(){return this.productItems.map(t=>"product"in t?t.product:null).filter(t=>!!t)}getProductGroups(){return this.productItems.map(t=>"productGroup"in t?t.productGroup:null).filter(t=>!!t)}getSegmentations(){return this.segmentations}getProductItems(){return this.productItems}}function sa(){return!0}const aa={async pushAll(t){const e=await br.getIdb();if(e)return new Promise(function(n,i){const r=e.transaction([mr],"readwrite"),o=r.objectStore(mr);t.forEach(t=>{o.add(t)}),r.oncomplete=()=>{n("OK")},r.onerror=t=>{i(t)}})},async removeBy(t=sa){const e=await br.getIdb();if(!e)throw void 0;return new Promise((n,i)=>{const r=e.transaction([mr],"readwrite");r.objectStore(mr).openCursor().onsuccess=e=>{const n=e.target.result;n&&(t(n.value)&&n.delete(),n.continue())},r.oncomplete=()=>{n("OK")},r.onerror=t=>{i(t)}})},async first(t=sa,e=0){const n=await br.getIdb();if(!n)throw void 0;return new Promise(i=>{n.transaction([mr]).objectStore(mr).openCursor().onsuccess=n=>{const r=n.target.result;if(r){const n=r.value;e{const o=n.target.result;if(o){const n=o.value;e{this.run()},this.initialDelay))}cancelItem(t){this.pendingItems=this.pendingItems.filter(e=>e.id!==t)}hasItemBatched(t){return this.batches.some(e=>e.hasItemWithSameSegmentation(t))}getNotBatchedItems(){return this.pendingItems.filter(t=>!this.hasItemBatched(t))}hasNotBatchedItems(){return this.pendingItems.some(t=>!this.hasItemBatched(t))}async run(){this.isRunning=!0;const t=new oa;if(this.getNotBatchedItems().forEach(e=>{t.addItem(e)}),t.hasItems()){this.batches.push(t);const e=t.getProducts(),n=t.getProductGroups(),i=t.getSegmentations(),r=await this.sendMRequest({products:e,productGroups:n,segmentations:i}),o=t.getFullResponse(r);Zo(()=>this.saveSegmentationsHistory(o));const s=this.pendingItems.filter(e=>t.hasItemWithSameSegmentation(e));s.forEach(t=>{const e=o.find(e=>ra(e,t.productItemSegmentation));t.onSuccess(e)}),this.pendingItems=Qe(this.pendingItems,s),this.batches=Je(this.batches,t)}this.hasNotBatchedItems()?setTimeout(()=>{this.run()},this.repeatInterval):this.isRunning=!1}sendMRequest(t){return new Promise((e,n)=>{Tr("helpers.checkProductSegments",{...t,onSuccess:e,onError:n})})}async saveSegmentationsHistory(t){try{await aa.removeBy(e=>!e.productItem||!!t.find(t=>ra(e,t)))}finally{await aa.pushAll(t.map(t=>({...t,segmentationId:t.segmentationId.toString(),segmentId:t.segmentId||"null",ts:t.ts||Date.now()})))}}};function la(t){const e=t.productItemSegmentations.map((e,n)=>{let i=null;const r=new Promise(t=>{i=t});return{id:t.id+"["+n+"]",productItemSegmentation:e,onSuccess:i,promise:r}});return{promise:new Promise(t=>{e.forEach(t=>ca.addItem(t)),Promise.all(e.map(t=>t.promise)).then(t)}),cancel:()=>{e.forEach(t=>{ca.cancelItem(t.id)})}}}const ua=864e5,da=(t,e,n)=>{const i={promise:Promise.resolve(null),cancel:null},r=ia.get(e,n);return void 0!==r&&+Date.now()-r.tsBo(t.productItem,e)&&t.segmentationId===n,+Date.now()-ua).then(function(r){if(r)return r.segmentId;const o=la({id:t,productItemSegmentations:[{productItem:e,segmentationId:n}]});return i.cancel=o.cancel,o.promise.then(t=>{const i=t[0],r=i?i.segmentId:null;return ia.set({productItem:e,segmentationId:n,segmentId:r,ts:i.ts}),r})}),i)},ha={aggregators:{$exists:async(t,e)=>{try{const n=No(await jo());return n?e(n).then(t):void t({result:!1,final:!0})}catch(n){n instanceof Error&&n.message===Ro&&t({result:!1,final:!0})}},$not_exists:async(t,e)=>{try{const n=No(await jo());if(!n)return void t({result:!0,final:!0});const i=await e(n);t({result:!i.result,final:i.final})}catch(n){n instanceof Error&&n.message===Ro&&t({result:!1,final:!0})}}},fieldCheckers:{mindboxProductSegment:na(da)},getFieldValues:t=>({productId:()=>{const e=Ao(t);return e&&Mo(e)||""}})};function fa(t,e,n,i){return i&&"$in"===t.operator?function(e){if(n=t.value,!Array.isArray(n)||!n.every(t=>(t=>"object"==typeof t&&null!==t&&("externalId"in t||"externalSystemName"in t))(t)))return e({result:!1,final:!0});var n;return e({result:t.value.some(t=>Lo({[t.externalSystemName]:t.externalId},i)),final:!0}),null}:Vs()}const ma={aggregators:{$exists:async(t,e,n,i)=>{try{if(!i.categoryIds)return void t({result:!1,final:!0});t(await e(i.categoryIds))}catch{}},$not_exists:async(t,e,n,i)=>{try{if(!i.categoryIds)return void t({result:!0,final:!0});const n=await e(i.categoryIds);t({result:!n.result,final:n.final})}catch{}}},fieldCheckers:{mindboxCategoryId:fa},getFieldValues:t=>({categoryId:()=>Mo(t)||""})},pa={push:t=>br.push(hr,t),async enrich(t,e){const n=await br.getIdb();if(n)return new Promise((i,r)=>{const o=n.transaction([hr],"readwrite").objectStore(hr),s=o.get(t);s.onsuccess=()=>{const n={...s.result,...e},a=o.put(n,t);a.onsuccess=()=>i(),a.onerror=r},s.onerror=()=>r(void 0)})},async count(t=sa,e=0,n){const i=await br.getIdb();if(!i)throw void 0;return new Promise(function(r){const o=[],s=i.transaction(hr).objectStore(hr).index(n?"vst":"url");let a=n?IDBKeyRange.only(n):null;n||"string"!=typeof t||(a=IDBKeyRange.only(t)),s.openCursor(a).onsuccess=n=>{const i=n.target.result;if(i){const n=i.value;if(n.ts>=e){const e=Promise.resolve("string"==typeof t?t===n.url:t(n));o.push(e)}i.continue()}else Promise.all(o).then(t=>{const e=t.filter(Boolean).length;r(e)})}})},async exists(t,e,n){const i=await br.getIdb();if(!i)throw void 0;return void 0===t&&(t=sa),void 0===e&&(e=0),new Promise(function(r){const o=[],s=i.transaction(hr).objectStore(hr).index(n?"vst":"url");let a=n?IDBKeyRange.only(n):null;n||"string"!=typeof t||(a=IDBKeyRange.only(t)),s.openCursor(a,"prev").onsuccess=n=>{const i=n.target.result;if(i){const n=i.value;if(n.ts>=e){const e=Promise.resolve("string"==typeof t?t===n.url:t(n));o.push(e)}i.continue()}else Promise.all(o).then(t=>{const e=t.find(Boolean);r(!!e)})}})},async lastProducts(t=10){const e=await br.getIdb();if(!e)throw void 0;return new Promise(function(n){const i=[];e.transaction(hr).objectStore(hr).openCursor(null,"prev").onsuccess=e=>{const r=e.target.result;if(r){const e=r.value.productItem;if(e){!i.find(t=>Bo(e,t))&&i.push(e)}i.length>=t&&n(i),r.continue()}else n(i)}})}},ga=864e5,ya=t=>{t.forEach(t=>{ia.set({productItem:t.productItem,segmentationId:t.segmentationId,segmentId:t.segmentId,ts:t.ts})})},va=oo.waitPromisesOrDelay([Do()]);let wa={isInitialized:!1,items:[]};Kr.on("destroy",function(){wa={isInitialized:!1,items:[]}});const ba=()=>wa.isInitialized?Promise.resolve(null):pa.lastProducts(10).then(t=>{wa.items=t}),_a={aggregators:{$exists:async(t,e,n,i)=>{try{if(!i.productItem)return void t({result:!1,final:!0});t(await e(i.productItem))}catch{}},$not_exists:async(t,e,n,i)=>{try{if(!i.productItem)return void t({result:!0,final:!0});const n=await e(i.productItem);t({result:!n.result,final:n.final})}catch{}}},getFieldValues:t=>({productId:()=>{const e=Ao(t);return e&&Mo(e)||""}}),fieldCheckers:{mindboxProductSegment:na((t,e,n)=>{const i={promise:Promise.resolve(null),cancel:null};return i.promise=va.then(ba).then(()=>{const r=((t,e)=>t.filter(t=>{const n=ia.get(t,e);return!(n&&+Date.now()-n.ts{const i={promise:Promise.resolve(),cancel:null};return e.length&&(i.promise=aa.all(t=>t.segmentationId===n&&!!e.find(e=>Bo(t.productItem,e)),+Date.now()-ga).then(r=>{const o=e.filter(t=>!r.find(e=>Bo(t,e.productItem)));if(ya(r),o.length){const e=la({id:t,productItemSegmentations:o.map(t=>({productItem:t,segmentationId:n}))});return i.cancel=e.cancel,e.promise.then(ya)}return Promise.resolve(null)})),i})(t,r,n);return i.cancel=o.cancel,o.promise.then(()=>ia.get(e,n).segmentId)}return ia.get(e,n).segmentId}),i})}};let Sa,Ia=()=>{const t=oo.getIntegrationPromise("PopMechanicPageData");return t.then(t=>{Ia=()=>Promise.resolve(t)}),t},ka=()=>{const t=oo.getIntegrationPromise("PopMechanicCartData");return t.then(t=>{ka=()=>Promise.resolve(t)}),t};const Pa=new Promise(function(t){Sa=t});let Ca;const Ea=new Promise(function(t){Ca=t});function xa(t){return function(e,n){return Array.isArray(e)?e.some(e=>t(e,n)):t(e,n)}}const Ta={$in:(t,e)=>!!Array.isArray(t)&&t.some(t=>t===e),$nin:(t,e)=>!Array.isArray(t)||!t.some(t=>t===e),$in_contains:(t,e)=>xa(Ta.$contains)(t,e),$in_startsWith:(t,e)=>xa(Ta.$startsWith)(t,e),$in_endsWith:(t,e)=>xa(Ta.$endsWith)(t,e),$in_regexp:(t,e)=>xa(Ta.$regexp)(t,e),$contains:(t,e)=>{const n=""+t;return 0===n.length||-1!==(""+e).indexOf(n)},$exclude:(t,e)=>!Ta.$contains(t,e),$startsWith:(t,e)=>{const n=""+t;return 0===n.length||0===(""+e).indexOf(n)},$endsWith:(t,e)=>{const n=""+e,i=""+t;return 0===i.length||n.length>=i.length&&n.indexOf(i)===n.length-i.length},$regexp:(t,e)=>new RegExp(String(t)).test(String(e)),$not_regexp:(t,e)=>!new RegExp(String(t)).test(String(e)),$any:(t,e)=>!Array.isArray(e)||e.length>0,$none:(t,e)=>Array.isArray(e)&&0===e.length,$after:(t,e)=>"object"==typeof t&&"interval"in t&&Date.now()-Number(e)>=1e3*t.interval,$eq:(t,e)=>t===e,$neq:(t,e)=>t!==e,$gt:(t,e)=>e>t,$lt:(t,e)=>ee>=t,$lte:(t,e)=>e<=t,$between:(t,e)=>{if("object"!=typeof t||!("min"in t)||!("max"in t))return!1;const n=null===t.min?-1/0:t.min,i=null===t.max?1/0:t.max;return e>=n&&e<=i}},$a=()=>oo.waitPromisesOrDelay([Pa,Ea]),Ra={aggregators:{$count:async(t,e,n)=>{try{await $a();const i=await pa.count(async t=>(await e(t)).result);t({result:(Ta[n.operator]||Qs)(n.value,i),final:!0})}catch{t({result:!1,final:!0})}},$anyOf:async(t,e)=>{try{await $a();t({result:await pa.exists(async t=>(await e(t)).result),final:!0})}catch{t({result:!1,final:!0})}},$noneOf:async(t,e)=>{try{await $a();t({result:!(await pa.exists(async t=>(await e(t)).result)),final:!0})}catch{t({result:!1,final:!0})}}},getFieldValues:t=>({url:()=>t.url,productId:()=>t.product&&t.product.id?t.product.id.toString():"",productName:()=>t.product&&t.product.name,productCategoryId:()=>t.product&&t.product.categoryId?t.product.categoryId.toString():"",productBrandName:()=>t.product&&t.product.brand,productPrice:()=>t.product&&t.product.price,productPriceWithDiscount:()=>t.product&&t.product.priceWithDiscount,productDiscount:()=>t.product&&t.product.price>t.product.priceWithDiscount?100*(t.product.price-t.product.priceWithDiscount)/t.product.price:0,categoryId:()=>t.category&&t.category.id?t.category.id.toString():"",time_passed:e=>{if("$current_session"===e.value)return t.vst;const n=Date.now();return Math.floor((n-t.ts)/1e3)}}),conditionMappers:{productId:function(t){return t?t.toString():""},productCategoryId:function(t){return t?t.toString():""},categoryId:function(t){return t?t.toString():""},url:function(t){return"$current_url"===t?location.href:t},time_passed:function(t){return"$current_session"===t?or.get.udata.vst:t}},aggregatedConditions:{mindboxProduct:_a,mindboxCategory:ma}};function Oa(t){return t.product?{product:t.product}:t.productGroup?{productGroup:t.productGroup}:null}function Fa(t){return t.nodes.some(t=>!!t.field||Fa(t))}const Aa=(t,e,n)=>{let i=null;const r=ue(async r=>{const o=te(t);i=o;await e(r,t=>{i===o&&n(t)})},2e3);Oo(t=>{t&&(t.type===Ro&&r(null),t.cart&&r(t.cart))})},Ma={mindboxProduct:ha,mindboxCategory:{aggregators:{$exists:async(t,e)=>{try{const n=await jo();if(!n||!n.category)return void t({result:!1,final:!0});t(await e(n.category.ids))}catch{}},$not_exists:async(t,e)=>{try{const n=await jo();if(!n||!n.category)return void t({result:!0,final:!0});const i=await e(n.category.ids);t({result:!i.result,final:i.final})}catch{}}},fieldCheckers:{mindboxCategoryId:fa},getFieldValues:t=>({categoryId:()=>Mo(t)||""})},visited_pages:Ra,"visited-pages":Ra,mindboxCart:{aggregators:{$count:(t,e,n)=>{Aa(n.id,async(t,i)=>{t||i({result:!1,final:!1});const r=Ta[n.operator]||Qs;if(Fa(n.filter)){let o=0;const s=[];t.forEach(t=>{s.push(e(Oa(t)).then(e=>{e.result&&(o+=Number(t.count))}))});try{await Promise.all(s),i({result:r(n.value,o),final:!1})}catch{}}else{const e=t.reduce((t,e)=>t+Number(e.count),0);i({result:r(n.value,e),final:!1})}},t)},$countDistinct:(t,e,n)=>{Aa(n.id,async(t,i)=>{t||i({result:!1,final:!1});const r=Ta[n.operator]||Qs;if(Fa(n.filter)){let o=0;const s=[];t.forEach(t=>{s.push(e(Oa(t)).then(t=>{t.result&&o++}))});try{await Promise.all(s),i({result:r(n.value,o),final:!1})}catch{}}else{const e=t.reduce(t=>t+1,0);i({result:r(n.value,e),final:!1})}},t)},$priceSum:(t,e,n)=>{Aa(n.id,async(t,i)=>{t||i({result:!1,final:!1});const r=Ta[n.operator]||Qs;if(Fa(n.filter)){let o=0;const s=[];t.forEach(t=>{s.push(e(Oa(t)).then(e=>{e.result&&(o+=zo(t.priceOfLine)||zo(t.pricePerItem)*zo(t.count)||0)}))});try{await Promise.all(s),i({result:r(n.value,o),final:!1})}catch{}}else{const e=t.reduce((t,e)=>t+=zo(e.priceOfLine)||zo(e.pricePerItem)*zo(e.count)||0,0);i({result:r(n.value,e),final:!1})}},t)},$anyOf:(t,e,n)=>{Aa(n.id,async(t,i)=>{if(t||i({result:!1,final:!1}),!Fa(n.filter)&&t.length)i({result:!0,final:!1});else{const n=[];t.forEach(t=>{n.push(e(Oa(t)).then(t=>t.result?Promise.reject():Promise.resolve()))});try{await Promise.all(n),i({result:!1,final:!1})}catch{i({result:!0,final:!1})}}},t)},$noneOf:(t,e,n)=>{Aa(n.id,async(t,i)=>{if(t||i({result:!1,final:!1}),Fa(n.filter)||t.length){const n=[];t.forEach(t=>n.push(e(Oa(t)).then(t=>t.result?Promise.reject():Promise.resolve())));try{await Promise.all(n),i({result:!0,final:!1})}catch{i({result:!1,final:!1})}}else i({result:!0,final:!1})},t)},$every:(t,e,n)=>{Aa(n.id,async(t,i)=>{if(t||i({result:!1,final:!1}),Fa(n.filter)){const n=[];t.forEach(t=>{n.push(e(Oa(t)).then(t=>t.result?Promise.resolve():Promise.reject()))});try{await Promise.all(n),i({result:!0,final:!1})}catch{i({result:!1,final:!1})}}else i({result:!!t.length,final:!1})},t)}},fieldCheckers:{mindboxProductSegment:na(da)}}},ja={device:()=>cs.desktop()?"pc":cs.tablet()?"tablet":"mobile",operating_system:()=>cs.windows()?"windows":cs.ios()?"ios":cs.macosx()?"macos":cs.android()?"android":cs.linux()?"linux":"other"},Da={country:()=>os.getGeo().then(t=>t.country_id),region:()=>os.getGeo().then(t=>t.region_id),city:()=>os.getGeo().then(t=>t.city_id)},qa={visited_url:t=>{const e="object"==typeof(n=t.value)&&null!==n&&("pattern"in n||"operator"in n||"interval"in n)?t.value:void 0;var n;let i,r,o;return e.operator in Ta&&(i=t=>Ta[e.operator](e.pattern,t&&t.url)),"number"==typeof e.interval&&(r=Date.now()-1e3*e.interval),"$session"===e.interval&&(o=or.get.udata.vst),pa.count(i,r,o).then(t=>t)}},Na={visited_url:function(t){return parseInt(t.visits,10)}},La={push_request_unavailable:()=>!(window.PushManager&&"default"===Notification.permission)};var Ba="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function za(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var Ha,Ua={exports:{}};var Wa,Xa,Ga=(Ha||(Ha=1,Wa=Ua,Xa=Ua.exports,function(t){var e=Xa&&!Xa.nodeType&&Xa,n=Wa&&!Wa.nodeType&&Wa,i="object"==typeof Ba&&Ba;i.global!==i&&i.window!==i&&i.self!==i||(t=i);var r,o,s=2147483647,a=36,c=/^xn--/,l=/[^\x20-\x7E]/,u=/[\x2E\u3002\uFF0E\uFF61]/g,d={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},h=Math.floor,f=String.fromCharCode;function m(t){throw new RangeError(d[t])}function p(t,e){for(var n=t.length,i=[];n--;)i[n]=e(t[n]);return i}function g(t,e){var n=t.split("@"),i="";return n.length>1&&(i=n[0]+"@",t=n[1]),i+p((t=t.replace(u,".")).split("."),e).join(".")}function y(t){for(var e,n,i=[],r=0,o=t.length;r=55296&&e<=56319&&r65535&&(e+=f((t-=65536)>>>10&1023|55296),t=56320|1023&t),e+=f(t)}).join("")}function w(t){return t-48<10?t-22:t-65<26?t-65:t-97<26?t-97:a}function b(t,e){return t+22+75*(t<26)-((0!=e)<<5)}function _(t,e,n){var i=0;for(t=n?h(t/700):t>>1,t+=h(t/e);t>455;i+=a)t=h(t/35);return h(i+36*t/(t+38))}function S(t){var e,n,i,r,o,c,l,u,d,f,p=[],g=t.length,y=0,b=128,S=72;for((n=t.lastIndexOf("-"))<0&&(n=0),i=0;i=128&&m("not-basic"),p.push(t.charCodeAt(i));for(r=n>0?n+1:0;r=g&&m("invalid-input"),((u=w(t.charCodeAt(r++)))>=a||u>h((s-y)/c))&&m("overflow"),y+=u*c,!(u<(d=l<=S?1:l>=S+26?26:l-S));l+=a)c>h(s/(f=a-d))&&m("overflow"),c*=f;S=_(y-o,e=p.length+1,0==o),h(y/e)>s-b&&m("overflow"),b+=h(y/e),y%=e,p.splice(y++,0,b)}return v(p)}function I(t){var e,n,i,r,o,c,l,u,d,p,g,v,w,S,I,k=[];for(v=(t=y(t)).length,e=128,n=0,o=72,c=0;c=e&&gh((s-n)/(w=i+1))&&m("overflow"),n+=(l-e)*w,e=l,c=0;cs&&m("overflow"),g==e){for(u=n,d=a;!(u<(p=d<=o?1:d>=o+26?26:d-o));d+=a)I=u-p,S=a-p,k.push(f(b(p+I%S,0))),u=h(I/S);k.push(f(b(u,0))),o=_(n,w,i==r),n=0,++i}++n,++e}return k.join("")}if(r={version:"1.4.1",ucs2:{decode:y,encode:v},decode:S,encode:I,toASCII:function(t){return g(t,function(t){return l.test(t)?"xn--"+I(t):t})},toUnicode:function(t){return g(t,function(t){return c.test(t)?S(t.slice(4).toLowerCase()):t})}},e&&n)if(Wa.exports==e)n.exports=r;else for(o in r)r.hasOwnProperty(o)&&(e[o]=r[o]);else t.punycode=r}(Ua.exports)),Ua.exports);const Va=za(Ga);let Qa,Ja;function Ka(){Qa=location.href.replace(location.host,Va.toUnicode(location.host)),Ja=location.href.replace(location.host,Va.toASCII(location.host))}Ka(),Kr.on("destroy",Ka);const Za={page:t=>String(t.value).match(/^[\u0000-\u007f]*$/)?Ja:Qa},Ya={productId:()=>Ia().then(t=>t&&t.product&&t.product.id),productName:()=>Ia().then(t=>t&&t.product&&t.product.name),productCategoryId:()=>Ia().then(t=>t&&t.product&&t.product.categoryId),productBrandName:()=>Ia().then(t=>t&&t.product&&t.product.brand),productPrice:()=>Ia().then(t=>t&&t.product&&t.product.price),productPriceWithDiscount:()=>Ia().then(t=>t&&t.product&&t.product.priceWithDiscount),productDiscount:()=>Ia().then(t=>t&&t.product?t.product.price>t.product.priceWithDiscount?100*(t.product.price-t.product.priceWithDiscount)/t.product.price:0:NaN),categoryId:()=>Ia().then(t=>t&&t.category&&t.category.id)};let tc=null;const ec={get:async function(){const t=tc||new Promise((t,e)=>{An.ajax({type:"GET",url:cn.TS_URL,dataType:"json",success:t,error:e})});tc=t;try{const e=await t;return new Date(e.timestamp)}catch{return window.PopMechanic.initAt}}},nc={time:()=>ec.get(),time_utc:()=>ec.get(),day_of_week:()=>ec.get().then(t=>t.getDay()),datetime:()=>ec.get(),datetime_utc:()=>ec.get()};function ic(t,e){const n=String(t);return n.length>=e?n:new Array(e-n.length+1).join("0")+n}const rc={time:t=>{const e=t.match(/(\d\d):(\d\d):(\d\d)/);return ec.get().then(t=>{const n=new Date(t);return n.setHours(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)),n})},time_utc:function(t){const e=t.match(/(\d\d):(\d\d):(\d\d)([+-])(\d\d):(\d\d)/);if(!e)throw new Error(`Invalid time_utc format: ${t}`);return ec.get().then(function(t){const n=new Date(t);if(e[4]&&e[5]&&e[6]){const t=parseInt(e[1],10),i=parseInt(e[2],10),r=parseInt(e[3],10),o="+"===e[4]?1:-1,s=t-o*parseInt(e[5],10),a=i-o*parseInt(e[6],10);return n.setUTCHours(s,a,r),n}return n.setUTCHours(parseInt(e[1],10),parseInt(e[2],10),parseInt(e[3],10)),n})},datetime:function(t){const e=(new Date).getTimezoneOffset(),n=e<0?"+":"-",i=ic(Math.abs(e)%60,2),r=ic(Math.floor(Math.abs(e)/60),2),o=t.replace(/([+-]\d\d:\d\d|Z)$/,n+r+":"+i);return new Date(o)},datetime_utc:function(t){return new Date(t)}},oc={source:()=>or.get.current.typ,utm_source:()=>or.get.current.src,utm_medium:()=>or.get.current.mdm,utm_campaign:()=>or.get.current.cmp,utm_content:()=>or.get.current.cnt,utm_term:()=>or.get.current.trm,visit:()=>parseInt(or.get.udata.vst,10),referrer:()=>document.referrer},sc=["$any","$contains","$exclude","$startsWith","$endsWith","$eq","$neq","$regexp","$not_regexp"],ac=sc.concat(["$any","$none","$in","$nin","$in_contains","$in_startsWith","$in_endsWith","$in_regexp"]),cc=["$any","$eq","$neq","$lt","$gt","$lte","$gte","$between"],lc=["$any","$none","$in","$nin"],uc=["$after"],dc={day_of_week:lc,city:lc,region:lc,country:lc,source:lc,device:lc,operating_system:lc,push_request_unavailable:["$any","$eq","$neq"],page:ac,referrer:sc,utm_source:sc,utm_medium:sc,utm_campaign:sc,utm_content:sc,utm_term:sc,visit:cc,form_completed:uc,form_uncompleted:uc,form_seen:uc,dom_element:["$exists","$not_exists"],cart:cc,time:cc,time_utc:cc,datetime:cc,datetime_utc:cc,visited_url:cc,productId:ac,productName:ac,productCategoryId:ac,productBrandName:ac,productPrice:cc,productPriceWithDiscount:cc,productDiscount:cc,categoryId:ac,time_passed:["$eq","$between","$any"],url:ac,js:["$exec"],mindboxProductSegment:["$exists","$not_exists"]};function hc(t,e,n={}){return e[t.field]&&dc[t.field].includes(t.operator)?function(i){const r=n[t.field]?n[t.field](t.value):t.value,o=e[t.field](t);i({result:(0,Ta[t.operator])(r,o),final:!0})}:Vs()}const fc={...ja,...nc,...Da,...oc,...Za,...qa,...La,...Ya},mc={...rc,...Na};function pc(t,e,n){const i={result:!1,final:!1};let r=Js;function o(r){null===r&&(r={result:!1,final:!1}),"boolean"==typeof r&&(r={result:r,final:!1}),i.final||i.result===r.result&&i.final===r.final||(i.result=r.result,i.final=r.final,Yr(function(){!function(t,e,n){if(n.result)return;if(!e.id||"root"===e.id)return;const i=n.final?"final":"non-final",r=`targeting-${t.id}-${e.id}-${i}`;kr.addOnce({formId:t.id,description:`Targeting rejected (${i})`,key:r,type:n.final?"reject":"event",data:{value:n,condition:e.source?JSON.parse(e.source):e.id}})}(e,t,i),n(i.result)}))}try{const n=t(o,e);r="function"==typeof n?n:Js}catch(s){console.error(s),o({result:!1,final:!0})}return{id:t.id,getValue:function(){return i},cancel:r}}function gc(t){return t.every(t=>!!t.result)}function yc(t){return t.some(t=>!!t.result)}function vc(t,e,n,i,r,o){if(!Array.isArray(t.nodes)||"$or"!==t.operator&&"$and"!==t.operator)return Vs();if(0===t.nodes.length)return function(t){return t({result:!0,final:!0}),Js};const s="$or"===t.operator?yc:gc;return function(a,c){let l=!1;const u=t.nodes.map(d=>pc(Nc(d,e,n,i,r,o),c,function(){l||(l=!0,Yr(function(){const e=function(){const e=u.map(t=>t.getValue());if("$or"===t.operator&&e.some(Ks))return h(),{result:!0,final:!0};if("$and"===t.operator&&e.some(Zs))return h(),{result:!1,final:!0};return{result:s(e),final:e.every(t=>t.final)}}();a(e),l=!1}))}));let d=!1;function h(){d||(Yr(()=>{d=!1,u.forEach(t=>{t.cancel()})}),d=!0)}return h}}const wc={$any:"$any",$none:"$none",$in:"$eq",$nin:"$neq",$in_contains:"$contains",$in_startsWith:"$startsWith",$in_endsWith:"$endsWith",$in_regexp:"$regexp"},bc={$any:"$or",$none:"$or",$in:"$or",$nin:"$and",$in_contains:"$or",$in_startsWith:"$or",$in_endsWith:"$or",$in_regexp:"$or"};function _c(t){return function(e,n,i){let r;return dc[e.field].includes(e.operator)?Array.isArray(e.value)?(r=e.value.map((t,n)=>({id:e.id+"["+n+"]",field:e.field,value:t,operator:wc[e.operator]})),vc({id:e.id,name:"pageCondition#"+e.id,operator:bc[e.operator],nodes:r},n,i)):t(e,n,i):Vs()}}function Sc(t,e,n){if(!t)return n;if(!t.field){if(t.nodes){return function(t,e){const n=t.nodes.map(e);switch(t.operator){case"$and":return function(t){return n.every(e=>e(t))};case"$or":return function(t){return n.some(e=>e(t))};default:return Vs()}}(t,t=>Sc(t,e,n))}return n}const i=Ta[t.operator],r=t.value,o=e[t.field];return o?function(t){return i(r,o(t))}:Qs}let Ic=[];Kr.on("destroy",function(){Ic=[]}),window.PopMechanicAddToCart=function(){Ic.forEach(t=>{t()})};const kc={$count:function(t){return function(e){return e.reduce((e,n)=>t(n)?e+(Number(n.quantity)||1):e,0)}},$countDistinct:function(t){return function(e){let n=0;const i={};for(let r=0;rt(n)?e:e+1,0)}},$priceSum:function(t){return function(e){return e.reduce((e,n)=>{if(t(n)){return e+(Number(n.priceWithDiscount||n.price)||0)*(Number(n.quantity)||1)}return e},0)}},$anyOf:function(t){return function(e){return e.some(t)}},$noneOf:function(t){return function(e){return!e.some(t)}},$every:function(t){return function(e){return e.every(t)}}};function Pc(t){return!!t&&"object"==typeof t&&Number.isFinite(Number(t.price))&&!!t.id}const Cc={productPrice:t=>Number(t.price)||0,productPriceWithDiscount:function(t){return Number(t.priceWithDiscount)||0},productDiscount:function(t){const e=Number(t.price)||0,n=Number(t.priceWithDiscount)||0;return e>n?(e-n)/e:0},productId:function(t){return t&&t.id?t.id.toString():""},productName:function(t){return t?.name||""},productCategoryId:function(t){return t&&t.categoryId?t.categoryId.toString():""},productBrandName:function(t){return t?.brand||""}};const Ec={form_seen:sr.getLastShown.bind(sr),form_completed:sr.getCompleted.bind(sr),form_uncompleted:sr.getUncompleted.bind(sr)};function xc(t){return t||null===t}function Tc(t){if(!(t.field in Ec))return Vs();if("$after"!==t.operator&&"$never"!==t.operator)return Vs();if(!ta(t.value))return Vs();const e=t.value.forms;return"$any"===e?function(e){const n=setInterval(()=>{const n=function(t){const e=(0,Ec[t.field])();return"$never"===t.operator?null===e:"form_seen"===t.field&&null===e||!!ta(t.value)&&null!==e&&Date.now()-e>=1e3*t.value.interval}(t);e({result:n,final:!1})},1e3);return Kr.one("destroy",()=>{clearInterval(n)}),function(){clearInterval(n)}}:Array.isArray(e)?function(e){const n=setInterval(()=>{const n=function(t){if(!ta(t.value))return!1;const e=Ec[t.field],n=Array.isArray(t.value.forms)?t.value.forms:[],i=1e3*t.value.interval,r=Date.now(),o=n.map(e).map(t=>null===t?null:r-t.getTime()>=i);return"$never"===t.operator?o.every(t=>null===t):"form_seen"===t.field?o.every(xc):0!==o.length&&o.every(t=>!!t)}(t);e({result:n,final:!1})},1e3);return Kr.one("destroy",()=>{clearInterval(n)}),function(){clearInterval(n)}}:Vs()}class $c{constructor(t){this._successHandlers=[],this._errorHandlers=[],this._fetchData=t,this.items=[],this.isRunning=!1}addItem(t){return new Promise((e,n)=>{this.items.push(t),this._successHandlers.push(e),this._errorHandlers.push(n)})}removeItem(t){this.items=this.items.filter(e=>e.id!==t)}removeItems(t){t.forEach(t=>this.removeItem(t))}async run(){this.isRunning=!0;try{const t=await this._fetchData(this.items);this._successHandlers.forEach(e=>e(t))}catch(t){this._errorHandlers.forEach(e=>e(t))}finally{this.isRunning=!1}}}const Rc={noMindboxTracker:"NoMindboxTracker"};const Oc=new class{constructor(t){this._batchRunningTimeout=500,this._fetchData=t,this._batches=[]}addItem(t){return(this.getFreeBatch()||this.createBatch()).addItem(t)}removeItem(t){this._batches.forEach(e=>{e.removeItem(t)})}removeItems(t){this._batches.forEach(e=>{e.removeItems(t)})}getFreeBatch(){return this._batches.find(t=>!t.isRunning)}createBatch(){const t=new $c(this._fetchData);return this._batches.push(t),setTimeout(()=>{this.runBatch(t)},this._batchRunningTimeout),t}async runBatch(t){this._batches.includes(t)&&(await t.run(),this.removeBatch(t))}removeBatch(t){this._batches=this._batches.filter(e=>t!==e)}}(function(t){return new Promise((e,n)=>{oo.getMindboxIsReadyPromise().then(function(){$r()||n({type:Rc.noMindboxTracker});const i=Ke(t.map(t=>t.segmentationId)).map(t=>({ids:{externalId:t}}));i.length?Tr("sync",{operation:t[0].operation,data:{segmentations:i},onSuccess:e,onError:n}):e({customerSegmentations:[]})})})});function Fc(t){let e=null;const n=new Promise(t=>e=t),i=async function(t){const e=await Oc.addItem({id:t.id,segmentationId:t.segmentationId,operation:t.operation});return{customerSegmentation:e.customerSegmentations&&e.customerSegmentations.find(e=>e.segmentation.ids.externalId===t.segmentationId),cancelled:!1}}(t);return{promise:Promise.race([n,i]),cancel:()=>{Oc.removeItem(t.id),e&&e({cancelled:!0})}}}const Ac={mbClientSegmentationFetch:Fc,clientSegmentationsFetchErrorTypes:Rc},Mc=/4\d{2}/;function jc(t,e,n=mc){return e[t.field]&&dc[t.field].includes(t.operator)?function(i){const r=Promise.resolve(n[t.field]?n[t.field](t.value):t.value),o=Promise.resolve(e[t.field](t)),s=Ta[t.operator];return Promise.all([r,o]).then(t=>s(t[0],t[1])).catch(Qs).then(t=>{i({result:t,final:!0})}),null}:Vs()}function Dc(t,e,n=mc){return e[t.field]&&dc[t.field].includes(t.operator)?function(i){const r=e[t.field](t),o=n[t.field]?n[t.field](t.value):t.value,s=Ta[t.operator];function a(){const n=e[t.field](t);Promise.all([Promise.resolve(o),Promise.resolve(n)]).then(t=>{const e=s(t[0],t[1]);i({result:e,final:!1})})}const c=setInterval(a,3e5);return Kr.one("destroy",()=>{clearInterval(c)}),"object"==typeof o&&"then"in o&&"function"==typeof o.then||"object"==typeof r&&"then"in r&&"function"==typeof r.then?(a(),null):function(){clearInterval(c)}}:Vs()}const qc={default:hc,cart:function(t){if("cart"!==t.field)return Vs();const e=Ta[t.operator]||Qs;return kc[t.aggregator]?function(n){const i=Sc(t.filter,Cc,Pc),r=kc[t.aggregator](i);function o(){const n=window.PopMechanicCartData;if(!n)return null;const i=r(n.products);return"boolean"==typeof i?i:e(t.value,i)}const s=setInterval(()=>{const t=o();null!==t&&(clearInterval(s),n({result:t,final:!1}))});return Kr.one("destroy",()=>{clearInterval(s)}),Ic.push(function(){setTimeout(()=>{const t=o();null!==t&&n({result:t,final:!1})},1e3)}),function(){clearInterval(s)}}:Vs()},datetime:Dc,datetime_utc:Dc,day_of_week:Dc,time:Dc,time_utc:Dc,dom_element:function(t){if("$exists"!==t.operator&&"$not_exists"!==t.operator)return Vs();const e=-1!==(""+t.value).indexOf(":visible"),n=(""+t.value).replace(/:visible/g,"");return function(i){const r=setInterval(()=>{let r=An(n);e&&(r=r.filterVisible()),"$exists"===t.operator&&i({result:r.length>0,final:!1}),"$not_exists"===t.operator&&i({result:0===r.length,final:!1})},1e3),o=function(){clearInterval(r)};return Kr.one("destroy",o),o}},js:function(t){if(!dc[t.field].includes(t.operator))return Vs();let e;try{e=new Function(String(t.value))}catch{return Vs()}return function(t){let n=null;try{n=e()}catch(i){return console.error("$exec error",i),void t({result:!1,final:!0})}Promise.resolve(n).then(e=>{t({result:!!e,final:!0})}).catch(()=>{t({result:!1,final:!0})})}},form_completed:Tc,form_seen:Tc,form_uncompleted:Tc,mindbox_segment:t=>"mindbox_segment"!==t.field||"$check"!==t.operator?Vs():(e,n)=>{const i=n.id;if("object"!=typeof(r=t.value)||null===r||!("operation"in r||"segmentation"in r||"segment"in r||"inSegment"in r||"inSegmentByDefault"in r))return void e({result:!1,final:!0});var r;const{operation:o,segmentation:s,inSegment:a,inSegmentByDefault:c,segment:l}=t.value,u="string"==typeof s?s:s.externalId,d=(h=u,["deviceUUID:"+window.PopMechanic.mindboxDeviceUUID,"customer","segmentation:"+h].join("."));var h;const f=sr.get(d),m=t=>!!t&&("$any"===l||t.ids.externalId===l.externalId),p=t=>({result:m(t)===a,final:!0});if(f&&Date.now()-f.ts<6e4)return void e(p(f.segment));const g=i+"."+t.id,y=Ac.mbClientSegmentationFetch({id:g,segmentationId:u,operation:o});return y.promise.then(t=>{if(t.cancelled)return;const n=t.customerSegmentation&&t.customerSegmentation.segment;sr.set(d,{ts:Date.now(),segment:n}),e(p(n))}).catch(t=>{if(Mc.test(t.statusCode))return sr.set(d,{ts:Date.now(),segment:void 0}),void e(p(void 0));e({result:c===a,final:!0})}),Kr.one("destroy",function(){y.cancel()}),function(){y.cancel()}},visited_url:jc,country:jc,region:jc,city:jc,page:_c(hc),productId:_c(jc),productName:_c(jc),productCategoryId:_c(jc),productBrandName:_c(jc),productPrice:jc,productPriceWithDiscount:jc,productDiscount:jc,categoryId:_c(jc),time_passed:jc,url:_c(hc)};function Nc(t,e=fc,n=mc,i=Ma,r=void 0,o=qc){let s=null;return s="nodes"in t?vc(t,e,n,i,r,o):"filter"in t&&t.field in i?function(t,e=Ma,n){return(i,r)=>{const o=e[t.field],s=o.aggregatedConditions;return o.aggregators[t.aggregator](t=>{Yr(()=>{i(t)})},e=>new Promise(n=>{const{getValue:i}=pc(Nc(t.filter,o.getFieldValues&&o.getFieldValues(e),{...mc,...o.conditionMappers||{}},s,e,o.fieldCheckers),r,function(){n(i())})}),t,n),null}}(t,i,r):t.field in o?o[t.field](t,e,n,r):qc.default(t,e,n,r),s.id=t.id,window.PopMechanic.debugMode||(s.source=JSON.stringify(t)),s}function Lc(t,e,n){return new Promise(i=>{t||i(function(){return"function"==typeof n&&Yr(()=>{n(!0)}),{result:!0,final:!0}});const{getValue:r}=pc(Nc(t),e,t=>{"function"==typeof n&&n(t),i(r)})})}let Bc={};Kr.on("destroy",function(){Bc={}});const zc={init:Lc,check:function(t,e,n){if(e.id in Bc)return Bc[e.id];const i=Promise.resolve(Lc(t,e,n)).then(t=>t().result).catch(t=>{throw kr.add({formId:e.id,description:"Check targeting error",type:"reject",data:{error:t}}),console.error("checkTargeting error:",t),Nr.error({error:`checkTargeting error for form ${e.id} because of ${t.message}`,context:{cause:t,formId:e.id,targetingType:e.newTargeting&&e.newTargeting.type}}),t});return Bc[e.id]=i,i}};function Hc(t,e){return zc.check(t&&t.newTargeting&&t.newTargeting.filter,t,e)}const Uc={check:function(t,e){return t.isEmbedded()||t.isStatic()?Hc(t,e):t.isAlways()?Promise.resolve(!0):Hc(t,e)}},Wc="form-variant-id";class Xc{constructor(t,e,n){this.specialCaseEvents={show:"formShow",close:"formClose"},this.init=n,this.data=t,this.id=t.id,this.name=t.name,this.settings_splits=t.settings_splits,this.settings={},this.salt=t.salt,this.control_group=t.control_group,this.variants=t.variants,this.newTargeting=t.test_group?t.test_group.new_targeting:t.new_targeting,this.template_id=t.template,this.template=null,this.button_template_id=t.button_template,this.button_template=null,this.conditions=void 0,this.frequency=t.frequency||{},this.accountFrequency=t.accountFrequency||{},this.test_group=t.test_group,this.inTargeting=!1,this.inSplitTest=!1,this.embed_selector=t.embed_selector,this.selector=t.selector,this.placement=t.placement,this._targetingCb=[],this.custom_fields=t.custom_fields,this.containerId=t.container_id,this.childForms=t.child_forms||[],this.behaviors={},this.getTargetElement=null,this.isControlGroup=!1,this.isTransactional=t.is_transactional,this._isAbTest=!(!this.salt||!window.PopMechanic.mindboxDeviceUUID),this.isReadyPromise=this.initAsync(e),this.reportClose=this.reportClose.bind(this),this.reportShow=this.reportShow.bind(this),this._getTargetElementCreator=this._getTargetElementCreator.bind(this),this.setBehaviors=this.setBehaviors.bind(this),this.subscribeIntegrations=this.subscribeIntegrations.bind(this),this.integrationsOnRender=this.integrationsOnRender.bind(this),this.slaTimer=new Pr}async initAsync(t){try{const t=this.salt&&await Xr(window.PopMechanic.mindboxDeviceUUID,this.salt);this.modulusHash=t}catch(e){const t=Or(e);Nr.error({error:`Form modulusHash error ${t.message}`,context:{cause:t,formId:this.id,hasFormData:!!this.data,salt:this.salt}}),this.modulusHash=null}this._setSettings(),this._integrations=t.reduce((t,e)=>{if(e&&(!e.form||e.form===this.id)){const n=function(t){switch(t.integration_type){case"googleanalytics":return new $o(t);case"javascript":return new Vo(t);case"mindbox":return new Qo(t);case"mindbox_push":return new Ko(t);case"mindbox_server_json":return new Ls(t);case"mindbox_tracking":return new Yo(t);default:Nr.log("Tried to create an unimplemented integration type")}}(e);!n||this.isControlGroup&&!n.shouldRunForControlGroup()||t.push(n)}return t},[])}isStatic(){return"static"===this.template.template_type||-1!==this.template.behaviors.indexOf("static")}isEmbedded(){return"embedded"===this.template.template_type||-1!==this.template.behaviors.indexOf("embedded")}isQuizForm(){return this.template?.behaviors?.includes("quiz")??!1}setBehaviors(){this.behaviors=ao.getInstances(this.template.behaviors,this),this.getTargetElement=this._getTargetElementCreator()}_getFormVariant(){const t=window.PopMechanic.formHash,e=this.variants[0];if(!this._isAbTest)return e;if(t){const t=document.location.toString();if(-1!==t.indexOf(Wc+"=")){const e=t.split(Wc+"=")[1].split("&")[0],n=this.variants.find(t=>t.ab_test_variant_internal_id===e);if(n)return n}return e}return this.variants.find(t=>t.is_winner)||this.variants.find(t=>{try{return Gr(this.modulusHash,t.modulus_lower_inclusive,t.modulus_upper_exclusive)}catch(e){const n=Or(e);return Nr.error({error:`Form _getFormVariant error ${n.message}`,context:{cause:n,formId:this.id,modulusHash:this.modulusHash,modulusLowerInclusive:t.modulus_lower_inclusive,modulusUpperExclusive:t.modulus_upper_exclusive}}),!1}})||e}get variant(){return this._getFormVariant()}get lifecycle(){return kr.getLifecycle(this.id)}get rejectInfo(){return kr.getRejectInfo(this.id)}_setSettings(){const t=this._getFormVariant();if(!window.PopMechanic.formHash&&this._isAbTest&&this.control_group)try{Gr(this.modulusHash,this.control_group.modulus_lower_inclusive,this.control_group.modulus_upper_exclusive)&&(this.isControlGroup=!0)}catch(e){const n=Or(e);Nr.error({error:`Form _setSettings error ${n.message}`,context:{cause:n,formId:this.id,hasFormVariant:!!t,variantId:t&&t.ab_test_variant_internal_id}})}this.settings=t.view_settings,this.button_template_id="button_template"in this.settings?this.settings.button_template:0,"settings"in this.settings&&(this.settings.conditions_splits=this.settings_splits[0].conditions_splits)}setControlGroup(t){this.isControlGroup=t}setConditions(){"conditions_splits"in this.settings&&(this.conditions=this.settings.conditions_splits[0]),this.conditions||(window.PopMechanic.isTesting||this.isEmbedded()?this.conditions={id:0,conditions:{delay:0}}:this.conditions={id:0,conditions:{reject:!0}})}isAlways(){return-1!==this.template.behaviors.indexOf("always")}ignoresTargeting(){return!(!this.conditions||!this.conditions.conditions||"ignore_targeting"!==this.conditions.conditions.only_forced)}isOnlyForcedShow(){return!!(this.conditions&&this.conditions.conditions&&"only_forced"in this.conditions.conditions)}checkFrequency(){return window.PopMechanic.isTesting?Promise.resolve(!0):Co.checkForm(this.frequency,this.id)}checkAccountFrequency(){return this.frequency.priority||window.PopMechanic.isTesting?Promise.resolve(!0):Co.checkAccount(this.accountFrequency,this.id)}checkTargeting(t){if(this._integrations.some(t=>t.skipForm(this)))return;const e=fe(()=>{Sr({type:"bucket",form:this.id,settings:this.settings&&"id"in this.settings?this.settings.id:0,conditions:this.conditions?this.conditions.id:0})});return Promise.resolve(this.getTargetElement&&this.getTargetElement()).then(()=>!!window.PopMechanic.isTesting||Uc.check(this,n=>{this.setInTargeting(n),n&&e(),t&&t(this,n)})).catch(()=>!1).then(t=>(this.setInTargeting(t),t&&e(),t))}cancelConditions(){}checkConditions(){const t=function(t,e){if("string"==typeof e&&!function(t){return"and"===t||"or"===t}(e))return;const n=yo(t,e);let i=!1;return new Promise(t=>{n(e=>{i=i||e,i&&t()})})}(this.conditions.conditions,this.conditions.combinator),e=new Promise((t,e)=>{this.cancelConditions=e});return kr.add({formId:this.id,description:"Waiting for conditions..."}),Promise.race([t,e]).then(()=>(kr.add({formId:this.id,description:"Conditions passed"}),!0)).catch(t=>(kr.add({formId:this.id,description:"Conditions failed",type:"reject",data:{error:t}}),!1))}setInTargeting(t){t!==this.inTargeting&&(this.inTargeting=t,this._targetingCb.forEach(e=>{e(t)}))}onTargetingChange(t){"function"==typeof t&&(this._targetingCb.push(t),this.inTargeting&&Yr(()=>{t(!0)}))}clearTargetingChange(t){this._targetingCb=Je(this._targetingCb,t)}getLeadType(){const t=this.template.behaviors;return t.indexOf("lead")>-1?"lead":t.indexOf("info")>-1?"info-"+this.id:void 0}getTestGroupId(){return this.test_group&&this.test_group.id?this.test_group.id:"form-"+this.id}setTemplate(t){this.template=t,"embedded"===this.template.template_type&&-1===this.template.behaviors.indexOf("embedded")&&this.template.behaviors.push("embedded"),(this.template.behaviors.includes("banner-h")||this.template.behaviors.includes("banner-v"))&&(this.template.behaviors=Je(this.template.behaviors,"banner")),this.setBehaviors(),this.initClientSideIntegrations()}initClientSideIntegrations(){if(this.isQuizForm()){const t=new Gs({id:0,integration_type:"quiz_tracking",form:this.id});this.isControlGroup&&!t.shouldRunForControlGroup()||this._integrations.push(t)}}setButtonTemplate(t){this.button_template=t}setInSplitTest(t){this.inSplitTest=t}report(t,e={}){let n={form:this.id,settings:this.settings&&"id"in this.settings?this.settings.id:0,conditions:this.conditions?this.conditions.id:0,type:t};e&&(n={...n,...e}),Sr(n);const i=this.specialCaseEvents[t]||t;Kr.trigger(i,{form:this})}reportShow(){kr.add({formId:this.id,description:"Form shown",type:"show"}),this.report("show")}reportClose(){kr.add({formId:this.id,description:"Form closed"}),this.report("close")}reportSlaSuccess(t){}reportSlaFailure(t,e){}_getTargetElementCreator(){const t=Object.values(this.behaviors).reverse().find(t=>"getTargetElement"in t);return t?t.getTargetElement:null}terminate(){Object.values(this.behaviors).forEach(t=>{t.terminate()})}pushToHistory(){Vr.add({id:this.id,form:{containerId:this.containerId}})}subscribeIntegrations(){this._integrations.forEach(t=>{Kr.on("lead",e=>{e.form.id===this.id&&t.isLeadRelevant(e.lead)&&t.onContactsSent(e)}),Kr.on("targeting",e=>{e.form.id===this.id&&t.onTargetingReady(e)}),Kr.on("formShow",e=>{e.form.id===this.id&&t.onShow(e)}),Kr.on("formClose",e=>{e.form.id===this.id&&t.onClose(e)}),Kr.on("quizAnswer",e=>{e.form.id===this.id&&t.onQuizAnswer(e)}),Kr.on("matcherProductClick",e=>{e.form.id===this.id&&t.onMatcherProductClick(e)})})}getLeadIntegrations(){return this._integrations.filter(t=>t instanceof xo)}integrationsOnRender(t){return Promise.all(this._integrations.map(e=>Promise.resolve(e.onRender(this,t))))}isChildForm(){return!!this.containerId}isParentFormInTargeting(){if(!this.isChildForm())return!0;const t=window.PopMechanic.getModel&&window.PopMechanic.getModel(this.containerId);return!(!t||!t.inTargeting)}hasEnabledButton(){return this.settings&&"behavior_settings"in this.settings&&this.settings.behavior_settings&&"button"in this.settings.behavior_settings&&this.settings.behavior_settings.button.on}markAsCollapsed(){sr.setCollapsed(this.id)}getCollapsedEvents(){return sr.getCollapsed(this.id)??[]}markAsSkipped(){sr.setSkipped(this.id)}getSkippedEvent(){return sr.getSkipped(this.id)}}function Gc(t,e,n=10){const i=[];let r,o,s=0;const a=function(t,e){if(null==e||e<1)return[];const n=[],i=t.length;let r=0;for(;r=a.length)return r(i.flat());try{const n=a[s];i.push(n.map(e)),s+=1,requestAnimationFrame(t)}catch(n){o(n)}}),c}class Vc{constructor(t,e){this.hash=e,this.id=t.global_ab_test_internal_id,this.internalId=t.internal_id,this.salt=t.salt,this.variants=t.variants,this.currentVariant=this._getCurrentVariant(),this.isControlGroup=!!this.currentVariant&&this.currentVariant.is_control_group,this.testLogic=this._getTestLogic()}getFormIds(t){return this.currentVariant?"WithFormsOnly"===this.testLogic?this._getWithFormsOnlyLogicForms(t):"WithoutFormsAvailable"===this.testLogic?this._getWithoutFormsAvailableLogicForms(t):(Nr.error({error:'Variants of a/b test (global_ab_test_internal_id="'+this.id+'") are corrupted. Skipping the test.',context:{abTestId:this.id,testLogic:this.testLogic}}),t):t}_getCurrentVariant(){if(null!==this.hash)return this.variants.find(t=>{try{return Gr(this.hash,t.modulus_lower_inclusive,t.modulus_upper_exclusive)}catch(e){return Nr.log(e),!1}})}_getTestLogic(){return this.variants.every(t=>t.form_selection_kind)?"WithFormsOnly":this.variants.every(t=>!t.form_selection_kind)?"WithoutFormsAvailable":"Corrupted"}_getAllForms(){if(this.allForms)return this.allForms;const t=this.variants.map(t=>t.forms.map(t=>t.id));return this.allForms=Ke(t.flat()),this.allForms}_getCurrentVariantForms(){return this.currentVariant?this.currentVariant.forms.map(t=>t.id):[]}_getOtherVariantsForms(){const t=this._getAllForms(),e=this._getCurrentVariantForms();return Qe(t,e)}_getWithFormsOnlyLogicForms(t){const e=this.variants.reduce((e,n)=>{if(n.internal_id===this.currentVariant?.internal_id)return e;const i="all"===n.form_selection_kind?t:n.forms.map(t=>t.id);return Ze(e,i)},[]),n=Qe(t,e),i="all"===this.currentVariant?.form_selection_kind?t:this._getCurrentVariantForms();return Ze(n,i)}_getWithoutFormsAvailableLogicForms(t){if(this.currentVariant?.is_control_group)return Nr.log('Control group of global a/b test (global_ab_test_internal_id="'+this.id+'") is used'),[];const e=this._getOtherVariantsForms();return Qe(t,e)}}var Qc,Jc={exports:{}};var Kc=(Qc||(Qc=1,function(t){t.exports=function(){var t=void 0;try{new EventTarget,t=!1}catch(b){t=!1}var e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},i=function(){function t(t,e){for(var n=0;n-1&&n.splice(i,1)}},{key:"dispatchEvent",value:function(t){return t.target=this,Object.freeze(t),this._getRegistry(t.type).forEach(function(e){return e(t)}),!0}},{key:"_getRegistry",value:function(t){return this._registry[t]=this._registry[t]||[]}}]),t}(),a=t?EventTarget:s,c=t?Event:function t(e){n(this,t),this.type=e},l=function(){function t(e,i){n(this,t);var r=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this,e));return r.newState=i.newState,r.oldState=i.oldState,r.originalEvent=i.originalEvent,r}return r(t,c),t}(),u="active",d="passive",h="hidden",f="frozen",m="terminated",p="object"===("undefined"==typeof safari?"undefined":e(safari))&&safari.pushNotification,g=["focus","blur","visibilitychange","freeze","resume","pageshow","onpageshow"in self?"pagehide":"unload"],y=function(t){return t.preventDefault(),t.returnValue="Are you sure?"},v=[[u,d,h,m],[u,d,h,f],[h,d,u],[f,h],[f,u],[f,d]].map(function(t){return t.reduce(function(t,e,n){return t[e]=n,t},{})}),w=function(){return document.visibilityState===h?h:document.hasFocus()?u:d};return new(function(){function t(){n(this,t);var e=o(this,(t.__proto__||Object.getPrototypeOf(t)).call(this)),i=w();return e._state=i,e._unsavedChanges=[],e._handleEvents=e._handleEvents.bind(e),g.forEach(function(t){return addEventListener(t,e._handleEvents,!0)}),p&&addEventListener("beforeunload",function(t){e._safariBeforeUnloadTimeout=setTimeout(function(){t.defaultPrevented||t.returnValue.length>0||e._dispatchChangesIfNeeded(t,h)},0)}),e}return r(t,a),i(t,[{key:"addUnsavedChanges",value:function(t){!this._unsavedChanges.indexOf(t)>-1&&(0===this._unsavedChanges.length&&addEventListener("beforeunload",y),this._unsavedChanges.push(t))}},{key:"removeUnsavedChanges",value:function(t){var e=this._unsavedChanges.indexOf(t);e>-1&&(this._unsavedChanges.splice(e,1),0===this._unsavedChanges.length&&removeEventListener("beforeunload",y))}},{key:"_dispatchChangesIfNeeded",value:function(t,e){if(e!==this._state)for(var n=function(t,e){for(var n,i=0;n=v[i];++i){var r=n[t],o=n[e];if(r>=0&&o>=0&&o>r)return Object.keys(n).slice(r,o+1)}return[]}(this._state,e),i=0;i{this.enabled=!1,Zc.removeEventListener("statechange",this._listener),t()})}_listener(t){"terminated"===t.newState&&this.enabled&&this.onUnload()}}class il{constructor({data:t,deviceUUID:e,onTargetingChange:n}){this._abTests=[],this.forms=[],this.pluginData=[],this.formsMap={},this.formsReady=null,this._allFormIds=[];let i=()=>{},r=()=>{};this.formsReady=new Promise((t,e)=>{i=t,r=e}),this.onTargetingChange="function"==typeof n?n:()=>{},this._data=t,this.unloadReporter=new nl,sr.clearLegacyConditionsSplitData(),this._data.contacts?window.PopMechanic.leads=this._data.contacts:window.PopMechanic.leads=[],this._abTests=[],this.initAsync(e,i,r),this.quizzesPaywallFieldsReady=this.setQuizzesPaywallFieldsData().catch(t=>{Nr.error({error:t})})}async initAsync(t,e,n){try{const n=await Promise.all((this._data.global_ab_tests||[]).map(e=>function(t,e){return Promise.resolve().then(()=>Xr(e,t.salt)).then(e=>new Vc(t,e),e=>(Nr.log(e),new Vc(t,null)))}(e,t)));this._abTests=n,this._setAbTestsGlobal(),await this.setFormsAsync(),e()}catch(i){const t=Or(i);Nr.error({error:`Init error ${t.message}`}),Sr({type:"exception",url:location.href}),n(i)}}_setAbTestsGlobal(){const t=this._abTests;function e(e){"function"==typeof e&&e(t)}try{e(window.PopMechanic.onAbTestsReady)}catch(n){const t=Or(n);Nr.error({error:`onAbTestsReady error ${t.message}`,context:{cause:t,hasOnAbTestsReady:"function"==typeof window.PopMechanic.onAbTestsReady}})}Object.defineProperty(window.PopMechanic,"onAbTestsReady",{configurable:!0,set:e})}_getAbTestsForms(){if(!this._abTests.length)return this.forms;return Ye(...this._abTests.map(t=>t.getFormIds(this._allFormIds))).map(t=>this.formsMap[t]).filter(t=>null!=t)}_getTransactionalForms(){return this.forms.filter(t=>t.isTransactional)}_getActiveForms(){const t=this._getAbTestsForms(),e=this._getTransactionalForms();return Ze(t,e)}_selectFormFromGroup(t,e){if(!t.length)return null;if(1===t.length)return t[0];if(!sr.formsChanged(e,t.map(t=>({id:String(t.id)})))){const n=sr.getForm(e);return t.find(t=>String(t.id)===n)}const n=De(t);return sr.setForms(e,t.map(t=>({id:String(t.id)}))),sr.setForm(e,n.id),n}async setFormsAsync(){const t=await Gc(this._data.forms,t=>{const e=new Xc({...t,accountFrequency:this._data.frequency},this._data.integrations||[],this);return e.isReadyPromise.then(()=>{e.setTemplate(this.getTemplate(e.template_id)),e.setButtonTemplate(this.getButtonTemplate(e.button_template_id)),e.pushToHistory()}),e});await Promise.all(t.map(t=>t.isReadyPromise)),this.formsMap=Object.fromEntries(t.map(t=>[t.id,t]));const e=Ne(t,function(t){return t.getTestGroupId()}),n=Object.entries(e).map(([t,e])=>this._selectFormFromGroup(e,parseInt(t,10))).filter(t=>null!=t);this.forms=n,this._allFormIds=n.map(t=>t.id),n.forEach(t=>{t.setInSplitTest(!0),t.setConditions()});const i=this._getActiveForms();Qe(this.forms,i).forEach(t=>t.setControlGroup(!0)),window.PopMechanic.initReadyTs=oo.getTabVisibilityDuration(),await Gc(this.forms,t=>{t.checkTargeting(this.onTargetingChange)}),this.pluginData=Object.values(this.formsMap).map(t=>({id:t.id,name:t.name,isEmbedded:t.isEmbedded()||t.isStatic(),testGroup:{id:t.getTestGroupId(),name:t.test_group?t.test_group.name:""},inSplitTest:!!t.inSplitTest,inTargeting:t.inTargeting}))}async setQuizzesPaywallFieldsData(){const t=eo()?.paywall;this.quizzesPaywallFields=await async function(t){if(!t||!t.fields)return;const e=Object.entries(t.fields);if(0===e.length)return;const n=await Promise.all(e.map(async([t,e])=>{const{segmentationInternalId:n,segmentInternalId:i}=e,r=Fc({id:`${t}-segmentation`,segmentationId:n,operation:`${cn.CSS_PREFIX}check-segment`}),{customerSegmentation:o,cancelled:s}=await r.promise;return s?null:{fieldName:t,isInSegment:o?.segment?.ids?.externalId===i}})),i={};for(const r of n)r&&(i[r.fieldName]={present:r.isInSegment});return i}(t)}getTemplate(t){return this._data.templates?.find(e=>e.id===t)||{}}getButtonTemplate(t){return this._data.button_templates?.find(e=>e.id===t)||{}}destroy(){return this.unloadReporter.destroy()}}const rl=/\/scripts\/v1\/tracker\.js/,ol=[rl,/\/js\/(bydomain|byendpoint)\//,/\/service\/loader\.js/,/\/scripts\/modules\/(personalization|helpers)\.js/,/\/init\/\d+\/(domain_and_endpoint|endpoint|no_endpoint|domain|no_domain)/,/\/js\/service\/v2\/forms\.js/,/\/media\/popmechanic\/(jssha256|tns-2\.9\.2|tns-new)\.js/,/\/js\/service\/styles\.css/,/\/v3\/js\/operations\/sync.+operation=popmechanic-check-segment/,/\/v3\/js\/operations\/sync.+operation=popmechanic-widget-.+-reco/],sl=(t=null,e=null)=>{const{navTiming:n,resources:i,trackerPerf:r}=(()=>{if(!performance)return{};const t=performance.getEntriesByType("navigation")[0],e=performance.getEntriesByType("resource").filter(t=>ol.some(e=>e.test(t.name))),n=e.find(t=>rl.test(t.name));return{navTiming:t,resources:e,trackerPerf:n}})(),o=e?e.getConditionsDuration():0;if(!r||!n)return null;const s={c:window.PopMechanic.client,eid:window.MaestraActualEndpointId,hst:encodeURIComponent(location.hostname),dmn:encodeURIComponent(location.hostname.split(".").reverse().splice(0,2).reverse().join(".")),vs:document.visibilityState},a=null!==t,c=a?{}:{pg_dcl:Math.round(n.domContentLoadedEventEnd),pg_pl:Math.round(n.loadEventEnd)},l=Math.round(performance.now()),u=a?l-t:l,d=a?u:u-Math.round(r.responseEnd),h=i?(t=>t.reduce((t,e)=>{const n=Math.floor(e.domainLookupStart||e.startTime),i=Math.floor(e.responseEnd);for(let r=n;r{if(!al)try{const e=sl(cl,t);e&&((t=>{const e=Object.entries(t).reduce((t,[e,n])=>t+`&${e}=${n}`,`${Yc}/client-stats?`);(new Image).src=e})(e),al=!0)}catch(e){console.debug("Could not send time metrics",e)}};function ul(t,e,n){t.addClass(cn.CSS_PREFIX+e).addClass(cn.CSS_PREFIX+"animated").addClass(cn.CSS_PREFIX+"fastest"),setTimeout(()=>{t.removeClass(cn.CSS_PREFIX+"animated").removeClass(cn.CSS_PREFIX+"fastest").removeClass(cn.CSS_PREFIX+e),"function"==typeof n&&n()},cn.ANIMATION_SPEED)}function dl(t,e,n){return n?(ul(t,e,n),Promise.resolve()):new Promise((n,i)=>{try{ul(t,e,n)}catch(r){i(r)}})}const hl=class{constructor(t,e={}){this._$elem=null,this.onBeforeRenderRejectIsDebuggable=!0,this.formId=t.form.id,this._dependencies=e,this._device=cs.mobile()?"mobile":cs.tablet()?"tablet":"desktop"}_getContainer(t){return t.filter("."+cn.CSS_PREFIX+"js-container")}_getForm(t){const e=`#${cn.CSS_PREFIX}form-${this.formId}`;return Ss({$container:this._getContainer(t),selector:e})}_filterForm(t){return t.filter(`#${cn.CSS_PREFIX}form-${this.formId}`)}_runAnimation(t,e,n){dl(t,e,n)}_getDeviceSettings(t){return t[this._device]?t[this._device]:"desktop"in t?t.desktop:t||{}}get dependencies(){return this._dependencies}get device(){return this._device}onTargetingReady(t){}onBeforeRender(t,e){}onRender(t,e,n){}shouldRender(){return!0}onShow(t,e,n){t&&(this._$elem=t)}getCurrentActiveScreen(){if(!this._$elem)return An([]);const t=Ss({$container:this._$elem,selector:".popmechanic-screen"}).filterVisible();return t.length>0?t:this._$elem}onBeforeScreenChange(t,e,n,i,r){return{allowed:!0}}onScreenChange(t,e,n,i,r){}onBeforeClose(t,e,n){}onClose(t,e,n){}onSuccess(t,e,n){}onFail(){}onInit(t){}onControlGroupInit(t){}getSettings(){return{}}};hl.implicit=!1;let fl=hl;class ml extends fl{constructor(t,e){super(t,e),this.initAt=window.PopMechanic.initAt,this._handleCallForm=this._handleCallForm.bind(this),this._handleCallFormInControlGroup=this._handleCallFormInControlGroup.bind(this)}onInit(t){const e=t.form;this.view=t,this._init(e,this._handleCallForm)}onControlGroupInit(t){const e=t.form;this.view=t,this._init(e,this._handleCallFormInControlGroup)}_init(t,e){An("body").on("click","[data-"+cn.CSS_PREFIX+'call-form="'+t.id+'"]',e),Kr.on("destroy",()=>{An("body").off("click","[data-"+cn.CSS_PREFIX+'call-form="'+t.id+'"]',e)})}async onTargetingReady(t){const e=t.form,n=e.slaTimer;try{n.conditionsStart();const i=await e.checkConditions();n.conditionsEnd(),i&&this.initAt===window.PopMechanic.initAt?await t.show():kr.add({formId:e.id,description:"Reinitialization occured during the targeting check",type:"reject"})}catch(i){n.conditionsEnd(),kr.add({formId:e.id,description:"Check conditions or view show error",type:"reject",data:{error:i}}),Nr.error({error:`conditions error in form#${e.id}`,context:{cause:i,formId:e.id}})}}_handleCallForm(){const t=this.view,e=t.form;("ignore_targeting"===e.conditions.conditions.only_forced||e.inTargeting)&&(this._sendTargetingEvent(),t.show(!0))}_handleCallFormInControlGroup(){const t=this.view.form;("ignore_targeting"===t.conditions.conditions.only_forced||t.inTargeting)&&this._sendTargetingEvent()}_sendTargetingEvent(){const t=this.view,e=t.form;t.isTargetingEventSent||(Kr.trigger("targeting",{form:e}),t.isTargetingEventSent=!0)}}let pl=[];const gl=(t,e)=>{pl=Ze(pl,[{id:t,allowOverlay:e}])},yl=t=>{const e=pl.find(e=>e.id===t);pl=Je(pl,e)},vl=(t,e)=>pl.some(t=>!t.allowOverlay)?(kr.add({formId:t,type:"reject",description:'Overlay is blocked by form without "allow_overlay" setting. Cancelling render'}),!1):!(pl.length>0&&!e)||(kr.add({formId:t,type:"reject",description:'Overlay is occupied, and this form does not have "allow_overlay" setting. Cancelling render'}),!1);const wl={top:"fadeInUp",bottom:"fadeInDown",left:"fadeInLeft",right:"fadeInRight"},bl={top:"fadeOutUp",bottom:"fadeOutDown",left:"fadeOutLeft",right:"fadeOutRight"};class _l extends ml{constructor(t,e){var n;super(t,e),this.name="banner",this.settings=kt({},"behavior_settings"in t.form.settings&&t.form.settings.behavior_settings?.banner||{},{position:"bottom",allow_overlay:!0,offset:0}),this.settings.animation_in||(this.settings.animation_in=wl[this.settings.direction]),this.settings.animation_out||(this.settings.animation_out=bl[this.settings.direction]),this.staticStyles="top"===(n=this.settings).position?{top:0,left:0,right:0,"margin-top":n.offset}:"bottom"===n.position?{bottom:0,left:0,right:0,"margin-bottom":n.offset}:"left"===n.position?{left:0,top:0,bottom:0,"margin-left":n.offset}:"right"===n.position?{right:0,top:0,bottom:0,"margin-right":n.offset}:{}}shouldRender(){return vl(this.formId,this.settings.allow_overlay)}onRender(t,e,n){if(!this.shouldRender())return Promise.reject();gl(this.formId,this.settings.allow_overlay);const i=this._filterForm(t),r=An('
');this._$formWrapper=r,n.append(r);const o={display:"block","z-index":100000002,position:"fixed","text-align":"left"};St(o,this.staticStyles),r.css(o),i.css({position:"relative",width:"100%",height:"100%"})}async onShow(t,e){const n=this._getForm(t);this._$formWrapper.append(n),await dl(n,this.settings.animation_in),n.find("."+cn.CSS_PREFIX+"close, [data-popmechanic-close]").on("click",function(){e.close(An(this).data("popmechanic-close"))})}async onClose(t){yl(this.formId);const e=this._getForm(t);await dl(e,this.settings.animation_out,()=>{t.css({position:"static",height:0,"min-height":0})})}onSuccess(){}onFail(){}}var Sl="top",Il="bottom",kl="right",Pl="left",Cl="auto",El=[Sl,Il,kl,Pl],xl="start",Tl="end",$l="viewport",Rl="popper",Ol=El.reduce(function(t,e){return t.concat([e+"-"+xl,e+"-"+Tl])},[]),Fl=[].concat(El,[Cl]).reduce(function(t,e){return t.concat([e,e+"-"+xl,e+"-"+Tl])},[]),Al=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"];function Ml(t){return t?(t.nodeName||"").toLowerCase():null}function jl(t){if(null==t)return window;if("[object Window]"!==t.toString()){var e=t.ownerDocument;return e&&e.defaultView||window}return t}function Dl(t){return t instanceof jl(t).Element||t instanceof Element}function ql(t){return t instanceof jl(t).HTMLElement||t instanceof HTMLElement}function Nl(t){return"undefined"!=typeof ShadowRoot&&(t instanceof jl(t).ShadowRoot||t instanceof ShadowRoot)}const Ll={name:"applyStyles",enabled:!0,phase:"write",fn:function(t){var e=t.state;Object.keys(e.elements).forEach(function(t){var n=e.styles[t]||{},i=e.attributes[t]||{},r=e.elements[t];ql(r)&&Ml(r)&&(Object.assign(r.style,n),Object.keys(i).forEach(function(t){var e=i[t];!1===e?r.removeAttribute(t):r.setAttribute(t,!0===e?"":e)}))})},effect:function(t){var e=t.state,n={popper:{position:e.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(e.elements.popper.style,n.popper),e.styles=n,e.elements.arrow&&Object.assign(e.elements.arrow.style,n.arrow),function(){Object.keys(e.elements).forEach(function(t){var i=e.elements[t],r=e.attributes[t]||{},o=Object.keys(e.styles.hasOwnProperty(t)?e.styles[t]:n[t]).reduce(function(t,e){return t[e]="",t},{});ql(i)&&Ml(i)&&(Object.assign(i.style,o),Object.keys(r).forEach(function(t){i.removeAttribute(t)}))})}},requires:["computeStyles"]};function Bl(t){return t.split("-")[0]}var zl=Math.max,Hl=Math.min,Ul=Math.round;function Wl(){var t=navigator.userAgentData;return null!=t&&t.brands&&Array.isArray(t.brands)?t.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function Xl(){return!/^((?!chrome|android).)*safari/i.test(Wl())}function Gl(t,e,n){void 0===e&&(e=!1),void 0===n&&(n=!1);var i=t.getBoundingClientRect(),r=1,o=1;e&&ql(t)&&(r=t.offsetWidth>0&&Ul(i.width)/t.offsetWidth||1,o=t.offsetHeight>0&&Ul(i.height)/t.offsetHeight||1);var s=(Dl(t)?jl(t):window).visualViewport,a=!Xl()&&n,c=(i.left+(a&&s?s.offsetLeft:0))/r,l=(i.top+(a&&s?s.offsetTop:0))/o,u=i.width/r,d=i.height/o;return{width:u,height:d,top:l,right:c+u,bottom:l+d,left:c,x:c,y:l}}function Vl(t){var e=Gl(t),n=t.offsetWidth,i=t.offsetHeight;return Math.abs(e.width-n)<=1&&(n=e.width),Math.abs(e.height-i)<=1&&(i=e.height),{x:t.offsetLeft,y:t.offsetTop,width:n,height:i}}function Ql(t,e){var n=e.getRootNode&&e.getRootNode();if(t.contains(e))return!0;if(n&&Nl(n)){var i=e;do{if(i&&t.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function Jl(t){return jl(t).getComputedStyle(t)}function Kl(t){return["table","td","th"].indexOf(Ml(t))>=0}function Zl(t){return((Dl(t)?t.ownerDocument:t.document)||window.document).documentElement}function Yl(t){return"html"===Ml(t)?t:t.assignedSlot||t.parentNode||(Nl(t)?t.host:null)||Zl(t)}function tu(t){return ql(t)&&"fixed"!==Jl(t).position?t.offsetParent:null}function eu(t){for(var e=jl(t),n=tu(t);n&&Kl(n)&&"static"===Jl(n).position;)n=tu(n);return n&&("html"===Ml(n)||"body"===Ml(n)&&"static"===Jl(n).position)?e:n||function(t){var e=/firefox/i.test(Wl());if(/Trident/i.test(Wl())&&ql(t)&&"fixed"===Jl(t).position)return null;var n=Yl(t);for(Nl(n)&&(n=n.host);ql(n)&&["html","body"].indexOf(Ml(n))<0;){var i=Jl(n);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||e&&"filter"===i.willChange||e&&i.filter&&"none"!==i.filter)return n;n=n.parentNode}return null}(t)||e}function nu(t){return["top","bottom"].indexOf(t)>=0?"x":"y"}function iu(t,e,n){return zl(t,Hl(e,n))}function ru(t){return Object.assign({},{top:0,right:0,bottom:0,left:0},t)}function ou(t,e){return e.reduce(function(e,n){return e[n]=t,e},{})}function su(t){return t.split("-")[1]}var au={top:"auto",right:"auto",bottom:"auto",left:"auto"};function cu(t){var e,n=t.popper,i=t.popperRect,r=t.placement,o=t.variation,s=t.offsets,a=t.position,c=t.gpuAcceleration,l=t.adaptive,u=t.roundOffsets,d=t.isFixed,h=s.x,f=void 0===h?0:h,m=s.y,p=void 0===m?0:m,g="function"==typeof u?u({x:f,y:p}):{x:f,y:p};f=g.x,p=g.y;var y=s.hasOwnProperty("x"),v=s.hasOwnProperty("y"),w=Pl,b=Sl,_=window;if(l){var S=eu(n),I="clientHeight",k="clientWidth";if(S===jl(n)&&"static"!==Jl(S=Zl(n)).position&&"absolute"===a&&(I="scrollHeight",k="scrollWidth"),r===Sl||(r===Pl||r===kl)&&o===Tl)b=Il,p-=(d&&S===_&&_.visualViewport?_.visualViewport.height:S[I])-i.height,p*=c?1:-1;if(r===Pl||(r===Sl||r===Il)&&o===Tl)w=kl,f-=(d&&S===_&&_.visualViewport?_.visualViewport.width:S[k])-i.width,f*=c?1:-1}var P,C=Object.assign({position:a},l&&au),E=!0===u?function(t,e){var n=t.x,i=t.y,r=e.devicePixelRatio||1;return{x:Ul(n*r)/r||0,y:Ul(i*r)/r||0}}({x:f,y:p},jl(n)):{x:f,y:p};return f=E.x,p=E.y,c?Object.assign({},C,((P={})[b]=v?"0":"",P[w]=y?"0":"",P.transform=(_.devicePixelRatio||1)<=1?"translate("+f+"px, "+p+"px)":"translate3d("+f+"px, "+p+"px, 0)",P)):Object.assign({},C,((e={})[b]=v?p+"px":"",e[w]=y?f+"px":"",e.transform="",e))}var lu={passive:!0};var uu={left:"right",right:"left",bottom:"top",top:"bottom"};function du(t){return t.replace(/left|right|bottom|top/g,function(t){return uu[t]})}var hu={start:"end",end:"start"};function fu(t){return t.replace(/start|end/g,function(t){return hu[t]})}function mu(t){var e=jl(t);return{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function pu(t){return Gl(Zl(t)).left+mu(t).scrollLeft}function gu(t){var e=Jl(t),n=e.overflow,i=e.overflowX,r=e.overflowY;return/auto|scroll|overlay|hidden/.test(n+r+i)}function yu(t){return["html","body","#document"].indexOf(Ml(t))>=0?t.ownerDocument.body:ql(t)&&gu(t)?t:yu(Yl(t))}function vu(t,e){var n;void 0===e&&(e=[]);var i=yu(t),r=i===(null==(n=t.ownerDocument)?void 0:n.body),o=jl(i),s=r?[o].concat(o.visualViewport||[],gu(i)?i:[]):i,a=e.concat(s);return r?a:a.concat(vu(Yl(s)))}function wu(t){return Object.assign({},t,{left:t.x,top:t.y,right:t.x+t.width,bottom:t.y+t.height})}function bu(t,e,n){return e===$l?wu(function(t,e){var n=jl(t),i=Zl(t),r=n.visualViewport,o=i.clientWidth,s=i.clientHeight,a=0,c=0;if(r){o=r.width,s=r.height;var l=Xl();(l||!l&&"fixed"===e)&&(a=r.offsetLeft,c=r.offsetTop)}return{width:o,height:s,x:a+pu(t),y:c}}(t,n)):Dl(e)?function(t,e){var n=Gl(t,!1,"fixed"===e);return n.top=n.top+t.clientTop,n.left=n.left+t.clientLeft,n.bottom=n.top+t.clientHeight,n.right=n.left+t.clientWidth,n.width=t.clientWidth,n.height=t.clientHeight,n.x=n.left,n.y=n.top,n}(e,n):wu(function(t){var e,n=Zl(t),i=mu(t),r=null==(e=t.ownerDocument)?void 0:e.body,o=zl(n.scrollWidth,n.clientWidth,r?r.scrollWidth:0,r?r.clientWidth:0),s=zl(n.scrollHeight,n.clientHeight,r?r.scrollHeight:0,r?r.clientHeight:0),a=-i.scrollLeft+pu(t),c=-i.scrollTop;return"rtl"===Jl(r||n).direction&&(a+=zl(n.clientWidth,r?r.clientWidth:0)-o),{width:o,height:s,x:a,y:c}}(Zl(t)))}function _u(t,e,n,i){var r="clippingParents"===e?function(t){var e=vu(Yl(t)),n=["absolute","fixed"].indexOf(Jl(t).position)>=0&&ql(t)?eu(t):t;return Dl(n)?e.filter(function(t){return Dl(t)&&Ql(t,n)&&"body"!==Ml(t)}):[]}(t):[].concat(e),o=[].concat(r,[n]),s=o[0],a=o.reduce(function(e,n){var r=bu(t,n,i);return e.top=zl(r.top,e.top),e.right=Hl(r.right,e.right),e.bottom=Hl(r.bottom,e.bottom),e.left=zl(r.left,e.left),e},bu(t,s,i));return a.width=a.right-a.left,a.height=a.bottom-a.top,a.x=a.left,a.y=a.top,a}function Su(t){var e,n=t.reference,i=t.element,r=t.placement,o=r?Bl(r):null,s=r?su(r):null,a=n.x+n.width/2-i.width/2,c=n.y+n.height/2-i.height/2;switch(o){case Sl:e={x:a,y:n.y-i.height};break;case Il:e={x:a,y:n.y+n.height};break;case kl:e={x:n.x+n.width,y:c};break;case Pl:e={x:n.x-i.width,y:c};break;default:e={x:n.x,y:n.y}}var l=o?nu(o):null;if(null!=l){var u="y"===l?"height":"width";switch(s){case xl:e[l]=e[l]-(n[u]/2-i[u]/2);break;case Tl:e[l]=e[l]+(n[u]/2-i[u]/2)}}return e}function Iu(t,e){void 0===e&&(e={});var n=e,i=n.placement,r=void 0===i?t.placement:i,o=n.strategy,s=void 0===o?t.strategy:o,a=n.boundary,c=void 0===a?"clippingParents":a,l=n.rootBoundary,u=void 0===l?$l:l,d=n.elementContext,h=void 0===d?Rl:d,f=n.altBoundary,m=void 0!==f&&f,p=n.padding,g=void 0===p?0:p,y=ru("number"!=typeof g?g:ou(g,El)),v=h===Rl?"reference":Rl,w=t.rects.popper,b=t.elements[m?v:h],_=_u(Dl(b)?b:b.contextElement||Zl(t.elements.popper),c,u,s),S=Gl(t.elements.reference),I=Su({reference:S,element:w,placement:r}),k=wu(Object.assign({},w,I)),P=h===Rl?k:S,C={top:_.top-P.top+y.top,bottom:P.bottom-_.bottom+y.bottom,left:_.left-P.left+y.left,right:P.right-_.right+y.right},E=t.modifiersData.offset;if(h===Rl&&E){var x=E[r];Object.keys(C).forEach(function(t){var e=[kl,Il].indexOf(t)>=0?1:-1,n=[Sl,Il].indexOf(t)>=0?"y":"x";C[t]+=x[n]*e})}return C}function ku(t,e,n){return void 0===n&&(n={x:0,y:0}),{top:t.top-e.height-n.y,right:t.right-e.width+n.x,bottom:t.bottom-e.height+n.y,left:t.left-e.width-n.x}}function Pu(t){return[Sl,kl,Il,Pl].some(function(e){return t[e]>=0})}function Cu(t,e,n){void 0===n&&(n=!1);var i,r,o=ql(e),s=ql(e)&&function(t){var e=t.getBoundingClientRect(),n=Ul(e.width)/t.offsetWidth||1,i=Ul(e.height)/t.offsetHeight||1;return 1!==n||1!==i}(e),a=Zl(e),c=Gl(t,s,n),l={scrollLeft:0,scrollTop:0},u={x:0,y:0};return(o||!o&&!n)&&(("body"!==Ml(e)||gu(a))&&(l=(i=e)!==jl(i)&&ql(i)?{scrollLeft:(r=i).scrollLeft,scrollTop:r.scrollTop}:mu(i)),ql(e)?((u=Gl(e,!0)).x+=e.clientLeft,u.y+=e.clientTop):a&&(u.x=pu(a))),{x:c.left+l.scrollLeft-u.x,y:c.top+l.scrollTop-u.y,width:c.width,height:c.height}}function Eu(t){var e=new Map,n=new Set,i=[];function r(t){n.add(t.name),[].concat(t.requires||[],t.requiresIfExists||[]).forEach(function(t){if(!n.has(t)){var i=e.get(t);i&&r(i)}}),i.push(t)}return t.forEach(function(t){e.set(t.name,t)}),t.forEach(function(t){n.has(t.name)||r(t)}),i}var xu={placement:"bottom",modifiers:[],strategy:"absolute"};function Tu(){for(var t=arguments.length,e=new Array(t),n=0;n=0?-1:1,o="function"==typeof n?n(Object.assign({},e,{placement:t})):n,s=o[0],a=o[1];return s=s||0,a=(a||0)*r,[Pl,kl].indexOf(i)>=0?{x:a,y:s}:{x:s,y:a}}(n,e.rects,o),t},{}),a=s[e.placement],c=a.x,l=a.y;null!=e.modifiersData.popperOffsets&&(e.modifiersData.popperOffsets.x+=c,e.modifiersData.popperOffsets.y+=l),e.modifiersData[i]=s}},{name:"flip",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name;if(!e.modifiersData[i]._skip){for(var r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0===s||s,c=n.fallbackPlacements,l=n.padding,u=n.boundary,d=n.rootBoundary,h=n.altBoundary,f=n.flipVariations,m=void 0===f||f,p=n.allowedAutoPlacements,g=e.options.placement,y=Bl(g),v=c||(y===g||!m?[du(g)]:function(t){if(Bl(t)===Cl)return[];var e=du(t);return[fu(t),e,fu(e)]}(g)),w=[g].concat(v).reduce(function(t,n){return t.concat(Bl(n)===Cl?function(t,e){void 0===e&&(e={});var n=e,i=n.placement,r=n.boundary,o=n.rootBoundary,s=n.padding,a=n.flipVariations,c=n.allowedAutoPlacements,l=void 0===c?Fl:c,u=su(i),d=u?a?Ol:Ol.filter(function(t){return su(t)===u}):El,h=d.filter(function(t){return l.indexOf(t)>=0});0===h.length&&(h=d);var f=h.reduce(function(e,n){return e[n]=Iu(t,{placement:n,boundary:r,rootBoundary:o,padding:s})[Bl(n)],e},{});return Object.keys(f).sort(function(t,e){return f[t]-f[e]})}(e,{placement:n,boundary:u,rootBoundary:d,padding:l,flipVariations:m,allowedAutoPlacements:p}):n)},[]),b=e.rects.reference,_=e.rects.popper,S=new Map,I=!0,k=w[0],P=0;P=0,$=T?"width":"height",R=Iu(e,{placement:C,boundary:u,rootBoundary:d,altBoundary:h,padding:l}),O=T?x?kl:Pl:x?Il:Sl;b[$]>_[$]&&(O=du(O));var F=du(O),A=[];if(o&&A.push(R[E]<=0),a&&A.push(R[O]<=0,R[F]<=0),A.every(function(t){return t})){k=C,I=!1;break}S.set(C,A)}if(I)for(var M=function(t){var e=w.find(function(e){var n=S.get(e);if(n)return n.slice(0,t).every(function(t){return t})});if(e)return k=e,"break"},j=m?3:1;j>0;j--){if("break"===M(j))break}e.placement!==k&&(e.modifiersData[i]._skip=!0,e.placement=k,e.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}},{name:"preventOverflow",enabled:!0,phase:"main",fn:function(t){var e=t.state,n=t.options,i=t.name,r=n.mainAxis,o=void 0===r||r,s=n.altAxis,a=void 0!==s&&s,c=n.boundary,l=n.rootBoundary,u=n.altBoundary,d=n.padding,h=n.tether,f=void 0===h||h,m=n.tetherOffset,p=void 0===m?0:m,g=Iu(e,{boundary:c,rootBoundary:l,padding:d,altBoundary:u}),y=Bl(e.placement),v=su(e.placement),w=!v,b=nu(y),_="x"===b?"y":"x",S=e.modifiersData.popperOffsets,I=e.rects.reference,k=e.rects.popper,P="function"==typeof p?p(Object.assign({},e.rects,{placement:e.placement})):p,C="number"==typeof P?{mainAxis:P,altAxis:P}:Object.assign({mainAxis:0,altAxis:0},P),E=e.modifiersData.offset?e.modifiersData.offset[e.placement]:null,x={x:0,y:0};if(S){if(o){var T,$="y"===b?Sl:Pl,R="y"===b?Il:kl,O="y"===b?"height":"width",F=S[b],A=F+g[$],M=F-g[R],j=f?-k[O]/2:0,D=v===xl?I[O]:k[O],q=v===xl?-k[O]:-I[O],N=e.elements.arrow,L=f&&N?Vl(N):{width:0,height:0},B=e.modifiersData["arrow#persistent"]?e.modifiersData["arrow#persistent"].padding:{top:0,right:0,bottom:0,left:0},z=B[$],H=B[R],U=iu(0,I[O],L[O]),W=w?I[O]/2-j-U-z-C.mainAxis:D-U-z-C.mainAxis,X=w?-I[O]/2+j+U+H+C.mainAxis:q+U+H+C.mainAxis,G=e.elements.arrow&&eu(e.elements.arrow),V=G?"y"===b?G.clientTop||0:G.clientLeft||0:0,Q=null!=(T=null==E?void 0:E[b])?T:0,J=F+X-Q,K=iu(f?Hl(A,F+W-Q-V):A,F,f?zl(M,J):M);S[b]=K,x[b]=K-F}if(a){var Z,Y="x"===b?Sl:Pl,tt="x"===b?Il:kl,et=S[_],nt="y"===_?"height":"width",it=et+g[Y],rt=et-g[tt],ot=-1!==[Sl,Pl].indexOf(y),st=null!=(Z=null==E?void 0:E[_])?Z:0,at=ot?it:et-I[nt]-k[nt]-st+C.altAxis,ct=ot?et+I[nt]+k[nt]-st-C.altAxis:rt,lt=f&&ot?(dt=iu(at,et,ut=ct))>ut?ut:dt:iu(f?at:it,et,f?ct:rt);S[_]=lt,x[_]=lt-et}var ut,dt;e.modifiersData[i]=x}},requiresIfExists:["offset"]},{name:"arrow",enabled:!0,phase:"main",fn:function(t){var e,n=t.state,i=t.name,r=t.options,o=n.elements.arrow,s=n.modifiersData.popperOffsets,a=Bl(n.placement),c=nu(a),l=[Pl,kl].indexOf(a)>=0?"height":"width";if(o&&s){var u=function(t,e){return ru("number"!=typeof(t="function"==typeof t?t(Object.assign({},e.rects,{placement:e.placement})):t)?t:ou(t,El))}(r.padding,n),d=Vl(o),h="y"===c?Sl:Pl,f="y"===c?Il:kl,m=n.rects.reference[l]+n.rects.reference[c]-s[c]-n.rects.popper[l],p=s[c]-n.rects.reference[c],g=eu(o),y=g?"y"===c?g.clientHeight||0:g.clientWidth||0:0,v=m/2-p/2,w=u[h],b=y-d[l]-u[f],_=y/2-d[l]/2+v,S=iu(w,_,b),I=c;n.modifiersData[i]=((e={})[I]=S,e.centerOffset=S-_,e)}},effect:function(t){var e=t.state,n=t.options.element,i=void 0===n?"[data-popper-arrow]":n;null!=i&&("string"!=typeof i||(i=e.elements.popper.querySelector(i)))&&Ql(e.elements.popper,i)&&(e.elements.arrow=i)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]},{name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(t){var e=t.state,n=t.name,i=e.rects.reference,r=e.rects.popper,o=e.modifiersData.preventOverflow,s=Iu(e,{elementContext:"reference"}),a=Iu(e,{altBoundary:!0}),c=ku(s,i),l=ku(a,r,o),u=Pu(c),d=Pu(l);e.modifiersData[n]={referenceClippingOffsets:c,popperEscapeOffsets:l,isReferenceHidden:u,hasPopperEscaped:d},e.attributes.popper=Object.assign({},e.attributes.popper,{"data-popper-reference-hidden":u,"data-popper-escaped":d})}}]});function Ou(t,e,n){let i=0,r=0;return!function(t){return-1!==t.indexOf("top")||-1!==t.indexOf("bottom")}(t)?function(t){return-1!==t.indexOf("left")||-1!==t.indexOf("right")}(t)&&(r=e,i=n):(r=n,i=e),function(t){return-1!==t.indexOf("end")}(t)&&(i*=-1),[i,r]}const Fu={on:!1,positions:{mobile:{},tablet:{},desktop:{}},placement:{desktop:"window",mobile:"window"},element:{desktop:{target:"",position:"right",horizontal_offset:0,vertical_offset:0},mobile:{target:"",position:"right",horizontal_offset:0,vertical_offset:0}},rotation:{desktop:0,mobile:0},show_before:!0},Au={"top-left":{transformOrigin:"left top",translateNeg:["-100%","0"],translateZero:["0","0"],translatePos:["0","-100%"]},"top-right":{transformOrigin:"right top",translateNeg:["0","-100%"],translateZero:["0","0"],translatePos:["100%","0"]},"bottom-left":{transformOrigin:"left bottom",translateNeg:["0","100%"],translateZero:["0","0"],translatePos:["-100%","0"]},"bottom-right":{transformOrigin:"right bottom",translateNeg:["100%","0"],translateZero:["0","0"],translatePos:["0","100%"]},left:{transformOrigin:"left top",translateNeg:["-50%","0"],translateZero:["0","-50%"],translatePos:["-50%","-100%"],containerShift:{top:"50%"}},right:{transformOrigin:"right top",translateNeg:["50%","-100%"],translateZero:["0","-50%"],translatePos:["50%","0"],containerShift:{top:"50%"}},top:{transformOrigin:"left top",translateNeg:["-100%","-50%"],translateZero:["-50%","0"],translatePos:["0","-50%"],containerShift:{left:"50%"}},bottom:{transformOrigin:"left bottom",translateNeg:["0","50%"],translateZero:["-50%","0"],translatePos:["-100%","50%"],containerShift:{left:"50%"}},center:{transformOrigin:"left top",translateNeg:["-50%","-50%"],translateZero:["-50%","-50%"],translatePos:["-50%","-50%"],containerShift:{left:"50%",top:"50%"}}},Mu=["0","0"],ju={"top-start":{transformOrigin:"left bottom",translateNeg:["0","100%"],translatePos:["-100%","0"]},top:{transformOrigin:"center bottom",translateNeg:["50%","50%"],translatePos:["-50%","50%"]},"top-end":{transformOrigin:"right bottom",translateNeg:["100%","0"],translatePos:["0","100%"]},"right-start":{transformOrigin:"left top",translateNeg:["-100%","0"],translatePos:["0","-100%"]},right:{transformOrigin:"left center",translateNeg:["-50%","50%"],translatePos:["-50%","-50%"]},"right-end":{transformOrigin:"left bottom",translateNeg:["0","100%"],translatePos:["-100%","0"]},"bottom-start":{transformOrigin:"left top",translateNeg:["-100%","0"],translatePos:["0","-100%"]},bottom:{transformOrigin:"center top",translateNeg:["-50%","-50%"],translatePos:["50%","-50%"]},"bottom-end":{transformOrigin:"right top",translateNeg:["0","-100%"],translatePos:["100%","0"]},"left-start":{transformOrigin:"right top",translateNeg:["0","-100%"],translatePos:["100%","0"]},left:{transformOrigin:"right center",translateNeg:["50%","-50%"],translatePos:["50%","50%"]},"left-end":{transformOrigin:"right bottom",translateNeg:["100%","0"],translatePos:["0","100%"]}},Du={always:!0,on_close:!1,targeting:!1},qu={on_close:"close"};function Nu(t){if(-90===t||"-90"===t)return-90;if(90===t||"90"===t)return 90;if(0===t||"0"===t)return 0;const e=Number(t);return-90===e?-90:90===e?90:0}function Lu(t,e){return-90===t?e.translateNeg:90===t?e.translatePos:e.translateZero}function Bu(t,e,n){switch(t){case"mobile":return e?.mobile??e?.desktop??n;case"tablet":return e?.tablet??e?.desktop??n;default:return e?.desktop??n}}function zu(t){if("string"!=typeof t)return!1;const e=t.trim();return"50%"===e||"-50%"===e||/^calc\s*\(\s*50%/i.test(e)}function Hu(t){switch(t){case"top":case"bottom":return"translateX(-50%)";case"left":case"right":return"translateY(-50%)";case"center":return"translate(-50%, -50%)";default:return}}const Uu={target:"",position:"right",horizontal_offset:0,vertical_offset:0};function Wu(t,e){const n=Bu(t,e.positions,{}),i=Bu(t,e.placement,"window"),r=kt({zIndex:100000002},n),o=Bu(t,e.rotation,0),s=function(t={}){const e=void 0!==t.top,n=void 0!==t.bottom,i=void 0!==t.left,r=void 0!==t.right;return n?i&&!zu(t.left)?"bottom-left":r&&!zu(t.right)?"bottom-right":"bottom":e?i&&!zu(t.left)?"top-left":r&&!zu(t.right)?"top-right":function(t){if("string"!=typeof t)return!1;const e=t.trim();return"50%"===e||"-50%"===e||/^calc\s*\(\s*50%/i.test(e)}(t.top)&&(i&&zu(t.left)||r&&zu(t.right))?"center":"top":i?"left":r?"right":"center"}(n),a=Hu(s),c=a?{...r,transform:a}:r,l=function(t,e,n={}){const i=Nu(e),r=Au[t]??Au.center,o=n.withContainerShift?r.containerShift??{}:{};if(0===i)return o;const[s,a]=Lu(i,r);return{...o,transform:`rotate(${i}deg) translate(${s}, ${a})`,transformOrigin:r.transformOrigin}}(s,o,{withContainerShift:!0});return{placement:i,positionStyles:c,anchorPosition:s,rotation:o,rotationStyles:l,elementSettings:Bu(t,e.element,Uu)}}function Xu({resolvedPlacement:t,useElementPlacement:e,buttonElement:n}){const i={...t.positionStyles};if(e&&n){const t=n.getBoundingClientRect();return{zIndex:i.zIndex,top:`${t.top}px`,left:`${t.left}px`,width:`${t.width}px`,height:`${t.height}px`}}const r=Object.fromEntries(Object.entries(t.rotationStyles).filter(([t])=>"transform"!==t&&"transformOrigin"!==t)),o={...i,...r},s=Hu(t.anchorPosition);return s&&(o.transform=s),o}const Gu=new Map,Vu=new Map;const Qu=cn.CSS_PREFIX+"copy-success";class Ju extends fl{constructor(t,e){super(t,e),this.name="copy-code"}onShow(t){try{this.$elem=t;t[0].querySelectorAll("[data-"+cn.CSS_PREFIX+"copy]").forEach(t=>{t.addEventListener("click",this._getHandleCopy()),t.addEventListener("blur",this._getHandleBlur())})}catch{}}_getHandleBlur(){const t=this;return function(){const e=this;if(!(e instanceof HTMLElement))return;const n=e.dataset[cn.DATASET_PREFIX+"Copy"],i=t.$elem.find("[data-"+cn.CSS_PREFIX+'copy-source="'+n+'"]');An(e).removeClass(Qu),i.removeClass(Qu)}}_getHandleCopy(){return t=>{t.preventDefault();const e=t.currentTarget;if(e instanceof HTMLElement)try{const t=e.dataset[cn.DATASET_PREFIX+"Copy"],n=this.$elem.find("[data-"+cn.CSS_PREFIX+'copy-source="'+t+'"]');let i=n.text()||"";if(i=i.trim(),navigator.clipboard)navigator.clipboard.writeText(i).then(()=>{An(e).addClass(Qu),n.addClass(Qu)}).catch(t=>{Nr.log("CopyCodeBehavior: failed to copy code",t)});else{const t=document.createElement("textarea");t.value=i,t.setAttribute("readonly",""),t.style.position="absolute",t.style.left="-9999px",document.body.appendChild(t),t.select(),t.setSelectionRange(0,i.length+1),document.execCommand("copy"),document.body.removeChild(t),An(e).addClass(Qu),n.addClass(Qu)}}catch{}}}}const Ku=({$element:t,$target:e,placement:n})=>{const i="#"+t[0].id;switch(n){case"before":{const n=e.prev();n&&An(n).is(i)&&n.remove(),e.before(t);break}case"after":{const n=e.next();n&&An(n).is(i)&&n.remove(),e.after(t);break}case"start":{const n=e.children()[0];n&&An(n).is(i)&&n.remove(),e.prepend(t);break}case"replaceContent":e.empty(),e.append(t);break;case"replaceElement":e.replaceWith(t);break;default:{const n=e.children(),r=e.children()[n.length-1];r&&An(r).is(i)&&r.remove(),e.append(t)}}};function Zu(t){return"number"==typeof t?t+"px":"string"!=typeof t?0:-1!==t.indexOf("%")?t:(parseFloat(t)||0)+"px"}const Yu={left:{justifyContent:"flex-start"},right:{justifyContent:"flex-end"},center:{justifyContent:"center"},full_width:{justifyContent:"stretch"}},td=`${cn.CSS_PREFIX}js-embedded-position-wrapper`;class ed{constructor(t){const{settings:e}=t;this.settings=e}async onShow(t,e){"full_width"===(this.settings.position||"center")&&t.addClass("form-full-width");const n=this.createPositionWrapper();n.append(t),_s(e).append(n)}async onClose(t){const e=Ss({$container:t,selector:`.${td}`});e.length&&e.remove()}createPositionWrapper(){const t=this.settings.position||"center",e=this.settings.left_offset||0,n=this.settings.right_offset||0,i=this.settings.top_offset||0,r=this.settings.bottom_offset||0,o=An(`
`),s=Yu[t]||Yu.center,a={display:"flex",paddingTop:Zu(i),paddingBottom:Zu(r),paddingLeft:Zu(e),paddingRight:Zu(n),...s};return o.css(a),o}}const nd={};let id;const rd=function(){function t(t){const{form:e}=t;nd[e.id]&&nd[e.id](e,e.inTargeting)}function e(t){const{form:e}=t;nd[e.id]&&nd[e.id](e,!1)}Kr.on("targeting",t),Kr.on("formClose",e),Kr.on("destroy",function(){id=fe(rd),Kr.off("targeting",t),Kr.off("formClose",e)})};id=fe(rd);const od=new class{constructor(){this.states=new Set}init(){sr.isContactsSent("lead")&&An("body").addClass(`${cn.CSS_PREFIX}submitted`),vs(An("body"))}setState(t){this.states.add(t),An("body").addClass(`${cn.CSS_PREFIX}${t}`)}disableScroll(){if(!cs.ios()||!window.PopMechanic||36179!==window.PopMechanic.client){if(An("body").addClass("popmechanic-disable-scroll"),An("html").addClass("popmechanic-disable-scroll"),cs.ios()){const t=window.getComputedStyle(document.body),e=parseFloat(t.marginLeft)+parseFloat(t.marginRight),n=document.documentElement.clientWidth-e;document.body.style.setProperty("--popmechanic-ios-scroll-fix-width",`${n}px`),An("body").addClass("popmechanic-ios-scroll-fix")}cs.macosx()&&(An("body").addClass("popmechanic-auto-height"),An("html").addClass("popmechanic-auto-height"))}}enableScroll(){cs.ios()&&window.PopMechanic&&36179===window.PopMechanic.client||(An("body").removeClass("popmechanic-disable-scroll popmechanic-auto-height"),An("html").removeClass("popmechanic-disable-scroll popmechanic-auto-height"),cs.ios()&&(document.body.style.removeProperty("--popmechanic-ios-scroll-fix-width"),An("body").removeClass("popmechanic-ios-scroll-fix")))}destroy(){An("body").removeClass(`${cn.CSS_PREFIX}submitted`),An("body").removeClass(`${cn.CSS_PREFIX}mobile`),An("body").removeClass(`${cn.CSS_PREFIX}tablet`),An("body").removeClass(`${cn.CSS_PREFIX}desktop`),this.states.forEach(t=>{An("body").removeClass(`${cn.CSS_PREFIX}${t}`)}),this.states.clear()}};const sd=JSON.parse('[{"mask":"+1(242)###-####"},{"mask":"+1(246)###-####"},{"mask":"+1(264)###-####"},{"mask":"+1(268)###-####"},{"mask":"+1(284)###-####"},{"mask":"+1(340)###-####"},{"mask":"+1(345)###-####"},{"mask":"+1(441)###-####"},{"mask":"+1(473)###-####"},{"mask":"+1(649)###-####"},{"mask":"+1(664)###-####"},{"mask":"+1(670)###-####"},{"mask":"+1(671)###-####"},{"mask":"+1(684)###-####"},{"mask":"+1(721)###-####"},{"mask":"+1(758)###-####"},{"mask":"+1(767)###-####"},{"mask":"+1(784)###-####"},{"mask":"+1(809)###-####"},{"mask":"+1(829)###-####"},{"mask":"+1(849)###-####"},{"mask":"+1(868)###-####"},{"mask":"+1(869)###-####"},{"mask":"+1(876)###-####"},{"mask":"+1(###)###-####"},{"mask":"+20(###)###-####"},{"mask":"+211-##-###-####"},{"mask":"+212-##-####-###"},{"mask":"+213-##-###-####"},{"mask":"+216-##-###-###"},{"mask":"+218-21-###-####"},{"mask":"+218-##-###-###"},{"mask":"+220(###)##-##"},{"mask":"+221-##-###-####"},{"mask":"+222-##-##-####"},{"mask":"+223-##-##-####"},{"mask":"+224-##-###-###"},{"mask":"+225-##-###-###"},{"mask":"+226-##-##-####"},{"mask":"+227-##-##-####"},{"mask":"+228-##-###-###"},{"mask":"+229-##-##-####"},{"mask":"+230-###-####"},{"mask":"+231-##-###-###"},{"mask":"+232-##-######"},{"mask":"+233(###)###-###"},{"mask":"+234-##-###-##"},{"mask":"+234-##-###-###"},{"mask":"+234(###)###-####"},{"mask":"+234(###)###-####"},{"mask":"+235-##-##-##-##"},{"mask":"+236-##-##-####"},{"mask":"+237-####-####"},{"mask":"+238(###)##-##"},{"mask":"+239-##-#####"},{"mask":"+240-##-###-####"},{"mask":"+241-#-##-##-##"},{"mask":"+242-##-###-####"},{"mask":"+243(###)###-###"},{"mask":"+244(###)###-###"},{"mask":"+245-#-######"},{"mask":"+246-###-####"},{"mask":"+247-####"},{"mask":"+248-#-###-###"},{"mask":"+249-##-###-####"},{"mask":"+250(###)###-###"},{"mask":"+251-##-###-####"},{"mask":"+252-#-###-###"},{"mask":"+252-#-###-###"},{"mask":"+252-##-###-###"},{"mask":"+253-##-##-##-##"},{"mask":"+254-###-######"},{"mask":"+255-##-###-####"},{"mask":"+256(###)###-###"},{"mask":"+257-##-##-####"},{"mask":"+258-##-###-###"},{"mask":"+260-##-###-####"},{"mask":"+261-##-##-#####"},{"mask":"+262-#####-####"},{"mask":"+262-#####-####"},{"mask":"+263-#-######"},{"mask":"+264-##-###-####"},{"mask":"+265-1-###-###"},{"mask":"+265-#-####-####"},{"mask":"+266-#-###-####"},{"mask":"+267-##-###-###"},{"mask":"+268-##-##-####"},{"mask":"+269-##-#####"},{"mask":"+27-##-###-####"},{"mask":"+290-####"},{"mask":"+290-####"},{"mask":"+291-#-###-###"},{"mask":"+297-###-####"},{"mask":"+298-###-###"},{"mask":"+299-##-##-##"},{"mask":"+30(###)###-####"},{"mask":"+31-##-###-####"},{"mask":"+32(###)###-###"},{"mask":"+33(###)###-###"},{"mask":"+34(###)###-###"},{"mask":"+350-###-#####"},{"mask":"+351-##-###-####"},{"mask":"+352(###)###-###"},{"mask":"+353(###)###-###"},{"mask":"+354-###-####"},{"mask":"+355(###)###-###"},{"mask":"+356-####-####"},{"mask":"+357-##-###-###"},{"mask":"+358(###)###-##-##"},{"mask":"+359(###)###-###"},{"mask":"+36(###)###-###"},{"mask":"+370(###)##-###"},{"mask":"+371-##-###-###"},{"mask":"+372-###-####"},{"mask":"+372-####-####"},{"mask":"+373-####-####"},{"mask":"+374-##-###-###"},{"mask":"+375(##)###-##-##"},{"mask":"+376-###-###"},{"mask":"+377-##-###-###"},{"mask":"+377(###)###-###"},{"mask":"+378-####-######"},{"mask":"+380(##)###-##-##"},{"mask":"+381-##-###-####"},{"mask":"+382-##-###-###"},{"mask":"+385-##-###-###"},{"mask":"+386-##-###-###"},{"mask":"+387-##-####"},{"mask":"+387-##-#####"},{"mask":"+389-##-###-###"},{"mask":"+39-6-698-#####"},{"mask":"+39(###)####-###"},{"mask":"+40-##-###-####"},{"mask":"+41-##-###-####"},{"mask":"+420(###)###-###"},{"mask":"+421(###)###-###"},{"mask":"+423(###)###-####"},{"mask":"+43(###)###-####"},{"mask":"+44-##-####-####"},{"mask":"+45-##-##-##-##"},{"mask":"+46-##-###-####"},{"mask":"+47(###)##-###"},{"mask":"+48(###)###-###"},{"mask":"+49(###)###-####"},{"mask":"+49-###-###"},{"mask":"+49(###)##-##"},{"mask":"+49(###)##-###"},{"mask":"+49(###)##-####"},{"mask":"+49(####)###-####"},{"mask":"+500-#####"},{"mask":"+501-###-####"},{"mask":"+502-#-###-####"},{"mask":"+503-##-##-####"},{"mask":"+504-####-####"},{"mask":"+505-####-####"},{"mask":"+506-####-####"},{"mask":"+507-###-####"},{"mask":"+508-##-####"},{"mask":"+509-##-##-####"},{"mask":"+51(###)###-###"},{"mask":"+52-##-##-####"},{"mask":"+52(###)###-####"},{"mask":"+53-#-###-####"},{"mask":"+54(###)###-####"},{"mask":"+55-##-####-####"},{"mask":"+56-#-####-####"},{"mask":"+57(###)###-####"},{"mask":"+58(###)###-####"},{"mask":"+590(###)###-###"},{"mask":"+591-#-###-####"},{"mask":"+592-###-####"},{"mask":"+593-#-###-####"},{"mask":"+593-##-###-####"},{"mask":"+594-#####-####"},{"mask":"+595(###)###-###"},{"mask":"+596(###)##-##-##"},{"mask":"+597-###-###"},{"mask":"+597-###-####"},{"mask":"+598-#-###-##-##"},{"mask":"+599-9###-####"},{"mask":"+599-###-####"},{"mask":"+599-###-####"},{"mask":"+599-###-####"},{"mask":"+60-#-###-###"},{"mask":"+60-##-###-###"},{"mask":"+60-##-###-####"},{"mask":"+60(###)###-###"},{"mask":"+61-#-####-####"},{"mask":"+62(8##)###-###"},{"mask":"+62(8##)###-####"},{"mask":"+62(8##)###-##-###"},{"mask":"+62-##-###-##"},{"mask":"+62-##-###-###"},{"mask":"+62-##-###-####"},{"mask":"+63(###)###-####"},{"mask":"+64-##-###-###"},{"mask":"+64(###)###-###"},{"mask":"+64(###)###-####"},{"mask":"+65-####-####"},{"mask":"+66-##-###-###"},{"mask":"+66-##-###-####"},{"mask":"+670-77#-#####"},{"mask":"+670-78#-#####"},{"mask":"+670-###-####"},{"mask":"+672-1##-###"},{"mask":"+672-3##-###"},{"mask":"+673-###-####"},{"mask":"+674-###-####"},{"mask":"+675(###)##-###"},{"mask":"+676-#####"},{"mask":"+677-#####"},{"mask":"+677-###-####"},{"mask":"+678-#####"},{"mask":"+678-##-#####"},{"mask":"+679-##-#####"},{"mask":"+680-###-####"},{"mask":"+681-##-####"},{"mask":"+682-##-###"},{"mask":"+683-####"},{"mask":"+685-##-####"},{"mask":"+686-##-###"},{"mask":"+687-##-####"},{"mask":"+688-2####"},{"mask":"+688-90####"},{"mask":"+689-##-##-##"},{"mask":"+690-####"},{"mask":"+691-###-####"},{"mask":"+692-###-####"},{"mask":"+7(6##)###-##-##"},{"mask":"+7(7##)###-##-##"},{"mask":"+7(###)###-##-##"},{"mask":"+81(###)###-###"},{"mask":"+81-##-####-####"},{"mask":"+82-##-###-####"},{"mask":"+84-##-####-###"},{"mask":"+84(###)####-###"},{"mask":"+850-191-###-####"},{"mask":"+850-###-###"},{"mask":"+850-##-###-###"},{"mask":"+850-####-####"},{"mask":"+850-###-####-###"},{"mask":"+850-####-#############"},{"mask":"+852-####-####"},{"mask":"+853-####-####"},{"mask":"+855-##-###-###"},{"mask":"+856(20##)###-###"},{"mask":"+856-##-###-###"},{"mask":"+86(###)####-###"},{"mask":"+86(###)####-####"},{"mask":"+86-##-#####-#####"},{"mask":"+880-##-###-###"},{"mask":"+886-####-####"},{"mask":"+886-#-####-####"},{"mask":"+90(###)###-####"},{"mask":"+91(####)###-###"},{"mask":"+92(###)###-####"},{"mask":"+93-##-###-####"},{"mask":"+94-##-###-####"},{"mask":"+95-###-###"},{"mask":"+95-#-###-###"},{"mask":"+95-##-###-###"},{"mask":"+960-###-####"},{"mask":"+961-#-###-###"},{"mask":"+961-##-###-###"},{"mask":"+962-#-####-####"},{"mask":"+963-##-####-###"},{"mask":"+964(###)###-####"},{"mask":"+965-####-####"},{"mask":"+966-5-####-####"},{"mask":"+966-#-###-####"},{"mask":"+967-#-###-###"},{"mask":"+967-##-###-###"},{"mask":"+967-###-###-###"},{"mask":"+968-##-###-###"},{"mask":"+970-##-###-####"},{"mask":"+971-5#-###-####"},{"mask":"+971-#-###-####"},{"mask":"+972-5#-###-####"},{"mask":"+972-#-###-####"},{"mask":"+973-####-####"},{"mask":"+974-####-####"},{"mask":"+975-17-###-###"},{"mask":"+975-#-###-###"},{"mask":"+976-##-##-####"},{"mask":"+977-##-###-###"},{"mask":"+98(###)###-####"},{"mask":"+992-##-###-####"},{"mask":"+993-#-###-####"},{"mask":"+994-##-###-##-##"},{"mask":"+995(###)###-###"},{"mask":"+996(###)###-###"},{"mask":"+998-##-###-####"}]');class ad{constructor(t){this.element=t,this.listeners=[]}listen(t,e,n){const i=e;this.element.addEventListener(t,i,n),this.listeners.push(()=>this.element.removeEventListener(t,i))}destroy(){this.listeners.forEach(t=>t())}}function cd({value:t,selection:e},n){const[i,r]=e;return i!==r?[i,r]:n?[i,Math.min(r+1,t.length)]:[Math.max(i-1,0),r]}function ld(t){return t}class ud{constructor(){this.now=null,this.past=[],this.future=[]}undo(){const t=this.past.pop();t&&this.now&&(this.future.push(this.now),this.updateElement(t,"historyUndo"))}redo(){const t=this.future.pop();t&&this.now&&(this.past.push(this.now),this.updateElement(t,"historyRedo"))}updateHistory(t){if(!this.now)return void(this.now=t);const e=this.now.value!==t.value,n=this.now.selection.some((e,n)=>e!==t.selection[n]);(e||n)&&(e&&(this.past.push(this.now),this.future=[]),this.now=t)}updateElement(t,e){this.now=t,this.updateValue(t.value,{inputType:e,data:null}),this.updateSelectionRange(t.selection)}}function dd(t){return"string"==typeof t}function hd(t,e,n){let i=null,r=null;const o=Array.from(t.value).reduce((o,s,a)=>{const c=function(t,e,n,i){let r="";for(let o=e.length;o=t.selection[0]&&(i=l.length),null===r&&a>=t.selection[1]&&(r=l.length),l+s):l},"");return{value:o,selection:[null!=i?i:o.length,null!=r?r:o.length]}}function fd(t,e,n=t){if(function(t,e){return Array.isArray(e)?t.length<=e.length&&Array.from(t).every((t,n)=>{const i=e[n];return dd(i)?t===i:t.match(i)}):e.test(t)}(t.value,e))return t;const{value:i,selection:r}=Array.isArray(e)?hd(t,e,n):function({value:t,selection:e},n){const[i,r]=e;let o=i,s=r;return{value:Array.from(t).reduce((t,e,a)=>{const c=t+e;return i===a&&(o=t.length),r===a&&(s=t.length),c.match(n)?c:t},""),selection:[o,s]}}(t,e);return{selection:r,value:Array.isArray(e)?i.slice(0,e.length):i}}function md(t,e){if(!Array.isArray(e))return t;const[n,i]=t.selection,r=[],o=Array.from(t.value).reduce((t,o,s)=>{const a=e[s];return s===n&&r.push(t.length),s===i&&r.push(t.length),dd(a)&&a===o?t:t+o},"");return r.length<2&&r.push(...Array(2-r.length).fill(o.length)),{value:o,selection:[r[0],r[1]]}}class pd{constructor(t,e){this.initialElementState=t,this.maskOptions=e,this.value="",this.selection=[0,0];const{value:n,selection:i}=fd(t,this.getMaskExpression(t));this.value=n,this.selection=i}addCharacters([t,e],n){const{value:i}=this,r=this.getMaskExpression({value:i.slice(0,t)+n+i.slice(e),selection:[t+n.length,t+n.length]}),o={value:i,selection:[t,e]},s=md(o,r),[a,c]=function({value:t,selection:e},n,i){const[r,o]=e;return{value:t,selection:"replace"===("function"==typeof i?i({value:t,selection:e}):i)?[r,r+n.length]:[r,o]}}(s,n,this.maskOptions.overwriteMode).selection,l=s.value.slice(0,a)+n+s.value.slice(c),u=a+n.length,d=fd({value:l,selection:[u,u]},r,o);if(function(t,...e){return e.every(({value:e,selection:n})=>e===t.value&&n[0]===t.selection[0]&&n[1]===t.selection[1])}(this,d))throw new Error("Invalid mask value");this.value=d.value,this.selection=d.selection}deleteCharacters([t,e]){if(t===e||!e)return;const{value:n}=this,i=this.getMaskExpression({value:n.slice(0,t)+n.slice(e),selection:[t,t]}),r={value:n,selection:[t,e]},o=md(r,i),[s,a]=o.selection,c=fd({value:o.value.slice(0,s)+o.value.slice(a),selection:[s,s]},i,r);this.value=c.value,this.selection=c.selection}getMaskExpression(t){const{mask:e}=this.maskOptions;return"function"==typeof e?e(t):e}}const gd={mask:/^.*$/,preprocessor:ld,postprocessor:ld,overwriteMode:"shift"};class yd extends ud{constructor(t,e){super(),this.element=t,this.maskitoOptions=e,this.eventListener=new ad(this.element),this.options=Object.assign(Object.assign({},gd),this.maskitoOptions),this.conformValueToMask(),this.updateHistory(this.elementState),this.eventListener.listen("keydown",t=>{const{ctrlKey:e,key:n,metaKey:i,shiftKey:r}=t;return i&&r&&"z"===n||e&&"y"===n?(t.preventDefault(),this.redo()):(e||i)&&"z"===n?(t.preventDefault(),this.undo()):void 0}),!function(t){return"onbeforeinput"in t}(t)?(this.eventListener.listen("keydown",t=>this.handleKeydown(t)),this.eventListener.listen("paste",t=>{var e;return this.handleInsert(t,(null===(e=t.clipboardData)||void 0===e?void 0:e.getData("text/plain"))||"")})):this.eventListener.listen("beforeinput",t=>{switch(this.updateHistory(this.elementState),t.inputType){case"historyUndo":return t.preventDefault(),this.undo();case"historyRedo":return t.preventDefault(),this.redo();case"deleteContentBackward":case"deleteWordBackward":case"deleteByCut":return this.handleDelete(t,!1);case"deleteContentForward":case"deleteWordForward":return this.handleDelete(t,!0);case"insertFromDrop":return;case"insertLineBreak":return this.handleEnter(t);default:return this.handleInsert(t,t.data||"")}}),this.eventListener.listen("input",()=>{this.conformValueToMask(),this.updateHistory(this.elementState)})}get elementState(){const{value:t,selectionStart:e,selectionEnd:n}=this.element;return{value:t,selection:[e||0,n||0]}}get isTextArea(){return"TEXTAREA"===this.element.nodeName}destroy(){this.eventListener.destroy()}updateSelectionRange([t,e]){var n,i;this.element.selectionStart===t&&this.element.selectionEnd===e||null===(i=(n=this.element).setSelectionRange)||void 0===i||i.call(n,t,e)}updateValue(t,e={inputType:"insertText",data:null}){if(this.element.value!==t){const n="undefined"!=typeof window?window:globalThis;this.element.value=t,(null==n?void 0:n.InputEvent)&&this.element.dispatchEvent(new InputEvent("input",Object.assign(Object.assign({},e),{bubbles:!0,cancelable:!0})))}}handleKeydown(t){const e=t.key;switch(e){case"Backspace":case"Delete":return this.handleDelete(t,"Delete"===e);case"Enter":return this.handleEnter(t)}(function({key:t,ctrlKey:e,metaKey:n,altKey:i}){const r=e||n||i,o=/^.$/u.test(t);return!r&&"Backspace"!==t&&o})(t)&&this.handleInsert(t,e)}conformValueToMask(){const{value:t,selection:e}=function(t,e){const n=Object.assign(Object.assign({},gd),e),i="string"==typeof t?{value:t,selection:[0,0]}:t,{elementState:r}=n.preprocessor({elementState:i,data:""},"validation"),o=new pd(r,n),{value:s,selection:a}=n.postprocessor(o,i);return"string"==typeof t?s:{value:s,selection:a}}(this.elementState,this.options);this.updateValue(t),this.updateSelectionRange(e)}handleDelete(t,e){const n={value:this.elementState.value,selection:cd(this.elementState,e)},[i,r]=n.selection,{elementState:o}=this.options.preprocessor({elementState:n,data:""},e?"deleteForward":"deleteBackward"),s=new pd(o,this.options),[a,c]=o.selection;s.deleteCharacters([a,c]);const l=this.options.postprocessor(s,n);if(n.value.slice(0,i)+n.value.slice(r)===l.value)return;if(t.preventDefault(),function(t,...e){return e.every(({value:e})=>e===t.value)}(n,o,s,l))return this.updateSelectionRange(e?[c,c]:[a,a]);const u=e?"deleteContentForward":"deleteContentBackward";this.updateValue(l.value,{inputType:"inputType"in t?t.inputType:u,data:null}),this.updateSelectionRange(l.selection),this.updateHistory(l)}handleInsert(t,e){const n=this.elementState,{elementState:i,data:r=e}=this.options.preprocessor({data:e,elementState:n},"insert"),o=new pd(i,this.options);try{o.addCharacters(i.selection,r)}catch(d){return t.preventDefault()}const[s,a]=i.selection,c=i.value.slice(0,s)+e+i.value.slice(a),{value:l,selection:u}=this.options.postprocessor(o,n);c!==l&&(t.preventDefault(),this.updateValue(l,{data:e,inputType:"inputType"in t?t.inputType:"insertText"}),this.updateSelectionRange(u),this.updateHistory({value:l,selection:u}))}handleEnter(t){this.isTextArea&&this.handleInsert(t,"\n")}}const vd=cn.CSS_PREFIX+"phone-mask",wd=/\d/;function bd(t){return t.split("").map(function(t){return"#"===t?wd:t})}const _d={mask:["+"],stringMask:"+"};function Sd(t){const e=bd(t.mask),n=e.map(t=>"string"==typeof t&&/\d/.test(t)?/\d/:t),i=e.filter(t=>"string"!=typeof t||wd.test(t));return{testMask:e,mask:n,stringMask:t.mask,filter:i,disallowedPrefix:t.disallowedPrefix}}const Id=sd.map(Sd);const kd=new Promise(t=>{An(document).ready(()=>{t()})}),Pd=[];function Cd(t,e){const n=bd(e);An(t).each((t,e)=>{if(!(e instanceof HTMLInputElement||e instanceof HTMLTextAreaElement))return;const i=new yd(e,{mask:n,overwriteMode:"shift"});Pd.push(i)})}function Ed(t,e,n){An(t).each((t,i)=>{if(!(i instanceof HTMLInputElement||i instanceof HTMLTextAreaElement))return;const r=new yd(i,{mask:t=>{const r=t.value?function(t,e,n){if(0===(t=t.replace(/\D/g,"")).length)return null;try{const i=e.map(Sd).concat(Id).filter(e=>function(t,e,n){if(t.disallowedPrefix&&e.startsWith(t.disallowedPrefix))return!1;if(n&&t.stringMask.startsWith("+")&&!t.stringMask.startsWith(n))return!1;for(let i=0;i{const n=t=>t.filter.filter(function(t){return"string"!=typeof t}).length-(t.stringMask.startsWith("+")?0:10)-t.filter.filter(function(t){return"string"==typeof t&&/\d/.test(t)}).length;return n(t)-n(e)});return i[0]||null}catch{return null}}(t.value,e,n):_d;if(r)return An(i).data(vd,r.stringMask),r.mask;return bd(An(i).data(vd)||"+")},overwriteMode:"shift"});Pd.push(r)})}Kr.on("destroy",function(){for(;Pd.length>0;){Pd.pop().destroy()}});const xd={common:function(t,e){Cd(t,e)},phones:function(t,e,n){e&&e.length||(e=[]),Ed(t,e,n)},dates:function(t){Cd(t,"##.##.####")},isCompleted:function(t,e){return function(t,e){const n=e.split("");if(t.length!==e.length)return!1;for(let i=0;it.replace(/\D/g,"")};function Rd(t){return"boolean"==typeof t?t?"1":"0":null==t?"":"string"==typeof t?t:String(t)}class Od{constructor(t,e){if(this.updateDeviceUUID(),this._data=t,this._data.form=this._data.id=e.id,this._data.form_name=e.name,this._sendContactsIntegrations=e.getLeadIntegrations(),e.settings&&(this._data.settings=e.settings.id),e.conditions&&e.conditions.id&&(this._data.conditions=e.conditions.id),this._data.device=cs.mobile()?"mobile":cs.tablet()?"tablet":"pc",this._data.source=(or.get.current.typ||"").split("|")[0],"file:"!==location.protocol&&(this._data.url=location.href,this._data.domain=location.hostname),this._data.name){const t=this._data.name.replace(/\s\s/g," ").split(" ");t.length>1?(this._data.first_name=t.shift(),this._data.last_name=t.join(" ")):this._data.first_name=t[0]}this._data.customs=this._data.customs||{},Object.keys(this._data).forEach(t=>{$d[t]&&(this._data[t]=$d[t](this._data[t])),0===t.indexOf("customs.")&&(this._data.customs[t.substr(8)]=this._data[t],delete this._data[t])}),window.PopMechanic.customs&&St(this._data.customs,window.PopMechanic.customs),e.custom_fields&&e.custom_fields.forEach(t=>{this._data.customs[t.machine_name]||(this._data.customs[t.machine_name]=t.default_value)}),"utm"===this._data.source?Object.keys(Td).forEach(t=>{this._data["utm_"+t]=(or.get.current[Td[t]]||"").replace("(none)","")}):this._data.utm_source=(or.get.current[Td.source]||"").replace("(none)",""),Object.keys(this._data.customs).forEach(t=>{const e=this._data.customs[t];Array.isArray(e)?this._data.customs[t]=e.map(t=>Rd(t)):this._data.customs[t]=Rd(e)})}send(t,e){return new Promise((n,i)=>{this._sendContactsIntegrations&&this._sendContactsIntegrations.length>0?Promise.all(this._sendContactsIntegrations.map(t=>t.sendContacts(this._data))).then(()=>{n(t(this._data))}).catch(t=>{e(t),i(t)}):An.ajax({url:cn.CONTACTS_URL+window.PopMechanic.client+"/",type:"POST",data:this.getJSON(),contentType:"application/json; charset=utf-8",success:e=>{n(t(e))},error:(t,n,r)=>{e(r),i(r)}}),sr.setContactsSent()})}getJSON(){return JSON.stringify(this._data)}updateDeviceUUID(){window.PopMechanic.mindboxDeviceUUID&&(window.PopMechanic.customs=window.PopMechanic.customs||{},window.PopMechanic.customs.mindboxDeviceUUID=window.PopMechanic.mindboxDeviceUUID)}}const Fd={email:{test:function(t){return new RegExp("^([\\p{L}0-9_\\-!#$%&'*+/=?^`{}|~])+([.\\p{L}0-9_\\-!#$%&'*+/=?^`{}|~])*@([\\p{L}0-9]([\\p{L}0-9\\-]{0,61}[\\p{L}0-9])?\\.)*[\\p{L}0-9]([\\p{L}0-9\\-]{0,61}[\\p{L}0-9])?$","iu").test(t)}},phone:/^\+?[\d\s-()]+$/,name:/^[\s\S]+$/},Ad={date:{test:function(t){try{let e=t;if(/\d{4}-\d{2}-\d{2}/.test(e)){const[n,i,r]=t.split("-");e=[r,i,n].join(".")}const[n,i,r]=e.split("."),o=Date.parse(`${r}-${i}-${n}`),s=Date.parse("2199-12-31"),a=Date.parse("1900-01-01");return!isNaN(o)&&o<=s&&o>=a}catch{return!1}}}},Md=t=>{const e=Ss({$container:t,selector:`.${cn.CSS_PREFIX}invalid`}).filterVisible();e.length&&e[0].focus()},jd=t=>{let e=!0;return t.find("[data-popmechanic-input]").each(function(){const t=An(this),n=t.attr("data-popmechanic-input")||"",i=t.val(),r=t.data(cn.CSS_PREFIX+"type"),o=void 0!==t.attr("data-popmechanic-required"),s=Fd[n]&&!Fd[n].test(i),a=Ad[r]&&!Ad[r].test(i),c=o&&"checkbox"===t.attr("type")&&!t.is(":checked"),l=o&&!i;if(!(!i&&!o)){if("phone"===n&&e&&i)try{const n=t.data(cn.CSS_PREFIX+"mask");e=e&&xd.isCompleted(t,n)}catch(u){Nr.log(u),e=!1}if(e&&t.is("[data-"+cn.CSS_PREFIX+"mask]"))try{const n=t.data(cn.CSS_PREFIX+"mask");e=e&&xd.isCompleted(t,n)}catch{e=!1}s||a||c||l?(e=!1,t.addClass(cn.CSS_PREFIX+"invalid")):t.addClass(cn.CSS_PREFIX+"valid")}}),e||Md(t),e};const Dd=function(t){return e=>e.startsWith("0")?t+e.substring(1):e.startsWith("(0")?t+"("+e.substring(2):void 0},qd={"+7":{masks:["(###) ###-####","8(###) ###-####"],transformLocal:function(t){return t.startsWith("8(")?"+7("+t.substring(2):"+7"+t}},"+1":{masks:["(###) ###-####"],transformLocal:function(t){return"+1"+t}},"+61":{transformLocal:Dd("+61"),masks:["(0#) #### ####","04## ### ###"]},"+64":{transformLocal:Dd("+64"),masks:["(0##) ### ####","(02#) ### ####","(0#) ### ####"]},"+44":{transformLocal:Dd("+44"),masks:["0##-####-####","07### ######"]},"+375":{masks:["+375(##) ###-####","8(###) ###-####"],transformLocal:function(t){return t.startsWith("8(")?"+375("+t.substring(2):"+375"+t}}};function Nd(t,e){return t?"complete"===e.mode||"geo-guess"===e.mode||t.startsWith("+")?t:qd[e.countryCode].transformLocal(t):t}const Ld=(t,e,n)=>"date"===t?function(t){if(!cs.desktop())try{const e=t.split("-"),[n,i,r]=e;return e.some(t=>t)?[r,i,n].join("."):""}catch{return""}return t}(e):"phone"===t?Nd(e,n):e,Bd={49518:"+250(",51537:"+252-",69543:"+967-",99237:"+964(",102358:"+966-",130758:"+98(",146669:"+357-",149590:"+255-",174982:"+374-",192950:"+254-",223816:"+253-",223817:"+253-",223818:"+253-",226074:"+256(",239880:"+236-",241170:"+248-",248816:"+962-",272103:"+961-",285570:"+965-",286963:"+968-",289688:"+974-",290291:"+973-",290557:"+971-5-",294640:"+972-",298795:"+90(",337996:"+251-",338010:"+291-",357994:"+20(",366755:"+249-",390903:"+30(",433561:"+257-",453733:"+372-",458258:"+371-",587116:"+994-",597427:"+370(",617790:"+373-",630336:"+375(",660013:"+358(",690791:"+380(",719819:"+36(",732800:"+359(",783754:"+355(",798544:"+48(",798549:"+40-",878675:"+263-",895949:"+260-",921929:"+269-",927384:"+265-1-",932692:"+266-",933860:"+267-",934292:"+230-",935317:"+262-",953987:"+27-",1024031:"+262-",1036973:"+258-",1037390:"+258-",1062947:"+261-",1149361:"+93-",1168579:"+92(",1210997:"+880-",1218197:"+993-",1220409:"+992-",1227603:"+94-",1252634:"+975-17-",1269750:"+91(",1282028:"+960-",1282988:"+977-",1512440:"+998-",1522867:"+7(6)-",1527747:"+996(",1559582:"+680-",1562822:"+84-",1605651:"+66-",1643084:"+62-",1655842:"+856-",1668284:"+886-",1694008:"+63(",1699805:"+52(",1710116:"+962-",1713911:"+503-",1733045:"+60(",1819729:"+852-",1819730:"+852-",1821274:"+853-",1831722:"+855-",1861060:"+81(",1880251:"+65-",1880252:"+65-",1899402:"+682-",2017370:"+7(",2029969:"+976-",2077456:"+61-",2080185:"+692-",2088628:"+675(",2103350:"+677-",2110297:"+688-2",2110425:"+674-",2134431:"+678-",2139685:"+687-",2155115:"+672-3-",2186224:"+64(",2205218:"+679-",2215636:"+218-",2221394:"+676-",2233387:"+237-",2243646:"+501-",2245662:"+221-",2264397:"+351-",2275384:"+231-",2300660:"+233(",2309096:"+240-",2328926:"+234(",2361809:"+226-",2363686:"+228-",2372248:"+245-",2378080:"+222-",2395170:"+229-",2400553:"+241-",2403846:"+232-",2410758:"+239-",2411430:"+247-",2411585:"+350-",2411586:"+350-",2413451:"+220(",2417886:"+223-",2420477:"+224-",2434508:"+235-",2440476:"+227-",2453866:"+223-",2464461:"+216-",2510769:"+34(",2542007:"+212-",2562770:"+356-",2589581:"+213-",2622320:"+298-",2623032:"+45-",2629691:"+354-",2635167:"+44-",2658434:"+41-",2661886:"+46-",2782113:"+43(",2802361:"+32(",2921044:"+49(",2960313:"+352(",2960315:"+352(",2960316:"+352(",2963597:"+353(",2993457:"+377(",2993458:"+377(",3017382:"+33(",3041565:"+376-",3042058:"+423(",3057568:"+421(",3130067:"+376-",3144096:"+47(",3168068:"+378-",3168070:"+378-",3175395:"+39(",3190538:"+386-",3194884:"+382-",3202326:"+385-",3277605:"+387-",3345302:"+378-",3351879:"+244(",3355338:"+264-",3370684:"+290-",3370751:"+290-",3373831:"+299-",3374084:"+1(246)-",3378535:"+592-",3382998:"+597-",3395998:"+853-",3425505:"+299-",3437598:"+595(",3439705:"+598-",3456826:"+382-",3465303:"+506-",3469034:"+55-",3474414:"+500-",3489940:"+1(876)-",3508796:"+1(809)-",3523272:"+52(",3534432:"+58(",3556406:"+1(876)-",3562981:"+53-",3563856:"+57(",3570311:"+596(",3572887:"+1(242)-",3573345:"+1(441)-",3573511:"+1(264)-",3575830:"+1(767)-",3576468:"+1(758)-",3577279:"+297-",3577718:"+1(284)-",3578097:"+1(664)-",3579143:"+590(",3580239:"+1(473)-",3580718:"+1(345)-",3582678:"+501-",3585968:"+503-",3587333:"+374-",3595528:"+502-",3595530:"+502-",3608932:"+504-",3617476:"+505-",3623076:"+231-",3624060:"+506-",3625428:"+58(",3658394:"+593-",3674463:"+382-",3686110:"+57(",3686120:"+57(",3689560:"+374-",3690250:"+355(",3703430:"+507-",3703433:"+507-",3703443:"+507-",3723988:"+509-",3749701:"+61-",3865483:"+54(",3895114:"+56-",3923057:"+591-",3923644:"+247-",3932488:"+51(",3993893:"+680-",3996063:"+52(",4003582:"+247-",4030656:"+689-",4030945:"+686-",4031074:"+690-",4032283:"+676-",4034749:"+681-",4034894:"+685-",4036232:"+683-",4041468:"+1(670)-",4043988:"+1(671)-",4254884:"+55-",4297653:"+961-",4394794:"+961-",4398103:"+52(",4428539:"+1(473)-",4516412:"+961-",4636045:"+961-",4717232:"+970-",4905770:"+51(",4917614:"+244(",4922673:"+961-",4924733:"+51(",4969280:"+961-",4975603:"+48(",5032106:"+962-",5088597:"+961-",5119251:"+30(",5122520:"+1(876)-",5197517:"+961-",5390267:"+290-",5392400:"+378-",5736218:"+961-",5880801:"+1(684)-",6251999:"+1(",6252001:"+1(",6290252:"+381-",6690283:"+262-",6690363:"+590(",6690603:"+596(",6691831:"+39-6-698-",6819992:"+235-",6930057:"+290-",7280291:"+886-",7517321:"+223-",7609695:"+1(721)-",7626836:"+599-",7909807:"+211-",8224045:"+962-",8299750:"+1(758)-",8505032:"+599-"};const zd=(t,e,n)=>{try{t.is("input[data-"+cn.CSS_PREFIX+"mask]")?xd.common(t,t.data(cn.CSS_PREFIX+"mask")):t.is("input[data-"+cn.CSS_PREFIX+"input=phone]")?function(t,e,n){let i=[];if(e.countryCode&&(i=qd[e.countryCode]?qd[e.countryCode].masks.map(function(t){return{mask:t,disallowedPrefix:e.countryCode.replaceAll(/\D/g,"")}}):[]),"local"===e.mode)return n&&(t.attr("type","tel"),t.attr("autocomplete","tel"),t.attr("name","phone")),t.attr("data-"+cn.CSS_PREFIX+"phone-mask",e.mask),void xd.phones(t,i,e.countryCode);if(!cs.ios()&&"geo-guess"===e.mode&&n&&(t.attr("type","tel"),t.attr("autocomplete","tel"),t.attr("name","phone")),"geo-guess"===e.mode&&t.on("focus",function(){t.val()||t.val(e.countryCode)}),"local-first"===e.mode)return xd.phones(t,i),void(n&&(t.attr("type","tel"),t.attr("autocomplete","tel"),t.attr("name","phone")));if("custom-mask"!==e.mode)xd.phones(t),cs.ios()&&t.attr("autocomplete","non-existing-field");else if(t.attr("data-"+cn.CSS_PREFIX+"phone-mask",e.mask),xd.common(t,e.mask),n&&(t.attr("type","tel"),t.attr("autocomplete","tel"),t.attr("name","phone")),e.mask&&-1!==e.mask.indexOf("#")){const n=e.mask.indexOf("#"),i=e.mask.substring(0,n);t.val(i)}}(t,e,n):t.is("input[data-"+cn.CSS_PREFIX+"type=date]")&&cs.desktop()&&xd.dates(t)}catch(i){window.PopMechanic.debugMode&&console.error("Error setting inputmask:",i)}};class Hd extends fl{constructor(t,e){super(t,e),this._sending=!1,this.fields=[],this.fieldNamesInHtml=[],this._canSubmit=!0,this._$elem=null,this._view=null,this._showSuccess=!0,this._sent=!1,this._phoneSettings={mode:"geo-guess"},this._requiredFields=["name","email","phone"],this.fields=[],this.fieldNamesInHtml=[],this._phoneSettings=function(t){let e={mode:"complete"};if(!("settings"in t.form.settings))return e;const n=Object.keys(t.form.settings.settings);for(let r=0;r{const n=this._updateField(e,this.leadModel[e],!0);t=n&&t}),t}_normalizeInputValue(t,e){return Ld(t,e,this._phoneSettings)}_validateFieldValue(t,e){return(({field:t,value:e,fieldNamesInHtml:n=[],$elem:i,requiredFields:r=[]})=>{const o=n.find(e=>e.field===t),s=o?o.fieldName:"",a=i.find("[data-"+cn.CSS_PREFIX+'input="'+s+'"]'),c=(!!a.filter("[data-"+cn.CSS_PREFIX+"required]").length||r.includes(t))&&!a.filter("[data-"+cn.CSS_PREFIX+"unrequired]").length,l=a.first().data(cn.CSS_PREFIX+"type"),u=Ad[l],d="string"==typeof(e=null==e?"":e)?e.trim():+e;if(!d&&!c)return!0;let h=!0;if(Fd[t]&&(h=h&&Fd[t].test(d)),h&&u&&(h=h&&u.test(d)),"phone"===t&&h&&d&&0===a.filter("[data-"+cn.CSS_PREFIX+"mask]").length)try{const t=An(a).filter("[data-"+cn.CSS_PREFIX+"phone-mask]").first().data(cn.CSS_PREFIX+"phone-mask");h=h&&xd.isCompleted(a.first(),t)}catch{h=!1}if(h&&a.filter("[data-"+cn.CSS_PREFIX+"mask]").length)try{const t=An(a).filter("[data-"+cn.CSS_PREFIX+"mask]").first().data(cn.CSS_PREFIX+"mask");h=h&&xd.isCompleted(a.first(),t)}catch{h=!1}return c&&(h=h&&!!d),h})({field:t,value:e,fieldNamesInHtml:this.fieldNamesInHtml,$elem:this._$elem,requiredFields:this._requiredFields})}_updateField(t,e,n){const i=this._validateFieldValue(t,e),r=this.fieldNamesInHtml.find(e=>e.field===t),o=r?r.fieldName:"",s=this._$elem?Ss({$container:this._$elem,selector:`[data-${cn.CSS_PREFIX}input="${o}"]`}):An([]);return!i&&n?(s.filter(':not([type="radio"])').filter(':not([type="checkbox"])').filter(':not([type="date"])').val(String(e)),s.addClass(cn.CSS_PREFIX+"invalid"),s.attr("aria-invalid","true")):(s.addClass(cn.CSS_PREFIX+"valid"),s.removeAttr("aria-invalid")),"phone"===t&&(e=Nd(String(e),this._phoneSettings)),this.leadModel[t]=e,this._runIf(),this.updateButtonStates(),i}_runIf(){const t=this.leadModel;this._$elem&&Ss({$container:this._$elem,selector:"[data-popmechanic-if]"}).each(function(){const e=new Function("lead","PopMechanic","return "+An(this).data("popmechanic-if")+";"),n=Ct(t);n.customs=n.customs||{},St(n.customs,window.PopMechanic.customs);try{e(n,window.PopMechanic)?An(this).show():An(this).hide()}catch{An(this).hide()}})}_isFieldValid(t){const e="checkbox"===t.attr("type")?t.is(":checked"):t.val(),n=t.data(cn.CSS_PREFIX+"input");if(!n)return!1;const i=ts(n);return this._validateFieldValue(i,e)}_checkRequiredFieldsAreValid(){const t=this.getCurrentActiveScreen().find("[data-"+cn.CSS_PREFIX+"required]");return Array.from(t).every(t=>this._isFieldValid(An(t)))}canSubmit(){return this._canSubmit&&!this._sending&&!this._sent}_submit(t){let e=!0;if(!this.canSubmit())return;if(this.fields.forEach(t=>{const n=this._updateField(t,this.leadModel[t],!0);e=n&&e}),!e)return void Md(this._$elem);this._sending=!0;const n=new Od(this.leadModel,this._view.form);return this._$elem.addClass(cn.CSS_PREFIX+"pending"),t&&t.preventDefault(),n.send(t=>{if(this._runIf(),window.PopMechanic.leads.push(t),this._$elem.removeClass(cn.CSS_PREFIX+"pending"),this._$elem.addClass(cn.CSS_PREFIX+"submitted"),this._$elem.addClass(cn.CSS_PREFIX+"success"),od.setState("success"),this._sending=!1,this._sent=!0,Kr.trigger("lead",{lead:t,form:this._view.form}),_r.push({type:"lead-success",form:this._view.form.id}),sr.setCompleted(t.form||this._view.form.id),this._showSuccess)return this._view.success(t)},()=>(this._$elem.removeClass(cn.CSS_PREFIX+"pending"),this._$elem.addClass(cn.CSS_PREFIX+"error"),this._sending=!1,Sr({type:"exception",url:location.href}),_r.push({type:"lead-cancel",form:this._view.form.id}),sr.setUncompleted(this._view.form.id),this._view.close()))}_bindEvents(){}updateButtonStates(){const t=this._checkRequiredFieldsAreValid();if(!this._$elem)return;Ss({$container:this._$elem,selector:"[data-disable-if-required]"}).each(function(){const e=An(this);e.toggleClass(cn.CSS_PREFIX+"disabled",!t),e.prop("disabled",!t)})}onBeforeScreenChange(t,e,n,i,r){return r&&An(r.target).attr("data-popmechanic-novalidate")?{allowed:!0}:{allowed:jd(n)}}onScreenChange(t,e,n,i,r){this.updateButtonStates()}onBeforeRender(){return Promise.all([xd.readyPromise,this._geoPromise])}onRender(t,e){super.onRender(t,e),cs.desktop()||(Ss({$container:t,selector:`input[data-${cn.CSS_PREFIX}type=date]`}).attr("type","date"),Ss({$container:t,selector:`input[data-${cn.CSS_PREFIX}input=phone]`}).attr("inputmode","tel"),Ss({$container:t,selector:`input[data-${cn.CSS_PREFIX}mask]`}).attr("inputmode","numeric"))}onShow(t,e){const n=this;super.onShow(t,e),this._$elem=t,this._view=e,this.leadModel={},this._enableAutocomplete&&(Ss({$container:t,selector:`[data-${cn.CSS_PREFIX}input="name"]`}).attr("name","name").attr("autocomplete","given-name"),Ss({$container:t,selector:`[data-${cn.CSS_PREFIX}input="email"]`}).attr("name","email").attr("autocomplete","email")),Ss({$container:t,selector:`[data-${cn.CSS_PREFIX}input]`}).each(function(){const e=An(this),i=e.data(`${cn.CSS_PREFIX}input`),r=Ss({$container:t,selector:`[data-${cn.CSS_PREFIX}input="${i}"]`}),o=e.data(`${cn.CSS_PREFIX}type`);r.each(()=>zd(An(this),n._phoneSettings,n._enableAutocomplete));const s=function(t){if(!t.endsWith("[]"))return null;const e=t.slice(0,-2);return e?{aggregateField:e}:null}(i),a=null!==s,c=a?s.aggregateField:ts(i),l=e.attr("data-"+cn.CSS_PREFIX+"input-singular"),u=e.attr("value"),d=l||(a&&u?c+"."+u:void 0);-1===n.fields.indexOf(c)&&(n.fields.push(c),n.fieldNamesInHtml.push({field:c,fieldName:i}));const h=()=>{d&&(n.leadModel[d]=e.is(":checked"))},f=()=>{if(a)return r.filter(":checked").get().map(t=>t.value);const t="checkbox"===e.attr("type")?e.is(":checked"):e.val();return n._normalizeInputValue(o,t)};if(e.on("keyup click",function(){r.removeClass(cn.CSS_PREFIX+"invalid"),h(),n._updateField(c,f(),!0)}),e.on("change blur",function(){h(),n._updateField(c,f(),!0)}),"radio"!==e.attr("type"))h(),n._updateField(c,f(),!1);else{let t=e.val();t=n._normalizeInputValue(o,t),e.is(":checked")&&n._updateField(c,t,!1)}}),this._bindEvents(),this.updateButtonStates()}onSuccess(t,e,n){let i=!1;return new Promise(e=>{if(n=n||window.PopMechanic.leads[window.PopMechanic.leads.length-1],Ss({$container:t,selector:"[data-popmechanic-var]"}).each(function(){const t=An(this),e=t.attr("data-popmechanic-var");0===e.indexOf("customs")&&(i=!0),t.text(((t,e)=>{let n=e.replace(/\[(\w+)\]/g,".$1");n=n.replace(/^\./,"");const i=n.split(".");let r=t;for(let o=0;o{this._canSubmit=!0}),this._$elem.find("[data-popmechanic-submit-close]").on("click",()=>{this._canSubmit=!0,this._view.close(!0)})}onBeforeClose(t,e,n){this._showSuccess=n.showSuccess,this._submit()}}const Wd=[];for(let Wm=0;Wm<256;++Wm)Wd.push((Wm+256).toString(16).slice(1));const Xd=new Uint8Array(16);function Gd(t,e,n){return crypto.randomUUID?crypto.randomUUID():function(t){t=t||{};const e=t.random??t.rng?.()??crypto.getRandomValues(Xd);if(e.length<16)throw new Error("Random bytes length must be >= 16");return e[6]=15&e[6]|64,e[8]=63&e[8]|128,function(t,e=0){return(Wd[t[e+0]]+Wd[t[e+1]]+Wd[t[e+2]]+Wd[t[e+3]]+"-"+Wd[t[e+4]]+Wd[t[e+5]]+"-"+Wd[t[e+6]]+Wd[t[e+7]]+"-"+Wd[t[e+8]]+Wd[t[e+9]]+"-"+Wd[t[e+10]]+Wd[t[e+11]]+Wd[t[e+12]]+Wd[t[e+13]]+Wd[t[e+14]]+Wd[t[e+15]]).toLowerCase()}(e)}(t)}const Vd=cn.CSS_PREFIX+"screen_active",Qd=".quiz-finish",Jd=".quiz-contacts",Kd=".quiz-contacts-close",Zd="popmechanic-form--matcher-contacts-overlay",Yd=t=>{if(!t.options.length)return null;switch(t.options.length){case 5:return".quiz-question-scale-five";case 7:return".quiz-question-scale-seven";case 11:return".quiz-question-scale-eleven";default:return null}},th=async t=>{const{question:e,view:n}=t;switch(e.type){case"scale":return(async t=>{const{question:e,view:n}=t;"settings"in n.form.settings&&(n.form.settings.settings[(t=>{if(!t.options.length)return null;switch(t.options.length){case 5:return"scale_data_five";case 7:return"scale_data_seven";case 11:return"scale_data_eleven";default:return null}})(e)]=e);const i=(await n.renderWithEnrichedSettings()).find(Yd(e));return{$element:i,getAnswer:()=>{const t=i.find('input[type="radio"]:checked').val();return null==t?null:Number(t)}}})({question:e,view:n});case"multiple":return(async t=>{const{question:e,view:n}=t;"settings"in n.form.settings&&(n.form.settings.settings.multiple_data=e);const i=(await n.renderWithEnrichedSettings()).find(".quiz-question-multiple");return{$element:i,getAnswer:()=>{const t=[];return i.find('input[type="checkbox"]:checked').each((e,n)=>{t.push(n.value)}),t}}})({question:e,view:n});case"single":return(async t=>{const{question:e,view:n}=t;"settings"in n.form.settings&&(n.form.settings.settings.single_data=e);const i=(await n.renderWithEnrichedSettings()).find(".quiz-question-single");return{$element:i,getAnswer:()=>i.find('input[type="radio"]:checked').val()}})({question:e,view:n});case"freeform":return(async t=>{const{question:e,view:n}=t;"settings"in n.form.settings&&(n.form.settings.settings.freeform_data=e);const i=(await n.renderWithEnrichedSettings()).find(".quiz-question-freeform");return{$element:i,getAnswer:()=>i.find("textarea").val()}})({question:e,view:n});default:return{$element:An('
This question type is not supported yet
'),getAnswer:()=>null}}},eh=["nbsp","ensp","shy","emsp"];function nh(t){return function(t){return t.replace(/\[([^\]]+)\]\(([^)]+)\)/g,"$1")}(function(t){const e=document.createElement("div");e.innerText=t;const n=eh.reduce((t,e)=>t.replace(new RegExp(`&${e};`,"g"),`&${e};`),e.innerHTML);return e.remove(),n}(t))}const ih=t=>{t.find("[data-quiz-text]").each(function(){const t=An(this);t.html(nh(t.text().trim()));const e=t.data("link-class");e&&t.find("a").addClass(e)})},rh=async t=>{const{question:e,existingAnswer:n,$elem:i,view:r,isFirstQuestion:o,shouldHideProgressBar:s,autoAdvance:a,onAnswer:c,onNext:l,onPrev:u}=t,d="scale"===e.type?Yd(e):`.quiz-question-${e.type}`,h=i.find(d),f=h.closest(`[data-${cn.DATASET_PREFIX}-screen]`),{$element:m,getAnswer:p}=await th({question:e,view:r});h.replaceWith(m),ih(m);const g=a&&"single"===e.type;null==n||g||((t,e,n)=>{switch(e.type){case"single":case"scale":t.find(`input[value="${n}"]`).prop("checked",!0);break;case"multiple":(Array.isArray(n)?n:[n]).forEach(e=>t.find(`input[value="${e}"]`).prop("checked",!0));break;case"freeform":t.find("textarea").val(n)}})(m,e,n),i.find(`[data-${cn.DATASET_PREFIX}-screen]`).removeClass(Vd),f.attr(`data-${cn.DATASET_PREFIX}-required`,String(!1!==e.required)),f.addClass(Vd),f.find(".quiz-button-next").off("click").on("click",()=>{c(p()),l()}),f.find(".quiz-button-prev").off("click").toggle(!o).on("click",u),f.find(".quiz-progress-container").toggle(!s),g&&(f.off("change.autoAdvance"),f.on("change.autoAdvance",'input[type="radio"]',()=>{c(p()),l()}))};var oh=(t=>(t.SURVEY="survey",t.MATCHER="matcher",t.LEADGEN="leadgen",t))(oh||{}),sh=(t=>(t.WIDGET="widget",t.INLINE="inline",t))(sh||{});class ah{constructor(){this.answers=[]}add(t,e){const n=this.answers.findIndex(e=>e.question===t),i={question:t,answer:e};n>=0?this.answers[n]=i:this.answers.push(i)}getAll(){return[...this.answers]}remove(t){this.answers=this.answers.filter(e=>e.question!==t)}clear(){this.answers=[]}}var ch=(t=>(t.Question="question",t.Contacts="contacts",t.Finished="finished",t))(ch||{});class lh{constructor(t,e){this.config=t,this.onStateChange=e,this.answers=new ah,this.questionHistory=[],this.currentQuestionName=t.structure.startQuestionSystemName,this.phase="question"}get prefillAnswer(){return this._prefillAnswer}get currentQuestion(){return t=this.config.structure,e=this.currentQuestionName,t.questions.find(t=>t.systemName===e);var t,e}get isFirstQuestion(){return 0===this.questionHistory.length}get currentAnsweredCount(){return this.questionHistory.length}get currentPhase(){return this.phase}onAnswer(t,e){this._prefillAnswer=void 0,this.answers.add(t,e)}getAllAnswers(){return this.answers.getAll()}goNext(t={}){const e=this.currentQuestion;if(!e)return this.phase="finished",void(t.silent||this.onStateChange());const n=this.answers.getAll().find(t=>t.question===e.systemName),i=n?.answer,r=null!=i&&(!Array.isArray(i)||i.length);if(!1!==e.required&&!r)return;const o=function(t,e){if("scale"===t.type||"single"===t.type){const n=Array.isArray(e)?e[0]:e,i=t.options.find(t=>String(t.value)===String(n));return i?.nextSystemName}if("multiple"===t.type||"freeform"===t.type)return t.nextSystemName}(e,i??"");this.questionHistory.push(this.currentQuestionName),o&&"finish"!==o?this.currentQuestionName=o:this.phase=this.config.paywall?"contacts":"finished",t.silent||this.onStateChange()}goPrev(){if(this.isFirstQuestion)return;const t=this.questionHistory.pop();this.answers.remove(this.currentQuestionName);const e=this.answers.getAll().find(e=>e.question===t);this._prefillAnswer=e?{...e}:void 0,this.answers.remove(t),this.currentQuestionName=t,this.onStateChange()}finish(){this.phase="finished",this.onStateChange()}restart(){this.answers.clear(),this.questionHistory=[],this.currentQuestionName=this.config.structure.startQuestionSystemName,this.phase="question",this._prefillAnswer=void 0,this.onStateChange()}}const uh=(t,e)=>{const{paths:n,answers:i}=e;if(!n||!Object.keys(n).length)return"options"in t?t.options:[];const r=(t=>{const e=[],n=[[0,[]]];for(;n.length>0;){const[i,r]=n.pop();if(i===t.length){e.push([...r]);continue}const o=t[i];Array.isArray(o.answer)?o.answer.forEach(t=>{n.push([i+1,[...r,t]])}):n.push([i+1,[...r,o.answer]])}return e})(i),o=[];r.forEach(e=>{let i=n;e.forEach(t=>{null!=t&&i?.[String(t)]&&(i=i[String(t)])});const r=Object.keys(i??{}),s=("options"in t?t.options:[]).filter(t=>r.includes(String(t.value)));s.length&&o.push(s)});const s="options"in t?t.options:[];return(t=>{const e=[];return t.forEach(t=>{t.forEach(t=>{e.some(e=>e.value===t.value)||e.push(t)})}),e})(o.length?o:[s])},dh=(t,e)=>"options"in t?{...t,options:uh(t,e)}:t;function hh(t){const{endpointId:e,quizId:n,quizType:i,type:r,status:o,duration:s,answersCount:a,productsCount:c}=t;try{const t=new URL("/quiz-products-recommend-metrics",Yc);t.searchParams.set("e",e),t.searchParams.set("w",n),t.searchParams.set("qt",i),t.searchParams.set("t",r),t.searchParams.set("s",o),t.searchParams.set("r_ft",String(Math.max(0,Math.round(s)))),t.searchParams.set("ac",String(a)),void 0!==c&&t.searchParams.set("pc",String(c));(new Image).src=t.toString()}catch(l){Nr.error({error:"Could not send recommend metrics",context:{cause:l}})}}class fh{constructor(t){const{traceUuid:e,sessionUuid:n,deviceUuid:i,endpointId:r,quizId:o,categoryId:s}=t;this.endpointId=r,this.quizId=o,this.headers={"Content-Type":"application/json","x-location":window.location.href,"x-session-uuid":n,"x-trace-uuid":e,"x-user-uid":i,"x-client-id":r,"x-wizard-id":o,"x-wizard-category-id":s}}async fetchPreview(t,e){const n=performance.now();try{const i=await fetch(`${ro}/api/v0/preview`,{method:"POST",headers:this.headers,body:JSON.stringify({answers:t}),signal:e});if(!i.ok)throw new Error(`HTTP ${i.status}`);const r=await i.json(),o=performance.now()-n;return hh({endpointId:this.endpointId,quizId:this.quizId,quizType:"matcher",type:"preview",status:"success",duration:o,answersCount:t.length,productsCount:r.items.length}),r}catch(i){throw"AbortError"===i?.name||hh({endpointId:this.endpointId,quizId:this.quizId,quizType:"matcher",type:"preview",status:"failed",duration:performance.now()-n,answersCount:t.length}),i}}async fetchRecommend(t,e,n){const i=performance.now();try{const r=await fetch(`${ro}/api/v0/recommend`,{method:"POST",headers:this.headers,body:JSON.stringify({answers:t,deviceType:e}),signal:n});if(!r.ok)throw new Error(`HTTP ${r.status}`);const o=await r.json(),s=performance.now()-i;return hh({endpointId:this.endpointId,quizId:this.quizId,quizType:"matcher",type:"recommend",status:"success",duration:s,answersCount:t.length,productsCount:o.items.length}),o}catch(r){throw"AbortError"===r?.name||hh({endpointId:this.endpointId,quizId:this.quizId,quizType:"matcher",type:"recommend",status:"failed",duration:performance.now()-i,answersCount:t.length}),r}}}const mh="_qz_sess";function ph(t,e,n){const i=new Date(Date.now()+60*n*1e3).toUTCString();document.cookie=`${t}=${encodeURIComponent(e)}; expires=${i}; path=/`}function gh(t){const e=function(t){const e=document.cookie.split(";").find(e=>e.trim().startsWith(`${t}=`));return e?decodeURIComponent(e.trim().slice(t.length+1)):null}(mh);return e?(ph(mh,e,1440),e):(ph(mh,t,1440),t)}function yh(t,e,n,i){const r=t.content.cloneNode(!0).querySelector("a.matcher-suggestion");if(!r)return null;const o=An(r);n&&o.find(".matcher-suggestion-card").addClass(n),o.attr("href",e.link),o.on("click",()=>{i(e.internal_id,e.link)}),o.find(".matcher-suggestion-image").attr("src",e.image).attr("alt",e.name),o.find(".matcher-suggestion-name").html(nh(e.name));const s=o.find(".matcher-suggestion-description");return e.description?s.html(nh(e.description)):s.empty(),e.old_price?(o.find(".matcher-suggestion-price").remove(),o.find(".matcher-suggestion-price-new").html(nh(e.price)),o.find(".matcher-suggestion-price-old").html(nh(e.old_price))):(o.find(".matcher-suggestion-price").html(nh(e.price)),o.find(".matcher-suggestion-price-discount").remove()),r}function vh(t,e,n,i,r){const o=t.find(".matcher-panel-list");if(!o.length)return;if(!e)return;const s=t.find(".matcher-panel-count"),a=s.attr("data-plural-one")??"",c=s.attr("data-plural-few")??"",l=s.attr("data-plural-many")??"";s.text(function(t,e,n,i){const r=t%10,o=t%100;let s;return s=o>=11&&o<=19?i:1===r?e:r>=2&&r<=4?n:i,s.replace("{count}",String(t))}(n.length,a,c,l)),o.each((t,o)=>{const s=An(o);s.empty();for(const a of n){const t=yh(e,a,i,r);t&&s.append(t)}})}const wh=`[data-${cn.DATASET_PREFIX}-screen]`;function bh(t,e){const n=t.find(".matcher-preview-panel");if(!n.length)return;const i=n.find(".matcher-preview-empty-img");e?i.attr("src",e).prop("hidden",!1):i.prop("hidden",!0).removeAttr("src"),n.find(".matcher-preview-loader").prop("hidden",!0),n.find(".matcher-preview-empty").prop("hidden",!1),n.find(".matcher-panel-content").prop("hidden",!0)}function _h(t){t.find(".matcher-preview-panel").prop("hidden",!0)}function Sh(t,e){t.find(".matcher-sort-wrap").prop("hidden",!e)}var Ih=(t=>(t.DEFAULT="",t.UP="up",t.DOWN="down",t))(Ih||{});class kh{constructor(t){(this.sortMenuOpen=!1,this.handleSelectChange=()=>{this.syncHighlight(this.readSortOrder()),this.applyUserSort()},this.onTriggerClick=t=>{t.preventDefault(),t.stopPropagation(),this.sortMenuOpen?this.closeMenu():this.openMenu()},this.onOptionClick=t=>{t.preventDefault(),t.stopPropagation();const e=t.currentTarget.getAttribute("data-value")??"";this.$elem.find(".matcher-sort-select").val(e),this.$elem.find(".matcher-sort-select").trigger("change"),this.closeMenu()},this.onDocClick=t=>{const e=this.$elem.find(".matcher-sort-dropdown")[0];e instanceof Node&&"function"==typeof t.composedPath&&t.composedPath().includes(e)||this.closeMenu()},this.$elem=t.$elem,this.enabled=t.enabled,this.applySortedView=t.applySortedView,this.getSourceItems=t.getSourceItems,this.enabled)?(this.$elem.on("change",".matcher-sort-select",this.handleSelectChange),this.$elem.on("click",".matcher-sort-trigger",this.onTriggerClick),this.$elem.on("click",".matcher-sort-option",this.onOptionClick),this.syncHighlight(this.readSortOrder())):this.$elem.find(".matcher-sort-wrap").remove()}reset(){Sh(this.$elem,!1),this.enabled&&(this.$elem.find(".matcher-sort-select").val(""),this.syncHighlight(Ih.DEFAULT))}showSortWrap(){Sh(this.$elem,this.enabled)}dispose(){this.enabled&&(this.closeMenu(),this.$elem.off("change",".matcher-sort-select",this.handleSelectChange),this.$elem.off("click",".matcher-sort-trigger",this.onTriggerClick),this.$elem.off("click",".matcher-sort-option",this.onOptionClick))}readSortOrder(){return this.$elem.find(".matcher-sort-select").val()??""}applyUserSort(){const t=this.getSourceItems();var e,n;t?.length&&this.applySortedView((e=t,""===(n=this.readSortOrder())?e:[...e].sort((t,e)=>{const i=e.price_raw-t.price_raw;return"down"===n?i:-i})))}openMenu(){const t=this.$elem.find(".matcher-sort-menu");t.length&&!this.sortMenuOpen&&(t.prop("hidden",!1),this.$elem.find(".matcher-sort-trigger").attr("aria-expanded","true"),this.sortMenuOpen=!0,An(document).on("click.matcherSortClose",this.onDocClick))}closeMenu(){this.sortMenuOpen&&(this.$elem.find(".matcher-sort-menu").prop("hidden",!0),this.$elem.find(".matcher-sort-trigger").attr("aria-expanded","false"),this.sortMenuOpen=!1,An(document).off("click.matcherSortClose",this.onDocClick))}syncHighlight(t){const e=this.$elem.find(".matcher-sort-option");e.length&&(e.removeClass("matcher-sort-option--selected"),this.$elem.find(`.matcher-sort-option[data-value="${t}"]`).addClass("matcher-sort-option--selected"))}}const Ph=async t=>{const{view:e,paywall:n,lead:i,$elem:r,onSkip:o,activateScreen:s=!0,bindContactsClose:a=!0}=t;await e.form.init.quizzesPaywallFieldsReady;const c=e.form.init.quizzesPaywallFields,l=c?{...n,fields:n.fields.filter(t=>!c[t]?.present)}:n,u=1===l.fields.length&&"name"===l.fields[0];if(0===l.fields.length||u)return o(),null;"settings"in e.form.settings&&(e.form.settings.settings.contacts_data={...l,...i});const d=(await e.renderWithEnrichedSettings()).find(Jd),h=r.find(Jd).closest(`[data-${cn.DATASET_PREFIX}-screen]`);r.find(Jd).replaceWith(d),ih(d),s&&(r.find(`[data-${cn.DATASET_PREFIX}-screen]`).removeClass(Vd),h.addClass(Vd));const f="optional"===l.mode;if(h.find(".quiz-button-skip").off("click").toggle(f).on("click",o),a){const t=t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),e.close()};h.off("click",Kd,t),h.on("click",Kd,t)}return h};class Ch{constructor(t){this.abortController=null,this.contactsOverlay=null,this.recommendData=null;const e=Gd(),n=gh(e);this.$elem=t.$elem,this.$elem.addClass("popmechanic-form--matcher"),this.productCardType=t.productCardType,this.previewEnabled=t.previewEnabled??!0,this.previewEnabled||_h(this.$elem),this.priceSort=new kh({$elem:this.$elem,enabled:t.sortingEnabled??!0,applySortedView:t=>this.renderFinalItems(t),getSourceItems:()=>this.recommendData?.items}),this.restart=()=>{this.hideContactsOverlay(),function(t){const e=t.find(".matcher-final-screen");e.find(".matcher-preview-loader").prop("hidden",!0),e.find(".matcher-final-empty").prop("hidden",!0),e.find(".matcher-panel-content").prop("hidden",!0),t.find(".matcher-preview-panel").prop("hidden",!1)}(this.$elem),this.previewEnabled||_h(this.$elem),this.recommendData=null,this.priceSort.reset(),t.onRestart()},this.$elem.on("click",".matcher-final-restart",this.restart),this.onMatcherProductClick=t.onMatcherProductClick,this.api=new fh({traceUuid:e,sessionUuid:n,deviceUuid:t.deviceUuid,endpointId:t.endpointId,quizId:t.quizId,categoryId:t.categoryId})}async onQuestionShown(t,e){if(this.abortController?.abort(),this.abortController=new AbortController,!this.previewEnabled)return void function(t,e){if(e)return t.find(".matcher-preview-panel").prop("hidden",!1),void bh(t,e);_h(t)}(this.$elem,e);let n;!function(t){const e=t.find(".matcher-preview-panel");e.length&&(e.find(".matcher-preview-loader").prop("hidden",!1),e.find(".matcher-preview-empty").prop("hidden",!0),e.find(".matcher-panel-content").prop("hidden",!0))}(this.$elem);try{n=await this.api.fetchPreview(t,this.abortController.signal)}catch(i){if("AbortError"===i?.name)return;return void bh(this.$elem,e)}n.items.length?(this.renderPreviewItems(n.items),function(t){const e=t.find(".matcher-preview-panel");e.length&&(e.find(".matcher-preview-loader").prop("hidden",!0),e.find(".matcher-preview-empty").prop("hidden",!0),e.find(".matcher-panel-content").prop("hidden",!1))}(this.$elem)):bh(this.$elem,e)}get hasRecommendations(){return!!this.recommendData?.items.length}async renderContactsOverlay(t){this.hideContactsOverlay(),t.paywall&&this.hasRecommendations&&(this.contactsOverlay=await(async t=>{const{view:e,paywall:n,lead:i,$elem:r}=t,o=()=>{r.removeClass(Zd),r.off("click",Kd,s)},s=t=>{t.preventDefault(),t.stopPropagation(),t.stopImmediatePropagation(),"optional"!==n.mode?e.close():o()},a=await Ph({paywall:n,lead:i,view:e,$elem:r,activateScreen:!1,bindContactsClose:!1,onSkip:o});return a?(r.addClass(Zd),r.off("click",Kd,s),r.on("click",Kd,s),r[0].dispatchEvent(new CustomEvent("quiz:contacts-screen-shown",{bubbles:!0,composed:!0,detail:{$contactsScreen:a,onSubmit:o}})),{hide:o}):null})({view:t.view,paywall:t.paywall,lead:t.lead,$elem:this.$elem}))}async renderFinish(t){var e;this.abortController?.abort(),this.abortController=new AbortController,(e=this.$elem).find(".matcher-preview-panel").prop("hidden",!0),e.find(wh).removeClass(Vd),e.find(".matcher-final-screen").closest(wh).addClass(Vd),function(t){const e=t.find(".matcher-final-screen");e.find(".matcher-preview-loader").prop("hidden",!1),e.find(".matcher-final-empty").prop("hidden",!0),e.find(".matcher-panel-content").prop("hidden",!0)}(this.$elem);const n=Ws();let i;try{this.recommendData=await this.api.fetchRecommend(t,n,this.abortController.signal)}catch(r){if("AbortError"===r?.name)return;i=r,this.recommendData={items:[]}}return this.recommendData.items.length?(this.renderFinalItems(this.recommendData.items),function(t){const e=t.find(".matcher-final-screen");e.find(".matcher-preview-loader").prop("hidden",!0),e.find(".matcher-final-empty").prop("hidden",!0),e.find(".matcher-panel-content").prop("hidden",!1),e.find(".matcher-final-bottom").prop("hidden",!1)}(this.$elem),this.priceSort.showSortWrap()):function(t){const e=t.find(".matcher-final-screen");e.find(".matcher-preview-loader").prop("hidden",!0),e.find(".matcher-final-empty").prop("hidden",!1),e.find(".matcher-panel-content").prop("hidden",!0)}(this.$elem),void 0===i?{}:{error:i}}get templateEl(){return this.$elem.find("#matcher-suggestion-template")[0]}renderPreviewItems(t){vh(this.$elem.find(".matcher-preview-panel .matcher-panel-content"),this.templateEl,t,this.productCardType,this.onMatcherProductClick)}renderFinalItems(t){vh(this.$elem.find(".matcher-final-screen"),this.templateEl,t,this.productCardType,this.onMatcherProductClick)}hideContactsOverlay(){this.contactsOverlay?.hide(),this.contactsOverlay=null}dispose(){this.hideContactsOverlay(),this.$elem.off("click",".matcher-final-restart",this.restart),this.priceSort.dispose(),this.abortController?.abort()}}const Eh="promoblock_data";function xh(t,e){switch(e){case"minute":return 60*t*1e3;case"day":return 24*t*60*60*1e3}}const Th=t=>((t,e)=>{const n=Date.now();for(const[i,r,o]of e){const e=n-xh(i,r);if(t.filter(t=>t>=e).length>=o)return!0}return!1})(t,[[5,"minute",1],[30,"minute",2],[1,"day",3],[7,"day",4],[30,"day",5]]);const $h=t=>{if("string"!=typeof t)return{};try{const e=JSON.parse(t);return(t=>null!==t&&"object"==typeof t&&!Array.isArray(t))(e)?e:{}}catch{return{}}};class Rh{constructor({view:t,question:e,promoBlockSettings:n,onShown:i}){this.selectedAnswer=null,this.view=t,this.question=e,this.promoBlockSettings=n,this.onShown=i,this.unsubscribeButtonShown=function(t,e){Vu.set(t.id,e);const n=Gu.get(t.id);return n&&e(n),()=>{Vu.get(t.id)===e&&Vu.delete(t.id)}}(this.view.form,({handle:t})=>{this.onButtonShown(t)})}consumeSelectedAnswer(){const t=this.selectedAnswer;return this.selectedAnswer=null,t}destroy(){this.unsubscribeFromButtonShown(),this.clearTimer(),this.removePromoBlock(),this.currentButtonHandle=void 0}async onButtonShown(t){this.currentButtonHandle=t,this.clearTimer();const e=await async function({view:t,question:e,positionStyles:n,anchorPosition:i,onClose:r,onAnswer:o}){if("settings"in t.form.settings){const n=t.form.settings.settings[Eh],i=$h(n);t.form.settings.settings[Eh]=JSON.stringify({...i,title:e.label,subtitle:e.description,answers:e.options.map(t=>t.label)})}const s=await t.renderWithEnrichedSettings(),a=s.find("[data-popmechanic-quiz-promoblock]"),c=a.closest("[data-popmechanic-screen]"),l=a.closest('[id^="popmechanic-form"]');if(!a.length||!c.length||!l.length)return;l.find("[data-popmechanic-screen]").not(c).remove();const u={...n,position:"fixed"};cs.desktop()||(u.left="0",u.right="0",u.width="100%",u.transform="none",u.height="auto"),l.css(u),c.addClass("popmechanic-screen_active").removeClass("popmechanic-screen_hidden");const d="top-left"===(h=i)||"top"===h?"top-left":"top-right"===h?"top-right":"right"===h||"bottom-right"===h?"bottom-right":"bottom-left";var h;return"bottom-left"!==d&&a.closest(".quiz-promoblock-wrap").addClass(`quiz-promoblock-wrap--collapse-${d}`),ih(c),c.find(".quiz-promoblock__close, .quiz-promoblock__collapse").off("click").on("click",t=>{t.stopPropagation(),r()}),c.find(".quiz-promoblock__answer").each((t,n)=>{const i=e.options[t];i?(n.setAttribute("data-value",String(i.value)),n.addEventListener("click",t=>{t.stopPropagation(),o(i.value)})):n.remove()}),s}({view:this.view,question:this.question,positionStyles:t.positionStyles,anchorPosition:t.anchorPosition,onClose:()=>this.closePromoBlock(),onAnswer:t=>this.selectAnswer(t)});e&&(this.timerId=setTimeout(()=>{this.showPromoBlock(t,e)},this.promoBlockSettings.autoshowDelayMs))}showPromoBlock(t,e){this.clearTimer(),Th(this.view.form.getCollapsedEvents())||("none"!==t.element.style.display?(this.$promoForm=e,this.unsubscribeFromButtonShown(),t.hide(),this.$promoForm.each((e,n)=>{t.element.parentNode?.appendChild(n)}),kr.add({formId:this.view.form.id,description:"Promoblock shown"}),this.onShown?.()):kr.add({formId:this.view.form.id,description:"Promoblock not shown: button is hidden"}))}closePromoBlock(){this.view.form.markAsCollapsed(),this.removePromoBlock(),this.currentButtonHandle?.show()}selectAnswer(t){this.removePromoBlock(),this.selectedAnswer={questionSystemName:this.question.systemName,value:t},this.currentButtonHandle?.openForm()}removePromoBlock(){this.$promoForm?.remove(),this.$promoForm=void 0}clearTimer(){this.timerId&&(clearTimeout(this.timerId),this.timerId=void 0)}unsubscribeFromButtonShown(){this.unsubscribeButtonShown?.(),this.unsubscribeButtonShown=void 0}}function Oh({view:t,config:e,onShown:n}){if(!t.form.hasEnabledButton())return null;const i=e.structure.questions.find(t=>t.systemName===e.structure.startQuestionSystemName),r=function(t){if(!("settings"in t.form.settings))return null;const e=t.form.settings.settings,n=1===Number(e.use_promoblock),i=Number(e.promoblock_autoshow_page_time_seconds);return!n||!Number.isFinite(i)||i<0?null:{autoshowDelayMs:1e3*i}}(t),o=i&&(e.type===oh.MATCHER?dh(i,{paths:e.paths,answers:[]}):i);return r&&function(t){const{view:e,question:n,promoBlockSettings:i}=t;return!(!i||(void 0===n||"single"!==n.type||0===n.options.length?(kr.add({formId:e.form.id,description:"Promoblock not shown: question type is not compatible"}),1):Th(e.form.getCollapsedEvents())&&(kr.add({formId:e.form.id,description:"Promoblock not shown: show frequency limit reached"}),1)))}({view:t,question:o,promoBlockSettings:r})?new Rh({view:t,question:o,promoBlockSettings:r,onShown:n}):null}const Fh=new Set;function Ah(t){const e={};for(const{question:n,answer:i}of t)e[n]={value:Array.isArray(i)?[...i]:i};return e}const Mh=new Set(["linkClick","quizProductClick"]);function jh(t){return"string"==typeof t&&Mh.has(t)}const Dh=new Map,qh={addEventListener(t,e){let n=Dh.get(t);n||(n=new Set,Dh.set(t,n)),n.add(e)},removeEventListener(t,e){const n=Dh.get(t);n&&(n.delete(e),0===n.size&&Dh.delete(t))},emit(t,e){const n=Dh.get(t);if(!n||0===n.size)return;const i=Array.from(n);for(const o of i)try{o(e)}catch(r){Nr.log(`personalizationEvents: handler for "${t}" threw`,r)}},_reset(){Dh.clear()}};function Nh(t){return new URLSearchParams(window.location.search).get(`qz_question_${t}`)??""}const Lh=(t,e,n)=>{try{window.dataLayer?.push({event:"eventTrack_mindbox-quiz",params:{"mindbox-form":t,"mindbox-event":e,...n}})}catch{}};class Bh{constructor(t){this.isShown=!1,this.isStarted=!1,this.enabled=-327247199===(t=>{let e=0;if(0===t.length)return e;for(let n=0;n`)}function Zh(t){return Ss({$container:t,selector:`.${Uh}`})}function Yh(){return An(`
`)}function tf(t){return Ss({$container:t,selector:`.${Xh}`})}class ef extends Hh{constructor(t){super(t),this._targetElementCheckingIntervalId=null,this._popper=null}shouldRender(){return!0}onRender(){return new Promise(t=>{const e=setInterval(()=>{this.getTargetElement()&&(clearInterval(e),t())},100);Kr.one("destroy",()=>{clearInterval(e)})})}async onShow(t,e){const{$baseWrapper:n,$animationWrapper:i}=this.createWrappers(e);n.append(t),this.initPopper(i[0]),await dl(i,this.settings.animation_in),this._targetElementCheckingIntervalId=setInterval(()=>{const t=this.getTargetElement();!t&&e.filterVisible().length&&this._popper&&(e.hide(),this.clearPopper()),!t||e.filterVisible().length||this._popper||(e.show(),this.initPopper(i[0]))},100)}async onClose(t){const e=tf(t),n=Zh(t);try{await dl(e,this.settings.animation_out),n.remove(),e.css({position:"static",height:0,minHeight:0,overflow:"visible"}),this.clearPopper(),this._targetElementCheckingIntervalId&&(clearInterval(this._targetElementCheckingIntervalId),this._targetElementCheckingIntervalId=null)}catch{this.clearPopper()}}getTargetElement(){return An(this.settings.target)[0]}createWrappers(t){const e=_s(t),n=Kh();n.css({outline:"none",display:"block",textAlign:"left",maxHeight:"100%",maxWidth:"100%",zIndex:99999998});const i=Yh();return i.css({position:"relative",zIndex:1}),i.append(n),e.append(i),{$animationWrapper:i,$baseWrapper:n}}initPopper(t){this._popper=Ru(this.getTargetElement(),t,{placement:this.settings.element_position,modifiers:[{name:"flip",enabled:!1},{name:"offset",options:{offset:({placement:t})=>Ou(t,this.settings.element_horizontal_offset,this.settings.element_vertical_offset)}}]})}clearPopper(){this._popper&&(this._popper.destroy(),this._popper=null)}}class nf extends Hh{constructor(t){super(t);const{forceParanja:e=!1}=t;this._paranjaId=`${cn.CSS_PREFIX}paranja-${this.formId}`,this.forceParanja=e}shouldRender(){return vl(this.formId,this.settings.allow_overlay)}onRender(){if(!this.shouldRender())return Promise.reject();gl(this.formId,this.settings.allow_overlay)}async onShow(t,e,n){const{$paranja:i,$animationWrapper:r,$baseWrapper:o,$clickableOverlay:s}=this.createWrappers(e);this.handleKeyUp=t=>{27===t.keyCode&&n()},An(document).on("keyup",this.handleKeyUp),this.shouldUseParanja()&&(od.disableScroll(),t.css({position:"relative"}),r.css({...Qh,pointerEvents:"all"}),i.css({zIndex:1e8,opacity:this.settings.paranja_opacity})),o.append(t),await dl(r,this.settings.animation_in),i&&s.on("click",()=>{n(!1)})}async onClose(t){const e=tf(t),n=Zh(t),i=this.findParanja(t),r=this.findClickableOverlay(t);var o;yl(this.formId),await dl(e,this.settings.animation_out),n.remove(),e.css({position:"static",height:0,minHeight:0,overflow:"visible"}),i&&(i.css({opacity:0}),await(o=cn.ANIMATION_SPEED,new Promise(t=>{setTimeout(()=>{t()},o)})),i.remove(),r.remove()),od.enableScroll(),An(document).off("keyup",this.handleKeyUp)}handleKeyUp(t){}getBaseWrapperStyles(){const t={zIndex:100000002,outline:"none",display:"block",textAlign:"left",maxHeight:"100%",maxWidth:"100%",...Vh[this.settings.position]};if(-1!==this.settings.position.indexOf("top")&&(t.marginTop=Zu(this.settings.vertical_offset)),-1!==this.settings.position.indexOf("bottom")&&(t.marginBottom=Zu(this.settings.vertical_offset)),this.settings.use_full_screen_width){t.left=0,t.right=0;const e=this.settings.position;"left"===e||"right"===e||"center"===e?t.transform="translateY(-50%)":delete t.transform}else-1!==this.settings.position.indexOf("left")&&(t.marginLeft=Zu(this.settings.horizontal_offset)),-1!==this.settings.position.indexOf("right")&&(t.marginRight=Zu(this.settings.horizontal_offset));return"center"===this.settings.position?t.position="absolute":t.position="fixed",t}createParanja(){return An('
').css({...Qh,backgroundColor:this.settings.paranja_color,opacity:"0",transition:`opacity ${cn.ANIMATION_SPEED}ms`})}findParanja(t){return Ss({$container:t,selector:`#${CSS.escape(this._paranjaId)}`})}createClickableOverlay(){return An(`
`).css(Jh)}findClickableOverlay(t){return Ss({$container:t,selector:`.${Gh}`})}createWrappers(t){const e=_s(t),n=Kh();n.css(this.getBaseWrapperStyles());const i=Yh();i.append(n),e.append(i);let r=null,o=null;return this.shouldUseParanja()&&(r=this.createParanja(),o=this.createClickableOverlay(),i.append(o),e.append(r)),{$paranja:r,$animationWrapper:i,$baseWrapper:n,$clickableOverlay:o}}shouldUseParanja(){return"center"===this.settings.position||this.forceParanja}}class rf extends Hh{constructor(t){super(t),this.handleKeyUp=null,this._paranjaId=`${cn.CSS_PREFIX}paranja-${this.formId}`}shouldRender(){return vl(this.formId,this.settings.allow_overlay)}onRender(){if(!this.shouldRender())return Promise.reject();gl(this.formId,this.settings.allow_overlay)}async onShow(t,e,n){od.disableScroll(),e.addClass(`${cn.CSS_PREFIX}fullscreen`),e.css({position:"fixed",top:0,left:0,right:0,bottom:0,"text-align":"center",height:"auto",overflow:"auto","z-index":1e8});const i=_s(e),r=this.createParanja();i.append(r);const o=Yh();o.css({...Qh,zIndex:100000002,pointerEvents:"all",outline:"none"});const s=this.settings.fullscreen_paddings;t.css({display:"block",position:"absolute",margin:"0",top:0,left:0,width:"100vw",height:"100vh",padding:s?`${s.top}${s.unit} ${s.right}${s.unit} ${s.bottom}${s.unit} ${s.left}${s.unit}`:"0","box-sizing":"border-box"}),o.append(t),i.append(o),r.css({opacity:this.settings.paranja_opacity}),await dl(o,this.settings.animation_in),this.handleKeyUp=t=>{"Escape"===t.key&&(n(),An(document).off("keyup",this.handleKeyUp))},An(document).on("keyup",this.handleKeyUp)}async onClose(t){yl(this.formId),this.handleKeyUp&&(An(document).off("keyup",this.handleKeyUp),this.handleKeyUp=null);const e=tf(t),n=Ss({$container:t,selector:`#${CSS.escape(this._paranjaId)}`});n.css({opacity:0}),await dl(e,this.settings.animation_out),e.css({position:"static",height:0,minHeight:0,overflow:"visible"}),n.remove(),t.css({position:"static",height:0,"min-height":0}),od.enableScroll()}createParanja(){return An(`
`).css({...Qh,backgroundColor:this.settings.paranja_color,opacity:"0",transition:`opacity ${cn.ANIMATION_SPEED}ms`})}}function of(t,e,n){return"mobile"===e&&"window"===n.target&&t.form.isQuizForm()}class sf extends ml{constructor(t,e){super(t,e),this.name="partscreen";const n="behavior_settings"in t.form.settings&&t.form.settings.behavior_settings.partscreen||{},i=this._getDeviceSettings(n);this.settings={animation_in:"fadeIn",animation_out:"fadeOut",paranja_opacity:.3,paranja_color:"black",position:"center",horizontal_offset:0,vertical_offset:0,allow_overlay:!1,target:"window",element_position:"right",element_horizontal_offset:0,element_vertical_offset:0,use_full_screen_width:!1,...n,...i},"desktop"===this.device||Object.prototype.hasOwnProperty.call(i,"horizontal_offset")||(this.settings.horizontal_offset=0),"desktop"===this.device||Object.prototype.hasOwnProperty.call(i,"vertical_offset")||(this.settings.vertical_offset=0);const r="settings"in t.form.settings?t.form.settings.settings:{},o="tablet"===this.device?"desktop":this.device;this.settings.use_full_screen_width="screen"===r[`form_width_type_${o}`];const s={id:this.formId,settings:this.settings};switch(this.settings.target){case"fullscreen":this.positioner=new rf(s);break;case"window":this.positioner=new nf({...s,forceParanja:of(t,this.device,this.settings)});break;default:this.positioner=new ef(s)}}shouldRender(){return this.positioner.shouldRender()}onRender(t){const e=t?this._getForm(t):void 0,n=t?this._getContainer(t):void 0;return this.positioner.onRender(e,n)}async onShow(t,e){const n=this._getForm(t),i=this._getContainer(t);await this.positioner.onShow(n,i,e.close),n.find(`.${cn.CSS_PREFIX}close, [data-${cn.CSS_PREFIX}close]`).on("click",function(){e.close(An(this).data("popmechanic-close"))})}onBeforeScreenChange(){return{allowed:!0,skipFormResize:"fullscreen"===this.settings.target}}onClose(t){const e=this._getContainer(t);return this.positioner.onClose(e,t)}}class af extends fl{constructor(t){super(t),this.name="post-text"}onSuccess(t){return new Promise(e=>{t?.addClass(cn.CSS_PREFIX+"success"),setTimeout(e,6e3)})}}function cf(t,e){if(!t||!e)return;const n=e.toLowerCase();for(const i in t)if(i.toLowerCase()===n)return t[i]}const lf="no data from mindbox";function uf(t,e=0){return Math.floor(e+Math.random()*(t-e))}const df=t=>`https://picsum.photos/${uf(300,200)}/${uf(300,200)}?image=${t}`;let hf=[];function ff(t,e){const n=`Product №${uf(1e5)}`,i=uf(1e5,1),r=Math.floor(Math.random()+.5)?Math.round(i*(1+.5*Math.random())):i;return"number"!=typeof t&&(t=uf(70,50)),{ids:{mindboxId:uf(1e4),[e]:uf(1e4)},name:n,displayName:n,description:Array(uf(6,4)).fill("lorem ipsum").join(" "),code:"Category",url:"#",pictureUrl:df(t),price:i,oldPrice:r,manufacturer:{name:"Mfr"},productGroup:{ids:{}}}}const mf=new class{constructor(t){this.location=t,this.ids=new Set,this.idsWithGroup=new Set}checkLocation(t){return this.location===t}setLocation(t){this.checkLocation(t)||(this.location=t,this.ids.clear(),this.idsWithGroup.clear())}has(t){return this.ids.has(t.toString())}hasGroup(t){for(const[e,n]of Object.entries(t)){const t=this.getKeyForIdAndGroup(e,n);if(this.idsWithGroup.has(t))return!0}return!1}store(t){this.ids.add(t.toString())}storeGroup(t){for(const[e,n]of Object.entries(t)){const t=this.getKeyForIdAndGroup(e,n);this.idsWithGroup.add(t)}}getKeyForIdAndGroup(t,e){return JSON.stringify([t.toString().toLowerCase(),e.toString()])}}("");class pf{}class gf extends pf{constructor(t){super(),this.formId=t.formId,this.shopId=t.shopId,this.listName=t.listName,this.measurementId=t.measurementId,this.trySendGa4Event=t.trySendGa4Event}selectItem(t,e,n){this.sendProductEvent("select_item",{product:t,index:e,props:n})}viewItemList(t,e,n){this.sendProductEvent("view_item_list",{product:t,index:e,props:n})}sendProductEvent(t,{product:e,index:n,props:i}){const r=this.transform(e,n);if(!r)return;const o={item_list_name:this.listName,items:[r]},s={};this.measurementId&&Object.assign(s,{send_to:this.measurementId}),i&&Object.assign(s,i);const a={ecommerce:o};Object.keys(s).length&&Object.assign(a,{common:s});try{this.trySendGa4Event(t,a)}catch(c){Mr("form #"+this.formId+" Google Analytics integration failed:",c)}}transform(t,e){try{return{item_id:t.ids[this.shopId],item_name:t.displayName,item_list_name:this.listName,item_brand:t.manufacturer?t.manufacturer.name:"",price:t.price,index:e+1,quantity:1}}catch(n){return void Mr("form #"+this.formId+" Google Analytics integration failed:",n)}}}class yf extends pf{constructor(){super()}selectItem(t,e,n){}viewItemList(t,e,n){}}const vf=window.navigator.userAgent.toLowerCase();function wf(t){return-1!==vf.indexOf(t)}const bf=wf("windows"),_f=!bf&&wf("android");_f&&wf("mobile"),!bf&&wf("iphone"),wf("ipod");bf&&wf("phone");const Sf=wf("blackberry")||wf("bb10")||wf("rim");Sf&&wf("tablet");const If=(wf("(mobile;")||wf("(tablet;"))&&wf("; rv:");If&&wf("mobile"),wf("meego"),wf("ipad")||navigator.maxTouchPoints&&navigator.maxTouchPoints>2&&/MacIntel/.test(navigator.platform),_f&&wf("mobile"),Sf&&wf("tablet"),bf&&wf("touch"),If&&wf("tablet");var kf=(t=>(t.ScriptError="script-error",t.Timeout="timeout",t))(kf||{});const Pf=new class{store(t){if(this._isMindboxDomain())return;const e=this._getCurrentLocation();mf.checkLocation(e)&&!this._isMindboxDomain()||mf.setLocation(e);t.map(t=>String(t.ids.mindboxId)).forEach(t=>mf.store(t)),t.forEach(t=>{t.productGroup&&t.productGroup.ids&&mf.storeGroup(t.productGroup.ids)})}filter(t){const e=this._getCurrentLocation();return mf.checkLocation(e)?this._isMindboxDomain()?t:t.filter(t=>!mf.has(t.ids.mindboxId)).filter(t=>!t.productGroup||!t.productGroup.ids||!mf.hasGroup(t.productGroup.ids)):t}_isMindboxDomain(){return location.href.indexOf(".mindbox.ru")>-1||location.href.indexOf(".directcrm.ru")>-1||location.href.indexOf(".maestra.io")>-1}_getCurrentLocation(){return location.href.split("#")[0]}};class Cf extends fl{constructor(t,e={trySendGa4Event:To}){super(t,e),this.name="reco_data",this.onBeforeRenderRejectIsDebuggable=!1,this.view=t;const n="behavior_settings"in t.form.settings&&"reco_data"in t.form.settings.behavior_settings?t.form.settings.behavior_settings.reco_data:{};if(this.behaviorSettings={},this.behaviorSettings.shopId=function(t){if(!t)return"";const e=t[0],n=t.slice(1);return""+e.toLowerCase()+n}(n.shopId)||"website",this.behaviorSettings.operations=n.operations||[],this.behaviorSettings.recoLimit=n.recoLimit||null,this.behaviorSettings.productIdsCode=n.productIdsCode||null,this.behaviorSettings.filterByOtherReco="filterByOtherReco"in n&&n.filterByOtherReco,this.behaviorSettings.returnOptimizedPictures="returnOptimizedPictures"in n&&n.returnOptimizedPictures,this.behaviorSettings.priceLocale="priceLocale"in n?n.priceLocale:"ru-RU",this.behaviorSettings.enableUTM="enableUTM"in n&&n.enableUTM,this.behaviorSettings.utmSettings=n.utmSettings||{source:"",medium:"",campaign:"",term:"",content:""},this.behaviorSettings.ga={enabled:!1,trackerName:"",listName:"",measurementId:""},"settings"in t.form.settings){const e=t.form.settings.settings;this.behaviorSettings.ga.enabled="1"===e.enableGA,this.behaviorSettings.ga.trackerName=e.gaTrackerName||"",this.behaviorSettings.ga.listName=e.gaListName||"",this.behaviorSettings.ga.measurementId=e.gaMeasurementId||""}var i;this.currentEntityDataIds=[],this.reportedMbError=!1,this.recommendations=[],this.gaTracker=(i={...this.behaviorSettings.ga,formId:this.formId,shopId:this.behaviorSettings.shopId,trySendGa4Event:this.dependencies.trySendGa4Event}).enabled?new gf(i):new yf}onInit(){this.updateRecoType(this.behaviorSettings)}async onBeforeRender(t,e){this.behaviorSettings.recoType||this.updateRecoType(this.behaviorSettings);const n=this.behaviorSettings.operations.filter(t=>!t.disabled);let i=[];if(oo.recoSlaState.markFormAsWaitingForClient?.(this.formId,kf.ScriptError),i=await async function(t){const{$container:e,type:n,shopId:i,productIdsCode:r,onError:o}=t;try{if("string"==typeof r)return new Function(r)()}catch(c){o({annotation:"there is error, - check code for extracting product IDs",error:c})}const s=e.attr("data-popmechanic-argument");if(s&&"ID продукта в mindbox"!==s)return s.split(",");if(!n||"product"!==n&&"category"!==n)return[];let a=[];try{const t=await jo();if(t&&t[n]&&t[n].ids){const e=cf(t[n].ids,i);void 0!==e?a=[e]:o({annotation:`there is no ${n} id (do not have ids with shopId "${i}") in page data`})}}catch(c){o({annotation:`error while receiving ${n} data, - check ${xr} integration (or check "data-popmechanic-argument" for legacy widgets)`,error:c})}return a}({$container:e,type:n[0]&&n[0].recoType,productIdsCode:this.behaviorSettings.productIdsCode,shopId:this.behaviorSettings.shopId,onError:({annotation:t,error:e})=>{this.logError(t,e),oo.recoSlaState.markFormAsResolved?.(this.formId)}}),oo.recoSlaState.clearWaitingForClient?.(this.formId),this.currentEntityDataIds=i,this.sendArea=e.attr("data-popmechanic-area")||window.mindboxAreaId||window.maestraAreaId,location.href.includes("pm-dummy")){const t=function(t="website",e=[]){if(!hf.length){hf=[];const n=e.reduce((t,e)=>e.disabled||"number"!=typeof e.limit?t:t+e.limit,0);hf=Array.from({length:n},(e,n)=>ff(n+50,t))}return hf}(this.behaviorSettings.shopId,this.behaviorSettings.operations);return await this.handleSuccess(t),void this.reportSlaSuccess()}if($r())try{const t=await this.getRealRecommendations();return void(await this.handleSuccess(t))}catch(r){await this.handleError(r)}else this.reportSlaSuccess()}onClose(){}getSettings(){return{recommendations:this.recommendations,gaTracker:this.gaTracker,tracking:{click:(t=this.formId,e=>{try{Tr("async",{operation:"popmechanic-widget-click-"+t,data:{clicked:{product:{ids:e.ids}}},onSuccess:()=>{},onError:()=>{}})}catch(n){Nr.log("reco widget "+t+": ",n)}})}};var t}async getRealRecommendations(){window.maestraInitialized||this.reportSlaSuccess();const t=this.behaviorSettings.operations.filter(t=>!t.disabled);return Ke((await Promise.all(t.map(t=>this.trySendRequest(t.id,t.recoType,t.limit)))).flat().map(t=>(t.ids.mindboxId=t.ids.mindboxId||t.ids.productId,this.behaviorSettings.enableUTM&&(t.url=function(t,e){const n=new URL(e);return t.source&&n.searchParams.set("utm_source",t.source),t.medium&&n.searchParams.set("utm_medium",t.medium),t.campaign&&n.searchParams.set("utm_campaign",t.campaign),t.term&&n.searchParams.set("utm_term",t.term),t.content&&n.searchParams.set("utm_content",t.content),n.toString()}(this.behaviorSettings.utmSettings,t.url)),t)),!1,t=>t.ids.mindboxId)}updateRecoType(t){t.operations.forEach(t=>{switch(t.recoTarget){case"Offer":t.recoType="product";break;case"Category":t.recoType="category";break;default:t.recoType="personal"}}),this.behaviorSettings.recoType=this.behaviorSettings.operations[0]?this.behaviorSettings.operations[0].recoType:"personal"}handleSuccess(t){try{this.currentEntityDataIds.length&&"category"!==this.behaviorSettings.recoType&&(t=t.filter(t=>{const e=cf(t.ids,this.behaviorSettings.shopId);return void 0!==e&&-1===this.currentEntityDataIds.map(String).indexOf(String(e))}))}catch(n){this.logError(n)}const e=this.behaviorSettings.filterByOtherReco?Pf.filter(t):t;if(this.behaviorSettings.recoLimit&&e.splice(this.behaviorSettings.recoLimit,e.length),Pf.store(e),this.recommendations=e.map(t=>function(t,e){const n=Ct(t);n.customFields=n.customFields||{},n.oldPrice&&n.oldPrice<=n.price&&(n.oldPrice=null),n.discount=null,n.oldPrice&&n.oldPrice!==n.price&&(n.discount=(100*(n.oldPrice-n.price)/n.oldPrice).toFixed(0)+"%");try{n.formattedPrice=n.price.toLocaleString(e),n.oldPrice&&(n.formattedOldPrice=n.oldPrice.toLocaleString(e))}catch{}return n}(t,this.behaviorSettings.priceLocale)),!this.recommendations.length)return kr.add({formId:this.formId,type:"reject",description:"Empty recommendations for reco-widget"}),Promise.reject(lf)}async handleError(t){throw this.recommendations=[],this.reportedMbError||t===lf?this.reportSlaSuccess():this.reportSlaFailure(t||"request error"),this.logError(t||"request error"),t}logError(...t){Nr.log("reco widget "+this.formId+": ",...t)}async trySendRequest(t,e,n){try{return await this.sendRequest(t,e,n)}catch(i){return this.logError(i),[]}}getRequestParams(t,e){const n=this.behaviorSettings.shopId,i={recommendation:{returnOptimizedPictures:!!this.behaviorSettings.returnOptimizedPictures,limit:e}};if(this.sendArea&&(i.recommendation.area={ids:{externalId:this.sendArea}}),"product"===t){const t=this.currentEntityDataIds[0];i.recommendation.product={ids:{[n]:String(t)}}}if("category"===t){const t=this.currentEntityDataIds[0];i.recommendation.productCategory={ids:{[n]:String(t)}}}return i}async sendRequest(t,e,n){if(!t)return[];await oo.getMindboxIsReadyPromise();const i=setTimeout(()=>{this.reportSlaSuccess()},1e3),r=this.getRequestParams(e,n);try{const e=await function(t,e){return new Promise((n,i)=>{Tr("sync",{operation:t,data:e,onSuccess:n,onError:i})})}(t,r);return clearTimeout(i),"object"==typeof e&&"recommendations"in e&&Array.isArray(e.recommendations)&&e.recommendations||[]}catch(o){if(clearTimeout(i),"object"==typeof o&&"message"in o&&"string"==typeof o.message){const t=function(t,e,n,i){let r="unknownError",o={};const s=/^Unknown endpoint: "([^"]+)"/;if(s.test(e.errorMessage))r="endpointInvalid",o={endpoint:e.errorMessage.replace(s,"$1"),site:document.location.host};else if("product"===n&&/Продукт не найден/.test(e.message)){r="productNotFound";const e=cf(i.recommendation.product.ids,t);o={productId:String(e||"undefined")}}else if("category"===n&&/Категория продуктов не найдена/.test(e.message)){r="categoryNotFound";const e=cf(i.recommendation.productCategory.ids,t);o={categoryId:String(e||"undefined")}}return{type:r,payload:o,url:document.location.href}}(this.behaviorSettings.shopId,o,e,r);this.reportMbError(t)}throw o}}reportMbError(t){if("unknownError"!==t.type){this.reportedMbError=!0;try{!function(t,e){const n=cn.WEB_URL;An.ajax({type:"post",url:`${n}${window.PopMechanic.client}/report/${t}/`,data:JSON.stringify(e),contentType:"application/json",dataType:"json"})}(this.formId,t)}catch(e){this.logError(e)}}else this.reportedMbError=!1}reportSlaSuccess(t){this.view.form.reportSlaSuccess(t)}reportSlaFailure(t,e){this.view.form.reportSlaFailure(t,e)}}class Ef extends fl{constructor(t,e){super(t,e),this.name="reco-sla",this.form=t.form,this.unloadReporter=t.form.init.unloadReporter}onTargetingReady(){this.form.isControlGroup||(window.PopMechanic.slaRequired=!0,oo.recoSlaState.markFormAsPending?.(this.formId),this.form.reportSlaSuccess=this._reportSlaSuccess.bind(this),this.form.reportSlaFailure=this._reportSlaFailure.bind(this),this.unloadReporter.enable())}_reportSlaSuccess(t){if(oo.recoSlaState.markFormAsResolved?.(this.formId),!oo.recoSlaState.hasPendingForms?.()){const e=this.form.needsSla?this.form.slaTimer.valueOf():0;!function(t,e,n){if(window.PopMechanic.sampleSent)return;const i=oo.getTabVisibilityDuration(),r=i-n;if(r>tl)return oo.reportFailure("timeout",{formId:e,currentSearchBlockTime:n});window.PopMechanic.sampleSent=!0;const o=oo.getTabInvisibilityDuration(),s=window.PopMechanic.tabVisibility.startedInvisible,a=window.PopMechanic.initReadyTs,c=window.PopMechanic.targetingReadyTs,l=navigator&&navigator.connection&&navigator.connection.downlink,u=oo.getDeviceType(),d=navigator&&navigator.webdriver;(new Image).src=Yc+"/check-reco?result=success"+(t?"&reason="+t:"")+"&t="+r+"&t1="+a+"&t2="+c+"&tl="+i+"&ti="+o+"&ts="+n+"&tcs="+n+"&si="+(s?"1":"0")+"&dl="+("number"==typeof l?l:"unknown")+"&dt="+u+"&wd="+(d?"1":"0")+"&c="+window.PopMechanic.client+"&url="+encodeURIComponent(location.pathname)+"&fid="+e+"&_="+ +Date.now()}(t,this.formId,e)}}_reportSlaFailure(t,e){let n="";"object"==typeof e?n="message"in e?e.message:JSON.stringify(e):"string"==typeof e&&(n=e);const i=this.form.needsSla?this.form.slaTimer.valueOf():0;oo.reportFailure(t,{formId:this.formId,scriptError:n,currentSearchBlockTime:i})}}const xf={top:"fadeInUp",bottom:"fadeInDown",left:"fadeInLeft",right:"fadeInRight","top-left":"fadeInUp","top-right":"fadeInUp","bottom-left":"fadeInDown","bottom-right":"fadeInDown"},Tf={top:"fadeOutUp",bottom:"fadeOutDown",left:"fadeOutLeft",right:"fadeOutRight","top-left":"fadeOutUp","top-right":"fadeOutUp","bottom-left":"fadeOutDown","bottom-right":"fadeOutDown"};const $f={seconds:t=>Math.floor(t%60),minutes:t=>Math.floor(t/60)%60,hours:t=>Math.floor(t/3600)%24,days:t=>Math.floor(t/86400)};function Rf(t){return''+t.split("").join('')+""}const Of=604800;function Ff({timerSettings:t,showTime:e}){switch(t.type){case"end":return t.end.date;case"range":return"visit"===t.range.start?e+t.range.duration:Number(t.range.start)+t.range.duration;case"cycle":{const e=t.cycle;if(!e||!e.day||!e.day.length)return 0;const n=new Date,i=(24*n.getUTCDay()*60*60+60*n.getUTCHours()*60+60*n.getUTCMinutes()+n.getUTCSeconds())%Of,r=e.time.split(":"),o=60*parseInt(r[0])*60+60*parseInt(r[1])+60*e.local,s=e.day.map(t=>(24*t*60*60+o)%Of).sort((t,e)=>t-e),a=s.filter(t=>t<=i),c=!a.length,l=c?s[s.length-1]:a[a.length-1],u=i-l+(c?Of:0);return Math.round((new Date).getTime()/1e3)-u+e.duration}default:return 0}}const Af=()=>{const t=Array.from({length:3},(t,e)=>(t=>{const e=1e3*t,n=t+1;return{id:n,price:e,priceWithDiscount:.75*e,name:"Product №"+n,quantity:1,pictureUrl:df(t),url:"#",brand:"Brand",brandId:120,hasDiscount:!0,category:"Category",categoryId:229,tags:["tag 1"]}})(e));return{total:t.reduce((t,e)=>t+Number(e.price),0),totalWithDiscount:t.reduce((t,e)=>t+Number(e.priceWithDiscount),0),products:t}};const Mf="MaestraScripts",jf={};function Df(t){return jf[t]||(jf[t]=new Promise((e,n)=>{try{window[Mf][t](),e()}catch(i){const t=Or(i);Nr.error({error:`executeMindboxScript error ${t.message}`,context:{cause:t}}),n(i)}})),jf[t]}const qf=Cr+"/media/popmechanic/tns-2.9.2.js?v=2";const Nf=Cr+"/media/popmechanic/tns-new.js";const Lf=class t extends fl{constructor(t,e){super(t,e),this.name="splidejs"}loadJs(){return this.dependencies.addScript(t.jsSrc).catch(t=>{throw Nr.error({error:"Error loading splidejs script:",context:{cause:t,formId:this.formId}}),t})}loadCss(){return this.dependencies.addCssLink(t.cssSrc)}async onBeforeRender(){await Promise.all([this.loadJs(),this.loadCss()])}};Lf.jsSrc=Cr+"/media/splide/splide.js",Lf.cssSrc=Cr+"/media/splide/splide.css";let Bf=Lf;const zf=class t extends fl{constructor(t,e){super(t,e),this.name="swiperjs"}loadJs(){return this.dependencies.addScript(t.jsSrc).catch(t=>{throw Nr.error({error:"Error loading swiperjs script:",context:{cause:t,formId:this.formId}}),t})}loadCss(){return this.dependencies.addCssLink(t.cssSrc)}async onBeforeRender(){await Promise.all([this.loadJs(),this.loadCss()])}};zf.jsSrc=Cr+"/media/swiper/swiper.js",zf.cssSrc=Cr+"/media/swiper/swiper.css";let Hf=zf;const Uf=class t extends fl{constructor(t,e){super(t,e),this.name="inapp",this.mobileSdkProvider=null,this._handleInappClick=this._handleInappClick.bind(this),this._handleInappFollow=this._handleInappFollow.bind(this),this._handleInappCopy=this._handleInappCopy.bind(this)}onBeforeRender(){return new Promise(t=>{Tr("mobileSdkProvider.get",e=>{this.mobileSdkProvider=e,t()})})}onShow(t,e){super.onShow(t),this.view=e,t[0].addEventListener("click",this._handleInappClick),t[0].addEventListener("click",this._handleInappFollow),t[0].addEventListener("click",this._handleInappCopy)}onClose(){this._$elem?.[0]?.removeEventListener("click",this._handleInappClick),this._$elem?.[0]?.removeEventListener("click",this._handleInappFollow),this._$elem?.[0]?.removeEventListener("click",this._handleInappCopy)}_handleInappClick(e){if(!this.mobileSdkProvider||!this.view)return;const n=e.target.closest(`[${t.INAPP_CLICK_ATTRIBUTE}]`);if(!n)return;e.preventDefault();const i=n.getAttribute(t.INAPP_CLICK_ATTRIBUTE)??"";let r;try{const t=JSON.parse(i);if(!t||"object"!=typeof t||"string"!=typeof t.intentPayload||"string"!=typeof t.value||"string"!=typeof t.$type)throw new Error("Invalid InappClickData");r=t}catch{return this.mobileSdkProvider.bridgeMessagesHandlers.send("close",{payload:{reason:"invalid-click-data"}}),void this.view.close()}this.mobileSdkProvider.bridgeMessagesHandlers.send("click",{payload:r}),this.mobileSdkProvider.utils.tracking.trackClick(),this.view.close()}_handleInappFollow(e){if(!this.mobileSdkProvider||!this.view)return;const n=e.target.closest(`[${t.INAPP_FOLLOW_ATTRIBUTE}]`);if(!n)return;e.preventDefault();const i=n.getAttribute(t.INAPP_FOLLOW_ATTRIBUTE)??"";this.mobileSdkProvider.bridgeMessagesHandlers.send("click",{payload:{intentPayload:"",value:i,$type:"redirectUrl"}}),this.mobileSdkProvider.utils.tracking.trackClick(),this.view.close()}_handleInappCopy(e){if(!this.mobileSdkProvider||!this.view)return;const n=e.target.closest(`[${t.INAPP_COPY_ATTRIBUTE}]`);if(!n)return;e.preventDefault();const i=n.getAttribute(t.INAPP_COPY_ATTRIBUTE)??"";this.mobileSdkProvider.bridgeMessagesHandlers.send("click",{payload:{intentPayload:i,value:"",$type:"redirectUrl"}}),this.mobileSdkProvider.utils.tracking.trackClick(),this.view.close()}getSettings(){return{mobileSdkProvider:this.mobileSdkProvider}}};Uf.INAPP_CLICK_ATTRIBUTE=`data-${cn.CSS_PREFIX}inapp-click`,Uf.INAPP_FOLLOW_ATTRIBUTE=`data-${cn.CSS_PREFIX}inapp-follow`,Uf.INAPP_COPY_ATTRIBUTE=`data-${cn.CSS_PREFIX}inapp-copy`;let Wf=Uf;const Xf=class extends fl{constructor(t,e){super(t,e),this.name="link-click",this._formEl=null,this._clickHandler=null}onShow(t,e,n){if(super.onShow(t,e,n),!t)return;const i=this._getForm(t)[0];i&&(this._formEl=i,this._clickHandler=t=>{const e=t.target;if(!(e instanceof Element))return;const n=e.closest("a");n&&i.contains(n)&&qh.emit("linkClick",{event:t})},i.addEventListener("click",this._clickHandler,{capture:!0}))}onClose(t,e){super.onClose(t,e),this._formEl&&this._clickHandler&&this._formEl.removeEventListener("click",this._clickHandler,{capture:!0}),this._formEl=null,this._clickHandler=null}};Xf.implicit=!0;let Gf=Xf;const Vf={"banner-h":_l,"banner-v":_l,"copy-code":Ju,"form-container":class extends fl{constructor(t,e){super(t,e),this.name="form-container",this.isQueueActive=!0,this.view=t,this.childrenDisplayQueue=[],this.childForms=t.form.childForms;try{const e=t.form.template?.on_child_ready||"";this._onChildReady=new Function("form","child","children",e)}catch(i){console.error(i),this._onChildReady=()=>{}}this.children=this.childForms.map(window.PopMechanic.getModel).filter(Boolean),this.children.filter(t=>t.inTargeting).forEach(t=>{this.childrenDisplayQueue.push(()=>{this.onChildReady(t)})});const n=nd;for(let r=0;r{this.addToQueue(()=>{this.onChildReady(t,n)})}}id?.()}addToQueue(t){this.isQueueActive?this.childrenDisplayQueue.push(t):t()}onChildReady(t,e){(t=>{const e=t.filter(({inTargeting:t})=>t),n=e.map(t=>t.checkFrequency());return Promise.all(n).then(t=>t.map((t,n)=>t?e[n]:null).filter(t=>!!t))})(this.children).then(n=>{const i=n.map(({id:t})=>window.PopMechanic.getView(t));try{const n=window.PopMechanic.getView(t.id);this._onChildReady(this.view,e?n:null,i)}catch(r){console.error(r)}})}onTargetingReady(){this.children.forEach(t=>{const e=window.PopMechanic.getView(t.id);e&&!e.isTargetingEventSent&&t.inTargeting&&e.onTargetingReady?.()})}onShow(t){requestAnimationFrame(()=>{for(;this.childrenDisplayQueue.length;){this.childrenDisplayQueue.shift()()}this.isQueueActive=!1})}},"lead-on-close":Ud,"lead-partial-submit":class extends Hd{constructor(t,e){super(t,e),this.name="lead-partial-submit",this._hasBeenSubmitted=!1,this._isSecondScreen=!1,this._allow_partial_submit=!!(t.form&&t.form.settings&&"settings"in t.form.settings)&&Boolean(t.form.settings.settings.allow_partial_submit)}_bindEvents(){this._$elem.find("form").on("submit",t=>{t.preventDefault()}),this._$elem.find("[data-"+cn.CSS_PREFIX+"submit]").on("click",t=>{this._hasBeenSubmitted=!0,this._submit(t)})}onShow(t,e){super.onShow(t,e),this._allow_partial_submit&&(this._onPageHide=()=>{this._view?.close()},window.addEventListener("pagehide",this._onPageHide))}onClose(t,e,n){return this._onPageHide&&(window.removeEventListener("pagehide",this._onPageHide),this._onPageHide=void 0),super.onClose(t,e,n)}onBeforeClose(t){if(this._hasBeenSubmitted||!t)return;2===t.find(".popmechanic-screen").filterVisible().data("popmechanicScreen")&&this._allow_partial_submit&&(this._showSuccess=!1,this._hasBeenSubmitted=!0,this._submit())}},"post-text":af,"reco-data":Cf,"reco-sla":Ef,"lead-quiz":class extends Hd{constructor(){super(...arguments),this.name="lead-quiz"}onShow(t,e){super.onShow(t,e),t[0].addEventListener("quiz:contacts-screen-shown",t=>{this.onContactsSubmit=t.detail.onSubmit,this.resetFields(),super.onShow(t.detail.$contactsScreen,e)})}_bindEvents(){this._$elem.find("[data-"+cn.CSS_PREFIX+"submit]").on("click",t=>{this._submit(t)})}_submit(t){const e=this.validateAllFields();if(t&&t.preventDefault(),e)return this._view.form.quizConfigPromise.then(t=>{const{name:e,email:n,phone:i}=this.getLeadModel();return new Promise((r,o)=>{Tr("async",{operation:"Quiz.Contacts",data:{deviceType:Ws(),quizInternalId:t.internalId,contacts:{name:e,email:n,phone:i}},onSuccess:()=>{r()},onValidationError:t=>{o(t)},onError:t=>{o(t)}})}).finally(()=>{this.onContactsSubmit?.()})});Md(this._$elem)}},always:class extends fl{constructor(t,e){super(t,e),this.name="always"}},banner:_l,banner_h:_l,banner_v:_l,button:class extends fl{constructor(t,e){super(t,e),this.name="button",this.useElementPlacement=!1,this.popper=null,this.targetElementWatcher=null,this.shouldShowWhenTargetAvailable=!1,this.wasButtonShown=!1}async onInit(t){const e=kt({},"behavior_settings"in t.form.settings?t.form.settings.behavior_settings?.button:{},Fu);if(this.behavior_settings=e,this.conditions=function(t,e=!0){if(!t)return{ignoreTargeting:!1,ignoreShowConditions:e,showOn:"immediate"};if("string"==typeof t)return{ignoreTargeting:Du[t]??!1,ignoreShowConditions:e,showOn:qu[t]??"immediate"};return{ignoreTargeting:t.ignoreTargeting,ignoreShowConditions:t.ignoreShowConditions??e,showOn:t.showOn}}(e.conditions,!t.form.isQuizForm()),this.form=t.form,this.isFormOpened=!1,e.on&&(this.showForm=function(){t.form.report("click"),t.show(!0)},"immediate"===this.conditions.showOn&&this.conditions.ignoreTargeting&&(this.render(),await this.maybeShowButton()),"close"===this.conditions.showOn)){if(sr.getCompleted(this.formId))return;(this.conditions.ignoreTargeting||this.form.inTargeting)&&(this.render(),sr.isShown(this.form.id)&&await this.maybeShowButton())}}async onTargetingReady(){this.behavior_settings.on&&!this.conditions.ignoreTargeting&&(this.render(),this.form.inTargeting&&"immediate"===this.conditions.showOn&&await this.maybeShowButton(),this.form.onTargetingChange(t=>{t&&!this.isFormOpened?this.maybeShowButton():this.hideButton()}))}async onShow(){this.behavior_settings.on&&(this.isFormOpened=!0,this.render(),this.hideButton())}async onClose(){this.behavior_settings.on&&(this.isFormOpened=!1,(this.conditions.ignoreTargeting||this.form.inTargeting||"close"===this.conditions.showOn)&&await this.maybeShowButton())}async onSuccess(){this.behavior_settings.on&&(this.clearElementPositioning(),this.$button?.detach(),this.$style?.detach())}async maybeShowButton(){if(this.form.isQuizForm()){if(!(await this.form.quizConfigPromise))return}const t=()=>{!this.useElementPlacement||this.popper?(this.showButton(),this.shouldShowWhenTargetAvailable=!1):this.shouldShowWhenTargetAvailable=!0};if(window.PopMechanic.isTesting)t();else{if(sr.getNeedButtonFrequencyCheck(this.form.id)){if(!(await Co.checkButtonClose(this.form.frequency,this.form.id)))return;sr.setNeedButtonFrequencyCheck(this.form.id,!1)}if(!this.wasButtonShown&&!this.conditions.ignoreShowConditions){const[t,e]=await Promise.all([Co.checkButtonShow(this.form.frequency,this.form.id),Co.checkButtonAccountShow(this.form.accountFrequency,this.form.id)]);if(!t||!e)return}this.isFormOpened||t()}}render(){if(this.$button&&this.$style)return;let t,e,n=null;const i=(t=>{const e=St({},"settings"in t.settings?t.settings.settings:{},"button_settings"in t.settings?t.settings.button_settings:{});return St({},e,{desktop:cs.desktop(),tablet:cs.tablet(),mobile:cs.mobile()})})(this.form),r=(t=>{const e=t.button_template;return"button_html"in t.settings&&t.settings.button_html&&(e.html=t.settings.button_html),"button_css"in t.settings&&t.settings.button_css&&(e.css=t.settings.button_css),e})(this.form);try{t=An(xs(Zt(r.html)(i),this.form.id))}catch{return}try{n=An(``)}catch{return}const o=Wu(this.device,this.behavior_settings);this.resolvedPlacement=o,this.useElementPlacement="element"===o.placement,this.useElementPlacement?(e=An('
'),e.css({position:"fixed",top:0,left:0,zIndex:o.positionStyles.zIndex}),t.css(function(t,e){const n=Nu(e),i=ju[t];if(0===n)return{};const[r,o]=Lu(n,{...i,translateZero:Mu});return{transform:`rotate(${n}deg) translate(${r}, ${o})`,transformOrigin:i.transformOrigin}}(o.elementSettings.position,o.rotation)),e.append(t),this.startElementPlacementPolling(e,o.elementSettings)):(t.css(o.positionStyles),t.css({position:"fixed"}),t.css(o.rotationStyles),e=t,this.clearElementPositioning()),e.hide(),this.$button=e,this.$style=n,t.on("click",()=>{this.showForm()}),t.find("[data-popmechanic-close-button]").on("click",t=>{this.hideButton(),_r.push({type:"button_close",form:this.form.id}),sr.setLastButtonClose(this.form.id),sr.setNeedButtonFrequencyCheck(this.form.id,!0),t.stopPropagation()});const s=Os(this.form.id);this.form.isQuizForm()?Is({shadowHost:s[0],$renderedContent:this.$button.add(this.$style)}):s.append(this.$button).append(this.$style)}hideButton(){var t;t=this.form,Gu.delete(t.id),this.$button?.hide(),this.shouldShowWhenTargetAvailable=!1}showButton(){if(!this.$button?.[0])return;const t=this.wasButtonShown;this.$button[0].style.display="",this.wasButtonShown=!0,this.popper?.forceUpdate(),t||this.recordButtonShown(),this.notifyShown()}recordButtonShown(){window.PopMechanic.isTesting||this.conditions.ignoreShowConditions||(_r.push({type:"button_show",form:this.form.id}),sr.setLastButtonShown(this.form.id))}startElementPlacementPolling(t,e){this.clearElementPositioning(),this.targetElementWatcher=to({selector:e.target,onFound:n=>{this.popper||(this.popper=Ru(n,t[0],{placement:e.position,strategy:"fixed",modifiers:[{name:"flip",enabled:!1},{name:"offset",options:{offset:({placement:t})=>Ou(t,e.horizontal_offset,e.vertical_offset)}}]}),this.shouldShowWhenTargetAvailable&&(this.shouldShowWhenTargetAvailable=!1,this.maybeShowButton()))},onLost:()=>{this.popper&&(this.hideButton(),this.clearPopper())}}),Kr.one("destroy",()=>{this.clearElementPositioning()}),this.targetElementWatcher.start()}clearPopper(){this.popper&&(this.popper.destroy(),this.popper=null)}clearElementPositioning(){this.clearPopper(),this.targetElementWatcher?.stop(),this.targetElementWatcher=null}notifyShown(){if(!this.$button?.[0])return;const t=this.resolvedPlacement??Wu(this.device,this.behavior_settings),e={element:this.$button[0],positionStyles:Xu({resolvedPlacement:t,useElementPlacement:this.useElementPlacement,buttonElement:this.$button[0]}),anchorPosition:t.anchorPosition,hide:()=>this.hideButton(),show:()=>this.showButton(),openForm:()=>this.showForm()};!function(t,e){const n={form:t,handle:e};Gu.set(t.id,n),Vu.get(t.id)?.(n)}(this.form,e)}},copy_code:Ju,embedded:class extends fl{constructor(t){super(t),this.name="embedded";const e="behavior_settings"in t.form.settings&&t.form.settings.behavior_settings?.embedded||{},n=this._getDeviceSettings(e);this.settings=kt({},n,e,{animation_out:"fadeOut",desktop:{position:"center",left_offset:0,right_offset:0,top_offset:0,bottom_offset:0},mobile:{position:"center",left_offset:0,right_offset:0,top_offset:0,bottom_offset:0}});const i=e[this.device]||e.desktop||{};if(i.position){const t={id:this.formId,settings:i};this.positioner=new ed(t)}}async onShow(t,e,n){const i=this._getForm(t);Ku({$element:t,$target:n,placement:e?.placement}),this.positioner&&this.positioner.onShow(i,t),i.find(`.${cn.CSS_PREFIX}close, [data-${cn.CSS_PREFIX}close]`).on("click",function(){e?.close(An(this).data(`${cn.CSS_PREFIX}close`))})}async onClose(t){const e=this._getForm(t);await dl(e,this.settings.animation_out||"fadeOut"),this.positioner&&await this.positioner.onClose(t)}getSettings(){return{embedded:this.settings}}onSuccess(){}onFail(){}},fullscreen:class extends ml{constructor(t){super(t),this.name="fullscreen";const e=kt({},"behavior_settings"in t.form.settings&&t.form.settings.behavior_settings?.fullscreen||{allow_overlay:!0});this.allowOverlay=e.allow_overlay}_prepareAnimation(t){const e={};e["margin-top"]=-Math.max(window.innerWidth,window.innerHeight),t.css(e)}_runFullscreenAnimation(t,e){const n={"margin-top":0};t.animate(n,e)}shouldRender(){return vl(this.formId,this.allowOverlay)}onRender(t){if(!this.shouldRender())return Promise.reject();gl(this.formId,this.allowOverlay);const e=this._filterForm(t);e.css({display:"block","z-index":100000002,position:"absolute",margin:"0",top:0,left:0,bottom:0,right:0}),this._prepareAnimation(e)}onShow(t,e){const n=this._getForm(t),i=this._getContainer(t);od.disableScroll(),requestAnimationFrame(()=>{i.css({position:"fixed",top:0,left:0,right:0,bottom:0,"text-align":"center",height:"auto",overflow:"auto","z-index":1e8}),this._runFullscreenAnimation(n,()=>{n.find("."+cn.CSS_PREFIX+"close, [data-popmechanic-close]").on("click",function(){e.close(An(this).data("popmechanic-close"))});const t=n=>{27==n.keyCode&&e.close(),An(document).off("keyup",t)};An(document).on("keyup",t)})})}onClose(t){yl(this.formId);const e=this._getContainer(t);t.animate({top:"-50%"},()=>{e.css({position:"static",height:0,"min-height":0}),od.enableScroll()})}onSuccess(){}onFail(){}},humble:class extends fl{constructor(t,e){super(t,e),this.name="humble"}onShow(t,e){t.find("[data-"+cn.CSS_PREFIX+"stop]").on("click",()=>{e?.form.report("stop"),e?.close()})}},info:class extends fl{constructor(t,e){super(t,e),this.name="info",this._handleClick=()=>{this.view&&(this.view.form.report("follow"),sr.setCompleted(this.view.form.id),Kr.trigger("lead",{form:this.view.form,lead:{form:this.view.form.id}}))},this._handleClick=this._handleClick.bind(this)}onShow(t,e){if(this.view=e,!e)return;const n="#zuck-modal-slider-popmechanic-form-"+e.form.id+"-zuck-container",i="[data-"+cn.CSS_PREFIX+"submit]",r="[data-"+cn.CSS_PREFIX+"link]";An("body").on("click",n+" "+i+","+n+" "+r,this._handleClick),t.find(i+", "+r).on("click",this._handleClick),Kr.one("destroy",()=>{An("body").off("click",this._handleClick)})}onBeforeClose(t,e,n){e&&n&&(n.showSuccess||n.isBeingDestroyed||(_r.push({type:"info-cancel",form:e.form.id}),sr.setUncompleted(e.form.id)))}},lead:class extends Hd{constructor(t,e){super(t,e),this.name="lead"}_bindEvents(){this._$elem.find("[data-"+cn.CSS_PREFIX+"submit]").on("click",t=>{this._submit(t)}),this._$elem.on("keyup",t=>{13==t.keyCode&&"textarea"!==t.target.type.toLowerCase()&&this._submit(t)}),this._$elem.find("form").on("submit",t=>{t.preventDefault()})}},quiz:class extends fl{constructor(t,e){super(t,e),this.name="quiz",this.navigator=null,this.$elem=null,this.view=null,this.matcherMode=null,this.resolveSuccess=null,this.promoBlockController=null,this.clientIntegrations=null}get isMatcher(){return this.config?.type===oh.MATCHER}get isLeadgen(){return this.config?.type===oh.LEADGEN}shouldRender(){return void 0!==this.config}async onInit(t){const e=await t.form.quizConfigPromise;if(!e)return Nr.log("Quiz config is unavailable"),void kr.add({formId:t.form.id,description:"Quiz config is unavailable",type:"reject"});this.config=e;const{endpointId:n}=await oo.getMindboxSettings();this.clientIntegrations=new Bh({endpointId:n??"",quizInternalId:e.internalId}),this.promoBlockController=Oh({view:t,config:e,onShown:()=>this.clientIntegrations?.show()})}onShow(){this.clientIntegrations?.show()}get autoAdvanceSingleChoice(){const t=this.config?.type;return t===oh.MATCHER||t===oh.LEADGEN}onSuccess(){return this.promoBlockController?.destroy(),this.promoBlockController=null,new Promise(t=>{this.resolveSuccess=t})}onClose(){this.resolveSuccess?.(),this.resolveSuccess=null}async onRender(t,e){if(!this.config)return;this.$elem=t,this.view=e,this.navigator=new lh(this.config,()=>this.renderCurrentScreen());for(const i of this.config.structure.questions)"system"===i.type&&this.navigator.onAnswer(i.systemName,Nh(i.systemName));if(this.isMatcher){const{endpointId:n,deviceUUID:i}=await oo.getMindboxSettings();this.matcherMode=new Ch({quizId:this.config.internalId,categoryId:this.config.structure.internalId,deviceUuid:i??"",endpointId:n??"",$elem:t,productCardType:this.config.recommendation?.productCard.type,previewEnabled:this.config.recommendation?.preview?.enabled??!0,sortingEnabled:this.config.recommendation?.sorting?.enabled??!0,onRestart:()=>{this.navigator?.restart(),this.actUuid=void 0,this.actUuidDateTimeUtc=void 0},onMatcherProductClick:(t,n)=>{this.config&&(Kr.trigger("matcherProductClick",{form:e.form,quizConfig:this.config,productInternalId:t}),qh.emit("quizProductClick",{product:{internalId:t},quiz:{id:this.config.internalId}}),this.clientIntegrations?.goProduct({link:n}))}})}const n=this.promoBlockController?.consumeSelectedAnswer();return n&&this.applyPromoAnswer(n),this.renderCurrentScreen()}updateProgressBar(t){const e=this.navigator.currentQuestion;if(!e)return;const n=this.navigator.currentAnsweredCount,i=n+function(t,e,n){const i=t.reduce((t,e)=>(t[e.systemName]=e,t),{}),r={};return function t(e,o,s){if(!e||"finish"===e)return o;if(s[e])return o;if(void 0!==r[e])return o+r[e];s[e]=!0;const a=i[e];let c=o;if(a)if("scale"===a.type||"single"===a.type){const e=n?uh(a,n):a.options;for(const n of e){const e=t(n.nextSystemName,o+1,s);c=Math.max(c,e)}}else if("nextSystemName"in a&&a.nextSystemName){const e=t(a.nextSystemName,o+1,s);c=Math.max(c,e)}return s[e]=!1,r[e]=c-o,c}(e.systemName,0,{})}(this.config.structure.questions,e,t),r=Math.round(n/i*100);"settings"in this.view.form.settings&&(this.view.form.settings.settings.form_passing_percentage=r)}initActUuidIfNeeded(){this.actUuid||(this.actUuid=Gd(),this.actUuidDateTimeUtc=(new Date).toISOString())}triggerQuizAnswer(){this.view&&this.navigator&&Kr.trigger("quizAnswer",{form:this.view.form,quizConfig:this.config,answers:this.navigator.getAllAnswers(),actUuid:this.actUuid,actUuidDateTimeUtc:this.actUuidDateTimeUtc})}applyPromoAnswer(t){this.navigator&&(this.initActUuidIfNeeded(),this.clientIntegrations?.startQuiz(),this.navigator.onAnswer(this.config.structure.startQuestionSystemName,t.value),this.navigator.goNext({silent:!0}),this.triggerQuizAnswer())}onComplete(t){sr.setCompleted(this.view.form.id),this.config&&this.navigator&&(({answers:t,error:e,quizId:n})=>{Fh.forEach(i=>{Zo(async()=>{i({data:{answers:Ah(t)},...void 0===e?{}:{error:e},meta:{quiz:{id:n}}})})})})({answers:this.navigator.getAllAnswers(),...void 0===t?{}:{error:t},quizId:this.config.internalId})}updateLeadgenSidePreview(t){this.config?.type===oh.LEADGEN&&this.$elem&&function(t,e){const n=t.find(".matcher-preview-panel");n.length&&(n.prop("hidden",!1),bh(t,e))}(this.$elem,t)}hideLeadgenSidePreview(){this.config?.type===oh.LEADGEN&&this.$elem&&_h(this.$elem)}async renderCurrentScreen(){const t=this.navigator.currentPhase;if(t===ch.Finished){if(this.hideLeadgenSidePreview(),this.isMatcher){const t=await this.matcherMode.renderFinish(this.navigator.getAllAnswers());this.onComplete(t?.error),await this.matcherMode.renderContactsOverlay({paywall:this.config.paywall,lead:this.config.lead,view:this.view})}else await(async t=>{const{final:e,view:n,$elem:i,formFactor:r,onFinish:o}=t;void 0!==e&&"settings"in n.form.settings&&(n.form.settings.settings.finish_data=[e]);const s=(await n.renderWithEnrichedSettings()).find(Qd),a=s.find(".quiz-button-next:not(.matcher-final-restart)"),c=a.hasClass("quiz-button-next-link"),l=r===sh.INLINE;c&&l||a.on("click",()=>{o?o():n.close()});const u=i.find(Qd).closest(`[data-${cn.DATASET_PREFIX}-screen]`);i.find(Qd).replaceWith(s),i.find(`[data-${cn.DATASET_PREFIX}-screen]`).removeClass(Vd),u.addClass(Vd)})({final:zs(this.navigator.getAllAnswers(),this.config.structure.questions,this.config?.finals),view:this.view,$elem:this.$elem,formFactor:this.config?.formFactor,onFinish:()=>this.resolveSuccess?.()}),this.onComplete(),this.view.success();return}if(t===ch.Contacts){if(this.isMatcher)return void this.navigator.finish();this.hideLeadgenSidePreview();const t=await Ph({paywall:this.config.paywall,lead:this.config.lead,view:this.view,$elem:this.$elem,onSkip:()=>this.navigator.finish()});if(!t)return;return void this.$elem[0].dispatchEvent(new CustomEvent("quiz:contacts-screen-shown",{bubbles:!0,composed:!0,detail:{$contactsScreen:t,onSubmit:()=>this.navigator.finish()}}))}const e=this.navigator.currentQuestion;if(!e)return;const n=this.isMatcher?{paths:this.config.paths,answers:this.navigator.getAllAnswers().filter(t=>this.config.structure.questions.some(e=>e.systemName===t.question&&"options"in e))}:void 0;this.updateProgressBar(n);const i=this.navigator.prefillAnswer,r=i?.question===e.systemName?i.answer:void 0,o=void 0!==n?dh(e,n):e;await rh({question:o,existingAnswer:r,$elem:this.$elem,view:this.view,isFirstQuestion:this.navigator.isFirstQuestion,shouldHideProgressBar:(this.isLeadgen||this.isMatcher)&&this.navigator.isFirstQuestion,autoAdvance:this.autoAdvanceSingleChoice,onAnswer:t=>{this.initActUuidIfNeeded(),this.navigator.isFirstQuestion&&this.clientIntegrations?.startQuiz(),this.navigator.onAnswer(e.systemName,t)},onNext:()=>{this.navigator.goNext(),this.triggerQuizAnswer()},onPrev:()=>{this.navigator.goPrev(),this.triggerQuizAnswer()}}),this.matcherMode?.onQuestionShown(this.navigator.getAllAnswers(),e.image),this.updateLeadgenSidePreview(e.image),this.$elem[0].dispatchEvent(new CustomEvent("quiz:question-shown",{bubbles:!0,composed:!0}))}},lead_on_close:Ud,multiscreen:class extends fl{constructor(t){super(t),this.name="multiscreen",this._hasSetDimensions=!1}onShow(t,e){t.find("[rel=screen], [data-target=screen]").on("click",n=>{n.preventDefault(),n.stopPropagation();const i=t.find(An(n.currentTarget).attr("href")||""),r=t.find(".popmechanic-screen").filterVisible(),o=t.find(`#popmechanic-form-${e.form.id}`),s=e.behaviors||[],a=s.map(o=>{try{return o.onBeforeScreenChange(t,e,r,i,n)}catch{return{allowed:!1}}}),c=a.every(t=>t.allowed),l=a.some(t=>!0===t.skipFormResize);if(c){if(!l){i.show().addClass(zh);const t=i.outerWidth(),e=i.outerHeight();i.hide().removeClass(zh),o.animate({width:t,height:e}),this._hasSetDimensions=!0}r.animate({opacity:0},function(){An(this).hide().removeClass(zh),i.css({opacity:0}).show().addClass(zh).animate({opacity:1},function(){if(i.data("onshow"))try{new Function(i.data("onshow"))()}catch{}s.forEach(o=>{try{o.onScreenChange(t,e,r,i,n)}catch{}})})})}})}onSuccess(t,e){const n=t.find(`#popmechanic-form-${e.form.id}`);!e.form.isEmbedded()&&this._hasSetDimensions&&n.css({width:"auto",height:"auto"})}},partscreen:sf,popup:class extends fl{constructor(t){super(t),this.name="popup";const e=kt({},"behavior_settings"in t.form.settings?t.form.settings.behavior_settings?.popup:{},{paranja_opacity:.3,animation_type:"slide",animation_settings:{from:"top"}});this.animationType=e.animation_type||"slide",this.animationSettings=e.animation_settings||{from:"top"},this.paranjaOpacity=e.paranja_opacity||.3}_prepareAnimation(t){if("slide"===this.animationType){const e={};e["margin-"+(this.animationSettings.from||"top")]=-Math.max(window.innerWidth,window.innerHeight),t.css(e)}else this._initialOpacity=t.css("opacity")||1,t.css({opacity:0})}_runPopupAnimation(t,e){const n={};"slide"===this.animationType?n["margin-"+this.animationSettings.from]=0:n.opacity=this._initialOpacity,t.animate(n,{duration:cn.ANIMATION_SPEED,queue:!1,always:e})}onRender(t,e,n){const i=this._filterForm(t),r=An(`
`);this._$formWrapper=r,n.append(r),this._$paranja=An(`
`).css({display:"block",position:"absolute",top:"0",left:"0",bottom:"0",right:"0","background-color":"black",opacity:"0",pointerEvents:"all","z-index":1e6}),r.append(this._$paranja),r.css({position:"relative","text-align":"center",margin:"0",top:0,left:0,right:0}),i.css({display:"inline-block","z-index":100000002,position:"relative","vertical-align":"middle","text-align":"left"}),this._prepareAnimation(r)}onShow(t,e){const n=this._getForm(t),i=this._$formWrapper,r=this._getContainer(t),o=this._$paranja;od.disableScroll(),this._$formWrapper.append(n),requestAnimationFrame(()=>{r.css({position:"fixed",top:0,left:0,right:0,bottom:0,height:"auto","min-height":0,overflow:"auto","z-index":1e8}),this._$vaHelper=An('
'),this._$vaHelper.css({height:window.innerHeight,display:"inline-block",width:0,"vertical-align":"middle"}).appendTo(i),An(window).on("resize",()=>{this._$vaHelper.css({height:window.innerHeight})}),o.animate({opacity:this.paranjaOpacity},{duration:cn.ANIMATION_SPEED,queue:!1}),this._runPopupAnimation(i,()=>{o.on("click",()=>{e.close(!1)}),n.find(`.${cn.CSS_PREFIX}close, [data-popmechanic-close]`).on("click",function(){e.close(An(this).data("popmechanic-close"))})}),An(document).on("keyup",t=>{27==t.keyCode&&e.close()})})}onClose(t){const e=this._getContainer(t);return new Promise(n=>{t.animate({top:"-50%"},cn.ANIMATION_SPEED,()=>{this._$paranja&&this._$paranja.animate({opacity:"0"},cn.ANIMATION_SPEED,()=>{this._$paranja?.remove(),this._$vaHelper?.remove(),this._$formWrapper?.remove(),e.css({position:"static",height:0,"min-height":0}),od.enableScroll(),n()})})})}onSuccess(t){}onFail(){}},post_text:af,reco_data:Cf,reco_sla:Ef,scrollbox:class extends fl{constructor(t,e){var n;super(t,e),this.name="scrollbox",this.settings=kt({},"behavior_settings"in t.form.settings?t.form.settings.behavior_settings?.scrollbox:{},{direction:"bottom",horizontal_offset:0,vertical_offset:0}),this.settings.animation_in||(this.settings.animation_in=xf[this.settings.direction||"bottom"]),this.settings.animation_out||(this.settings.animation_out=Tf[this.settings.direction||"bottom"]),this.staticStyles=St({},(n=this.settings,-1!==n.direction?.indexOf("top")?{top:0,"margin-top":n.vertical_offset}:-1!==n.direction?.indexOf("bottom")?{bottom:0,"margin-bottom":n.vertical_offset}:{top:"50%",transform:"translate(0, -50%)"}),function(t){return-1!==t.direction?.indexOf("left")?{left:0,"margin-left":t.horizontal_offset}:-1!==t.direction?.indexOf("right")?{right:0,"margin-right":t.horizontal_offset}:{left:"50%",transform:"translate(-50%, 0)"}}(this.settings))}onRender(t,e,n){const i=An('
');this._$formWrapper=i,n.append(i);const r={display:"block","z-index":100000002,position:"fixed","text-align":"left"};St(r,this.staticStyles),i.css(r)}onShow(t,e){const n=this._getForm(t);this._$formWrapper.append(n),this._runAnimation(n,this.settings.animation_in||"fadeIn"),n.find("."+cn.CSS_PREFIX+"close, [data-popmechanic-close]").on("click",function(){e.close(An(this).data("popmechanic-close"))})}onClose(t){const e=this._getForm(t);return new Promise(n=>{this._runAnimation(e,this.settings.animation_out,()=>{t.css({position:"static",height:0,"min-height":0}),n()})})}onSuccess(){}onFail(){}},social:class extends fl{constructor(t,e){super(t,e),this.name="social"}onRender(){return new Promise(t=>{let e=null;e=setInterval(()=>{window.FB&&(t(),clearInterval(e))},100)})}onShow(t,e){const n=window.FB,i=t.find("#popmechanic-form-"+e.form.id)[0],r=()=>{e.form.report("social-like"),"behavior_settings"in e.form.settings&&e.success({social:!0,type:e.form.settings.behavior_settings.social?.type}),sr.setContactsSent(),n.Event.unsubscribe("edge.create",r)};n.XFBML.parse(i),n.Event.subscribe("edge.create",r)}},timer:class extends fl{constructor(t,e){super(t,e),this.name="timer",this._updateLoop=null,this.timers=[],this._updateLoop=null,this._showTime=Math.floor(cr()/1e3),this._settings="behavior_settings"in t.form.settings&&t.form.settings.behavior_settings?.timer||{}}_updateValues(t,e,n){const i=Math.floor(Date.now()/1e3);e.forEach(e=>{Object.keys($f).forEach(r=>{const o="[data-"+cn.CSS_PREFIX+'timer="'+e.id+":"+r+'"]',s=t.find(o),a=e.end-i,c=$f[r];s.each(function(){let t;try{t=parseInt(An(this).data("popmechanicDigit"),10)}catch{}let e="number"!=typeof(n=c(a))||n<=0?"00":n<10?"0"+n:""+n;var n;0!==t&&1!==t||(e=e[t]);const i=An(this);i.html()!==Rf(e)&&i.html(Rf(e))}),a<=0&&this._settings.close_on_end&&n()})})}onBeforeRender(t){if(!t)return;const e=Math.floor(Date.now()/1e3);this.timers=function({parameters:t,settings:e,showTime:n}){return Array.isArray(t)?t.filter(t=>"timer"===t.type).map(t=>{const i="object"==typeof e[t.machine_name]?e[t.machine_name]:JSON.parse(e[t.machine_name]);return{id:t.machine_name,settings:i,end:Ff({timerSettings:i,showTime:n})}}):[]}({parameters:t.form.template.parameters,settings:"settings"in t.form.settings?t.form.settings.settings:{},showTime:this._showTime});const n=this.timers.some(t=>t.end{this._updateValues(t,this.timers,()=>{setTimeout(()=>{e.close()},3e3)})},100))}onClose(){this._updateLoop&&(clearInterval(this._updateLoop),this._updateLoop=null)}},cart:class extends fl{constructor(t,e){super(t,e),this.name="cart",this._cart=[],this._popmechanicCart=null,this.getSettings=this.getSettings.bind(this),this.onBeforeRender=this.onBeforeRender.bind(this)}onBeforeRender(){return this.dependencies.dummyIsRequired?(this._cart=Array.from({length:3},(t,e)=>(t=>{const e=t+1,n=1e3*e;return{count:1,priceOfLine:n,product:{ids:{website:e}},pricePerItem:n,productGroup:{ids:{website:e}}}})(e)),this._popmechanicCart=Af(),Promise.resolve()):Promise.all([oo.waitPromisesOrDelay([this.dependencies.getCart().catch(()=>[])],1e3),oo.waitPromisesOrDelay([this.dependencies.getPopmechanicCart().catch(()=>null)],1e3)]).then(t=>{this._cart=t[0]&&t[0][0]||[],this._popmechanicCart=t[1]&&t[1][0]||null})}getSettings(){return{cart:this._cart||[],popmechanicCart:this._popmechanicCart||null}}},tns:class extends fl{constructor(t,e){super(t,e),this.name="tns"}onBeforeRender(){return window[Mf]&&window[Mf].executeTnsJs?Df("executeTnsJs").catch(t=>{throw console.error(`Error executing "${Mf}.executeTnsJs" script:`,t),t}):Br(qf).catch(t=>{throw console.error("Error loading tns-slider script:",t),t})}},"tns-legacy":class extends fl{constructor(t,e){super(t,e),this.name="tns-legacy"}onBeforeRender(){return window[Mf]&&window[Mf].executeTnsNewJs?Df("executeTnsNewJs").catch(t=>{throw console.error(`Error executing "${Mf}.executeTnsNewJs" script:`,t),t}):Br(Nf).catch(t=>{throw console.error("Error loading tns-slider script:",t),t})}},splidejs:Bf,swiperjs:Hf,accessible:class extends fl{constructor(t){super(t),this.name="accessible",this.isModal=!1,this.isEmbedded=!1,this.previousActiveElement=null,this.focusableElements=[];const e="behavior_settings"in t.form.settings&&t.form.settings.behavior_settings.partscreen||{},n=this._getDeviceSettings(e),i={target:"window",...e,...n};this.isModal="center"===n?.position||of(t,this.device,i),this.isEmbedded=t.form.isEmbedded()}onShow(t){super.onShow(t);const e=this.$form=this._getForm(t);e.attr("role","dialog"),e.attr("aria-modal",this.isModal?"true":"false"),this.updateFocusableCache(),this.keydownHandler=t=>{if(!("Tab"===t.key))return;const n=this.focusableElements;if(!n.length)return;const i=e[0],r=(i instanceof Element&&"function"==typeof i.getRootNode?i.getRootNode({composed:!1}):document).activeElement,o=n.findIndex(t=>t===r);if(this.isEmbedded){if(0===o&&t.shiftKey)return;if(o===n.length-1)return}n[(o+(t.shiftKey?-1:1)+n.length)%n.length].focus(),t.preventDefault()},e.on("keydown",this.keydownHandler),this.isEmbedded||(this.previousActiveElement=document.activeElement,e.attr("tabindex","-1"),e.length&&e[0].focus())}onClose(){this.isEmbedded||this.previousActiveElement?.focus()}updateFocusableCache(){const t=this.getCurrentActiveScreen().find('[role="button"], a[href], area[href], input:not([disabled]):not([type="hidden"]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), [tabindex]:not([tabindex="-1"])').get()||[],e=`.${cn.CSS_PREFIX}close, [data-${cn.CSS_PREFIX}close]`,n=(this.$form?this.$form.find(e).get():[])||[],i=new Set(n),r=t.filter(t=>!i.has(t));this.focusableElements=[...r,...n]}onScreenChange(){this.updateFocusableCache()}},partscreen_v2:sf,inapp:Wf,mobile:Wf,"link-click":Gf},Qf={dummyIsRequired:window.PopMechanic.dummyIsRequired,getCart:Fo,getPopmechanicCart:ka,trySendGa4Event:To,addScript:Br,addCssLink:t=>{if(document.querySelector(`link[href="${t}"]`))return;const e=document.createElement("link");e.rel="stylesheet",e.href=t,document.head.appendChild(e)}};const Jf={getInstances:function(t,e){const n=[];for(const i of t){const t=Vf[i];t&&n.push(new t(e,Qf))}return n},getImplicitBehaviorNames:function(){return Object.entries(Vf).filter(([,t])=>t.implicit).map(([t])=>t)}};var Kf;(Kf=An).fn.fontSpy=function(t,e){var n=Kf("html"),i=Kf("body");if("string"!=typeof t||""===t)throw"A valid fontName is required. fontName must be a string and must not be an empty string.";var r={font:t,fontClass:t.toLowerCase().replace(/\s/g,""),success:function(){},failure:function(){},testFont:"Courier New",testString:"QW@HhsXJ",glyphs:"",delay:50,timeOut:1e3,callback:Kf.noop},o=Kf.extend(r,e),s=Kf(""+o.testString+o.glyphs+"").css("position","absolute").css("top","-9999px").css("left","-9999px").css("visibility","hidden").css("fontFamily",o.testFont).css("fontSize","250px");i.append(s);var a=s.outerWidth();s.css("fontFamily",o.font+","+o.testFont);var c=function(){var t=s.outerWidth();a!==t?(o.callback(),n.addClass(o.fontClass),o&&o.success&&o.success(),s.remove()):o.timeOut<0?(n.addClass("no-"+o.fontClass),o&&o.failure&&o.failure(),o.callback(new Error("FontSpy timeout")),s.remove()):(setTimeout(c,o.delay),o.timeOut=o.timeOut-o.delay)};c()};const Zf=An.fn.fontSpy,Yf={rub:"₽",usd:"$",eur:"€",gbp:"£"},tm=(t,e)=>{if(!e)return t.toString();const n=Yf[e];return"rub"===e?`${t} ${n}`:`${n}${t}`};const em=new class{constructor(){this.prefix="random-number-"}set(t,e){const n=e.variable.periodInSeconds?Math.ceil(e.variable.periodInSeconds/60):60,i=this.prefix+t,r=Object.assign({},e,{_savedAt:Date.now(),_key:t});Ki.set(i,r,n)}get(t){const e=this.prefix+t,n=Ki.get(e);if(n){const t=Object.assign({},n);return delete t._savedAt,delete t._key,t}return null}remove(t){const e=this.prefix+t;Ki.destroy(e)}},nm=1e-6,im={jumpHour:16,jumpShare:.7,smoothHours:1},rm=t=>Math.max(0,Math.min(1,t)),om=t=>1/(1+Math.exp(-t));function sm(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate(),0,0,0,0).getTime()}function am(t){return new Date(t.getFullYear(),t.getMonth(),t.getDate()+1,0,0,0,0).getTime()}function cm(t){const e=new Date(t);return[e.getFullYear(),e.getMonth(),e.getDate()]}function lm(t,e){const[n,i,r]=cm(t),[o,s,a]=cm(e);return 372*o+31*s+a-(372*n+31*i+r)}function um(t,e){const n=function(t,e){const n=e.jumpHour/24,i=Math.max(nm,e.smoothHours/24),r=om(-n/i),o=om((1-n)/i);return rm((om((t-n)/i)-r)/Math.max(nm,o-r))}(t,e),i=rm(e.jumpShare);return rm((1-i)*t+i*n)}function dm(t,e){return um(function(t){const e=new Date(t),n=sm(e),i=Math.max(nm,am(e)-n);return rm((t-n)/i)}(t),e)}function hm(t,e,n,i,r,o,s){const a=t=>function(t,e,n,i){const r=Math.max(1,Math.floor(n)),o=lm(e,t),s=dm(t,i);return rm((o+s)/r)}(t,i,r,s),c=a(e),l=a(n),u=a(t);if(Math.abs(l-c)<1e-9)return o.min;const d=rm((f=l,(u-(h=c))/Math.max(nm,f-h)));var h,f;return((t,e,n)=>t+(e-t)*n)(o.min,o.max,d)}function fm(t,e=new Date){const n=function(t){return Object.assign({},im,t??{})}(t.curveParams),i=e.getTime(),{startMs:r,endMs:o,tAdjMs:s,baseMidnightMs:a,days:c}=function(t,e){let n=Math.round(e.startEpochMs),i=Math.round(e.endEpochMs);i{const n="number"==typeof e?new Date(e):e??new Date;return fm(t,n)}}}const pm=async(t,e,n)=>{const i=`${e.formId}_${e.variantId}`,r=new Date,o=em.get(i);let s=!1;o&&(s=ot(o.variable,t));const a=!o||!s,c=o&&o.timestamp+1e3*o.variable.periodInSeconds{const e=Object.assign({},t,{min:"decrement"===t.changeMode?t.max:t.min,max:"decrement"===t.changeMode?t.min:t.max}),n=new Date,i=new Date(n.getTime()+1e3*t.periodInSeconds),r=sm(n),o=am(i),s={range:{min:e.min,max:e.max},period:{startEpochMs:r,endEpochMs:o}};return Promise.resolve(mm(s).get())})(t);return((t,e,n)=>{em.set(`${t.formId}_${t.variantId}`,{formId:t.formId,variantId:t.variantId,timestamp:(new Date).getTime(),min:n,variable:e})})(e,t,n),n}if(!o)return Promise.reject(new Error("Invariant: data is unexpectedly null"));const{min:l,timestamp:u,variable:d}=o,h=mm({range:{min:l,max:"decrement"===d.changeMode?d.min:d.max},period:{startEpochMs:u,endEpochMs:u+1e3*d.periodInSeconds}}).get();return Promise.resolve(h)},gm={cartAmountLeft:t=>Wo.getCartSum().then(e=>{const n=Math.max(0,t.requiredAmount-e);return tm(n,t.currency)}).catch(()=>tm(t.requiredAmount,t.currency)),randNumber:async(t,e,n)=>{if(!n||!n.formId)return Nr.log("FormContext is required for randNumberResolver"),Promise.resolve("");try{const e=await pm(t,n);return await((t,e)=>{if(!e)return Promise.resolve(String(t));const{pluralForms:n,lang:i}=e,r=n[new Intl.PluralRules(i).select(t)]||n.many;return Promise.resolve(`${t} ${r}`)})(e,t.unit)}catch(i){return Nr.log("Error in randNumberResolver:",i),""}},quizProgress:(t,e)=>(t=>{const e=t?.form_passing_percentage;return null==e||""===e?"0%":`${String(e).trim()}%`})(e),selectionCount:t=>"__POPMECHANIC_SELECTION_COUNT__"},ym=t=>gm[t],vm=(t,e,n)=>{const i=ym(t.type);if(!i)return Promise.resolve("");const r=i(t,e,n);return Promise.resolve(r)},wm=async(t,e,n)=>{if((t=>"object"==typeof t&&null!==t&&"text"in t)(i=t)&&"variable"in i)return(async(t,e,n)=>{const i=Object.assign({},t);if(t.variable&&t.variable.type)try{const r=await vm(t.variable,e,n),o=Zt(t.text);return i.text=o({variable:r}),i}catch(r){return Nr.log("Error resolving text variables:",r),i}return Promise.resolve(i)})(t,e,n);var i;if(Array.isArray(t))return Promise.all(t.map(t=>wm(t,e,n)));if("object"==typeof t&&null!==t){const i={},r=Object.entries(t);return await Promise.all(r.map(async([t,r])=>{i[t]=await wm(r,e,n)})),i}return t};const bm=["first_name","last_name","email"];class _m{constructor(t){this._resources=[],this._success=!1,this.isTargetingEventSent=!1;const e=t.template;this.id=e.id,this.html="html"in t.settings&&t.settings.html||e.html,this.css="css"in t.settings&&t.settings.css||e.css,this.behaviors=[],this.fonts=e.fonts,this.form=t,this.data=e,this.init()}init(){const t=[...this.data.behaviors||[]];for(const e of Jf.getImplicitBehaviorNames())t.includes(e)||t.push(e);this.behaviors=Jf.getInstances(t,this),this.behaviorsReady=this.form.isControlGroup?this.behaviorsOnControlGroupInit():this.behaviorsOnInit(),this.form.subscribeIntegrations()}behaviorsOnBeforeRender(t){const e=this.behaviors.map(async e=>{try{return await e.onBeforeRender(this,t)}catch(n){if(e.onBeforeRenderRejectIsDebuggable&&Nr.isDebugging())return;throw kr.add({formId:this.form.id,description:`onBeforeRender error in behavior "${e.name}"`,type:"reject",data:{error:n}}),n}});return Promise.all(e)}behaviorsOnRender(t,e){const n=this.behaviors.map(n=>Promise.resolve(n.onRender(t,this,e)));return Promise.all(n)}behaviorsOnShow(t,e){const n=this.behaviors.map(n=>n.onShow(t,this,e));return Promise.all(n)}behaviorsOnSuccess(t,e){const n=this.behaviors.map(n=>n.onSuccess(t,this,e));return Promise.all(n)}behaviorsOnBeforeClose(t,e){const n=this.behaviors.map(async n=>{try{return await n.onBeforeClose(t,this,e)}catch{}});return Promise.all(n)}behaviorsOnClose(t,e){const n=this.behaviors.map(async n=>await n.onClose(t,this,e));return Promise.all(n)}behaviorsOnInit(){const t=this.behaviors.map(t=>t.onInit?.(this)).filter(t=>!!t);return Promise.all(t)}behaviorsOnControlGroupInit(){const t=this.behaviors.map(t=>t.onControlGroupInit?.(this)).filter(t=>!!t);return Promise.all(t)}getSettings(t){const e=Object.assign({},"settings"in this.form.settings?this.form.settings.settings:{},{desktop:cs.desktop(),tablet:cs.tablet(),mobile:cs.mobile(),formId:this.form.id,subdivisionName:xr});if(t)return e;const n={};return this.behaviors.forEach(t=>{const i=t.getSettings?.();i&&("reco_data"===t.name||"cart"===t.name?Object.assign(e,i):Object.assign(n,i))}),e.behavior_settings=n,e}getEnrichedSettings(t){return(async(t,e)=>{const n=(t=>{const e={};return e.formId=t.id,e.variantId=t.variant?.ab_test_variant_internal_id||"default",e})(e);try{return await wm(t,t,n)}catch(i){return Nr.log("Error processing settings texts:",i),t}})(this.getSettings(t),this.form)}extractImports(){const t=this.getSettings(),e=Zt(this.css)(t).matchAll(/(?:@import)\s(?:url\()?\s?["'](.*?)["']\s?\)?(?:[^;]*);?/gi);Array.from(e).forEach(([,t])=>{An("head").append('')})}extractFonts(){const t=this.getSettings(),e=Zt(this.css)(t).match(/@font-face\s{[\s\S]*?}/gi);return e?e.map(t=>({name:t.split("font-family:")[1].split(";")[0].trim(),body:t})):null}prefetchFonts(){const t=this.extractFonts(),e=this.getSettings();t&&($s.append(""),t.forEach(t=>{this._resources.push(new Promise(e=>{Zf(t.name,{fontClass:"pm-"+t.name+"-loaded",success:e,fail:e}),setTimeout(e,5e3)}))}))}prefetchUrl(t){const e=function(t){let e;return new Promise(n=>{if(t.indexOf(".ttf")>-1||t.indexOf(".svg")>-1||t.indexOf(".eot")>-1||t.indexOf(".woff")>-1)return n();e=new Image,e.onload=()=>n(),e.onerror=()=>n(),setTimeout(n,5e3),e.src=t})}(t);this._resources.push(e)}prefetch(){const t=/url\((['"]?http.*?)\)|src="(http.*?)"/g;try{const e=this.render(),n=[];e.each((t,e)=>n.push(An(e).html()));const i=n.join("|");let r;for(e.remove(),this.extractImports();r=t.exec(i);){const t=(r[1]||r[2]).replace(/'|"/g,"");this.prefetchUrl(t)}this.prefetchFonts(),kr.add({formId:this.form.id,description:"Prefetch complete"})}catch(e){kr.add({formId:this.form.id,description:"Error during prefetch",type:"event",data:{error:e}}),Nr.log("Warning: prefetch error in #"+this.form.id,e)}}getCssTemplate(t,e){return ks({cssString:Zt(this.css)(t),formId:this.form.id,forShadowHost:e})}getCssReset(t){var e;return ks({cssString:(e=this.form.id,Zt("<%= wrapperId %> * {\n margin: 0;\n padding: 0;\n border: 0;\n font-size: 100%;\n font: inherit;\n color: inherit;\n line-height: normal;\n vertical-align: baseline;\n background: none;\n pointer-events: all;\n position: static;\n}\n<%= wrapperId %> *:before,\n<%= wrapperId %> *:after {\n content: '';\n content: none;\n}")({wrapperId:`#${Ts(e)}`})),formId:this.form.id,forShadowHost:t})}getHtmlTemplate(t){return xs(Zt(this.html)(t),this.form.id).replace(/%([\w.]+?)%/g,(t,e)=>bm.indexOf(e)>-1||0===e.indexOf("customs")?"":t)}render(t){let e,n;const i=this.form.isQuizForm(),r=t||this.getSettings(),o=An('"),s=An(this.getHtmlTemplate(r));return s.addClass(cn.CSS_PREFIX+"js-form"),vs(s),this.data.need_reset?(n=An('"),e=n.add(o).add(s)):e=o.add(s),e}async renderWithEnrichedSettings(){const t=await this.getEnrichedSettings();return this.render(t)}getHandler(t,e){const n=()=>{};let i,r;if(!t)return n;const o=this.getSettings();try{i=Zt(t)(o),r=new Function("form","settings","tracker",i)}catch(s){return kr.add({formId:this.form.id,description:"Error during creating form handler",data:{code:t,error:s}}),Go({error:s,source:"form_view.form_handler_creating",form:this.form}),Nr.log("Error creating form#"+this.form.id+", "+e+" handler",i,t,s),n}return n=>{try{return r.call(this,n,o,Tr)}catch(s){kr.add({formId:this.form.id,description:"Error during executing form handler",data:{code:t,error:s}}),Go({error:s,source:"form_view.form_handler_executing",form:this.form}),Nr.log("Error in form#"+n.id+", "+e+" handler",t,s)}}}shouldPreventTargetingEventSending(){return!this.form.isParentFormInTargeting()||!(!this.form.isOnlyForcedShow()||this.form.hasEnabledButton())}onTargetingReady(){if(!this.shouldPreventTargetingEventSending()){if(this.behaviors.forEach(t=>{try{t.onTargetingReady?.(this)}catch{}}),this.data.on_targeting_ready)try{const t=this.getHandler(this.data.on_targeting_ready,"on_targeting_ready");t(this.form),this.onTargetingReady=t}catch{}if(this.data.on_child_ready)try{this.onChildReady=this.getHandler(this.data.on_child_ready,"on_child_ready")}catch{}Kr.trigger("targeting",{form:this.form}),this.isTargetingEventSent=!0,"function"==typeof window.PopMechanic.onFormTargetingReady&&window.PopMechanic.onFormTargetingReady({id:this.form.id}),this.prefetch()}}controlGroupIsShownNotify(){kr.add({formId:this.form.id,description:"The user is in control group of a/b test for this form",type:"reject"}),Nr.isDebugging()&&console.log("Form "+this.form.id+" control group is shown")}show(t){return this.form.isControlGroup?this.controlGroupShow(t):this.variantShow(t)}}function Sm(t){let e="Unknown error";return t instanceof Error&&(e=t.message),"string"==typeof t&&(e=t),e}class Im extends _m{constructor(t){super(t),this._showInProgress=!1,this.close=this.close.bind(this)}init(){const t=this.form,e=this.data.behaviors||[];-1===e.indexOf("button")&&t.button_template&&t.button_template.id&&e.push("button"),this.data.behaviors=e,super.init()}async variantShow(t){const e=Rs.getContainer(this.form.id);if(this._$elem||this._showInProgress||Rs.snippetHasForm(this.form.id))kr.add({formId:this.form.id,description:"Attempt to show the form again"});else{this._showInProgress=!0,this._closed=!1;try{this.form.cancelConditions(),await Promise.all(this._resources),await this.behaviorsReady,kr.add({formId:this.form.id,description:"Behaviors ready"}),t&&kr.add({formId:this.form.id,description:"Skipping real targeting check"});if(!(t||await this.isInTargeting()))return void this.form.report("targeting_excluded");kr.add({formId:this.form.id,description:"Targeting passed"});try{await this.behaviorsOnBeforeRender(e)}catch(n){const t=Sm(n);return kr.add({formId:this.form.id,description:"onBeforeRender errors occurred",type:"reject",data:{error:n}}),Nr.error({error:`onBeforeRender error ${t}`,context:{cause:n instanceof Error?n:new Error(t),formId:this.form.id,showVariant:"variant"}}),void Go({error:n,source:"form_view.behaviors.on_before_render",form:this.form})}t&&kr.add({formId:this.form.id,description:"Skipping real frequency check"});if(!(t||await this.isInFrequency()))return;kr.add({formId:this.form.id,description:"Form frequency passed"});if(!this.behaviors.every(t=>{const e=t.shouldRender?.()??!0;return e||kr.add({formId:this.form.id,description:`Behavior "${t.name}" should render canceled`,type:"reject",data:{behavior:t}}),e}))return;let i;this.onShow=this.getHandler(this.data.on_show,"on_show");try{i=await this.renderWithEnrichedSettings()}catch(n){throw kr.add({formId:this.form.id,description:"Render with enriched settings error",type:"reject",data:{error:n}}),Go({error:n,source:"form_view.render_with_enriched_settings",form:this.form}),n}this._$container=e,this._$elem=i,kr.add({formId:this.form.id,description:"Render with enriched settings complete"});try{if(await Promise.all([this.behaviorsOnRender(i,e),this.form.integrationsOnRender(this)]),Rs.snippetHasForm(this.form.id))return;this.form.isQuizForm()?Is({shadowHost:e[0],$renderedContent:i}):e.append(i),Zo(()=>this.behaviorsOnShow(e,e)),this.form.inTargeting||this.form.report("bucket"),this.form.reportShow(),sr.setLastShown(this.form.id),"function"==typeof window.PopMechanic.onFormShow&&window.PopMechanic.onFormShow({form:this.form}),this.onShow(this.form),ll(this.form.slaTimer)}catch(n){kr.add({formId:this.form.id,description:"onRender/onShow error",type:"reject",data:{error:n}}),window.PopMechanic.debugMode&&console.error(n),i.remove(),Go({error:n,source:"form_view.variant_show",form:this.form})}}finally{this._showInProgress=!1}}}async controlGroupShow(t){const e=Rs.getContainer(this.form.id);this.form.cancelConditions(),await this.behaviorsReady;const n=t||await this.isInTargeting();if(!n)return void this.form.report("targeting_excluded");if(t)return;try{await this.behaviorsOnBeforeRender(e)}catch(r){const t=Sm(r);return void Nr.error({error:`onBeforeRender error ${t}`,context:{cause:r instanceof Error?r:new Error(t),formId:this.form.id,showVariant:"control-group"}})}let i=!0;try{const[t,e]=await Promise.all([this.form.checkFrequency(),this.form.checkAccountFrequency()]);t||(i=!1),e||(this.form.report("frequency_exceed"),i=!1)}catch(r){console.error("Error checking frequency:",r),i=n}if(!i||!n)return;this.behaviors.every(t=>t?.shouldRender()??!0)&&(await this.form.integrationsOnRender(this),this.form.inTargeting||this.form.report("bucket"),this.controlGroupIsShownNotify(),this.form.reportShow(),ll(this.form.slaTimer))}async success(){this._success=!0;try{await this.behaviorsOnSuccess(this._$container)}finally{this.close()}}close(t){this.terminate(()=>this.form.reportClose(),t,!1)}destroy(){return this.terminate(!1,!1,!0)}async terminate(t,e,n){if(!this._closed){try{if(await this.behaviorsOnBeforeClose(this._$container,{showSuccess:!!e,isBeingDestroyed:n}),this._closed)return;this._closed=!0,await this.behaviorsOnClose(this._$container,{success:this._success,isBeingDestroyed:n})}finally{this.clearSelfElem()}"function"==typeof t&&t(),"function"==typeof window.PopMechanic.onFormClose&&window.PopMechanic.onFormClose(this._success,{form:this.form}),this.onClose=this.getHandler(this.data.on_close,"on_close"),this.onClose(this.form)}}onChildReady(t){}onShow(t){}onClose(t){}clearSelfElem(){this._$elem&&(this._$elem.remove(),this._$elem=null),this._showInProgress=!1}async isInTargeting(){return!!window.PopMechanic.isTesting||(!this.form.newTargeting||this.form.newTargeting.double_check?await Uc.check(this.form):this.form.inTargeting)}async isInFrequency(){try{const[t,e]=await Promise.all([this.form.checkFrequency(),this.form.checkAccountFrequency()]);return!!t&&(e?(_r.push({type:"show_start",form:this.form.id,behaviors:this.form.template.behaviors}),!0):(this.form.report("frequency_exceed"),!1))}catch(t){return console.error("Error checking frequency:",t),Go({error:t,source:"form_view.frequency_check",form:this.form}),!0}}}class km extends _m{constructor(t,e){super(t);const n=t.template;this.id=n.id,this.html=n.html,this.css=n.css,this.behaviors=[],this.form=t,this.data=n,this.behaviors=Jf.getInstances(e,this),this.init()}init(){this._$elem=An("[data-popmechanic-form="+this.form.id+"]");const t=this.form.getLeadType(),e=this.behaviors,n=t=>{e.forEach(e=>{e.onShow(t,this)})};this._$elem.each(function(){const e=An(this);e.on("submit",function(t){t.preventDefault()}),sr.isContactsSent(t)?e.addClass(cn.CSS_PREFIX+"submitted"):n(e)})}async success(t){this._success=!0;try{await this.behaviorsOnSuccess(this._$elem,t)}finally{this.close()}}show(){return Promise.resolve()}close(){}async controlGroupShow(){}async variantShow(){}async terminate(){}async destroy(){}onChildReady(){}onShow(t){}}var Pm=null,Cm=0,Em={};function xm(t){return function(){var t,e,n,i,r=!1,o=[],s=[],a=0,c=0,l={};function u(){var t,i;Em.delta=0&&r.left+r.width>=0&&r.bottom-r.height<=(window.innerHeight||document.documentElement.clientHeight)+i&&r.right-r.width<=(window.innerWidth||document.documentElement.clientWidth)+i)?s[e]&&(s[e]=!1,a++,l.appear&&l.appear(t),l.disappear||l.reappear||(o[e]=null)):(!1===s[e]&&(l.disappear&&l.disappear(t),c++,l.reappear||(o[e]=null)),s[e]=!0)}),l.reappear||l.appear&&(!l.appear||a!==t)||l.disappear&&(!l.disappear||c!==t)||(i=!0,h(),l.done&&l.done()))}function m(){var e;if(!r&&(r=!0,l.init&&l.init(),e="function"==typeof l.elements?l.elements():l.elements)){t=e.length;for(var n=0;n=0?Em.velocity:-1*Em.velocity),Pm=t,Cm&&clearTimeout(Cm),Cm=setTimeout(function(){Pm=null},30)},!1);const Tm=new class{constructor(){this.registry=new Map,Kr.on("destroy",()=>this.destroyAll())}register({formId:t,containerId:e,onReEmbed:n}){const i=this.createWatcher(t,e);this.registry.set(t,{containerId:e,onReEmbed:n,attempts:0,registeredLocation:this.getCurrentLocation(),watcher:i,retryTimerId:null}),i.start()}unregister(t){const e=this.registry.get(t);e&&(this.stopWidget(e),this.registry.delete(t))}destroyAll(){for(const t of this.registry.values())this.stopWidget(t);this.registry.clear()}stopWidget(t){t.watcher.stop(),null!==t.retryTimerId&&(clearTimeout(t.retryTimerId),t.retryTimerId=null)}getCurrentLocation(){return window.PopMechanic?.watchHash?window.location.href:window.location.pathname}createWatcher(t,e){return to({selector:`#${e}`,onFound:()=>{},onLost:()=>this.handleLost(t)})}handleLost(t){const e=this.registry.get(t);e&&this.getCurrentLocation()===e.registeredLocation&&(e.watcher.stop(),this.attemptReEmbed(t))}attemptReEmbed(t){const e=this.registry.get(t);if(e){if(e.attempts>=50)return Nr.log(`embeddedWidgetWatcher: widget #${t} max re-embed attempts reached, giving up`),void this.registry.delete(t);e.attempts++,e.onReEmbed().then(()=>{this.registry.has(t)&&(e.attempts=0,Nr.log(`embeddedWidgetWatcher: widget #${t} re-embedded successfully`),e.watcher=this.createWatcher(t,e.containerId),e.watcher.start())},()=>{this.registry.has(t)&&(Nr.log(`embeddedWidgetWatcher: widget #${t} re-embed failed`),e.retryTimerId=setTimeout(()=>{e.retryTimerId=null,this.attemptReEmbed(t)},100))})}}};function $m(){const t=window[ss];return Boolean(t?.features?.persoSitePreventAutoErase)}function Rm(t){return An(``)}class Om extends _m{constructor(t){super(t),this._appear=null,this._terminated=!1}init(){const t=this.form;this.placement=t.embed_selector?t.placement:"end",super.init()}async controlGroupShow(){let t,e;if(this.form.getTargetElement&&(t=await this.form.getTargetElement()),this.onTargetingReady(),await this.behaviorsReady,e=!!window.PopMechanic.isTesting||await Uc.check(this.form),!e)return void this.form.report("targeting_excluded");try{await this.behaviorsOnBeforeRender(t)}catch(r){const e=Sm(r);return void Nr.error({error:`onBeforeRender error ${e}`,context:{cause:r instanceof Error?r:new Error(e),formId:this.form.id,showVariant:"control-group",targetElementExists:!!t}})}let n=!0;try{n=await this.form.checkFrequency()}catch(r){n=!0,console.error("Error checking frequency:",r)}if(!this.behaviors.every(t=>t.shouldRender?.()??!0))return;e&&n&&await this.form.integrationsOnRender(this);const i=`${cn.CSS_PREFIX}form-${this.form.id}-control-group`;Ku({$target:t,$element:Rm(this.form.id),placement:this.placement}),this.form.getTargetElement&&$m()&&Tm.register({formId:this.form.id,containerId:i,onReEmbed:async()=>{const t=await this.form.getTargetElement();t&&0!==t.length?this._terminated||Ku({$target:t,$element:Rm(this.form.id),placement:this.placement}):Tm.unregister(this.form.id)}}),ll(this.form.slaTimer),this._appear=xm({elements:()=>An(`#${i}`).get(),appear:()=>{this.controlGroupIsShownNotify(),this.form.reportShow(),this._appear&&this._appear.destroy()}})}async variantShow(){const t=this.form.getTargetElement&&await this.form.getTargetElement();this.onTargetingReady(),await this.behaviorsReady,kr.add({formId:this.form.id,description:"Behaviors ready"}),window.PopMechanic.isTesting&&kr.add({formId:this.form.id,description:"Skipping real targeting check"});if(!(window.PopMechanic.isTesting||await Uc.check(this.form)))return void this.form.report("targeting_excluded");kr.add({formId:this.form.id,description:"Targeting passed"});try{await this.behaviorsOnBeforeRender(t)}catch(n){const e=Sm(n);return kr.add({formId:this.form.id,description:"onBeforeRender errors occurred",type:"reject",data:{error:n,targetElementExists:!!t}}),void Nr.error({error:`onBeforeRender error ${e}`,context:{cause:n instanceof Error?n:new Error(e),formId:this.form.id,showVariant:"variant",targetElementExists:!!t}})}let e=!0;try{e=await this.form.checkFrequency()}catch(n){console.error("Error checking frequency:",n),e=!0}if(!e)return;kr.add({formId:this.form.id,description:"Form frequency passed"});if(this.behaviors.every(t=>{const e=t.shouldRender?.()??!0;return e||kr.add({formId:this.form.id,description:`Behavior "${t.name}" should render canceled`,type:"reject",data:{behavior:t}}),e})){_r.push({type:"show_start",form:this.form.id,behaviors:this.form.template.behaviors}),this.onShow=this.getHandler(this.data.on_show,"on_show"),this.onClose=this.getHandler(this.data.on_close,"on_close");try{const e=await this.renderAndEmbed();let n;await this.runOnRenderHooks({$rendered:e,runIntegrations:!0}),Zo(()=>this.behaviorsOnShow(this._$elem,t)),this.onShow(this.form),this.form.getTargetElement&&$m()&&Tm.register({formId:this.form.id,containerId:as(this.form.id),onReEmbed:async()=>{const t=await this.form.getTargetElement();if(!t||0===t.length)return void Tm.unregister(this.form.id);if(this._terminated)return;kr.add({formId:this.form.id,description:"Re-embedding widget"});const e=await this.renderAndEmbed();await this.runOnRenderHooks({$rendered:e,runIntegrations:!1}),Zo(()=>this.behaviorsOnShow(this._$elem,t)),this.onShow(this.form)}}),ll(this.form.slaTimer),window.PopMechanic.leads&&window.PopMechanic.leads.some(t=>t.form===this.form.id&&(n=t,!0))&&this.success(n,!0),this._appear=xm({elements:()=>{const t=as(this.form.id);return An("#"+t).get()},appear:()=>{this.form.reportShow(),sr.setLastShownWithId(this.form.id),this._appear&&this._appear.destroy()}})}catch(n){throw kr.add({formId:this.form.id,description:"onRender/onShow error",type:"reject",data:{error:n}}),n}}}success(t,e){return this._success=!0,this.behaviorsOnSuccess(this._$elem,t)}close(t){this.terminate(()=>this.form.reportClose(),t,!1)}destroy(){return this.terminate(!1,!1,!0)}async terminate(t,e,n){if(this._terminated=!0,Tm.unregister(this.form.id),this.form.terminate(),this._$elem)try{await this.behaviorsOnBeforeClose(this._$elem,{showSuccess:!!e,isBeingDestroyed:n}),this._closed||(this._closed=!0,await this.behaviorsOnClose(this._$elem,{success:this._success,isBeingDestroyed:n}))}finally{this.clearSelfElem()}"function"==typeof t&&t(),"function"==typeof window.PopMechanic.onFormClose&&window.PopMechanic.onFormClose(this._success),this.onClose=this.getHandler(this.data.on_close,"on_close"),this.onClose(this.form)}onChildReady(t){}onShow(t){}onClose(t){}async runOnRenderHooks({$rendered:t,runIntegrations:e}){const n=this._$elem;if(!n)return;const i=this.form.isQuizForm();i||n.append(t);const r=this.behaviorsOnRender(i?t:n,i?n:void 0);e?await Promise.all([r,this.form.integrationsOnRender(this)]):await r,i&&Is({shadowHost:n[0],$renderedContent:t})}async renderAndEmbed(){const t=ws(this.form.id),e=await this.renderWithEnrichedSettings();return this._$elem=t,e}clearSelfElem(){this._$elem&&(this._$elem.remove(),this._$elem=null);const t=`#${as(this.form.id)}`;for(;An(t).length;)An(t).remove()}}function Fm(t){return t.isChildForm()&&kr.add({formId:t.id,description:`This is child form of form #${t.containerId}`}),t.isStatic()?function(t){const e=new km(t,t.template.behaviors);return kr.add({formId:t.id,description:"Initiating static form view"}),e.init(),e}(t):t.isEmbedded()?function(t){const e=window.PopMechanic.initAt,n=new Om(t),i=function(r){r&&(e===window.PopMechanic.initAt?(kr.add({formId:t.id,description:"Initiating embedded form view"}),n.show(),t.clearTargetingChange(i)):kr.add({formId:t.id,description:"Reinitialization occured during the targeting check",type:"reject"}))};return t.onTargetingChange(i),n}(t):function(t){const e=new Im(t),n=function(i){i&&(kr.add({formId:t.id,description:"Initiating popup form view"}),t.clearTargetingChange(n),e.onTargetingReady())};t.ignoresTargeting()?n(!0):t.onTargetingChange(n);return e}(t)}const Am=async t=>{if(await oo.getMindboxIsReadyPromise(),!$r())return;const e=window[xr],n=({name:e,params:n})=>{switch(e){case"quizzes.show":(async(t,e)=>{const n=t,i=n?.[0]?.id;if(null!=i)for(const r of e.forms){if(!r.isQuizForm())continue;const t=await r.quizConfigPromise;t?.internalId===i&&window.PopMechanic?.show(r.id)}})(n,t);break;case"quizzes.onReadyToShow":((t,e)=>{const n=t,i=n?.[0]?.id,r=n?.[1];if(!i||"function"!=typeof r)return;const o=eo()?.quizzes.find(t=>t.internalId===i);if(!o)return;const s=e.formsMap[o.formId];s?.isQuizForm()&&Zo(async()=>{r({meta:{quiz:{id:i}}})})})(n,t);break;case"quizzes.onComplete":(t=>{const e=t,n=e?.[0];"function"==typeof n&&Fh.add(n)})(n);break;case"quizzes.offComplete":(t=>{const e=t,n=e?.[0];"function"==typeof n&&Fh.delete(n)})(n);break;case"personalization.addEventListener":(t=>{const e=t,n=e?.[0];if(!n)return;const{event:i,handler:r}=n;jh(i)&&"function"==typeof r&&qh.addEventListener(i,r)})(n);break;case"personalization.removeEventListener":(t=>{const e=t,n=e?.[0];if(!n)return;const{event:i,handler:r}=n;jh(i)&&"function"==typeof r&&qh.removeEventListener(i,r)})(n);break;default:return}};let i=[];try{i=e.personalizationCommandsQueue}catch{}for(;i.length;){const t=i.shift();t&&n(t)}try{e.personalizationCommandsQueue={push:t=>n(t)}}catch{}},Mm=window.PopMechanic;let jm=null,Dm=null,qm={},Nm=!0,Lm=!1;window.PopMechanic.sbjs=or,window.PopMechanic.$=An,window.PopMechanic._=sn,window.PopMechanic.Promise=Promise;try{lr()}catch{}async function Bm({config:t,deviceUUID:e}){var n;Nr.log("initial config",t),Nm=!0,window.PopMechanic.initAt=Date.now(),window.PopMechanic.initReadyTs=0,window.PopMechanic.targetingReadyTs=0,e&&(window.PopMechanic.customs=window.PopMechanic.customs||{},window.PopMechanic.customs.mindboxDeviceUUID=e,window.PopMechanic.mindboxDeviceUUID=e),n={url:location.href,ts:Date.now(),vst:or.get.udata.vst},pa.push({url:n.url,ts:n.ts,vst:n.vst,productIds:null,categoryIds:null,productItem:null}).then(function(t){if(!t)return Promise.reject();Ia().then(function(e){return e?pa.enrich(t,{pagetype:e.type,product:e.product,category:e.category}):Promise.reject()}).then(()=>Sa(),()=>Sa()),Do().then(function(e){return e?pa.enrich(t,{productItem:No(e),categoryIds:e.category?e.category.ids:null}):Promise.reject()}).then(()=>Ca(),()=>Ca())}).catch(t=>{Sa(),Ca();const e=t instanceof Error?t:new Error("Unknown error");Nr.log("reportVisit error",e)}),od.init();const i=new il({data:t,deviceUUID:e,onTargetingChange:function(t,e){i.formsReady.then(function(){if(e&&!qm[t.id]){const e=Fm(t);e&&(qm[t.id]=e)}if(window.PopMechanic.targetingReadyTs=oo.getTabVisibilityDuration(),window.PopMechanic.debugMode)try{window.postMessage({source:cn.CSS_PREFIX+"script",type:"SET_IN_TARGETING",data:{clientId:window.PopMechanic.client,formId:t.id,inTargeting:e}},"*")}catch{}})}});window.PopMechanic.initModel=i;try{let e=function(t){return i.formsMap[t]},n=function(t){return qm[t]};await i.formsReady,Sr({type:"pageview",url:location.href}),Kr.on("lead",function(t){try{window.PopMechanic.onContactsSent(t.lead)}catch{}}),window.PopMechanic.show=function(t,e){const n=i.formsMap[t];if(!n||n.isEmbedded()||n.isStatic())return!1;let r=qm[n.id];if(!r){if(r=new Im(i.formsMap[t]),!r)return!1;qm[n.id]=r}const o=r.form.getLeadType();return!(sr.isContactsSent(o)&&!e)&&(r.show(!0),r)},window.PopMechanic.getModel=e,window.PopMechanic.getView=n,window.PopMechanic.embed=function(t,e={}){if(i.formsMap[t]){const n="string"==typeof e?{selector:e}:e;n.selector&&(i.formsMap[t].selector=n.selector,i.formsMap[t].embed_selector=!0);const r=Fm(i.formsMap[t]);n.force&&r.show(!0)}},window.PopMechanic.watchHash?(jm=window.location.href,Dm=setInterval(Hm,300)):!1!==window.PopMechanic.watchLocation&&(jm=window.location.pathname,Dm=setInterval(zm,300)),i.forms.forEach(t=>{if(!qm[t.id]){const e=Fm(t);e&&(qm[t.id]=e)}}),Mm.isTesting&&t.forms.forEach(t=>{t.container_id||window.PopMechanic.show(t.id,!0)}),window.PopMechanic.loaded=!0,window.PopMechanic.onLoad&&"function"==typeof window.PopMechanic.onLoad&&window.PopMechanic.onLoad(),Zo(()=>Am(i));try{window.postMessage({source:cn.CSS_PREFIX+"script",type:"SET_LOADED",data:{clientId:window.PopMechanic.client,forms:i.pluginData}},"*")}catch{}An("html").addClass(cn.CSS_PREFIX+"loaded"),Nm=!1}catch{}}function zm(){const t=window.location.pathname;t!==jm&&window.PopMechanic.update&&(jm=t,window.PopMechanic.update())}function Hm(){const t=window.location.href;t!==jm&&window.PopMechanic.update&&(jm=t,window.PopMechanic.update())}async function Um(){try{Kr.trigger("destroy"),await Promise.all(Object.values(qm).map(async t=>{try{t&&"function"==typeof t.destroy&&await t.destroy()}catch{}})),qm={},Kr.off("lead"),Kr.off("formShow"),Kr.off("formClose"),Kr.off("targeting"),Kr.off("quizAnswer"),Kr.off("matcherProductClick"),Zo(()=>window.PopMechanic.initModel.destroy()),window.PopMechanic.loaded=!1,window.PopMechanic.sampleSent=!1,oo.recoSlaState.reset?.(),clearInterval(Dm),kr.reset(),An("#"+cn.CSS_PREFIX+"snippet").html(""),An("[data-popmechanic-embed]").html(""),An("html").removeClass(cn.CSS_PREFIX+"loaded"),od.enableScroll(),od.destroy(),window.PopMechanic.restartWatchdog?.()}catch{}}or.init({prefix:"popmechanic_"}),An.ajaxSettings.xhrFields={withCredentials:!!Mm.formHash},An.ajaxSettings.global=!1,oo.getSettings().then(async t=>{await Bm(t)}),window.PopMechanic.update=async function(){try{if(Nm)return void(Lm=!0);if(Lm=!1,Nm=!0,await Um(),Lm)return Nm=!1,void window.PopMechanic.update?.();window.PopMechanic.initStartedAt=Date.now(),oo.resetTabVisibilityDuration(),al=!1,cl=Math.round(performance.now()),or.init({prefix:"popmechanic_"});const{config:t,deviceUUID:e}=await oo.getSettings(!1);await Bm({config:t,deviceUUID:e})}catch{}Lm&&window.PopMechanic.update?.()},window.PopMechanic.destroy=Um,window.addEventListener("message",function(t){t.source===window&&t.data&&"popmechanic-extension"===t.data.source&&"SHOW"===t.data.type&&window.PopMechanic.show(t.data.id,!0)})}(); }; window.MaestraScripts.executeTnsJs = function() {window.PopMechanicTns=(function(){Object.keys||(Object.keys=function(t){var e=[];for(var n in t)Object.prototype.hasOwnProperty.call(t,n)&&e.push(n);return e}),"remove"in Element.prototype||(Element.prototype.remove=function(){this.parentNode&&this.parentNode.removeChild(this)});var t=window,Oi=t.requestAnimationFrame||t.webkitRequestAnimationFrame||t.mozRequestAnimationFrame||t.msRequestAnimationFrame||function(t){return setTimeout(t,16)},e=window,Di=e.cancelAnimationFrame||e.mozCancelAnimationFrame||function(t){clearTimeout(t)};function Hi(){for(var t,e,n,i=arguments[0]||{},a=1,r=arguments.length;a
";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?zi(n,i):a.remove(),t}(),n),H=e.tMQ?ki(e.tMQ):Ri(e,"tMQ",(o=document,u=Ii(),l=Pi(u),s=o.createElement("div"),c=o.createElement("style"),f="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",c.type="text/css",s.className="tns-mq-test",u.appendChild(c),u.appendChild(s),c.styleSheet?c.styleSheet.cssText=f:c.appendChild(o.createTextNode(f)),r=window.getComputedStyle?window.getComputedStyle(s).position:s.currentStyle.position,u.fake?zi(u,l):s.remove(),"absolute"===r),n),d=e.tTf?ki(e.tTf):Ri(e,"tTf",$i("transform"),n),v=e.t3D?ki(e.t3D):Ri(e,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=Ii(),a=Pi(i),r=n.createElement("p"),o=9=-Rt)return t}:function(){return ct&&I&&!yt?K-1:yt||I?Math.max(0,Ht-Math.ceil(ft)):Ht-1},qt=on(vn("startIndex")),jt=qt,Vt=(rn(),0),Gt=rt?null:Ft(),Qt=O.preventActionWhenRunning,Xt=O.swipeAngle,Yt=!Xt||"?",Kt=!1,Jt=O.onInit,Ut=new ia,_t=" tns-slider tns-"+O.mode,Zt=G.id||(tt=window.tnsId,window.tnsId=tt?tt+1:1,"tns"+window.tnsId),$t=vn("disable"),te=!1,ee=O.freezable,ne=!(!ee||rt)&&Ln(),ie=!1,ae={click:fi,keydown:function(t){t=xi(t);var e=[a.LEFT,a.RIGHT].indexOf(t.keyCode);0<=e&&(0===e?Ee.disabled||fi(t,-1):Ae.disabled||fi(t,1))}},re={click:function(t){if(Kt){if(Qt)return;si()}var e=bi(t=xi(t));for(;e!==Se&&!Qi(e,"data-nav");)e=e.parentNode;if(Qi(e,"data-nav")){var n=ke=Number(Xi(e,"data-nav")),i=ot||rt?n*K/De:n*ft,a=ve?n:Math.min(Math.ceil(i),K-1);ci(a,t),Re===n&&(qe&&hi(),ke=-1)}},keydown:function(t){t=xi(t);var e=D.activeElement;if(!Qi(e,"data-nav"))return;var n=[a.LEFT,a.RIGHT,a.ENTER,a.SPACE].indexOf(t.keyCode),i=Number(Xi(e,"data-nav"));0<=n&&(0===n?0"," animation"];if(me||he)var Je,Ue,_e={},Ze={},$e=!1,tn=q?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};rt||an($t||ne),d&&(Pt=d,zt="translate",v?(zt+=q?"3d(":"3d(0px, ",Wt=q?", 0px, 0px)":", 0px)"):(zt+=q?"X(":"Y(",Wt=")")),I&&(G.className=G.className.replace("tns-vpfix","")),function(){dn("gutter");j.className="tns-outer",V.className="tns-inner",j.id=Zt+"-ow",V.id=Zt+"-iw",""===G.id&&(G.id=Zt);_t+=g||rt?" tns-subpixel":" tns-no-subpixel",_t+=y?" tns-calc":" tns-no-calc",rt&&(_t+=" tns-autowidth");_t+=" tns-"+O.axis,G.className+=_t,I?((S=D.createElement("div")).id=Zt+"-mw",S.className="tns-ovh",j.appendChild(S),S.appendChild(V)):j.appendChild(V);if(gt){var t=S||V;t.className+=" tns-ah"}if(Q.insertBefore(j,G),V.appendChild(G),qi(Y,function(t,e){Vi(t,"tns-item"),t.id||(t.id=Zt+"-item"+e),!I&&W&&Vi(t,W),Yi(t,{"aria-hidden":"true",tabindex:"-1"})}),Dt){for(var e=D.createDocumentFragment(),n=D.createDocumentFragment(),i=Dt;i--;){var a=i%K,r=Y[a].cloneNode(!0);if(Ki(r,"id"),n.insertBefore(r,n.firstChild),I){var o=Y[K-1-a].cloneNode(!0);Ki(o,"id"),e.appendChild(o)}}G.insertBefore(e,G.firstChild),G.appendChild(n),Y=G.children}}(),function(){if(!I)for(var t=qt,e=qt+Math.min(K,ft);t .tns-item","font-size:"+h.getComputedStyle(Y[0]).fontSize+";",Fi(Bt)),Wi(Bt,"#"+Zt,"font-size:0;",Fi(Bt))):I&&qi(Y,function(t,e){var n;t.style.marginLeft=(n=e,y?y+"("+100*n+"% / "+Ht+")":100*n/Ht+"%")}));if(H){if(x){var i=S&&O.autoHeight?xn(O.speed):"";Wi(Bt,"#"+Zt+"-mw",i,Fi(Bt))}i=pn(O.edgePadding,O.gutter,O.fixedWidth,O.speed,O.autoHeight),Wi(Bt,"#"+Zt+"-iw",i,Fi(Bt)),I&&(i=q&&!rt?"width:"+mn(O.fixedWidth,O.gutter,O.items)+";":"",x&&(i+=xn(mt)),Wi(Bt,"#"+Zt,i,Fi(Bt))),i=q&&!rt?hn(O.fixedWidth,O.gutter,O.items):"",O.gutter&&(i+=yn(O.gutter)),I||(x&&(i+=xn(mt)),b&&(i+=bn(mt))),i&&Wi(Bt,"#"+Zt+" > .tns-item",i,Fi(Bt))}else{Gn(),V.style.cssText=pn(ut,lt,ot,gt),I&&q&&!rt&&(G.style.width=mn(ot,lt,ft));var i=q&&!rt?hn(ot,lt,ft):"";lt&&(i+=yn(lt)),i&&Wi(Bt,"#"+Zt+" > .tns-item",i,Fi(Bt))}if(k&&H)for(var a in k){a=parseInt(a);var r=k[a],i="",o="",u="",l="",s="",c=rt?null:vn("items",a),f=vn("fixedWidth",a),d=vn("speed",a),v=vn("edgePadding",a),p=vn("autoHeight",a),m=vn("gutter",a);x&&S&&vn("autoHeight",a)&&"speed"in r&&(o="#"+Zt+"-mw{"+xn(d)+"}"),("edgePadding"in r||"gutter"in r)&&(u="#"+Zt+"-iw{"+pn(v,m,f,d,p)+"}"),I&&q&&!rt&&("fixedWidth"in r||"items"in r||ot&&"gutter"in r)&&(l="width:"+mn(f,m,c)+";"),x&&"speed"in r&&(l+=xn(d)),l&&(l="#"+Zt+"{"+l+"}"),("fixedWidth"in r||ot&&"gutter"in r||!I&&"items"in r)&&(s+=hn(f,m,c)),"gutter"in r&&(s+=yn(m)),!I&&"speed"in r&&(x&&(s+=xn(d)),b&&(s+=bn(d))),s&&(s="#"+Zt+" > .tns-item{"+s+"}"),(i=o+u+l+s)&&Bt.insertRule("@media (min-width: "+a/16+"em) {"+i+"}",Bt.cssRules.length)}}(),Cn();var en=yt?I?function(){var t=Vt,e=Gt;t+=dt,e-=dt,ut?(t+=1,e-=1):ot&&(st+lt)%(ot+lt)&&(e-=1),Dt&&(e=parseInt(i)&&t in k[i]&&(n=k[i][t]);return"slideBy"===t&&"page"===n&&(n=vn("items")),I||"slideBy"!==t&&"items"!==t||(n=Math.floor(n)),n}function pn(t,e,n,i,a){var r="";if(void 0!==t){var o=t;e&&(o-=e),r=q?"margin: 0 "+o+"px 0 "+t+"px;":"margin: "+t+"px 0 "+o+"px 0;"}else if(e&&!n){var u="-"+e+"px";r="margin: 0 "+(q?u+" 0 0":"0 "+u+" 0")+";"}return!I&&a&&x&&i&&(r+=xn(i)),r}function mn(t,e,n){return t?(t+e)*Ht+"px":y?y+"("+100*Ht+"% / "+n+")":100*Ht/n+"%"}function hn(t,e,n){var i;if(t)i=t+e+"px";else{I||(n=Math.floor(n));var a=I?Ht:n;i=y?y+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==R?i+";":i+" !important;"}function yn(t){var e="";!1!==t&&(e=(q?"padding-":"margin-")+(q?"right":"bottom")+": "+t+"px;");return e}function gn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function xn(t){return gn(x,18)+"transition-duration:"+t/1e3+"s;"}function bn(t){return gn(b,17)+"animation-duration:"+t/1e3+"s;"}function Cn(){if(dn("autoHeight")||rt||!q){var t=G.querySelectorAll("img");qi(t,function(t){var e=t.src;e&&e.indexOf("data:image")<0?(ea(t,xe),t.src="",t.src=e,Vi(t,"loading")):St||zn(t)}),Oi(function(){jn(Ji(t),function(){Z=!0})}),!rt&&q&&(t=Fn(qt,Math.min(qt+ft-1,Ht-1))),St?wn():Oi(function(){jn(Ji(t),wn)})}else I&&ai(),Tn(),En()}function wn(){if(rt){var e=yt?qt:K-1;!function t(){Y[e-1].getBoundingClientRect().right.toFixed(2)===Y[e].getBoundingClientRect().left.toFixed(2)?Mn():setTimeout(function(){t()},16)}()}else Mn()}function Mn(){q&&!rt||(Yn(),rt?(Rt=ni(),ee&&(ne=Ln()),Gt=Ft(),an($t||ne)):Ni()),I&&ai(),Tn(),En()}function Tn(){if(Kn(),j.insertAdjacentHTML("afterbegin",'
slide '+Rn()+" of "+K+"
"),$=j.querySelector(".tns-liveregion .current"),pe){var t=Tt?"stop":"start";Xe?Yi(Xe,{"data-action":t}):O.autoplayButtonOutput&&(j.insertAdjacentHTML(cn(O.autoplayPosition),'"),Xe=j.querySelector("[data-action]")),Xe&&ea(Xe,{click:yi}),Tt&&(mi(),Nt&&ea(G,oe),Lt&&ea(G,ue))}if(de){if(Se)Yi(Se,{"aria-label":"Carousel Pagination"}),qi(Be=Se.children,function(t,e){Yi(t,{"data-nav":e,tabindex:"-1","aria-label":ze+(e+1),"aria-controls":Zt})});else{for(var e="",n=ve?"":'style="display:none"',i=0;i';e='
'+e+"
",j.insertAdjacentHTML(cn(O.navPosition),e),Se=j.querySelector(".tns-nav"),Be=Se.children}if(Bi(),x){var a=x.substring(0,x.length-18).toLowerCase(),r="transition: all "+mt/1e3+"s";a&&(r="-"+a+"-"+r),Wi(Bt,"[aria-controls^="+Zt+"-item]",r,Fi(Bt))}Yi(Be[Re],{"aria-label":ze+(Re+1)+We}),Ki(Be[Re],"tabindex"),Vi(Be[Re],Pe),ea(Se,re)}fe&&(Me||Ee&&Ae||(j.insertAdjacentHTML(cn(O.controlsPosition),'
"),Me=j.querySelector(".tns-controls")),Ee&&Ae||(Ee=Me.children[0],Ae=Me.children[1]),O.controlsContainer&&Yi(Me,{"aria-label":"Carousel Navigation",tabindex:"0"}),(O.controlsContainer||O.prevButton&&O.nextButton)&&Yi([Ee,Ae],{"aria-controls":Zt,tabindex:"-1"}),(O.controlsContainer||O.prevButton&&O.nextButton)&&(Yi(Ee,{"data-controls":"prev"}),Yi(Ae,{"data-controls":"next"})),Ce=Un(Ee),we=Un(Ae),$n(),Me?ea(Me,ae):(ea(Ee,ae),ea(Ae,ae))),Sn()}function En(){if(I&&C){var t={};t[C]=si,ea(G,t)}wt&&ea(G,se,O.preventScrollOnTouch),Mt&&ea(G,ce),pt&&ea(D,le),"inner"===R?Ut.on("outerResized",function(){Nn(),Ut.emit("innerLoaded",Si())}):(k||ot||rt||gt||!q)&&ea(h,{resize:An}),gt&&("outer"===R?Ut.on("innerLoaded",qn):$t||qn()),Pn(),$t?Hn():ne&&Dn(),Ut.on("indexChanged",Vn),"inner"===R&&Ut.emit("innerLoaded",Si()),"function"==typeof Jt&&Jt(Si()),U=!0}function An(t){Oi(function(){Nn(xi(t))})}function Nn(t){if(U){"outer"===R&&Ut.emit("outerResized",Si(t)),J=sn();var e,n=F,i=!1;k&&(Bn(),(e=n!==F)&&Ut.emit("newBreakpointStart",Si(t)));var a,r,o,u,l=ft,s=$t,c=ne,f=pt,d=xt,v=Ct,p=wt,m=Mt,h=Tt,y=Nt,g=Lt,x=qt;if(e){var b=ot,C=gt,w=bt,M=ct,T=At;if(!H)var E=lt,A=ut}if(pt=vn("arrowKeys"),xt=vn("controls"),Ct=vn("nav"),wt=vn("touch"),ct=vn("center"),Mt=vn("mouseDrag"),Tt=vn("autoplay"),Nt=vn("autoplayHoverPause"),Lt=vn("autoplayResetOnVisibility"),e&&($t=vn("disable"),ot=vn("fixedWidth"),mt=vn("speed"),gt=vn("autoHeight"),bt=vn("controlsText"),At=vn("autoplayText"),Et=vn("autoplayTimeout"),H||(ut=vn("edgePadding"),lt=vn("gutter"))),an($t),st=fn(),q&&!rt||$t||(Yn(),q||(Ni(),i=!0)),(ot||rt)&&(Rt=ni(),Gt=Ft()),(e||ot)&&(ft=vn("items"),dt=vn("slideBy"),(r=ft!==l)&&(ot||rt||(Gt=Ft()),en())),e&&$t!==s&&($t?Hn():function(){if(!te)return;if(Bt.disabled=!1,G.className+=_t,ai(),yt)for(var t=Dt;t--;)I&&_i(Y[t]),_i(Y[Ht-t-1]);if(!I)for(var e=qt,n=qt+K;e .tns-item",S,Fi(Bt))}gt&&qn(),i&&(ai(),jt=qt)}e&&Ut.emit("newBreakpointEnd",Si(t))}}function Ln(){if(!ot&&!rt)return K<=(ct?ft-(ft-1)/2:ft);var t=ot?(ot+lt)*K:_[K],e=ut?st+2*ut:st+lt;return ct&&(e-=ot?(st-ot)/2:(st-(_[qt+1]-_[qt]-lt))/2),t<=e}function Bn(){for(var t in F=0,k)(t=parseInt(t))<=J&&(F=t)}function Sn(){!Tt&&Xe&&Ui(Xe),!Ct&&Se&&Ui(Se),xt||(Me?Ui(Me):(Ee&&Ui(Ee),Ae&&Ui(Ae)))}function On(){Tt&&Xe&&_i(Xe),Ct&&Se&&_i(Se),xt&&(Me?_i(Me):(Ee&&_i(Ee),Ae&&_i(Ae)))}function Dn(){if(!ie){if(ut&&(V.style.margin="0px"),Dt)for(var t="tns-transparent",e=Dt;e--;)I&&Vi(Y[e],t),Vi(Y[Ht-e-1],t);Sn(),ie=!0}}function Hn(){if(!te){if(Bt.disabled=!0,G.className=G.className.replace(_t.substring(1),""),Ki(G,["style"]),yt)for(var t=Dt;t--;)I&&Ui(Y[t]),Ui(Y[Ht-t-1]);if(q&&I||Ki(V,["style"]),!I)for(var e=qt,n=qt+K;e=_[Ht-1])qt=Gt;else for(var n=0;n=_[n];)e>_[qt=n]&&a<0&&(qt+=1),n++}ui(i,a),Ut.emit(Ci(i)?"touchEnd":"dragEnd",Si(i))}):Yt&&fi(i,0
";return r.innerHTML=o,a.appendChild(r),n.appendChild(a),t=Math.abs(a.getBoundingClientRect().left-r.children[67].getBoundingClientRect().left)<2,n.fake?c(n,i):a.remove(),t}(),b),F=p.tMQ?r(p.tMQ):o(p,"tMQ",(S=document,H=l(P=s()),R=S.createElement("div"),z="@media all and (min-width:1px){.tns-mq-test{position:absolute}}",(W=S.createElement("style")).type="text/css",R.className="tns-mq-test",P.appendChild(W),P.appendChild(R),W.styleSheet?W.styleSheet.cssText=z:W.appendChild(S.createTextNode(z)),L=window.getComputedStyle?window.getComputedStyle(R).position:R.currentStyle.position,P.fake?c(P,H):R.remove(),"absolute"===L),b),Q=p.tTf?r(p.tTf):o(p,"tTf",E("transform"),b),V=p.t3D?r(p.t3D):o(p,"t3D",function(t){if(!t)return!1;if(!window.getComputedStyle)return!1;var e,n=document,i=s(),a=l(i),r=n.createElement("p"),o=9-oe&&(e=t);return e}:function(){return Ft||ot?Math.max(0,ae-Math.ceil(Ht)):ae-1},de=En(Dn("startIndex")),ve=de,pe=0,he=Dt?null:fe(),me=t.swipeAngle,ye=!me||"?",ge=!1,xe=t.onInit,be=new function(){return{topics:{},on:function(t,e){this.topics[t]=this.topics[t]||[],this.topics[t].push(e)},off:function(t,e){if(this.topics[t])for(var n=0;n"," animation"];if(ze||qe)var yn,gn={},xn={},bn=!1,wn=0,Cn=ht?function(t,e){return t.x-e.x}:function(t,e){return t.y-e.y};Dt||Tn(Me||Ee),Q&&(ue=Q,le="translate",V?(le+=ht?"3d(":"3d(0px, ",ce=ht?", 0px, 0px)":", 0px)"):(le+=ht?"X(":"Y(",ce=")")),function(){at&&Xn(),function(){if(Ln("gutter"),mt.className="tns-outer",yt.className="tns-inner",mt.id=Ce+"-ow",yt.id=Ce+"-iw",Qt&&(yt.className+=" tns-ah"),""===gt.id&&(gt.id=Ce),we+=j||Dt?" tns-subpixel":" tns-no-subpixel",we+=q?" tns-calc":" tns-no-calc",we+=" tns-"+t.axis,gt.className+=we,ot){var e=n.createElement("div");e.className="tns-ovh",mt.appendChild(e),e.appendChild(yt)}else mt.appendChild(yt);xt.insertBefore(mt,gt),yt.appendChild(gt)}();for(var e=0;e .tns-item","font-size:"+u.getComputedStyle(wt[0]).fontSize+";",d(te)),f(te,"#"+Ce,"font-size:0;",d(te))):v(wt,function(t,e){var n;t.style.marginLeft=(n=e,q?q+"("+100*n+"% / "+ae+")":100*n/ae+"%")})),F){var a=In(t.edgePadding,t.gutter,t.fixedWidth,t.speed);f(te,"#"+Ce+"-iw",a,d(te)),ot&&(a=ht&&!Dt?"width:"+On(t.fixedWidth,t.gutter,t.items)+";":"",X&&(a+=Rn(qt)),f(te,"#"+Ce,a,d(te))),a=ht&&!Dt?Sn(t.fixedWidth,t.gutter,t.items):"",t.gutter&&(a+=Pn(t.gutter)),ot||(X&&(a+=Rn(qt)),K&&(a+=Wn(qt))),a&&f(te,"#"+Ce+" > .tns-item",a,d(te))}else{yt.style.cssText=In(Ot,St,It),ot&&ht&&!Dt&&(gt.style.width=On(It,St,Ht));a=ht&&!Dt?Sn(It,St,Ht):"";St&&(a+=Pn(St)),a&&f(te,"#"+Ce+" > .tns-item",a,d(te))}if(at&&F)for(var r in at){r=parseInt(r);var o=at[r],s=(a="",""),l="",c="",p=Dt?null:Dn("items",r),h=Dn("fixedWidth",r),g=Dn("speed",r),x=Dn("edgePadding",r),b=Dn("gutter",r);("edgePadding"in o||"gutter"in o)&&(s="#"+Ce+"-iw{"+In(x,b,h,g)+"}"),ot&&ht&&!Dt&&("fixedWidth"in o||"items"in o||It&&"gutter"in o)&&(l="width:"+On(h,b,p)+";"),X&&"speed"in o&&(l+=Rn(g)),l&&(l="#"+Ce+"{"+l+"}"),("fixedWidth"in o||It&&"gutter"in o||!ot&&"items"in o)&&(c+=Sn(h,b,p)),"gutter"in o&&(c+=Pn(b)),!ot&&"speed"in o&&(X&&(c+=Rn(g)),K&&(c+=Wn(g))),c&&(c="#"+Ce+" > .tns-item{"+c+"}"),(a=s+l+c)&&te.insertRule("@media (min-width: "+r/16+"em) {"+a+"}",te.cssRules.length)}})(),zn()}();var Mn=Ft?ot?function(){var t=pe,e=he;t+=Rt,e-=Rt,Ot?(t+=1,e-=1):It&&Pt%(It+St)&&(e-=1),ie&&(e=parseInt(a)&&e in at[a]&&(i=at[a][e]);return"slideBy"===e&&"page"===i&&(i=Dn("items")),ot||"slideBy"!==e&&"items"!==e||(i=Math.floor(i)),i}function In(t,e,n,i){var a="";if(t){var r=t;e&&(r-=e),a=ht?"margin: 0 "+r+"px 0 "+t+"px;":"margin: "+t+"px 0 "+r+"px 0;"}else if(e&&!n){var o="-"+e+"px";a="margin: 0 "+(ht?o+" 0 0":"0 "+o+" 0")+";"}return X&&i&&(a+=Rn(i)),a}function On(t,e,n){return t?(t+e)*ae+"px":q?q+"("+100*ae+"% / "+n+")":100*ae/n+"%"}function Sn(t,e,n){var i;if(t)i=t+e+"px";else{ot||(n=Math.floor(n));var a=ot?ae:n;i=q?q+"(100% / "+a+")":100/a+"%"}return i="width:"+i,"inner"!==rt?i+";":i+" !important;"}function Pn(t){var e="";return!1!==t&&(e=(ht?"padding-":"margin-")+(ht?"right":"bottom")+": "+t+"px;"),e}function Hn(t,e){var n=t.substring(0,t.length-e).toLowerCase();return n&&(n="-"+n+"-"),n}function Rn(t){return Hn(X,18)+"transition-duration:"+t/1e3+"s;"}function Wn(t){return Hn(K,17)+"animation-duration:"+t/1e3+"s;"}function zn(){if(Ln("autoHeight")||Dt||!ht){var t=gt.querySelectorAll("img");v(t,function(t){var e=t.src;e.indexOf("data:image")<0?(D(t,Qe),t.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///ywAAAAAAQABAAACAUwAOw==",t.src=e):m(t,Fe)}),e(function(){ti(function(t){for(var e=[],n=0,i=t.length;n'+mn[0]+e+mn[1]+_t[0]+""),pn=mt.querySelector("[data-action]")),pn&&D(pn,{click:ki}),Gt&&(Ti(),Zt&&D(gt,Le),$t&&D(gt,De))}if(He){var n=ot?ie:0;if($e){w($e,{"aria-label":"Carousel Pagination"}),Ze=$e.children;for(var i=0;i';r='
'+r+"
",mt.insertAdjacentHTML("afterbegin",r),$e=mt.querySelector(".tns-nav"),Ze=$e.children}if(Wi(),X){var s=X.substring(0,X.length-18).toLowerCase(),u="transition: all "+qt/1e3+"s";s&&(u="-"+s+"-"+u),f(te,"[aria-controls^="+Ce+"-item]",u,d(te))}w(Ze[rn],{tabindex:"0","aria-selected":"true"}),m(Ze[rn],sn),D($e,Be)}Pe&&(Ye||Ue&&Ge?(Ye&&(Ue=Ye.children[0],Ge=Ye.children[1],w(Ye,{"aria-label":"Carousel Navigation",tabindex:"0"}),w(Ye.children,{"aria-controls":Ce,tabindex:"-1"})),w(Ue,{"data-controls":"prev"}),w(Ge,{"data-controls":"next"})):(mt.insertAdjacentHTML("afterbegin",'
"),Ye=mt.querySelector(".tns-controls"),Ue=Ye.children[0],Ge=Ye.children[1]),Ve=oi(Ue),Xe=oi(Ge),li(),Ye?D(Ye,Ne):(D(Ue,Ne),D(Ge,Ne))),Yn()}function jn(){if(ot&&G){var t={};t[G]=xi,D(gt,t)}Kt&&D(gt,Oe),Ut&&D(gt,Se),zt&&D(n,Ie),"inner"===rt?be.on("outerResized",function(){Qn(),be.emit("innerLoaded",zi())}):(at||It||Dt||Qt||!ht)&&D(u,{resize:Fn}),"outer"===rt?be.on("innerLoaded",$n):Qt&&!Me&&$n(),Jn(),Me?Gn():Ee&&Un(),be.on("indexChanged",ei),"function"==typeof xe&&xe(zi()),"inner"===rt&&be.emit("innerLoaded",zi())}function Fn(t){e(function(){Qn(Bi(t))})}function Qn(t){if(At){"outer"===rt&&be.emit("outerResized",zi(t)),Mt=Nn();var e,i=pt,a=!1;at&&(Xn(),(e=i!==pt)&&be.emit("newBreakpointStart",zi(t)));var r,o,s,u,l=Ht,c=Me,p=Ee,h=zt,g=Vt,x=Yt,b=Kt,w=Ut,C=Gt,T=Zt,E=$t,k=de;if(e){var N=It,B=Qt,L=Xt,O=_t;if(!F)var S=St,P=Ot}if(zt=Dn("arrowKeys"),Vt=Dn("controls"),Yt=Dn("nav"),Kt=Dn("touch"),Ut=Dn("mouseDrag"),Gt=Dn("autoplay"),Zt=Dn("autoplayHoverPause"),$t=Dn("autoplayResetOnVisibility"),e&&(Me=Dn("disable"),It=Dn("fixedWidth"),qt=Dn("speed"),Qt=Dn("autoHeight"),Xt=Dn("controlsText"),_t=Dn("autoplayText"),Jt=Dn("autoplayTimeout"),F||(Ot=Dn("edgePadding"),St=Dn("gutter"))),Tn(Me),Pt=Bn(),ht&&!Dt||Me||(ai(),ht||(Ri(),a=!0)),(It||Dt)&&(oe=di(),he=fe()),(e||It)&&(Ht=Dn("items"),Rt=Dn("slideBy"),(o=Ht!==l)&&(It||Dt||(he=fe()),Mn())),e&&Me!==c&&(Me?Gn():function(){if(Ae){if(te.disabled=!1,gt.className+=we,pi(),Ft)for(var t=ie;t--;)ot&&A(wt[t]),A(wt[ae-t-1]);if(!ot)for(var e=de,n=de+Ct;e .tns-item",z,d(te))}Qt&&$n(),a&&(pi(),ve=de)}e&&be.emit("newBreakpointEnd",zi(t))}}function Vn(){return It||Dt?It?(It+St)*Ct<=Pt+2*Ot:(Ft?Tt[Ct]:fi())<=Pt+2*Ot:Ct<=Ht}function Xn(){for(var t in pt=0,at)(t=parseInt(t))<=Mt&&(pt=t)}function Yn(){!Gt&&pn&&M(pn),!Yt&&$e&&M($e),Vt||(Ye?M(Ye):(Ue&&M(Ue),Ge&&M(Ge)))}function Kn(){Gt&&pn&&A(pn),Yt&&$e&&A($e),Vt&&(Ye?A(Ye):(Ue&&A(Ue),Ge&&A(Ge)))}function Un(){if(!ke){if(Ot&&(yt.style.margin="0px"),ie)for(var t="tns-transparent",e=ie;e--;)ot&&m(wt[e],t),m(wt[ae-e-1],t);Yn(),ke=!0}}function Gn(){if(!Ae){if(te.disabled=!0,gt.className=gt.className.replace(we.substring(1),""),C(gt,["style"]),Ft)for(var t=ie;t--;)ot&&M(wt[t]),M(wt[ae-t-1]);if(ht&&ot||C(yt,["style"]),!ot)for(var e=de,n=de+Ct;e=Tt[Tt.length-1])de=he;else for(var i=0;i=Tt[i];)n>Tt[de=i]&&a<0&&(de+=1),i++}yi(t,a),be.emit(Di(t)?"touchEnd":"dragEnd",zi(t))}):(Pi(),ye&&wi(t,0\r\n\r\n
\r\n
\r\n
\r\n <% if(parseInt(show_title)) { %>\r\n\t\t\t
\r\n\t\t\t\t<%=title%>\r\n
\r\n <% } %>\r\n <% if(parseInt(show_sub_title)) { %>\r\n\t\t\t
\r\n\t\t\t\tAdd your birth date, and we'll drop the gift when the time comes.

Not a member yet? Join now\r\n
\r\n <% } %>\r\n\t\t
\r\n
\r\n <%\r\n for (var i = 0; i < fields_list.length; i++) {\r\n var field = fields_list[i];\r\n var required = \"data-popmechanic-\" + (field.required ? \"required\" : \"unrequired\");\r\n if (!field) continue;\r\n switch (field.type) {\r\n case \"text\":\r\n %>\" placeholder=\"<%=field.placeholder%>\" <%=required%>><%\r\n break;\r\n case \"name\":\r\n case \"phone\":\r\n %>\" placeholder=\"<%=field.placeholder%>\" <%=required%>><%\r\n break;\r\n case \"email\":\r\n %>\" placeholder=\"<%=field.placeholder%>\" <%=required%>><%\r\n break;\r\n case \"number\":\r\n %>\" placeholder=\"<%=field.placeholder%>\" <%=required%>><%\r\n break;\r\n case \"date\":\r\n %>\" placeholder=\"<%=field.placeholder%>\" <%=required%>><%\r\n break;\r\n case \"select\":\r\n %><%\r\n break;\r\n case \"checkbox\":\r\n %><%\r\n break;\r\n case \"submit\":\r\n if (field.params.submits_count == 1) {\r\n %><%\r\n } else { %>\r\n
\r\n '] = '<%=field.params.submit1_value%>'\"\r\n ><%=field.params.submit1_text%>\r\n '] = '<%=field.params.submit2_value%>'\"\r\n ><%=field.params.submit2_text%>\r\n
\r\n <% }\r\n break;\r\n default:\r\n continue;\r\n }\r\n } %>\r\n
\r\n
\r\n\t\r\n
\r\n <% if(parseInt(show_thanks_title)) { %>\r\n\t\t
\r\n\t\t\t<%=success%>\r\n
\r\n <% } %>\r\n <% if(parseInt(show_thanks_sub_title)) { %>\r\n\t\t
\r\n\t\t\t<%=instruction%>\r\n
\r\n <% } %>\r\n
\r\n <% if(parseInt(close_show)) { %>\r\n \r\n
\r\n <% } %>\r\n
", "css": "<% try {\r\n font_custom_show = font_custom_show;\r\n } catch (e) { font_custom_show = 0 }\r\n%>\r\n<% if(!parseInt(font_custom_show)) { %>\r\n @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');\r\n<% } %>\r\n@font-face {\r\n font-family: 'Rotonto';\r\n src: url('https://instantfunding.io/wp-content/uploads/2023/11/Rotonto-Semibold.ttf') format('truetype');\r\n font-weight: 600;\r\n font-style: normal;\r\n}\r\n<% try {\r\n close_show = close_show;\r\n close_size_desk = close_size_desk;\r\n close_size_mob = close_size_mob;\r\n close_color_desk = close_color_desk;\r\n close_color_mob = close_color_mob;\r\n close_bg_show_desk = close_bg_show_desk;\r\n close_bg_color_desk = close_bg_color_desk;\r\n close_bg_show_mob = close_bg_show_mob;\r\n close_bg_color_mob = close_bg_color_mob;\r\n close_bg_transparency = close_bg_transparency;\r\n } catch (e) { \r\n close_show = 0\r\n close_size_desk = 20\r\n close_size_mob = 20\r\n close_color_desk = '#000000'\r\n close_color_mob = '#000000'\r\n close_bg_show_desk = 0\r\n close_bg_color_desk = '#000000'\r\n close_bg_show_mob = 0\r\n close_bg_color_mob = '#000000'\r\n close_bg_transparency = 0.5\r\n }\r\n%>\r\n\r\n.popmechanic-reset,\r\n.popmechanic-reset * {\r\n line-height: normal;\r\n <% if (parseInt(use_custom_font)) { %> \r\n font-family: <%=custom_font%>; \r\n<% } else { %> \r\n font-family: <%=form_font%>;\r\n <% } %>\r\n box-sizing: border-box;\r\n}\r\n\r\n#popmechanic-form {\r\n position: relative;\r\n <% if (parseInt(use_100width)) { %> \r\n width:100%;\r\n<% } else { %> \r\n width: <%=form_width%>px;\r\n <% } %>\r\n height: <%=form_height%>px;\r\n<% if (parseInt(use_custom_font)) { %> \r\n font-family: <%=custom_font%>; \r\n<% } else { %> \r\n font-family: <%=form_font%>;\r\n <% } %>\r\n border-radius: 0px;\r\n padding: <%=pad_top%>px <%=pad_right%>px <%=pad_bottom%>px <%=pad_left%>px;\r\nbackground: linear-gradient(to bottom, #121212, #2D2B58);\r\n <% if(parseInt(show_form_bg)) { %>\r\n background: linear-gradient(to bottom, #121212, #2D2B58), url(<%=form_bg_img%>) center center no-repeat;\r\n background-size: cover;\r\n <% } %>\r\n\r\n\r\n}\r\n\r\n.joinlink {\r\n color:#BEFF38 !important;\r\n}\r\n\r\n#popmechanic-form .popmechanic-main {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n justify-content: space-between;\r\n align-content: stretch;\r\n align-items: flex-start;\r\n}\r\n\r\n#popmechanic-form .popmechanic-content {\r\n flex: 0 1 350px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-title {\r\n color: <%=text_color1%>;\r\n font-size: <%=title_fontsize%>px;\r\n line-height: 1;\r\n font-weight: 600;\r\n font-family: 'Rotonto', sans-serif !important;\r\n}\r\n\r\n#popmechanic-form .popmechanic-text {\r\n margin: 16px 0 0;\r\n color: <%=text_color2%>;\r\n font-size: <%=text_size2%>px;\r\n line-height: 1.25;\r\n font-weight: 400;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs {\r\n flex: 0 1 280px;\r\n padding: 33px 20px;\r\n border: <%=inputs_border_width%>px solid <%=inputs_border%>;\r\n border-radius: <%=inputs_border_radius%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input {\r\n width: <%=inp_width%>px;\r\n height: <%=inp_height%>px;\r\n padding: 0 16px;\r\n margin: 0 0 16px;\r\n background: <%=inp_bgcolor%>;\r\n border: 1px solid <%=inp_border_color%>;\r\n border-radius: <%=inp_border_radius%>px;\r\n outline: none;\r\n font-size: <%=inp_fontsize%>px;\r\n font-weight: 400;\r\n color: <%=inp_color%>;\r\n}\r\n#popmechanic-form .popmechanic-input::placeholder {\r\n color: <%=placeholder_color%>;\r\n opacity: 1;\r\n transition: all 0.3s;\r\n}\r\n#popmechanic-form .popmechanic-input:focus::placeholder {\r\n opacity: 0;\r\n}\r\n#popmechanic-form .popmechanic-input.popmechanic-invalid {\r\n border: 1px solid #f36451;\r\n}\r\n#popmechanic-form .popmechanic-input.popmechanic-invalid::placeholder {\r\n color: #f36451;\r\n}\r\n\r\n#popmechanic-form .popmechanic-submit {\r\n width: <%=btn_width%>px;\r\n height: <%=btn_height%>px;\r\n \r\n background: <%=but_color1%>;\r\n color: <%=but_color3%>; \r\n border: none;\r\n padding: 0;\r\n border-radius: <%=btn_border_radius%>px;\r\n outline: none;\r\n cursor: pointer;\r\n font-size: <%=btn_fontsize%>px;\r\n line-height: normal;\r\n font-weight: 700;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.3s;\r\n margin: 0 0 22px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-submit:hover {\r\n color: <%=but_color4%>;\r\n background: <%=but_color2%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-buttons {\r\n\tdisplay: flex;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit {\r\n width: <%=btn_width / 2 - 5%>px;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit:not(:last-child) {\r\n margin-right: 10px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-checkbox-block {\r\n position: relative;\r\n display: block;\r\n font-size: <%=conf_fontsize%>px;\r\n line-height: 18px;\r\n color: <%=text_color3%>;\r\n padding: 0 0 0 30px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-block a {\r\n color: inherit;\r\n text-decoration: underline;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-block:before {\r\n content: \"\";\r\n position: absolute;\r\n top: 0;\r\n left: -1px;\r\n width: 18px;\r\n height: 18px;\r\n border: 1px solid <%=inp_border_color%>;\r\n border-radius: 4px;\r\n background: <%=inp_bgcolor%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-checkbox-check {\r\n position: absolute;\r\n top: -0;\r\n left: -1px;\r\n z-index: 2;\r\n width: 18px;\r\n height: 18px;\r\n opacity: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.3s;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-check svg {\r\n fill: <%=but_color1%>;\r\n width: 10px;\r\n}\r\n#popmechanic-form .popmechanic-checkbox {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 3;\r\n width: 20px;\r\n height: 20px;\r\n opacity: 0;\r\n}\r\n#popmechanic-form .popmechanic-checkbox:checked ~ .popmechanic-checkbox-check {\r\n opacity: 1;\r\n}\r\n\r\n#popmechanic-form .popmechanic-thankyou {\r\n text-align: center;\r\n height: 100%;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-title {\r\n font-size: <%=title_fontsize%>px;\r\n line-height: 31px;\r\n font-weight: 700;\r\n}\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-text {\r\n margin: 30px 0 0;\r\n font-size: <%=text_size2%>px;\r\n line-height: 28px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form {\r\n width: <%=form_width_mob%>px;\r\n height: <%=form_height_mob%>px;\r\n padding: <%=pad_top_mob%>px <%=pad_right_mob%>px <%=pad_bottom_mob%>px <%=pad_left_mob%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main { \r\n flex-wrap: wrap;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-title {\r\n font-size: <%=text_size_mob1%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-text {\r\n margin: 14px 0 0;\r\n font-size: <%=text_size_mob2%>px;\r\n line-height: 18px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-inputs {\r\n border: none;\r\n padding: 0;\r\n margin: 20px 0 0;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-input {\r\n width: <%=inp_width_mob%>px;\r\n height: <%=inp_height_mob%>px;\r\n font-size: <%=inp_fontsize_mob%>px;\r\n margin: 0 0 12px;\r\n}\r\n\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-buttons {\r\n\tdisplay: block;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-submit:not(:last-child) {\r\n margin-right: 0;\r\n margin-bottom: 12px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-submit {\r\n width: <%=btn_width_mob%>px;\r\n height: <%=btn_height_mob%>px;\r\n font-size: <%=btn_fontsize_mob%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-text {\r\n margin: 10px 0 0;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-checkbox-block {\r\n font-size: <%=conf_fontsize_mob%>px;\r\n}\r\n\r\n.popmechanic-thankyou {\r\n display: none;\r\n}\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-main {\r\n display: none;\r\n}\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-thankyou {\r\n display: flex;\r\n}\r\n\r\n<% if(parseInt(close_show)) { %>\r\n /* CLOSE */\r\n <%\r\n function hexToRgb(hex) {\r\n return hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b) {\r\n return \"#\".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);\r\n }).substring(1).match(/.{2}/g).map(function (x) {\r\n return parseInt(x, 16);\r\n });\r\n };\r\n %>\r\n\r\n #popmechanic-form .popmechanic-close {\r\n position: absolute;\r\n z-index: 40;\r\n cursor: pointer;\r\n }\r\n #popmechanic-form .popmechanic-close::before,\r\n #popmechanic-form .popmechanic-close::after {\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n width: 80%;\r\n height: 2px;\r\n transform: translate(-50%, -50%) rotate(45deg);\r\n }\r\n #popmechanic-form .popmechanic-close::after {\r\n transform: translate(-50%, -50%) rotate(135deg);\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close {\r\n top: 10px;\r\n right: 10px;\r\n width: <%= close_size_desk %>px;\r\n height: <%= close_size_desk %>px;\r\n <% if(parseInt(close_bg_show_desk)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_desk) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_desk %>;\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close {\r\n top: 5px;\r\n right: 5px;\r\n width: <%= close_size_mob %>px;\r\n height: <%= close_size_mob %>px;\r\n <% if(parseInt(close_bg_show_mob)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_mob) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::after,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_mob %>;\r\n }\r\n<% } %>", "button_html": "", "button_css": ""}, "modulus_lower_inclusive": null, "modulus_upper_exclusive": null}], "is_transactional": false}, {"id": 52216, "template": 2030, "button_template": null, "test_group": null, "new_targeting": null, "settings_splits": [{"conditions_splits": []}], "pinned": false, "name": "Phone number form", "active": true, "embed_selector": false, "selector": "", "placement": "start", "frequency": {"once_lifetime": false, "once_session": false, "priority": false, "minimal_timeout": null}, "start_date": null, "end_date": null, "day_of_week": [true, true, true, true, true, true, true], "start_time": null, "end_time": null, "timezone_minutes": 180, "custom_fields": [], "container_id": null, "child_forms": [], "salt": null, "control_group": null, "variants": [{"is_winner": false, "ab_test_variant_internal_id": null, "view_settings": {"button_template": null, "rendered_preview": null, "rendered_button_preview": null, "settings": {"text": "Add your phone number and receive a gift from us", "title": "Get 20 Plus Points for free", "pad_top": "73", "success": "Thank you!", "but_text": "BUTTON TEXT", "pad_left": "50", "btn_width": "239", "form_font": "Roboto, sans-serif", "inp_color": "#8f9399", "inp_width": "238", "pad_right": "50", "btn_height": "50", "but_color1": "#7270FF", "but_color2": "#FFFFFF", "but_color3": "#ffffff", "but_color4": "#7270FF", "close_show": "0", "form_width": "752", "inp_height": "51", "pad_bottom": "50", "show_title": "1", "text_size2": "24", "custom_font": "Arial, sans-serif", "fields_list": [{"name": "Phone", "type": "phone", "params": {}, "required": true, "placeholder": "Phone number", "machine_name": "phone"}, {"name": "Email", "type": "email", "params": {}, "required": true, "placeholder": "Email", "machine_name": "email"}, {"name": "Button", "type": "submit", "params": {"submit1_text": "Subscribe!", "submits_count": 1}, "machine_name": "button"}, {"name": "\u0421\u043e\u0433\u043b\u0430\u0441\u0438\u0435", "type": "checkbox", "label": "I am happy to receive occasional promotions", "params": {"checked": true, "link_href": "https://instantfunding.io/privacy-policy/", "link_text": "", "show_link": true, "text_after_link": ""}, "required": true, "machine_name": "agreement"}], "form_bg_img": "https://pw.maestra-static.io/user-media/35916/a8aad4eeb5921ef4a203d2db48ff59c1b79b822a4ab468abb932d1fe58d22e6a.png", "form_height": "485", "inp_bgcolor": "#ffffff", "instruction": "We're already writing you an email", "pad_top_mob": "35", "text_color1": "#7270FF", "text_color2": "#ffffff", "text_color3": "#ffffff", "btn_fontsize": "16", "inp_fontsize": "16", "pad_left_mob": "12", "show_form_bg": "0", "use_100width": "0", "btn_width_mob": "280", "conf_fontsize": "14", "form_bg_color": "#EDBB4C", "inp_width_mob": "280", "inputs_border": "#ffffff", "pad_right_mob": "12", "btn_height_mob": "46", "close_size_mob": "20", "form_width_mob": "315", "inp_height_mob": "40", "pad_bottom_mob": "30", "show_sub_title": "1", "text_size_mob1": "30", "text_size_mob2": "15", "title_fontsize": "50", "close_color_mob": "#fff", "close_size_desk": "20", "form_height_mob": "460", "use_custom_font": "0", "btn_fontsize_mob": "16", "close_color_desk": "#fff", "inp_border_color": "#d9d9d9", "inp_fontsize_mob": "16", "btn_border_radius": 8, "close_bg_show_mob": "0", "conf_fontsize_mob": "14", "inp_border_radius": 8, "placeholder_color": "#8f9399", "show_thanks_title": "1", "close_bg_color_mob": "#000000", "close_bg_show_desk": "0", "close_bg_color_desk": "#000000", "inputs_border_width": 0, "inputs_border_radius": 8, "close_bg_transparency": "0.5", "show_thanks_sub_title": "1"}, "button_settings": {}, "behavior_settings": {"lead": {"phoneSettings": {"mode": "local-first", "countryCode": "+1"}, "autocompleteEnabled": true}, "embedded": {"animation_out": "fadeOut"}}, "html": "", "css": "<% try {\r\n font_custom_show = font_custom_show;\r\n } catch (e) { font_custom_show = 0 }\r\n%>\r\n<% if(!parseInt(font_custom_show)) { %>\r\n @import url('https://fonts.googleapis.com/css2?family=Roboto:wght@400;700&display=swap');\r\n<% } %>\r\n@font-face {\r\n font-family: 'Rotonto';\r\n src: url('https://instantfunding.io/wp-content/uploads/2023/11/Rotonto-Semibold.ttf') format('truetype');\r\n font-weight: 600;\r\n font-style: normal;\r\n}\r\n<% try {\r\n close_show = close_show;\r\n close_size_desk = close_size_desk;\r\n close_size_mob = close_size_mob;\r\n close_color_desk = close_color_desk;\r\n close_color_mob = close_color_mob;\r\n close_bg_show_desk = close_bg_show_desk;\r\n close_bg_color_desk = close_bg_color_desk;\r\n close_bg_show_mob = close_bg_show_mob;\r\n close_bg_color_mob = close_bg_color_mob;\r\n close_bg_transparency = close_bg_transparency;\r\n } catch (e) { \r\n close_show = 0\r\n close_size_desk = 20\r\n close_size_mob = 20\r\n close_color_desk = '#000000'\r\n close_color_mob = '#000000'\r\n close_bg_show_desk = 0\r\n close_bg_color_desk = '#000000'\r\n close_bg_show_mob = 0\r\n close_bg_color_mob = '#000000'\r\n close_bg_transparency = 0.5\r\n }\r\n%>\r\n\r\n.popmechanic-reset,\r\n.popmechanic-reset * {\r\n line-height: normal;\r\n <% if (parseInt(use_custom_font)) { %> \r\n font-family: <%=custom_font%>; \r\n<% } else { %> \r\n font-family: <%=form_font%>;\r\n <% } %>\r\n box-sizing: border-box;\r\n}\r\n\r\n#popmechanic-form {\r\n position: relative;\r\n <% if (parseInt(use_100width)) { %> \r\n width:100%;\r\n<% } else { %> \r\n width: <%=form_width%>px;\r\n <% } %>\r\n height: <%=form_height%>px;\r\n<% if (parseInt(use_custom_font)) { %> \r\n font-family: <%=custom_font%>; \r\n<% } else { %> \r\n font-family: <%=form_font%>;\r\n <% } %>\r\n border-radius: 0px;\r\n padding: <%=pad_top%>px <%=pad_right%>px <%=pad_bottom%>px <%=pad_left%>px;\r\nbackground: linear-gradient(to bottom, #121212, #2D2B58);\r\n <% if(parseInt(show_form_bg)) { %>\r\n background: linear-gradient(to bottom, #121212, #2D2B58), url(<%=form_bg_img%>) center center no-repeat;\r\n background-size: cover;\r\n <% } %>\r\n\r\n\r\n}\r\n\r\n\r\n\r\n#popmechanic-form .popmechanic-main {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: nowrap;\r\n justify-content: space-between;\r\n align-content: stretch;\r\n align-items: flex-start;\r\n}\r\n\r\n#popmechanic-form .popmechanic-content {\r\n flex: 0 1 350px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-title {\r\n color: <%=text_color1%>;\r\n font-size: <%=title_fontsize%>px;\r\n line-height: 1;\r\n font-weight: 600;\r\n font-family: 'Rotonto', sans-serif !important;\r\n}\r\n\r\n#popmechanic-form .popmechanic-text {\r\n margin: 16px 0 0;\r\n color: <%=text_color2%>;\r\n font-size: <%=text_size2%>px;\r\n line-height: 1.25;\r\n font-weight: 400;\r\n}\r\n\r\n#popmechanic-form .popmechanic-inputs {\r\n flex: 0 1 280px;\r\n padding: 33px 20px;\r\n border: <%=inputs_border_width%>px solid <%=inputs_border%>;\r\n border-radius: <%=inputs_border_radius%>px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-input {\r\n width: <%=inp_width%>px;\r\n height: <%=inp_height%>px;\r\n padding: 0 16px;\r\n margin: 0 0 16px;\r\n background: <%=inp_bgcolor%>;\r\n border: 1px solid <%=inp_border_color%>;\r\n border-radius: <%=inp_border_radius%>px;\r\n outline: none;\r\n font-size: <%=inp_fontsize%>px;\r\n font-weight: 400;\r\n color: <%=inp_color%>;\r\n}\r\n#popmechanic-form .popmechanic-input::placeholder {\r\n color: <%=placeholder_color%>;\r\n opacity: 1;\r\n transition: all 0.3s;\r\n}\r\n#popmechanic-form .popmechanic-input:focus::placeholder {\r\n opacity: 0;\r\n}\r\n#popmechanic-form .popmechanic-input.popmechanic-invalid {\r\n border: 1px solid #f36451;\r\n}\r\n#popmechanic-form .popmechanic-input.popmechanic-invalid::placeholder {\r\n color: #f36451;\r\n}\r\n\r\n#popmechanic-form .popmechanic-submit {\r\n width: <%=btn_width%>px;\r\n height: <%=btn_height%>px;\r\n \r\n background: <%=but_color1%>;\r\n color: <%=but_color3%>; \r\n border: none;\r\n padding: 0;\r\n border-radius: <%=btn_border_radius%>px;\r\n outline: none;\r\n cursor: pointer;\r\n font-size: <%=btn_fontsize%>px;\r\n line-height: normal;\r\n font-weight: 700;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.3s;\r\n margin: 0 0 22px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-submit:hover {\r\n color: <%=but_color4%>;\r\n background: <%=but_color2%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-buttons {\r\n\tdisplay: flex;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit {\r\n width: <%=btn_width / 2 - 5%>px;\r\n}\r\n#popmechanic-form .popmechanic-buttons .popmechanic-submit:not(:last-child) {\r\n margin-right: 10px;\r\n}\r\n\r\n#popmechanic-form .popmechanic-checkbox-block {\r\n position: relative;\r\n display: block;\r\n font-size: <%=conf_fontsize%>px;\r\n line-height: 18px;\r\n color: <%=text_color3%>;\r\n padding: 0 0 0 30px;\r\n -webkit-user-select: none;\r\n -moz-user-select: none;\r\n -ms-user-select: none;\r\n user-select: none;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-block a {\r\n color: inherit;\r\n text-decoration: underline;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-block:before {\r\n content: \"\";\r\n position: absolute;\r\n top: 0;\r\n left: -1px;\r\n width: 18px;\r\n height: 18px;\r\n border: 1px solid <%=inp_border_color%>;\r\n border-radius: 4px;\r\n background: <%=inp_bgcolor%>;\r\n}\r\n\r\n#popmechanic-form .popmechanic-checkbox-check {\r\n position: absolute;\r\n top: -0;\r\n left: -1px;\r\n z-index: 2;\r\n width: 18px;\r\n height: 18px;\r\n opacity: 0;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n transition: all 0.3s;\r\n}\r\n#popmechanic-form .popmechanic-checkbox-check svg {\r\n fill: <%=but_color1%>;\r\n width: 10px;\r\n}\r\n#popmechanic-form .popmechanic-checkbox {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 3;\r\n width: 20px;\r\n height: 20px;\r\n opacity: 0;\r\n}\r\n#popmechanic-form .popmechanic-checkbox:checked ~ .popmechanic-checkbox-check {\r\n opacity: 1;\r\n}\r\n\r\n#popmechanic-form .popmechanic-thankyou {\r\n text-align: center;\r\n height: 100%;\r\n flex-direction: column;\r\n align-items: center;\r\n justify-content: center;\r\n}\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-title {\r\n font-size: <%=title_fontsize%>px;\r\n line-height: 31px;\r\n font-weight: 700;\r\n}\r\n#popmechanic-form .popmechanic-thankyou .popmechanic-text {\r\n margin: 30px 0 0;\r\n font-size: <%=text_size2%>px;\r\n line-height: 28px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form {\r\n width: <%=form_width_mob%>px;\r\n height: <%=form_height_mob%>px;\r\n padding: <%=pad_top_mob%>px <%=pad_right_mob%>px <%=pad_bottom_mob%>px <%=pad_left_mob%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main { \r\n flex-wrap: wrap;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-title {\r\n font-size: <%=text_size_mob1%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-text {\r\n margin: 14px 0 0;\r\n font-size: <%=text_size_mob2%>px;\r\n line-height: 18px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-inputs {\r\n border: none;\r\n padding: 0;\r\n margin: 20px 0 0;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-input {\r\n width: <%=inp_width_mob%>px;\r\n height: <%=inp_height_mob%>px;\r\n font-size: <%=inp_fontsize_mob%>px;\r\n margin: 0 0 12px;\r\n}\r\n\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-buttons {\r\n\tdisplay: block;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-submit:not(:last-child) {\r\n margin-right: 0;\r\n margin-bottom: 12px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-submit {\r\n width: <%=btn_width_mob%>px;\r\n height: <%=btn_height_mob%>px;\r\n font-size: <%=btn_fontsize_mob%>px;\r\n}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-thankyou .popmechanic-text {\r\n margin: 10px 0 0;\r\n}\r\n.popmechanic-mobile #popmechanic-form .popmechanic-checkbox-block {\r\n font-size: <%=conf_fontsize_mob%>px;\r\n}\r\n\r\n.popmechanic-thankyou {\r\n display: none;\r\n}\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-main {\r\n display: none;\r\n}\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-thankyou {\r\n display: flex;\r\n}\r\n\r\n<% if(parseInt(close_show)) { %>\r\n /* CLOSE */\r\n <%\r\n function hexToRgb(hex) {\r\n return hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b) {\r\n return \"#\".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);\r\n }).substring(1).match(/.{2}/g).map(function (x) {\r\n return parseInt(x, 16);\r\n });\r\n };\r\n %>\r\n\r\n #popmechanic-form .popmechanic-close {\r\n position: absolute;\r\n z-index: 40;\r\n cursor: pointer;\r\n }\r\n #popmechanic-form .popmechanic-close::before,\r\n #popmechanic-form .popmechanic-close::after {\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n width: 80%;\r\n height: 2px;\r\n transform: translate(-50%, -50%) rotate(45deg);\r\n }\r\n #popmechanic-form .popmechanic-close::after {\r\n transform: translate(-50%, -50%) rotate(135deg);\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close {\r\n top: 10px;\r\n right: 10px;\r\n width: <%= close_size_desk %>px;\r\n height: <%= close_size_desk %>px;\r\n <% if(parseInt(close_bg_show_desk)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_desk) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_desk %>;\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close {\r\n top: 5px;\r\n right: 5px;\r\n width: <%= close_size_mob %>px;\r\n height: <%= close_size_mob %>px;\r\n <% if(parseInt(close_bg_show_mob)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_mob) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::after,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_mob %>;\r\n }\r\n<% } %>", "button_html": "", "button_css": ""}, "modulus_lower_inclusive": null, "modulus_upper_exclusive": null}], "is_transactional": false}, {"id": 51815, "template": 1097, "button_template": null, "test_group": null, "new_targeting": null, "settings_splits": [{"conditions_splits": []}], "pinned": false, "name": "IF newsletter subscription", "active": true, "embed_selector": false, "selector": "", "placement": "start", "frequency": {"once_lifetime": false, "once_session": false, "priority": false, "minimal_timeout": null}, "start_date": null, "end_date": null, "day_of_week": [true, true, true, true, true, true, true], "start_time": null, "end_time": null, "timezone_minutes": 180, "custom_fields": [], "container_id": null, "child_forms": [], "salt": null, "control_group": null, "variants": [{"is_winner": false, "ab_test_variant_internal_id": null, "view_settings": {"button_template": null, "rendered_preview": "https://pw.maestra-static.io/user-media/screenshots/form-variant-101691.png?ts=1740405503727&id=319891bd-2f8e-4e24-a0f0-322b935472c7", "rendered_button_preview": null, "settings": {"font": "'Roboto', sans-serif", "text": "Subscribe to the mailing!", "title": "Would you like to keep up to date with new promotions available in your city?", "text_ty": "No further action needed\u2014just wait for your first email from us", "own_font": "Onest", "title_ty": "You're Subscribed!", "promo_img": "https://pw.maestra-static.io/user-media/35916/8127bf1e22f21ae6c0abb5427278e695ecd77cca83a1f1266a1dd9f0bfc83afc.png", "close_show": "0", "min_height": "220", "text_color": "#ffffff", "from_bg_img": "https://images.unsplash.com/photo-1552154357-aaba12e68e64?ixlib=rb-1.2.1&q=80&fm=jpg&crop=entropy&cs=tinysrgb&w=1080&fit=max&ixid=eyJhcHBfaWQiOjI4NjQ4fQ", "input_width": "50", "policy_link": "https://instantfunding.io/wp-content/uploads/2025/02/IF-PRO-General-Terms-and-Conditions.pdf", "text_bottom": "20", "text_enable": "1", "title_color": " #7270FF", "button_width": "25", "input_height": "50", "input_radius": 8, "policy_check": "1", "title_bottom": "19", "title_enable": "1", "use_own_font": "0", "form_bg_color": "#151515", "input_padding": "3", "policy_enable": "1", "promo_img_top": 31, "text_bottom_m": "10", "close_size_mob": "20", "form_max_width": 1150, "input_bg_color": "#ffffff", "input_height_m": "50", "promo_img_left": 67, "text_font_size": 16, "text_ty_enable": "1", "title_bottom_m": "10", "button_bg_color": " #7270FF", "close_color_mob": "#000", "close_size_desk": "20", "input_font_size": 16, "policy_text_end": "", "promo_img_top_m": 28, "promo_img_width": 133, "title_font_size": 20, "title_ty_enable": "1", "button_font_size": 16, "close_color_desk": "#000", "form_padding_top": "25", "input_text_color": "#000000", "policy_text_link": "with Terms and Conditions", "promo_img_enable": "1", "promo_img_left_m": "75", "text_font_size_m": 16, "text_line_height": 0.5, "button_text_color": "#ffffff", "close_bg_show_mob": "0", "form_padding_left": "25", "input_font_size_m": 16, "promo_img_width_m": 86, "title_font_size_m": 20, "title_line_height": 1.2, "button_font_size_m": 16, "checkbox_font_size": "14", "close_bg_color_mob": "#000000", "close_bg_show_desk": "0", "form_bg_img_enable": "0", "form_padding_right": "25", "form_padding_top_m": "20", "inputs_max_width_m": "275", "policy_text__start": "I want to subscribe to the newsletter and agree with", "text_line_height_m": "1.2000000000000002", "checkbox_text_color": "#ffffff", "close_bg_color_desk": "#000000", "form_padding_bottom": "25", "form_padding_left_m": "15", "title_line_height_m": "1.2000000000000002", "checkbox_check_color": " #7270FF", "checkbox_font_size_m": "14", "checkbox_line_height": "1.4000000000000001", "form_padding_right_m": "15", "button_bg_color_hover": "#ffffff", "checkbox_border_color": "#ffffff", "close_bg_transparency": "0.5", "form_padding_bottom_m": "20", "checkbox_line_height_m": "1.4000000000000001", "button_text_color_hover": " #7270FF", "input_placeholder_color": "#CDCDCB"}, "button_settings": {}, "behavior_settings": {"embedded": {"animation_out": "fadeOut"}}, "html": "<% try { close_show = close_show; } catch (e) { close_show = 0 } %>\r\n\r\n
\r\n \r\n\r\n\r\n\t
\r\n\t\t<%if(parseInt(promo_img_enable)){%>\"><%}%>\r\n\t\t
\r\n\t\t\t<%if(parseInt(title_enable)){%>
<%=title%>
<%}%>\r\n\t\t\t<%if(parseInt(text_enable)){%>
<%=text%>
<%}%>\r\n\t\t\t
\r\n\t\t\t\t\r\n\t\t\t\t\r\n\t\t\t\t<%if(parseInt(policy_enable)){%>\r\n\t\t\t\t\r\n\t\t\t\t<%}%>\r\n\t\t\t
\r\n\t\t
\r\n\t
\t\r\n\t\r\n\t
\r\n\t\t<%if(parseInt(promo_img_enable)){%>\"><%}%>\r\n\t\t
\r\n\t\t\t<%if(parseInt(title_ty_enable)){%>
<%=title_ty%>
<%}%>\r\n\t\t\t<%if(parseInt(text_ty_enable)){%>
<%=text_ty%>
<%}%>\r\n\t\t
\r\n\t
\t\r\n <% if(parseInt(close_show)) { %>\r\n \r\n
\r\n <% } %>\r\n
", "css": "<% try {\r\n close_show = close_show;\r\n close_size_desk = close_size_desk;\r\n close_size_mob = close_size_mob;\r\n close_color_desk = close_color_desk;\r\n close_color_mob = close_color_mob;\r\n close_bg_show_desk = close_bg_show_desk;\r\n close_bg_color_desk = close_bg_color_desk;\r\n close_bg_show_mob = close_bg_show_mob;\r\n close_bg_color_mob = close_bg_color_mob;\r\n close_bg_transparency = close_bg_transparency;\r\n } catch (e) { \r\n close_show = 0\r\n close_size_desk = 20\r\n close_size_mob = 20\r\n close_color_desk = '#000000'\r\n close_color_mob = '#000000'\r\n close_bg_show_desk = 0\r\n close_bg_color_desk = '#000000'\r\n close_bg_show_mob = 0\r\n close_bg_color_mob = '#000000'\r\n close_bg_transparency = 0.5\r\n }\r\n%>\r\n\r\n.PositionContainer___yH1Z7{\r\n\ttransform:none !important;\r\n\tposition:static;\t\r\n}\r\n\r\n@import url(\"https://fonts.googleapis.com/css?family=Roboto:300,400,700,900&display=swap&subset=cyrillic\");\r\n@import url(\"https://fonts.googleapis.com/css?family=Merriweather:400,700|Open+Sans:100,200,300,400,700,900&subset=cyrillic\");\r\n\r\n.popmechanic-reset,\r\n.popmechanic-reset * {\r\n line-height: inherit;\r\n box-sizing: border-box; }\r\n\r\n#popmechanic-form {\r\n position: relative;\r\n display: block;\r\n vertical-align: top;\r\n margin: 0;\r\n padding: 0; }\r\n #popmechanic-form .popmechanic-main,#popmechanic-form .popmechanic-thankyou {\r\n width: 100%;min-height:<%=min_height%>px;\r\n background-color: <%=form_bg_color%>;\r\n <%if(parseInt(form_bg_img_enable)){%>background-image:url(\"<%=from_bg_img%>\");<%}%>\t\r\n background-size: cover;\r\n background-position: 50% 50%;\r\n padding: <%=form_padding_top%>px <%=form_padding_right%>px <%=form_padding_bottom%>px <%=form_padding_left%>px;\r\n position: relative;\r\n overflow: hidden; \r\n\tflex-direction:row;flex-wrap:nowrap;justify-content:flex-start;align-content:stretch;align-items:center;\r\n\t}\r\n #popmechanic-form .popmechanic-promo_img {\r\n position: absolute;\r\n top: <%=promo_img_top%>%;\r\n left: <%=promo_img_left%>%;\r\n width: <%=promo_img_width%>px;\r\n height: auto; }\r\n #popmechanic-form .popmechanic-content {\r\n margin: 0 auto;\r\n\twidth:100%;\r\n max-width: <%=form_max_width%>px;\r\n position: relative; }\r\n #popmechanic-form .popmechanic-title {\r\n <%if(parseInt(use_own_font)){%>font-family:<%=own_font%>;<%}else{%>font-family:<%=font%>;<%}%>\t\r\n font-size: <%=title_font_size%>px;\r\n line-height: <%=title_line_height%>;\r\n font-weight: 700;\r\n color: <%=title_color%>;\r\n margin-bottom: <%=title_bottom%>px; }\r\n #popmechanic-form .popmechanic-text {\r\n <%if(parseInt(use_own_font)){%>font-family:<%=own_font%>;<%}else{%>font-family:<%=font%>;<%}%>\r\n font-size: <%=text_font_size%>px;\r\n line-height: <%=text_line_height%>;\r\n font-weight: 300;\r\n color:<%=text_color%>;\r\n margin-bottom: <%=text_bottom%>px; }\r\n #popmechanic-form .popmechanic-inputs {\r\n display: flex;\r\n flex-direction: row;\r\n flex-wrap: wrap;\r\n justify-content: flex-start;\r\n align-content: stretch;\r\n width:100%; }\r\n #popmechanic-form .popmechanic-field {\r\n border: none;\r\n outline: none;\r\n border-radius:<%=input_radius%>px;\r\n height: <%=input_height%>px;\r\n padding: 0 <%=input_padding%>%;\r\n font-style: normal;\r\n margin: 0 0 10px; }\r\n #popmechanic-form .popmechanic-input {\r\n flex: 0 1 calc(<%=input_width%>% - 15px);\r\n <%if(parseInt(use_own_font)){%>font-family:<%=own_font%>;<%}else{%>font-family:<%=font%>;<%}%>\r\n font-size: <%=input_font_size%>px;\r\n line-height: 1;\r\n font-weight: 400;\r\n color: <%=input_text_color%>;\r\n margin-right: 15px;\r\n\tbackground-color:<%=input_bg_color%>;}\r\n #popmechanic-form .popmechanic-input::placeholder {\r\n opacity: 1;\r\n color: <%=input_placeholder_color%>;\r\n transition: all .3s; }\r\n #popmechanic-form .popmechanic-input:focus::placeholder {\r\n opacity: 0; }\r\n #popmechanic-form .popmechanic-submit {\r\n cursor: pointer;\r\n flex: 0 1 <%=button_width%>%;\r\n <%if(parseInt(use_own_font)){%>font-family:<%=own_font%>;<%}else{%>font-family:<%=font%>;<%}%>\r\n font-size: <%=button_font_size%>px;\r\n line-height: 1;\r\n font-weight: 400;\r\n color: <%=button_text_color%>;\r\n background-color: <%=button_bg_color%>;\r\n\ttransition:all .3s;}\r\n\t#popmechanic-form .popmechanic-submit:hover{\r\n\t\tbackground-color: <%=button_bg_color_hover%>;\r\n\t\tcolor: <%=button_text_color_hover%>;\r\n\t}\r\n #popmechanic-form .popmechanic-checkbox-block {\r\n position: relative;\r\n flex: 0 1 100%;\r\n <%if(parseInt(use_own_font)){%>font-family:<%=own_font%>;<%}else{%>font-family:<%=font%>;<%}%>\r\n font-weight: 400;\r\n font-size: <%=checkbox_font_size%>px;\r\n line-height: <%=checkbox_line_height%>;\r\n text-align: left;\r\n color: <%=checkbox_text_color%>;\r\n padding: 4px 0 0 32px;\r\n margin: 10px 0 0; }\r\n #popmechanic-form .popmechanic-checkbox-block .popmechanic-policy_link {\r\n color: <%=checkbox_text_color%>;\r\n text-decoration: underline; }\r\n #popmechanic-form .popmechanic-checkbox-block:before {\r\n content: '';\r\n position: absolute;\r\n top: calc(50% - 10px);\r\n left: 0;\r\n width: 20px;\r\n height: 20px;\r\n border: 1px solid <%=checkbox_border_color%>;\r\n box-sizing: border-box; }\r\n #popmechanic-form .popmechanic-checkbox-check {\r\n position: absolute;\r\n top: calc(50% - 10px);\r\n left: 3px;\r\n z-index: 2;\r\n width: 14px;\r\n height: 24px;\r\n opacity: 0;\r\n transition: all .3s; }\r\n #popmechanic-form .popmechanic-checkbox {\r\n position: absolute;\r\n top: 0;\r\n left: 0;\r\n z-index: 3;\r\n width: 20px;\r\n height: 20px;\r\n opacity: 0; }\r\n #popmechanic-form .popmechanic-checkbox:checked ~ .popmechanic-checkbox-check {\r\n opacity: 1; }\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-main {\r\n max-width: 350px;\r\n padding: <%=form_padding_top_m%>px <%=form_padding_right_m%>px <%=form_padding_bottom_m%>px <%=form_padding_left_m%>px;\r\n background-size: auto 60px;\r\n background-position: 96% 16%; }\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-promo_img {\r\n top: <%=promo_img_top_m%>%;\r\n left: <%=promo_img_left_m%>%;\r\n width: <%=promo_img_width_m%>px;}\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-title {\r\n font-size: <%=title_font_size_m%>px;\r\n line-height: <%=title_line_height_m%>;\r\n margin-bottom: <%=title_bottom_m%>px; }\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-text {\r\n font-size: <%=text_font_size_m%>px;\r\n line-height: <%=text_line_height_m%>;\r\n margin-bottom: <%=text_bottom_m%>px;\r\n }\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-inputs {\r\n margin: 0 auto;\r\n max-width: <%=inputs_max_width_m%>px; }\r\n\r\n.popmechanic-mobile #popmechanic-form .popmechanic-field {\r\n flex: 0 1 100%;\r\n width: 100%;\r\n margin: 0 0 10px;\r\n height:<%=input_height_m%>px;\r\n box-sizing: border-box; }\r\n .popmechanic-mobile #popmechanic-form .popmechanic-input{\r\n\t font-size:<%=input_font_size_m%>px;\r\n }\r\n .popmechanic-mobile #popmechanic-form .popmechanic-submit{\r\n\t font-size:<%=button_font_size_m%>px;\r\n }\r\n.popmechanic-mobile #popmechanic-form .popmechanic-checkbox-block {\r\n font-size:<%=checkbox_font_size_m%>px;\r\n line-height:<%=checkbox_line_height_m%>;\r\n padding: 0 0 0 32px; }\r\n\r\n.popmechanic-thankyou {\r\n display: none; }\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-main {\r\n display: none; }\r\n\r\n.popmechanic-success #popmechanic-form .popmechanic-thankyou {\r\n display: flex; }\r\n\r\n\r\n<% if(parseInt(close_show)) { %>\r\n /* CLOSE */\r\n <%\r\n function hexToRgb(hex) {\r\n return hex.replace(/^#?([a-f\\d])([a-f\\d])([a-f\\d])$/i, function (m, r, g, b) {\r\n return \"#\".concat(r).concat(r).concat(g).concat(g).concat(b).concat(b);\r\n }).substring(1).match(/.{2}/g).map(function (x) {\r\n return parseInt(x, 16);\r\n });\r\n };\r\n %>\r\n\r\n #popmechanic-form .popmechanic-close {\r\n position: absolute;\r\n z-index: 40;\r\n cursor: pointer;\r\n }\r\n #popmechanic-form .popmechanic-close::before,\r\n #popmechanic-form .popmechanic-close::after {\r\n content: \"\";\r\n position: absolute;\r\n top: 50%;\r\n left: 50%;\r\n width: 80%;\r\n height: 2px;\r\n transform: translate(-50%, -50%) rotate(45deg);\r\n }\r\n #popmechanic-form .popmechanic-close::after {\r\n transform: translate(-50%, -50%) rotate(135deg);\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close {\r\n top: 10px;\r\n right: 10px;\r\n width: <%= close_size_desk %>px;\r\n height: <%= close_size_desk %>px;\r\n <% if(parseInt(close_bg_show_desk)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_desk) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-desktop #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_desk %>;\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close {\r\n top: 5px;\r\n right: 5px;\r\n width: <%= close_size_mob %>px;\r\n height: <%= close_size_mob %>px;\r\n <% if(parseInt(close_bg_show_mob)) { %>\r\n background-color: rgba(<%= hexToRgb(close_bg_color_mob) %>, <%= close_bg_transparency %>);\r\n <% } %>\r\n }\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-tablet #popmechanic-form .popmechanic-close::after,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::before,\r\n .popmechanic-mobile #popmechanic-form .popmechanic-close::after {\r\n background-color: <%= close_color_mob %>;\r\n }\r\n<% } %>\r\n\r\n@media (min-width: 1024px) {\r\n #popmechanic-form .popmechanic-main {\r\n width: 50%;\r\n max-width: 600px;\r\n margin: 0;\r\n }\r\n}\r\n\r\n@media (min-width: 1024px) {\r\n #popmechanic-form .popmechanic-thankyou {\r\n width: 50%;\r\n max-width: 600px;\r\n margin: 0;\r\n }\r\n}\r\n\r\n", "button_html": "", "button_css": ""}, "modulus_lower_inclusive": null, "modulus_upper_exclusive": null}], "is_transactional": false}, {"id": 51774, "template": 2520, "button_template": 172, "test_group": null, "new_targeting": {"filter": {"id": "root", "name": "root", "nodes": [{"id": "2", "name": "$and", "type": "current_page", "nodes": [{"id": "3", "field": "page", "value": ["https://instantfunding.com/test-affiliate-form/"], "operator": "$in"}], "operator": "$and"}], "operator": "$and"}}, "settings_splits": [{"conditions_splits": [{"conditions": {"only_forced": "ignore_targeting"}, "combinator": "and", "id": 174247}]}], "pinned": false, "name": "Loyalty Widget", "active": true, "embed_selector": false, "selector": "", "placement": "start", "frequency": {"once_lifetime": false, "once_session": false, "priority": false, "minimal_timeout": null}, "start_date": null, "end_date": null, "day_of_week": [true, true, true, true, true, true, true], "start_time": null, "end_time": null, "timezone_minutes": 180, "custom_fields": [], "container_id": null, "child_forms": [], "salt": null, "control_group": null, "variants": [{"is_winner": false, "ab_test_variant_internal_id": null, "view_settings": {"button_template": 172, "rendered_preview": "https://pw.maestra-static.io/user-media/screenshots/form-variant-101650.png?ts=1762335241196&id=3bcdfd21-a8c2-4a96-b876-3c8ac1585822", "rendered_button_preview": "https://pw.maestra-static.io/user-media/screenshots/form-variant-button-101650.png?ts=1762335246395&id=3bcdfd21-a8c2-4a96-b876-3c8ac1585822", "settings": {"header": "Plus Shop", "operations": "{\r\n \"REGISTRATION\": \"PrivateOffice.Registration\",\r\n \"AUTH_WITH_PASSWORD\": \"PrivateOffice.AuthorizationWithPassword\",\r\n \"CHECK_EMAIL_CODE\": \"PrivateOffice.CheckEmailAuthorizationCode\",\r\n \"EMAIL_CONFIRMATION_RESULTS\": \"PrivateOffice.GetEmailConfirmationResults\",\r\n \"SEND_EMAIL_AUTH_CODE\": \"PrivateOffice.SendEmailAuthorizationCode\",\r\n \"SEND_MOBILE_AUTH_CODE\": \"PrivateOffice.SendEmailAuthorizationCode\",\r\n \"SEND_MOBILE_CONFIRMATION_CODE\": \"PrivateOffice.SendMobilePhoneConfirmationCode\",\r\n \"GET_CUSTOMER_INFO\": \"PrivateOffice.GetCustomerInfo\"\r\n}", "header_icon": "https://pw.maestra-static.io/user-media/35916/b35fac707ee6dc3a286689117a1bc3be85d0e42f5697cb46d5bec7fee43eabb0.png", "info_header": "Earn more points for different actions!", "join_caption": "Join for free to get Plus Points with every purchase", "translations": "{\n \"ENTER_CODE\": \"Enter the email code\",\n \"SENT_TO_EMAIL\": \"We've just sent it to your email. If you haven't received it, please check your spam folder before contacting support\",\n \"CHANGE_EMAIL\": \"Change email\",\n \"SIGN_IN\": \"Log in\",\n \"SEND_AGAIN\": \"Send again\",\n \"SEND_AGAIN_IN\": \"Send again after ${timeLeft}s\",\n \"ENTER_YOUR_EMAIL\": \"Log in with your email\",\n \"EMAIL\": \"Email\",\n \"LOG_IN\": \"Log in\",\n \"REGISTER\": \"Sign up for free\",\n \"AGREEMENT\": \"I agree to receive marketing emails\",\n \"CONTINUE\": \"Continue\",\n \"ALREADY_REGISTERED_QUESTION\": \"Already a member?\",\n \"WAYS_TO_EARN\": \"Ways to earn\",\n \"WAYS_TO_REDEEM\": \"Ways to spend\",\n \"EARN_MORE_COINS\": \"Earn and spend Plus Points\",\n \"COPY\": \"Copy\",\n \"JOIN_NOW\": \"Join now\",\n \"BECOME_MEMBER\": \"Join Instant Funding Plus\",\n \"YOUR_CODE\": \"Your promo code\",\n \"COPY_CODE\": \"Copy code\",\n \"CODE_INFO\": \"Hooray! Your promo code is ready to use. We've emailed it so you won't lose it\",\n \"SELECT_YOUR_REWARD\": \"Select your reward\",\n \"DISCOUNT_TEXT\": \"${price} Plus Points for a ${amount} discount\",\n \"COPIED\": \"Copied\",\n \"GET_YOUR_CODE\": \"Get your code\",\n \"PROMOCODE_ISSUE_INPUT_PLACEHOLDER\": \"Up to ${balance} coins\",\n \"REDEEM\": \"Redeem\"\n}", "ways_to_earn": "[\n {\n \"icon\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjQiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNCAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPGcgY2xpcC1wYXRoPSJ1cmwoI2NsaXAwXzUwNV8yODkpIj4KPHBhdGggZD0iTTcuNzA2OTQgMTEuMzE2NUwxMS42MzE3IDcuMzkxNzdDMTEuNzE4NSA3LjMwNDk4IDExLjcxODUgNy4xNjQyNyAxMS42MzE3IDcuMDc3NDhMOS41MDg3OSA0Ljk1NDU5QzkuMzc5MTkgNC44MjQ5OSA5LjQ1MzM1IDQuNjAzMDQgOS42MzQ4NCA0LjU3NzM5TDIwLjczODggMy4wMDgwNEMyMC44ODUyIDIuOTg3MzUgMjEuMDEwNiAzLjExMjc3IDIwLjk4OTk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C42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$40\",\n \"pool\": \"PrivateOffice.Redeem40\",\n \"callOperation\": \"PrivateOffice.Notify40\",\n \"price\": 40,\n \"text\": \"$40 off accounts worth $79 or more\"\n },\n {\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4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IyNzIgMTIuMjY1NCAxMC4xOTQ5IDEyLjIzMzIgMTAuMTU1MiAxMi4yMzMySDguNzg3OUM4Ljc0ODE2IDEyLjIzMzIgOC43MTU5NCAxMi4yNjU0IDguNzE1OTQgMTIuMzA1MVYxNC4yNDgxQzguNzE1OTQgMTQuMjg3OCA4LjY4MzcyIDE0LjMyMDEgOC42NDM5OCAxNC4zMjAxSDYuNzAwOTlDNi42NjEyNSAxNC4zMjAxIDYuNjI5MDMgMTQuMzUyMyA2LjYyOTAzIDE0LjM5MlYxNS43NTkzQzYuNjI5MDMgMTUuNzk5MSA2LjY2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$60\",\n \"pool\": \"PrivateOffice.Redeem60\",\n \"callOperation\": \"PrivateOffice.Notify60\",\n \"price\": 60,\n \"text\": \"$60 off accounts worth $120 or more\"\n },\n {\n \"image\": \"data:image/svg+xml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zE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$80\",\n \"pool\": \"PrivateOffice.Redeem80\",\n \"callOperation\": \"PrivateOffice.Notify80\",\n \"price\": 80,\n \"text\": \"$80 off accounts worth $189 or more\"\n },\n {\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTEgOS44MzA0OVYxMC4wMDIzTDE2LjI3NjMgMTEuNTEzNVY5LjgzMDQ5QzE2LjI3NjMgOS43OTA3NSAxNi4zMDg2IDkuNzU4NTMgMTYuMzQ4MyA5Ljc1ODUzSDE4LjI5MTNDMTguMzMxIDkuNzU4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Y2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$100\",\n \"pool\": \"PrivateOffice.Redeem100\",\n \"callOperation\": \"PrivateOffice.Notify100\",\n \"price\": 100,\n \"text\": \"$100 off accounts worth $189 or more\"\n },\n {\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MD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DE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$140\",\n \"pool\": \"PrivateOffice.Redeem140\",\n \"callOperation\": \"PrivateOffice.Notify140\",\n \"price\": 140,\n \"text\": \"$140 off accounts worth $310 or more\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTEgOS44MzA0OVYxMC4wMDIzTDE2LjI3NjMgMTEuNTEzNVY5LjgzMDQ5QzE2LjI3NjMgOS43OTA3NSAxNi4zMDg2IDkuNzU4NTMgMT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AzIDE0LjM5MlYxNS43NTkzQzYuNjI5MDMgMTUuNzk5MSA2LjY2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$180\",\n \"pool\": \"PrivateOffice.Redeem180\",\n \"callOperation\": \"PrivateOffice.Notify180\",\n \"price\": 180,\n \"text\": \"$180 off accounts worth $440 or more\"\n },\n\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0I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AuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$240\",\n \"pool\": \"PrivateOffice.Redeem240\",\n \"callOperation\": \"PrivateOffice.Notify240\",\n \"price\": 240,\n \"text\": \"$240 off accounts worth $489 or more\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTEgOS44MzA0OVYxMC4wMDIzTDE2LjI3NjMgMTEuNTEzNVY5LjgzM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Ni42NjEyNSAxNC4zMjAxIDYuNjI5MDMgMTQuMzUyMyA2LjYyOTAzIDE0LjM5MlYxNS43NTkzQzYuNjI5MDMgMTUuNzk5MSA2LjY2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$260\",\n \"pool\": \"PrivateOffice.Redeem260\",\n \"callOperation\": \"PrivateOffice.Notify260\",\n \"price\": 260,\n \"text\": \"$260 off accounts worth $549 or more\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMj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OSIvPgo8L3N2Zz4K\",\n \"amount\": \"$340\",\n \"pool\": \"PrivateOffice.Redeem340\",\n \"callOperation\": \"PrivateOffice.Notify340\",\n \"price\": 340,\n \"text\": \"$340 off accounts worth $870 or more\"\n },\n\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTEgOS44MzA0OVYxMC4wMDIzTDE2LjI3NjMgMTEuNTEzNVY5LjgzMDQ5QzE2LjI3NjMgOS43OTA3NSAxNi4zMDg2IDkuNzU4NTMgMTYuMzQ4MyA5Ljc1ODUzSDE4LjI5MTNDMTguMzMxIDkuNzU4NTMgMTguMzYzMyA5LjcyNjMxIDE4LjM2MzMgOS42ODY1NlY4LjMxOTI4QzE4LjM2MzMgOC4yNzk1MyAxOC4zMzEgOC4yNDczMSAxOC4yOTEzIDguMjQ3MzFIMTYuMzQ4M0MxNi4zMDg2IDguMjQ3MzEgMTYuMjc2MyA4LjIxNTEgMTYuMjc2MyA4LjE3NTM1VjYuMjMyMzZaIiBmaWxsPS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uMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$420\",\n \"pool\": \"PrivateOffice.Redeem420\",\n \"callOperation\": \"PrivateOffice.Notify420\",\n \"price\": 420,\n \"text\": \"$420 off accounts worth $870 or more\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTE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Y4MzcyIDE0LjMyMDEgOC42NDM5OCAxNC4zMjAxSDYuNzAwOTlDNi42NjEyNSAxNC4zMjAxIDYuNjI5MDMgMTQuMzUyMyA2LjYyOTAzIDE0LjM5MlYxNS43NTkzQzYuNjI5MDMgMTUuNzk5MSA2LjY2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$460\",\n \"pool\": \"PrivateOffice.Redeem460\",\n \"callOperation\": \"PrivateOffice.Notify460\",\n \"price\": 460,\n \"text\": \"$460 off accounts worth $977 or more\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjb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LjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$700\",\n \"pool\": \"PrivateOffice.Redeem700\",\n \"callOperation\": \"PrivateOffice.Notify700\",\n \"price\": 700,\n \"text\": \"$700 off accounts worth $2000+\"\n },\n\n {\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43MzI5IDkuNzU4NTMgMTQuNzY1MSA5Ljc5MDc1IDE0Ljc2NTEgOS44MzA0OVYxMC4wMDIzTDE2LjI3NjMgMTEuNTEzNVY5LjgzMDQ5QzE2LjI3NjMgOS43OTA3NSAxNi4zMDg2IDkuNzU4NTMgMTYuMzQ4MyA5Ljc1ODUzSDE4LjI5MTNDMTguMzMxIDkuNzU4NTMgMTguMzYzMyA5LjcyNjMxIDE4LjM2MzMgOS42ODY1NlY4LjMxOTI4QzE4LjM2MzMgOC4yNzk1MyAxOC4zMzEgOC4yNDczMSAxOC4yOTEzIDguMjQ3MzFIMTYuMzQ4M0MxNi4zMDg2IDguMjQ3MzEgMTYuMjc2MyA4Lj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c5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$800\",\n \"pool\": \"PrivateOffice.Redeem800\",\n \"callOperation\": \"PrivateOffice.Notify800\",\n \"price\": 800,\n \"text\": \"$800 off accounts worth $2200+\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xNi4yNzYzIDYuMjMyMzZDMTYuMjc2MyA2LjE5MjYyIDE2LjI0NDEgNi4xNjA0IDE2LjIwNDQgNi4xNjA0SDE0LjgzNzFDMTQuNzk3NCA2LjE2MDQgMTQuNzY1MSA2LjE5MjYyIDE0Ljc2NTEgNi4yMzIzNlY4LjE3NTM1QzE0Ljc2NTEgOC4yMTUxIDE0LjczMjkgOC4yNDczMSAxNC42OTMyIDguMjQ3MzFIMTMuMDEwMkwxNC41MjE0IDkuNzU4NTNIMTQuNjkzMkMxNC43Mz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QgMTIuMzA1MVYxNC4yNDgxQzguNzE1OTQgMTQuMjg3OCA4LjY4MzcyIDE0LjMyMDEgOC42NDM5OCAxNC4zMjAxSDYuNzAwOTlDNi42NjEyNSAxNC4zMjAxIDYuNjI5MDMgMTQuMzUyMyA2LjYyOTAzIDE0LjM5MlYxNS43NTkzQzYuNjI5MDMgMTUuNzk5MSA2LjY2MTI1IDE1LjgzMTMgNi43MDA5OSAxNS44MzEzSDguNjQzOThDOC42ODM3MiAxNS44MzEzIDguNzE1OTQgMTUuODYzNSA4LjcxNTk0IDE1LjkwMzJWMTcuODQ2MkM4LjcxNTk0IDE3Ljg4NiA4Ljc0ODE2IDE3LjkxODIgOC43ODc5IDE3LjkxODJIMTAuMTU1MkMxMC4xOTQ5IDE3LjkxODIgMTAuMjI3MiAxNy44ODYgMTAuMjI3MiAxNy44NDYyVjE1LjkwMzJDMTAuMjI3MiAxNS44NjM1IDEwLjI1OTQgMTUuODMxMyAxMC4yOTkxIDE1LjgzMTNIMTIuMjQyMUMxMi4yODE5IDE1LjgzMTMgMTIuMzE0MSAxNS43OTkxIDEyLjMxNDEgMTUuNzU5M1YxNC4zOTJDMTIuMzE0MSAxNC4zNTIzIDEyLjI4MTkgMTQuMzIwMSAxMi4yNDIxIDE0LjMyMDFIMTAuMjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$1200\",\n \"pool\": \"PrivateOffice.Redeem1200\",\n \"callOperation\": \"PrivateOffice.Notify1200\",\n \"price\": 1200,\n \"text\": \"$1200 off accounts worth $3460+\"\n },\n{\n \"image\": \"data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMjUiIGhlaWdodD0iMjQiIHZpZXdCb3g9IjAgMCAyNSAyNCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3Jn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Mjk5MUMxMC4yNTk0IDE0LjMyMDEgMTAuMjI3MiAxNC4yODc4IDEwLjIyNzIgMTQuMjQ4MVYxMi4zMDUxWiIgZmlsbD0iIzEzMjIzOSIvPgo8L3N2Zz4K\",\n \"amount\": \"$1600\",\n \"pool\": \"PrivateOffice.Redeem1600\",\n \"callOperation\": \"PrivateOffice.Notify1600\",\n \"price\": 1600,\n \"text\": \"$1600 off accounts worth $3460+\"\n }\n\n]\n\n\n", "probability_mode": "simple", "header_first_line": "", "header_second_line": "", "header_balance_name": "Your Plus Points:", "one_list_on_welcome": "0", "subscribe_by_default": "0", "flexible_loyalty_rewards_enabled": "0"}, "button_settings": {"col1": "#fff", "col2": "rgba(114, 112, 255, 1)", "col3": "#000000", "font": "Roboto", "line": "1.2", "crug1": 10, "crug2": 10, "fontw": "600", "icon1": "https://static.popmechanic.ru/media/profmax/img/gift.png", "width1": 60, "width2": 58, "height1": 58, "height2": 58, "otstup1": 0, "otstup2": 0, "fontsize1": 0, "fontsize2": "13", "img_size1": 30, "img_size2": 25, "button_text": "", "border_color": "#fff", "border_width": "4", "border_enable": "1"}, "behavior_settings": {"button": {"on": false, "positions": {"desktop": {"left": "20px", "bottom": "20px"}}, "conditions": "always", "show_before": true}, "partscreen": {"mobile": null, "tablet": null, "desktop": {"target": "window", "position": "bottom-left", "vertical_offset": 0, "element_position": "right", "horizontal_offset": 0, "element_vertical_offset": 0, "element_horizontal_offset": 0}, "animation_in": "fadeIn", "allow_overlay": false, "animation_out": "fadeOut", "paranja_color": "#000000", "paranja_opacity": 0.3}}, "html": "
\r\n
\r\n
\r\n
\r\n
\r\n \"/>\r\n <%=header_first_line%>\r\n <%=header_second_line%>\r\n
\r\n
\r\n Preview actual content on your site\r\n
\r\n
\r\n
\r\n