1234567 |
- !function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.FroalaEditor=t()}(this,function(){"use strict";function St(e){return(St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}Element.prototype.matches||(Element.prototype.matches=Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector),Element.prototype.closest||(Element.prototype.closest=function(e){var t=this;if(!document.documentElement.contains(t))return null;do{if(t.matches(e))return t;t=t.parentElement||t.parentNode}while(null!==t&&1===t.nodeType);return null}),Element.prototype.matches||(Element.prototype.matches=Element.prototype.matchesSelector||Element.prototype.mozMatchesSelector||Element.prototype.msMatchesSelector||Element.prototype.oMatchesSelector||Element.prototype.webkitMatchesSelector||function(e){for(var t=(this.document||this.ownerDocument).querySelectorAll(e),n=t.length;0<=--n&&t.item(n)!==this;);return-1<n}),Array.isArray||(Array.isArray=function(e){return"[object Array]"===Object.prototype.toString.call(e)}),"function"!=typeof Object.assign&&Object.defineProperty(Object,"assign",{value:function(e,t){if(null==e)throw new TypeError("Cannot convert undefined or null to object");for(var n=Object(e),r=1;r<arguments.length;r++){var a=arguments[r];if(null!=a)for(var o in a)Object.prototype.hasOwnProperty.call(a,o)&&(n[o]=a[o])}return n},writable:!0,configurable:!0}),function(){var i=/^\s*:scope/gi,s=/,\s*:scope/gi,l=document.createElement("div");function e(e,t){var o=e[t];e[t]=function(e){var t,n=!1,r=!1;if(!e||Array.isArray(e)||!e.match(i)&&!e.match(s))return o.call(this,e);this.parentNode||(l.appendChild(this),r=!0);var a=this.parentNode;return this.id||(this.id="rootedQuerySelector_id_".concat((new Date).getTime()),n=!0),t=o.call(a,e.replace(i,"#".concat(this.id)).replace(s,",#".concat(this.id))),n&&(this.id=""),r&&l.removeChild(this),t}}try{var t=l.querySelectorAll(":scope *");if(!t||Array.isArray(t))throw"error"}catch(n){e(Element.prototype,"querySelector"),e(Element.prototype,"querySelectorAll"),e(HTMLElement.prototype,"querySelector"),e(HTMLElement.prototype,"querySelectorAll")}}(),"document"in self&&("classList"in document.createElement("_")&&(!document.createElementNS||"classList"in document.createElementNS("http://www.w3.org/2000/svg","g"))||function(e){if("Element"in e){var t="classList",n="prototype",r=e.Element[n],a=Object,o=String[n].trim||function(){return this.replace(/^\s+|\s+$/g,"")},i=Array[n].indexOf||function(e){for(var t=0,n=this.length;t<n;t++)if(t in this&&this[t]===e)return t;return-1},s=function s(e,t){this.name=e,this.code=DOMException[e],this.message=t},l=function l(e,t){if(""===t)throw new s("SYNTAX_ERR","The token must not be empty.");if(/\s/.test(t))throw new s("INVALID_CHARACTER_ERR","The token must not contain space characters.");return i.call(e,t)},c=function c(e){for(var t=o.call(e.getAttribute("class")||""),n=t?t.split(/\s+/):[],r=0,a=n.length;r<a;r++)this.push(n[r]);this._updateClassName=function(){e.setAttribute("class",this.toString())}},d=c[n]=[],f=function f(){return new c(this)};if(s[n]=Error[n],d.item=function(e){return this[e]||null},d.contains=function(e){return~l(this,e+"")},d.add=function(){for(var e,t=arguments,n=0,r=t.length,a=!1;e=t[n]+"",~l(this,e)||(this.push(e),a=!0),++n<r;);a&&this._updateClassName()},d.remove=function(){var e,t,n=arguments,r=0,a=n.length,o=!1;do{for(e=n[r]+"",t=l(this,e);~t;)this.splice(t,1),o=!0,t=l(this,e)}while(++r<a);o&&this._updateClassName()},d.toggle=function(e,t){var n=this.contains(e),r=n?!0!==t&&"remove":!1!==t&&"add";return r&&this[r](e),!0===t||!1===t?t:!n},d.replace=function(e,t){var n=l(e+"");~n&&(this.splice(n,1,t),this._updateClassName())},d.toString=function(){return this.join(" ")},a.defineProperty){var p={get:f,enumerable:!0,configurable:!0};try{a.defineProperty(r,t,p)}catch(u){void 0!==u.number&&-2146823252!==u.number||(p.enumerable=!1,a.defineProperty(r,t,p))}}else a[n].__defineGetter__&&r.__defineGetter__(t,f)}}(self),function(){var e=document.createElement("_");if(e.classList.add("c1","c2"),!e.classList.contains("c2")){var t=function Zc(e){var Zc=DOMTokenList.prototype[e];DOMTokenList.prototype[e]=function(e){var t,n=arguments.length;for(t=0;t<n;t++)e=arguments[t],Zc.call(this,e)}};t("add"),t("remove")}if(e.classList.toggle("c3",!1),e.classList.contains("c3")){var n=DOMTokenList.prototype.toggle;DOMTokenList.prototype.toggle=function(e,t){return 1 in arguments&&!this.contains(e)==!t?t:n.call(this,e)}}"replace"in document.createElement("_").classList||(DOMTokenList.prototype.replace=function(e,t){var n=this.toString().split(" "),r=n.indexOf(e+"");~r&&(n=n.slice(r),this.remove.apply(this,n),this.add(t),this.add.apply(this,n.slice(1)))}),e=null}()),function(){var e,t=-1;if("Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),!("undefined"==typeof window||"undefined"==typeof document||"undefined"==typeof HTMLElement||t<0)){var n=!1;try{var r=document.createElement("div");r.addEventListener("focus",function(e){e.preventDefault(),e.stopPropagation()},!0),r.focus(Object.defineProperty({},"preventScroll",{get:function(){if(navigator&&"undefined"!=typeof navigator.userAgent&&navigator.userAgent&&navigator.userAgent.match(/Edge\/1[7-8]/))return n=!1;n=!0}}))}catch(s){}if(HTMLElement.prototype.nativeFocus===undefined&&!n){HTMLElement.prototype.nativeFocus=HTMLElement.prototype.focus;var a=function a(e){for(var t=e.parentNode,n=[],r=document.scrollingElement||document.documentElement;t&&t!==r;)(t.offsetHeight<t.scrollHeight||t.offsetWidth<t.scrollWidth)&&n.push([t,t.scrollTop,t.scrollLeft]),t=t.parentNode;return t=r,n.push([t,t.scrollTop,t.scrollLeft]),n},o=function o(e){for(var t=0;t<e.length;t++)e[t][0].scrollTop=e[t][1],e[t][0].scrollLeft=e[t][2];e=[]},i=function i(e){if(e&&e.preventScroll){var t=a(this);if("function"==typeof setTimeout){var n=this;setTimeout(function(){n.nativeFocus(),o(t)},0)}else this.nativeFocus(),o(t)}else this.nativeFocus()};HTMLElement.prototype.focus=i}}}();function kt(e,t,n){if("string"!=typeof e)return new kt.Bootstrap(e,t,n);var r=document.querySelectorAll(e);t&&t.iframe_document&&(r=t.iframe_document.querySelectorAll(e));for(var a=[],o=0;o<r.length;o++){var i=r[o]["data-froala.editor"];i?a.push(i):a.push(new kt.Bootstrap(r[o],t,n))}return 1==a.length?a[0]:a}kt.RegisterPlugins=function(e){for(var t=0;t<e.length;t++)e[t].call(kt)},Object.assign(kt,{DEFAULTS:{initOnClick:!1,pluginsEnabled:null},MODULES:{},PLUGINS:{},VERSION:"4.0.19",INSTANCES:[],OPTS_MAPPING:{},SHARED:{},ID:0}),kt.MODULES.node=function(i){var n=i.$;function s(e){return e&&"IFRAME"!==e.tagName?Array.prototype.slice.call(e.childNodes||[]):[]}function l(e){return!!e&&(e.nodeType===Node.ELEMENT_NODE&&0<=kt.BLOCK_TAGS.indexOf(e.tagName.toLowerCase()))}function c(e){var t={},n=e.attributes;if(n)for(var r=0;r<n.length;r++){var a=n[r];t[a.nodeName]=a.value}return t}function t(e){for(var t="",n=c(e),r=Object.keys(n),a=0;a<r.length;a++){var o=r[a],i=n[o];i.indexOf("'")<0&&0<=i.indexOf('"')?t+=" ".concat(o,"='").concat(i,"'"):(0<=i.indexOf('"')&&0<=i.indexOf("'")&&(i=i.replace(/"/g,""")),t+=" ".concat(o,'="').concat(i,'"'))}return t}function r(e){return e===i.el}return{isBlock:l,isEmpty:function d(e,t){if(!e)return!0;if(e.querySelector("table"))return!1;var n=s(e);1===n.length&&l(n[0])&&(n=s(n[0]));for(var r=!1,a=0;a<n.length;a++){var o=n[a];if(!(t&&i.node.hasClass(o,"fr-marker")||o.nodeType===Node.TEXT_NODE&&0===o.textContent.length)){if("BR"!==o.tagName&&0<(o.textContent||"").replace(/\u200B/gi,"").replace(/\n/g,"").length)return!1;if(r)return!1;"BR"===o.tagName&&(r=!0)}}return!(e.querySelectorAll(kt.VOID_ELEMENTS.join(",")).length-e.querySelectorAll("br").length||e.querySelector("".concat(i.opts.htmlAllowedEmptyTags.join(":not(.fr-marker),"),":not(.fr-marker)"))||1<e.querySelectorAll(kt.BLOCK_TAGS.join(",")).length||e.querySelector("".concat(i.opts.htmlDoNotWrapTags.join(":not(.fr-marker),"),":not(.fr-marker)")))},blockParent:function a(e){for(;e&&e.parentNode!==i.el&&(!e.parentNode||!i.node.hasClass(e.parentNode,"fr-inner"));)if(l(e=e.parentNode))return e;return null},deepestParent:function o(e,t,n){if(void 0===t&&(t=[]),void 0===n&&(n=!0),t.push(i.el),0<=t.indexOf(e.parentNode)||e.parentNode&&i.node.hasClass(e.parentNode,"fr-inner")||e.parentNode&&0<=kt.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)&&n)return null;for(;t.indexOf(e.parentNode)<0&&e.parentNode&&!i.node.hasClass(e.parentNode,"fr-inner")&&(kt.SIMPLE_ENTER_TAGS.indexOf(e.parentNode.tagName)<0||!n)&&(!l(e)||l(e.parentNode))&&(!l(e)||!l(e.parentNode)||!n);)e=e.parentNode;return e},rawAttributes:c,attributes:t,clearAttributes:function f(e){for(var t=e.attributes,n=t.length-1;0<=n;n--){var r=t[n];e.removeAttribute(r.nodeName)}},openTagString:function p(e){return"<".concat(e.tagName.toLowerCase()).concat(t(e),">")},closeTagString:function u(e){return"</".concat(e.tagName.toLowerCase(),">")},isFirstSibling:function h(e,t){void 0===t&&(t=!0);for(var n=e.previousSibling;n&&t&&i.node.hasClass(n,"fr-marker");)n=n.previousSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&h(n)},isLastSibling:function g(e,t){void 0===t&&(t=!0);for(var n=e.nextSibling;n&&t&&i.node.hasClass(n,"fr-marker");)n=n.nextSibling;return!n||n.nodeType===Node.TEXT_NODE&&""===n.textContent&&g(n)},isList:function m(e){return!!e&&0<=["UL","OL"].indexOf(e.tagName)},isLink:function v(e){return!!e&&e.nodeType===Node.ELEMENT_NODE&&"a"===e.tagName.toLowerCase()},isElement:r,contents:s,isVoid:function b(e){return e&&e.nodeType===Node.ELEMENT_NODE&&0<=kt.VOID_ELEMENTS.indexOf((e.tagName||"").toLowerCase())},hasFocus:function C(e){return e===i.doc.activeElement&&(!i.doc.hasFocus||i.doc.hasFocus())&&Boolean(r(e)||e.type||e.href||~e.tabIndex)},isEditable:function E(e){return(!e.getAttribute||"false"!==e.getAttribute("contenteditable"))&&["STYLE","SCRIPT"].indexOf(e.tagName)<0},isDeletable:function y(e){return e&&e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=(e.getAttribute("class")||"").indexOf("fr-deletable")},hasClass:function L(e,t){return e instanceof n&&(e=e.get(0)),e&&e.classList&&e.classList.contains(t)},filter:function _(e){return i.browser.msie?e:{acceptNode:e}}}},Object.assign(kt.DEFAULTS,{DOMPurify:window.DOMPurify,htmlAllowedTags:["a","abbr","address","area","article","aside","audio","b","base","bdi","bdo","blockquote","br","button","canvas","caption","cite","code","col","colgroup","datalist","dd","del","details","dfn","dialog","div","dl","dt","em","embed","fieldset","figcaption","figure","footer","form","h1","h2","h3","h4","h5","h6","header","hgroup","hr","i","iframe","img","input","ins","kbd","keygen","label","legend","li","link","main","map","mark","menu","menuitem","meter","nav","noscript","object","ol","optgroup","option","output","p","param","pre","progress","queue","rp","rt","ruby","s","samp","script","style","section","select","small","source","span","strike","strong","sub","summary","sup","table","tbody","td","textarea","tfoot","th","thead","time","tr","track","u","ul","var","video","wbr"],htmlRemoveTags:["script","style"],htmlAllowedAttrs:["accept","accept-charset","accesskey","action","align","allowfullscreen","allowtransparency","alt","async","autocomplete","autofocus","autoplay","autosave","background","bgcolor","border","charset","cellpadding","cellspacing","checked","cite","class","color","cols","colspan","content","contenteditable","contextmenu","controls","coords","data","data-.*","datetime","default","defer","dir","dirname","disabled","download","draggable","dropzone","enctype","for","form","formaction","frameborder","headers","height","hidden","high","href","hreflang","http-equiv","icon","id","ismap","itemprop","keytype","kind","label","lang","language","list","loop","low","max","maxlength","media","method","min","mozallowfullscreen","multiple","muted","name","novalidate","open","optimum","pattern","ping","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","reversed","rows","rowspan","sandbox","scope","scoped","scrolling","seamless","selected","shape","size","sizes","span","src","srcdoc","srclang","srcset","start","step","summary","spellcheck","style","tabindex","target","title","type","translate","usemap","value","valign","webkitallowfullscreen","width","wrap"],htmlAllowedStyleProps:[".*"],htmlAllowComments:!0,htmlUntouched:!1,fullPage:!1}),kt.HTML5Map={B:"STRONG",I:"EM",STRIKE:"S"},kt.MODULES.clean=function(f){var d,p,u,h,g=f.$;function a(e){if(e.nodeType===Node.ELEMENT_NODE&&e.getAttribute("class")&&0<=e.getAttribute("class").indexOf("fr-marker"))return!1;var t,n=f.node.contents(e),r=[];for(t=0;t<n.length;t++)n[t].nodeType!==Node.ELEMENT_NODE||f.node.isVoid(n[t])?n[t].nodeType===Node.TEXT_NODE&&(n[t].textContent=n[t].textContent.replace(/\u200b/g,"")):n[t].textContent.replace(/\u200b/g,"").length!==n[t].textContent.length&&a(n[t]);if(e.nodeType===Node.ELEMENT_NODE&&!f.node.isVoid(e)&&(e.normalize(),n=f.node.contents(e),r=e.querySelectorAll(".fr-marker"),n.length-r.length==0)){for(t=0;t<n.length;t++)if(n[t].nodeType===Node.ELEMENT_NODE&&(n[t].getAttribute("class")||"").indexOf("fr-marker")<0)return!1;for(t=0;t<r.length;t++)e.parentNode.insertBefore(r[t].cloneNode(!0),e);return e.parentNode.removeChild(e),!1}}function s(e,t){if(e.nodeType===Node.COMMENT_NODE)return"\x3c!--".concat(e.nodeValue,"--\x3e");if(e.nodeType===Node.TEXT_NODE)return t?e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"):e.textContent.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">").replace(/\u00A0/g," ").replace(/\u0009/g,"");if(e.nodeType!==Node.ELEMENT_NODE)return e.outerHTML;if(e.nodeType===Node.ELEMENT_NODE&&0<=["STYLE","SCRIPT","NOSCRIPT"].indexOf(e.tagName))return e.outerHTML;if(e.nodeType===Node.ELEMENT_NODE&&"svg"===e.tagName){var n=document.createElement("div"),r=e.cloneNode(!0);return n.appendChild(r),n.innerHTML}if("IFRAME"===e.tagName)return e.outerHTML.replace(/</g,"<").replace(/>/g,">");var a=e.childNodes;if(0===a.length)return e.outerHTML;for(var o="",i=0;i<a.length;i++)"PRE"===e.tagName&&(t=!0),o+=s(a[i],t);return f.node.openTagString(e)+o+f.node.closeTagString(e)}var l=[];function m(e){var t=e.replace(/;;/gi,";");return";"!==(t=t.replace(/^;/gi,"")).charAt(t.length)&&(t+=";"),t}function c(e){var t;for(t in e)if(Object.prototype.hasOwnProperty.call(e,t)){var n=t.match(u),r=null;"style"===t&&f.opts.htmlAllowedStyleProps.length&&(r=e[t].match(h)),n&&r?e[t]=m(r.join(";")):n&&("style"!==t||r)||delete e[t]}for(var a="",o=Object.keys(e).sort(),i=0;i<o.length;i++)e[t=o[i]].indexOf('"')<0?a+=" ".concat(t,'="').concat(e[t],'"'):a+=" ".concat(t,"='").concat(e[t],"'");return a}function v(e,t){var n,r=document.implementation.createHTMLDocument("Froala DOC").createElement("DIV");g(r).append(e);var a="";if(r){var o=f.node.contents(r);for(n=0;n<o.length;n++)t(o[n]);for(o=f.node.contents(r),n=0;n<o.length;n++)a+=s(o[n])}return a}function b(e,t,n){var r=e=function o(e){return l=[],e=(e=(e=(e=e.replace(/<script\b[^<]*(?:(?!<\/script>)<[^<]*)*<\/script>/gi,function(e){return l.push(e),"[FROALA.EDITOR.SCRIPT ".concat(l.length-1,"]")})).replace(/<noscript\b[^<]*(?:(?!<\/noscript>)<[^<]*)*<\/noscript>/gi,function(e){return l.push(e),"[FROALA.EDITOR.NOSCRIPT ".concat(l.length-1,"]")})).replace(/<meta((?:[\w\W]*?)) http-equiv="/g,'<meta$1 data-fr-http-equiv="')).replace(/<img((?:[\w\W]*?)) src="/g,'<img$1 data-fr-src="')}(e),a=null;return f.opts.fullPage&&(r=f.html.extractNode(e,"body")||(0<=e.indexOf("<body")?"":e),n&&(a=f.html.extractNode(e,"head")||"")),r=v(r,t),a&&(a=v(a,t)),function i(e){return e=(e=(e=e.replace(/\[FROALA\.EDITOR\.SCRIPT ([\d]*)\]/gi,function(e,t){return 0<=f.opts.htmlRemoveTags.indexOf("script")?"":l[parseInt(t,10)]})).replace(/\[FROALA\.EDITOR\.NOSCRIPT ([\d]*)\]/gi,function(e,t){if(0<=f.opts.htmlRemoveTags.indexOf("noscript"))return"";var n=l[parseInt(t,10)].replace(/</g,"<").replace(/>/g,">"),r=g(n);if(r&&r.length){var a=v(r.html(),E);r.html(a),n=r.get(0).outerHTML}return n})).replace(/<img((?:[\w\W]*?)) data-fr-src="/g,'<img$1 src="')}(function s(e,t,n){if(f.opts.fullPage){var r=f.html.extractDoctype(n),a=c(f.html.extractNodeAttrs(n,"html"));t=null===t?f.html.extractNode(n,"head")||"<title></title>":t;var o=c(f.html.extractNodeAttrs(n,"head")),i=c(f.html.extractNodeAttrs(n,"body"));return"".concat(r,"<html").concat(a,"><head").concat(o,">").concat(t,"</head><body").concat(i,">").concat(e,"</body></html>")}return e}(r,a,e))}function C(e){var t=f.doc.createElement("DIV");return t.innerText=e,t.textContent}function E(e){for(var t=f.node.contents(e),n=0;n<t.length;n++)t[n].nodeType!==Node.TEXT_NODE&&E(t[n]);!function c(i){if("SPAN"===i.tagName&&0<=(i.getAttribute("class")||"").indexOf("fr-marker"))return!1;if("PRE"===i.tagName&&function l(e){var t=e.innerHTML;0<=t.indexOf("\n")&&(e.innerHTML=t.replace(/\n/g,"<br>"))}(i),i.nodeType===Node.ELEMENT_NODE&&(i.getAttribute("data-fr-src")&&0!==i.getAttribute("data-fr-src").indexOf("blob:")&&i.setAttribute("data-fr-src",f.helpers.sanitizeURL(C(i.getAttribute("data-fr-src")))),i.getAttribute("href")&&i.setAttribute("href",f.helpers.sanitizeURL(C(i.getAttribute("href")))),i.getAttribute("src")&&i.setAttribute("src",f.helpers.sanitizeURL(C(i.getAttribute("src")))),i.getAttribute("srcdoc")&&i.setAttribute("srcdoc",f.clean.html(i.getAttribute("srcdoc"))),0<=["TABLE","TBODY","TFOOT","TR"].indexOf(i.tagName)&&(i.innerHTML=i.innerHTML.trim())),!f.opts.pasteAllowLocalImages&&i.nodeType===Node.ELEMENT_NODE&&"IMG"===i.tagName&&i.getAttribute("data-fr-src")&&0===i.getAttribute("data-fr-src").indexOf("file://"))return i.parentNode.removeChild(i),!1;if(i.nodeType===Node.ELEMENT_NODE&&kt.HTML5Map[i.tagName]&&""===f.node.attributes(i)){var e=kt.HTML5Map[i.tagName],t="<".concat(e,">").concat(i.innerHTML,"</").concat(e,">");i.insertAdjacentHTML("beforebegin",t),(i=i.previousSibling).parentNode.removeChild(i.nextSibling)}if(f.opts.htmlAllowComments||i.nodeType!==Node.COMMENT_NODE)if(i.tagName&&i.tagName.match(p))"STYLE"==i.tagName&&f.helpers.isMac()&&function(){var e,n=i.innerHTML.trim(),r=[],t=/{([^}]+)}/g;for(n=n.replace(/\/\*[\s\S]*?\*\/|([^\\:]|^)\/\/.*|<!--[\s\S]*?-->$/,"");e=t.exec(n);)r.push(e[1]);for(var a=function a(t){var e=n.substring(0,n.indexOf("{")).trim();0==!/^[a-z_-][a-z\d_-]*$/i.test(e)&&i.parentNode.querySelectorAll(e).forEach(function(e){e.removeAttribute("class"),e.setAttribute("style",r[t])}),n=n.substring(n.indexOf("}")+1)},o=0;-1!=n.indexOf("{");o++)a(o)}(),i.parentNode.removeChild(i);else if(i.tagName&&!i.tagName.match(d))"svg"===i.tagName?i.parentNode.removeChild(i):f.browser.safari&&"path"===i.tagName&&i.parentNode&&"svg"===i.parentNode.tagName||(i.outerHTML=i.innerHTML);else{var n=i.attributes;if(n)for(var r=n.length-1;0<=r;r--){var a=n[r],o=a.nodeName.match(u),s=null;"style"===a.nodeName&&f.opts.htmlAllowedStyleProps.length&&(s=a.value.match(h)),o&&s?a.value=m(s.join(";")):o&&("style"!==a.nodeName||s)||i.removeAttribute(a.nodeName)}}else 0!==i.data.indexOf("[FROALA.EDITOR")&&i.parentNode.removeChild(i)}(e)}return{_init:function e(){f.opts.fullPage&&g.merge(f.opts.htmlAllowedTags,["head","title","style","link","base","body","html","meta"])},html:function y(e,t,n,r){void 0===t&&(t=[]),void 0===n&&(n=[]),void 0===r&&(r=!1);var a,o=g.merge([],f.opts.htmlAllowedTags);for(a=0;a<t.length;a++)0<=o.indexOf(t[a])&&o.splice(o.indexOf(t[a]),1);var i=g.merge([],f.opts.htmlAllowedAttrs);for(a=0;a<n.length;a++)0<=i.indexOf(n[a])&&i.splice(i.indexOf(n[a]),1);return i.push("data-fr-.*"),i.push("fr-.*"),d=new RegExp("^".concat(o.join("$|^"),"$"),"gi"),u=new RegExp("^".concat(i.join("$|^"),"$"),"gi"),p=new RegExp("^".concat(f.opts.htmlRemoveTags.join("$|^"),"$"),"gi"),h=f.opts.htmlAllowedStyleProps.length?new RegExp("((^|;|\\s)".concat(f.opts.htmlAllowedStyleProps.join(":.+?(?=;|$))|((^|;|\\s)"),":.+?(?=(;)|$))"),"gi"):null,e=b(e,E,!0),"undefined"!=typeof f.opts.DOMPurify&&(e=f.opts.DOMPurify.sanitize(e,{ADD_TAGS:f.opts.htmlAllowedTags,ALLOW_UNKNOWN_PROTOCOLS:!0})),e},toHTML5:function r(){var e=f.el.querySelectorAll(Object.keys(kt.HTML5Map).join(","));if(e.length){var t=!1;f.el.querySelector(".fr-marker")||(f.selection.save(),t=!0);for(var n=0;n<e.length;n++)""===f.node.attributes(e[n])&&g(e[n]).replaceWith("<".concat(kt.HTML5Map[e[n].tagName],">").concat(e[n].innerHTML,"</").concat(kt.HTML5Map[e[n].tagName],">"));t&&f.selection.restore()}},tables:function t(){!function c(){for(var e=f.el.querySelectorAll("tr"),t=0,n=0;n<e.length;n++){var r=e[n].outerHTML.match(/rowspan="([0-9]+)"/);r&&(t+=Number(r[1])-1);for(var a=e[n].children,o=!0,i=0;i<a.length;i++)if("TH"!==a[i].tagName){o=!1;break}if(!1!==o&&0!==a.length){var s=e[n];if(1===a.length&&"TH"===a[0].tagName&&t)t--;else{for(;s&&"TABLE"!==s.tagName&&"THEAD"!==s.tagName;)s=s.parentNode;var l=s;l.firstChild.nodeType===Node.ELEMENT_NODE&&"THEAD"===l.firstChild.tagName?l=l.firstChild:"THEAD"!==l.tagName&&(l=f.doc.createElement("THEAD"),s.insertBefore(l,s.firstChild)),l.appendChild(e[n])}}}}()},lists:function L(){!function s(){var e,t=[];do{if(t.length){var n=t[0],r=f.doc.createElement("ul");n.parentNode.insertBefore(r,n);do{var a=n;n=n.nextSibling,r.appendChild(a)}while(n&&"LI"===n.tagName)}t=[];for(var o=f.el.querySelectorAll("li"),i=0;i<o.length;i++)e=o[i],f.node.isList(e.parentNode)||t.push(o[i])}while(0<t.length)}(),function o(){for(var e=f.el.querySelectorAll("ol + ol, ul + ul"),t=0;t<e.length;t++){var n=e[t];if(f.node.isList(n.previousSibling)&&f.node.openTagString(n)===f.node.openTagString(n.previousSibling)){for(var r=f.node.contents(n),a=0;a<r.length;a++)n.previousSibling.appendChild(r[a]);n.parentNode.removeChild(n)}}}(),function i(){for(var e=f.el.querySelectorAll("ul, ol"),t=0;t<e.length;t++)for(var n=f.node.contents(e[t]),r=null,a=n.length-1;0<=a;a--)!n[a].tagName&&f.opts.htmlUntouched||"LI"===n[a].tagName||"UL"==n[a].tagName||"OL"==n[a].tagName?r=null:"BR"==n[a].tagName?g(n[a]).remove():(r||(r=g(f.doc.createElement("LI"))).insertBefore(n[a]),r.prepend(n[a]))}(),function l(){var e,t,n;do{t=!1;var r=f.el.querySelectorAll("li:empty");for(e=0;e<r.length;e++)r[e].parentNode.removeChild(r[e]);var a=f.el.querySelectorAll("ul, ol");for(e=0;e<a.length;e++)(n=a[e]).querySelector("LI")||(t=!0,n.parentNode.removeChild(n))}while(!0===t)}(),function a(){for(var e=f.el.querySelectorAll("ul > ul, ol > ol, ul > ol, ol > ul"),t=0;t<e.length;t++){var n=e[t],r=n.previousSibling;r&&("LI"===r.tagName?r.appendChild(n):g(n).wrap("<li></li>"))}}(),function c(){for(var e=f.el.querySelectorAll("li > ul, li > ol"),t=0;t<e.length;t++){var n=e[t];if(n.nextSibling)for(var r=n.nextSibling;0<r.childNodes.length;)n.append(r.childNodes[0])}}(),function d(){for(var e=f.el.querySelectorAll("li > ul, li > ol"),t=0;t<e.length;t++){var n=e[t];if(f.node.isFirstSibling(n)&&"none"!=n.parentNode.style.listStyleType)g(n).before("<br/>");else if(n.previousSibling&&"BR"===n.previousSibling.tagName){for(var r=n.previousSibling.previousSibling;r&&f.node.hasClass(r,"fr-marker");)r=r.previousSibling;r&&"BR"!==r.tagName&&g(n.previousSibling).remove()}}}(),function n(){for(var e=f.el.querySelectorAll("li:empty"),t=0;t<e.length;t++)g(e[t]).remove()}()},invisibleSpaces:function n(e){return e.replace(/\u200b/g,"").length===e.length?e:f.clean.exec(e,a)},exec:b}},kt.XS=0,kt.SM=1,kt.MD=2,kt.LG=3;kt.LinkRegExCommon="[".concat("a-z\\u0080-\\u009f\\u00a1-\\uffff0-9-_\\.","]{1,}"),kt.LinkRegExEnd="((:[0-9]{1,5})|)(((\\/|\\?|#)[a-z\\u00a1-\\uffff0-9@?\\|!^=%&\\/~+#-\\'*-_{}]*)|())",kt.LinkRegExTLD="((".concat(kt.LinkRegExCommon,")(\\.(com|net|org|edu|mil|gov|co|biz|info|me|dev)))"),kt.LinkRegExHTTP="((ftp|http|https):\\/\\/".concat(kt.LinkRegExCommon,")"),kt.LinkRegExAuth="((ftp|http|https):\\/\\/[\\u0021-\\uffff]{1,}@".concat(kt.LinkRegExCommon,")"),kt.LinkRegExWWW="(www\\.".concat(kt.LinkRegExCommon,"\\.[a-z0-9-]{2,24})"),kt.LinkRegEx="(".concat(kt.LinkRegExTLD,"|").concat(kt.LinkRegExHTTP,"|").concat(kt.LinkRegExWWW,"|").concat(kt.LinkRegExAuth,")").concat(kt.LinkRegExEnd),kt.LinkProtocols=["mailto","tel","sms","notes","data"],kt.MAIL_REGEX=/.+@.+\..+/i,kt.MODULES.helpers=function(o){var i,s=o.$;function e(){var e={},t=function o(){var e,t=-1;return"Microsoft Internet Explorer"===navigator.appName?(e=navigator.userAgent,null!==new RegExp("MSIE ([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))):"Netscape"===navigator.appName&&(e=navigator.userAgent,null!==new RegExp("Trident/.*rv:([0-9]{1,}[\\.0-9]{0,})").exec(e)&&(t=parseFloat(RegExp.$1))),t}();if(0<t)e.msie=!0;else{var n=navigator.userAgent.toLowerCase(),r=/(edge)[ /]([\w.]+)/.exec(n)||/(chrome)[ /]([\w.]+)/.exec(n)||/(webkit)[ /]([\w.]+)/.exec(n)||/(opera)(?:.*version|)[ /]([\w.]+)/.exec(n)||/(msie) ([\w.]+)/.exec(n)||n.indexOf("compatible")<0&&/(mozilla)(?:.*? rv:([\w.]+)|)/.exec(n)||[],a=r[1]||"";r[2];r[1]&&(e[a]=!0),e.chrome?e.webkit=!0:e.webkit&&(e.safari=!0)}return e.msie&&(e.version=t),e}function t(){return/(iPad|iPhone|iPod)/g.test(navigator.userAgent)&&!a()}function n(){return/(Android)/g.test(navigator.userAgent)&&!a()}function r(){return/(Blackberry)/g.test(navigator.userAgent)}function a(){return/(Windows Phone)/gi.test(navigator.userAgent)}var l=null;return{_init:function c(){o.browser=e()},isIOS:t,isMac:function d(){return null===l&&(l=0<=navigator.platform.toUpperCase().indexOf("MAC")),l},isAndroid:n,isBlackberry:r,isWindowsPhone:a,isMobile:function f(){return n()||t()||r()},isEmail:function p(e){return!/^(https?:|ftps?:|)\/\//i.test(e)&&kt.MAIL_REGEX.test(e)},requestAnimationFrame:function u(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||window.mozRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}},getPX:function h(e){return parseInt(e,10)||0},screenSize:function g(e){try{var t=0;if((t=e?o.$box.width():o.$sc.width())<768)return kt.XS;if(768<=t&&t<992)return kt.SM;if(992<=t&&t<1200)return kt.MD;if(1200<=t)return kt.LG}catch(n){return kt.LG}},isTouch:function m(){return"ontouchstart"in window||window.DocumentTouch&&document instanceof window.DocumentTouch},sanitizeURL:function v(e){return o.opts.DOMPurify&&(e=o.opts.DOMPurify.sanitize(e,{ADD_TAGS:o.opts.htmlAllowedTags,ALLOW_UNKNOWN_PROTOCOLS:!0,ALLOWED_URI_REGEXP:/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp|xxx):|[^a-z]|[a-z+.]+(?:[^a-z+.\-:]|$))/i})),/^(https?:|ftps?:|)\/\
|