yoastWebpackJsonp([17],{2159:function(e,t,o){"use strict";var n="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},r=new RegExp("\\[[^<>&/\\[\\]\0- =]+?( [^\\]]+?)?\\]","g"),i=new RegExp("\\[/[^<>&/\\[\\]\0- =]+?\\]","g");!function(){var e=function(e){this._app=e,this._app.registerPlugin("YoastShortcodePlugin",{status:"loading"}),this.bindElementEvents();var t="("+wpseoShortcodePluginL10n.wpseo_shortcode_tags.join("|")+")";this.keywordRegex=new RegExp(t,"g"),this.closingTagRegex=new RegExp("\\[\\/"+t+"\\]","g"),this.nonCaptureRegex=new RegExp("\\["+t+"[^\\]]*?\\]","g"),this.parsedShortcodes=[],this.loadShortcodes(this.declareReady.bind(this))};e.prototype.declareReady=function(){this._app.pluginReady("YoastShortcodePlugin"),this.registerModifications()},e.prototype.declareReloaded=function(){this._app.pluginReloaded("YoastShortcodePlugin")},e.prototype.registerModifications=function(){this._app.registerModification("content",this.replaceShortcodes.bind(this),"YoastShortcodePlugin")},e.prototype.removeUnknownShortCodes=function(e){return e=e.replace(r,""),e=e.replace(i,"")},e.prototype.replaceShortcodes=function(e){var t=this.parsedShortcodes;if("string"==typeof e&&t.length>0)for(var o=0;o0))return e();this.parseShortcodes(t,e)},e.prototype.bindElementEvents=function(){var e=document.getElementById("content")||!1,t=_.debounce(this.loadShortcodes.bind(this,this.declareReloaded.bind(this)),500);e&&(e.addEventListener("keyup",t),e.addEventListener("change",t)),"undefined"!=typeof tinyMCE&&"function"==typeof tinyMCE.on&&tinyMCE.on("addEditor",function(e){e.editor.on("change",t),e.editor.on("keyup",t)})},e.prototype.getContentTinyMCE=function(){var e=document.getElementById("content")&&document.getElementById("content").value||"";return"undefined"!=typeof tinyMCE&&void 0!==tinyMCE.editors&&0!==tinyMCE.editors.length&&(e=tinyMCE.get("content")&&tinyMCE.get("content").getContent()||""),e},e.prototype.getUnparsedShortcodes=function(e){if("object"!==(void 0===e?"undefined":n(e)))return console.error("Failed to get unparsed shortcodes. Expected parameter to be an array, instead received "+(void 0===e?"undefined":n(e))),!1;for(var t=[],o=0;o0?void jQuery.post(ajaxurl,{action:"wpseo_filter_shortcodes",_wpnonce:wpseoShortcodePluginL10n.wpseo_filter_shortcodes_nonce,data:e},function(e){this.saveParsedShortcodes(e,t)}.bind(this)):t()},e.prototype.saveParsedShortcodes=function(e,t){e=JSON.parse(e);for(var o=0;o