/*! For license information please see froala.min.js.LICENSE.txt */ (()=>{var e,t,n={9037:e=>{e.exports=function(e){TVE.CONST.FROALA_FORMAT_OPTIONS={P:"Paragraph",H1:"Heading 1",H2:"Heading 2",H3:"Heading 3",H4:"Heading 4",H5:"Heading 5",H6:"Heading 6",BLOCKQUOTE:"Blockquote",PlainText:"Plain text"};const t={plaintext:'',blockquote:''};function n(){return TVE.tpl("util/text-styles")({defaultStyles:TVE.CONST.FROALA_FORMAT_OPTIONS,customStyles:TVE.CONST.global_styles.text.filter(e=>e&&e.attr&&e.attr.tag).map(e=>(e.shortTag=t[e.attr.tag]||e.attr.tag.toUpperCase(),e))})}e.FE.PLUGINS.textStyles=function(t){function r(n,r){if(!r)return n;let o=e("<"+r+">"+n.html()+"");if(r.toLowerCase()===t.html.defaultTag())return n;if(n.find("ul, ol").length>0){const i=e("<"+r+">");n.prepend(i);let a=t.node.contents(n.get(0))[0];for(;a&&["UL","OL"].indexOf(a.tagName)<0;){const e=a.nextSibling;i.append(a),a=e}o=i}else n.html(o);return o}function o(n,r){const o=r.toLowerCase()===t.html.defaultTag()?n.html():e("<"+r+">").html(n.html());return n.replaceWith(o),o}function i(n,r){let o;return r.toLowerCase()===t.html.defaultTag()?(t.node.isEmpty(n.get(0),!0)||n.append("
"),o=e(n.html())):o=e("<"+r+">").html(n.html()),n.replaceWith(o),o}function a(n,r){const o=e("<"+r+" "+t.node.attributes(n.get(0))+">").html(n.html());return n.replaceWith(o),o}const s=t.frameDropdown.register("textStyles",{apply(e){e.selection.restore();const t=e.textStyles.tag(this.dataset.tagName);t&&t.length&&e.styles.setActiveElement(t),e.styles.apply(this.dataset.style||null,t)},updateDefault(e){const t=this.dataset.tagName.toLowerCase();e.styles.updateDefault("p"===t?["p","li"]:t),d()},resetDefault(e){const t=this.dataset.tagName.toLowerCase();e.styles.removeDefault("p"===t?["p","li"]:t,!0),d()},add(e,t){const n=t.find(".fr-style-name");return n.val().trim()?(e.events.focus(),e.selection.restore(),e.styles.add(n.val()),d(),{hide:!1}):(n.addClass("fr-error").trigger("focus"),{hide:!1,focus:!1})},update(e){e.styles.update(this.dataset.style),d("custom")},remove(e){e.styles.remove(this.dataset.style),d("custom")},changeTab(){return c(this.dataset.target),{hide:!1,focus:!1}}});function l(){s.find(".fr-style-reset").each(function(){const e=parseInt(TVE.inner.window.getComputedStyle(this).fontSize);e<8?this.style.setProperty("font-size","8px","important"):e>30&&this.style.setProperty("font-size","30px","important")})}function d(e="default"){s.find(".fr-dropdown-content").html(n()),c(e),l()}function c(e="default"){s.find(".fr-tab-link").removeClass("fr-tab-active").filter(`[data-target="${e}"]`).addClass("fr-tab-active"),s.find(".fr-tab").removeClass("fr-visible").filter(`.fr-tab-${e}`).addClass("fr-visible"),s.find(".fr-error").removeClass("fr-error")}return s.on("keyup",e=>(13===e.which?s.find("[data-cmd=add]").trigger("click"):27===e.which&&s.find("input").val("").trigger("blur"),e.currentTarget.classList.remove("fr-error"),!1)),t.events.on("initialized",()=>{s.data("ensure-preview-size")||(s.data("ensure-preview-size",!0),l())}),{refresh:function(e){let n,r="P",o="default";const i=t.styles.get("object");if(i)n=t.styles.label(i),o="custom";else{const e=t.selection.blocks();if(e.length){const n=e[0],o=t.html.defaultTag();n.tagName.toLowerCase()!==o&&n!==t.el&&(r=n.tagName),["LI","TD","TH"].indexOf(r)>=0&&(r="P"),("DIV"===r||n.classList.contains("tcb-plain-text"))&&(r="PlainText"),TVE.CONST.FROALA_FORMAT_OPTIONS[r]||(r="P")}n=TVE.CONST.FROALA_FORMAT_OPTIONS[r]}e.data("tag-name",r).children("span").text(n),c(o),s.find(".fr-selected").removeClass("fr-selected");const a="default"===o?`.fr-tab-default [data-tag-name="${r}"]`:`[data-style="${i.id}"]`;s.find(a).addClass("fr-selected")},tag:function(n){const s="PLAINTEXT"===(n=n.toUpperCase());"N"===n&&(n=t.html.defaultTag()),s&&(n="div"),t.selection.save(),t.html.wrap(!0,!0,!1,!0),t.selection.restore();const l=t.selection.blocks();let d=e();t.selection.save(),t.$el.find("pre").attr("skip",!0);for(let c=0;c=0?d.add(i(t,n)):d.add(a(t,n))}return d.toggleClass("tcb-plain-text",s),t.$el.find('pre:not([skip="true"]) + pre:not([skip="true"])').each(function(){e(this).prev().append("
"+e(this).html()),e(this).remove()}),t.$el.find("pre").removeAttr("skip"),t.html.unwrap(),t.selection.restore(),d.first().closest("[data-child-styles]").applyChildrenGlobalStyle(),d}}},e.FE.RegisterCommand("textStyles",{className:"fr-has-caret btn-thin hide-tablet hide-mobile",icon:!1,undo:!0,focus:!0,refreshAfterCallback:!1,forcedRefresh:!0,displaySelection:!0,type:"dropdown",html:n,defaultSelection:()=>"Paragraph text",refresh(e){this.textStyles.refresh(e)},plugin:"textStyles",displaySelectionWidth:80})}},13920:e=>{e.exports=function(e){e.FE.PLUGINS.lists=function(t){function n(e){return''}function r(e){return''}function o(o){let i,a;for(i=o.length-1;i>=0;i--)for(a=i-1;a>=0;a--)if(e(o[a]).find(o[i]).length||o[a]===o[i]){o.splice(i,1);break}const s=[];for(i=0;i"),t.node.isEmpty(a.get(0),!0)||0!==a.find(t.html.blockTagsQuery()).length||a.append("
"),a.append(n("LI")),a.prepend(r("LI"))),a.after(n(l.tagName)),"LI"===l.parentNode.tagName&&(l=l.parentNode.parentNode),s.indexOf(l)<0&&s.push(l)}for(i=0;i<\/span>/g,""),r=r.replace(/<\/span>/g,"<$1>"),n.replaceWith(t.node.openTagString(n.get(0))+r+t.node.closeTagString(n.get(0)))}t.$el.find("li:empty").remove(),t.$el.find("ul:empty, ol:empty").remove(),t.clean.lists(),t.html.wrap()}function i(n){t.selection.save();for(let r=0;r ul, > ol").last().get(0);if(i){const a=e("
  • ").prependTo(e(i));let s=t.node.contents(n[r])[0];for(;s&&!t.node.isList(s);){const e=s.nextSibling;a.append(s),s=e}e(o).append(e(i)),e(n[r]).remove()}else{const t=e(o).find("> ul, > ol").last().get(0);if(t)e(t).append(e(n[r]));else{const t=e("<"+n[r].parentNode.tagName+">");e(o).append(t),t.append(e(n[r]))}}}}t.clean.lists(),t.selection.restore()}function a(e){t.selection.save(),o(e),t.selection.restore()}function s(e){if("indent"===e||"outdent"===e){let n=!1;const r=t.selection.blocks(),o=[];for(let e=0;e1||r.length&&(t.selection.info(r[0]).atStart||t.node.isEmpty(r[0])))return n.preventDefault(),n.stopPropagation(),n.shiftKey?a(r):i(r),!1}},!0)},format:function(n){t.selection.save(),t.html.wrap(!0,!0,!0,!0),t.selection.restore();const r=t.selection.blocks();for(let e=0;e=0;t--){const o=e(r[t]),i=n.toLowerCase();o[r[t].tagName!==n?"html":"replaceWith"](`<${i}> ${o.html()}`)}}(n,r);const o=t.html.defaultTag();for(let i=0;i"+e(n[i]).html()+"
  • "):e(n[i]).wrap("<"+r+">
  • "));t.clean.lists()}(r,n),t.html.unwrap(),t.selection.restore()},refresh:function(n,r){const o=e(t.selection.element());if(o.get(0)!==t.el){let e=o.get(0);e="LI"!==e.tagName&&e.firstElementChild&&"LI"!==e.firstElementChild.tagName?o.parents("li").get(0):"LI"===e.tagName||e.firstElementChild?e.firstElementChild&&"LI"===e.firstElementChild.tagName?o.get(0).firstChild:o.get(0):o.parents("li").get(0),e&&e.parentNode.tagName===r&&t.el.contains(e.parentNode)&&n.addClass("fr-active")}}}},e.FE.RegisterCommand("formatUL",{title:"Unordered List",refresh(e){this.lists.refresh(e,"UL")},callback(){this.lists.format("UL")},plugin:"lists"}),e.FE.RegisterCommand("formatOL",{title:"Ordered List",refresh(e){this.lists.refresh(e,"OL")},callback(){this.lists.format("OL")},plugin:"lists"}),e.FE.DefineIcon("formatUL",{NAME:"list-ul-light"}),e.FE.DefineIcon("formatOL",{NAME:"list-ol-light"})}},36719:e=>{function t(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function n(e){for(var n=1;n{const n=e.tcb.getBlockElement();n.hasClass("fr-view")||(t=n)});let r=!1;function o(){r||(TVE.CONST.landing_page&&(i(),TVE.CONST.landing_page_text_styles=TVE.CONST.landing_page_text_styles||{},TVE._.each(TVE.CONST.default_styles,(t,n)=>{TVE.CONST.landing_page_text_styles[n]=new TVE.CSS(e(),{landingPageSelector:t.lp_selector}).collect("landing_page").removeImportant().css})),r=!0)}function i(e="#tcb_landing_page",t=TVE.$(".tve_global_style")){const n=TVE.CSS_Rule_Cache.getRulesForSelector(e,TVE.main.media_query_tpl("desktop")),r=t[0].sheet;for(let t=0;tr.insertRule(e.cssText,r.cssRules.length)),TVE.CSS_Rule_Cache.getImports().forEach(e=>r.insertRule(e,0))}function a(e,t){TVE.do_action(`global_styles.${e}.update`,t)}TVE.main.on("stylesheet_loaded",o),TVE.main.on("tcb-ready",()=>setTimeout(o,1e3)),e.FE.PLUGINS.styles=function(r){function o(e=null){if("A"!==(e=e&&e.length?e:r.tcb.getBlockElement(t))[0].tagName||TVE.ActiveElement.is("a")||(e=e.parent()),!e.data("tcb-default-type")){let t="A"===e[0].tagName?"link":e[0].tagName.toLowerCase();"div"===t?t="plaintext":"li"===t&&(t="p"),e.data("tcb-default-type",t)}return{$el:e,defaultType:e.data("tcb-default-type"),globalType:"A"===e[0].tagName?"link":"text"}}function s(e=null){const{$el:t,defaultType:n,globalType:r}=o(e),i={defaultStyleSelector:TVE.CONST.default_styles[n].selector,globalStylePrefix:TVE.CONST.global_styles[`prefix_${r}`],landingPageSelector:TVE.CONST.default_styles[n].lp_selector};"text"===r&&(i.required=["color","background-color","font-family","font-size","font-weight","font-style","margin","padding-top","padding-bottom","text-decoration","text-transform","border-left"],i.computed=["--tcb-applied-color"]);const a=new TVE.CSS(t,i);return a.defaultType=n,a.globalType=r,a}function l(e="id"){const{$el:t,globalType:n}=o(),r=TVE.CONST.global_styles[`prefix_${n}`],i=TVE.getClassThatContains(t,r);if(!i)return null;const a=i.replace(r,"");switch(e){case"class":return i;case"id":return a;case"object":case"style":return TVE._.findWhere(TVE.CONST.global_styles[n],{id:a})}}function d(e,t){const{$el:n,globalType:r}=o(t);n.removeClassContaining(TVE.CONST.global_styles[`prefix_${r}`]).removeAttr("data-css"),e&&n.addClass(TVE.CONST.global_styles[`prefix_${r}`]+e),TVE.main.update_components()}function c(e=null){const t=s();t.removeImportant(),f(e=e||t.defaultType,!1),Array.isArray(e)||(e=[e]);const r={};let o=[],a=!1;e.forEach(e=>{t.options=n(n({},t.options),{defaultStyleSelector:TVE.CONST.default_styles[e].selector,landingPageSelector:TVE.CONST.default_styles[e].lp_selector}),"li"===e&&t.remove("padding","padding-top","padding-bottom"),t.write(TVE.CONST.landing_page?"landing_page":"default");const i=t.asString();o=o.concat(i["@imports"]),delete i["@imports"],r[e]=JSON.stringify(i),e===t.defaultType&&(a=!0)}),TVE.CONST.landing_page?i():TVE.ajax("default_styles","post",{_do:"save",expect:"html",imports:o,json_rules:r}).done(e=>{TVE.$(".tve_global_style").replaceWith(e)}),a&&d(null)}function f(t,n=!1){if(TVE.CONST.landing_page)return function(t){Array.isArray(t)||(t=[t]),t.forEach(t=>{TVE.head_css_remove(TVE.CONST.default_styles[t].lp_selector.split(", ").shift(),null,!0);const n=new TVE.CSS(e(),{landingPageSelector:TVE.CONST.default_styles[t].lp_selector});n.css=e.extend(!0,{},TVE.CONST.landing_page_text_styles[t]),n.write("landing_page")}),i(),TVE.main.update_components()}(t);const r={};t=t||o().type,Array.isArray(t)||(t=[t]),TVE.USE_GLOBALSHEET=!0,t.forEach(e=>{TVE.head_css_remove(TVE.CONST.default_styles[e].selector.split(", ").shift(),null,!0),r[e]=JSON.stringify({})}),TVE.USE_GLOBALSHEET=!1,n&&(TVE.ajax("default_styles","post",{_do:"save",expect:"html",json_rules:r}).done(e=>{TVE.$(".tve_global_style").replaceWith(e)}),TVE.main.update_components())}return{apply:d,update:function(e,t=null){if("__default"===e)return c(t);const n=s(),r=TVE.CONST.global_styles[`prefix_${n.globalType}`]+e,o=TVE._.findWhere(TVE.CONST.global_styles[n.globalType],{id:e});TVE.USE_GLOBALSHEET=!0,TVE.head_css_remove(r,null,!0),TVE.USE_GLOBALSHEET=!1,n.write("global",r),TVE.Components["shared-styles"].save_style({identifier:e,type:t||n.globalType,global_class:r,attr:o.attr}).done(()=>{setTimeout(i,500)}),a(n.globalType,"update"),d(e)},add:function(e){const t=s().write("instance");t.$el.removeClassContaining(`${TVE.CONST.global_styles.prefix}`);const n=TVE.ActiveElement;TVE.ActiveElement=t.$el,TVE.ActiveElement.data("tcb-elem-type",t.globalType),TVE.Components["shared-styles"].add_style(e,{attr:{tag:t.defaultType}}).done(()=>{setTimeout(i,500)}),TVE.ActiveElement=n,a(t.globalType,"add")},remove:function(e){const{$el:t,globalType:n}=o();if(!t.length)return!0;const r=TVE.CONST.global_styles[n];t.removeClassContaining(e),TVE.CONST.global_styles[n]=TVE._.reject(r,t=>t.id===e),TVE.USE_GLOBALSHEET=!0,TVE.head_css_remove(e,null,!0),TVE.USE_GLOBALSHEET=!1,TVE.ajax("global_styles","post",{identifier:e,type:n,delete:1}),a(n,"remove"),TVE.main.update_components()},get:l,updateDefault:c,removeDefault:f,label:function(e=l("object")){return e&&e.name?e.name:TVE.CONST.landing_page?TVE.t.lp_default:TVE.t.State_Default},setActiveElement:function(e){t=e},elementCSS:s}}}},39884:e=>{e.exports=function(e){function t(t,n){let r=t.parent();if(r.length)for(;!r.is("#tve_editor")&&r.length;){const t=r.clone().empty(),o=r.html().split(/

    ]*)>More...<\/span><\/p>/);if(e(o[1]).length){const n=r.children(".tve-page-section-out,.tve-content-box-background");n.length&&(o[1]=e("

    ").append(n).html()+o[1]),r.html(o[0]),t.html(o[1]),r.after(t)}else r.find(".tve_more_tag").remove();r.after(n),r=r.parent()}}e.FE.DefineIcon("moreTagIcon",{NAME:"ellipsis-h"}),e.FE.RegisterCommand("tcbMoreTag",{title:"Insert Read More tag after current paragraph",icon:"moreTagIcon",undo:!1,focus:!1,refreshAfterCallback:!1,callback(){let n=this.tcb.getBlockElement();const r=n.closest(".thrv_wrapper"),o=e('

    More...

    ');n.is("li")&&(n=n.closest("ul,ol"));const i=n.nextAll();if(TVE.Editor_Page.before_action(),i.length){const e=r.clone().empty();r.after(e),e.append(i)}TVE.Editor_Page.editor.find(".tve_more_tag").remove(),r.after(o),t(r,o),TVE.Editor_Page.after_action(),TVE.drag.refresh(!0)},split_contents:t,refresh(e){this.tcb.getBlockElement().closest("table").length?e.hide():e.show()}}),e(function(){TVE.add_action("tcb_after_element_drop",function(n,r,o){if(n.hasClass("tve_more_tag")){e(".tve_more_tag").not(n).remove(),n.removeClass("tve-dropped tve-droppable");const i=r.is(TVE.Editor_Page.editor);let a=i?r:r.closest(TVE.drag.getDraggableElements());if(i&&"mid"===o)a.append(n);else if(a.length)if("bottom"===o)t(a,n);else if("top"===o||"mid"===o){for(a=n.prev(TVE.drag.getDraggableElements());!a.length&&(a=n.parents(TVE.drag.getDraggableElements()).first(),a.length);)a.before(n),a=n.prev(TVE.drag.getDraggableElements());a.length&&t(a,n)}}})})}},40248:e=>{const t={setItem(e,t){},getItem(e){},removeItem(e){}};function n(){this.api=window.localStorage||t,this.keys={link_new_tab:"tcb-lnk-new-tab",link_no_follow:"tcb-lnk-no-follow",jump_animation:"smooth-anim",video:{autoplay:"tcb-video-autoplay",controls:"tcb-video-controls",loop:"tcb-video-loop",showinfo:"tcb-video-showinfo",modestbranding:"tcb-video-modestbranding",byline:"tcb-video-byline","play-bar":"tcb-video-play-bar",fs:"tcb-video-fs",rel:"tcb-video-rel"},audio:{"data-autoplay":"tcb-audio-autoplay",loop:"tcb-audio-loop","no-download":"tcb-audio-no-download",auto_play:"tcb-audio-auto_play",show_artwork:"tcb-audio-show_artwork",show_user:"tcb-audio-show_user"}},jQuery(window).on("storage.tcb",jQuery.proxy(function(e){let t=(e=e.originalEvent).newValue,n=e.oldValue;try{t=JSON.parse(t),n=JSON.parse(n)}catch(e){}jQuery(this).trigger(e.key,[t,n])},this))}n.prototype.set=function(e,t){if(!e||null==t)return this;"object"==typeof t&&(t=JSON.stringify(t));try{this.api.setItem(e,t)}catch(e){}return this},n.prototype.get=function(e){if(!e)return;const t=this.api.getItem(e);if(!t)return t;try{return JSON.parse(t)}catch(e){return t}},n.prototype.unset=function(e){if(!e)return this;try{this.api.removeItem(e)}catch(e){}return this},n.prototype.on=function(e,t){return jQuery(this).on(e,function(e,n,r){t(n,r)})},n.prototype.off=function(e){return jQuery(this).off(e)},n.prototype.setComponentMeta=function(e,t,n){const r=this.get("tcb-components-display")||{};r[e]=r[e]||{},r[e][t]=n,this.set("tcb-components-display",r)},n.instance=function(){return this._instance||(this._instance=new n),this._instance},e.exports=n.instance()},41462:(e,t,n)=>{e.exports=function(e){if(0===Object.keys(TVE.CONST.inline_shortcodes).length)return;const t=n(58539),r={};t.SHORTCODE_GROUP_ORDER_MAP=TVE.apply_filters("tcb.inline_shortcodes.shortcode_group",t.SHORTCODE_GROUP_ORDER_MAP),t.SHORTCODE_GROUP_ORDER_MAP.forEach(e=>{TVE.CONST.inline_shortcodes[e]&&(r[e]=TVE.CONST.inline_shortcodes[e])}),TVE.CONST.inline_shortcodes=r,n(47198)(),TVE.inlineShortcodeFn=n(90773),e.FE.PLUGINS.shortcodePopup=n(86656),e.FroalaEditor.DefineIcon("shortcode",{NAME:"database-regular"}),e.FroalaEditor.RegisterCommand("shortcode",{className:"fr-has-caret",undo:!0,focus:!0,popup:!0,refreshAfterCallback:!1,forcedRefresh:!0,callback(){const e=this.$tb.find(".fr-btn[data-cmd=shortcode]"),n=this.popups.isVisible(t.SHORTCODE_POPUP);n?this.popups.hide(t.SHORTCODE_POPUP):this.shortcodePopup.showPopup(),e.toggleClass("fr-popup-active",!n).toggleClass("fr-active",!!TVE.$CURRENT_SHORTCODE)},refresh(e){this.shortcodePopup.refreshToolbarButton(e)},plugin:"shortcodePopup"}),e.extend(e.FroalaEditor.POPUP_TEMPLATES,{[t.SHORTCODE_POPUP]:"[_BUTTONS_][_CUSTOM_LAYER_]"}),e.FE.DefineIcon("shortcodeInsert",{NAME:"arrow-left-light"}),e.FE.RegisterCommand("shortcodeInsert",{focus:!1,refreshAfterCallback:!0,callback(){this.shortcodePopup.insertCallback()},refresh(e){const t=this.shortcodePopup.getShortcode(),n=t&&t.length>0;e.toggle(n).text(this.language.translate(n?"Update":"Insert"))}}),e.FE.DefineIcon("shortcodeRemove",{NAME:"times-light"}),e.FE.RegisterCommand("shortcodeRemove",{title:"Remove",undo:!0,focus:!1,refreshAfterCallback:!0,callback(){this.shortcodePopup.removeShortcode(),this.link.remove()},refresh(e){e.toggleClass("fr-hidden",!this.shortcodePopup.getShortcode())}})}},44100:e=>{e.exports=function(e){e.FE.PLUGINS.tcb=function(t){function n(){let n;return n="A"===t.el.tagName&&t.selection.element()===t.el?t.$el:e(t.selection.blocks()),n}return{getBlockElement:function(r=null){let o=null;if(!t.selection.isCollapsed()){o=n().filter(TVE.BLOCK_ELEMENTS);const e=o.children("a");o.is("a")||1!==e.length||o.text().length!==e.text().length||(o=e)}return o&&o.length&&!t.selection.isCollapsed()||(o=e(t.selection.element().closest(TVE.BLOCK_ELEMENTS))),o&&o.length||(o=r||t.$el),o},selectionIsFullBlock:function(){const e=n();return!(e.length>1)&&e.text().trim().length===t.selection.text().trim().length},blockRefresh:function(n,r){const o=t.html.defaultTag();"N"===r&&void 0!==o&&(r=o.toUpperCase());const i=t.selection.blocks()[0].tagName===r||1===e(t.selection.blocks()[0]).closest(r).length;n.toggleClass("fr-active",i).attr("aria-pressed",i)},getSelectionBlock:n}},e.FE.DEFAULTS.htmlAllowedAttrs.push("onclick"),e.FE.DefineIcon("tcbFroalaMode",{NAME:"ellipsis-v-regular"}),e.FE.RegisterCommand("tcbFroalaMode",{type:"dropdown",title:"Froala View",focus:!0,undo:!0,options:{tve_froala_default:"Normal Mode",tve_froala_distraction_free:"Distraction Free Mode",tve_froala_pinned_mode:"Pinned Mode"},selectedIcon:TVE.icon("check"),callback(e,t){TVE.CONST.froalaMode&&"tve_froala_default"!==t||(TVE.CONST.froalaMode={tve_froala_distraction_free:!1,tve_froala_pinned_mode:!1}),"tve_froala_default"!==t&&(TVE.CONST.froalaMode[t]=!JSON.parse(TVE.CONST.froalaMode[t])),TVE.Editor_Page.updateFroalaModeDisplay(),TVE.CONST.froalaMode.tve_froala_distraction_free?TVE.ElementEditIcons.hide_icons():(TVE.ElementEditIcons.show_icons(TVE.ClickedElement),TVE.ClickedElement.closest(".tcb-group-editing").length&&(TVE.ClickedElement.hasClass("tcb-excluded-from-group-item")?TVE.ElementEditIcons.$unlock.toggle():TVE.ElementEditIcons.$lock.toggle())),TVE.ajax("froala_mode","post",{froala_mode:TVE.CONST.froalaMode})},refreshOnShow(e,t){const n=t.find("a").removeClass("fr-active");let r=!1;TVE._.isEmpty(TVE.CONST.froalaMode)||Object.keys(TVE.CONST.froalaMode).forEach(e=>{JSON.parse(TVE.CONST.froalaMode[e])&&(n.filter(`[data-param1="${e}"]`).addClass("fr-active"),r=!0)}),r||n.filter('[data-param1="tve_froala_default"]').addClass("fr-active")}})}},44692:e=>{e.exports=function(e){let t;function n(e){const t=e.selection.blocks();return t.length||"P"!==e.$oel[0].tagName||t.push(e.$oel),TVE.apply_filters("tve.froala.align.get_blocks",t)}e.FE.PLUGINS.align=function(r){return{apply:function(t){const o="P"!==r.$oel[0].tagName;r.selection.save(),r.html.wrap(o,!0,!1,!0),r.selection.restore();const i=n(r);for(let n=0;n{const r=n(70443);e.exports=function(){TVE.add_action("tcb.edit_mode.enter",e=>{const t=r.addCustomFieldsShortcodes(TVE.CONST.inline_shortcodes);TVE.CONST.inline_shortcodes=TVE.apply_filters("tcb.filter_inline_shortcodes.enter",t,e)}),TVE.add_action("tcb.edit_mode.exit",e=>{TVE.CONST.inline_shortcodes=TVE.apply_filters("tcb.filter_inline_shortcodes.exit",TVE.CONST.inline_shortcodes,e)}),TVE.add_action("tcb.element.before_focus",()=>{TVE.$CURRENT_SHORTCODE=null}),TVE.add_filter("tcb_is_protected_text",e=>(TVE.$CURRENT_SHORTCODE&&(e=!1),e)),TVE.add_action("tcb.froala.dynamic_link_select_change",(e,t)=>{const n=t.target,r=n.options[n.selectedIndex].dataset.shortcodeId;n.options.length&&("mail"===r?(e.find(".tcb-email-dynamic-link-info").show(),e.find(".tcb-phone-dynamic-link-info").hide()):"phone"===r||"alt_phone"===r?(e.find(".tcb-phone-dynamic-link-info").show(),e.find(".tcb-email-dynamic-link-info").hide()):(e.find(".tcb-phone-dynamic-link-info").hide(),e.find(".tcb-email-dynamic-link-info").hide()))})}},58539:e=>{e.exports={ATTRIBUTE_IDENTIFIER:"data-attr-",OPTION_IDENTIFIER:"data-option-",DEFAULT_TITLE:"Dynamic text",SHORTCODE_POPUP:"shortcode.popup",SHORTCODE_CLASS:"thrive-inline-shortcode",SHORTCODE_CONTENT_CLASS:"thrive-shortcode-content",SHORTCODE_LINK_IDENTIFIER:"4",SHORTCODE_TEXT_IDENTIFIER:"1",CUSTOM_FIELDS:{POST_LIST_KEY:"tcb_post_custom_field",POST_LIST_EXTRA_KEY:"CFP",GLOBAL_KEY:"thrive_custom_fields_shortcode_data",GLOBAL_EXTRA_KEY:"CFG"},SHORTCODE_GROUP_ORDER_MAP:["Post","Taxonomies","Content","WooCommerce","Custom fields","Global fields","User data","Request data","Source","Time & date","Post list pagination"]}},58601:(e,t,n)=>{const r=n(40248);e.exports=function(e){let t=!1,n=!1,o=!1,i=!1;const a="Content",s="Custom Fields";function l(e){const t={thrive_lightbox:"TCB Lightbox",thrive_leads_2_step:"ThriveBox"};return t[e]?t[e]:e}function d(e,t){let n,r=null;e.autocomplete({appendTo:e.parent(),source(e,t){if(r===e.term)return void t(n);if(/^https?:/.test(e.term)||-1!==e.term.indexOf("."))return t();const o=TVE.apply_filters("link_search_lightbox",1);TVE.ajax("post_search","post",{q:e.term,search_lightbox:o}).done(function(e){n=e,t(e)}),r=e.term},select:(n,r)=>(t(r.item),e.autocomplete("destroy"),d(e,t),!1),open(){e.autocomplete("widget").css({width:"100%","max-height":"170px"})},minLength:2,delay:300,position:{my:"left top+2"}}),e.data("ui-autocomplete")._renderItem=function(e,t){return jQuery('
  • ').append('
    '+t.label+'
    '+(t.post_type_name?t.post_type_name:t.type)+"").appendTo(e)},e.autocomplete("widget").addClass("tcb-suggest tcb-absolute")}e.extend(e.FE.POPUP_TEMPLATES,{"tcbLink.edit":"[_BUTTONS_]","tcbLink.insert":"[_BUTTONS_][_INPUT_LAYER_]"}),e.extend(e.FE.DEFAULTS,{linkInsertButtons:["searchSettings"],linkAttributes:{},linkAutoPrefix:"http://",linkText:!0}),e.FE.PLUGINS.link=function(c){function f(){if("A"===c.el.tagName)return c.el;if(c.$wp){let t=c.selection.ranges(0).commonAncestorContainer;if(t&&(t.contains&&t.contains(c.el)||!c.el.contains(t)||c.el===t)&&(t=null),t&&"A"===t.tagName)return t;let n=c.selection.element(),r=c.selection.endElement();return"A"===n.tagName||c.node.isElement(n)||(n=e(n).parentsUntil(c.$el,"a:first").get(0)),"A"===r.tagName||c.node.isElement(r)||(r=e(r).parentsUntil(c.$el,"a:first").get(0)),r&&(r.contains&&r.contains(c.el)||!c.el.contains(r)||c.el===r)&&(r=null),n&&(n.contains&&n.contains(c.el)||!c.el.contains(n)||c.el===n)&&(n=null),r&&r===n&&"A"===r.tagName?n:null}}function p(){const e=[];let t,n,r,o;if(c.win.getSelection){const i=c.win.getSelection();if(i.getRangeAt&&i.rangeCount){o=c.doc.createRange();for(let a=0;a-1&&e.push(r[n])}}}else if(c.doc.selection&&"Control"!==c.doc.selection.type)if(t=c.doc.selection.createRange(),n=t.parentElement(),"a"===n.nodeName.toLowerCase())e.push(n);else{r=n.getElementsByTagName("a"),o=c.doc.body.createTextRange();for(let n=0;n-1&&o.compareEndPoints("EndToStart",t)<1&&e.push(r[n])}return e}function u(){}function g(){const i=c.popups.get("tcbLink.insert");o=!1;const a=e(f());if(a&&a.length){const e=a[0],t=i.find('input.fr-link-attr[type="text"]'),n=i.find('input.fr-link-attr[type="checkbox"]'),r=i.find('input.fr-jump-attr[name="jump-animation"]');let s,d;c.opts.linkEventActions&&c.opts.linkEventActions.updateFromLink(a,i)||e.classList.contains("tve_evt_manager_listen")&&(s=TVE.EventManager.get(e,"click"),s&&(o={is_popup:!0,title:l(s.a),event_action:s.a,id:s.config.l_id||s.config.id},d="#"+o.title)),t.each(function(){const t=this.getAttribute("name");let n;t&&(n="href"===t&&o?d:"href"===t?e.getAttribute("data-tcb-href")||e.getAttribute("href"):e.getAttribute(t),this.value=n)}),n.prop("checked",!1).each(function(){const t=e.getAttribute(this.getAttribute("name"));this.checked=t&&-1!==t.indexOf(this.getAttribute("data-checked"))});const f=e.getAttribute("jump-animation");r.prop("checked",f),TVE.jumplinks.isJumplink(a)||m(i,"static"),i.find('input.fr-link-attr[type="text"][name="text"]').val(a.text())}else i.find('input.fr-link-attr[type="text"]').val(""),i.find('input.fr-link-attr[type="checkbox"]').prop("checked",!1),i.find('input.fr-jump-attr[type="checkbox"]').prop("checked",!1),i.find('input.fr-link-attr[type="text"][name="text"]').val(c.selection.text()),(r.get(r.keys.link_new_tab)||c.$oel.closest(".tcb-lg-consent"))&&i.find('input.fr-link-attr[name="target"]').prop("checked",!0),r.get(r.keys.link_no_follow)&&i.find('.fr-link-attr[name="rel"]').prop("checked",!0),r.get(r.keys.jump_animation)&&i.find('input.fr-jump-attr[name="jump-animation"]').prop("checked",!0),c.opts.linkEventActions&&c.opts.linkEventActions.reset(i);t=i.find('input[name="text"]').val().length,n=!0,i.find('input.fr-link-attr:not([type="checkbox"])').trigger("change"),i.find('.fr-link-attr[name="text"]').parent().toggle(!TVE.$CURRENT_SHORTCODE),v(i)}function h(i){if(i)return c.popups.onRefresh("tcbLink.insert",g),c.popups.onHide("tcbLink.insert",u),!0;let l="";c.opts.linkInsertButtons.length>=1&&(l='
    '+c.button.buildList(c.opts.linkInsertButtons)+"
    ");let p=0,h='
  • "))}}(),function(){for(var n=t.el.querySelectorAll("li > ul, li > ol"),r=0;r");e(o.parentNode).after(a);do{var s=i;i=i.nextSibling,a.append(s)}while(i)}}}(),function(){for(var n=t.el.querySelectorAll("li > ul, li > ol"),r=0;r");else if(o.previousSibling&&"BR"==o.previousSibling.tagName){for(var i=o.previousSibling.previousSibling;i&&t.node.hasClass(i,"fr-marker");)i=i.previousSibling;i&&"BR"!=i.tagName&&e(o.previousSibling).remove()}}}(),function(){for(var n=t.el.querySelectorAll("ul, ol"),r=0;r=0;a--)"LI"!=o[a].tagName?(i||(i=e("
  • ")).insertBefore(o[a]),i.prepend(o[a])):i=null}(),function(){for(var n=t.el.querySelectorAll("li:empty"),r=0;r "+t.html.defaultTag()),r=n.length-1;r>=0;r--){var o=n[r];o.previousSibling&&!t.node.isEmpty(o)&&e("
    ").insertAfter(o.previousSibling),o.outerHTML=o.innerHTML}}()},quotes:function(){for(var n=t.el.querySelectorAll("blockquote + blockquote"),r=0;r=0;r--)if(!(a[r].textContent&&a[r].textContent.replace(/\u200B|\n/g,"").length>0||a[r].querySelectorAll(f).length>0)){for(var p=t.node.contents(a[r]),u=!1,g=0;g0){u=!0;break}u||o.push(a[r])}return o}function i(){return e.FE.BLOCK_TAGS.join(", ")}function a(n){var r,o,i=e.merge([],e.FE.VOID_ELEMENTS);i=e.merge(i,t.opts.htmlAllowedEmptyTags),void 0===n&&(i=e.merge(i,e.FE.BLOCK_TAGS)),r=t.el.querySelectorAll("*:empty:not("+i.join("):not(")+"):not(.fr-marker)");do{o=!1;for(var a=0;a=0&&!t.node.hasClass(l,"fr-marker")))a=null,i.appendChild(l);else if(l.nodeType!=Node.ELEMENT_NODE&&l.nodeType!=Node.TEXT_NODE)a=null,i.appendChild(l);else if("BR"==l.tagName)null==a?(a=t.doc.createElement(o),r&&a.setAttribute("data-empty",!0),a.appendChild(l),i.appendChild(a)):!1===s&&(a.appendChild(t.doc.createElement("br")),a.setAttribute("data-empty",!0)),a=null;else{var c=l.textContent;l.nodeType==Node.TEXT_NODE&&0===c.replace(/\n/g,"").replace(/(^( |\t)*)|(( |\t)*$)/g,"").length||(null==a&&(a=t.doc.createElement(o),r&&a.setAttribute("class","fr-temp-div"),i.appendChild(a),s=!1),a.appendChild(l),s||t.node.hasClass(l,"fr-marker")||l.nodeType==Node.TEXT_NODE&&0===c.replace(/([ \t])/g,"").length||(s=!0))}l=d}e.innerHTML="",e.appendChild(i)}}function l(e,t){for(var n=0;n=0)return!1;for(var n=t.doc.createTreeWalker(e,NodeFilter.SHOW_TEXT,t.node.filter(function(e){return null!=e.textContent.match(/([ \n]{2,})|(^[ \n]{1,})|([ \n]{1,}$)/g)}),!1);n.nextNode();){var o=n.currentNode;if(!r(o.parentNode)){var i=t.node.isBlock(o.parentNode)||t.node.isElement(o.parentNode),a=o.textContent.replace(/(?!^)( ){2,}(?!$)/g," ").replace(/\n/g," ").replace(/^[ ]{2,}/g," ").replace(/[ ]{2,}$/g," ");if(i){var s=o.previousSibling,l=o.nextSibling;s&&l&&" "==a?a=t.node.isBlock(s)&&t.node.isBlock(l)?"":"\n":(s||(a=a.replace(/^ */,"")),l||(a=a.replace(/ *$/,"")))}o.textContent=a}}}function f(e,t,n){var r=new RegExp(t,"gi").exec(e);return r?r[n]:null}function p(n,r){var o=n.parentNode;if(o&&(t.node.isBlock(o)||t.node.isElement(o))&&["TD","TH"].indexOf(o.tagName)<0){for(var i=n.previousSibling,a=n.nextSibling;i&&i.nodeType==Node.TEXT_NODE&&0===i.textContent.replace(/\n|\r/g,"").length;)i=i.previousSibling;i&&o&&"BR"!=i.tagName&&!t.node.isBlock(i)&&!a&&o.textContent.replace(/\u200B/g,"").length>0&&i.textContent.length>0&&!t.node.hasClass(i,"fr-marker")&&(t.el==o&&!a&&t.opts.enter==e.FE.ENTER_BR&&t.browser.msie||(r&&t.selection.save(),n.parentNode.removeChild(n),r&&t.selection.restore()))}else!o||t.node.isBlock(o)||t.node.isElement(o)||n.previousSibling||n.nextSibling||p(n.parentNode,r)}function u(){t.opts.htmlUntouched||(a(),d()),c(),t.opts.htmlUntouched||(t.spaces.normalize(null,!0),t.html.fillEmptyBlocks(),t.clean.quotes(),t.clean.lists(),t.clean.tables(),t.clean.toHTML5(),t.html.cleanBRs()),t.selection.restore(),g()}function g(){t.core.isEmpty()&&(null!=n()?t.el.querySelector(i())||t.el.querySelector(t.opts.htmlDoNotWrapTags.join(":not(.fr-marker),")+":not(.fr-marker)")||(t.core.hasFocus()?(t.$el.html("<"+n()+">"+e.FE.MARKERS+"
    "),t.selection.restore()):t.$el.html("<"+n()+">
    ")):t.el.querySelector("*:not(.fr-marker):not(br)")||(t.core.hasFocus()?(t.$el.html(e.FE.MARKERS+"
    "),t.selection.restore()):t.$el.html("
    ")))}function h(e){var t;return(t=/:not\(([^\)]*)\)/g).test(e)&&(e=e.replace(t," $1 ")),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+((e=(e=e.replace(/[\*\s\+>~]/g," ")).replace(/[#\.]/g," ")).match(/([^\s\+>~\.\[:]+)/g)||[]).length}function m(e){if(t.events.trigger("html.processGet",[e]),e&&e.getAttribute&&""===e.getAttribute("class")&&e.removeAttribute("class"),e&&e.nodeType==Node.ELEMENT_NODE)for(var n=e.querySelectorAll('[class=""]'),r=0;r")}},cleanEmptyTags:a,cleanWhiteTags:v,cleanBlankSpaces:c,blocks:function(){return t.$el.get(0).querySelectorAll(i())},getDoctype:function(e){var t=e.doctype,n="";return t&&(n=""),n},set:function(e,n=!0){var r=n?t.clean.html(e||"",[],[],!1):e;!function(e,n){t.opts.htmlExecuteScripts?e.html(n):e.get(0).innerHTML=n}(t.$el,r);var o=t.edit.isDisabled();t.edit.on(),u(),t.opts.useClasses||(t.$el.find("[fr-original-class]").each(function(){this.setAttribute("class",this.getAttribute("fr-original-class")),this.removeAttribute("fr-original-class")}),t.$el.find("[fr-original-style]").each(function(){this.setAttribute("style",this.getAttribute("fr-original-style")),this.removeAttribute("fr-original-style")})),o&&t.edit.off(),t.events.trigger("html.set")},get:function(e,n){if(!t.$wp)return t.$oel.clone().removeClass("fr-view").removeAttr("contenteditable").get(0).outerHTML;var r="";t.events.trigger("html.beforeGet");var o,i,a=[],s={},l=[];if(!t.opts.useClasses&&!n){var d=new RegExp("^"+t.opts.htmlIgnoreCSSProperties.join("$|^")+"$","gi");for(o=0;o0){var g,v=c[p].selectorText.replace(/body |\.fr-view /g,"").replace(/::/g,":");try{g=t.el.querySelectorAll(v)}catch(e){g=[]}for(i=0;i=0&&(s[g[i]][y]=1e4)),b>=s[g[i]][y]&&(s[g[i]][y]=b,T[S].trim().length&&l.push([g[i],y.trim(),T[S].trim().split(":")[1].trim(),b])))}}}}for(l.sort(E),o=0;o0){var _=a[o].getAttribute("fr-original-style").split(";");for(i=0;i<_.length;i++)_[i].indexOf(":")>0&&(a[o].style[_[i].split(":")[0].trim()]=_[i].split(":")[1].trim())}}if(t.core.isEmpty()||(void 0===e&&(e=!1),r=t.$el.html()),!t.opts.useClasses&&!n)for(o=0;o]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,"")),r=t.clean.invisibleSpaces(r),r=t.clean.exec(r,m);var C=t.events.chainTrigger("html.get",r);return"string"==typeof C&&(r=C),r.replace(/(?:[\w\W]*?)<\/pre>/g,function(e){return e.replace(/
    /g,"\n")})},getSelected:function(){var n=function(n,r){for(;r&&(r.nodeType==Node.TEXT_NODE||!t.node.isBlock(r))&&!t.node.isElement(r);)r&&r.nodeType!=Node.TEXT_NODE&&e(n).wrapInner(t.node.openTagString(r)+t.node.closeTagString(r)),r=r.parentNode;r&&n.innerHTML==r.innerHTML&&(n.innerHTML=r.outerHTML)},r=function(){var n,r=null;return t.win.getSelection?(n=t.win.getSelection())&&n.rangeCount&&(r=n.getRangeAt(0).commonAncestorContainer).nodeType!=Node.ELEMENT_NODE&&(r=r.parentNode):(n=t.doc.selection)&&"Control"!=n.type&&(r=n.createRange().parentElement()),null!=r&&(e.inArray(t.el,e(r).parents())>=0||r==t.el)?r:null},o="";if(void 0!==t.win.getSelection){t.browser.mozilla&&(t.selection.save(),t.$el.find('.fr-marker[data-type="false"]').length>1&&(t.$el.find('.fr-marker[data-type="false"][data-id="0"]').remove(),t.$el.find('.fr-marker[data-type="false"]:last').attr("data-id","0"),t.$el.find(".fr-marker").not('[data-id="0"]').remove()),t.selection.restore());for(var i=t.selection.ranges(),a=0;a0&&(s=t.el),o+=s.innerHTML}}else void 0!==t.doc.selection&&"Text"==t.doc.selection.type&&(o=t.doc.selection.createRange().htmlText);return o},insert:function(n,r,o){var a,s,l;if(t.selection.isCollapsed()||t.selection.remove(),a=(a=r?n:t.clean.html(n)).replace(/\r|\n/g," "),n.indexOf('class="fr-marker"')<0&&(s=a,(l=t.doc.createElement("div")).innerHTML=s,t.selection.setAtEnd(l),a=l.innerHTML),t.core.isEmpty()&&!t.opts.keepFormatOnDelete)t.el.innerHTML=a;else{var d=t.markers.insert();if(d){t.node.isLastSibling(d)&&e(d).parent().hasClass("fr-deletable")&&e(d).insertAfter(e(d).parent());var c=t.node.blockParent(d);if((function(e){var n=t.doc.createElement("div");return n.innerHTML=e,null!==n.querySelector(i())}(a)||o)&&(t.node.deepestParent(d)||c&&"LI"==c.tagName)){if(!(d=t.markers.split()))return!1;d.outerHTML=a}else d.outerHTML=a}else t.el.innerHTML=t.el.innerHTML+a}u(),t.events.trigger("html.inserted")},wrap:d,unwrap:function(){t.$el.find("div.fr-temp-div").each(function(){e(this).data("empty")||"LI"==this.parentNode.tagName||t.node.isBlock(this.nextSibling)&&!e(this.nextSibling).hasClass("fr-temp-div")?e(this).replaceWith(e(this).html()):e(this).replaceWith(e(this).html()+"
    ")}),t.$el.find(".fr-temp-div").removeClass("fr-temp-div").filter(function(){return""===e(this).attr("class")}).removeAttr("class")},escapeEntities:function(e){return e.replace(//gi,">").replace(/"/gi,""").replace(/'/gi,"'")},checkIfEmpty:g,extractNode:function(e,t){return f(e,"<"+t+"[^>]*?>([\\w\\W]*)",1)},extractNodeAttrs:function(n,r){var o=e("
    ]*?)>",1)||"")+">");return t.node.rawAttributes(o.get(0))},extractDoctype:function(e){return f(e,"]*?)>",0)||""},cleanBRs:function(e,n){var r,o=null;if(e)for(o=function(){var e,n,r=t.selection.element(),o=[];if(e=t.node.isBlock(r)?r:t.node.blockParent(r)){var i=e.nextSibling,a=e.previousSibling;e&&o.indexOf(e)<0&&o.push(e),a&&t.node.isBlock(a)&&o.indexOf(a)<0&&o.push(a),i&&t.node.isBlock(i)&&o.indexOf(i)<0&&o.push(i)}var s=[];for(n=0;n1&&t.$box.css("z-index",t.opts.zIndex),t.opts.theme&&t.$box.addClass(t.opts.theme+"-theme"),t.html.set(t._original_html,!1),t.$el.attr("spellcheck",t.opts.spellcheck),t.helpers.isMobile()&&(t.$el.attr("autocomplete",t.opts.spellcheck?"on":"off"),t.$el.attr("autocorrect",t.opts.spellcheck?"on":"off"),t.$el.attr("autocapitalize",t.opts.spellcheck?"on":"off")),t.opts.disableRightClick&&t.events.$on(t.$el,"contextmenu",function(e){if(2==e.button)return!1});try{t.doc.execCommand("styleWithCSS",!1,!1)}catch(e){}}"TEXTAREA"==t.$oel.get(0).tagName&&(t.events.on("contentChanged",function(){t.$oel.val(t.html.get())}),t.events.on("form.submit",function(){t.$oel.val(t.html.get())}),t.events.on("form.reset",function(){t.html.set(t._original_html)}),t.$oel.val(t.html.get())),t.helpers.isIOS()&&t.events.$on(t.$doc,"selectionchange",function(){t.$doc.get(0).hasFocus()||t.$win.get(0).focus()}),t.events.trigger("init")},destroy:function(e){"TEXTAREA"==t.$oel.get(0).tagName&&t.$oel.val(e),t.$wp&&("TEXTAREA"==t.$oel.get(0).tagName?(t.$el.html(""),t.$wp.html(""),t.$box.replaceWith(t.$oel),t.$oel.show()):t.$oel.get(0).getAttribute("class").includes("tve_btn_txt")?(t.$wp.html(e),t.$box.removeClass("fr-view fr-ltr fr-box "+(t.opts.editorClass||"")),t.opts.theme&&t.$box.addClass(t.opts.theme+"-theme")):(t.$wp.replaceWith(e),t.$el.html(""),t.$box.removeClass("fr-view fr-ltr fr-box "+(t.opts.editorClass||"")),t.opts.theme&&t.$box.addClass(t.opts.theme+"-theme"))),this.$wp=null,this.$el=null,this.el=null,this.$box=null},isEmpty:function(){return t.node.isEmpty(t.el)},hasFocus:function(){return t.browser.mozilla&&t.helpers.isMobile()?t.selection.inEditor():t.node.hasFocus(t.el)||t.$el.find("*:focus").length>0},sameInstance:function(e){if(!e)return!1;var n=e.data("instance");return!!n&&n.id==t.id}}},e.FE.MODULES.cursorLists=function(t){function n(e){for(var t=e;"LI"!=t.tagName;)t=t.parentNode;return t}function r(e){for(var n=e;!t.node.isList(n);)n=n.parentNode;return n}function o(o){var i,a=n(o),s=a.nextSibling,l=a.previousSibling,d=t.html.defaultTag();if(t.node.isEmpty(a,!0)&&s){for(var c="",f="",p=o.parentNode;!t.node.isList(p)&&p.parentNode&&"LI"!==p.parentNode.tagName;)c=t.node.openTagString(p)+c,f+=t.node.closeTagString(p),p=p.parentNode;c=t.node.openTagString(p)+c,f+=t.node.closeTagString(p);var u;for(u=p.parentNode&&"LI"==p.parentNode.tagName?f+"
  • "+e.FE.MARKERS+"
    "+c:d?f+"<"+d+">"+e.FE.MARKERS+"
    "+c:f+e.FE.MARKERS+"
    "+c,e(a).html('');["UL","OL"].indexOf(p.tagName)<0||p.parentNode&&"LI"===p.parentNode.tagName;)p=p.parentNode;var g=t.node.openTagString(p)+e(p).html()+t.node.closeTagString(p);g=g.replace(/<\/span>/g,u),e(p).replaceWith(g),t.$el.find("li:empty").remove()}else if(l&&s||!t.node.isEmpty(a,!0)){for(var h="
    ",m=o.parentNode;m&&"LI"!=m.tagName;)h=t.node.openTagString(m)+h+t.node.closeTagString(m),m=m.parentNode;e(a).before("
  • "+h+"
  • "),e(o).remove()}else l?((i=r(a)).parentNode&&"LI"==i.parentNode.tagName?e(i.parentNode).after("
  • "+e.FE.MARKERS+"
  • "):d?e(i).after("<"+d+">"+e.FE.MARKERS+"
    "):e(i).after(e.FE.MARKERS+"
    "),e(a).remove()):((i=r(a)).parentNode&&"LI"==i.parentNode.tagName?s?e(i.parentNode).before("
  • "+e.FE.MARKERS+"
  • "):e(i.parentNode).after("
  • "+e.FE.MARKERS+"
  • "):d?e(i).before("<"+d+">"+e.FE.MARKERS+"
    "):e(i).before(e.FE.MARKERS+"
    "),e(a).remove())}return{_startEnter:o,_middleEnter:function(r){for(var o=n(r),i="",a=r,s="",l="";a!=o;){var d="A"==(a=a.parentNode).tagName&&t.cursor.isAtEnd(r,a)?"fr-to-remove":"";s=t.node.openTagString(e(a).clone().addClass(d).get(0))+s,l=t.node.closeTagString(a)+l}i=l+i+s+e.FE.MARKERS,e(r).replaceWith('');var c=t.node.openTagString(o)+e(o).html()+t.node.closeTagString(o);c=c.replace(/<\/span>/g,i),e(o).replaceWith(c)},_endEnter:function(r){var i=n(r);if(t.opts.htmlUntouched&&t.node.isEmpty(i))return o(r);for(var a=e.FE.MARKERS,s="",l=r,d=!1;l!=i;){var c="A"==(l=l.parentNode).tagName&&t.cursor.isAtEnd(r,l)?"fr-to-remove":"";d||l==i||t.node.isBlock(l)||(d=!0,s+=e.FE.INVISIBLE_SPACE),s=t.node.openTagString(e(l).clone().addClass(c).get(0))+s,a+=t.node.closeTagString(l)}var f=s+a;e(r).remove(),e(i).after(f)},_backspace:function(o){var i=n(o),a=i.previousSibling;if(a){a=e(a).find(t.html.blockTagsQuery()).get(-1)||a,e(o).replaceWith(e.FE.MARKERS);var s=t.node.contents(a);s.length&&"BR"==s[s.length-1].tagName&&e(s[s.length-1]).remove(),e(i).find(t.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode==i&&e(this).replaceWith(e(this).html()+(t.node.isEmpty(this)?"":"
    "))});for(var l,d=t.node.contents(i)[0];d&&!t.node.isList(d);)l=d.nextSibling,e(a).append(d),d=l;for(a=i.previousSibling;d;)l=d.nextSibling,e(a).append(d),d=l;e(i).remove()}else{var c=r(i);if(e(o).replaceWith(e.FE.MARKERS),c.parentNode&&"LI"==c.parentNode.tagName){var f=c.previousSibling;t.node.isBlock(f)?(e(i).find(t.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode==i&&e(this).replaceWith(e(this).html()+(t.node.isEmpty(this)?"":"
    "))}),e(f).append(e(i).html())):e(c).before(e(i).html())}else{var p=t.html.defaultTag();p&&0===e(i).find(t.html.blockTagsQuery()).length?e(c).before("<"+p+">"+e(i).html()+""):(e(c).before(e(i).html()),t.html.wrap())}e(i).remove(),0===e(c).find("li").length&&e(c).remove()}},_del:function(r){var o,i=n(r),a=i.nextSibling;if(a){(o=t.node.contents(a)).length&&"BR"==o[0].tagName&&e(o[0]).remove(),e(a).find(t.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode==a&&e(this).replaceWith(e(this).html()+(t.node.isEmpty(this)?"":"
    "))});for(var s,l=r,d=t.node.contents(a)[0];d&&!t.node.isList(d);)s=d.nextSibling,e(l).after(d),l=d,d=s;for(;d;)s=d.nextSibling,e(i).append(d),d=s;e(r).replaceWith(e.FE.MARKERS),e(a).remove()}else{for(var c=i;!c.nextSibling&&c!=t.el;)c=c.parentNode;if(c==t.el)return!1;if(c=c.nextSibling,t.node.isBlock(c))e.FE.NO_DELETE_TAGS.indexOf(c.tagName)<0&&(e(r).replaceWith(e.FE.MARKERS),(o=t.node.contents(i)).length&&"BR"==o[o.length-1].tagName&&e(o[o.length-1]).remove(),e(i).append(e(c).html()),e(c).remove());else for((o=t.node.contents(i)).length&&"BR"==o[o.length-1].tagName&&e(o[o.length-1]).remove(),e(r).replaceWith(e.FE.MARKERS);c&&!t.node.isBlock(c)&&"BR"!=c.tagName;)e(i).append(e(c)),c=c.nextSibling}}}},e.FE.NO_DELETE_TAGS=["TH","TD","TR","TABLE","FORM"],e.FE.SIMPLE_ENTER_TAGS=["TH","TD","LI","DL","DT","FORM"],e.FE.MODULES.cursor=function(t){function n(e){return!!e&&(!!t.node.isBlock(e)||(e.nextSibling&&e.nextSibling.nodeType==Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?n(e.nextSibling):!(e.nextSibling&&(!e.previousSibling||"BR"!=e.nextSibling.tagName||e.nextSibling.nextSibling))&&n(e.parentNode)))}function r(e){return!!e&&(!!t.node.isBlock(e)||(e.previousSibling&&e.previousSibling.nodeType==Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?r(e.previousSibling):!e.previousSibling&&r(e.parentNode)))}function o(e,n){return!!e&&e!=t.$wp.get(0)&&(e.previousSibling&&e.previousSibling.nodeType==Node.TEXT_NODE&&0===e.previousSibling.textContent.replace(/\u200b/g,"").length?o(e.previousSibling,n):!e.previousSibling&&(e.parentNode==n||o(e.parentNode,n)))}function i(e,n){return!!e&&e!=t.$wp.get(0)&&(e.nextSibling&&e.nextSibling.nodeType==Node.TEXT_NODE&&0===e.nextSibling.textContent.replace(/\u200b/g,"").length?i(e.nextSibling,n):!(e.nextSibling&&(!e.previousSibling||"BR"!=e.nextSibling.tagName||e.nextSibling.nextSibling))&&(e.parentNode==n||i(e.parentNode,n)))}function a(n){return e(n).parentsUntil(t.$el,"LI").length>0&&0===e(n).parentsUntil("LI","TABLE").length}function s(e,t){var n=new RegExp("(?:[\\u2700-\\u27bf]|(?:\\ud83c[\\udde6-\\uddff]){2}|[\\ud800-\\udbff][\\udc00-\\udfff]|[\\u0023-\\u0039]\\ufe0f?\\u20e3|\\u3299|\\u3297|\\u303d|\\u3030|\\u24c2|\\ud83c[\\udd70-\\udd71]|\\ud83c[\\udd7e-\\udd7f]|\\ud83c\\udd8e|\\ud83c[\\udd91-\\udd9a]|\\ud83c[\\udde6-\\uddff]|[\\ud83c[\\ude01-\\ude02]|\\ud83c\\ude1a|\\ud83c\\ude2f|[\\ud83c[\\ude32-\\ude3a]|[\\ud83c[\\ude50-\\ude51]|\\u203c|\\u2049|[\\u25aa-\\u25ab]|\\u25b6|\\u25c0|[\\u25fb-\\u25fe]|\\u00a9|\\u00ae|\\u2122|\\u2139|\\ud83c\\udc04|[\\u2600-\\u26FF]|\\u2b05|\\u2b06|\\u2b07|\\u2b1b|\\u2b1c|\\u2b50|\\u2b55|\\u231a|\\u231b|\\u2328|\\u23cf|[\\u23e9-\\u23f3]|[\\u23f8-\\u23fa]|\\ud83c\\udccf|\\u2934|\\u2935|[\\u2190-\\u21ff])"+(t?"":"$"),"i"),r=e.match(n);return r?r[0].length:1}function l(n){for(var r,o=n;!o.previousSibling;)if(o=o.parentNode,t.node.isElement(o))return!1;if(o=o.previousSibling,!t.node.isBlock(o)&&t.node.isEditable(o)){for(r=t.node.contents(o);o.nodeType!=Node.TEXT_NODE&&!t.node.isDeletable(o)&&r.length&&t.node.isEditable(o);)o=r[r.length-1],r=t.node.contents(o);if(o.nodeType==Node.TEXT_NODE){if(t.helpers.isIOS())return!0;var i=o.textContent,a=i.length;t.opts.tabSpaces&&i.length>=t.opts.tabSpaces&&0===i.substr(i.length-t.opts.tabSpaces,i.length-1).replace(/ /g,"").replace(new RegExp(e.FE.UNICODE_NBSP,"g"),"").length&&(a=i.length-t.opts.tabSpaces),o.textContent=i.substring(0,a-s(i));var l=i.length!=o.textContent.length;0===o.textContent.length?l&&t.opts.keepFormatOnDelete&&!["strong","em"].includes(o.parentNode.tagName.toLowerCase())?e(o).after(e.FE.INVISIBLE_SPACE+e.FE.MARKERS):(2!=o.parentNode.childNodes.length||o.parentNode!=n.parentNode)&&1!=o.parentNode.childNodes.length||t.node.isBlock(o.parentNode)||t.node.isElement(o.parentNode)?(e(o).after(e.FE.MARKERS),t.node.isElement(o.parentNode)&&!n.nextSibling&&o.previousSibling&&"BR"==o.previousSibling.tagName&&e(n).after("
    "),o.parentNode.removeChild(o)):(e(o.parentNode).after(e.FE.MARKERS),e(o.parentNode).remove()):e(o).after(e.FE.MARKERS)}else t.node.isDeletable(o)?(e(o).after(e.FE.MARKERS),e(o).remove()):n.nextSibling&&"BR"==n.nextSibling.tagName&&t.node.isVoid(o)&&"BR"!=o.tagName?(e(n.nextSibling).remove(),e(n).replaceWith(e.FE.MARKERS)):!1!==t.events.trigger("node.remove",[e(o)])&&(e(o).after(e.FE.MARKERS),e(o).remove())}else if(e.FE.NO_DELETE_TAGS.indexOf(o.tagName)<0&&(t.node.isEditable(o)||t.node.isDeletable(o)))if(t.node.isDeletable(o))e(n).replaceWith(e.FE.MARKERS),e(o).remove();else if(t.node.isEmpty(o)&&!t.node.isList(o))e(o).remove(),e(n).replaceWith(e.FE.MARKERS);else{for(t.node.isList(o)&&(o=e(o).find("li:last").get(0)),(r=t.node.contents(o))&&"BR"==r[r.length-1].tagName&&e(r[r.length-1]).remove(),r=t.node.contents(o);r&&t.node.isBlock(r[r.length-1]);)o=r[r.length-1],r=t.node.contents(o);e(o).append(e.FE.MARKERS);for(var d=n;!d.previousSibling;)d=d.parentNode;for(;d&&"BR"!==d.tagName&&!t.node.isBlock(d);){var c=d;d=d.nextSibling,e(o).append(c)}d&&"BR"==d.tagName&&e(d).remove(),e(n).remove()}else n.nextSibling&&"BR"==n.nextSibling.tagName&&e(n.nextSibling).remove()}function d(n){var r=e(n).parentsUntil(t.$el,"BLOCKQUOTE").length>0,o=t.node.deepestParent(n,[],!r);if(o&&"BLOCKQUOTE"==o.tagName){var i=t.node.deepestParent(n,[e(n).parentsUntil(t.$el,"BLOCKQUOTE").get(0)]);i&&i.nextSibling&&(o=i)}if(null!==o){var a,s=o.nextSibling;if(t.node.isBlock(o)&&(t.node.isEditable(o)||t.node.isDeletable(o))&&s&&e.FE.NO_DELETE_TAGS.indexOf(s.tagName)<0)if(t.node.isDeletable(s))e(s).remove(),e(n).replaceWith(e.FE.MARKERS);else if(t.node.isBlock(s)&&t.node.isEditable(s))if(t.node.isList(s))if(t.node.isEmpty(o,!0))e(o).remove(),e(s).find("li:first").prepend(e.FE.MARKERS);else{var l=e(s).find("li:first");"BLOCKQUOTE"==o.tagName&&(a=t.node.contents(o)).length&&t.node.isBlock(a[a.length-1])&&(o=a[a.length-1]),0===l.find("ul, ol").length&&(e(n).replaceWith(e.FE.MARKERS),l.find(t.html.blockTagsQuery()).not("ol, ul, table").each(function(){this.parentNode==l.get(0)&&e(this).replaceWith(e(this).html()+(t.node.isEmpty(this)?"":"
    "))}),e(o).append(t.node.contents(l.get(0))),l.remove(),0===e(s).find("li").length&&e(s).remove())}else{if((a=t.node.contents(s)).length&&"BR"==a[0].tagName&&e(a[0]).remove(),"BLOCKQUOTE"!=s.tagName&&"BLOCKQUOTE"==o.tagName)for(a=t.node.contents(o);a.length&&t.node.isBlock(a[a.length-1]);)o=a[a.length-1],a=t.node.contents(o);else if("BLOCKQUOTE"==s.tagName&&"BLOCKQUOTE"!=o.tagName)for(a=t.node.contents(s);a.length&&t.node.isBlock(a[0]);)s=a[0],a=t.node.contents(s);e(n).replaceWith(e.FE.MARKERS),e(o).append(s.innerHTML),e(s).remove()}else{for(e(n).replaceWith(e.FE.MARKERS);s&&"BR"!==s.tagName&&!t.node.isBlock(s)&&t.node.isEditable(s);){var d=s;s=s.nextSibling,e(o).append(d)}s&&"BR"==s.tagName&&t.node.isEditable(s)&&e(s).remove()}}}function c(){for(var e=t.el.querySelectorAll("blockquote:empty"),n=0;n"+e.FE.MARKERS+"
    "):e(s).after(e.FE.MARKERS+"
    "),e(n).remove(),!1):(u(n,r,o),!1);if(null==s)(a=t.html.defaultTag())&&t.node.isElement(n.parentNode)?e(n).replaceWith("<"+a+">"+e.FE.MARKERS+"
    "):!n.previousSibling||e(n.previousSibling).is("br")||n.nextSibling?e(n).replaceWith("
    "+e.FE.MARKERS):e(n).replaceWith("
    "+e.FE.MARKERS+"
    ");else{var l=n,d="";t.node.isBlock(s)&&!r||(d="
    ");var c,f="",p="",g="",h="";(a="DIV"===s.tagName?"div":t.html.defaultTag())&&t.node.isBlock(s)&&(g="<"+a+">",h="",s.tagName==a.toUpperCase()&&(g=t.node.openTagString(e(s).clone().removeAttr("id").get(0))));do{if(l=l.parentNode,!r||l!=s||r&&!t.node.isBlock(s))if(f+=t.node.closeTagString(l),l==s&&t.node.isBlock(s))p=g+p;else{var m="A"==l.tagName&&i(n,l)?"fr-to-remove":"";p=t.node.openTagString(e(l).clone().addClass(m).get(0))+p}}while(l!=s);d=f+d+p+(n.parentNode==s&&t.node.isBlock(s)?"":e.FE.INVISIBLE_SPACE)+e.FE.MARKERS,t.node.isBlock(s)&&!e(s).find("*:last").is("br")&&e(s).append("
    "),e(n).after(''),e(n).remove(),s.nextSibling&&!t.node.isBlock(s.nextSibling)||t.node.isBlock(s)||e(s).after("
    "),c=(c=!r&&t.node.isBlock(s)?t.node.openTagString(s)+e(s).html()+h:t.node.openTagString(s)+e(s).html()+t.node.closeTagString(s)).replace(/<\/span>/g,d),"div"===a&&s.nextSibling&&s.nextSibling.nodeType===Element.TEXT_NODE&&!s.nextSibling.textContent.trim()&&s.parentNode.removeChild(s.nextSibling),e(s).replaceWith(c)}}function p(n,r,a){var s,l=t.node.deepestParent(n,[],!a);if(l&&"TABLE"==l.tagName)return e(l).find("td:first, th:first").prepend(n),p(n,r,a);if(l&&"BLOCKQUOTE"==l.tagName){if(o(n,l))return(s=t.html.defaultTag())?e(l).before("<"+s+">"+e.FE.MARKERS+"
    "):e(l).before(e.FE.MARKERS+"
    "),e(n).remove(),!1;i(n,l)?f(n,r,!0):u(n,r,!0)}if(null==l)(s=t.html.defaultTag())&&t.node.isElement(n.parentNode)?e(n).replaceWith("<"+s+">"+e.FE.MARKERS+"
    "):e(n).replaceWith("
    "+e.FE.MARKERS);else{if(t.node.isBlock(l))if(r)e(n).remove(),e(l).prepend("
    "+e.FE.MARKERS);else{if(t.node.isEmpty(l,!0))return f(n,r,a);e(l).before(t.node.openTagString(e(l).clone().removeAttr("id").get(0))+"
    "+t.node.closeTagString(l))}else e(l).before("
    ");e(n).remove()}}function u(n,r,a){var s=t.node.deepestParent(n,[],!a);if(null==s)t.html.defaultTag()&&n.parentNode===t.el?e(n).replaceWith("<"+t.html.defaultTag()+">"+e.FE.MARKERS+"
    "):(n.nextSibling&&!t.node.isBlock(n.nextSibling)||e(n).after("
    "),e(n).replaceWith("
    "+e.FE.MARKERS));else{var l=n,d="";"PRE"==s.tagName&&(r=!0),t.node.isBlock(s)&&!r||(d="
    ");var c="",f="";do{var p=l;if(l=l.parentNode,"BLOCKQUOTE"==s.tagName&&t.node.isEmpty(p)&&!t.node.hasClass(p,"fr-marker")&&e(p).find(n).length>0&&e(p).after(n),("BLOCKQUOTE"!=s.tagName||!i(n,l)&&!o(n,l))&&(!r||l!=s||r&&!t.node.isBlock(s))){c+=t.node.closeTagString(l);var u="A"==l.tagName&&i(n,l)?"fr-to-remove":"";f=t.node.openTagString(e(l).clone().addClass(u).removeAttr("id").get(0))+f}}while(l!=s);var g=s==n.parentNode&&t.node.isBlock(s)||n.nextSibling;if("BLOCKQUOTE"==s.tagName){n.previousSibling&&t.node.isBlock(n.previousSibling)&&n.nextSibling&&"BR"==n.nextSibling.tagName&&(e(n.nextSibling).after(n),n.nextSibling&&"BR"==n.nextSibling.tagName&&e(n.nextSibling).remove());var h=t.html.defaultTag();d=c+d+(h?"<"+h+">":"")+e.FE.MARKERS+"
    "+(h?"":"")+f}else d=c+d+f+(g?"":e.FE.INVISIBLE_SPACE)+e.FE.MARKERS;e(n).replaceWith('');var m=t.node.openTagString(s)+e(s).html()+t.node.closeTagString(s);m=m.replace(/<\/span>/g,d),e(s).replaceWith(m)}}return{enter:function(o){var i=t.markers.insert();if(!i)return!0;t.el.normalize();var s=!1;e(i).parentsUntil(t.$el,"BLOCKQUOTE").length>0&&(o=!1,s=!0),e(i).parentsUntil(t.$el,"TD, TH").length&&(s=!1),n(i)?!a(i)||o||s?f(i,o,s):t.cursorLists._endEnter(i):r(i)?!a(i)||o||s?p(i,o,s):t.cursorLists._startEnter(i):!a(i)||o||s?u(i,o,s):t.cursorLists._middleEnter(i),t.$el.find(".fr-to-remove").each(function(){for(var n=t.node.contents(this),r=0;r0,o=t.node.deepestParent(n,[],!r);if(o&&"BLOCKQUOTE"==o.tagName){var i=t.node.deepestParent(n,[e(n).parentsUntil(t.$el,"BLOCKQUOTE").get(0)]);i&&i.previousSibling&&(o=i)}if(null!==o){var a,s=o.previousSibling;if(t.node.isBlock(o)&&t.node.isEditable(o)&&s&&e.FE.NO_DELETE_TAGS.indexOf(s.tagName)<0)if(t.node.isDeletable(s))e(s).remove(),e(n).replaceWith(e.FE.MARKERS);else if(t.node.isEditable(s))if(t.node.isBlock(s))if(t.node.isEmpty(s)&&!t.node.isList(s))e(s).remove(),e(n).after(t.opts.keepFormatOnDelete?e.FE.INVISIBLE_SPACE:"");else{if(t.node.isList(s)&&(s=e(s).find("li:last").get(0)),(a=t.node.contents(s)).length&&"BR"==a[a.length-1].tagName&&e(a[a.length-1]).remove(),"BLOCKQUOTE"==s.tagName&&"BLOCKQUOTE"!=o.tagName)for(a=t.node.contents(s);a.length&&t.node.isBlock(a[a.length-1]);)s=a[a.length-1],a=t.node.contents(s);else if("BLOCKQUOTE"!=s.tagName&&"BLOCKQUOTE"==o.tagName)for(a=t.node.contents(o);a.length&&t.node.isBlock(a[0]);)o=a[0],a=t.node.contents(o);e(n).replaceWith(e.FE.MARKERS),e(s).append(t.node.isEmpty(o)?e.FE.MARKERS:o.innerHTML),e(o).remove()}else e(n).replaceWith(e.FE.MARKERS),"BLOCKQUOTE"==o.tagName&&s.nodeType==Node.ELEMENT_NODE?e(s).remove():(e(s).after(t.node.isEmpty(o)?"":e(o).html()),e(o).remove(),"BR"==s.tagName&&e(s).remove())}}(d):i=l(d),e(d).remove(),c(),t.html.fillEmptyBlocks(!0),t.opts.htmlUntouched||(t.html.cleanEmptyTags(),t.clean.quotes(),t.clean.lists()),t.spaces.normalizeAroundCursor(),t.selection.restore(),i},del:function(){var o=t.markers.insert();if(!o)return!1;if(t.el.normalize(),n(o))if(a(o))if(0===e(o).parents("li:first").find("ul, ol").length)t.cursorLists._del(o);else{var i=e(o).parents("li:first").find("ul:first, ol:first").find("li:first");(i=i.find(t.html.blockTagsQuery()).get(-1)||i).prepend(o),t.cursorLists._backspace(o)}else d(o);else r(o),function(r){for(var o,i=r;!i.nextSibling;)if(i=i.parentNode,t.node.isElement(i))return!1;if("BR"==(i=i.nextSibling).tagName&&t.node.isEditable(i))if(i.nextSibling){if(t.node.isBlock(i.nextSibling)&&t.node.isEditable(i.nextSibling)){if(!(e.FE.NO_DELETE_TAGS.indexOf(i.nextSibling.tagName)<0))return void e(i).remove();i=i.nextSibling,e(i.previousSibling).remove()}}else if(n(i))return void(a(r)?t.cursorLists._del(r):t.node.deepestParent(i)&&((!t.node.isEmpty(t.node.blockParent(i))||(t.node.blockParent(i).nextSibling&&e.FE.NO_DELETE_TAGS.indexOf(t.node.blockParent(i).nextSibling.tagName))<0)&&e(i).remove(),d(r)));if(!t.node.isBlock(i)&&t.node.isEditable(i)){for(o=t.node.contents(i);i.nodeType!=Node.TEXT_NODE&&o.length&&!t.node.isDeletable(i)&&t.node.isEditable(i);)i=o[0],o=t.node.contents(i);i.nodeType==Node.TEXT_NODE?(e(i).before(e.FE.MARKERS),i.textContent.length&&(i.textContent=i.textContent.substring(s(i.textContent,!0),i.textContent.length))):(t.node.isDeletable(i)||!1!==t.events.trigger("node.remove",[e(i)]))&&(e(i).before(e.FE.MARKERS),e(i).remove()),e(r).remove()}else if(e.FE.NO_DELETE_TAGS.indexOf(i.tagName)<0&&(t.node.isEditable(i)||t.node.isDeletable(i)))if(t.node.isDeletable(i))e(r).replaceWith(e.FE.MARKERS),e(i).remove();else if(t.node.isList(i))r.previousSibling?(e(i).find("li:first").prepend(r),t.cursorLists._backspace(r)):(e(i).find("li:first").prepend(e.FE.MARKERS),e(r).remove());else if((o=t.node.contents(i))&&"BR"==o[0].tagName&&e(o[0]).remove(),o&&"BLOCKQUOTE"==i.tagName){var l=o[0];for(e(r).before(e.FE.MARKERS);l&&"BR"!=l.tagName;){var c=l;l=l.nextSibling,e(r).before(c)}l&&"BR"==l.tagName&&e(l).remove()}else e(r).after(e(i).html()).after(e.FE.MARKERS),e(i).remove()}(o);e(o).remove(),c(),t.html.fillEmptyBlocks(!0),t.opts.htmlUntouched||(t.html.cleanEmptyTags(),t.clean.quotes(),t.clean.lists()),t.spaces.normalizeAroundCursor(),t.selection.restore()},isAtEnd:i,isAtStart:o}},e.FE.ENTER_P=0,e.FE.ENTER_DIV=1,e.FE.ENTER_BR=2,e.FE.KEYCODE={BACKSPACE:8,TAB:9,ENTER:13,SHIFT:16,CTRL:17,ALT:18,ESC:27,SPACE:32,ARROW_LEFT:37,ARROW_UP:38,ARROW_RIGHT:39,ARROW_DOWN:40,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,FF_SEMICOLON:59,FF_EQUALS:61,QUESTION_MARK:63,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,META:91,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,FF_HYPHEN:173,SEMICOLON:186,DASH:189,EQUALS:187,COMMA:188,HYPHEN:189,PERIOD:190,SLASH:191,APOSTROPHE:192,TILDE:192,SINGLE_QUOTE:222,OPEN_SQUARE_BRACKET:219,BACKSLASH:220,CLOSE_SQUARE_BRACKET:221},e.extend(e.FE.DEFAULTS,{enter:e.FE.ENTER_P,multiLine:!0,tabSpaces:0}),e.FE.MODULES.keys=function(t){var n,r,o,i=!1;function a(e,n){e.preventDefault(),e.stopPropagation(),(t.opts.multiLine||n)&&(t.selection.isCollapsed()||t.selection.remove(),t.cursor.enter(!0))}function s(){if(t.browser.mozilla&&t.selection.isCollapsed()&&!i){var e=t.selection.ranges(0),n=e.startContainer,r=e.startOffset;n&&n.nodeType==Node.TEXT_NODE&&r<=n.textContent.length&&r>0&&32==n.textContent.charCodeAt(r-1)&&(t.selection.save(),t.spaces.normalize(),t.selection.restore())}}function l(){t.selection.isFull()&&setTimeout(function(){var n=t.html.defaultTag();n?t.$el.html("<"+n+">"+e.FE.MARKERS+"
    "):t.$el.html(e.FE.MARKERS+"
    "),t.selection.restore(),t.button.bulkRefresh(),t.undo.saveStep()},0)}function d(){i=!1}function c(r){t.events.disableBlur(),n=!0;var o=r.which;if(16===o)return!0;if(229===o)return i=!0,!0;i=!1;const s=t.core.isEmpty();var l=g(o)&&!p(r),d=o==e.FE.KEYCODE.BACKSPACE||o==e.FE.KEYCODE.DELETE;if((t.selection.isFull()&&!t.opts.keepFormatOnDelete&&!s||d&&s&&t.opts.keepFormatOnDelete)&&(l||d)){var c=t.html.defaultTag();if(c?t.$el.html("<"+c+">"+e.FE.MARKERS+"
    "):t.$el.html(e.FE.MARKERS+"
    "),t.selection.restore(),!g(o))return r.preventDefault(),!0}o==e.FE.KEYCODE.ENTER?r.shiftKey?a(r):function(e){t.opts.multiLine||t.opts.multiLineEnableBR?t.opts.multiLineEnableBR?a(e,!0):t.helpers.isIOS()||(e.preventDefault(),e.stopPropagation(),t.selection.isCollapsed()||t.selection.remove(),t.cursor.enter()):(e.preventDefault(),e.stopPropagation())}(r):o===e.FE.KEYCODE.BACKSPACE&&(r.metaKey||r.ctrlKey)?setTimeout(function(){t.events.disableBlur(),t.events.focus()},0):o!=e.FE.KEYCODE.BACKSPACE||p(r)||r.altKey?o!=e.FE.KEYCODE.DELETE||p(r)||r.altKey?o==e.FE.KEYCODE.SPACE?function(n){var r=t.selection.element();if(!t.helpers.isMobile()&&(t.browser.mozilla||r&&"A"==r.tagName)){n.preventDefault(),n.stopPropagation(),t.selection.isCollapsed()||t.selection.remove();var o=t.markers.insert();if(o){var i=o.previousSibling;if(!o.nextSibling&&o.parentNode&&"A"==o.parentNode.tagName){const n=t.$el.is("a")?"beforeend":"afterend";o.parentNode.insertAdjacentHTML(n," "+e.FE.MARKERS),o.parentNode.removeChild(o)}else i&&i.nodeType==Node.TEXT_NODE&&1==i.textContent.length&&160==i.textContent.charCodeAt(0)?i.textContent=i.textContent+" ":o.insertAdjacentHTML("beforebegin"," "),o.outerHTML=e.FE.MARKERS;t.selection.restore()}}}(r):o==e.FE.KEYCODE.TAB?function(e){if(t.opts.tabSpaces>0)if(t.selection.isCollapsed()){t.undo.saveStep(),e.preventDefault(),e.stopPropagation();for(var n="",r=0;r"+r.innerHTML+""),t.selection.restore())}}(),r&&(r.which==e.FE.KEYCODE.ENTER||r.which==e.FE.KEYCODE.BACKSPACE||r.which>=37&&r.which<=40&&!t.browser.msie)&&(r.which==e.FE.KEYCODE.BACKSPACE&&n||function(){if(!t.$wp)return!0;var n;t.opts.height||t.opts.heightMax?(n=t.position.getBoundingRect().top,t.helpers.isIOS()&&(n-=t.helpers.scrollTop()),n>t.$wp.offset().top-t.helpers.scrollTop()+t.$wp.height()-20&&t.$wp.scrollTop(n+t.$wp.scrollTop()-(t.$wp.height()+t.$wp.offset().top)+t.helpers.scrollTop()+20)):(n=t.position.getBoundingRect().top,t.opts.toolbarBottom&&(n+=t.opts.toolbarStickyOffset),t.helpers.isIOS()&&(n-=t.helpers.scrollTop()),(n+=t.opts.toolbarStickyOffset)>t.o_win.innerHeight-20&&e(t.o_win).scrollTop(n+t.helpers.scrollTop()-t.o_win.innerHeight+20),n=t.position.getBoundingRect().top,t.opts.toolbarBottom||(n-=t.opts.toolbarStickyOffset),t.helpers.isIOS()&&(n-=t.helpers.scrollTop()),n=0&&e(t.o_win).scrollTop(n+t.helpers.scrollTop()-t.$tb.height()-20))}()),t.html.cleanBRs(!0,!0);var o=t.selection.element();(function(e){if(!e)return!1;var t=e.innerHTML;return!!((t=t.replace(/]*? class\s*=\s*["']?fr-marker["']?[^>]+>\u200b<\/span>/gi,""))&&/\u200B/.test(t)&&t.replace(/\u200B/gi,"").length>0)})(o)&&!t.node.hasClass(o,"fr-marker")&&"IFRAME"!=o.tagName&&function(e){return!t.helpers.isIOS()||0===((e.textContent||"").match(/[\u3041-\u3096\u30A0-\u30FF\u4E00-\u9FFF\u3130-\u318F\uAC00-\uD7AF]/gi)||[]).length}(o)&&(t.selection.save(),function(e){for(var n=t.doc.createTreeWalker(e,NodeFilter.SHOW_TEXT,t.node.filter(function(e){return/\u200B/gi.test(e.textContent)}),!1);n.nextNode();){var r=n.currentNode;r.textContent=r.textContent.replace(/\u200B/gi,"")}}(o),t.selection.restore())}function p(e){if(-1!=navigator.userAgent.indexOf("Mac OS X")){if(e.metaKey&&!e.altKey)return!0}else if(e.ctrlKey&&!e.altKey)return!0;return!1}function u(t){if(t>=e.FE.KEYCODE.ARROW_LEFT&&t<=e.FE.KEYCODE.ARROW_DOWN)return!0}function g(n){if(n>=e.FE.KEYCODE.ZERO&&n<=e.FE.KEYCODE.NINE)return!0;if(n>=e.FE.KEYCODE.NUM_ZERO&&n<=e.FE.KEYCODE.NUM_MULTIPLY)return!0;if(n>=e.FE.KEYCODE.A&&n<=e.FE.KEYCODE.Z)return!0;if(t.browser.webkit&&0===n)return!0;switch(n){case e.FE.KEYCODE.SPACE:case e.FE.KEYCODE.QUESTION_MARK:case e.FE.KEYCODE.NUM_PLUS:case e.FE.KEYCODE.NUM_MINUS:case e.FE.KEYCODE.NUM_PERIOD:case e.FE.KEYCODE.NUM_DIVISION:case e.FE.KEYCODE.SEMICOLON:case e.FE.KEYCODE.FF_SEMICOLON:case e.FE.KEYCODE.DASH:case e.FE.KEYCODE.EQUALS:case e.FE.KEYCODE.FF_EQUALS:case e.FE.KEYCODE.COMMA:case e.FE.KEYCODE.PERIOD:case e.FE.KEYCODE.SLASH:case e.FE.KEYCODE.APOSTROPHE:case e.FE.KEYCODE.SINGLE_QUOTE:case e.FE.KEYCODE.OPEN_SQUARE_BRACKET:case e.FE.KEYCODE.BACKSLASH:case e.FE.KEYCODE.CLOSE_SQUARE_BRACKET:return!0;default:return!1}}function h(n){const i=n.which,a=p(n),s=g(i);if(a||i>=37&&i<=40||!s&&i!=e.FE.KEYCODE.DELETE&&i!=e.FE.KEYCODE.BACKSPACE&&i!=e.FE.KEYCODE.ENTER&&229!=i)return a&&s&&(TVE.ElementEditIcons.toggle(!1),setTimeout(()=>{TVE.Editor_Page.reposition_icons(),TVE.ElementEditIcons.toggle()},Math.max(250,t.opts.typingTimer))),!0;TVE.ElementEditIcons.toggle(!1),r||(o=t.snapshot.get(),t.undo.canDo()||t.undo.saveStep()),clearTimeout(r),r=setTimeout(function(){TVE.Editor_Page.reposition_icons(),TVE.ElementEditIcons.toggle(),TVE.do_action("tcb.froala.typing_ended",TVE.ActiveElement),r=null,t.undo.saveStep()},Math.max(250,t.opts.typingTimer))}function m(e){var n=e.which;if(p(e)||n>=37&&n<=40)return!0;o&&r&&(t.undo.saveStep(o),o=null)}return{_init:function(){if(t.events.on("keydown",h),t.events.on("input",s),t.events.on("keyup input",m),t.events.on("keypress",d),t.events.on("keydown",c),t.events.on("keyup",f),t.events.on("html.inserted",f),t.events.on("cut",l),!t.browser.edge&&t.el.msGetInputContext)try{t.el.msGetInputContext().addEventListener("MSCandidateWindowShow",function(){i=!0}),t.el.msGetInputContext().addEventListener("MSCandidateWindowHide",function(){i=!1,f()})}catch(e){}},ctrlKey:p,isCharacter:g,isArrow:u,forceUndo:function(){r&&(clearTimeout(r),t.undo.saveStep(),o=null)},isIME:function(){return i},isBrowserAction:function(t){var n=t.which;return p(t)||n==e.FE.KEYCODE.F5}}},e.FE.MODULES.accessibility=function(t){var n=!0;function r(e){e&&e.length&&(e.data("blur-event-set")||e.parents(".fr-popup").length||(t.events.$on(e,"blur",function(){var n=e.parents(".fr-toolbar, .fr-popup").data("instance")||t;n.events.blurActive()&&n.events.trigger("blur"),n.events.enableBlur()},!0),e.data("blur-event-set",!0)),(e.parents(".fr-toolbar, .fr-popup").data("instance")||t).events.disableBlur(),e.focus(),t.shared.$f_el=e)}function o(e,t){var n=t?"last":"first",o=e.find("button:visible:not(.fr-disabled), .fr-group span.fr-command:visible")[n]();if(o.length)return r(o),!0}function i(e){return e.is("input, textarea")&&e[0].ownerDocument===t.el.ownerDocument&&s(),t.events.disableBlur(),setTimeout(()=>e.focus().select(),50),!0}function a(e,n){var r=e.find("input, textarea, button, select").filter(":visible").not(":disabled").filter(n?":last":":first");if(r.length)return i(TVE.apply_filters("tve.froala.focus_content.first_input",r,e));if(t.shared.with_kb){var o=e.find(".fr-active-item:visible:first");if(o.length)return i(o);var a=e.find("[tabIndex]:visible:first");if(a.length)return i(a)}}function s(){0===t.$el.find(".fr-marker").length&&t.core.hasFocus()&&t.selection.save()}function l(e){e.$el.find(".fr-marker").length&&(e.events.disableBlur(),e.selection.restore(),e.events.enableBlur())}function d(){var e=t.popups.areVisible();if(e){var n=e.find(".fr-buttons");return n.find("button:focus, .fr-group span:focus").length?!o(e.data("instance").$tb):!o(n)}return!o(t.$tb)}function c(){var e=null;return t.shared.$f_el.is(".fr-dropdown.fr-active")?e=t.shared.$f_el:t.shared.$f_el.closest(".fr-dropdown-menu").prev().is(".fr-dropdown.fr-active")&&(e=t.shared.$f_el.closest(".fr-dropdown-menu").prev()),e}function f(n,i,s){if(t.shared.$f_el){var l=c();l&&(t.button.click(l),t.shared.$f_el=l);var d,f=n.find("button:visible:not(.fr-disabled), .fr-group span.fr-command:visible"),p=f.index(t.shared.$f_el);return 0===p&&!s||p==f.length-1&&s?(i&&(n.parent().is(".fr-popup")&&(d=!a(n.parent().children().not(".fr-buttons"),!s)),!1===d&&(t.shared.$f_el=null)),i&&!1===d||o(n,!s)):r(e(f.get(p+(s?1:-1)))),!1}}function p(e,t){return f(e,t,!0)}function u(e,t){return f(e,t)}function g(e){if(t.shared.$f_el){var n;if(t.shared.$f_el.is(".fr-dropdown.fr-active"))return r(n=e?t.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").first():t.shared.$f_el.next().find(".fr-command:not(.fr-disabled)").last()),!1;if(t.shared.$f_el.is("a.fr-command"))return(n=e?t.shared.$f_el.closest("li").nextAll(":visible:first").find(".fr-command:not(.fr-disabled)").first():t.shared.$f_el.closest("li").prevAll(":visible:first").find(".fr-command:not(.fr-disabled)").first()).length||(n=e?t.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").first():t.shared.$f_el.closest(".fr-dropdown-menu").find(".fr-command:not(.fr-disabled)").last()),r(n),!1}}function h(){if(t.shared.$f_el){if(t.shared.$f_el.hasClass("fr-dropdown"))t.button.click(t.shared.$f_el);else if(t.shared.$f_el.is("button.fr-back")){var e=t.popups.areVisible(t);e&&(t.shared.with_kb=!1),t.button.click(t.shared.$f_el),v(e)}else{if(t.events.disableBlur(),t.button.click(t.shared.$f_el),t.shared.$f_el.attr("data-popup")){var n=t.popups.areVisible(t);n&&n.data("popup-button",t.shared.$f_el)}t.shared.$f_el=null}return!1}}function m(){t.shared.$f_el&&(t.events.disableBlur(),t.shared.$f_el.blur(),t.shared.$f_el=null),!1!==t.events.trigger("toolbar.focusEditor")&&(t.events.disableBlur(),t.events.focus())}function E(r){r&&r.length&&(t.events.$on(r,"keydown",function(n){if(!e(n.target).is("a.fr-command, button.fr-command, .fr-group span.fr-command"))return!0;var o=r.parents(".fr-popup").data("instance")||r.data("instance")||t;t.shared.with_kb=!0;var i=o.accessibility.exec(n,r);return t.shared.with_kb=!1,i},!0),t.events.$on(r,"mouseenter","[tabIndex]",function(o){var i=r.parents(".fr-popup").data("instance")||r.data("instance")||t;if(!n)return o.stopPropagation(),void o.preventDefault();var a=e(o.currentTarget);i.shared.$f_el&&i.shared.$f_el.not(a)&&i.accessibility.focusEditor()},!0))}function v(e){var t=e.data("popup-button");t&&setTimeout(function(){r(t),e.data("popup-button",null)},0)}function b(e){var n=t.popups.areVisible(e);n&&n.data("popup-button",null)}function T(n){var r=-1!=navigator.userAgent.indexOf("Mac OS X")?n.metaKey:n.ctrlKey;if(n.which==e.FE.KEYCODE.F10&&!r&&!n.shiftKey&&n.altKey){t.shared.with_kb=!0;var o=t.popups.areVisible(t),i=!1;return o&&(i=a(o.children().not(".fr-buttons"))),i||d(),t.shared.with_kb=!1,n.preventDefault(),n.stopPropagation(),!1}return!0}return{_init:function(){t.$wp?t.events.on("keydown",T,!0):t.events.$on(t.$win,"keydown",T,!0),t.events.on("mousedown",function(e){b(t),t.shared.$f_el&&(l(t),e.stopPropagation(),t.events.disableBlur(),t.shared.$f_el=null)},!0),t.events.on("blur",function(){t.shared.$f_el=null,b(t)},!0)},registerPopup:function(r){var i=t.popups.get(r),s=function(n){var r=t.popups.get(n);return{_tiKeydown:function(i){var s=r.data("instance")||t;if(!1===s.events.trigger("popup.tab",[i]))return!1;var d=i.which,c=r.find(":focus:first");if(e.FE.KEYCODE.TAB==d){i.preventDefault();var f=r.children().not(".fr-buttons"),p=f.find("input, textarea, button, select").filter(":visible").not(".fr-no-touch input, .fr-no-touch textarea, .fr-no-touch button, .fr-no-touch select, :disabled").toArray(),u=p.indexOf(this)+(i.shiftKey?-1:1);if(0<=u&&u0?h=r.find(".fr-submit:visible:first"):r.find(".fr-dismiss:visible").length&&(h=r.find(".fr-dismiss:visible:first")),h&&(i.preventDefault(),i.stopPropagation(),s.events.disableBlur(),s.button.exec(h))}},_tiMouseenter:function(){b(r.data("instance")||t)}}}(r);E(i.find(".fr-buttons")),t.events.$on(i,"mouseenter","tabIndex",s._tiMouseenter,!0),t.events.$on(i.children().not(".fr-buttons"),"keydown","[tabIndex]",s._tiKeydown,!0),t.popups.onHide(r,function(){l(i.data("instance")||t)}),t.popups.onShow(r,function(){n=!1,setTimeout(function(){n=!0},0)})},registerToolbar:E,focusToolbarElement:r,focusToolbar:o,focusContent:a,focusPopup:function(e){var r=e.children().not(".fr-buttons");r[0].ownerDocument!==t.el.ownerDocument||r.data("mouseenter-event-set")||(t.events.$on(r,"mouseenter","[tabIndex]",function(o){var i=e.data("instance")||t;if(!n)return o.stopPropagation(),void o.preventDefault();var a=r.find(":focus:first");a.length&&!a.is("input, button, textarea")&&(i.events.disableBlur(),a.blur(),i.events.disableBlur(),i.events.focus())}),r.data("mouseenter-event-set",!0)),!a(r)&&t.shared.with_kb&&o(e.find(".fr-buttons"))},focusModal:function(e){t.core.hasFocus()||(t.events.disableBlur(),t.events.focus()),t.accessibility.saveSelection(),t.events.disableBlur(),t.$el.blur(),t.selection.clear(),t.events.disableBlur(),t.shared.with_kb?e.find(".fr-command[tabIndex], [tabIndex]").first().focus():e.find("[tabIndex]:first").focus()},focusEditor:m,focusPopupButton:v,focusModalButton:function(e){var t=e.data("modal-button");t&&setTimeout(function(){r(t),e.data("modal-button",null)},0)},hasFocus:function(){return null!=t.shared.$f_el},exec:function(n,o){var i=-1!=navigator.userAgent.indexOf("Mac OS X")?n.metaKey:n.ctrlKey,a=n.which,s=!1;return a!=e.FE.KEYCODE.TAB||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ARROW_RIGHT||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.TAB||i||!n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ARROW_LEFT||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ARROW_UP||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ARROW_DOWN||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ENTER||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.ESC||i||n.shiftKey||n.altKey?a!=e.FE.KEYCODE.F10||i||n.shiftKey||!n.altKey||(s=d()):s=function(e){if(t.shared.$f_el){var n=c();return n?(t.button.click(n),r(n)):e.parent().find(".fr-back:visible").length?(t.shared.with_kb=!1,t.button.exec(e.parent().find(".fr-back:visible:first")),v(e.parent())):t.shared.$f_el.is("button, .fr-group span")&&(e.parent().is(".fr-popup")?(l(t),t.shared.$f_el=null,!1!==t.events.trigger("toolbar.esc")&&(t.popups.hide(e.parent()),v(e.parent()))):m()),!1}}(o):s=h():s=t.shared.$f_el&&t.shared.$f_el.is(".fr-dropdown:not(.fr-active)")?h():g(!0):s=g():s=u(o):s=u(o,!0):s=p(o):s=p(o,!0),t.shared.$f_el||void 0!==s||(s=!0),!s&&t.keys.isBrowserAction(n)&&(s=!0),!!s||(n.preventDefault(),n.stopPropagation(),!1)},saveSelection:s,restoreSelection:l}},e.FE.MODULES.format=function(t){function n(e,t){var n="<"+e;for(var r in t)t.hasOwnProperty(r)&&(n+=" "+r+'="'+t[r]+'"');return n+">"}function r(e,t){var n=e;for(var r in t)t.hasOwnProperty(r)&&(n+="id"==r?"#"+t[r]:"class"==r?"."+t[r]:"["+r+'="'+t[r]+'"]');return n}function o(e,t){return!(!e||e.nodeType!=Node.ELEMENT_NODE)&&(e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector).call(e,t)}function i(r,o,a){if(r){if(t.node.isBlock(r))return i(r.firstChild,o,a),!1;for(var s=e(n(o,a)).insertBefore(r),l=r;l&&!e(l).is(".fr-marker")&&0===e(l).find(".fr-marker").length&&"UL"!=l.tagName&&"OL"!=l.tagName;){var d=l;l=l.nextSibling,s.append(d)}if(l)(e(l).find(".fr-marker").length||"UL"==l.tagName||"OL"==l.tagName)&&i(l.firstChild,o,a);else{for(var c=s.get(0).parentNode;c&&!c.nextSibling&&!t.node.isElement(c);)c=c.parentNode;if(c){var f=c.nextSibling;f&&(t.node.isBlock(f)?i(f.firstChild,o,a):i(f,o,a))}}s.is(":empty")&&s.remove()}}function a(a,s){var l;if(void 0===s&&(s={}),s.style&&delete s.style,t.selection.isCollapsed())t.markers.insert(),t.$el.find(".fr-marker").replaceWith(n(a,s)+e.FE.INVISIBLE_SPACE+e.FE.MARKERS+function(e){return""}(a)),t.selection.restore();else{var d;t.selection.save(),i(t.$el.find('.fr-marker[data-type="true"]').get(0).nextSibling,a,s);do{for(d=t.$el.find(r(a,s)+" > "+r(a,s)),l=0;l
    ');var p=c.html().replace(/<\/span>/,l+t.node.closeTagString(c.get(0))+d+f+l+t.node.openTagString(c.get(0))+d);return c.replaceWith(t.node.openTagString(c.get(0))+p+t.node.closeTagString(c.get(0))),!0}return!1}function l(n,i,a,s,d){for(var c=t.node.contents(n.get(0)),f=0;f0)i=l(e(p),i,a,s,d);else{for(var u=e(p).find(a||"*"),g=u.length-1;g>=0;g--){var h=u[g];d&&d(h)||t.node.isBlock(h)||t.node.isVoid(h)||void 0!==a&&!o(h,r(a,s))||(h.outerHTML=h.innerHTML)}void 0===a&&p.nodeType==Node.ELEMENT_NODE&&!t.node.isVoid(p)&&!t.node.isBlock(p)||o(p,r(a,s))?e(p).replaceWith(p.innerHTML):void 0===a&&p.nodeType==Node.ELEMENT_NODE&&t.node.isBlock(p)&&t.node.clearAttributes(p)}else e(p).find(".fr-marker").length>0&&(i=l(e(p),i,a,s,d))}return i}function d(n,r,o){void 0===r&&(r={}),r.style&&delete r.style;var i=t.selection.isCollapsed();t.selection.save();for(var a=!0;a;){a=!1;for(var d=t.$el.find(".fr-marker"),c=0;c=0||e(t).attr("style").indexOf("; "+n+":")>=0}function p(n,r){var o,a;if(t.selection.isCollapsed()){t.markers.insert();var l=(a=t.$el.find(".fr-marker")).parent();if(t.node.openTagString(l.get(0))==''){if(t.node.isEmpty(l.get(0)))l.replaceWith(''+e.FE.INVISIBLE_SPACE+e.FE.MARKERS+"");else{var d={};d[n]=r,s(a,"span",d,!0),(a=t.$el.find(".fr-marker")).replaceWith(''+e.FE.INVISIBLE_SPACE+e.FE.MARKERS+"")}t.html.cleanEmptyTags()}else t.node.isEmpty(l.get(0))&&l.is("span")?(a.replaceWith(e.FE.MARKERS),l.tcbCss(n,r)):a.replaceWith(''+e.FE.INVISIBLE_SPACE+e.FE.MARKERS+"");t.selection.restore()}else{if(t.selection.save(),null==r||"color"==n&&t.$el.find(".fr-marker").parents("u, a").length>0){var p=t.$el.find(".fr-marker");for(o=0;o0;){let i=t.$el.find("span.fr-unprocessed:first").removeClass("fr-unprocessed");const a=i.parent();if(a.get(0).normalize(),a.is("span")&&1===a.get(0).childNodes.length){a.tcbCss(n,r);const e=i;i=a,e.replaceWith(e.html())}var h=i.find("span");for(o=h.length-1;o>=0;o--)c(h[o],n);var m=i.parentsUntil(t.$el,"span[style]"),E=[];for(o=m.length-1;o>=0;o--)f(m[o],n)||E.push(m[o]);if((m=m.not(E)).length){var v="",b="",T="",S="",y=i.get(0);do{y=y.parentNode,e(y).addClass("fr-split"),v+=t.node.closeTagString(y),b=t.node.openTagString(e(y).clone().addClass("fr-split").get(0))+b,m.get(0)!=y&&(T+=t.node.closeTagString(y),S=t.node.openTagString(e(y).clone().addClass("fr-split").get(0))+S)}while(m.get(0)!=y);const o=e(m.get(0)).clone();o.tcbCss(n,r||"");var N=v+t.node.openTagString(o.get(0))+S+i.css(n,"").get(0).outerHTML+T+""+b;i.replaceWith('');var _=m.get(0).outerHTML;e(m.get(0)).replaceWith(_.replace(/<\/span>/g,N))}}for(;t.$el.find(".fr-split:empty").length>0;)t.$el.find(".fr-split:empty").remove();t.$el.find(".fr-split").removeClass("fr-split"),t.$el.find('span[style=""]').removeAttr("style"),t.$el.find('span[class=""]').removeAttr("class"),t.html.cleanEmptyTags(),e(t.$el.find("span").get().reverse()).each(function(){this.attributes&&0!==this.attributes.length||e(this).replaceWith(this.innerHTML)}),t.el.normalize();var C=t.$el.find("span[style] + span[style]");for(e.FE.FLAG_IGNORE_CSS_ATTR=!0,o=0;o=0){var t=e(this).parents("span[style]");t.attr("style").indexOf("background-color")>=0&&(e(this).attr("style",e(this).attr("style")+";"+t.attr("style")),s(e(this),"span[style]",{},!1))}}),t.el.normalize(),t.selection.restore()}}function u(e,n,i){void 0===n&&(n={}),n.style&&delete n.style;var a=t.selection.ranges(0),s=a.startContainer;if(s.nodeType==Node.ELEMENT_NODE&&s.childNodes.length>0&&s.childNodes[a.startOffset]&&(s=s.childNodes[a.startOffset]),!a.collapsed&&s.nodeType==Node.TEXT_NODE&&a.startOffset==(s.textContent||"").length){for(;!t.node.isBlock(s.parentNode)&&!s.nextSibling;)s=s.parentNode;s.nextSibling&&(s=s.nextSibling)}for(var l=s;l&&l.nodeType==Node.ELEMENT_NODE&&!o(l,r(e,n));)l=l.firstChild;if(l&&l.nodeType==Node.ELEMENT_NODE&&o(l,r(e,n)))return!i||l;var d=s;for(d&&d.nodeType!=Node.ELEMENT_NODE&&(d=d.parentNode);d&&d.nodeType==Node.ELEMENT_NODE&&d!=t.el&&!o(d,r(e,n));)d=d.parentNode;return!(!d||d.nodeType!=Node.ELEMENT_NODE||d===t.el||!o(d,r(e,n)))&&(!i||d)}return{is:u,toggle:function(e,t){u(e,t)?d(e,t):a(e,t)},apply:a,remove:d,applyStyle:p,removeStyle:function(e){p(e,null)}}},e.FE.COMMANDS={bold:{title:"Bold",toggle:!0,refresh:function(e){var t=this.format.is("strong");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},italic:{title:"Italic",toggle:!0,refresh:function(e){var t=this.format.is("em");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},underline:{title:"Underline",toggle:!0,refresh:function(e){var t=this.format.is("u");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},strikeThrough:{title:"Strikethrough",toggle:!0,refresh:function(e){var t=this.format.is("s");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},subscript:{title:"Subscript",toggle:!0,refresh:function(e){var t=this.format.is("sub");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},superscript:{title:"Superscript",toggle:!0,refresh:function(e){var t=this.format.is("sup");e.toggleClass("fr-active",t).attr("aria-pressed",t)}},outdent:{title:"Decrease Indent"},indent:{title:"Increase Indent"},undo:{title:"Undo",undo:!1,forcedRefresh:!0,disabled:!0},redo:{title:"Redo",undo:!1,forcedRefresh:!0,disabled:!0},insertHR:{title:"Insert Horizontal Line"},clearFormatting:{title:"Clear Formatting"},selectAll:{title:"Select All",undo:!1}},e.FE.RegisterCommand=function(t,n){e.FE.COMMANDS[t]=n},e.FE.MODULES.commands=function(t){function n(e){return t.html.defaultTag()&&(e="<"+t.html.defaultTag()+">"+e+""),e}var r={bold:function(){i(0,"strong")},subscript:function(){t.format.remove("sup"),i(0,"sub")},superscript:function(){t.format.remove("sub"),i(0,"sup")},italic:function(){i(0,"em")},strikeThrough:function(){i(0,"s")},underline:function(){i(0,"u")},undo:function(){t.undo.run()},redo:function(){t.undo.redo()},indent:function(){a(1)},outdent:function(){a(-1)},show:function(){},insertHR:function(){t.selection.remove();var r="";t.core.isEmpty()&&(r=n(r="
    ")),t.html.insert('
    '+r);var o,i=t.$el.find("hr#fr-just");i.removeAttr("id"),i.prev().is("hr")?o=t.selection.setAfter(i.get(0),!1):i.next().is("hr")?o=t.selection.setBefore(i.get(0),!1):t.selection.setAfter(i.get(0),!1)||t.selection.setBefore(i.get(0),!1),o||void 0===o||(r=n(r=e.FE.MARKERS+"
    "),i.after(r)),t.selection.restore()},clearFormatting:function(e,n){t.format.remove(void 0,void 0,n)},selectAll:function(){t.doc.execCommand("selectAll",!1,!1)}};function o(n,o){if(!1!==t.events.trigger("commands.before",e.merge([n],o||[]))){var i=e.FE.COMMANDS[n]&&e.FE.COMMANDS[n].callback||r[n],a=!0,s=!1;e.FE.COMMANDS[n]&&(void 0!==e.FE.COMMANDS[n].focus&&(a=e.FE.COMMANDS[n].focus),void 0!==e.FE.COMMANDS[n].accessibilityFocus&&(s=e.FE.COMMANDS[n].accessibilityFocus)),(!t.core.hasFocus()&&a&&!t.popups.areVisible()||!t.core.hasFocus()&&s&&t.accessibility.hasFocus())&&t.events.focus(!0),e.FE.COMMANDS[n]&&!1!==e.FE.COMMANDS[n].undo&&(t.$el.find(".fr-marker").length&&(t.events.disableBlur(),t.selection.restore()),t.undo.saveStep()),i&&i.apply(t,e.merge([n],o||[])),t.events.trigger("commands.after",e.merge([n],o||[])),e.FE.COMMANDS[n]&&!1!==e.FE.COMMANDS[n].undo&&t.undo.saveStep()}}function i(e,n){t.format.toggle(n)}function a(n){t.selection.save(),t.html.wrap(!0,!0,!0,!0),t.selection.restore();for(var r=t.selection.blocks(),o=0;o10?n%9+1:n}function r(e,t,n){for(var r=Math.abs(n);r-- >0;)e-=t;return n<0&&(e+=123),e}function o(e){return!(!e||"none"!=e.css("display")||(e.remove(),0))}function i(){return!!e.$box&&(e.$box.append(d(d("noLD2laB-7NB1C1ebcvH-9SB3a1C6QC2D4A-9d1E2B2B4xgAE4B2G2I1C3A3B2qMF1DE1fkxfcC-11C-9g1G2E4XC9a1E5A3G-10mvrioCC3AA1KA1qJ-7NB2MA6sxeqVA6TD6e2D4B-9rYA2a1A4bCD3vwC-7EC10D3E2lNC1KD1QB9SB6UE5TE4YF3YA5c1A3d1B3kGE2gFA5A2D2ch1KI1IB1thyH5wvVC11UB6c1F4wwwXA7gmnfB2jgB1A7nd1e1IC2NG4H1A9bjvnbC-8PG3mlazD4dH-9HI2qAA2jGC2IA1dajajFD5SG4J4c1qttyB-9wg1B2b2A6b1C3EG3B2I2rCD4E1B1LG1oaMA3RE7abC-8C-7aVA4C5B5F-11e1D3I3a5A8hmmnogH2IB5A2nhkgiA4TH4VC7yxdblH-8YC6D6C4xC3yqJJ2C-21spB-11fMF1KF1IC2USC4PG4TE3RD6ZF5XE3UE3uefaFE4D2G2AE1HA2JD1zzzQE3SD9vgqF4ua3B13XA4C5gd1E3E2A14ridsldcCA7MC5ghwE-11ZH5f1D3a1D8bwxmkzi1A7IB3KvpB-8rwMD3IE1GG-10bgqwxewvWE4H3VbD-16qC-11qc1E2TwEA6A3aCE4A1A4lOD3JC1iVA3RA13c2D8olqf1G3A32B17=="))),a=e.$box.find("> div:last"),s=a.find("> a"),void("rtl"==e.opts.direction&&a.css("left","auto").css("right",0)))}var a,s,l=function(){for(var e=0,t=document.domain,n=t.split("."),r="_gd"+(new Date).getTime();e").html(r).text()),"cut"==n.type&&(t.undo.saveStep(),setTimeout(function(){t.selection.save(),t.html.wrap(),t.selection.restore(),t.events.focus(),t.undo.saveStep()},0))}var l=!1;function d(i){if(l)return!1;if(t.browser.safari&&t.$oel.parents().removeAttr("draggable"),i.originalEvent&&(i=i.originalEvent),!1===t.events.trigger("paste.before",[i]))return i.preventDefault(),!1;if(t.$win.scrollTop(),i&&i.clipboardData&&i.clipboardData.getData){var a="",s=i.clipboardData.types;if(t.helpers.isArray(s))for(var d=0;d")),""!==n)return f(),i.preventDefault&&(i.stopPropagation(),i.preventDefault()),!1;n=null}return t.selection.save(),t.events.disableBlur(),n=null,o?o.html(""):(o=e('
    '),t.$body.append(o),t.events.on("destroy",function(){o.remove()})),o.focus(),t.win.setTimeout(f,1),!1}function c(o){if(o.originalEvent&&(o=o.originalEvent),o&&o.dataTransfer&&o.dataTransfer.getData){var i="",a=o.dataTransfer.types;if(t.helpers.isArray(a))for(var s=0;s")),""!==n){if(!1!==t.markers.insertAtPoint(o)){var l=t.el.querySelector(".fr-marker");return e(l).replaceWith(e.FE.MARKERS),f(),o.preventDefault&&(o.stopPropagation(),o.preventDefault()),!1}}else n=null}}function f(){t.keys.forceUndo(),i=t.snapshot.get(),null===n&&(n=o.get(0).innerHTML,t.selection.restore(),t.events.enableBlur());var e=n.match(/(class=\"?Mso|class=\'?Mso|style=\"[^\"]*\bmso\-|style=\'[^\']*\bmso\-|w:WordDocument)/gi),r=t.events.chainTrigger("paste.beforeCleanup",n);r&&"string"==typeof r&&(n=r),(!e||e&&!1!==t.events.trigger("paste.wordPaste",[n]))&&(t.isDuringPaste=!0,p(n,e))}function p(n,r,o){var a,s=null,l=null;n.toLowerCase().indexOf("=0&&(n=(n=n.replace(/[.\s\S\w\W<>]*]*>[\s]*([.\s\S\w\W<>]*)[\s]*<\/body>[.\s\S\w\W<>]*/gi,"$1")).replace(/([^>])\n([^<])/g,"$1 $2"));var d=!1;if(n.indexOf('id="docs-internal-guid')>=0&&(n=(n=n.replace(/]*>/g,"")).replace(/<\/b[^>]*>/g,""),d=!0),!r){var c=t.opts.htmlAllowedStyleProps;t.opts.htmlAllowedStyleProps=t.opts.pasteAllowedStyleProps,t.opts.htmlAllowComments=!1,n=t.clean.html(n,t.opts.pasteDeniedTags,t.opts.pasteDeniedAttrs),t.opts.htmlAllowedStyleProps=c,t.opts.htmlAllowComments=!0,n=(n=g(n)).replace(/\r|\n|\t/g,""),t.doc.createElement("div").innerHTML=n,t.win.localStorage.getItem("fr-copied-html"),t.win.localStorage.getItem("fr-copied-text"),n=n.replace(/^ */g,"").replace(/ *$/g,"")}!r||t.wordPaste&&o||(0===(n=n.replace(/^\n*/g,"").replace(/^ /g,"")).indexOf("")&&(n=""+n+"
    "),n=function(e){var n;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 r,o=["style","script","applet","embed","noframes","noscript"];for(n=0;n","gi");e=e.replace(i,"")}e=(e=(e=e.replace(/ /gi," ")).replace(/]*)><\/td>/g,"
    ")).replace(/]*)><\/th>/g,"
    ");do{r=e,e=e.replace(/<[^\/>][^>]*><\/[^>]+>/gi,"")}while(e!=r);e=(e=e.replace(/]*)>/gi,'
  • ')).replace(/]*)>/gi,""),e=(e=(e=t.clean.html(e,t.opts.pasteDeniedTags,t.opts.pasteDeniedAttrs)).replace(/(.[^<]+)<\/a>/gi,"$1")).replace(/
    */g,"
    ");var a=t.o_doc.createElement("div");a.innerHTML=e;var s=a.querySelectorAll("li[data-indent]");for(n=0;n ul, :scope > ol");c||(c=document.createElement("ul"),d.appendChild(c)),c.appendChild(l)}else l.removeAttribute("data-indent")}return t.html.cleanBlankSpaces(a),a.innerHTML}(n),n=g(n)),t.opts.pastePlain&&(n=function(e){var n,r=null,o=t.doc.createElement("div");o.innerHTML=e;var i=o.querySelectorAll("p, div, h1, h2, h3, h4, h5, h6, pre, blockquote");for(n=0;n"+r.innerHTML+"";for(n=(i=o.querySelectorAll("*:not("+"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;n>=0;n--)(r=i[n]).outerHTML=r.innerHTML;var a=function(e){for(var n=t.node.contents(e),r=0;r=0;a--)0===(E=p[a]).attributes.length&&(E.outerHTML=E.innerHTML);return t.undo.saveStep(i),t.undo.saveStep(),!1}if(""!==n){var p,m=t.o_doc.createElement("div");for(m.innerHTML=n,t.spaces.normalize(m),a=(p=m.getElementsByTagName("span")).length-1;a>=0;a--){var E;0===(E=p[a]).attributes.length&&(E.outerHTML=E.innerHTML)}var v=m.children;if(1==v.length&&["OL","UL"].indexOf(v[0].tagName)>=0&&(v[0].outerHTML=v[0].innerHTML),!d){var b=m.getElementsByTagName("br");for(a=b.length-1;a>=0;a--){var T=b[a];t.node.isBlock(T.previousSibling)&&T.parentNode.removeChild(T)}}if(t.opts.enter==e.FE.ENTER_BR)for(a=(s=m.querySelectorAll("p, div")).length-1;a>=0;a--)0===(l=s[a]).attributes.length&&(l.outerHTML=l.innerHTML+(l.nextSibling&&!t.node.isEmpty(l)?"
    ":""));else if(t.opts.enter==e.FE.ENTER_DIV)for(a=(s=m.getElementsByTagName("p")).length-1;a>=0;a--)(l=s[a]).outerHTML="
    "+l.innerHTML+"
    ";n=m.innerHTML;var S=t.events.chainTrigger("paste.beforeInsert",m);S&&"string"==typeof S&&(n=S),t.html.insert(n,!0)}u(),t.undo.saveStep(i),t.undo.saveStep()}function u(){jQuery("[data-traversed]").removeAttr("data-traversed"),t.events.trigger("paste.after"),TVE.Editor_Page.reposition_icons()}function g(e){var n,r=t.o_doc.createElement("div");r.innerHTML=e;for(var o=r.querySelectorAll("*:empty:not(br):not(img):not(td):not(th)");o.length;){for(n=0;n div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])");i.length;){var a=i[i.length-1];if(t.html.defaultTag()&&"div"!=t.html.defaultTag())a.querySelector(t.html.blockTagsQuery())?a.outerHTML=a.innerHTML:a.outerHTML="<"+t.html.defaultTag()+">"+a.innerHTML+"";else{var s=a.querySelectorAll("*");!s.length||"BR"!==s[s.length-1].tagName&&0===a.innerText.length?a.outerHTML=a.innerHTML+"
    ":a.outerHTML=a.innerHTML}i=r.querySelectorAll(":scope > div:not([style]), td > div:not([style]), th > div:not([style]), li > div:not([style])")}for(i=r.querySelectorAll("div:not([style])");i.length;){for(n=0;n=500?o.html(""+o.html()+""):"font-style"===n&&"italic"===r?o.html(""+o.html()+""):"text-decoration"===n&&"underline"===r?o.html(""+o.html()+""):"text-decoration"===n&&"line-through"===r&&o.html(""+o.html()+""))}),o.removeAttr("style"),o.removeAttr("dir"));var a=t.children(),s=t.next(),l=t.parent();return 0!==a.length&&"true"!==a.first().attr("data-traversed")&&r<=n&&h(e,a.first(),n+1,n),0!==s.length&&"true"!==s.first().attr("data-traversed")&&h(e,s.first(),n,n),0!==l.length&&"true"!==l.first().attr("data-traversed")&&n-1>=0&&h(e,l.first(),n-1,n),!1}return{_init:function(){t.events.on("copy",s),t.events.on("cut",s),t.events.on("paste",d),t.events.on("drop",c),t.browser.msie&&t.browser.version<11&&(t.events.on("mouseup",function(e){2==e.button&&(setTimeout(function(){l=!1},50),l=!0)},!0),t.events.on("beforepaste",d))},removeEmptyTags:g,getRtfClipboard:function(){return r},saveCopiedText:a,clean:p}},e.extend(e.FE.DEFAULTS,{shortcutsEnabled:[],shortcutsHint:!0}),e.FE.SHORTCUTS_MAP={},e.FE.RegisterShortcut=function(t,n,r,o,i,a){e.FE.SHORTCUTS_MAP[(i?"^":"")+(a?"@":"")+t]={cmd:n,val:r,letter:o,shift:i,option:a},e.FE.DEFAULTS.shortcutsEnabled.push(n)},e.FE.RegisterShortcut(e.FE.KEYCODE.E,"show",null,"E",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.B,"bold",null,"B",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.I,"italic",null,"I",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.U,"underline",null,"U",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.S,"strikeThrough",null,"S",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.CLOSE_SQUARE_BRACKET,"indent",null,"]",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.OPEN_SQUARE_BRACKET,"outdent",null,"[",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.Z,"undo",null,"Z",!1,!1),e.FE.RegisterShortcut(e.FE.KEYCODE.Z,"redo",null,"Z",!0,!1),e.FE.MODULES.shortcuts=function(t){var n=null,r=!1;function o(n){if(!t.core.hasFocus())return!0;var o=n.which,i=-1!=navigator.userAgent.indexOf("Mac OS X")?n.metaKey:n.ctrlKey;if("keyup"==n.type&&r&&o!=e.FE.KEYCODE.META)return r=!1,!1;"keydown"==n.type&&(r=!1);var a=(n.shiftKey?"^":"")+(n.altKey?"@":"")+o;if(i&&e.FE.SHORTCUTS_MAP[a]){var s=e.FE.SHORTCUTS_MAP[a].cmd;if(s&&t.opts.shortcutsEnabled.indexOf(s)>=0){var l,d=e.FE.SHORTCUTS_MAP[a].val;if(s&&!d?l=t.$tb.find('.fr-command[data-cmd="'+s+'"]'):s&&d&&(l=t.$tb.find('.fr-command[data-cmd="'+s+'"][data-param1="'+d+'"]')),l.length)return n.preventDefault(),n.stopPropagation(),l.parents(".fr-toolbar").data("instance",t),"keydown"==n.type&&(t.button.exec(l),r=!0),!1;if(s&&t.commands[s])return n.preventDefault(),n.stopPropagation(),"keydown"==n.type&&(t.commands[s](),r=!0),!1}}}return{_init:function(){t.events.on("keydown",o,!0),t.events.on("keyup",o,!0)},get:function(r){if(!t.opts.shortcutsHint)return null;if(!n)for(var o in n={},e.FE.SHORTCUTS_MAP)e.FE.SHORTCUTS_MAP.hasOwnProperty(o)&&t.opts.shortcutsEnabled.indexOf(e.FE.SHORTCUTS_MAP[o].cmd)>=0&&(n[e.FE.SHORTCUTS_MAP[o].cmd+"."+(e.FE.SHORTCUTS_MAP[o].val||"")]={shift:e.FE.SHORTCUTS_MAP[o].shift,option:e.FE.SHORTCUTS_MAP[o].option,letter:e.FE.SHORTCUTS_MAP[o].letter});var i=n[r];return i?(t.helpers.isMac()?String.fromCharCode(8984):"Ctrl+")+(i.shift?t.helpers.isMac()?String.fromCharCode(8679):"Shift+":"")+(i.option?t.helpers.isMac()?String.fromCharCode(8997):"Alt+":"")+i.letter:null}}},e.FE.MODULES.snapshot=function(e){function t(e){for(var t=e.parentNode.childNodes,n=0,r=null,o=0;oe.undo_index;)e.undo_stack.pop()}function o(){e.undo_index=0,e.undo_stack=[]}function i(){e.undo_stack=[]}return{_init:function(){o(),e.events.on("initialized",function(){n=(e.$wp?e.$el.html():e.$oel.get(0).outerHTML).replace(/ style=""/g,"")}),e.events.on("blur",function(){e.el.querySelector(".fr-dragging")||e.undo.saveStep()}),e.events.on("keydown",t),e.events.on("destroy",i)},run:function(){if(e.undo_index>1){e.undoing=!0;var t=e.undo_stack[--e.undo_index-1];clearTimeout(e._content_changed_timer),e.snapshot.restore(t),n=t.html,e.popups.hideAll(),e.toolbar.enable(),e.events.trigger("contentChanged"),e.events.trigger("commands.undo"),e.undoing=!1}},redo:function(){if(e.undo_index0?e.undo_stack[e.undo_index-1]=t:(e.undo_stack.push(t),e.undo_index++),e.events.trigger("undo.saveStep"))}}},e.FE.ICON_DEFAULT_TEMPLATE="font_awesome",e.FE.ICON_TEMPLATES={font_awesome:'',text:'[NAME]',image:"[ALT]",svg:'[PATH]'},e.FE.ICONS={bold:{NAME:"bold"},italic:{NAME:"italic"},underline:{NAME:"underline"},strikeThrough:{NAME:"strikethrough"},subscript:{NAME:"subscript"},superscript:{NAME:"superscript"},color:{NAME:"tint"},outdent:{NAME:"outdent"},indent:{NAME:"indent"},undo:{NAME:"rotate-left"},redo:{NAME:"rotate-right"},insertHR:{NAME:"minus"},clearFormatting:{NAME:"eraser"},selectAll:{NAME:"mouse-pointer"}},e.FE.DefineIconTemplate=function(t,n){e.FE.ICON_TEMPLATES[t]=n},e.FE.DefineIcon=function(t,n){e.FE.ICONS[t]=n},e.FE.MODULES.icon=function(){return{create:function(t){var n=null,r=e.FE.ICONS[t];if(void 0!==r){var o=r.template||e.FE.ICON_DEFAULT_TEMPLATE;o&&(o=e.FE.ICON_TEMPLATES[o])&&(n=o.replace(/\[([a-zA-Z]*)\]/g,function(e,n){return"NAME"==n?r[n]||t:r[n]}))}return n||t},getTemplate:function(t){var n=e.FE.ICONS[t],r=e.FE.ICON_DEFAULT_TEMPLATE;return void 0!==n?r=n.template||e.FE.ICON_DEFAULT_TEMPLATE:r}}},e.extend(e.FE.DEFAULTS,{tooltips:!0}),e.FE.MODULES.tooltip=function(t){function n(){t.$tooltip&&t.$tooltip.removeClass("fr-visible").css("left","-3000px").css("position","fixed")}function r(n,r){if(n.data("title")||n.data("title",n.attr("title")),!n.data("title"))return!1;t.$tooltip||t.opts.tooltips&&!t.helpers.isMobile()&&(t.shared.$tooltip?t.$tooltip=t.shared.$tooltip:(t.shared.$tooltip=e('
    '),t.$tooltip=t.shared.$tooltip,t.opts.theme&&t.$tooltip.addClass(t.opts.theme+"-theme"),e(t.opts.tooltipContainer).append(t.$tooltip)),t.events.on("shared.destroy",function(){t.$tooltip.html("").removeData().remove(),t.$tooltip=null},!0)),n.removeAttr("title"),t.$tooltip.text(n.data("title")),t.$tooltip.addClass("fr-visible");var o=n.offset().left+(n.outerWidth()-t.$tooltip.outerWidth())/2;o<0&&(o=0),o+t.$tooltip.outerWidth()>e(t.o_win).width()&&(o=e(t.o_win).width()-t.$tooltip.outerWidth()),void 0===r&&(r=t.opts.toolbarBottom);var i=r?n.offset().top-t.$tooltip.height():n.offset().top+n.outerHeight();t.$tooltip.css("position",""),t.$tooltip.css("left",o),t.$tooltip.css("top",Math.ceil(i)),"static"!=e(t.o_doc).find("body:first").css("position")?(t.$tooltip.css("margin-left",-e(t.o_doc).find("body:first").offset().left),t.$tooltip.css("margin-top",-e(t.o_doc).find("body:first").offset().top)):(t.$tooltip.css("margin-left",""),t.$tooltip.css("margin-top",""))}return{hide:n,to:r,bind:function(o,i,a){t.opts.tooltips&&!t.helpers.isMobile()&&(t.events.$on(o,"mouseenter",i,function(n){t.node.hasClass(n.currentTarget,"fr-disabled")||t.edit.isDisabled()||r(e(n.currentTarget),a)},!0),t.events.$on(o,"mouseleave "+t._mousedown+" "+t._mouseup,i,function(){n()},!0))}}},e.FE.MODULES.button=function(t){var n=[];t.opts.toolbarContainer&&(t.shared.buttons||(t.shared.buttons=[]),n=t.shared.buttons);var r=[];function o(t,n,r){for(var o=e(),i=0;i'+(s||t.language.translate(r.title))+""}else i=t.icon.create(r.icon||n),i+=''+(t.language.translate(r.title)||"")+"";var l=r.popup?' data-popup="true"':"",d=r.modal?' data-modal="true"':"",c=t.shortcuts.get(n+".");c=c?" ("+c+")":"";var f=n+"-"+t.id,p="dropdown-menu-"+f,u='";if("dropdown"===r.type){var g=' id="'+p+'" class="fr-dropdown-menu '+(r.dropdownClass||"")+'" role="listbox" aria-labelledby="'+f+'" aria-hidden="true"';g+="",r.dropdownAttr&&e.each(r.dropdownAttr,function(e,t){g+=" "+e+'="'+t+'"'});var h="
    "}return u}function u(n){for(var r=t.$tb&&t.$tb.data("instance")||t,o=r.selection.inEditor()&&r.core.hasFocus(),i=0;i=0):"|"==a?o+='':"-"==a&&(o+=''))}return o},bindCommands:function(o,i){t.events.bindClick(o,".fr-command:not(.fr-disabled)",l),t.events.$on(o,t._mousedown+" "+t._mouseup+" "+t._move,".fr-dropdown-menu",c,!0),t.events.$on(o,t._mousedown+" "+t._mouseup+" "+t._move,".fr-dropdown-menu .fr-dropdown-wrapper",f,!0);var a=o.get(0).ownerDocument,s="defaultView"in a?a.defaultView:a.parentWindow;t.events.$on(e(s),t._mouseup+" resize keydown",function(n){(!n||n.type==t._mouseup&&n.target!=e("html").get(0)||"keydown"==n.type&&(t.keys.isCharacter(n.which)&&!t.keys.ctrlKey(n)||n.which==e.FE.KEYCODE.ESC))&&d(o)},!0),t.node.hasClass(o.get(0),"fr-popup")?e.merge(r,o.find(".fr-btn").toArray()):e.merge(n,o.find(".fr-btn").toArray()),t.tooltip.bind(o,".fr-btn, .fr-title",i)},refresh:function(n){var r,o=n.parents(".fr-popup, .fr-toolbar").data("instance")||t,i=n.data("cmd");t.node.hasClass(n.get(0),"fr-dropdown")?r=n.next():(n.removeClass("fr-active"),n.attr("aria-pressed")&&n.attr("aria-pressed",!1)),e.FE.COMMANDS[i]&&e.FE.COMMANDS[i].refresh?e.FE.COMMANDS[i].refresh.apply(o,[n,r]):t.refresh[i]&&o.refresh[i](n,r)},bulkRefresh:g,exec:a,click:s,hideActiveDropdowns:d,getButtons:i}},e.FE.POPUP_TEMPLATES={"text.edit":"[_EDIT_]"},e.FE.RegisterTemplate=function(t,n){e.FE.POPUP_TEMPLATES[t]=n},e.FE.MODULES.popups=function(t){t.shared.popups||(t.shared.popups={});var n=t.shared.popups;function r(e){return n[e]&&t.node.hasClass(n[e],"fr-active")&&t.core.sameInstance(n[e])||!1}function o(e){for(var t in n)if(n.hasOwnProperty(t)&&r(t)&&(void 0===e||n[t].data("instance")==e))return n[t];return!1}function i(e){var r=null;(r="string"!=typeof e?e:n[e])&&t.node.hasClass(r,"fr-active")&&(r.removeClass("fr-active fr-above"),t.events.trigger("popups.hide."+e),t.$tb&&(t.opts.zIndex>1?t.$tb.css("zIndex",t.opts.zIndex+1):t.$tb.css("zIndex","")),t.events.disableBlur(),r.find("input, textarea, button").filter(":focus").blur(),r.find("input, textarea").attr("disabled","disabled"))}function a(e){for(var t in void 0===e&&(e=[]),n)n.hasOwnProperty(t)&&e.indexOf(t)<0&&i(t)}function s(){t.shared.exit_flag=!0}function l(){t.shared.exit_flag=!1}function d(){return t.shared.exit_flag}function c(o){var i=n[o];return{_windowResize:function(){var e=i.data("instance")||t;!e.helpers.isMobile()&&i.is(":visible")&&(e.events.disableBlur(),e.popups.hide(o),e.events.enableBlur())},_inputFocus:function(n){var r=i.data("instance")||t,o=e(n.currentTarget);if(o.is("input:file")&&o.closest(".fr-layer").addClass("fr-input-focus"),n.preventDefault(),n.stopPropagation(),setTimeout(function(){r.events.enableBlur()},0),r.helpers.isMobile()){var a=e(r.o_win).scrollTop();setTimeout(function(){e(r.o_win).scrollTop(a)},0)}},_inputBlur:function(n){var r=i.data("instance")||t,o=e(n.currentTarget);o.is("input:file")&&o.closest(".fr-layer").removeClass("fr-input-focus"),document.activeElement!=this&&e(this).is(":visible")&&(r.events.blurActive()&&r.events.trigger("blur"),r.events.enableBlur())},_editorKeydown:function(n){var a=i.data("instance")||t;a.keys.ctrlKey(n)||n.which==e.FE.KEYCODE.ALT||n.which==e.FE.KEYCODE.ESC||(r(o)&&i.find(".fr-back:visible").length?a.button.exec(i.find(".fr-back:visible:first")):n.which!=e.FE.KEYCODE.ALT&&a.popups.hide(o))},_preventFocus:function(n){var r=i.data("instance")||t,o=n.originalEvent?n.originalEvent.target||n.originalEvent.originalTarget:null;"mouseup"==n.type||e(o).is(":focus")||r.events.disableBlur(),"mouseup"!=n.type||e(o).hasClass("fr-command")||e(o).parents(".fr-command").length>0||t.button.hideActiveDropdowns(i),(t.browser.safari||t.browser.mozilla)&&"mousedown"==n.type&&e(o).is("input[type=file]")&&r.events.disableBlur();var a="input, textarea, button, select, label, .fr-command";return o&&!e(o).is(a)&&0===e(o).parents(a).length?(n.stopPropagation(),!1):(!o||!e(o).is("label"))&&(o&&e(o).is(a)&&n.stopPropagation(),void l())},_editorMouseup:function(){i.is(":visible")&&d()&&i.find("input:focus, textarea:focus, button:focus, select:focus").filter(":visible").length>0&&t.events.disableBlur()},_windowMouseup:function(e){if(!t.core.sameInstance(i))return!0;var n=i.data("instance")||t;i.is(":visible")&&d()&&(e.stopPropagation(),n.markers.remove(),n.popups.hide(o),l())},_windowKeydown:function(n){if(!t.core.sameInstance(i))return!0;var r=i.data("instance")||t,a=n.which;return e.FE.KEYCODE.ESC==a&&r.popups.isVisible(o)?(i.find(".fr-back:visible").length?(r.button.exec(i.find(".fr-back:visible:first")),r.accessibility.focusPopupButton(i)):i.find(".fr-dismiss:visible").length?r.button.exec(i.find(".fr-dismiss:visible:first")):(r.popups.hide(o),r.accessibility.focusPopupButton(i)),!1):void 0},_doPlaceholder:function(){0===e(this).next().length&&e(this).attr("placeholder")&&e(this).after('"),e(this).toggleClass("fr-not-empty",""!==e(this).val())},_repositionPopup:function(){if(!t.opts.height&&!t.opts.heightMax)return!0;if(t.$wp&&r(o)&&i.parent().get(0)==t.$sc.get(0)){var e=i.offset().top-t.$wp.offset().top,n=t.$wp.outerHeight();t.node.hasClass(i.get(0),"fr-above")&&(e+=i.outerHeight()),e>n||e<0?i.addClass("fr-hidden"):i.removeClass("fr-hidden")}}}}function f(e,r){t.events.on("mouseup",e._editorMouseup,!0),t.$wp&&t.events.on("keydown",e._editorKeydown),t.events.on("blur",function(){o()&&t.markers.remove(),a()}),t.$wp&&!t.helpers.isMobile()&&t.events.$on(t.$wp,"scroll.popup"+r,e._repositionPopup),t.events.on("window.mouseup",e._windowMouseup,!0),t.events.on("window.keydown",e._windowKeydown,!0),n[r].data("inst"+t.id,!0)}function p(){for(var e in n)n.hasOwnProperty(e)&&(n[e].html("").removeData().remove(),n[e]=null);n=[]}return t.shared.exit_flag=!1,{_init:function(){t.events.on("shared.destroy",p,!0),t.events.on("window.mousedown",s),t.events.on("window.touchmove",l),t.events.on("mousedown",function(e){o()&&(e.stopPropagation(),t.$el.find(".fr-marker").remove(),s(),t.events.disableBlur())})},create:function(r,o){var i=function(r,o){var i=function(n,r){var o=e.FE.POPUP_TEMPLATES[n];for(var i in"function"==typeof o&&(o=o.apply(t)),r)r.hasOwnProperty(i)&&(o=o.replace("[_"+i.toUpperCase()+"_]",r[i]));return o}(r,o),a=e('
    '+i+"
    ");t.opts.theme&&a.addClass(t.opts.theme+"-theme"),t.opts.zIndex>1&&t.$tb.css("z-index",t.opts.zIndex+2),"auto"!=t.opts.direction&&a.removeClass("fr-ltr fr-rtl").addClass("fr-"+t.opts.direction),a.find("input, textarea").attr("dir",t.opts.direction).attr("disabled","disabled");var s=e("body:first");return s.append(a),a.data("container",s),n[r]=a,t.button.bindCommands(a,!1),a}(r,o),a=c(r);return f(a,r),t.events.$on(i,"mousedown mouseup touchstart touchend touch","*",a._preventFocus,!0),t.events.$on(i,"focus","input, textarea, button, select",a._inputFocus,!0),t.events.$on(i,"blur","input, textarea, button, select",a._inputBlur,!0),t.accessibility.registerPopup(r),t.events.$on(i,"keydown keyup change input","input, textarea",a._doPlaceholder,!0),t.helpers.isIOS()&&t.events.$on(i,"touchend","label",function(){e("#"+e(this).attr("for")).prop("checked",function(e,t){return!t})},!0),t.events.$on(e(t.o_win),"resize",a._windowResize,!0),i},get:function(e){var r=n[e];return r&&!r.data("inst"+t.id)&&f(c(e),e),r},show:function(e,i,s,d){if(o()&&t.$el.find(".fr-marker").length>0?(t.events.disableBlur(),t.selection.restore()):(t.events.disableBlur(),t.events.focus(),t.events.enableBlur()),a([e]),!n[e])return!1;n[e].data("instance",t),t.$tb&&(t.button.hideActiveDropdowns(),t.$tb.data("instance",t));var f=n[e].outerWidth(),p=r(e);n[e].addClass("fr-active").removeClass("fr-hidden").find("input, textarea").removeAttr("disabled");var u=n[e].data("container");(u=n[e].data("container")).is(t.$tb)?t.$tb.css("zIndex",(t.opts.zIndex||1)+4):n[e].css("zIndex",(t.opts.zIndex||1)+4),i&&(i-=f/2),t.opts.toolbarBottom&&u&&t.$tb&&u.get(0)==t.$tb.get(0)&&(n[e].addClass("fr-above"),s&&(s-=n[e].outerHeight())),n[e].removeClass("fr-active"),t.position.at(i,s,n[e],d||0),n[e].addClass("fr-active"),p||t.accessibility.focusPopup(n[e]),t.events.trigger("popups.show."+e),c(e)._repositionPopup(),l()},hide:i,onHide:function(e,n){t.events.on("popups.hide."+e,n)},hideAll:a,setContainer:function(e,r){r.is(":visible")||(r=t.$sc),r.is(n[e].data("container"))||(n[e].data("container",r),r.append(n[e]))},refresh:function(r){t.events.trigger("popups.refresh."+r);for(var o=n[r].find(".fr-command"),i=0;ie.$sc.get(0).clientWidth-10&&(n=e.$sc.get(0).clientWidth-r-10),n<0&&(n=10),n}(r,t);if(t){r.css("left",a);var s=r.data("fr-arrow");s||(s=r.find(".fr-arrow"),r.data("fr-arrow",s)),s.data("margin-left")||s.data("margin-left",e.helpers.getPX(s.css("margin-left"))),s.css("margin-left",t-a+s.data("margin-left"))}n&&r.css("top",function(t,n,r){var o=t.outerHeight(!0);if(!e.helpers.isMobile()&&e.$tb&&t.parent().get(0)!=e.$tb.get(0)){var i=t.parent().offset().top,a=n-o-(r||0);t.parent().get(0)==e.$sc.get(0)&&(i-=t.parent().position().top);var s=e.$sc.get(0).scrollHeight;i+n+o>e.$sc.offset().top+s&&t.parent().offset().top+a>0?(n=a,t.addClass("fr-above")):t.removeClass("fr-above")}return n}(r,n,o))},getBoundingRect:function(){var t=e.selection.ranges(0).getBoundingClientRect();if(0===t.top&&0===t.left&&0===t.width||0===t.height){var n=!1;0===e.$el.find(".fr-marker").length&&(e.selection.save(),n=!0);var r=e.$el.find(".fr-marker:first");r.css("display","inline"),r.css("line-height","");var o=r.offset(),i=r.outerHeight();r.css("display","none"),r.css("line-height",0),(t={}).left=o.left,t.width=0,t.height=i,t.top=o.top-(e.helpers.isMobile()?0:e.helpers.scrollTop()),t.right=1,t.bottom=1,t.ok=!0,n&&e.selection.restore()}return t}}},e.FE.MODULES.refresh=function(t){function n(e,t){e.toggleClass("fr-disabled",t).attr("aria-disabled",t)}return{undo:function(e){n(e,!t.undo.canDo())},redo:function(e){n(e,!t.undo.canRedo())},outdent:function(r){if(t.node.hasClass(r.get(0),"fr-no-refresh"))return!1;for(var o=t.selection.blocks(),i=0;i0)return n(r,!1),!0}n(r,!0)},indent:function(e){if(t.node.hasClass(e.get(0),"fr-no-refresh"))return!1;for(var r=t.selection.blocks(),o=0;o1&&t.$tb.css("z-index",t.opts.zIndex+1),"auto"!=t.opts.direction&&t.$tb.removeClass("fr-ltr fr-rtl").addClass("fr-"+t.opts.direction),t.helpers.isMobile()?t.$tb.addClass("fr-mobile"):t.$tb.addClass("fr-desktop"),t.opts.toolbarBottom?t.$tb.addClass("fr-bottom"):t.$tb.addClass("fr-top"),"defaultView"in(n=t.$tb.get(0).ownerDocument)?n.defaultView:n.parentWindow,function(){for(var n=e.merge([],t.opts.toolbarButtons),r=n.length-1;r>=0;r--)"-"!=n[r]&&"|"!=n[r]&&n.indexOf(n[r])'),t.$tb=t.shared.$tb,e(t.opts.toolbarContainer).append(t.$tb),i(),t.$tb.data("instance",t)),t.$box.addClass("fr-basic"),t.events.on("focus",function(){t.$tb.data("instance",t)},!0)):(t.$box.addClass("fr-basic"),t.$tb=e('
    '),i(),t.$tb.data("instance",t)),t.events.on("destroy",o,!0),t.events.on(t.opts.toolbarContainer?"shared.destroy":"destroy",r,!0),t.$tb.show=function(){this.siblings().not(".fr-drag").hide(),this[0].style.display="block",t.opts.toolbarContainer&&t.opts.toolbarContainer.show(),this.find(".fr-dropdown.fr-active").removeClass("fr-active").attr("aria-expanded","false"),setTimeout(()=>{TVE.main.$el.hasClass("tve_froala_pinned_mode")&&TVE.main.$container.addClass("froala-pinned")},200)}},hide:function(){if(t.button.getButtons(".fr-dropdown.fr-active").next().find(t.o_doc.activeElement).length)return!0;!1!==t.events.trigger("toolbar.hide")&&t.$tb&&(clearTimeout(t.tb_hide_timeout),t.tb_hide_timeout=setTimeout(function(){t.$tb&&t.$tb.hide()},50))},show:function(){if(!1===t.events.trigger("toolbar.show"))return!1;clearTimeout(t.tb_hide_timeout),t.$tb.show()},disable:function(){!a&&t.$tb&&(t.$tb.find("> .fr-command").addClass("fr-disabled fr-no-refresh").attr("aria-disabled",!0),a=!0)},enable:function(){a&&t.$tb&&(t.$tb.find("> .fr-command").removeClass("fr-disabled fr-no-refresh").attr("aria-disabled",!1),a=!1),t.button.bulkRefresh()}}},o(44692)(e),o(13920)(e),o(58601)(e),o(39884)(e),o(44100)(e),o(78670)(e),o(41462)(e),o(89443)(e),o(36719)(e),o(74264)(e),o(9037)(e)})();