/*! * froala_editor v4.1.1 (https://www.froala.com/wysiwyg-editor) * License https://froala.com/wysiwyg-editor/terms/ * Copyright 2014-2023 Froala Labs */ !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FroalaEditor=t()}(this,function(){"use strict";function A(e){return(A="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})(e)}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1")},closeTagString:function h(e){return"")},isFirstSibling:function u(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&a.node.hasClass(n,"fr-marker");)n=n.previousSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&u(n)},isLastSibling:function g(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&a.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&g(n)},isList:function C(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function m(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:r,contents:s,isVoid:function v(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=V.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function b(e){return e===a.doc.activeElement&&(!a.doc.hasFocus||a.doc.hasFocus())&&Boolean(r(e)||e.type||e.href||~e.tabIndex)},isEditable:function L(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function E(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function y(e,t){return e instanceof n&&(e=e.get(0)),e&&e.classList&&e.classList.contains(t)},filter:function S(e){return a.browser.msie?e:{acceptNode:e}}}},Object.assign(V.DEFAULTS,{DOMPurify:window.DOMPurify,htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"],htmlRemoveTags:["script","style"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap"],htmlAllowedStyleProps:[".*"],htmlAllowComments:!0,htmlUntouched:!1,fullPage:!1}),V.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},V.MODULES.clean=function(f){var d,p,h,u,g=f.$;function o(e){if(e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=e.getAttribute("class").indexOf("fr-marker"))return!1;var t,n=f.node.contents(e),r=[];for(t=0;t/g,">"):e.textContent.replace(/&/g,"&").replace(//g,">").replace(/\u00A0/g," ").replace(/\u0009/g,"");if(e.nodeType!==Node.ELEMENT_NODE)return e.outerHTML;if(e.nodeType===Node.ELEMENT_NODE&&0<=["STYLE","SCRIPT","NOSCRIPT"].indexOf(e.tagName))return e.outerHTML;if(e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName){var n=document.createElement("div"),r=e.cloneNode(!0);return n.appendChild(r),n.innerHTML}if("IFRAME"===e.tagName)return e.outerHTML.replace(/</g,"<").replace(/>/g,">");var o=e.childNodes;if(0===o.length)return e.outerHTML;for(var i="",a=0;a)<[^<]*)*<\/script>/gi,function(e){return l.push(e),"[FROALA.EDITOR.SCRIPT ".concat(l.length-1,"]")})).replace(/)<[^<]*)*<\/noscript>/gi,function(e){return l.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(l.length-1,"]")})).replace(/"),r=g(n);if(r&&r.length){var o=m(r.html(),L);r.html(o),n=r.get(0).outerHTML}return n})).replace(/":t;var i=c(f.html.extractNodeAttrs(n,"head")),a=c(f.html.extractNodeAttrs(n,"body"));return"".concat(r,"").concat(t,"").concat(e,"")}return e}(r,o,e))}function b(e){var t=f.doc.createElement("DIV");return t.innerText=e,t.textContent}function L(e){for(var t=f.node.contents(e),n=0;n"))}(a),a.nodeType===Node.ELEMENT_NODE&&(a.getAttribute("data-fr-src")&&0!==a.getAttribute("data-fr-src").indexOf("blob:")&&a.setAttribute("data-fr-src",f.helpers.sanitizeURL(b(a.getAttribute("data-fr-src")))),a.getAttribute("href")&&a.setAttribute("href",f.helpers.sanitizeURL(b(a.getAttribute("href")))),a.getAttribute("src")&&a.setAttribute("src",f.helpers.sanitizeURL(b(a.getAttribute("src")))),a.getAttribute("srcdoc")&&a.setAttribute("srcdoc",f.clean.html(a.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(a.tagName)&&(a.innerHTML=a.innerHTML.trim())),!f.opts.pasteAllowLocalImages&&a.nodeType===Node.ELEMENT_NODE&&"IMG"===a.tagName&&a.getAttribute("data-fr-src")&&0===a.getAttribute("data-fr-src").indexOf("file://"))return a.parentNode.removeChild(a),!1;if(a.nodeType===Node.ELEMENT_NODE&&V.HTML5Map[a.tagName]&&""===f.node.attributes(a)){var e=V.HTML5Map[a.tagName],t="<".concat(e,">").concat(a.innerHTML,"");a.insertAdjacentHTML("beforebegin",t),(a=a.previousSibling).parentNode.removeChild(a.nextSibling)}if(f.opts.htmlAllowComments||a.nodeType!==Node.COMMENT_NODE)if(a.tagName&&a.tagName.match(p))"STYLE"==a.tagName&&f.helpers.isMac()&&function(){var e,n=a.innerHTML.trim(),r=[],t=/{([^}]+)}/g;for(n=n.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|$/,"");e=t.exec(n);)r.push(e[1]);for(var o=function o(t){var e=n.substring(0,n.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(e)&&a.parentNode.querySelectorAll(e).forEach(function(e){e.removeAttribute("class"),e.setAttribute("style",r[t])}),n=n.substring(n.indexOf("}")+1)},i=0;-1!=n.indexOf("{");i++)o(i)}(),a.parentNode.removeChild(a);else if(a.tagName&&!a.tagName.match(d))"svg"===a.tagName?a.parentNode.removeChild(a):f.browser.safari&&"path"===a.tagName&&a.parentNode&&"svg"===a.parentNode.tagName||(a.outerHTML=a.innerHTML);else{var n=a.attributes;if(n)for(var r=n.length-1;0<=r;r--){var o=n[r],i=o.nodeName.match(h),s=null;"style"===o.nodeName&&f.opts.htmlAllowedStyleProps.length&&(s=o.value.match(u)),i&&s?o.value=C(s.join(";")):i&&("style"!==o.nodeName||s)||a.removeAttribute(o.nodeName)}}else 0!==a.data.indexOf("[FROALA.EDITOR")&&a.parentNode.removeChild(a)}(e)}return{_init:function e(){f.opts.fullPage&&g.merge(f.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function E(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=!1);var o,i=g.merge([],f.opts.htmlAllowedTags);for(o=0;o").concat(e[n].innerHTML,""));t&&f.selection.restore()}},tables:function t(){!function c(){for(var e=f.el.querySelectorAll("tr"),t=0,n=0;n ul, ol > ol, ul > ol, ol > ul"),t=0;t"))}}(),function c(){for(var e=f.el.querySelectorAll("li > ul, li > ol"),t=0;t ul, li > ol"),t=0;t");else if(n.previousSibling&&"BR"===n.previousSibling.tagName){for(var r=n.previousSibling.previousSibling;r&&f.node.hasClass(r,"fr-marker");)r=r.previousSibling;r&&"BR"!==r.tagName&&g(n.previousSibling).remove()}}}(),function n(){for(var e=f.el.querySelectorAll("li:empty"),t=0;t/g,"%3E").replace(/"/g,"%22").replace(/ /g,"%20"),new RegExp("^".concat(V.LinkRegExHTTP).concat(V.LinkRegExEnd,"$"),"gi").test(e))},getAlignment:function S(e){e.css||(e=s(e));var t=(e.css("text-align")||"").replace(/-(.*)-/g,"");if(["left","right","justify","center"].indexOf(t)<0){if(!a){var n=s('
..
'));s("body").first().append(n);var r=n.find("#s1").get(0).getBoundingClientRect().left,o=n.find("#s2").get(0).getBoundingClientRect().left;n.remove(),a=r=(window.innerHeight||document.documentElement.clientHeight)}}},V.MODULES.events=function(l){var e,i=l.$,a={};function s(e,t,n){C(e,t,n)}function c(e){if(void 0===e&&(e=!0),!l.$wp)return!1;if(l.helpers.isIOS()&&l.$win.get(0).focus(),l.core.hasFocus())return!1;if(!l.core.hasFocus()&&e){var t=l.$win.scrollTop();if(l.browser.msie&&l.$box&&l.$box.css("position","fixed"),l.browser.msie&&l.$wp&&l.$wp.css("overflow","visible"),l.browser.msie&&l.$sc&&l.$sc.css("position","fixed"),l.browser.msie||(p(),l.el.focus(),l.events.trigger("focus"),f()),l.browser.msie&&l.$sc&&l.$sc.css("position",""),l.browser.msie&&l.$box&&l.$box.css("position",""),l.browser.msie&&l.$wp&&l.$wp.css("overflow","auto"),t!==l.$win.scrollTop()&&l.$win.scrollTop(t),!l.selection.info(l.el).atStart)return!1}if(!l.core.hasFocus()||0").concat(e,"")),e}var i={bold:function(){e("bold","strong")},subscript:function(){a.format.is("sup")&&a.format.remove("sup"),e("subscript","sub")},superscript:function(){a.format.is("sub")&&a.format.remove("sub"),e("superscript","sup")},italic:function(){e("italic","em")},strikeThrough:function(){e("strikeThrough","s")},underline:function(){e("underline","u")},undo:function(){a.undo.run()},redo:function(){a.undo.redo()},indent:function(){r(1)},outdent:function(){r(-1)},show:function(){a.opts.toolbarInline&&a.toolbar.showInline(null,!0)},insertHR:function(){a.selection.remove();var e="";a.core.isEmpty()&&(e=l(e="
"));var t='
'.concat(e);a.opts.trackChangesEnabled&&(t=a.track_changes.wrapInTracking(s(t),"hrWrapper").get(0).outerHTML);a.html.insert(t);var n,r=a.$el.find("hr#fr-just").length?a.$el.find("hr#fr-just"):a.$el.find(".fr-just");r.removeAttr("id"),r.removeAttr("class");var o=a.opts.trackChangesEnabled&&"SPAN"===r[0].parentNode.tagName&&"P"===r[0].parentNode.parentNode.tagName;if(0===r.next().length){var i=a.html.defaultTag();i&&!o?r.after(s(a.doc.createElement(i)).append("
").get(0)):o?r[0].parentNode.after(s(a.doc.createElement(i)).append("
").get(0)):r.after("
")}r.prev().is("hr")?n=a.selection.setAfter(r.get(0),!1):r.next().is("hr")?n=a.selection.setBefore(r.get(0),!1):o||a.selection.setAfter(r.get(0),!1)?a.selection.setAfter(r[0].parentNode,!1):a.selection.setBefore(r.get(0),!1),n||void 0===n||(e=l(e="".concat(V.MARKERS,"
")),r.after(e)),a.selection.restore()},clearFormatting:function(){a.format.remove()},selectAll:function(){a.doc.execCommand("selectAll",!1,!1)},moreText:function(e){t(e)},moreParagraph:function(e){t(e)},moreRich:function(e){t(e)},moreMisc:function(e){t(e)},moreTrackChanges:function(){t("trackChanges")}};function t(e){var t=a.$tb.find("[data-cmd=".concat(e,"]")),n=a.$tb.find("[data-cmd=html]");a.opts.trackChangesEnabled||a.markdown&&a.markdown.isEnabled()?n&&n.addClass("fr-disabled"):n&&n.removeClass("fr-disabled"),function r(n){a.helpers.isMobile()&&a.opts.toolbarInline&&a.events.disableBlur();var e=a.$tb.find('.fr-more-toolbar[data-name="'.concat(n.attr("data-group-name"),'"]'));"trackChanges"===n.data("cmd")&&(e=a.$tb.find('.fr-more-toolbar[data-name="'.concat(n.attr("id"),'"]')));if(a.$tb.find(".fr-open").not(n).not('[data-cmd="trackChanges"]').removeClass("fr-open"),n.toggleClass("fr-open"),a.$tb.find(".fr-more-toolbar").removeClass("fr-overflow-visible"),a.$tb.find(".fr-expanded").not(e).length){var t=a.$tb.find(".fr-expanded").not(e);t.each(function(e,t){0!=s(t).data("name").indexOf("trackChanges-")&&0!=s(t).data("name").indexOf("moreRich-")?s(t).toggleClass("fr-expanded"):n.parents('[data-name^="moreRich-"]').length||0==s(t).data("name").indexOf("trackChanges-")||s(t).find('[id^="trackChanges-"]').length&&a.opts.trackChangesEnabled||s(t).toggleClass("fr-expanded")}),e.toggleClass("fr-expanded")}else e.toggleClass("fr-expanded"),a.$box.toggleClass("fr-toolbar-open"),a.$tb.toggleClass("fr-toolbar-open")}(t),a.toolbar.setMoreToolbarsHeight()}function n(e,t){if(!(a.markdown&&a.markdown.isEnabled()&&("bold"===e||"italic"===e||"underline"===e)||a.opts.trackChangesEnabled&&"markdown"===e)&&!1!==a.events.trigger("commands.before",s.merge([e],t||[]))){var n=V.COMMANDS[e]&&V.COMMANDS[e].callback||i[e],r=!0,o=!1;V.COMMANDS[e]&&("undefined"!=typeof V.COMMANDS[e].focus&&(r=V.COMMANDS[e].focus),"undefined"!=typeof V.COMMANDS[e].accessibilityFocus&&(o=V.COMMANDS[e].accessibilityFocus)),(!a.core.hasFocus()&&r||!a.core.hasFocus()&&o&&a.accessibility.hasFocus())&&(a.el.focus({preventScroll:!0}),a.events.trigger("focus")),V.COMMANDS[e]&&!1!==V.COMMANDS[e].undo&&(a.$el.find(".fr-marker").length&&(a.events.disableBlur(),a.selection.restore()),a.undo.saveStep()),n&&n.apply(a,s.merge([e],t||[])),a.events.trigger("commands.after",s.merge([e],t||[])),V.COMMANDS[e]&&!1!==V.COMMANDS[e].undo&&a.undo.saveStep()}}function e(e,t){a.format.toggle(t)}function r(e){a.selection.save(),a.html.wrap(!0,!0,!0,!0),a.selection.restore();for(var t=a.selection.blocks(),n=0;n").concat(V.MARKERS,"
").concat(a)}else c="".concat(s,"
  • ").concat(V.MARKERS,"
    ").concat(a);else c=i?"".concat(s,"<").concat(i,">").concat(V.MARKERS,"
    ").concat(a):"".concat(s+V.MARKERS,"
    ").concat(a);for(;["UL","OL"].indexOf(l.tagName)<0||l.parentNode&&"LI"===l.parentNode.tagName;)l=l.parentNode;b(n).replaceWith('');var f=v.node.openTagString(l)+b(l).html()+v.node.closeTagString(l);f=f.replace(/<\/span>/g,c),b(l).replaceWith(f),v.$el.find("li:empty").remove(),v.$el.find("li > p > span:empty").length&&v.$el.find("li > p > span:empty")[0].parentNode.parentNode.remove()}else if(o&&r||!v.node.isEmpty(n,!0)){var p="
    ",h=e.parentNode;for(h&&"A"===h.tagName&&(h=null);h&&"LI"!==h.tagName;)p=v.node.openTagString(h)+p+v.node.closeTagString(h),h=h.parentNode;if(h&&h.attributes.length){var u=y(h.attributes);b(n).before("
  • ").concat(p,"
  • "))}else b(n).before("
  • ".concat(p,"
  • "));b(e).remove()}else if(o){t=E(n);for(var g="".concat(V.MARKERS,"
    "),C=e.parentNode;C&&"LI"!==C.tagName;)g=v.node.openTagString(C)+g+v.node.closeTagString(C),C=C.parentNode;if(t.parentNode&&"LI"===t.parentNode.tagName)if(t.parentNode.attributes.length){var m=y(t.parentNode.attributes);b(t.parentNode).after("
  • ").concat(g,"
  • "))}else b(t.parentNode).after("
  • ".concat(g,"
  • "));else i?b(t).after("<".concat(i,">").concat(g,"")):b(t).after(g);b(n).remove()}else(t=E(n)).parentNode&&"LI"===t.parentNode.tagName?r?b(t.parentNode).before("".concat(v.node.openTagString(n)+V.MARKERS,"
    ")):b(t.parentNode).after("".concat(v.node.openTagString(n)+V.MARKERS,"
    ")):i?b(t).before("<".concat(i,">").concat(V.MARKERS,"
    ")):b(t).before("".concat(V.MARKERS,"
    ")),b(n).remove()},_middleEnter:function c(e){for(var t=L(e),n="",r=e,o="",i="",a=!1;r!==t;){var s="A"===(r=r.parentNode).tagName&&v.cursor.isAtEnd(e,r)?"fr-to-remove":"";a||r==t||v.node.isBlock(r)||(a=!0,o+=V.INVISIBLE_SPACE),o=v.node.openTagString(b(r).clone().addClass(s).get(0))+o,i+=v.node.closeTagString(r)}n=i+n+o+V.MARKERS+(v.opts.keepFormatOnDelete?V.INVISIBLE_SPACE:""),b(e).replaceWith('');var l=v.node.openTagString(t)+b(t).html()+v.node.closeTagString(t);l=l.replace(/<\/span>/g,n),b(t).replaceWith(l)},_endEnter:function l(e){for(var t=L(e),n=V.MARKERS,r="",o=e,i=!1;o!==t;)if(!(o=o.parentNode).classList.contains("fr-img-space-wrap")&&!o.classList.contains("fr-img-space-wrap2")){var a="A"===o.tagName&&v.cursor.isAtEnd(e,o)?"fr-to-remove":"";i||o===t||v.node.isBlock(o)||(i=!0,r+=V.INVISIBLE_SPACE),r=v.node.openTagString(b(o).clone().addClass(a).get(0))+r,n+=v.node.closeTagString(o)}var s=r+n;b(e).remove(),b(t).after(s)},_backspace:function d(e){var t=L(e),n=t.previousSibling;if(n){n=b(n).find(v.html.blockTagsQuery()).get(-1)||n,b(e).replaceWith(V.MARKERS);var r=v.node.contents(n);r.length&&"BR"===r[r.length-1].tagName&&b(r[r.length-1]).remove(),b(t).find(v.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode===t&&b(this).replaceWith(b(this).html()+(v.node.isEmpty(this)?"":"
    "))});for(var o,i=v.node.contents(t)[0];i&&!v.node.isList(i);)o=i.nextSibling,b(n).append(i),i=o;for(n=t.previousSibling;i;)o=i.nextSibling,b(n).append(i),i=o;1<(r=v.node.contents(n)).length&&"BR"===r[r.length-1].tagName&&b(r[r.length-1]).remove(),b(t).remove()}else{var a=E(t);if(b(e).replaceWith(V.MARKERS),a.parentNode&&"LI"===a.parentNode.tagName){var s=a.previousSibling;v.node.isBlock(s)?(b(t).find(v.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode===t&&b(this).replaceWith(b(this).html()+(v.node.isEmpty(this)?"":"
    "))}),b(s).append(b(t).html())):b(a).before(b(t).html())}else{var l=v.html.defaultTag();l&&0===b(t).find(v.html.blockTagsQuery()).length?b(a).before("<".concat(l,">").concat(b(t).html(),"")):b(a).before(b(t).html())}b(t).remove(),v.html.wrap(),0===b(a).find("li").length&&b(a).remove()}},_del:function f(e){var t,n=L(e),r=n.nextSibling;if(r){(t=v.node.contents(r)).length&&"BR"===t[0].tagName&&b(t[0]).remove(),b(r).find(v.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode===r&&b(this).replaceWith(b(this).html()+(v.node.isEmpty(this)?"":"
    "))});for(var o,i=e,a=v.node.contents(r)[0];a&&!v.node.isList(a);)o=a.nextSibling,b(i).after(a),i=a,a=o;for(;a;)o=a.nextSibling,b(n).append(a),a=o;b(e).replaceWith(V.MARKERS),b(r).remove()}else{for(var s=n;!s.nextSibling&&s!==v.el;)s=s.parentNode;if(s===v.el)return!1;if(s=s.nextSibling,v.node.isBlock(s)){if(V.NO_DELETE_TAGS.indexOf(s.tagName)<0){if(b(e).replaceWith(V.MARKERS),(t=v.node.contents(n)).length&&"BR"===t[t.length-1].tagName&&b(t[t.length-1]).remove(),s.isContentEditable&&"DIV"===s.tagName&&(!v.node.isBlock(s.previousSibling)||"DIV"===s.previousSibling.tagName))return;b(n).append(b(s).html()),b(s).remove()}}else{for((t=v.node.contents(n)).length&&"BR"===t[t.length-1].tagName&&b(t[t.length-1]).remove(),b(e).replaceWith(V.MARKERS);s&&!v.node.isBlock(s)&&"BR"!==s.tagName;)b(n).append(b(s)),s=s.nextSibling;b(s).remove()}}}}},V.NO_DELETE_TAGS=["TH","TD","TR","TABLE","FORM"],V.SIMPLE_ENTER_TAGS=["TH","TD","LI","DL","DT","FORM"],V.MODULES.cursor=function(g){var C=g.$;function h(e){return!!e&&(g.node.isBlock(e)?"P"!==e.tagName||!e.nextElementSibling||!e.parentElement||"OL"!==e.nextElementSibling.tagName||"LI"!==e.parentElement.tagName:e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?h(e.nextSibling):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&h(e.parentNode))}function u(e){return!!e&&(!!g.node.isBlock(e)||(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?u(e.previousSibling):!e.previousSibling&&(!(e.previousSibling||!g.node.hasClass(e.parentNode,"fr-inner"))||u(e.parentNode))))}function m(e,t){return!!e&&(e!==g.$wp.get(0)&&(e.previousSibling&&e.previousSibling.nodeType===Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?m(e.previousSibling,t):!e.previousSibling&&(e.parentNode===t||m(e.parentNode,t))))}function v(e,t){return!!e&&(e!==g.$wp.get(0)&&(e.nextSibling&&e.nextSibling.nodeType===Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?v(e.nextSibling,t):!(e.nextSibling&&(!e.previousSibling||"BR"!==e.nextSibling.tagName||e.nextSibling.nextSibling))&&(e.parentNode===t||v(e.parentNode,t))))}function b(e){return 0=g.opts.tabSpaces)0===i.substr(i.length-g.opts.tabSpaces,i.length-1).replace(/ /g,"").replace(new RegExp(V.UNICODE_NBSP,"g"),"").length&&(a=i.length-g.opts.tabSpaces+1);n.textContent=i.substring(0,a-L(i));var s=n.textContent;(g.opts.enter===V.ENTER_BR&&0");var p=n.parentNode;n.parentNode.removeChild(n),g.node.isEmpty(p)&&C(p).html(V.INVISIBLE_SPACE+V.MARKERS)}else C(n.parentNode).after(V.MARKERS),C(n.parentNode).remove();else C(n).after(V.MARKERS)}else g.node.isDeletable(n)?(C(n).after(V.MARKERS),C(n).remove()):e.nextSibling&&"BR"===e.nextSibling.tagName&&g.node.isVoid(n)&&"BR"!==n.tagName?(C(e.nextSibling).remove(),C(e).replaceWith(V.MARKERS)):!1!==g.events.trigger("node.remove",[C(n)])&&(C(n).after(V.MARKERS),C(n).remove())}else if(V.NO_DELETE_TAGS.indexOf(n.tagName)<0&&(g.node.isEditable(n)||g.node.isDeletable(n)))if(g.node.isDeletable(n))C(e).replaceWith(V.MARKERS),C(n).remove();else if(g.node.isEmpty(n)&&!g.node.isList(n))C(n).remove(),C(e).replaceWith(V.MARKERS);else{for(g.node.isList(n)&&(n=C(n).find("li").last().get(0)),(t=g.node.contents(n))&&0"))}),C(n).append(g.node.contents(a.get(0))),a.remove(),0===C(i).find("li").length&&C(i).remove())}else{if((o=g.node.contents(i)).length&&"BR"===o[0].tagName&&C(o[0]).remove(),"BLOCKQUOTE"!==i.tagName&&"BLOCKQUOTE"===n.tagName)for(o=g.node.contents(n);o.length&&g.node.isBlock(o[o.length-1]);)n=o[o.length-1],o=g.node.contents(n);else if("BLOCKQUOTE"===i.tagName&&"BLOCKQUOTE"!==n.tagName)for(o=g.node.contents(i);o.length&&g.node.isBlock(o[0]);)i=o[0],o=g.node.contents(i);C(e).replaceWith(V.MARKERS),C(n).append(i.innerHTML),C(i).remove()}else{for(C(e).replaceWith(V.MARKERS);i&&"BR"!==i.tagName&&!g.node.isBlock(i)&&g.node.isEditable(i);){var s=i;i=i.nextSibling,C(n).append(s)}i&&"BR"===i.tagName&&g.node.isEditable(i)&&C(i).remove()}}}function n(e){for(var t,n=e;!n.nextSibling;)if(n=n.parentNode,g.node.isElement(n))return!1;if("BR"===(n=n.nextSibling).tagName&&g.node.isEditable(n))if(n.nextSibling){if(g.node.isBlock(n.nextSibling)&&g.node.isEditable(n.nextSibling)){if(!(V.NO_DELETE_TAGS.indexOf(n.nextSibling.tagName)<0))return void C(n).remove();n=n.nextSibling,C(n.previousSibling).remove()}}else if(h(n)){if(b(e))g.cursorLists._del(e);else g.node.deepestParent(n)&&((!g.node.isEmpty(g.node.blockParent(n))||(g.node.blockParent(n).nextSibling&&V.NO_DELETE_TAGS.indexOf(g.node.blockParent(n).nextSibling.tagName))<0)&&C(n).remove(),n&&n.parentNode&&8203===n.parentNode.textContent.charCodeAt()&&n.parentNode.childNodes[1]&&"BR"===n.parentNode.childNodes[1].tagName&&n.parentNode.tagName.toLowerCase()===g.html.defaultTag()&&n.parentNode.nextSibling&&"TABLE"===n.parentNode.nextSibling.tagName&&C(n.parentNode).remove(),i(e));return}if(!g.node.isBlock(n)&&g.node.isEditable(n)){for(t=g.node.contents(n);n.nodeType!==Node.TEXT_NODE&&t.length&&!g.node.isDeletable(n)&&g.node.isEditable(n);)n=t[0],t=g.node.contents(n);n.nodeType===Node.TEXT_NODE?(C(n).before(V.MARKERS),n.textContent.length&&(n.textContent=n.textContent.substring(L(n.textContent,!0),n.textContent.length))):g.node.isDeletable(n)?(C(n).before(V.MARKERS),C(n).remove()):!1!==g.events.trigger("node.remove",[C(n)])&&(C(n).before(V.MARKERS),C(n).remove()),C(e).remove()}else if(V.NO_DELETE_TAGS.indexOf(n.tagName)<0&&(g.node.isEditable(n)||g.node.isDeletable(n)))if(g.node.isDeletable(n))C(e).replaceWith(V.MARKERS),C(n).remove();else if(g.node.isList(n))e.previousSibling?(C(n).find("li").first().prepend(e),g.cursorLists._backspace(e)):(C(n).find("li").first().prepend(V.MARKERS),C(e).remove());else if((t=g.node.contents(n))&&0"+V.MARKERS):r?C(o).after("<".concat(r,">").concat(V.MARKERS,"
    ")):C(o).after("".concat(V.MARKERS,"
    ")),C(e).remove()):S(e,t,n),!1;if(null===o)(r=g.html.defaultTag())&&g.node.isElement(e.parentNode)?C(e).replaceWith("<".concat(r,">").concat(V.MARKERS,"
    ")):!e.previousSibling||C(e.previousSibling).is("br")||e.nextSibling?C(e).replaceWith("
    ".concat(V.MARKERS)):C(e).replaceWith("
    ".concat(V.MARKERS,"
    "));else{var i=e,a="";"PRE"!=o.tagName||e.nextSibling||(t=!0),g.node.isBlock(o)&&!t||(a="
    ");var s,l="",c="",d="",f="";(r=g.html.defaultTag())&&g.node.isBlock(o)&&(d="<".concat(r,">"),f=""),o.tagName===r.toUpperCase()&&(d=g.node.openTagString(C(o).clone().removeAttr("id").get(0))));do{if(i=i.parentNode,!t||i!==o||t&&!g.node.isBlock(o))if(l+=g.node.closeTagString(i),i===o&&g.node.isBlock(o))c=d+c;else{var p=("A"===i.tagName||g.node.hasClass(i,"fa"))&&v(e,i)?"fr-to-remove":"";c="isPasted"===i.getAttribute("id")?g.node.openTagString(C(i).clone().attr("style","").addClass(p).get(0))+c:g.node.openTagString(C(i).clone().addClass(p).get(0))+c}}while(i!==o);a=l+a+c+(e.parentNode===o&&g.node.isBlock(o)?"":V.INVISIBLE_SPACE)+V.MARKERS,g.node.isBlock(o)&&!C(o).find("*").last().is("br")&&C(o).append("
    "),C(e).after(''),C(e).remove(),o.nextSibling&&!g.node.isBlock(o.nextSibling)||g.node.isBlock(o)||C(o).after("
    "),s=(s=!t&&g.node.isBlock(o)?g.node.openTagString(o)+C(o).html()+f:g.node.openTagString(o)+C(o).html()+g.node.closeTagString(o)).replace(/<\/span>/g,a),C(o).replaceWith(s)}}function S(e,t,n){var r=g.node.deepestParent(e,[],!n);if(null===r)g.html.defaultTag()&&e.parentNode===g.el?C(e).replaceWith("<".concat(g.html.defaultTag(),">").concat(V.MARKERS,"
    ")):(e.nextSibling&&!g.node.isBlock(e.nextSibling)||C(e).after("
    "),C(e).replaceWith("
    ".concat(V.MARKERS)));else if(e.previousSibling&&"IMG"==e.previousSibling.tagName||e.nextSibling&&"IMG"==e.nextSibling.tagName)C(e).replaceWith("<"+g.html.defaultTag()+">"+V.MARKERS+"
    ");else{var o=e,i="";"PRE"===r.tagName&&(t=!0),g.node.isBlock(r)&&!t||(i="
    ");var a="",s="";do{var l=o;if(o=o.parentNode,"BLOCKQUOTE"===r.tagName&&g.node.isEmpty(l)&&!g.node.hasClass(l,"fr-marker")&&C(l).contains(e)&&C(l).after(e),"BLOCKQUOTE"!==r.tagName||!v(e,o)&&!m(e,o))if(!t||o!==r||t&&!g.node.isBlock(r)){a+=g.node.closeTagString(o);var c="A"==o.tagName&&v(e,o)||g.node.hasClass(o,"fa")?"fr-to-remove":"";s=g.node.openTagString(C(o).clone().addClass(c).removeAttr("id").get(0))+s,g.opts.enter!==V.ENTER_DIV&&o===r&&"DIV"===r.tagName&&(a="
    ",s="")}else"BLOCKQUOTE"==r.tagName&&t&&(s=a="")}while(o!==r);var d=r===e.parentNode&&g.node.isBlock(r)||e.nextSibling;if("BLOCKQUOTE"===r.tagName)if(e.previousSibling&&g.node.isBlock(e.previousSibling)&&e.nextSibling&&"BR"===e.nextSibling.tagName&&(C(e.nextSibling).after(e),e.nextSibling&&"BR"===e.nextSibling.tagName&&C(e.nextSibling).remove()),t)i=a+i+V.MARKERS+s;else{var f=g.html.defaultTag();i="".concat(a+i+(f?"<".concat(f,">"):"")+V.MARKERS,"
    ").concat(f?""):"").concat(s)}else i=a+i+s+(d?"":V.INVISIBLE_SPACE)+V.MARKERS;C(e).replaceWith('');var p=g.node.openTagString(r)+C(r).html()+g.node.closeTagString(r);p=p.replace(/<\/span>/g,i),C(r).replaceWith(p)}}function N(e){var t=e.getBoundingClientRect(),n=window.pageXOffset||document.documentElement.scrollLeft,r=window.pageYOffset||document.documentElement.scrollTop;return{top:t.top+r,left:t.left+n}}function T(){var e=g.selection.get(),t=null;if(g.selection.inEditor()&&e.rangeCount)for(var n=g.selection.ranges(),r=0;r").concat(V.MARKERS,"
    ")):C(o).before("".concat(V.MARKERS,"
    ")),C(e).remove(),!1}else v(e,o)?y(e,t,!0):S(e,t,!0);if(null===o)(r=g.html.defaultTag())&&g.node.isElement(e.parentNode)?C(e).replaceWith("<".concat(r,">").concat(V.MARKERS,"
    ")):C(e).replaceWith("
    ".concat(V.MARKERS));else{if(r=g.html.defaultTag(),g.node.isBlock(o))if("PRE"===o.tagName&&(t=!0),t)C(e).remove(),C(o).prepend("
    ".concat(V.MARKERS));else if(e.nextSibling&&"IMG"==e.nextSibling.tagName||e.nextSibling&&e.nextSibling.nextElementSibling&&"IMG"==e.nextSibling.nextElementSibling)C(e).replaceWith("<"+g.html.defaultTag()+">"+V.MARKERS+"
    ");else{if(g.node.isEmpty(o,!0))return y(e,t,n);if(g.opts.keepFormatOnDelete||"DIV"===o.tagName||"div"===g.html.defaultTag())if(!g.opts.keepFormatOnDelete&&"DIV"===o.tagName||"div"===g.html.defaultTag())C(o).before("<"+g.html.defaultTag()+">
    ");else if(g.opts.keepFormatOnDelete&&!g.opts.htmlUntouched&&"DIV"!==o.tagName&&"div"!==g.html.defaultTag()&&u(g.selection.get().focusNode))C(o).before("".concat(g.node.openTagString(C(o).clone().removeAttr("id").get(0)),"
    ").concat(g.node.closeTagString(o)));else{for(var i=e,a=V.INVISIBLE_SPACE;i!==o&&!g.node.isElement(i);)i=i.parentNode,a=g.node.openTagString(i)+a+g.node.closeTagString(i);C(o).before(a)}else C(o).before("".concat(g.node.openTagString(C(o).clone().removeAttr("id").get(0)),"
    ").concat(g.node.closeTagString(o)))}else C(o).before("
    ");C(e).remove()}}(t,e,r):g.cursorLists._startEnter(t):!b(t)||e||r?S(t,e,r):g.cursorLists._middleEnter(t),function p(){g.$el.find(".fr-to-remove").each(function(){for(var e=g.node.contents(this),t=0;to){var i=T();if(i){var a=N(i);a=a.top;var s=i.getBoundingClientRect().top;g.opts.scrollableContainer&&g.opts.enter!==V.ENTER_BR&&"BR"===i.tagName&&s+20===o&&(s=a=i.parentNode.offsetTop),i.parentNode&&"TD"===i.parentNode.tagName&&og.$sc[0].scrollTop+C(g.$sc).height()&&g.$sc[0].scroll(0,a-C(g.$sc).height()+2*g.$tb.height())}}else if(g.opts.scrollableContainer&&g.opts.toolbarSticky){var l=T();if(l){var c=N(l);c=c.top;var d=l.getBoundingClientRect().top;g.opts.enter!==V.ENTER_BR&&"BR"===l.tagName&&(d=c=l.parentNode.offsetTop),(g.opts.iframe&&d+2*g.$tb.height()>g.$sc[0].scrollTop+C(g.$sc).height()||d+2*g.$tb.height()>C(g.$sc).height())&&g.$sc[0].scroll(0,c-C(g.$sc).height()+2*g.$tb.height())}}},backspace:function s(){var e=!1,t=g.markers.insert();if(!t)return!0;for(var n=t.parentNode;n&&!g.node.isElement(n);){if("false"===n.getAttribute("contenteditable"))return C(t).replaceWith(V.MARKERS),g.selection.restore(),!1;if(n.innerText.length&&"true"===n.getAttribute("contenteditable"))break;n=n.parentNode}g.el.normalize();var r=t.previousSibling;if(r){var o=r.textContent;o&&o.length&&8203===o.charCodeAt(o.length-1)&&(1===o.length?C(r).remove():r.textContent=r.textContent.substr(0,o.length-L(o)))}return h(t)?b(t)&&m(t,C(t).parents("li").first().get(0))?g.cursorLists._backspace(t):e=E(t):u(t)?b(t)&&m(t,C(t).parents("li").first().get(0))?g.cursorLists._backspace(t):function c(e){for(var t=0 div").first(),b=v.find("> a"),"rtl"===f.opts.direction&&v.css("left","auto").css("right",0).attr("direction","rtl"),e++}function C(e){for(var t=[M("9qqG-7amjlwq=="),M("KA3B3C2A6D1D5H5H1A3=="),M("3B9B3B5F3C4G3E3=="),M("QzbzvxyB2yA-9m=="),M("ji1kacwmgG5bc=="),M("nmA-13aogi1A3c1jd=="),M("BA9ggq=="),M("emznbjbH3fij=="),M("tkC-22d1qC-13sD1wzF-7=="),M("tA3jjf=="),M("1D1brkm==")],n=0;nthis.length)&&(t=this.length),this.substring(t-e.length,t)===e}),e.endsWith(t[n]))return!0;return!1}function m(){var e=M(p(n)),t=M(p("tzgatD-13eD1dtdrvmF3c1nrC-7saQcdav==")).split(".");try{return window.parent.document.querySelector(e)&&window[t[1]][t[2]]}catch(e){return!1}}var v,b,L=f.$,E="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2FC1A3NB2IF1HE1TH4WB8eB-11zVG2F3I3yYB5ZG4CB2DA15CC5AD3F1A1KG1oLA10B1A6wQF1H3vgale2C4F4XA2qc2A5D5B3pepmriKB3OE1HD1fUC10pjD-11E-11TB4YJ3bC-16zE-11yc1B2CE2BC3jhjKC1pdA-21OA6C1D5B-8vF4QA11pD6sqf1C3lldA-16BD4A2H3qoEA7bB-16rmNH5H1F1vSB7RE2A3TH4YC5A5b1A4d1B3whepyAC3AA2zknC3mbgf1SC4WH4PD8TC5ZB2C3H3jb2A5ZA2EF2aoFC5qqHC4B1H1zeGA7UA5RF4TA29TA6ZC4d1C3hyWA10A3rBB2E3decorationRD3QC10UD3E6E6ZD2F3F3fme2E5uxxrEC9C3E4fB-11azhHB1LD7D6VF4VVTPC6b1C4TYG3qzDD6B3B3AH4I2H2kxbHE1JD1yihfd1QD6WB1D4mhrc1B5rvFG3A14A7cDA2OC1AA1JB5zC-16KA6WB4C-8wvlTB5A5lkZB2C2C7zynBD2D2bI-7C-21d1HE2cubyvPC8A6VB3aroxxZE4C4F4e1I2BE1WjdifH1H4A14NA1GB1YG-10tWA3A14A9sVA2C5XH2A29b2A6gsleGG2jaED2D-13fhE1OA8NjwytyTD4e1sc1D-16ZC3B5C-9e1C2FB6EFF5B2C2JH4E1C2tdLE5A3UG4G-7b2D3B4fA-9oh1G3kqvB4AG3ibnjcAC6D2B1cDA9KC2QA6bRC4VA30RB8hYB2A4A-8h1A21A2B2==",y="7D4YH4fkhHB3pqDC3H2E1fkMD1IB1NF1D3QD9wB5rxqlh1A8c2B4ZA3FD2AA6FB5EB3jJG4D2J-7aC-21GB6PC5RE4TC11QD6XC4XE3XH3mlvnqjbaOA2OC2BE6A1fmI-7ujwbc1G5f1F3e1C11mXF4owBG3E1yD1E4F1D2D-8B-8C-7yC-22HD1MF5UE4cWA3D8D6a1B2C3H3a3I3sZA4B3A2akfwEB3xHD5D1F1wIC11pA-16xdxtVI2C9A6YC4a1A2F3B2GA6B4C3lsjyJB1eMA1D-11MF5PE4ja1D3D7byrf1C3e1C7D-16lwqAF3H2A1B-21wNE1MA1OG1HB2A-16tSE5UD4RB3icRA4F-10wtwzBB3E1C3CC2DA8LA2LA1EB1kdH-8uVB7decorg1J2B7B6qjrqGI2J1C6ijehIB1hkemC-13hqkrH4H-7QD6XF5XF3HLNAC3CB2aD2CD2KB10B4ycg1A-8KA4H4B11jVB5TC4yqpB-21pd1E4pedzGB6MD5B3ncB-7MA4LD2JB6PD5uH-8TB9C7YD5XD2E3I3jmiDB3zeimhLD8E2F2JC1H-9ivkPC5lG-10SB1D3H3A-21rc1A3d1E3fsdqwfGA2KA1OrC-22LA6D1B4afUB16SC7AitC-8qYA11fsxcajGA15avjNE2A-9h1hDB16B9tPC1C5F5UC1G3B8d2A5d1D4RnHJ3C3JB5D3ucMG1yzD-17hafjC-8VD3yWC6e1YD2H3ZE2C8C5oBA3H3D2vFA4WzJC4C2i1A-65fNB8afWA1H4A26mvkC-13ZB3E3h1A21BC4eFB2GD2AA5ghqND2A2B2==",n="MekC-11nB-8tIzpD7pewxvzC6mD-16xerg1==",S="lC4B3A3B2B5A1C2E4G1A2==",N="sC-7OB2fwhVC4vsG-7ohPA4ZD4D-8f1J3stzB-11bFE2EE1MA2ND1KD1IE4cA-21pSD2D5ve1G3h1A8b1E5ZC3CD2FA16mC5OC5E1hpnG1NA10B1D7hkUD4I-7b2C3C5nXD2E3F3whidEC2EH3GI2mJE2E2bxci1WA10VC7pllSG2F3A7xd1A4ZC3DB2aaeGA2DE4H2E1j1ywD-13FD1A3VE4WA3D8C6wuc1A2hf1B5B7vnrrjA1B9ic1mpbD1oMB1iSB7rWC4RI4G-7upB6jd1A2F3H2EA4FD3kDF4A2moc1anJD1TD4VI4b2C7oeQF4c1E3XC7ZA3C3G3uDB2wGB6D1JC4D1JD4C1hTE6QC5pH4pD3C-22D7c1A3textAA4gdlB2mpozkmhNC1mrxA3yWA5edhg1I2H3B7ozgmvAI3I2B5GD1LD2RSNH1KA1XA5SB4PA3sA9tlmC-9tnf1G3nd1coBH4I2I2JC3C-16LE6A1tnUA3vbwQB1G3f1A20a3A8a1C6pxAB2eniuE1F3kH2lnjB2hB-16XA5PF1G4zwtYA5B-11mzTG2B9pHB3BE2hGH3B3B2cMD5C1F1wzPA8E7VG5H5vD3H-7C8tyvsVF2I1G2A5fE3bg1mgajoyxMA4fhuzSD8aQB2B4g1A20ukb1A4B3F3GG2CujjanIC1ObiB11SD1C5pWC1D4YB8YE5FE-11jXE2F-7jB4CC2G-10uLH4E1C2tA-13yjUH5d1H1A7sWD5E4hmjF-7pykafoGA16hDD4joyD-8OA33B3C2tC7cRE4SA31a1B8d1e2A4F4g1A2A22CC5zwlAC2C1A12==",T=function(){for(var e=0,t=document.domain,n=t.split("."),r="_gd".concat((new Date).getTime());e")}(e)),x.selection.restore()}else{x.selection.save();var o,i=x.$el.find('.fr-marker[data-type="true"]').length&&x.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling;v(i,e,t),O(i).parent().find("a:empty").remove();do{for(o=x.$el.find("".concat(w(e,t)," > ").concat(w(e,t))),n=0;n
    '),i=l.html().replace(/<\/span>/,a+x.node.closeTagString(l.get(0))+s+c+a+x.node.openTagString(l.get(0))+s),l.replaceWith(x.node.openTagString(l.get(0))+i+x.node.closeTagString(l.get(0))),!0}return!1}function c(e,t){void 0===t&&(t={}),t.style&&delete t.style;var n=x.selection.isCollapsed();x.selection.save();var r=x.$el.find(".fr-marker");if(e&&r.length&&(r[0].parentNode&&r[0].parentNode.tagName===e.toUpperCase()||r[1].parentNode.tagName===e.toUpperCase())){var o=r[0];r[0].parentNode.tagName!==e.toUpperCase()&&(o=r[1]);for(var i=o.parentNode.previousSibling;null!=i;)i.nodeType===Node.TEXT_NODE&&(i.textContent=i.textContent.replace(/\u200B/g,"")),i=i.previousSibling;for(var a=o.parentNode.nextSibling;null!=a;)a.nodeType===Node.TEXT_NODE&&(a.textContent=a.textContent.replace(/\u200B/g,"")),a=a.nextSibling}for(var s=!0;s;){s=!1;for(var l=x.$el.find(".fr-marker"),c=0;c')){if(x.node.isEmpty(d.get(0)))c=O(x.doc.createElement("span")).attr("style","".concat(e,": ").concat(t,";")).html("".concat(V.INVISIBLE_SPACE).concat(V.MARKERS)),d.replaceWith(c);else{var f={};f["style*"]="".concat(e,":"),$(r,"span",f,!0),r=x.$el.find(".fr-marker"),t?(c=O(x.doc.createElement("span")).attr("style","".concat(e,": ").concat(t,";")).html("".concat(V.INVISIBLE_SPACE).concat(V.MARKERS)),r.replaceWith(c)):r.replaceWith(V.INVISIBLE_SPACE+V.MARKERS)}x.html.cleanEmptyTags()}else x.node.isEmpty(d.get(0))&&d.is("span")?(r.replaceWith(V.MARKERS),d.css(e,t)):(r.get(0).nextSibling&&x.node.isBlock(r.get(0).nextSibling)&&!r.get(0).previousSibling&&"LI"===r.get(0).parentNode.tagName&&r.get(0).nextSibling.prepend(r.get(0)),c=O('').concat(V.INVISIBLE_SPACE).concat(V.MARKERS,"")),r.replaceWith(c));c&&L(c,e,t)}else{if(x.selection.save(),null===t||"color"===e&&0").concat(c);e.replaceWith('');var u=a.get(0).outerHTML;O(a.get(0)).replaceWith(u.replace(/<\/span>/g,function(){return h}))}}function d(e,t){void 0===t&&(t={}),t.style&&delete t.style;var n=x.selection.ranges(0),r=n.startContainer;if(r.nodeType===Node.ELEMENT_NODE&&0"),V.END_MARKER='"),V.MARKERS=V.START_MARKER+V.END_MARKER,V.MODULES.markers=function(d){var f=d.$;function l(){if(!d.$wp)return null;try{var e=d.selection.ranges(0),t=e.commonAncestorContainer;if(t!==d.el&&!d.$el.contains(t))return null;var n=e.cloneRange(),r=e.cloneRange();n.collapse(!0);var o=f(d.doc.createElement("SPAN")).addClass("fr-marker").attr("style","display: none; line-height: 0;").html(V.INVISIBLE_SPACE).get(0);if(n.insertNode(o),o=d.$el.find("span.fr-marker").get(0)){for(var i=o.nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)f(i).remove(),i=d.$el.find("span.fr-marker").get(0).nextSibling;return d.selection.clear(),d.selection.get().addRange(r),o}return null}catch(a){}}function c(){d.$el.find(".fr-marker").remove()}return{place:function p(e,t,n){var r,o,i;try{var a=e.cloneRange();if(a.collapse(t),a.insertNode(function l(e,t){var n=f(d.doc.createElement("SPAN"));return n.addClass("fr-marker").attr("data-id",t).attr("data-type",e).attr("style","display: ".concat(d.browser.safari?"none":"inline-block","; line-height: 0;")).html(V.INVISIBLE_SPACE),n.get(0)}(t,n)),!0===t)for(i=(r=d.$el.find('span.fr-marker[data-type="true"][data-id="'.concat(n,'"]')).get(0)).nextSibling;i&&i.nodeType===Node.TEXT_NODE&&0===i.textContent.length;)f(i).remove(),i=r.nextSibling;if(!0===t&&!e.collapsed){for(;!d.node.isElement(r.parentNode)&&!i;)-1'):f(t).append('');else if(d.cursor.isAtStart(e,t))f(t).before(''),f(e).remove();else if(d.cursor.isAtEnd(e,t))f(t).after(''),f(e).remove();else{for(var n=e,r="",o="";n=n.parentNode,r+=d.node.closeTagString(n),o=d.node.openTagString(n)+o,n!==t;);f(e).replaceWith('');var i=d.node.openTagString(t)+f(t).html()+d.node.closeTagString(t);i=i.replace(/<\/span>/g,"".concat(r,'').concat(o)),f(t).replaceWith(i)}return d.$el.find(".fr-marker").get(0)},insertAtPoint:function h(e){var t,n=e.clientX,r=e.clientY;c();var o=null;if("undefined"!=typeof d.doc.caretPositionFromPoint?(t=d.doc.caretPositionFromPoint(n,r),(o=d.doc.createRange()).setStart(t.offsetNode,t.offset),o.setEnd(t.offsetNode,t.offset)):"undefined"!=typeof d.doc.caretRangeFromPoint&&(t=d.doc.caretRangeFromPoint(n,r),(o=d.doc.createRange()).setStart(t.startContainer,t.startOffset),o.setEnd(t.startContainer,t.startOffset)),null!==o&&"undefined"!=typeof d.win.getSelection){var i=d.win.getSelection();i.removeAllRanges(),i.addRange(o)}else if("undefined"!=typeof d.doc.body.createTextRange)try{(o=d.doc.body.createTextRange()).moveToPoint(n,r);var a=o.duplicate();a.moveToPoint(n,r),o.setEndPoint("EndToEnd",a),o.select()}catch(s){return!1}l()},remove:c}},V.MODULES.selection=function(E){var y=E.$;function s(){var e="";return E.win.getSelection?e=E.win.getSelection():E.doc.getSelection?e=E.doc.getSelection():E.doc.selection&&(e=E.doc.selection.createRange().text),e.toString()}function L(){return E.win.getSelection?E.win.getSelection():E.doc.getSelection?E.doc.getSelection():E.doc.selection.createRange()}function f(e){var t=L(),n=[];if(t&&t.getRangeAt&&t.rangeCount){n=[];for(var r=0;r'.concat(t[e].innerHTML));var n=!1,r=o(E.el);for(r.atStart&&r.atEnd&&(n=!0),t=E.el.querySelectorAll(".fr-mk"),e=0;e"):y(o).find(".fr-inner").filter(O).html("
    "):(y(o).empty(),y(o).attr("data-del-cell",!0)):0"),E.spaces.normalize());var m=E.$el.find(".fr-marker").last().get(0),v=E.$el.find(".fr-marker").first().get(0);void 0!==m&&void 0!==v&&!m.nextSibling&&v.previousSibling&&"BR"===v.previousSibling.tagName&&E.node.isElement(m.parentNode)&&E.node.isElement(v.parentNode)&&E.$el.append("
    "),T()},blocks:function u(e){var t,n,r=[],o=L();if(h()&&o.rangeCount){var i=f();for(t=0;t"))}function t(){f.$wp.removeClass("show-placeholder")}function n(){if(!f.$wp)return!1;f.core.isEmpty()?e():t()}return{_init:function r(){if(!f.$wp)return!1;f.events.on("init input keydown keyup contentChanged initialized",n)},show:e,hide:t,refresh:n,isVisible:function o(){return!f.$wp||f.node.hasClass(f.$wp.get(0),"show-placeholder")}}},V.UNICODE_NBSP=String.fromCharCode(160),V.VOID_ELEMENTS=["area","base","br","col","embed","hr","img","input","keygen","link","menuitem","meta","param","source","track","wbr"],V.BLOCK_TAGS=["address","article","aside","audio","blockquote","canvas","details","dd","div","dl","dt","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","li","main","nav","noscript","ol","output","p","pre","section","table","tbody","td","tfoot","th","thead","tr","ul","video"],Object.assign(V.DEFAULTS,{htmlAllowedEmptyTags:["textarea","a","iframe","object","video","style","script",".fa",".fr-emoticon",".fr-inner","path","line","hr"],htmlDoNotWrapTags:["script","style"],htmlSimpleAmpersand:!1,htmlIgnoreCSSProperties:[],htmlExecuteScripts:!0}),V.MODULES.html=function(w){var u=w.$;function d(){return w.opts.enter===V.ENTER_P?"p":w.opts.enter===V.ENTER_DIV?"div":w.opts.enter===V.ENTER_BR?null:void 0}function s(e,t){return!(!e||e===w.el)&&(t?-1!=["PRE","SCRIPT","STYLE"].indexOf(e.tagName)||s(e.parentNode,t):-1!==["PRE","SCRIPT","STYLE"].indexOf(e.tagName))}function i(e){var t,n=[],r=[];if(e){var o=w.el.querySelectorAll(".fr-marker");for(t=0;t";return t&&(n="")),n}function c(e){var t=e.parentNode;if(t&&(w.node.isBlock(t)||w.node.isElement(t))&&["TD","TH"].indexOf(t.tagName)<0){for(var n=e.previousSibling,r=e.nextSibling;n&&(n.nodeType===Node.TEXT_NODE&&0===n.textContent.replace(/\n|\r/g,"").length||w.node.hasClass(n,"fr-tmp"));)n=n.previousSibling;if(r)return!1;n&&t&&"BR"!==n.tagName&&!w.node.isBlock(n)&&!r&&0").concat(V.MARKERS,"
    ")),w.selection.restore()):w.$el.html("<".concat(d(),">
    "))):w.el.querySelector("*:not(.fr-marker):not(br)")||(w.core.hasFocus()?(w.$el.html("".concat(V.MARKERS,"
    ")),w.selection.restore()):w.$el.html("
    ")))}function C(e,t){return r(e,"<".concat(t,"[^>]*?>([\\w\\W]*)"),1)}function m(e,t){var n=u("
    ]*?)>"),1)||"",">"));return w.node.rawAttributes(n.get(0))}function v(e){return(r(e,"]*?)>",0)||"").replace(/\n/g," ").replace(/ {2,}/g," ")}function b(e,t){w.opts.htmlExecuteScripts?e.html(t):e.get(0).innerHTML=t}function $(e){var t;(t=/:not\(([^)]*)\)/g).test(e)&&(e=e.replace(t," $1 "));var n=100*(e.match(/(#[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(\[[^]]+\])/g)||[]).length+10*(e.match(/(\.[^\s+>~.[:]+)/g)||[]).length+10*(e.match(/(:[\w-]+\([^)]*\))/gi)||[]).length+10*(e.match(/(:[^\s+>~.[:]+)/g)||[]).length+(e.match(/(::[^\s+>~.[:]+|:first-line|:first-letter|:before|:after)/gi)||[]).length;return n+=((e=(e=e.replace(/[*\s+>~]/g," ")).replace(/[#.]/g," ")).match(/([^\s+>~.[:]+)/g)||[]).length}function H(e){if(w.events.trigger("html.processGet",[e]),e&&e.getAttribute&&""===e.getAttribute("class")&&e.removeAttribute("class"),e&&e.getAttribute&&""===e.getAttribute("style")&&e.removeAttribute("style"),e&&e.nodeType===Node.ELEMENT_NODE){var t,n=e.querySelectorAll('[class=""],[style=""]');for(t=0;t")}},cleanEmptyTags:e,cleanWhiteTags:h,cleanBlankSpaces:n,blocks:function S(){return w.$el.get(0).querySelectorAll(p())},getDoctype:k,set:function N(e){var t=w.clean.html((e||"").trim(),[],[],w.opts.fullPage),n=new RegExp("%3A//","g"),r=t.replace(n,"://");if(w.opts.fullPage){var o=C(r,"body")||(0<=r.indexOf("",s=m(r,"head"),l=u("
    ");l.append(a).contents().each(function(){(this.nodeType===Node.COMMENT_NODE||0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName))&&this.parentNode.removeChild(this)});var c=l.html().trim();a=u("
    ").append(a).contents().map(function(){return this.nodeType===Node.COMMENT_NODE?"\x3c!--".concat(this.nodeValue,"--\x3e"):0<=["BASE","LINK","META","NOSCRIPT","SCRIPT","STYLE","TEMPLATE","TITLE"].indexOf(this.tagName)?this.outerHTML:""}).toArray().join("");var d=v(r),f=m(r,"html");b(w.$el,"".concat(c,"\n").concat(o)),w.node.clearAttributes(w.el),w.$el.attr(i),w.$el.addClass("fr-view"),w.$el.attr("spellcheck",w.opts.spellcheck),w.$el.attr("dir",w.opts.direction),b(w.$head,a),w.node.clearAttributes(w.$head.get(0)),w.$head.attr(s),w.node.clearAttributes(w.$html.get(0)),w.$html.attr(f),w.iframe_document.doctype.parentNode.replaceChild(function h(e,t){var n=e.match(//i);return n?t.implementation.createDocumentType(n[1],n[3],n[4]):t.implementation.createDocumentType("html")}(d,w.iframe_document),w.iframe_document.doctype)}else b(w.$el,r);var p=w.edit.isDisabled();w.edit.on(),w.core.injectStyle(w.opts.iframeDefaultStyle+w.opts.iframeStyle),g(),w.opts.useClasses||(w.$el.find("[fr-original-class]").each(function(){this.setAttribute("class",this.getAttribute("fr-original-class")),this.removeAttribute("fr-original-class")}),w.$el.find("[fr-original-style]").each(function(){this.setAttribute("style",this.getAttribute("fr-original-style")),this.removeAttribute("fr-original-style")})),p&&w.edit.off(),w.events.trigger("html.set"),w.events.trigger("charCounter.update")},syncInputs:_,get:function B(e,t){if(!w.$wp)return w.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;var n="";w.events.trigger("html.beforeGet");var r,o,i=[],a={},s=[];if(_(),!w.opts.useClasses&&!t){var l=new RegExp("^".concat(w.opts.htmlIgnoreCSSProperties.join("$|^"),"$"),"gi");for(r=0;r=a[u[o]][v]&&(a[u[o]][v]=g,C[m].trim().length))){var b=C[m].trim().split(":");b.splice(0,1);var L=b.join(":").trim();-1").concat(w.$html.find("head").get(0).outerHTML,""));else if(void 0===e&&(e=!1),w.opts.fullPage){n=k(w.iframe_document),w.$el.removeClass("fr-view");var T=w.opts.heightMin,M=w.opts.height,A=w.opts.heightMax;w.opts.heightMin=null,w.opts.height=null,w.opts.heightMax=null,w.size.refresh(),n+="").concat(w.$html.html(),""),w.opts.iframe&&w.$html&&0(?:[\w\W]*?)<\/style>/g,"")).replace(/]*)data-fr-style="true"([^>]*)>/g,"")).replace(/(?:[\w\W]*?)<\/style>/g,"")).replace(/((?:[\w\W]*?))<\/body>/g,"$3")).replace(/((?:[\w\W]*?))<\/body>/g,"$4")).replace(/((?:[\w\W]*?))<\/body>/g,"$4")).replace(/((?:[\w\W]*?))<\/body>/g,'$6')).replace(/((?:[\w\W]*?))<\/body>/g,"$3")),w.opts.htmlSimpleAmpersand&&(n=n.replace(/&/gi,"&")),w.events.trigger("html.afterGet"),e||(n=n.replace(/]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,"")),n=w.clean.invisibleSpaces(n),n=w.clean.exec(n,H);var x=w.events.chainTrigger("html.get",n);return"string"==typeof x&&(n=x),n=(n=n.replace(/(?:[\w\W]*?)<\/pre>/g,function(e){return e.replace(/
    /g,"\n")})).replace(/ ".concat(r,"")),e.indexOf('class="fr-marker"')<0&&(r=function a(e){var t=w.doc.createElement("div");return t.innerHTML=e,w.selection.setAtEnd(t,!0),t.innerHTML}(r)),w.node.isEmpty(w.el)&&!w.opts.keepFormatOnDelete&&f(r))w.opts.trackChangesEnabled?w.track_changes.pasteInEmptyEdior(r):w.el.innerHTML=r;else{(function s(){var e=w.selection.ranges(0).commonAncestorContainer;return e!==w.el&&!w.$el.contains(e)})()&&w.selection.restore();var o=w.markers.insert();if(o)if(w.opts.trackChangesEnabled)w.track_changes.pasteInEdior(r);else{w.node.isLastSibling(o)&&u(o).parent().hasClass("fr-deletable")&&u(o).insertAfter(u(o).parent());var i=w.node.blockParent(o);if((f(r)||n)&&(w.node.deepestParent(o)||i&&"LI"===i.tagName)){if(i&&"LI"===i.tagName&&(r=function l(e){if(!w.html.defaultTag())return e;var t=w.doc.createElement("div");t.innerHTML=e;for(var n=t.querySelectorAll(":scope > ".concat(w.html.defaultTag())),r=n.length-1;0<=r;r--){var o=n[r];w.node.isBlock(o.previousSibling)||(o.previousSibling&&!w.node.isEmpty(o)&&u("
    ").insertAfter(o.previousSibling),o.outerHTML=o.innerHTML)}return t.innerHTML}(r)),!(o=w.markers.split()))return!1;o.outerHTML=r}else o.outerHTML=r}else w.el.innerHTML+=r}g(),w.keys.positionCaret(),w.events.trigger("html.inserted")},wrap:t,unwrap:function A(){w.$el.find("div.fr-temp-div").each(function(){this.previousSibling&&this.previousSibling.nodeType===Node.TEXT_NODE&&u(this).before("
    "),u(this).attr("data-empty")||!this.nextSibling||w.node.isBlock(this.nextSibling)&&!u(this.nextSibling).hasClass("fr-temp-div")?u(this).replaceWith(u(this).html()):u(this).replaceWith("".concat(u(this).html(),"
    "))}),w.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter(function(){return""===u(this).attr("class")}).removeAttr("class")},escapeEntities:function x(e){return e.replace(//gi,">").replace(/"/gi,""").replace(/'/gi,"'")},checkIfEmpty:o,extractNode:C,extractNodeAttrs:m,extractDoctype:v,cleanBRs:function O(){for(var e=w.el.getElementsByTagName("br"),t=0;t").concat(V.MARKERS,"
    ")):p.$el.html("".concat(V.MARKERS,"
    ")),p.selection.restore(),p.placeholder.refresh(),p.button.bulkRefresh(),p.undo.saveStep()},0)}function o(){u=!1}function i(){u=!1}function m(){var e=p.html.defaultTag();e?p.$el.html("<".concat(e,">").concat(V.MARKERS,"
    ")):p.$el.html("".concat(V.MARKERS,"
    ")),p.selection.restore()}function v(e,t){var n=(e&&e.parentElement).parentElement;if(e.parentElement&&(-1/g,"")).length<1?e.parentElement.insertAdjacentHTML("afterbegin"," "):" "!=r&&" "!=r&&"Backspace"==t.key?g(t):" "!=r&&" "!=r&&"Delete"==t.key&&C(t),!0}if(a(e).is("p")){var o=e.innerHTML.replace(/
    /g,"");return o.length<1?e.insertAdjacentHTML("afterbegin"," "):" "!=o&&" "!=o&&"Backspace"==t.key?g(t):" "!=o&&" "!=o&&"Delete"==t.key&&C(t),!0}}return!1}function s(e){var t=p.selection.element();if(t&&0<=["INPUT","TEXTAREA"].indexOf(t.tagName))return!0;if(e&&E(e.which)){var n=p.selection.element();p.selection.save();var r=p.$el.find(".fr-marker")[0];return r.previousSibling&&r.previousSibling.nodeType===Node.TEXT_NODE&&1p.$wp.offset().top-p.helpers.scrollTop()+p.$wp.height()-20?p.$wp.scrollTop(e+p.$wp.scrollTop()-(p.$wp.height()+p.$wp.offset().top)+p.helpers.scrollTop()+20):p.opts.iframe&&n&&(p.$wp.scrollTop()>n?p.$wp.scrollTop(n-20):n>p.$wp.scrollTop()+p.$wp.height()&&p.$wp.scrollTop(n))}else e=p.position.getBoundingRect().top,p.opts.toolbarBottom&&(e+=p.opts.toolbarStickyOffset),(p.helpers.isIOS()||p.helpers.isAndroid())&&(e-=p.helpers.scrollTop()),p.opts.iframe&&(e+=p.$iframe.offset().top,e-=p.helpers.scrollTop()),(e+=p.opts.toolbarStickyOffset)>p.o_win.innerHeight-20&&a(p.o_win).scrollTop(e+p.helpers.scrollTop()-p.o_win.innerHeight+20),e=p.position.getBoundingRect().top,p.opts.toolbarBottom||(e-=p.opts.toolbarStickyOffset),(p.helpers.isIOS()||p.helpers.isAndroid())&&(e-=p.helpers.scrollTop()),p.opts.iframe&&(e+=p.$iframe.offset().top,e-=p.helpers.scrollTop()),e<100&&a(p.o_win).scrollTop(e+p.helpers.scrollTop()-100)}function c(e){var t=p.selection.element();if(t&&0<=["INPUT","TEXTAREA"].indexOf(t.tagName))return!0;if(e&&0===e.which&&h&&(e.which=h),p.helpers.isAndroid()&&p.browser.mozilla)return!0;if(u)return!1;if(e&&p.helpers.isIOS()&&e.which===V.KEYCODE.ENTER&&p.doc.execCommand("undo"),!p.selection.isCollapsed())return!0;if(e&&(e.which===V.KEYCODE.META||e.which===V.KEYCODE.CTRL))return!0;if(e&&E(e.which))return!0;if(e&&!p.helpers.isIOS()&&(e.which===V.KEYCODE.ENTER||e.which===V.KEYCODE.BACKSPACE||37<=e.which&&e.which<=40&&!p.browser.msie))try{l()}catch(i){}var n=p.selection.element();if(function a(e){if(!e)return!1;var t=e.innerHTML;return!!((t=t.replace(/]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,""))&&/\u200B/.test(t)&&0=V.KEYCODE.ARROW_LEFT&&e<=V.KEYCODE.ARROW_DOWN)return!0}function y(e){if(e>=V.KEYCODE.ZERO&&e<=V.KEYCODE.NINE)return!0;if(e>=V.KEYCODE.NUM_ZERO&&e<=V.KEYCODE.NUM_MULTIPLY)return!0;if(e>=V.KEYCODE.A&&e<=V.KEYCODE.Z)return!0;if(p.browser.webkit&&0===e)return!0;switch(e){case V.KEYCODE.SPACE:case V.KEYCODE.QUESTION_MARK:case V.KEYCODE.NUM_PLUS:case V.KEYCODE.NUM_MINUS:case V.KEYCODE.NUM_PERIOD:case V.KEYCODE.NUM_DIVISION:case V.KEYCODE.SEMICOLON:case V.KEYCODE.FF_SEMICOLON:case V.KEYCODE.DASH:case V.KEYCODE.EQUALS:case V.KEYCODE.FF_EQUALS:case V.KEYCODE.COMMA:case V.KEYCODE.PERIOD:case V.KEYCODE.SLASH:case V.KEYCODE.APOSTROPHE:case V.KEYCODE.SINGLE_QUOTE:case V.KEYCODE.OPEN_SQUARE_BRACKET:case V.KEYCODE.BACKSLASH:case V.KEYCODE.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}function d(e){var t=e.which;if(L(e)||37<=t&&t<=40||!y(t)&&t!==V.KEYCODE.DELETE&&t!==V.KEYCODE.BACKSPACE&&t!==V.KEYCODE.ENTER&&t!==V.KEYCODE.IME)return!0;n||(r=p.snapshot.get(),p.undo.canDo()||p.undo.saveStep()),clearTimeout(n),n=setTimeout(function(){n=null,p.undo.saveStep()},Math.max(250,p.opts.typingTimer))}function f(e){var t=e.which;if(L(e)||37<=t&&t<=40)return!0;r&&n?(p.undo.saveStep(r),r=null):void 0!==t&&0!==t||r||n||p.undo.saveStep()}function S(e){if(e&&"BR"===e.tagName)return!1;try{return 0===(e.textContent||"").length&&e.querySelector&&!e.querySelector(":scope > br")||e.childNodes&&1===e.childNodes.length&&e.childNodes[0].getAttribute&&("false"===e.childNodes[0].getAttribute("contenteditable")||p.node.hasClass(e.childNodes[0],"fr-img-caption"))}catch(t){return!1}}function N(e){var t=p.el.childNodes,n=p.html.defaultTag(),r=p.node.blockParent(p.selection.blocks()[0]);return r&&"TR"==r.tagName&&r.getAttribute("contenteditable")==undefined&&(r=r.closest("table")),!p.node.isEditable(e.target)||r&&"false"===r.getAttribute("contenteditable")?p.toolbar.disable():p.toolbar.enable(),!(!e.target||e.target===p.el)||(0===t.length||void(t[0].offsetHeight+t[0].offsetTop<=e.offsetY?S(t[t.length-1])&&(n?p.$el.append("<".concat(n,">").concat(V.MARKERS,"
    ")):p.$el.append("".concat(V.MARKERS,"
    ")),p.selection.restore(),l()):e.offsetY<=10&&S(t[0])&&(n?p.$el.prepend("<".concat(n,">").concat(V.MARKERS,"
    ")):p.$el.prepend("".concat(V.MARKERS,"
    ")),p.selection.restore(),l())))}function T(){n&&clearTimeout(n)}return{_init:function M(){p.events.on("keydown",d),p.events.on("input",e),p.events.on("mousedown",i),p.events.on("keyup input",f),p.events.on("keypress",o),p.events.on("keydown",s),p.events.on("keyup",c),p.events.on("destroy",T),p.events.on("html.inserted",c),p.events.on("cut",t),p.opts.multiLine&&p.events.on("click",N),p.events.on("initialized",function(){p.el.addEventListener("compositionstart",function(){if(p.selection.isCollapsed()){var e=p.selection.ranges(0),t=e.startContainer,n=e.startOffset;if(t&&t.nodeType===Node.TEXT_NODE&&n<=t.textContent.length&&0

    "===s||""===s||/([ ])/.test(s)||/([

    ]*)/.test(s))&&(s=A.win.localStorage.getItem("fr-copied-html"))):/text\/uri-list/.test(t)&&A.browser.safari?s=e.clipboardData.getData("text/uri-list"):/text\/rtf/.test(t)&&A.browser.safari?s=i:/public.rtf/.test(t)&&A.browser.safari&&(s=e.clipboardData.getData("text/rtf")),x=e.clipboardData.getData("text"),""!==s)return h(),e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!1;s=null}return function a(){if(A.selection.save(),A.events.disableBlur(),s=null,l){l.html("");var e=f(A.selection.get().anchorNode)+A.$wp.offset().top;l.css("top",e),A.browser.edge&&A.opts.iframe&&A.$el.append(l)}else{var t=document.getElementsByTagName("BODY")[0],n=window.getComputedStyle(t).transform;if("none"!==n){var r=f(A.selection.get().anchorNode)+A.$wp.offset().top;l=k('
    ')}else l=k('
    ');A.browser.webkit||A.browser.mozilla?("none"===n&&l.css("top",A.$sc.scrollTop()),A.$el.after(l)):A.browser.edge&&A.opts.iframe?A.$el.append(l):A.$box.after(l),A.events.on("destroy",function(){l.remove()})}var o;A.helpers.isIOS()&&A.$sc&&(o=A.$sc.scrollTop());A.opts.iframe&&A.$el.attr("contenteditable","false");A.helpers.isIOS()&&A.$sc&&A.$sc.scrollTop(o);var i=c.clipboardData.getData("Text");4e5")),""!==s){A.keys.forceUndo(),w=A.snapshot.get(),A.selection.save(),A.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-helper");var r=A.markers.insertAtPoint(e);if(A.$el.find(".fr-marker").removeClass("fr-marker").addClass("fr-marker-placeholder"),A.$el.find(".fr-marker-helper").addClass("fr-marker").removeClass("fr-marker-helper"),A.selection.restore(),A.selection.remove(),A.$el.find(".fr-marker-placeholder").addClass("fr-marker").removeClass("fr-marker-placeholder"),!1!==r){var o=A.el.querySelector(".fr-marker");return k(o).replaceWith(V.MARKERS),A.selection.restore(),h(),e.preventDefault&&(e.stopPropagation(),e.preventDefault()),!1}}else s=null}}function f(e){return e.nodeType===Node.TEXT_NODE?e.parentNode.offsetTop:e.offsetTop}function p(e){var t=A.html.defaultTag()||"p",n="<").concat(t,">");return A.opts.enter===V.ENTER_BR?n="
    ":e="<".concat(t,">")+e,e.replace(/\n{2,}/g,n)}function h(){A.opts.iframe&&A.$el.attr("contenteditable","true"),A.browser.edge&&A.opts.iframe&&A.$box.after(l),w||(A.keys.forceUndo(),w=A.snapshot.get()),s||(s=l.get(0).innerHTML,x=l.text(),A.$el[0].setAttribute("plainpaste",!0),A.selection.restore(),A.events.enableBlur());var e=s.match(/(class="?Mso|class='?Mso|class="?Xl|class='?Xl|class=Xl|style="[^"]*\bmso-|style='[^']*\bmso-|w:WordDocument|LibreOffice)/gi),t=A.events.chainTrigger("paste.beforeCleanup",s);if(t&&"string"==typeof t){s=t;var n=(new DOMParser).parseFromString(t,"text/html");x=n.body.innerText}(!e||e&&!1!==A.events.trigger("paste.wordPaste",[s]))&&a(s,e)}function $(e){for(var t="",n=0;n++]*(]*>[\s]*[.\s\S\w\W<>]*[\s]*<\/style>)[.\s\S\w\W<>]*/gi,"$1")),e=(e=(e=a+e.replace(/[.\s\S\w\W<>]*]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi,"$1")).replace(/(?:[\w\W]*?)<\/pre>/g,function(e){return e.replace(/\n/g,"
    ")})).replace(/ \n/g," ").replace(/\n /g," ").replace(/([^>])\n([^<])/g,"$1 $2")}var s=!1;0<=e.indexOf('id="docs-internal-guid')&&(e=e.replace(/^[\w\W\s\S]* id="docs-internal-guid[^>]*>([\w\W\s\S]*)<\/b>[\w\W\s\S]*$/g,"$1"),s=!0),(0<=e.indexOf('content="Sheets"')||0<=e.indexOf("google-sheets-html-origin"))&&(e=e.replace(/width:0px;/g,""));var l=!1;if(!t)if((l=function y(){var e=null;try{e=A.win.localStorage.getItem("fr-copied-text")}catch(t){}return!(!e||!x||O&&-1===O.indexOf("text/html")||x.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")!==e.replace(/\u00A0/gi," ").replace(/\r|\n/gi,"")&&x.replace(/\s/g,"")!==e.replace(/\s/g,""))}())&&(e=A.win.localStorage.getItem("fr-copied-html")),l)e=A.clean.html(e,A.opts.pasteDeniedTags,A.opts.pasteDeniedAttrs);else{var c=A.opts.htmlAllowedStyleProps;A.opts.htmlAllowedStyleProps=A.opts.pasteAllowedStyleProps,A.opts.htmlAllowComments=!1,e=(e=(e=e.replace(/\s*<\/span>/g,$(A.opts.tabSpaces||4))).replace(/(\t*)<\/span>/g,function(e,t){return $(t.length*(A.opts.tabSpaces||4))})).replace(/\t/g,$(A.opts.tabSpaces||4)),e=A.clean.html(e,A.opts.pasteDeniedTags,A.opts.pasteDeniedAttrs),A.opts.htmlAllowedStyleProps=c,A.opts.htmlAllowComments=!0,A.html.defaultTag()&&"div"===A.html.defaultTag()||(e=H(e)),e=(e=e.replace(/\r/g,"")).replace(/^ */g,"").replace(/ *$/g,"")}!t||A.wordPaste&&n||(0===(e=e.replace(/^\n*/g,"").replace(/^ /g,"")).indexOf("")&&(e="".concat(e,"
    ")),e=H(e=function S(e){var t;e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=(e=e.replace(/([\s\S]*?)<\/p>/gi,"
    • $3
    ")).replace(/([\s\S]*?)<\/p>/gi,"
    1. $3
    ")).replace(/([\s\S]*?)<\/p>/gi,"
      $5")).replace(/([\s\S]*?)<\/p>/gi,"
        $5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)<\/p>/gi,"$5
    ")).replace(/([\s\S]*?)<\/p>/gi,"$5")).replace(/([\s\S]*?)([\s\S]*?)/gi,"")).replace(/([\s\S]*?)/gi,"")).replace(/(\n|\r| class=(")?Mso[a-zA-Z0-9]+(")?)/gi," ")).replace(//gi,"")).replace(/<(\/)*(meta|link|span|\\?xml:|st1:|o:|font)(.*?)>/gi,"");var n,r=["style","script","applet","embed","noframes","noscript"];for(t=0;t"),"gi");e=e.replace(o,"")}for(e=(e=(e=e.replace(/ /gi," ")).replace(/]*)><\/td>/g,"
    ")).replace(/]*)><\/th>/g,"
    ");(e=(n=e).replace(/<[^/>][^>]*><\/[^>]+>/gi,""))!==n;);e=(e=e.replace(/]*)>/gi,'
  • ')).replace(/]*)>/gi,""),e=(e=(e=A.clean.html(e,A.opts.pasteDeniedTags,A.opts.pasteDeniedAttrs)).replace(/(.[^<]+)<\/a>/gi,"$1")).replace(/
    */g,"
    ");var i=A.o_doc.createElement("div");i.innerHTML=e;var a=i.querySelectorAll("li[data-indent]");for(t=0;t ul, :scope > ol");c||(c=document.createElement("ul"),l.appendChild(c)),c.appendChild(s)}else s.removeAttribute("data-indent")}return A.html.cleanBlankSpaces(i),e=i.innerHTML}(e))),A.opts.pastePlain&&(e=function N(e){var t,n=null,r=A.doc.createElement("div");r.innerHTML=e;var o=r.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");for(t=0;t").concat(n.innerText,""));for(t=(o=r.querySelectorAll("*:not(".concat("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote, ul, ol, li, table, tbody, thead, tr, td, br, img".split(",").join("):not("),")"))).length-1;0<=t;t--)(n=o[t]).outerHTML=n.innerHTML;return function i(e){for(var t=A.node.contents(e),n=0;n")?(A.html.cleanBlankSpaces(f),A.spaces.normalize(f,!0)):A.spaces.normalize(f);var p=f.getElementsByTagName("span");for(r=p.length-1;0<=r;r--){var h=p[r];0===h.attributes.length&&(h.outerHTML=h.innerHTML)}if(!0===A.opts.linkAlwaysBlank){var u=f.getElementsByTagName("a");for(r=u.length-1;0<=r;r--){var g=u[r];g.getAttribute("target")||g.setAttribute("target","_blank")}}var C=A.selection.element(),m=!1;if(C&&k(C).parentsUntil(A.el,"ul, ol").length&&(m=!0),m){var v=f.children;1===v.length&&0<=["OL","UL"].indexOf(v[0].tagName)&&(v[0].outerHTML=v[0].innerHTML)}if(!s){var b=f.getElementsByTagName("br");for(r=b.length-1;0<=r;r--){var L=b[r];A.node.isBlock(L.previousSibling)&&L.parentNode.removeChild(L)}}if(A.opts.enter===V.ENTER_BR)for(r=(o=f.querySelectorAll("p, div")).length-1;0<=r;r--)0===(i=o[r]).attributes.length&&(i.outerHTML=i.innerHTML+(i.nextSibling&&!A.node.isEmpty(i)?"
    ":""));else if(A.opts.enter===V.ENTER_DIV)for(r=(o=f.getElementsByTagName("p")).length-1;0<=r;r--)0===(i=o[r]).attributes.length&&(i.outerHTML="
    ".concat(i.innerHTML,"
    "));else A.opts.enter===V.ENTER_P&&1===f.childNodes.length&&"P"===f.childNodes[0].tagName&&0===f.childNodes[0].attributes.length&&(f.childNodes[0].outerHTML=f.childNodes[0].innerHTML);if(f.children&&0 div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")));r.length;){var o=r[r.length-1];if(A.html.defaultTag()&&"div"!==A.html.defaultTag())o.querySelector(A.html.blockTagsQuery())?o.outerHTML=o.innerHTML:o.outerHTML="<".concat(A.html.defaultTag(),">").concat(o.innerHTML,"");else{var i=o.querySelectorAll("*");!i.length||"BR"!==i[i.length-1].tagName&&0===o.innerText.length?o.outerHTML=o.innerHTML+(o.nextSibling?"
    ":""):!i.length||"BR"!==i[i.length-1].tagName||i[i.length-1].nextSibling?o.outerHTML=o.innerHTML+(o.nextSibling?"
    ":""):o.outerHTML=o.innerHTML}r=u(Array.prototype.slice.call(n.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")))}for(r=u(Array.prototype.slice.call(n.querySelectorAll("div:not([style])")));r.length;){for(t=0;tn.undo_index;)n.undo_stack.pop()}function o(){n.undo_index=0,n.undo_stack=[]}function i(){n.undo_stack=[]}return{_init:function a(){o(),n.events.on("initialized",function(){t=(n.$wp?n.$el.html():n.$oel.get(0).outerHTML).replace(/ style=""/g,"")}),n.events.on("blur",function(){n.el.querySelector(".fr-dragging")||n.undo.saveStep()}),n.events.on("keydown",e),n.events.on("destroy",i)},run:function s(){if(1"));l.$head.append(i)}}}"auto"!==l.opts.direction&&l.$box.removeClass("fr-ltr fr-rtl").addClass("fr-".concat(l.opts.direction)),l.$el.attr("dir",l.opts.direction),l.$wp.attr("dir",l.opts.direction),1'.concat(e,""));for(var t=0;t'));n.get(0).addEventListener("load",l.size.syncIframe),l.$head.append(n)}}},hasFocus:function a(){return l.browser.mozilla&&l.helpers.isMobile()?l.selection.inEditor():l.node.hasFocus(l.el)||0 span").css("width")),s=h.helpers.getPX(i.css("paddingLeft")),l=h.helpers.getPX(i.css("paddingRight"));i.css("width",a*h.opts.colorsStep+s+l)}return h.button.bindCommands(o,!1),o}function E(a){var s=g[a];return{_windowResize:function(){var e=s.data("instance")||h;if(!e.helpers.isMobile()&&s.isVisible()){var t=s.find(".fr-file-progress-bar-layer");if("file.insert"===a&&0').concat(r.attr("placeholder"),"")),r.attr("placeholder",""))}}(o),h.events.$on(o,"focus",a),h.events.$on(o,"blur change",s),h.events.$on(n,"click",".fr-checkbox + label",p),h.accessibility.registerPopup(e),h.helpers.isIOS()&&h.events.$on(n,"touchend","label",function(){d("#".concat(d(this).attr("for"))).prop("checked",function(e,t){return!t})},!0),h.events.$on(d(h.o_win),"resize",r._windowResize,!0),"filesManager.insert"===e&&g["filesManager.insert"].css("zIndex",2147483641),n},get:function N(e){var t=g[e];return t&&!t.data("inst".concat(h.id))&&f(E(e),e),t},show:function T(e,t,n,r,o){if(m(e)||(v()&&0 .fr-dropdown-wrapper").css("height",""),i.next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),g[e].data("instance",h),h.$tb&&h.$tb.data("instance",h);var a=m(e);g[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");var s=g[e].data("container");if(function p(e,t){t.isVisible()||(t=h.$sc),t.contains([g[e].get(0)])||t.append(g[e])}(e,s),h.opts.toolbarInline&&s&&h.$tb&&s.get(0)===h.$tb.get(0)&&(C(e,h.$sc),n=h.$tb.offset().top-h.helpers.getPX(h.$tb.css("margin-top")),t=h.$tb.offset().left+h.$tb.outerWidth()/2,h.node.hasClass(h.$tb.get(0),"fr-above")&&n&&(n+=h.$tb.outerHeight()),r=0),s=g[e].data("container"),h.opts.iframe&&!r&&!a){var l=h.helpers.getPX(h.$wp.find(".fr-iframe").css("padding-top")),c=h.helpers.getPX(h.$wp.find(".fr-iframe").css("padding-left"));t&&(t-=h.$iframe.offset().left+c),n&&(n-=h.$iframe.offset().top+l)}s.is(h.$tb)?h.$tb.css("zIndex",(h.opts.zIndex||1)+4):g[e].css("zIndex",(h.opts.zIndex||1)+3),h.opts.toolbarBottom&&s&&h.$tb&&s.get(0)===h.$tb.get(0)&&(g[e].addClass("fr-above"),n&&(n-=g[e].outerHeight())),o&&(t-=g[e].width()/2),t+g[e].outerWidth()>h.$sc.offset().left+h.$sc.width()&&(t-=t+g[e].outerWidth()-h.$sc.offset().left-h.$sc.width()),twindow.innerHeight/2&&(window.innerWidth<500?e.get(0).clientHeight>.6*r&&o(e):400 button.fr-command").first());if(0h(p.o_win).width()&&(l=h(p.o_win).width()-p.$tooltip.outerWidth()),void 0===t&&(t=p.opts.toolbarBottom),e.offset().top-h(window).scrollTop()+e.outerHeight()+10>=h(window).height()&&(t=!0);var c=t?e.offset().top-p.$tooltip.height():e.offset().top+e.outerHeight();p.$tooltip.css("position",""),p.$tooltip.css("left",l),p.$tooltip.css("top",Math.ceil(c));var d={};p.$wp&&0 .fr-dropdown-wrapper");if(!n){var l=e.data("cmd");t.find(".fr-command").removeClass("fr-active").attr("aria-selected",!1),V.COMMANDS[l]&&V.COMMANDS[l].refreshOnShow&&V.COMMANDS[l].refreshOnShow.apply(o,[e,t]),t.css("left",e.offset().left-e.parents(".fr-btn-wrap, .fr-toolbar, .fr-buttons").offset().left-("rtl"===g.opts.direction?t.width()-e.outerWidth():0)),t.addClass("test-height"),i=t.outerHeight(),a=g.helpers.getPX(s.css("max-height")),t.removeClass("test-height"),t.css("top","").css("bottom","");var c=e.outerHeight()/10;if(!g.opts.toolbarBottom&&t.offset().top+e.outerHeight()+ig.$sc.offset().left+g.$sc.width()&&t.css("margin-left",-(t.offset().left+t.outerWidth()-g.$sc.offset().left-g.$sc.width())),t.offset().left .fr-dropdown-wrapper").css("height",""),r.prev(".fr-expanded").removeClass("fr-expanded"),r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),0!==e.parents(".fr-popup").length||g.opts.toolbarInline||(g.node.hasClass(e.get(0),"fr-active")?g.$tb.css("zIndex",(g.opts.zIndex||1)+4):g.$tb.css("zIndex",""));var p=t.find("a.fr-command.fr-active").first();g.helpers.isMobile()||(p.length?(g.accessibility.focusToolbarElement(p),s.scrollTop(Math.abs(p.parents(".fr-dropdown-content").offset().top-p.offset().top)-p.offset().top)):(g.accessibility.focusToolbarElement(e),s.scrollTop(0)))}function c(e){e.addClass("fr-blink"),setTimeout(function(){e.removeClass("fr-blink")},500);for(var t=e.data("cmd"),n=[];void 0!==e.data("param".concat(n.length+1));)n.push(e.data("param".concat(n.length+1)));var r=C(".fr-dropdown.fr-active");r.length&&(r.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),r.prev(".fr-expanded").removeClass("fr-expanded"),r.parents(".fr-toolbar:not(.fr-inline)").css("zIndex","")),e.parents(".fr-popup, .fr-toolbar").data("instance").commands.exec(t,n)}function t(e){var t=e.parents(".fr-popup, .fr-toolbar").data("instance"),n=g.popups.get("link.insert");if(0===e.parents(".fr-popup").length&&e.data("popup")&&!e.hasClass("fr-btn-active-popup")&&(e.attr("id")==="insertLink-".concat(g.id)&&n&&n.hasClass("fr-active")||e.addClass("fr-btn-active-popup")),0!==e.parents(".fr-popup").length||e.data("popup")||t.popups.hideAll(),t.popups.areVisible()&&!t.popups.areVisible(t)){for(var r=0;r .fr-dropdown-wrapper").css("height",""),t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),t.prev().removeClass("fr-expanded"))}function p(e){e.preventDefault(),e.stopPropagation()}function h(e){if(e.stopPropagation(),!g.helpers.isMobile())return!1}function m(e){var t=1').concat(g.language.translate(i||t.title),"")}else o=g.icon.create(t.icon||e),o+=''.concat(g.language.translate(t.title)||"","");var a=t.popup?' data-popup="true"':"",s=t.modal?' data-modal="true"':"",l=g.shortcuts.get("".concat(e,"."));l=l?" (".concat(l,")"):"";var c="".concat(e,"-").concat(g.id),d="dropdown-menu-".concat(c),f='");if("dropdown"===t.type||"options"===t.type){var p='
    "}return t.hasOptions&&t.hasOptions.apply(g)&&(f='
    '.concat(f," ").concat(m(e+"Options",Object.assign({},t,{type:"options",hasOptions:!1}),n),"
    ")),f}function e(o){var i=g.$tb&&g.$tb.data("instance")||g;if(!1===g.events.trigger("buttons.refresh"))return!0;setTimeout(function(){for(var e=i.selection.inEditor()&&i.core.hasFocus(),t=0;t
  • ':"-"===o&&(n+=''))}return n},buildGroup:function E(e){var t="",n="";for(var r in e){var o=e[r];if(o.buttons){for(var i="",a="",s=0,l="left",c=V.TOOLBAR_VISIBLE_BUTTONS,d=0;d
    ':"-"==f&&(i+='')),!p||p&&"undefined"!=typeof p.plugin&&g.opts.pluginsEnabled.indexOf(p.plugin)<0||(e[r].align!==undefined&&(l=e[r].align),e[r].buttonsVisible!==undefined&&(c=e[r].buttonsVisible),e.showMoreButtons&&c<=s?a+=m(f,p,!0):i+=m(f,p,!0),s++)}if(e.showMoreButtons&&c').concat(i,"
    ")),e.showMoreButtons&&0').concat(a,""))}}return g.opts.toolbarBottom?g.helpers.isMobile()?'
    '.concat(n,"
    ").concat(t,"
    "):"".concat(n,'
    ').concat(t):"".concat(t,'
    ').concat(n)},bindCommands:function y(t,e){g.events.bindClick(t,".fr-command:not(.fr-disabled)",d),g.events.$on(t,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu",p,!0),g.events.$on(t,"".concat(g._mousedown," ").concat(g._mouseup," ").concat(g._move),".fr-dropdown-menu .fr-dropdown-wrapper",h,!0);var n=t.get(0).ownerDocument,r="defaultView"in n?n.defaultView:n.parentWindow;function o(e){(!e||e.type===g._mouseup&&e.target!==u("html").get(0)||"keydown"===e.type&&(g.keys.isCharacter(e.which)&&!g.keys.ctrlKey(e)||e.which===V.KEYCODE.ESC))&&(f(t),g.opts.iframe&&function r(e){var t=e.find(".fr-popup.fr-active");if(t.length){t.removeClass("fr-active").attr("aria-expanded",!1).next().attr("aria-hidden",!0).css("overflow","").find("> .fr-dropdown-wrapper").css("height",""),t.parents(".fr-toolbar:not(.fr-inline)").css("zIndex",""),t.prev().removeClass("fr-expanded");var n=g.$tb.find(".fr-btn-active-popup");u(n[0]).removeClass("fr-btn-active-popup")}}(t))}g.events.$on(u(r),"".concat(g._mouseup," resize keydown"),o,!0),g.opts.iframe&&g.events.$on(g.$win,g._mouseup,o,!0),g.node.hasClass(t.get(0),"fr-popup")?u.merge(s,t.find(".fr-btn").toArray()):u.merge(a,t.find(".fr-btn").toArray()),g.tooltip.bind(t,".fr-btn, .fr-title",e)},refresh:function S(e){var t,n=e.parents(".fr-popup, .fr-toolbar").data("instance")||g,r=e.data("cmd");g.node.hasClass(e.get(0),"fr-dropdown")?t=e.next():(e.removeClass("fr-active"),e.attr("aria-pressed")&&e.attr("aria-pressed",!1)),V.COMMANDS[r]&&V.COMMANDS[r].refresh?V.COMMANDS[r].refresh.apply(n,[e,t]):g.refresh[r]&&n.refresh[r](e,t)},bulkRefresh:n,exec:c,click:t,hideActiveDropdowns:f,addButtons:function N(e){for(var t=0;t