Linux heracles.o2switch.net 4.18.0-553.62.1.lve.el8.x86_64 #1 SMP Mon Jul 21 17:50:35 UTC 2025 x86_64
/
home
/
ophq1335
/
www
/
wp-content
/
plugins
/
wp-seopress
/
public
/
admin
/
settings
/
/home/ophq1335/www/wp-content/plugins/wp-seopress/public/admin/settings/298.d867b2250b3a54e422e4.js
/*! For license information please see 298.d867b2250b3a54e422e4.js.LICENSE.txt */ "use strict";(self.webpackChunkwp_seopress=self.webpackChunkwp_seopress||[]).push([[298],{3298:(e,t,r)=>{r.r(t),r.d(t,{default:()=>M});var n=r(9196),o=r.n(n),a=r(5736),s=r(7978),i=r(6989),c=r.n(i),l=r(7862);function u(e){return u="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},u(e)}function p(){p=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function f(e,t,r,n){var a=t&&t.prototype instanceof w?t:w,s=Object.create(a.prototype),i=new P(n||[]);return o(s,"_invoke",{value:k(e,r,i)}),s}function h(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=f;var m="suspendedStart",y="suspendedYield",d="executing",v="completed",g={};function w(){}function b(){}function _(){}var E={};l(E,s,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,s)&&(E=x);var N=_.prototype=w.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,a,s,i){var c=h(e[o],e,a);if("throw"!==c.type){var l=c.arg,p=l.value;return p&&"object"==u(p)&&n.call(p,"__await")?t.resolve(p.__await).then((function(e){r("next",e,s,i)}),(function(e){r("throw",e,s,i)})):t.resolve(p).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,i)}))}i(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=m;return function(a,s){if(o===d)throw new Error("Generator is already running");if(o===v){if("throw"===a)throw s;return{value:e,done:!0}}for(n.method=a,n.arg=s;;){var i=n.delegate;if(i){var c=T(i,n);if(c){if(c===g)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===m)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=h(t,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===g)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),g;var a=h(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,g;var s=a.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,g):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,g)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(u(t)+" is not iterable")}return b.prototype=_,o(N,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(N),e},t.awrap=function(e){return{__await:e}},L(O.prototype),l(O.prototype,i,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var s=new O(f(e,r,n,o),a);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},L(N),l(N,c,"Generator"),l(N,s,(function(){return this})),l(N,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],i=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,g):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),g},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),g}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),g}},t}function f(e,t,r,n,o,a,s){try{var i=e[a](s),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function h(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){f(a,n,o,s,i,"next",e)}function i(e){f(a,n,o,s,i,"throw",e)}s(void 0)}))}}function m(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,s,i=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return y(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?y(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var d=r(5609);function v(e){return v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},v(e)}function g(){g=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof w?t:w,s=Object.create(a.prototype),i=new P(n||[]);return o(s,"_invoke",{value:k(e,r,i)}),s}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",m="executing",y="completed",d={};function w(){}function b(){}function _(){}var E={};l(E,s,(function(){return this}));var S=Object.getPrototypeOf,x=S&&S(S(I([])));x&&x!==r&&n.call(x,s)&&(E=x);var N=_.prototype=w.prototype=Object.create(E);function L(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function O(e,t){function r(o,a,s,i){var c=p(e[o],e,a);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==v(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,s,i)}),(function(e){r("throw",e,s,i)})):t.resolve(u).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,i)}))}i(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=f;return function(a,s){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw s;return{value:e,done:!0}}for(n.method=a,n.arg=s;;){var i=n.delegate;if(i){var c=T(i,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=p(t,r,n);if("normal"===l.type){if(o=n.done?y:h,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=p(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var s=a.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(v(t)+" is not iterable")}return b.prototype=_,o(N,"constructor",{value:_,configurable:!0}),o(_,"constructor",{value:b,configurable:!0}),b.displayName=l(_,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===b||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,_):(e.__proto__=_,l(e,c,"GeneratorFunction")),e.prototype=Object.create(N),e},t.awrap=function(e){return{__await:e}},L(O.prototype),l(O.prototype,i,(function(){return this})),t.AsyncIterator=O,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var s=new O(u(e,r,n,o),a);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},L(N),l(N,c,"Generator"),l(N,s,(function(){return this})),l(N,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],i=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function w(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,s,i=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return b(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?b(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function b(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}function _(e,t,r,n,o,a,s){try{var i=e[a](s),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function E(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){_(a,n,o,s,i,"next",e)}function i(e){_(a,n,o,s,i,"throw",e)}s(void 0)}))}}var S=[{id:"yoast",name:"Yoast SEO",logo:"yoast.png",action:"seopress_yoast_migration",nonceKey:"yoast"},{id:"aio",name:"All In One SEO",logo:"aio.svg",action:"seopress_aio_migration",nonceKey:"aio"},{id:"seo-framework",name:"The SEO Framework",logo:"seo-framework.svg",action:"seopress_seo_framework_migration",nonceKey:"seo-framework"},{id:"rk",name:"Rank Math",logo:"rk.svg",action:"seopress_rk_migration",nonceKey:"rk"},{id:"squirrly",name:"Squirrly SEO",logo:"squirrly.png",action:"seopress_squirrly_migration",nonceKey:"squirrly"},{id:"seo-ultimate",name:"SEO Ultimate",logo:"seo-ultimate.svg",action:"seopress_seo_ultimate_migration",nonceKey:"seo-ultimate"},{id:"wp-meta-seo",name:"WP Meta SEO",logo:"wp-meta-seo.png",action:"seopress_wp_meta_seo_migration",nonceKey:"wp-meta-seo"},{id:"premium-seo-pack",name:"Premium SEO Pack",logo:"premium-seo-pack.png",action:"seopress_premium_seo_pack_migration",nonceKey:"premium-seo-pack"},{id:"siteseo",name:"SiteSEO",logo:"siteseo.png",action:"seopress_siteseo_migration",nonceKey:"siteseo"},{id:"smartcrawl",name:"SmartCrawl",logo:"smart-crawl.png",action:"seopress_smart_crawl_migration",nonceKey:"smartcrawl"},{id:"slim-seo",name:"Slim SEO",logo:"slim-seo.svg",action:"seopress_slim_seo_migration",nonceKey:"slim-seo"}];function x(e){return N.apply(this,arguments)}function N(){return N=E(g().mark((function e(t){var r,n,o,a,s,i,c,l;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=t.action,n=t.nonce,o=t.ajaxUrl,a=t.onProgress,s=t.onComplete,i=t.onError,c=0,l=function(){var e=E(g().mark((function e(){var t,u,p,f,h,m;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return(t=new FormData).append("action",r),t.append("_ajax_nonce",n),t.append("offset",c),e.prev=4,e.next=7,fetch(o,{method:"POST",credentials:"same-origin",body:t});case 7:if((u=e.sent).ok){e.next=10;break}throw new Error("Server returned ".concat(u.status));case 10:return e.next=12,u.json();case 12:if((p=e.sent).success||!p.data){e.next=15;break}throw new Error(p.data);case 15:if(f=p.data||p,h=parseInt(f.total,10)||0,m=parseInt(f.count,10)||0,"function"==typeof a&&a({count:m,total:h}),"done"!==f.offset&&void 0!==f.offset){e.next=23;break}s(),e.next=26;break;case 23:return c=parseInt(f.offset,10),e.next=26,l();case 26:e.next=31;break;case 28:e.prev=28,e.t0=e.catch(4),i(e.t0.message||"Migration failed.");case 31:case"end":return e.stop()}}),e,null,[[4,28]])})));return function(){return e.apply(this,arguments)}}(),e.next=5,l();case 5:case"end":return e.stop()}}),e)}))),N.apply(this,arguments)}function L(e){return L="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},L(e)}function O(){O=function(){return t};var e,t={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(e,t,r){e[t]=r.value},a="function"==typeof Symbol?Symbol:{},s=a.iterator||"@@iterator",i=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function l(e,t,r){return Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{l({},"")}catch(e){l=function(e,t,r){return e[t]=r}}function u(e,t,r,n){var a=t&&t.prototype instanceof v?t:v,s=Object.create(a.prototype),i=new P(n||[]);return o(s,"_invoke",{value:k(e,r,i)}),s}function p(e,t,r){try{return{type:"normal",arg:e.call(t,r)}}catch(e){return{type:"throw",arg:e}}}t.wrap=u;var f="suspendedStart",h="suspendedYield",m="executing",y="completed",d={};function v(){}function g(){}function w(){}var b={};l(b,s,(function(){return this}));var _=Object.getPrototypeOf,E=_&&_(_(I([])));E&&E!==r&&n.call(E,s)&&(b=E);var S=w.prototype=v.prototype=Object.create(b);function x(e){["next","throw","return"].forEach((function(t){l(e,t,(function(e){return this._invoke(t,e)}))}))}function N(e,t){function r(o,a,s,i){var c=p(e[o],e,a);if("throw"!==c.type){var l=c.arg,u=l.value;return u&&"object"==L(u)&&n.call(u,"__await")?t.resolve(u.__await).then((function(e){r("next",e,s,i)}),(function(e){r("throw",e,s,i)})):t.resolve(u).then((function(e){l.value=e,s(l)}),(function(e){return r("throw",e,s,i)}))}i(c.arg)}var a;o(this,"_invoke",{value:function(e,n){function o(){return new t((function(t,o){r(e,n,t,o)}))}return a=a?a.then(o,o):o()}})}function k(t,r,n){var o=f;return function(a,s){if(o===m)throw new Error("Generator is already running");if(o===y){if("throw"===a)throw s;return{value:e,done:!0}}for(n.method=a,n.arg=s;;){var i=n.delegate;if(i){var c=T(i,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===f)throw o=y,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=m;var l=p(t,r,n);if("normal"===l.type){if(o=n.done?y:h,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=y,n.method="throw",n.arg=l.arg)}}}function T(t,r){var n=r.method,o=t.iterator[n];if(o===e)return r.delegate=null,"throw"===n&&t.iterator.return&&(r.method="return",r.arg=e,T(t,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var a=p(o,t.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,d;var s=a.arg;return s?s.done?(r[t.resultName]=s.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,d):s:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function j(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function A(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function P(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(j,this),this.reset(!0)}function I(t){if(t||""===t){var r=t[s];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var o=-1,a=function r(){for(;++o<t.length;)if(n.call(t,o))return r.value=t[o],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}throw new TypeError(L(t)+" is not iterable")}return g.prototype=w,o(S,"constructor",{value:w,configurable:!0}),o(w,"constructor",{value:g,configurable:!0}),g.displayName=l(w,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,w):(e.__proto__=w,l(e,c,"GeneratorFunction")),e.prototype=Object.create(S),e},t.awrap=function(e){return{__await:e}},x(N.prototype),l(N.prototype,i,(function(){return this})),t.AsyncIterator=N,t.async=function(e,r,n,o,a){void 0===a&&(a=Promise);var s=new N(u(e,r,n,o),a);return t.isGeneratorFunction(r)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},x(S),l(S,c,"Generator"),l(S,s,(function(){return this})),l(S,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),r=[];for(var n in t)r.push(n);return r.reverse(),function e(){for(;r.length;){var n=r.pop();if(n in t)return e.value=n,e.done=!1,e}return e.done=!0,e}},t.values=I,P.prototype={constructor:P,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(A),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function o(n,o){return i.type="throw",i.arg=t,r.next=n,o&&(r.method="next",r.arg=e),!!o}for(var a=this.tryEntries.length-1;a>=0;--a){var s=this.tryEntries[a],i=s.completion;if("root"===s.tryLoc)return o("end");if(s.tryLoc<=this.prev){var c=n.call(s,"catchLoc"),l=n.call(s,"finallyLoc");if(c&&l){if(this.prev<s.catchLoc)return o(s.catchLoc,!0);if(this.prev<s.finallyLoc)return o(s.finallyLoc)}else if(c){if(this.prev<s.catchLoc)return o(s.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<s.finallyLoc)return o(s.finallyLoc)}}}},abrupt:function(e,t){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var a=o;break}}a&&("break"===e||"continue"===e)&&a.tryLoc<=t&&t<=a.finallyLoc&&(a=null);var s=a?a.completion:{};return s.type=e,s.arg=t,a?(this.method="next",this.next=a.finallyLoc,d):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),d},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.finallyLoc===e)return this.complete(r.completion,r.afterLoc),A(r),d}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var r=this.tryEntries[t];if(r.tryLoc===e){var n=r.completion;if("throw"===n.type){var o=n.arg;A(r)}return o}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),d}},t}function k(e,t,r,n,o,a,s){try{var i=e[a](s),c=i.value}catch(e){return void r(e)}i.done?t(c):Promise.resolve(c).then(n,o)}function T(e){return function(){var t=this,r=arguments;return new Promise((function(n,o){var a=e.apply(t,r);function s(e){k(a,n,o,s,i,"next",e)}function i(e){k(a,n,o,s,i,"throw",e)}s(void 0)}))}}function j(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,s,i=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return A(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?A(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function A(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var P={cleanScans:{title:(0,a.__)("Delete Content Scans","wp-seopress"),message:(0,a.__)("Are you sure you want to delete all content scans? This action cannot be undone.","wp-seopress"),confirmLabel:(0,a.__)("Delete","wp-seopress"),path:"/seopress/v1/tools/clean-content-scans"},resetNotices:{title:(0,a.__)("Reset Notices","wp-seopress"),message:(0,a.__)("Are you sure you want to reset all notices? This action cannot be undone.","wp-seopress"),confirmLabel:(0,a.__)("Reset","wp-seopress"),path:"/seopress/v1/tools/reset-notices"},resetAll:{title:(0,a.__)("Reset All Settings","wp-seopress"),message:(0,a.__)("WARNING: This will delete ALL options related to SEOPress in your database. This action cannot be undone. Are you sure?","wp-seopress"),confirmLabel:(0,a.__)("Reset","wp-seopress"),path:"/seopress/v1/tools/reset-settings"}},I=function(e){var t=e.action,r=SEOPRESS_SETTINGS_DATA.NONCE||"",s=j((0,n.useState)(!1),2),i=s[0],u=s[1],p=j((0,n.useState)(!1),2),f=p[0],h=p[1],m=j((0,n.useState)(""),2),y=m[0],v=m[1],g=j((0,n.useState)(!1),2),w=g[0],b=g[1],_=function(){var e=T(O().mark((function e(){return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return b(!1),u(!0),h(!1),v(""),e.prev=4,e.next=7,c()({path:t.path,method:"POST",headers:{"X-WP-Nonce":r}});case 7:h(!0),e.next=13;break;case 10:e.prev=10,e.t0=e.catch(4),v(e.t0.message||"An error occurred.");case 13:return e.prev=13,u(!1),e.finish(13);case 16:case"end":return e.stop()}}),e,null,[[4,10,13,16]])})));return function(){return e.apply(this,arguments)}}();return o().createElement(o().Fragment,null,o().createElement("h3",{className:"seopress-section-heading"},t.title),t.description&&o().createElement("p",{className:"seopress-description"},t.description),o().createElement("p",null,o().createElement("button",{className:"btn btnTertiary".concat(t.isDangerous?" is-deletable":""),onClick:function(){return b(!0)},disabled:i},i?"".concat(t.confirmLabel||t.title,"..."):t.buttonLabel||t.title)),f&&o().createElement(l.Z,{status:"success"},t.successMessage||(0,a.__)("Action completed successfully.","wp-seopress")),y&&o().createElement(l.Z,{status:"error"},y),w&&o().createElement(d.Modal,{title:t.title,onRequestClose:function(){return b(!1)},className:"seopress-confirm-modal"},o().createElement("p",null,t.message||(0,a.__)("Are you sure? This action cannot be undone.","wp-seopress")),o().createElement("div",{className:"seopress-confirm-modal-actions"},o().createElement(d.Button,{variant:"secondary",onClick:function(){return b(!1)}},(0,a.__)("Cancel","wp-seopress")),o().createElement(d.Button,{variant:"primary",onClick:_,className:"seopress-confirm-modal-primary"},t.confirmLabel||(0,a.__)("Confirm","wp-seopress")))))};var C=r(9654);function R(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,o,a,s,i=[],c=!0,l=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;c=!1}else for(;!(c=(n=a.call(r)).done)&&(i.push(n.value),i.length!==t);c=!0);}catch(e){l=!0,o=e}finally{try{if(!c&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(l)throw o}}return i}}(e,t)||function(e,t){if(e){if("string"==typeof e)return G(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?G(e,t):void 0}}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function G(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r<t;r++)n[r]=e[r];return n}var F={tab_seopress_tool_settings:function(){var e=SEOPRESS_SETTINGS_DATA.NONCE||"",t=(0,n.useRef)(null),r=m((0,n.useState)(!1),2),s=r[0],i=r[1],f=m((0,n.useState)(!1),2),y=f[0],d=f[1],v=m((0,n.useState)(""),2),g=v[0],w=v[1],b=m((0,n.useState)(!1),2),_=b[0],E=b[1],S=m((0,n.useState)(!1),2),x=S[0],N=S[1],L=m((0,n.useState)(""),2),O=L[0],k=L[1],T=function(){var t=h(p().mark((function t(){var r,n,o,a,s,l;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return i(!0),d(!1),w(""),t.prev=3,t.next=6,c()({path:"/seopress/v1/tools/export",method:"GET",headers:{"X-WP-Nonce":e}});case 6:r=t.sent,n=new Blob([JSON.stringify(r,null,2)],{type:"application/json"}),o=URL.createObjectURL(n),a=new Date,s="seopress-settings-export-".concat(String(a.getMonth()+1).padStart(2,"0"),"-").concat(String(a.getDate()).padStart(2,"0"),"-").concat(a.getFullYear(),".json"),(l=document.createElement("a")).href=o,l.download=s,document.body.appendChild(l),l.click(),document.body.removeChild(l),URL.revokeObjectURL(o),d(!0),t.next=24;break;case 21:t.prev=21,t.t0=t.catch(3),w(t.t0.message||"An error occurred while exporting settings.");case 24:return t.prev=24,i(!1),t.finish(24);case 27:case"end":return t.stop()}}),t,null,[[3,21,24,27]])})));return function(){return t.apply(this,arguments)}}();return o().createElement("div",{className:"seopress-tab-content"},o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Export Settings","wp-seopress")),o().createElement("p",{className:"seopress-description"},(0,a.__)("Export the plugin settings for this site as a .json file. This allows you to easily import the configuration into another site.","wp-seopress")),o().createElement("p",null,o().createElement("button",{className:"btn btnTertiary",onClick:T,disabled:s},s?(0,a.__)("Exporting...","wp-seopress"):(0,a.__)("Export settings","wp-seopress"))),y&&o().createElement(l.Z,{status:"success"},(0,a.__)("Settings exported successfully.","wp-seopress")),g&&o().createElement(l.Z,{status:"error"},g),o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Import Settings","wp-seopress")),o().createElement("p",{className:"seopress-description"},(0,a.__)("Import the plugin settings from a .json file. This will overwrite your current settings.","wp-seopress")),o().createElement("input",{type:"file",ref:t,accept:".json",style:{display:"none"},onChange:function(t){var r=t.target.files[0];if(r){t.target.value="",E(!0),N(!1),k("");var n=new FileReader;n.onload=function(){var t=h(p().mark((function t(r){var n;return p().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(t.prev=0,(n=JSON.parse(r.target.result))&&"object"===u(n)){t.next=4;break}throw new Error("Invalid settings file format.");case 4:return t.next=6,c()({path:"/seopress/v1/tools/import",method:"POST",headers:{"X-WP-Nonce":e,"Content-Type":"application/json"},body:JSON.stringify(n)});case 6:N(!0),t.next=12;break;case 9:t.prev=9,t.t0=t.catch(0),t.t0 instanceof SyntaxError?k("The selected file is not a valid JSON file."):k(t.t0.message||"An error occurred while importing settings.");case 12:return t.prev=12,E(!1),t.finish(12);case 15:case"end":return t.stop()}}),t,null,[[0,9,12,15]])})));return function(e){return t.apply(this,arguments)}}(),n.onerror=function(){k("Failed to read the selected file."),E(!1)},n.readAsText(r)}}}),o().createElement("p",null,o().createElement("button",{className:"btn btnTertiary",onClick:function(){t.current.click()},disabled:_},_?(0,a.__)("Importing...","wp-seopress"):(0,a.__)("Import settings","wp-seopress"))),x&&o().createElement(l.Z,{status:"success"},(0,a.__)("Settings imported successfully.","wp-seopress")," ",o().createElement("button",{className:"btn btnTertiary",onClick:function(){return window.location.reload()},style:{marginLeft:"8px",fontSize:"13px",padding:"4px 10px"}},(0,a.__)("Reload page","wp-seopress"))),O&&o().createElement(l.Z,{status:"error"},O))},tab_seopress_tool_plugins:function(){var e,t,r=SEOPRESS_SETTINGS_DATA.PLUGIN_URL||"",s=SEOPRESS_SETTINGS_DATA.AJAX_URL||"",i=SEOPRESS_SETTINGS_DATA.MIGRATION_NONCES||{},c=w((0,n.useState)(null),2),u=c[0],p=c[1],f=w((0,n.useState)(!1),2),h=f[0],m=f[1],y=w((0,n.useState)(!1),2),v=y[0],b=y[1],_=w((0,n.useState)({count:0,total:0}),2),N=_[0],L=_[1],O=w((0,n.useState)(""),2),k=O[0],T=O[1],j=w((0,n.useState)(""),2),A=j[0],P=j[1],I=function(){var e=E(g().mark((function e(){var t;return g().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return m(!1),b(!0),T(""),P(""),L({count:0,total:0}),t=i[u.nonceKey],e.next=8,x({action:u.action,nonce:t,ajaxUrl:s,onProgress:function(e){L(e)},onComplete:function(){b(!1),T("Migration from ".concat(u.name," completed successfully!"))},onError:function(e){b(!1),P(e)}});case 8:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),C=N.total>0?Math.round(N.count/N.total*100):0;return o().createElement("div",{className:"seopress-tab-content"},o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Migration from other SEO plugins","wp-seopress")),o().createElement("p",{className:"seopress-description"},(0,a.__)("Select an SEO plugin to migrate from. You don't need to have the selected plugin active to run the import - SEOPress reads directly from the database.","wp-seopress")),o().createElement("div",{className:"seopress-plugins-grid"},S.map((function(e){return o().createElement("button",{key:e.id,className:"seopress-migration-card".concat((null==u?void 0:u.id)===e.id?" is-selected":""),onClick:function(){return function(e){v||(p(e.id===(null==u?void 0:u.id)?null:e),T(""),P(""),L({count:0,total:0}))}(e)},disabled:v,type:"button"},o().createElement("img",{src:"".concat(r,"assets/img/import/").concat(e.logo),alt:e.name,className:"seopress-migration-card-logo"}),o().createElement("span",{className:"seopress-migration-card-name"},e.name))}))),u&&o().createElement(o().Fragment,null,o().createElement("div",{className:"seopress-migration-details"},o().createElement("h3",{className:"seopress-section-heading"},(0,a.sprintf)((0,a.__)("Import posts and terms (if available) metadata from %s","wp-seopress"),u.name)),o().createElement("p",null,(0,a.__)("By clicking Migrate, we'll import:","wp-seopress")),o().createElement("ul",null,(e=u.id,t=[],["yoast","rk","aio"].includes(e)&&t.push((0,a.__)("Global settings","wp-seopress")),t.push((0,a.__)("Title tags","wp-seopress")),t.push((0,a.__)("Meta description","wp-seopress")),t.push((0,a.__)("Facebook Open Graph tags (title, description and image thumbnail)","wp-seopress")),"premium-seo-pack"!==e&&t.push((0,a.__)("X tags (title, description and image thumbnail)","wp-seopress")),["wp-meta-seo","seo-ultimate"].includes(e)||t.push((0,a.__)("Meta Robots (noindex, nofollow...)","wp-seopress")),["wp-meta-seo","seo-ultimate","slim-seo"].includes(e)||t.push((0,a.__)("Canonical URL","wp-seopress")),["wp-meta-seo","seo-ultimate","squirrly","slim-seo"].includes(e)||t.push((0,a.__)("Focus / target keywords","wp-seopress")),["wp-meta-seo","premium-seo-pack","seo-ultimate","squirrly","aio","slim-seo"].includes(e)||t.push((0,a.__)("Primary category","wp-seopress")),["smartcrawl","rk","seo-framework","aio"].includes(e)&&t.push((0,a.__)("Redirect URL","wp-seopress")),"yoast"===e&&t.push((0,a.__)("Breadcrumb Title","wp-seopress")),t).map((function(e,t){return o().createElement("li",{key:t},e)})))),o().createElement(l.Z,{status:"warning"},o().createElement("span",{dangerouslySetInnerHTML:{__html:(0,a.sprintf)((0,a.__)("<strong>WARNING:</strong> Migration will delete / update all <strong>%1$s posts and terms metadata</strong>, plus <strong>global settings</strong> (if applicable). Some dynamic variables will not be interpreted. We do <strong>NOT delete any %2$s data</strong>.","wp-seopress"),"SEOPress",u.name)}})),o().createElement("div",{className:"seopress-migration-action"},o().createElement("button",{className:"btn btnTertiary",onClick:function(){u&&!v&&m(!0)},disabled:v},v?(0,a.__)("Migrating...","wp-seopress"):"".concat((0,a.__)("Import from","wp-seopress")," ").concat(u.name)))),h&&u&&o().createElement(d.Modal,{title:"".concat((0,a.__)("Import from","wp-seopress")," ").concat(u.name),onRequestClose:function(){return m(!1)},className:"seopress-confirm-modal"},o().createElement("p",null,(0,a.__)("Are you sure you want to import SEO data from","wp-seopress")," ",o().createElement("strong",null,u.name),(0,a.__)("? This will overwrite existing SEOPress metadata for migrated posts.","wp-seopress")),o().createElement("div",{className:"seopress-confirm-modal-actions"},o().createElement(d.Button,{variant:"secondary",onClick:function(){return m(!1)}},(0,a.__)("Cancel","wp-seopress")),o().createElement(d.Button,{variant:"primary",onClick:I,className:"seopress-confirm-modal-primary"},(0,a.__)("Import","wp-seopress")))),v&&N.total>0&&o().createElement("div",{className:"seopress-migration-progress"},o().createElement("div",{className:"seopress-url-counter"},o().createElement("div",{className:"seopress-url-counter-bar"},o().createElement("div",{className:"seopress-url-counter-fill",style:{width:"".concat(C,"%")}},C,"%")),o().createElement("span",{className:"seopress-url-counter-text"},N.count," / ",N.total))),k&&o().createElement(l.Z,{status:"success"},k),A&&o().createElement(l.Z,{status:"error"},A))},tab_seopress_tool_reset:function(){var e=SEOPRESS_SETTINGS_DATA.NONCE||"",t=j((0,n.useState)(!1),2),r=t[0],s=t[1],i=j((0,n.useState)(!1),2),u=i[0],p=i[1],f=j((0,n.useState)(""),2),h=f[0],m=f[1],y=j((0,n.useState)(!1),2),v=y[0],g=y[1],w=j((0,n.useState)(!1),2),b=w[0],_=w[1],E=j((0,n.useState)(""),2),S=E[0],x=E[1],N=j((0,n.useState)(!1),2),L=N[0],k=N[1],A=j((0,n.useState)(!1),2),C=A[0],R=A[1],G=j((0,n.useState)(""),2),F=G[0],M=G[1],D=j((0,n.useState)(null),2),Z=D[0],U=D[1],B=function(){var t=T(O().mark((function t(r){var n,o,a,i;return O().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return n=P[r],a="cleanScans"===r?p:"resetNotices"===r?_:R,i="cleanScans"===r?m:"resetNotices"===r?x:M,(o="cleanScans"===r?s:"resetNotices"===r?g:k)(!0),a(!1),i(""),t.prev=7,t.next=10,c()({path:n.path,method:"POST",headers:{"X-WP-Nonce":e}});case 10:a(!0),t.next=16;break;case 13:t.prev=13,t.t0=t.catch(7),i(t.t0.message||"An error occurred.");case 16:return t.prev=16,o(!1),t.finish(16);case 19:case"end":return t.stop()}}),t,null,[[7,13,16,19]])})));return function(e){return t.apply(this,arguments)}}(),K=function(){var e=T(O().mark((function e(){var t;return O().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return t=Z,U(null),e.next=4,B(t);case 4:case"end":return e.stop()}}),e)})));return function(){return e.apply(this,arguments)}}(),q=SEOPRESS_SETTINGS_DATA.TOOLS_EXTRA_RESET_ACTIONS||[];return o().createElement("div",{className:"seopress-tab-content"},o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Clean Content Scans","wp-seopress")),o().createElement("p",{className:"seopress-description"},(0,a.__)("By clicking Delete content scans, all content analysis will be deleted from your database.","wp-seopress")),o().createElement("p",null,o().createElement("button",{className:"btn btnTertiary",onClick:function(){return U("cleanScans")},disabled:r},r?(0,a.__)("Deleting...","wp-seopress"):(0,a.__)("Delete content scans","wp-seopress"))),u&&o().createElement(l.Z,{status:"success"},(0,a.__)("Content scans have been successfully deleted.","wp-seopress")),h&&o().createElement(l.Z,{status:"error"},h),q.map((function(e,t){return o().createElement(I,{key:e.key||t,action:e})})),o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Reset Notices","wp-seopress")),o().createElement("p",{className:"seopress-description"},(0,a.__)("By clicking Reset Notices, all notices in the notifications center will be set to their initial status.","wp-seopress")),o().createElement("p",null,o().createElement("button",{className:"btn btnTertiary",onClick:function(){return U("resetNotices")},disabled:v},v?(0,a.__)("Resetting...","wp-seopress"):(0,a.__)("Reset notices","wp-seopress"))),b&&o().createElement(l.Z,{status:"success"},(0,a.__)("Notices have been successfully reset.","wp-seopress")),S&&o().createElement(l.Z,{status:"error"},S),o().createElement("h3",{className:"seopress-section-heading"},(0,a.__)("Reset All Settings","wp-seopress")),o().createElement("div",{className:"seopress-info-box",style:{borderLeft:"4px solid #dc3232",background:"#fcf0f0"}},(0,a.__)("WARNING: Delete all options related to this plugin in your database.","wp-seopress")),o().createElement("p",{style:{marginTop:"16px"}},o().createElement("button",{className:"btn btnTertiary is-deletable",onClick:function(){return U("resetAll")},disabled:L},L?(0,a.__)("Resetting...","wp-seopress"):(0,a.__)("Reset settings","wp-seopress"))),C&&o().createElement(l.Z,{status:"success"},(0,a.__)("All settings have been successfully reset.","wp-seopress")),F&&o().createElement(l.Z,{status:"error"},F),Z&&o().createElement(d.Modal,{title:P[Z].title,onRequestClose:function(){return U(null)},className:"seopress-confirm-modal"},o().createElement("p",null,P[Z].message),o().createElement("div",{className:"seopress-confirm-modal-actions"},o().createElement(d.Button,{variant:"secondary",onClick:function(){return U(null)}},(0,a.__)("Cancel","wp-seopress")),o().createElement(d.Button,{variant:"primary",onClick:K,className:"seopress-confirm-modal-primary"},P[Z].confirmLabel))))}};const M=function(){var e=R((0,n.useState)(0),2)[1];(0,n.useEffect)((function(){var t,r=null===(t=window.seopressExtensions)||void 0===t?void 0:t.subscribe((function(){e((function(e){return e+1}))}));return function(){return null==r?void 0:r()}}),[]);var t=SEOPRESS_SETTINGS_DATA.TOOLS_TABS||{},r=Object.keys(t).length>0?Object.entries(t).map((function(e){var t=R(e,2);return{key:t[0],label:t[1]}})):[{key:"tab_seopress_tool_settings",label:(0,a.__)("Settings","wp-seopress")},{key:"tab_seopress_tool_plugins",label:(0,a.__)("Plugins","wp-seopress")},{key:"tab_seopress_tool_reset",label:(0,a.__)("Reset","wp-seopress")}],i=R((0,n.useState)((function(){var e=window.location.hash;if(e){var t=e.match(/tab=([^&]+)/);if(t&&r.find((function(e){return e.key===t[1]})))return t[1]}return r[0].key})),2),c=i[0],l=i[1];return(0,n.useEffect)((function(){var e=function(){var e=window.location.hash;if(e){var t=e.match(/tab=([^&]+)/);t&&r.find((function(e){return e.key===t[1]}))&&l(t[1])}};return window.addEventListener("hashchange",e),function(){return window.removeEventListener("hashchange",e)}}),[r]),o().createElement(s.Z,{tabs:r,activeTab:c,onTabChange:l,title:(0,a.__)("Tools","wp-seopress")},o().createElement("div",{className:"seopress-tab active",id:c},function(){var e,t=F[c];if(t)return o().createElement(t,null);var r=null===(e=window.seopressExtensions)||void 0===e?void 0:e.getField("tools-tab-".concat(c));return r?o().createElement(r):null}(),o().createElement(C.Z,null)))}}}]);