/*! For license information please see welcome_notice.js.LICENSE.txt */ (()=>{function n(){var e,r,o="function"==typeof Symbol?Symbol:{},i=o.iterator||"@@iterator",c=o.toStringTag||"@@toStringTag";function a(n,o,i,c){var a=o&&o.prototype instanceof s?o:s,f=Object.create(a.prototype);return t(f,"_invoke",function(n,t,o){var i,c,a,s=0,f=o||[],l=!1,d={p:0,n:0,v:e,a:p,f:p.bind(e,4),d:function(n,t){return i=n,c=0,a=e,d.n=t,u}};function p(n,t){for(c=n,a=t,r=0;!l&&s&&!o&&r3?(o=v===t)&&(a=i[(c=i[4])?5:(c=3,3)],i[4]=i[5]=e):i[0]<=p&&((o=n<2&&pt||t>v)&&(i[4]=n,i[5]=t,d.n=v,c=0))}if(o||n>1)return u;throw l=!0,t}return function(o,f,v){if(s>1)throw TypeError("Generator is already running");for(l&&1===f&&p(f,v),c=f,a=v;(r=c<2?e: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=e}else if((r=(l=d.n<0)?a:n.call(t,d))!==u)break}catch(n){i=e,c=1,a=n}finally{s=1}}return{value:r,done:l}}}(n,i,c),!0),f}var u={};function s(){}function f(){}function l(){}r=Object.getPrototypeOf;var d=[][i]?r(r([][i]())):(t(r={},i,function(){return this}),r),p=l.prototype=s.prototype=Object.create(d);function v(n){return Object.setPrototypeOf?Object.setPrototypeOf(n,l):(n.__proto__=l,t(n,c,"GeneratorFunction")),n.prototype=Object.create(p),n}return f.prototype=l,t(p,"constructor",l),t(l,"constructor",f),f.displayName="GeneratorFunction",t(l,c,"GeneratorFunction"),t(p),t(p,c,"Generator"),t(p,i,function(){return this}),t(p,"toString",function(){return"[object Generator]"}),(n=function(){return{w:a,m:v}})()}function t(n,e,r,o){var i=Object.defineProperty;try{i({},"",{})}catch(n){i=0}t=function(n,e,r,o){function c(e,r){t(n,e,function(n){return this._invoke(e,r,n)})}e?i?i(n,e,{value:r,enumerable:!o,configurable:!o,writable:!o}):n[e]=r:(c("next",0),c("throw",1),c("return",2))},t(n,e,r,o)}function e(n,t,e,r,o,i,c){try{var a=n[i](c),u=a.value}catch(n){return void e(n)}a.done?t(u):Promise.resolve(u).then(r,o)}function r(n){return function(){var t=this,r=arguments;return new Promise(function(o,i){var c=n.apply(t,r);function a(n){e(c,o,i,a,u,"next",n)}function u(n){e(c,o,i,a,u,"throw",n)}a(void 0)})}}document.addEventListener("DOMContentLoaded",function(){var t=window.ariaFse,e=t.activating,o=t.installing,i=t.done,c=t.activationUrl,a=t.ajaxUrl,u=t.pluginSlug,s=t.nonce,f=t.pluginStatus,l=document.querySelector(".ariafse-welcome-notice"),d=null==l?void 0:l.querySelector(".notice-dismiss"),p=null==l?void 0:l.querySelector("#ariafse-install-ablocks"),v=null==p?void 0:p.querySelector(".text"),y=function(){null==l||l.remove()},m=function(){var t=r(n().m(function t(){return n().w(function(n){for(;;)switch(n.n){case 0:if(v){n.n=1;break}return n.a(2);case 1:return v.textContent=e,n.n=2,fetch(c);case 2:n.v.ok?(p.classList.remove("updating-message"),p.classList.add("updated-message"),v.textContent=i,setTimeout(y,2e3)):console.error("Activation failed");case 3:return n.a(2)}},t)}));return function(){return t.apply(this,arguments)}}(),h=function(){var t=r(n().m(function t(){return n().w(function(n){for(;;)if(0===n.n)return n.a(2,new Promise(function(n){wp.updates.ajax("install-plugin",{slug:u,success:function(){return n({success:!0})},error:function(t){return n({success:!1,code:t.errorCode})}})}))},t)}));return function(){return t.apply(this,arguments)}}();p&&p.addEventListener("click",r(n().m(function t(){return n().w(function(n){for(;;)switch(n.n){case 0:if(p.classList.add("updating-message","disabled"),"installed"===f){n.n=2;break}return v.textContent=o,n.n=1,h();case 1:if(n.v.success){n.n=2;break}return console.error("Installation failed"),n.a(2);case 2:return n.n=3,m();case 3:return n.a(2)}},t)}))),d&&d.addEventListener("click",r(n().m(function t(){var e,r;return n().w(function(n){for(;;)switch(n.p=n.n){case 0:return e={method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded; charset=UTF-8"},body:"action=ariafse_dismiss_welcome_notice&nonce=".concat(s)},n.p=1,n.n=2,fetch(a,e);case 2:n.v.ok&&y(),n.n=4;break;case 3:n.p=3,r=n.v,console.error("Dismiss failed",r);case 4:return n.a(2)}},t,null,[[1,3]])})))})})();