!function(){"use strict";var t={n:function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,{a:r}),r},d:function(e,r){for(var n in r)t.o(r,n)&&!t.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:r[n]})},o:function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r:function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{deleteSchema:function(){return pe},refreshResults:function(){return Wt},resetDirtyMetadata:function(){return J},resetRedirection:function(){return ct},saveSchema:function(){return le},saveTemplate:function(){return fe},schemaUpdated:function(){return ne},setEditingSchemaId:function(){return ie},setEditorTab:function(){return ae},setTemplateTab:function(){return oe},setVersion:function(){return Jt},toggleFrontendScore:function(){return K},toggleIsDiviPageSettingsBarActive:function(){return $t},toggleIsDiviRankMathModalActive:function(){return qt},toggleLoaded:function(){return Gt},toggleSchemaEditor:function(){return ee},toggleSchemaTemplates:function(){return re},toggleSnippetEditor:function(){return gt},updateAIScore:function(){return he},updateAdvancedRobots:function(){return B},updateAnalysisScore:function(){return z},updateAppData:function(){return N},updateAppUi:function(){return F},updateBreadcrumbTitle:function(){return W},updateCanonicalUrl:function(){return G},updateDescription:function(){return nt},updateEditSchema:function(){return se},updateEditSchemas:function(){return ue},updateFacebookDescription:function(){return q},updateFacebookHasOverlay:function(){return X},updateFacebookImage:function(){return Y},updateFacebookImageID:function(){return Q},updateFacebookImageOverlay:function(){return Z},updateFacebookTitle:function(){return $},updateFeaturedImage:function(){return it},updateHasRedirect:function(){return st},updateHighlightedParagraphs:function(){return Yt},updateKeywords:function(){return L},updateKeywordsData:function(){return de},updatePermalink:function(){return et},updatePillarContent:function(){return H},updatePostID:function(){return tt},updatePrimaryTermID:function(){return at},updateRedirection:function(){return ot},updateRedirectionItem:function(){return ut},updateRobots:function(){return V},updateSchemas:function(){return ce},updateSelectedKeyword:function(){return Bt},updateSerpDescription:function(){return yt},updateSerpSlug:function(){return mt},updateSerpTitle:function(){return ht},updateSnippetPreviewType:function(){return vt},updateSocialTab:function(){return Vt},updateTitle:function(){return rt},updateTwitterAppCountry:function(){return zt},updateTwitterAppDescription:function(){return Ct},updateTwitterAppGoogleplayID:function(){return Lt},updateTwitterAppGoogleplayName:function(){return Ht},updateTwitterAppGoogleplayUrl:function(){return Kt},updateTwitterAppIpadID:function(){return Ut},updateTwitterAppIpadName:function(){return Nt},updateTwitterAppIpadUrl:function(){return Ft},updateTwitterAppIphoneID:function(){return Mt},updateTwitterAppIphoneName:function(){return xt},updateTwitterAppIphoneUrl:function(){return Rt},updateTwitterAuthor:function(){return _t},updateTwitterCardType:function(){return kt},updateTwitterDescription:function(){return St},updateTwitterHasOverlay:function(){return Dt},updateTwitterImage:function(){return Pt},updateTwitterImageID:function(){return Tt},updateTwitterImageOverlay:function(){return It},updateTwitterPlayerSize:function(){return Ot},updateTwitterPlayerStreamCtype:function(){return At},updateTwitterPlayerStreamUrl:function(){return jt},updateTwitterPlayerUrl:function(){return Et},updateTwitterTitle:function(){return wt},updateTwitterUseFacebook:function(){return bt}});var r={};t.r(r),t.d(r,{appData:function(){return Se},appUi:function(){return Ee}});var n={};t.r(n),t.d(n,{getAdvancedRobots:function(){return Re},getAnalysisScore:function(){return Ae},getAppData:function(){return Oe},getBreadcrumbTitle:function(){return Ne},getCanonicalUrl:function(){return Ue},getContentAIScore:function(){return Zr},getDescription:function(){return ir},getDirtyMetadata:function(){return je},getEditSchemas:function(){return _r},getEditingSchema:function(){return Tr},getEditorTab:function(){return Dr},getFacebookAuthor:function(){return Ye},getFacebookDescription:function(){return qe},getFacebookHasOverlay:function(){return Ze},getFacebookImage:function(){return Xe},getFacebookImageID:function(){return Qe},getFacebookImageOverlay:function(){return tr},getFacebookTitle:function(){return $e},getFeaturedImage:function(){return ar},getFeaturedImageHtml:function(){return or},getHighlightedParagraphs:function(){return Je},getKeywords:function(){return Ce},getKeywordsData:function(){return Xr},getPermalink:function(){return nr},getPillarContent:function(){return Me},getPostID:function(){return er},getPreviewSchema:function(){return Pr},getPrimaryTermID:function(){return ur},getRedirectionID:function(){return cr},getRedirectionItem:function(){return pr},getRedirectionType:function(){return sr},getRedirectionUrl:function(){return lr},getRichSnippets:function(){return Fe},getRobots:function(){return xe},getSchemas:function(){return Sr},getSelectedKeyword:function(){return Ke},getSerpDescription:function(){return yr},getSerpSlug:function(){return mr},getSerpTitle:function(){return hr},getShowScoreFrontend:function(){return Le},getSnippetPreviewType:function(){return vr},getSocialTab:function(){return ze},getTemplateTab:function(){return Ir},getTitle:function(){return rr},getTwitterAppCountry:function(){return Jr},getTwitterAppDescription:function(){return Nr},getTwitterAppGoogleplayID:function(){return Br},getTwitterAppGoogleplayName:function(){return Vr},getTwitterAppGoogleplayUrl:function(){return Wr},getTwitterAppIpadID:function(){return Kr},getTwitterAppIpadName:function(){return zr},getTwitterAppIpadUrl:function(){return Gr},getTwitterAppIphoneID:function(){return Fr},getTwitterAppIphoneName:function(){return Lr},getTwitterAppIphoneUrl:function(){return Hr},getTwitterAuthor:function(){return Cr},getTwitterCardType:function(){return Or},getTwitterDescription:function(){return Ar},getTwitterHasOverlay:function(){return Rr},getTwitterImage:function(){return xr},getTwitterImageID:function(){return Mr},getTwitterImageOverlay:function(){return Ur},getTwitterPlayerSize:function(){return qr},getTwitterPlayerStream:function(){return Yr},getTwitterPlayerStreamCtype:function(){return Qr},getTwitterPlayerUrl:function(){return $r},getTwitterTitle:function(){return jr},getTwitterUseFacebook:function(){return Er},hasRedirect:function(){return fr},hasSchemaUpdated:function(){return wr},isDiviPageSettingsBarActive:function(){return Ve},isDiviRankMathModalActive:function(){return We},isLoaded:function(){return He},isPro:function(){return Be},isRefreshing:function(){return Ge},isSchemaEditorOpen:function(){return br},isSchemaTemplatesOpen:function(){return kr},isSnippetEditorOpen:function(){return gr}});var i=jQuery,a=t.n(i),o=lodash,u=rankMathAnalyzer,c=wp.hooks,s=wp.data,l=wp.element,p=wp.i18n;var f=wp.apiFetch,d=t.n(f),h={"&":"&",""":'"',"'":"'"},m=/&(?:amp|quot|#(0+)?39);/g,y=RegExp(m.source);var g=function(t){return t&&y.test(t)?t.replace(m,(function(t){return h[t]||"'"})):t||""};function v(t){return v="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},v(t)}function b(){b=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,i=Object.defineProperty||function(t,e,r){t[e]=r.value},a="function"==typeof Symbol?Symbol:{},o=a.iterator||"@@iterator",u=a.asyncIterator||"@@asyncIterator",c=a.toStringTag||"@@toStringTag";function s(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{s({},"")}catch(t){s=function(t,e,r){return t[e]=r}}function l(t,e,r,n){var a=e&&e.prototype instanceof g?e:g,o=Object.create(a.prototype),u=new C(n||[]);return i(o,"_invoke",{value:E(t,r,u)}),o}function p(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=l;var f="suspendedStart",d="suspendedYield",h="executing",m="completed",y={};function g(){}function k(){}function w(){}var S={};s(S,o,(function(){return this}));var _=Object.getPrototypeOf,T=_&&_(_(M([])));T&&T!==r&&n.call(T,o)&&(S=T);var P=w.prototype=g.prototype=Object.create(S);function D(t){["next","throw","return"].forEach((function(e){s(t,e,(function(t){return this._invoke(e,t)}))}))}function I(t,e){function r(i,a,o,u){var c=p(t[i],t,a);if("throw"!==c.type){var s=c.arg,l=s.value;return l&&"object"==v(l)&&n.call(l,"__await")?e.resolve(l.__await).then((function(t){r("next",t,o,u)}),(function(t){r("throw",t,o,u)})):e.resolve(l).then((function(t){s.value=t,o(s)}),(function(t){return r("throw",t,o,u)}))}u(c.arg)}var a;i(this,"_invoke",{value:function(t,n){function i(){return new e((function(e,i){r(t,n,e,i)}))}return a=a?a.then(i,i):i()}})}function E(e,r,n){var i=f;return function(a,o){if(i===h)throw new Error("Generator is already running");if(i===m){if("throw"===a)throw o;return{value:t,done:!0}}for(n.method=a,n.arg=o;;){var u=n.delegate;if(u){var c=O(u,n);if(c){if(c===y)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(i===f)throw i=m,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);i=h;var s=p(e,r,n);if("normal"===s.type){if(i=n.done?m:d,s.arg===y)continue;return{value:s.arg,done:n.done}}"throw"===s.type&&(i=m,n.method="throw",n.arg=s.arg)}}}function O(e,r){var n=r.method,i=e.iterator[n];if(i===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,O(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),y;var a=p(i,e.iterator,r.arg);if("throw"===a.type)return r.method="throw",r.arg=a.arg,r.delegate=null,y;var o=a.arg;return o?o.done?(r[e.resultName]=o.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,y):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,y)}function j(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function A(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(j,this),this.reset(!0)}function M(e){if(e||""===e){var r=e[o];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i=0;--a){var o=this.tryEntries[a],u=o.completion;if("root"===o.tryLoc)return i("end");if(o.tryLoc<=this.prev){var c=n.call(o,"catchLoc"),s=n.call(o,"finallyLoc");if(c&&s){if(this.prev=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),A(r),y}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;A(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:M(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),y}},e}function k(t,e,r,n,i,a,o){try{var u=t[a](o),c=u.value}catch(t){return void r(t)}u.done?e(c):Promise.resolve(c).then(n,i)}function w(t){return function(){var e=this,r=arguments;return new Promise((function(n,i){var a=t.apply(e,r);function o(t){k(a,n,i,o,u,"next",t)}function u(t){k(a,n,i,o,u,"throw",t)}o(void 0)}))}}function S(t,e){for(var r=0;r'),a()("#misc-publishing-actions").append(this.scoreElem),setTimeout((function(){t.scoreText=' SEO: Not available',t.scoreElem.html(t.scoreText),t.scoreText=t.scoreElem.find("strong"),t.fkScoreText='Not available',t.fkScoreElem=a()('
'+t.fkScoreText+"
"),t.fkScoreText=t.fkScoreElem.find("span"),a()("#rank-math-metabox-wrapper .rank-math-focus-keyword").find("tags").parent("div").append(t.fkScoreElem),t.updateScore=t.updateScore.bind(t),t.updateScore(),(0,c.addAction)("rank_math_refresh_results","rank-math",t.updateScore)}),1500))}},{key:"updateScore",value:function(){var t,e=rankMathEditor.resultManager.getScore(rankMathEditor.getPrimaryKeyword()),r=100<(t=e)?"bad-fk dark":80'+(0,p.__)("300 words","rank-math")+"")}}},{key:"contentLengthBoundary",value:function(){return{recommended:{boundary:299,score:8},belowRecommended:{boundary:200,score:5},low:{boundary:50,score:2}}}}])&&I(e.prototype,r),n&&I(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();function O(t){return O="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},O(t)}function j(t,e){for(var r=0;r1&&void 0!==arguments[1]?arguments[1]:"content";console.warn("RankMathApp.reloadPlugin is deprecated, use rankMathEditor.refresh()"),this.refresh(e)}}],r&&j(e.prototype,r),n&&j(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),C=A;function M(t){return M="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},M(t)}function x(t,e){for(var r=0;r2&&void 0!==arguments[2]&&arguments[2],n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:null;return e=(0,c.applyFilters)("rank_math_sanitize_data",e,t,r),null!==n&&(n=(0,c.applyFilters)("rank_math_sanitize_meta_value",n,t,r)),n=null===n?e:n,(0,c.doAction)("rank_math_data_changed",t,e,r),{type:"RANK_MATH_APP_DATA",key:t,value:e,metaKey:r,metaValue:n}}function F(t,e){return(0,c.doAction)("rank_math_update_app_ui",t,e),{type:"RANK_MATH_APP_UI",key:t,value:e}}function L(t){return U.setVariable("focuskw",t.split(",")[0]),rankMathEditor.refresh("keyword"),N("keywords",t,"rank_math_focus_keyword")}function H(t){return N("pillarContent",t,"rank_math_pillar_content",!0===t?"on":"off")}function K(t){return N("showScoreFrontend",t,"rank_math_dont_show_seo_score",!0===t?"off":"on")}function z(t){return N("score",t,"rank_math_seo_score")}function G(t){return N("canonicalUrl",t,"rank_math_canonical_url")}function B(t){return N("advancedRobots",t,"rank_math_advanced_robots")}function V(t){return N("robots",t,"rank_math_robots",Object.keys(t))}function W(t){return N("breadcrumbTitle",t,"rank_math_breadcrumb_title")}function J(){return N("dirtyMetadata",{})}function $(t){return N("facebookTitle",t,"rank_math_facebook_title")}function q(t){return N("facebookDescription",t,"rank_math_facebook_description")}function Y(t){return N("facebookImage",t,"rank_math_facebook_image")}function Q(t){return N("facebookImageID",t,"rank_math_facebook_image_id")}function X(t){return N("facebookHasOverlay",t,"rank_math_facebook_enable_image_overlay",!0===t?"on":"off")}function Z(t){return N("facebookImageOverlay",t,"rank_math_facebook_image_overlay")}function tt(t){return rankMath.objectID=t,N("postID",t)}function et(t){return N("permalink",t,"permalink")}function rt(t){return N("title",t,"rank_math_title")}function nt(t){return N("description",t,"rank_math_description")}function it(t){return N("featuredImage",t)}function at(t,e){return N("primaryTerm",parseInt(t),"rank_math_primary_"+e)}function ot(t,e){return N(t,e)}function ut(t){return F("redirectionItem",t)}function ct(){return F("redirectionItem",{})}function st(t){return F("hasRedirect",t)}var lt=document.createElement("div");function pt(t){return t&&"string"==typeof t&&(t=t.replace(/]*>([\S\s]*?)<\/script>/gim,"").replace(/<\/?\w(?:[^"'>]|"[^"]*"|'[^']*')*>/gim,""),lt.innerHTML=t,t=lt.textContent,lt.textContent=""),t}var ft=function(t,e){return t=(t=u.Helpers.cleanText(t)).replace(/\r?\n|\r/g," "),e?(0,o.truncate)(t,{length:e,separator:" "}):t},dt=function(t){if((0,o.isEmpty)(t))return"";t=u.Helpers.stripScript(t),t=u.Helpers.stripStyle(t),t=(0,o.unescape)(t).replace(/\[caption[^\]]*\](.*)\[\/caption\]/g,"");var e=(0,o.filter)(u.Helpers.matchParagraphs(t,!0,!0),(function(t){return""!==t.trim()}));if(!e.length)return"";var r=rankMathEditor.getPrimaryKeyword();if(""!==r){var n=(0,o.filter)(e,(function(t){return(0,o.includes)(t.toLowerCase(),r.toLowerCase())}));if(00&&void 0!==arguments[0]?arguments[0]:we,e=arguments.length>1?arguments[1]:void 0,r=ge({},t.dirtyMetadata);return!1!==e.metaKey&&(r[e.metaKey]=e.metaValue),"RANK_MATH_APP_DATA"===e.type?"dirtyMetadata"===e.key?ge(ge({},t),{},{dirtyMetadata:e.value}):ge(ge({},t),{},ve(ve({},e.key,e.value),"dirtyMetadata",r)):t}function _e(t){return _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},_e(t)}function Te(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),r.push.apply(r,n)}return r}function Pe(t){for(var e=1;e0&&void 0!==arguments[0]?arguments[0]:Ie,e=arguments.length>1?arguments[1]:void 0;return"RANK_MATH_APP_UI"===e.type?Pe(Pe({},t),{},De({},e.key,e.value)):t}function Oe(t){return t.appData}function je(t){return t.appData.dirtyMetadata}function Ae(t){return t.appData.score}function Ce(t){return t.appData.keywords}function Me(t){return t.appData.pillarContent}function xe(t){return t.appData.robots}function Re(t){return t.appData.advancedRobots}function Ue(t){return t.appData.canonicalUrl}function Ne(t){return t.appData.breadcrumbTitle}function Fe(t){return"todo"}function Le(t){return t.appData.showScoreFrontend}function He(t){return t.appUi.isLoaded}function Ke(t){return t.appUi.selectedKeyword}function ze(t){return t.appUi.socialTab}function Ge(t){return t.appUi.refreshResults}function Be(t){return t.appUi.isPro}function Ve(t){return t.appUi.isDiviPageSettingsBarActive}function We(t){return t.appUi.isDiviRankMathModalActive}function Je(t){return t.appUi.highlightedParagraphs}function $e(t){return t.appData.facebookTitle}function qe(t){return t.appData.facebookDescription}function Ye(t){return t.appData.facebookAuthor}function Qe(t){return t.appData.facebookImageID}function Xe(t){return t.appData.facebookImage}function Ze(t){return t.appData.facebookHasOverlay}function tr(t){return""!==t.appData.facebookImageOverlay?t.appData.facebookImageOverlay:"play"}function er(t){return t.appData.postID}function rr(t){return t.appData.title}function nr(t){return t.appData.permalink}function ir(t){return t.appData.description}function ar(t){return t.appData.featuredImage}function or(t){var e=t.appData.featuredImage;return'').concat(e.alt_text,'')}function ur(t){return t.appData.primaryTerm}function cr(t){return t.appData.redirectionID}function sr(t){return t.appData.redirectionType}function lr(t){return t.appData.redirectionUrl}function pr(t){return t.appUi.redirectionItem}function fr(t){return t.appUi.hasRedirect}var dr=wp.url;function hr(t){return pt(t.appUi.serpTitle)}function mr(t){return(0,dr.safeDecodeURIComponent)(t.appUi.serpSlug)}function yr(t){return t.appUi.serpDescription}function gr(t){return t.appUi.isSnippetEditorOpen}function vr(t){return t.appUi.snippetPreviewType}function br(t){return t.appUi.isSchemaEditorOpen}function kr(t){return t.appUi.isSchemaTemplatesOpen}function wr(t){return t.appUi.schemaUpdated}function Sr(t){return t.appData.schemas}function _r(t){return t.appUi.editSchemas}function Tr(t){return{id:t.appUi.editingSchemaId,data:t.appUi.editSchemas[t.appUi.editingSchemaId]}}function Pr(t){return t.appData.schemas[t.appUi.editingSchemaId]}function Dr(t){return t.appUi.editorTab}function Ir(t){return t.appUi.templateTab}function Er(t){return t.appData.twitterUseFacebook}function Or(t){return t.appData.twitterCardType}function jr(t){return t.appData.twitterTitle}function Ar(t){return t.appData.twitterDescription}function Cr(t){return t.appData.twitterAuthor}function Mr(t){return t.appData.twitterImageID}function xr(t){return t.appData.twitterImage}function Rr(t){return t.appData.twitterHasOverlay}function Ur(t){return""!==t.appData.twitterImageOverlay?t.appData.twitterImageOverlay:"play"}function Nr(t){return t.appData.twitterAppDescription}function Fr(t){return t.appData.twitterAppIphoneID}function Lr(t){return t.appData.twitterAppIphoneName}function Hr(t){return t.appData.twitterAppIphoneUrl}function Kr(t){return t.appData.twitterAppIpadID}function zr(t){return t.appData.twitterAppIpadName}function Gr(t){return t.appData.twitterAppIpadUrl}function Br(t){return t.appData.twitterAppGoogleplayID}function Vr(t){return t.appData.twitterAppGoogleplayName}function Wr(t){return t.appData.twitterAppGoogleplayUrl}function Jr(t){return t.appData.twitterAppCountry}function $r(t){return t.appData.twitterPlayerUrl}function qr(t){return t.appData.twitterPlayerSize}function Yr(t){return t.appData.twitterPlayerStream}function Qr(t){return t.appData.twitterPlayerStreamCtype}function Xr(t){return t.appUi.keywordsData}function Zr(t){return t.appData.contentAIScore}(0,s.registerStore)("rank-math",{reducer:(0,s.combineReducers)(r),selectors:n,actions:e});function tn(t){return tn="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},tn(t)}function en(t,e){for(var r=0;r1&&void 0!==arguments[1]&&arguments[1];("auto-draft"!==this.getStatus()||e)&&this.elemSlug.val(t),a()("#editable-post-name").text(t),a()("#editable-post-name-full").text(t),this._data.slug=this.getSlug(),this._data.permalink=this.getPermalink(),(0,s.dispatch)("rank-math").updateSerpSlug(t),rankMathEditor.refresh("permalink")}},{key:"handleTitleChange",value:function(t){U.setVariable("title",t),U.setVariable("term",t),U.setVariable("author",t),(0,s.dispatch)("rank-math").updateSerpTitle((0,s.select)("rank-math").getTitle()),rankMathEditor.refresh("title")}},{key:"handleExcerptChange",value:function(){this._data.excerpt=this.getExcerpt(),(0,s.dispatch)("rank-math").updateSerpDescription((0,s.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"handleFeaturedImageChange",value:function(){this._data.featuredImage=this.getFeaturedImage(),(0,s.dispatch)("rank-math").updateFeaturedImage(this.getFeaturedImage()),rankMathEditor.refresh("featuredImage")}},{key:"handleContentChange",value:function(){this._data.excerpt=this.getExcerpt(),this._data.content=this.getContent(),(0,s.dispatch)("rank-math").updateSerpDescription((0,s.select)("rank-math").getDescription()),rankMathEditor.refresh("content")}},{key:"getData",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";return t?this._data[t]:this._data}},{key:"updateData",value:function(t,e){this._data[t]=e}},{key:"isTinymce",value:function(){return"undefined"!=typeof tinymce}},{key:"getStatus",value:function(){var t=!(0,o.isUndefined)(this.postStatus)&&this.postStatus.length?this.postStatus.val():"";return(0,o.isUndefined)(t)?"":t}}],r&&en(e.prototype,r),n&&en(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}(),nn=rn;function an(t){return an="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},an(t)}function on(t,e){for(var r=0;r"+r.responseText+"").find("#editable-post-name-full").text(),rankMathEditor.updatePermalink(o))}})),this.saveDraft.on("click",(function(){t.updateBtn.attr("data-disable","true")}))}},{key:"assessThumbnail",value:function(t){this.featuredImage={source_url:t.src,alt_text:t.alt},this.handleFeaturedImageChange(t)}}])&&on(e.prototype,r),n&&on(e,n),Object.defineProperty(e,"prototype",{writable:!1}),u}(nn),pn=ln;function fn(t){return fn="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},fn(t)}function dn(t,e){for(var r=0;r'+r.value.substring(i,a)+"",i===a&&(n=''+e+""),r.value=r.value.substring(0,i)+n+r.value.substring(a,r.value.length),r.focus(),r.selectionStart=i+n.length,r.selectionEnd=i+n.length,r.scrollTop=o}else n=''+e+"",r.value+=n,r.focus()}});if("function"==typeof ClipboardJS&&a()(".suggestion-copy").on("click",(function(t){t.preventDefault(),new ClipboardJS(".suggestion-copy");var e=a()(this).parent().next(".suggestion-title"),r=e.html();e.text("Link Copied"),setTimeout((function(){e.html(r)}),1500)})),"object"!==("undefined"==typeof tinymce?"undefined":xn(tinymce)))return!0;var e=null,r=null;a()(".suggestion-insert").on("click",(function(t){t.preventDefault();var n,i,o,u,c=a()(this);if(c.hasClass("clicked"))return!0;if(null!==tinymce.activeEditor&&!0!==tinymce.activeEditor.isHidden()&&"content"===tinymce.activeEditor.id){e=tinymce.activeEditor,r=a()(e.getBody());var l=e.selection.getContent()||"";if(r.find("a[data-mce-selected]").length){var p=(n="",i="",o=e.selection.getStart(),(u=e.dom.getParent(o,"a[href]"))||(i=e.selection.getContent({format:"raw"}))&&-1!==i.indexOf("")&&((n=i.match(/href="([^">]+)"/))&&n[1]&&(u=e.$('a[href="'+n[1]+'"]',o)[0]),u&&e.selection.select(u)),u);e.dom.setAttribs(p,{href:c.data("url")}),a()(p).text()!==l&&e.insertContent(l)}else l.length?e.insertContent(''+l+""):e.insertContent(''+c.data("text")+"")}else if(P()){var f=(0,s.select)("core/block-editor").getSelectedBlock().clientId,d=(0,s.select)("core/block-editor").getSelectionStart().offset,h=(0,s.select)("core/block-editor").getSelectionEnd().offset;if(document.getSelection){var m=document.getSelection();if(m.rangeCount){var y=m.getRangeAt(0),g=a()("#block-"+f).text().substring(d,h),v=document.createElement("a");v.href=c.data("url"),v.innerText=""!==g?g:c.data("text"),y.deleteContents(),y.insertNode(v);var b=m.focusNode.innerHTML;(0,s.dispatch)("core/block-editor").updateBlock(f,{attributes:{content:b}})}}}var k=c.closest(".suggestion-item").find(".suggestion-title"),w=k.html();k.text("Link Inserted"),c.addClass("clicked"),setTimeout((function(){var t,e,r,n;k.html(w),c.removeClass("clicked"),!0===rankMath.postSettings.useFocusKeyword&&(e=c,r=(t=k).data("fkcount")||0,n=t.data("fk"),(r+=1)===n.length&&(r=0),t.find(">a").text(n[r]),t.data("fkcount",r),e.data("text",n[r]))}),1500)})),a()("#rank_math_metabox_link_suggestions").find("h2").append(a()("#rank-math-link-suggestions-tooltip").html())}}));function Fn(t){return Fn="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},Fn(t)}function Ln(t,e){for(var r=0;rMake Term Primary')})),u.each((function(){var t=a()(this).closest("li");t.addClass("term-checked"),r+"-"+e===t.attr("id")&&(t.addClass("term-marked-primary"),t.find(">label .rank-math-make-primary").prop("checked",!0))})),n.on("click",'input[type="checkbox"]',(function(){var e=a()(this).closest("li");if(e.toggleClass("term-checked"),1===i.find("li.term-checked").length||e.hasClass("term-marked-primary")&&!e.hasClass("term-checked")){var r=i.find("li.term-checked:first > label .rank-math-make-primary");0Make Term Primary')}))}))}))}));function zn(t){return zn="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},zn(t)}function Gn(t,e){for(var r=0;rr.length&&(r=a()(''),a()(".facebook-thumbnail",".rank-math-social-preview-image").before(r)),"large"in n.sizes?r.attr("src",n.sizes.large.url):r.attr("src",n.sizes.full.url),t.setFeaturedImage(n)}))}}},{key:"removeImage",value:function(){var t=this;a()("#postimagediv").on("click","#remove-post-thumbnail",(function(){a()("#rank_math_image_warning").remove(),a()("#rank_math_post_thumbnail").remove(),t.setFeaturedImage("")}))}},{key:"gutenbergImage",value:function(){var t,e,r=this;wp.data.subscribe((function(){var n=wp.data.select("core/editor").getEditedPostAttribute("featured_media");r.isValidMediaId(n)&&(t=wp.data.select("core").getMedia(n),(0,o.isUndefined)(t)||t!==e&&(e=t,r.setFeaturedImage({url:t.guid.rendered,alt:t.alt_text})))}))}},{key:"setFeaturedImage",value:function(t){var e={src:(0,o.get)(t,"url",""),alt:(0,o.get)(t,"alt","")};(0,c.doAction)("rank_math_updated_featured_image",e)}},{key:"sizeWarning",value:function(t){if(a()("#rank_math_image_warning").remove(),!(200

'+rankMath.featuredImageNotice+"

").insertAfter(e)}}},{key:"getFeaturedImage",value:function(){var t=a()("#postimagediv img");if(!t||t.length){var e={url:t[0].src,alt:t[0].alt};this.setFeaturedImage(e)}}},{key:"isValidMediaId",value:function(t){return"number"==typeof t&&01&&void 0!==arguments[1]&&arguments[1];this.assessor.dataCollector.handleSlugChange(t,e),(0,s.dispatch)("rank-math").updatePermalink(t)}},{key:"updatePermalinkSanitize",value:function(t){t=this.assessor.getResearch("slugify")(t),(0,s.dispatch)("rank-math").updatePermalink(t)}},{key:"getPrimaryKeyword",value:function(){return u.Helpers.removeDiacritics(this.assessor.getPrimaryKeyword())}},{key:"getSelectedKeyword",value:function(){var t=this.assessor.getSelectedKeyword();return(0,o.isUndefined)(t)?"":u.Helpers.removeDiacritics(t)}},{key:"getCollector",value:function(){return"post"===rankMath.objectType?P()?new Mn:new pn(this):"term"===rankMath.objectType?new vn:"user"===rankMath.objectType?new Pn:void 0}}],r&&ci(e.prototype,r),n&&ci(e,n),Object.defineProperty(e,"prototype",{writable:!1}),t}();a()((function(){window.rankMathEditor=new si,window.rankMathEditor.setup(),window.RankMathApp=new C})),a()(window).on("load",(function(){a().when(a().ready).then((function(){(0,c.doAction)("rank_math_loaded")}))}))}();