!function(){"use strict";var t={145:function(t,r,n){function e(t,r){(null==r||r>t.length)&&(r=t.length);for(var n=0,e=Array(r);n<r;n++)e[n]=t[n];return e}n.d(r,{A:function(){return e}})},369:function(t,r,n){function e(t){if(Array.isArray(t))return t}n.d(r,{A:function(){return e}})},848:function(t,r,n){function e(t,r,n,e,o,i,c){try{var a=t[i](c),u=a.value}catch(t){return void n(t)}a.done?r(u):Promise.resolve(u).then(e,o)}function o(t){return function(){var r=this,n=arguments;return new Promise(function(o,i){var c=t.apply(r,n);function a(t){e(c,o,i,a,u,"next",t)}function u(t){e(c,o,i,a,u,"throw",t)}a(void 0)})}}n.d(r,{A:function(){return o}})},986:function(t,r,n){function e(t,r){var n=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=n){var e,o,i,c,a=[],u=!0,s=!1;try{if(i=(n=n.call(t)).next,0===r){if(Object(n)!==n)return;u=!1}else for(;!(u=(e=i.call(n)).done)&&(a.push(e.value),a.length!==r);u=!0);}catch(t){s=!0,o=t}finally{try{if(!u&&null!=n.return&&(c=n.return(),Object(c)!==c))return}finally{if(s)throw o}}return a}}n.d(r,{A:function(){return e}})},562:function(t,r,n){function e(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(r,{A:function(){return e}})},453:function(t,r,n){n.d(r,{A:function(){return a}});var e=n(369),o=n(986),i=n(800),c=n(562);function a(t,r){return(0,e.A)(t)||(0,o.A)(t,r)||(0,i.A)(t,r)||(0,c.A)()}},800:function(t,r,n){n.d(r,{A:function(){return o}});var e=n(145);function o(t,r){if(t){if("string"==typeof t)return(0,e.A)(t,r);var n={}.toString.call(t).slice(8,-1);return"Object"===n&&t.constructor&&(n=t.constructor.name),"Map"===n||"Set"===n?Array.from(t):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,e.A)(t,r):void 0}}}},r={};function n(e){var o=r[e];if(void 0!==o)return o.exports;var i=r[e]={exports:{}};return t[e](i,i.exports,n),i.exports}n.d=function(t,r){for(var e in r)n.o(r,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:r[e]})},n.o=function(t,r){return Object.prototype.hasOwnProperty.call(t,r)};var e=n(848),o=n(453);function i(){var t,r,n="function"==typeof Symbol?Symbol:{},e=n.iterator||"@@iterator",o=n.toStringTag||"@@toStringTag";function a(n,e,o,i){var a=e&&e.prototype instanceof s?e:s,f=Object.create(a.prototype);return c(f,"_invoke",function(n,e,o){var i,c,a,s=0,f=o||[],l=!1,d={p:0,n:0,v:t,a:p,f:p.bind(t,4),d:function(r,n){return i=r,c=0,a=t,d.n=n,u}};function p(n,e){for(c=n,a=e,r=0;!l&&s&&!o&&r<f.length;r++){var o,i=f[r],p=d.p,y=i[2];n>3?(o=y===e)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=t):i[0]<=p&&((o=n<2&&p<i[1])?(c=0,d.v=e,d.n=i[1]):p<y&&(o=n<3||i[0]>e||e>y)&&(i[4]=n,i[5]=e,d.n=y,c=0))}if(o||n>1)return u;throw l=!0,e}return function(o,f,y){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,y),c=f,a=y;(r=c<2?t:a)||!l;){i||(c?c<3?(c>1&&(d.n=-1),p(c,a)):d.n=a:d.v=a);try{if(s=2,i){if(c||(o="next"),r=i[o]){if(!(r=r.call(i,a)))throw TypeError("iterator result is not an object");if(!r.done)return r;a=r.value,c<2&&(c=0)}else 1===c&&(r=i.return)&&r.call(i),c<2&&(a=TypeError("The iterator does not provide a '"+o+"' method"),c=1);i=t}else if((r=(l=d.n<0)?a:n.call(e,d))!==u)break}catch(r){i=t,c=1,a=r}finally{s=1}}return{value:r,done:l}}}(n,o,i),!0),f}var u={};function s(){}function f(){}function l(){}r=Object.getPrototypeOf;var d=[][e]?r(r([][e]())):(c(r={},e,function(){return this}),r),p=l.prototype=s.prototype=Object.create(d);function y(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,l):(t.__proto__=l,c(t,o,"GeneratorFunction")),t.prototype=Object.create(p),t}return f.prototype=l,c(p,"constructor",l),c(l,"constructor",f),f.displayName="GeneratorFunction",c(l,o,"GeneratorFunction"),c(p),c(p,o,"Generator"),c(p,e,function(){return this}),c(p,"toString",function(){return"[object Generator]"}),(i=function(){return{w:a,m:y}})()}function c(t,r,n,e){var o=Object.defineProperty;try{o({},"",{})}catch(t){o=0}c=function(t,r,n,e){function i(r,n){c(t,r,function(t){return this._invoke(r,n,t)})}r?o?o(t,r,{value:n,enumerable:!e,configurable:!e,writable:!e}):t[r]=n:(i("next",0),i("throw",1),i("return",2))},c(t,r,n,e)}document.addEventListener("DOMContentLoaded",function(){var t=hostinger_reach_subscription_block_data.translations;document.querySelectorAll(".hostinger-reach-block-subscription-form").forEach(function(r){var n=r.querySelector(".reach-subscription-message"),c=r.querySelector(".reach-subscription-message__icon"),a=r.querySelector(".reach-subscription-message__text"),u=r.querySelector(".hostinger-reach-block-form-fields");r.addEventListener("submit",function(s){s.preventDefault();var f=r.querySelector('button[type="submit"]'),l=new FormData(r),d={};l.forEach(function(t,r){if(r.includes(".")){var n=r.split("."),e=(0,o.A)(n,2),i=e[0],c=e[1];d[i]||(d[i]={}),d[i][c]=t}else d[r]=t}),f.disabled=!0,fetch(hostinger_reach_subscription_block_data.endpoint,{method:"POST",headers:{"Content-Type":"application/json","X-WP-Nonce":hostinger_reach_subscription_block_data.nonce},body:JSON.stringify(d)}).then(function(){var o=(0,e.A)(i().m(function e(o){var s;return i().w(function(e){for(;;)switch(e.n){case 0:if(n.style.display="flex",r.reset(),!o.ok){e.n=1;break}a.textContent=t.thanks,n.classList.add("is-success"),u.style.display="none",c.style.display="block",e.n=4;break;case 1:return e.n=2,o.json();case 2:if(!(s=e.v).errors){e.n=3;break}a.textContent=s.errors,n.style.display="block",n.classList.add("is-error"),f.disabled=!1,e.n=4;break;case 3:throw new Error;case 4:return e.a(2)}},e)}));return function(_x){return o.apply(this,arguments)}}()).catch(function(r){n.textContent=t.error,n.style.display="block",f.disabled=!1})})})})}();